@zanichelli/albe-web-components 2.44.1 → 2.46.1

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 (262) hide show
  1. package/dist/cjs/{_commonjsHelpers-119ffc74.js → _commonjsHelpers-537d719a.js} +3 -0
  2. package/dist/cjs/{hammer-54230951.js → hammer-4f20813e.js} +1 -1
  3. package/dist/cjs/{icons-05eba7ee.js → icons-30810e62.js} +5 -1
  4. package/dist/cjs/{index-93c4c577.js → index-155b2ec5.js} +27 -10
  5. package/dist/cjs/{index-9651dba8.js → index-1fda0714.js} +1 -1
  6. package/dist/cjs/index.cjs.js +2 -2
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/{utils-23a6dee4.js → utils-4bbd782c.js} +1 -1
  9. package/dist/cjs/web-components-library.cjs.js +2 -2
  10. package/dist/cjs/{z-app-switcher_10.cjs.entry.js → z-app-switcher_11.cjs.entry.js} +34 -16
  11. package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
  12. package/dist/cjs/z-avatar.cjs.entry.js +1 -1
  13. package/dist/cjs/z-button-filter_5.cjs.entry.js +2 -2
  14. package/dist/cjs/z-chip.cjs.entry.js +1 -1
  15. package/dist/cjs/z-combobox.cjs.entry.js +2 -2
  16. package/dist/cjs/z-contextual-menu.cjs.entry.js +1 -1
  17. package/dist/cjs/z-cookiebar.cjs.entry.js +1 -1
  18. package/dist/cjs/z-date-picker.cjs.entry.js +3004 -0
  19. package/dist/cjs/z-file-upload.cjs.entry.js +2 -2
  20. package/dist/cjs/z-file.cjs.entry.js +2 -2
  21. package/dist/cjs/z-footer.cjs.entry.js +1 -1
  22. package/dist/cjs/z-icon-package.cjs.entry.js +1 -1
  23. package/dist/cjs/z-list_3.cjs.entry.js +1 -1
  24. package/dist/cjs/z-menu-dropdown_2.cjs.entry.js +2 -2
  25. package/dist/cjs/z-messages-pocket.cjs.entry.js +1 -1
  26. package/dist/cjs/z-modal-login.cjs.entry.js +1 -1
  27. package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
  28. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
  29. package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
  30. package/dist/cjs/z-myz-card-info.cjs.entry.js +2 -2
  31. package/dist/cjs/z-myz-card_4.cjs.entry.js +1 -1
  32. package/dist/cjs/z-myz-list-item.cjs.entry.js +2 -2
  33. package/dist/cjs/z-myz-topbar.cjs.entry.js +1 -1
  34. package/dist/cjs/z-navigation-tab-link.cjs.entry.js +70 -0
  35. package/dist/cjs/z-navigation-tab.cjs.entry.js +35 -8
  36. package/dist/cjs/z-navigation-tabs.cjs.entry.js +76 -48
  37. package/dist/cjs/z-otp.cjs.entry.js +1 -1
  38. package/dist/cjs/z-pagination-bar.cjs.entry.js +4 -4
  39. package/dist/cjs/z-pocket_3.cjs.entry.js +4 -4
  40. package/dist/cjs/z-popover.cjs.entry.js +4 -4
  41. package/dist/cjs/z-section-title.cjs.entry.js +1 -1
  42. package/dist/cjs/z-slideshow.cjs.entry.js +2 -2
  43. package/dist/cjs/z-status-tag.cjs.entry.js +3 -3
  44. package/dist/cjs/z-table-cell.cjs.entry.js +3 -3
  45. package/dist/cjs/z-table-empty-box.cjs.entry.js +2 -2
  46. package/dist/cjs/z-table-header.cjs.entry.js +4 -4
  47. package/dist/cjs/z-table-row.cjs.entry.js +1 -1
  48. package/dist/cjs/z-table.cjs.entry.js +1 -1
  49. package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
  50. package/dist/cjs/z-toast-notification.cjs.entry.js +3 -3
  51. package/dist/cjs/z-toggle-switch.cjs.entry.js +2 -2
  52. package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
  53. package/dist/collection/beans/index.js +27 -10
  54. package/dist/collection/collection-manifest.json +5 -3
  55. package/dist/collection/components/icons/icons.js +5 -1
  56. package/dist/collection/components/navigation/{z-navigation-tab/styles.css → tabs/navigation-tab.css} +39 -35
  57. package/dist/collection/components/navigation/tabs/z-navigation-tab/index.js +239 -0
  58. package/dist/collection/components/navigation/tabs/z-navigation-tab-link/index.js +271 -0
  59. package/dist/collection/components/navigation/tabs/z-navigation-tabs/index.js +207 -0
  60. package/dist/collection/components/navigation/{z-navigation-tabs → tabs/z-navigation-tabs}/styles.css +11 -10
  61. package/dist/collection/components/z-carousel/index.js +48 -1
  62. package/dist/collection/components/z-date-picker/index.js +143 -0
  63. package/dist/collection/components/z-date-picker/styles.css +515 -0
  64. package/dist/esm/{_commonjsHelpers-8b28c6fa.js → _commonjsHelpers-9943807e.js} +3 -1
  65. package/dist/esm/{hammer-501342a9.js → hammer-c3266b17.js} +1 -1
  66. package/dist/esm/{icons-bceeb196.js → icons-d8a127bf.js} +5 -1
  67. package/dist/esm/{index-023c206a.js → index-22f4a844.js} +28 -11
  68. package/dist/esm/{index-aa3a4feb.js → index-abb47b30.js} +1 -1
  69. package/dist/esm/index.js +2 -2
  70. package/dist/esm/loader.js +2 -2
  71. package/dist/esm/{utils-05b6c600.js → utils-259e2dd9.js} +1 -1
  72. package/dist/esm/web-components-library.js +2 -2
  73. package/dist/esm/{z-app-switcher_10.entry.js → z-app-switcher_11.entry.js} +34 -17
  74. package/dist/esm/z-aria-alert.entry.js +1 -1
  75. package/dist/esm/z-avatar.entry.js +1 -1
  76. package/dist/esm/z-button-filter_5.entry.js +2 -2
  77. package/dist/esm/z-chip.entry.js +1 -1
  78. package/dist/esm/z-combobox.entry.js +2 -2
  79. package/dist/esm/z-contextual-menu.entry.js +1 -1
  80. package/dist/esm/z-cookiebar.entry.js +1 -1
  81. package/dist/esm/z-date-picker.entry.js +3000 -0
  82. package/dist/esm/z-file-upload.entry.js +2 -2
  83. package/dist/esm/z-file.entry.js +2 -2
  84. package/dist/esm/z-footer.entry.js +1 -1
  85. package/dist/esm/z-icon-package.entry.js +1 -1
  86. package/dist/esm/z-list_3.entry.js +1 -1
  87. package/dist/esm/z-menu-dropdown_2.entry.js +2 -2
  88. package/dist/esm/z-messages-pocket.entry.js +1 -1
  89. package/dist/esm/z-modal-login.entry.js +1 -1
  90. package/dist/esm/z-myz-card-alert.entry.js +1 -1
  91. package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
  92. package/dist/esm/z-myz-card-footer.entry.js +1 -1
  93. package/dist/esm/z-myz-card-info.entry.js +2 -2
  94. package/dist/esm/z-myz-card_4.entry.js +1 -1
  95. package/dist/esm/z-myz-list-item.entry.js +2 -2
  96. package/dist/esm/z-myz-topbar.entry.js +1 -1
  97. package/dist/esm/z-navigation-tab-link.entry.js +66 -0
  98. package/dist/esm/z-navigation-tab.entry.js +35 -8
  99. package/dist/esm/z-navigation-tabs.entry.js +76 -48
  100. package/dist/esm/z-otp.entry.js +1 -1
  101. package/dist/esm/z-pagination-bar.entry.js +4 -4
  102. package/dist/esm/z-pocket_3.entry.js +4 -4
  103. package/dist/esm/z-popover.entry.js +4 -4
  104. package/dist/esm/z-section-title.entry.js +1 -1
  105. package/dist/esm/z-slideshow.entry.js +2 -2
  106. package/dist/esm/z-status-tag.entry.js +3 -3
  107. package/dist/esm/z-table-cell.entry.js +3 -3
  108. package/dist/esm/z-table-empty-box.entry.js +2 -2
  109. package/dist/esm/z-table-header.entry.js +4 -4
  110. package/dist/esm/z-table-row.entry.js +1 -1
  111. package/dist/esm/z-table.entry.js +1 -1
  112. package/dist/esm/z-toast-notification-list.entry.js +1 -1
  113. package/dist/esm/z-toast-notification.entry.js +3 -3
  114. package/dist/esm/z-toggle-switch.entry.js +2 -2
  115. package/dist/esm/z-tooltip.entry.js +1 -1
  116. package/dist/types/beans/index.d.ts +18 -4
  117. package/dist/types/components/icons/icons.d.ts +4 -0
  118. package/dist/types/components/navigation/tabs/z-navigation-tab/index.d.ts +48 -0
  119. package/dist/types/components/navigation/tabs/z-navigation-tab-link/index.d.ts +56 -0
  120. package/dist/types/components/navigation/tabs/z-navigation-tabs/index.d.ts +68 -0
  121. package/dist/types/components/z-carousel/index.d.ts +4 -0
  122. package/dist/types/components/z-date-picker/index.d.ts +20 -0
  123. package/dist/types/components.d.ts +198 -15
  124. package/dist/web-components-library/index.esm.js +1 -1
  125. package/dist/web-components-library/{p-2536d492.entry.js → p-0177caf2.entry.js} +1 -1
  126. package/dist/web-components-library/{p-a9a24ffd.entry.js → p-01a23d8c.entry.js} +1 -1
  127. package/dist/web-components-library/{p-5d429427.entry.js → p-02145727.entry.js} +1 -1
  128. package/{www/build/p-98cd95f3.entry.js → dist/web-components-library/p-0b0a358a.entry.js} +1 -1
  129. package/dist/web-components-library/p-0fc6feaf.entry.js +1 -0
  130. package/dist/web-components-library/{p-a8ba7c76.entry.js → p-10a2a9fe.entry.js} +1 -1
  131. package/dist/web-components-library/p-112455b1.js +1 -0
  132. package/dist/web-components-library/{p-ee229819.entry.js → p-157885b1.entry.js} +1 -1
  133. package/dist/web-components-library/p-1b34d655.entry.js +1 -0
  134. package/dist/web-components-library/{p-6b70aaa3.entry.js → p-240561e7.entry.js} +1 -1
  135. package/dist/web-components-library/{p-3247dee9.js → p-286363e2.js} +1 -1
  136. package/dist/web-components-library/p-298d324a.entry.js +1 -0
  137. package/dist/web-components-library/p-2d325b9b.entry.js +1 -0
  138. package/dist/web-components-library/{p-5651167f.entry.js → p-2de00f19.entry.js} +1 -1
  139. package/dist/web-components-library/{p-6deeeeff.entry.js → p-30c0f3f2.entry.js} +1 -1
  140. package/dist/web-components-library/{p-189c9cd3.entry.js → p-35c4d277.entry.js} +1 -1
  141. package/dist/web-components-library/{p-091b489d.entry.js → p-3bc3f32e.entry.js} +1 -1
  142. package/dist/web-components-library/{p-800e9669.entry.js → p-4a360730.entry.js} +1 -1
  143. package/dist/web-components-library/{p-04f7a407.entry.js → p-4c7250a9.entry.js} +1 -1
  144. package/dist/web-components-library/p-4e270984.entry.js +16 -0
  145. package/{www/build/p-26410b9b.entry.js → dist/web-components-library/p-4ef4c8ef.entry.js} +1 -1
  146. package/dist/web-components-library/p-4f64af13.entry.js +1 -0
  147. package/{www/build/p-82048c15.js → dist/web-components-library/p-571e9db9.js} +1 -1
  148. package/dist/web-components-library/{p-ead40844.entry.js → p-58091e1c.entry.js} +1 -1
  149. package/dist/web-components-library/{p-cd0cafe6.entry.js → p-5b2d0ccb.entry.js} +1 -1
  150. package/dist/web-components-library/{p-7bb69f45.entry.js → p-61ba9cc7.entry.js} +1 -1
  151. package/dist/web-components-library/{p-2c8e542b.entry.js → p-64b2b415.entry.js} +1 -1
  152. package/dist/web-components-library/{p-2b551b66.entry.js → p-782d01c1.entry.js} +1 -1
  153. package/dist/web-components-library/{p-bc168412.entry.js → p-7efeb668.entry.js} +1 -1
  154. package/{www/build/p-c3bd10ad.entry.js → dist/web-components-library/p-814d6b43.entry.js} +1 -1
  155. package/dist/web-components-library/{p-3b47835a.entry.js → p-88bc3cf2.entry.js} +1 -1
  156. package/dist/web-components-library/p-904375ec.entry.js +1 -0
  157. package/{www/build/p-3ade3fa4.entry.js → dist/web-components-library/p-9777ec0b.entry.js} +1 -1
  158. package/dist/web-components-library/{p-00265234.entry.js → p-9d279248.entry.js} +1 -1
  159. package/dist/web-components-library/{p-fae6d22e.entry.js → p-a6c68018.entry.js} +1 -1
  160. package/dist/web-components-library/{p-e305e1f8.entry.js → p-b260e143.entry.js} +1 -1
  161. package/dist/web-components-library/{p-94919e28.entry.js → p-c196c340.entry.js} +1 -1
  162. package/dist/web-components-library/{p-329633be.entry.js → p-c3771cc7.entry.js} +1 -1
  163. package/dist/web-components-library/{p-f938f1b0.entry.js → p-c5d6450e.entry.js} +1 -1
  164. package/dist/web-components-library/p-d2da11f4.js +1 -0
  165. package/dist/web-components-library/{p-26572e05.js → p-d34e101f.js} +1 -1
  166. package/dist/web-components-library/{p-9207c9ca.entry.js → p-d4440420.entry.js} +1 -1
  167. package/{www/build/p-33dc73f1.entry.js → dist/web-components-library/p-d502063b.entry.js} +1 -1
  168. package/dist/web-components-library/{p-1d371408.js → p-e43e61ac.js} +1 -1
  169. package/dist/web-components-library/{p-e6f63644.entry.js → p-e4dce41a.entry.js} +1 -1
  170. package/dist/web-components-library/{p-4e7c54ac.entry.js → p-eafa01a1.entry.js} +1 -1
  171. package/dist/web-components-library/p-ec361ccf.entry.js +1 -0
  172. package/dist/web-components-library/p-ef22d940.entry.js +1 -0
  173. package/dist/web-components-library/{p-92f0664e.entry.js → p-feb6ee16.entry.js} +1 -1
  174. package/dist/web-components-library/web-components-library.esm.js +1 -1
  175. package/package.json +2 -1
  176. package/react/components.d.ts +2 -0
  177. package/react/components.js +4 -2
  178. package/react/components.js.map +1 -1
  179. package/www/build/index.esm.js +1 -1
  180. package/www/build/{p-2536d492.entry.js → p-0177caf2.entry.js} +1 -1
  181. package/www/build/{p-a9a24ffd.entry.js → p-01a23d8c.entry.js} +1 -1
  182. package/www/build/{p-5d429427.entry.js → p-02145727.entry.js} +1 -1
  183. package/{dist/web-components-library/p-98cd95f3.entry.js → www/build/p-0b0a358a.entry.js} +1 -1
  184. package/www/build/p-0fc6feaf.entry.js +1 -0
  185. package/www/build/{p-a8ba7c76.entry.js → p-10a2a9fe.entry.js} +1 -1
  186. package/www/build/p-112455b1.js +1 -0
  187. package/www/build/{p-ee229819.entry.js → p-157885b1.entry.js} +1 -1
  188. package/www/build/p-1b34d655.entry.js +1 -0
  189. package/www/build/{p-6b70aaa3.entry.js → p-240561e7.entry.js} +1 -1
  190. package/www/build/{p-3247dee9.js → p-286363e2.js} +1 -1
  191. package/www/build/p-298d324a.entry.js +1 -0
  192. package/www/build/p-2d325b9b.entry.js +1 -0
  193. package/www/build/{p-5651167f.entry.js → p-2de00f19.entry.js} +1 -1
  194. package/www/build/{p-6deeeeff.entry.js → p-30c0f3f2.entry.js} +1 -1
  195. package/www/build/{p-189c9cd3.entry.js → p-35c4d277.entry.js} +1 -1
  196. package/www/build/{p-091b489d.entry.js → p-3bc3f32e.entry.js} +1 -1
  197. package/www/build/{p-800e9669.entry.js → p-4a360730.entry.js} +1 -1
  198. package/www/build/{p-04f7a407.entry.js → p-4c7250a9.entry.js} +1 -1
  199. package/www/build/p-4e270984.entry.js +16 -0
  200. package/{dist/web-components-library/p-26410b9b.entry.js → www/build/p-4ef4c8ef.entry.js} +1 -1
  201. package/www/build/p-4f64af13.entry.js +1 -0
  202. package/www/build/p-53add5a8.js +1 -0
  203. package/{dist/web-components-library/p-82048c15.js → www/build/p-571e9db9.js} +1 -1
  204. package/www/build/{p-ead40844.entry.js → p-58091e1c.entry.js} +1 -1
  205. package/www/build/{p-cd0cafe6.entry.js → p-5b2d0ccb.entry.js} +1 -1
  206. package/www/build/{p-7bb69f45.entry.js → p-61ba9cc7.entry.js} +1 -1
  207. package/www/build/{p-2c8e542b.entry.js → p-64b2b415.entry.js} +1 -1
  208. package/www/build/{p-2b551b66.entry.js → p-782d01c1.entry.js} +1 -1
  209. package/www/build/{p-bc168412.entry.js → p-7efeb668.entry.js} +1 -1
  210. package/{dist/web-components-library/p-c3bd10ad.entry.js → www/build/p-814d6b43.entry.js} +1 -1
  211. package/www/build/p-88b56b6e.css +1 -0
  212. package/www/build/{p-3b47835a.entry.js → p-88bc3cf2.entry.js} +1 -1
  213. package/www/build/p-904375ec.entry.js +1 -0
  214. package/{dist/web-components-library/p-3ade3fa4.entry.js → www/build/p-9777ec0b.entry.js} +1 -1
  215. package/www/build/{p-00265234.entry.js → p-9d279248.entry.js} +1 -1
  216. package/www/build/{p-fae6d22e.entry.js → p-a6c68018.entry.js} +1 -1
  217. package/www/build/{p-e305e1f8.entry.js → p-b260e143.entry.js} +1 -1
  218. package/www/build/{p-94919e28.entry.js → p-c196c340.entry.js} +1 -1
  219. package/www/build/{p-329633be.entry.js → p-c3771cc7.entry.js} +1 -1
  220. package/www/build/{p-f938f1b0.entry.js → p-c5d6450e.entry.js} +1 -1
  221. package/www/build/p-d2da11f4.js +1 -0
  222. package/www/build/{p-26572e05.js → p-d34e101f.js} +1 -1
  223. package/www/build/{p-9207c9ca.entry.js → p-d4440420.entry.js} +1 -1
  224. package/{dist/web-components-library/p-33dc73f1.entry.js → www/build/p-d502063b.entry.js} +1 -1
  225. package/www/build/{p-1d371408.js → p-e43e61ac.js} +1 -1
  226. package/www/build/{p-e6f63644.entry.js → p-e4dce41a.entry.js} +1 -1
  227. package/www/build/{p-4e7c54ac.entry.js → p-eafa01a1.entry.js} +1 -1
  228. package/www/build/p-ec361ccf.entry.js +1 -0
  229. package/www/build/p-ef22d940.entry.js +1 -0
  230. package/www/build/{p-92f0664e.entry.js → p-feb6ee16.entry.js} +1 -1
  231. package/www/build/web-components-library.esm.js +1 -1
  232. package/www/index.html +61 -16
  233. package/CHANGELOG.md +0 -1486
  234. package/dist/cjs/z-ghost-loading.cjs.entry.js +0 -19
  235. package/dist/collection/components/navigation/z-navigation-tab/index.js +0 -151
  236. package/dist/collection/components/navigation/z-navigation-tabs/index.js +0 -179
  237. package/dist/esm/z-ghost-loading.entry.js +0 -15
  238. package/dist/types/components/navigation/z-navigation-tab/index.d.ts +0 -16
  239. package/dist/types/components/navigation/z-navigation-tabs/index.d.ts +0 -32
  240. package/dist/web-components-library/p-1242e682.entry.js +0 -1
  241. package/dist/web-components-library/p-3d99e2b1.entry.js +0 -1
  242. package/dist/web-components-library/p-5300e675.entry.js +0 -1
  243. package/dist/web-components-library/p-5789bbe7.entry.js +0 -1
  244. package/dist/web-components-library/p-5b5d269c.js +0 -1
  245. package/dist/web-components-library/p-5e41c6c2.entry.js +0 -1
  246. package/dist/web-components-library/p-99e53bd5.entry.js +0 -1
  247. package/dist/web-components-library/p-b68038b5.js +0 -1
  248. package/dist/web-components-library/p-b9d7caa1.entry.js +0 -1
  249. package/dist/web-components-library/p-e98bb01e.entry.js +0 -1
  250. package/src-react/index.ts +0 -1
  251. package/www/build/p-1242e682.entry.js +0 -1
  252. package/www/build/p-3d99e2b1.entry.js +0 -1
  253. package/www/build/p-5300e675.entry.js +0 -1
  254. package/www/build/p-5789bbe7.entry.js +0 -1
  255. package/www/build/p-5b5d269c.js +0 -1
  256. package/www/build/p-5e41c6c2.entry.js +0 -1
  257. package/www/build/p-99e53bd5.entry.js +0 -1
  258. package/www/build/p-b68038b5.js +0 -1
  259. package/www/build/p-b9d7caa1.entry.js +0 -1
  260. package/www/build/p-d96e3b44.js +0 -129
  261. package/www/build/p-e98bb01e.entry.js +0 -1
  262. package/www/build/p-fcff1237.css +0 -812
@@ -0,0 +1,207 @@
1
+ import { Component, Prop, h, Listen, Element, State, Watch, Host } from '@stencil/core';
2
+ import { NavigationTabsSizes, NavigationTabsOrientations } from '../../../../beans';
3
+ /**
4
+ * Navigation tabs component.
5
+ * @slot - Main slot. Use `z-navigation-tab` or `z-navigation-tab-link` components as children.
6
+ */
7
+ export class ZNavigationTabs {
8
+ constructor() {
9
+ /**
10
+ * Navigation tabs orientation.
11
+ */
12
+ this.orientation = NavigationTabsOrientations.horizontal;
13
+ /**
14
+ * Navigation tabs size.
15
+ */
16
+ this.size = NavigationTabsSizes.big;
17
+ }
18
+ /**
19
+ * Getter for the direction to check based on current orientation.
20
+ */
21
+ get direction() {
22
+ return this.orientation == NavigationTabsOrientations.horizontal ? 'Left' : 'Top';
23
+ }
24
+ /**
25
+ * Getter for the dimension to check based on current orientation.
26
+ */
27
+ get dimension() {
28
+ return this.orientation == NavigationTabsOrientations.horizontal ? 'Width' : 'Height';
29
+ }
30
+ /**
31
+ * Set the `size` prop to all `z-navigation-tab` children.
32
+ */
33
+ setChildrenSize() {
34
+ const children = Array.from(this.host.children);
35
+ children.forEach((child) => {
36
+ child.setAttribute('size', this.size);
37
+ });
38
+ }
39
+ /**
40
+ * Set the `orientation` prop to all `z-navigation-tab` children.
41
+ */
42
+ setChildrenOrientation() {
43
+ const children = Array.from(this.host.children);
44
+ children.forEach((child) => {
45
+ child.setAttribute('orientation', this.orientation);
46
+ });
47
+ }
48
+ /**
49
+ * Check if the navigation buttons are needed on window resize.
50
+ */
51
+ checkScrollVisible() {
52
+ if (!this.tabsNav) {
53
+ return;
54
+ }
55
+ this.canNavigate = this.tabsNav[`scroll${this.dimension}`] > this.tabsNav[`client${this.dimension}`];
56
+ }
57
+ /**
58
+ * Check if navigation buttons can be enabled for each direction.
59
+ */
60
+ checkScrollEnabled() {
61
+ if (!this.tabsNav) {
62
+ return;
63
+ }
64
+ this.canNavigateNext = (this.tabsNav[`scroll${this.direction}`] + this.tabsNav[`client${this.dimension}`]) <
65
+ this.tabsNav[`scroll${this.dimension}`];
66
+ this.canNavigatePrev = this.tabsNav[`scroll${this.direction}`] > 0;
67
+ }
68
+ /**
69
+ * Listen for child tab selection.
70
+ * @param {CustomEvent} event `selected` event triggered by a child tab
71
+ */
72
+ onTabSelected(event) {
73
+ const tab = event.target;
74
+ const children = Array.from(this.host.children);
75
+ children.forEach((child) => {
76
+ if (child !== tab) {
77
+ child.removeAttribute('selected');
78
+ }
79
+ });
80
+ }
81
+ /**
82
+ * Scroll the navigation bar half of its size backward.
83
+ */
84
+ navigateBackwards() {
85
+ const safeScrollAreaSize = parseFloat(getComputedStyle(this.host).getPropertyValue('--safe-scroll-area'));
86
+ this.tabsNav.scrollBy({
87
+ [this.direction.toLowerCase()]: 0 -
88
+ (this.tabsNav[`client${this.dimension}`] / 2) -
89
+ safeScrollAreaSize,
90
+ behavior: 'smooth',
91
+ });
92
+ }
93
+ /**
94
+ * Scroll the navigation bar half of its size forward.
95
+ */
96
+ navigateForward() {
97
+ const safeScrollAreaSize = parseFloat(getComputedStyle(this.host).getPropertyValue('--safe-scroll-area'));
98
+ this.tabsNav.scrollBy({
99
+ [this.direction.toLowerCase()]: this.tabsNav[`scroll${this.direction}`] +
100
+ (this.tabsNav[`client${this.dimension}`] / 2) +
101
+ safeScrollAreaSize,
102
+ behavior: 'smooth',
103
+ });
104
+ }
105
+ componentDidRender() {
106
+ this.setChildrenSize();
107
+ this.setChildrenOrientation();
108
+ this.checkScrollVisible();
109
+ }
110
+ render() {
111
+ return h(Host, { class: {
112
+ 'interactive-2': this.size === NavigationTabsSizes.small,
113
+ 'interactive-1': this.size !== NavigationTabsSizes.small
114
+ }, scrollable: this.canNavigate },
115
+ this.canNavigate && h("button", { class: "navigation-button", onClick: this.navigateBackwards.bind(this), tabindex: "-1", disabled: !this.canNavigatePrev },
116
+ h("z-icon", { name: this.orientation == NavigationTabsOrientations.horizontal ? 'chevron-left' : 'chevron-up', width: 16, height: 16 })),
117
+ h("nav", { role: "tablist", ref: (el) => this.tabsNav = el !== null && el !== void 0 ? el : this.tabsNav, onScroll: this.checkScrollEnabled.bind(this) },
118
+ h("slot", null)),
119
+ this.canNavigate && h("button", { class: "navigation-button", onClick: this.navigateForward.bind(this), tabindex: "-1", disabled: !this.canNavigateNext },
120
+ h("z-icon", { name: this.orientation == NavigationTabsOrientations.horizontal ? 'chevron-right' : 'chevron-down', width: 16, height: 16 })));
121
+ }
122
+ static get is() { return "z-navigation-tabs"; }
123
+ static get encapsulation() { return "shadow"; }
124
+ static get originalStyleUrls() { return {
125
+ "$": ["styles.css"]
126
+ }; }
127
+ static get styleUrls() { return {
128
+ "$": ["styles.css"]
129
+ }; }
130
+ static get properties() { return {
131
+ "orientation": {
132
+ "type": "string",
133
+ "mutable": false,
134
+ "complexType": {
135
+ "original": "NavigationTabsOrientation",
136
+ "resolved": "\"horizontal\" | \"vertical\"",
137
+ "references": {
138
+ "NavigationTabsOrientation": {
139
+ "location": "import",
140
+ "path": "../../../../beans"
141
+ }
142
+ }
143
+ },
144
+ "required": false,
145
+ "optional": true,
146
+ "docs": {
147
+ "tags": [],
148
+ "text": "Navigation tabs orientation."
149
+ },
150
+ "attribute": "orientation",
151
+ "reflect": true,
152
+ "defaultValue": "NavigationTabsOrientations.horizontal"
153
+ },
154
+ "size": {
155
+ "type": "string",
156
+ "mutable": false,
157
+ "complexType": {
158
+ "original": "NavigationTabsSize",
159
+ "resolved": "\"big\" | \"small\"",
160
+ "references": {
161
+ "NavigationTabsSize": {
162
+ "location": "import",
163
+ "path": "../../../../beans"
164
+ }
165
+ }
166
+ },
167
+ "required": false,
168
+ "optional": true,
169
+ "docs": {
170
+ "tags": [],
171
+ "text": "Navigation tabs size."
172
+ },
173
+ "attribute": "size",
174
+ "reflect": true,
175
+ "defaultValue": "NavigationTabsSizes.big"
176
+ }
177
+ }; }
178
+ static get states() { return {
179
+ "canNavigate": {},
180
+ "canNavigatePrev": {},
181
+ "canNavigateNext": {}
182
+ }; }
183
+ static get elementRef() { return "host"; }
184
+ static get watchers() { return [{
185
+ "propName": "size",
186
+ "methodName": "setChildrenSize"
187
+ }, {
188
+ "propName": "orientation",
189
+ "methodName": "setChildrenOrientation"
190
+ }, {
191
+ "propName": "canNavigate",
192
+ "methodName": "checkScrollEnabled"
193
+ }]; }
194
+ static get listeners() { return [{
195
+ "name": "resize",
196
+ "method": "checkScrollVisible",
197
+ "target": "window",
198
+ "capture": false,
199
+ "passive": true
200
+ }, {
201
+ "name": "selected",
202
+ "method": "onTabSelected",
203
+ "target": undefined,
204
+ "capture": false,
205
+ "passive": false
206
+ }]; }
207
+ }
@@ -23,7 +23,7 @@
23
23
  display: none;
24
24
  }
25
25
 
26
- button.navigation {
26
+ .navigation-button {
27
27
  position: absolute;
28
28
  display: flex;
29
29
  align-items: center;
@@ -39,12 +39,12 @@ button.navigation {
39
39
  z-index: 1;
40
40
  }
41
41
 
42
- button.navigation:focus {
42
+ .navigation-button:focus {
43
43
  fill: var(--color-primary01);
44
44
  box-shadow: var(--shadow-focus-primary);
45
45
  }
46
46
 
47
- button.navigation:disabled {
47
+ .navigation-button:disabled {
48
48
  display: none;
49
49
  }
50
50
 
@@ -65,19 +65,19 @@ nav {
65
65
  width: 100%;
66
66
  }
67
67
 
68
- :host([orientation='horizontal']) button.navigation {
68
+ :host([orientation='horizontal']) .navigation-button {
69
69
  top: 0;
70
70
  height: 100%;
71
71
  width: calc((var(--space-unit) * 4) + var(--safe-scroll-area));
72
72
  }
73
73
 
74
- :host([orientation='horizontal']) button.navigation:first-child {
74
+ :host([orientation='horizontal']) .navigation-button:first-child {
75
75
  left: 0;
76
76
  padding-left: var(--safe-scroll-area);
77
77
  box-shadow: 5px 0px var(--safe-scroll-area) var(--negative-safe-scroll-area) rgba(66, 69, 72, 0.40);
78
78
  }
79
79
 
80
- :host([orientation='horizontal']) button.navigation:last-child {
80
+ :host([orientation='horizontal']) .navigation-button:last-child {
81
81
  right: 0;
82
82
  padding-right: 4px;
83
83
  box-shadow: -5px 0px var(--safe-scroll-area) var(--negative-safe-scroll-area) rgba(66, 69, 72, 0.40);
@@ -86,6 +86,7 @@ nav {
86
86
  /* Orientation vertical */
87
87
  :host([orientation='vertical']) {
88
88
  flex-direction: column;
89
+ width: fit-content;
89
90
  }
90
91
 
91
92
  :host([orientation='vertical']) nav {
@@ -94,24 +95,24 @@ nav {
94
95
  height: 100%;
95
96
  }
96
97
 
97
- :host([orientation='vertical']) button.navigation {
98
+ :host([orientation='vertical']) .navigation-button {
98
99
  left: 0;
99
100
  width: 100%;
100
101
  height: calc((var(--space-unit) * 4) + var(--safe-scroll-area));
101
102
  }
102
103
 
103
- :host([orientation='vertical']) button.navigation:first-child {
104
+ :host([orientation='vertical']) .navigation-button:first-child {
104
105
  top: 0;
105
106
  padding-top: var(--safe-scroll-area);
106
107
  box-shadow: 0px 5px var(--safe-scroll-area) var(--negative-safe-scroll-area) rgba(66, 69, 72, 0.40);
107
108
  }
108
109
 
109
- :host([orientation='vertical']) button.navigation:last-child {
110
+ :host([orientation='vertical']) .navigation-button:last-child {
110
111
  bottom: 0;
111
112
  padding-bottom: var(--safe-scroll-area);
112
113
  box-shadow: 0px -5px var(--safe-scroll-area) var(--negative-safe-scroll-area) rgba(66, 69, 72, 0.40);
113
114
  }
114
115
 
115
- :host([size='small'][orientation='vertical']) button.navigation {
116
+ :host([size='small'][orientation='vertical']) .navigation-button {
116
117
  height: calc(var(--space-unit) * 4);
117
118
  }
@@ -1,11 +1,21 @@
1
- import { Component, h } from "@stencil/core";
1
+ import { Component, h, Prop } from "@stencil/core";
2
2
  /**
3
3
  * ZCarousel component.
4
4
  * @cssprop --z-carousel-gutter - The gutter between items.
5
5
  * @slot - carousel items. use `<li>` elements inside this slot as it is wrapped inside an `<ul>`
6
6
  */
7
7
  export class ZCarousel {
8
+ constructor() {
9
+ /** sets the height of z-carousel ghost loading, this prop is mandatory when isloading is set to true, as otherwise the component won't show. */
10
+ this.ghostloadingheight = "100";
11
+ }
8
12
  render() {
13
+ if (this.isloading) {
14
+ return (h("div", { style: { height: `${this.ghostloadingheight}px` } },
15
+ h("z-ghost-loading", null),
16
+ h("div", { style: { display: "none" } },
17
+ h("slot", null))));
18
+ }
9
19
  return (h("ul", { class: "z-carousel-items-container" },
10
20
  h("slot", null)));
11
21
  }
@@ -16,4 +26,41 @@ export class ZCarousel {
16
26
  static get styleUrls() { return {
17
27
  "$": ["styles.css"]
18
28
  }; }
29
+ static get properties() { return {
30
+ "isloading": {
31
+ "type": "boolean",
32
+ "mutable": false,
33
+ "complexType": {
34
+ "original": "boolean",
35
+ "resolved": "boolean",
36
+ "references": {}
37
+ },
38
+ "required": false,
39
+ "optional": false,
40
+ "docs": {
41
+ "tags": [],
42
+ "text": "sets whether the z-carousel is on loading state"
43
+ },
44
+ "attribute": "isloading",
45
+ "reflect": false
46
+ },
47
+ "ghostloadingheight": {
48
+ "type": "string",
49
+ "mutable": false,
50
+ "complexType": {
51
+ "original": "string",
52
+ "resolved": "string",
53
+ "references": {}
54
+ },
55
+ "required": false,
56
+ "optional": false,
57
+ "docs": {
58
+ "tags": [],
59
+ "text": "sets the height of z-carousel ghost loading, this prop is mandatory when isloading is set to true, as otherwise the component won't show."
60
+ },
61
+ "attribute": "ghostloadingheight",
62
+ "reflect": false,
63
+ "defaultValue": "\"100\""
64
+ }
65
+ }; }
19
66
  }
@@ -0,0 +1,143 @@
1
+ import { Component, Prop, Element, h, Event, State, } from "@stencil/core";
2
+ import flatpickr from "flatpickr";
3
+ import { Italian } from "flatpickr/dist/l10n/it.js";
4
+ import monthSelectPlugin from "flatpickr/dist/plugins/monthSelect";
5
+ import classNames from "classnames";
6
+ import { ZDatePickerMode, ZDatePickerModeValues, ZDatePickerPosition, } from "../../beans";
7
+ export class ZDatePicker {
8
+ constructor() {
9
+ /** [Optional] datepicker mode: date, datetime, only months */
10
+ this.mode = ZDatePickerMode.date;
11
+ this.flatpickrPosition = ZDatePickerPosition.bottom;
12
+ }
13
+ emitDateSelect(date) {
14
+ this.dateSelect.emit(date);
15
+ }
16
+ componentWillLoad() {
17
+ let customToggle = this.element.querySelector("[slot=toggle]");
18
+ this.hasChildren = !!customToggle;
19
+ this.hasChildren && customToggle.setAttribute("data-toggle", "data-toggle");
20
+ }
21
+ componentDidLoad() {
22
+ flatpickr(`.${this.datepickerid}`, {
23
+ appendTo: this.element.children[0],
24
+ enableTime: this.mode === ZDatePickerMode.dateTime,
25
+ locale: Italian,
26
+ dateFormat: this.mode === ZDatePickerMode.dateTime ? "d-m-Y - H:i" : "d-m-Y",
27
+ ariaDateFormat: this.mode === ZDatePickerMode.months ? "F Y" : "d F Y",
28
+ minuteIncrement: 1,
29
+ time_24hr: true,
30
+ onChange: (_selectedDates, dateStr) => {
31
+ this.emitDateSelect(dateStr);
32
+ },
33
+ wrap: this.hasChildren,
34
+ plugins: this.mode === ZDatePickerMode.months && [
35
+ monthSelectPlugin({
36
+ dateFormat: "m-Y",
37
+ altFormat: "m-Y",
38
+ }),
39
+ ],
40
+ });
41
+ this.element.querySelectorAll(".flatpickr-weekday").forEach((element) => {
42
+ element.innerHTML = element.innerHTML.trim().charAt(0);
43
+ });
44
+ }
45
+ setFlatpickrPosition() {
46
+ const toggleHeight = this.element.children[0].clientHeight;
47
+ this.element.style.setProperty("--toggle-height", `${toggleHeight}px`);
48
+ const flatpickrHeight = this.mode === ZDatePickerMode.dateTime
49
+ ? ZDatePickerModeValues.DATETIME
50
+ : this.mode === ZDatePickerMode.months
51
+ ? ZDatePickerModeValues.MONTHS
52
+ : ZDatePickerModeValues.DATE;
53
+ const bottom = this.element.getBoundingClientRect().bottom;
54
+ const overflowBottom = bottom + flatpickrHeight > window.innerHeight;
55
+ const overflowTop = bottom - flatpickrHeight - toggleHeight < 0;
56
+ if (!overflowTop && overflowBottom) {
57
+ this.flatpickrPosition = ZDatePickerPosition.top;
58
+ }
59
+ else {
60
+ this.flatpickrPosition = ZDatePickerPosition.bottom;
61
+ }
62
+ }
63
+ renderSlottedContent() {
64
+ return (h("div", null,
65
+ h("input", { class: "hidden-input", "data-input": true }),
66
+ h("slot", { name: "toggle" })));
67
+ }
68
+ renderZInput() {
69
+ return (h("z-input", { class: classNames(this.datepickerid), type: "text", name: "datepicker", icon: "event", hasmessage: false }));
70
+ }
71
+ render() {
72
+ return (h("div", { class: classNames("flatpickr-toggle-container", this.hasChildren && this.datepickerid, this.flatpickrPosition, this.mode), onClick: () => this.setFlatpickrPosition() }, this.hasChildren ? this.renderSlottedContent() : this.renderZInput()));
73
+ }
74
+ static get is() { return "z-date-picker"; }
75
+ static get originalStyleUrls() { return {
76
+ "$": ["styles.css"]
77
+ }; }
78
+ static get styleUrls() { return {
79
+ "$": ["styles.css"]
80
+ }; }
81
+ static get properties() { return {
82
+ "datepickerid": {
83
+ "type": "string",
84
+ "mutable": false,
85
+ "complexType": {
86
+ "original": "string",
87
+ "resolved": "string",
88
+ "references": {}
89
+ },
90
+ "required": false,
91
+ "optional": false,
92
+ "docs": {
93
+ "tags": [],
94
+ "text": "unique id"
95
+ },
96
+ "attribute": "datepickerid",
97
+ "reflect": false
98
+ },
99
+ "mode": {
100
+ "type": "string",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "ZDatePickerMode",
104
+ "resolved": "ZDatePickerMode.date | ZDatePickerMode.dateTime | ZDatePickerMode.months",
105
+ "references": {
106
+ "ZDatePickerMode": {
107
+ "location": "import",
108
+ "path": "../../beans"
109
+ }
110
+ }
111
+ },
112
+ "required": false,
113
+ "optional": false,
114
+ "docs": {
115
+ "tags": [],
116
+ "text": "[Optional] datepicker mode: date, datetime, only months"
117
+ },
118
+ "attribute": "mode",
119
+ "reflect": false,
120
+ "defaultValue": "ZDatePickerMode.date"
121
+ }
122
+ }; }
123
+ static get states() { return {
124
+ "flatpickrPosition": {}
125
+ }; }
126
+ static get events() { return [{
127
+ "method": "dateSelect",
128
+ "name": "dateSelect",
129
+ "bubbles": true,
130
+ "cancelable": true,
131
+ "composed": true,
132
+ "docs": {
133
+ "tags": [],
134
+ "text": "emitted when date changes, returns selected date"
135
+ },
136
+ "complexType": {
137
+ "original": "any",
138
+ "resolved": "any",
139
+ "references": {}
140
+ }
141
+ }]; }
142
+ static get elementRef() { return "element"; }
143
+ }