@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
@@ -11,13 +11,17 @@
11
11
  }
12
12
 
13
13
  ::slotted(a) {
14
- color: var(--color-text01);
15
14
  text-decoration: none;
16
15
  }
17
16
 
18
17
  ::slotted(*) {
18
+ color: var(--color-text01);
19
19
  font-family: var(--font-family-sans);
20
20
  font-weight: var(--font-rg);
21
+
22
+ /* increasing the letter spacing of the regular text helps reduce
23
+ the size difference between regular and bold text */
24
+ letter-spacing: 0.36px;
21
25
  }
22
26
 
23
27
  .menu-label {
@@ -45,38 +49,101 @@ button.menu-label {
45
49
  }
46
50
 
47
51
  .menu-label .menu-label-content {
52
+ position: relative;
48
53
  display: flex;
49
54
  align-items: center;
50
- padding: var(--space-unit) 0;
51
- border-bottom: var(--border-size-large) solid var(--color-surface05);
52
55
  }
53
56
 
54
- :host([active]) .menu-label-content,
55
- :host([open]) .menu-label-content,
56
- .menu-label:hover .menu-label-content,
57
+ :host(:is([active], [open])) .menu-label-content,
58
+ .menu-label .menu-label-content:hover,
57
59
  .menu-label:focus-within .menu-label-content {
58
- border-color: var(--color-secondary01);
60
+ font-weight: var(--font-bd);
61
+ }
62
+
63
+ :host(:is([active], [open])) .menu-label-content ::slotted(*),
64
+ .menu-label .menu-label-content:hover ::slotted(*),
65
+ .menu-label:focus-within .menu-label-content ::slotted(*) {
66
+ letter-spacing: normal;
67
+ }
68
+
69
+ /* border */
70
+ :host(:is([active], [open], [vertical-context])) .menu-label .menu-label-content::after,
71
+ .menu-label .menu-label-content:hover::after,
72
+ .menu-label:focus-within .menu-label-content::after {
73
+ position: absolute;
74
+ bottom: 0;
75
+ left: 0;
76
+ width: 100%;
77
+ content: "";
78
+ pointer-events: none;
79
+ }
80
+
81
+ :host([vertical-context]) .menu-label-content::after {
82
+ height: var(--border-size-small);
83
+ background-color: var(--color-surface03);
59
84
  }
60
85
 
61
- .menu-label ::slotted(*) {
86
+ :host(:is([active], [open])) .menu-label .menu-label-content::after,
87
+ .menu-label .menu-label-content:hover::after,
88
+ .menu-label:focus-within .menu-label-content::after {
89
+ height: var(--border-size-large);
90
+ background-color: var(--color-secondary01);
91
+ }
92
+
93
+ /* Prevents layout shifts on font-weight changes.
94
+ The trick is to put an hidden copy of the text already set to bold,
95
+ so the needed space is correctly calculated before any hover/active state changes the
96
+ font-weight of the real text.
97
+ The hidden text has an height of 0px so it can expand the width without changing the height
98
+ when placed below the real text using `flex-direction: column`. */
99
+ ::slotted([data-text])::after {
100
+ height: 0;
101
+ content: attr(data-text);
102
+ content: attr(data-text) / "";
103
+ font-weight: var(--font-bd);
104
+ letter-spacing: normal;
105
+ pointer-events: none;
106
+ user-select: none;
107
+ visibility: hidden;
108
+ }
109
+
110
+ @media speech {
111
+ ::slotted([data-text])::after {
112
+ display: none;
113
+ }
114
+ }
115
+
116
+ ::slotted([data-text]) {
117
+ display: inline-flex;
118
+ flex-direction: column;
119
+ }
120
+
121
+ .menu-label .menu-label-content ::slotted(*) {
122
+ display: inline-flex;
62
123
  width: 100%;
63
124
  margin: 0;
64
125
  appearance: none;
65
126
  font-size: var(--font-size-5);
127
+ font-weight: inherit;
66
128
  line-height: 1.2;
67
129
  outline: none;
68
130
  }
69
131
 
70
- .menu-label z-icon {
71
- margin-left: calc(var(--space-unit) * 4);
72
- fill: currentcolor;
132
+ .menu-label .menu-label-content ::slotted(*),
133
+ .menu-label .menu-label-content z-icon {
134
+ padding: var(--space-unit) 0;
135
+ }
136
+
137
+ .menu-label .menu-label-content z-icon {
138
+ margin-left: calc(var(--space-unit) * 1.5);
139
+ fill: var(--color-icon02);
73
140
  }
74
141
 
75
142
  .content {
76
143
  background: var(--color-surface01);
77
144
  }
78
145
 
79
- .content[hidden] {
146
+ :host(:not([open])) .content {
80
147
  display: none;
81
148
  }
82
149
 
@@ -123,7 +190,6 @@ button.menu-label {
123
190
  }
124
191
 
125
192
  .items > ::slotted([slot="item"]) {
126
- display: inline-flex;
127
193
  width: 100%;
128
194
  margin: 0;
129
195
  font-size: var(--font-size-3);
@@ -143,4 +209,5 @@ button.menu-label {
143
209
  .items > ::slotted([slot="item"]:hover),
144
210
  .items > ::slotted([slot="item"]:active) {
145
211
  border-color: var(--color-secondary01);
212
+ font-weight: var(--font-bd);
146
213
  }
@@ -1,7 +1,8 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  /**
3
- * @slot - Menu section label
4
- * @slot item - Single entry of the section. Can be slotted multiple times to insert items.
3
+ * A component to create submenus inside the ZMenu.
4
+ * @slot - Label of the menu section.
5
+ * @slot item - Single entry of the section. Set the same slot name to different items to put many of them. Add the `active` attribute to a slotted item to highlight it.
5
6
  */
6
7
  export class ZMenuSection {
7
8
  toggle() {
@@ -23,13 +24,21 @@ export class ZMenuSection {
23
24
  * Check if some content slot is set.
24
25
  */
25
26
  checkContent() {
26
- this.hasContent = !!this.hostElement.querySelectorAll('[slot="item"]').length;
27
+ this.hasContent = this.hostElement.querySelectorAll('[slot="item"]').length > 0;
28
+ }
29
+ /**
30
+ * Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.
31
+ * @param ev Slotchange event
32
+ */
33
+ onLabelSlotChange(ev) {
34
+ const labelElement = ev.target.assignedElements()[0];
35
+ labelElement.dataset.text = (labelElement === null || labelElement === void 0 ? void 0 : labelElement.innerText) || null;
27
36
  }
28
37
  componentWillLoad() {
29
38
  this.checkContent();
30
39
  }
31
40
  render() {
32
- return (h(Host, { role: "menu", open: this.open }, h("button", { class: "label", "aria-pressed": this.open ? "true" : "false", onClick: this.toggle.bind(this) }, h("slot", null), this.hasContent && h("z-icon", { name: this.open ? "chevron-up" : "chevron-down" })), this.open && (h("div", { class: "items" }, h("slot", { name: "item", onSlotchange: this.checkContent.bind(this) })))));
41
+ return (h(Host, { role: "menu", open: this.open }, h("button", { class: "label", "aria-pressed": this.open ? "true" : "false", onClick: this.toggle.bind(this) }, h("slot", { onSlotchange: this.onLabelSlotChange.bind(this) }), this.hasContent && h("z-icon", { name: this.open ? "chevron-up" : "chevron-down" })), this.open && (h("div", { class: "items" }, h("slot", { name: "item", onSlotchange: this.checkContent.bind(this) })))));
33
42
  }
34
43
  static get is() { return "z-menu-section"; }
35
44
  static get encapsulation() { return "shadow"; }
@@ -23,12 +23,15 @@
23
23
  font-weight: var(--font-rg);
24
24
  }
25
25
 
26
- :host([active]) .label,
27
- :host([open]) .label,
26
+ :host(:is([active], [open])) .label,
28
27
  .label:hover {
29
28
  border-color: var(--color-secondary01);
30
29
  }
31
30
 
31
+ :is(:host(:is([active], [open])) .label, .label:hover) ::slotted(*) {
32
+ font-weight: var(--font-bd);
33
+ }
34
+
32
35
  .label {
33
36
  display: flex;
34
37
  width: 100%;
@@ -43,6 +46,34 @@
43
46
  text-align: left;
44
47
  }
45
48
 
49
+ ::slotted([data-text]) {
50
+ display: inline-flex;
51
+ flex-direction: column;
52
+ }
53
+
54
+ /* Trick to prevent layout shifts on font-weight changes.
55
+ The trick is to put an hidden copy of the text already set to bold,
56
+ so the needed space is correctly calculated before any hover/active state changes the
57
+ font-weight of the real text.
58
+ The hidden text has an height of 0px so it can expand the width without changing the height
59
+ when placed below the real text using `flex-direction: column`. */
60
+ ::slotted([data-text])::after {
61
+ overflow: hidden;
62
+ height: 0;
63
+ content: attr(data-text);
64
+ content: attr(data-text) / "";
65
+ font-weight: var(--font-bd);
66
+ pointer-events: none;
67
+ user-select: none;
68
+ visibility: hidden;
69
+ }
70
+
71
+ @media speech {
72
+ ::slotted([data-text])::after {
73
+ display: none;
74
+ }
75
+ }
76
+
46
77
  .label ::slotted(*) {
47
78
  width: 100%;
48
79
  margin: 0;
@@ -57,7 +88,7 @@
57
88
 
58
89
  .label z-icon {
59
90
  margin-left: calc(var(--space-unit) * 4);
60
- fill: currentcolor;
91
+ fill: var(--color-icon02);
61
92
  }
62
93
 
63
94
  .items {
@@ -86,6 +117,8 @@
86
117
  color: var(--color-secondary01);
87
118
  }
88
119
 
89
- .items > ::slotted([slot="item"]:hover) {
120
+ .items > ::slotted([slot="item"]:hover),
121
+ .items > ::slotted([slot="item"][active]) {
90
122
  color: var(--color-secondary01);
123
+ font-weight: var(--font-bd);
91
124
  }
@@ -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,5 +1,14 @@
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
+ */
3
12
  export class ZCard {
4
13
  constructor() {
5
14
  /** 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-4);
186
+ box-shadow: var(--shadow-focus-primary);
187
187
  }
188
188
 
189
189
  :host([variant="shadow"][clickable]:active),
@@ -2,6 +2,7 @@ import { h, Host } from "@stencil/core";
2
2
  import { OffCanvasVariant, TransitionDirection } from "../../beans";
3
3
  /**
4
4
  * @slot canvasContent - set the content of the canvas
5
+ * @method setSkipAanimationOnLoad - set skipAnimation
5
6
  */
6
7
  export class ZOffcanvas {
7
8
  constructor() {
@@ -15,15 +16,20 @@ export class ZOffcanvas {
15
16
  this.open = false;
16
17
  /** open content transitioning in a specified direction left | right. Default: left */
17
18
  this.transitiondirection = TransitionDirection.LEFT;
18
- /** allows you to skip the entry animation on page load, to be used with the open prop at true */
19
+ /** manages the skip for the entry animation*/
19
20
  this.skipanimationonload = false;
20
21
  }
22
+ /** this method allows you to skip the page loading animation, to be used with the prop set to true */
23
+ async setSkipAanimationOnLoad(value) {
24
+ this.skipanimationonload = value;
25
+ }
21
26
  onOpenChanged() {
22
- if (!this.open && this.hostElement.hasAttribute("skipanimationonload")) {
23
- this.hostElement.removeAttribute("skipanimationonload");
27
+ if (!this.open && this.skipanimationonload) {
28
+ this.skipanimationonload = false;
24
29
  }
25
- if (this.open)
30
+ if (this.open) {
26
31
  this.handleOverflowProperty();
32
+ }
27
33
  this.canvasOpenStatusChanged.emit(this.open);
28
34
  }
29
35
  handleOverflowProperty() {
@@ -34,7 +40,7 @@ export class ZOffcanvas {
34
40
  this.handleOverflowProperty();
35
41
  }
36
42
  render() {
37
- return (h(Host, null, 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) }))));
43
+ 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) }))));
38
44
  }
39
45
  static get is() { return "z-offcanvas"; }
40
46
  static get encapsulation() { return "scoped"; }
@@ -113,27 +119,14 @@ export class ZOffcanvas {
113
119
  "attribute": "transitiondirection",
114
120
  "reflect": true,
115
121
  "defaultValue": "TransitionDirection.LEFT"
116
- },
117
- "skipanimationonload": {
118
- "type": "boolean",
119
- "mutable": false,
120
- "complexType": {
121
- "original": "boolean",
122
- "resolved": "boolean",
123
- "references": {}
124
- },
125
- "required": false,
126
- "optional": false,
127
- "docs": {
128
- "tags": [],
129
- "text": "allows you to skip the entry animation on page load, to be used with the open prop at true"
130
- },
131
- "attribute": "skipanimationonload",
132
- "reflect": false,
133
- "defaultValue": "false"
134
122
  }
135
123
  };
136
124
  }
125
+ static get states() {
126
+ return {
127
+ "skipanimationonload": {}
128
+ };
129
+ }
137
130
  static get events() {
138
131
  return [{
139
132
  "method": "canvasOpenStatusChanged",
@@ -152,6 +145,29 @@ export class ZOffcanvas {
152
145
  }
153
146
  }];
154
147
  }
148
+ static get methods() {
149
+ return {
150
+ "setSkipAanimationOnLoad": {
151
+ "complexType": {
152
+ "signature": "(value: boolean) => Promise<void>",
153
+ "parameters": [{
154
+ "tags": [],
155
+ "text": ""
156
+ }],
157
+ "references": {
158
+ "Promise": {
159
+ "location": "global"
160
+ }
161
+ },
162
+ "return": "Promise<void>"
163
+ },
164
+ "docs": {
165
+ "text": "this method allows you to skip the page loading animation, to be used with the prop set to true",
166
+ "tags": []
167
+ }
168
+ }
169
+ };
170
+ }
155
171
  static get elementRef() { return "hostElement"; }
156
172
  static get watchers() {
157
173
  return [{
@@ -97,11 +97,11 @@
97
97
 
98
98
  /* Mobile */
99
99
  @media only screen and (max-width: 768px) {
100
- :host([open][transitiondirection="left"]:not([skipAnimationOnLoad])) > .canvas-container {
100
+ :host([open][transitiondirection="left"]:not(.skip-animation)) > .canvas-container {
101
101
  animation: enter-right 0.4s ease-out;
102
102
  }
103
103
 
104
- :host([open][transitiondirection="right"]:not([skipAnimationOnLoad])) > .canvas-container {
104
+ :host([open][transitiondirection="right"]:not(.skip-animation)) > .canvas-container {
105
105
  animation: enter-left 0.4s ease-out;
106
106
  }
107
107
  }
@@ -120,7 +120,7 @@
120
120
  min-height: calc(var(--space-unit) * 40);
121
121
  }
122
122
 
123
- :host(:not([variant="overlay"])[open]:not([skipAnimationOnLoad])) {
123
+ :host(:not([variant="overlay"])[open]:not(.skip-animation)) {
124
124
  width: auto;
125
125
  animation: grow 0.4s ease-out;
126
126
  }
@@ -158,11 +158,11 @@
158
158
  }
159
159
  }
160
160
 
161
- :host([open][variant="overlay"][transitiondirection="left"]:not([skipAnimationOnLoad])) > .canvas-container {
161
+ :host([open][variant="overlay"][transitiondirection="left"]:not(.skip-animation)) > .canvas-container {
162
162
  animation: enter-right 0.4s ease-out;
163
163
  }
164
164
 
165
- :host([open][transitiondirection="right"]:not([skipAnimationOnLoad])) > .canvas-container {
165
+ :host([open][transitiondirection="right"]:not(.skip-animation)) > .canvas-container {
166
166
  animation: enter-left 0.4s ease-out;
167
167
  }
168
168
 
@@ -15,6 +15,14 @@ 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
+ }
18
26
  }
19
27
  getTitleAuthors() {
20
28
  return this.allowTooltipAuthors ? this.autori : "";
@@ -44,8 +52,11 @@ export class ZMyzCardFooter {
44
52
  this.elementsEllipsis();
45
53
  }
46
54
  }
55
+ getFirstListItem() {
56
+ return this.host.querySelector("[slot=list] > li a");
57
+ }
47
58
  render() {
48
- return (h("div", { class: Object.assign(Object.assign({}, this.retrieveClass()), { wrapper: true }) }, h("footer", { class: this.retrieveClass(), onTransitionEnd: (e) => this.footerTransitionHandler(e) }, h("span", { class: "toggle" }, h("slot", { name: "toggle" })), this.titolo && h("p", { class: { "custom-content": this.customContent } }, this.titolo), h("div", { class: { "content": true, "custom-content": this.customContent } }, h("div", null, h("p", { class: "authors", ref: (el) => (this.ellipsisAuthors = el) }, h("span", { title: this.getTitleAuthors() }, h("span", { class: "bold" }, this.autori))), h("p", { class: "year-isbn" }, h("span", { class: "isbn" }, h("span", null, h("span", { class: "bold" }, this.isbn), " (ed. cartacea)")))), h("div", { class: `slot-handler ${this.isOpen ? "visible" : "hidden"}` }, h("slot", { name: "list" })))), this.customContent && h("slot", { name: "content" })));
59
+ return (h("div", { class: Object.assign(Object.assign({}, this.retrieveClass()), { wrapper: true }) }, h("footer", { class: this.retrieveClass(), onTransitionEnd: (e) => this.footerTransitionHandler(e) }, h("span", { class: "toggle" }, h("slot", { name: "toggle" })), this.titolo && h("p", { class: { "custom-content": this.customContent } }, this.titolo), h("div", { class: { "content": true, "custom-content": this.customContent } }, h("div", null, h("p", { class: "authors", ref: (el) => (this.ellipsisAuthors = el) }, h("span", { title: this.getTitleAuthors() }, h("span", { "aria-description": "Autori", class: "bold" }, this.autori))), h("p", { class: "year-isbn" }, h("span", { class: "isbn" }, h("span", null, h("span", { "aria-description": "ISBN edizione cartacea", class: "bold" }, this.isbn), " ", "(ed. cartacea)")))), h("div", { class: `slot-handler ${this.isOpen ? "visible" : "hidden"}` }, h("slot", { name: "list" })))), this.customContent && h("slot", { name: "content" })));
49
60
  }
50
61
  static get is() { return "z-myz-card-footer"; }
51
62
  static get encapsulation() { return "shadow"; }
@@ -195,6 +206,7 @@ export class ZMyzCardFooter {
195
206
  "allowTooltipAuthors": {}
196
207
  };
197
208
  }
209
+ static get elementRef() { return "host"; }
198
210
  static get listeners() {
199
211
  return [{
200
212
  "name": "toggleClick",
@@ -27,7 +27,7 @@ export class ZMyzCardHeader {
27
27
  };
28
28
  }
29
29
  render() {
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" })));
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" })));
31
31
  }
32
32
  static get is() { return "z-myz-card-header"; }
33
33
  static get encapsulation() { return "shadow"; }
@@ -11,6 +11,18 @@ 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
+
14
26
  header.real,
15
27
  header.trial,
16
28
  header.temp {
@@ -41,7 +41,7 @@ button:hover > span {
41
41
  button:focus > span {
42
42
  background: var(--color-surface01);
43
43
  border-radius: var(--border-radius);
44
- box-shadow: 0 0 2px 2px var(--accent-dark);
44
+ box-shadow: var(--shadow-focus-primary);
45
45
  }
46
46
 
47
47
  button:active > span {
@@ -18,8 +18,8 @@ function getRootCssProperties() {
18
18
  * @example ```
19
19
  * argTypes={{
20
20
  * "--z-component--background-color": {
21
+ * control: { type: "select" },
21
22
  * options: getColorTokens(),
22
- * control: { type: "select" }
23
23
  * }
24
24
  * }}```
25
25
  *
@@ -1892,18 +1892,14 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1892
1892
  }
1893
1893
  switch(bundleId) {
1894
1894
 
1895
- case 'z-button_3':
1895
+ case 'z-app-header_2':
1896
1896
  return import(
1897
1897
  /* webpackMode: "lazy" */
1898
- './z-button_3.entry.js').then(processMod, consoleError);
1898
+ './z-app-header_2.entry.js').then(processMod, consoleError);
1899
1899
  case 'z-anchor-navigation':
1900
1900
  return import(
1901
1901
  /* webpackMode: "lazy" */
1902
1902
  './z-anchor-navigation.entry.js').then(processMod, consoleError);
1903
- case 'z-app-header':
1904
- return import(
1905
- /* webpackMode: "lazy" */
1906
- './z-app-header.entry.js').then(processMod, consoleError);
1907
1903
  case 'z-aria-alert':
1908
1904
  return import(
1909
1905
  /* webpackMode: "lazy" */
@@ -2028,6 +2024,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2028
2024
  return import(
2029
2025
  /* webpackMode: "lazy" */
2030
2026
  './z-notification.entry.js').then(processMod, consoleError);
2027
+ case 'z-offcanvas':
2028
+ return import(
2029
+ /* webpackMode: "lazy" */
2030
+ './z-offcanvas.entry.js').then(processMod, consoleError);
2031
2031
  case 'z-otp':
2032
2032
  return import(
2033
2033
  /* webpackMode: "lazy" */
@@ -2200,6 +2200,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2200
2200
  return import(
2201
2201
  /* webpackMode: "lazy" */
2202
2202
  './z-divider.entry.js').then(processMod, consoleError);
2203
+ case 'z-button':
2204
+ return import(
2205
+ /* webpackMode: "lazy" */
2206
+ './z-button.entry.js').then(processMod, consoleError);
2203
2207
  }
2204
2208
  }
2205
2209
  return import(