@zanichelli/albe-web-components 2.37.0 → 2.38.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 (240) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cjs/{index-73c33cf4.js → index-dcab1bda.js} +5 -0
  3. package/dist/cjs/index.cjs.js +2 -2
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{utils-95a9a879.js → utils-971854fc.js} +1 -1
  6. package/dist/cjs/web-components-library.cjs.js +1 -1
  7. package/dist/cjs/z-app-switcher.cjs.entry.js +1 -1
  8. package/dist/cjs/z-app-topbar.cjs.entry.js +1 -1
  9. package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
  10. package/dist/cjs/z-avatar.cjs.entry.js +1 -1
  11. package/dist/cjs/z-body_2.cjs.entry.js +40 -0
  12. package/dist/cjs/z-button-filter_5.cjs.entry.js +2 -2
  13. package/dist/cjs/z-button.cjs.entry.js +39 -0
  14. package/dist/cjs/z-card.cjs.entry.js +69 -0
  15. package/dist/cjs/z-carousel.cjs.entry.js +19 -0
  16. package/dist/cjs/z-chip.cjs.entry.js +15 -5
  17. package/dist/cjs/z-combobox.cjs.entry.js +2 -2
  18. package/dist/cjs/z-contextual-menu.cjs.entry.js +1 -1
  19. package/dist/cjs/z-cookiebar.cjs.entry.js +1 -1
  20. package/dist/cjs/z-divider.cjs.entry.js +1 -1
  21. package/dist/cjs/z-footer.cjs.entry.js +1 -1
  22. package/dist/cjs/z-icon.cjs.entry.js +28 -0
  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-tabs.cjs.entry.js +1 -1
  35. package/dist/cjs/z-notification.cjs.entry.js +1 -1
  36. package/dist/cjs/z-otp.cjs.entry.js +1 -1
  37. package/dist/cjs/z-pagination-bar.cjs.entry.js +2 -2
  38. package/dist/cjs/z-pocket_3.cjs.entry.js +2 -2
  39. package/dist/cjs/z-popover.cjs.entry.js +125 -0
  40. package/dist/cjs/z-slideshow.cjs.entry.js +2 -2
  41. package/dist/cjs/z-status-tag.cjs.entry.js +1 -1
  42. package/dist/cjs/z-table-body.cjs.entry.js +24 -0
  43. package/dist/cjs/z-table-cell.cjs.entry.js +36 -0
  44. package/dist/cjs/z-table-empty-box.cjs.entry.js +32 -0
  45. package/dist/cjs/z-table-head.cjs.entry.js +23 -0
  46. package/dist/cjs/z-table-header-row.cjs.entry.js +22 -0
  47. package/dist/cjs/z-table-header.cjs.entry.js +88 -0
  48. package/dist/cjs/z-table-row.cjs.entry.js +43 -0
  49. package/dist/cjs/z-table-sticky-footer.cjs.entry.js +19 -0
  50. package/dist/cjs/z-table.cjs.entry.js +82 -0
  51. package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
  52. package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
  53. package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
  54. package/dist/collection/beans/index.js +5 -0
  55. package/dist/collection/collection-manifest.json +1 -0
  56. package/dist/collection/components/buttons/z-chip/index.js +78 -7
  57. package/dist/collection/components/buttons/z-chip/styles.css +66 -0
  58. package/dist/collection/components/z-carousel/index.js +19 -0
  59. package/dist/collection/components/z-carousel/styles.css +27 -0
  60. package/dist/esm/{index-a4f73ed9.js → index-6b86a3f1.js} +6 -1
  61. package/dist/esm/index.js +2 -2
  62. package/dist/esm/loader.js +1 -1
  63. package/dist/esm/{utils-7032aa6d.js → utils-351595e0.js} +2 -2
  64. package/dist/esm/web-components-library.js +1 -1
  65. package/dist/esm/z-app-switcher.entry.js +1 -1
  66. package/dist/esm/z-app-topbar.entry.js +1 -1
  67. package/dist/esm/z-aria-alert.entry.js +1 -1
  68. package/dist/esm/z-avatar.entry.js +1 -1
  69. package/dist/esm/z-body_2.entry.js +35 -0
  70. package/dist/esm/z-button-filter_5.entry.js +2 -2
  71. package/dist/esm/z-button.entry.js +35 -0
  72. package/dist/esm/z-card.entry.js +65 -0
  73. package/dist/esm/z-carousel.entry.js +15 -0
  74. package/dist/esm/z-chip.entry.js +16 -6
  75. package/dist/esm/z-combobox.entry.js +2 -2
  76. package/dist/esm/z-contextual-menu.entry.js +1 -1
  77. package/dist/esm/z-cookiebar.entry.js +1 -1
  78. package/dist/esm/z-divider.entry.js +1 -1
  79. package/dist/esm/z-footer.entry.js +1 -1
  80. package/dist/esm/z-icon.entry.js +24 -0
  81. package/dist/esm/z-list_3.entry.js +1 -1
  82. package/dist/esm/z-menu-dropdown_2.entry.js +2 -2
  83. package/dist/esm/z-messages-pocket.entry.js +1 -1
  84. package/dist/esm/z-modal-login.entry.js +1 -1
  85. package/dist/esm/z-myz-card-alert.entry.js +1 -1
  86. package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
  87. package/dist/esm/z-myz-card-footer.entry.js +1 -1
  88. package/dist/esm/z-myz-card-info.entry.js +2 -2
  89. package/dist/esm/z-myz-card_4.entry.js +1 -1
  90. package/dist/esm/z-myz-list-item.entry.js +2 -2
  91. package/dist/esm/z-myz-topbar.entry.js +1 -1
  92. package/dist/esm/z-navigation-tabs.entry.js +1 -1
  93. package/dist/esm/z-notification.entry.js +1 -1
  94. package/dist/esm/z-otp.entry.js +1 -1
  95. package/dist/esm/z-pagination-bar.entry.js +2 -2
  96. package/dist/esm/z-pocket_3.entry.js +2 -2
  97. package/dist/esm/z-popover.entry.js +121 -0
  98. package/dist/esm/z-slideshow.entry.js +2 -2
  99. package/dist/esm/z-status-tag.entry.js +1 -1
  100. package/dist/esm/z-table-body.entry.js +20 -0
  101. package/dist/esm/z-table-cell.entry.js +32 -0
  102. package/dist/esm/z-table-empty-box.entry.js +28 -0
  103. package/dist/esm/z-table-head.entry.js +19 -0
  104. package/dist/esm/z-table-header-row.entry.js +18 -0
  105. package/dist/esm/z-table-header.entry.js +84 -0
  106. package/dist/esm/z-table-row.entry.js +39 -0
  107. package/dist/esm/z-table-sticky-footer.entry.js +15 -0
  108. package/dist/esm/z-table.entry.js +78 -0
  109. package/dist/esm/z-toast-notification-list.entry.js +1 -1
  110. package/dist/esm/z-toast-notification.entry.js +1 -1
  111. package/dist/esm/z-tooltip.entry.js +1 -1
  112. package/dist/types/beans/index.d.ts +4 -0
  113. package/dist/types/components/buttons/z-chip/index.d.ts +6 -0
  114. package/dist/types/components/z-carousel/index.d.ts +8 -0
  115. package/dist/types/components.d.ts +20 -1
  116. package/dist/web-components-library/index.esm.js +1 -1
  117. package/dist/web-components-library/{p-e27b9cba.entry.js → p-02796506.entry.js} +1 -1
  118. package/dist/web-components-library/p-1094e4de.entry.js +1 -0
  119. package/dist/web-components-library/{p-9c8aac51.entry.js → p-209cc06f.entry.js} +1 -1
  120. package/dist/web-components-library/{p-25cfbd3a.entry.js → p-28b18ca4.entry.js} +1 -1
  121. package/dist/web-components-library/p-3241471c.entry.js +1 -0
  122. package/dist/web-components-library/p-3b3cb18b.entry.js +1 -0
  123. package/dist/web-components-library/{p-7595ed18.entry.js → p-3d8b00fd.entry.js} +1 -1
  124. package/dist/web-components-library/{p-7e9a16c8.entry.js → p-41f6c8c4.entry.js} +1 -1
  125. package/dist/web-components-library/p-4665d79f.entry.js +1 -0
  126. package/dist/web-components-library/p-48e0a763.entry.js +1 -0
  127. package/dist/web-components-library/p-4c1dc891.entry.js +1 -0
  128. package/dist/web-components-library/{p-21a50621.entry.js → p-4c8e6232.entry.js} +1 -1
  129. package/dist/web-components-library/{p-efeecbb7.entry.js → p-509408f3.entry.js} +1 -1
  130. package/dist/web-components-library/p-597e767a.entry.js +1 -0
  131. package/dist/web-components-library/{p-fd60b041.entry.js → p-5d4bb66b.entry.js} +1 -1
  132. package/dist/web-components-library/{p-346db6a6.entry.js → p-5ee63e7f.entry.js} +1 -1
  133. package/dist/web-components-library/p-6934ea47.js +1 -0
  134. package/dist/web-components-library/{p-06e7159b.entry.js → p-71bb86a8.entry.js} +1 -1
  135. package/dist/web-components-library/p-733ba674.entry.js +1 -0
  136. package/dist/web-components-library/{p-d329ffe4.entry.js → p-74217d44.entry.js} +1 -1
  137. package/dist/web-components-library/{p-4fef4307.entry.js → p-7ce4db78.entry.js} +1 -1
  138. package/dist/web-components-library/{p-3543cfd5.entry.js → p-8923f36d.entry.js} +1 -1
  139. package/dist/web-components-library/{p-2b94e667.entry.js → p-89dbe6e9.entry.js} +1 -1
  140. package/dist/web-components-library/p-8c9e3bb8.entry.js +1 -0
  141. package/dist/web-components-library/p-8deddec7.entry.js +1 -0
  142. package/dist/web-components-library/{p-e40bf20d.entry.js → p-913cd0da.entry.js} +1 -1
  143. package/dist/web-components-library/{p-0c7427ec.entry.js → p-98a7eedb.entry.js} +1 -1
  144. package/dist/web-components-library/p-9af1322d.entry.js +1 -0
  145. package/dist/web-components-library/{p-0ab6a465.entry.js → p-9b2f8028.entry.js} +1 -1
  146. package/{www/build/p-8aaba07d.entry.js → dist/web-components-library/p-a0b11f65.entry.js} +1 -1
  147. package/dist/web-components-library/p-a3a64dc8.entry.js +1 -0
  148. package/dist/web-components-library/{p-44dc89cf.entry.js → p-a4fe497a.entry.js} +1 -1
  149. package/{www/build/p-c3e5e43e.entry.js → dist/web-components-library/p-ba1db0fc.entry.js} +1 -1
  150. package/dist/web-components-library/{p-819b5d17.entry.js → p-bd717ced.entry.js} +1 -1
  151. package/dist/web-components-library/{p-ecac657b.entry.js → p-beda87c3.entry.js} +1 -1
  152. package/dist/web-components-library/{p-453af930.entry.js → p-bf4539a7.entry.js} +1 -1
  153. package/dist/web-components-library/{p-29e389cb.entry.js → p-c6265fbb.entry.js} +1 -1
  154. package/dist/web-components-library/p-c8f19ca8.entry.js +1 -0
  155. package/dist/web-components-library/{p-b85f7e9a.entry.js → p-d1a52660.entry.js} +1 -1
  156. package/dist/web-components-library/p-d4c4b90a.entry.js +1 -0
  157. package/dist/web-components-library/p-d945c8d2.js +1 -0
  158. package/dist/web-components-library/p-ddc3c8c2.entry.js +1 -0
  159. package/dist/web-components-library/{p-f552b72d.entry.js → p-ded374d7.entry.js} +1 -1
  160. package/dist/web-components-library/{p-4081b879.entry.js → p-e55fc434.entry.js} +1 -1
  161. package/dist/web-components-library/{p-1ce5ea61.entry.js → p-e6b971b9.entry.js} +1 -1
  162. package/dist/web-components-library/p-e84d871b.entry.js +1 -0
  163. package/dist/web-components-library/p-e9be115a.entry.js +1 -0
  164. package/dist/web-components-library/{p-6252d20b.entry.js → p-ea84969a.entry.js} +1 -1
  165. package/dist/web-components-library/p-f7b1dc68.entry.js +1 -0
  166. package/dist/web-components-library/web-components-library.esm.js +1 -1
  167. package/package.json +1 -1
  168. package/react/components.d.ts +1 -0
  169. package/react/components.js +3 -2
  170. package/react/components.js.map +1 -1
  171. package/www/build/index.esm.js +1 -1
  172. package/www/build/{p-e27b9cba.entry.js → p-02796506.entry.js} +1 -1
  173. package/www/build/p-1094e4de.entry.js +1 -0
  174. package/www/build/{p-9c8aac51.entry.js → p-209cc06f.entry.js} +1 -1
  175. package/www/build/{p-25cfbd3a.entry.js → p-28b18ca4.entry.js} +1 -1
  176. package/www/build/p-3241471c.entry.js +1 -0
  177. package/www/build/p-3b3cb18b.entry.js +1 -0
  178. package/www/build/{p-7595ed18.entry.js → p-3d8b00fd.entry.js} +1 -1
  179. package/www/build/{p-7e9a16c8.entry.js → p-41f6c8c4.entry.js} +1 -1
  180. package/www/build/p-4665d79f.entry.js +1 -0
  181. package/www/build/p-48e0a763.entry.js +1 -0
  182. package/www/build/p-4c1dc891.entry.js +1 -0
  183. package/www/build/{p-21a50621.entry.js → p-4c8e6232.entry.js} +1 -1
  184. package/www/build/{p-efeecbb7.entry.js → p-509408f3.entry.js} +1 -1
  185. package/www/build/p-597e767a.entry.js +1 -0
  186. package/www/build/{p-fd60b041.entry.js → p-5d4bb66b.entry.js} +1 -1
  187. package/www/build/{p-346db6a6.entry.js → p-5ee63e7f.entry.js} +1 -1
  188. package/www/build/p-6934ea47.js +1 -0
  189. package/www/build/p-69f277e5.js +1 -0
  190. package/www/build/{p-06e7159b.entry.js → p-71bb86a8.entry.js} +1 -1
  191. package/www/build/p-733ba674.entry.js +1 -0
  192. package/www/build/{p-d329ffe4.entry.js → p-74217d44.entry.js} +1 -1
  193. package/www/build/{p-4fef4307.entry.js → p-7ce4db78.entry.js} +1 -1
  194. package/www/build/{p-3543cfd5.entry.js → p-8923f36d.entry.js} +1 -1
  195. package/www/build/{p-2b94e667.entry.js → p-89dbe6e9.entry.js} +1 -1
  196. package/www/build/p-8c9e3bb8.entry.js +1 -0
  197. package/www/build/p-8deddec7.entry.js +1 -0
  198. package/www/build/{p-e40bf20d.entry.js → p-913cd0da.entry.js} +1 -1
  199. package/www/build/{p-0c7427ec.entry.js → p-98a7eedb.entry.js} +1 -1
  200. package/www/build/p-9af1322d.entry.js +1 -0
  201. package/www/build/{p-0ab6a465.entry.js → p-9b2f8028.entry.js} +1 -1
  202. package/{dist/web-components-library/p-8aaba07d.entry.js → www/build/p-a0b11f65.entry.js} +1 -1
  203. package/www/build/p-a3a64dc8.entry.js +1 -0
  204. package/www/build/{p-44dc89cf.entry.js → p-a4fe497a.entry.js} +1 -1
  205. package/{dist/web-components-library/p-c3e5e43e.entry.js → www/build/p-ba1db0fc.entry.js} +1 -1
  206. package/www/build/{p-819b5d17.entry.js → p-bd717ced.entry.js} +1 -1
  207. package/www/build/{p-ecac657b.entry.js → p-beda87c3.entry.js} +1 -1
  208. package/www/build/{p-453af930.entry.js → p-bf4539a7.entry.js} +1 -1
  209. package/www/build/{p-29e389cb.entry.js → p-c6265fbb.entry.js} +1 -1
  210. package/www/build/p-c8f19ca8.entry.js +1 -0
  211. package/www/build/{p-b85f7e9a.entry.js → p-d1a52660.entry.js} +1 -1
  212. package/www/build/p-d4c4b90a.entry.js +1 -0
  213. package/www/build/p-d945c8d2.js +1 -0
  214. package/www/build/p-ddc3c8c2.entry.js +1 -0
  215. package/www/build/{p-f552b72d.entry.js → p-ded374d7.entry.js} +1 -1
  216. package/www/build/{p-4081b879.entry.js → p-e55fc434.entry.js} +1 -1
  217. package/www/build/{p-1ce5ea61.entry.js → p-e6b971b9.entry.js} +1 -1
  218. package/www/build/p-e84d871b.entry.js +1 -0
  219. package/www/build/p-e9be115a.entry.js +1 -0
  220. package/www/build/{p-6252d20b.entry.js → p-ea84969a.entry.js} +1 -1
  221. package/www/build/p-ea943cbd.css +1 -0
  222. package/www/build/p-f7b1dc68.entry.js +1 -0
  223. package/www/build/web-components-library.esm.js +1 -1
  224. package/www/index.html +2 -4
  225. package/dist/cjs/z-body_15.cjs.entry.js +0 -575
  226. package/dist/esm/z-body_15.entry.js +0 -557
  227. package/dist/web-components-library/p-0af2894e.js +0 -1
  228. package/dist/web-components-library/p-29c08c91.js +0 -1
  229. package/dist/web-components-library/p-3355b667.entry.js +0 -1
  230. package/dist/web-components-library/p-5d34d798.entry.js +0 -1
  231. package/dist/web-components-library/p-976cdbfa.entry.js +0 -1
  232. package/dist/web-components-library/p-f8446b1e.entry.js +0 -1
  233. package/www/build/p-053e68f0.js +0 -122
  234. package/www/build/p-0af2894e.js +0 -1
  235. package/www/build/p-29c08c91.js +0 -1
  236. package/www/build/p-3355b667.entry.js +0 -1
  237. package/www/build/p-5d34d798.entry.js +0 -1
  238. package/www/build/p-976cdbfa.entry.js +0 -1
  239. package/www/build/p-97a11655.css +0 -789
  240. package/www/build/p-f8446b1e.entry.js +0 -1
@@ -1,575 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-dee3e21d.js');
6
- const index$2 = require('./index-9651dba8.js');
7
- const index$1 = require('./index-73c33cf4.js');
8
- const icons = require('./icons-05eba7ee.js');
9
- const utils = require('./utils-95a9a879.js');
10
- const breakpoints = require('./breakpoints-88c4fd6c.js');
11
- require('./_commonjsHelpers-119ffc74.js');
12
-
13
- const ZBody = class {
14
- constructor(hostRef) {
15
- index.registerInstance(this, hostRef);
16
- this.variant = "regular";
17
- }
18
- render() {
19
- return (index.h("z-typography", { tabIndex: 0, component: this.component || "span", level: `b${this.level}`, variant: this.variant }, index.h("slot", null)));
20
- }
21
- };
22
-
23
- const stylesCss$d = ":host{display:inline-block;--z-icon-width:16px;--z-icon-height:16px;--z-icon-right-margin:var(--space-unit);--rgb-white:240, 240, 240}button:disabled,::slotted(button:disabled){pointer-events:none}button,::slotted(button),::slotted(a){box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;width:100%;font-family:var(--dashboard-font);font-weight:var(--font-sb);font-size:14px;line-height:1;letter-spacing:0.3px;border-width:var(--border-size-medium);border-style:solid;border-radius:var(--border-radius);vertical-align:middle;text-transform:uppercase;text-decoration:none;cursor:pointer;white-space:nowrap;outline:none;fill:currentColor}button.big,:host([size=\"big\"]) ::slotted(button),:host([size=\"big\"]) ::slotted(a){height:44px;min-width:44px}button.small,:host([size=\"small\"]) ::slotted(button),:host([size=\"small\"]) ::slotted(a){height:36px;min-width:36px}button.issmall,:host([issmall]) ::slotted(button),:host([issmall]) ::slotted(a){height:36px;min-width:36px}button.x-small,:host([size=\"x-small\"]) ::slotted(button),:host([size=\"x-small\"]) ::slotted(a){height:32px;min-width:32px}button:not(.square),:host(:not([square])) ::slotted(button),:host(:not([square])) ::slotted(a){min-width:calc(var(--space-unit) * 8);padding:0 calc(var(--space-unit) * 2)}button.square,:host([square]){--z-icon-right-margin:0}button.primary,:host([variant=\"primary\"]) ::slotted(button),:host([variant=\"primary\"]) ::slotted(a){background-color:var(--color-primary01);border-color:var(--color-primary01);color:var(--color-text-inverse)}@media (hover: hover){button.primary:hover,:host([variant=\"primary\"]) ::slotted(button:hover),:host([variant=\"primary\"]) ::slotted(a:hover){background-color:var(--color-hover-primary);border-color:var(--color-hover-primary);color:var(--color-text-inverse)}}button:focus:focus-visible,::slotted(button:focus:focus-visible),::slotted(a:focus:focus-visible){box-shadow:var(--shadow-focus-primary)}button.primary:active,:host([variant=\"primary\"]) ::slotted(button:active),:host([variant=\"primary\"]) ::slotted(a:active){background-color:var(--color-pressed-primary);border-color:var(--color-pressed-primary);color:var(--color-text-inverse);box-shadow:var(--shadow-2)}button.primary:disabled,:host([variant=\"primary\"]) ::slotted(button:disabled){background-color:var(--color-disabled01);border-color:var(--color-disabled01);color:var(--color-disabled02)}button.secondary,:host([variant=\"secondary\"]) ::slotted(button),:host([variant=\"secondary\"]) ::slotted(a){background-color:var(--color-surface01);border-color:var(--color-primary01);color:var(--color-primary01)}@media (hover: hover){button.secondary:hover,:host([variant=\"secondary\"]) ::slotted(button:hover),:host([variant=\"secondary\"]) ::slotted(a:hover){background-color:var(--color-surface01);border-color:var(--color-hover-primary);color:var(--color-hover-primary)}}button.secondary:active,:host([variant=\"secondary\"]) ::slotted(button:active),:host([variant=\"secondary\"]) ::slotted(a:active){background-color:var(--color-surface01);border-color:var(--color-pressed-primary);color:var(--color-pressed-primary);box-shadow:var(--shadow-2)}button.secondary:disabled,:host([variant=\"secondary\"]) ::slotted(button:disabled){background-color:var(--color-surface01);border-color:var(--color-disabled01);color:var(--color-disabled02)}button.tertiary,:host([variant=\"tertiary\"]) ::slotted(button),:host([variant=\"tertiary\"]) ::slotted(a){background-color:transparent;border-color:transparent;color:var(--color-primary01)}button.tertiary.hasContent{padding:0 var(--space-unit)}@media (hover: hover){button.tertiary:hover,:host([variant=\"tertiary\"]) ::slotted(button:hover),:host([variant=\"tertiary\"]) ::slotted(a:hover){background-color:var(--color-primary03);border-color:var(--color-primary03);color:var(--color-hover-primary)}}button.tertiary:focus:focus-visible,:host([variant=\"tertiary\"]) ::slotted(button:focus:focus-visible),:host([variant=\"tertiary\"]) ::slotted(a:focus:focus-visible){background-color:var(--color-surface01);border-color:var(--color-surface01);color:var(--color-primary01)}button.tertiary:active,:host([variant=\"tertiary\"]) ::slotted(button:active),:host([variant=\"tertiary\"]) ::slotted(a:active){background-color:var(--color-surface01);border-color:var(--color-surface01);color:var(--color-primary01);box-shadow:var(--shadow-2)}button.tertiary:disabled,:host([variant=\"tertiary\"]) ::slotted(button:disabled){background-color:transparent;border-color:transparent;color:var(--color-disabled02)}button.dark-bg,:host([variant=\"dark-bg\"]) ::slotted(button),:host([variant=\"dark-bg\"]) ::slotted(a){background-color:rgba(var(--rgb-white), 0.2);border-color:transparent;color:var(--color-text04)}button.dark-bg.hasContent{padding:0 var(--space-unit)}@media (hover: hover){button.dark-bg:hover,:host([variant=\"dark-bg\"]) ::slotted(button:hover),:host([variant=\"dark-bg\"]) ::slotted(a:hover){background-color:rgba(var(--rgb-white), 0.1)}}button.dark-bg:active,:host([variant=\"dark-bg\"]) ::slotted(button:active),:host([variant=\"dark-bg\"]) ::slotted(a:active){background-color:rgba(var(--rgb-white), 0.3)}button.dark-bg:disabled,:host([variant=\"dark-bg\"]) ::slotted(button:disabled){color:var(--color-disabled03);background-color:rgba(var(--rgb-white), 0.05)}";
24
-
25
- const ZButton = class {
26
- constructor(hostRef) {
27
- index.registerInstance(this, hostRef);
28
- /** HTML button disabled attribute. */
29
- this.disabled = false;
30
- /** HTML button type attribute. */
31
- this.type = index$1.ButtonTypeEnum.button;
32
- /** Graphical variant: `primary`, `secondary`, `tertiary`, `dark-bg`. Defaults to `primary`. */
33
- this.variant = index$1.ButtonVariantEnum.primary;
34
- /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
35
- this.size = index$1.ButtonSizeEnum.big;
36
- /** Reduce button size (deprecated).
37
- *
38
- * @deprecated Use `size` prop.
39
- * */
40
- this.issmall = false;
41
- /** Spy to render square button. */
42
- this.square = false;
43
- }
44
- render() {
45
- this.hostElement.style.pointerEvents = this.disabled ? "none" : "auto";
46
- return (index.h("slot", { name: "element" }, index.h("button", { id: this.htmlid, name: this.name, type: this.type, disabled: this.disabled, class: index$2.classnames(this.variant, this.size, { issmall: this.issmall }, { square: this.square }) }, this.icon && index.h("z-icon", { name: this.icon, width: 16, height: 16 }), index.h("slot", null))));
47
- }
48
- get hostElement() { return index.getElement(this); }
49
- };
50
- ZButton.style = stylesCss$d;
51
-
52
- const stylesCss$c = ":host{--aspect-ratio:1.62;--z-card--border-color:var(--gray200);--z-card--color-cover-background:var(--color-surface01);--z-card--text-background:var(--color-surface01);--z-card--text-border-radius:none;--z-card--text-border:none;position:relative;display:flex;flex-direction:column;font-family:var(--font-family-sans);font-weight:var(--font-rg)}*,::slotted(*){box-sizing:border-box}:host(:not([variant='overlay'])) .cover-container{position:relative;width:100%}.cover-container{padding-bottom:calc(100% / var(--aspect-ratio))}::slotted([slot='cover']),.color-cover{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;object-position:center}.cover-container>z-icon{--z-icon-width:calc(var(--space-unit) * 11);--z-icon-height:var(--z-icon-width);position:absolute;top:calc(50% - calc(var(--z-icon-height) / 2));left:calc(50% - calc(var(--z-icon-width) / 2));fill:var(--color-primary01)}.color-cover{background-color:var(--z-card--color-cover-background)}.content{display:flex;flex-direction:column;padding-top:var(--space-unit)}.color-cover .cover-content{display:flex;flex-direction:column;justify-content:flex-end;height:100%;padding:var(--space-unit)}::slotted([slot='metadata']),::slotted([slot='title']),::slotted([slot='text']){display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}::slotted([slot='title']:not(:last-child)),::slotted([slot='text']:not(:last-child)){margin-bottom:var(--space-unit)}::slotted([slot='text']),::slotted([slot='actions']){margin:0}::slotted([slot='metadata']:not(:last-child)){margin:0 0 calc(var(--space-unit) * 0.25);-webkit-line-clamp:1;text-transform:uppercase}::slotted([slot='title']){margin:0;font-weight:var(--font-sb);-webkit-line-clamp:2}::slotted([slot='text']){-webkit-line-clamp:3}.actions{display:flex;flex-direction:row;align-items:center}::slotted([slot='action']:not(:last-child)){margin-right:calc(var(--space-unit) * 1.5)}:host([clickable]){cursor:pointer}:host([clickable]:focus:focus-visible){outline:none}:host(:not([variant])[clickable]:focus:focus-visible){padding:calc(var(--space-unit) * 0.5);box-shadow:var(--shadow-focus-primary)}:host([variant='text']){background-color:var(--z-card--text-background);border:var(--z-card--text-border);border-radius:var(--z-card--text-border-radius)}:host([showshadow])>.content,:host([variant='border'])>.content,:host([variant='shadow'])>.content{height:100%;padding:var(--space-unit) var(--space-unit) calc(var(--space-unit) * 2)}:host([variant='text'])>.content{padding:calc(var(--space-unit) * 2) var(--space-unit)}:host([variant='border']) .actions,:host([variant='shadow']) .actions{margin-top:auto}:host([variant='border']){border:var(--border-size-small) solid var(--z-card--border-color)}:host([variant='border'][clickable]:hover)>.content{background:var(--color-background)}:host([variant='border'][clickable]:focus:focus-visible){box-shadow:var(--shadow-focus-primary)}:host([variant='border'][clickable]:active){border-color:transparent}:host([variant='shadow']),:host([showshadow]){box-shadow:var(--shadow-2)}:host([variant='shadow'][clickable]:hover),:host([clickable][showshadow]:hover){box-shadow:var(--shadow-4)}:host([variant='shadow'][clickable]:focus:focus-visible),:host([clickable][showshadow]:focus:focus-visible){box-shadow:var(--shadow-4)}:host([variant='shadow'][clickable]:active),:host([clickable][showshadow]:active){box-shadow:none}:host([variant='overlay']) .content{position:absolute;top:0;right:0;bottom:0;left:0;justify-content:flex-end;padding:var(--space-unit);background-image:linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));color:var(--color-text-inverse);fill:var(--color-text-inverse)}";
53
-
54
- const ZCard = class {
55
- constructor(hostRef) {
56
- index.registerInstance(this, hostRef);
57
- this.cardClicked = index.createEvent(this, "cardClicked", 7);
58
- /** Enable click interactions on the card. Default: false */
59
- this.clickable = false;
60
- /** Enable shadow. Default: false. */
61
- this.showshadow = false;
62
- }
63
- onClick(ev) {
64
- // Do nothing for clicks on actions.
65
- if (ev.target.getAttribute('slot') === 'action') {
66
- return;
67
- }
68
- if (!this.clickable) {
69
- ev.preventDefault();
70
- ev.stopPropagation();
71
- return;
72
- }
73
- this.cardClicked.emit();
74
- }
75
- componentWillLoad() {
76
- this.hasCoverImage = !!this.host.querySelector('[slot="cover"]');
77
- }
78
- /**
79
- * Template for a card without image cover.
80
- * A colored background replaces the image and some data is moved over it.
81
- */
82
- renderColorCoverCard() {
83
- return [
84
- index.h("div", { class: "cover-container" }, index.h("div", { class: "color-cover" }, index.h("div", { class: "cover-content" }, index.h("slot", { name: "metadata" }), index.h("slot", { name: "title" })))),
85
- index.h("div", { class: "content" }, index.h("slot", { name: "text" }), index.h("div", { class: "actions" }, index.h("slot", { name: "action" })))
86
- ];
87
- }
88
- /**
89
- * Template for the content div.
90
- */
91
- renderContentDiv() {
92
- return (index.h("div", { class: "content" }, index.h("slot", { name: "metadata" }), index.h("slot", { name: "title" }), index.h("slot", { name: "text" }), index.h("div", { class: "actions" }, index.h("slot", { name: "action" }))));
93
- }
94
- render() {
95
- if (this.variant === index$1.CardVariants.text) {
96
- return this.renderContentDiv();
97
- }
98
- if (this.variant === index$1.CardVariants.overlay || this.hasCoverImage) {
99
- return [
100
- index.h("div", { class: "cover-container" }, this.hasCoverImage && [
101
- index.h("slot", { name: "cover" }),
102
- (this.variant !== index$1.CardVariants.overlay) && this.coverIcon && index.h("z-icon", { name: this.coverIcon })
103
- ], !this.hasCoverImage && index.h("div", { class: "color-cover" })),
104
- this.renderContentDiv()
105
- ];
106
- }
107
- return this.renderColorCoverCard();
108
- }
109
- get host() { return index.getElement(this); }
110
- };
111
- ZCard.style = stylesCss$c;
112
-
113
- const stylesCss$b = ":host{line-height:0;vertical-align:middle;margin-right:var(--z-icon-right-margin, 0);margin-left:var(--z-icon-left-margin, 0)}:host svg:not([width]){width:var(--z-icon-width, 18px)}:host svg:not([height]){height:var(--z-icon-height, 18px)}";
114
-
115
- const ZIcon = class {
116
- constructor(hostRef) {
117
- index.registerInstance(this, hostRef);
118
- }
119
- selectPathOrPolygon(iconName) {
120
- if (iconName && iconName.startsWith("M")) {
121
- return index.h("path", { d: icons.icons[this.name] });
122
- }
123
- else {
124
- return index.h("polygon", { points: icons.icons[this.name] });
125
- }
126
- }
127
- render() {
128
- return (index.h("svg", { viewBox: "0 0 1000 1000", width: this.width, height: this.height, id: this.iconid, fill: this.fill ? `var(--${this.fill})` : "" }, this.selectPathOrPolygon(icons.icons[this.name])));
129
- }
130
- };
131
- ZIcon.style = stylesCss$b;
132
-
133
- const stylesCss$a = ".sc-z-popover-h{font-family:var(--dashboard-font);font-weight:var(--font-rg);position:relative;display:inline-block;--shadow-arrow-color:rgba(66, 69, 72, 0.2);--shadow-arrow-below-color:rgba(66, 69, 72, 0.1)}.popover-content-container.sc-z-popover{box-sizing:border-box;visibility:hidden;position:absolute;min-width:64px;min-height:32px;z-index:999}.popover-content-container.visible.sc-z-popover{visibility:visible}.popover-content-container.border-radius-none.sc-z-popover{border-radius:0}.popover-content-container.border-radius-small.sc-z-popover{border-radius:var(--border-radius-small)}.popover-content-container.border-radius-medium.sc-z-popover{border-radius:var(--border-radius)}.popover-content-container.shadow-1.sc-z-popover{box-shadow:var(--shadow-1)}.popover-content-container.shadow-2.sc-z-popover{box-shadow:var(--shadow-2)}.popover-content-container.shadow-3.sc-z-popover{box-shadow:var(--shadow-3)}.popover-content-container.shadow-4.sc-z-popover{box-shadow:var(--shadow-4)}.popover-content-container.shadow-6.sc-z-popover{box-shadow:var(--shadow-6)}.popover-content-container.shadow-8.sc-z-popover{box-shadow:var(--shadow-8)}.popover-content-container.shadow-12.sc-z-popover{box-shadow:var(--shadow-12)}.popover-content-container.shadow-16.sc-z-popover{box-shadow:var(--shadow-16)}.popover-content-container.shadow-24.sc-z-popover{box-shadow:var(--shadow-24)}.popover-content-container.after-down.sc-z-popover{top:0;left:calc(100% + var(--space-unit))}.popover-content-container.after-center.sc-z-popover{top:50%;left:calc(100% + var(--space-unit));transform:translateY(-50%)}.popover-content-container.after-up.sc-z-popover{bottom:0;left:calc(100% + var(--space-unit))}.popover-content-container.below-right.sc-z-popover{left:0;top:calc(100% + var(--space-unit))}.popover-content-container.below-center.sc-z-popover{left:50%;top:calc(100% + var(--space-unit));transform:translateX(-50%)}.popover-content-container.below-left.sc-z-popover{right:0;top:calc(100% + var(--space-unit))}.popover-content-container.before-down.sc-z-popover{top:0;right:calc(100% + var(--space-unit))}.popover-content-container.before-center.sc-z-popover{top:50%;right:calc(100% + var(--space-unit));transform:translateY(-50%)}.popover-content-container.before-up.sc-z-popover{bottom:0;right:calc(100% + var(--space-unit))}.popover-content-container.above-right.sc-z-popover{left:0;bottom:calc(100% + var(--space-unit))}.popover-content-container.above-center.sc-z-popover{left:50%;bottom:calc(100% + var(--space-unit));transform:translateX(-50%)}.popover-content-container.above-left.sc-z-popover{right:0;bottom:calc(100% + var(--space-unit))}.popover-content-container.sc-z-popover:before{display:none;position:absolute;content:\"\";width:8px;height:8px;z-index:-1;background-color:inherit;transform:rotate(45deg)}.popover-content-container.after-down.sc-z-popover:before{top:12px;left:-4px;box-shadow:-1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.after-center.sc-z-popover:before{top:calc(50% - 4px);left:-4px;box-shadow:-1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.after-up.sc-z-popover:before{bottom:12px;left:-4px;box-shadow:-1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.below-right.sc-z-popover:before{left:12px;top:-4px;box-shadow:-1px -1px 2px var(--shadow-arrow-below-color)}.popover-content-container.below-center.sc-z-popover:before{left:calc(50% - 4px);top:-4px;box-shadow:-1px -1px 2px var(--shadow-arrow-below-color)}.popover-content-container.below-left.sc-z-popover:before{right:12px;top:-4px;box-shadow:-1px -1px 2px var(--shadow-arrow-below-color)}.popover-content-container.before-down.sc-z-popover:before{top:12px;right:-4px;box-shadow:1px -1px 1.5px var(--shadow-arrow-color)}.popover-content-container.before-center.sc-z-popover:before{top:calc(50% - 4px);right:-4px;box-shadow:1px -1px 1.5px var(--shadow-arrow-color)}.popover-content-container.before-up.sc-z-popover:before{bottom:12px;right:-4px;box-shadow:1px -1px 1.5px var(--shadow-arrow-color)}.popover-content-container.above-right.sc-z-popover:before{left:12px;bottom:-4px;box-shadow:1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.above-center.sc-z-popover:before{left:calc(50% - 4px);bottom:-4px;box-shadow:1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.above-left.sc-z-popover:before{right:12px;bottom:-4px;box-shadow:1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.show-arrow.sc-z-popover:before{display:block}";
134
-
135
- const ZPopover = class {
136
- /**
137
- * Constructor.
138
- */
139
- constructor(hostRef) {
140
- index.registerInstance(this, hostRef);
141
- /** [optional] Popover position */
142
- this.position = index$1.PopoverPosition["after-up"];
143
- /** [optional] Background color token for popover */
144
- this.backgroundColor = "color-white";
145
- /** [optional] Border radius token for popover */
146
- this.borderRadius = index$1.PopoverBorderRadius.small;
147
- /** [optional] Box shadow token for popover */
148
- this.boxShadow = index$1.PopoverShadow["shadow-1"];
149
- /** [optional] Show or hide arrow */
150
- this.showArrow = false;
151
- /** [optional] Sets padding for Popover container */
152
- this.padding = "8px";
153
- this.isVisible = false;
154
- this.popoverPosition = this.position;
155
- this.handleKeyDown = this.handleKeyDown.bind(this);
156
- }
157
- openPopover() {
158
- const width = document.body.clientWidth;
159
- const height = window.innerHeight;
160
- const rect = this.popoverElem.getBoundingClientRect();
161
- const l = rect.left;
162
- const r = rect.right;
163
- const t = rect.top;
164
- const b = rect.bottom;
165
- let firstSide = this.position.split("-")[0];
166
- let secondSide = this.position.split("-")[1];
167
- // If top is outside viewport
168
- if (t < 0) {
169
- if (this.position.startsWith("above")) {
170
- firstSide = "below";
171
- }
172
- else {
173
- secondSide = "down";
174
- }
175
- }
176
- // If bottom is outside viewport
177
- if (b > height) {
178
- if (this.position.startsWith("below")) {
179
- firstSide = "above";
180
- }
181
- else {
182
- secondSide = "up";
183
- }
184
- }
185
- // If right is outside viewport
186
- if (r > width) {
187
- if (this.position.startsWith("above") ||
188
- this.position.startsWith("below")) {
189
- secondSide = "left";
190
- }
191
- else {
192
- firstSide = "before";
193
- }
194
- }
195
- // If left is outside viewport
196
- if (l < 0) {
197
- if (this.position.startsWith("above") ||
198
- this.position.startsWith("below")) {
199
- secondSide = "right";
200
- }
201
- else {
202
- firstSide = "after";
203
- }
204
- }
205
- this.popoverPosition = index$1.PopoverPosition[`${firstSide}-${secondSide}`];
206
- this.isVisible = true;
207
- }
208
- closePopover() {
209
- this.popoverPosition = this.position;
210
- this.isVisible = false;
211
- }
212
- closePopoverWithKeyboard(e) {
213
- if (e.key === index$1.KeyboardKeys.ESC) {
214
- this.closePopover();
215
- }
216
- }
217
- handleClick(event) {
218
- this.isVisible ? this.closePopover() : this.openPopover();
219
- event.stopPropagation();
220
- }
221
- handleKeyDown(event) {
222
- if (event.code === index$1.KeyboardKeys.ENTER) {
223
- this.isVisible ? this.closePopover() : this.openPopover();
224
- }
225
- }
226
- handleOutsideClick(e) {
227
- const tree = utils.getElementTree(e.target);
228
- const parent = tree.find((elem) => elem.nodeName.toLowerCase() === "z-popover");
229
- if (!parent) {
230
- this.closePopover();
231
- }
232
- }
233
- render() {
234
- return (index.h(index.Host, { onKeyDown: this.handleKeyDown }, index.h("div", { tabindex: "0", onClick: (event) => this.handleClick(event), onKeyDown: (event) => {
235
- if (event.key === index$1.KeyboardKeys.ENTER) {
236
- this.handleClick(event);
237
- }
238
- } }, index.h("slot", { name: "trigger" })), index.h("div", { ref: (e) => (this.popoverElem = e), class: index$2.classnames("popover-content-container", this.popoverPosition, `border-radius-${this.borderRadius}`, this.boxShadow, { "show-arrow": this.showArrow }, { visible: this.isVisible }), style: {
239
- backgroundColor: `var(--${this.backgroundColor})`,
240
- padding: this.padding,
241
- } }, index.h("slot", { name: "popover" }))));
242
- }
243
- };
244
- ZPopover.style = stylesCss$a;
245
-
246
- const stylesCss$9 = "z-table{overflow-x:auto;display:block;width:100%;font-family:var(--dashboard-font);font-weight:var(--font-rg);background-color:var(--color-white)}z-table>div.table{display:table;width:100%;border-collapse:separate}z-table>div.table-bordered>z-table-body>z-table-row>z-table-cell:not(:last-child),z-table>div.table-bordered>z-table-head>z-table-header-row>z-table-header:not(:last-child){border-right:var(--border-size-small) solid var(--bg-grey-200)}z-table>div>z-table-body>z-table-row[expandable]>z-table-cell:first-child,z-table>div>z-table-head>z-table-header-row[expandable]>z-table-header:first-child{border-right:none}z-table>div>z-table-body>z-table-row[expanded]>z-table-cell{background-color:var(--gray50)}z-table>div>z-table-body>z-table-row[expanded]+z-table-expanded-row{border-bottom:1px solid var(--gray200)}z-table>div.table-column-sticky>z-table-body>z-table-row>z-table-cell:first-child,z-table>div.table-column-sticky>z-table-head>z-table-header-row>z-table-header:first-child{position:sticky;left:0;box-shadow:1px 0 4px -1px rgba(66, 69, 72, 0.4);z-index:1}z-table>div.table-header-sticky>z-table-head>z-table-header-row>z-table-header{position:sticky;top:0;box-shadow:0 2px 3px -3px rgba(66, 69, 72, 0.4)}z-table>div.table-header-sticky>z-table-head>z-table-header-row>z-table-header{z-index:2}z-table>div.table-header-sticky>z-table-head>z-table-header-row>z-table-header:first-child,z-table>div.table-column-sticky>z-table-head>z-table-header-row>z-table-header:first-child{z-index:5}z-table-body{width:auto;background-color:var(--color-white)}z-table-empty-box{display:flex;flex-direction:column;flex-grow:1;border-bottom:var(--border-size-small) solid var(--bg-grey-200)}z-table-empty-box.bordered{border-left:var(--border-size-small) solid var(--bg-grey-200)}.error-message{margin-top:calc(var(--space-unit) * 2)}.table-content{display:flex;flex-direction:row;width:100%}.error-content{font-family:var(--dashboard-font);padding:calc(var(--space-unit) * 3);display:flex}.error-content>img{width:244px;height:188px;margin-right:calc(var(--space-unit) * 3)}@media only screen and (max-width: 768px){z-table>div.table-empty{display:none}.error-content{display:flex;flex-direction:column}.error-content>img{width:auto;height:auto}.text{padding:calc(var(--space-unit) * 3) 0}}";
247
-
248
- const ZTable = class {
249
- constructor(hostRef) {
250
- index.registerInstance(this, hostRef);
251
- this.callToAction = index.createEvent(this, "callToAction", 7);
252
- this.callToActionTwo = index.createEvent(this, "callToActionTwo", 7);
253
- /** Error message */
254
- this.errorMessage = "Siamo spiacenti, non siamo riusciti a caricare il contenuto richiesto";
255
- /** Sets table with border */
256
- this.bordered = false;
257
- /** Sets first column sticky */
258
- this.columnSticky = false;
259
- /** Sets empty table */
260
- this.empty = false;
261
- /** Set error status */
262
- this.error = false;
263
- /** Sets header sticky */
264
- this.headerSticky = false;
265
- /** Set message */
266
- this.message = "Siamo spiacenti, al momento non sono presenti dati da visualizzare";
267
- /** Set subtitle */
268
- this.subtitle = "";
269
- }
270
- handleResize() {
271
- this.isMobile = window.innerWidth <= breakpoints.mobileBreakpoint;
272
- }
273
- handleOrientationChange() {
274
- this.isMobile = screen.width <= breakpoints.mobileBreakpoint;
275
- }
276
- componentWillLoad() {
277
- var _a;
278
- this.isMobile = window.innerWidth <= breakpoints.mobileBreakpoint;
279
- const tableBody = this.host.querySelector('[slot="table-body"]');
280
- this.hasTableBody = !!((_a = tableBody === null || tableBody === void 0 ? void 0 : tableBody.children) === null || _a === void 0 ? void 0 : _a.length);
281
- if (!!tableBody && !this.hasTableBody) {
282
- tableBody.remove();
283
- }
284
- }
285
- componentWillRender() {
286
- this.host.setAttribute("role", "table");
287
- }
288
- renderError(tableClass) {
289
- const minHeight = this.lines ? `calc(40px * ${this.lines})` : "auto";
290
- return (index.h(index.Host, null, index.h("div", { class: tableClass }, index.h("slot", { name: "table-header" })), index.h("z-table-error", null, index.h("div", { class: "error-content", style: { minHeight } }, index.h("slot", { name: "error-image" }), index.h("div", { class: "text" }, index.h("z-body", { class: "error-message", level: 3, variant: "semibold" }, this.errorMessage), index.h("slot", { name: "error-action" }))))));
291
- }
292
- renderEmpty(tableClass) {
293
- const buttonSize = this.isMobile
294
- ? index$1.ButtonSizeEnum.small
295
- : index$1.ButtonSizeEnum.big;
296
- const tableContentClass = `${!!this.hasTableBody ? "table-content" : ""}`;
297
- if (this.hasTableBody) {
298
- return (index.h(index.Host, null, index.h("div", { class: tableClass }, index.h("slot", { name: "table-header" }), index.h("div", { class: tableContentClass }, index.h("slot", { name: "table-body" }), index.h("z-table-empty-box", { class: this.bordered && "bordered", message: this.message, subtitle: this.subtitle }, !!this.callToActionLabel && (index.h("z-button", { slot: "cta1", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToAction.emit(), size: buttonSize }, this.callToActionLabel)), !!this.callToActionTwoLabel && (index.h("z-button", { slot: "cta2", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToActionTwo.emit(), size: buttonSize }, this.callToActionTwoLabel)))))));
299
- }
300
- return (index.h(index.Host, null, index.h("div", { class: tableClass }, index.h("slot", { name: "table-header" })), index.h("z-table-empty-box", { class: this.bordered && "bordered", message: this.message, subtitle: this.subtitle }, !!this.callToActionLabel && (index.h("z-button", { slot: "cta1", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToAction.emit(), size: buttonSize }, this.callToActionLabel)), !!this.callToActionTwoLabel && (index.h("z-button", { slot: "cta2", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToActionTwo.emit(), size: buttonSize }, this.callToActionTwoLabel)))));
301
- }
302
- render() {
303
- const tableClass = `table ${this.empty ? "table-empty" : ""} ${this.bordered ? "table-bordered" : ""}
304
- ${this.columnSticky ? "table-column-sticky" : ""}
305
- ${this.headerSticky ? "table-header-sticky" : ""}`;
306
- if (this.error) {
307
- return this.renderError(tableClass);
308
- }
309
- if (this.empty) {
310
- return this.renderEmpty(tableClass);
311
- }
312
- return (index.h(index.Host, null, index.h("div", { class: tableClass }, index.h("slot", null)), index.h("slot", { name: "sticky-footer" })));
313
- }
314
- static get assetsDirs() { return ["assets"]; }
315
- get host() { return index.getElement(this); }
316
- };
317
- ZTable.style = stylesCss$9;
318
-
319
- const stylesCss$8 = ".sc-z-table-body-h{display:table-row-group;font-family:var(--dashboard-font);font-weight:var(--font-rg)}.sc-z-table-body-h>z-table-row[expanded].sc-z-table-body+z-table-expanded-row.sc-z-table-body{display:table-row}";
320
-
321
- const ZTableBody = class {
322
- constructor(hostRef) {
323
- index.registerInstance(this, hostRef);
324
- }
325
- componentWillRender() {
326
- this.host.setAttribute("role", "rowgroup");
327
- Array.from(this.host.children).forEach((child, index) => child.setAttribute("aria-rowindex", `${index}`));
328
- }
329
- render() {
330
- return index.h("slot", null);
331
- }
332
- get host() { return index.getElement(this); }
333
- };
334
- ZTableBody.style = stylesCss$8;
335
-
336
- const stylesCss$7 = ":host{display:table-cell;background-color:var(--color-white);border-bottom:var(--border-size-small) solid var(--bg-grey-200);font-family:var(--dashboard-font);font-weight:var(--font-rg)}:host>.button-container{display:none}:host:hover>.button-container{display:initial}.button-container{position:absolute;right:8px;top:8px;z-index:5}.button-content{position:relative}.contextual-menu-container{display:none;position:absolute;top:calc(100% - var(--space-unit));right:0}.button-container.visible,.contextual-menu-container.visible{display:initial}:host([padding=\"x-small\"]){padding:calc(var(--space-unit) * 0.5)}:host([padding=\"small\"]){padding:calc(var(--space-unit))}:host([padding=\"medium\"]){padding:calc(var(--space-unit) * 2)}:host([padding=\"large\"]){padding:calc(var(--space-unit) * 2.5)}:host([padding=\"special\"]){padding:0}";
337
-
338
- const ZTableCell = class {
339
- constructor(hostRef) {
340
- index.registerInstance(this, hostRef);
341
- /** Set padding size of cell, if special 0px padding will be set */
342
- this.padding = index$1.Size.medium;
343
- this.isMenuOpened = false;
344
- }
345
- handleMenu() {
346
- this.isMenuOpened = !this.isMenuOpened;
347
- }
348
- componentWillRender() {
349
- this.host.setAttribute("role", "cell");
350
- }
351
- render() {
352
- return (index.h(index.Host, null, this.showButton && (index.h("div", { class: index$2.classnames("button-container", {
353
- visible: this.isMenuOpened,
354
- }) }, index.h("div", { class: "button-content" }, index.h("z-button", { icon: "contextual-menu", variant: index$1.ButtonVariantEnum.tertiary, size: index$1.ButtonSizeEnum["x-small"], onClick: () => this.handleMenu(), square: true }), index.h("div", { class: index$2.classnames("contextual-menu-container", {
355
- visible: this.isMenuOpened,
356
- }) }, index.h("slot", { name: "contextual-menu" }))))), index.h("slot", null)));
357
- }
358
- get host() { return index.getElement(this); }
359
- };
360
- ZTableCell.style = stylesCss$7;
361
-
362
- const stylesCss$6 = ".sc-z-table-empty-box-h{display:block;padding:calc(var(--space-unit)) calc(var(--space-unit) * 3)\n calc(var(--space-unit) * 3) calc(var(--space-unit) * 3);background-color:var(--bg-white)}.sc-z-table-empty-box-s>*{margin-top:var(--space-unit)}.cta.sc-z-table-empty-box{display:flex;flex-direction:row;margin-top:calc(var(--space-unit) / 2)}.cta.has2Cta.sc-z-table-empty-box{flex-direction:column}@media only screen and (min-width: 768px){.sc-z-table-empty-box-h{padding:calc(var(--space-unit) * 3) calc(var(--space-unit) * 7)\n calc(var(--space-unit) * 3) calc(var(--space-unit) * 7)}.sc-z-table-empty-box-s>*{margin-right:calc(var(--space-unit) * 2)}.cta.sc-z-table-empty-box{margin-top:var(--space-unit)}.cta.has2Cta.sc-z-table-empty-box{flex-direction:row}}";
363
-
364
- const ZTableEmptyBox = class {
365
- constructor(hostRef) {
366
- index.registerInstance(this, hostRef);
367
- /** Sets main title message*/
368
- this.message = "Siamo spiacenti, al momento non sono presenti dati da visualizzare.";
369
- /** Sets message */
370
- this.subtitle = "";
371
- }
372
- componentWillLoad() {
373
- this.hasCta1Slot = !!this.hostElement.querySelector('[slot="cta1"]');
374
- this.hasCta2Slot = !!this.hostElement.querySelector('[slot="cta2"]');
375
- }
376
- render() {
377
- return (index.h(index.Host, null, index.h("z-body", { level: 3, variant: "semibold" }, this.message), index.h("br", null), !!this.subtitle && (index.h("z-body", { level: 4, variant: "regular" }, this.subtitle)), (!!this.hasCta1Slot || !!this.hasCta2Slot) && (index.h("div", { class: index$2.classnames("cta", {
378
- has2Cta: !!this.hasCta1Slot && !!this.hasCta2Slot
379
- }) }, index.h("slot", { name: "cta1" }), index.h("slot", { name: "cta2" })))));
380
- }
381
- get hostElement() { return index.getElement(this); }
382
- };
383
- ZTableEmptyBox.style = stylesCss$6;
384
-
385
- const stylesCss$5 = ".sc-z-table-head-h{display:table-header-group;font-family:var(--dashboard-font);font-weight:var(--font-rg)}";
386
-
387
- const ZTableHead = class {
388
- constructor(hostRef) {
389
- index.registerInstance(this, hostRef);
390
- }
391
- componentWillRender() {
392
- this.host.setAttribute("role", "rowgroup");
393
- }
394
- render() {
395
- return index.h("slot", null);
396
- }
397
- get host() { return index.getElement(this); }
398
- };
399
- ZTableHead.style = stylesCss$5;
400
-
401
- const stylesCss$4 = ":host{display:table-cell;background-color:var(--gray50);border-bottom:var(--border-size-medium) solid var(--gray200);font-family:var(--dashboard-font);font-weight:var(--font-sb);text-align:start;position:relative}.container{display:flex;align-items:flex-end}:host(.sortable){cursor:pointer}:host([padding=\"x-small\"]){padding:calc(var(--space-unit) * 0.5)}:host([padding=\"small\"]){padding:calc(var(--space-unit))}:host([padding=\"medium\"]){padding:calc(var(--space-unit) * 2)}:host([padding=\"large\"]){padding:calc(var(--space-unit) * 2.5)}:host([padding=\"special\"]){padding:0}.arrow{opacity:1;padding-left:var(--space-unit)}.popover-container{position:absolute;top:var(--space-unit);right:var(--space-unit);display:none}.popover-container.visible{display:block}:host(:hover) .popover-container{display:block}";
402
-
403
- const ZTableHeader = class {
404
- constructor(hostRef) {
405
- index.registerInstance(this, hostRef);
406
- this.sort = index.createEvent(this, "sort", 7);
407
- /** Set padding size of cell, if special 0px padding will be set */
408
- this.padding = index$1.Size.medium;
409
- /** [Optional] Default sort order */
410
- this.defaultSortDirection = index$1.SortDirectionEnum.asc;
411
- this.sortDirection = index$1.SortDirectionEnum.none;
412
- this.isMenuOpened = false;
413
- this.emitOnSort = this.emitOnSort.bind(this);
414
- }
415
- emitOnSort() {
416
- this.sort.emit({
417
- columnId: this.columnId,
418
- sortDirection: this.sortDirection,
419
- });
420
- }
421
- handleSort() {
422
- if (!this.sortable) {
423
- return;
424
- }
425
- this.sortDirection = (() => {
426
- switch (this.sortDirection) {
427
- case index$1.SortDirectionEnum.asc:
428
- return index$1.SortDirectionEnum.desc;
429
- case index$1.SortDirectionEnum.desc:
430
- return index$1.SortDirectionEnum.asc;
431
- case index$1.SortDirectionEnum.none:
432
- return this.defaultSortDirection;
433
- default:
434
- return index$1.SortDirectionEnum.none;
435
- }
436
- })();
437
- this.emitOnSort();
438
- }
439
- handleMenuClick() {
440
- this.isMenuOpened = !this.isMenuOpened;
441
- }
442
- handleOutsideClick(e) {
443
- const tree = utils.getElementTree(e.target);
444
- const parent = tree.find((elem) => elem.nodeName.toLowerCase() === "z-popover");
445
- if (!parent) {
446
- this.isMenuOpened = false;
447
- }
448
- }
449
- handleClickHeaders(e) {
450
- const { target } = e;
451
- const parent = utils.getElementTree(target).find((elem) => elem.nodeName.toLowerCase() === "z-table-header");
452
- if (!this.sortable || !parent) {
453
- return;
454
- }
455
- const parentColumnId = parent.attributes.getNamedItem("column-id").value;
456
- const isSortable = target.parentNode.sortable || target.sortable;
457
- if (parentColumnId !== this.columnId && isSortable) {
458
- this.sortDirection = index$1.SortDirectionEnum.none;
459
- }
460
- }
461
- componentWillRender() {
462
- this.host.setAttribute("role", "columnheader");
463
- }
464
- render() {
465
- return (index.h(index.Host, { class: index$2.classnames({
466
- sortable: this.sortable,
467
- }), onClick: () => this.handleSort() }, index.h("div", { class: index$2.classnames("container") }, index.h("slot", null), this.sortable && this.sortDirection !== index$1.SortDirectionEnum.none && (index.h("z-icon", { name: this.sortDirection === index$1.SortDirectionEnum.asc
468
- ? "arrow-up"
469
- : "arrow-down", class: "arrow" }))), this.showButton && (index.h("div", { class: index$2.classnames("popover-container", {
470
- visible: this.isMenuOpened,
471
- }) }, index.h("z-popover", { position: index$1.PopoverPosition["below-center"], "background-color": "gray200" }, index.h("z-button", { icon: "contextual-menu", variant: index$1.ButtonVariantEnum["tertiary"], size: index$1.ButtonSizeEnum["x-small"], square: true, slot: "trigger", onClick: () => this.handleMenuClick() }), index.h("div", { slot: "popover" }, index.h("slot", { name: "contextual-menu" })))))));
472
- }
473
- get host() { return index.getElement(this); }
474
- };
475
- ZTableHeader.style = stylesCss$4;
476
-
477
- const stylesCss$3 = "z-table-header-row{display:table-row}z-table-header-row[expandable]>z-table-header:first-child{width:40px;user-select:none;box-sizing:border-box}z-table-header-row[expandable]>z-table-header:nth-child(2){padding-left:8px}";
478
-
479
- const ZTableHeaderRow = class {
480
- constructor(hostRef) {
481
- index.registerInstance(this, hostRef);
482
- }
483
- _renderExpandHeader() {
484
- return index.h("z-table-header", null);
485
- }
486
- render() {
487
- return (index.h(index.Host, { role: "row" }, this.expandable && this._renderExpandHeader(), index.h("slot", null)));
488
- }
489
- };
490
- ZTableHeaderRow.style = stylesCss$3;
491
-
492
- const stylesCss$2 = "z-table-row{display:table-row;font-family:var(--font-family-sans)}z-table-row[expanded-type=\"expandable\"]:hover{cursor:pointer}z-table-row[expanded-type=\"expandable\"]>z-table-cell:first-child,z-table-row[expanded-type=\"padding\"]>z-table-cell:first-child{--z-icon-width:16px;--z-icon-height:16px;width:24px;padding-left:16px;padding-right:0px;box-sizing:border-box;text-align:center;fill:var(--gray800);user-select:none}.z-icon-placeholder{width:24px;padding-right:0px}z-table-row[expanded-type=\"expandable\"]>z-table-cell:nth-child(2),z-table-row[expanded-type=\"padding\"]>z-table-cell:nth-child(2){padding-left:8px}z-table-row[expanded-type]:hover>z-table-cell:first-child{fill:var(--myz-blue-dark)}z-table-row[expanded]>z-table-cell{background-color:var(--gray50)}z-table-row[expanded]+z-table-expanded-row{display:table-row}z-table-row[expanded]>z-table-cell{border-bottom:none}";
493
-
494
- const ZTableRow = class {
495
- constructor(hostRef) {
496
- index.registerInstance(this, hostRef);
497
- this.expand = index.createEvent(this, "expand", 7);
498
- this.expandedType = index$1.ZTableRowExpandedType.none;
499
- this.expanded = false;
500
- }
501
- emitOnExpand() {
502
- this.expand.emit({ expanded: this.expanded });
503
- }
504
- handleExpand() {
505
- this.expanded = !this.expanded;
506
- this.emitOnExpand();
507
- }
508
- renderExpandButton() {
509
- if (this.expandedType == index$1.ZTableRowExpandedType.expandable) {
510
- return (index.h("z-table-cell", { style: { borderRight: "none" } }, index.h("z-icon", { name: this.expanded ? "minus-circled" : "plus-circled" })));
511
- }
512
- return (index.h("z-table-cell", { style: { borderRight: "none" } }, index.h("div", { class: "z-icon-placeholder" })));
513
- }
514
- render() {
515
- return (index.h(index.Host, { role: "row", expanded: this.expanded, onClick: (event) => {
516
- const contextualMenuClick = event.target.nodeName === 'Z-CONTEXTUAL-MENU';
517
- const isExpandable = this.expandedType === index$1.ZTableRowExpandedType.expandable;
518
- if (isExpandable && !contextualMenuClick) {
519
- this.handleExpand();
520
- }
521
- } }, this.expandedType !== index$1.ZTableRowExpandedType.none &&
522
- this.renderExpandButton(), index.h("slot", null)));
523
- }
524
- };
525
- ZTableRow.style = stylesCss$2;
526
-
527
- const stylesCss$1 = ".sc-z-table-sticky-footer-h{display:block;position:sticky;left:0;padding:var(--basex2);background-color:var(--bg-white);border-style:solid;border-color:var(--gray200);border-width:var(--border-size-small) 0 var(--border-base);font-weight:var(--font-rg)}";
528
-
529
- const ZTableStickyFooter = class {
530
- constructor(hostRef) {
531
- index.registerInstance(this, hostRef);
532
- }
533
- render() {
534
- return (index.h("slot", null));
535
- }
536
- };
537
- ZTableStickyFooter.style = stylesCss$1;
538
-
539
- const stylesCss = ":host>*{font-family:var(--dashboard-font);margin:0}:host(.regular)>*{font-weight:var(--font-rg)}:host(.semibold)>*{font-weight:600}:host(.light)>*{font-weight:300}:host(.h1)>*{font-size:32px;line-height:40px}:host(.h2)>*{font-size:28px;line-height:36px}:host(.h3)>*{font-size:24px;line-height:32px}:host(.h4)>*{font-size:20px;line-height:28px}:host(.b1)>*{font-size:20px;line-height:28px}:host(.b2)>*{font-size:18px;line-height:28px}:host(.b3)>*{font-size:16px;line-height:24px}:host(.b4)>*{font-size:14px;line-height:20px}:host(.b5)>*{font-size:12px;line-height:16px}:host(:focus-visible){outline:none}";
540
-
541
- const ZTypography = class {
542
- constructor(hostRef) {
543
- index.registerInstance(this, hostRef);
544
- this.variant = "regular";
545
- }
546
- render() {
547
- const el = document.createElement(this.component || "span");
548
- el.innerHTML = `<slot />`;
549
- this.hostElement.shadowRoot.appendChild(el);
550
- return (index.h(index.Host, { class: {
551
- [this.level]: Boolean(this.level),
552
- regular: this.variant === "regular",
553
- semibold: this.variant === "semibold",
554
- light: this.variant === "light"
555
- } }));
556
- }
557
- get hostElement() { return index.getElement(this); }
558
- };
559
- ZTypography.style = stylesCss;
560
-
561
- exports.z_body = ZBody;
562
- exports.z_button = ZButton;
563
- exports.z_card = ZCard;
564
- exports.z_icon = ZIcon;
565
- exports.z_popover = ZPopover;
566
- exports.z_table = ZTable;
567
- exports.z_table_body = ZTableBody;
568
- exports.z_table_cell = ZTableCell;
569
- exports.z_table_empty_box = ZTableEmptyBox;
570
- exports.z_table_head = ZTableHead;
571
- exports.z_table_header = ZTableHeader;
572
- exports.z_table_header_row = ZTableHeaderRow;
573
- exports.z_table_row = ZTableRow;
574
- exports.z_table_sticky_footer = ZTableStickyFooter;
575
- exports.z_typography = ZTypography;