@zanichelli/albe-web-components 7.2.0 → 7.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/dist/cjs/index-e3299e0a.js +10 -6
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/web-components-library.cjs.js +1 -1
  5. package/dist/cjs/z-app-header_2.cjs.entry.js +152 -0
  6. package/dist/cjs/z-button-sort.cjs.entry.js +1 -1
  7. package/dist/cjs/z-button.cjs.entry.js +43 -0
  8. package/dist/cjs/z-card.cjs.entry.js +1 -1
  9. package/dist/cjs/z-chip.cjs.entry.js +6 -3
  10. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +25 -4
  11. package/dist/cjs/z-list_3.cjs.entry.js +1 -1
  12. package/dist/cjs/z-menu-section.cjs.entry.js +11 -3
  13. package/dist/cjs/z-menu.cjs.entry.js +26 -14
  14. package/dist/cjs/z-myz-card-footer.cjs.entry.js +13 -1
  15. package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
  16. package/dist/cjs/z-myz-card_4.cjs.entry.js +2 -2
  17. package/dist/cjs/z-offcanvas.cjs.entry.js +57 -0
  18. package/dist/cjs/z-searchbar.cjs.entry.js +12 -3
  19. package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
  20. package/dist/cjs/z-toggle-button.cjs.entry.js +4 -2
  21. package/dist/collection/collection-manifest.json +1 -1
  22. package/dist/collection/components/buttons/z-button-sort/index.js +2 -2
  23. package/dist/collection/components/buttons/z-button-sort/styles.css +1 -1
  24. package/dist/collection/components/buttons/z-chip/index.js +25 -3
  25. package/dist/collection/components/buttons/z-chip/styles.css +28 -21
  26. package/dist/collection/components/buttons/z-toggle-button/index.js +21 -1
  27. package/dist/collection/components/buttons/z-toggle-button/styles.css +1 -3
  28. package/dist/collection/components/indicators/z-stepper-item/styles.css +1 -1
  29. package/dist/collection/components/inputs/z-searchbar/index.js +76 -3
  30. package/dist/collection/components/inputs/z-searchbar/styles.css +23 -0
  31. package/dist/collection/components/list/z-list-element/index.js +1 -1
  32. package/dist/collection/components/modal/z-modal/index.js +43 -4
  33. package/dist/collection/components/navigation/z-app-header/index.js +14 -15
  34. package/dist/collection/components/navigation/z-app-header/styles.css +2 -3
  35. package/dist/collection/components/navigation/z-menu/index.js +45 -21
  36. package/dist/collection/components/navigation/z-menu/styles.css +80 -13
  37. package/dist/collection/components/navigation/z-menu-section/index.js +13 -4
  38. package/dist/collection/components/navigation/z-menu-section/styles.css +37 -4
  39. package/dist/collection/components/notification/z-toast-notification/index.js +1 -1
  40. package/dist/collection/components/z-card/index.js +9 -0
  41. package/dist/collection/components/z-card/styles.css +1 -1
  42. package/dist/collection/components/z-offcanvas/index.js +39 -23
  43. package/dist/collection/components/z-offcanvas/styles.css +5 -5
  44. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +13 -1
  45. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
  46. package/dist/collection/snowflakes/myz/card/z-myz-card-header/styles.css +12 -0
  47. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/styles.css +1 -1
  48. package/dist/collection/utils/storybook-utils.js +1 -1
  49. package/dist/esm/index-a2ca4b97.js +10 -6
  50. package/dist/esm/loader.js +1 -1
  51. package/dist/esm/polyfills/css-shim.js +0 -0
  52. package/dist/esm/web-components-library.js +1 -1
  53. package/dist/esm/z-app-header_2.entry.js +147 -0
  54. package/dist/esm/z-button-sort.entry.js +1 -1
  55. package/dist/esm/z-button.entry.js +39 -0
  56. package/dist/esm/z-card.entry.js +1 -1
  57. package/dist/esm/z-chip.entry.js +7 -4
  58. package/dist/esm/z-dragdrop-area_2.entry.js +25 -4
  59. package/dist/esm/z-list_3.entry.js +1 -1
  60. package/dist/esm/z-menu-section.entry.js +11 -3
  61. package/dist/esm/z-menu.entry.js +26 -14
  62. package/dist/esm/z-myz-card-footer.entry.js +14 -2
  63. package/dist/esm/z-myz-card-icon.entry.js +1 -1
  64. package/dist/esm/z-myz-card_4.entry.js +2 -2
  65. package/dist/esm/z-offcanvas.entry.js +53 -0
  66. package/dist/esm/z-searchbar.entry.js +13 -4
  67. package/dist/esm/z-stepper-item.entry.js +1 -1
  68. package/dist/esm/z-toggle-button.entry.js +4 -2
  69. package/dist/types/beans/index.d.ts +0 -0
  70. package/dist/types/components/buttons/z-button/index.d.ts +0 -0
  71. package/dist/types/components/buttons/z-button-sort/index.d.ts +2 -2
  72. package/dist/types/components/buttons/z-chip/index.d.ts +2 -0
  73. package/dist/types/components/buttons/z-toggle-button/index.d.ts +2 -0
  74. package/dist/types/components/buttons/z-toggle-switch/index.d.ts +0 -0
  75. package/dist/types/components/date-picker/utils.d.ts +0 -0
  76. package/dist/types/components/date-picker/z-date-picker/index.d.ts +0 -0
  77. package/dist/types/components/date-picker/z-range-picker/index.d.ts +0 -0
  78. package/dist/types/components/file-upload/z-dragdrop-area/index.d.ts +0 -0
  79. package/dist/types/components/file-upload/z-file/index.d.ts +0 -0
  80. package/dist/types/components/file-upload/z-file-upload/index.d.ts +0 -0
  81. package/dist/types/components/icons/icons.d.ts +0 -0
  82. package/dist/types/components/icons/z-icon/index.d.ts +0 -0
  83. package/dist/types/components/index.d.ts +0 -0
  84. package/dist/types/components/indicators/z-stepper/index.d.ts +0 -0
  85. package/dist/types/components/indicators/z-stepper-item/index.d.ts +0 -0
  86. package/dist/types/components/inputs/z-combobox/index.d.ts +0 -0
  87. package/dist/types/components/inputs/z-input/index.d.ts +0 -0
  88. package/dist/types/components/inputs/z-input-message/index.d.ts +0 -0
  89. package/dist/types/components/inputs/z-searchbar/index.d.ts +7 -1
  90. package/dist/types/components/inputs/z-select/index.d.ts +0 -0
  91. package/dist/types/components/list/z-list/index.d.ts +0 -0
  92. package/dist/types/components/list/z-list-element/index.d.ts +0 -0
  93. package/dist/types/components/list/z-list-group/index.d.ts +0 -0
  94. package/dist/types/components/list/z-toast-notification-list/index.d.ts +0 -0
  95. package/dist/types/components/logo/z-logo/index.d.ts +0 -0
  96. package/dist/types/components/modal/z-modal/index.d.ts +4 -0
  97. package/dist/types/components/navigation/tabs/z-navigation-tab/index.d.ts +0 -0
  98. package/dist/types/components/navigation/tabs/z-navigation-tab-link/index.d.ts +0 -0
  99. package/dist/types/components/navigation/tabs/z-navigation-tabs/index.d.ts +0 -0
  100. package/dist/types/components/navigation/z-app-header/index.d.ts +2 -4
  101. package/dist/types/components/navigation/z-link/index.d.ts +0 -0
  102. package/dist/types/components/navigation/z-menu/index.d.ts +13 -5
  103. package/dist/types/components/navigation/z-menu-section/index.d.ts +9 -3
  104. package/dist/types/components/notification/z-info-box/index.d.ts +0 -0
  105. package/dist/types/components/notification/z-notification/index.d.ts +0 -0
  106. package/dist/types/components/notification/z-toast-notification/index.d.ts +1 -1
  107. package/dist/types/components/notification/z-tooltip/index.d.ts +0 -0
  108. package/dist/types/components/panel/z-panel-elem/index.d.ts +0 -0
  109. package/dist/types/components/z-anchor-navigation/index.d.ts +0 -0
  110. package/dist/types/components/z-aria-alert/index.d.ts +0 -0
  111. package/dist/types/components/z-avatar/index.d.ts +0 -0
  112. package/dist/types/components/z-card/index.d.ts +9 -0
  113. package/dist/types/components/z-carousel/index.d.ts +0 -0
  114. package/dist/types/components/z-contextual-menu/index.d.ts +0 -0
  115. package/dist/types/components/z-cover-hero/index.d.ts +0 -0
  116. package/dist/types/components/z-divider/index.d.ts +0 -0
  117. package/dist/types/components/z-ghost-loading/index.d.ts +0 -0
  118. package/dist/types/components/z-info-reveal/index.d.ts +0 -0
  119. package/dist/types/components/z-offcanvas/index.d.ts +4 -1
  120. package/dist/types/components/z-pagination/index.d.ts +0 -0
  121. package/dist/types/components/z-popover/index.d.ts +0 -0
  122. package/dist/types/components/z-section-title/index.d.ts +0 -0
  123. package/dist/types/components/z-skip-to-content/index.d.ts +0 -0
  124. package/dist/types/components/z-table/z-table/index.d.ts +0 -0
  125. package/dist/types/components/z-table/z-table-body/index.d.ts +0 -0
  126. package/dist/types/components/z-table/z-table-cell/index.d.ts +0 -0
  127. package/dist/types/components/z-table/z-table-empty-box/index.d.ts +0 -0
  128. package/dist/types/components/z-table/z-table-expanded-row/index.d.ts +0 -0
  129. package/dist/types/components/z-table/z-table-footer/index.d.ts +0 -0
  130. package/dist/types/components/z-table/z-table-head/index.d.ts +0 -0
  131. package/dist/types/components/z-table/z-table-header/index.d.ts +0 -0
  132. package/dist/types/components/z-table/z-table-header-row/index.d.ts +0 -0
  133. package/dist/types/components/z-table/z-table-row/index.d.ts +0 -0
  134. package/dist/types/components/z-table/z-table-sticky-footer/index.d.ts +0 -0
  135. package/dist/types/components/z-tag/index.d.ts +0 -0
  136. package/dist/types/components/z-visually-hidden/index.d.ts +0 -0
  137. package/dist/types/components.d.ts +65 -17
  138. package/dist/types/constants/breakpoints.d.ts +0 -0
  139. package/dist/types/constants/icons.d.ts +0 -0
  140. package/dist/types/index.d.ts +0 -0
  141. package/dist/types/snowflakes/myz/card/z-myz-card/index.d.ts +0 -0
  142. package/dist/types/snowflakes/myz/card/z-myz-card-alert/index.d.ts +0 -0
  143. package/dist/types/snowflakes/myz/card/z-myz-card-body/index.d.ts +0 -0
  144. package/dist/types/snowflakes/myz/card/z-myz-card-cover/index.d.ts +0 -0
  145. package/dist/types/snowflakes/myz/card/z-myz-card-dictionary/index.d.ts +0 -0
  146. package/dist/types/snowflakes/myz/card/z-myz-card-footer/index.d.ts +2 -0
  147. package/dist/types/snowflakes/myz/card/z-myz-card-footer-sections/index.d.ts +0 -0
  148. package/dist/types/snowflakes/myz/card/z-myz-card-header/index.d.ts +0 -0
  149. package/dist/types/snowflakes/myz/card/z-myz-card-icon/index.d.ts +0 -0
  150. package/dist/types/snowflakes/myz/card/z-myz-card-info/index.d.ts +0 -0
  151. package/dist/types/snowflakes/myz/card/z-myz-card-list/index.d.ts +0 -0
  152. package/dist/types/snowflakes/myz/list/z-myz-list/index.d.ts +0 -0
  153. package/dist/types/snowflakes/myz/list/z-myz-list-item/index.d.ts +0 -0
  154. package/dist/types/snowflakes/myz/pocket/z-messages-pocket/index.d.ts +0 -0
  155. package/dist/types/snowflakes/myz/pocket/z-pocket/index.d.ts +0 -0
  156. package/dist/types/snowflakes/myz/pocket/z-pocket-body/index.d.ts +0 -0
  157. package/dist/types/snowflakes/myz/pocket/z-pocket-header/index.d.ts +0 -0
  158. package/dist/types/snowflakes/myz/pocket/z-pocket-message/index.d.ts +0 -0
  159. package/dist/types/snowflakes/myz/z-alert/index.d.ts +0 -0
  160. package/dist/types/snowflakes/myz/z-otp/index.d.ts +0 -0
  161. package/dist/types/snowflakes/myz/z-slideshow/index.d.ts +0 -0
  162. package/dist/types/stencil-public-runtime.d.ts +0 -0
  163. package/dist/types/utils/utils.d.ts +0 -0
  164. package/dist/web-components-library/index.esm.js +0 -0
  165. package/dist/web-components-library/p-068951a7.entry.js +1 -0
  166. package/dist/web-components-library/p-06b7dad4.entry.js +1 -0
  167. package/dist/web-components-library/{p-417b1b6c.entry.js → p-10adc1fa.entry.js} +1 -1
  168. package/dist/web-components-library/p-1570917d.entry.js +1 -0
  169. package/dist/web-components-library/p-157aea3b.entry.js +1 -0
  170. package/dist/web-components-library/p-1c8e7c24.entry.js +1 -0
  171. package/dist/web-components-library/p-20682781.entry.js +1 -0
  172. package/dist/web-components-library/{p-ede9fbf5.entry.js → p-6736e894.entry.js} +1 -1
  173. package/dist/web-components-library/{p-810bd730.entry.js → p-9db2bf11.entry.js} +1 -1
  174. package/dist/web-components-library/p-af283478.entry.js +1 -0
  175. package/dist/web-components-library/p-c722c5a4.entry.js +1 -0
  176. package/dist/web-components-library/p-d0760bb1.entry.js +1 -0
  177. package/dist/web-components-library/p-deda8776.entry.js +1 -0
  178. package/dist/web-components-library/p-f3a8cc14.entry.js +1 -0
  179. package/dist/web-components-library/{p-05ced71c.entry.js → p-f5a99b28.entry.js} +1 -1
  180. package/dist/web-components-library/{p-c081e1f4.entry.js → p-f9f42d17.entry.js} +1 -1
  181. package/dist/web-components-library/web-components-library.css +2 -1
  182. package/dist/web-components-library/web-components-library.esm.js +1 -1
  183. package/loader/cdn.js +0 -0
  184. package/loader/index.cjs.js +0 -0
  185. package/loader/index.d.ts +0 -0
  186. package/loader/index.es2017.js +0 -0
  187. package/loader/index.js +0 -0
  188. package/loader/package.json +0 -0
  189. package/package.json +2 -3
  190. package/readme.md +0 -1
  191. package/www/build/index.esm.js +0 -0
  192. package/www/build/p-068951a7.entry.js +1 -0
  193. package/www/build/p-06b7dad4.entry.js +1 -0
  194. package/www/build/{p-417b1b6c.entry.js → p-10adc1fa.entry.js} +1 -1
  195. package/www/build/p-1570917d.entry.js +1 -0
  196. package/www/build/p-157aea3b.entry.js +1 -0
  197. package/www/build/p-1c8e7c24.entry.js +1 -0
  198. package/www/build/p-20682781.entry.js +1 -0
  199. package/www/build/{p-ede9fbf5.entry.js → p-6736e894.entry.js} +1 -1
  200. package/www/build/p-77d28b14.js +1 -0
  201. package/www/build/{p-810bd730.entry.js → p-9db2bf11.entry.js} +1 -1
  202. package/www/build/p-af283478.entry.js +1 -0
  203. package/www/build/p-c722c5a4.entry.js +1 -0
  204. package/www/build/p-d0760bb1.entry.js +1 -0
  205. package/www/build/p-deda8776.entry.js +1 -0
  206. package/www/build/p-f39bb490.css +2 -0
  207. package/www/build/p-f3a8cc14.entry.js +1 -0
  208. package/www/build/{p-05ced71c.entry.js → p-f5a99b28.entry.js} +1 -1
  209. package/www/build/{p-c081e1f4.entry.js → p-f9f42d17.entry.js} +1 -1
  210. package/www/build/web-components-library.css +2 -1
  211. package/www/build/web-components-library.esm.js +1 -1
  212. package/www/build/web-components-library.js +0 -0
  213. package/www/host.config.json +0 -0
  214. package/www/index.html +1 -37
  215. package/dist/cjs/z-app-header.cjs.entry.js +0 -133
  216. package/dist/cjs/z-button_3.cjs.entry.js +0 -108
  217. package/dist/esm/z-app-header.entry.js +0 -129
  218. package/dist/esm/z-button_3.entry.js +0 -102
  219. package/dist/web-components-library/p-029e4fba.entry.js +0 -1
  220. package/dist/web-components-library/p-14a6abe4.entry.js +0 -1
  221. package/dist/web-components-library/p-19ca449e.entry.js +0 -1
  222. package/dist/web-components-library/p-3a9cc467.entry.js +0 -1
  223. package/dist/web-components-library/p-73d9489b.entry.js +0 -1
  224. package/dist/web-components-library/p-9d03a7d6.entry.js +0 -1
  225. package/dist/web-components-library/p-f158d205.entry.js +0 -1
  226. package/dist/web-components-library/p-f95cc914.entry.js +0 -1
  227. package/dist/web-components-library/p-fa4c203a.entry.js +0 -1
  228. package/dist/web-components-library/p-fffb14e1.entry.js +0 -1
  229. package/www/build/p-029e4fba.entry.js +0 -1
  230. package/www/build/p-14a6abe4.entry.js +0 -1
  231. package/www/build/p-19ca449e.entry.js +0 -1
  232. package/www/build/p-275801c6.css +0 -1
  233. package/www/build/p-3a9cc467.entry.js +0 -1
  234. package/www/build/p-73d9489b.entry.js +0 -1
  235. package/www/build/p-811ee64f.js +0 -1
  236. package/www/build/p-9d03a7d6.entry.js +0 -1
  237. package/www/build/p-f158d205.entry.js +0 -1
  238. package/www/build/p-f95cc914.entry.js +0 -1
  239. package/www/build/p-fa4c203a.entry.js +0 -1
  240. package/www/build/p-fffb14e1.entry.js +0 -1
@@ -44,15 +44,21 @@ const ZModal = class {
44
44
  this.closeButtonLabel = "chiudi modale";
45
45
  /** add role "alertdialog" to dialog (optional, default is false) */
46
46
  this.alertdialog = false;
47
+ /** if true, the modal is closable (optional, default is true) */
48
+ this.closable = true;
47
49
  }
48
50
  emitModalClose() {
49
- this.modalClose.emit({ modalid: this.modalid });
51
+ if (this.closable) {
52
+ this.modalClose.emit({ modalid: this.modalid });
53
+ }
50
54
  }
51
55
  emitModalHeaderActive() {
52
56
  this.modalHeaderActive.emit({ modalid: this.modalid });
53
57
  }
54
58
  emitBackgroundClick() {
55
- this.modalBackgroundClick.emit({ modalid: this.modalid });
59
+ if (this.closable) {
60
+ this.modalBackgroundClick.emit({ modalid: this.modalid });
61
+ }
56
62
  }
57
63
  componentDidLoad() {
58
64
  this.open();
@@ -65,7 +71,9 @@ const ZModal = class {
65
71
  /** close modal */
66
72
  async close() {
67
73
  var _a;
68
- (_a = this.dialog) === null || _a === void 0 ? void 0 : _a.close();
74
+ if (this.closable) {
75
+ (_a = this.dialog) === null || _a === void 0 ? void 0 : _a.close();
76
+ }
69
77
  }
70
78
  /**
71
79
  * Get a list of focusable elements in the dialog.
@@ -100,8 +108,21 @@ const ZModal = class {
100
108
  firstFocusableElement.focus();
101
109
  }
102
110
  }
111
+ closeButtonSlot() {
112
+ if (this.closable) {
113
+ return (h("slot", { name: "modalCloseButton" }, h("button", { "aria-label": this.closeButtonLabel, onClick: () => this.close() }, h("z-icon", { name: "multiply-circle-filled" }))));
114
+ }
115
+ }
116
+ handleEscape(e) {
117
+ if (this.closable) {
118
+ return;
119
+ }
120
+ e.preventDefault();
121
+ }
103
122
  render() {
104
- return (h("dialog", { "aria-labelledby": "modal-title", "aria-describedby": "modal-content", role: this.alertdialog ? "alertdialog" : undefined, ref: (el) => (this.dialog = el), onClose: () => this.emitModalClose() }, h("div", { class: "modal-container", id: this.modalid }, h("header", { onClick: this.emitModalHeaderActive.bind(this) }, h("div", null, this.modaltitle && h("h1", { id: "modal-title" }, this.modaltitle), this.modalsubtitle && h("h2", { id: "modal-subtitle" }, this.modalsubtitle)), h("slot", { name: "modalCloseButton" }, h("button", { "aria-label": this.closeButtonLabel, onClick: () => this.close() }, h("z-icon", { name: "multiply-circle-filled" })))), h("div", { class: "modal-content", id: "modal-content" }, h("slot", { name: "modalContent" }))), h("div", { class: "modal-background", "data-action": "modalBackground", "data-modal": this.modalid, onClick: () => {
123
+ return (h("dialog", { "aria-labelledby": "modal-title", "aria-describedby": "modal-content", role: this.alertdialog ? "alertdialog" : undefined, ref: (el) => (this.dialog = el), onClose: () => this.emitModalClose(),
124
+ // @ts-ignore
125
+ onCancel: (e) => this.handleEscape(e) }, h("div", { class: "modal-container", id: this.modalid }, h("header", { onClick: this.emitModalHeaderActive.bind(this) }, h("div", null, this.modaltitle && h("h1", { id: "modal-title" }, this.modaltitle), this.modalsubtitle && h("h2", { id: "modal-subtitle" }, this.modalsubtitle)), this.closeButtonSlot()), h("div", { class: "modal-content", id: "modal-content" }, h("slot", { name: "modalContent" }))), h("div", { class: "modal-background", "data-action": "modalBackground", "data-modal": this.modalid, onClick: () => {
105
126
  this.emitBackgroundClick();
106
127
  this.close();
107
128
  } })));
@@ -194,7 +194,7 @@ const ZListElement = class {
194
194
  }
195
195
  }
196
196
  render() {
197
- return (h(Host, { role: "listitem", "aria-expanded": this.expandable ? this.showInnerContent : null, onClick: this.handleClick, onKeyDown: this.handleKeyDown, clickable: this.clickable && !this.disabled, tabIndex: !this.isContextualMenu ? "0" : null }, h("div", { class: `${this.calculateClass()}`, style: { color: `var(--${this.color})` }, tabindex: this.isContextualMenu ? "0" : "-1", id: `z-list-element-id-${this.listElementId}` }, h("div", { class: "z-list-element-container" }, this.renderExpandableButton(), this.renderContent()), this.renderExpandedContent()), this.dividerType === ListDividerType.ELEMENT && (h("z-divider", { color: this.dividerColor, size: this.dividerSize }))));
197
+ return (h(Host, { role: "listitem", "aria-expanded": this.expandable ? this.showInnerContent : null, onClick: this.handleClick, onKeyDown: this.handleKeyDown, clickable: this.clickable && !this.disabled, tabIndex: !this.isContextualMenu ? "0" : null }, h("div", { class: `${this.calculateClass()}`, style: { color: `var(--${this.color})` }, tabindex: this.isContextualMenu ? "0" : "-1", id: `z-list-element-id-${this.listElementId}`, part: "list-item-container" }, h("div", { class: "z-list-element-container" }, this.renderExpandableButton(), this.renderContent()), this.renderExpandedContent()), this.dividerType === ListDividerType.ELEMENT && (h("z-divider", { color: this.dividerColor, size: this.dividerSize }))));
198
198
  }
199
199
  get host() { return getElement(this); }
200
200
  };
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a2ca4b97.js';
2
2
 
3
- const stylesCss = ":host{display:inline-flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0;font-family:var(--font-family-sans)}:host,::slotted(*),*{box-sizing:border-box}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host([active]) .label,:host([open]) .label,.label:hover{border-color:var(--color-secondary01)}.label{display:flex;width:100%;align-items:center;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);border:0;border-bottom:var(--border-size-small) solid var(--color-surface05);margin:0;background:transparent;border-radius:0;cursor:pointer;text-align:left}.label ::slotted(*){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.25}.label:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}.label z-icon{margin-left:calc(var(--space-unit) * 4);fill:currentcolor}.items{display:flex;width:100%;flex-direction:column;padding:calc(var(--space-unit) * 0.5);padding-bottom:calc(var(--space-unit) * 2)}.items>::slotted([slot=\"item\"]){display:inline-flex;padding:calc(var(--space-unit) * 0.5);margin:0;font-size:var(--font-size-2);line-height:1.4;outline:none}.items>::slotted([slot=\"item\"]:last-child){padding-bottom:0}.items>::slotted([slot=\"item\"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary);color:var(--color-secondary01)}.items>::slotted([slot=\"item\"]:hover){color:var(--color-secondary01)}";
3
+ const stylesCss = ":host{display:inline-flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0;font-family:var(--font-family-sans)}:host,::slotted(*),*{box-sizing:border-box}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host(:is([active],[open])) .label,.label:hover{border-color:var(--color-secondary01)}:is(:host(:is([active],[open])) .label,.label:hover) ::slotted(*){font-weight:var(--font-bd)}.label{display:flex;width:100%;align-items:center;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);border:0;border-bottom:var(--border-size-small) solid var(--color-surface05);margin:0;background:transparent;border-radius:0;cursor:pointer;text-align:left}::slotted([data-text]){display:inline-flex;flex-direction:column}::slotted([data-text])::after{overflow:hidden;height:0;content:attr(data-text);content:attr(data-text) / \"\";font-weight:var(--font-bd);pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text])::after{display:none}}.label ::slotted(*){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.25}.label:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}.label z-icon{margin-left:calc(var(--space-unit) * 4);fill:var(--color-icon02)}.items{display:flex;width:100%;flex-direction:column;padding:calc(var(--space-unit) * 0.5);padding-bottom:calc(var(--space-unit) * 2)}.items>::slotted([slot=\"item\"]){display:inline-flex;padding:calc(var(--space-unit) * 0.5);margin:0;font-size:var(--font-size-2);line-height:1.4;outline:none}.items>::slotted([slot=\"item\"]:last-child){padding-bottom:0}.items>::slotted([slot=\"item\"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary);color:var(--color-secondary01)}.items>::slotted([slot=\"item\"]:hover),.items>::slotted([slot=\"item\"][active]){color:var(--color-secondary01);font-weight:var(--font-bd)}";
4
4
 
5
5
  const ZMenuSection = class {
6
6
  constructor(hostRef) {
@@ -27,13 +27,21 @@ const ZMenuSection = class {
27
27
  * Check if some content slot is set.
28
28
  */
29
29
  checkContent() {
30
- this.hasContent = !!this.hostElement.querySelectorAll('[slot="item"]').length;
30
+ this.hasContent = this.hostElement.querySelectorAll('[slot="item"]').length > 0;
31
+ }
32
+ /**
33
+ * Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.
34
+ * @param ev Slotchange event
35
+ */
36
+ onLabelSlotChange(ev) {
37
+ const labelElement = ev.target.assignedElements()[0];
38
+ labelElement.dataset.text = (labelElement === null || labelElement === void 0 ? void 0 : labelElement.innerText) || null;
31
39
  }
32
40
  componentWillLoad() {
33
41
  this.checkContent();
34
42
  }
35
43
  render() {
36
- return (h(Host, { role: "menu", open: this.open }, h("button", { class: "label", "aria-pressed": this.open ? "true" : "false", onClick: this.toggle.bind(this) }, h("slot", null), this.hasContent && h("z-icon", { name: this.open ? "chevron-up" : "chevron-down" })), this.open && (h("div", { class: "items" }, h("slot", { name: "item", onSlotchange: this.checkContent.bind(this) })))));
44
+ return (h(Host, { role: "menu", open: this.open }, h("button", { class: "label", "aria-pressed": this.open ? "true" : "false", onClick: this.toggle.bind(this) }, h("slot", { onSlotchange: this.onLabelSlotChange.bind(this) }), this.hasContent && h("z-icon", { name: this.open ? "chevron-up" : "chevron-down" })), this.open && (h("div", { class: "items" }, h("slot", { name: "item", onSlotchange: this.checkContent.bind(this) })))));
37
45
  }
38
46
  get hostElement() { return getElement(this); }
39
47
  };
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a2ca4b97.js';
2
2
 
3
- const stylesCss = ":host,::slotted(*),*{box-sizing:border-box}:host{position:relative;display:inline-flex;flex-direction:column}::slotted(a){color:var(--color-text01);text-decoration:none}::slotted(*){font-family:var(--font-family-sans);font-weight:var(--font-rg)}.menu-label{padding:0;border:0;margin:0;background:transparent;border-radius:0;color:inherit;outline:none;text-align:left}button.menu-label{cursor:pointer}.menu-label:focus-within{z-index:1;padding-right:calc(var(--space-unit) * 0.5);padding-left:calc(var(--space-unit) * 0.5);margin-right:calc(var(--space-unit) * -0.5);margin-left:calc(var(--space-unit) * -0.5);box-shadow:var(--shadow-focus-primary)}.menu-label .menu-label-content{display:flex;align-items:center;padding:var(--space-unit) 0;border-bottom:var(--border-size-large) solid var(--color-surface05)}:host([active]) .menu-label-content,:host([open]) .menu-label-content,.menu-label:hover .menu-label-content,.menu-label:focus-within .menu-label-content{border-color:var(--color-secondary01)}.menu-label ::slotted(*){width:100%;margin:0;appearance:none;font-size:var(--font-size-5);line-height:1.2;outline:none}.menu-label z-icon{margin-left:calc(var(--space-unit) * 4);fill:currentcolor}.content{background:var(--color-surface01)}.content[hidden]{display:none}:host([floating]) .content{position:absolute;top:100%;left:0;width:375px;min-width:100%;max-width:100vw;padding:var(--space-unit) var(--space-unit) calc(var(--space-unit) * 2);box-shadow:var(--shadow-2)}:host(:not([floating])) .content{width:100%}.header{display:flex;align-items:center;padding:var(--space-unit) 0 calc(var(--space-unit) * 2)}.header ::slotted(img[slot=\"header\"]){width:calc(var(--space-unit) * 11.25);height:auto;object-fit:contain}.header ::slotted([slot=\"header\"]:not(:first-child)){margin:auto 0;margin-left:calc(var(--space-unit) * 2.5);font-size:var(--font-size-3);font-weight:var(--font-sb);line-height:1.5}.items{display:flex;flex-direction:column;align-items:flex-start;background:inherit}.items>::slotted([slot=\"item\"]){display:inline-flex;width:100%;margin:0;font-size:var(--font-size-3);line-height:1.25;outline:none}.items>::slotted([slot=\"item\"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary)}.items>::slotted([slot=\"item\"]:not(z-menu-section)){padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);border-bottom:var(--border-size-small) solid var(--color-surface05)}.items>::slotted([slot=\"item\"]:hover),.items>::slotted([slot=\"item\"]:active){border-color:var(--color-secondary01)}";
3
+ const stylesCss = ":host,::slotted(*),*{box-sizing:border-box}:host{position:relative;display:inline-flex;flex-direction:column}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg);letter-spacing:0.36px}.menu-label{padding:0;border:0;margin:0;background:transparent;border-radius:0;color:inherit;outline:none;text-align:left}button.menu-label{cursor:pointer}.menu-label:focus-within{z-index:1;padding-right:calc(var(--space-unit) * 0.5);padding-left:calc(var(--space-unit) * 0.5);margin-right:calc(var(--space-unit) * -0.5);margin-left:calc(var(--space-unit) * -0.5);box-shadow:var(--shadow-focus-primary)}.menu-label .menu-label-content{position:relative;display:flex;align-items:center}:host(:is([active],[open])) .menu-label-content,.menu-label .menu-label-content:hover,.menu-label:focus-within .menu-label-content{font-weight:var(--font-bd)}:host(:is([active],[open])) .menu-label-content ::slotted(*),.menu-label .menu-label-content:hover ::slotted(*),.menu-label:focus-within .menu-label-content ::slotted(*){letter-spacing:normal}:host(:is([active],[open],[vertical-context])) .menu-label .menu-label-content::after,.menu-label .menu-label-content:hover::after,.menu-label:focus-within .menu-label-content::after{position:absolute;bottom:0;left:0;width:100%;content:\"\";pointer-events:none}:host([vertical-context]) .menu-label-content::after{height:var(--border-size-small);background-color:var(--color-surface03)}:host(:is([active],[open])) .menu-label .menu-label-content::after,.menu-label .menu-label-content:hover::after,.menu-label:focus-within .menu-label-content::after{height:var(--border-size-large);background-color:var(--color-secondary01)}::slotted([data-text])::after{height:0;content:attr(data-text);content:attr(data-text) / \"\";font-weight:var(--font-bd);letter-spacing:normal;pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text])::after{display:none}}::slotted([data-text]){display:inline-flex;flex-direction:column}.menu-label .menu-label-content ::slotted(*){display:inline-flex;width:100%;margin:0;appearance:none;font-size:var(--font-size-5);font-weight:inherit;line-height:1.2;outline:none}.menu-label .menu-label-content ::slotted(*),.menu-label .menu-label-content z-icon{padding:var(--space-unit) 0}.menu-label .menu-label-content z-icon{margin-left:calc(var(--space-unit) * 1.5);fill:var(--color-icon02)}.content{background:var(--color-surface01)}:host(:not([open])) .content{display:none}:host([floating]) .content{position:absolute;top:100%;left:0;width:375px;min-width:100%;max-width:100vw;padding:var(--space-unit) var(--space-unit) calc(var(--space-unit) * 2);box-shadow:var(--shadow-2)}:host(:not([floating])) .content{width:100%}.header{display:flex;align-items:center;padding:var(--space-unit) 0 calc(var(--space-unit) * 2)}.header ::slotted(img[slot=\"header\"]){width:calc(var(--space-unit) * 11.25);height:auto;object-fit:contain}.header ::slotted([slot=\"header\"]:not(:first-child)){margin:auto 0;margin-left:calc(var(--space-unit) * 2.5);font-size:var(--font-size-3);font-weight:var(--font-sb);line-height:1.5}.items{display:flex;flex-direction:column;align-items:flex-start;background:inherit}.items>::slotted([slot=\"item\"]){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.25;outline:none}.items>::slotted([slot=\"item\"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary)}.items>::slotted([slot=\"item\"]:not(z-menu-section)){padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);border-bottom:var(--border-size-small) solid var(--color-surface05)}.items>::slotted([slot=\"item\"]:hover),.items>::slotted([slot=\"item\"]:active){border-color:var(--color-secondary01);font-weight:var(--font-bd)}";
4
4
 
5
5
  const ZMenu = class {
6
6
  constructor(hostRef) {
@@ -11,16 +11,18 @@ const ZMenu = class {
11
11
  * Flag to set the display mode of the list.
12
12
  * If true, the list will be absolutely positioned under the menu label,
13
13
  * stacked beneath it otherwise.
14
- * @default false
15
14
  */
16
15
  this.floating = false;
16
+ /** The opening state of the menu. */
17
+ this.open = false;
17
18
  /**
18
- * The opening state of the menu.
19
- * @default false
19
+ * Tells the component that it's placed in a vertical context with other `ZMenu`s (e.g. in the ZAppHeader's offcanvas).
20
+ * A small border is placed under it as a separator from other elements.
20
21
  */
21
- this.open = false;
22
+ this.verticalContext = false;
22
23
  this.toggle = this.toggle.bind(this);
23
24
  this.checkContent = this.checkContent.bind(this);
25
+ this.onLabelSlotChange = this.onLabelSlotChange.bind(this);
24
26
  this.onItemsChange = this.onItemsChange.bind(this);
25
27
  }
26
28
  toggle() {
@@ -50,6 +52,14 @@ const ZMenu = class {
50
52
  componentWillLoad() {
51
53
  this.checkContent();
52
54
  }
55
+ /**
56
+ * Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.
57
+ * @param ev Slotchange event
58
+ */
59
+ onLabelSlotChange(ev) {
60
+ const labelElement = ev.target.assignedElements()[0];
61
+ labelElement.dataset.text = labelElement === null || labelElement === void 0 ? void 0 : labelElement.textContent;
62
+ }
53
63
  /**
54
64
  * Correctly set position of the floating menu in order to prevent overflow.
55
65
  * @param live Should run the method on every refresh frame.
@@ -71,27 +81,29 @@ const ZMenu = class {
71
81
  * Check if some content slot is set.
72
82
  */
73
83
  checkContent() {
74
- this.hasHeader = !!this.hostElement.querySelectorAll('[slot="header"]').length;
75
- this.hasContent = !!this.hostElement.querySelectorAll('[slot="item"]').length || this.hasHeader;
84
+ this.hasHeader = !!this.hostElement.querySelectorAll("[slot=header]").length;
85
+ this.hasContent = !!this.hostElement.querySelectorAll("[slot=item]").length || this.hasHeader;
76
86
  }
77
87
  /**
78
88
  * Set `menuitem` role to all menu items.
89
+ * Set the item's inner text to the `data-text` attribute (this is for using bold text avoiding layout shifts).
79
90
  */
80
91
  onItemsChange() {
81
92
  this.checkContent();
82
- const items = this.hostElement.querySelectorAll('[slot="item"]');
83
- items === null || items === void 0 ? void 0 : items.forEach((item) => item.setAttribute("role", "menuitem"));
93
+ const items = this.hostElement.querySelectorAll("[slot=item]");
94
+ items.forEach((item) => {
95
+ item.setAttribute("role", "menuitem");
96
+ item.dataset.text = item.textContent;
97
+ });
84
98
  }
85
99
  renderMenuLabel() {
86
100
  if (this.hasContent) {
87
- return (h("button", { class: "menu-label", "aria-expanded": this.open ? "true" : "false", "aria-label": this.open ? "Chiudi menù" : "Apri menù", onClick: this.toggle }, h("div", { class: "menu-label-content" }, h("slot", null), h("z-icon", { name: this.open ? "chevron-up" : "chevron-down" }))));
101
+ return (h("button", { class: "menu-label", "aria-expanded": this.open ? "true" : "false", "aria-label": this.open ? "Chiudi menù" : "Apri menù", onClick: this.toggle }, h("div", { class: "menu-label-content" }, h("slot", { onSlotchange: this.onLabelSlotChange }), h("z-icon", { name: this.open ? "chevron-up" : "chevron-down" }))));
88
102
  }
89
- return (h("div", { class: "menu-label" }, h("div", { class: "menu-label-content" }, h("slot", null))));
103
+ return (h("div", { class: "menu-label" }, h("div", { class: "menu-label-content" }, h("slot", { onSlotchange: this.onLabelSlotChange }))));
90
104
  }
91
105
  render() {
92
- return (h(Host, null, this.renderMenuLabel(), h("div", { class: "content", ref: (el) => {
93
- this.content = el;
94
- }, hidden: !this.open }, this.hasHeader && (h("header", { class: "header" }, h("slot", { name: "header", onSlotchange: this.checkContent }))), h("div", { class: "items", role: "menu" }, h("slot", { name: "item", onSlotchange: this.onItemsChange })))));
106
+ return (h(Host, null, this.renderMenuLabel(), this.hasContent && (h("div", { class: "content", ref: (el) => (this.content = el) }, this.hasHeader && (h("header", { class: "header" }, h("slot", { name: "header", onSlotchange: this.checkContent }))), h("div", { class: "items", role: "menu" }, h("slot", { name: "item", onSlotchange: this.onItemsChange }))))));
95
107
  }
96
108
  get hostElement() { return getElement(this); }
97
109
  static get watchers() { return {
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-a2ca4b97.js';
1
+ import { r as registerInstance, h, g as getElement } from './index-a2ca4b97.js';
2
2
  import { L as LicenseType } from './index-e36ec4a4.js';
3
3
 
4
4
  const stylesCss = "footer{position:relative;z-index:5;top:0;width:auto;height:calc(var(--space-unit) * 6);padding:0;border-top:var(--border-size-medium) solid var(--color-surface03);margin:0;background-color:var(--color-surface01);border-radius:0 0 var(--border-radius) var(--border-radius);color:var(--color-surface05);font-family:var(--font-family-sans);font-weight:var(--font-rg);transition:height 500ms ease-in-out, top 500ms ease-in-out}footer.real,footer.trial,footer.temp{border-top:var(--border-size-medium) solid var(--accent)}footer .bold{font-family:var(--font-family-sans);font-weight:var(--font-sb)}footer>p{overflow:hidden;height:40px;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 2) var(--space-unit) calc(var(--space-unit) * 2);margin:0;background-color:var(--color-surface01);font-family:var(--font-family-sans);font-size:16px;font-weight:var(--font-rg);line-height:22px;transition:all 200ms linear}footer.isopen>p{background-color:var(--bg-neutral-200);font-size:14px;font-weight:var(--font-sb);transition:all 200ms linear}footer.isopen.real>p,footer.isopen.trial>p,footer.isopen.temp>p{background-color:var(--accent)}footer .visible{display:block}footer .hidden{display:none}footer>div.content{overflow:hidden;height:60px}footer>div.content>div:not(.slot-handler){padding:var(--space-unit) calc(var(--space-unit) * 2)}footer>div.content>div>p{overflow:hidden;height:20px;padding:0;margin:0;font-size:14px;line-height:20px;text-overflow:ellipsis;white-space:nowrap}footer>div.content>div>p.year-isbn{display:flex;flex-direction:row;justify-content:space-between;padding-top:var(--space-unit)}footer>div.content>div>p.year-isbn>span.isbn{overflow:hidden;text-overflow:ellipsis}footer.isopen>div.content>div:not(.slot-handler){height:68px}footer.isopen>div.content>div>p.authors{height:40px;text-overflow:initial;white-space:initial}footer.isopen>div.content>div>p.year-isbn{height:50px;flex-direction:column;padding-left:0}footer.isopen>div.content>div>p.year-isbn>span.isbn{display:inline-grid;padding-left:0}footer.isopen{top:-212px;height:295px;transition:height 500ms ease-in-out, top 500ms ease-in-out}footer.isopen.custom-content{top:-292px}footer.isopen>div.content{height:280px;transition:height 500ms ease-in-out, top 500ms ease-in-out}footer.isopen.custom-content>div.content{height:230px}.toggle{position:absolute;z-index:10;top:-24px;left:16px}.faded{opacity:0.3;pointer-events:none}footer>p.custom-content,footer .content.custom-content{display:none}footer.isopen>p.custom-content,footer.isopen .content.custom-content{display:block}div.wrapper{position:relative;height:100%}div.wrapper ::slotted([slot=\"content\"]){position:absolute;z-index:10;top:calc(var(--space-unit) * 2);display:block;width:100%;height:112px;box-sizing:border-box;padding:0 calc(var(--space-unit) * 2);border-top:var(--border-size-medium) solid transparent;background:var(--color-white)}div.wrapper.isopen ::slotted([slot=\"content\"]){top:0;bottom:0;height:128px;padding:calc(var(--space-unit) * 2);border-color:var(--accent)}";
@@ -15,6 +15,14 @@ const ZMyzCardFooter = class {
15
15
  }
16
16
  handleToggle() {
17
17
  this.isOpen = !this.isOpen;
18
+ if (this.isOpen) {
19
+ const firstElem = this.getFirstListItem();
20
+ if (firstElem) {
21
+ requestAnimationFrame(() => {
22
+ firstElem.focus();
23
+ });
24
+ }
25
+ }
18
26
  }
19
27
  getTitleAuthors() {
20
28
  return this.allowTooltipAuthors ? this.autori : "";
@@ -44,9 +52,13 @@ const ZMyzCardFooter = class {
44
52
  this.elementsEllipsis();
45
53
  }
46
54
  }
55
+ getFirstListItem() {
56
+ return this.host.querySelector("[slot=list] > li a");
57
+ }
47
58
  render() {
48
- return (h("div", { class: Object.assign(Object.assign({}, this.retrieveClass()), { wrapper: true }) }, h("footer", { class: this.retrieveClass(), onTransitionEnd: (e) => this.footerTransitionHandler(e) }, h("span", { class: "toggle" }, h("slot", { name: "toggle" })), this.titolo && h("p", { class: { "custom-content": this.customContent } }, this.titolo), h("div", { class: { "content": true, "custom-content": this.customContent } }, h("div", null, h("p", { class: "authors", ref: (el) => (this.ellipsisAuthors = el) }, h("span", { title: this.getTitleAuthors() }, h("span", { class: "bold" }, this.autori))), h("p", { class: "year-isbn" }, h("span", { class: "isbn" }, h("span", null, h("span", { class: "bold" }, this.isbn), " (ed. cartacea)")))), h("div", { class: `slot-handler ${this.isOpen ? "visible" : "hidden"}` }, h("slot", { name: "list" })))), this.customContent && h("slot", { name: "content" })));
59
+ return (h("div", { class: Object.assign(Object.assign({}, this.retrieveClass()), { wrapper: true }) }, h("footer", { class: this.retrieveClass(), onTransitionEnd: (e) => this.footerTransitionHandler(e) }, h("span", { class: "toggle" }, h("slot", { name: "toggle" })), this.titolo && h("p", { class: { "custom-content": this.customContent } }, this.titolo), h("div", { class: { "content": true, "custom-content": this.customContent } }, h("div", null, h("p", { class: "authors", ref: (el) => (this.ellipsisAuthors = el) }, h("span", { title: this.getTitleAuthors() }, h("span", { "aria-description": "Autori", class: "bold" }, this.autori))), h("p", { class: "year-isbn" }, h("span", { class: "isbn" }, h("span", null, h("span", { "aria-description": "ISBN edizione cartacea", class: "bold" }, this.isbn), " ", "(ed. cartacea)")))), h("div", { class: `slot-handler ${this.isOpen ? "visible" : "hidden"}` }, h("slot", { name: "list" })))), this.customContent && h("slot", { name: "content" })));
49
60
  }
61
+ get host() { return getElement(this); }
50
62
  };
51
63
  ZMyzCardFooter.style = stylesCss;
52
64
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h } from './index-a2ca4b97.js';
2
2
 
3
- const stylesCss = "button{display:flex;width:42px;width:calc(var(--space-unit) * 6);height:calc(var(--space-unit) * 5);height:calc(var(--space-unit) * 6);align-items:center;justify-content:center;padding:0;border:none;border-left:var(--border-size-medium) solid var(--color-surface03);margin:0;background:none;border-radius:0 var(--border-radius) 0 0;color:var(--color-primary01);cursor:pointer;fill:var(--color-primary01);outline:none}button:active,button:focus{color:var(--blue700);fill:var(--blue700)}button>span{display:flex;width:28px;height:28px;align-items:center;justify-content:center;border:0;border-radius:var(--border-radius)}button:hover>span{background:var(--color-primary03)}button:focus>span{background:var(--color-surface01);border-radius:var(--border-radius);box-shadow:0 0 2px 2px var(--accent-dark)}button:active>span{background:var(--color-surface01);border-radius:var(--border-radius);box-shadow:var(--shadow-2)}button:disabled{cursor:not-allowed}button:disabled>span{background:none;box-shadow:var(--shadow-0);pointer-events:none}button:disabled>span>z-icon{fill:var(--color-surface03)}button::-moz-focus-inner{border:0}";
3
+ const stylesCss = "button{display:flex;width:42px;width:calc(var(--space-unit) * 6);height:calc(var(--space-unit) * 5);height:calc(var(--space-unit) * 6);align-items:center;justify-content:center;padding:0;border:none;border-left:var(--border-size-medium) solid var(--color-surface03);margin:0;background:none;border-radius:0 var(--border-radius) 0 0;color:var(--color-primary01);cursor:pointer;fill:var(--color-primary01);outline:none}button:active,button:focus{color:var(--blue700);fill:var(--blue700)}button>span{display:flex;width:28px;height:28px;align-items:center;justify-content:center;border:0;border-radius:var(--border-radius)}button:hover>span{background:var(--color-primary03)}button:focus>span{background:var(--color-surface01);border-radius:var(--border-radius);box-shadow:var(--shadow-focus-primary)}button:active>span{background:var(--color-surface01);border-radius:var(--border-radius);box-shadow:var(--shadow-2)}button:disabled{cursor:not-allowed}button:disabled>span{background:none;box-shadow:var(--shadow-0);pointer-events:none}button:disabled>span>z-icon{fill:var(--color-surface03)}button::-moz-focus-inner{border:0}";
4
4
 
5
5
  const ZMyzCardIcon = class {
6
6
  constructor(hostRef) {
@@ -66,7 +66,7 @@ const ZMyzCardCover = class {
66
66
  };
67
67
  ZMyzCardCover.style = stylesCss$1;
68
68
 
69
- const stylesCss = "header{position:relative;display:flex;width:auto;height:calc(var(--space-unit) * 6);flex-direction:row;align-items:flex-start;justify-content:space-between;border-bottom:var(--border-size-medium) solid var(--color-surface03);background-color:var(--color-surface01);border-radius:var(--border-radius) var(--border-radius) var(--border-no-radius) var(--border-no-radius)}header.real,header.trial,header.temp{border-bottom:var(--border-size-medium) solid var(--accent);background-color:var(--accent-lighter)}.card-title{overflow:hidden;height:calc(var(--space-unit) * 2);padding:calc(var(--space-unit) * 2);margin:0;color:var(--color-surface05);font-family:var(--font-family-sans);font-size:12px;font-weight:var(--font-sb);letter-spacing:0.22px;line-height:calc(var(--space-unit) * 2);text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.faded{border-bottom:var(--border-size-medium) solid var(--color-surface02)}.faded.real,.faded.trial,.faded.temp{border-top:var(--border-size-medium) solid var(--accent);border-right:var(--border-size-medium) solid var(--accent);border-left:var(--border-size-medium) solid var(--accent)}";
69
+ const stylesCss = "header{position:relative;display:flex;width:auto;height:calc(var(--space-unit) * 6);flex-direction:row;align-items:flex-start;justify-content:space-between;border-bottom:var(--border-size-medium) solid var(--color-surface03);background-color:var(--color-surface01);border-radius:var(--border-radius) var(--border-radius) var(--border-no-radius) var(--border-no-radius)}slot[name=\"aria-heading\"]::slotted(*){position:absolute;overflow:hidden !important;width:1px !important;height:1px !important;padding:0 !important;border:0 none !important;margin:-1px !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important}header.real,header.trial,header.temp{border-bottom:var(--border-size-medium) solid var(--accent);background-color:var(--accent-lighter)}.card-title{overflow:hidden;height:calc(var(--space-unit) * 2);padding:calc(var(--space-unit) * 2);margin:0;color:var(--color-surface05);font-family:var(--font-family-sans);font-size:12px;font-weight:var(--font-sb);letter-spacing:0.22px;line-height:calc(var(--space-unit) * 2);text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.faded{border-bottom:var(--border-size-medium) solid var(--color-surface02)}.faded.real,.faded.trial,.faded.temp{border-top:var(--border-size-medium) solid var(--accent);border-right:var(--border-size-medium) solid var(--accent);border-left:var(--border-size-medium) solid var(--accent)}";
70
70
 
71
71
  const ZMyzCardHeader = class {
72
72
  constructor(hostRef) {
@@ -93,7 +93,7 @@ const ZMyzCardHeader = class {
93
93
  };
94
94
  }
95
95
  render() {
96
- return (h("header", { class: this.retrieveClass() }, h("span", { class: "card-title", ref: (el) => (this.ellipsis = el), title: this.getTitle() }, this.titolo), h("slot", { name: "icon" })));
96
+ return (h("header", { class: this.retrieveClass() }, h("slot", { name: "aria-heading" }), h("span", { class: "card-title", ref: (el) => (this.ellipsis = el), title: this.getTitle() }, this.titolo), h("slot", { name: "icon" })));
97
97
  }
98
98
  };
99
99
  ZMyzCardHeader.style = stylesCss;
@@ -0,0 +1,53 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a2ca4b97.js';
2
+ import { O as OffCanvasVariant, v as TransitionDirection } from './index-e36ec4a4.js';
3
+
4
+ const stylesCss = ".sc-z-offcanvas-h{--z-offcanvas--container-width:375px;--z-offcanvas--top-space:0;min-width:100%;height:100%;font-family:var(--font-family-sans);font-weight:var(--font-rg);visibility:hidden}.canvas-container.sc-z-offcanvas{display:flex;overflow:-moz-scrollbars-none;overflow:hidden;min-width:100%;height:100%;flex-direction:column;background:var(--color-surface01)}[variant=\"pushcontent\"].sc-z-offcanvas-h{display:none}[open].sc-z-offcanvas-h{display:flex;visibility:visible}[variant=\"overlay\"].sc-z-offcanvas-h{position:fixed;z-index:1000;top:var(--z-offcanvas--top-space);right:0;bottom:0;left:0;display:flex;height:calc(100% - var(--z-offcanvas--top-space))}[variant=\"overlay\"][transitiondirection=\"left\"].sc-z-offcanvas-h{justify-content:end}[variant=\"overlay\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{z-index:1010}[variant=\"overlay\"].sc-z-offcanvas-h .canvas-background.sc-z-offcanvas{position:absolute;left:0;width:100%;height:100%;background-color:var(--gray900);opacity:0.7}.canvas-container.sc-z-offcanvas>.canvas-content.sc-z-offcanvas{overflow:auto;flex:1 auto;padding:0 calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) calc(var(--space-unit) / 2) calc(var(--space-unit) * 2) 0;overflow-x:hidden}[variant=\"overlay\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas>.canvas-content.sc-z-offcanvas{padding:0 calc(var(--space-unit) * 2) calc(var(--space-unit) * 2) calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) calc(var(--space-unit) / 2) 0 0}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-track{background-color:transparent}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas{scrollbar-color:var(--color-primary01) transparent}@media only screen and (max-width: 768px){[open][transitiondirection=\"left\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-right 0.4s ease-out}[open][transitiondirection=\"right\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-left 0.4s ease-out}}@media only screen and (min-width: 768px){.sc-z-offcanvas-h{min-width:auto}.canvas-container.sc-z-offcanvas{width:auto;min-width:max(var(--z-offcanvas--container-width), 375px);max-width:max(var(--z-offcanvas--container-width), 375px);height:auto;min-height:calc(var(--space-unit) * 40)}.sc-z-offcanvas-h:not([variant=\"overlay\"])[open]:not(.skip-animation){width:auto;animation:grow 0.4s ease-out}}@keyframes grow{from{width:0}to{width:max(var(--z-offcanvas--container-width), 375px)}}@keyframes enter-left{from{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes enter-right{from{transform:translateX(100%)}to{transform:translateX(0)}}[open][variant=\"overlay\"][transitiondirection=\"left\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-right 0.4s ease-out}[open][transitiondirection=\"right\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-left 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant=\"overlay\"][transitiondirection=\"right\"]>.canvas-container.sc-z-offcanvas{transform:translateX(-100%);transition:visibility 0.4s ease-out, transform 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant=\"overlay\"][transitiondirection=\"left\"]>.canvas-container.sc-z-offcanvas{transform:translateX(100%);transition:visibility 0.4s ease-out, transform 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant=\"overlay\"] .canvas-background.sc-z-offcanvas{transition:visibility 0.4s ease-out;visibility:hidden}";
5
+
6
+ const ZOffcanvas = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.canvasOpenStatusChanged = createEvent(this, "canvasOpenStatusChanged", 7);
10
+ /**
11
+ * Offcanvas variant.
12
+ * Can be one of "overlay", "pushcontent"
13
+ * Default variant: pushcontent
14
+ */
15
+ this.variant = OffCanvasVariant.PUSHCONTENT;
16
+ /** open component. Default: false */
17
+ this.open = false;
18
+ /** open content transitioning in a specified direction left | right. Default: left */
19
+ this.transitiondirection = TransitionDirection.LEFT;
20
+ /** manages the skip for the entry animation*/
21
+ this.skipanimationonload = false;
22
+ }
23
+ /** this method allows you to skip the page loading animation, to be used with the prop set to true */
24
+ async setSkipAanimationOnLoad(value) {
25
+ this.skipanimationonload = value;
26
+ }
27
+ onOpenChanged() {
28
+ if (!this.open && this.skipanimationonload) {
29
+ this.skipanimationonload = false;
30
+ }
31
+ if (this.open) {
32
+ this.handleOverflowProperty();
33
+ }
34
+ this.canvasOpenStatusChanged.emit(this.open);
35
+ }
36
+ handleOverflowProperty() {
37
+ const overflow = this.variant === OffCanvasVariant.OVERLAY ? "overflow-y" : "overflow-x";
38
+ document.body.style[overflow] = this.open ? "hidden" : "";
39
+ }
40
+ handledTransitionEnd() {
41
+ this.handleOverflowProperty();
42
+ }
43
+ render() {
44
+ return (h(Host, { class: { "skip-animation": this.skipanimationonload } }, h("div", { role: "presentation", class: "canvas-container", onTransitionEnd: () => this.handledTransitionEnd() }, h("div", { role: "presentation", class: "canvas-content" }, h("slot", { name: "canvasContent" }))), this.variant == OffCanvasVariant.OVERLAY && (h("div", { class: "canvas-background", "data-action": "canvasBackground", onClick: () => (this.open = false) }))));
45
+ }
46
+ get hostElement() { return getElement(this); }
47
+ static get watchers() { return {
48
+ "open": ["onOpenChanged"]
49
+ }; }
50
+ };
51
+ ZOffcanvas.style = stylesCss;
52
+
53
+ export { ZOffcanvas as z_offcanvas };
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-a2ca4b97.js';
2
- import { l as ListDividerType, B as ButtonVariant } from './index-e36ec4a4.js';
2
+ import { d as ControlSize, B as ButtonVariant, l as ListDividerType } from './index-e36ec4a4.js';
3
3
  import { r as randomId, a as handleEnterKeydSubmit } from './utils-970ac457.js';
4
4
  import './breakpoints-c386984e.js';
5
5
 
6
- const stylesCss = ":host{position:relative;z-index:5;display:block;width:inherit;height:44px;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{position:absolute;z-index:10;display:grid;width:100%;gap:0 calc(var(--space-unit) * 2);grid-template-columns:auto;grid-template-rows:auto}:host>div.has-submit{grid-template-columns:auto min-content}:host>div.has-results{grid-template-rows:auto auto}:host>div>z-input{width:100%;grid-column:1;grid-row:1}:host>div>z-button{grid-column:2;grid-row:1}:host>div>div.results-wrapper{overflow:auto;padding:calc(var(--space-unit) / 4);padding-bottom:calc(var(--space-unit) / 4);border:var(--border-size-small) solid var(--color-surface03);border-top:none;margin-top:-1px;background:var(--color-surface01);grid-column:1;grid-row:2}:host>div>div.results-wrapper>div.results{overflow:auto;max-height:var(--z-searchbar-results-height, 540px);padding:var(--space-unit) calc(var(--space-unit) * 1.5);padding-bottom:calc(var(--space-unit) / 2);scrollbar-color:var(--color-primary01) transparent}:host>div>div.results-wrapper>div.results::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}:host>div>div.results-wrapper>div.results::-webkit-scrollbar-track{background-color:transparent}:host>div>div.results-wrapper>div.results::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}:host>div>div.results-wrapper>div.results .category-heading{display:block;font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:var(--font-size-3)}:host>div>div.results-wrapper>div.results .category-heading>*{display:block}:host>div>div.results-wrapper>div.results span.category-heading>span.category{color:var(--color-text05);font-style:italic}:host>div>div.results-wrapper>div.results span.category-heading>span.subcategory{margin-top:8px;color:var(--color-text01);text-transform:uppercase}:host>div>div.results-wrapper>div.results z-list-element{display:block}:host>div>div.results-wrapper>div.results z-list-element:focus{box-shadow:var(--shadow-focus-primary)}:host>div>div.results-wrapper>div.results .item{--z-icon-height:12px;--z-icon-width:12px;display:flex;flex-flow:row nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;color:var(--color-text01);fill:var(--color-icon02);font-size:var(--font-size-2);line-height:var(--font-size-3)}:host>div>div.results-wrapper>div.results .item.ellipsis>span.item-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host>div>div.results-wrapper>div.results .item>span.item-label>mark,:host>div>div.results-wrapper>div.results .item>span.item-label>*>mark{background:var(--color-primary03)}:host>div>div.results-wrapper>div.results .item.has-category{padding-left:calc(var(--space-unit) * 3)}:host>div>div.results-wrapper>div.results .item>z-icon.item-icon{padding:2px 0;margin-right:calc(var(--space-unit) * 1.5)}:host>div>div.results-wrapper>div.results .item.item-search{--z-icon-height:16px;--z-icon-width:16px}:host>div>div.results-wrapper>div.results .item.item-search>z-icon{margin-right:var(--space-unit)}:host>div>div.results-wrapper>div.results .item-show-all{display:block;text-align:center}:host>div>div.results-wrapper>div.results .item-no-results{display:block;font-size:var(--font-size-2);font-style:italic;line-height:var(--font-size-5)}:host>div>div.results-wrapper>div.results .item-no-results>ul{padding-left:calc(var(--space-unit) * 2);margin:var(--space-unit)}@media (min-width: 768px){:host>div>div.results-wrapper>div.results .category-heading{font-size:var(--font-size-3);line-height:var(--font-size-6)}:host>div>div.results-wrapper>div.results .item{--z-icon-height:12px;--z-icon-width:12px;font-size:var(--font-size-3);line-height:var(--font-size-6)}:host>div>div.results-wrapper>div.results .item.item-search{--z-icon-height:18px;--z-icon-width:18px}:host>div>div.results-wrapper>div.results .item.item-search>z-icon{margin-top:calc(var(--space-unit) / 4)}:host>div>div.results-wrapper>div.results .item.ellipsis>span.item-label{height:24px}:host>div>div.results-wrapper>div.results .item>z-icon.item-icon{padding:6px 0}}@media (min-width: 1152px){:host>div>div.results-wrapper>div.results .item{cursor:pointer}:host>div>div.results-wrapper>div.results .item-no-results{cursor:default;font-size:var(--font-size-3);line-height:var(--font-size-6)}}";
6
+ const stylesCss = ":host{position:relative;z-index:5;display:block;width:inherit;height:44px;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{position:absolute;z-index:10;display:grid;width:100%;gap:0 calc(var(--space-unit) * 2);grid-template-columns:auto;grid-template-rows:auto}:host>div.has-submit{grid-template-columns:auto min-content}:host>div.has-results{grid-template-rows:auto auto}:host>div>z-input{width:100%;grid-column:1;grid-row:1}:host>div>z-button{grid-column:2;grid-row:1}:host>div>div.results-wrapper{overflow:auto;padding:calc(var(--space-unit) / 4);padding-bottom:calc(var(--space-unit) / 4);border:var(--border-size-small) solid var(--color-surface03);border-top:none;margin-top:-1px;background:var(--color-surface01);grid-column:1;grid-row:2}:host>div>div.results-wrapper>div.results{overflow:auto;max-height:var(--z-searchbar-results-height, 540px);padding:var(--space-unit) calc(var(--space-unit) * 1.5);padding-bottom:calc(var(--space-unit) / 2);scrollbar-color:var(--color-primary01) transparent}:host>div>div.results-wrapper>div.results::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}:host>div>div.results-wrapper>div.results::-webkit-scrollbar-track{background-color:transparent}:host>div>div.results-wrapper>div.results::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}:host>div>div.results-wrapper>div.results .category-heading{display:block;font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:var(--font-size-3)}:host>div>div.results-wrapper>div.results .category-heading>*{display:block}:host>div>div.results-wrapper>div.results span.category-heading>span.category{color:var(--color-text05);font-style:italic}:host>div>div.results-wrapper>div.results span.category-heading>span.subcategory{margin-top:8px;color:var(--color-text01);text-transform:uppercase}:host>div>div.results-wrapper>div.results z-list-element{display:block}:host>div>div.results-wrapper>div.results z-list-element:focus{box-shadow:var(--shadow-focus-primary)}:host>div>div.results-wrapper>div.results .item{--z-icon-height:12px;--z-icon-width:12px;display:flex;flex-flow:row nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;color:var(--color-text01);fill:var(--color-icon02);font-size:var(--font-size-2);line-height:var(--font-size-3)}:host>div>div.results-wrapper>div.results .item.ellipsis>span.item-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host>div>div.results-wrapper>div.results .item>span.item-label>mark,:host>div>div.results-wrapper>div.results .item>span.item-label>*>mark{background:var(--color-primary03)}:host>div>div.results-wrapper>div.results .item.has-category{padding-left:calc(var(--space-unit) * 3)}:host>div>div.results-wrapper>div.results .item>z-icon.item-icon{padding:2px 0;margin-right:calc(var(--space-unit) * 1.5)}:host>div>div.results-wrapper>div.results .item.item-search{--z-icon-height:16px;--z-icon-width:16px}:host>div>div.results-wrapper>div.results .item.item-search>z-icon{margin-right:var(--space-unit)}:host>div>div.results-wrapper>div.results .item-show-all{display:block;text-align:center}:host>div>div.results-wrapper>div.results .item-no-results{display:block;font-size:var(--font-size-2);font-style:italic;line-height:var(--font-size-5)}:host>div>div.results-wrapper>div.results .item-no-results>ul{padding-left:calc(var(--space-unit) * 2);margin:var(--space-unit)}@media (min-width: 768px){:host>div>div.results-wrapper>div.results .category-heading{font-size:var(--font-size-3);line-height:var(--font-size-6)}:host>div>div.results-wrapper>div.results .item{--z-icon-height:12px;--z-icon-width:12px;font-size:var(--font-size-3);line-height:var(--font-size-6)}:host>div>div.results-wrapper>div.results .item.item-search{--z-icon-height:18px;--z-icon-width:18px}:host>div>div.results-wrapper>div.results .item.item-search>z-icon{margin-top:calc(var(--space-unit) / 4)}:host>div>div.results-wrapper>div.results .item.ellipsis>span.item-label{height:24px}:host>div>div.results-wrapper>div.results .item>z-icon.item-icon{padding:6px 0}}@media (min-width: 1152px){:host>div>div.results-wrapper>div.results .item{cursor:pointer}:host>div>div.results-wrapper>div.results .item-no-results{cursor:default;font-size:var(--font-size-3);line-height:var(--font-size-6)}}:host([size=\"small\"])>div>div.results-wrapper>div.results .item,:host([size=\"x-small\"])>div>div.results-wrapper>div.results .item,:host([size=\"small\"])>div>div.results-wrapper>div.results .category-heading,:host([size=\"x-small\"])>div>div.results-wrapper>div.results .category-heading{font-size:var(--font-size-2)}:host([size=\"small\"])>div>div.results-wrapper>div.results .item:not(.has-category),:host([size=\"x-small\"])>div>div.results-wrapper>div.results .item:not(.has-category){--z-icon-height:16px;--z-icon-width:16px}:host([size=\"small\"])::part(list-item-container){min-height:calc(var(--space-unit) * 4.5);padding:0}:host([size=\"x-small\"])::part(list-item-container){min-height:calc(var(--space-unit) * 4);padding:0}";
7
7
 
8
8
  const ZSearchbar = class {
9
9
  constructor(hostRef) {
@@ -27,6 +27,12 @@ const ZSearchbar = class {
27
27
  this.sortResultsItems = false;
28
28
  /** Show submit button */
29
29
  this.showSearchButton = false;
30
+ /** Set button icon without label*/
31
+ this.searchButtonIconOnly = false;
32
+ /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
33
+ this.size = ControlSize.BIG;
34
+ /** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */
35
+ this.variant = ButtonVariant.PRIMARY;
30
36
  this.searchString = "";
31
37
  this.currResultsCount = 0;
32
38
  this.showResults = false;
@@ -139,13 +145,16 @@ const ZSearchbar = class {
139
145
  renderInput() {
140
146
  return (h("z-input", { ref: (val) => {
141
147
  this.inputRef = val;
142
- }, message: false, placeholder: this.placeholder, onStopTyping: (e) => this.handleStopTyping(e), onKeyUp: (e) => handleEnterKeydSubmit(e, () => this.handleSubmit()), value: this.value }));
148
+ }, message: false, placeholder: this.placeholder, onStopTyping: (e) => this.handleStopTyping(e), onKeyUp: (e) => handleEnterKeydSubmit(e, () => this.handleSubmit()), value: this.value, size: this.size }));
143
149
  }
144
150
  renderButton() {
145
151
  if (!this.showSearchButton) {
146
152
  return null;
147
153
  }
148
- return (h("z-button", { disabled: this.preventSubmit, variant: ButtonVariant.PRIMARY, onClick: () => this.handleSubmit() }, "CERCA"));
154
+ const iconProp = this.searchButtonIconOnly ? { icon: "search" } : null;
155
+ const buttonLabel = this.searchButtonIconOnly ? "" : "CERCA";
156
+ const defaultProps = Object.assign({ disabled: this.preventSubmit, variant: this.variant, size: this.size, onClick: () => this.handleSubmit() }, iconProp);
157
+ return h("z-button", Object.assign({}, defaultProps), buttonLabel);
149
158
  }
150
159
  renderResults() {
151
160
  if (!this.showResults ||
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h } from './index-a2ca4b97.js';
2
2
 
3
- const stylesCss = ":host{position:relative;width:calc(var(--space-unit) * 5);font-family:var(--dashboard-font);font-weight:var(--font-rg)}:host(:not(:last-child)){flex:1}:host(:not(:last-child))::after{position:absolute;z-index:1;top:calc(var(--space-unit) * 4);right:calc(var(--space-unit) * 2);left:calc(var(--space-unit) * 3);display:block;width:auto;border-bottom:solid 2px var(--bg-grey-700);margin:0 calc(-1 * calc(var(--space-unit) * 2)) 0 calc(var(--space-unit) * 2);content:\"\"}.stepper-item{display:flex;width:calc(var(--space-unit) * 5);flex-direction:column;align-items:center;padding:0;border:0;appearance:none;background:transparent;color:inherit;font-family:inherit;font-size:18px;line-height:28px;outline:0;text-decoration:none}.stepper-item span{display:none;width:calc(100% + calc(var(--space-unit) * 4));text-align:center}:host(:not([disabled])) .stepper-item{cursor:pointer}:host([disabled]) .stepper-item{pointer-events:none}.indicator{display:flex;width:calc(var(--space-unit) * 4);height:calc(var(--space-unit) * 4);box-sizing:border-box;align-items:center;justify-content:center;border:2px solid var(--myz-blue);margin:calc(var(--space-unit) * 2);background:var(--bg-white);border-radius:50%;color:var(--myz-blue);content:counter(stepper);font-size:14px;font-weight:var(--font-sb);line-height:1}:host([pressed]:not([disabled])) .indicator{border-color:var(--myz-blue-dark);background:var(--myz-blue-dark);color:var(--text-white)}:host(:not([disabled]):focus-within) .indicator{box-shadow:0 0 2px 2px var(--accent-dark)}:host([disabled]) .indicator{border-color:currentcolor;background:var(--bg-grey-200);color:var(--text-grey-700)}@media only screen and (min-width: 768px){:host{width:calc(var(--space-unit) * 10)}:host(:not(:last-child))::after{top:calc(var(--space-unit) * 5);left:calc(var(--space-unit) * 8)}.stepper-item{width:calc(var(--space-unit) * 10)}.stepper-item span{display:block}.indicator{width:calc(var(--space-unit) * 6);height:calc(var(--space-unit) * 6);font-size:16px}}";
3
+ const stylesCss = ":host{position:relative;width:calc(var(--space-unit) * 5);font-family:var(--dashboard-font);font-weight:var(--font-rg)}:host(:not(:last-child)){flex:1}:host(:not(:last-child))::after{position:absolute;z-index:1;top:calc(var(--space-unit) * 4);right:calc(var(--space-unit) * 2);left:calc(var(--space-unit) * 3);display:block;width:auto;border-bottom:solid 2px var(--bg-grey-700);margin:0 calc(-1 * calc(var(--space-unit) * 2)) 0 calc(var(--space-unit) * 2);content:\"\"}.stepper-item{display:flex;width:calc(var(--space-unit) * 5);flex-direction:column;align-items:center;padding:0;border:0;appearance:none;background:transparent;color:inherit;font-family:inherit;font-size:18px;line-height:28px;outline:0;text-decoration:none}.stepper-item span{display:none;width:calc(100% + calc(var(--space-unit) * 4));text-align:center}:host(:not([disabled])) .stepper-item{cursor:pointer}:host([disabled]) .stepper-item{pointer-events:none}.indicator{display:flex;width:calc(var(--space-unit) * 4);height:calc(var(--space-unit) * 4);box-sizing:border-box;align-items:center;justify-content:center;border:2px solid var(--myz-blue);margin:calc(var(--space-unit) * 2);background:var(--bg-white);border-radius:50%;color:var(--myz-blue);content:counter(stepper);font-size:14px;font-weight:var(--font-sb);line-height:1}:host([pressed]:not([disabled])) .indicator{border-color:var(--myz-blue-dark);background:var(--myz-blue-dark);color:var(--text-white)}:host(:not([disabled]):focus-within) .indicator{box-shadow:var(--shadow-focus-primary)}:host([disabled]) .indicator{border-color:currentcolor;background:var(--bg-grey-200);color:var(--text-grey-700)}@media only screen and (min-width: 768px){:host{width:calc(var(--space-unit) * 10)}:host(:not(:last-child))::after{top:calc(var(--space-unit) * 5);left:calc(var(--space-unit) * 8)}.stepper-item{width:calc(var(--space-unit) * 10)}.stepper-item span{display:block}.indicator{width:calc(var(--space-unit) * 6);height:calc(var(--space-unit) * 6);font-size:16px}}";
4
4
 
5
5
  const ZStepperItem = class {
6
6
  constructor(hostRef) {
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-a2ca4b97.js';
2
2
 
3
- const stylesCss = "button{height:36px;padding-right:calc(var(--space-unit) * 2);padding-left:0;border:var(--border-size-medium) solid;border-color:transparent;background-color:var(--bg-white);border-radius:var(--border-radius);box-shadow:0 0 4px 0 rgb(0 0 0 / 20%);color:var(--myz-blue);cursor:pointer;fill:var(--myz-blue);font-family:var(--dashboard-font);font-size:14px;font-weight:var(--font-sb);outline:none;text-transform:uppercase;transition:all 200ms linear}button::-moz-focus-inner{border:0}button:hover{color:var(--myz-blue-dark);fill:var(--myz-blue-dark)}button:focus{border-color:var(--myz-blue);box-shadow:0 0 2px 2px var(--accent-dark);color:var(--myz-blue);fill:var(--myz-blue)}button:active{border-color:var(--myz-blue-light);box-shadow:0 2px 4px 0 rgb(0 0 0 / 40%);color:var(--myz-blue-light);fill:var(--myz-blue-light)}button:disabled{color:var(--text-grey-700);fill:var(--text-grey-700)}z-icon{display:inline-block;margin:0 var(--space-unit) 0 calc(var(--space-unit) * 2);transform:rotate(360deg);transition:all 200ms linear}button.isopen{top:-20px}button.avoid-clicks{pointer-events:none}";
3
+ const stylesCss = "button{height:36px;padding-right:calc(var(--space-unit) * 2);padding-left:0;border:var(--border-size-medium) solid;border-color:transparent;background-color:var(--bg-white);border-radius:var(--border-radius);box-shadow:0 0 4px 0 rgb(0 0 0 / 20%);color:var(--myz-blue);cursor:pointer;fill:var(--myz-blue);font-family:var(--dashboard-font);font-size:14px;font-weight:var(--font-sb);outline:none;text-transform:uppercase}button::-moz-focus-inner{border:0}button:hover{color:var(--myz-blue-dark);fill:var(--myz-blue-dark)}button:focus{box-shadow:var(--shadow-focus-primary);color:var(--myz-blue);fill:var(--myz-blue)}button:active{border-color:var(--myz-blue-light);box-shadow:0 2px 4px 0 rgb(0 0 0 / 40%);color:var(--myz-blue-light);fill:var(--myz-blue-light)}button:disabled{color:var(--text-grey-700);fill:var(--text-grey-700)}z-icon{display:inline-block;margin:0 var(--space-unit) 0 calc(var(--space-unit) * 2);transform:rotate(360deg);transition:all 200ms linear}button.isopen{top:-20px}button.avoid-clicks{pointer-events:none}";
4
4
 
5
5
  const ZToggleButton = class {
6
6
  constructor(hostRef) {
@@ -10,6 +10,8 @@ const ZToggleButton = class {
10
10
  this.isdisabled = false;
11
11
  /** open by default (optional) */
12
12
  this.opened = false;
13
+ /** aria-label for the button */
14
+ this.ariaLabel = "";
13
15
  }
14
16
  emitToggleClick() {
15
17
  if (this.isdisabled) {
@@ -22,7 +24,7 @@ const ZToggleButton = class {
22
24
  return (h("button", { tabindex: this.avoidclick ? "-1" : "0", class: {
23
25
  "isopen": this.opened,
24
26
  "avoid-clicks": this.avoidclick,
25
- }, disabled: this.isdisabled, onClick: () => this.emitToggleClick() }, h("z-icon", { name: this.opened ? "chevron-down" : "chevron-up", width: 16, height: 16 }), this.label));
27
+ }, disabled: this.isdisabled, "aria-expanded": this.opened ? "true" : "false", "aria-label": this.ariaLabel, onClick: () => this.emitToggleClick() }, h("z-icon", { name: this.opened ? "chevron-down" : "chevron-up", width: 16, height: 16 }), this.label));
26
28
  }
27
29
  };
28
30
  ZToggleButton.style = stylesCss;
File without changes
File without changes
@@ -6,7 +6,7 @@ export declare class ZButtonSort {
6
6
  label: string;
7
7
  /** label content (descending) */
8
8
  desclabel?: string;
9
- /** occurrencies counter (optional) */
9
+ /** occurrences counter (optional) */
10
10
  counter?: number;
11
11
  /** sort label content (ascending) (optional) */
12
12
  sortlabelasc?: string;
@@ -18,7 +18,7 @@ export declare class ZButtonSort {
18
18
  sortasc?: boolean;
19
19
  allowTooltip: boolean;
20
20
  private ellipsis?;
21
- /** sorting direction click event, returns buttonid and sortAsc */
21
+ /** sorting direction click event, returns `buttonid` and `sortAsc` */
22
22
  buttonSortClick: EventEmitter;
23
23
  private emitButtonSortClick;
24
24
  componentDidLoad(): void;
@@ -10,6 +10,8 @@ export declare class ZChip {
10
10
  interactiveIcon?: string;
11
11
  /** set z-chip as disabled */
12
12
  disabled?: boolean;
13
+ /** z-chip aria-label string */
14
+ ariaLabel: string;
13
15
  /** click on interactive icon */
14
16
  interactiveIconClick: EventEmitter;
15
17
  private emitinteractiveIconClick;
@@ -8,6 +8,8 @@ export declare class ZToggleButton {
8
8
  avoidclick: boolean;
9
9
  /** open by default (optional) */
10
10
  opened?: boolean;
11
+ /** aria-label for the button */
12
+ ariaLabel: string;
11
13
  /** emitted on toggle button click, returns isOpen */
12
14
  toggleClick: EventEmitter;
13
15
  private emitToggleClick;
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from "../../../stencil-public-runtime";
2
- import { SearchbarItem } from "../../../beans";
2
+ import { ButtonVariant, SearchbarItem, ControlSize } from "../../../beans";
3
3
  /**
4
4
  * @cssprop --z-searchbar-results-height - Max height of the results container (default: 540px)
5
5
  */
@@ -28,6 +28,12 @@ export declare class ZSearchbar {
28
28
  sortResultsItems?: boolean;
29
29
  /** Show submit button */
30
30
  showSearchButton?: boolean;
31
+ /** Set button icon without label*/
32
+ searchButtonIconOnly?: boolean;
33
+ /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
34
+ size?: ControlSize;
35
+ /** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */
36
+ variant?: ButtonVariant;
31
37
  searchString: string;
32
38
  currResultsCount: number;
33
39
  showResults: boolean;
File without changes
File without changes
File without changes
@@ -14,6 +14,8 @@ export declare class ZModal {
14
14
  closeButtonLabel: string;
15
15
  /** add role "alertdialog" to dialog (optional, default is false) */
16
16
  alertdialog?: boolean;
17
+ /** if true, the modal is closable (optional, default is true) */
18
+ closable?: boolean;
17
19
  private dialog;
18
20
  host: HTMLZModalElement;
19
21
  /** emitted on close button click, returns modalid */
@@ -39,5 +41,7 @@ export declare class ZModal {
39
41
  */
40
42
  private get focusableElements();
41
43
  handleKeyDown(e: KeyboardEvent): void;
44
+ private closeButtonSlot;
45
+ private handleEscape;
42
46
  render(): HTMLZModalElement;
43
47
  }