@zanichelli/albe-web-components 2.36.3 → 2.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/cjs/{index-3735f277.js → index-dcab1bda.js} +6 -0
  3. package/dist/cjs/index.cjs.js +2 -2
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{utils-6a2c0eab.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 +14 -3
  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 +6 -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-card/index.js +36 -7
  59. package/dist/collection/components/z-card/styles.css +26 -4
  60. package/dist/collection/components/z-carousel/index.js +19 -0
  61. package/dist/collection/components/z-carousel/styles.css +27 -0
  62. package/dist/esm/{index-f928c852.js → index-6b86a3f1.js} +7 -1
  63. package/dist/esm/index.js +2 -2
  64. package/dist/esm/loader.js +1 -1
  65. package/dist/esm/{utils-a219c3d4.js → utils-351595e0.js} +2 -2
  66. package/dist/esm/web-components-library.js +1 -1
  67. package/dist/esm/z-app-switcher.entry.js +1 -1
  68. package/dist/esm/z-app-topbar.entry.js +1 -1
  69. package/dist/esm/z-aria-alert.entry.js +1 -1
  70. package/dist/esm/z-avatar.entry.js +1 -1
  71. package/dist/esm/z-body_2.entry.js +35 -0
  72. package/dist/esm/z-button-filter_5.entry.js +2 -2
  73. package/dist/esm/z-button.entry.js +35 -0
  74. package/dist/esm/z-card.entry.js +14 -3
  75. package/dist/esm/z-carousel.entry.js +15 -0
  76. package/dist/esm/z-chip.entry.js +16 -6
  77. package/dist/esm/z-combobox.entry.js +2 -2
  78. package/dist/esm/z-contextual-menu.entry.js +1 -1
  79. package/dist/esm/z-cookiebar.entry.js +1 -1
  80. package/dist/esm/z-divider.entry.js +1 -1
  81. package/dist/esm/z-footer.entry.js +1 -1
  82. package/dist/esm/z-icon.entry.js +24 -0
  83. package/dist/esm/z-list_3.entry.js +1 -1
  84. package/dist/esm/z-menu-dropdown_2.entry.js +2 -2
  85. package/dist/esm/z-messages-pocket.entry.js +1 -1
  86. package/dist/esm/z-modal-login.entry.js +1 -1
  87. package/dist/esm/z-myz-card-alert.entry.js +1 -1
  88. package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
  89. package/dist/esm/z-myz-card-footer.entry.js +1 -1
  90. package/dist/esm/z-myz-card-info.entry.js +2 -2
  91. package/dist/esm/z-myz-card_4.entry.js +1 -1
  92. package/dist/esm/z-myz-list-item.entry.js +2 -2
  93. package/dist/esm/z-myz-topbar.entry.js +1 -1
  94. package/dist/esm/z-navigation-tabs.entry.js +1 -1
  95. package/dist/esm/z-notification.entry.js +1 -1
  96. package/dist/esm/z-otp.entry.js +1 -1
  97. package/dist/esm/z-pagination-bar.entry.js +2 -2
  98. package/dist/esm/z-pocket_3.entry.js +2 -2
  99. package/dist/esm/z-popover.entry.js +121 -0
  100. package/dist/esm/z-slideshow.entry.js +2 -2
  101. package/dist/esm/z-status-tag.entry.js +1 -1
  102. package/dist/esm/z-table-body.entry.js +20 -0
  103. package/dist/esm/z-table-cell.entry.js +32 -0
  104. package/dist/esm/z-table-empty-box.entry.js +28 -0
  105. package/dist/esm/z-table-head.entry.js +19 -0
  106. package/dist/esm/z-table-header-row.entry.js +18 -0
  107. package/dist/esm/z-table-header.entry.js +84 -0
  108. package/dist/esm/z-table-row.entry.js +39 -0
  109. package/dist/esm/z-table-sticky-footer.entry.js +15 -0
  110. package/dist/esm/z-table.entry.js +78 -0
  111. package/dist/esm/z-toast-notification-list.entry.js +1 -1
  112. package/dist/esm/z-toast-notification.entry.js +1 -1
  113. package/dist/esm/z-tooltip.entry.js +1 -1
  114. package/dist/types/beans/index.d.ts +6 -1
  115. package/dist/types/components/buttons/z-chip/index.d.ts +6 -0
  116. package/dist/types/components/z-card/index.d.ts +7 -1
  117. package/dist/types/components/z-carousel/index.d.ts +8 -0
  118. package/dist/types/components.d.ts +28 -1
  119. package/dist/web-components-library/index.esm.js +1 -1
  120. package/dist/web-components-library/{p-2df1936a.entry.js → p-02796506.entry.js} +1 -1
  121. package/dist/web-components-library/p-1094e4de.entry.js +1 -0
  122. package/dist/web-components-library/{p-306c18e8.entry.js → p-209cc06f.entry.js} +1 -1
  123. package/dist/web-components-library/{p-ded3311b.entry.js → p-28b18ca4.entry.js} +1 -1
  124. package/dist/web-components-library/p-3241471c.entry.js +1 -0
  125. package/dist/web-components-library/p-3b3cb18b.entry.js +1 -0
  126. package/dist/web-components-library/{p-aba4e402.entry.js → p-3d8b00fd.entry.js} +1 -1
  127. package/dist/web-components-library/{p-dedd49a7.entry.js → p-41f6c8c4.entry.js} +1 -1
  128. package/dist/web-components-library/p-4665d79f.entry.js +1 -0
  129. package/dist/web-components-library/p-48e0a763.entry.js +1 -0
  130. package/dist/web-components-library/p-4c1dc891.entry.js +1 -0
  131. package/dist/web-components-library/{p-46409367.entry.js → p-4c8e6232.entry.js} +1 -1
  132. package/dist/web-components-library/{p-5f30cea7.entry.js → p-509408f3.entry.js} +1 -1
  133. package/dist/web-components-library/p-597e767a.entry.js +1 -0
  134. package/dist/web-components-library/{p-a3fda8d7.entry.js → p-5d4bb66b.entry.js} +1 -1
  135. package/dist/web-components-library/{p-0fee9636.entry.js → p-5ee63e7f.entry.js} +1 -1
  136. package/dist/web-components-library/p-6934ea47.js +1 -0
  137. package/dist/web-components-library/{p-5ab81e9b.entry.js → p-71bb86a8.entry.js} +1 -1
  138. package/dist/web-components-library/p-733ba674.entry.js +1 -0
  139. package/dist/web-components-library/{p-fe3ab113.entry.js → p-74217d44.entry.js} +1 -1
  140. package/{www/build/p-e21ba6cb.entry.js → dist/web-components-library/p-7ce4db78.entry.js} +1 -1
  141. package/dist/web-components-library/{p-19784323.entry.js → p-8923f36d.entry.js} +1 -1
  142. package/dist/web-components-library/{p-33dc4f06.entry.js → p-89dbe6e9.entry.js} +1 -1
  143. package/dist/web-components-library/p-8c9e3bb8.entry.js +1 -0
  144. package/dist/web-components-library/p-8deddec7.entry.js +1 -0
  145. package/dist/web-components-library/{p-6a555104.entry.js → p-913cd0da.entry.js} +1 -1
  146. package/dist/web-components-library/{p-57ca60ca.entry.js → p-98a7eedb.entry.js} +1 -1
  147. package/dist/web-components-library/p-9af1322d.entry.js +1 -0
  148. package/dist/web-components-library/{p-42bbbe45.entry.js → p-9b2f8028.entry.js} +1 -1
  149. package/{www/build/p-94a60282.entry.js → dist/web-components-library/p-a0b11f65.entry.js} +1 -1
  150. package/dist/web-components-library/p-a3a64dc8.entry.js +1 -0
  151. package/dist/web-components-library/{p-d4ada94b.entry.js → p-a4fe497a.entry.js} +1 -1
  152. package/dist/web-components-library/{p-065c2661.entry.js → p-ba1db0fc.entry.js} +1 -1
  153. package/dist/web-components-library/{p-d41a8631.entry.js → p-bd717ced.entry.js} +1 -1
  154. package/dist/web-components-library/{p-44904136.entry.js → p-beda87c3.entry.js} +1 -1
  155. package/dist/web-components-library/{p-45352dbd.entry.js → p-bf4539a7.entry.js} +1 -1
  156. package/dist/web-components-library/{p-9cf0c400.entry.js → p-c6265fbb.entry.js} +1 -1
  157. package/dist/web-components-library/p-c8f19ca8.entry.js +1 -0
  158. package/dist/web-components-library/{p-8bb0c86d.entry.js → p-d1a52660.entry.js} +1 -1
  159. package/dist/web-components-library/p-d4c4b90a.entry.js +1 -0
  160. package/dist/web-components-library/p-d945c8d2.js +1 -0
  161. package/dist/web-components-library/p-ddc3c8c2.entry.js +1 -0
  162. package/dist/web-components-library/{p-72768e3c.entry.js → p-ded374d7.entry.js} +1 -1
  163. package/dist/web-components-library/{p-b725af3c.entry.js → p-e55fc434.entry.js} +1 -1
  164. package/dist/web-components-library/{p-8157eea6.entry.js → p-e6b971b9.entry.js} +1 -1
  165. package/dist/web-components-library/p-e84d871b.entry.js +1 -0
  166. package/dist/web-components-library/p-e9be115a.entry.js +1 -0
  167. package/dist/web-components-library/{p-f7ac7835.entry.js → p-ea84969a.entry.js} +1 -1
  168. package/dist/web-components-library/p-f7b1dc68.entry.js +1 -0
  169. package/dist/web-components-library/web-components-library.esm.js +1 -1
  170. package/package.json +1 -1
  171. package/react/components.d.ts +1 -0
  172. package/react/components.js +3 -2
  173. package/react/components.js.map +1 -1
  174. package/www/build/index.esm.js +1 -1
  175. package/www/build/{p-2df1936a.entry.js → p-02796506.entry.js} +1 -1
  176. package/www/build/p-1094e4de.entry.js +1 -0
  177. package/www/build/{p-306c18e8.entry.js → p-209cc06f.entry.js} +1 -1
  178. package/www/build/{p-ded3311b.entry.js → p-28b18ca4.entry.js} +1 -1
  179. package/www/build/p-3241471c.entry.js +1 -0
  180. package/www/build/p-3b3cb18b.entry.js +1 -0
  181. package/www/build/{p-aba4e402.entry.js → p-3d8b00fd.entry.js} +1 -1
  182. package/www/build/{p-dedd49a7.entry.js → p-41f6c8c4.entry.js} +1 -1
  183. package/www/build/p-4665d79f.entry.js +1 -0
  184. package/www/build/p-48e0a763.entry.js +1 -0
  185. package/www/build/p-4c1dc891.entry.js +1 -0
  186. package/www/build/{p-46409367.entry.js → p-4c8e6232.entry.js} +1 -1
  187. package/www/build/{p-5f30cea7.entry.js → p-509408f3.entry.js} +1 -1
  188. package/www/build/p-597e767a.entry.js +1 -0
  189. package/www/build/{p-a3fda8d7.entry.js → p-5d4bb66b.entry.js} +1 -1
  190. package/www/build/{p-0fee9636.entry.js → p-5ee63e7f.entry.js} +1 -1
  191. package/www/build/p-6934ea47.js +1 -0
  192. package/www/build/p-69f277e5.js +1 -0
  193. package/www/build/{p-5ab81e9b.entry.js → p-71bb86a8.entry.js} +1 -1
  194. package/www/build/p-733ba674.entry.js +1 -0
  195. package/www/build/{p-fe3ab113.entry.js → p-74217d44.entry.js} +1 -1
  196. package/{dist/web-components-library/p-e21ba6cb.entry.js → www/build/p-7ce4db78.entry.js} +1 -1
  197. package/www/build/{p-19784323.entry.js → p-8923f36d.entry.js} +1 -1
  198. package/www/build/{p-33dc4f06.entry.js → p-89dbe6e9.entry.js} +1 -1
  199. package/www/build/p-8c9e3bb8.entry.js +1 -0
  200. package/www/build/p-8deddec7.entry.js +1 -0
  201. package/www/build/{p-6a555104.entry.js → p-913cd0da.entry.js} +1 -1
  202. package/www/build/{p-57ca60ca.entry.js → p-98a7eedb.entry.js} +1 -1
  203. package/www/build/p-9af1322d.entry.js +1 -0
  204. package/www/build/{p-42bbbe45.entry.js → p-9b2f8028.entry.js} +1 -1
  205. package/{dist/web-components-library/p-94a60282.entry.js → www/build/p-a0b11f65.entry.js} +1 -1
  206. package/www/build/p-a3a64dc8.entry.js +1 -0
  207. package/www/build/{p-d4ada94b.entry.js → p-a4fe497a.entry.js} +1 -1
  208. package/www/build/{p-065c2661.entry.js → p-ba1db0fc.entry.js} +1 -1
  209. package/www/build/{p-d41a8631.entry.js → p-bd717ced.entry.js} +1 -1
  210. package/www/build/{p-44904136.entry.js → p-beda87c3.entry.js} +1 -1
  211. package/www/build/{p-45352dbd.entry.js → p-bf4539a7.entry.js} +1 -1
  212. package/www/build/{p-9cf0c400.entry.js → p-c6265fbb.entry.js} +1 -1
  213. package/www/build/p-c8f19ca8.entry.js +1 -0
  214. package/www/build/{p-8bb0c86d.entry.js → p-d1a52660.entry.js} +1 -1
  215. package/www/build/p-d4c4b90a.entry.js +1 -0
  216. package/www/build/p-d945c8d2.js +1 -0
  217. package/www/build/p-ddc3c8c2.entry.js +1 -0
  218. package/www/build/{p-72768e3c.entry.js → p-ded374d7.entry.js} +1 -1
  219. package/www/build/{p-b725af3c.entry.js → p-e55fc434.entry.js} +1 -1
  220. package/www/build/{p-8157eea6.entry.js → p-e6b971b9.entry.js} +1 -1
  221. package/www/build/p-e84d871b.entry.js +1 -0
  222. package/www/build/p-e9be115a.entry.js +1 -0
  223. package/www/build/{p-f7ac7835.entry.js → p-ea84969a.entry.js} +1 -1
  224. package/www/build/p-ea943cbd.css +1 -0
  225. package/www/build/p-f7b1dc68.entry.js +1 -0
  226. package/www/build/web-components-library.esm.js +1 -1
  227. package/www/index.html +17 -29
  228. package/dist/cjs/z-body_14.cjs.entry.js +0 -513
  229. package/dist/esm/z-body_14.entry.js +0 -496
  230. package/dist/web-components-library/p-3dce95ce.js +0 -1
  231. package/dist/web-components-library/p-795f0a47.entry.js +0 -1
  232. package/dist/web-components-library/p-9f241f4c.js +0 -1
  233. package/dist/web-components-library/p-b18566a3.entry.js +0 -1
  234. package/dist/web-components-library/p-b36031be.entry.js +0 -1
  235. package/dist/web-components-library/p-ece1037e.entry.js +0 -1
  236. package/dist/web-components-library/p-f8446b1e.entry.js +0 -1
  237. package/www/build/p-3dce95ce.js +0 -1
  238. package/www/build/p-795f0a47.entry.js +0 -1
  239. package/www/build/p-97a11655.css +0 -789
  240. package/www/build/p-9f241f4c.js +0 -1
  241. package/www/build/p-ad764532.js +0 -122
  242. package/www/build/p-b18566a3.entry.js +0 -1
  243. package/www/build/p-b36031be.entry.js +0 -1
  244. package/www/build/p-ece1037e.entry.js +0 -1
  245. package/www/build/p-f8446b1e.entry.js +0 -1
@@ -0,0 +1,88 @@
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-dcab1bda.js');
8
+ const utils = require('./utils-971854fc.js');
9
+ require('./_commonjsHelpers-119ffc74.js');
10
+ require('./breakpoints-88c4fd6c.js');
11
+
12
+ const stylesCss = ":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}";
13
+
14
+ const ZTableHeader = class {
15
+ constructor(hostRef) {
16
+ index.registerInstance(this, hostRef);
17
+ this.sort = index.createEvent(this, "sort", 7);
18
+ /** Set padding size of cell, if special 0px padding will be set */
19
+ this.padding = index$1.Size.medium;
20
+ /** [Optional] Default sort order */
21
+ this.defaultSortDirection = index$1.SortDirectionEnum.asc;
22
+ this.sortDirection = index$1.SortDirectionEnum.none;
23
+ this.isMenuOpened = false;
24
+ this.emitOnSort = this.emitOnSort.bind(this);
25
+ }
26
+ emitOnSort() {
27
+ this.sort.emit({
28
+ columnId: this.columnId,
29
+ sortDirection: this.sortDirection,
30
+ });
31
+ }
32
+ handleSort() {
33
+ if (!this.sortable) {
34
+ return;
35
+ }
36
+ this.sortDirection = (() => {
37
+ switch (this.sortDirection) {
38
+ case index$1.SortDirectionEnum.asc:
39
+ return index$1.SortDirectionEnum.desc;
40
+ case index$1.SortDirectionEnum.desc:
41
+ return index$1.SortDirectionEnum.asc;
42
+ case index$1.SortDirectionEnum.none:
43
+ return this.defaultSortDirection;
44
+ default:
45
+ return index$1.SortDirectionEnum.none;
46
+ }
47
+ })();
48
+ this.emitOnSort();
49
+ }
50
+ handleMenuClick() {
51
+ this.isMenuOpened = !this.isMenuOpened;
52
+ }
53
+ handleOutsideClick(e) {
54
+ const tree = utils.getElementTree(e.target);
55
+ const parent = tree.find((elem) => elem.nodeName.toLowerCase() === "z-popover");
56
+ if (!parent) {
57
+ this.isMenuOpened = false;
58
+ }
59
+ }
60
+ handleClickHeaders(e) {
61
+ const { target } = e;
62
+ const parent = utils.getElementTree(target).find((elem) => elem.nodeName.toLowerCase() === "z-table-header");
63
+ if (!this.sortable || !parent) {
64
+ return;
65
+ }
66
+ const parentColumnId = parent.attributes.getNamedItem("column-id").value;
67
+ const isSortable = target.parentNode.sortable || target.sortable;
68
+ if (parentColumnId !== this.columnId && isSortable) {
69
+ this.sortDirection = index$1.SortDirectionEnum.none;
70
+ }
71
+ }
72
+ componentWillRender() {
73
+ this.host.setAttribute("role", "columnheader");
74
+ }
75
+ render() {
76
+ return (index.h(index.Host, { class: index$2.classnames({
77
+ sortable: this.sortable,
78
+ }), 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
79
+ ? "arrow-up"
80
+ : "arrow-down", class: "arrow" }))), this.showButton && (index.h("div", { class: index$2.classnames("popover-container", {
81
+ visible: this.isMenuOpened,
82
+ }) }, 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" })))))));
83
+ }
84
+ get host() { return index.getElement(this); }
85
+ };
86
+ ZTableHeader.style = stylesCss;
87
+
88
+ exports.z_table_header = ZTableHeader;
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-dee3e21d.js');
6
+ const index$1 = require('./index-dcab1bda.js');
7
+
8
+ const stylesCss = "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}";
9
+
10
+ const ZTableRow = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.expand = index.createEvent(this, "expand", 7);
14
+ this.expandedType = index$1.ZTableRowExpandedType.none;
15
+ this.expanded = false;
16
+ }
17
+ emitOnExpand() {
18
+ this.expand.emit({ expanded: this.expanded });
19
+ }
20
+ handleExpand() {
21
+ this.expanded = !this.expanded;
22
+ this.emitOnExpand();
23
+ }
24
+ renderExpandButton() {
25
+ if (this.expandedType == index$1.ZTableRowExpandedType.expandable) {
26
+ return (index.h("z-table-cell", { style: { borderRight: "none" } }, index.h("z-icon", { name: this.expanded ? "minus-circled" : "plus-circled" })));
27
+ }
28
+ return (index.h("z-table-cell", { style: { borderRight: "none" } }, index.h("div", { class: "z-icon-placeholder" })));
29
+ }
30
+ render() {
31
+ return (index.h(index.Host, { role: "row", expanded: this.expanded, onClick: (event) => {
32
+ const contextualMenuClick = event.target.nodeName === 'Z-CONTEXTUAL-MENU';
33
+ const isExpandable = this.expandedType === index$1.ZTableRowExpandedType.expandable;
34
+ if (isExpandable && !contextualMenuClick) {
35
+ this.handleExpand();
36
+ }
37
+ } }, this.expandedType !== index$1.ZTableRowExpandedType.none &&
38
+ this.renderExpandButton(), index.h("slot", null)));
39
+ }
40
+ };
41
+ ZTableRow.style = stylesCss;
42
+
43
+ exports.z_table_row = ZTableRow;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-dee3e21d.js');
6
+
7
+ const stylesCss = ".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)}";
8
+
9
+ const ZTableStickyFooter = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ }
13
+ render() {
14
+ return (index.h("slot", null));
15
+ }
16
+ };
17
+ ZTableStickyFooter.style = stylesCss;
18
+
19
+ exports.z_table_sticky_footer = ZTableStickyFooter;
@@ -0,0 +1,82 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-dee3e21d.js');
6
+ const index$1 = require('./index-dcab1bda.js');
7
+ const breakpoints = require('./breakpoints-88c4fd6c.js');
8
+
9
+ const stylesCss = "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}}";
10
+
11
+ const ZTable = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ this.callToAction = index.createEvent(this, "callToAction", 7);
15
+ this.callToActionTwo = index.createEvent(this, "callToActionTwo", 7);
16
+ /** Error message */
17
+ this.errorMessage = "Siamo spiacenti, non siamo riusciti a caricare il contenuto richiesto";
18
+ /** Sets table with border */
19
+ this.bordered = false;
20
+ /** Sets first column sticky */
21
+ this.columnSticky = false;
22
+ /** Sets empty table */
23
+ this.empty = false;
24
+ /** Set error status */
25
+ this.error = false;
26
+ /** Sets header sticky */
27
+ this.headerSticky = false;
28
+ /** Set message */
29
+ this.message = "Siamo spiacenti, al momento non sono presenti dati da visualizzare";
30
+ /** Set subtitle */
31
+ this.subtitle = "";
32
+ }
33
+ handleResize() {
34
+ this.isMobile = window.innerWidth <= breakpoints.mobileBreakpoint;
35
+ }
36
+ handleOrientationChange() {
37
+ this.isMobile = screen.width <= breakpoints.mobileBreakpoint;
38
+ }
39
+ componentWillLoad() {
40
+ var _a;
41
+ this.isMobile = window.innerWidth <= breakpoints.mobileBreakpoint;
42
+ const tableBody = this.host.querySelector('[slot="table-body"]');
43
+ this.hasTableBody = !!((_a = tableBody === null || tableBody === void 0 ? void 0 : tableBody.children) === null || _a === void 0 ? void 0 : _a.length);
44
+ if (!!tableBody && !this.hasTableBody) {
45
+ tableBody.remove();
46
+ }
47
+ }
48
+ componentWillRender() {
49
+ this.host.setAttribute("role", "table");
50
+ }
51
+ renderError(tableClass) {
52
+ const minHeight = this.lines ? `calc(40px * ${this.lines})` : "auto";
53
+ 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" }))))));
54
+ }
55
+ renderEmpty(tableClass) {
56
+ const buttonSize = this.isMobile
57
+ ? index$1.ButtonSizeEnum.small
58
+ : index$1.ButtonSizeEnum.big;
59
+ const tableContentClass = `${!!this.hasTableBody ? "table-content" : ""}`;
60
+ if (this.hasTableBody) {
61
+ 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)))))));
62
+ }
63
+ 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)))));
64
+ }
65
+ render() {
66
+ const tableClass = `table ${this.empty ? "table-empty" : ""} ${this.bordered ? "table-bordered" : ""}
67
+ ${this.columnSticky ? "table-column-sticky" : ""}
68
+ ${this.headerSticky ? "table-header-sticky" : ""}`;
69
+ if (this.error) {
70
+ return this.renderError(tableClass);
71
+ }
72
+ if (this.empty) {
73
+ return this.renderEmpty(tableClass);
74
+ }
75
+ return (index.h(index.Host, null, index.h("div", { class: tableClass }, index.h("slot", null)), index.h("slot", { name: "sticky-footer" })));
76
+ }
77
+ static get assetsDirs() { return ["assets"]; }
78
+ get host() { return index.getElement(this); }
79
+ };
80
+ ZTable.style = stylesCss;
81
+
82
+ exports.z_table = ZTable;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-dee3e21d.js');
6
- const index$1 = require('./index-3735f277.js');
6
+ const index$1 = require('./index-dcab1bda.js');
7
7
 
8
8
  const stylesCss = ":host{font-family:var(--font-family-sans);font-weight:var(--font-rg);position:fixed;display:flex;flex-direction:column;flex-wrap:nowrap;z-index:10000;margin-bottom:calc(var(--space-unit) * 2);margin-top:calc(var(--space-unit) * 2)}::slotted(z-toast-notification){width:100vw}::slotted(:not(:last-child)){margin-bottom:calc(var(--space-unit) * 1)}:host(.bottom-centre),:host(.bottom-right),:host(.bottom-left){justify-content:flex-end;align-items:flex-end;bottom:0}:host(.top-left),:host(.top-right),:host(.top-centre){justify-content:flex-start;align-items:flex-start;top:0}@media only screen and (min-width: 768px){:host{margin:calc(var(--space-unit) * 3)}:host(.top-centre){justify-content:flex-start;align-items:center;top:0;left:50%;transform:translateX(-50%)}:host(.top-left){justify-content:flex-start;align-items:flex-start;top:0;left:0}:host(.top-right){justify-content:flex-start;align-items:flex-end;top:0;right:0}:host(.bottom-centre){justify-content:flex-end;align-items:center;bottom:0;left:50%;transform:translateX(-50%)}:host(.bottom-right){justify-content:flex-end;align-items:flex-end;bottom:0;right:0}:host(.bottom-left){justify-content:flex-end;align-items:flex-start;bottom:0;left:0}::slotted(z-toast-notification){width:50vw}}@media only screen and (min-width: 1366px){:host{margin:calc(var(--space-unit) * 4)}::slotted(z-toast-notification){width:33vw}}";
9
9
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-dee3e21d.js');
6
- const index$1 = require('./index-3735f277.js');
6
+ const index$1 = require('./index-dcab1bda.js');
7
7
  const breakpoints = require('./breakpoints-88c4fd6c.js');
8
8
  const hammer = require('./hammer-54230951.js');
9
9
  require('./_commonjsHelpers-119ffc74.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-dee3e21d.js');
6
- const index$1 = require('./index-3735f277.js');
6
+ const index$1 = require('./index-dcab1bda.js');
7
7
 
8
8
  const stylesCss = ":host{--z-tooltip-theme--surface:var(--color-surface01);--z-tooltip-theme--text:var(--color-text01);--arrow-size:6px;--edge-offset:calc(-1 * (var(--arrow-size) + calc(var(--space-unit) * 2)));position:relative;display:none;align-items:center;justify-content:center;padding:var(--space-unit);min-width:calc(var(--space-unit) * 8);min-height:calc(var(--space-unit) * 4);color:var(--z-tooltip-theme--text);fill:currentColor;font-family:var(--font-family-sans);text-align:center;border-radius:var(--border-radius-small);background:var(--z-tooltip-theme--surface);filter:drop-shadow(0 4px 8px var(--shadow-color-base));will-change:filter}:host(.legacy){display:inline-flex;padding:calc(var(--space-unit) * 2);min-width:auto;min-height:auto;max-width:200px;font-style:italic;line-height:16px;letter-spacing:0.32px;font-size:12px;border:var(--border-size-small) solid var(--gray200);border-radius:var(--border-radius);filter:drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.08))}:host(.legacy)::before{--arrow-size:14px}:host([position])::before{--arrow-edge-offset:calc(100% - var(--arrow-size) - var(--space-unit));--arrow-center-x-offset:calc(50% - calc(var(--arrow-size) / 2));--arrow-center-y-offset:calc(100% - calc(var(--arrow-size) / 2));content:'';position:absolute;width:var(--arrow-size);height:var(--arrow-size);background:inherit;transform:rotate(45deg)}:host([open][style*='top:']),:host([open][style*='inset:']){display:inline-flex}:host([position^='top']){margin-bottom:var(--space-unit)}:host([position='right']){margin-left:var(--space-unit)}:host([position='top_right']),:host([position='bottom_right']){margin-left:var(--edge-offset)}:host([position^='bottom']){margin-top:var(--space-unit)}:host([position='left']){margin-right:var(--space-unit)}:host([position='top_left']),:host([position='bottom_left']){margin-right:var(--edge-offset)}:host([position^='top'])::before{top:var(--arrow-center-y-offset)}:host([position^='bottom'])::before{bottom:var(--arrow-center-y-offset)}:host([position='top'])::before,:host([position='bottom'])::before{left:var(--arrow-center-x-offset)}:host([position='right'])::before,:host([position='left'])::before{top:var(--arrow-center-x-offset)}:host([position='right'])::before{right:var(--arrow-center-y-offset)}:host([position='top_right'])::before,:host([position='bottom_right'])::before{right:var(--arrow-edge-offset)}:host([position='left'])::before{left:var(--arrow-center-y-offset)}:host([position='top_left'])::before,:host([position='bottom_left'])::before{left:var(--arrow-edge-offset)}::slotted(*){flex:1 auto;overflow:auto}";
9
9
 
@@ -9,6 +9,7 @@ export var CardVariants;
9
9
  CardVariants["border"] = "border";
10
10
  CardVariants["shadow"] = "shadow";
11
11
  CardVariants["overlay"] = "overlay";
12
+ CardVariants["text"] = "text";
12
13
  })(CardVariants || (CardVariants = {}));
13
14
  export var TabOrientationEnum;
14
15
  (function (TabOrientationEnum) {
@@ -252,3 +253,8 @@ export var ZAriaAlertMode;
252
253
  ZAriaAlertMode["polite"] = "polite";
253
254
  ZAriaAlertMode["assertive"] = "assertive";
254
255
  })(ZAriaAlertMode || (ZAriaAlertMode = {}));
256
+ export var ZChipType;
257
+ (function (ZChipType) {
258
+ ZChipType["default"] = "default";
259
+ ZChipType["mini"] = "mini";
260
+ })(ZChipType || (ZChipType = {}));
@@ -50,6 +50,7 @@
50
50
  "./components/z-aria-alert/index.js",
51
51
  "./components/z-avatar/index.js",
52
52
  "./components/z-card/index.js",
53
+ "./components/z-carousel/index.js",
53
54
  "./components/z-contextual-menu/index.js",
54
55
  "./components/z-divider/index.js",
55
56
  "./components/z-ghost-loading/index.js",
@@ -1,16 +1,28 @@
1
- import { Component, Prop, h } from '@stencil/core';
1
+ import { Component, Prop, h, Element } from "@stencil/core";
2
+ import { ZChipType } from "../../../beans";
2
3
  export class ZChip {
4
+ constructor() {
5
+ this.disabled = false;
6
+ this.filter = false;
7
+ }
3
8
  renderLegacyChip() {
4
- return h("div", null,
9
+ return (h("div", null,
5
10
  h("span", { class: "boldtext" }, this.boldtext),
6
11
  " ",
7
- this.regulartext);
12
+ this.regulartext));
13
+ }
14
+ renderFilterChip() {
15
+ if (this.filter) {
16
+ return (h("button", { class: this.type ? this.type : ZChipType.default, disabled: this.disabled, tabindex: "0" },
17
+ h("slot", null)));
18
+ }
19
+ return (h("div", { class: this.type ? this.type : "" },
20
+ h("slot", null)));
8
21
  }
9
22
  render() {
10
- return this.boldtext != null || this.regulartext != null ?
11
- this.renderLegacyChip() :
12
- h("div", null,
13
- h("slot", null));
23
+ return this.boldtext != null || this.regulartext != null
24
+ ? this.renderLegacyChip()
25
+ : this.renderFilterChip();
14
26
  }
15
27
  static get is() { return "z-chip"; }
16
28
  static get encapsulation() { return "shadow"; }
@@ -54,6 +66,65 @@ export class ZChip {
54
66
  },
55
67
  "attribute": "boldtext",
56
68
  "reflect": false
69
+ },
70
+ "type": {
71
+ "type": "string",
72
+ "mutable": false,
73
+ "complexType": {
74
+ "original": "ZChipType",
75
+ "resolved": "ZChipType.default | ZChipType.mini",
76
+ "references": {
77
+ "ZChipType": {
78
+ "location": "import",
79
+ "path": "../../../beans"
80
+ }
81
+ }
82
+ },
83
+ "required": false,
84
+ "optional": true,
85
+ "docs": {
86
+ "tags": [],
87
+ "text": ""
88
+ },
89
+ "attribute": "type",
90
+ "reflect": true
91
+ },
92
+ "disabled": {
93
+ "type": "boolean",
94
+ "mutable": false,
95
+ "complexType": {
96
+ "original": "boolean",
97
+ "resolved": "boolean",
98
+ "references": {}
99
+ },
100
+ "required": false,
101
+ "optional": true,
102
+ "docs": {
103
+ "tags": [],
104
+ "text": ""
105
+ },
106
+ "attribute": "disabled",
107
+ "reflect": true,
108
+ "defaultValue": "false"
109
+ },
110
+ "filter": {
111
+ "type": "boolean",
112
+ "mutable": false,
113
+ "complexType": {
114
+ "original": "boolean",
115
+ "resolved": "boolean",
116
+ "references": {}
117
+ },
118
+ "required": false,
119
+ "optional": true,
120
+ "docs": {
121
+ "tags": [],
122
+ "text": ""
123
+ },
124
+ "attribute": "filter",
125
+ "reflect": true,
126
+ "defaultValue": "false"
57
127
  }
58
128
  }; }
129
+ static get elementRef() { return "hostElement"; }
59
130
  }
@@ -1,3 +1,14 @@
1
+ :host > button {
2
+ display: inline-block;
3
+ padding: 0 calc(var(--space-unit) * 1.5);
4
+ background-color: var(--bg-white);
5
+ border: var(--border-size-medium) solid var(--bg-grey-200);
6
+ color: var(--text-grey-800);
7
+ fill: var(--text-grey-800);
8
+ font-family: var(--dashboard-font);
9
+ font-size: 14px;
10
+ }
11
+
1
12
  :host > div {
2
13
  display: inline-block;
3
14
  min-height: 28px;
@@ -15,3 +26,58 @@
15
26
  .boldtext {
16
27
  font-weight: bold;
17
28
  }
29
+
30
+ :host > button:hover {
31
+ color: var(--myz-blue-dark);
32
+ }
33
+
34
+ :host > button:disabled {
35
+ border: var(--border-size-medium) solid var(--bg-grey-200);
36
+ color: rgb(149, 153, 157);
37
+ box-shadow: none;
38
+ }
39
+
40
+ :host > button.default:focus:focus-visible,
41
+ :host > button.mini:focus:focus-visible {
42
+ box-shadow: var(--shadow-focus-primary);
43
+ outline: none;
44
+ }
45
+
46
+ :host > button:not(:disabled):active {
47
+ background-color: var(--gray50);
48
+ }
49
+
50
+ :host > button.default,
51
+ :host > div.default {
52
+ min-height: 44px;
53
+ border-radius: 22px;
54
+ line-height: 44px;
55
+ }
56
+
57
+ :host > button.mini,
58
+ :host > div.mini {
59
+ min-height: 36px;
60
+ border-radius: 22px;
61
+ line-height: 36px;
62
+ }
63
+
64
+ /* Desktop breakpoint */
65
+ @media only screen and (min-width: 1152px) {
66
+ :host > button {
67
+ font-size: 12px;
68
+ }
69
+
70
+ :host > button.default,
71
+ :host > div.default {
72
+ min-height: 32px;
73
+ border-radius: 16px;
74
+ line-height: 32px;
75
+ }
76
+
77
+ :host > button.mini,
78
+ :host > div.mini {
79
+ min-height: 24px;
80
+ border-radius: 16px;
81
+ line-height: 24px;
82
+ }
83
+ }
@@ -4,6 +4,8 @@ export class ZCard {
4
4
  constructor() {
5
5
  /** Enable click interactions on the card. Default: false */
6
6
  this.clickable = false;
7
+ /** Enable shadow. Default: false. */
8
+ this.showshadow = false;
7
9
  }
8
10
  onClick(ev) {
9
11
  // Do nothing for clicks on actions.
@@ -37,7 +39,21 @@ export class ZCard {
37
39
  h("slot", { name: "action" })))
38
40
  ];
39
41
  }
42
+ /**
43
+ * Template for the content div.
44
+ */
45
+ renderContentDiv() {
46
+ return (h("div", { class: "content" },
47
+ h("slot", { name: "metadata" }),
48
+ h("slot", { name: "title" }),
49
+ h("slot", { name: "text" }),
50
+ h("div", { class: "actions" },
51
+ h("slot", { name: "action" }))));
52
+ }
40
53
  render() {
54
+ if (this.variant === CardVariants.text) {
55
+ return this.renderContentDiv();
56
+ }
41
57
  if (this.variant === CardVariants.overlay || this.hasCoverImage) {
42
58
  return [
43
59
  h("div", { class: "cover-container" },
@@ -46,12 +62,7 @@ export class ZCard {
46
62
  (this.variant !== CardVariants.overlay) && this.coverIcon && h("z-icon", { name: this.coverIcon })
47
63
  ],
48
64
  !this.hasCoverImage && h("div", { class: "color-cover" })),
49
- h("div", { class: "content" },
50
- h("slot", { name: "metadata" }),
51
- h("slot", { name: "title" }),
52
- h("slot", { name: "text" }),
53
- h("div", { class: "actions" },
54
- h("slot", { name: "action" })))
65
+ this.renderContentDiv()
55
66
  ];
56
67
  }
57
68
  return this.renderColorCoverCard();
@@ -70,7 +81,7 @@ export class ZCard {
70
81
  "mutable": false,
71
82
  "complexType": {
72
83
  "original": "CardVariants",
73
- "resolved": "CardVariants.border | CardVariants.overlay | CardVariants.shadow",
84
+ "resolved": "CardVariants.border | CardVariants.overlay | CardVariants.shadow | CardVariants.text",
74
85
  "references": {
75
86
  "CardVariants": {
76
87
  "location": "import",
@@ -121,6 +132,24 @@ export class ZCard {
121
132
  "attribute": "clickable",
122
133
  "reflect": true,
123
134
  "defaultValue": "false"
135
+ },
136
+ "showshadow": {
137
+ "type": "boolean",
138
+ "mutable": false,
139
+ "complexType": {
140
+ "original": "boolean",
141
+ "resolved": "boolean",
142
+ "references": {}
143
+ },
144
+ "required": false,
145
+ "optional": false,
146
+ "docs": {
147
+ "tags": [],
148
+ "text": "Enable shadow. Default: false."
149
+ },
150
+ "attribute": "showshadow",
151
+ "reflect": true,
152
+ "defaultValue": "false"
124
153
  }
125
154
  }; }
126
155
  static get states() { return {
@@ -6,6 +6,9 @@ respecting the grid indications of the design. */
6
6
  --aspect-ratio: 1.62;
7
7
  --z-card--border-color: var(--gray200);
8
8
  --z-card--color-cover-background: var(--color-surface01);
9
+ --z-card--text-background: var(--color-surface01);
10
+ --z-card--text-border-radius: none;
11
+ --z-card--text-border: none;
9
12
 
10
13
  position: relative;
11
14
  display: flex;
@@ -128,12 +131,23 @@ Unfortunately the `aspect-ratio` property is still experimental */
128
131
  box-shadow: var(--shadow-focus-primary);
129
132
  }
130
133
 
134
+ :host([variant='text']) {
135
+ background-color: var(--z-card--text-background);
136
+ border: var(--z-card--text-border);
137
+ border-radius: var(--z-card--text-border-radius);
138
+ }
139
+
140
+ :host([showshadow]) > .content,
131
141
  :host([variant='border']) > .content,
132
142
  :host([variant='shadow']) > .content {
133
143
  height: 100%;
134
144
  padding: var(--space-unit) var(--space-unit) calc(var(--space-unit) * 2);
135
145
  }
136
146
 
147
+ :host([variant='text']) > .content {
148
+ padding: calc(var(--space-unit) * 2) var(--space-unit)
149
+ }
150
+
137
151
  :host([variant='border']) .actions,
138
152
  :host([variant='shadow']) .actions {
139
153
  margin-top: auto;
@@ -157,19 +171,27 @@ Unfortunately the `aspect-ratio` property is still experimental */
157
171
  }
158
172
 
159
173
  /* Shadow */
160
- :host([variant='shadow']) {
174
+ :host([variant='shadow']),
175
+ :host([showshadow])
176
+ {
161
177
  box-shadow: var(--shadow-2);
162
178
  }
163
179
 
164
- :host([variant='shadow'][clickable]:hover) {
180
+ :host([variant='shadow'][clickable]:hover),
181
+ :host([clickable][showshadow]:hover)
182
+ {
165
183
  box-shadow: var(--shadow-4);
166
184
  }
167
185
 
168
- :host([variant='shadow'][clickable]:focus:focus-visible) {
186
+ :host([variant='shadow'][clickable]:focus:focus-visible),
187
+ :host([clickable][showshadow]:focus:focus-visible)
188
+ {
169
189
  box-shadow: var(--shadow-4);
170
190
  }
171
191
 
172
- :host([variant='shadow'][clickable]:active) {
192
+ :host([variant='shadow'][clickable]:active),
193
+ :host([clickable][showshadow]:active)
194
+ {
173
195
  box-shadow: none;
174
196
  }
175
197
 
@@ -0,0 +1,19 @@
1
+ import { Component, h } from "@stencil/core";
2
+ /**
3
+ * ZCarousel component.
4
+ * @cssprop --z-carousel-gutter - The gutter between items.
5
+ * @slot - carousel items. use `<li>` elements inside this slot as it is wrapped inside an `<ul>`
6
+ */
7
+ export class ZCarousel {
8
+ render() {
9
+ return (h("ul", { class: "z-carousel-items-container" },
10
+ h("slot", null)));
11
+ }
12
+ static get is() { return "z-carousel"; }
13
+ static get originalStyleUrls() { return {
14
+ "$": ["styles.css"]
15
+ }; }
16
+ static get styleUrls() { return {
17
+ "$": ["styles.css"]
18
+ }; }
19
+ }
@@ -0,0 +1,27 @@
1
+ :host {
2
+ font-family: var(--font-family-sans);
3
+ font-weight: var(--font-rg);
4
+
5
+ --z-carousel-gutter: 0;
6
+ }
7
+
8
+ .z-carousel-items-container {
9
+ display: flex;
10
+ overflow-x: scroll;
11
+ padding-inline-start: 0;
12
+ margin: 0;
13
+ list-style: none;
14
+
15
+ /* Hide scrollbar for IE, Edge and Firefox */
16
+ -ms-overflow-style: none; /* IE and Edge */
17
+ scrollbar-width: none; /* Firefox */
18
+ }
19
+
20
+ /* Hide scrollbar for Chrome, Safari and Opera */
21
+ .z-carousel-items-container::-webkit-scrollbar {
22
+ display: none;
23
+ }
24
+
25
+ .z-carousel-items-container > *:not(:last-child) {
26
+ margin-right: var(--z-carousel-gutter);
27
+ }