@zanichelli/albe-web-components 7.1.3 → 7.2.0-offcanvas-RC1

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 (181) hide show
  1. package/CHANGELOG.md +22 -14
  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-button-sort.cjs.entry.js +1 -1
  5. package/dist/cjs/z-card.cjs.entry.js +1 -1
  6. package/dist/cjs/z-chip.cjs.entry.js +3 -6
  7. package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -13
  8. package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
  9. package/dist/cjs/z-myz-card_4.cjs.entry.js +2 -2
  10. package/dist/cjs/z-offcanvas.cjs.entry.js +14 -31
  11. package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
  12. package/dist/cjs/z-toggle-button.cjs.entry.js +2 -4
  13. package/dist/collection/components/buttons/z-button-sort/index.js +2 -2
  14. package/dist/collection/components/buttons/z-button-sort/styles.css +1 -1
  15. package/dist/collection/components/buttons/z-chip/index.js +3 -25
  16. package/dist/collection/components/buttons/z-chip/styles.css +21 -28
  17. package/dist/collection/components/buttons/z-toggle-button/index.js +1 -21
  18. package/dist/collection/components/buttons/z-toggle-button/styles.css +3 -1
  19. package/dist/collection/components/indicators/z-stepper-item/styles.css +1 -1
  20. package/dist/collection/components/notification/z-toast-notification/index.js +1 -1
  21. package/dist/collection/components/z-card/index.js +0 -9
  22. package/dist/collection/components/z-card/styles.css +1 -1
  23. package/dist/collection/components/z-offcanvas/index.js +31 -30
  24. package/dist/collection/components/z-offcanvas/styles.css +78 -87
  25. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -13
  26. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
  27. package/dist/collection/snowflakes/myz/card/z-myz-card-header/styles.css +0 -12
  28. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/styles.css +1 -1
  29. package/dist/collection/utils/storybook-utils.js +1 -1
  30. package/dist/esm/loader.js +1 -1
  31. package/dist/esm/polyfills/css-shim.js +0 -0
  32. package/dist/esm/web-components-library.js +1 -1
  33. package/dist/esm/z-button-sort.entry.js +1 -1
  34. package/dist/esm/z-card.entry.js +1 -1
  35. package/dist/esm/z-chip.entry.js +4 -7
  36. package/dist/esm/z-myz-card-footer.entry.js +2 -14
  37. package/dist/esm/z-myz-card-icon.entry.js +1 -1
  38. package/dist/esm/z-myz-card_4.entry.js +2 -2
  39. package/dist/esm/z-offcanvas.entry.js +14 -31
  40. package/dist/esm/z-stepper-item.entry.js +1 -1
  41. package/dist/esm/z-toggle-button.entry.js +2 -4
  42. package/dist/types/beans/index.d.ts +0 -0
  43. package/dist/types/components/buttons/z-button/index.d.ts +0 -0
  44. package/dist/types/components/buttons/z-button-sort/index.d.ts +2 -2
  45. package/dist/types/components/buttons/z-chip/index.d.ts +0 -2
  46. package/dist/types/components/buttons/z-toggle-button/index.d.ts +0 -2
  47. package/dist/types/components/buttons/z-toggle-switch/index.d.ts +0 -0
  48. package/dist/types/components/date-picker/utils.d.ts +0 -0
  49. package/dist/types/components/date-picker/z-date-picker/index.d.ts +0 -0
  50. package/dist/types/components/date-picker/z-range-picker/index.d.ts +0 -0
  51. package/dist/types/components/file-upload/z-dragdrop-area/index.d.ts +0 -0
  52. package/dist/types/components/file-upload/z-file/index.d.ts +0 -0
  53. package/dist/types/components/file-upload/z-file-upload/index.d.ts +0 -0
  54. package/dist/types/components/icons/icons.d.ts +0 -0
  55. package/dist/types/components/icons/z-icon/index.d.ts +0 -0
  56. package/dist/types/components/index.d.ts +0 -0
  57. package/dist/types/components/indicators/z-stepper/index.d.ts +0 -0
  58. package/dist/types/components/indicators/z-stepper-item/index.d.ts +0 -0
  59. package/dist/types/components/inputs/z-combobox/index.d.ts +0 -0
  60. package/dist/types/components/inputs/z-input/index.d.ts +0 -0
  61. package/dist/types/components/inputs/z-input-message/index.d.ts +0 -0
  62. package/dist/types/components/inputs/z-searchbar/index.d.ts +0 -0
  63. package/dist/types/components/inputs/z-select/index.d.ts +0 -0
  64. package/dist/types/components/list/z-list/index.d.ts +0 -0
  65. package/dist/types/components/list/z-list-element/index.d.ts +0 -0
  66. package/dist/types/components/list/z-list-group/index.d.ts +0 -0
  67. package/dist/types/components/list/z-toast-notification-list/index.d.ts +0 -0
  68. package/dist/types/components/logo/z-logo/index.d.ts +0 -0
  69. package/dist/types/components/modal/z-modal/index.d.ts +0 -0
  70. package/dist/types/components/navigation/tabs/z-navigation-tab/index.d.ts +0 -0
  71. package/dist/types/components/navigation/tabs/z-navigation-tab-link/index.d.ts +0 -0
  72. package/dist/types/components/navigation/tabs/z-navigation-tabs/index.d.ts +0 -0
  73. package/dist/types/components/navigation/z-app-header/index.d.ts +0 -0
  74. package/dist/types/components/navigation/z-link/index.d.ts +0 -0
  75. package/dist/types/components/navigation/z-menu/index.d.ts +0 -0
  76. package/dist/types/components/navigation/z-menu-section/index.d.ts +0 -0
  77. package/dist/types/components/notification/z-info-box/index.d.ts +0 -0
  78. package/dist/types/components/notification/z-notification/index.d.ts +0 -0
  79. package/dist/types/components/notification/z-toast-notification/index.d.ts +1 -1
  80. package/dist/types/components/notification/z-tooltip/index.d.ts +0 -0
  81. package/dist/types/components/panel/z-panel-elem/index.d.ts +0 -0
  82. package/dist/types/components/z-anchor-navigation/index.d.ts +0 -0
  83. package/dist/types/components/z-aria-alert/index.d.ts +0 -0
  84. package/dist/types/components/z-avatar/index.d.ts +0 -0
  85. package/dist/types/components/z-card/index.d.ts +0 -9
  86. package/dist/types/components/z-carousel/index.d.ts +0 -0
  87. package/dist/types/components/z-contextual-menu/index.d.ts +0 -0
  88. package/dist/types/components/z-cover-hero/index.d.ts +0 -0
  89. package/dist/types/components/z-divider/index.d.ts +0 -0
  90. package/dist/types/components/z-ghost-loading/index.d.ts +0 -0
  91. package/dist/types/components/z-info-reveal/index.d.ts +0 -0
  92. package/dist/types/components/z-offcanvas/index.d.ts +4 -4
  93. package/dist/types/components/z-pagination/index.d.ts +0 -0
  94. package/dist/types/components/z-popover/index.d.ts +0 -0
  95. package/dist/types/components/z-section-title/index.d.ts +0 -0
  96. package/dist/types/components/z-skip-to-content/index.d.ts +0 -0
  97. package/dist/types/components/z-table/z-table/index.d.ts +0 -0
  98. package/dist/types/components/z-table/z-table-body/index.d.ts +0 -0
  99. package/dist/types/components/z-table/z-table-cell/index.d.ts +0 -0
  100. package/dist/types/components/z-table/z-table-empty-box/index.d.ts +0 -0
  101. package/dist/types/components/z-table/z-table-expanded-row/index.d.ts +0 -0
  102. package/dist/types/components/z-table/z-table-footer/index.d.ts +0 -0
  103. package/dist/types/components/z-table/z-table-head/index.d.ts +0 -0
  104. package/dist/types/components/z-table/z-table-header/index.d.ts +0 -0
  105. package/dist/types/components/z-table/z-table-header-row/index.d.ts +0 -0
  106. package/dist/types/components/z-table/z-table-row/index.d.ts +0 -0
  107. package/dist/types/components/z-table/z-table-sticky-footer/index.d.ts +0 -0
  108. package/dist/types/components/z-tag/index.d.ts +0 -0
  109. package/dist/types/components/z-visually-hidden/index.d.ts +0 -0
  110. package/dist/types/components.d.ts +13 -21
  111. package/dist/types/constants/breakpoints.d.ts +0 -0
  112. package/dist/types/constants/icons.d.ts +0 -0
  113. package/dist/types/index.d.ts +0 -0
  114. package/dist/types/snowflakes/myz/card/z-myz-card/index.d.ts +0 -0
  115. package/dist/types/snowflakes/myz/card/z-myz-card-alert/index.d.ts +0 -0
  116. package/dist/types/snowflakes/myz/card/z-myz-card-body/index.d.ts +0 -0
  117. package/dist/types/snowflakes/myz/card/z-myz-card-cover/index.d.ts +0 -0
  118. package/dist/types/snowflakes/myz/card/z-myz-card-dictionary/index.d.ts +0 -0
  119. package/dist/types/snowflakes/myz/card/z-myz-card-footer/index.d.ts +0 -2
  120. package/dist/types/snowflakes/myz/card/z-myz-card-footer-sections/index.d.ts +0 -0
  121. package/dist/types/snowflakes/myz/card/z-myz-card-header/index.d.ts +0 -0
  122. package/dist/types/snowflakes/myz/card/z-myz-card-icon/index.d.ts +0 -0
  123. package/dist/types/snowflakes/myz/card/z-myz-card-info/index.d.ts +0 -0
  124. package/dist/types/snowflakes/myz/card/z-myz-card-list/index.d.ts +0 -0
  125. package/dist/types/snowflakes/myz/list/z-myz-list/index.d.ts +0 -0
  126. package/dist/types/snowflakes/myz/list/z-myz-list-item/index.d.ts +0 -0
  127. package/dist/types/snowflakes/myz/pocket/z-messages-pocket/index.d.ts +0 -0
  128. package/dist/types/snowflakes/myz/pocket/z-pocket/index.d.ts +0 -0
  129. package/dist/types/snowflakes/myz/pocket/z-pocket-body/index.d.ts +0 -0
  130. package/dist/types/snowflakes/myz/pocket/z-pocket-header/index.d.ts +0 -0
  131. package/dist/types/snowflakes/myz/pocket/z-pocket-message/index.d.ts +0 -0
  132. package/dist/types/snowflakes/myz/z-alert/index.d.ts +0 -0
  133. package/dist/types/snowflakes/myz/z-otp/index.d.ts +0 -0
  134. package/dist/types/snowflakes/myz/z-slideshow/index.d.ts +0 -0
  135. package/dist/types/stencil-public-runtime.d.ts +0 -0
  136. package/dist/types/utils/utils.d.ts +0 -0
  137. package/dist/web-components-library/index.esm.js +0 -0
  138. package/dist/web-components-library/{p-f5a99b28.entry.js → p-05ced71c.entry.js} +1 -1
  139. package/dist/web-components-library/p-19ca449e.entry.js +1 -0
  140. package/dist/web-components-library/p-3a9cc467.entry.js +1 -0
  141. package/{www/build/p-10adc1fa.entry.js → dist/web-components-library/p-417b1b6c.entry.js} +1 -1
  142. package/dist/web-components-library/{p-9db2bf11.entry.js → p-810bd730.entry.js} +1 -1
  143. package/dist/web-components-library/p-9d03a7d6.entry.js +1 -0
  144. package/dist/web-components-library/p-b53d81b5.entry.js +1 -0
  145. package/dist/web-components-library/{p-f9f42d17.entry.js → p-c081e1f4.entry.js} +1 -1
  146. package/{www/build/p-6736e894.entry.js → dist/web-components-library/p-ede9fbf5.entry.js} +1 -1
  147. package/dist/web-components-library/web-components-library.css +1 -2
  148. package/dist/web-components-library/web-components-library.esm.js +1 -1
  149. package/loader/cdn.js +0 -0
  150. package/loader/index.cjs.js +0 -0
  151. package/loader/index.d.ts +0 -0
  152. package/loader/index.es2017.js +0 -0
  153. package/loader/index.js +0 -0
  154. package/loader/package.json +0 -0
  155. package/package.json +3 -2
  156. package/readme.md +1 -0
  157. package/www/build/index.esm.js +0 -0
  158. package/www/build/{p-f5a99b28.entry.js → p-05ced71c.entry.js} +1 -1
  159. package/www/build/p-19ca449e.entry.js +1 -0
  160. package/www/build/p-3a9cc467.entry.js +1 -0
  161. package/{dist/web-components-library/p-10adc1fa.entry.js → www/build/p-417b1b6c.entry.js} +1 -1
  162. package/www/build/{p-9db2bf11.entry.js → p-810bd730.entry.js} +1 -1
  163. package/www/build/p-9d03a7d6.entry.js +1 -0
  164. package/www/build/{p-f39bb490.css → p-ab4e13f7.css} +1 -2
  165. package/www/build/p-b53d81b5.entry.js +1 -0
  166. package/www/build/{p-f9f42d17.entry.js → p-c081e1f4.entry.js} +1 -1
  167. package/{dist/web-components-library/p-6736e894.entry.js → www/build/p-ede9fbf5.entry.js} +1 -1
  168. package/www/build/{p-fcacd67c.js → p-fed5c553.js} +1 -1
  169. package/www/build/web-components-library.css +1 -2
  170. package/www/build/web-components-library.esm.js +1 -1
  171. package/www/build/web-components-library.js +0 -0
  172. package/www/host.config.json +0 -0
  173. package/www/index.html +1 -1
  174. package/dist/web-components-library/p-068951a7.entry.js +0 -1
  175. package/dist/web-components-library/p-06b7dad4.entry.js +0 -1
  176. package/dist/web-components-library/p-8d134dc4.entry.js +0 -1
  177. package/dist/web-components-library/p-c722c5a4.entry.js +0 -1
  178. package/www/build/p-068951a7.entry.js +0 -1
  179. package/www/build/p-06b7dad4.entry.js +0 -1
  180. package/www/build/p-8d134dc4.entry.js +0 -1
  181. package/www/build/p-c722c5a4.entry.js +0 -1
@@ -27,7 +27,7 @@ button:hover {
27
27
 
28
28
  button:focus {
29
29
  border-color: var(--myz-blue);
30
- box-shadow: var(--shadow-focus-primary);
30
+ box-shadow: 0 0 2px 2px var(--accent-dark);
31
31
  color: var(--myz-blue);
32
32
  fill: var(--myz-blue);
33
33
  }
@@ -1,14 +1,12 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { Device, ZChipType } from "../../../beans";
3
- import { getDevice } from "../../../utils/utils";
3
+ import { getDevice, handleKeyboardSubmit } 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 = "";
12
10
  }
13
11
  emitinteractiveIconClick() {
14
12
  this.interactiveIconClick.emit();
@@ -18,11 +16,9 @@ export class ZChip {
18
16
  }
19
17
  render() {
20
18
  if (this.interactiveIcon) {
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() }))));
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() })));
24
20
  }
25
- return (h("div", { class: `${this.type}` }, this.icon && (h("z-icon", { name: this.icon, width: this.getIconSize(), height: this.getIconSize() })), h("slot", null)));
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)));
26
22
  }
27
23
  static get is() { return "z-chip"; }
28
24
  static get encapsulation() { return "scoped"; }
@@ -112,24 +108,6 @@ export class ZChip {
112
108
  "attribute": "disabled",
113
109
  "reflect": true,
114
110
  "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": "\"\""
133
111
  }
134
112
  };
135
113
  }
@@ -1,4 +1,4 @@
1
- :host > .z-chip-container {
1
+ :host > button {
2
2
  display: inline-flex;
3
3
  align-items: center;
4
4
  padding: 0 calc(var(--space-unit) * 1.5);
@@ -12,53 +12,46 @@
12
12
  font-weight: var(--font-sb);
13
13
  }
14
14
 
15
- :host > .z-chip-container:not([aria-disabled]) button > z-icon:last-child:hover {
15
+ :host > button:not(:disabled) > z-icon:last-child:hover {
16
16
  color: var(--color-hover-primary);
17
17
  fill: var(--color-hover-primary);
18
18
  }
19
19
 
20
- :host > .z-chip-container:hover:not([aria-disabled]) > z-icon:first-child {
20
+ :host > button:hover:not(:disabled) > z-icon:first-child {
21
21
  fill: var(--color-icon02);
22
22
  }
23
23
 
24
- :host > .z-chip-container > button {
25
- padding: 0;
26
- border: none;
27
- margin-left: var(--space-unit);
28
- background-color: transparent;
29
- cursor: pointer;
30
- }
31
-
32
- :host > .z-chip-container > z-icon.icon-sx {
24
+ :host > button > z-icon.icon-sx {
33
25
  margin-right: calc(var(--space-unit) / 2);
34
26
  }
35
27
 
36
- :host > .z-chip-container > button > z-icon:last-child {
28
+ :host > button > z-icon:last-child {
29
+ margin-left: var(--space-unit);
30
+ cursor: pointer;
37
31
  fill: var(--color-primary01);
38
32
  }
39
33
 
40
- :host > .z-chip-container[aria-disabled],
41
- :host > .z-chip-container[aria-disabled] > z-icon,
42
- :host > .z-chip-container[aria-disabled] > button > z-icon {
34
+ :host > button:disabled,
35
+ :host > button:disabled > z-icon {
43
36
  color: var(--color-disabled03);
44
37
  fill: var(--color-disabled03);
45
38
  }
46
39
 
47
- :host > .z-chip-container[aria-disabled] > button > z-icon {
40
+ :host > button:disabled > z-icon {
48
41
  cursor: auto;
49
42
  }
50
43
 
51
- :host > .z-chip-container[aria-disabled] {
44
+ :host > button:disabled {
52
45
  border: var(--border-size-small) solid var(--color-disabled01);
53
46
  }
54
47
 
55
- :host > .z-chip-container > button:focus:focus-visible {
56
- border-radius: 100%;
48
+ :host > button:focus:focus-visible,
49
+ :host > div:focus:focus-visible {
57
50
  box-shadow: var(--shadow-focus-primary);
58
51
  outline: none;
59
52
  }
60
53
 
61
- :host > button:hover:not(:disabled):active:hover > button > z-icon:last-child {
54
+ :host > button:hover:not(:disabled):active:hover > z-icon:last-child {
62
55
  color: var(--color-primary01);
63
56
  fill: var(--color-primary01);
64
57
  }
@@ -83,21 +76,21 @@
83
76
  }
84
77
 
85
78
  /* :host type */
86
- :host > .z-chip-container.default,
79
+ :host > button.default,
87
80
  :host > div.default {
88
81
  min-height: 44px;
89
82
  border-radius: 22px;
90
83
  line-height: 44px;
91
84
  }
92
85
 
93
- :host > .z-chip-container.medium,
86
+ :host > button.medium,
94
87
  :host > div.medium {
95
88
  min-height: 40px;
96
89
  border-radius: 22px;
97
90
  line-height: 40px;
98
91
  }
99
92
 
100
- :host > .z-chip-container.small,
93
+ :host > button.small,
101
94
  :host > div.small {
102
95
  min-height: 36px;
103
96
  border-radius: 22px;
@@ -106,7 +99,7 @@
106
99
 
107
100
  /* Desktop breakpoint */
108
101
  @media only screen and (min-width: 1152px) {
109
- :host > .z-chip-container {
102
+ :host > button {
110
103
  font-size: 12px;
111
104
  }
112
105
 
@@ -115,21 +108,21 @@
115
108
  }
116
109
 
117
110
  /* :host type */
118
- :host > .z-chip-container.default,
111
+ :host > button.default,
119
112
  :host > div.default {
120
113
  min-height: 32px;
121
114
  border-radius: 16px;
122
115
  line-height: 32px;
123
116
  }
124
117
 
125
- :host > .z-chip-container.medium,
118
+ :host > button.medium,
126
119
  :host > div.medium {
127
120
  min-height: 28px;
128
121
  border-radius: 16px;
129
122
  line-height: 28px;
130
123
  }
131
124
 
132
- :host > .z-chip-container.small,
125
+ :host > button.small,
133
126
  :host > div.small {
134
127
  min-height: 24px;
135
128
  border-radius: 16px;
@@ -5,8 +5,6 @@ export class ZToggleButton {
5
5
  this.isdisabled = false;
6
6
  /** open by default (optional) */
7
7
  this.opened = false;
8
- /** aria-label for the button */
9
- this.ariaLabel = "";
10
8
  }
11
9
  emitToggleClick() {
12
10
  if (this.isdisabled) {
@@ -19,7 +17,7 @@ export class ZToggleButton {
19
17
  return (h("button", { tabindex: this.avoidclick ? "-1" : "0", class: {
20
18
  "isopen": this.opened,
21
19
  "avoid-clicks": this.avoidclick,
22
- }, 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));
20
+ }, disabled: this.isdisabled, onClick: () => this.emitToggleClick() }, h("z-icon", { name: this.opened ? "chevron-down" : "chevron-up", width: 16, height: 16 }), this.label));
23
21
  }
24
22
  static get is() { return "z-toggle-button"; }
25
23
  static get encapsulation() { return "shadow"; }
@@ -104,24 +102,6 @@ export class ZToggleButton {
104
102
  "attribute": "opened",
105
103
  "reflect": false,
106
104
  "defaultValue": "false"
107
- },
108
- "ariaLabel": {
109
- "type": "string",
110
- "mutable": false,
111
- "complexType": {
112
- "original": "string",
113
- "resolved": "string",
114
- "references": {}
115
- },
116
- "required": false,
117
- "optional": false,
118
- "docs": {
119
- "tags": [],
120
- "text": "aria-label for the button"
121
- },
122
- "attribute": "aria-label",
123
- "reflect": false,
124
- "defaultValue": "\"\""
125
105
  }
126
106
  };
127
107
  }
@@ -15,6 +15,7 @@ button {
15
15
  font-weight: var(--font-sb);
16
16
  outline: none;
17
17
  text-transform: uppercase;
18
+ transition: all 200ms linear;
18
19
  }
19
20
 
20
21
  button::-moz-focus-inner {
@@ -27,7 +28,8 @@ button:hover {
27
28
  }
28
29
 
29
30
  button:focus {
30
- box-shadow: var(--shadow-focus-primary);
31
+ border-color: var(--myz-blue);
32
+ box-shadow: 0 0 2px 2px var(--accent-dark);
31
33
  color: var(--myz-blue);
32
34
  fill: var(--myz-blue);
33
35
  }
@@ -78,7 +78,7 @@
78
78
  }
79
79
 
80
80
  :host(:not([disabled]):focus-within) .indicator {
81
- box-shadow: var(--shadow-focus-primary);
81
+ box-shadow: 0 0 2px 2px var(--accent-dark);
82
82
  }
83
83
 
84
84
  :host([disabled]) .indicator {
@@ -295,7 +295,7 @@ export class ZToastNotification {
295
295
  "optional": true,
296
296
  "docs": {
297
297
  "tags": [],
298
- "text": "toast notification type: dark, light, accent, error, success, warning"
298
+ "text": "toast notification type: dark, light, accent, error, success, warning"
299
299
  },
300
300
  "attribute": "type",
301
301
  "reflect": false
@@ -1,14 +1,5 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { CardVariant } from "../../beans";
3
- /**
4
- * ZCard component.
5
- * @cssprop --aspect-ratio - Cover aspect ratio. Default: `1.62`
6
- * @cssprop --z-card--border-color - Default: `var(--gray200)`
7
- * @cssprop --z-card--color-cover-background - Cover color. Default: `var(--color-surface01)`
8
- * @cssprop --z-card--text-background - Background color for the `text` variant. Default: `var(--color-surface01)`
9
- * @cssprop --z-card--text-border-radius - Default: `none`
10
- * @cssprop --z-card--text-border - Configure CSS `border`. Default: `none`
11
- */
12
3
  export class ZCard {
13
4
  constructor() {
14
5
  /** Enable click interactions on the card. Default: false */
@@ -183,7 +183,7 @@ Unfortunately the `aspect-ratio` property is still experimental */
183
183
 
184
184
  :host([variant="shadow"][clickable]:focus:focus-visible),
185
185
  :host([clickable][showshadow]:focus:focus-visible) {
186
- box-shadow: var(--shadow-focus-primary);
186
+ box-shadow: var(--shadow-4);
187
187
  }
188
188
 
189
189
  :host([variant="shadow"][clickable]:active),
@@ -13,46 +13,29 @@ export class ZOffcanvas {
13
13
  this.variant = OffCanvasVariant.PUSHCONTENT;
14
14
  /** open component. Default: false */
15
15
  this.open = false;
16
+ /** allows you to skip the entry animation on page load, to be used with the open prop at true */
17
+ this.skipanimationonload = false;
16
18
  /** open content transitioning in a specified direction left | right. Default: left */
17
19
  this.transitiondirection = TransitionDirection.LEFT;
18
20
  }
19
- componentWillLoad() {
20
- this.handleOpenStatus();
21
- }
22
21
  onOpenChanged() {
23
- this.handleOpenStatus();
24
- this.canvasOpenStatusChanged.emit(this.open);
25
- }
26
- handleOpenStatus() {
27
- if (this.open) {
28
- this.hostElement.style.opacity = "0";
29
- this.hostElement.style.display = "flex";
30
- if (this.variant === OffCanvasVariant.OVERLAY) {
31
- document.body.style.overflowY = "hidden";
32
- }
22
+ if (!this.open && this.skipanimationonload) {
23
+ this.skipanimationonload = false;
33
24
  }
34
- else if (this.variant === OffCanvasVariant.PUSHCONTENT) {
35
- this.hostElement.style.display = "none";
36
- document.body.style.overflowX = "hidden";
25
+ if (this.open) {
26
+ this.handleOverflowProperty();
37
27
  }
28
+ this.canvasOpenStatusChanged.emit(this.open);
38
29
  }
39
- handleAnimationEnd() {
40
- if (this.hostElement.hasAttribute("open")) {
41
- this.hostElement.querySelector(`.canvas-content`).focus();
42
- }
43
- else if (this.variant === OffCanvasVariant.OVERLAY) {
44
- this.hostElement.style.display = "none";
45
- document.body.style.overflowX = "initial";
46
- document.body.style.overflowY = "initial";
47
- }
30
+ handleOverflowProperty() {
31
+ const overflow = this.variant === OffCanvasVariant.OVERLAY ? "overflow-y" : "overflow-x";
32
+ document.body.style[overflow] = this.open ? "hidden" : "";
48
33
  }
49
- handleAnimationStart() {
50
- if (this.hostElement.hasAttribute("open")) {
51
- this.hostElement.style.opacity = "1";
52
- }
34
+ handledTransitionEnd() {
35
+ this.handleOverflowProperty();
53
36
  }
54
37
  render() {
55
- return (h(Host, null, h("div", { class: "canvas-container", onAnimationEnd: () => this.handleAnimationEnd(), onAnimationStart: () => this.handleAnimationStart() }, h("div", { class: "canvas-content" }, h("slot", { name: "canvasContent" }))), h("div", { class: "canvas-background", "data-action": "canvasBackground", onClick: () => (this.open = false) })));
38
+ 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) }))));
56
39
  }
57
40
  static get is() { return "z-offcanvas"; }
58
41
  static get encapsulation() { return "scoped"; }
@@ -109,6 +92,24 @@ export class ZOffcanvas {
109
92
  "reflect": true,
110
93
  "defaultValue": "false"
111
94
  },
95
+ "skipanimationonload": {
96
+ "type": "boolean",
97
+ "mutable": true,
98
+ "complexType": {
99
+ "original": "boolean",
100
+ "resolved": "boolean",
101
+ "references": {}
102
+ },
103
+ "required": false,
104
+ "optional": false,
105
+ "docs": {
106
+ "tags": [],
107
+ "text": "allows you to skip the entry animation on page load, to be used with the open prop at true"
108
+ },
109
+ "attribute": "skipanimationonload",
110
+ "reflect": false,
111
+ "defaultValue": "false"
112
+ },
112
113
  "transitiondirection": {
113
114
  "type": "string",
114
115
  "mutable": false,
@@ -2,12 +2,11 @@
2
2
  --z-offcanvas--container-width: 375px;
3
3
  --z-offcanvas--top-space: 0;
4
4
 
5
- display: none;
6
5
  min-width: 100%;
7
6
  height: 100%;
8
- justify-content: end;
9
7
  font-family: var(--font-family-sans);
10
8
  font-weight: var(--font-rg);
9
+ visibility: hidden;
11
10
  }
12
11
 
13
12
  .canvas-container {
@@ -18,41 +17,15 @@
18
17
  height: 100%;
19
18
  flex-direction: column;
20
19
  background: var(--color-surface01);
21
- transform: translateX(100%);
22
- }
23
-
24
- @keyframes enter-right {
25
- from {
26
- transform: translateX(100%);
27
- }
28
-
29
- to {
30
- transform: translateX(0);
31
- }
32
20
  }
33
21
 
34
- :host([open]) > .canvas-container {
35
- animation-duration: 0.4s;
36
- animation-name: enter-right;
37
- animation-timing-function: ease-out;
38
- transform: translateX(0);
39
- }
40
-
41
- @keyframes exit-right {
42
- from {
43
- transform: translateX(0);
44
- }
45
-
46
- to {
47
- transform: translateX(100%);
48
- }
22
+ :host([variant="pushcontent"]) {
23
+ display: none;
49
24
  }
50
25
 
51
- :host(:not([open])[variant="overlay"]) > .canvas-container {
52
- animation-duration: 0.4s;
53
- animation-name: exit-right;
54
- animation-timing-function: ease-out;
55
- transform: translateX(100%);
26
+ :host([open]) {
27
+ display: flex;
28
+ visibility: visible;
56
29
  }
57
30
 
58
31
  :host([variant="overlay"]) {
@@ -62,9 +35,14 @@
62
35
  right: 0;
63
36
  bottom: 0;
64
37
  left: 0;
38
+ display: flex;
65
39
  height: calc(100% - var(--z-offcanvas--top-space));
66
40
  }
67
41
 
42
+ :host([variant="overlay"][transitiondirection="left"]) {
43
+ justify-content: end;
44
+ }
45
+
68
46
  :host([variant="overlay"]) > .canvas-container {
69
47
  z-index: 1010;
70
48
  }
@@ -78,48 +56,6 @@
78
56
  opacity: 0.7;
79
57
  }
80
58
 
81
- :host([transitiondirection="right"]) {
82
- justify-content: start;
83
- }
84
-
85
- :host([transitiondirection="right"]) > .canvas-container {
86
- transform: translateX(-100%);
87
- }
88
-
89
- @keyframes enter-left {
90
- from {
91
- transform: translateX(-100%);
92
- }
93
-
94
- to {
95
- transform: translateX(0);
96
- }
97
- }
98
-
99
- :host([transitiondirection="right"][open]) > .canvas-container {
100
- animation-duration: 0.4s;
101
- animation-name: enter-left;
102
- animation-timing-function: ease-out;
103
- transform: translateX(0);
104
- }
105
-
106
- @keyframes exit-left {
107
- from {
108
- transform: translateX(0);
109
- }
110
-
111
- to {
112
- transform: translateX(-100%);
113
- }
114
- }
115
-
116
- :host(:not([open])[variant="overlay"][transitiondirection="right"]) > .canvas-container {
117
- animation-duration: 0.4s;
118
- animation-name: exit-left;
119
- animation-timing-function: ease-out;
120
- transform: translateX(-100%);
121
- }
122
-
123
59
  .canvas-container > .canvas-content {
124
60
  overflow: auto;
125
61
  flex: 1 auto;
@@ -133,6 +69,7 @@
133
69
  margin: calc(var(--space-unit) * 2) calc(var(--space-unit) / 2) 0 0;
134
70
  }
135
71
 
72
+ /* Webkit Scrollbar */
136
73
  .canvas-container .canvas-content::-webkit-scrollbar {
137
74
  width: 10px;
138
75
  background: linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);
@@ -158,6 +95,17 @@
158
95
  scrollbar-color: var(--color-primary01) transparent;
159
96
  }
160
97
 
98
+ /* Mobile */
99
+ @media only screen and (max-width: 768px) {
100
+ :host([open][transitiondirection="left"]:not(.skip-animation)) > .canvas-container {
101
+ animation: enter-right 0.4s ease-out;
102
+ }
103
+
104
+ :host([open][transitiondirection="right"]:not(.skip-animation)) > .canvas-container {
105
+ animation: enter-left 0.4s ease-out;
106
+ }
107
+ }
108
+
161
109
  /* Tablet / Desktop */
162
110
  @media only screen and (min-width: 768px) {
163
111
  :host {
@@ -172,20 +120,63 @@
172
120
  min-height: calc(var(--space-unit) * 40);
173
121
  }
174
122
 
175
- @keyframes grow {
176
- from {
177
- width: 0;
178
- }
123
+ :host(:not([variant="overlay"])[open]:not(.skip-animation)) {
124
+ width: auto;
125
+ animation: grow 0.4s ease-out;
126
+ }
127
+ }
128
+
129
+ /* ANIMATION */
179
130
 
180
- to {
181
- width: max(var(--z-offcanvas--container-width), 375px);
182
- }
131
+ @keyframes grow {
132
+ from {
133
+ width: 0;
183
134
  }
184
135
 
185
- :host(:not([variant="overlay"])[open]) {
186
- width: auto;
187
- animation-duration: 0.4s;
188
- animation-name: grow;
189
- animation-timing-function: ease-out;
136
+ to {
137
+ width: max(var(--z-offcanvas--container-width), 375px);
138
+ }
139
+ }
140
+
141
+ @keyframes enter-left {
142
+ from {
143
+ transform: translateX(-100%);
144
+ }
145
+
146
+ to {
147
+ transform: translateX(0);
148
+ }
149
+ }
150
+
151
+ @keyframes enter-right {
152
+ from {
153
+ transform: translateX(100%);
154
+ }
155
+
156
+ to {
157
+ transform: translateX(0);
190
158
  }
191
159
  }
160
+
161
+ :host([open][variant="overlay"][transitiondirection="left"]:not(.skip-animation)) > .canvas-container {
162
+ animation: enter-right 0.4s ease-out;
163
+ }
164
+
165
+ :host([open][transitiondirection="right"]:not(.skip-animation)) > .canvas-container {
166
+ animation: enter-left 0.4s ease-out;
167
+ }
168
+
169
+ :host(:not([open])[variant="overlay"][transitiondirection="right"]) > .canvas-container {
170
+ transform: translateX(-100%);
171
+ transition: visibility 0.4s ease-out, transform 0.4s ease-out;
172
+ }
173
+
174
+ :host(:not([open])[variant="overlay"][transitiondirection="left"]) > .canvas-container {
175
+ transform: translateX(100%);
176
+ transition: visibility 0.4s ease-out, transform 0.4s ease-out;
177
+ }
178
+
179
+ :host(:not([open])[variant="overlay"]) .canvas-background {
180
+ transition: visibility 0.4s ease-out;
181
+ visibility: hidden;
182
+ }
@@ -15,14 +15,6 @@ export class ZMyzCardFooter {
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
- }
26
18
  }
27
19
  getTitleAuthors() {
28
20
  return this.allowTooltipAuthors ? this.autori : "";
@@ -52,11 +44,8 @@ export class ZMyzCardFooter {
52
44
  this.elementsEllipsis();
53
45
  }
54
46
  }
55
- getFirstListItem() {
56
- return this.host.querySelector("[slot=list] > li a");
57
- }
58
47
  render() {
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" })));
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" })));
60
49
  }
61
50
  static get is() { return "z-myz-card-footer"; }
62
51
  static get encapsulation() { return "shadow"; }
@@ -206,7 +195,6 @@ export class ZMyzCardFooter {
206
195
  "allowTooltipAuthors": {}
207
196
  };
208
197
  }
209
- static get elementRef() { return "host"; }
210
198
  static get listeners() {
211
199
  return [{
212
200
  "name": "toggleClick",
@@ -27,7 +27,7 @@ export class ZMyzCardHeader {
27
27
  };
28
28
  }
29
29
  render() {
30
- 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" })));
30
+ 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" })));
31
31
  }
32
32
  static get is() { return "z-myz-card-header"; }
33
33
  static get encapsulation() { return "shadow"; }
@@ -11,18 +11,6 @@ header {
11
11
  border-radius: var(--border-radius) var(--border-radius) var(--border-no-radius) var(--border-no-radius);
12
12
  }
13
13
 
14
- slot[name="aria-heading"]::slotted(*) {
15
- position: absolute;
16
- overflow: hidden !important;
17
- width: 1px !important;
18
- height: 1px !important;
19
- padding: 0 !important;
20
- border: 0 none !important;
21
- margin: -1px !important;
22
- clip: rect(0, 0, 0, 0) !important;
23
- white-space: nowrap !important;
24
- }
25
-
26
14
  header.real,
27
15
  header.trial,
28
16
  header.temp {