@zanichelli/albe-web-components 2.46.1 → 2.47.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 (250) hide show
  1. package/CHANGELOG.md +1564 -0
  2. package/dist/cjs/{index-155b2ec5.js → index-d326c919.js} +11 -9
  3. package/dist/cjs/index.cjs.js +2 -2
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{utils-4bbd782c.js → utils-cd6b9038.js} +1 -1
  6. package/dist/cjs/web-components-library.cjs.js +1 -1
  7. package/dist/cjs/z-app-switcher_11.cjs.entry.js +1 -1
  8. package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
  9. package/dist/cjs/z-avatar.cjs.entry.js +1 -1
  10. package/dist/cjs/z-button-filter_5.cjs.entry.js +2 -2
  11. package/dist/cjs/z-chip-deprecated.cjs.entry.js +24 -0
  12. package/dist/cjs/z-chip.cjs.entry.js +15 -14
  13. package/dist/cjs/z-combobox.cjs.entry.js +2 -2
  14. package/dist/cjs/z-contextual-menu.cjs.entry.js +1 -1
  15. package/dist/cjs/z-cookiebar.cjs.entry.js +1 -1
  16. package/dist/cjs/z-date-picker.cjs.entry.js +1 -1
  17. package/dist/cjs/z-file-upload.cjs.entry.js +3 -3
  18. package/dist/cjs/z-file.cjs.entry.js +7 -12
  19. package/dist/cjs/z-footer.cjs.entry.js +1 -1
  20. package/dist/cjs/z-list_3.cjs.entry.js +1 -1
  21. package/dist/cjs/z-menu-dropdown_2.cjs.entry.js +2 -2
  22. package/dist/cjs/z-messages-pocket.cjs.entry.js +1 -1
  23. package/dist/cjs/z-modal-login.cjs.entry.js +1 -1
  24. package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
  25. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
  26. package/dist/cjs/z-myz-card-footer.cjs.entry.js +7 -3
  27. package/dist/cjs/z-myz-card-info.cjs.entry.js +2 -2
  28. package/dist/cjs/z-myz-card_4.cjs.entry.js +8 -5
  29. package/dist/cjs/z-myz-list-item.cjs.entry.js +2 -2
  30. package/dist/cjs/z-myz-topbar.cjs.entry.js +1 -1
  31. package/dist/cjs/z-navigation-tab-link.cjs.entry.js +2 -2
  32. package/dist/cjs/z-navigation-tab.cjs.entry.js +2 -2
  33. package/dist/cjs/z-navigation-tabs.cjs.entry.js +1 -1
  34. package/dist/cjs/z-otp.cjs.entry.js +1 -1
  35. package/dist/cjs/z-pagination-bar.cjs.entry.js +2 -2
  36. package/dist/cjs/z-pocket_3.cjs.entry.js +2 -2
  37. package/dist/cjs/z-popover.cjs.entry.js +2 -2
  38. package/dist/cjs/z-section-title.cjs.entry.js +1 -1
  39. package/dist/cjs/z-slideshow.cjs.entry.js +2 -2
  40. package/dist/cjs/z-status-tag.cjs.entry.js +1 -1
  41. package/dist/cjs/z-table-cell.cjs.entry.js +1 -1
  42. package/dist/cjs/z-table-header.cjs.entry.js +2 -2
  43. package/dist/cjs/z-table-row.cjs.entry.js +1 -1
  44. package/dist/cjs/z-table.cjs.entry.js +1 -1
  45. package/dist/cjs/z-tag.cjs.entry.js +22 -0
  46. package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
  47. package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
  48. package/dist/cjs/z-toggle-switch.cjs.entry.js +2 -2
  49. package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
  50. package/dist/collection/beans/index.js +11 -9
  51. package/dist/collection/collection-manifest.json +4 -2
  52. package/dist/collection/components/buttons/z-chip/index.js +48 -50
  53. package/dist/collection/components/buttons/z-chip/styles.css +90 -32
  54. package/dist/collection/components/file-upload/z-file/index.js +15 -16
  55. package/dist/collection/components/file-upload/z-file/styles.css +2 -27
  56. package/dist/collection/components/file-upload/z-file-upload/index.js +1 -1
  57. package/dist/collection/components/navigation/tabs/navigation-tab.css +8 -7
  58. package/dist/collection/components/navigation/tabs/z-navigation-tab-link/index.js +2 -2
  59. package/dist/collection/components/z-tag/index.js +62 -0
  60. package/dist/collection/components/z-tag/styles.css +51 -0
  61. package/dist/collection/{components/buttons → deprecated}/z-button-filter/index.js +0 -0
  62. package/dist/collection/{components/buttons → deprecated}/z-button-filter/styles.css +0 -0
  63. package/dist/collection/deprecated/z-chip-deprecated/index.js +59 -0
  64. package/dist/collection/deprecated/z-chip-deprecated/styles.css +17 -0
  65. package/dist/collection/{components → deprecated}/z-status-tag/index.js +0 -0
  66. package/dist/collection/{components → deprecated}/z-status-tag/styles.css +0 -0
  67. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +3 -1
  68. package/dist/collection/snowflakes/myz/card/z-myz-card/styles.css +3 -1
  69. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +28 -5
  70. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/styles.css +45 -2
  71. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +4 -3
  72. package/dist/collection/snowflakes/myz/card/z-myz-card-header/styles.css +4 -2
  73. package/dist/esm/{index-22f4a844.js → index-96aade4f.js} +11 -9
  74. package/dist/esm/index.js +2 -2
  75. package/dist/esm/loader.js +1 -1
  76. package/dist/esm/{utils-259e2dd9.js → utils-d06fbb4a.js} +1 -1
  77. package/dist/esm/web-components-library.js +1 -1
  78. package/dist/esm/z-app-switcher_11.entry.js +1 -1
  79. package/dist/esm/z-aria-alert.entry.js +1 -1
  80. package/dist/esm/z-avatar.entry.js +1 -1
  81. package/dist/esm/z-button-filter_5.entry.js +2 -2
  82. package/dist/esm/z-chip-deprecated.entry.js +20 -0
  83. package/dist/esm/z-chip.entry.js +16 -15
  84. package/dist/esm/z-combobox.entry.js +2 -2
  85. package/dist/esm/z-contextual-menu.entry.js +1 -1
  86. package/dist/esm/z-cookiebar.entry.js +1 -1
  87. package/dist/esm/z-date-picker.entry.js +1 -1
  88. package/dist/esm/z-file-upload.entry.js +3 -3
  89. package/dist/esm/z-file.entry.js +7 -12
  90. package/dist/esm/z-footer.entry.js +1 -1
  91. package/dist/esm/z-list_3.entry.js +1 -1
  92. package/dist/esm/z-menu-dropdown_2.entry.js +2 -2
  93. package/dist/esm/z-messages-pocket.entry.js +1 -1
  94. package/dist/esm/z-modal-login.entry.js +1 -1
  95. package/dist/esm/z-myz-card-alert.entry.js +1 -1
  96. package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
  97. package/dist/esm/z-myz-card-footer.entry.js +7 -3
  98. package/dist/esm/z-myz-card-info.entry.js +2 -2
  99. package/dist/esm/z-myz-card_4.entry.js +8 -5
  100. package/dist/esm/z-myz-list-item.entry.js +2 -2
  101. package/dist/esm/z-myz-topbar.entry.js +1 -1
  102. package/dist/esm/z-navigation-tab-link.entry.js +2 -2
  103. package/dist/esm/z-navigation-tab.entry.js +2 -2
  104. package/dist/esm/z-navigation-tabs.entry.js +1 -1
  105. package/dist/esm/z-otp.entry.js +1 -1
  106. package/dist/esm/z-pagination-bar.entry.js +2 -2
  107. package/dist/esm/z-pocket_3.entry.js +2 -2
  108. package/dist/esm/z-popover.entry.js +2 -2
  109. package/dist/esm/z-section-title.entry.js +1 -1
  110. package/dist/esm/z-slideshow.entry.js +2 -2
  111. package/dist/esm/z-status-tag.entry.js +1 -1
  112. package/dist/esm/z-table-cell.entry.js +1 -1
  113. package/dist/esm/z-table-header.entry.js +2 -2
  114. package/dist/esm/z-table-row.entry.js +1 -1
  115. package/dist/esm/z-table.entry.js +1 -1
  116. package/dist/esm/z-tag.entry.js +18 -0
  117. package/dist/esm/z-toast-notification-list.entry.js +1 -1
  118. package/dist/esm/z-toast-notification.entry.js +1 -1
  119. package/dist/esm/z-toggle-switch.entry.js +2 -2
  120. package/dist/esm/z-tooltip.entry.js +1 -1
  121. package/dist/types/beans/index.d.ts +11 -9
  122. package/dist/types/components/buttons/z-chip/index.d.ts +7 -6
  123. package/dist/types/components/file-upload/z-file/index.d.ts +2 -1
  124. package/dist/types/components/z-tag/index.d.ts +13 -0
  125. package/dist/types/components.d.ts +59 -6
  126. package/dist/types/{components/buttons → deprecated}/z-button-filter/index.d.ts +1 -1
  127. package/dist/types/deprecated/z-chip-deprecated/index.d.ts +6 -0
  128. package/dist/types/{components → deprecated}/z-status-tag/index.d.ts +0 -0
  129. package/dist/types/snowflakes/myz/card/z-myz-card-footer/index.d.ts +4 -0
  130. package/dist/types/snowflakes/myz/card/z-myz-card-header/index.d.ts +1 -0
  131. package/dist/web-components-library/index.esm.js +1 -1
  132. package/dist/web-components-library/{p-c196c340.entry.js → p-01b13704.entry.js} +1 -1
  133. package/dist/web-components-library/{p-ef22d940.entry.js → p-031b6b83.entry.js} +1 -1
  134. package/dist/web-components-library/{p-35c4d277.entry.js → p-059fc87d.entry.js} +1 -1
  135. package/dist/web-components-library/{p-298d324a.entry.js → p-12ae4164.entry.js} +1 -1
  136. package/dist/web-components-library/{p-88bc3cf2.entry.js → p-142dc712.entry.js} +1 -1
  137. package/{www/build/p-01a23d8c.entry.js → dist/web-components-library/p-211c8001.entry.js} +1 -1
  138. package/{www/build/p-ec361ccf.entry.js → dist/web-components-library/p-2182f383.entry.js} +1 -1
  139. package/dist/web-components-library/p-2f9c9ed9.entry.js +1 -0
  140. package/dist/web-components-library/p-3ecebf0c.entry.js +1 -0
  141. package/dist/web-components-library/{p-e4dce41a.entry.js → p-422d2691.entry.js} +1 -1
  142. package/dist/web-components-library/p-42c37977.js +1 -0
  143. package/{www/build/p-7efeb668.entry.js → dist/web-components-library/p-4434207b.entry.js} +1 -1
  144. package/dist/web-components-library/{p-58091e1c.entry.js → p-4fa3a1f5.entry.js} +1 -1
  145. package/{www/build/p-d4440420.entry.js → dist/web-components-library/p-5ad5d409.entry.js} +1 -1
  146. package/dist/web-components-library/{p-0b0a358a.entry.js → p-61b6ab7e.entry.js} +1 -1
  147. package/dist/web-components-library/{p-4a360730.entry.js → p-62a79ada.entry.js} +1 -1
  148. package/dist/web-components-library/{p-eafa01a1.entry.js → p-62a7b6cb.entry.js} +1 -1
  149. package/dist/web-components-library/{p-61ba9cc7.entry.js → p-66a027c2.entry.js} +1 -1
  150. package/dist/web-components-library/{p-782d01c1.entry.js → p-67e56d43.entry.js} +1 -1
  151. package/dist/web-components-library/{p-9777ec0b.entry.js → p-77d2db66.entry.js} +1 -1
  152. package/dist/web-components-library/{p-4ef4c8ef.entry.js → p-8e554778.entry.js} +1 -1
  153. package/dist/web-components-library/{p-904375ec.entry.js → p-8fb44da3.entry.js} +1 -1
  154. package/dist/web-components-library/{p-5b2d0ccb.entry.js → p-9045dc92.entry.js} +1 -1
  155. package/dist/web-components-library/p-981f5b41.entry.js +1 -0
  156. package/dist/web-components-library/{p-9d279248.entry.js → p-9baa6b96.entry.js} +1 -1
  157. package/dist/web-components-library/{p-10a2a9fe.entry.js → p-a184c4a4.entry.js} +1 -1
  158. package/dist/web-components-library/{p-d34e101f.js → p-a4049c7f.js} +1 -1
  159. package/dist/web-components-library/{p-814d6b43.entry.js → p-aaee84f0.entry.js} +1 -1
  160. package/dist/web-components-library/p-ab5f212d.entry.js +1 -0
  161. package/{www/build/p-feb6ee16.entry.js → dist/web-components-library/p-b3059f74.entry.js} +1 -1
  162. package/dist/web-components-library/{p-157885b1.entry.js → p-b3cab405.entry.js} +1 -1
  163. package/dist/web-components-library/p-ba7e61fe.entry.js +1 -0
  164. package/dist/web-components-library/{p-30c0f3f2.entry.js → p-c7f70e76.entry.js} +1 -1
  165. package/dist/web-components-library/{p-4f64af13.entry.js → p-c806d6e4.entry.js} +1 -1
  166. package/dist/web-components-library/{p-0177caf2.entry.js → p-c8578954.entry.js} +1 -1
  167. package/dist/web-components-library/{p-02145727.entry.js → p-c9722a45.entry.js} +1 -1
  168. package/dist/web-components-library/p-d0c956ff.entry.js +1 -0
  169. package/dist/web-components-library/{p-240561e7.entry.js → p-dd928b6f.entry.js} +1 -1
  170. package/dist/web-components-library/p-e17ca1a1.entry.js +1 -0
  171. package/{www/build/p-c3771cc7.entry.js → dist/web-components-library/p-e3d1b621.entry.js} +1 -1
  172. package/dist/web-components-library/{p-4e270984.entry.js → p-e559f4d3.entry.js} +1 -1
  173. package/dist/web-components-library/p-e8df0a5e.entry.js +1 -0
  174. package/dist/web-components-library/p-edc05acf.entry.js +1 -0
  175. package/dist/web-components-library/{p-4c7250a9.entry.js → p-eedd3f14.entry.js} +1 -1
  176. package/dist/web-components-library/p-f85e38d3.entry.js +1 -0
  177. package/dist/web-components-library/web-components-library.esm.js +1 -1
  178. package/package.json +8 -8
  179. package/react/components.d.ts +2 -0
  180. package/react/components.js +4 -2
  181. package/react/components.js.map +1 -1
  182. package/src-react/index.ts +1 -0
  183. package/www/build/index.esm.js +1 -1
  184. package/www/build/{p-c196c340.entry.js → p-01b13704.entry.js} +1 -1
  185. package/www/build/{p-ef22d940.entry.js → p-031b6b83.entry.js} +1 -1
  186. package/www/build/{p-35c4d277.entry.js → p-059fc87d.entry.js} +1 -1
  187. package/www/build/{p-298d324a.entry.js → p-12ae4164.entry.js} +1 -1
  188. package/www/build/{p-88bc3cf2.entry.js → p-142dc712.entry.js} +1 -1
  189. package/{dist/web-components-library/p-01a23d8c.entry.js → www/build/p-211c8001.entry.js} +1 -1
  190. package/{dist/web-components-library/p-ec361ccf.entry.js → www/build/p-2182f383.entry.js} +1 -1
  191. package/www/build/p-2f9c9ed9.entry.js +1 -0
  192. package/www/build/p-3ecebf0c.entry.js +1 -0
  193. package/www/build/{p-e4dce41a.entry.js → p-422d2691.entry.js} +1 -1
  194. package/www/build/p-42c37977.js +1 -0
  195. package/{dist/web-components-library/p-7efeb668.entry.js → www/build/p-4434207b.entry.js} +1 -1
  196. package/www/build/{p-58091e1c.entry.js → p-4fa3a1f5.entry.js} +1 -1
  197. package/{dist/web-components-library/p-d4440420.entry.js → www/build/p-5ad5d409.entry.js} +1 -1
  198. package/www/build/{p-0b0a358a.entry.js → p-61b6ab7e.entry.js} +1 -1
  199. package/www/build/{p-4a360730.entry.js → p-62a79ada.entry.js} +1 -1
  200. package/www/build/{p-eafa01a1.entry.js → p-62a7b6cb.entry.js} +1 -1
  201. package/www/build/{p-61ba9cc7.entry.js → p-66a027c2.entry.js} +1 -1
  202. package/www/build/{p-782d01c1.entry.js → p-67e56d43.entry.js} +1 -1
  203. package/www/build/{p-9777ec0b.entry.js → p-77d2db66.entry.js} +1 -1
  204. package/www/build/{p-4ef4c8ef.entry.js → p-8e554778.entry.js} +1 -1
  205. package/www/build/{p-904375ec.entry.js → p-8fb44da3.entry.js} +1 -1
  206. package/www/build/{p-5b2d0ccb.entry.js → p-9045dc92.entry.js} +1 -1
  207. package/www/build/p-981f5b41.entry.js +1 -0
  208. package/www/build/{p-9d279248.entry.js → p-9baa6b96.entry.js} +1 -1
  209. package/www/build/{p-10a2a9fe.entry.js → p-a184c4a4.entry.js} +1 -1
  210. package/www/build/{p-d34e101f.js → p-a4049c7f.js} +1 -1
  211. package/www/build/{p-814d6b43.entry.js → p-aaee84f0.entry.js} +1 -1
  212. package/www/build/p-ab5f212d.entry.js +1 -0
  213. package/{dist/web-components-library/p-feb6ee16.entry.js → www/build/p-b3059f74.entry.js} +1 -1
  214. package/www/build/{p-157885b1.entry.js → p-b3cab405.entry.js} +1 -1
  215. package/www/build/p-ba7e61fe.entry.js +1 -0
  216. package/www/build/{p-30c0f3f2.entry.js → p-c7f70e76.entry.js} +1 -1
  217. package/www/build/{p-4f64af13.entry.js → p-c806d6e4.entry.js} +1 -1
  218. package/www/build/{p-0177caf2.entry.js → p-c8578954.entry.js} +1 -1
  219. package/www/build/{p-02145727.entry.js → p-c9722a45.entry.js} +1 -1
  220. package/www/build/p-d0c956ff.entry.js +1 -0
  221. package/www/build/{p-240561e7.entry.js → p-dd928b6f.entry.js} +1 -1
  222. package/www/build/p-e17ca1a1.entry.js +1 -0
  223. package/{dist/web-components-library/p-c3771cc7.entry.js → www/build/p-e3d1b621.entry.js} +1 -1
  224. package/www/build/{p-4e270984.entry.js → p-e559f4d3.entry.js} +1 -1
  225. package/www/build/p-e8df0a5e.entry.js +1 -0
  226. package/www/build/p-edc05acf.entry.js +1 -0
  227. package/www/build/{p-4c7250a9.entry.js → p-eedd3f14.entry.js} +1 -1
  228. package/www/build/p-f5e5ade5.js +1 -0
  229. package/www/build/p-f85e38d3.entry.js +1 -0
  230. package/www/build/web-components-library.esm.js +1 -1
  231. package/www/index.html +1 -1
  232. package/dist/web-components-library/p-0fc6feaf.entry.js +0 -1
  233. package/dist/web-components-library/p-1b34d655.entry.js +0 -1
  234. package/dist/web-components-library/p-2d325b9b.entry.js +0 -1
  235. package/dist/web-components-library/p-3bc3f32e.entry.js +0 -1
  236. package/dist/web-components-library/p-a6c68018.entry.js +0 -1
  237. package/dist/web-components-library/p-b260e143.entry.js +0 -1
  238. package/dist/web-components-library/p-c5d6450e.entry.js +0 -1
  239. package/dist/web-components-library/p-d2da11f4.js +0 -1
  240. package/dist/web-components-library/p-d502063b.entry.js +0 -1
  241. package/www/build/p-0fc6feaf.entry.js +0 -1
  242. package/www/build/p-1b34d655.entry.js +0 -1
  243. package/www/build/p-2d325b9b.entry.js +0 -1
  244. package/www/build/p-3bc3f32e.entry.js +0 -1
  245. package/www/build/p-53add5a8.js +0 -1
  246. package/www/build/p-a6c68018.entry.js +0 -1
  247. package/www/build/p-b260e143.entry.js +0 -1
  248. package/www/build/p-c5d6450e.entry.js +0 -1
  249. package/www/build/p-d2da11f4.js +0 -1
  250. package/www/build/p-d502063b.entry.js +0 -1
@@ -1,31 +1,30 @@
1
- import { Component, Prop, h, Element } from "@stencil/core";
2
- import { ZChipType } from "../../../beans";
1
+ import { Component, Prop, h, Element, Event, } from "@stencil/core";
2
+ import { DeviceEnum, ZChipType } from "../../../beans";
3
+ import { getDevice, handleKeyboardSubmit } from "../../../utils/utils";
3
4
  export class ZChip {
4
5
  constructor() {
6
+ this.type = ZChipType.default;
5
7
  this.disabled = false;
6
- this.filter = false;
7
8
  }
8
- renderLegacyChip() {
9
- return (h("div", null,
10
- h("span", { class: "boldtext" }, this.boldtext),
11
- " ",
12
- this.regulartext));
9
+ emitinteractiveIconClick() {
10
+ this.interactiveIconClick.emit();
13
11
  }
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)));
12
+ getIconSize() {
13
+ return getDevice() !== DeviceEnum.desktop ? 22 : 14;
21
14
  }
22
15
  render() {
23
- return this.boldtext != null || this.regulartext != null
24
- ? this.renderLegacyChip()
25
- : this.renderFilterChip();
16
+ if (this.interactiveIcon) {
17
+ return (h("button", { class: this.type, disabled: this.disabled, tabindex: "0" },
18
+ this.icon && (h("z-icon", { class: "iconSx", name: this.icon, width: this.getIconSize(), height: this.getIconSize() })),
19
+ h("slot", null),
20
+ h("z-icon", { tabIndex: this.disabled ? -1 : 0, onClick: () => this.emitinteractiveIconClick(), onKeyPress: (e) => handleKeyboardSubmit(e, this.emitinteractiveIconClick), name: this.interactiveIcon, width: this.getIconSize(), height: this.getIconSize() })));
21
+ }
22
+ return (h("div", { class: `${this.type}`, tabindex: "0" },
23
+ this.icon && (h("z-icon", { name: this.icon, width: this.getIconSize(), height: this.getIconSize() })),
24
+ h("slot", null)));
26
25
  }
27
26
  static get is() { return "z-chip"; }
28
- static get encapsulation() { return "shadow"; }
27
+ static get encapsulation() { return "scoped"; }
29
28
  static get originalStyleUrls() { return {
30
29
  "$": ["styles.css"]
31
30
  }; }
@@ -33,7 +32,7 @@ export class ZChip {
33
32
  "$": ["styles.css"]
34
33
  }; }
35
34
  static get properties() { return {
36
- "regulartext": {
35
+ "icon": {
37
36
  "type": "string",
38
37
  "mutable": false,
39
38
  "complexType": {
@@ -47,24 +46,7 @@ export class ZChip {
47
46
  "tags": [],
48
47
  "text": ""
49
48
  },
50
- "attribute": "regulartext",
51
- "reflect": false
52
- },
53
- "boldtext": {
54
- "type": "number",
55
- "mutable": false,
56
- "complexType": {
57
- "original": "number",
58
- "resolved": "number",
59
- "references": {}
60
- },
61
- "required": false,
62
- "optional": true,
63
- "docs": {
64
- "tags": [],
65
- "text": ""
66
- },
67
- "attribute": "boldtext",
49
+ "attribute": "icon",
68
50
  "reflect": false
69
51
  },
70
52
  "type": {
@@ -72,7 +54,7 @@ export class ZChip {
72
54
  "mutable": false,
73
55
  "complexType": {
74
56
  "original": "ZChipType",
75
- "resolved": "ZChipType.default | ZChipType.mini",
57
+ "resolved": "ZChipType.default | ZChipType.medium | ZChipType.small",
76
58
  "references": {
77
59
  "ZChipType": {
78
60
  "location": "import",
@@ -87,14 +69,15 @@ export class ZChip {
87
69
  "text": ""
88
70
  },
89
71
  "attribute": "type",
90
- "reflect": true
72
+ "reflect": true,
73
+ "defaultValue": "ZChipType.default"
91
74
  },
92
- "disabled": {
93
- "type": "boolean",
75
+ "interactiveIcon": {
76
+ "type": "string",
94
77
  "mutable": false,
95
78
  "complexType": {
96
- "original": "boolean",
97
- "resolved": "boolean",
79
+ "original": "string",
80
+ "resolved": "string",
98
81
  "references": {}
99
82
  },
100
83
  "required": false,
@@ -103,11 +86,10 @@ export class ZChip {
103
86
  "tags": [],
104
87
  "text": ""
105
88
  },
106
- "attribute": "disabled",
107
- "reflect": true,
108
- "defaultValue": "false"
89
+ "attribute": "interactive-icon",
90
+ "reflect": true
109
91
  },
110
- "filter": {
92
+ "disabled": {
111
93
  "type": "boolean",
112
94
  "mutable": false,
113
95
  "complexType": {
@@ -121,10 +103,26 @@ export class ZChip {
121
103
  "tags": [],
122
104
  "text": ""
123
105
  },
124
- "attribute": "filter",
106
+ "attribute": "disabled",
125
107
  "reflect": true,
126
108
  "defaultValue": "false"
127
109
  }
128
110
  }; }
129
- static get elementRef() { return "hostElement"; }
111
+ static get events() { return [{
112
+ "method": "interactiveIconClick",
113
+ "name": "interactiveIconClick",
114
+ "bubbles": true,
115
+ "cancelable": true,
116
+ "composed": true,
117
+ "docs": {
118
+ "tags": [],
119
+ "text": ""
120
+ },
121
+ "complexType": {
122
+ "original": "any",
123
+ "resolved": "any",
124
+ "references": {}
125
+ }
126
+ }]; }
127
+ static get elementRef() { return "el"; }
130
128
  }
@@ -1,64 +1,110 @@
1
1
  :host > button {
2
- display: inline-block;
2
+ display: inline-flex;
3
+ align-items: center;
3
4
  padding: 0 calc(var(--space-unit) * 1.5);
4
5
  background-color: var(--bg-white);
5
- border: var(--border-size-medium) solid var(--bg-grey-200);
6
- color: var(--text-grey-800);
6
+ border: var(--border-size-small) solid var(--gray400);
7
+ border-radius: 14px;
8
+ color: var(--color-primary01);
7
9
  fill: var(--text-grey-800);
8
10
  font-family: var(--dashboard-font);
9
11
  font-size: 14px;
12
+ font-weight: var(--font-sb);
10
13
  }
11
14
 
12
- :host > div {
13
- display: inline-block;
14
- min-height: 28px;
15
- line-height: 28px;
16
- padding: 0 calc(var(--space-unit) * 1.5);
17
- background-color: var(--bg-white);
18
- border: var(--border-size-small) solid var(--bg-grey-200);
19
- border-radius: 14px;
20
- color: var(--text-grey-800);
21
- fill: var(--text-grey-800);
22
- font-family: var(--dashboard-font);
23
- font-size: 12px;
15
+ :host > button:hover:not(:disabled),
16
+ :host > button:hover:not(:disabled) > z-icon:last-child {
17
+ color: var(--color-hover-primary);
18
+ fill: var(--color-hover-primary);
19
+ }
20
+
21
+ :host > button:hover:not(:disabled) > z-icon:first-child {
22
+ fill: var(--color-icon02);
24
23
  }
25
24
 
26
- .boldtext {
27
- font-weight: bold;
25
+ :host > button > z-icon:last-child {
26
+ cursor: pointer;
28
27
  }
29
28
 
30
- :host > button:hover {
31
- color: var(--myz-blue-dark);
29
+ :host > button > z-icon.iconSx {
30
+ margin-right: calc(var(--space-unit) / 2);
31
+ }
32
+
33
+ :host > button > z-icon:last-child {
34
+ margin-left: var(--space-unit);
35
+ fill: var(--color-primary01);
36
+ }
37
+
38
+ :host > button:disabled,
39
+ :host > button:disabled > z-icon {
40
+ color: var(--color-disabled03);
41
+ fill: var(--color-disabled03);
42
+ }
43
+
44
+ :host > button:disabled > z-icon {
45
+ cursor: auto;
32
46
  }
33
47
 
34
48
  :host > button:disabled {
35
- border: var(--border-size-medium) solid var(--bg-grey-200);
36
- color: rgb(149, 153, 157);
37
- box-shadow: none;
49
+ border: var(--border-size-small) solid var(--color-disabled01);
38
50
  }
39
51
 
40
- :host > button.default:focus:focus-visible,
41
- :host > button.mini:focus:focus-visible {
52
+ :host > button:focus:focus-visible,
53
+ :host > div:focus:focus-visible {
42
54
  box-shadow: var(--shadow-focus-primary);
43
55
  outline: none;
44
56
  }
45
57
 
46
58
  :host > button:not(:disabled):active {
47
59
  background-color: var(--gray50);
60
+ text-decoration: underline;
61
+ }
62
+
63
+ :host > button:not(:disabled):active:hover,
64
+ :host > button:hover:not(:disabled):active:hover > z-icon:last-child {
65
+ color: var(--color-primary01);
66
+ fill: var(--color-primary01);
67
+ }
68
+
69
+ :host > div {
70
+ display: inline-flex;
71
+ align-items: center;
72
+ min-height: 28px;
73
+ line-height: 28px;
74
+ padding: 0 calc(var(--space-unit) * 1.5);
75
+ background-color: var(--bg-white);
76
+ border: var(--border-size-small) solid var(--bg-grey-200);
77
+ border-radius: 14px;
78
+ color: var(--text-grey-800);
79
+ fill: var(--text-grey-800);
80
+ font-family: var(--dashboard-font);
81
+ font-size: 14px;
82
+ }
83
+
84
+ :host > div > z-icon {
85
+ margin-right: calc(var(--space-unit) / 2);
48
86
  }
49
87
 
88
+ /* :host type */
50
89
  :host > button.default,
51
90
  :host > div.default {
52
91
  min-height: 44px;
53
- border-radius: 22px;
54
92
  line-height: 44px;
93
+ border-radius: 22px;
55
94
  }
56
95
 
57
- :host > button.mini,
58
- :host > div.mini {
59
- min-height: 36px;
96
+ :host > button.medium,
97
+ :host > div.medium {
98
+ min-height: 40px;
99
+ line-height: 40px;
60
100
  border-radius: 22px;
101
+ }
102
+
103
+ :host > button.small,
104
+ :host > div.small {
105
+ min-height: 36px;
61
106
  line-height: 36px;
107
+ border-radius: 22px;
62
108
  }
63
109
 
64
110
  /* Desktop breakpoint */
@@ -67,17 +113,29 @@
67
113
  font-size: 12px;
68
114
  }
69
115
 
116
+ :host > div {
117
+ font-size: 12px;
118
+ }
119
+
120
+ /* :host type */
70
121
  :host > button.default,
71
122
  :host > div.default {
72
123
  min-height: 32px;
73
- border-radius: 16px;
74
124
  line-height: 32px;
125
+ border-radius: 16px;
75
126
  }
76
127
 
77
- :host > button.mini,
78
- :host > div.mini {
79
- min-height: 24px;
128
+ :host > button.medium,
129
+ :host > div.medium {
130
+ min-height: 28px;
131
+ line-height: 28px;
80
132
  border-radius: 16px;
133
+ }
134
+
135
+ :host > button.small,
136
+ :host > div.small {
137
+ min-height: 24px;
81
138
  line-height: 24px;
139
+ border-radius: 16px;
82
140
  }
83
141
  }
@@ -1,8 +1,7 @@
1
1
  import { Component, h, Event, Element, Host, State, Listen, Prop, } from "@stencil/core";
2
- import { DeviceEnum, TooltipPosition, ZChipType } from "../../../beans";
2
+ import { TooltipPosition, ZChipType } from "../../../beans";
3
3
  import { tabletBreakpoint } from "../../../constants/breakpoints";
4
- import { getDevice } from "../../../utils/utils";
5
- import './index';
4
+ import "./index";
6
5
  export class ZFile {
7
6
  constructor() {
8
7
  this.allowTooltip = false;
@@ -18,6 +17,9 @@ export class ZFile {
18
17
  onMouseLeave() {
19
18
  this.tooltipVisible = false;
20
19
  }
20
+ onInteractiveIconClick() {
21
+ this.removeFileHandler();
22
+ }
21
23
  componentDidLoad() {
22
24
  var _a, _b;
23
25
  if (this.elementHasEllipsis() && window.innerWidth > tabletBreakpoint)
@@ -25,25 +27,16 @@ export class ZFile {
25
27
  (_b = (_a = this.icon) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a);
26
28
  }
27
29
  elementHasEllipsis() {
30
+ console.log(this.ellipsis, this.ellipsis.offsetWidth, this.ellipsis.scrollWidth);
28
31
  return this.ellipsis.offsetWidth < this.ellipsis.scrollWidth;
29
32
  }
30
33
  render() {
31
34
  return (h(Host, null,
32
35
  this.allowTooltip && (h("z-tooltip", { open: this.tooltipVisible, type: TooltipPosition.AUTO, "bind-to": `#chip-${this.fileNumber}` },
33
36
  h("span", { class: "body-5 tootip-content" }, this.ellipsis.innerText))),
34
- h("z-chip", { id: `chip-${this.fileNumber}`, filter: true, type: ZChipType.default },
35
- h("div", { class: "chip-content" },
36
- h("span", { ref: (el) => (this.ellipsis = el), tabIndex: -1, class: {
37
- "body-3-sb": getDevice() == DeviceEnum.desktop,
38
- "body-2-sb": getDevice() !== DeviceEnum.desktop,
39
- } },
40
- h("slot", null)),
41
- h("z-icon", { "aria-label": "Elimina file", tabIndex: 0, onClick: () => this.removeFileHandler(), onKeyPress: (e) => {
42
- if (e.code == "Space" || e.code == "Enter") {
43
- e.preventDefault();
44
- this.removeFileHandler();
45
- }
46
- }, name: "multiply-circled", height: getDevice() !== DeviceEnum.desktop ? 20 : 15, width: getDevice() !== DeviceEnum.desktop ? 20 : 15, ref: (val) => (this.icon = val) })))));
37
+ h("z-chip", { id: `chip-${this.fileNumber}`, interactiveIcon: "multiply-circled", type: ZChipType.default },
38
+ h("span", { ref: (el) => (this.ellipsis = el), tabIndex: -1 },
39
+ h("slot", null)))));
47
40
  }
48
41
  static get is() { return "z-file"; }
49
42
  static get encapsulation() { return "scoped"; }
@@ -105,5 +98,11 @@ export class ZFile {
105
98
  "target": undefined,
106
99
  "capture": false,
107
100
  "passive": true
101
+ }, {
102
+ "name": "interactiveIconClick",
103
+ "method": "onInteractiveIconClick",
104
+ "target": undefined,
105
+ "capture": false,
106
+ "passive": false
108
107
  }]; }
109
108
  }
@@ -4,11 +4,6 @@
4
4
  position: relative;
5
5
  }
6
6
 
7
- :host .chip-content {
8
- display: flex;
9
- align-items: center;
10
- }
11
-
12
7
  :host > z-tooltip {
13
8
  z-index: 10;
14
9
  }
@@ -17,28 +12,14 @@
17
12
  white-space: nowrap;
18
13
  }
19
14
 
20
- :host > z-chip > .chip-content > span {
15
+ :host > z-chip span {
21
16
  max-width: 250px;
22
17
  overflow: hidden;
23
18
  text-overflow: ellipsis;
24
19
  white-space: nowrap;
25
- font-size: 14px;
26
20
  line-height: 1.33;
27
21
  letter-spacing: 0.32px;
28
- }
29
-
30
- :host > z-chip > .chip-content > span.regular {
31
- font-weight: var(--font-rg);
32
- }
33
-
34
- :host > z-chip > .chip-content > span.bold {
35
- font-weight: var(--font-sb);
36
- }
37
-
38
- :host .chip-content > z-icon:last-child {
39
- margin-left: var(--space-unit);
40
- cursor: pointer;
41
- fill: var(--color-icon01);
22
+ display: block;
42
23
  }
43
24
 
44
25
  /* Tablet breakpoint */
@@ -47,13 +28,7 @@
47
28
 
48
29
  /* Desktop breakpoint */
49
30
  @media only screen and (min-width: 1152px) {
50
- :host {
51
- border-radius: 16px;
52
- }
53
31
 
54
- :host > z-chip > .chip-content > span {
55
- font-size: 12px;
56
- }
57
32
  }
58
33
 
59
34
  /* Wide breakpoint */
@@ -39,7 +39,7 @@ export class ZFileUpload {
39
39
  }
40
40
  handleAccessibility() {
41
41
  if (this.filesNumber > 0) {
42
- this.el.querySelector('z-file:last-child > z-chip').shadowRoot.querySelector('button').focus();
42
+ this.el.querySelector('z-file:last-child z-chip button').focus();
43
43
  }
44
44
  else {
45
45
  this.type === ZFileUploadTypeEnum.default ? this.button.shadowRoot.querySelector('button').focus() : this.uploadLink.focus();
@@ -1,9 +1,5 @@
1
- *::before,
2
- *::after {
3
- box-sizing: border-box;
4
- }
5
-
6
- :host > * {
1
+ :host > button,
2
+ :host > a {
7
3
  position: relative;
8
4
  z-index: 0;
9
5
  display: inline-flex;
@@ -31,6 +27,11 @@
31
27
  text-decoration: none;
32
28
  }
33
29
 
30
+ :host *::before,
31
+ :host *::after {
32
+ box-sizing: border-box;
33
+ }
34
+
34
35
  :host(:not([disabled]):hover) > *,
35
36
  :host([selected]) > * {
36
37
  color: var(--color-hover-secondary);
@@ -70,7 +71,7 @@ slot[name="icon"] z-icon,
70
71
  background-color: var(--color-background);
71
72
  }
72
73
 
73
- > *:focus:focus-visible {
74
+ :host > *:focus:focus-visible {
74
75
  box-shadow: var(--shadow-focus-primary);
75
76
  }
76
77
 
@@ -60,10 +60,10 @@ export class ZNavigationTabLink {
60
60
  static get is() { return "z-navigation-tab-link"; }
61
61
  static get encapsulation() { return "shadow"; }
62
62
  static get originalStyleUrls() { return {
63
- "$": ["../navigation-tab.css", "styles.css"]
63
+ "$": ["../navigation-tab.css"]
64
64
  }; }
65
65
  static get styleUrls() { return {
66
- "$": ["../navigation-tab.css", "styles.css"]
66
+ "$": ["../navigation-tab.css"]
67
67
  }; }
68
68
  static get properties() { return {
69
69
  "selected": {
@@ -0,0 +1,62 @@
1
+ import { Component, Prop, h, Host } from "@stencil/core";
2
+ /**
3
+ * Ztag component.
4
+ * @slot - The text of the z-tag.
5
+ * @cssprop --z-tag-text-color - text and icon color using tokens.
6
+ * @cssprop --z-tag-bg - background color of the z-tag.
7
+ */
8
+ export class ZTag {
9
+ render() {
10
+ return (h(Host, { class: {
11
+ "body-5-sb": true,
12
+ expandable: this.expandable && !!this.icon,
13
+ } },
14
+ this.icon && h("z-icon", { name: this.icon }),
15
+ h("div", null,
16
+ h("slot", null))));
17
+ }
18
+ static get is() { return "z-tag"; }
19
+ static get encapsulation() { return "scoped"; }
20
+ static get originalStyleUrls() { return {
21
+ "$": ["styles.css"]
22
+ }; }
23
+ static get styleUrls() { return {
24
+ "$": ["styles.css"]
25
+ }; }
26
+ static get properties() { return {
27
+ "icon": {
28
+ "type": "string",
29
+ "mutable": false,
30
+ "complexType": {
31
+ "original": "string",
32
+ "resolved": "string",
33
+ "references": {}
34
+ },
35
+ "required": false,
36
+ "optional": true,
37
+ "docs": {
38
+ "tags": [],
39
+ "text": "[optional] Tag icon"
40
+ },
41
+ "attribute": "icon",
42
+ "reflect": false
43
+ },
44
+ "expandable": {
45
+ "type": "boolean",
46
+ "mutable": false,
47
+ "complexType": {
48
+ "original": "boolean",
49
+ "resolved": "boolean",
50
+ "references": {}
51
+ },
52
+ "required": false,
53
+ "optional": true,
54
+ "docs": {
55
+ "tags": [],
56
+ "text": "[optional] Hide the text and show it on hover"
57
+ },
58
+ "attribute": "expandable",
59
+ "reflect": false
60
+ }
61
+ }; }
62
+ }
@@ -0,0 +1,51 @@
1
+ :host {
2
+ --z-icon-width: 14px;
3
+ --z-icon-height: 14px;
4
+
5
+ --z-tag-text-color: var(--color-primary03);
6
+ --z-tag-bg: var(--color-hover-primary);
7
+
8
+ font-family: var(--font-family-sans);
9
+
10
+ border-radius: var(--border-radius);
11
+ padding: calc(var(--space-unit) / 2);
12
+ text-transform: uppercase;
13
+
14
+ display: flex;
15
+ width: fit-content;
16
+ height: fit-content;
17
+
18
+ max-width: inherit;
19
+ max-height: inherit;
20
+
21
+ color: var(--z-tag-text-color);
22
+ fill: var(--z-tag-text-color);
23
+ background-color: var(--z-tag-bg);
24
+ line-height: 14px;
25
+ }
26
+
27
+ :host > z-icon {
28
+ margin-right: var(--space-unit);
29
+ }
30
+
31
+ :host(.expandable) > z-icon {
32
+ margin-right: 0;
33
+ transition: margin-right 0.3s ease-out;
34
+ }
35
+
36
+ :host(:not(.expandable)) > z-icon:not(:last-child),
37
+ :host(.expandable:hover) > z-icon:not(:last-child) {
38
+ margin-right: var(--space-unit);
39
+ transition: margin-right 0.3s ease-out 0s;
40
+ }
41
+
42
+ :host(.expandable) > div {
43
+ max-width: 0;
44
+ max-height: 0;
45
+ overflow: hidden;
46
+ }
47
+
48
+ :host(.expandable:hover) > div {
49
+ max-width: 100%;
50
+ max-height: 100%;
51
+ }
@@ -0,0 +1,59 @@
1
+ import { Component, Prop, h } from '@stencil/core';
2
+ export class ZChipDeprecated {
3
+ renderLegacyChip() {
4
+ return h("div", null,
5
+ h("span", { class: "boldtext" }, this.boldtext),
6
+ " ",
7
+ this.regulartext);
8
+ }
9
+ render() {
10
+ return this.boldtext != null || this.regulartext != null ?
11
+ this.renderLegacyChip() :
12
+ h("div", null,
13
+ h("slot", null));
14
+ }
15
+ static get is() { return "z-chip-deprecated"; }
16
+ static get encapsulation() { return "shadow"; }
17
+ static get originalStyleUrls() { return {
18
+ "$": ["styles.css"]
19
+ }; }
20
+ static get styleUrls() { return {
21
+ "$": ["styles.css"]
22
+ }; }
23
+ static get properties() { return {
24
+ "regulartext": {
25
+ "type": "string",
26
+ "mutable": false,
27
+ "complexType": {
28
+ "original": "string",
29
+ "resolved": "string",
30
+ "references": {}
31
+ },
32
+ "required": false,
33
+ "optional": true,
34
+ "docs": {
35
+ "tags": [],
36
+ "text": ""
37
+ },
38
+ "attribute": "regulartext",
39
+ "reflect": false
40
+ },
41
+ "boldtext": {
42
+ "type": "number",
43
+ "mutable": false,
44
+ "complexType": {
45
+ "original": "number",
46
+ "resolved": "number",
47
+ "references": {}
48
+ },
49
+ "required": false,
50
+ "optional": true,
51
+ "docs": {
52
+ "tags": [],
53
+ "text": ""
54
+ },
55
+ "attribute": "boldtext",
56
+ "reflect": false
57
+ }
58
+ }; }
59
+ }