@zanichelli/albe-web-components 13.4.0 → 13.5.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 (207) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/web-components-library.cjs.js +1 -1
  4. package/dist/cjs/z-alert.cjs.entry.js +1 -1
  5. package/dist/cjs/z-app-header_12.cjs.entry.js +3 -3
  6. package/dist/cjs/z-info-reveal.cjs.entry.js +28 -28
  7. package/dist/cjs/z-info-reveal.cjs.entry.js.map +1 -1
  8. package/dist/cjs/z-link.cjs.entry.js +1 -1
  9. package/dist/cjs/z-messages-pocket.cjs.entry.js +1 -1
  10. package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
  11. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
  12. package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
  13. package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
  14. package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
  15. package/dist/cjs/z-myz-card-info.cjs.entry.js +1 -1
  16. package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
  17. package/dist/cjs/z-myz-card_4.cjs.entry.js +4 -4
  18. package/dist/cjs/z-myz-list.cjs.entry.js +1 -1
  19. package/dist/cjs/z-otp.cjs.entry.js +2 -2
  20. package/dist/cjs/z-pocket-message.cjs.entry.js +1 -1
  21. package/dist/cjs/z-pocket_3.cjs.entry.js +3 -3
  22. package/dist/cjs/z-popover.cjs.entry.js +1 -1
  23. package/dist/cjs/z-section-title.cjs.entry.js +1 -1
  24. package/dist/cjs/z-skip-to-content.cjs.entry.js +1 -1
  25. package/dist/cjs/z-visually-hidden.cjs.entry.js +1 -1
  26. package/dist/collection/components/z-info-reveal/index.js +94 -40
  27. package/dist/collection/components/z-info-reveal/index.js.map +1 -1
  28. package/dist/collection/components/z-info-reveal/styles.css +90 -61
  29. package/dist/collection/components/z-offcanvas/index.js +1 -1
  30. package/dist/collection/components/z-popover/index.js +1 -1
  31. package/dist/collection/components/z-section-title/index.js +1 -1
  32. package/dist/collection/components/z-skip-to-content/index.js +1 -1
  33. package/dist/collection/components/z-tag/index.js +2 -2
  34. package/dist/collection/components/z-visually-hidden/index.js +1 -1
  35. package/dist/collection/deprecated/z-link/index.js +1 -1
  36. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
  37. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
  38. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
  39. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
  40. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  41. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
  42. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
  43. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
  44. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
  45. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
  46. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
  47. package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
  48. package/dist/collection/snowflakes/myz/pocket/z-messages-pocket/index.js +1 -1
  49. package/dist/collection/snowflakes/myz/pocket/z-pocket/index.js +1 -1
  50. package/dist/collection/snowflakes/myz/pocket/z-pocket-body/index.js +1 -1
  51. package/dist/collection/snowflakes/myz/pocket/z-pocket-header/index.js +1 -1
  52. package/dist/collection/snowflakes/myz/pocket/z-pocket-message/index.js +1 -1
  53. package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
  54. package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
  55. package/dist/components/index16.js +1 -1
  56. package/dist/components/index17.js +1 -1
  57. package/dist/components/index18.js +1 -1
  58. package/dist/components/index19.js +1 -1
  59. package/dist/components/index21.js +1 -1
  60. package/dist/components/index22.js +1 -1
  61. package/dist/components/index23.js +1 -1
  62. package/dist/components/index24.js +1 -1
  63. package/dist/components/index25.js +1 -1
  64. package/dist/components/index27.js +2 -2
  65. package/dist/components/index3.js +1 -1
  66. package/dist/components/z-info-reveal.js +35 -33
  67. package/dist/components/z-info-reveal.js.map +1 -1
  68. package/dist/components/z-link.js +1 -1
  69. package/dist/components/z-messages-pocket.js +1 -1
  70. package/dist/components/z-myz-card-alert.js +1 -1
  71. package/dist/components/z-myz-card-dictionary.js +1 -1
  72. package/dist/components/z-myz-card-footer-sections.js +1 -1
  73. package/dist/components/z-myz-card-footer.js +1 -1
  74. package/dist/components/z-myz-card-icon.js +1 -1
  75. package/dist/components/z-myz-card-info.js +1 -1
  76. package/dist/components/z-myz-card-list.js +1 -1
  77. package/dist/components/z-myz-list.js +1 -1
  78. package/dist/components/z-otp.js +2 -2
  79. package/dist/components/z-pocket-message.js +1 -1
  80. package/dist/components/z-section-title.js +1 -1
  81. package/dist/components/z-skip-to-content.js +1 -1
  82. package/dist/components/z-visually-hidden.js +1 -1
  83. package/dist/esm/loader.js +1 -1
  84. package/dist/esm/web-components-library.js +1 -1
  85. package/dist/esm/z-alert.entry.js +1 -1
  86. package/dist/esm/z-app-header_12.entry.js +3 -3
  87. package/dist/esm/z-info-reveal.entry.js +29 -29
  88. package/dist/esm/z-info-reveal.entry.js.map +1 -1
  89. package/dist/esm/z-link.entry.js +1 -1
  90. package/dist/esm/z-messages-pocket.entry.js +1 -1
  91. package/dist/esm/z-myz-card-alert.entry.js +1 -1
  92. package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
  93. package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
  94. package/dist/esm/z-myz-card-footer.entry.js +1 -1
  95. package/dist/esm/z-myz-card-icon.entry.js +1 -1
  96. package/dist/esm/z-myz-card-info.entry.js +1 -1
  97. package/dist/esm/z-myz-card-list.entry.js +1 -1
  98. package/dist/esm/z-myz-card_4.entry.js +4 -4
  99. package/dist/esm/z-myz-list.entry.js +1 -1
  100. package/dist/esm/z-otp.entry.js +2 -2
  101. package/dist/esm/z-pocket-message.entry.js +1 -1
  102. package/dist/esm/z-pocket_3.entry.js +3 -3
  103. package/dist/esm/z-popover.entry.js +1 -1
  104. package/dist/esm/z-section-title.entry.js +1 -1
  105. package/dist/esm/z-skip-to-content.entry.js +1 -1
  106. package/dist/esm/z-visually-hidden.entry.js +1 -1
  107. package/dist/types/components/z-info-reveal/index.d.ts +27 -15
  108. package/dist/types/components.d.ts +38 -6
  109. package/{www/build/p-de972497.entry.js → dist/web-components-library/p-02c08dd1.entry.js} +2 -2
  110. package/dist/web-components-library/{p-48c6050f.entry.js → p-164b4986.entry.js} +2 -2
  111. package/dist/web-components-library/{p-6b186398.entry.js → p-19ba8574.entry.js} +2 -2
  112. package/dist/web-components-library/p-2ae88c97.entry.js +2 -0
  113. package/dist/web-components-library/p-2ae88c97.entry.js.map +1 -0
  114. package/dist/web-components-library/p-2ed9ce08.entry.js +2 -0
  115. package/dist/web-components-library/{p-660b1494.entry.js → p-36f7ed38.entry.js} +2 -2
  116. package/dist/web-components-library/{p-e5e2e752.entry.js → p-41c72490.entry.js} +2 -2
  117. package/dist/web-components-library/{p-7579992d.entry.js → p-4cf24a3b.entry.js} +2 -2
  118. package/dist/web-components-library/{p-7ee8e11a.entry.js → p-4d944fcd.entry.js} +2 -2
  119. package/dist/web-components-library/{p-2ec544c4.entry.js → p-59875f0f.entry.js} +2 -2
  120. package/dist/web-components-library/{p-2ee5c83c.entry.js → p-5b260d8b.entry.js} +2 -2
  121. package/dist/web-components-library/{p-5c9e7645.entry.js → p-7787e428.entry.js} +2 -2
  122. package/{www/build/p-20226d0d.entry.js → dist/web-components-library/p-8ce62075.entry.js} +2 -2
  123. package/dist/web-components-library/{p-c49602b1.entry.js → p-acf5a569.entry.js} +2 -2
  124. package/dist/web-components-library/{p-06d2cd5d.entry.js → p-c2d44867.entry.js} +2 -2
  125. package/dist/web-components-library/p-ca65c04f.entry.js +2 -0
  126. package/dist/web-components-library/{p-fdc6cf5a.entry.js → p-d593548c.entry.js} +2 -2
  127. package/dist/web-components-library/{p-4e71c395.entry.js → p-e40b9b27.entry.js} +2 -2
  128. package/dist/web-components-library/{p-6f35845e.entry.js → p-e522c00c.entry.js} +2 -2
  129. package/dist/web-components-library/{p-7193d061.entry.js → p-eac25945.entry.js} +2 -2
  130. package/dist/web-components-library/{p-242b71f0.entry.js → p-eb10781f.entry.js} +2 -2
  131. package/dist/web-components-library/web-components-library.esm.js +1 -1
  132. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  133. package/package.json +1 -1
  134. package/{dist/web-components-library/p-de972497.entry.js → www/build/p-02c08dd1.entry.js} +2 -2
  135. package/www/build/{p-48c6050f.entry.js → p-164b4986.entry.js} +2 -2
  136. package/www/build/{p-6b186398.entry.js → p-19ba8574.entry.js} +2 -2
  137. package/www/build/p-2ae88c97.entry.js +2 -0
  138. package/www/build/p-2ae88c97.entry.js.map +1 -0
  139. package/www/build/p-2ed9ce08.entry.js +2 -0
  140. package/www/build/{p-660b1494.entry.js → p-36f7ed38.entry.js} +2 -2
  141. package/www/build/{p-e5e2e752.entry.js → p-41c72490.entry.js} +2 -2
  142. package/www/build/{p-7579992d.entry.js → p-4cf24a3b.entry.js} +2 -2
  143. package/www/build/{p-7ee8e11a.entry.js → p-4d944fcd.entry.js} +2 -2
  144. package/www/build/{p-c239d399.js → p-57cd2f36.js} +1 -1
  145. package/www/build/{p-2ec544c4.entry.js → p-59875f0f.entry.js} +2 -2
  146. package/www/build/{p-2ee5c83c.entry.js → p-5b260d8b.entry.js} +2 -2
  147. package/www/build/{p-5c9e7645.entry.js → p-7787e428.entry.js} +2 -2
  148. package/{dist/web-components-library/p-20226d0d.entry.js → www/build/p-8ce62075.entry.js} +2 -2
  149. package/www/build/{p-c49602b1.entry.js → p-acf5a569.entry.js} +2 -2
  150. package/www/build/{p-06d2cd5d.entry.js → p-c2d44867.entry.js} +2 -2
  151. package/www/build/p-ca65c04f.entry.js +2 -0
  152. package/www/build/{p-fdc6cf5a.entry.js → p-d593548c.entry.js} +2 -2
  153. package/www/build/{p-4e71c395.entry.js → p-e40b9b27.entry.js} +2 -2
  154. package/www/build/{p-6f35845e.entry.js → p-e522c00c.entry.js} +2 -2
  155. package/www/build/{p-7193d061.entry.js → p-eac25945.entry.js} +2 -2
  156. package/www/build/{p-242b71f0.entry.js → p-eb10781f.entry.js} +2 -2
  157. package/www/build/web-components-library.esm.js +1 -1
  158. package/www/build/web-components-library.esm.js.map +1 -1
  159. package/www/index.html +1 -1
  160. package/dist/web-components-library/p-592a8b1f.entry.js +0 -2
  161. package/dist/web-components-library/p-592a8b1f.entry.js.map +0 -1
  162. package/dist/web-components-library/p-b4888995.entry.js +0 -2
  163. package/dist/web-components-library/p-b4d30129.entry.js +0 -2
  164. package/www/build/p-592a8b1f.entry.js +0 -2
  165. package/www/build/p-592a8b1f.entry.js.map +0 -1
  166. package/www/build/p-b4888995.entry.js +0 -2
  167. package/www/build/p-b4d30129.entry.js +0 -2
  168. /package/dist/web-components-library/{p-de972497.entry.js.map → p-02c08dd1.entry.js.map} +0 -0
  169. /package/dist/web-components-library/{p-48c6050f.entry.js.map → p-164b4986.entry.js.map} +0 -0
  170. /package/dist/web-components-library/{p-6b186398.entry.js.map → p-19ba8574.entry.js.map} +0 -0
  171. /package/dist/web-components-library/{p-b4888995.entry.js.map → p-2ed9ce08.entry.js.map} +0 -0
  172. /package/dist/web-components-library/{p-660b1494.entry.js.map → p-36f7ed38.entry.js.map} +0 -0
  173. /package/dist/web-components-library/{p-e5e2e752.entry.js.map → p-41c72490.entry.js.map} +0 -0
  174. /package/dist/web-components-library/{p-7579992d.entry.js.map → p-4cf24a3b.entry.js.map} +0 -0
  175. /package/dist/web-components-library/{p-7ee8e11a.entry.js.map → p-4d944fcd.entry.js.map} +0 -0
  176. /package/dist/web-components-library/{p-2ec544c4.entry.js.map → p-59875f0f.entry.js.map} +0 -0
  177. /package/dist/web-components-library/{p-2ee5c83c.entry.js.map → p-5b260d8b.entry.js.map} +0 -0
  178. /package/dist/web-components-library/{p-5c9e7645.entry.js.map → p-7787e428.entry.js.map} +0 -0
  179. /package/dist/web-components-library/{p-20226d0d.entry.js.map → p-8ce62075.entry.js.map} +0 -0
  180. /package/dist/web-components-library/{p-c49602b1.entry.js.map → p-acf5a569.entry.js.map} +0 -0
  181. /package/dist/web-components-library/{p-06d2cd5d.entry.js.map → p-c2d44867.entry.js.map} +0 -0
  182. /package/dist/web-components-library/{p-b4d30129.entry.js.map → p-ca65c04f.entry.js.map} +0 -0
  183. /package/dist/web-components-library/{p-fdc6cf5a.entry.js.map → p-d593548c.entry.js.map} +0 -0
  184. /package/dist/web-components-library/{p-4e71c395.entry.js.map → p-e40b9b27.entry.js.map} +0 -0
  185. /package/dist/web-components-library/{p-6f35845e.entry.js.map → p-e522c00c.entry.js.map} +0 -0
  186. /package/dist/web-components-library/{p-7193d061.entry.js.map → p-eac25945.entry.js.map} +0 -0
  187. /package/dist/web-components-library/{p-242b71f0.entry.js.map → p-eb10781f.entry.js.map} +0 -0
  188. /package/www/build/{p-de972497.entry.js.map → p-02c08dd1.entry.js.map} +0 -0
  189. /package/www/build/{p-48c6050f.entry.js.map → p-164b4986.entry.js.map} +0 -0
  190. /package/www/build/{p-6b186398.entry.js.map → p-19ba8574.entry.js.map} +0 -0
  191. /package/www/build/{p-b4888995.entry.js.map → p-2ed9ce08.entry.js.map} +0 -0
  192. /package/www/build/{p-660b1494.entry.js.map → p-36f7ed38.entry.js.map} +0 -0
  193. /package/www/build/{p-e5e2e752.entry.js.map → p-41c72490.entry.js.map} +0 -0
  194. /package/www/build/{p-7579992d.entry.js.map → p-4cf24a3b.entry.js.map} +0 -0
  195. /package/www/build/{p-7ee8e11a.entry.js.map → p-4d944fcd.entry.js.map} +0 -0
  196. /package/www/build/{p-2ec544c4.entry.js.map → p-59875f0f.entry.js.map} +0 -0
  197. /package/www/build/{p-2ee5c83c.entry.js.map → p-5b260d8b.entry.js.map} +0 -0
  198. /package/www/build/{p-5c9e7645.entry.js.map → p-7787e428.entry.js.map} +0 -0
  199. /package/www/build/{p-20226d0d.entry.js.map → p-8ce62075.entry.js.map} +0 -0
  200. /package/www/build/{p-c49602b1.entry.js.map → p-acf5a569.entry.js.map} +0 -0
  201. /package/www/build/{p-06d2cd5d.entry.js.map → p-c2d44867.entry.js.map} +0 -0
  202. /package/www/build/{p-b4d30129.entry.js.map → p-ca65c04f.entry.js.map} +0 -0
  203. /package/www/build/{p-fdc6cf5a.entry.js.map → p-d593548c.entry.js.map} +0 -0
  204. /package/www/build/{p-4e71c395.entry.js.map → p-e40b9b27.entry.js.map} +0 -0
  205. /package/www/build/{p-6f35845e.entry.js.map → p-e522c00c.entry.js.map} +0 -0
  206. /package/www/build/{p-7193d061.entry.js.map → p-eac25945.entry.js.map} +0 -0
  207. /package/www/build/{p-242b71f0.entry.js.map → p-eb10781f.entry.js.map} +0 -0
@@ -39,7 +39,7 @@ const ZMyzCardComponent = class {
39
39
  return elemClasses;
40
40
  }
41
41
  render() {
42
- return (index.h("div", { key: '37a248c80cbcc045d2c053bda3acb7506a6d3028', class: this.retrieveClass(), tabindex: "0" }, index.h("slot", { key: 'e62b60f5edc7bc949261b0e1f5a9734db07f3ed9' })));
42
+ return (index.h("div", { key: 'a72f39c9ad9161449a5f58965e2d93d83a107490', class: this.retrieveClass(), tabindex: "0" }, index.h("slot", { key: '66669fd94e4018f6c6dd05ff9d9bda41c0f007bf' })));
43
43
  }
44
44
  };
45
45
  ZMyzCardComponent.style = ZMyzCardStyle0;
@@ -52,7 +52,7 @@ const ZMyzCardBody = class {
52
52
  index.registerInstance(this, hostRef);
53
53
  }
54
54
  render() {
55
- return (index.h("div", { key: '7d193913aaee1ce18633cb39f322bde63dd0f636' }, index.h("slot", { key: '59b557d02f579f35c15ac0ac03a084a3f43a00c0', name: "alert" }), index.h("slot", { key: 'bcd8832a6c010f6dbc6a6d5579efe7801ff6a60c', name: "cover" })));
55
+ return (index.h("div", { key: '12386f13964444007e6bef9219e791d01f131d9a' }, index.h("slot", { key: '10378c336d6a6c70dea11375397fd734dc570f53', name: "alert" }), index.h("slot", { key: '7dfff15df0a1a32f63ac329a4be3b11d7d4554f6', name: "cover" })));
56
56
  }
57
57
  };
58
58
  ZMyzCardBody.style = ZMyzCardBodyStyle0;
@@ -72,7 +72,7 @@ const ZMyzCardCover = class {
72
72
  this.img = this.defaultimg;
73
73
  }
74
74
  render() {
75
- return (index.h("img", { key: '5d3f258dae6077687ccd98690f6caad390bc05aa', class: this.faded && "faded", onError: this.hadleOnImageError.bind(this), alt: this.titolo, src: this.img }));
75
+ return (index.h("img", { key: '1123789029226a12e2953a6b58d5030eadec11ab', class: this.faded && "faded", onError: this.hadleOnImageError.bind(this), alt: this.titolo, src: this.img }));
76
76
  }
77
77
  };
78
78
  ZMyzCardCover.style = ZMyzCardCoverStyle0;
@@ -108,7 +108,7 @@ const ZMyzCardHeader = class {
108
108
  };
109
109
  }
110
110
  render() {
111
- return (index.h("header", { key: '904634bcd078321c3142c3b92eb8ad14244c6c4b', class: this.retrieveClass() }, index.h("slot", { key: 'c6e19f0f2b536def7a32c3dd9343439f8d532e98', name: "aria-heading" }), index.h("span", { key: '36da9db6eb1620f5ef38db575ec81196997ccb48', class: "card-title", ref: (el) => (this.ellipsis = el), title: this.getTitle() }, this.titolo), index.h("slot", { key: '7f3f94bb0161e385189963b861eb61ef224c1548', name: "icon" })));
111
+ return (index.h("header", { key: 'b78bcd035a80f910780071965ac3226cfe13d307', class: this.retrieveClass() }, index.h("slot", { key: '012280b6c5689ce3266f63460002bc8aba202493', name: "aria-heading" }), index.h("span", { key: 'ee783cc471606e97a88809eddf6d0436e07d15e7', class: "card-title", ref: (el) => (this.ellipsis = el), title: this.getTitle() }, this.titolo), index.h("slot", { key: '0a628219decd82055dc7e7b6c0b6fc30570e268e', name: "icon" })));
112
112
  }
113
113
  };
114
114
  ZMyzCardHeader.style = ZMyzCardHeaderStyle0;
@@ -26,7 +26,7 @@ const ZMyzList = class {
26
26
  }
27
27
  render() {
28
28
  const lastElem = this.list ? this.list.length - 1 : -1;
29
- return (index.h("ul", { key: '7ae896a090c0215b27d6e4b9cd44a269c03c009c' }, this.list &&
29
+ return (index.h("ul", { key: '943b3633a4b233466186116698cb65f49ecde7ce' }, this.list &&
30
30
  this.list.map((bean, i) => (index.h("z-myz-list-item", { listitemid: bean.listitemid, text: bean.text, link: bean.link, linktarget: bean.linktarget, icon: bean.icon, underlined: lastElem != i })))));
31
31
  }
32
32
  static get watchers() { return {
@@ -24,7 +24,7 @@ const ZOtp = class {
24
24
  this.otpRef = [...Array(this.inputNum)];
25
25
  }
26
26
  render() {
27
- return (index.h("div", { key: '3ade863dca22eba0ad15da52ead3264745aeca8c', class: "otp-container" }, index.h("div", { key: 'd95c622db298145d11b422312f12194b9014163b', class: "digits-container" }, this.otp.map((_val, i) => (index.h("input", { class: this.status == index$1.InputStatus.ERROR ? "error" : null, onKeyDown: (e) => {
27
+ return (index.h("div", { key: 'a7f919ee8d83098adb6303d6af70a701684d9752', class: "otp-container" }, index.h("div", { key: '07143c3078db7cd5dd9f5bf48c977d87df9457e9', class: "digits-container" }, this.otp.map((_val, i) => (index.h("input", { class: this.status == index$1.InputStatus.ERROR ? "error" : null, onKeyDown: (e) => {
28
28
  if (e.keyCode > 47) {
29
29
  this.otpRef[i].value = "";
30
30
  }
@@ -35,7 +35,7 @@ const ZOtp = class {
35
35
  }, onInput: (e) => {
36
36
  this.otp[i] = e.target.value;
37
37
  this.emitInputChange(this.otp.join(""));
38
- }, type: "text", minlength: "1", maxlength: "1", autoComplete: "off", ref: (el) => (this.otpRef[i] = el) })))), index.h("z-input-message", { key: 'be1d42180f1079a7a3dc199c2e4a9467e6216a47', message: this.message, status: this.status })));
38
+ }, type: "text", minlength: "1", maxlength: "1", autoComplete: "off", ref: (el) => (this.otpRef[i] = el) })))), index.h("z-input-message", { key: '19663f9110cfe610c76ca900938192fb4f7fb96c', message: this.message, status: this.status })));
39
39
  }
40
40
  };
41
41
  ZOtp.style = ZOtpStyle0;
@@ -12,7 +12,7 @@ const ZPocketMessage = class {
12
12
  index.registerInstance(this, hostRef);
13
13
  }
14
14
  render() {
15
- return (index.h("div", { key: '843ee900479a31fb894034f112cc0228b96777db' }, index.h("z-icon", { key: 'fd7328544da14a6f0291267e9b5b0f13eebc6d78', name: "exclamation-circle" }), index.h("div", { key: '1612d02ebeb6a3181d632350af14d847883cdce4', class: "content" }, index.h("slot", { key: 'f7256dfd56028f2dc9e3c42c324c210041ed50ad' })), index.h("div", { key: '9b5db0c5c46967ba4ae2091fac0ab3e4ec3718ff', class: "cta-wrapper" }, index.h("slot", { key: '9a23bdb386bd1c10d311c41226a430e2a61b9d45', name: "cta" }))));
15
+ return (index.h("div", { key: 'db10fcdf23fbd0da7833e01f8d72a6302f6cadba' }, index.h("z-icon", { key: '7c241ba1a147f71db15162c5ee6d84738536430e', name: "exclamation-circle" }), index.h("div", { key: '7ec8936f539f19047c644be7b9ec1dd985d3d42e', class: "content" }, index.h("slot", { key: 'a6cd9ab932dcac28058640df1a08da9f174e1a2b' })), index.h("div", { key: '376e912ec9d49a7148b620b54ce26d9e8a278f1f', class: "cta-wrapper" }, index.h("slot", { key: '3ccbb7a2cd41d211ab76734fb73e7b23aa100d9b', name: "cta" }))));
16
16
  }
17
17
  };
18
18
  ZPocketMessage.style = ZPocketMessageStyle0;
@@ -64,7 +64,7 @@ const ZPocket = class {
64
64
  }
65
65
  }
66
66
  render() {
67
- return (index.h("div", { key: 'ad25460e1d77b82434d7237fc8bf70bdaccd1037' }, index.h("div", { key: '66003489b14556acf7ea4345dfd942cb244abfad', "data-action": "pocketBackground", "data-pocket": this.pocketid, class: `background ${this.status}`, onClick: (e) => this.handleBackgroundClick(e) }), index.h("div", { key: '69e23ca317f9aa2d68e00213af6d4aba2d01a5f9', id: this.pocketid, class: "content-wrapper" }, index.h("div", { key: '1d02d4b55e0853375c3770bd0f038e38922ce3f4' }, index.h("slot", { key: 'a4a0ebc7522d5f242263ac87b8b61191dd98d2b7' })))));
67
+ return (index.h("div", { key: 'e900c7a30cc100691a08e99eef3e75ab09228ac6' }, index.h("div", { key: '789f4dd2b162f4693b4d6d4d0636d6614a69e2a3', "data-action": "pocketBackground", "data-pocket": this.pocketid, class: `background ${this.status}`, onClick: (e) => this.handleBackgroundClick(e) }), index.h("div", { key: 'f53572738d1fc377efafa3f4c9b2b012eb8dcd87', id: this.pocketid, class: "content-wrapper" }, index.h("div", { key: '8bc1cdbc0c8cd10bb978dd4e04da88da183a2a0c' }, index.h("slot", { key: '6ac22e14a792914aca4dca5a7da5bd3999a6dd17' })))));
68
68
  }
69
69
  get hostElement() { return index.getElement(this); }
70
70
  static get watchers() { return {
@@ -88,7 +88,7 @@ const ZPocketBody = class {
88
88
  }
89
89
  }
90
90
  render() {
91
- return (index.h("main", { key: 'f017441cd9ae7d12e0bea9ee61f6ebae5809ade7', class: this.status }, index.h("slot", { key: '02d262a95a8d41b1e303ac9d0efbd4218e8b28c9' })));
91
+ return (index.h("main", { key: 'c93989e78b34be843571bb21bbd26f324ae86456', class: this.status }, index.h("slot", { key: 'f4755713e7084a59b91d35456502d0456a2aa339' })));
92
92
  }
93
93
  };
94
94
  ZPocketBody.style = ZPocketBodyStyle0;
@@ -118,7 +118,7 @@ const ZPocketHeader = class {
118
118
  mc.on("pandown", () => this.emitPocketHeaderPan("down"));
119
119
  }
120
120
  render() {
121
- return (index.h("header", { key: 'f14fbd3ff1d6757a840175eb9f17e71e40d7c507', role: "button", tabindex: 0, onClick: () => this.emitPocketHeaderClick(), onKeyPress: (ev) => utils.handleKeyboardSubmit(ev, this.emitPocketHeaderClick), ref: (el) => (this.swipeWrap = el) }, index.h("slot", { key: 'f6087dbe044ca3f0d2777194a73e60c4d5306c3c' })));
121
+ return (index.h("header", { key: '03faf1e1005718b682ebae5e663d880e6b3763a2', role: "button", tabindex: 0, onClick: () => this.emitPocketHeaderClick(), onKeyPress: (ev) => utils.handleKeyboardSubmit(ev, this.emitPocketHeaderClick), ref: (el) => (this.swipeWrap = el) }, index.h("slot", { key: '329c89a202e0a5f351c080ed513ce90e873caa75' })));
122
122
  }
123
123
  };
124
124
  ZPocketHeader.style = ZPocketHeaderStyle0;
@@ -304,7 +304,7 @@ const ZPopover = class {
304
304
  this.onOpen();
305
305
  }
306
306
  render() {
307
- return index.h("slot", { key: '5b096156553e94c50200ccd47d6ea97d65f03c54' });
307
+ return index.h("slot", { key: 'dcaaf8ad7c023e4f7b681aa8e39273d485e69d80' });
308
308
  }
309
309
  get host() { return index.getElement(this); }
310
310
  static get watchers() { return {
@@ -18,7 +18,7 @@ const ZSectionTitle = class {
18
18
  this.hasSecondaryTitle = !!this.host.querySelector("[slot=secondary-title]");
19
19
  }
20
20
  render() {
21
- return (index.h(index.Host, { key: 'ffae3cccc6d4923d5904055ab083a1d581818e5b' }, index.h("slot", { key: 'a8bad3881acb225f24dafd28316bc08be97657f1', name: "secondary-title" }), !this.hasSecondaryTitle && this.dividerPosition === index$1.ZSectionTitleDividerPosition.BEFORE && (index.h("z-divider", { size: index$1.DividerSize.LARGE, color: "z-section-title--divider-color" })), index.h("slot", { key: '7121066325d4be6c5385d70083da300f15eacf2b', name: "primary-title" }), !this.hasSecondaryTitle && this.dividerPosition === index$1.ZSectionTitleDividerPosition.AFTER && (index.h("z-divider", { size: index$1.DividerSize.LARGE, color: "z-section-title--divider-color" }))));
21
+ return (index.h(index.Host, { key: 'd691017e2953d129c291a8d1e8fa5411f0faf457' }, index.h("slot", { key: '99c8dce52dde7a85c2dd7423d08875b9a5ab4dfe', name: "secondary-title" }), !this.hasSecondaryTitle && this.dividerPosition === index$1.ZSectionTitleDividerPosition.BEFORE && (index.h("z-divider", { size: index$1.DividerSize.LARGE, color: "z-section-title--divider-color" })), index.h("slot", { key: 'de5810f9b9a3db9c2fb81a59ac3dda261079b81f', name: "primary-title" }), !this.hasSecondaryTitle && this.dividerPosition === index$1.ZSectionTitleDividerPosition.AFTER && (index.h("z-divider", { size: index$1.DividerSize.LARGE, color: "z-section-title--divider-color" }))));
22
22
  }
23
23
  get host() { return index.getElement(this); }
24
24
  };
@@ -52,7 +52,7 @@ const ZSkipToContent = class {
52
52
  this.visible = false;
53
53
  }
54
54
  render() {
55
- return (index.h(index.Host, { key: '911d2c6e0710ecc5f438fba15ace454e2d43b2d1', class: {
55
+ return (index.h(index.Host, { key: 'a23874893887060f9581859334bd1a21603a46bb', class: {
56
56
  [this.variant]: true,
57
57
  "skip-to-content-visible": this.visible,
58
58
  } }, this.links.map((link, i) => {
@@ -12,7 +12,7 @@ const ZVisuallyHidden = class {
12
12
  index.registerInstance(this, hostRef);
13
13
  }
14
14
  render() {
15
- return index.h("slot", { key: '65fd2ab29bc68aa93203b219daa615d80bc6bdba' });
15
+ return index.h("slot", { key: '3621cee7a23fe68812b92d58a239dce03caf4724' });
16
16
  }
17
17
  };
18
18
  ZVisuallyHidden.style = ZVisuallyHiddenStyle0;
@@ -1,58 +1,53 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { InfoRevealPosition } from "../../beans";
2
+ import { ControlSize, InfoRevealPosition } from "../../beans";
3
3
  /**
4
4
  * Info reveal component.
5
5
  *
6
- * @slot - info to display in the info box. If more than one element has been slotted,
7
- * by clicking on the panel it switches to the next info element.
8
- * @cssprop --z-info-reveal-theme--surface - background color of the info reveal panel.
9
- * @cssprop --z-info-reveal-theme--text - foreground color of the info reveal panel.
10
- * @cssprop --z-info-reveal-shadow - shadow of the info reveal panel.
11
- * @cssprop --z-info-reveal-max-width - max width of the info reveal panel.
6
+ * @slot - content of the info panel.
7
+ * @cssprop --z-info-reveal-panel-width - Width of the info panel.
12
8
  */
13
9
  export class ZInfoReveal {
14
10
  constructor() {
15
11
  this.icon = "informationsource";
16
12
  this.position = InfoRevealPosition.BOTTOM_RIGHT;
17
13
  this.label = undefined;
14
+ this.ariaLabel = "Apri pannello informazioni";
15
+ this.size = ControlSize.BIG;
18
16
  this.open = false;
19
- this.currentIndex = null;
20
- }
21
- watchItems() {
22
- Array.from(this.el.children).forEach((child, index) => {
23
- if (this.currentIndex === index) {
24
- child.setAttribute("data-current", "");
25
- }
26
- else {
27
- child.removeAttribute("data-current");
28
- }
29
- });
30
17
  }
31
18
  /**
32
- * Open the info box.
19
+ * Adjust the position of the info panel to prevent exiting the viewport.
33
20
  */
34
- openInfoBox() {
35
- this.currentIndex = 0;
36
- this.open = true;
21
+ adjustPanelPosition() {
22
+ if (!this.open || !this.panel) {
23
+ return;
24
+ }
25
+ const rect = this.host.getBoundingClientRect();
26
+ const gridMargin = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--grid-margin"), 10);
27
+ const pageWidth = document.documentElement.offsetWidth;
28
+ // Available space for the info panel to grow towards the edge of the page, based on the `position` prop.
29
+ const availableSpace = Math.round((this.position.includes("left") ? pageWidth - rect.left : rect.right) - gridMargin);
30
+ this.panel.style.maxWidth = `${availableSpace}px`;
37
31
  }
38
32
  /**
39
- * Close the info box.
33
+ * Toggle the open state of the info panel.
40
34
  */
41
- closeInfoBox() {
42
- this.open = false;
35
+ togglePanel() {
36
+ this.open = !this.open;
43
37
  }
44
38
  /**
45
- * Navigate slotted info.
46
- * It closes the info box after the last info has been navigated.
39
+ * Close the info panel.
47
40
  */
48
- next() {
49
- this.currentIndex = this.currentIndex + 1;
50
- if (this.currentIndex === this.el.children.length) {
51
- this.closeInfoBox();
41
+ closePanel() {
42
+ this.open = false;
43
+ }
44
+ handleEscapeKey(event) {
45
+ if (event.key === "Escape" && this.open) {
46
+ this.closePanel();
52
47
  }
53
48
  }
54
49
  render() {
55
- return (h(Host, { key: '1cc6cbacd33676a39d804037c786a37fd7aa9864', open: this.open }, h("button", { key: '5ad8966b67c365f654c0ddb50e879a0859a9e785', class: "z-info-reveal-trigger", onClick: this.openInfoBox.bind(this) }, this.label && h("span", { class: "z-info-reveal-label" }, this.label), h("z-icon", { key: '5314f51f922a64ee58162687bab764835401d6a2', name: this.icon })), this.open && (h("div", { class: "info-box", onClick: this.next.bind(this), tabIndex: 0 }, h("slot", null), h("button", { class: "z-info-reveal-close", onClick: this.closeInfoBox.bind(this) }, h("z-icon", { name: "close" }))))));
50
+ return (h(Host, { key: 'db425718606f2b7f411fab9cdac57d91ce88560c', open: this.open }, h("button", { key: 'a70882d456af51c526726220a05864ab54ea86d6', class: "z-info-reveal-trigger", type: "button", onClick: this.togglePanel.bind(this), "aria-label": !this.label ? this.ariaLabel : undefined, "aria-expanded": this.open ? "true" : "false", "aria-controls": "z-info-reveal-panel" }, this.icon && h("z-icon", { name: this.icon }), this.label && h("span", { class: "z-info-reveal-label" }, this.label)), h("div", { key: '765172552ea823e07e010a68c201f5fa76fbc93d', class: "z-info-reveal-panel", id: "z-info-reveal-panel", ref: (el) => (this.panel = el), hidden: !this.open }, h("slot", { key: 'f95ed8f0c6c94758b389139dde42289ef8b78ffc' }), h("button", { key: 'a80d002f3d07f101af8bcc84ef2a78d85da7036f', class: "z-info-reveal-close", type: "button", onClick: this.closePanel.bind(this), "aria-label": "Chiudi pannello informazioni" }, h("z-icon", { key: '015386db04b0f4bdb2fefd9da623fb03327fbf86', name: "multiply" })))));
56
51
  }
57
52
  static get is() { return "z-info-reveal"; }
58
53
  static get encapsulation() { return "shadow"; }
@@ -80,7 +75,7 @@ export class ZInfoReveal {
80
75
  "optional": true,
81
76
  "docs": {
82
77
  "tags": [],
83
- "text": "Name of the icon for the open button"
78
+ "text": "Name of the icon for the trigger button"
84
79
  },
85
80
  "attribute": "icon",
86
81
  "reflect": false,
@@ -104,7 +99,7 @@ export class ZInfoReveal {
104
99
  "optional": true,
105
100
  "docs": {
106
101
  "tags": [],
107
- "text": "Info reveal's position"
102
+ "text": "The position of the z-info-reveal in the page. This helps to correctly place the info panel.\nThe panel will grow in the opposite direction of the position.\nFor example, with the default position `BOTTOM_RIGHT`, the panel will grow vertically upwards and horizontally to the left."
108
103
  },
109
104
  "attribute": "position",
110
105
  "reflect": true,
@@ -122,24 +117,83 @@ export class ZInfoReveal {
122
117
  "optional": true,
123
118
  "docs": {
124
119
  "tags": [],
125
- "text": "Text that appears on closed panel next to the open button."
120
+ "text": "Label of the trigger button."
126
121
  },
127
122
  "attribute": "label",
128
123
  "reflect": false
124
+ },
125
+ "ariaLabel": {
126
+ "type": "string",
127
+ "mutable": false,
128
+ "complexType": {
129
+ "original": "string",
130
+ "resolved": "string",
131
+ "references": {}
132
+ },
133
+ "required": false,
134
+ "optional": false,
135
+ "docs": {
136
+ "tags": [],
137
+ "text": "Aria label of the trigger button. It will be only used when `label` prop is empty."
138
+ },
139
+ "attribute": "aria-label",
140
+ "reflect": false,
141
+ "defaultValue": "\"Apri pannello informazioni\""
142
+ },
143
+ "size": {
144
+ "type": "string",
145
+ "mutable": false,
146
+ "complexType": {
147
+ "original": "ControlSize",
148
+ "resolved": "ControlSize.BIG | ControlSize.SMALL | ControlSize.X_SMALL",
149
+ "references": {
150
+ "ControlSize": {
151
+ "location": "import",
152
+ "path": "../../beans",
153
+ "id": "src/beans/index.tsx::ControlSize"
154
+ }
155
+ }
156
+ },
157
+ "required": false,
158
+ "optional": true,
159
+ "docs": {
160
+ "tags": [],
161
+ "text": "Size of the trigger button"
162
+ },
163
+ "attribute": "size",
164
+ "reflect": true,
165
+ "defaultValue": "ControlSize.BIG"
129
166
  }
130
167
  };
131
168
  }
132
169
  static get states() {
133
170
  return {
134
- "open": {},
135
- "currentIndex": {}
171
+ "open": {}
136
172
  };
137
173
  }
138
- static get elementRef() { return "el"; }
174
+ static get elementRef() { return "host"; }
139
175
  static get watchers() {
140
176
  return [{
141
- "propName": "currentIndex",
142
- "methodName": "watchItems"
177
+ "propName": "position",
178
+ "methodName": "adjustPanelPosition"
179
+ }, {
180
+ "propName": "open",
181
+ "methodName": "adjustPanelPosition"
182
+ }];
183
+ }
184
+ static get listeners() {
185
+ return [{
186
+ "name": "resize",
187
+ "method": "adjustPanelPosition",
188
+ "target": "window",
189
+ "capture": false,
190
+ "passive": true
191
+ }, {
192
+ "name": "keydown",
193
+ "method": "handleEscapeKey",
194
+ "target": "window",
195
+ "capture": true,
196
+ "passive": false
143
197
  }];
144
198
  }
145
199
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/z-info-reveal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAQ/C;;;;;;;;;GASG;AACH,MAAM,OAAO,WAAW;;oBAKd,mBAAmB;wBAIK,kBAAkB,CAAC,YAAY;;oBAQxD,KAAK;4BAIW,IAAI;;IAG3B,UAAU;QACR,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YACpD,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,EAAE,CAAC;gBAChC,KAAK,CAAC,YAAY,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;YACzC,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;YACxC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACK,WAAW;QACjB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED;;OAEG;IACK,YAAY;QAClB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;IACpB,CAAC;IAED;;;OAGG;IACK,IAAI;QACV,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QAC1C,IAAI,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YAClD,IAAI,CAAC,YAAY,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAE,IAAI,CAAC,IAAI;YACnB,+DACE,KAAK,EAAC,uBAAuB,EAC7B,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC;gBAEnC,IAAI,CAAC,KAAK,IAAI,YAAM,KAAK,EAAC,qBAAqB,IAAE,IAAI,CAAC,KAAK,CAAQ;gBACpE,+DAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,GAAW,CAC3B;YACR,IAAI,CAAC,IAAI,IAAI,CACZ,WACE,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAC7B,QAAQ,EAAE,CAAC;gBAEX,eAAa;gBACb,cACE,KAAK,EAAC,qBAAqB,EAC3B,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;oBAErC,cAAQ,IAAI,EAAC,OAAO,GAAU,CACvB,CACL,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, h, Prop, State, Watch, Element, Host} from \"@stencil/core\";\nimport {InfoRevealPosition} from \"../../beans\";\n\n@Component({\n tag: \"z-info-reveal\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\n\n/**\n * Info reveal component.\n *\n * @slot - info to display in the info box. If more than one element has been slotted,\n * by clicking on the panel it switches to the next info element.\n * @cssprop --z-info-reveal-theme--surface - background color of the info reveal panel.\n * @cssprop --z-info-reveal-theme--text - foreground color of the info reveal panel.\n * @cssprop --z-info-reveal-shadow - shadow of the info reveal panel.\n * @cssprop --z-info-reveal-max-width - max width of the info reveal panel.\n */\nexport class ZInfoReveal {\n @Element() el: HTMLZInfoRevealElement;\n\n /** Name of the icon for the open button */\n @Prop()\n icon? = \"informationsource\";\n\n /** Info reveal's position */\n @Prop({reflect: true})\n position?: InfoRevealPosition = InfoRevealPosition.BOTTOM_RIGHT;\n\n /** Text that appears on closed panel next to the open button. */\n @Prop()\n label?: string;\n\n /** Whether the info panel is open. */\n @State()\n open = false;\n\n /** Current index for the info queue. */\n @State()\n currentIndex: number = null;\n\n @Watch(\"currentIndex\")\n watchItems(): void {\n Array.from(this.el.children).forEach((child, index) => {\n if (this.currentIndex === index) {\n child.setAttribute(\"data-current\", \"\");\n } else {\n child.removeAttribute(\"data-current\");\n }\n });\n }\n\n /**\n * Open the info box.\n */\n private openInfoBox(): void {\n this.currentIndex = 0;\n this.open = true;\n }\n\n /**\n * Close the info box.\n */\n private closeInfoBox(): void {\n this.open = false;\n }\n\n /**\n * Navigate slotted info.\n * It closes the info box after the last info has been navigated.\n */\n private next(): void {\n this.currentIndex = this.currentIndex + 1;\n if (this.currentIndex === this.el.children.length) {\n this.closeInfoBox();\n }\n }\n\n render(): HTMLZInfoRevealElement {\n return (\n <Host open={this.open}>\n <button\n class=\"z-info-reveal-trigger\"\n onClick={this.openInfoBox.bind(this)}\n >\n {this.label && <span class=\"z-info-reveal-label\">{this.label}</span>}\n <z-icon name={this.icon}></z-icon>\n </button>\n {this.open && (\n <div\n class=\"info-box\"\n onClick={this.next.bind(this)}\n tabIndex={0}\n >\n <slot></slot>\n <button\n class=\"z-info-reveal-close\"\n onClick={this.closeInfoBox.bind(this)}\n >\n <z-icon name=\"close\"></z-icon>\n </button>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/z-info-reveal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AACtF,OAAO,EAAC,WAAW,EAAE,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAE5D;;;;;GAKG;AAMH,MAAM,OAAO,WAAW;;oBAGd,mBAAmB;wBAQK,kBAAkB,CAAC,YAAY;;yBAQnD,4BAA4B;oBAInB,WAAW,CAAC,GAAG;oBAI7B,KAAK;;IAMZ;;OAEG;IAIH,mBAAmB;QACjB,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YAC9B,OAAO;QACT,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC/C,MAAM,UAAU,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9G,MAAM,SAAS,GAAG,QAAQ,CAAC,eAAe,CAAC,WAAW,CAAC;QACvD,yGAAyG;QACzG,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAC/B,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,UAAU,CACnF,CAAC;QACF,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,GAAG,cAAc,IAAI,CAAC;IACpD,CAAC;IAED;;OAEG;IACK,WAAW;QACjB,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;OAEG;IACK,UAAU;QAChB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;IACpB,CAAC;IAGD,eAAe,CAAC,KAAoB;QAClC,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACxC,IAAI,CAAC,UAAU,EAAE,CAAC;QACpB,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAE,IAAI,CAAC,IAAI;YACnB,+DACE,KAAK,EAAC,uBAAuB,EAC7B,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,gBACxB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,mBACrC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,mBAC7B,qBAAqB;gBAElC,IAAI,CAAC,IAAI,IAAI,cAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI;gBACxC,IAAI,CAAC,KAAK,IAAI,YAAM,KAAK,EAAC,qBAAqB,IAAE,IAAI,CAAC,KAAK,CAAQ,CAC7D;YACT,4DACE,KAAK,EAAC,qBAAqB,EAC3B,EAAE,EAAC,qBAAqB,EACxB,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,EAC9B,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI;gBAElB,8DAAa;gBACb,+DACE,KAAK,EAAC,qBAAqB,EAC3B,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,gBACxB,8BAA8B;oBAEzC,+DAAQ,IAAI,EAAC,UAAU,GAAG,CACnB,CACL,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, h, Prop, State, Host, Listen, Watch, Element} from \"@stencil/core\";\nimport {ControlSize, InfoRevealPosition} from \"../../beans\";\n\n/**\n * Info reveal component.\n *\n * @slot - content of the info panel.\n * @cssprop --z-info-reveal-panel-width - Width of the info panel.\n */\n@Component({\n tag: \"z-info-reveal\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZInfoReveal {\n /** Name of the icon for the trigger button */\n @Prop()\n icon? = \"informationsource\";\n\n /**\n * The position of the z-info-reveal in the page. This helps to correctly place the info panel.\n * The panel will grow in the opposite direction of the position.\n * For example, with the default position `BOTTOM_RIGHT`, the panel will grow vertically upwards and horizontally to the left.\n */\n @Prop({reflect: true})\n position?: InfoRevealPosition = InfoRevealPosition.BOTTOM_RIGHT;\n\n /** Label of the trigger button. */\n @Prop()\n label?: string;\n\n /** Aria label of the trigger button. It will be only used when `label` prop is empty. */\n @Prop()\n ariaLabel = \"Apri pannello informazioni\";\n\n /** Size of the trigger button */\n @Prop({reflect: true})\n size?: ControlSize = ControlSize.BIG;\n\n /** Whether the info panel is open. */\n @State()\n open = false;\n\n @Element() host: HTMLZInfoRevealElement;\n\n private panel: HTMLDivElement;\n\n /**\n * Adjust the position of the info panel to prevent exiting the viewport.\n */\n @Watch(\"position\")\n @Watch(\"open\")\n @Listen(\"resize\", {target: \"window\", passive: true})\n adjustPanelPosition(): void {\n if (!this.open || !this.panel) {\n return;\n }\n\n const rect = this.host.getBoundingClientRect();\n const gridMargin = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"--grid-margin\"), 10);\n const pageWidth = document.documentElement.offsetWidth;\n // Available space for the info panel to grow towards the edge of the page, based on the `position` prop.\n const availableSpace = Math.round(\n (this.position.includes(\"left\") ? pageWidth - rect.left : rect.right) - gridMargin\n );\n this.panel.style.maxWidth = `${availableSpace}px`;\n }\n\n /**\n * Toggle the open state of the info panel.\n */\n private togglePanel(): void {\n this.open = !this.open;\n }\n\n /**\n * Close the info panel.\n */\n private closePanel(): void {\n this.open = false;\n }\n\n @Listen(\"keydown\", {target: \"window\", capture: true})\n handleEscapeKey(event: KeyboardEvent): void {\n if (event.key === \"Escape\" && this.open) {\n this.closePanel();\n }\n }\n\n render(): HTMLZInfoRevealElement {\n return (\n <Host open={this.open}>\n <button\n class=\"z-info-reveal-trigger\"\n type=\"button\"\n onClick={this.togglePanel.bind(this)}\n aria-label={!this.label ? this.ariaLabel : undefined}\n aria-expanded={this.open ? \"true\" : \"false\"}\n aria-controls=\"z-info-reveal-panel\"\n >\n {this.icon && <z-icon name={this.icon} />}\n {this.label && <span class=\"z-info-reveal-label\">{this.label}</span>}\n </button>\n <div\n class=\"z-info-reveal-panel\"\n id=\"z-info-reveal-panel\"\n ref={(el) => (this.panel = el)}\n hidden={!this.open}\n >\n <slot></slot>\n <button\n class=\"z-info-reveal-close\"\n type=\"button\"\n onClick={this.closePanel.bind(this)}\n aria-label=\"Chiudi pannello informazioni\"\n >\n <z-icon name=\"multiply\" />\n </button>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -1,103 +1,132 @@
1
1
  :host {
2
- --z-info-reveal-theme--surface: var(--color-black);
3
- --z-info-reveal-theme--text: var(--color-white);
4
- --z-info-reveal-shadow: var(--shadow-2);
5
- --z-info-reveal-max-width: 375px; /* defaults to average width of mobile devices */
2
+ --z-info-reveal-panel-width: 384px; /* defaults half the size of the mobile breakpoint */
3
+ --trigger-size: 44px;
6
4
 
7
5
  position: relative;
8
- display: flex;
9
- width: fit-content;
10
- background-color: var(--z-info-reveal-theme--surface);
11
- color: var(--z-info-reveal-theme--text);
12
- font-size: var(--font-size-3);
13
- font-weight: var(--font-rg);
14
- letter-spacing: 0;
15
- line-height: 1.5;
6
+ }
7
+
8
+ :host * {
9
+ box-sizing: border-box;
16
10
  }
17
11
 
18
12
  button {
13
+ --trigger-icon-size: calc(var(--trigger-size) / 2);
14
+
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
19
18
  padding: 0;
20
19
  border: none;
21
20
  background-color: transparent;
22
- border-radius: 0;
23
- color: inherit;
24
21
  cursor: pointer;
25
- fill: currentcolor;
26
22
  font-family: inherit;
27
- font-size: inherit;
28
- font-weight: inherit;
29
23
  letter-spacing: inherit;
30
- line-height: inherit;
31
24
  }
32
25
 
33
- z-icon {
34
- --z-icon-width: calc(var(--space-unit) * 3);
35
- --z-icon-height: calc(var(--space-unit) * 3);
36
-
37
- display: flex;
26
+ button:focus:focus-visible {
27
+ box-shadow: var(--shadow-focus-primary);
28
+ outline: none;
38
29
  }
39
30
 
40
31
  .z-info-reveal-trigger {
32
+ min-width: var(--trigger-size);
33
+ height: var(--trigger-size);
34
+ padding: calc((var(--trigger-size) - var(--trigger-icon-size)) / 2);
35
+ background-color: var(--color-surface05);
36
+ border-radius: var(--border-radius);
37
+ color: var(--color-text04);
38
+ column-gap: var(--space-unit);
39
+ font-weight: var(--font-sb);
40
+ line-height: 1rem;
41
+ }
42
+
43
+ :host([size="big"]) .z-info-reveal-trigger {
44
+ font-size: var(--font-size-2);
45
+ }
46
+
47
+ :host([size="small"]) .z-info-reveal-trigger {
48
+ --trigger-size: 36px;
49
+
50
+ font-size: var(--font-size-2);
51
+ }
52
+
53
+ :host([size="x-small"]) .z-info-reveal-trigger {
54
+ --trigger-size: 32px;
55
+
56
+ padding: var(--space-unit);
57
+ font-size: var(--font-size-1);
58
+ }
59
+
60
+ :host > .z-info-reveal-trigger z-icon {
61
+ --z-icon-width: var(--trigger-icon-size);
62
+ --z-icon-height: var(--trigger-icon-size);
63
+
41
64
  display: flex;
42
- width: fit-content;
43
- height: 100%;
44
- align-items: center;
45
- padding: calc(var(--space-unit) / 2);
46
- box-shadow: var(--z-info-reveal-shadow);
47
- column-gap: calc(var(--space-unit) / 2);
65
+ fill: var(--color-icon03);
48
66
  }
49
67
 
50
- :host([position="top_left"]) .z-info-reveal-trigger,
51
- :host([position="bottom_left"]) .z-info-reveal-trigger {
52
- flex-direction: row-reverse;
68
+ :host([size="small"]) > .z-info-reveal-trigger z-icon {
69
+ --trigger-icon-size: 18px;
53
70
  }
54
71
 
55
- :host([open]) .z-info-reveal-trigger {
56
- box-shadow: none;
72
+ :host([size="x-small"]) > .z-info-reveal-trigger z-icon {
73
+ --trigger-icon-size: 16px;
57
74
  }
58
75
 
59
- .info-box {
76
+ .z-info-reveal-panel {
60
77
  position: absolute;
61
78
  display: flex;
62
- max-width: var(--z-info-reveal-max-width);
63
- padding: calc(var(--space-unit) / 2);
64
- background-color: var(--z-info-reveal-theme--surface);
65
- box-shadow: var(--z-info-reveal-shadow);
66
- column-gap: calc(var(--space-unit) / 2);
67
- cursor: pointer;
79
+ width: var(--z-info-reveal-panel-width);
80
+ height: fit-content;
81
+ align-items: flex-start;
82
+ padding: calc(var(--space-unit) * 1.5);
83
+ background-color: var(--color-surface05);
84
+ border-radius: var(--border-radius);
85
+ box-shadow: var(--shadow-4);
86
+ color: var(--color-text04);
87
+ column-gap: var(--space-unit);
88
+ }
89
+
90
+ .z-info-reveal-panel[hidden] {
91
+ display: none;
92
+ }
93
+
94
+ :host([position="top_left"]) .z-info-reveal-panel,
95
+ :host([position="top_right"]) .z-info-reveal-panel {
96
+ top: 0;
68
97
  }
69
98
 
70
- :host([position="bottom_left"]) .info-box,
71
- :host([position="bottom_right"]) .info-box {
99
+ :host([position="bottom_left"]) .z-info-reveal-panel,
100
+ :host([position="bottom_right"]) .z-info-reveal-panel {
72
101
  bottom: 0;
73
102
  }
74
103
 
75
- :host([position="top_right"]) .info-box,
76
- :host([position="bottom_right"]) .info-box {
104
+ :host([position="top_right"]) .z-info-reveal-panel,
105
+ :host([position="bottom_right"]) .z-info-reveal-panel {
77
106
  right: 0;
78
107
  }
79
108
 
80
- :host([position="top_left"]) .info-box,
81
- :host([position="bottom_left"]) .info-box {
109
+ :host([position="top_left"]) .z-info-reveal-panel,
110
+ :host([position="bottom_left"]) .z-info-reveal-panel {
82
111
  left: 0;
83
- flex-direction: row-reverse;
84
- }
85
-
86
- ::slotted(*) {
87
- display: none;
88
- width: max-content;
89
112
  }
90
113
 
91
- ::slotted([data-current]) {
92
- display: block;
114
+ .z-info-reveal-panel .z-info-reveal-close {
115
+ margin-left: auto;
93
116
  }
94
117
 
95
- :host([position="top_left"]) .z-info-reveal-close,
96
- :host([position="top_right"]) .z-info-reveal-close {
97
- align-self: flex-start;
118
+ .z-info-reveal-panel z-icon {
119
+ fill: var(--color-icon03);
98
120
  }
99
121
 
100
- :host([position="bottom_left"]) .z-info-reveal-close,
101
- :host([position="bottom_right"]) .z-info-reveal-close {
102
- align-self: flex-end;
122
+ @media (max-width: 767px) {
123
+ .z-info-reveal-panel {
124
+ position: fixed;
125
+ top: auto !important;
126
+ bottom: auto !important;
127
+ left: var(--grid-margin) !important;
128
+ width: calc(100% - (var(--grid-margin) * 2)) !important;
129
+ max-width: none !important;
130
+ margin-top: calc(var(--trigger-size) * -1);
131
+ }
103
132
  }
@@ -25,7 +25,7 @@ export class ZOffcanvas {
25
25
  this.open = false;
26
26
  }
27
27
  render() {
28
- return (h(Host, { key: 'dbe2cd2f56dba42df914c0d6643b62ba3543a2cb', class: { "skip-animation": this.skipLoadAnimation } }, h("div", { key: 'ed825afb1152d0e56ebfefd804f473d1e7680cb9', role: "presentation", class: "canvas-container", onTransitionEnd: () => this.handlePageOverflow() }, h("div", { key: '368c7d337aedeed1d464031dc55c33778dee6354', role: "presentation", class: "canvas-content" }, h("slot", { key: '507daf4b8fd961b0e0c81627e42a4fd605eab4c0', name: "canvasContent" }))), this.variant == OffCanvasVariant.OVERLAY && (h("div", { class: "canvas-background", "data-action": "canvasBackground", onClick: () => (this.open = false) }))));
28
+ return (h(Host, { key: '554986cba00c7380f17f737267b450dcf0c3f52e', class: { "skip-animation": this.skipLoadAnimation } }, h("div", { key: 'dc736f68ce6842d9d7e65093e140f5eaebd460f9', role: "presentation", class: "canvas-container", onTransitionEnd: () => this.handlePageOverflow() }, h("div", { key: '416b060ab45249f20e0776cb5a65d27c71cd349b', role: "presentation", class: "canvas-content" }, h("slot", { key: 'e7a92fbd0696f8ed5a215610a3a3f78266ccec2f', name: "canvasContent" }))), this.variant == OffCanvasVariant.OVERLAY && (h("div", { class: "canvas-background", "data-action": "canvasBackground", onClick: () => (this.open = false) }))));
29
29
  }
30
30
  static get is() { return "z-offcanvas"; }
31
31
  static get encapsulation() { return "scoped"; }
@@ -301,7 +301,7 @@ export class ZPopover {
301
301
  this.onOpen();
302
302
  }
303
303
  render() {
304
- return h("slot", { key: '5b096156553e94c50200ccd47d6ea97d65f03c54' });
304
+ return h("slot", { key: 'dcaaf8ad7c023e4f7b681aa8e39273d485e69d80' });
305
305
  }
306
306
  static get is() { return "z-popover"; }
307
307
  static get encapsulation() { return "shadow"; }
@@ -18,7 +18,7 @@ export class ZSectionTitle {
18
18
  this.hasSecondaryTitle = !!this.host.querySelector("[slot=secondary-title]");
19
19
  }
20
20
  render() {
21
- return (h(Host, { key: 'ffae3cccc6d4923d5904055ab083a1d581818e5b' }, h("slot", { key: 'a8bad3881acb225f24dafd28316bc08be97657f1', name: "secondary-title" }), !this.hasSecondaryTitle && this.dividerPosition === ZSectionTitleDividerPosition.BEFORE && (h("z-divider", { size: DividerSize.LARGE, color: "z-section-title--divider-color" })), h("slot", { key: '7121066325d4be6c5385d70083da300f15eacf2b', name: "primary-title" }), !this.hasSecondaryTitle && this.dividerPosition === ZSectionTitleDividerPosition.AFTER && (h("z-divider", { size: DividerSize.LARGE, color: "z-section-title--divider-color" }))));
21
+ return (h(Host, { key: 'd691017e2953d129c291a8d1e8fa5411f0faf457' }, h("slot", { key: '99c8dce52dde7a85c2dd7423d08875b9a5ab4dfe', name: "secondary-title" }), !this.hasSecondaryTitle && this.dividerPosition === ZSectionTitleDividerPosition.BEFORE && (h("z-divider", { size: DividerSize.LARGE, color: "z-section-title--divider-color" })), h("slot", { key: 'de5810f9b9a3db9c2fb81a59ac3dda261079b81f', name: "primary-title" }), !this.hasSecondaryTitle && this.dividerPosition === ZSectionTitleDividerPosition.AFTER && (h("z-divider", { size: DividerSize.LARGE, color: "z-section-title--divider-color" }))));
22
22
  }
23
23
  static get is() { return "z-section-title"; }
24
24
  static get encapsulation() { return "shadow"; }
@@ -45,7 +45,7 @@ export class ZSkipToContent {
45
45
  this.visible = false;
46
46
  }
47
47
  render() {
48
- return (h(Host, { key: '911d2c6e0710ecc5f438fba15ace454e2d43b2d1', class: {
48
+ return (h(Host, { key: 'a23874893887060f9581859334bd1a21603a46bb', class: {
49
49
  [this.variant]: true,
50
50
  "skip-to-content-visible": this.visible,
51
51
  } }, this.links.map((link, i) => {