@zanichelli/albe-web-components 7.2.0 → 7.3.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 (148) hide show
  1. package/dist/cjs/index-e3299e0a.js +10 -6
  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-app-header_2.cjs.entry.js +152 -0
  5. package/dist/cjs/z-button-sort.cjs.entry.js +1 -1
  6. package/dist/cjs/z-button.cjs.entry.js +43 -0
  7. package/dist/cjs/z-card.cjs.entry.js +1 -1
  8. package/dist/cjs/z-chip.cjs.entry.js +6 -3
  9. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +25 -4
  10. package/dist/cjs/z-list_3.cjs.entry.js +1 -1
  11. package/dist/cjs/z-menu-section.cjs.entry.js +11 -3
  12. package/dist/cjs/z-menu.cjs.entry.js +26 -14
  13. package/dist/cjs/z-myz-card-footer.cjs.entry.js +13 -1
  14. package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
  15. package/dist/cjs/z-myz-card_4.cjs.entry.js +2 -2
  16. package/dist/cjs/z-offcanvas.cjs.entry.js +57 -0
  17. package/dist/cjs/z-searchbar.cjs.entry.js +12 -3
  18. package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
  19. package/dist/cjs/z-toggle-button.cjs.entry.js +4 -2
  20. package/dist/collection/collection-manifest.json +1 -1
  21. package/dist/collection/components/buttons/z-button-sort/index.js +2 -2
  22. package/dist/collection/components/buttons/z-button-sort/styles.css +1 -1
  23. package/dist/collection/components/buttons/z-chip/index.js +25 -3
  24. package/dist/collection/components/buttons/z-chip/styles.css +28 -21
  25. package/dist/collection/components/buttons/z-toggle-button/index.js +21 -1
  26. package/dist/collection/components/buttons/z-toggle-button/styles.css +1 -3
  27. package/dist/collection/components/indicators/z-stepper-item/styles.css +1 -1
  28. package/dist/collection/components/inputs/z-searchbar/index.js +76 -3
  29. package/dist/collection/components/inputs/z-searchbar/styles.css +23 -0
  30. package/dist/collection/components/list/z-list-element/index.js +1 -1
  31. package/dist/collection/components/modal/z-modal/index.js +43 -4
  32. package/dist/collection/components/navigation/z-app-header/index.js +14 -15
  33. package/dist/collection/components/navigation/z-app-header/styles.css +2 -3
  34. package/dist/collection/components/navigation/z-menu/index.js +45 -21
  35. package/dist/collection/components/navigation/z-menu/styles.css +80 -13
  36. package/dist/collection/components/navigation/z-menu-section/index.js +13 -4
  37. package/dist/collection/components/navigation/z-menu-section/styles.css +37 -4
  38. package/dist/collection/components/notification/z-toast-notification/index.js +1 -1
  39. package/dist/collection/components/z-card/index.js +9 -0
  40. package/dist/collection/components/z-card/styles.css +1 -1
  41. package/dist/collection/components/z-offcanvas/index.js +39 -23
  42. package/dist/collection/components/z-offcanvas/styles.css +5 -5
  43. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +13 -1
  44. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
  45. package/dist/collection/snowflakes/myz/card/z-myz-card-header/styles.css +12 -0
  46. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/styles.css +1 -1
  47. package/dist/collection/utils/storybook-utils.js +1 -1
  48. package/dist/esm/index-a2ca4b97.js +10 -6
  49. package/dist/esm/loader.js +1 -1
  50. package/dist/esm/web-components-library.js +1 -1
  51. package/dist/esm/z-app-header_2.entry.js +147 -0
  52. package/dist/esm/z-button-sort.entry.js +1 -1
  53. package/dist/esm/z-button.entry.js +39 -0
  54. package/dist/esm/z-card.entry.js +1 -1
  55. package/dist/esm/z-chip.entry.js +7 -4
  56. package/dist/esm/z-dragdrop-area_2.entry.js +25 -4
  57. package/dist/esm/z-list_3.entry.js +1 -1
  58. package/dist/esm/z-menu-section.entry.js +11 -3
  59. package/dist/esm/z-menu.entry.js +26 -14
  60. package/dist/esm/z-myz-card-footer.entry.js +14 -2
  61. package/dist/esm/z-myz-card-icon.entry.js +1 -1
  62. package/dist/esm/z-myz-card_4.entry.js +2 -2
  63. package/dist/esm/z-offcanvas.entry.js +53 -0
  64. package/dist/esm/z-searchbar.entry.js +13 -4
  65. package/dist/esm/z-stepper-item.entry.js +1 -1
  66. package/dist/esm/z-toggle-button.entry.js +4 -2
  67. package/dist/types/components/buttons/z-button-sort/index.d.ts +2 -2
  68. package/dist/types/components/buttons/z-chip/index.d.ts +2 -0
  69. package/dist/types/components/buttons/z-toggle-button/index.d.ts +2 -0
  70. package/dist/types/components/inputs/z-searchbar/index.d.ts +7 -1
  71. package/dist/types/components/modal/z-modal/index.d.ts +4 -0
  72. package/dist/types/components/navigation/z-app-header/index.d.ts +2 -4
  73. package/dist/types/components/navigation/z-menu/index.d.ts +13 -5
  74. package/dist/types/components/navigation/z-menu-section/index.d.ts +9 -3
  75. package/dist/types/components/notification/z-toast-notification/index.d.ts +1 -1
  76. package/dist/types/components/z-card/index.d.ts +9 -0
  77. package/dist/types/components/z-offcanvas/index.d.ts +4 -1
  78. package/dist/types/components.d.ts +65 -17
  79. package/dist/types/snowflakes/myz/card/z-myz-card-footer/index.d.ts +2 -0
  80. package/dist/web-components-library/p-068951a7.entry.js +1 -0
  81. package/dist/web-components-library/p-06b7dad4.entry.js +1 -0
  82. package/dist/web-components-library/{p-417b1b6c.entry.js → p-10adc1fa.entry.js} +1 -1
  83. package/dist/web-components-library/p-1570917d.entry.js +1 -0
  84. package/dist/web-components-library/p-157aea3b.entry.js +1 -0
  85. package/dist/web-components-library/p-1c8e7c24.entry.js +1 -0
  86. package/dist/web-components-library/p-20682781.entry.js +1 -0
  87. package/dist/web-components-library/{p-ede9fbf5.entry.js → p-6736e894.entry.js} +1 -1
  88. package/dist/web-components-library/{p-810bd730.entry.js → p-9db2bf11.entry.js} +1 -1
  89. package/dist/web-components-library/p-af283478.entry.js +1 -0
  90. package/dist/web-components-library/p-c722c5a4.entry.js +1 -0
  91. package/dist/web-components-library/p-d0760bb1.entry.js +1 -0
  92. package/dist/web-components-library/p-deda8776.entry.js +1 -0
  93. package/dist/web-components-library/p-f3a8cc14.entry.js +1 -0
  94. package/dist/web-components-library/{p-05ced71c.entry.js → p-f5a99b28.entry.js} +1 -1
  95. package/dist/web-components-library/{p-c081e1f4.entry.js → p-f9f42d17.entry.js} +1 -1
  96. package/dist/web-components-library/web-components-library.css +1 -1
  97. package/dist/web-components-library/web-components-library.esm.js +1 -1
  98. package/package.json +2 -3
  99. package/readme.md +0 -1
  100. package/www/build/p-068951a7.entry.js +1 -0
  101. package/www/build/p-06b7dad4.entry.js +1 -0
  102. package/www/build/{p-417b1b6c.entry.js → p-10adc1fa.entry.js} +1 -1
  103. package/www/build/p-1570917d.entry.js +1 -0
  104. package/www/build/p-157aea3b.entry.js +1 -0
  105. package/www/build/p-1c8e7c24.entry.js +1 -0
  106. package/www/build/p-20682781.entry.js +1 -0
  107. package/www/build/{p-ede9fbf5.entry.js → p-6736e894.entry.js} +1 -1
  108. package/www/build/p-77d28b14.js +1 -0
  109. package/www/build/{p-810bd730.entry.js → p-9db2bf11.entry.js} +1 -1
  110. package/www/build/p-ab4e13f7.css +1 -0
  111. package/www/build/p-af283478.entry.js +1 -0
  112. package/www/build/p-c722c5a4.entry.js +1 -0
  113. package/www/build/p-d0760bb1.entry.js +1 -0
  114. package/www/build/p-deda8776.entry.js +1 -0
  115. package/www/build/p-f3a8cc14.entry.js +1 -0
  116. package/www/build/{p-05ced71c.entry.js → p-f5a99b28.entry.js} +1 -1
  117. package/www/build/{p-c081e1f4.entry.js → p-f9f42d17.entry.js} +1 -1
  118. package/www/build/web-components-library.css +1 -1
  119. package/www/build/web-components-library.esm.js +1 -1
  120. package/www/index.html +1 -37
  121. package/CHANGELOG.md +0 -2337
  122. package/dist/cjs/z-app-header.cjs.entry.js +0 -133
  123. package/dist/cjs/z-button_3.cjs.entry.js +0 -108
  124. package/dist/esm/z-app-header.entry.js +0 -129
  125. package/dist/esm/z-button_3.entry.js +0 -102
  126. package/dist/web-components-library/p-029e4fba.entry.js +0 -1
  127. package/dist/web-components-library/p-14a6abe4.entry.js +0 -1
  128. package/dist/web-components-library/p-19ca449e.entry.js +0 -1
  129. package/dist/web-components-library/p-3a9cc467.entry.js +0 -1
  130. package/dist/web-components-library/p-73d9489b.entry.js +0 -1
  131. package/dist/web-components-library/p-9d03a7d6.entry.js +0 -1
  132. package/dist/web-components-library/p-f158d205.entry.js +0 -1
  133. package/dist/web-components-library/p-f95cc914.entry.js +0 -1
  134. package/dist/web-components-library/p-fa4c203a.entry.js +0 -1
  135. package/dist/web-components-library/p-fffb14e1.entry.js +0 -1
  136. package/src-react/index.ts +0 -1
  137. package/www/build/p-029e4fba.entry.js +0 -1
  138. package/www/build/p-14a6abe4.entry.js +0 -1
  139. package/www/build/p-19ca449e.entry.js +0 -1
  140. package/www/build/p-275801c6.css +0 -1
  141. package/www/build/p-3a9cc467.entry.js +0 -1
  142. package/www/build/p-73d9489b.entry.js +0 -1
  143. package/www/build/p-811ee64f.js +0 -1
  144. package/www/build/p-9d03a7d6.entry.js +0 -1
  145. package/www/build/p-f158d205.entry.js +0 -1
  146. package/www/build/p-f95cc914.entry.js +0 -1
  147. package/www/build/p-fa4c203a.entry.js +0 -1
  148. package/www/build/p-fffb14e1.entry.js +0 -1
@@ -48,15 +48,21 @@ const ZModal = class {
48
48
  this.closeButtonLabel = "chiudi modale";
49
49
  /** add role "alertdialog" to dialog (optional, default is false) */
50
50
  this.alertdialog = false;
51
+ /** if true, the modal is closable (optional, default is true) */
52
+ this.closable = true;
51
53
  }
52
54
  emitModalClose() {
53
- this.modalClose.emit({ modalid: this.modalid });
55
+ if (this.closable) {
56
+ this.modalClose.emit({ modalid: this.modalid });
57
+ }
54
58
  }
55
59
  emitModalHeaderActive() {
56
60
  this.modalHeaderActive.emit({ modalid: this.modalid });
57
61
  }
58
62
  emitBackgroundClick() {
59
- this.modalBackgroundClick.emit({ modalid: this.modalid });
63
+ if (this.closable) {
64
+ this.modalBackgroundClick.emit({ modalid: this.modalid });
65
+ }
60
66
  }
61
67
  componentDidLoad() {
62
68
  this.open();
@@ -69,7 +75,9 @@ const ZModal = class {
69
75
  /** close modal */
70
76
  async close() {
71
77
  var _a;
72
- (_a = this.dialog) === null || _a === void 0 ? void 0 : _a.close();
78
+ if (this.closable) {
79
+ (_a = this.dialog) === null || _a === void 0 ? void 0 : _a.close();
80
+ }
73
81
  }
74
82
  /**
75
83
  * Get a list of focusable elements in the dialog.
@@ -104,8 +112,21 @@ const ZModal = class {
104
112
  firstFocusableElement.focus();
105
113
  }
106
114
  }
115
+ closeButtonSlot() {
116
+ if (this.closable) {
117
+ return (index.h("slot", { name: "modalCloseButton" }, index.h("button", { "aria-label": this.closeButtonLabel, onClick: () => this.close() }, index.h("z-icon", { name: "multiply-circle-filled" }))));
118
+ }
119
+ }
120
+ handleEscape(e) {
121
+ if (this.closable) {
122
+ return;
123
+ }
124
+ e.preventDefault();
125
+ }
107
126
  render() {
108
- return (index.h("dialog", { "aria-labelledby": "modal-title", "aria-describedby": "modal-content", role: this.alertdialog ? "alertdialog" : undefined, ref: (el) => (this.dialog = el), onClose: () => this.emitModalClose() }, index.h("div", { class: "modal-container", id: this.modalid }, index.h("header", { onClick: this.emitModalHeaderActive.bind(this) }, index.h("div", null, this.modaltitle && index.h("h1", { id: "modal-title" }, this.modaltitle), this.modalsubtitle && index.h("h2", { id: "modal-subtitle" }, this.modalsubtitle)), index.h("slot", { name: "modalCloseButton" }, index.h("button", { "aria-label": this.closeButtonLabel, onClick: () => this.close() }, index.h("z-icon", { name: "multiply-circle-filled" })))), index.h("div", { class: "modal-content", id: "modal-content" }, index.h("slot", { name: "modalContent" }))), index.h("div", { class: "modal-background", "data-action": "modalBackground", "data-modal": this.modalid, onClick: () => {
127
+ return (index.h("dialog", { "aria-labelledby": "modal-title", "aria-describedby": "modal-content", role: this.alertdialog ? "alertdialog" : undefined, ref: (el) => (this.dialog = el), onClose: () => this.emitModalClose(),
128
+ // @ts-ignore
129
+ onCancel: (e) => this.handleEscape(e) }, index.h("div", { class: "modal-container", id: this.modalid }, index.h("header", { onClick: this.emitModalHeaderActive.bind(this) }, index.h("div", null, this.modaltitle && index.h("h1", { id: "modal-title" }, this.modaltitle), this.modalsubtitle && index.h("h2", { id: "modal-subtitle" }, this.modalsubtitle)), this.closeButtonSlot()), index.h("div", { class: "modal-content", id: "modal-content" }, index.h("slot", { name: "modalContent" }))), index.h("div", { class: "modal-background", "data-action": "modalBackground", "data-modal": this.modalid, onClick: () => {
109
130
  this.emitBackgroundClick();
110
131
  this.close();
111
132
  } })));
@@ -198,7 +198,7 @@ const ZListElement = class {
198
198
  }
199
199
  }
200
200
  render() {
201
- return (index.h(index.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 }, index.h("div", { class: `${this.calculateClass()}`, style: { color: `var(--${this.color})` }, tabindex: this.isContextualMenu ? "0" : "-1", id: `z-list-element-id-${this.listElementId}` }, index.h("div", { class: "z-list-element-container" }, this.renderExpandableButton(), this.renderContent()), this.renderExpandedContent()), this.dividerType === index$1.ListDividerType.ELEMENT && (index.h("z-divider", { color: this.dividerColor, size: this.dividerSize }))));
201
+ return (index.h(index.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 }, index.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" }, index.h("div", { class: "z-list-element-container" }, this.renderExpandableButton(), this.renderContent()), this.renderExpandedContent()), this.dividerType === index$1.ListDividerType.ELEMENT && (index.h("z-divider", { color: this.dividerColor, size: this.dividerSize }))));
202
202
  }
203
203
  get host() { return index.getElement(this); }
204
204
  };
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e3299e0a.js');
6
6
 
7
- 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)}";
7
+ 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)}";
8
8
 
9
9
  const ZMenuSection = class {
10
10
  constructor(hostRef) {
@@ -31,13 +31,21 @@ const ZMenuSection = class {
31
31
  * Check if some content slot is set.
32
32
  */
33
33
  checkContent() {
34
- this.hasContent = !!this.hostElement.querySelectorAll('[slot="item"]').length;
34
+ this.hasContent = this.hostElement.querySelectorAll('[slot="item"]').length > 0;
35
+ }
36
+ /**
37
+ * Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.
38
+ * @param ev Slotchange event
39
+ */
40
+ onLabelSlotChange(ev) {
41
+ const labelElement = ev.target.assignedElements()[0];
42
+ labelElement.dataset.text = (labelElement === null || labelElement === void 0 ? void 0 : labelElement.innerText) || null;
35
43
  }
36
44
  componentWillLoad() {
37
45
  this.checkContent();
38
46
  }
39
47
  render() {
40
- return (index.h(index.Host, { role: "menu", open: this.open }, index.h("button", { class: "label", "aria-pressed": this.open ? "true" : "false", onClick: this.toggle.bind(this) }, index.h("slot", null), this.hasContent && index.h("z-icon", { name: this.open ? "chevron-up" : "chevron-down" })), this.open && (index.h("div", { class: "items" }, index.h("slot", { name: "item", onSlotchange: this.checkContent.bind(this) })))));
48
+ return (index.h(index.Host, { role: "menu", open: this.open }, index.h("button", { class: "label", "aria-pressed": this.open ? "true" : "false", onClick: this.toggle.bind(this) }, index.h("slot", { onSlotchange: this.onLabelSlotChange.bind(this) }), this.hasContent && index.h("z-icon", { name: this.open ? "chevron-up" : "chevron-down" })), this.open && (index.h("div", { class: "items" }, index.h("slot", { name: "item", onSlotchange: this.checkContent.bind(this) })))));
41
49
  }
42
50
  get hostElement() { return index.getElement(this); }
43
51
  };
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e3299e0a.js');
6
6
 
7
- 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)}";
7
+ 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)}";
8
8
 
9
9
  const ZMenu = class {
10
10
  constructor(hostRef) {
@@ -15,16 +15,18 @@ const ZMenu = class {
15
15
  * Flag to set the display mode of the list.
16
16
  * If true, the list will be absolutely positioned under the menu label,
17
17
  * stacked beneath it otherwise.
18
- * @default false
19
18
  */
20
19
  this.floating = false;
20
+ /** The opening state of the menu. */
21
+ this.open = false;
21
22
  /**
22
- * The opening state of the menu.
23
- * @default false
23
+ * Tells the component that it's placed in a vertical context with other `ZMenu`s (e.g. in the ZAppHeader's offcanvas).
24
+ * A small border is placed under it as a separator from other elements.
24
25
  */
25
- this.open = false;
26
+ this.verticalContext = false;
26
27
  this.toggle = this.toggle.bind(this);
27
28
  this.checkContent = this.checkContent.bind(this);
29
+ this.onLabelSlotChange = this.onLabelSlotChange.bind(this);
28
30
  this.onItemsChange = this.onItemsChange.bind(this);
29
31
  }
30
32
  toggle() {
@@ -54,6 +56,14 @@ const ZMenu = class {
54
56
  componentWillLoad() {
55
57
  this.checkContent();
56
58
  }
59
+ /**
60
+ * Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.
61
+ * @param ev Slotchange event
62
+ */
63
+ onLabelSlotChange(ev) {
64
+ const labelElement = ev.target.assignedElements()[0];
65
+ labelElement.dataset.text = labelElement === null || labelElement === void 0 ? void 0 : labelElement.textContent;
66
+ }
57
67
  /**
58
68
  * Correctly set position of the floating menu in order to prevent overflow.
59
69
  * @param live Should run the method on every refresh frame.
@@ -75,27 +85,29 @@ const ZMenu = class {
75
85
  * Check if some content slot is set.
76
86
  */
77
87
  checkContent() {
78
- this.hasHeader = !!this.hostElement.querySelectorAll('[slot="header"]').length;
79
- this.hasContent = !!this.hostElement.querySelectorAll('[slot="item"]').length || this.hasHeader;
88
+ this.hasHeader = !!this.hostElement.querySelectorAll("[slot=header]").length;
89
+ this.hasContent = !!this.hostElement.querySelectorAll("[slot=item]").length || this.hasHeader;
80
90
  }
81
91
  /**
82
92
  * Set `menuitem` role to all menu items.
93
+ * Set the item's inner text to the `data-text` attribute (this is for using bold text avoiding layout shifts).
83
94
  */
84
95
  onItemsChange() {
85
96
  this.checkContent();
86
- const items = this.hostElement.querySelectorAll('[slot="item"]');
87
- items === null || items === void 0 ? void 0 : items.forEach((item) => item.setAttribute("role", "menuitem"));
97
+ const items = this.hostElement.querySelectorAll("[slot=item]");
98
+ items.forEach((item) => {
99
+ item.setAttribute("role", "menuitem");
100
+ item.dataset.text = item.textContent;
101
+ });
88
102
  }
89
103
  renderMenuLabel() {
90
104
  if (this.hasContent) {
91
- return (index.h("button", { class: "menu-label", "aria-expanded": this.open ? "true" : "false", "aria-label": this.open ? "Chiudi menù" : "Apri menù", onClick: this.toggle }, index.h("div", { class: "menu-label-content" }, index.h("slot", null), index.h("z-icon", { name: this.open ? "chevron-up" : "chevron-down" }))));
105
+ return (index.h("button", { class: "menu-label", "aria-expanded": this.open ? "true" : "false", "aria-label": this.open ? "Chiudi menù" : "Apri menù", onClick: this.toggle }, index.h("div", { class: "menu-label-content" }, index.h("slot", { onSlotchange: this.onLabelSlotChange }), index.h("z-icon", { name: this.open ? "chevron-up" : "chevron-down" }))));
92
106
  }
93
- return (index.h("div", { class: "menu-label" }, index.h("div", { class: "menu-label-content" }, index.h("slot", null))));
107
+ return (index.h("div", { class: "menu-label" }, index.h("div", { class: "menu-label-content" }, index.h("slot", { onSlotchange: this.onLabelSlotChange }))));
94
108
  }
95
109
  render() {
96
- return (index.h(index.Host, null, this.renderMenuLabel(), index.h("div", { class: "content", ref: (el) => {
97
- this.content = el;
98
- }, hidden: !this.open }, this.hasHeader && (index.h("header", { class: "header" }, index.h("slot", { name: "header", onSlotchange: this.checkContent }))), index.h("div", { class: "items", role: "menu" }, index.h("slot", { name: "item", onSlotchange: this.onItemsChange })))));
110
+ return (index.h(index.Host, null, this.renderMenuLabel(), this.hasContent && (index.h("div", { class: "content", ref: (el) => (this.content = el) }, this.hasHeader && (index.h("header", { class: "header" }, index.h("slot", { name: "header", onSlotchange: this.checkContent }))), index.h("div", { class: "items", role: "menu" }, index.h("slot", { name: "item", onSlotchange: this.onItemsChange }))))));
99
111
  }
100
112
  get hostElement() { return index.getElement(this); }
101
113
  static get watchers() { return {
@@ -19,6 +19,14 @@ const ZMyzCardFooter = class {
19
19
  }
20
20
  handleToggle() {
21
21
  this.isOpen = !this.isOpen;
22
+ if (this.isOpen) {
23
+ const firstElem = this.getFirstListItem();
24
+ if (firstElem) {
25
+ requestAnimationFrame(() => {
26
+ firstElem.focus();
27
+ });
28
+ }
29
+ }
22
30
  }
23
31
  getTitleAuthors() {
24
32
  return this.allowTooltipAuthors ? this.autori : "";
@@ -48,9 +56,13 @@ const ZMyzCardFooter = class {
48
56
  this.elementsEllipsis();
49
57
  }
50
58
  }
59
+ getFirstListItem() {
60
+ return this.host.querySelector("[slot=list] > li a");
61
+ }
51
62
  render() {
52
- return (index.h("div", { class: Object.assign(Object.assign({}, this.retrieveClass()), { wrapper: true }) }, index.h("footer", { class: this.retrieveClass(), onTransitionEnd: (e) => this.footerTransitionHandler(e) }, index.h("span", { class: "toggle" }, index.h("slot", { name: "toggle" })), this.titolo && index.h("p", { class: { "custom-content": this.customContent } }, this.titolo), index.h("div", { class: { "content": true, "custom-content": this.customContent } }, index.h("div", null, index.h("p", { class: "authors", ref: (el) => (this.ellipsisAuthors = el) }, index.h("span", { title: this.getTitleAuthors() }, index.h("span", { class: "bold" }, this.autori))), index.h("p", { class: "year-isbn" }, index.h("span", { class: "isbn" }, index.h("span", null, index.h("span", { class: "bold" }, this.isbn), " (ed. cartacea)")))), index.h("div", { class: `slot-handler ${this.isOpen ? "visible" : "hidden"}` }, index.h("slot", { name: "list" })))), this.customContent && index.h("slot", { name: "content" })));
63
+ return (index.h("div", { class: Object.assign(Object.assign({}, this.retrieveClass()), { wrapper: true }) }, index.h("footer", { class: this.retrieveClass(), onTransitionEnd: (e) => this.footerTransitionHandler(e) }, index.h("span", { class: "toggle" }, index.h("slot", { name: "toggle" })), this.titolo && index.h("p", { class: { "custom-content": this.customContent } }, this.titolo), index.h("div", { class: { "content": true, "custom-content": this.customContent } }, index.h("div", null, index.h("p", { class: "authors", ref: (el) => (this.ellipsisAuthors = el) }, index.h("span", { title: this.getTitleAuthors() }, index.h("span", { "aria-description": "Autori", class: "bold" }, this.autori))), index.h("p", { class: "year-isbn" }, index.h("span", { class: "isbn" }, index.h("span", null, index.h("span", { "aria-description": "ISBN edizione cartacea", class: "bold" }, this.isbn), " ", "(ed. cartacea)")))), index.h("div", { class: `slot-handler ${this.isOpen ? "visible" : "hidden"}` }, index.h("slot", { name: "list" })))), this.customContent && index.h("slot", { name: "content" })));
53
64
  }
65
+ get host() { return index.getElement(this); }
54
66
  };
55
67
  ZMyzCardFooter.style = stylesCss;
56
68
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e3299e0a.js');
6
6
 
7
- 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}";
7
+ 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}";
8
8
 
9
9
  const ZMyzCardIcon = class {
10
10
  constructor(hostRef) {
@@ -70,7 +70,7 @@ const ZMyzCardCover = class {
70
70
  };
71
71
  ZMyzCardCover.style = stylesCss$1;
72
72
 
73
- 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)}";
73
+ 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)}";
74
74
 
75
75
  const ZMyzCardHeader = class {
76
76
  constructor(hostRef) {
@@ -97,7 +97,7 @@ const ZMyzCardHeader = class {
97
97
  };
98
98
  }
99
99
  render() {
100
- return (index.h("header", { class: this.retrieveClass() }, index.h("span", { class: "card-title", ref: (el) => (this.ellipsis = el), title: this.getTitle() }, this.titolo), index.h("slot", { name: "icon" })));
100
+ return (index.h("header", { class: this.retrieveClass() }, index.h("slot", { name: "aria-heading" }), index.h("span", { class: "card-title", ref: (el) => (this.ellipsis = el), title: this.getTitle() }, this.titolo), index.h("slot", { name: "icon" })));
101
101
  }
102
102
  };
103
103
  ZMyzCardHeader.style = stylesCss;
@@ -0,0 +1,57 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-e3299e0a.js');
6
+ const index$1 = require('./index-7a9a8430.js');
7
+
8
+ 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}";
9
+
10
+ const ZOffcanvas = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.canvasOpenStatusChanged = index.createEvent(this, "canvasOpenStatusChanged", 7);
14
+ /**
15
+ * Offcanvas variant.
16
+ * Can be one of "overlay", "pushcontent"
17
+ * Default variant: pushcontent
18
+ */
19
+ this.variant = index$1.OffCanvasVariant.PUSHCONTENT;
20
+ /** open component. Default: false */
21
+ this.open = false;
22
+ /** open content transitioning in a specified direction left | right. Default: left */
23
+ this.transitiondirection = index$1.TransitionDirection.LEFT;
24
+ /** manages the skip for the entry animation*/
25
+ this.skipanimationonload = false;
26
+ }
27
+ /** this method allows you to skip the page loading animation, to be used with the prop set to true */
28
+ async setSkipAanimationOnLoad(value) {
29
+ this.skipanimationonload = value;
30
+ }
31
+ onOpenChanged() {
32
+ if (!this.open && this.skipanimationonload) {
33
+ this.skipanimationonload = false;
34
+ }
35
+ if (this.open) {
36
+ this.handleOverflowProperty();
37
+ }
38
+ this.canvasOpenStatusChanged.emit(this.open);
39
+ }
40
+ handleOverflowProperty() {
41
+ const overflow = this.variant === index$1.OffCanvasVariant.OVERLAY ? "overflow-y" : "overflow-x";
42
+ document.body.style[overflow] = this.open ? "hidden" : "";
43
+ }
44
+ handledTransitionEnd() {
45
+ this.handleOverflowProperty();
46
+ }
47
+ render() {
48
+ return (index.h(index.Host, { class: { "skip-animation": this.skipanimationonload } }, index.h("div", { role: "presentation", class: "canvas-container", onTransitionEnd: () => this.handledTransitionEnd() }, index.h("div", { role: "presentation", class: "canvas-content" }, index.h("slot", { name: "canvasContent" }))), this.variant == index$1.OffCanvasVariant.OVERLAY && (index.h("div", { class: "canvas-background", "data-action": "canvasBackground", onClick: () => (this.open = false) }))));
49
+ }
50
+ get hostElement() { return index.getElement(this); }
51
+ static get watchers() { return {
52
+ "open": ["onOpenChanged"]
53
+ }; }
54
+ };
55
+ ZOffcanvas.style = stylesCss;
56
+
57
+ exports.z_offcanvas = ZOffcanvas;
@@ -7,7 +7,7 @@ const index$1 = require('./index-7a9a8430.js');
7
7
  const utils = require('./utils-305151da.js');
8
8
  require('./breakpoints-88c4fd6c.js');
9
9
 
10
- 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)}}";
10
+ 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}";
11
11
 
12
12
  const ZSearchbar = class {
13
13
  constructor(hostRef) {
@@ -31,6 +31,12 @@ const ZSearchbar = class {
31
31
  this.sortResultsItems = false;
32
32
  /** Show submit button */
33
33
  this.showSearchButton = false;
34
+ /** Set button icon without label*/
35
+ this.searchButtonIconOnly = false;
36
+ /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
37
+ this.size = index$1.ControlSize.BIG;
38
+ /** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */
39
+ this.variant = index$1.ButtonVariant.PRIMARY;
34
40
  this.searchString = "";
35
41
  this.currResultsCount = 0;
36
42
  this.showResults = false;
@@ -143,13 +149,16 @@ const ZSearchbar = class {
143
149
  renderInput() {
144
150
  return (index.h("z-input", { ref: (val) => {
145
151
  this.inputRef = val;
146
- }, message: false, placeholder: this.placeholder, onStopTyping: (e) => this.handleStopTyping(e), onKeyUp: (e) => utils.handleEnterKeydSubmit(e, () => this.handleSubmit()), value: this.value }));
152
+ }, message: false, placeholder: this.placeholder, onStopTyping: (e) => this.handleStopTyping(e), onKeyUp: (e) => utils.handleEnterKeydSubmit(e, () => this.handleSubmit()), value: this.value, size: this.size }));
147
153
  }
148
154
  renderButton() {
149
155
  if (!this.showSearchButton) {
150
156
  return null;
151
157
  }
152
- return (index.h("z-button", { disabled: this.preventSubmit, variant: index$1.ButtonVariant.PRIMARY, onClick: () => this.handleSubmit() }, "CERCA"));
158
+ const iconProp = this.searchButtonIconOnly ? { icon: "search" } : null;
159
+ const buttonLabel = this.searchButtonIconOnly ? "" : "CERCA";
160
+ const defaultProps = Object.assign({ disabled: this.preventSubmit, variant: this.variant, size: this.size, onClick: () => this.handleSubmit() }, iconProp);
161
+ return index.h("z-button", Object.assign({}, defaultProps), buttonLabel);
153
162
  }
154
163
  renderResults() {
155
164
  if (!this.showResults ||
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e3299e0a.js');
6
6
 
7
- 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}}";
7
+ 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}}";
8
8
 
9
9
  const ZStepperItem = class {
10
10
  constructor(hostRef) {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e3299e0a.js');
6
6
 
7
- 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}";
7
+ 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}";
8
8
 
9
9
  const ZToggleButton = class {
10
10
  constructor(hostRef) {
@@ -14,6 +14,8 @@ const ZToggleButton = class {
14
14
  this.isdisabled = false;
15
15
  /** open by default (optional) */
16
16
  this.opened = false;
17
+ /** aria-label for the button */
18
+ this.ariaLabel = "";
17
19
  }
18
20
  emitToggleClick() {
19
21
  if (this.isdisabled) {
@@ -26,7 +28,7 @@ const ZToggleButton = class {
26
28
  return (index.h("button", { tabindex: this.avoidclick ? "-1" : "0", class: {
27
29
  "isopen": this.opened,
28
30
  "avoid-clicks": this.avoidclick,
29
- }, disabled: this.isdisabled, onClick: () => this.emitToggleClick() }, index.h("z-icon", { name: this.opened ? "chevron-down" : "chevron-up", width: 16, height: 16 }), this.label));
31
+ }, disabled: this.isdisabled, "aria-expanded": this.opened ? "true" : "false", "aria-label": this.ariaLabel, onClick: () => this.emitToggleClick() }, index.h("z-icon", { name: this.opened ? "chevron-down" : "chevron-up", width: 16, height: 16 }), this.label));
30
32
  }
31
33
  };
32
34
  ZToggleButton.style = stylesCss;
@@ -29,9 +29,9 @@
29
29
  "./components/navigation/tabs/z-navigation-tab/index.js",
30
30
  "./components/navigation/tabs/z-navigation-tab-link/index.js",
31
31
  "./components/navigation/tabs/z-navigation-tabs/index.js",
32
- "./components/navigation/z-menu/index.js",
33
32
  "./components/navigation/z-app-header/index.js",
34
33
  "./components/navigation/z-link/index.js",
34
+ "./components/navigation/z-menu/index.js",
35
35
  "./components/navigation/z-menu-section/index.js",
36
36
  "./components/notification/z-info-box/index.js",
37
37
  "./components/notification/z-notification/index.js",
@@ -115,7 +115,7 @@ export class ZButtonSort {
115
115
  "optional": true,
116
116
  "docs": {
117
117
  "tags": [],
118
- "text": "occurrencies counter (optional)"
118
+ "text": "occurrences counter (optional)"
119
119
  },
120
120
  "attribute": "counter",
121
121
  "reflect": false
@@ -208,7 +208,7 @@ export class ZButtonSort {
208
208
  "composed": true,
209
209
  "docs": {
210
210
  "tags": [],
211
- "text": "sorting direction click event, returns buttonid and sortAsc"
211
+ "text": "sorting direction click event, returns `buttonid` and `sortAsc`"
212
212
  },
213
213
  "complexType": {
214
214
  "original": "any",
@@ -27,7 +27,7 @@ button:hover {
27
27
 
28
28
  button:focus {
29
29
  border-color: var(--myz-blue);
30
- box-shadow: 0 0 2px 2px var(--accent-dark);
30
+ box-shadow: var(--shadow-focus-primary);
31
31
  color: var(--myz-blue);
32
32
  fill: var(--myz-blue);
33
33
  }
@@ -1,12 +1,14 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { Device, ZChipType } from "../../../beans";
3
- import { getDevice, handleKeyboardSubmit } from "../../../utils/utils";
3
+ import { getDevice } from "../../../utils/utils";
4
4
  export class ZChip {
5
5
  constructor() {
6
6
  /** z-chip size type, can be default, medium or small */
7
7
  this.type = ZChipType.DEFAULT;
8
8
  /** set z-chip as disabled */
9
9
  this.disabled = false;
10
+ /** z-chip aria-label string */
11
+ this.ariaLabel = "";
10
12
  }
11
13
  emitinteractiveIconClick() {
12
14
  this.interactiveIconClick.emit();
@@ -16,9 +18,11 @@ export class ZChip {
16
18
  }
17
19
  render() {
18
20
  if (this.interactiveIcon) {
19
- return (h("button", { class: this.type, disabled: this.disabled, tabindex: "0", type: "button" }, this.icon && (h("z-icon", { class: "icon-sx", name: this.icon, width: this.getIconSize(), height: this.getIconSize() })), h("slot", null), h("z-icon", { tabIndex: this.disabled ? -1 : 0, onClick: () => this.emitinteractiveIconClick(), onKeyUp: (e) => handleKeyboardSubmit(e, this.emitinteractiveIconClick.bind(this)), name: this.interactiveIcon, width: this.getIconSize(), height: this.getIconSize() })));
21
+ return (h("div", { class: `z-chip-container ${this.type}`, "aria-disabled": this.disabled }, this.icon && (h("z-icon", { class: "icon-sx", name: this.icon, width: this.getIconSize(), height: this.getIconSize() })), h("slot", null), h("button", { type: "button", onClick: () => this.emitinteractiveIconClick(), onKeyUp: () => {
22
+ () => this.emitinteractiveIconClick();
23
+ }, "aria-label": this.ariaLabel, disabled: this.disabled }, h("z-icon", { name: this.interactiveIcon, width: this.getIconSize(), height: this.getIconSize() }))));
20
24
  }
21
- return (h("div", { class: `${this.type}`, tabindex: "0" }, this.icon && (h("z-icon", { name: this.icon, width: this.getIconSize(), height: this.getIconSize() })), h("slot", null)));
25
+ return (h("div", { class: `${this.type}` }, this.icon && (h("z-icon", { name: this.icon, width: this.getIconSize(), height: this.getIconSize() })), h("slot", null)));
22
26
  }
23
27
  static get is() { return "z-chip"; }
24
28
  static get encapsulation() { return "scoped"; }
@@ -108,6 +112,24 @@ export class ZChip {
108
112
  "attribute": "disabled",
109
113
  "reflect": true,
110
114
  "defaultValue": "false"
115
+ },
116
+ "ariaLabel": {
117
+ "type": "string",
118
+ "mutable": false,
119
+ "complexType": {
120
+ "original": "string",
121
+ "resolved": "string",
122
+ "references": {}
123
+ },
124
+ "required": false,
125
+ "optional": false,
126
+ "docs": {
127
+ "tags": [],
128
+ "text": "z-chip aria-label string"
129
+ },
130
+ "attribute": "aria-label",
131
+ "reflect": false,
132
+ "defaultValue": "\"\""
111
133
  }
112
134
  };
113
135
  }