@zanichelli/albe-web-components 13.6.1 → 14.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (580) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/index-dc60bee7.js +0 -4
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/web-components-library.cjs.js +1 -1
  5. package/dist/cjs/z-accordion.cjs.entry.js +2 -2
  6. package/dist/cjs/z-accordion.cjs.entry.js.map +1 -1
  7. package/dist/cjs/z-alert.cjs.entry.js +1 -1
  8. package/dist/cjs/z-anchor-navigation.cjs.entry.js +1 -1
  9. package/dist/cjs/z-anchor-navigation.cjs.entry.js.map +1 -1
  10. package/dist/cjs/z-app-header_12.cjs.entry.js +5 -5
  11. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  12. package/dist/cjs/z-book-card.cjs.entry.js +3 -3
  13. package/dist/cjs/z-book-card.cjs.entry.js.map +1 -1
  14. package/dist/cjs/z-breadcrumb.cjs.entry.js +1 -1
  15. package/dist/cjs/z-breadcrumb.cjs.entry.js.map +1 -1
  16. package/dist/cjs/z-chip.cjs.entry.js +1 -1
  17. package/dist/cjs/z-chip.cjs.entry.js.map +1 -1
  18. package/dist/cjs/z-combobox.cjs.entry.js +1 -1
  19. package/dist/cjs/z-combobox.cjs.entry.js.map +1 -1
  20. package/dist/cjs/z-cover-hero.cjs.entry.js +1 -1
  21. package/dist/cjs/z-cover-hero.cjs.entry.js.map +1 -1
  22. package/dist/cjs/z-date-picker.cjs.entry.js +1 -1
  23. package/dist/cjs/z-date-picker.cjs.entry.js.map +1 -1
  24. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +2 -2
  25. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js.map +1 -1
  26. package/dist/cjs/z-file-upload.cjs.entry.js +1 -1
  27. package/dist/cjs/z-file-upload.cjs.entry.js.map +1 -1
  28. package/dist/cjs/z-info-box.cjs.entry.js +1 -1
  29. package/dist/cjs/z-info-box.cjs.entry.js.map +1 -1
  30. package/dist/cjs/z-info-reveal.cjs.entry.js +1 -1
  31. package/dist/cjs/z-info-reveal.cjs.entry.js.map +1 -1
  32. package/dist/cjs/z-menu-section.cjs.entry.js +1 -1
  33. package/dist/cjs/z-menu-section.cjs.entry.js.map +1 -1
  34. package/dist/cjs/z-menu.cjs.entry.js +1 -1
  35. package/dist/cjs/z-menu.cjs.entry.js.map +1 -1
  36. package/dist/cjs/z-messages-pocket.cjs.entry.js +1 -1
  37. package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
  38. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
  39. package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
  40. package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
  41. package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
  42. package/dist/cjs/z-myz-card-info.cjs.entry.js +1 -1
  43. package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
  44. package/dist/cjs/z-myz-card_4.cjs.entry.js +4 -4
  45. package/dist/cjs/z-myz-list-item.cjs.entry.js +1 -1
  46. package/dist/cjs/z-myz-list-item.cjs.entry.js.map +1 -1
  47. package/dist/cjs/z-myz-list.cjs.entry.js +1 -1
  48. package/dist/cjs/z-notification.cjs.entry.js +1 -1
  49. package/dist/cjs/z-notification.cjs.entry.js.map +1 -1
  50. package/dist/cjs/z-otp.cjs.entry.js +2 -2
  51. package/dist/cjs/z-pagination.cjs.entry.js +1 -1
  52. package/dist/cjs/z-pagination.cjs.entry.js.map +1 -1
  53. package/dist/cjs/z-pocket-message.cjs.entry.js +1 -1
  54. package/dist/cjs/z-pocket_3.cjs.entry.js +3 -3
  55. package/dist/cjs/z-popover.cjs.entry.js +1 -1
  56. package/dist/cjs/z-popover.cjs.entry.js.map +1 -1
  57. package/dist/cjs/z-range-picker.cjs.entry.js +1 -1
  58. package/dist/cjs/z-range-picker.cjs.entry.js.map +1 -1
  59. package/dist/cjs/z-select.cjs.entry.js +1 -1
  60. package/dist/cjs/z-select.cjs.entry.js.map +1 -1
  61. package/dist/cjs/z-skip-to-content.cjs.entry.js +1 -1
  62. package/dist/cjs/z-skip-to-content.cjs.entry.js.map +1 -1
  63. package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
  64. package/dist/cjs/z-stepper-item.cjs.entry.js.map +1 -1
  65. package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
  66. package/dist/cjs/z-toast-notification.cjs.entry.js.map +1 -1
  67. package/dist/cjs/z-toggle-button.cjs.entry.js +1 -1
  68. package/dist/cjs/z-toggle-button.cjs.entry.js.map +1 -1
  69. package/dist/cjs/z-toggle-switch.cjs.entry.js +1 -1
  70. package/dist/cjs/z-toggle-switch.cjs.entry.js.map +1 -1
  71. package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
  72. package/dist/cjs/z-tooltip.cjs.entry.js.map +1 -1
  73. package/dist/collection/collection-manifest.json +0 -1
  74. package/dist/collection/components/buttons/z-button/styles.css +3 -3
  75. package/dist/collection/components/buttons/z-chip/styles.css +3 -3
  76. package/dist/collection/components/buttons/z-toggle-button/styles.css +2 -2
  77. package/dist/collection/components/buttons/z-toggle-switch/styles.css +1 -1
  78. package/dist/collection/components/date-picker/styles.css +4 -4
  79. package/dist/collection/components/file-upload/z-dragdrop-area/styles.css +2 -2
  80. package/dist/collection/components/file-upload/z-file-upload/styles.css +1 -1
  81. package/dist/collection/components/indicators/z-stepper-item/styles.css +1 -1
  82. package/dist/collection/components/inputs/z-combobox/styles.css +4 -4
  83. package/dist/collection/components/inputs/z-input/styles.css +8 -8
  84. package/dist/collection/components/inputs/z-searchbar/styles.css +3 -3
  85. package/dist/collection/components/inputs/z-select/styles.css +1 -1
  86. package/dist/collection/components/modal/z-modal/styles.css +2 -2
  87. package/dist/collection/components/navigation/z-app-header/index.js +3 -3
  88. package/dist/collection/components/navigation/z-app-header/index.js.map +1 -1
  89. package/dist/collection/components/navigation/z-app-header/styles.css +2 -2
  90. package/dist/collection/components/navigation/z-menu/styles.css +2 -2
  91. package/dist/collection/components/navigation/z-menu-section/styles.css +2 -2
  92. package/dist/collection/components/notification/z-info-box/styles.css +1 -1
  93. package/dist/collection/components/notification/z-notification/styles.css +1 -1
  94. package/dist/collection/components/notification/z-toast-notification/styles.css +1 -1
  95. package/dist/collection/components/notification/z-tooltip/styles.css +1 -1
  96. package/dist/collection/components/z-accordion/index.js +3 -3
  97. package/dist/collection/components/z-accordion/index.js.map +1 -1
  98. package/dist/collection/components/z-accordion/styles.css +2 -2
  99. package/dist/collection/components/z-anchor-navigation/styles.css +2 -2
  100. package/dist/collection/components/z-book-card/index.js +2 -2
  101. package/dist/collection/components/z-book-card/index.js.map +1 -1
  102. package/dist/collection/components/z-book-card/index.spec.js +1 -1
  103. package/dist/collection/components/z-book-card/index.spec.js.map +1 -1
  104. package/dist/collection/components/z-book-card/styles.css +6 -6
  105. package/dist/collection/components/z-breadcrumb/styles.css +1 -1
  106. package/dist/collection/components/z-cover-hero/styles.css +1 -1
  107. package/dist/collection/components/z-info-reveal/styles.css +4 -4
  108. package/dist/collection/components/z-pagination/styles.css +5 -5
  109. package/dist/collection/components/z-popover/styles.css +1 -1
  110. package/dist/collection/components/z-skip-to-content/styles.css +1 -1
  111. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
  112. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
  113. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
  114. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
  115. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  116. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
  117. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
  118. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
  119. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
  120. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
  121. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
  122. package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
  123. package/dist/collection/snowflakes/myz/list/z-myz-list-item/styles.css +2 -2
  124. package/dist/collection/snowflakes/myz/pocket/z-messages-pocket/index.js +1 -1
  125. package/dist/collection/snowflakes/myz/pocket/z-pocket/index.js +1 -1
  126. package/dist/collection/snowflakes/myz/pocket/z-pocket-body/index.js +1 -1
  127. package/dist/collection/snowflakes/myz/pocket/z-pocket-header/index.js +1 -1
  128. package/dist/collection/snowflakes/myz/pocket/z-pocket-message/index.js +1 -1
  129. package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
  130. package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
  131. package/dist/components/index.d.ts +0 -2
  132. package/dist/components/index.js +0 -1
  133. package/dist/components/index.js.map +1 -1
  134. package/dist/components/index10.js +1 -1
  135. package/dist/components/index10.js.map +1 -1
  136. package/dist/components/index15.js +1 -1
  137. package/dist/components/index15.js.map +1 -1
  138. package/dist/components/index16.js +1 -1
  139. package/dist/components/index17.js +1 -1
  140. package/dist/components/index18.js +1 -1
  141. package/dist/components/index19.js +1 -1
  142. package/dist/components/index20.js +1 -1
  143. package/dist/components/index20.js.map +1 -1
  144. package/dist/components/index22.js +1 -1
  145. package/dist/components/index23.js +1 -1
  146. package/dist/components/index24.js +1 -1
  147. package/dist/components/index25.js +1 -1
  148. package/dist/components/index25.js.map +1 -1
  149. package/dist/components/index26.js +1 -1
  150. package/dist/components/index26.js.map +1 -1
  151. package/dist/components/index3.js +1 -1
  152. package/dist/components/index4.js +1 -1
  153. package/dist/components/index4.js.map +1 -1
  154. package/dist/components/index5.js +1 -1
  155. package/dist/components/index5.js.map +1 -1
  156. package/dist/components/index7.js +1 -1
  157. package/dist/components/index7.js.map +1 -1
  158. package/dist/components/z-accordion.js +2 -2
  159. package/dist/components/z-accordion.js.map +1 -1
  160. package/dist/components/z-anchor-navigation.js +1 -1
  161. package/dist/components/z-anchor-navigation.js.map +1 -1
  162. package/dist/components/z-app-header.js +2 -2
  163. package/dist/components/z-app-header.js.map +1 -1
  164. package/dist/components/z-book-card.js +3 -3
  165. package/dist/components/z-book-card.js.map +1 -1
  166. package/dist/components/z-breadcrumb.js +1 -1
  167. package/dist/components/z-breadcrumb.js.map +1 -1
  168. package/dist/components/z-combobox.js +1 -1
  169. package/dist/components/z-combobox.js.map +1 -1
  170. package/dist/components/z-cover-hero.js +1 -1
  171. package/dist/components/z-cover-hero.js.map +1 -1
  172. package/dist/components/z-date-picker.js +1 -1
  173. package/dist/components/z-date-picker.js.map +1 -1
  174. package/dist/components/z-file-upload.js +1 -1
  175. package/dist/components/z-file-upload.js.map +1 -1
  176. package/dist/components/z-info-box.js +1 -1
  177. package/dist/components/z-info-box.js.map +1 -1
  178. package/dist/components/z-info-reveal.js +1 -1
  179. package/dist/components/z-info-reveal.js.map +1 -1
  180. package/dist/components/z-menu-section.js +1 -1
  181. package/dist/components/z-menu-section.js.map +1 -1
  182. package/dist/components/z-menu.js +1 -1
  183. package/dist/components/z-menu.js.map +1 -1
  184. package/dist/components/z-messages-pocket.js +1 -1
  185. package/dist/components/z-myz-card-alert.js +1 -1
  186. package/dist/components/z-myz-card-dictionary.js +1 -1
  187. package/dist/components/z-myz-card-footer-sections.js +1 -1
  188. package/dist/components/z-myz-card-footer.js +1 -1
  189. package/dist/components/z-myz-card-icon.js +1 -1
  190. package/dist/components/z-myz-card-info.js +1 -1
  191. package/dist/components/z-myz-card-list.js +1 -1
  192. package/dist/components/z-myz-list.js +1 -1
  193. package/dist/components/z-notification.js +1 -1
  194. package/dist/components/z-notification.js.map +1 -1
  195. package/dist/components/z-otp.js +2 -2
  196. package/dist/components/z-pagination.js +1 -1
  197. package/dist/components/z-pagination.js.map +1 -1
  198. package/dist/components/z-pocket-message.js +1 -1
  199. package/dist/components/z-range-picker.js +1 -1
  200. package/dist/components/z-range-picker.js.map +1 -1
  201. package/dist/components/z-select.js +1 -1
  202. package/dist/components/z-select.js.map +1 -1
  203. package/dist/components/z-skip-to-content.js +1 -1
  204. package/dist/components/z-skip-to-content.js.map +1 -1
  205. package/dist/components/z-stepper-item.js +1 -1
  206. package/dist/components/z-stepper-item.js.map +1 -1
  207. package/dist/components/z-toast-notification.js +1 -1
  208. package/dist/components/z-toast-notification.js.map +1 -1
  209. package/dist/components/z-toggle-button.js +1 -1
  210. package/dist/components/z-toggle-button.js.map +1 -1
  211. package/dist/components/z-toggle-switch.js +1 -1
  212. package/dist/components/z-toggle-switch.js.map +1 -1
  213. package/dist/components/z-tooltip.js +1 -1
  214. package/dist/components/z-tooltip.js.map +1 -1
  215. package/dist/esm/index-f16bc2ca.js +0 -4
  216. package/dist/esm/loader.js +1 -1
  217. package/dist/esm/web-components-library.js +1 -1
  218. package/dist/esm/z-accordion.entry.js +2 -2
  219. package/dist/esm/z-accordion.entry.js.map +1 -1
  220. package/dist/esm/z-alert.entry.js +1 -1
  221. package/dist/esm/z-anchor-navigation.entry.js +1 -1
  222. package/dist/esm/z-anchor-navigation.entry.js.map +1 -1
  223. package/dist/esm/z-app-header_12.entry.js +5 -5
  224. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  225. package/dist/esm/z-book-card.entry.js +3 -3
  226. package/dist/esm/z-book-card.entry.js.map +1 -1
  227. package/dist/esm/z-breadcrumb.entry.js +1 -1
  228. package/dist/esm/z-breadcrumb.entry.js.map +1 -1
  229. package/dist/esm/z-chip.entry.js +1 -1
  230. package/dist/esm/z-chip.entry.js.map +1 -1
  231. package/dist/esm/z-combobox.entry.js +1 -1
  232. package/dist/esm/z-combobox.entry.js.map +1 -1
  233. package/dist/esm/z-cover-hero.entry.js +1 -1
  234. package/dist/esm/z-cover-hero.entry.js.map +1 -1
  235. package/dist/esm/z-date-picker.entry.js +1 -1
  236. package/dist/esm/z-date-picker.entry.js.map +1 -1
  237. package/dist/esm/z-dragdrop-area_2.entry.js +2 -2
  238. package/dist/esm/z-dragdrop-area_2.entry.js.map +1 -1
  239. package/dist/esm/z-file-upload.entry.js +1 -1
  240. package/dist/esm/z-file-upload.entry.js.map +1 -1
  241. package/dist/esm/z-info-box.entry.js +1 -1
  242. package/dist/esm/z-info-box.entry.js.map +1 -1
  243. package/dist/esm/z-info-reveal.entry.js +1 -1
  244. package/dist/esm/z-info-reveal.entry.js.map +1 -1
  245. package/dist/esm/z-menu-section.entry.js +1 -1
  246. package/dist/esm/z-menu-section.entry.js.map +1 -1
  247. package/dist/esm/z-menu.entry.js +1 -1
  248. package/dist/esm/z-menu.entry.js.map +1 -1
  249. package/dist/esm/z-messages-pocket.entry.js +1 -1
  250. package/dist/esm/z-myz-card-alert.entry.js +1 -1
  251. package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
  252. package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
  253. package/dist/esm/z-myz-card-footer.entry.js +1 -1
  254. package/dist/esm/z-myz-card-icon.entry.js +1 -1
  255. package/dist/esm/z-myz-card-info.entry.js +1 -1
  256. package/dist/esm/z-myz-card-list.entry.js +1 -1
  257. package/dist/esm/z-myz-card_4.entry.js +4 -4
  258. package/dist/esm/z-myz-list-item.entry.js +1 -1
  259. package/dist/esm/z-myz-list-item.entry.js.map +1 -1
  260. package/dist/esm/z-myz-list.entry.js +1 -1
  261. package/dist/esm/z-notification.entry.js +1 -1
  262. package/dist/esm/z-notification.entry.js.map +1 -1
  263. package/dist/esm/z-otp.entry.js +2 -2
  264. package/dist/esm/z-pagination.entry.js +1 -1
  265. package/dist/esm/z-pagination.entry.js.map +1 -1
  266. package/dist/esm/z-pocket-message.entry.js +1 -1
  267. package/dist/esm/z-pocket_3.entry.js +3 -3
  268. package/dist/esm/z-popover.entry.js +1 -1
  269. package/dist/esm/z-popover.entry.js.map +1 -1
  270. package/dist/esm/z-range-picker.entry.js +1 -1
  271. package/dist/esm/z-range-picker.entry.js.map +1 -1
  272. package/dist/esm/z-select.entry.js +1 -1
  273. package/dist/esm/z-select.entry.js.map +1 -1
  274. package/dist/esm/z-skip-to-content.entry.js +1 -1
  275. package/dist/esm/z-skip-to-content.entry.js.map +1 -1
  276. package/dist/esm/z-stepper-item.entry.js +1 -1
  277. package/dist/esm/z-stepper-item.entry.js.map +1 -1
  278. package/dist/esm/z-toast-notification.entry.js +1 -1
  279. package/dist/esm/z-toast-notification.entry.js.map +1 -1
  280. package/dist/esm/z-toggle-button.entry.js +1 -1
  281. package/dist/esm/z-toggle-button.entry.js.map +1 -1
  282. package/dist/esm/z-toggle-switch.entry.js +1 -1
  283. package/dist/esm/z-toggle-switch.entry.js.map +1 -1
  284. package/dist/esm/z-tooltip.entry.js +1 -1
  285. package/dist/esm/z-tooltip.entry.js.map +1 -1
  286. package/dist/types/components/navigation/z-app-header/index.d.ts +2 -2
  287. package/dist/types/components/z-accordion/index.d.ts +2 -2
  288. package/dist/types/components.d.ts +16 -156
  289. package/dist/web-components-library/p-1340bdd5.entry.js +2 -0
  290. package/dist/web-components-library/p-1340bdd5.entry.js.map +1 -0
  291. package/dist/web-components-library/p-182a0fd6.entry.js +2 -0
  292. package/dist/web-components-library/p-182a0fd6.entry.js.map +1 -0
  293. package/dist/web-components-library/{p-589a9033.entry.js → p-263fa2c9.entry.js} +2 -2
  294. package/dist/web-components-library/p-263fa2c9.entry.js.map +1 -0
  295. package/dist/web-components-library/p-362ca96c.entry.js +2 -0
  296. package/dist/web-components-library/p-362ca96c.entry.js.map +1 -0
  297. package/dist/web-components-library/{p-4d944fcd.entry.js → p-37e3abfc.entry.js} +2 -2
  298. package/dist/web-components-library/p-3bae6330.entry.js +2 -0
  299. package/dist/web-components-library/p-3bae6330.entry.js.map +1 -0
  300. package/dist/web-components-library/p-44e29069.entry.js +2 -0
  301. package/dist/web-components-library/p-44e29069.entry.js.map +1 -0
  302. package/dist/web-components-library/{p-acf5a569.entry.js → p-49e83bee.entry.js} +2 -2
  303. package/dist/web-components-library/{p-02c08dd1.entry.js → p-4b607fc6.entry.js} +2 -2
  304. package/dist/web-components-library/p-4dd8d4e8.entry.js +2 -0
  305. package/dist/web-components-library/p-4dd8d4e8.entry.js.map +1 -0
  306. package/dist/web-components-library/{p-164b4986.entry.js → p-5471bc89.entry.js} +2 -2
  307. package/dist/web-components-library/p-58d824a2.entry.js +2 -0
  308. package/dist/web-components-library/p-58d824a2.entry.js.map +1 -0
  309. package/dist/web-components-library/p-6b6c4bd0.entry.js +2 -0
  310. package/dist/web-components-library/p-6b6c4bd0.entry.js.map +1 -0
  311. package/dist/web-components-library/p-6ce8b24d.entry.js +2 -0
  312. package/dist/web-components-library/p-6ce8b24d.entry.js.map +1 -0
  313. package/dist/web-components-library/p-77917ccf.entry.js +2 -0
  314. package/dist/web-components-library/p-77917ccf.entry.js.map +1 -0
  315. package/dist/web-components-library/p-849c606d.entry.js +2 -0
  316. package/dist/web-components-library/p-849c606d.entry.js.map +1 -0
  317. package/dist/web-components-library/{p-e40b9b27.entry.js → p-95e91206.entry.js} +2 -2
  318. package/dist/web-components-library/p-9a7d67bf.entry.js +2 -0
  319. package/dist/web-components-library/p-9a7d67bf.entry.js.map +1 -0
  320. package/dist/web-components-library/p-a402854c.entry.js +2 -0
  321. package/dist/web-components-library/p-a402854c.entry.js.map +1 -0
  322. package/{www/build/p-e522c00c.entry.js → dist/web-components-library/p-a71abfa0.entry.js} +2 -2
  323. package/dist/web-components-library/p-a8d30d1c.entry.js +2 -0
  324. package/dist/web-components-library/{p-4691b59a.entry.js → p-af7f944e.entry.js} +2 -2
  325. package/dist/web-components-library/{p-4691b59a.entry.js.map → p-af7f944e.entry.js.map} +1 -1
  326. package/dist/web-components-library/p-b67887e7.entry.js +2 -0
  327. package/dist/web-components-library/p-b67887e7.entry.js.map +1 -0
  328. package/dist/web-components-library/p-b866934b.entry.js +2 -0
  329. package/dist/web-components-library/p-b866934b.entry.js.map +1 -0
  330. package/dist/web-components-library/{p-fe6f5926.entry.js → p-b93c49a8.entry.js} +2 -2
  331. package/dist/web-components-library/p-b93c49a8.entry.js.map +1 -0
  332. package/{www/build/p-41c72490.entry.js → dist/web-components-library/p-c0c46377.entry.js} +2 -2
  333. package/dist/web-components-library/{p-4cf24a3b.entry.js → p-cab235e5.entry.js} +2 -2
  334. package/dist/web-components-library/{p-c2d44867.entry.js → p-cb1cbc74.entry.js} +2 -2
  335. package/dist/web-components-library/p-ceaf6262.entry.js +2 -0
  336. package/dist/web-components-library/p-ceaf6262.entry.js.map +1 -0
  337. package/dist/web-components-library/p-ddf016c1.entry.js +2 -0
  338. package/dist/web-components-library/p-ddf016c1.entry.js.map +1 -0
  339. package/dist/web-components-library/{p-59875f0f.entry.js → p-e0122d52.entry.js} +2 -2
  340. package/dist/web-components-library/p-e0e322cc.entry.js +2 -0
  341. package/dist/web-components-library/p-e0e322cc.entry.js.map +1 -0
  342. package/dist/web-components-library/{p-eb10781f.entry.js → p-e10e6827.entry.js} +2 -2
  343. package/dist/web-components-library/p-e358dce6.entry.js +2 -0
  344. package/dist/web-components-library/p-e358dce6.entry.js.map +1 -0
  345. package/dist/web-components-library/p-ec879ac7.entry.js +2 -0
  346. package/dist/web-components-library/p-ec879ac7.entry.js.map +1 -0
  347. package/dist/web-components-library/{p-303663a9.entry.js → p-f41da106.entry.js} +2 -2
  348. package/dist/web-components-library/{p-303663a9.entry.js.map → p-f41da106.entry.js.map} +1 -1
  349. package/dist/web-components-library/{p-36f7ed38.entry.js → p-f6221ddd.entry.js} +2 -2
  350. package/dist/web-components-library/p-f71637f4.entry.js +2 -0
  351. package/dist/web-components-library/p-f71637f4.entry.js.map +1 -0
  352. package/dist/web-components-library/p-f74653b7.entry.js +2 -0
  353. package/dist/web-components-library/p-f74653b7.entry.js.map +1 -0
  354. package/dist/web-components-library/{p-0d799f83.entry.js → p-fc4bd856.entry.js} +2 -2
  355. package/dist/web-components-library/p-fc4bd856.entry.js.map +1 -0
  356. package/dist/web-components-library/{p-d593548c.entry.js → p-fd8d1fd0.entry.js} +2 -2
  357. package/dist/web-components-library/web-components-library.css +3 -3
  358. package/dist/web-components-library/web-components-library.esm.js +1 -1
  359. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  360. package/package.json +2 -2
  361. package/react/components.d.ts +0 -1
  362. package/react/components.js +2 -3
  363. package/react/components.js.map +1 -1
  364. package/www/build/p-08d1fd00.css +3 -0
  365. package/www/build/p-1340bdd5.entry.js +2 -0
  366. package/www/build/p-1340bdd5.entry.js.map +1 -0
  367. package/www/build/p-182a0fd6.entry.js +2 -0
  368. package/www/build/p-182a0fd6.entry.js.map +1 -0
  369. package/www/build/{p-589a9033.entry.js → p-263fa2c9.entry.js} +2 -2
  370. package/www/build/p-263fa2c9.entry.js.map +1 -0
  371. package/www/build/p-362ca96c.entry.js +2 -0
  372. package/www/build/p-362ca96c.entry.js.map +1 -0
  373. package/www/build/{p-4d944fcd.entry.js → p-37e3abfc.entry.js} +2 -2
  374. package/www/build/p-3bae6330.entry.js +2 -0
  375. package/www/build/p-3bae6330.entry.js.map +1 -0
  376. package/www/build/p-44e29069.entry.js +2 -0
  377. package/www/build/p-44e29069.entry.js.map +1 -0
  378. package/www/build/{p-acf5a569.entry.js → p-49e83bee.entry.js} +2 -2
  379. package/www/build/{p-02c08dd1.entry.js → p-4b607fc6.entry.js} +2 -2
  380. package/www/build/p-4dd8d4e8.entry.js +2 -0
  381. package/www/build/p-4dd8d4e8.entry.js.map +1 -0
  382. package/www/build/{p-164b4986.entry.js → p-5471bc89.entry.js} +2 -2
  383. package/www/build/{p-b0497738.js → p-552c7cae.js} +1 -1
  384. package/www/build/p-58d824a2.entry.js +2 -0
  385. package/www/build/p-58d824a2.entry.js.map +1 -0
  386. package/www/build/p-6b6c4bd0.entry.js +2 -0
  387. package/www/build/p-6b6c4bd0.entry.js.map +1 -0
  388. package/www/build/p-6ce8b24d.entry.js +2 -0
  389. package/www/build/p-6ce8b24d.entry.js.map +1 -0
  390. package/www/build/p-77917ccf.entry.js +2 -0
  391. package/www/build/p-77917ccf.entry.js.map +1 -0
  392. package/www/build/p-849c606d.entry.js +2 -0
  393. package/www/build/p-849c606d.entry.js.map +1 -0
  394. package/www/build/{p-e40b9b27.entry.js → p-95e91206.entry.js} +2 -2
  395. package/www/build/p-9a7d67bf.entry.js +2 -0
  396. package/www/build/p-9a7d67bf.entry.js.map +1 -0
  397. package/www/build/p-a402854c.entry.js +2 -0
  398. package/www/build/p-a402854c.entry.js.map +1 -0
  399. package/{dist/web-components-library/p-e522c00c.entry.js → www/build/p-a71abfa0.entry.js} +2 -2
  400. package/www/build/p-a8d30d1c.entry.js +2 -0
  401. package/www/build/{p-4691b59a.entry.js → p-af7f944e.entry.js} +2 -2
  402. package/www/build/{p-4691b59a.entry.js.map → p-af7f944e.entry.js.map} +1 -1
  403. package/www/build/p-b67887e7.entry.js +2 -0
  404. package/www/build/p-b67887e7.entry.js.map +1 -0
  405. package/www/build/p-b866934b.entry.js +2 -0
  406. package/www/build/p-b866934b.entry.js.map +1 -0
  407. package/www/build/{p-fe6f5926.entry.js → p-b93c49a8.entry.js} +2 -2
  408. package/www/build/p-b93c49a8.entry.js.map +1 -0
  409. package/{dist/web-components-library/p-41c72490.entry.js → www/build/p-c0c46377.entry.js} +2 -2
  410. package/www/build/{p-4cf24a3b.entry.js → p-cab235e5.entry.js} +2 -2
  411. package/www/build/{p-c2d44867.entry.js → p-cb1cbc74.entry.js} +2 -2
  412. package/www/build/p-ceaf6262.entry.js +2 -0
  413. package/www/build/p-ceaf6262.entry.js.map +1 -0
  414. package/www/build/p-ddf016c1.entry.js +2 -0
  415. package/www/build/p-ddf016c1.entry.js.map +1 -0
  416. package/www/build/{p-59875f0f.entry.js → p-e0122d52.entry.js} +2 -2
  417. package/www/build/p-e0e322cc.entry.js +2 -0
  418. package/www/build/p-e0e322cc.entry.js.map +1 -0
  419. package/www/build/{p-eb10781f.entry.js → p-e10e6827.entry.js} +2 -2
  420. package/www/build/p-e358dce6.entry.js +2 -0
  421. package/www/build/p-e358dce6.entry.js.map +1 -0
  422. package/www/build/p-ec879ac7.entry.js +2 -0
  423. package/www/build/p-ec879ac7.entry.js.map +1 -0
  424. package/www/build/{p-303663a9.entry.js → p-f41da106.entry.js} +2 -2
  425. package/www/build/{p-303663a9.entry.js.map → p-f41da106.entry.js.map} +1 -1
  426. package/www/build/{p-36f7ed38.entry.js → p-f6221ddd.entry.js} +2 -2
  427. package/www/build/p-f71637f4.entry.js +2 -0
  428. package/www/build/p-f71637f4.entry.js.map +1 -0
  429. package/www/build/p-f74653b7.entry.js +2 -0
  430. package/www/build/p-f74653b7.entry.js.map +1 -0
  431. package/www/build/{p-0d799f83.entry.js → p-fc4bd856.entry.js} +2 -2
  432. package/www/build/p-fc4bd856.entry.js.map +1 -0
  433. package/www/build/{p-d593548c.entry.js → p-fd8d1fd0.entry.js} +2 -2
  434. package/www/build/web-components-library.css +3 -3
  435. package/www/build/web-components-library.esm.js +1 -1
  436. package/www/build/web-components-library.esm.js.map +1 -1
  437. package/www/index.html +1 -1
  438. package/www/pages/book-cards.html +43 -7
  439. package/dist/cjs/z-link.cjs.entry.js +0 -71
  440. package/dist/cjs/z-link.cjs.entry.js.map +0 -1
  441. package/dist/collection/deprecated/z-link/index.js +0 -313
  442. package/dist/collection/deprecated/z-link/index.js.map +0 -1
  443. package/dist/collection/deprecated/z-link/index.spec.js +0 -172
  444. package/dist/collection/deprecated/z-link/index.spec.js.map +0 -1
  445. package/dist/collection/deprecated/z-link/styles.css +0 -167
  446. package/dist/components/z-link.d.ts +0 -11
  447. package/dist/components/z-link.js +0 -105
  448. package/dist/components/z-link.js.map +0 -1
  449. package/dist/esm/z-link.entry.js +0 -67
  450. package/dist/esm/z-link.entry.js.map +0 -1
  451. package/dist/types/deprecated/z-link/index.d.ts +0 -41
  452. package/dist/web-components-library/p-01579c23.entry.js +0 -2
  453. package/dist/web-components-library/p-01579c23.entry.js.map +0 -1
  454. package/dist/web-components-library/p-05359612.entry.js +0 -2
  455. package/dist/web-components-library/p-05359612.entry.js.map +0 -1
  456. package/dist/web-components-library/p-0681692a.entry.js +0 -2
  457. package/dist/web-components-library/p-0681692a.entry.js.map +0 -1
  458. package/dist/web-components-library/p-0d799f83.entry.js.map +0 -1
  459. package/dist/web-components-library/p-1768c5e0.entry.js +0 -2
  460. package/dist/web-components-library/p-1768c5e0.entry.js.map +0 -1
  461. package/dist/web-components-library/p-19ba8574.entry.js +0 -2
  462. package/dist/web-components-library/p-19ba8574.entry.js.map +0 -1
  463. package/dist/web-components-library/p-2ae88c97.entry.js +0 -2
  464. package/dist/web-components-library/p-2ae88c97.entry.js.map +0 -1
  465. package/dist/web-components-library/p-38dd5e41.entry.js +0 -2
  466. package/dist/web-components-library/p-38dd5e41.entry.js.map +0 -1
  467. package/dist/web-components-library/p-49407985.entry.js +0 -2
  468. package/dist/web-components-library/p-49407985.entry.js.map +0 -1
  469. package/dist/web-components-library/p-52fa5f80.entry.js +0 -2
  470. package/dist/web-components-library/p-52fa5f80.entry.js.map +0 -1
  471. package/dist/web-components-library/p-589a9033.entry.js.map +0 -1
  472. package/dist/web-components-library/p-5b260d8b.entry.js +0 -2
  473. package/dist/web-components-library/p-5b260d8b.entry.js.map +0 -1
  474. package/dist/web-components-library/p-5bb776c9.entry.js +0 -2
  475. package/dist/web-components-library/p-5bb776c9.entry.js.map +0 -1
  476. package/dist/web-components-library/p-67450112.entry.js +0 -2
  477. package/dist/web-components-library/p-67450112.entry.js.map +0 -1
  478. package/dist/web-components-library/p-7c5b1265.entry.js +0 -2
  479. package/dist/web-components-library/p-7c5b1265.entry.js.map +0 -1
  480. package/dist/web-components-library/p-a7e61213.entry.js +0 -2
  481. package/dist/web-components-library/p-a7e61213.entry.js.map +0 -1
  482. package/dist/web-components-library/p-a8901c35.entry.js +0 -2
  483. package/dist/web-components-library/p-a8901c35.entry.js.map +0 -1
  484. package/dist/web-components-library/p-a9d42b98.entry.js +0 -2
  485. package/dist/web-components-library/p-a9d42b98.entry.js.map +0 -1
  486. package/dist/web-components-library/p-b3c92412.entry.js +0 -2
  487. package/dist/web-components-library/p-b3c92412.entry.js.map +0 -1
  488. package/dist/web-components-library/p-b574f1be.entry.js +0 -2
  489. package/dist/web-components-library/p-b574f1be.entry.js.map +0 -1
  490. package/dist/web-components-library/p-ba8e67ee.entry.js +0 -2
  491. package/dist/web-components-library/p-ba8e67ee.entry.js.map +0 -1
  492. package/dist/web-components-library/p-ca65c04f.entry.js +0 -2
  493. package/dist/web-components-library/p-dbda8812.entry.js +0 -2
  494. package/dist/web-components-library/p-dbda8812.entry.js.map +0 -1
  495. package/dist/web-components-library/p-eac25945.entry.js +0 -2
  496. package/dist/web-components-library/p-eac25945.entry.js.map +0 -1
  497. package/dist/web-components-library/p-f0653be6.entry.js +0 -2
  498. package/dist/web-components-library/p-f0653be6.entry.js.map +0 -1
  499. package/dist/web-components-library/p-f9ddfc93.entry.js +0 -2
  500. package/dist/web-components-library/p-f9ddfc93.entry.js.map +0 -1
  501. package/dist/web-components-library/p-fe6f5926.entry.js.map +0 -1
  502. package/www/build/p-01579c23.entry.js +0 -2
  503. package/www/build/p-01579c23.entry.js.map +0 -1
  504. package/www/build/p-05359612.entry.js +0 -2
  505. package/www/build/p-05359612.entry.js.map +0 -1
  506. package/www/build/p-0681692a.entry.js +0 -2
  507. package/www/build/p-0681692a.entry.js.map +0 -1
  508. package/www/build/p-0d799f83.entry.js.map +0 -1
  509. package/www/build/p-1768c5e0.entry.js +0 -2
  510. package/www/build/p-1768c5e0.entry.js.map +0 -1
  511. package/www/build/p-19ba8574.entry.js +0 -2
  512. package/www/build/p-19ba8574.entry.js.map +0 -1
  513. package/www/build/p-2ae88c97.entry.js +0 -2
  514. package/www/build/p-2ae88c97.entry.js.map +0 -1
  515. package/www/build/p-38dd5e41.entry.js +0 -2
  516. package/www/build/p-38dd5e41.entry.js.map +0 -1
  517. package/www/build/p-49407985.entry.js +0 -2
  518. package/www/build/p-49407985.entry.js.map +0 -1
  519. package/www/build/p-52fa5f80.entry.js +0 -2
  520. package/www/build/p-52fa5f80.entry.js.map +0 -1
  521. package/www/build/p-589a9033.entry.js.map +0 -1
  522. package/www/build/p-5b260d8b.entry.js +0 -2
  523. package/www/build/p-5b260d8b.entry.js.map +0 -1
  524. package/www/build/p-5bb776c9.entry.js +0 -2
  525. package/www/build/p-5bb776c9.entry.js.map +0 -1
  526. package/www/build/p-67450112.entry.js +0 -2
  527. package/www/build/p-67450112.entry.js.map +0 -1
  528. package/www/build/p-7c5b1265.entry.js +0 -2
  529. package/www/build/p-7c5b1265.entry.js.map +0 -1
  530. package/www/build/p-92aa1e0f.css +0 -3
  531. package/www/build/p-a7e61213.entry.js +0 -2
  532. package/www/build/p-a7e61213.entry.js.map +0 -1
  533. package/www/build/p-a8901c35.entry.js +0 -2
  534. package/www/build/p-a8901c35.entry.js.map +0 -1
  535. package/www/build/p-a9d42b98.entry.js +0 -2
  536. package/www/build/p-a9d42b98.entry.js.map +0 -1
  537. package/www/build/p-b3c92412.entry.js +0 -2
  538. package/www/build/p-b3c92412.entry.js.map +0 -1
  539. package/www/build/p-b574f1be.entry.js +0 -2
  540. package/www/build/p-b574f1be.entry.js.map +0 -1
  541. package/www/build/p-ba8e67ee.entry.js +0 -2
  542. package/www/build/p-ba8e67ee.entry.js.map +0 -1
  543. package/www/build/p-ca65c04f.entry.js +0 -2
  544. package/www/build/p-dbda8812.entry.js +0 -2
  545. package/www/build/p-dbda8812.entry.js.map +0 -1
  546. package/www/build/p-eac25945.entry.js +0 -2
  547. package/www/build/p-eac25945.entry.js.map +0 -1
  548. package/www/build/p-f0653be6.entry.js +0 -2
  549. package/www/build/p-f0653be6.entry.js.map +0 -1
  550. package/www/build/p-f9ddfc93.entry.js +0 -2
  551. package/www/build/p-f9ddfc93.entry.js.map +0 -1
  552. package/www/build/p-fe6f5926.entry.js.map +0 -1
  553. /package/dist/web-components-library/{p-4d944fcd.entry.js.map → p-37e3abfc.entry.js.map} +0 -0
  554. /package/dist/web-components-library/{p-acf5a569.entry.js.map → p-49e83bee.entry.js.map} +0 -0
  555. /package/dist/web-components-library/{p-02c08dd1.entry.js.map → p-4b607fc6.entry.js.map} +0 -0
  556. /package/dist/web-components-library/{p-164b4986.entry.js.map → p-5471bc89.entry.js.map} +0 -0
  557. /package/dist/web-components-library/{p-e40b9b27.entry.js.map → p-95e91206.entry.js.map} +0 -0
  558. /package/dist/web-components-library/{p-e522c00c.entry.js.map → p-a71abfa0.entry.js.map} +0 -0
  559. /package/dist/web-components-library/{p-ca65c04f.entry.js.map → p-a8d30d1c.entry.js.map} +0 -0
  560. /package/dist/web-components-library/{p-41c72490.entry.js.map → p-c0c46377.entry.js.map} +0 -0
  561. /package/dist/web-components-library/{p-4cf24a3b.entry.js.map → p-cab235e5.entry.js.map} +0 -0
  562. /package/dist/web-components-library/{p-c2d44867.entry.js.map → p-cb1cbc74.entry.js.map} +0 -0
  563. /package/dist/web-components-library/{p-59875f0f.entry.js.map → p-e0122d52.entry.js.map} +0 -0
  564. /package/dist/web-components-library/{p-eb10781f.entry.js.map → p-e10e6827.entry.js.map} +0 -0
  565. /package/dist/web-components-library/{p-36f7ed38.entry.js.map → p-f6221ddd.entry.js.map} +0 -0
  566. /package/dist/web-components-library/{p-d593548c.entry.js.map → p-fd8d1fd0.entry.js.map} +0 -0
  567. /package/www/build/{p-4d944fcd.entry.js.map → p-37e3abfc.entry.js.map} +0 -0
  568. /package/www/build/{p-acf5a569.entry.js.map → p-49e83bee.entry.js.map} +0 -0
  569. /package/www/build/{p-02c08dd1.entry.js.map → p-4b607fc6.entry.js.map} +0 -0
  570. /package/www/build/{p-164b4986.entry.js.map → p-5471bc89.entry.js.map} +0 -0
  571. /package/www/build/{p-e40b9b27.entry.js.map → p-95e91206.entry.js.map} +0 -0
  572. /package/www/build/{p-e522c00c.entry.js.map → p-a71abfa0.entry.js.map} +0 -0
  573. /package/www/build/{p-ca65c04f.entry.js.map → p-a8d30d1c.entry.js.map} +0 -0
  574. /package/www/build/{p-41c72490.entry.js.map → p-c0c46377.entry.js.map} +0 -0
  575. /package/www/build/{p-4cf24a3b.entry.js.map → p-cab235e5.entry.js.map} +0 -0
  576. /package/www/build/{p-c2d44867.entry.js.map → p-cb1cbc74.entry.js.map} +0 -0
  577. /package/www/build/{p-59875f0f.entry.js.map → p-e0122d52.entry.js.map} +0 -0
  578. /package/www/build/{p-eb10781f.entry.js.map → p-e10e6827.entry.js.map} +0 -0
  579. /package/www/build/{p-36f7ed38.entry.js.map → p-f6221ddd.entry.js.map} +0 -0
  580. /package/www/build/{p-d593548c.entry.js.map → p-fd8d1fd0.entry.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["stylesCss","ZSelectStyle0","ZSelect","constructor","hostRef","this","itemsList","randomId","ControlSize","BIG","toggleSelectUl","bind","selectItem","handleSelectFocus","watchItems","getInitialItemsArray","selectedItem","find","item","selected","getFocusedItemHandler","e","focusedItemId","target","id","getSelectedItem","getValue","getSelectedValue","setValue","value","values","push","includes","emitOptionSelect","optionSelect","emit","htmlid","emitResetSelect","resetSelect","componentWillLoad","componentWillRender","filterItems","searchString","items","JSON","parse","mapSelectedItemToItemsArray","initialItemsList","map","_a","prevList","length","filter","name","toUpperCase","start","indexOf","end","newName","substring","hasAutocomplete","boolean","autocomplete","handleInputChange","detail","isOpen","disabled","i","arrowsSelectNav","key","showResetIcon","resetItem","arrows","KeyboardCode","ARROW_DOWN","ARROW_UP","preventDefault","stopPropagation","index","focusSelectItem","focusElem","element","querySelector","focus","selfFocusOnClose","readonly","document","addEventListener","removeEventListener","handleInputClick","cp","composedPath","clearIcon","classList","contains","KeyboardEvent","ESC","TAB","ENTER","tree","getElementTree","getClickedElement","parent","elem","nodeName","toLowerCase","MouseEvent","scrollToLetter","letter","foundItem","charAt","renderInput","h","class","placeholder","replace","label","ariaLabel","icon","hasclearicon","message","status","undefined","role","size","onClick","onKeyUp","keyCode","handleKeyboardSubmit","onKeyDown","onInputChange","onKeyPress","String","fromCharCode","renderSelectUl","tabindex","fixed","isfixed","listSizeType","filled","renderResetItem","renderSelectUlItems","hide","hasGroupItems","clickable","dividerType","ListDividerType","ELEMENT","onClickItem","renderItem","lastItem","HEADER","innerHTML","SMALL","X_SMALL","ListSize","MEDIUM","renderNoSearchResults","renderSelectGroupItems","array","itemKey","newData","reduce","group","category","zListItem","Object","entries","slot","color","fill","noresultslabel","renderMessage","render"],"sources":["src/components/inputs/z-select/styles.css?tag=z-select&encapsulation=scoped","src/components/inputs/z-select/index.tsx"],"sourcesContent":[":host {\n display: inline-block;\n width: inherit;\n color: var(--color-default-text);\n font-family: var(--font-family-sans);\n font-size: var(--font-size-3);\n font-weight: var(--font-rg);\n}\n\n:host([size=\"small\"]),\n:host([size=\"x-small\"]) {\n font-size: var(--font-size-2);\n}\n\n.select-wrapper > z-input {\n width: 100%;\n}\n\n.select-wrapper > div {\n position: relative;\n}\n\n.select-wrapper > div.closed {\n overflow: hidden;\n height: 0;\n}\n\n.select-wrapper .ul-scroll-wrapper {\n position: absolute;\n width: 100%;\n box-sizing: border-box;\n padding: calc(var(--space-unit) * 0.5) var(--space-unit);\n border: var(--border-size-small) solid var(--gray200);\n border-top: none;\n background: var(--color-surface01);\n outline: none;\n}\n\n.select-wrapper .closed .ul-scroll-wrapper {\n z-index: 10;\n}\n\n.select-wrapper .open .ul-scroll-wrapper {\n z-index: 20;\n}\n\n.select-wrapper .ul-scroll-wrapper.fixed {\n position: static;\n}\n\n.select-wrapper .ul-scroll-wrapper > z-list {\n position: relative;\n overflow: auto;\n max-height: 240px;\n padding: calc(var(--space-unit) * 0.5);\n outline: none;\n\n /* Firefox scrollbar */\n scrollbar-color: var(--color-primary01) transparent;\n}\n\n.select-wrapper .ul-scroll-wrapper > z-list::-webkit-scrollbar {\n width: 10px;\n background: linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);\n border-radius: var(--border-radius);\n}\n\n.select-wrapper .ul-scroll-wrapper > z-list::-webkit-scrollbar-track {\n background-color: transparent;\n}\n\n.select-wrapper .ul-scroll-wrapper > z-list::-webkit-scrollbar-thumb {\n width: 10px;\n background-color: var(--color-primary01);\n border-radius: var(--border-radius);\n}\n\n.select-wrapper .ul-scroll-wrapper > z-list::-webkit-scrollbar-thumb:hover {\n background-color: var(--color-hover-primary);\n}\n\n.select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container {\n display: flex;\n align-items: center;\n padding-left: calc(var(--space-unit) * 1.5);\n}\n\n.select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container .list-element-content {\n display: block;\n padding: calc(var(--space-unit) * 0.5) 0;\n}\n\n.select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container > z-icon + .list-element-content {\n display: block;\n padding: calc(var(--space-unit) * 0.5) var(--space-unit);\n}\n\n:host([size=\"x-small\"])\n .select-wrapper\n .ul-scroll-wrapper\n z-list\n z-list-element\n .list-element-container\n .list-element-content {\n padding: 0;\n}\n\n:host([size=\"small\"]) .select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container > z-icon {\n --z-icon-width: 16px;\n --z-icon-height: 16px;\n}\n\n:host([size=\"x-small\"]) .select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container > z-icon {\n --z-icon-width: 14px;\n --z-icon-height: 14px;\n}\n\n:host([size=\"x-small\"])\n .select-wrapper\n .ul-scroll-wrapper\n z-list\n z-list-element\n .list-element-container\n > z-icon\n + .list-element-content {\n padding: 0 var(--space-unit);\n}\n\n.select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container .list-element-content.selected {\n font-weight: bold;\n}\n\n.select-wrapper .ul-scroll-wrapper .no-results z-icon {\n margin-right: var(--space-unit);\n}\n\n.z-list-group-title {\n color: var(--gray800);\n}\n\n.reset-item {\n color: var(--color-primary01);\n fill: var(--color-primary01);\n}\n\n.reset-item-content {\n display: flex;\n align-items: center;\n}\n\n.reset-item.reset-item-margin .reset-item-content {\n margin-left: calc(var(--space-unit));\n}\n\n.reset-item .reset-item-content > z-icon {\n margin-right: var(--space-unit);\n}\n\n.reset-item.hide {\n display: none;\n}\n","import {Component, Prop, State, h, Event, EventEmitter, Watch, Element, Method, Listen} from \"@stencil/core\";\nimport {SelectItem, ListDividerType, KeyboardCode, InputStatus, ControlSize, ListSize} from \"../../../beans\";\nimport {randomId, handleKeyboardSubmit, getClickedElement, getElementTree, boolean} from \"../../../utils/utils\";\n\n@Component({\n tag: \"z-select\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZSelect {\n @Element() element: HTMLZSelectElement;\n\n /** the id of the input element */\n @Prop()\n htmlid = `id-${randomId()}`;\n\n /** the input select options */\n @Prop()\n items: SelectItem[] | string;\n\n /** the input name */\n @Prop()\n name?: string;\n\n /** the input label */\n @Prop()\n label?: string;\n\n /** the input aria-label */\n @Prop()\n ariaLabel = \"\";\n\n /** the input is disabled */\n @Prop()\n disabled?: boolean = false;\n\n /** the input is readonly */\n @Prop()\n readonly?: boolean = false;\n\n /** the input placeholder (optional) */\n @Prop()\n placeholder?: string;\n\n /** the input html title (optional) */\n @Prop()\n htmltitle?: string;\n\n /** the input status (optional) */\n @Prop()\n status?: InputStatus;\n\n /** input helper message (optional) - if set to `false` message won't be displayed */\n @Prop()\n message?: string | boolean = true;\n\n /** the input has autocomplete option */\n @Prop()\n autocomplete?: boolean = false;\n\n /** no result text message */\n @Prop()\n noresultslabel?: string = \"Nessun risultato\";\n\n /** */\n @Prop()\n hasGroupItems?: boolean;\n\n /** When fixed, it occupies space and pushes down next elements. */\n @Prop()\n isfixed?: boolean = false;\n\n /** */\n @Prop()\n resetItem?: string;\n\n /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */\n @Prop()\n size?: ControlSize = ControlSize.BIG;\n\n @State()\n isOpen = false;\n\n @State()\n selectedItem: null | SelectItem = null;\n\n @State()\n focusedItemId: string;\n\n @State()\n searchString: null | string;\n\n private itemsList: SelectItem[] = [];\n\n constructor() {\n this.toggleSelectUl = this.toggleSelectUl.bind(this);\n this.selectItem = this.selectItem.bind(this);\n this.handleSelectFocus = this.handleSelectFocus.bind(this);\n }\n\n @Watch(\"items\")\n watchItems(): void {\n this.itemsList = this.getInitialItemsArray();\n this.selectedItem = this.itemsList.find((item: SelectItem) => item.selected);\n }\n\n @Listen(\"ariaDescendantFocus\")\n getFocusedItemHandler(e: CustomEvent): void {\n this.focusedItemId = (e.target as Element).id;\n }\n\n /** get the input selected options */\n @Method()\n async getSelectedItem(): Promise<SelectItem> {\n return this.selectedItem;\n }\n\n /** get the input value */\n @Method()\n async getValue(): Promise<string> {\n return this.getSelectedValue();\n }\n\n /** set the input value */\n @Method()\n async setValue(value: string | string[]): Promise<void> {\n let values: string[] = [];\n if (typeof value === \"string\") {\n values.push(value);\n } else {\n values = value;\n }\n\n this.selectedItem = this.itemsList.find((item: SelectItem) => values.includes(item.id));\n }\n\n /** Emitted on select option selection, returns select id, selected item id */\n @Event()\n optionSelect: EventEmitter;\n\n private emitOptionSelect(): void {\n this.optionSelect.emit({\n id: this.htmlid,\n selected: this.getSelectedValue(),\n });\n }\n\n /** Emitted on reset selected item, returns select id, selected item id */\n @Event()\n resetSelect: EventEmitter;\n\n private emitResetSelect(): void {\n this.resetSelect.emit({\n id: this.htmlid,\n });\n }\n\n componentWillLoad(): void {\n this.watchItems();\n }\n\n componentWillRender(): void {\n this.filterItems(this.searchString);\n }\n\n private getInitialItemsArray(): SelectItem[] {\n return typeof this.items === \"string\" ? JSON.parse(this.items) : this.items;\n }\n\n private mapSelectedItemToItemsArray(): SelectItem[] {\n const initialItemsList = this.getInitialItemsArray();\n\n return initialItemsList.map((item: SelectItem) => {\n item.selected = item.id === this.selectedItem?.id;\n\n return item;\n });\n }\n\n private getSelectedValue(): string {\n return this.selectedItem?.id;\n }\n\n private filterItems(searchString: string): void {\n const prevList = this.mapSelectedItemToItemsArray();\n if (!searchString?.length) {\n this.itemsList = prevList;\n } else {\n this.itemsList = prevList\n .filter((item: SelectItem) => {\n return item.name.toUpperCase().includes(searchString.toUpperCase());\n })\n .map((item: SelectItem) => {\n const start = item.name.toUpperCase().indexOf(searchString.toUpperCase());\n const end = start + searchString.length;\n const newName =\n item.name.substring(0, start) +\n `<strong>${item.name.substring(start, end)}</strong>` +\n item.name.substring(end, item.name.length);\n item.name = newName;\n\n return item;\n });\n }\n }\n\n private hasAutocomplete(): boolean {\n return boolean(this.autocomplete) === true;\n }\n\n private handleInputChange(e: CustomEvent): void {\n this.searchString = e.detail.value;\n if (!this.isOpen) {\n this.toggleSelectUl();\n }\n }\n\n private selectItem(item: null | SelectItem, selected: boolean): void {\n if (item && item.disabled) {\n return;\n }\n\n this.itemsList = this.mapSelectedItemToItemsArray();\n this.itemsList = this.itemsList.map((i: SelectItem) => {\n i.selected = false;\n if (i.id === item?.id) {\n i.selected = selected;\n }\n\n return i;\n });\n\n this.selectedItem = this.itemsList.find((item: SelectItem) => item.selected);\n\n this.emitOptionSelect();\n\n if (this.searchString) {\n this.searchString = null;\n }\n }\n\n private arrowsSelectNav(e: KeyboardEvent, key: number): void {\n const showResetIcon = this.resetItem && !!this.selectedItem;\n const arrows = [KeyboardCode.ARROW_DOWN, KeyboardCode.ARROW_UP];\n if (!arrows.includes(e.key as KeyboardCode)) {\n return;\n }\n\n e.preventDefault();\n e.stopPropagation();\n\n if (!this.isOpen) {\n this.toggleSelectUl();\n }\n\n let index: number;\n\n if (this.resetItem) {\n if (e.key === KeyboardCode.ARROW_DOWN) {\n index = key + 1 === this.itemsList.length + 1 ? +!showResetIcon : key + 1;\n } else if (e.key === KeyboardCode.ARROW_UP) {\n index = key <= +!showResetIcon ? this.itemsList.length : key - 1;\n }\n }\n\n if (!this.resetItem) {\n if (e.key === KeyboardCode.ARROW_DOWN) {\n index = key + 1 === this.itemsList.length ? 0 : key + 1;\n } else if (e.key === KeyboardCode.ARROW_UP) {\n index = key <= 0 ? this.itemsList.length - 1 : key - 1;\n }\n }\n\n this.focusSelectItem(index);\n }\n\n private focusSelectItem(index: number): void {\n const focusElem: HTMLLIElement = this.element.querySelector(`#${this.htmlid}_${index}`);\n if (focusElem) {\n focusElem.focus();\n }\n }\n\n private toggleSelectUl(selfFocusOnClose = false): void {\n if (this.disabled || this.readonly) {\n return;\n }\n\n if (!this.isOpen) {\n document.addEventListener(\"click\", this.handleSelectFocus);\n document.addEventListener(\"keyup\", this.handleSelectFocus);\n } else {\n document.removeEventListener(\"click\", this.handleSelectFocus);\n document.removeEventListener(\"keyup\", this.handleSelectFocus);\n if (selfFocusOnClose) {\n (this.element.querySelector(`#${this.htmlid}_input`) as HTMLInputElement).focus();\n }\n }\n\n this.focusedItemId = \"\";\n this.isOpen = !this.isOpen;\n }\n\n private handleInputClick(e: MouseEvent | KeyboardEvent): void {\n const cp = e.composedPath();\n const clearIcon = cp.find((item: HTMLElement) => item.classList && item.classList.contains(\"reset-icon\"));\n if (clearIcon) {\n e.stopPropagation();\n\n return;\n }\n\n this.toggleSelectUl();\n }\n\n private handleSelectFocus(e: MouseEvent | KeyboardEvent): void {\n if (e instanceof KeyboardEvent && e.key === KeyboardCode.ESC) {\n e.stopPropagation();\n\n return this.toggleSelectUl(true);\n }\n\n if (e instanceof KeyboardEvent && e.key !== KeyboardCode.TAB && e.key !== KeyboardCode.ENTER) {\n return;\n }\n\n const tree = getElementTree(getClickedElement());\n const parent = tree.find((elem: HTMLElement) => {\n return elem.nodeName.toLowerCase() === \"z-input\" && elem.id === `${this.htmlid}_input`;\n });\n\n if (!parent) {\n this.toggleSelectUl(e instanceof MouseEvent ? true : false);\n }\n }\n\n private scrollToLetter(letter: string): void {\n const foundItem = this.itemsList.find((item: SelectItem) => item.name.charAt(0) === letter);\n if (foundItem) {\n this.focusSelectItem(this.itemsList.indexOf(foundItem));\n }\n }\n\n private renderInput(): HTMLZInputElement {\n return (\n <z-input\n class={{\n \"active-select\": this.isOpen,\n \"cursor-select\": !this.autocomplete,\n }}\n id={`${this.htmlid}_input`}\n htmlid={`${this.htmlid}_select_input`}\n placeholder={this.placeholder}\n value={!this.isOpen && this.selectedItem ? this.selectedItem.name.replace(/<[^>]+>/g, \"\") : null}\n label={this.label}\n aria-expanded={this.isOpen ? \"true\" : \"false\"}\n aria-label={this.ariaLabel}\n aria-controls={`${this.htmlid}_list`}\n aria-autocomplete={this.hasAutocomplete() ? \"list\" : \"none\"}\n aria-activedescendant={this.isOpen ? this.focusedItemId : \"\"}\n icon={this.isOpen ? \"caret-up\" : \"caret-down\"}\n hasclearicon={this.hasAutocomplete()}\n message={false}\n disabled={this.disabled}\n readonly={this.readonly || (!this.hasAutocomplete() && this.isOpen)}\n status={this.isOpen ? undefined : this.status}\n role=\"combobox\"\n size={this.size}\n onClick={(e: MouseEvent) => {\n this.handleInputClick(e);\n }}\n onKeyUp={(e: KeyboardEvent) => {\n if (e.keyCode !== 13) {\n e.preventDefault();\n }\n handleKeyboardSubmit(e, this.toggleSelectUl);\n }}\n onKeyDown={(e: KeyboardEvent) => {\n return this.arrowsSelectNav(\n e,\n this.selectedItem ? this.itemsList.indexOf(this.selectedItem) : this.resetItem ? 0 : -1\n );\n }}\n onInputChange={(e: CustomEvent) => {\n this.handleInputChange(e);\n }}\n onKeyPress={(e: KeyboardEvent) => {\n if (!this.hasAutocomplete()) {\n e.preventDefault();\n this.scrollToLetter(String.fromCharCode(e.keyCode));\n }\n }}\n />\n );\n }\n\n private renderSelectUl(): HTMLDivElement {\n return (\n <div\n class={this.isOpen ? \"open\" : \"closed\"}\n tabindex=\"-1\"\n >\n <div\n class={{\n \"ul-scroll-wrapper\": true,\n \"fixed\": this.isfixed,\n }}\n tabindex=\"-1\"\n >\n <z-list\n role=\"listbox\"\n aria-label={this.ariaLabel || this.label}\n tabindex={this.disabled || this.readonly || !this.isOpen ? -1 : 0}\n id={`${this.htmlid}_list`}\n aria-multiselectable={false}\n size={this.listSizeType()}\n class={{\n disabled: this.disabled,\n readonly: this.readonly,\n filled: !!this.selectedItem,\n [`input-${this.status}`]: !this.isOpen && !!this.status,\n }}\n >\n {this.resetItem && this.renderResetItem()}\n {this.renderSelectUlItems()}\n </z-list>\n </div>\n </div>\n );\n }\n\n private renderResetItem(): HTMLZListElementElement {\n return (\n <z-list-element\n class={{\n \"hide\": !this.selectedItem || !this.resetItem,\n \"reset-item\": true,\n \"reset-item-margin\": !this.hasGroupItems,\n }}\n clickable={true}\n disabled={false}\n dividerType={ListDividerType.ELEMENT}\n role=\"option\"\n tabindex=\"0\"\n aria-selected=\"false\"\n id={`${this.htmlid}_${this.resetItem ? \"0\" : \"none\"}`}\n size={this.listSizeType()}\n onClickItem={() => {\n this.selectedItem = null;\n this.searchString = null;\n this.emitResetSelect();\n }}\n onKeyDown={(e: KeyboardEvent) => this.arrowsSelectNav(e, 0)}\n >\n <div class=\"reset-item-content\">\n <z-icon name=\"multiply-circled\" />\n <span>{this.resetItem}</span>\n </div>\n </z-list-element>\n );\n }\n\n private renderItem(item: SelectItem, key: number, lastItem: boolean): HTMLZListElementElement {\n return (\n <z-list-element\n clickable={!item.disabled}\n disabled={item.disabled}\n dividerType={lastItem ? ListDividerType.HEADER : ListDividerType.ELEMENT}\n role=\"option\"\n tabindex={item.disabled || !this.isOpen ? -1 : 0}\n aria-selected={item.selected ? \"true\" : \"false\"}\n id={`${this.htmlid}_${key}`}\n size={this.listSizeType()}\n onClickItem={() => this.selectItem(item, true)}\n onKeyDown={(e: KeyboardEvent) => this.arrowsSelectNav(e, key)}\n >\n <div class=\"list-element-container\">\n {item.icon && <z-icon name={item.icon} />}\n <span\n class={{\n \"selected\": !!item.selected,\n \"list-element-content\": true,\n }}\n innerHTML={item.name}\n />\n </div>\n </z-list-element>\n );\n }\n\n private listSizeType(): ListSize {\n if (this.size === ControlSize.SMALL || this.size === ControlSize.X_SMALL) {\n return ListSize.SMALL;\n }\n\n return ListSize.MEDIUM;\n }\n\n private renderSelectUlItems(): HTMLZListElementElement | HTMLZListElementElement[] {\n if (!this.itemsList.length) {\n return this.renderNoSearchResults();\n }\n\n if (this.hasGroupItems) {\n return this.renderSelectGroupItems();\n }\n\n return this.itemsList.map((item: SelectItem, key, array) => {\n const lastItem = array.length === key + 1;\n const itemKey = this.resetItem ? key + 1 : key;\n\n return this.renderItem(item, itemKey, lastItem);\n });\n }\n\n private renderSelectGroupItems(): HTMLZListElementElement | HTMLZListElementElement[] {\n const newData = this.itemsList.reduce((group, item, index, array) => {\n const {category} = item;\n const lastItem = array.length === index + 1;\n const itemKey = this.resetItem ? index + 1 : index;\n const zListItem = this.renderItem(item, itemKey, lastItem);\n\n group[category] = group[category] ?? [];\n group[category].push(zListItem);\n\n return group;\n }, {});\n\n return Object.entries(newData as {[key: string]: HTMLZListElementElement[]}).map(([key, value]) => {\n return (\n <z-list-group divider-type={ListDividerType.ELEMENT}>\n <span\n class=\"body-3-sb z-list-group-title\"\n slot=\"header-title\"\n >\n {key}\n </span>\n {value.map((item) => item)}\n </z-list-group>\n );\n });\n }\n\n private renderNoSearchResults(): HTMLZListElementElement {\n return (\n <z-list-element\n color=\"blue500\"\n class=\"no-results\"\n size={this.listSizeType()}\n >\n <z-icon\n name=\"multiply-circle\"\n fill=\"blue500\"\n />\n {this.noresultslabel}\n </z-list-element>\n );\n }\n\n private renderMessage(): HTMLZInputMessageElement {\n if (boolean(this.message) === false) {\n return;\n }\n\n return (\n <z-input-message\n message={boolean(this.message) === true ? undefined : (this.message as string)}\n status={this.status}\n class={this.size}\n />\n );\n }\n\n render(): HTMLDivElement {\n return (\n <div class=\"select-wrapper\">\n {this.renderInput()}\n {this.renderSelectUl()}\n {this.renderMessage()}\n </div>\n );\n }\n}\n"],"mappings":"0MAAA,MAAMA,EAAY,8xIAClB,MAAAC,EAAeD,E,MCSFE,EAAO,MAqFlB,WAAAC,CAAAC,G,8FAFQC,KAAAC,UAA0B,G,YA9EzB,MAAMC,M,6EAgBH,G,cAIS,M,cAIA,M,uFAgBQ,K,kBAIJ,M,oBAIC,mB,0CAQN,M,mCAQCC,EAAYC,I,YAGxB,M,kBAGyB,K,yDAWhCJ,KAAKK,eAAiBL,KAAKK,eAAeC,KAAKN,MAC/C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QxD,KAAKmH,WAAa,KAAOE,UAAarH,KAAKmH,QAC5DC,OAAQpH,KAAKoH,OACbR,MAAO5G,KAAKuH,M,CAKlB,MAAAiD,GACE,OACE7D,EAAA,OAAA3C,IAAA,2CAAK4C,MAAM,kBACR5G,KAAK0G,cACL1G,KAAKiI,iBACLjI,KAAKuK,gB"}
@@ -1,2 +1,2 @@
1
- import{r as e,h as t,a as o,g as r}from"./p-10bb4f4b.js";import{M as a,Q as i}from"./p-025f494e.js";const n=':host{--cover-hero-overlay:linear-gradient(270deg, #0000 0%, #000000e6 100%);--cover-hero-text-color:var(--color-text-inverse);display:block;overflow:hidden}:host,*{box-sizing:border-box}:host .main-container{position:relative;width:100%;align-items:baseline}:host .content-container{color:var(--cover-hero-text-color);fill:var(--cover-hero-text-color)}:host .main-container .cover-container{position:relative;width:100%;padding-top:calc(100% / (var(--cover-hero-aspect-ratio, var(--image-aspect-ratio, 16/9))));background-color:var(--gray600)}::slotted([slot="cover"]){position:absolute;display:block;width:100%;height:100%;inset:0;object-fit:cover;object-position:top center}::slotted(z-info-reveal){position:absolute;z-index:1;right:var(--grid-margin);bottom:var(--grid-margin)}:host([variant="overlay"]:not([preserve-aspect-ratio=""],[preserve-aspect-ratio="true"])) .main-container{height:100%}:host([variant="overlay"]:not([preserve-aspect-ratio=""],[preserve-aspect-ratio="true"])) .main-container .cover-container{position:absolute;z-index:-1;height:100%;padding:0}:host([variant="overlay"]) .main-container .cover-container::after{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--cover-hero-overlay);content:""}:host([variant="overlay"]:is([preserve-aspect-ratio=""],[preserve-aspect-ratio="true"])) .main-container .content-container{position:absolute;inset:0}:host([variant="overlay"]) .main-container .content-container{height:100%;padding:var(--grid-margin)}:host([variant="stacked"]){--cover-hero-text-color:var(--color-text01)}:host([variant="stacked"]) .content-container ::slotted(*){padding:var(--grid-margin) 0}';const s=n;const c=class{constructor(t){e(this,t);this.variant=a.OVERLAY;this.contentPosition=i.TOP;this.preserveAspectRatio=true}onImgLoad({target:e}){if(e instanceof Image&&e.closest("[slot=cover]")){const t=e.naturalWidth/e.naturalHeight;this.host.style.setProperty("--image-aspect-ratio",t.toString())}}renderContent(){return t("div",{class:"content-container"},t("slot",{name:"content"}))}render(){return t(o,{key:"5fe68ea4b76b9938e202f20e2f3d41bdc2346553"},this.variant===a.STACKED&&this.contentPosition===i.TOP&&this.renderContent(),t("div",{key:"c39734aada37cc8d7d0c3953caf8ba42c4276ead",class:"main-container"},t("div",{key:"6b749c89d1c8ba23e08c694de457981f8cde8ffb",class:"cover-container"},t("slot",{key:"dbb58f0a9f1b657e0c867b18458a2cc0903f6c6e",name:"cover"})),t("slot",{key:"d8b93de81c83a1080b7a5e0f6aed6475be67af53",name:"info-reveal"}),this.variant===a.OVERLAY&&this.renderContent()),this.variant===a.STACKED&&this.contentPosition===i.BOTTOM&&this.renderContent())}get host(){return r(this)}};c.style=s;export{c as z_cover_hero};
2
- //# sourceMappingURL=p-589a9033.entry.js.map
1
+ import{r as e,h as t,a as o,g as r}from"./p-10bb4f4b.js";import{M as a,Q as i}from"./p-025f494e.js";const n=':host{--cover-hero-overlay:linear-gradient(270deg, #0000 0%, #000000e6 100%);--cover-hero-text-color:var(--color-text-inverse);display:block;overflow:hidden}:host,*{box-sizing:border-box}:host .main-container{position:relative;width:100%;align-items:baseline}:host .content-container{color:var(--cover-hero-text-color);fill:var(--cover-hero-text-color)}:host .main-container .cover-container{position:relative;width:100%;padding-top:calc(100% / (var(--cover-hero-aspect-ratio, var(--image-aspect-ratio, 16/9))));background-color:var(--gray600)}::slotted([slot="cover"]){position:absolute;display:block;width:100%;height:100%;inset:0;object-fit:cover;object-position:top center}::slotted(z-info-reveal){position:absolute;z-index:1;right:var(--grid-margin);bottom:var(--grid-margin)}:host([variant="overlay"]:not([preserve-aspect-ratio=""],[preserve-aspect-ratio="true"])) .main-container{height:100%}:host([variant="overlay"]:not([preserve-aspect-ratio=""],[preserve-aspect-ratio="true"])) .main-container .cover-container{position:absolute;z-index:-1;height:100%;padding:0}:host([variant="overlay"]) .main-container .cover-container::after{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--cover-hero-overlay);content:""}:host([variant="overlay"]:is([preserve-aspect-ratio=""],[preserve-aspect-ratio="true"])) .main-container .content-container{position:absolute;inset:0}:host([variant="overlay"]) .main-container .content-container{height:100%;padding:var(--grid-margin)}:host([variant="stacked"]){--cover-hero-text-color:var(--color-default-text)}:host([variant="stacked"]) .content-container ::slotted(*){padding:var(--grid-margin) 0}';const s=n;const c=class{constructor(t){e(this,t);this.variant=a.OVERLAY;this.contentPosition=i.TOP;this.preserveAspectRatio=true}onImgLoad({target:e}){if(e instanceof Image&&e.closest("[slot=cover]")){const t=e.naturalWidth/e.naturalHeight;this.host.style.setProperty("--image-aspect-ratio",t.toString())}}renderContent(){return t("div",{class:"content-container"},t("slot",{name:"content"}))}render(){return t(o,{key:"5fe68ea4b76b9938e202f20e2f3d41bdc2346553"},this.variant===a.STACKED&&this.contentPosition===i.TOP&&this.renderContent(),t("div",{key:"c39734aada37cc8d7d0c3953caf8ba42c4276ead",class:"main-container"},t("div",{key:"6b749c89d1c8ba23e08c694de457981f8cde8ffb",class:"cover-container"},t("slot",{key:"dbb58f0a9f1b657e0c867b18458a2cc0903f6c6e",name:"cover"})),t("slot",{key:"d8b93de81c83a1080b7a5e0f6aed6475be67af53",name:"info-reveal"}),this.variant===a.OVERLAY&&this.renderContent()),this.variant===a.STACKED&&this.contentPosition===i.BOTTOM&&this.renderContent())}get host(){return r(this)}};c.style=s;export{c as z_cover_hero};
2
+ //# sourceMappingURL=p-263fa2c9.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["stylesCss","ZCoverHeroStyle0","ZCoverHero","CoverHeroVariant","OVERLAY","CoverHeroContentPosition","TOP","onImgLoad","target","Image","closest","ratio","naturalWidth","naturalHeight","this","host","style","setProperty","toString","renderContent","h","class","name","render","Host","key","variant","STACKED","contentPosition","BOTTOM"],"sources":["src/components/z-cover-hero/styles.css?tag=z-cover-hero&encapsulation=shadow","src/components/z-cover-hero/index.tsx"],"sourcesContent":[":host {\n --cover-hero-overlay: linear-gradient(270deg, #0000 0%, #000000e6 100%);\n --cover-hero-text-color: var(--color-text-inverse);\n --cover-hero-aspect-ratio: ;\n\n display: block;\n overflow: hidden;\n}\n\n:host,\n* {\n box-sizing: border-box;\n}\n\n:host .main-container {\n position: relative;\n width: 100%;\n align-items: baseline;\n}\n\n:host .content-container {\n color: var(--cover-hero-text-color);\n fill: var(--cover-hero-text-color);\n}\n\n:host .main-container .cover-container {\n position: relative;\n width: 100%;\n padding-top: calc(100% / (var(--cover-hero-aspect-ratio, var(--image-aspect-ratio, 16/9))));\n background-color: var(--gray600);\n}\n\n::slotted([slot=\"cover\"]) {\n position: absolute;\n display: block;\n width: 100%;\n height: 100%;\n inset: 0;\n object-fit: cover;\n object-position: top center;\n}\n\n::slotted(z-info-reveal) {\n position: absolute;\n z-index: 1;\n right: var(--grid-margin);\n bottom: var(--grid-margin);\n}\n\n/* Variant overlay */\n:host([variant=\"overlay\"]:not([preserve-aspect-ratio=\"\"], [preserve-aspect-ratio=\"true\"])) .main-container {\n height: 100%;\n}\n\n:host([variant=\"overlay\"]:not([preserve-aspect-ratio=\"\"], [preserve-aspect-ratio=\"true\"]))\n .main-container\n .cover-container {\n position: absolute;\n z-index: -1;\n height: 100%;\n padding: 0;\n}\n\n:host([variant=\"overlay\"]) .main-container .cover-container::after {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: var(--cover-hero-overlay);\n content: \"\";\n}\n\n:host([variant=\"overlay\"]:is([preserve-aspect-ratio=\"\"], [preserve-aspect-ratio=\"true\"]))\n .main-container\n .content-container {\n position: absolute;\n inset: 0;\n}\n\n:host([variant=\"overlay\"]) .main-container .content-container {\n height: 100%;\n padding: var(--grid-margin);\n}\n\n/* Variant stacked */\n:host([variant=\"stacked\"]) {\n --cover-hero-text-color: var(--color-default-text);\n}\n\n:host([variant=\"stacked\"]) .content-container ::slotted(*) {\n padding: var(--grid-margin) 0;\n}\n","import {Component, Prop, h, Host, Listen, Element} from \"@stencil/core\";\nimport {CoverHeroVariant, CoverHeroContentPosition} from \"../../beans\";\n\n/**\n * Cover hero component.\n * Component to display a hero image with content.\n *\n * @slot cover - slot for the cover image.\n * @slot content - slot for the content.\n * @slot info-reveal - slot for the info reveal.\n * @cssprop --cover-hero-overlay - overlay color of the cover hero (CSS `background` property). **Default**: `linear-gradient(270deg, #0000 0%, #000000e6 100%)`.\n * @cssprop --cover-hero-text-color - color of the text.\n * @cssprop --cover-hero-aspect-ratio - aspect ratio to use for the image. You can pass a fraction or a number representing the ratio. **Default**: the intrinsic aspect ratio of the slotted image or `16/9`.\n */\n@Component({\n tag: \"z-cover-hero\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZCoverHero {\n @Element() host: HTMLZCoverHeroElement;\n\n /**\n * Cover hero variant. Can be `OVERLAY` or `STACKED`.\n */\n @Prop({reflect: true})\n variant: CoverHeroVariant = CoverHeroVariant.OVERLAY;\n\n /**\n * Vertical content position (for `STACKED` variant).\n */\n @Prop({reflect: true})\n contentPosition: CoverHeroContentPosition = CoverHeroContentPosition.TOP;\n\n /**\n * Whether to keep the image aspect ratio.\n * If set to `false`, the cssprop `--cover-hero-aspect-ratio` will not affect the component's size;\n * instead, the height of the component follows the content's one.\n * Note: it may be necessary to set a min and/or max height to the component.\n */\n @Prop({reflect: true})\n preserveAspectRatio = true;\n\n /**\n * Store the intrinsic aspect ratio of the slotted image when loaded,\n * to have a default when `--cover-hero-aspect-ratio` is not set.\n * @param target The event target\n */\n @Listen(\"load\", {capture: true})\n protected onImgLoad({target}: Event): void {\n if (target instanceof Image && target.closest(\"[slot=cover]\")) {\n const ratio = target.naturalWidth / target.naturalHeight;\n this.host.style.setProperty(\"--image-aspect-ratio\", ratio.toString());\n }\n }\n\n /**\n * Template for the content.\n */\n private renderContent(): HTMLDivElement {\n return (\n <div class=\"content-container\">\n <slot name=\"content\"></slot>\n </div>\n );\n }\n\n render(): HTMLZCoverHeroElement {\n return (\n <Host>\n {this.variant === CoverHeroVariant.STACKED &&\n this.contentPosition === CoverHeroContentPosition.TOP &&\n this.renderContent()}\n <div class=\"main-container\">\n <div class=\"cover-container\">\n <slot name=\"cover\"></slot>\n </div>\n <slot name=\"info-reveal\"></slot>\n {this.variant === CoverHeroVariant.OVERLAY && this.renderContent()}\n </div>\n {this.variant === CoverHeroVariant.STACKED &&\n this.contentPosition === CoverHeroContentPosition.BOTTOM &&\n this.renderContent()}\n </Host>\n );\n }\n}\n"],"mappings":"oGAAA,MAAMA,EAAY,6nDAClB,MAAAC,EAAeD,E,MCkBFE,EAAU,M,sCAOOC,EAAiBC,Q,qBAMDC,EAAyBC,I,yBAS/C,I,CAQZ,SAAAC,EAAUC,OAACA,IACnB,GAAIA,aAAkBC,OAASD,EAAOE,QAAQ,gBAAiB,CAC7D,MAAMC,EAAQH,EAAOI,aAAeJ,EAAOK,cAC3CC,KAAKC,KAAKC,MAAMC,YAAY,uBAAwBN,EAAMO,W,EAOtD,aAAAC,GACN,OACEC,EAAA,OAAKC,MAAM,qBACTD,EAAA,QAAME,KAAK,Y,CAKjB,MAAAC,GACE,OACEH,EAACI,EAAI,CAAAC,IAAA,4CACFX,KAAKY,UAAYvB,EAAiBwB,SACjCb,KAAKc,kBAAoBvB,EAAyBC,KAClDQ,KAAKK,gBACPC,EAAA,OAAAK,IAAA,2CAAKJ,MAAM,kBACTD,EAAA,OAAAK,IAAA,2CAAKJ,MAAM,mBACTD,EAAA,QAAAK,IAAA,2CAAMH,KAAK,WAEbF,EAAA,QAAAK,IAAA,2CAAMH,KAAK,gBACVR,KAAKY,UAAYvB,EAAiBC,SAAWU,KAAKK,iBAEpDL,KAAKY,UAAYvB,EAAiBwB,SACjCb,KAAKc,kBAAoBvB,EAAyBwB,QAClDf,KAAKK,gB"}
@@ -0,0 +1,2 @@
1
+ import{r as i,c as t,h as e,a as s,g as o}from"./p-10bb4f4b.js";import{V as r,W as n,p as a,g as l,P as h,i as p}from"./p-025f494e.js";import{g as c,a as d}from"./p-955da62e.js";import"./p-2c886e8b.js";const f=":host{font-family:var(--font-family-sans);font-weight:var(--font-rg);--line-clamp-popover:0;--line-clamp-mobile:1}*{box-sizing:border-box}button{padding:0;border:none;margin:0;background-color:transparent}nav{display:flex;align-items:center}ol{display:flex;align-items:center;padding:0;margin:0;column-gap:var(--space-unit);list-style:none}li{display:flex;align-items:center;justify-content:flex-start;column-gap:var(--space-unit)}ol li>a,ol li>button{font-size:var(--font-size-2);letter-spacing:0.16px;line-height:1.4}a:focus,button:focus{box-shadow:var(--shadow-focus-primary);outline:none}a{color:var(--color-link-primary);white-space:nowrap}a.missing-path{color:var(--color-default-text)}.text-ellipsis{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:var(--line-clamp-mobile);text-overflow:ellipsis;white-space:initial}nav.semibold>ol>li>a:not(.missing-path),nav.semibold>ol>li>button{font-weight:var(--font-sb);text-decoration:none}nav.underlined a,nav.underlined button{text-decoration:underline}z-icon{--z-icon-width:16px;--z-icon-height:16px;display:block;fill:var(--color-link-primary)}z-icon.separator{--z-icon-width:10px;--z-icon-height:10px;fill:var(--gray500)}button.dots{display:inline-block;color:var(--color-link-primary);cursor:pointer}.hidden-paths-popover .popover-content{max-width:302px;padding:calc(var(--space-unit) / 2) var(--space-unit);text-align:left}.hidden-paths-popover .popover-content a{font-weight:var(--font-rg);text-decoration:none}.hidden-paths-popover{--z-popover-theme--surface:var(--color-surface02);--z-popover-padding:0}.hidden-paths-popover::before,.full-path-tooltip::before{--arrow-edge-offset:calc(100% - (var(--space-unit) * 2.55))}.full-path-tooltip{--z-popover-theme--surface:var(--color-surface05);--z-popover-theme--text:var(--color-text-inverse);--z-popover-padding:0}.tooltip-content{padding:0 var(--space-unit);font-size:var(--font-size-2)}@media (min-width: 768px){.text-ellipsis{-webkit-line-clamp:var(--line-clamp-popover)}}@media (max-width: 767px){li a{display:flex;align-items:center;column-gap:var(--space-unit)}}";const u=f;const m=class{constructor(e){i(this,e);this.clickOnNode=t(this,"clickOnNode",7);this.collapsedElements=[];this.currentIndex=0;this.truncatePosition=null;this.pathStyle=r.UNDERLINED;this.homepageVariant=n.ICON;this.maxNodesToShow=5;this.preventFollowUrl=false;this.overflowMenuItemRows=0;this.truncateChar=30;this.viewPortWidth=undefined;this.hasOverflow=false;this.popoverEllipsisOpen=false}handleResize(){this.viewPortWidth=c();if(this.viewPortWidth!==a.MOBILE&&this.wrapElement&&this.wrapElement.scrollWidth>this.wrapElement.clientWidth){this.hasOverflow=true}}handlePropChange(){this.initializeBreadcrumb()}handleResizeUp(i,t){if(i===a.MOBILE||t===a.MOBILE&&i===a.TABLET||t===a.MOBILE&&i===a.DESKTOP||t===a.MOBILE&&i===a.DESKTOP_WIDE||t===a.TABLET&&i===a.DESKTOP||t===a.TABLET&&i===a.DESKTOP_WIDE||t===a.DESKTOP&&i===a.DESKTOP_WIDE){this.initializeBreadcrumb()}}componentWillLoad(){this.viewPortWidth=c();this.initializeBreadcrumb()}componentWillRender(){if(this.viewPortWidth!==a.MOBILE&&this.hasOverflow){this.checkEllipsisOrOverflowMenu();this.hasOverflow=false}}componentDidRender(){if(this.collapsedElementsRef){this.anchorElements=Array.from(this.hostElement.shadowRoot.querySelectorAll("z-list-group a"))}if(this.viewPortWidth!==a.MOBILE&&this.wrapElement.scrollWidth>this.wrapElement.clientWidth){this.hasOverflow=true}}initializeBreadcrumb(){if(this.viewPortWidth===a.MOBILE){this.pathsList=this.getPathsItemsList().filter((i=>!!i.path))}else{this.pathsList=this.getPathsItemsList()}this.homepageNode=this.pathsList.shift();this.pathListCopy=[...this.pathsList];this.collapsedElements=[];if(this.pathsList.length>this.maxNodesToShow){this.collapsedElements=this.pathsList.splice(0,this.pathsList.length-2)}}checkEllipsisOrOverflowMenu(){for(let i=0;i<this.pathsList.length;i++){if(this.pathsList[i].text.length<=this.truncateChar){continue}if(this.truncatePosition>0){this.collapsedElements.push(...this.pathListCopy.splice(0,this.truncatePosition));this.pathsList.splice(0,this.truncatePosition);this.truncatePosition=0;return}else if(this.truncatePosition===0){this.collapsedElements.push(...this.pathListCopy.splice(0,this.truncatePosition+1));this.pathsList.splice(0,this.truncatePosition+1);this.truncatePosition=null;return}if(i!==this.pathsList.length-1){const t=this.truncateWithEllipsis(this.pathsList[i].text,this.truncateChar);this.currentEllipsisText=this.pathsList[i].text;this.pathsList[i].text=t;this.pathsList[i].hasTooltip=true;this.truncatePosition=i;return}}}truncateWithEllipsis(i,t){if(i.length<=t){return i}return i.substring(0,t-1)+"&mldr;"}getPathsItemsList(){return Array.from(this.hostElement.children).map((i=>({text:i.textContent,path:i.href,hasTooltip:false})))}renderHomepageNode(){return e("li",null,e("a",{class:{"homepage-text":this.homepageVariant===n.TEXT},href:this.homepageNode.path,onClick:i=>this.handlePreventFollowUrl(i,this.homepageNode),innerHTML:this.homepageVariant===n.ICON?`<z-icon name="home" />`:this.homepageNode.text||"Home"}),this.pathsList.length>0&&e("z-icon",{class:"separator",name:"chevron-right"}))}togglePopover(){if(!this.collapsedElementsRef.open){this.collapsedElementsRef.open=true}}handlePreventFollowUrl(i,t){if(this.preventFollowUrl){i.preventDefault();this.clickOnNode.emit(t.path)}}handleOverflowMenuAccessibility(i){const t=this.anchorElements.length;if(i.key===l.TAB){i.preventDefault();return}i.stopPropagation();const e=[l.ARROW_DOWN,l.ARROW_UP];if(e.includes(i.key)){i.preventDefault();if(i.key===l.ARROW_DOWN){this.currentIndex=t===this.currentIndex+1?0:this.currentIndex+1}if(i.key===l.ARROW_UP){this.currentIndex=this.currentIndex<=0?t-1:this.currentIndex-1}this.anchorElements[this.currentIndex].focus()}if(i.key===l.ESC){this.triggerButton.focus()}}renderOverflowMenu(){return e("li",null,e("z-popover",{class:"hidden-paths-popover",ref:i=>this.collapsedElementsRef=i,bindTo:this.triggerButton,position:h.BOTTOM_RIGHT,closable:true,showArrow:true},e("div",{class:"popover-content"},e("z-list",null,e("z-list-group",{size:p.SMALL},this.collapsedElements.map(((i,t,s)=>e("div",null,e("z-list-element",{clickable:true},e("a",{class:"text-ellipsis",href:i.path,onClick:t=>this.handlePreventFollowUrl(t,i),onKeyDown:i=>this.handleOverflowMenuAccessibility(i),innerHTML:i.text})),t<s.length-1&&e("z-divider",{color:"color-surface03"})))))))),e("button",{class:"dots",ref:i=>this.triggerButton=i,"aria-label":"Mostra più breadcrumb","aria-haspopup":"true",onClick:()=>{this.togglePopover()},onKeyDown:i=>{d(i,this.togglePopover.bind(this));setTimeout((()=>{this.anchorElements[0].focus()}),100)},innerHTML:"&mldr;"}),this.pathsList.length>0&&e("z-icon",{class:"separator",name:"chevron-right"}))}renderMobileItems(){const i=this.pathsList[this.pathsList.length-1];if(!i){return}return e("li",null,e("a",{"aria-current":i.path?undefined:"page",href:i.path,onClick:t=>this.handlePreventFollowUrl(t,i)},e("z-icon",{name:"chevron-left"}),e("span",{class:{"missing-path":!i.path,"text-ellipsis":true}},i.text)))}renderItems(){let i;return[this.renderHomepageNode(),this.collapsedElements.length>0&&this.renderOverflowMenu(),...this.pathsList.map(((t,s)=>e("li",null,t.hasTooltip&&e("z-popover",{class:"full-path-tooltip",bindTo:i,open:this.popoverEllipsisOpen,position:h.BOTTOM_RIGHT,closable:false,showArrow:true},e("span",{class:"tooltip-content"},this.currentEllipsisText)),e("a",{class:{"missing-path":!t.path},ref:t=>i=t,"aria-current":t.path?undefined:"page",href:t.path,onClick:i=>this.handlePreventFollowUrl(i,t),onMouseOver:()=>{if(t.hasTooltip){this.popoverEllipsisOpen=true}},onMouseLeave:()=>{if(t.hasTooltip){this.popoverEllipsisOpen=false}},innerHTML:t.text}),s!==this.pathsList.length-1&&e("z-icon",{class:"separator",name:"chevron-right"}))))]}render(){return e(s,{key:"b5f0321b29ae51fac8fba3cc0302beff908cd56e",style:{"--line-clamp-popover":`${this.overflowMenuItemRows}`}},e("nav",{key:"32d4c57f93c3fd943cb6f6b72b9f9c004003d470",ref:i=>this.wrapElement=i,"aria-label":"Breadcrumb",class:{semibold:this.pathStyle===r.SEMIBOLD,underlined:this.pathStyle===r.UNDERLINED}},e("ol",{key:"725c96157a94749d8e55e321dd1708132479b74a"},this.viewPortWidth===a.MOBILE?this.renderMobileItems():this.renderItems())))}get hostElement(){return o(this)}static get watchers(){return{maxNodesToShow:["handlePropChange"],viewPortWidth:["handleResizeUp"]}}};m.style=u;export{m as z_breadcrumb};
2
+ //# sourceMappingURL=p-362ca96c.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["stylesCss","ZBreadcrumbStyle0","ZBreadcrumb","this","collapsedElements","currentIndex","truncatePosition","BreadcrumbPathStyle","UNDERLINED","BreadcrumbHomepageVariant","ICON","handleResize","viewPortWidth","getDevice","Device","MOBILE","wrapElement","scrollWidth","clientWidth","hasOverflow","handlePropChange","initializeBreadcrumb","handleResizeUp","newValue","oldValue","TABLET","DESKTOP","DESKTOP_WIDE","componentWillLoad","componentWillRender","checkEllipsisOrOverflowMenu","componentDidRender","collapsedElementsRef","anchorElements","Array","from","hostElement","shadowRoot","querySelectorAll","pathsList","getPathsItemsList","filter","item","path","homepageNode","shift","pathListCopy","length","maxNodesToShow","splice","i","text","truncateChar","push","truncatedString","truncateWithEllipsis","currentEllipsisText","hasTooltip","str","maxLength","substring","children","map","textContent","href","renderHomepageNode","h","class","homepageVariant","TEXT","onClick","e","handlePreventFollowUrl","innerHTML","name","togglePopover","open","preventFollowUrl","preventDefault","clickOnNode","emit","handleOverflowMenuAccessibility","anchorElementsLenght","key","KeyboardCode","TAB","stopPropagation","arrows","ARROW_DOWN","ARROW_UP","includes","focus","ESC","triggerButton","renderOverflowMenu","ref","val","bindTo","position","PopoverPosition","BOTTOM_RIGHT","closable","showArrow","size","ListSize","SMALL","index","array","clickable","onKeyDown","color","el","handleKeyboardSubmit","bind","setTimeout","renderMobileItems","secondToLastPath","undefined","renderItems","trigger","popoverEllipsisOpen","onMouseOver","onMouseLeave","render","Host","style","overflowMenuItemRows","semibold","pathStyle","SEMIBOLD","underlined"],"sources":["src/components/z-breadcrumb/styles.css?tag=z-breadcrumb&encapsulation=shadow","src/components/z-breadcrumb/index.tsx"],"sourcesContent":[":host {\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n\n --line-clamp-popover: 0;\n --line-clamp-mobile: 1;\n}\n\n* {\n box-sizing: border-box;\n}\n\nbutton {\n padding: 0;\n border: none;\n margin: 0;\n background-color: transparent;\n}\n\nnav {\n display: flex;\n align-items: center;\n}\n\nol {\n display: flex;\n align-items: center;\n padding: 0;\n margin: 0;\n column-gap: var(--space-unit);\n list-style: none;\n}\n\nli {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n column-gap: var(--space-unit);\n}\n\nol li > a,\nol li > button {\n font-size: var(--font-size-2);\n letter-spacing: 0.16px;\n line-height: 1.4;\n}\n\na:focus,\nbutton:focus {\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\na {\n color: var(--color-link-primary);\n white-space: nowrap;\n}\n\na.missing-path {\n color: var(--color-default-text);\n}\n\n.text-ellipsis {\n display: -webkit-box;\n overflow: hidden;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: var(--line-clamp-mobile);\n text-overflow: ellipsis;\n white-space: initial;\n}\n\nnav.semibold > ol > li > a:not(.missing-path),\nnav.semibold > ol > li > button {\n font-weight: var(--font-sb);\n text-decoration: none;\n}\n\nnav.underlined a,\nnav.underlined button {\n text-decoration: underline;\n}\n\nz-icon {\n --z-icon-width: 16px;\n --z-icon-height: 16px;\n\n display: block;\n fill: var(--color-link-primary);\n}\n\nz-icon.separator {\n --z-icon-width: 10px;\n --z-icon-height: 10px;\n\n fill: var(--gray500);\n}\n\nbutton.dots {\n display: inline-block;\n color: var(--color-link-primary);\n cursor: pointer;\n}\n\n.hidden-paths-popover .popover-content {\n max-width: 302px;\n padding: calc(var(--space-unit) / 2) var(--space-unit);\n text-align: left;\n}\n\n.hidden-paths-popover .popover-content a {\n font-weight: var(--font-rg);\n text-decoration: none;\n}\n\n.hidden-paths-popover {\n --z-popover-theme--surface: var(--color-surface02);\n --z-popover-padding: 0;\n}\n\n.hidden-paths-popover::before,\n.full-path-tooltip::before {\n --arrow-edge-offset: calc(100% - (var(--space-unit) * 2.55));\n}\n\n.full-path-tooltip {\n --z-popover-theme--surface: var(--color-surface05);\n --z-popover-theme--text: var(--color-text-inverse);\n --z-popover-padding: 0;\n}\n\n.tooltip-content {\n padding: 0 var(--space-unit);\n font-size: var(--font-size-2);\n}\n\n@media (min-width: 768px) {\n .text-ellipsis {\n -webkit-line-clamp: var(--line-clamp-popover);\n }\n}\n\n@media (max-width: 767px) {\n li a {\n display: flex;\n align-items: center;\n column-gap: var(--space-unit);\n }\n}\n","import {Component, Prop, h, State, Host, Listen, Element, Event, Watch, EventEmitter} from \"@stencil/core\";\nimport {\n BreadcrumbHomepageVariant,\n BreadcrumbPath,\n BreadcrumbPathStyle,\n Device,\n KeyboardCode,\n ListSize,\n PopoverPosition,\n} from \"../../beans\";\nimport {getDevice, handleKeyboardSubmit} from \"../../utils/utils\";\n\n@Component({\n tag: \"z-breadcrumb\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZBreadcrumb {\n /* Accessibility references */\n /* Overflow-menu: https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/ */\n /* Breadcrumb: https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/ */\n /* Focus on multiline link: https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance.html */\n\n @Element() hostElement: HTMLZBreadcrumbElement;\n\n /** [optional] Sets the path style */\n @Prop({reflect: true})\n pathStyle?: BreadcrumbPathStyle = BreadcrumbPathStyle.UNDERLINED;\n\n /** [optional] Variant of first node */\n @Prop()\n homepageVariant?: BreadcrumbHomepageVariant = BreadcrumbHomepageVariant.ICON;\n\n /** [optional] Sets max number of element to show */\n @Prop()\n maxNodesToShow? = 5;\n\n /** [optional] Controls the behaviour on <a> tag click/enter */\n @Prop()\n preventFollowUrl? = false;\n\n /** [optional] Sets max number of row for each path inside the popover. Zero equals unlimited */\n @Prop()\n overflowMenuItemRows? = 0;\n\n /** [optional] Sets the maximun number of chars per single node */\n @Prop()\n truncateChar? = 30;\n\n /** Handle mobile */\n @State()\n viewPortWidth: Device;\n\n /** Detect whether the length of the nodes shown exceeds the container length */\n @State()\n hasOverflow = false;\n\n @State()\n popoverEllipsisOpen = false;\n\n /** Emitted when preventFollowUrl=true to handle custom page transition */\n @Event()\n clickOnNode: EventEmitter<BreadcrumbPath[\"path\"]>;\n\n private pathsList: BreadcrumbPath[];\n\n private pathListCopy: BreadcrumbPath[];\n\n private collapsedElements: BreadcrumbPath[] = [];\n\n private collapsedElementsRef: HTMLZPopoverElement;\n\n private triggerButton: HTMLButtonElement;\n\n private wrapElement: HTMLElement;\n\n private currentIndex = 0;\n\n private homepageNode: BreadcrumbPath;\n\n private anchorElements;\n\n private currentEllipsisText: string;\n\n private truncatePosition = null;\n\n @Listen(\"resize\", {target: \"window\"})\n handleResize(): void {\n this.viewPortWidth = getDevice();\n if (\n this.viewPortWidth !== Device.MOBILE &&\n this.wrapElement &&\n this.wrapElement.scrollWidth > this.wrapElement.clientWidth\n ) {\n this.hasOverflow = true;\n }\n }\n // eslint-disable-next-line lines-between-class-members\n @Watch(\"maxNodesToShow\")\n handlePropChange(): void {\n this.initializeBreadcrumb();\n }\n\n @Watch(\"viewPortWidth\")\n handleResizeUp(newValue: Device, oldValue: Device): void {\n if (\n newValue === Device.MOBILE ||\n (oldValue === Device.MOBILE && newValue === Device.TABLET) ||\n (oldValue === Device.MOBILE && newValue === Device.DESKTOP) ||\n (oldValue === Device.MOBILE && newValue === Device.DESKTOP_WIDE) ||\n (oldValue === Device.TABLET && newValue === Device.DESKTOP) ||\n (oldValue === Device.TABLET && newValue === Device.DESKTOP_WIDE) ||\n (oldValue === Device.DESKTOP && newValue === Device.DESKTOP_WIDE)\n ) {\n this.initializeBreadcrumb();\n }\n }\n\n componentWillLoad(): void {\n this.viewPortWidth = getDevice();\n this.initializeBreadcrumb();\n }\n\n componentWillRender(): void {\n if (this.viewPortWidth !== Device.MOBILE && this.hasOverflow) {\n this.checkEllipsisOrOverflowMenu();\n this.hasOverflow = false;\n }\n }\n\n componentDidRender(): void {\n if (this.collapsedElementsRef) {\n this.anchorElements = Array.from(this.hostElement.shadowRoot.querySelectorAll(\"z-list-group a\"));\n }\n\n if (this.viewPortWidth !== Device.MOBILE && this.wrapElement.scrollWidth > this.wrapElement.clientWidth) {\n this.hasOverflow = true;\n }\n }\n\n private initializeBreadcrumb(): void {\n if (this.viewPortWidth === Device.MOBILE) {\n this.pathsList = this.getPathsItemsList().filter((item) => !!item.path);\n } else {\n this.pathsList = this.getPathsItemsList();\n }\n this.homepageNode = this.pathsList.shift();\n this.pathListCopy = [...this.pathsList];\n this.collapsedElements = [];\n if (this.pathsList.length > this.maxNodesToShow) {\n this.collapsedElements = this.pathsList.splice(0, this.pathsList.length - 2);\n }\n }\n\n private checkEllipsisOrOverflowMenu(): void {\n for (let i = 0; i < this.pathsList.length; i++) {\n if (this.pathsList[i].text.length <= this.truncateChar) {\n continue;\n }\n\n if (this.truncatePosition > 0) {\n this.collapsedElements.push(...this.pathListCopy.splice(0, this.truncatePosition));\n this.pathsList.splice(0, this.truncatePosition);\n this.truncatePosition = 0;\n\n return;\n } else if (this.truncatePosition === 0) {\n this.collapsedElements.push(...this.pathListCopy.splice(0, this.truncatePosition + 1));\n this.pathsList.splice(0, this.truncatePosition + 1);\n this.truncatePosition = null;\n\n return;\n }\n\n if (i !== this.pathsList.length - 1) {\n const truncatedString = this.truncateWithEllipsis(this.pathsList[i].text, this.truncateChar);\n this.currentEllipsisText = this.pathsList[i].text;\n this.pathsList[i].text = truncatedString;\n this.pathsList[i].hasTooltip = true;\n this.truncatePosition = i;\n\n return;\n }\n }\n }\n\n private truncateWithEllipsis(str: string, maxLength: number): string {\n if (str.length <= maxLength) {\n return str;\n }\n\n return str.substring(0, maxLength - 1) + \"&mldr;\";\n }\n\n private getPathsItemsList(): BreadcrumbPath[] {\n return Array.from(this.hostElement.children).map((item: HTMLAnchorElement) => {\n return {\n text: item.textContent,\n path: item.href,\n hasTooltip: false,\n };\n });\n }\n\n private renderHomepageNode(): HTMLLIElement {\n return (\n <li>\n <a\n class={{\n \"homepage-text\": this.homepageVariant === BreadcrumbHomepageVariant.TEXT,\n }}\n href={this.homepageNode.path}\n onClick={(e) => this.handlePreventFollowUrl(e, this.homepageNode)}\n innerHTML={\n this.homepageVariant === BreadcrumbHomepageVariant.ICON\n ? `<z-icon name=\"home\" />`\n : this.homepageNode.text || \"Home\"\n }\n />\n {this.pathsList.length > 0 && (\n <z-icon\n class=\"separator\"\n name=\"chevron-right\"\n />\n )}\n </li>\n );\n }\n\n private togglePopover(): void {\n if (!this.collapsedElementsRef.open) {\n this.collapsedElementsRef.open = true;\n }\n }\n\n private handlePreventFollowUrl(e: MouseEvent, item): void {\n if (this.preventFollowUrl) {\n e.preventDefault();\n this.clickOnNode.emit(item.path);\n }\n }\n\n private handleOverflowMenuAccessibility(e: KeyboardEvent): void {\n const anchorElementsLenght = this.anchorElements.length;\n if (e.key === KeyboardCode.TAB) {\n e.preventDefault();\n\n return;\n }\n e.stopPropagation();\n const arrows = [KeyboardCode.ARROW_DOWN, KeyboardCode.ARROW_UP];\n if (arrows.includes(e.key as KeyboardCode)) {\n e.preventDefault();\n\n if (e.key === KeyboardCode.ARROW_DOWN) {\n this.currentIndex = anchorElementsLenght === this.currentIndex + 1 ? 0 : this.currentIndex + 1;\n }\n if (e.key === KeyboardCode.ARROW_UP) {\n this.currentIndex = this.currentIndex <= 0 ? anchorElementsLenght - 1 : this.currentIndex - 1;\n }\n\n this.anchorElements[this.currentIndex].focus();\n }\n\n if (e.key === KeyboardCode.ESC) {\n this.triggerButton.focus();\n }\n }\n\n private renderOverflowMenu(): HTMLLIElement {\n return (\n <li>\n <z-popover\n class=\"hidden-paths-popover\"\n ref={(val) => (this.collapsedElementsRef = val as HTMLZPopoverElement)}\n bindTo={this.triggerButton}\n position={PopoverPosition.BOTTOM_RIGHT}\n closable\n showArrow\n >\n <div class=\"popover-content\">\n <z-list>\n <z-list-group size={ListSize.SMALL}>\n {this.collapsedElements.map((item, index, array) => {\n return (\n <div>\n <z-list-element clickable>\n <a\n class=\"text-ellipsis\"\n href={item.path}\n onClick={(e) => this.handlePreventFollowUrl(e, item)}\n onKeyDown={(e) => this.handleOverflowMenuAccessibility(e)}\n innerHTML={item.text}\n />\n </z-list-element>\n {index < array.length - 1 && <z-divider color=\"color-surface03\"></z-divider>}\n </div>\n );\n })}\n </z-list-group>\n </z-list>\n </div>\n </z-popover>\n <button\n class=\"dots\"\n ref={(el) => (this.triggerButton = el)}\n aria-label=\"Mostra più breadcrumb\"\n aria-haspopup=\"true\"\n onClick={() => {\n this.togglePopover();\n }}\n onKeyDown={(e) => {\n handleKeyboardSubmit(e, this.togglePopover.bind(this));\n setTimeout(() => {\n this.anchorElements[0].focus();\n }, 100);\n }}\n innerHTML=\"&mldr;\"\n ></button>\n {this.pathsList.length > 0 && (\n <z-icon\n class=\"separator\"\n name=\"chevron-right\"\n />\n )}\n </li>\n );\n }\n\n private renderMobileItems(): HTMLLIElement {\n // show only the second to last element\n const secondToLastPath = this.pathsList[this.pathsList.length - 1];\n\n if (!secondToLastPath) {\n return;\n }\n\n return (\n <li>\n <a\n aria-current={secondToLastPath.path ? undefined : \"page\"}\n href={secondToLastPath.path}\n onClick={(e) => this.handlePreventFollowUrl(e, secondToLastPath)}\n >\n <z-icon name=\"chevron-left\" />\n <span\n class={{\n \"missing-path\": !secondToLastPath.path,\n \"text-ellipsis\": true,\n }}\n >\n {secondToLastPath.text}\n </span>\n </a>\n </li>\n );\n }\n\n private renderItems(): HTMLElement[] {\n let trigger;\n\n return [\n this.renderHomepageNode(),\n this.collapsedElements.length > 0 && this.renderOverflowMenu(),\n ...this.pathsList.map((item, index) => (\n <li>\n {item.hasTooltip && (\n <z-popover\n class=\"full-path-tooltip\"\n bindTo={trigger}\n open={this.popoverEllipsisOpen}\n position={PopoverPosition.BOTTOM_RIGHT}\n closable={false}\n showArrow\n >\n <span class=\"tooltip-content\">{this.currentEllipsisText}</span>\n </z-popover>\n )}\n <a\n class={{\"missing-path\": !item.path}}\n ref={(val) => (trigger = val)}\n aria-current={item.path ? undefined : \"page\"}\n href={item.path}\n onClick={(e) => this.handlePreventFollowUrl(e, item)}\n onMouseOver={() => {\n if (item.hasTooltip) {\n this.popoverEllipsisOpen = true;\n }\n }}\n onMouseLeave={() => {\n if (item.hasTooltip) {\n this.popoverEllipsisOpen = false;\n }\n }}\n innerHTML={item.text}\n />\n {index !== this.pathsList.length - 1 && (\n <z-icon\n class=\"separator\"\n name=\"chevron-right\"\n />\n )}\n </li>\n )),\n ];\n }\n\n render(): HTMLZBreadcrumbElement {\n return (\n <Host style={{\"--line-clamp-popover\": `${this.overflowMenuItemRows}`}}>\n <nav\n ref={(val) => (this.wrapElement = val)}\n aria-label=\"Breadcrumb\"\n class={{\n semibold: this.pathStyle === BreadcrumbPathStyle.SEMIBOLD,\n underlined: this.pathStyle === BreadcrumbPathStyle.UNDERLINED,\n }}\n >\n <ol>{this.viewPortWidth === Device.MOBILE ? this.renderMobileItems() : this.renderItems()}</ol>\n </nav>\n </Host>\n );\n }\n}\n"],"mappings":"0MAAA,MAAMA,EAAY,+jEAClB,MAAAC,EAAeD,E,MCgBFE,EAAW,M,kEAmDdC,KAAAC,kBAAsC,GAQtCD,KAAAE,aAAe,EAQfF,KAAAG,iBAAmB,K,eAzDOC,EAAoBC,W,qBAIRC,EAA0BC,K,oBAItD,E,sBAIE,M,0BAII,E,kBAIR,G,8CAQF,M,yBAGQ,K,CA6BtB,YAAAC,GACER,KAAKS,cAAgBC,IACrB,GACEV,KAAKS,gBAAkBE,EAAOC,QAC9BZ,KAAKa,aACLb,KAAKa,YAAYC,YAAcd,KAAKa,YAAYE,YAChD,CACAf,KAAKgB,YAAc,I,EAKvB,gBAAAC,GACEjB,KAA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xB,EAAKe,YACJS,EAAA,aACEC,MAAM,oBACN8B,OAAQsB,EACR3C,KAAMzE,KAAKqH,oBACXtB,SAAUC,EAAgBC,aAC1BC,SAAU,MACVC,UAAS,MAETpC,EAAA,QAAMC,MAAM,mBAAmBhE,KAAKqD,sBAGxCU,EAAA,KACEC,MAAO,CAAC,gBAAiBzB,EAAKC,MAC9BoD,IAAMC,GAASuB,EAAUvB,EAAI,eACftD,EAAKC,KAAO0E,UAAY,OACtCrD,KAAMtB,EAAKC,KACX2B,QAAUC,GAAMpE,KAAKqE,uBAAuBD,EAAG7B,GAC/C+E,YAAa,KACX,GAAI/E,EAAKe,WAAY,CACnBtD,KAAKqH,oBAAsB,I,GAG/BE,aAAc,KACZ,GAAIhF,EAAKe,WAAY,CACnBtD,KAAKqH,oBAAsB,K,GAG/B/C,UAAW/B,EAAKS,OAEjBuD,IAAUvG,KAAKoC,UAAUQ,OAAS,GACjCmB,EAAA,UACEC,MAAM,YACNO,KAAK,qB,CAQjB,MAAAiD,GACE,OACEzD,EAAC0D,EAAI,CAAAzC,IAAA,2CAAC0C,MAAO,CAAC,uBAAwB,GAAG1H,KAAK2H,yBAC5C5D,EAAA,OAAAiB,IAAA,2CACEY,IAAMC,GAAS7F,KAAKa,YAAcgF,EAAI,aAC3B,aACX7B,MAAO,CACL4D,SAAU5H,KAAK6H,YAAczH,EAAoB0H,SACjDC,WAAY/H,KAAK6H,YAAczH,EAAoBC,aAGrD0D,EAAA,MAAAiB,IAAA,4CAAKhF,KAAKS,gBAAkBE,EAAOC,OAASZ,KAAKgH,oBAAsBhH,KAAKmH,gB"}
@@ -1,2 +1,2 @@
1
- import{r,h as a}from"./p-10bb4f4b.js";const o="button{display:flex;width:42px;width:calc(var(--space-unit) * 6);height:calc(var(--space-unit) * 5);height:calc(var(--space-unit) * 6);align-items:center;justify-content:center;padding:0;border:none;border-left:var(--border-size-medium) solid var(--color-surface03);margin:0;background:none;border-radius:0 var(--border-radius) 0 0;color:var(--color-primary01);cursor:pointer;fill:var(--color-primary01);outline:none}button:active,button:focus{color:var(--blue700);fill:var(--blue700)}button>span{display:flex;width:28px;height:28px;align-items:center;justify-content:center;border:0;border-radius:var(--border-radius)}button:hover>span{background:var(--color-primary03)}button:focus>span{background:var(--color-surface01);border-radius:var(--border-radius);box-shadow:var(--shadow-focus-primary)}button:active>span{background:var(--color-surface01);border-radius:var(--border-radius);box-shadow:var(--shadow-2)}button:disabled{cursor:not-allowed}button:disabled>span{background:none;box-shadow:var(--shadow-0);pointer-events:none}button:disabled>span>z-icon{fill:var(--color-surface03)}button::-moz-focus-inner{border:0}";const e=o;const t=class{constructor(a){r(this,a);this.icon=undefined;this.isdisabled=false;this.ariaLabel=""}render(){return a("button",{key:"baa3a80095798ad5aeffd5ed7c82f734972fffcd",disabled:this.isdisabled,"aria-label":this.ariaLabel},a("span",{key:"6087bd7415624e7e299d2d56a1974259503f1025"},a("z-icon",{key:"1ec75e4468b4ae898df057c2e0739d28d8b50fab",name:this.icon,width:16,height:16})))}};t.style=e;export{t as z_myz_card_icon};
2
- //# sourceMappingURL=p-4d944fcd.entry.js.map
1
+ import{r,h as a}from"./p-10bb4f4b.js";const o="button{display:flex;width:42px;width:calc(var(--space-unit) * 6);height:calc(var(--space-unit) * 5);height:calc(var(--space-unit) * 6);align-items:center;justify-content:center;padding:0;border:none;border-left:var(--border-size-medium) solid var(--color-surface03);margin:0;background:none;border-radius:0 var(--border-radius) 0 0;color:var(--color-primary01);cursor:pointer;fill:var(--color-primary01);outline:none}button:active,button:focus{color:var(--blue700);fill:var(--blue700)}button>span{display:flex;width:28px;height:28px;align-items:center;justify-content:center;border:0;border-radius:var(--border-radius)}button:hover>span{background:var(--color-primary03)}button:focus>span{background:var(--color-surface01);border-radius:var(--border-radius);box-shadow:var(--shadow-focus-primary)}button:active>span{background:var(--color-surface01);border-radius:var(--border-radius);box-shadow:var(--shadow-2)}button:disabled{cursor:not-allowed}button:disabled>span{background:none;box-shadow:var(--shadow-0);pointer-events:none}button:disabled>span>z-icon{fill:var(--color-surface03)}button::-moz-focus-inner{border:0}";const e=o;const t=class{constructor(a){r(this,a);this.icon=undefined;this.isdisabled=false;this.ariaLabel=""}render(){return a("button",{key:"972147f83660d272042a24650300708bee702c03",disabled:this.isdisabled,"aria-label":this.ariaLabel},a("span",{key:"0fc735337402b0c798d26706da88a35bb8fd77dc"},a("z-icon",{key:"f052b1dcfc412d0aca7b3b60666e75b269aa3139",name:this.icon,width:16,height:16})))}};t.style=e;export{t as z_myz_card_icon};
2
+ //# sourceMappingURL=p-37e3abfc.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as t,c as i,h as e,a as n,g as s}from"./p-10bb4f4b.js";import{w as a,p as r,D as o}from"./p-025f494e.js";import{g as l}from"./p-955da62e.js";import"./p-2c886e8b.js";const c=':host{color:var(--color-default-text);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.container{display:flex;flex-direction:column}:host .modal-wrapper{display:flex;align-items:center;justify-content:center;padding:calc(var(--space-unit) * 2)}:host .modal-wrapper>.files-wrapper{display:flex;flex-direction:column;margin:calc(var(--space-unit) * 4);gap:var(--space-unit)}:host .text-container{display:flex;flex-direction:column;margin:auto}:host .text-container .body-1{text-align:center}:host .text-container .upload-link{color:var(--color-link-primary);cursor:pointer}:host .text-container .upload-link-text{margin-bottom:var(--space-unit)}input#file-elem{display:none}#title{display:inline-block;margin:calc(var(--space-unit) * 2.5) 0 calc(var(--space-unit) * 4);font-size:calc(var(--space-unit) * 3);font-weight:var(--font-sb)}:host>.container>z-button{display:inline-block;margin-top:calc(var(--space-unit) * 3)}:host>.container>.files-container.hidden{display:none}:host>.container>.files-container>.heading-4-sb{display:inline-block;margin:calc(var(--space-unit) * 3) 0;font-size:calc(var(--space-unit) * 2);font-weight:var(--font-sb)}:host([type="dragdrop"])>.container>.files-container>.heading-4-sb{margin-top:0;margin-bottom:calc(var(--space-unit) * 3)}:host>.container>.files-container>.files-wrapper{display:flex;flex-wrap:wrap;column-gap:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}:host>.container>.files-container>z-divider{margin-top:calc(var(--space-unit) * 3);margin-bottom:0}:host([type="dragdrop"])>.container>.files-container>z-divider{margin:calc(var(--space-unit) * 3) 0}:host .error-message{font-size:14px;font-weight:400;letter-spacing:0.16%;line-height:20px;text-align:left}:host .error-message>.file-name{font-weight:600}@media only screen and (min-width: 768px){:host>.container>z-button{align-self:flex-start}:host .modal-wrapper{padding:calc(var(--space-unit) * 3)}}@media only screen and (min-width: 1152px){:host .modal-wrapper{padding:calc(var(--space-unit) * 4)}}';const d=c;const h=class{constructor(e){t(this,e);this.fileInput=i(this,"fileInput",7);this.inputAttributes={type:"file",id:"file-elem",multiple:true};this.type=a.DEFAULT;this.buttonVariant=undefined;this.acceptedFormat=undefined;this.fileMaxSize=undefined;this.mainTitle=undefined;this.description=undefined;this.files=[];this.uploadBtnLabel="allega";this.dragAndDropLabel="Rilascia i file in questa area per allegarli.";this.hasFileSection=true;this.invalidFiles=undefined}removeFileListener(t){this.removeFileHandler(t.detail)}fileDroppedListener(t){this.input.files=t.detail;this.fileInputHandler()}componentDidUpdate(){this.handleAccessibility();this.invalidFiles.size&&this.errorModal.focus()}componentWillLoad(){this.invalidFiles=new Map}fileInputHandler(){if(this.input.files.length){this.invalidFiles=this.checkFiles(Array.from(this.input.files))}}async getFiles(){return this.files}async removeFile(t){this.removeFileHandler(t)}removeFileHandler(t){const i=this.files;const e=i.find((i=>i.name===t));if(e){const t=i.indexOf(e);if(t>=0){i.splice(t,1);this.files=[...i]}}}getType(){if(l()!==r.DESKTOP&&l()!==r.DESKTOP_WIDE){return a.DEFAULT}return this.type}handleAccessibility(){const t=this.el.querySelector("z-file:last-child z-chip button");if(this.files.length>0&&t){t.focus()}else{this.getType()===a.DEFAULT?this.button.querySelector("button").focus():this.uploadLink.focus()}}checkFiles(t){const i=new Map;const e=`supera il limite di ${this.fileMaxSize}MB`;const n=" ha un formato non supportato";t.forEach((t=>{const s=t.size/1024/1024;const a=this.acceptedFormat.split(",").some((i=>t.name.toLowerCase().endsWith(i.trim())));const r=s<=this.fileMaxSize;if(r&&a){if(!this.files.find((i=>i.name===t.name))){this.files.push(t);this.fileInput.emit(t);this.input.value=""}return}i.set(t.name,[]);if(!r){i.get(t.name).push(e)}if(!a){i.get(t.name).push(n)}}));return i}renderTitle(){return e("span",{id:"title"},this.mainTitle)}renderDescription(t){return e("span",{class:t},this.description)}renderAllowedFileExtensions(){let t="";let i="";if(this.acceptedFormat){const i=this.acceptedFormat.split(", ").map((t=>t.substring(1).toUpperCase())).join(", ");t=` nei formati ${i}`}if(this.fileMaxSize){i=` per un massimo di ${this.fileMaxSize}MB di peso`}const n=`Puoi allegare file${t}${i}.`;return e("span",{class:"body-3"},t||i?n:null)}renderFileSection(){if(!this.hasFileSection){return}return e("section",{class:`files-container ${!this.files.length?"hidden":""}`},e("span",{class:"heading-4-sb"},"File appena caricati"),e("div",{class:"files-wrapper"},e("slot",{name:"files"})),e("z-divider",{size:o.MEDIUM}))}renderInput(){return e("input",Object.assign({},this.inputAttributes,{onChange:()=>this.fileInputHandler(),accept:this.acceptedFormat,ref:t=>this.input=t}))}renderUploadButton(){return[this.renderInput(),e("z-button",{onClick:()=>this.input.click(),onKeyPress:t=>{if(t.code=="Space"||t.code=="Enter"){t.preventDefault();this.input.click()}},id:"fileSelect",variant:this.buttonVariant,icon:"upload",ref:t=>this.button=t},this.uploadBtnLabel)]}renderUploadLink(){return[this.renderInput(),e("span",{class:"body-1 upload-link-text"},"Trascina o"," ",e("span",{tabIndex:0,class:"body-1-sb upload-link",onClick:()=>this.input.click(),onKeyPress:t=>{if(t.code=="Space"||t.code=="Enter"){t.preventDefault();this.input.click()}},ref:t=>this.uploadLink=t},"carica")," ","dal tuo computer")]}renderDefaultMode(){return[this.renderDescription("body-3-sb"),this.renderAllowedFileExtensions(),this.renderFileSection(),this.renderUploadButton()]}renderDragDropMode(){return[this.renderFileSection(),e("z-dragdrop-area",{"drag-and-drop-label":this.dragAndDropLabel},e("div",{class:"text-container"},this.renderDescription("body-1"),this.renderUploadLink(),this.renderAllowedFileExtensions()))]}formatErrorString(t,i){var n,s;const a=i[0]&&i[1]?" e ":"";return e("span",{class:"error-message"},"Il file ",e("span",{class:"file-name"},t)," ",(n=i[1])!==null&&n!==void 0?n:"",a,(s=i[0])!==null&&s!==void 0?s:"",".")}handleErrorModalContent(){return e("div",{slot:"modalContent"},e("div",{class:"modal-wrapper"},e("div",{class:"files"},Array.from(this.invalidFiles).map((([t,i])=>e("span",{class:"body-3"},this.formatErrorString(t,i)))))))}render(){return e(n,{key:"a3d761286217ef951686119b60ec51779833dd7c"},e("div",{key:"a95c0abe6e8fdcaa4ef6991db9e138eb5fb2ba03",tabIndex:0,class:`container ${this.getType()}`},this.mainTitle&&this.renderTitle(),this.getType()==a.DEFAULT?this.renderDefaultMode():this.renderDragDropMode()),!!this.invalidFiles.size&&e("z-modal",{modalid:`file-upload-${this.type}-error-modal`,tabIndex:0,ref:t=>this.errorModal=t,modaltitle:"Errore di caricamento",onModalClose:()=>this.invalidFiles=new Map,onModalBackgroundClick:()=>this.invalidFiles=new Map},this.handleErrorModalContent()))}get el(){return s(this)}};h.style=d;export{h as z_file_upload};
2
+ //# sourceMappingURL=p-3bae6330.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["stylesCss","ZFileUploadStyle0","ZFileUpload","this","inputAttributes","type","id","multiple","ZFileUploadType","DEFAULT","removeFileListener","e","removeFileHandler","detail","fileDroppedListener","input","files","fileInputHandler","componentDidUpdate","handleAccessibility","invalidFiles","size","errorModal","focus","componentWillLoad","Map","length","checkFiles","Array","from","getFiles","removeFile","fileName","file","find","name","index","indexOf","splice","getType","getDevice","Device","DESKTOP","DESKTOP_WIDE","lastFile","el","querySelector","button","uploadLink","errors","sizeErrorString","fileMaxSize","formatErrorString","forEach","fileSize","fileFormatOk","acceptedFormat","split","some","ext","toLowerCase","endsWith","trim","fileSizeOk","f","push","fileInput","emit","value","set","get","renderTitle","h","mainTitle","renderDescription","cssClass","class","description","renderAllowedFileExtensions","fileFormatString","fileWeightString","fileFormat","map","string","substring","toUpperCase","join","finalString","renderFileSection","hasFileSection","DividerSize","MEDIUM","renderInput","Object","assign","onChange","accept","ref","val","renderUploadButton","onClick","click","onKeyPress","code","preventDefault","variant","buttonVariant","icon","uploadBtnLabel","renderUploadLink","tabIndex","renderDefaultMode","renderDragDropMode","dragAndDropLabel","key","bothErrors","_a","_b","handleErrorModalContent","slot","render","Host","modalid","modaltitle","onModalClose","onModalBackgroundClick"],"sources":["src/components/file-upload/z-file-upload/styles.css?tag=z-file-upload&encapsulation=shadow","src/components/file-upload/z-file-upload/index.tsx"],"sourcesContent":[":host {\n color: var(--color-default-text);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n:host > .container {\n display: flex;\n flex-direction: column;\n}\n\n:host .modal-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: calc(var(--space-unit) * 2);\n}\n\n:host .modal-wrapper > .files-wrapper {\n display: flex;\n flex-direction: column;\n margin: calc(var(--space-unit) * 4);\n gap: var(--space-unit);\n}\n\n:host .text-container {\n display: flex;\n flex-direction: column;\n margin: auto;\n}\n\n:host .text-container .body-1 {\n text-align: center;\n}\n\n:host .text-container .upload-link {\n color: var(--color-link-primary);\n cursor: pointer;\n}\n\n:host .text-container .upload-link-text {\n margin-bottom: var(--space-unit);\n}\n\ninput#file-elem {\n display: none;\n}\n\n#title {\n display: inline-block;\n margin: calc(var(--space-unit) * 2.5) 0 calc(var(--space-unit) * 4);\n font-size: calc(var(--space-unit) * 3);\n font-weight: var(--font-sb);\n}\n\n:host > .container > z-button {\n display: inline-block;\n margin-top: calc(var(--space-unit) * 3);\n}\n\n:host > .container > .files-container.hidden {\n display: none;\n}\n\n:host > .container > .files-container > .heading-4-sb {\n display: inline-block;\n margin: calc(var(--space-unit) * 3) 0;\n font-size: calc(var(--space-unit) * 2);\n font-weight: var(--font-sb);\n}\n\n:host([type=\"dragdrop\"]) > .container > .files-container > .heading-4-sb {\n margin-top: 0;\n margin-bottom: calc(var(--space-unit) * 3);\n}\n\n:host > .container > .files-container > .files-wrapper {\n display: flex;\n flex-wrap: wrap;\n column-gap: calc(var(--space-unit) * 2);\n row-gap: calc(var(--space-unit) * 2);\n}\n\n:host > .container > .files-container > z-divider {\n margin-top: calc(var(--space-unit) * 3);\n margin-bottom: 0;\n}\n\n:host([type=\"dragdrop\"]) > .container > .files-container > z-divider {\n margin: calc(var(--space-unit) * 3) 0;\n}\n\n:host .error-message {\n font-size: 14px;\n font-weight: 400;\n letter-spacing: 0.16%;\n line-height: 20px;\n text-align: left;\n}\n\n:host .error-message > .file-name {\n font-weight: 600;\n}\n\n/* Tablet breakpoint */\n@media only screen and (min-width: 768px) {\n :host > .container > z-button {\n align-self: flex-start;\n }\n\n :host .modal-wrapper {\n padding: calc(var(--space-unit) * 3);\n }\n}\n\n@media only screen and (min-width: 1152px) {\n :host .modal-wrapper {\n padding: calc(var(--space-unit) * 4);\n }\n}\n","import {Component, Prop, h, EventEmitter, Event, State, Listen, Element, Host, Method} from \"@stencil/core\";\nimport {ButtonVariant, Device, DividerSize, ZFileUploadType} from \"../../../beans\";\nimport {getDevice} from \"../../../utils/utils\";\n\n@Component({\n tag: \"z-file-upload\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZFileUpload {\n /** Prop indicating the file upload type - can be default or dragdrop */\n @Prop({reflect: true})\n type: ZFileUploadType = ZFileUploadType.DEFAULT;\n\n /** Prop indicating the button variant*/\n @Prop()\n buttonVariant?: ButtonVariant;\n\n /** Prop indicating the accepted file type: ex \".pdf, .doc, .jpg\" */\n @Prop()\n acceptedFormat?: string;\n\n /** Max file dimension in Megabyte */\n @Prop()\n fileMaxSize?: number;\n\n /** Title */\n @Prop()\n mainTitle?: string;\n\n /** Description */\n @Prop()\n description?: string;\n\n /** Files added by the user */\n @State()\n files: File[] = [];\n\n /** upoload button label */\n @Prop()\n uploadBtnLabel?: string = \"allega\";\n\n /** drag & drop button label */\n @Prop()\n dragAndDropLabel?: string = \"Rilascia i file in questa area per allegarli.\";\n\n /** uploaded files history rendering */\n @Prop()\n hasFileSection?: boolean = true;\n\n /** List of files not allowed to be uploaded */\n @State()\n invalidFiles: Map<string, string[]>;\n\n @Element() el: HTMLZFileUploadElement;\n\n private input: HTMLInputElement;\n\n private button: HTMLZButtonElement;\n\n private errorModal: HTMLZModalElement;\n\n private uploadLink: HTMLSpanElement;\n\n private inputAttributes = {\n type: \"file\",\n id: \"file-elem\",\n multiple: true,\n };\n\n /** Listen removeFile event sent from z-file component */\n @Listen(\"removeFile\")\n removeFileListener(e: CustomEvent): void {\n this.removeFileHandler(e.detail);\n }\n\n /** Listen fileDropped event sent from z-dragdrop-area component */\n @Listen(\"fileDropped\")\n fileDroppedListener(e: CustomEvent): void {\n this.input.files = e.detail;\n this.fileInputHandler();\n }\n\n componentDidUpdate(): void {\n this.handleAccessibility();\n this.invalidFiles.size && this.errorModal.focus();\n }\n\n componentWillLoad(): void {\n this.invalidFiles = new Map<string, string[]>();\n }\n\n /** Emitted when user select one or more files */\n @Event()\n fileInput: EventEmitter;\n\n private fileInputHandler(): void {\n if (this.input.files.length) {\n this.invalidFiles = this.checkFiles(Array.from(this.input.files));\n }\n }\n\n /** get array of uploaded files */\n @Method()\n async getFiles(): Promise<File[]> {\n return this.files;\n }\n\n /** remove file from the array */\n @Method()\n async removeFile(fileName: string): Promise<void> {\n this.removeFileHandler(fileName);\n }\n\n private removeFileHandler(fileName: string): void {\n const files = this.files;\n const file = files.find((file) => file.name === fileName);\n if (file) {\n const index = files.indexOf(file);\n if (index >= 0) {\n files.splice(index, 1);\n this.files = [...files];\n }\n }\n }\n\n private getType(): ZFileUploadType {\n if (getDevice() !== Device.DESKTOP && getDevice() !== Device.DESKTOP_WIDE) {\n return ZFileUploadType.DEFAULT;\n }\n\n return this.type;\n }\n\n private handleAccessibility(): void {\n const lastFile = this.el.querySelector(\"z-file:last-child z-chip button\");\n if (this.files.length > 0 && lastFile) {\n (lastFile as HTMLElement).focus();\n } else {\n this.getType() === ZFileUploadType.DEFAULT\n ? this.button.querySelector(\"button\").focus()\n : this.uploadLink.focus();\n }\n }\n\n private checkFiles(files: File[]): Map<string, string[]> {\n const errors = new Map<string, string[]>();\n const sizeErrorString = `supera il limite di ${this.fileMaxSize}MB`;\n const formatErrorString = \" ha un formato non supportato\";\n files.forEach((file: File) => {\n const fileSize = file.size / 1024 / 1024;\n const fileFormatOk = this.acceptedFormat\n .split(\",\")\n .some((ext: string) => file.name.toLowerCase().endsWith(ext.trim()));\n const fileSizeOk = fileSize <= this.fileMaxSize;\n if (fileSizeOk && fileFormatOk) {\n if (!this.files.find((f) => f.name === file.name)) {\n this.files.push(file);\n this.fileInput.emit(file);\n this.input.value = \"\";\n }\n\n return;\n }\n errors.set(file.name, []);\n if (!fileSizeOk) {\n errors.get(file.name).push(sizeErrorString);\n }\n if (!fileFormatOk) {\n errors.get(file.name).push(formatErrorString);\n }\n });\n\n return errors;\n }\n\n private renderTitle(): HTMLElement {\n return <span id=\"title\">{this.mainTitle}</span>;\n }\n\n private renderDescription(cssClass): HTMLElement {\n return <span class={cssClass}>{this.description}</span>;\n }\n\n private renderAllowedFileExtensions(): HTMLElement {\n let fileFormatString = \"\";\n let fileWeightString = \"\";\n\n if (this.acceptedFormat) {\n const fileFormat = this.acceptedFormat\n .split(\", \")\n .map((string) => string.substring(1).toUpperCase())\n .join(\", \");\n fileFormatString = ` nei formati ${fileFormat}`;\n }\n\n if (this.fileMaxSize) {\n fileWeightString = ` per un massimo di ${this.fileMaxSize}MB di peso`;\n }\n\n const finalString = `Puoi allegare file${fileFormatString}${fileWeightString}.`;\n\n return <span class=\"body-3\">{fileFormatString || fileWeightString ? finalString : null}</span>;\n }\n\n private renderFileSection(): HTMLElement {\n if (!this.hasFileSection) {\n return;\n }\n\n return (\n <section class={`files-container ${!this.files.length ? \"hidden\" : \"\"}`}>\n <span class=\"heading-4-sb\">File appena caricati</span>\n <div class=\"files-wrapper\">\n <slot name=\"files\" />\n </div>\n <z-divider size={DividerSize.MEDIUM} />\n </section>\n );\n }\n\n private renderInput(): HTMLInputElement {\n return (\n <input\n {...this.inputAttributes}\n onChange={() => this.fileInputHandler()}\n accept={this.acceptedFormat}\n ref={(val) => (this.input = val)}\n />\n );\n }\n\n private renderUploadButton(): unknown[] {\n return [\n this.renderInput(),\n <z-button\n onClick={() => this.input.click()}\n onKeyPress={(e) => {\n if (e.code == \"Space\" || e.code == \"Enter\") {\n e.preventDefault();\n this.input.click();\n }\n }}\n id=\"fileSelect\"\n variant={this.buttonVariant}\n icon=\"upload\"\n ref={(val) => (this.button = val)}\n >\n {this.uploadBtnLabel}\n </z-button>,\n ];\n }\n\n private renderUploadLink(): unknown[] {\n return [\n this.renderInput(),\n <span class=\"body-1 upload-link-text\">\n Trascina o{\" \"}\n <span\n tabIndex={0}\n class=\"body-1-sb upload-link\"\n onClick={() => this.input.click()}\n onKeyPress={(e) => {\n if (e.code == \"Space\" || e.code == \"Enter\") {\n e.preventDefault();\n this.input.click();\n }\n }}\n ref={(val) => (this.uploadLink = val)}\n >\n carica\n </span>{\" \"}\n dal tuo computer\n </span>,\n ];\n }\n\n private renderDefaultMode(): unknown[] {\n return [\n this.renderDescription(\"body-3-sb\"),\n this.renderAllowedFileExtensions(),\n this.renderFileSection(),\n this.renderUploadButton(),\n ];\n }\n\n private renderDragDropMode(): unknown[] {\n return [\n this.renderFileSection(),\n <z-dragdrop-area drag-and-drop-label={this.dragAndDropLabel}>\n <div class=\"text-container\">\n {this.renderDescription(\"body-1\")}\n {this.renderUploadLink()}\n {this.renderAllowedFileExtensions()}\n </div>\n </z-dragdrop-area>,\n ];\n }\n\n private formatErrorString(key, value): string {\n const bothErrors = value[0] && value[1] ? \" e \" : \"\";\n\n return (\n <span class=\"error-message\">\n Il file <span class=\"file-name\">{key}</span> {value[1] ?? \"\"}\n {bothErrors}\n {value[0] ?? \"\"}.\n </span>\n );\n }\n\n private handleErrorModalContent(): HTMLDivElement {\n return (\n <div slot=\"modalContent\">\n <div class=\"modal-wrapper\">\n <div class=\"files\">\n {Array.from(this.invalidFiles).map(([key, value]) => {\n return <span class=\"body-3\">{this.formatErrorString(key, value)}</span>;\n })}\n </div>\n </div>\n </div>\n );\n }\n\n render(): HTMLZFileUploadElement {\n return (\n <Host>\n <div\n tabIndex={0}\n class={`container ${this.getType()}`}\n >\n {this.mainTitle && this.renderTitle()}\n {this.getType() == ZFileUploadType.DEFAULT ? this.renderDefaultMode() : this.renderDragDropMode()}\n </div>\n {!!this.invalidFiles.size && (\n <z-modal\n modalid={`file-upload-${this.type}-error-modal`}\n tabIndex={0}\n ref={(val) => (this.errorModal = val)}\n modaltitle=\"Errore di caricamento\"\n onModalClose={() => (this.invalidFiles = new Map<string, string[]>())}\n onModalBackgroundClick={() => (this.invalidFiles = new Map<string, string[]>())}\n >\n {this.handleErrorModalContent()}\n </z-modal>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"8KAAA,MAAMA,EAAY,2/DAClB,MAAAC,EAAeD,E,MCQFE,EAAW,M,8DAuDdC,KAAAC,gBAAkB,CACxBC,KAAM,OACNC,GAAI,YACJC,SAAU,M,UAvDYC,EAAgBC,Q,qJAwBxB,G,oBAIU,S,sBAIE,gD,oBAID,K,4BAwB3B,kBAAAC,CAAmBC,GACjBR,KAAKS,kBAAkBD,EAAEE,O,CAK3B,mBAAAC,CAAoBH,GAClBR,KAAKY,MAAMC,MAAQL,EAAEE,OACrBV,KAAKc,kB,CAGP,kBAAAC,GACEf,KAAKgB,sBACLhB,KAAKiB,aAAaC,MAAQlB,KAAKmB,WAAWC,O,CAG5C,iBAAAC,GACErB,KAAKiB,aAAe,IAAIK,G,CAOlB,gBAAAR,GACN,GAAId,KAAKY,MAAMC,MAAMU,OAAQ,CAC3BvB,KAAKiB,aAAejB,KAAKwB,WAAWC,MAAMC,KAAK1B,KAAKY,MAAMC,O,EAM9D,cAAMc,GACJ,OAA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AAMC,KAAK1B,KAAKiB,cAAc8D,KAAI,EAAEgC,EAAK9C,KACjCI,EAAA,QAAMI,MAAM,UAAUzE,KAAKiD,kBAAkB8D,EAAK9C,Q,CAQrE,MAAAoD,GACE,OACEhD,EAACiD,EAAI,CAAAP,IAAA,4CACH1C,EAAA,OAAA0C,IAAA,2CACEJ,SAAU,EACVlC,MAAO,aAAazE,KAAKoC,aAExBpC,KAAKsE,WAAatE,KAAKoE,cACvBpE,KAAKoC,WAAa/B,EAAgBC,QAAUN,KAAK4G,oBAAsB5G,KAAK6G,wBAE5E7G,KAAKiB,aAAaC,MACnBmD,EAAA,WACEkD,QAAS,eAAevH,KAAKE,mBAC7ByG,SAAU,EACVb,IAAMC,GAAS/F,KAAKmB,WAAa4E,EACjCyB,WAAW,wBACXC,aAAc,IAAOzH,KAAKiB,aAAe,IAAIK,IAC7CoG,uBAAwB,IAAO1H,KAAKiB,aAAe,IAAIK,KAEtDtB,KAAKmH,2B"}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as i,g as r}from"./p-10bb4f4b.js";import{Y as a}from"./p-025f494e.js";import{m as o}from"./p-2c886e8b.js";import{r as s}from"./p-955da62e.js";const n=':host{--z-book-card-ribbon-background-color:var(--avatar-C08);--z-book-card-ribbon-shadow-color:var(--green950);--z-book-card-compact-width:262px;--z-book-card-compact-height:568px}:host>article{display:block;width:100%;max-width:360px;box-sizing:border-box;border:var(--border-size-medium) solid var(--color-surface03);background-color:var(--color-surface01);border-radius:var(--border-radius);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>article div.cover{position:relative}:host>article div.cover div.img-wrapper{display:flex;overflow:hidden;border:var(--border-size-small) solid var(--color-surface03);line-height:0}:host>article div.cover div.img-wrapper img{width:auto;max-width:100%;height:auto;max-height:100%;align-self:flex-end}:host>article div.cover .ribbon{position:absolute;z-index:10;top:calc(var(--space-unit) * 2);left:calc(var(--space-unit) * -2);display:flex;max-width:100%;height:calc(var(--space-unit) * 4);box-sizing:border-box;align-items:center;padding:0 calc(var(--space-unit) * 2);border:var(--border-size-medium) solid var(--color-surface01);background:var(--z-book-card-ribbon-background-color);border-radius:0 var(--border-radius) var(--border-radius) 0;box-shadow:var(--shadow-2);color:var(--color-text-inverse);font-family:var(--font-family-sans);font-size:var(--font-size-2);font-weight:var(--font-sb);line-height:initial}:host>article div.cover .ribbon.interactive:hover{cursor:pointer}:host>article div.cover .ribbon span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:nowrap}:host>article div.cover .ribbon::before{position:absolute;bottom:-12px;left:-2px;width:0;height:0;border-top:10px solid var(--z-book-card-ribbon-shadow-color);border-left:16px solid transparent;content:""}:host>article div.cover .ribbon z-icon{margin-right:var(--space-unit)}:host>article div.content{margin:var(--space-unit) 0;border-radius:var(--border-radius)}:host>article .title{display:flex;height:100%;align-self:center;color:var(--color-default-text);font-size:var(--font-size-4);font-weight:var(--font-sb);line-height:1.5}:host>article .title *{all:unset}:host>article div.subtitle{color:var(--color-default-text);font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:1.4}:host>article div.authors{color:var(--color-default-text);font-size:var(--font-size-1);font-weight:var(--font-rg);line-height:1.33}:host>article div.isbn{overflow:hidden;color:var(--color-default-text);font-size:var(--font-size-2);line-height:1.33;text-overflow:ellipsis;white-space:nowrap;word-wrap:nowrap}:host>article div.isbn>.code{font-weight:var(--font-sb)}:host>article div.tags{display:flex;overflow:hidden;max-height:32px;flex-flow:row wrap;align-content:stretch;align-items:stretch;justify-content:flex-start;gap:calc(var(--space-unit) / 2)}:host>article ::slotted([slot="tags"]){margin-bottom:var(--space-unit)}:host>article ::slotted([slot="header-cta"]){--z-icon-width:20px;--z-icon-height:20px;padding:var(--space-unit);cursor:pointer;fill:var(--color-primary01-icon)}:host>article.expanded{width:100%;min-width:328px;padding:calc(var(--space-unit) * 2);padding-bottom:0}:host>article.expanded div.header{display:flex;flex-flow:row nowrap;align-content:stretch;align-items:top;justify-content:space-between;margin-bottom:var(--space-unit);white-space:nowrap}:host>article.expanded div.cover div.img-wrapper{border-radius:var(--border-radius)}:host>article.expanded div.cover div.img-wrapper img{width:100%}:host>article.expanded .title,:host>article.expanded .subtitle,:host>article.expanded .authors{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:initial}:host>article.expanded div.footer{border-top:var(--border-size-small) solid var(--color-surface03);margin-bottom:calc(var(--space-unit) * 1.5)}:host>article.expanded div.footer.open{padding-top:calc(var(--space-unit) * 1.5)}:host>article.expanded div.footer.open div.resources{display:initial}:host>article.expanded div.footer.close div.resources{display:none}:host>article.expanded button.show-resources{--z-icon-height:16px;--z-icon-width:16px;all:unset;display:flex;width:100%;flex-flow:row nowrap;align-content:center;align-items:center;justify-content:center;padding:calc(var(--space-unit) * 1) 0;color:var(--color-link-primary);cursor:pointer;fill:var(--color-link-primary);font-size:var(--font-size-2);font-weight:var(--font-sb);gap:var(--space-unit)}:host>article.expanded button.show-resources:focus{box-shadow:var(--shadow-focus-primary)}:host>article.search{width:262px;height:616px;padding:calc(var(--space-unit) * 2);padding-bottom:0}:host>article.search .wrapper-container{display:flex;height:100%;flex-direction:column;justify-content:space-between}:host>article.search .wrapper-container .wrapper{height:451px}:host>article.search .wrapper-container .action-container{padding-bottom:calc(var(--space-unit) * 2)}:host>article.search div.header{display:flex;height:24px;flex-flow:row nowrap;align-content:stretch;align-items:center;justify-content:space-between;margin-bottom:calc(var(--space-unit) * 1.5);white-space:nowrap}:host>article.search div.cover div.img-wrapper{height:314px;border-radius:var(--border-radius)}:host>article.search .title{display:block;height:initial;align-self:unset;font-size:var(--font-size-3)}:host>article.search .title,:host>article.search .subtitle,:host>article.search .authors{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host>article.compact{width:var(--z-book-card-compact-width);height:var(--z-book-card-compact-height)}:host>article.compact.borderless{border:none}:host>article.compact div.cover div.img-wrapper{width:100%;height:calc(var(--z-book-card-compact-width) * 1.36);box-sizing:border-box;border:none;background:var(--color-white);border-radius:var(--border-radius) var(--border-radius) 0 0;box-shadow:var(--shadow-2)}:host>article.compact div.wrapper{display:flex;height:100%;flex-flow:column nowrap;align-content:stretch;align-items:stretch;justify-content:flex-start}:host>article.compact div.content{display:flex;box-sizing:border-box;flex-flow:column nowrap;align-content:stretch;align-items:stretch;justify-content:space-between;padding:calc(var(--space-unit) * 2);padding-top:var(--space-unit);margin:0}:host>article.compact div.action-container{padding:calc(var(--space-unit) * 2);padding-top:0;margin-top:auto}:host>article.compact.borderless div.cover div.img-wrapper{width:var(--z-book-card-compact-width)}:host>article.compact.borderless div.content{padding:0;padding-top:var(--space-unit)}:host>article.compact.borderless div.action-container{padding:0;padding-bottom:calc(var(--space-unit) * 2)}:host>article.compact .title{display:block;height:initial;align-self:unset}:host>article.compact .title,:host>article.compact .subtitle,:host>article.compact .authors{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:initial}@media (min-width: 768px){:host>article{width:100%;max-width:initial}:host>article .title{display:block;height:initial;align-self:unset}:host>article.expanded{width:100%;min-width:initial;max-width:initial;height:360px;padding:0;border:0}:host>article.expanded div.wrapper{display:flex;flex-flow:row nowrap;align-content:stretch;align-items:stretch;justify-content:flex-start}:host>article.expanded div.cover div.img-wrapper{width:262px;height:356px;border:0;border:var(--border-size-medium) solid var(--color-surface03);border-right:none;background:var(--color-surface01);border-radius:var(--border-radius) 0 0 var(--border-radius)}:host>article.expanded div.cover div.img-wrapper img{width:auto;border-radius:0}:host>article.expanded div.content{display:flex;overflow:hidden;width:100%;height:356px;flex-flow:column nowrap;align-content:stretch;align-items:stretch;justify-content:space-between;border:var(--border-size-medium) solid var(--color-surface03);border-left:none;margin:0;background:var(--color-surface01);border-radius:0 var(--border-radius) var(--border-radius) 0}:host>article.expanded div.content div.top{padding:calc(var(--space-unit) * 2);padding-bottom:0}:host>article.expanded div.content div.top div.info{display:flex;flex-flow:row nowrap;align-content:stretch;align-items:stretch;justify-content:space-between;margin-bottom:calc(var(--space-unit) / 2)}:host>article.expanded div.content div.top div.info>div.left{width:100%}:host>article.expanded div.content div.bottom{padding:calc(var(--space-unit) * 2);padding-bottom:0}}@media (min-width: 1152px){:host>article{width:fit-content;max-width:initial}}@media (min-width: 1366px){:host>article.expanded{width:635px}:host>article.expanded div.content{width:369px}}';const d=n;const c=class{constructor(i){t(this,i);this.ribbonClick=e(this,"ribbonClick",7);this.variant=undefined;this.cover=undefined;this.operaTitle=undefined;this.volumeTitle=undefined;this.authors=undefined;this.isbn=undefined;this.isbnLabel="";this.ribbon=undefined;this.ribbonIcon=undefined;this.ribbonInteractive=undefined;this.borderless=undefined;this.fallbackCover=undefined;this.operaTitleTag=undefined;this.isMobile=false;this.hasResources=false;this.showResources=false}emitRibbonClick(){this.ribbonClick.emit()}componentWillLoad(){this.id=`id-${s()}`;const t=window.matchMedia(`(max-width: ${o}px)`);this.isMobile=t.matches;t.onchange=t=>this.isMobile=t.matches}componentDidLoad(){this.handleResources()}handleResources(){var t;if(this.variant!==a.EXPANDED||!this.isMobile){return}this.hasResources=((t=this.hostElement.querySelectorAll("[slot=resources]"))===null||t===void 0?void 0:t.length)>0}toggleResources(){this.showResources=!this.showResources}renderCard(){switch(this.variant){case a.EXPANDED:return this.isMobile?this.renderMobileExpandedCard():this.renderExpandedCard();case a.COMPACT:return this.renderCompactCard();case a.SEARCH:return this.renderSearchCard()}}renderExpandedCard(){return i("div",{class:"wrapper"},this.renderCover(),i("div",{class:"content"},i("div",{class:"top"},i("div",{class:"info"},i("div",{class:"left"},this.renderAuthors(),this.renderOperaTitle(),this.renderVolumeTitle(),this.renderIsbn()),i("div",{class:"right"},this.renderHeaderCtaSlot())),this.renderTagsSlot()),i("div",{class:"bottom"},this.renderResourcesSlot())))}renderMobileExpandedCard(){return i("div",{class:"wrapper"},i("div",{class:"header"},this.renderOperaTitle(),this.renderHeaderCtaSlot()),this.renderCover(),i("div",{class:"content"},this.renderTagsSlot(),this.renderAuthors(),this.renderVolumeTitle(),this.renderIsbn()),this.hasResources&&i("div",{class:{footer:true,open:this.showResources,close:!this.showResources}},!this.showResources&&this.renderShowResources(),this.renderResourcesSlot(),this.showResources&&this.renderShowResources()))}renderSearchCard(){return i("div",{class:"wrapper-container"},i("div",{class:"wrapper"},i("div",{class:"header"},this.renderOperaTitle(),this.renderHeaderCtaSlot()),this.renderCover(),i("div",{class:"content"},this.renderTagsSlot(),this.renderAuthors(),this.renderVolumeTitle(),this.renderIsbn())),this.renderFooterCtaSlot())}renderCompactCard(){return i("div",{class:"wrapper"},this.renderCover(),i("div",{class:"content"},this.renderAuthors(),this.renderOperaTitle(),this.renderVolumeTitle(),this.renderIsbn()),this.renderFooterCtaSlot())}renderCover(){return i("div",{class:"cover"},this.ribbon&&this.variant!==a.COMPACT&&this.renderRibbon(),i("div",{class:"img-wrapper"},i("img",{src:this.cover,onError:()=>{if(this.fallbackCover){this.cover=this.fallbackCover}},"aria-hidden":"true"})))}renderRibbon(){const t=[this.ribbonIcon&&i("z-icon",{name:this.ribbonIcon,width:16,height:16,fill:"color-inverse-icon"}),i("span",null,this.ribbon)];return this.ribbonInteractive?i("button",{class:"ribbon interactive",onClick:()=>this.emitRibbonClick()},t):i("div",{class:"ribbon"},t)}renderOperaTitle(){const t=this.operaTitleTag?`<${this.operaTitleTag}>${this.operaTitle}</${this.operaTitleTag}>`:this.operaTitle;return i("div",{class:"title",innerHTML:t})}renderVolumeTitle(){return this.volumeTitle?i("div",{class:"subtitle"},this.volumeTitle):null}renderAuthors(){return this.authors?i("div",{class:"authors","aria-description":"Autori"},this.authors):null}renderIsbn(){return this.isbn?i("div",{class:"isbn"},i("span",{class:"code","aria-description":`ISBN ${this.isbnLabel}`},this.isbn),this.isbnLabel?i("span",{class:"label"}," ",this.isbnLabel):null):null}renderShowResources(){return i("button",{class:"show-resources","aria-label":`Risorse del libro ${this.operaTitle}`,"aria-expanded":this.showResources.toString(),"aria-controls":`resources-${this.id}`,onClick:()=>this.toggleResources()},this.showResources?"Chiudi":"Vedi tutto",i("z-icon",{name:this.showResources?"chevron-up":"chevron-down"}))}renderTagsSlot(){return i("div",{class:"tags"},i("slot",{name:"tags"}))}renderHeaderCtaSlot(){return i("slot",{name:"header-cta"})}renderResourcesSlot(){return i("div",{id:`resources-${this.id}`,class:"resources"},i("slot",{name:"resources",onSlotchange:()=>this.handleResources()}))}renderFooterCtaSlot(){return i("div",{class:"action-container"},i("slot",{name:"footer-cta"}))}render(){return i("article",{key:"101c9922d8f9405fc38fb79f36fbf0d608327064",class:{[this.variant]:true,borderless:!!this.borderless}},this.renderCard())}get hostElement(){return r(this)}};c.style=d;export{c as z_book_card};
2
+ //# sourceMappingURL=p-44e29069.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["stylesCss","ZBookCardStyle0","ZBookCard","emitRibbonClick","this","ribbonClick","emit","componentWillLoad","id","randomId","mobileMediaQuery","window","matchMedia","mobileBreakpoint","isMobile","matches","onchange","mql","componentDidLoad","handleResources","variant","BookCardVariant","EXPANDED","hasResources","_a","hostElement","querySelectorAll","length","toggleResources","showResources","renderCard","renderMobileExpandedCard","renderExpandedCard","COMPACT","renderCompactCard","SEARCH","renderSearchCard","h","class","renderCover","renderAuthors","renderOperaTitle","renderVolumeTitle","renderIsbn","renderHeaderCtaSlot","renderTagsSlot","renderResourcesSlot","footer","open","close","renderShowResources","renderFooterCtaSlot","ribbon","renderRibbon","src","cover","onError","fallbackCover","content","ribbonIcon","name","width","height","fill","ribbonInteractive","onClick","title","operaTitleTag","operaTitle","innerHTML","volumeTitle","authors","isbn","isbnLabel","toString","onSlotchange","render","key","borderless"],"sources":["src/components/z-book-card/styles.css?tag=z-book-card&encapsulation=shadow","src/components/z-book-card/index.tsx"],"sourcesContent":["/* COMMON STYLES */\n\n:host {\n --z-book-card-ribbon-background-color: var(--avatar-C08);\n --z-book-card-ribbon-shadow-color: var(--green950);\n --z-book-card-compact-width: 262px;\n --z-book-card-compact-height: 568px;\n}\n\n:host > article {\n display: block;\n width: 100%;\n max-width: 360px;\n box-sizing: border-box;\n border: var(--border-size-medium) solid var(--color-surface03);\n background-color: var(--color-surface01);\n border-radius: var(--border-radius);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n:host > article div.cover {\n position: relative;\n}\n\n:host > article div.cover div.img-wrapper {\n display: flex;\n overflow: hidden;\n border: var(--border-size-small) solid var(--color-surface03);\n line-height: 0;\n}\n\n:host > article div.cover div.img-wrapper img {\n width: auto;\n max-width: 100%;\n height: auto;\n max-height: 100%;\n align-self: flex-end;\n}\n\n:host > article div.cover .ribbon {\n position: absolute;\n z-index: 10;\n top: calc(var(--space-unit) * 2);\n left: calc(var(--space-unit) * -2);\n display: flex;\n max-width: 100%;\n height: calc(var(--space-unit) * 4);\n box-sizing: border-box;\n align-items: center;\n padding: 0 calc(var(--space-unit) * 2);\n border: var(--border-size-medium) solid var(--color-surface01);\n background: var(--z-book-card-ribbon-background-color);\n border-radius: 0 var(--border-radius) var(--border-radius) 0;\n box-shadow: var(--shadow-2);\n color: var(--color-text-inverse);\n font-family: var(--font-family-sans);\n font-size: var(--font-size-2);\n font-weight: var(--font-sb);\n line-height: initial;\n}\n\n:host > article div.cover .ribbon.interactive:hover {\n cursor: pointer;\n}\n\n:host > article div.cover .ribbon span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n word-wrap: nowrap;\n}\n\n:host > article div.cover .ribbon::before {\n position: absolute;\n bottom: -12px;\n left: -2px;\n width: 0;\n height: 0;\n border-top: 10px solid var(--z-book-card-ribbon-shadow-color);\n border-left: 16px solid transparent;\n content: \"\";\n}\n\n:host > article div.cover .ribbon z-icon {\n margin-right: var(--space-unit);\n}\n\n:host > article div.content {\n margin: var(--space-unit) 0;\n border-radius: var(--border-radius);\n}\n\n:host > article .title {\n display: flex;\n height: 100%;\n align-self: center;\n color: var(--color-default-text);\n font-size: var(--font-size-4);\n font-weight: var(--font-sb);\n line-height: 1.5;\n}\n\n:host > article .title * {\n all: unset;\n}\n\n:host > article div.subtitle {\n color: var(--color-default-text);\n font-size: var(--font-size-2);\n font-weight: var(--font-rg);\n line-height: 1.4;\n}\n\n:host > article div.authors {\n color: var(--color-default-text);\n font-size: var(--font-size-1);\n font-weight: var(--font-rg);\n line-height: 1.33;\n}\n\n:host > article div.isbn {\n overflow: hidden;\n color: var(--color-default-text);\n font-size: var(--font-size-2);\n line-height: 1.33;\n text-overflow: ellipsis;\n white-space: nowrap;\n word-wrap: nowrap;\n}\n\n:host > article div.isbn > .code {\n font-weight: var(--font-sb);\n}\n\n:host > article div.tags {\n display: flex;\n overflow: hidden;\n max-height: 32px;\n flex-flow: row wrap;\n align-content: stretch;\n align-items: stretch;\n justify-content: flex-start;\n gap: calc(var(--space-unit) / 2);\n}\n\n:host > article ::slotted([slot=\"tags\"]) {\n margin-bottom: var(--space-unit);\n}\n\n:host > article ::slotted([slot=\"header-cta\"]) {\n --z-icon-width: 20px;\n --z-icon-height: 20px;\n\n padding: var(--space-unit);\n cursor: pointer;\n fill: var(--color-primary01-icon);\n}\n\n/* EXPANDED STYLES */\n\n:host > article.expanded {\n width: 100%;\n min-width: 328px;\n padding: calc(var(--space-unit) * 2);\n padding-bottom: 0;\n}\n\n:host > article.expanded div.header {\n display: flex;\n flex-flow: row nowrap;\n align-content: stretch;\n align-items: top;\n justify-content: space-between;\n margin-bottom: var(--space-unit);\n white-space: nowrap;\n}\n\n:host > article.expanded div.cover div.img-wrapper {\n border-radius: var(--border-radius);\n}\n\n:host > article.expanded div.cover div.img-wrapper img {\n width: 100%;\n}\n\n:host > article.expanded .title,\n:host > article.expanded .subtitle,\n:host > article.expanded .authors {\n display: -webkit-box;\n overflow: hidden;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n white-space: initial;\n}\n\n:host > article.expanded div.footer {\n border-top: var(--border-size-small) solid var(--color-surface03);\n margin-bottom: calc(var(--space-unit) * 1.5);\n}\n\n:host > article.expanded div.footer.open {\n padding-top: calc(var(--space-unit) * 1.5);\n}\n\n:host > article.expanded div.footer.open div.resources {\n display: initial;\n}\n\n:host > article.expanded div.footer.close div.resources {\n display: none;\n}\n\n:host > article.expanded button.show-resources {\n --z-icon-height: 16px;\n --z-icon-width: 16px;\n\n all: unset;\n display: flex;\n width: 100%;\n flex-flow: row nowrap;\n align-content: center;\n align-items: center;\n justify-content: center;\n padding: calc(var(--space-unit) * 1) 0;\n color: var(--color-link-primary);\n cursor: pointer;\n fill: var(--color-link-primary);\n font-size: var(--font-size-2);\n font-weight: var(--font-sb);\n gap: var(--space-unit);\n}\n\n:host > article.expanded button.show-resources:focus {\n box-shadow: var(--shadow-focus-primary);\n}\n\n/* SEARCH STYLES */\n\n:host > article.search {\n width: 262px;\n height: 616px;\n padding: calc(var(--space-unit) * 2);\n padding-bottom: 0;\n}\n\n:host > article.search .wrapper-container {\n display: flex;\n height: 100%;\n flex-direction: column;\n justify-content: space-between;\n}\n\n:host > article.search .wrapper-container .wrapper {\n height: 451px;\n}\n\n:host > article.search .wrapper-container .action-container {\n padding-bottom: calc(var(--space-unit) * 2);\n}\n\n:host > article.search div.header {\n display: flex;\n height: 24px;\n flex-flow: row nowrap;\n align-content: stretch;\n align-items: center;\n justify-content: space-between;\n margin-bottom: calc(var(--space-unit) * 1.5);\n white-space: nowrap;\n}\n\n:host > article.search div.cover div.img-wrapper {\n height: 314px;\n border-radius: var(--border-radius);\n}\n\n:host > article.search .title {\n display: block;\n height: initial;\n align-self: unset;\n font-size: var(--font-size-3);\n}\n\n:host > article.search .title,\n:host > article.search .subtitle,\n:host > article.search .authors {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* COMPACT STYLES */\n\n:host > article.compact {\n width: var(--z-book-card-compact-width);\n height: var(--z-book-card-compact-height);\n}\n\n:host > article.compact.borderless {\n border: none;\n}\n\n:host > article.compact div.cover div.img-wrapper {\n width: 100%;\n height: calc(var(--z-book-card-compact-width) * 1.36);\n box-sizing: border-box;\n border: none;\n background: var(--color-white);\n border-radius: var(--border-radius) var(--border-radius) 0 0;\n box-shadow: var(--shadow-2);\n}\n\n:host > article.compact div.wrapper {\n display: flex;\n height: 100%;\n flex-flow: column nowrap;\n align-content: stretch;\n align-items: stretch;\n justify-content: flex-start;\n}\n\n:host > article.compact div.content {\n display: flex;\n box-sizing: border-box;\n flex-flow: column nowrap;\n align-content: stretch;\n align-items: stretch;\n justify-content: space-between;\n padding: calc(var(--space-unit) * 2);\n padding-top: var(--space-unit);\n margin: 0;\n}\n\n:host > article.compact div.action-container {\n padding: calc(var(--space-unit) * 2);\n padding-top: 0;\n margin-top: auto;\n}\n\n:host > article.compact.borderless div.cover div.img-wrapper {\n width: var(--z-book-card-compact-width);\n}\n\n:host > article.compact.borderless div.content {\n padding: 0;\n padding-top: var(--space-unit);\n}\n\n:host > article.compact.borderless div.action-container {\n padding: 0;\n padding-bottom: calc(var(--space-unit) * 2);\n}\n\n:host > article.compact .title {\n display: block;\n height: initial;\n align-self: unset;\n}\n\n:host > article.compact .title,\n:host > article.compact .subtitle,\n:host > article.compact .authors {\n display: -webkit-box;\n overflow: hidden;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n white-space: initial;\n}\n\n/* Tablet breakpoint */\n@media (min-width: 768px) {\n :host > article {\n width: 100%;\n max-width: initial;\n }\n\n :host > article .title {\n display: block;\n height: initial;\n align-self: unset;\n }\n\n /* EXPANDED STYLES */\n\n :host > article.expanded {\n width: 100%;\n min-width: initial;\n max-width: initial;\n height: 360px;\n padding: 0;\n border: 0;\n }\n\n :host > article.expanded div.wrapper {\n display: flex;\n flex-flow: row nowrap;\n align-content: stretch;\n align-items: stretch;\n justify-content: flex-start;\n }\n\n :host > article.expanded div.cover div.img-wrapper {\n width: 262px;\n height: 356px;\n border: 0;\n border: var(--border-size-medium) solid var(--color-surface03);\n border-right: none;\n background: var(--color-surface01);\n border-radius: var(--border-radius) 0 0 var(--border-radius);\n }\n\n :host > article.expanded div.cover div.img-wrapper img {\n width: auto;\n border-radius: 0;\n }\n\n :host > article.expanded div.content {\n display: flex;\n overflow: hidden;\n width: 100%;\n height: 356px;\n flex-flow: column nowrap;\n align-content: stretch;\n align-items: stretch;\n justify-content: space-between;\n border: var(--border-size-medium) solid var(--color-surface03);\n border-left: none;\n margin: 0;\n background: var(--color-surface01);\n border-radius: 0 var(--border-radius) var(--border-radius) 0;\n }\n\n :host > article.expanded div.content div.top {\n padding: calc(var(--space-unit) * 2);\n padding-bottom: 0;\n }\n\n :host > article.expanded div.content div.top div.info {\n display: flex;\n flex-flow: row nowrap;\n align-content: stretch;\n align-items: stretch;\n justify-content: space-between;\n margin-bottom: calc(var(--space-unit) / 2);\n }\n\n :host > article.expanded div.content div.top div.info > div.left {\n width: 100%;\n }\n\n :host > article.expanded div.content div.bottom {\n padding: calc(var(--space-unit) * 2);\n padding-bottom: 0;\n }\n}\n\n/* Desktop breakpoint */\n\n@media (min-width: 1152px) {\n :host > article {\n width: fit-content;\n max-width: initial;\n }\n}\n\n/* Wide breakpoint */\n@media (min-width: 1366px) {\n :host > article.expanded {\n width: 635px;\n }\n\n :host > article.expanded div.content {\n width: 369px;\n }\n}\n","import {Component, Element, Prop, State, h, Event, EventEmitter} from \"@stencil/core\";\nimport {BookCardVariant} from \"../../beans\";\nimport {mobileBreakpoint} from \"../../constants/breakpoints\";\nimport {randomId} from \"../../utils/utils\";\n\n/**\n * @slot resources - books resources (extended variant only)\n * @slot header-cta - header CTA (e.g. bookmark icon - extended and search variant only)\n * @slot tags - card tags (extended and search variant only)\n * @slot footer-cta - footer cta button (search and compact variant only)\n * @cssprop --z-book-card-ribbon-background-color - ribbon backgrund color\n * @cssprop --z-book-card-ribbon-shadow-color - ribbon shadow color\n * @cssprop --z-book-card-compact-width - compact card custom width\n * @cssprop --z-book-card-compact-height - compact card custom height\n */\n@Component({\n tag: \"z-book-card\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZBookCard {\n @Element() hostElement: HTMLZBookCardElement;\n\n /**\n * Card variant: expanded, compact, search\n */\n @Prop()\n variant: BookCardVariant;\n\n /**\n * Cover URL\n */\n @Prop()\n cover: string;\n\n /**\n * Card main title\n */\n @Prop()\n operaTitle: string;\n\n /**\n * [optional] Card subtitle\n */\n @Prop()\n volumeTitle?: string;\n\n /**\n * [optional] Authors\n */\n @Prop()\n authors?: string;\n\n /**\n * [optional] Main ISBN\n */\n @Prop()\n isbn?: string;\n\n /**\n * [optional] ISBN label\n */\n @Prop()\n isbnLabel = \"\";\n\n /**\n * [optional] Ribbon label - expanded and search variant only\n */\n @Prop()\n ribbon?: string;\n\n /**\n * [optional] Ribbon icon - expanded and search variant only\n */\n @Prop()\n ribbonIcon?: string;\n\n /**\n * [optional] Ribbon interactive - expanded and search variant only\n */\n @Prop()\n ribbonInteractive?: boolean;\n\n /**\n * [optional] Borderless card - compact variant only\n */\n @Prop()\n borderless?: boolean;\n\n /**\n * [optional] Fallback cover URL\n */\n @Prop()\n fallbackCover?: string;\n\n /**\n * [optional] [accessibility] Card title HTML tag\n */\n @Prop()\n operaTitleTag?: string;\n\n @State()\n isMobile = false;\n\n @State()\n hasResources = false;\n\n @State()\n showResources = false;\n\n /** click on interactive ribbon */\n @Event()\n ribbonClick: EventEmitter;\n\n private emitRibbonClick(): void {\n this.ribbonClick.emit();\n }\n\n private id: string;\n\n componentWillLoad(): void {\n this.id = `id-${randomId()}`;\n\n const mobileMediaQuery = window.matchMedia(`(max-width: ${mobileBreakpoint}px)`);\n this.isMobile = mobileMediaQuery.matches;\n mobileMediaQuery.onchange = (mql) => (this.isMobile = mql.matches);\n }\n\n componentDidLoad(): void {\n this.handleResources();\n }\n\n private handleResources(): void {\n if (this.variant !== BookCardVariant.EXPANDED || !this.isMobile) {\n return;\n }\n this.hasResources = this.hostElement.querySelectorAll(\"[slot=resources]\")?.length > 0;\n }\n\n private toggleResources(): void {\n this.showResources = !this.showResources;\n }\n\n private renderCard(): HTMLDivElement {\n switch (this.variant) {\n case BookCardVariant.EXPANDED:\n return this.isMobile ? this.renderMobileExpandedCard() : this.renderExpandedCard();\n case BookCardVariant.COMPACT:\n return this.renderCompactCard();\n case BookCardVariant.SEARCH:\n return this.renderSearchCard();\n }\n }\n\n private renderExpandedCard(): HTMLDivElement {\n return (\n <div class=\"wrapper\">\n {this.renderCover()}\n <div class=\"content\">\n <div class=\"top\">\n <div class=\"info\">\n <div class=\"left\">\n {this.renderAuthors()}\n {this.renderOperaTitle()}\n {this.renderVolumeTitle()}\n {this.renderIsbn()}\n </div>\n <div class=\"right\">{this.renderHeaderCtaSlot()}</div>\n </div>\n {this.renderTagsSlot()}\n </div>\n <div class=\"bottom\">{this.renderResourcesSlot()}</div>\n </div>\n </div>\n );\n }\n\n private renderMobileExpandedCard(): HTMLDivElement {\n return (\n <div class=\"wrapper\">\n <div class=\"header\">\n {this.renderOperaTitle()}\n {this.renderHeaderCtaSlot()}\n </div>\n {this.renderCover()}\n <div class=\"content\">\n {this.renderTagsSlot()}\n {this.renderAuthors()}\n {this.renderVolumeTitle()}\n {this.renderIsbn()}\n </div>\n {this.hasResources && (\n <div\n class={{\n footer: true,\n open: this.showResources,\n close: !this.showResources,\n }}\n >\n {!this.showResources && this.renderShowResources()}\n {this.renderResourcesSlot()}\n {this.showResources && this.renderShowResources()}\n </div>\n )}\n </div>\n );\n }\n\n private renderSearchCard(): HTMLDivElement {\n return (\n <div class=\"wrapper-container\">\n <div class=\"wrapper\">\n <div class=\"header\">\n {this.renderOperaTitle()}\n {this.renderHeaderCtaSlot()}\n </div>\n {this.renderCover()}\n <div class=\"content\">\n {this.renderTagsSlot()}\n {this.renderAuthors()}\n {this.renderVolumeTitle()}\n {this.renderIsbn()}\n </div>\n </div>\n {this.renderFooterCtaSlot()}\n </div>\n );\n }\n\n private renderCompactCard(): HTMLDivElement {\n return (\n <div class=\"wrapper\">\n {this.renderCover()}\n <div class=\"content\">\n {this.renderAuthors()}\n {this.renderOperaTitle()}\n {this.renderVolumeTitle()}\n {this.renderIsbn()}\n </div>\n {this.renderFooterCtaSlot()}\n </div>\n );\n }\n\n private renderCover(): HTMLDivElement {\n return (\n <div class=\"cover\">\n {this.ribbon && this.variant !== BookCardVariant.COMPACT && this.renderRibbon()}\n <div class=\"img-wrapper\">\n <img\n src={this.cover}\n onError={() => {\n if (this.fallbackCover) {\n this.cover = this.fallbackCover;\n }\n }}\n aria-hidden=\"true\"\n />\n </div>\n </div>\n );\n }\n\n private renderRibbon(): HTMLElement {\n const content = [\n this.ribbonIcon && (\n <z-icon\n name={this.ribbonIcon}\n width={16}\n height={16}\n fill={\"color-inverse-icon\"}\n />\n ),\n <span>{this.ribbon}</span>,\n ];\n\n return this.ribbonInteractive ? (\n <button\n class=\"ribbon interactive\"\n onClick={() => this.emitRibbonClick()}\n >\n {content}\n </button>\n ) : (\n <div class=\"ribbon\">{content}</div>\n );\n }\n\n private renderOperaTitle(): HTMLDivElement {\n const title = this.operaTitleTag\n ? `<${this.operaTitleTag}>${this.operaTitle}</${this.operaTitleTag}>`\n : this.operaTitle;\n\n return (\n <div\n class=\"title\"\n innerHTML={title}\n />\n );\n }\n\n private renderVolumeTitle(): null | HTMLDivElement {\n return this.volumeTitle ? <div class=\"subtitle\">{this.volumeTitle}</div> : null;\n }\n\n private renderAuthors(): null | HTMLDivElement {\n return this.authors ? (\n <div\n class=\"authors\"\n aria-description=\"Autori\"\n >\n {this.authors}\n </div>\n ) : null;\n }\n\n private renderIsbn(): null | HTMLDivElement {\n return this.isbn ? (\n <div class=\"isbn\">\n <span\n class=\"code\"\n aria-description={`ISBN ${this.isbnLabel}`}\n >\n {this.isbn}\n </span>\n {this.isbnLabel ? <span class=\"label\"> {this.isbnLabel}</span> : null}\n </div>\n ) : null;\n }\n\n private renderShowResources(): HTMLButtonElement {\n return (\n <button\n class=\"show-resources\"\n aria-label={`Risorse del libro ${this.operaTitle}`}\n aria-expanded={this.showResources.toString()}\n aria-controls={`resources-${this.id}`}\n onClick={() => this.toggleResources()}\n >\n {this.showResources ? \"Chiudi\" : \"Vedi tutto\"}\n <z-icon name={this.showResources ? \"chevron-up\" : \"chevron-down\"} />\n </button>\n );\n }\n\n private renderTagsSlot(): HTMLDivElement {\n return (\n <div class=\"tags\">\n <slot name=\"tags\" />\n </div>\n );\n }\n\n private renderHeaderCtaSlot(): HTMLSlotElement {\n return <slot name=\"header-cta\" />;\n }\n\n private renderResourcesSlot(): HTMLDivElement {\n return (\n <div\n id={`resources-${this.id}`}\n class=\"resources\"\n >\n <slot\n name=\"resources\"\n onSlotchange={() => this.handleResources()}\n />\n </div>\n );\n }\n\n private renderFooterCtaSlot(): HTMLDivElement {\n return (\n <div class=\"action-container\">\n <slot name=\"footer-cta\" />\n </div>\n );\n }\n\n render(): HTMLZBookCardElement {\n return (\n <article\n class={{\n [this.variant]: true,\n borderless: !!this.borderless,\n }}\n >\n {this.renderCard()}\n </article>\n );\n }\n}\n"],"mappings":"qKAAA,MAAMA,EAAY,y9QAClB,MAAAC,EAAeD,E,MCmBFE,EAAS,M,6NA2CR,G,mLAuCD,M,kBAGI,M,mBAGC,K,CAMR,eAAAC,GACNC,KAAKC,YAAYC,M,CAKnB,iBAAAC,GACEH,KAAKI,GAAK,MAAMC,MAEhB,MAAMC,EAAmBC,OAAOC,WAAW,eAAeC,QAC1DT,KAAKU,SAAWJ,EAAiBK,QACjCL,EAAiBM,SAAYC,GAASb,KAAKU,SAAWG,EAAIF,O,CAG5D,gBAAAG,GACEd,KAAKe,iB,CAGC,eAAAA,G,MACN,GAAIf,KAAKgB,UAAYC,EAAgBC,WAAalB,KAAKU,SAAU,CAC/D,M,CAEFV,KAAKmB,eAAeC,EAAApB,KAAKqB,YAAYC,iBAAiB,uBAAmB,MAAAF,SAAA,SAAAA,EAAEG,QAAS,C,CAG9E,eAAAC,GACNxB,KAAKyB,eAAiBzB,KAAKyB,a,CAGrB,UAAAC,GACN,OAAQ1B,KAAKgB,SACX,KAAKC,EAAgBC,SACnB,OAAOlB,KAAKU,SAAWV,KAAK2B,2BAA6B3B,KAAK4B,qBAChE,KAAKX,EAAgBY,QACnB,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AAKyB,cAAc6C,WAAU,gBAC7B,aAAatE,KAAKI,KACjCyD,QAAS,IAAM7D,KAAKwB,mBAEnBxB,KAAKyB,cAAgB,SAAW,aACjCQ,EAAA,UAAQuB,KAAMxD,KAAKyB,cAAgB,aAAe,iB,CAKhD,cAAAgB,GACN,OACER,EAAA,OAAKC,MAAM,QACTD,EAAA,QAAMuB,KAAK,S,CAKT,mBAAAhB,GACN,OAAOP,EAAA,QAAMuB,KAAK,c,CAGZ,mBAAAd,GACN,OACET,EAAA,OACE7B,GAAI,aAAaJ,KAAKI,KACtB8B,MAAM,aAEND,EAAA,QACEuB,KAAK,YACLe,aAAc,IAAMvE,KAAKe,oB,CAMzB,mBAAAgC,GACN,OACEd,EAAA,OAAKC,MAAM,oBACTD,EAAA,QAAMuB,KAAK,e,CAKjB,MAAAgB,GACE,OACEvC,EAAA,WAAAwC,IAAA,2CACEvC,MAAO,CACL,CAAClC,KAAKgB,SAAU,KAChB0D,aAAc1E,KAAK0E,aAGpB1E,KAAK0B,a"}
@@ -1,2 +1,2 @@
1
- import{r,h as o}from"./p-10bb4f4b.js";const s=":host{display:block;box-sizing:border-box;color:var(--color-surface05);font-family:var(--font-family-sans);font-size:14px;font-weight:var(--font-rg);line-height:calc(var(--space-unit) * 2)}:host>div{padding:calc(var(--space-unit) * 2)}:host>.success{background:var(--color-success-inverse);fill:var(--color-success01)}:host>.warning{background:var(--color-warning-inverse);fill:var(--color-warning01)}:host>.error{background:var(--color-error-inverse);fill:var(--color-error01)}";const a=s;const e=class{constructor(o){r(this,o);this.type=undefined}render(){return o("div",{key:"824f9b9f4ee2d4212ad28a561b03c2bb8e2dbb0c",class:this.type},o("slot",{key:"276f05d0bbb4a1f0e6ef9391d66a07ed875890b9"}))}};e.style=a;export{e as z_alert};
2
- //# sourceMappingURL=p-acf5a569.entry.js.map
1
+ import{r,h as o}from"./p-10bb4f4b.js";const s=":host{display:block;box-sizing:border-box;color:var(--color-surface05);font-family:var(--font-family-sans);font-size:14px;font-weight:var(--font-rg);line-height:calc(var(--space-unit) * 2)}:host>div{padding:calc(var(--space-unit) * 2)}:host>.success{background:var(--color-success-inverse);fill:var(--color-success01)}:host>.warning{background:var(--color-warning-inverse);fill:var(--color-warning01)}:host>.error{background:var(--color-error-inverse);fill:var(--color-error01)}";const c=s;const e=class{constructor(o){r(this,o);this.type=undefined}render(){return o("div",{key:"2b223d1c78e88b49096c0e6e82cafce199d76c31",class:this.type},o("slot",{key:"118a1a890199cd805ee2e2c3d2a440fd3e7568ee"}))}};e.style=c;export{e as z_alert};
2
+ //# sourceMappingURL=p-49e83bee.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as i,c as e,h as t}from"./p-10bb4f4b.js";import{P as n}from"./p-025f494e.js";import{a as s}from"./p-955da62e.js";import"./p-2c886e8b.js";const o=':host{width:100%;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{position:relative;display:grid;width:calc(100% + calc(var(--space-unit) * 2));height:402px;box-sizing:border-box;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 3);border:var(--border-size-small) solid var(--color-primary01);margin-left:calc(-1 * var(--space-unit));background:var(--color-surface01);border-radius:0;box-shadow:0 2px 4px 0 rgb(66 69 72 / 35%)}:host>div>z-icon{position:absolute;top:var(--space-unit);right:var(--space-unit);cursor:pointer;fill:var(--color-primary01)}:host>div>div.cta-wrapper{display:flex;flex-flow:column nowrap;align-self:end;justify-content:space-between}:host>div>div.content-wrapper{position:relative;overflow:hidden;align-self:stretch}:host>div>div.content-wrapper>section{box-sizing:border-box;padding:var(--space-unit) 0;border-bottom:var(--border-size-small) solid var(--color-surface04);color:var(--color-surface05);font-size:14px;line-height:20px}:host>div>div.content-wrapper>section:last-child{border-bottom:none}:host>div>div.content-wrapper>section.info-wrapper{position:relative;overflow:hidden;box-sizing:border-box}:host>div>div.content-wrapper>section.info-wrapper.hidden::after{position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(180deg, rgb(255 0 0 / 0%), rgb(255 0 0 / 0%) 60%, white);content:"";pointer-events:none}:host>div>div.content-wrapper>section>span.license-heading{display:flex;justify-content:space-between}:host>div>div.content-wrapper>section>span.license-heading>span.expired{color:var(--color-secondary02);font-size:12px;font-weight:600}:host>div>div.content-wrapper>section>span.license-heading>span.expiring{color:var(--color-warning01);font-size:12px;font-weight:600}:host>div>div.content-wrapper>z-popover{position:absolute;top:0;left:calc(var(--space-unit) * 4)}';const r=o;const a=class{emitFlipCard(i=false){this.flipCard.emit(i)}constructor(t){i(this,t);this.flipCard=e(this,"flipCard",7);this.data=undefined;this.htmltabindex=0;this.hiddenContent=false;this.tooltip=false;this.emitFlipCard=this.emitFlipCard.bind(this)}componentWillLoad(){this.setStringOrArray()}componentWillUpdate(){this.setStringOrArray()}componentDidRender(){this.handleContentHeight()}handleContentHeight(){if(!this.contentWrapper&&!this.infoWrapper){this.hiddenContent=false;return}if(this.contentWrapper.scrollHeight>this.contentWrapper.offsetHeight||this.infoWrapper.scrollHeight>this.infoWrapper.offsetHeight){const i=this.contentWrapper.offsetHeight-this.onlineLicenseWrapper.offsetHeight-this.offlineLicenseWrapper.offsetHeight;this.infoWrapper.style.height=`${i}px`;this.hiddenContent=true;return}this.hiddenContent=false}setStringOrArray(){if(typeof this.data==="string"){this.cardData=JSON.parse(this.data)}else{this.cardData=this.data}}renderCloseIcon(){return t("z-icon",{name:"multiply-circled-filled",height:18,width:18,onClick:()=>this.emitFlipCard(false),tabindex:this.htmltabindex,onKeyUp:i=>{s(i,this.emitFlipCard,false)}})}renderGeneralSection(){var i,e;const n=(i=this===null||this===void 0?void 0:this.cardData)===null||i===void 0?void 0:i.title;const s=(e=this===null||this===void 0?void 0:this.cardData)===null||e===void 0?void 0:e.description;return t("section",{class:`info-wrapper ${this.hiddenContent?"hidden":""}`,onClick:()=>{if(this.hiddenContent){this.tooltip=!this.tooltip}},ref:i=>this.infoWrapper=i},this.renderAuthor(),this.renderYear(),n,t("br",null),s)}renderAuthor(){var i;const e=(i=this===null||this===void 0?void 0:this.cardData)===null||i===void 0?void 0:i.author;if(!e){return null}return t("span",null,"Autore: ",t("b",null,e),t("br",null))}renderYear(){var i;const e=(i=this===null||this===void 0?void 0:this.cardData)===null||i===void 0?void 0:i.year;if(!e){return null}return t("span",null,"Anno: ",t("b",null,e),t("br",null))}renderTooltip(){if(!this.tooltip){return}if(!this.cardData){return}const{title:i,year:e,author:s,description:o}=this.cardData;return t("z-popover",{position:n.RIGHT,onClick:()=>this.tooltip=false},`${i} ${e} ${s} ${o}`)}setExpirationLicenseMessage(i){if(i==="online"&&this.cardData.onlineLicense.expired||i==="offline"&&this.cardData.offlineLicense.expired){return t("span",{class:"expired"},"SCADUTA")}if(i==="online"&&this.cardData.onlineLicense.expiring||i==="offline"&&this.cardData.offlineLicense.expiring){return t("span",{class:"expiring"},"IN SCADENZA")}}renderOnlineLicenseSection(){var i;if(!((i=this===null||this===void 0?void 0:this.cardData)===null||i===void 0?void 0:i.onlineLicense)){return}return t("section",{ref:i=>this.onlineLicenseWrapper=i},t("span",{class:"license-heading"},t("span",null,"Licenza online"),this.setExpirationLicenseMessage("online")),"Scadenza il ",t("b",null,this.cardData.onlineLicense.expiration),t("br",null))}renderOfflineLicenseSection(){var i;if(!((i=this===null||this===void 0?void 0:this.cardData)===null||i===void 0?void 0:i.offlineLicense)){return}return t("section",{ref:i=>this.offlineLicenseWrapper=i},t("span",{class:"license-heading"},t("span",null,"Licenza offline"),this.setExpirationLicenseMessage("offline")),"Scadenza il ",t("b",null,this.cardData.offlineLicense.expiration),t("br",null),"Installazioni disponibili: ",t("b",null,this.cardData.offlineLicense.installations))}render(){return t("div",{key:"03264429f281a91e3450b1d8aacda2a9268fad01"},this.renderCloseIcon(),t("div",{key:"9e0ee2f4a5e0866b4aac9daa3636e8bfe7712a3e",class:"content-wrapper",ref:i=>this.contentWrapper=i},this.renderGeneralSection(),this.renderTooltip(),this.renderOnlineLicenseSection(),this.renderOfflineLicenseSection()),t("div",{key:"6f1ee0a26f667e4a1fb47501225fdb00e322dfaa",class:"cta-wrapper"},t("slot",{key:"669006e3062811debbd965dc7e85e09ad7107713"})))}};a.style=r;export{a as z_myz_card_info};
2
- //# sourceMappingURL=p-02c08dd1.entry.js.map
1
+ import{r as i,c as t,h as e}from"./p-10bb4f4b.js";import{P as n}from"./p-025f494e.js";import{a as s}from"./p-955da62e.js";import"./p-2c886e8b.js";const o=':host{width:100%;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{position:relative;display:grid;width:calc(100% + calc(var(--space-unit) * 2));height:402px;box-sizing:border-box;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 3);border:var(--border-size-small) solid var(--color-primary01);margin-left:calc(-1 * var(--space-unit));background:var(--color-surface01);border-radius:0;box-shadow:0 2px 4px 0 rgb(66 69 72 / 35%)}:host>div>z-icon{position:absolute;top:var(--space-unit);right:var(--space-unit);cursor:pointer;fill:var(--color-primary01)}:host>div>div.cta-wrapper{display:flex;flex-flow:column nowrap;align-self:end;justify-content:space-between}:host>div>div.content-wrapper{position:relative;overflow:hidden;align-self:stretch}:host>div>div.content-wrapper>section{box-sizing:border-box;padding:var(--space-unit) 0;border-bottom:var(--border-size-small) solid var(--color-surface04);color:var(--color-surface05);font-size:14px;line-height:20px}:host>div>div.content-wrapper>section:last-child{border-bottom:none}:host>div>div.content-wrapper>section.info-wrapper{position:relative;overflow:hidden;box-sizing:border-box}:host>div>div.content-wrapper>section.info-wrapper.hidden::after{position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(180deg, rgb(255 0 0 / 0%), rgb(255 0 0 / 0%) 60%, white);content:"";pointer-events:none}:host>div>div.content-wrapper>section>span.license-heading{display:flex;justify-content:space-between}:host>div>div.content-wrapper>section>span.license-heading>span.expired{color:var(--color-secondary02);font-size:12px;font-weight:600}:host>div>div.content-wrapper>section>span.license-heading>span.expiring{color:var(--color-warning01);font-size:12px;font-weight:600}:host>div>div.content-wrapper>z-popover{position:absolute;top:0;left:calc(var(--space-unit) * 4)}';const r=o;const l=class{emitFlipCard(i=false){this.flipCard.emit(i)}constructor(e){i(this,e);this.flipCard=t(this,"flipCard",7);this.data=undefined;this.htmltabindex=0;this.hiddenContent=false;this.tooltip=false;this.emitFlipCard=this.emitFlipCard.bind(this)}componentWillLoad(){this.setStringOrArray()}componentWillUpdate(){this.setStringOrArray()}componentDidRender(){this.handleContentHeight()}handleContentHeight(){if(!this.contentWrapper&&!this.infoWrapper){this.hiddenContent=false;return}if(this.contentWrapper.scrollHeight>this.contentWrapper.offsetHeight||this.infoWrapper.scrollHeight>this.infoWrapper.offsetHeight){const i=this.contentWrapper.offsetHeight-this.onlineLicenseWrapper.offsetHeight-this.offlineLicenseWrapper.offsetHeight;this.infoWrapper.style.height=`${i}px`;this.hiddenContent=true;return}this.hiddenContent=false}setStringOrArray(){if(typeof this.data==="string"){this.cardData=JSON.parse(this.data)}else{this.cardData=this.data}}renderCloseIcon(){return e("z-icon",{name:"multiply-circled-filled",height:18,width:18,onClick:()=>this.emitFlipCard(false),tabindex:this.htmltabindex,onKeyUp:i=>{s(i,this.emitFlipCard,false)}})}renderGeneralSection(){var i,t;const n=(i=this===null||this===void 0?void 0:this.cardData)===null||i===void 0?void 0:i.title;const s=(t=this===null||this===void 0?void 0:this.cardData)===null||t===void 0?void 0:t.description;return e("section",{class:`info-wrapper ${this.hiddenContent?"hidden":""}`,onClick:()=>{if(this.hiddenContent){this.tooltip=!this.tooltip}},ref:i=>this.infoWrapper=i},this.renderAuthor(),this.renderYear(),n,e("br",null),s)}renderAuthor(){var i;const t=(i=this===null||this===void 0?void 0:this.cardData)===null||i===void 0?void 0:i.author;if(!t){return null}return e("span",null,"Autore: ",e("b",null,t),e("br",null))}renderYear(){var i;const t=(i=this===null||this===void 0?void 0:this.cardData)===null||i===void 0?void 0:i.year;if(!t){return null}return e("span",null,"Anno: ",e("b",null,t),e("br",null))}renderTooltip(){if(!this.tooltip){return}if(!this.cardData){return}const{title:i,year:t,author:s,description:o}=this.cardData;return e("z-popover",{position:n.RIGHT,onClick:()=>this.tooltip=false},`${i} ${t} ${s} ${o}`)}setExpirationLicenseMessage(i){if(i==="online"&&this.cardData.onlineLicense.expired||i==="offline"&&this.cardData.offlineLicense.expired){return e("span",{class:"expired"},"SCADUTA")}if(i==="online"&&this.cardData.onlineLicense.expiring||i==="offline"&&this.cardData.offlineLicense.expiring){return e("span",{class:"expiring"},"IN SCADENZA")}}renderOnlineLicenseSection(){var i;if(!((i=this===null||this===void 0?void 0:this.cardData)===null||i===void 0?void 0:i.onlineLicense)){return}return e("section",{ref:i=>this.onlineLicenseWrapper=i},e("span",{class:"license-heading"},e("span",null,"Licenza online"),this.setExpirationLicenseMessage("online")),"Scadenza il ",e("b",null,this.cardData.onlineLicense.expiration),e("br",null))}renderOfflineLicenseSection(){var i;if(!((i=this===null||this===void 0?void 0:this.cardData)===null||i===void 0?void 0:i.offlineLicense)){return}return e("section",{ref:i=>this.offlineLicenseWrapper=i},e("span",{class:"license-heading"},e("span",null,"Licenza offline"),this.setExpirationLicenseMessage("offline")),"Scadenza il ",e("b",null,this.cardData.offlineLicense.expiration),e("br",null),"Installazioni disponibili: ",e("b",null,this.cardData.offlineLicense.installations))}render(){return e("div",{key:"6818de4d54bf54dae4077e338e3022d116f3a81d"},this.renderCloseIcon(),e("div",{key:"97fdb22878992d691245e1aed0c07731a2829001",class:"content-wrapper",ref:i=>this.contentWrapper=i},this.renderGeneralSection(),this.renderTooltip(),this.renderOnlineLicenseSection(),this.renderOfflineLicenseSection()),e("div",{key:"736dbe3cc5c52fbe9a9f856e6e594da1a8870f4f",class:"cta-wrapper"},e("slot",{key:"643bd15773c866215b70104c81257c4ba53f5307"})))}};l.style=r;export{l as z_myz_card_info};
2
+ //# sourceMappingURL=p-4b607fc6.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as e,c as t,h as s,a as c}from"./p-10bb4f4b.js";import{r as i}from"./p-955da62e.js";import{k as a}from"./p-025f494e.js";import"./p-2c886e8b.js";const l='.sc-z-toggle-switch-h{position:relative;display:inline-flex;font-family:var(--font-family-sans);font-weight:var(--font-rg)}label.sc-z-toggle-switch{display:flex;flex-direction:row;align-items:center;cursor:pointer}label.disabled.sc-z-toggle-switch{cursor:default}label.right.sc-z-toggle-switch{flex-direction:row-reverse}label.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{color:var(--color-default-text);letter-spacing:0}label.left.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{margin-right:var(--space-unit)}label.right.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{margin-left:var(--space-unit)}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch{position:relative;top:1px;left:1px;display:flex;width:calc(var(--space-unit) * 4);height:18px;align-items:center;background-color:var(--gray500);border-radius:var(--space-unit);color:var(--gray500);cursor:pointer}label.sc-z-toggle-switch>span.container.disabled.sc-z-toggle-switch,label.sc-z-toggle-switch>span.container.checked.disabled.sc-z-toggle-switch{background-color:var(--color-disabled01);cursor:default}label.sc-z-toggle-switch>span.container.checked.disabled.sc-z-toggle-switch>span.circle.sc-z-toggle-switch>z-icon.sc-z-toggle-switch{fill:var(--color-disabled01)}label.sc-z-toggle-switch>span.container.checked.sc-z-toggle-switch{background-color:var(--color-primary01);fill:var(--color-primary01)}input.sc-z-toggle-switch:focus:focus-visible+label.sc-z-toggle-switch>span.container.sc-z-toggle-switch:not(.disabled){box-shadow:var(--shadow-focus-primary);outline:none}input.sc-z-toggle-switch:focus:focus-visible+label.sc-z-toggle-switch>span.container.disabled.sc-z-toggle-switch{outline:none}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch:not(.disabled):hover{background-color:var(--color-hover-primary);fill:var(--color-hover-primary)}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch>span.circle.sc-z-toggle-switch{position:absolute;top:1px;left:1px;display:flex;width:calc(var(--space-unit) * 2);height:calc(var(--space-unit) * 2);align-items:center;justify-content:center;margin:0;background-color:var(--color-white);border-radius:7px;box-shadow:var(--shadow-1);transition:transform 0.3s ease}label.sc-z-toggle-switch>span.container.checked.sc-z-toggle-switch>span.circle.sc-z-toggle-switch{transform:translateX(calc(100% - 2px))}input[type="checkbox"].sc-z-toggle-switch{position:absolute;z-index:-1;opacity:0;pointer-events:none}';const o=l;const r=class{constructor(s){e(this,s);this.toggleClick=t(this,"toggleClick",7);this.disabled=false;this.labelPosition=a.LEFT;this.checked=false;this.htmlid=`toggle-switch-id-${i()}`}emitToggleClick(){this.toggleClick.emit({id:this.htmlid,checked:this.checked})}handleClick(e){if(this.disabled){return}this.checked=e.target.checked;this.emitToggleClick()}render(){return s(c,{key:"1fcac74eda8db17b3d535d2138ee9637ef7779b5"},s("input",{key:"90d27860c20def96928eb87c9df301d9df1226c0",id:this.htmlid,type:"checkbox",checked:this.checked,disabled:this.disabled,onChange:this.handleClick.bind(this)}),s("label",{key:"be5a0eec29f493ac91c2fafbba54afcfa8f50f50",htmlFor:this.htmlid,class:{[this.labelPosition]:true,disabled:this.disabled}},s("span",{key:"b336633b42383d0aef29ec775e3b18aca42bf096"},s("slot",{key:"9f8d563f0bae08144106f32c1018cbd40b6b5bc6"})),s("span",{key:"176481146a6df0f575fc364fabd2dc2ea1b00b54",class:{container:true,disabled:this.disabled,checked:this.checked}},s("span",{key:"8a1227658fb1fdc68523a3947c7b8f55b63baa89",class:"circle"},this.checked&&s("z-icon",{width:12,height:12,name:"checkmark"})))))}};r.style=o;export{r as z_toggle_switch};
2
+ //# sourceMappingURL=p-4dd8d4e8.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["stylesCss","ZToggleSwitchStyle0","ZToggleSwitch","LabelPosition","LEFT","randomId","emitToggleClick","this","toggleClick","emit","id","htmlid","checked","handleClick","ev","disabled","target","render","h","Host","key","type","onChange","bind","htmlFor","class","labelPosition","container","width","height","name"],"sources":["src/components/buttons/z-toggle-switch/styles.css?tag=z-toggle-switch&encapsulation=scoped","src/components/buttons/z-toggle-switch/index.tsx"],"sourcesContent":[":host {\n position: relative;\n display: inline-flex;\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\nlabel {\n display: flex;\n flex-direction: row;\n align-items: center;\n cursor: pointer;\n}\n\nlabel.disabled {\n cursor: default;\n}\n\nlabel.right {\n flex-direction: row-reverse;\n}\n\nlabel > span:first-child {\n color: var(--color-default-text);\n letter-spacing: 0;\n}\n\nlabel.left > span:first-child {\n margin-right: var(--space-unit);\n}\n\nlabel.right > span:first-child {\n margin-left: var(--space-unit);\n}\n\nlabel > span.container {\n position: relative;\n top: 1px;\n left: 1px;\n display: flex;\n width: calc(var(--space-unit) * 4);\n height: 18px;\n align-items: center;\n background-color: var(--gray500);\n border-radius: var(--space-unit);\n color: var(--gray500);\n cursor: pointer;\n}\n\nlabel > span.container.disabled,\nlabel > span.container.checked.disabled {\n background-color: var(--color-disabled01);\n cursor: default;\n}\n\nlabel > span.container.checked.disabled > span.circle > z-icon {\n fill: var(--color-disabled01);\n}\n\nlabel > span.container.checked {\n background-color: var(--color-primary01);\n fill: var(--color-primary01);\n}\n\ninput:focus:focus-visible + label > span.container:not(.disabled) {\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\ninput:focus:focus-visible + label > span.container.disabled {\n outline: none;\n}\n\nlabel > span.container:not(.disabled):hover {\n background-color: var(--color-hover-primary);\n fill: var(--color-hover-primary);\n}\n\nlabel > span.container > span.circle {\n position: absolute;\n top: 1px;\n left: 1px;\n display: flex;\n width: calc(var(--space-unit) * 2);\n height: calc(var(--space-unit) * 2);\n align-items: center;\n justify-content: center;\n margin: 0;\n background-color: var(--color-white);\n border-radius: 7px;\n box-shadow: var(--shadow-1);\n transition: transform 0.3s ease;\n}\n\nlabel > span.container.checked > span.circle {\n transform: translateX(calc(100% - 2px));\n}\n\ninput[type=\"checkbox\"] {\n position: absolute;\n z-index: -1;\n opacity: 0;\n pointer-events: none;\n}\n","import {Component, Prop, h, Event, EventEmitter, Host} from \"@stencil/core\";\nimport {randomId} from \"../../../utils/utils\";\nimport {LabelPosition} from \"../../../beans\";\n\n@Component({\n tag: \"z-toggle-switch\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZToggleSwitch {\n /** Disabled flag */\n @Prop({reflect: true})\n disabled?: boolean = false;\n\n /** Label position */\n @Prop({reflect: true})\n labelPosition? = LabelPosition.LEFT;\n\n /** Checked state */\n @Prop({mutable: true})\n checked?: boolean = false;\n\n /** HTML id attribute to set to the internal checkbox */\n @Prop()\n htmlid = `toggle-switch-id-${randomId()}`;\n\n /** Toggle click event */\n @Event()\n toggleClick: EventEmitter;\n\n private emitToggleClick(): void {\n this.toggleClick.emit({\n id: this.htmlid,\n checked: this.checked,\n });\n }\n\n private handleClick(ev): void {\n if (this.disabled) {\n return;\n }\n\n this.checked = ev.target.checked;\n this.emitToggleClick();\n }\n\n render(): HTMLZToggleSwitchElement {\n return (\n <Host>\n <input\n id={this.htmlid}\n type=\"checkbox\"\n checked={this.checked}\n disabled={this.disabled}\n onChange={this.handleClick.bind(this)}\n />\n <label\n htmlFor={this.htmlid}\n class={{\n [this.labelPosition]: true,\n disabled: this.disabled,\n }}\n >\n <span>\n <slot />\n </span>\n <span\n class={{\n container: true,\n disabled: this.disabled,\n checked: this.checked,\n }}\n >\n <span class=\"circle\">\n {this.checked && (\n <z-icon\n width={12}\n height={12}\n name=\"checkmark\"\n ></z-icon>\n )}\n </span>\n </span>\n </label>\n </Host>\n );\n }\n}\n"],"mappings":"yJAAA,MAAMA,EAAY,05EAClB,MAAAC,EAAeD,E,MCSFE,EAAa,M,gFAGH,M,mBAIJC,EAAcC,K,aAIX,M,YAIX,oBAAoBC,K,CAMrB,eAAAC,GACNC,KAAKC,YAAYC,KAAK,CACpBC,GAAIH,KAAKI,OACTC,QAASL,KAAKK,S,CAIV,WAAAC,CAAYC,GAClB,GAAIP,KAAKQ,SAAU,CACjB,M,CAGFR,KAAKK,QAAUE,EAAGE,OAAOJ,QACzBL,KAAKD,iB,CAGP,MAAAW,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,4CACHF,EAAA,SAAAE,IAAA,2CACEV,GAAIH,KAAKI,OACTU,KAAK,WACLT,QAASL,KAAKK,QACdG,SAAUR,KAAKQ,SACfO,SAAUf,KAAKM,YAAYU,KAAKhB,QAElCW,EAAA,SAAAE,IAAA,2CACEI,QAASjB,KAAKI,OACdc,MAAO,CACL,CAAClB,KAAKmB,eAAgB,KACtBX,SAAUR,KAAKQ,WAGjBG,EAAA,QAAAE,IAAA,4CACEF,EAAA,QAAAE,IAAA,8CAEFF,EAAA,QAAAE,IAAA,2CACEK,MAAO,CACLE,UAAW,KACXZ,SAAUR,KAAKQ,SACfH,QAASL,KAAKK,UAGhBM,EAAA,QAAAE,IAAA,2CAAMK,MAAM,UACTlB,KAAKK,SACJM,EAAA,UACEU,MAAO,GACPC,OAAQ,GACRC,KAAK,iB"}
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as i,g as a}from"./p-10bb4f4b.js";import{q as s}from"./p-025f494e.js";import{a as o}from"./p-955da62e.js";import{H as r}from"./p-54b0b04e.js";import"./p-2c886e8b.js";const n=":host{width:inherit;height:100%;margin:inherit;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{width:inherit;height:100%;margin:inherit}:host>div>div.background{position:fixed;z-index:998;top:0;right:0;bottom:0;left:0;width:0;height:0}:host>div>div.background.open{width:100%;height:100%}:host>div>div.content-wrapper{position:fixed;z-index:999;bottom:0;left:0;width:inherit;margin:inherit}:host>div>div.content-wrapper>div{margin:calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 0.5) 0 calc(var(--space-unit) * 0.5);border-radius:var(--space-unit) var(--space-unit) 0 0;box-shadow:0 -2px calc(var(--space-unit) * 0.5) 0 rgb(66 69 72 / 40%)}";const c=n;const d=class{constructor(i){t(this,i);this.pocketToggle=e(this,"pocketToggle",7);this.pocketid=undefined;this.status=s.PREVIEW}async open(){this.status=s.OPEN}async close(){this.status=s.CLOSED}emitPocketToggle(t,e){this.pocketToggle.emit({id:t,status:e})}handlePocketHeaderClick(t){if(t.detail.id&&t.detail.id===this.pocketid){switch(this.status){case s.PREVIEW:case s.CLOSED:this.status=s.OPEN;break;case s.OPEN:this.status=s.CLOSED;break}}}handlePocketHeaderPan(t){if(t.detail.id&&t.detail.id===this.pocketid){if(t.detail.direction==="up"){this.status=s.OPEN}else if(t.detail.direction==="down"){this.status=s.CLOSED}}}watchStatusHandler(t){this.emitPocketToggle(this.pocketid,t)}componentWillLoad(){this.emitPocketToggle(this.pocketid,this.status)}handleBackgroundClick(t){if(t.target.dataset.action=="pocketBackground"){this.close()}}render(){return i("div",{key:"e900c7a30cc100691a08e99eef3e75ab09228ac6"},i("div",{key:"789f4dd2b162f4693b4d6d4d0636d6614a69e2a3","data-action":"pocketBackground","data-pocket":this.pocketid,class:`background ${this.status}`,onClick:t=>this.handleBackgroundClick(t)}),i("div",{key:"f53572738d1fc377efafa3f4c9b2b012eb8dcd87",id:this.pocketid,class:"content-wrapper"},i("div",{key:"8bc1cdbc0c8cd10bb978dd4e04da88da183a2a0c"},i("slot",{key:"6ac22e14a792914aca4dca5a7da5bd3999a6dd17"}))))}get hostElement(){return a(this)}static get watchers(){return{status:["watchStatusHandler"]}}};d.style=c;const h=":host{display:block;width:100%;box-sizing:border-box;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>main{overflow:auto;border-right:var(--border-size-small) solid var(--color-surface03);border-left:var(--border-size-small) solid var(--color-surface03);background:var(--color-surface01);scrollbar-width:none}:host>main.preview{max-height:225px;transition:all 200ms ease-in-out, top 200ms ease-in-out}:host>main.open{max-height:calc(100vh - 48px);transition:all 200ms ease-in-out, top 200ms ease-in-out}:host>main.closed{height:0;transition:all 200ms ease-in-out, top 200ms ease-in-out}:host ::-webkit-scrollbar{width:0}@media only screen and (min-width: 768px){:host>main.preview{max-height:157px}}";const l=h;const f=class{constructor(e){t(this,e);this.pocketid=undefined;this.status=s.PREVIEW}handlePocketToggle(t){if(t.detail.id&&t.detail.id===this.pocketid){this.status=t.detail.status}}render(){return i("main",{key:"c93989e78b34be843571bb21bbd26f324ae86456",class:this.status},i("slot",{key:"f4755713e7084a59b91d35456502d0456a2aa339"}))}};f.style=l;const p=":host{display:block;width:100%;box-sizing:border-box;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>header{display:flex;height:36px;flex-flow:row nowrap;align-items:center;justify-content:center;border:var(--border-size-small) solid var(--color-surface03);background:var(--color-surface01);border-radius:var(--space-unit) var(--space-unit) 0 0;cursor:pointer}:host>header:focus{outline:none}:host>header::-moz-focus-inner{border:0}";const b=p;const u=class{emitPocketHeaderClick(){this.pocketHeaderClick.emit({id:this.pocketid})}emitPocketHeaderPan(t){this.pocketHeaderPan.emit({id:this.pocketid,direction:t})}constructor(i){t(this,i);this.pocketHeaderClick=e(this,"pocketHeaderClick",7);this.pocketHeaderPan=e(this,"pocketHeaderPan",7);this.pocketid=undefined;this.emitPocketHeaderClick=this.emitPocketHeaderClick.bind(this)}componentDidLoad(){const t=new r(this.swipeWrap);t.get("pan").set({direction:r.DIRECTION_VERTICAL});t.on("panup",(()=>this.emitPocketHeaderPan("up")));t.on("pandown",(()=>this.emitPocketHeaderPan("down")))}render(){return i("header",{key:"03faf1e1005718b682ebae5e663d880e6b3763a2",role:"button",tabindex:0,onClick:()=>this.emitPocketHeaderClick(),onKeyPress:t=>o(t,this.emitPocketHeaderClick),ref:t=>this.swipeWrap=t},i("slot",{key:"329c89a202e0a5f351c080ed513ce90e873caa75"}))}};u.style=b;export{d as z_pocket,f as z_pocket_body,u as z_pocket_header};
2
- //# sourceMappingURL=p-164b4986.entry.js.map
1
+ import{r as t,c as e,h as i,g as s}from"./p-10bb4f4b.js";import{q as a}from"./p-025f494e.js";import{a as o}from"./p-955da62e.js";import{H as r}from"./p-54b0b04e.js";import"./p-2c886e8b.js";const n=":host{width:inherit;height:100%;margin:inherit;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{width:inherit;height:100%;margin:inherit}:host>div>div.background{position:fixed;z-index:998;top:0;right:0;bottom:0;left:0;width:0;height:0}:host>div>div.background.open{width:100%;height:100%}:host>div>div.content-wrapper{position:fixed;z-index:999;bottom:0;left:0;width:inherit;margin:inherit}:host>div>div.content-wrapper>div{margin:calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 0.5) 0 calc(var(--space-unit) * 0.5);border-radius:var(--space-unit) var(--space-unit) 0 0;box-shadow:0 -2px calc(var(--space-unit) * 0.5) 0 rgb(66 69 72 / 40%)}";const c=n;const d=class{constructor(i){t(this,i);this.pocketToggle=e(this,"pocketToggle",7);this.pocketid=undefined;this.status=a.PREVIEW}async open(){this.status=a.OPEN}async close(){this.status=a.CLOSED}emitPocketToggle(t,e){this.pocketToggle.emit({id:t,status:e})}handlePocketHeaderClick(t){if(t.detail.id&&t.detail.id===this.pocketid){switch(this.status){case a.PREVIEW:case a.CLOSED:this.status=a.OPEN;break;case a.OPEN:this.status=a.CLOSED;break}}}handlePocketHeaderPan(t){if(t.detail.id&&t.detail.id===this.pocketid){if(t.detail.direction==="up"){this.status=a.OPEN}else if(t.detail.direction==="down"){this.status=a.CLOSED}}}watchStatusHandler(t){this.emitPocketToggle(this.pocketid,t)}componentWillLoad(){this.emitPocketToggle(this.pocketid,this.status)}handleBackgroundClick(t){if(t.target.dataset.action=="pocketBackground"){this.close()}}render(){return i("div",{key:"1f4362d03177bb2bfd444088334a59f62421d571"},i("div",{key:"188212c09305eecc4dc7ddf2d7f386bf8c69fed4","data-action":"pocketBackground","data-pocket":this.pocketid,class:`background ${this.status}`,onClick:t=>this.handleBackgroundClick(t)}),i("div",{key:"e7e7ca655263acaaf32e5b957b2be6ff2464a468",id:this.pocketid,class:"content-wrapper"},i("div",{key:"60b7f7651dae196192aa2b2ffee763558bed7845"},i("slot",{key:"09a2f3491ca662949f6ab78f0bab977d3269cc87"}))))}get hostElement(){return s(this)}static get watchers(){return{status:["watchStatusHandler"]}}};d.style=c;const h=":host{display:block;width:100%;box-sizing:border-box;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>main{overflow:auto;border-right:var(--border-size-small) solid var(--color-surface03);border-left:var(--border-size-small) solid var(--color-surface03);background:var(--color-surface01);scrollbar-width:none}:host>main.preview{max-height:225px;transition:all 200ms ease-in-out, top 200ms ease-in-out}:host>main.open{max-height:calc(100vh - 48px);transition:all 200ms ease-in-out, top 200ms ease-in-out}:host>main.closed{height:0;transition:all 200ms ease-in-out, top 200ms ease-in-out}:host ::-webkit-scrollbar{width:0}@media only screen and (min-width: 768px){:host>main.preview{max-height:157px}}";const l=h;const f=class{constructor(e){t(this,e);this.pocketid=undefined;this.status=a.PREVIEW}handlePocketToggle(t){if(t.detail.id&&t.detail.id===this.pocketid){this.status=t.detail.status}}render(){return i("main",{key:"9440ba5927ca7fd3ef12656dacc0bb9ea8312b51",class:this.status},i("slot",{key:"66d68d48f04ae4496d2f73a466f0f5878bdfdde8"}))}};f.style=l;const p=":host{display:block;width:100%;box-sizing:border-box;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>header{display:flex;height:36px;flex-flow:row nowrap;align-items:center;justify-content:center;border:var(--border-size-small) solid var(--color-surface03);background:var(--color-surface01);border-radius:var(--space-unit) var(--space-unit) 0 0;cursor:pointer}:host>header:focus{outline:none}:host>header::-moz-focus-inner{border:0}";const b=p;const u=class{emitPocketHeaderClick(){this.pocketHeaderClick.emit({id:this.pocketid})}emitPocketHeaderPan(t){this.pocketHeaderPan.emit({id:this.pocketid,direction:t})}constructor(i){t(this,i);this.pocketHeaderClick=e(this,"pocketHeaderClick",7);this.pocketHeaderPan=e(this,"pocketHeaderPan",7);this.pocketid=undefined;this.emitPocketHeaderClick=this.emitPocketHeaderClick.bind(this)}componentDidLoad(){const t=new r(this.swipeWrap);t.get("pan").set({direction:r.DIRECTION_VERTICAL});t.on("panup",(()=>this.emitPocketHeaderPan("up")));t.on("pandown",(()=>this.emitPocketHeaderPan("down")))}render(){return i("header",{key:"3dc18f87c3e61e8647eb44a23a26d9298c894fb6",role:"button",tabindex:0,onClick:()=>this.emitPocketHeaderClick(),onKeyPress:t=>o(t,this.emitPocketHeaderClick),ref:t=>this.swipeWrap=t},i("slot",{key:"a7f560d9e9de0bd40384e56747f316dc9b9ec629"}))}};u.style=b;export{d as z_pocket,f as z_pocket_body,u as z_pocket_header};
2
+ //# sourceMappingURL=p-5471bc89.entry.js.map