@zanichelli/albe-web-components 7.3.2 → 7.3.3

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 (121) hide show
  1. package/dist/cjs/index-e3299e0a.js +6 -30
  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_11.cjs.entry.js +1052 -0
  5. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +865 -2
  6. package/dist/cjs/z-menu-section.cjs.entry.js +1 -1
  7. package/dist/cjs/z-menu.cjs.entry.js +1 -1
  8. package/dist/collection/components/inputs/z-searchbar/index.js +6 -17
  9. package/dist/collection/components/inputs/z-searchbar/styles.css +46 -95
  10. package/dist/collection/components/modal/z-modal/index.js +8 -1
  11. package/dist/collection/components/modal/z-modal/styles.css +13 -0
  12. package/dist/collection/components/navigation/z-app-header/index.js +171 -47
  13. package/dist/collection/components/navigation/z-app-header/index.stories.js +393 -0
  14. package/dist/collection/components/navigation/z-app-header/styles.css +167 -166
  15. package/dist/collection/components/navigation/z-menu/index.js +1 -0
  16. package/dist/collection/components/navigation/z-menu/styles.css +7 -7
  17. package/dist/collection/components/navigation/z-menu-section/styles.css +8 -9
  18. package/dist/collection/components/z-offcanvas/index.js +34 -50
  19. package/dist/esm/index-a2ca4b97.js +6 -30
  20. package/dist/esm/index.js +1 -1
  21. package/dist/esm/loader.js +1 -1
  22. package/dist/esm/{utils-970ac457.js → utils-a52a81ba.js} +1 -1
  23. package/dist/esm/web-components-library.js +1 -1
  24. package/dist/esm/z-app-header_11.entry.js +1038 -0
  25. package/dist/esm/z-chip.entry.js +1 -1
  26. package/dist/esm/z-combobox.entry.js +1 -1
  27. package/dist/esm/z-dragdrop-area_2.entry.js +865 -2
  28. package/dist/esm/z-file-upload.entry.js +1 -1
  29. package/dist/esm/z-menu-section.entry.js +1 -1
  30. package/dist/esm/z-menu.entry.js +1 -1
  31. package/dist/esm/z-myz-card-info.entry.js +1 -1
  32. package/dist/esm/z-myz-list-item.entry.js +1 -1
  33. package/dist/esm/z-pocket_3.entry.js +1 -1
  34. package/dist/esm/z-select.entry.js +1 -1
  35. package/dist/esm/z-skip-to-content.entry.js +1 -1
  36. package/dist/esm/z-slideshow.entry.js +1 -1
  37. package/dist/esm/z-table-header.entry.js +1 -1
  38. package/dist/esm/z-toggle-switch.entry.js +1 -1
  39. package/dist/types/components/inputs/z-searchbar/index.d.ts +0 -2
  40. package/dist/types/components/navigation/z-app-header/index.d.ts +49 -17
  41. package/dist/types/components/navigation/z-menu/index.d.ts +1 -0
  42. package/dist/types/components/z-offcanvas/index.d.ts +10 -12
  43. package/dist/types/components.d.ts +41 -13
  44. package/dist/web-components-library/index.esm.js +1 -1
  45. package/dist/web-components-library/{p-1f259ec0.entry.js → p-0bf3a704.entry.js} +1 -1
  46. package/{www/build/p-d982fc4c.entry.js → dist/web-components-library/p-10e036e4.entry.js} +1 -1
  47. package/dist/web-components-library/p-161a4e84.entry.js +1 -0
  48. package/dist/web-components-library/{p-dfc69cc3.js → p-1c6b0e09.js} +1 -1
  49. package/dist/web-components-library/{p-10625725.entry.js → p-1e71778f.entry.js} +1 -1
  50. package/dist/web-components-library/{p-068951a7.entry.js → p-1eaef57d.entry.js} +1 -1
  51. package/dist/web-components-library/p-27441384.entry.js +1 -0
  52. package/dist/web-components-library/{p-779c8d20.entry.js → p-378e3fd3.entry.js} +1 -1
  53. package/dist/web-components-library/{p-e2758870.entry.js → p-5c5a2680.entry.js} +1 -1
  54. package/dist/web-components-library/p-6d377fcb.entry.js +1 -0
  55. package/{www/build/p-191c9901.entry.js → dist/web-components-library/p-84b23d4b.entry.js} +1 -1
  56. package/dist/web-components-library/p-8ff45f5f.entry.js +1 -0
  57. package/dist/web-components-library/p-b36fc3db.entry.js +1 -0
  58. package/dist/web-components-library/{p-bca446ef.entry.js → p-c9bb584c.entry.js} +1 -1
  59. package/dist/web-components-library/{p-59b1f1e9.entry.js → p-d986024a.entry.js} +1 -1
  60. package/dist/web-components-library/p-eefde77a.entry.js +1 -0
  61. package/dist/web-components-library/web-components-library.esm.js +1 -1
  62. package/package.json +3 -2
  63. package/www/build/index.esm.js +1 -1
  64. package/www/build/{p-1f259ec0.entry.js → p-0bf3a704.entry.js} +1 -1
  65. package/{dist/web-components-library/p-d982fc4c.entry.js → www/build/p-10e036e4.entry.js} +1 -1
  66. package/www/build/p-161a4e84.entry.js +1 -0
  67. package/www/build/{p-dfc69cc3.js → p-1c6b0e09.js} +1 -1
  68. package/www/build/{p-10625725.entry.js → p-1e71778f.entry.js} +1 -1
  69. package/www/build/{p-068951a7.entry.js → p-1eaef57d.entry.js} +1 -1
  70. package/www/build/p-27441384.entry.js +1 -0
  71. package/www/build/{p-779c8d20.entry.js → p-378e3fd3.entry.js} +1 -1
  72. package/www/build/{p-e2758870.entry.js → p-5c5a2680.entry.js} +1 -1
  73. package/www/build/p-6d377fcb.entry.js +1 -0
  74. package/www/build/p-70021fac.js +1 -0
  75. package/{dist/web-components-library/p-191c9901.entry.js → www/build/p-84b23d4b.entry.js} +1 -1
  76. package/www/build/p-8ff45f5f.entry.js +1 -0
  77. package/www/build/p-b36fc3db.entry.js +1 -0
  78. package/www/build/{p-bca446ef.entry.js → p-c9bb584c.entry.js} +1 -1
  79. package/www/build/{p-59b1f1e9.entry.js → p-d986024a.entry.js} +1 -1
  80. package/www/build/p-eefde77a.entry.js +1 -0
  81. package/www/build/web-components-library.esm.js +1 -1
  82. package/www/index.html +1 -1
  83. package/dist/cjs/z-app-header_2.cjs.entry.js +0 -152
  84. package/dist/cjs/z-button.cjs.entry.js +0 -43
  85. package/dist/cjs/z-divider.cjs.entry.js +0 -26
  86. package/dist/cjs/z-input_2.cjs.entry.js +0 -273
  87. package/dist/cjs/z-list_3.cjs.entry.js +0 -261
  88. package/dist/cjs/z-offcanvas.cjs.entry.js +0 -57
  89. package/dist/cjs/z-searchbar.cjs.entry.js +0 -248
  90. package/dist/esm/z-app-header_2.entry.js +0 -147
  91. package/dist/esm/z-button.entry.js +0 -39
  92. package/dist/esm/z-divider.entry.js +0 -22
  93. package/dist/esm/z-input_2.entry.js +0 -268
  94. package/dist/esm/z-list_3.entry.js +0 -255
  95. package/dist/esm/z-offcanvas.entry.js +0 -53
  96. package/dist/esm/z-searchbar.entry.js +0 -244
  97. package/dist/web-components-library/p-1570917d.entry.js +0 -1
  98. package/dist/web-components-library/p-157aea3b.entry.js +0 -1
  99. package/dist/web-components-library/p-1c8e7c24.entry.js +0 -1
  100. package/dist/web-components-library/p-20682781.entry.js +0 -1
  101. package/dist/web-components-library/p-3d0f5e36.entry.js +0 -1
  102. package/dist/web-components-library/p-4f266607.entry.js +0 -1
  103. package/dist/web-components-library/p-51c946a5.entry.js +0 -1
  104. package/dist/web-components-library/p-af283478.entry.js +0 -1
  105. package/dist/web-components-library/p-bae1911e.entry.js +0 -1
  106. package/dist/web-components-library/p-d0760bb1.entry.js +0 -1
  107. package/dist/web-components-library/p-deda8776.entry.js +0 -1
  108. package/dist/web-components-library/p-f3a8cc14.entry.js +0 -1
  109. package/www/build/p-1570917d.entry.js +0 -1
  110. package/www/build/p-157aea3b.entry.js +0 -1
  111. package/www/build/p-1c8e7c24.entry.js +0 -1
  112. package/www/build/p-20682781.entry.js +0 -1
  113. package/www/build/p-3d0f5e36.entry.js +0 -1
  114. package/www/build/p-4b0934c2.js +0 -1
  115. package/www/build/p-4f266607.entry.js +0 -1
  116. package/www/build/p-51c946a5.entry.js +0 -1
  117. package/www/build/p-af283478.entry.js +0 -1
  118. package/www/build/p-bae1911e.entry.js +0 -1
  119. package/www/build/p-d0760bb1.entry.js +0 -1
  120. package/www/build/p-deda8776.entry.js +0 -1
  121. package/www/build/p-f3a8cc14.entry.js +0 -1
@@ -1,6 +1,4 @@
1
1
  :host {
2
- --app-header-content-max-width: 100%;
3
- --app-header-height: auto;
4
2
  --app-header-typography-1-size: 24px;
5
3
  --app-header-typography-2-size: 28px;
6
4
  --app-header-typography-3-size: 32px;
@@ -37,6 +35,8 @@
37
35
  --app-header-typography-10-tracking: calc(-2 / 1em);
38
36
  --app-header-typography-11-tracking: calc(-2.2 / 1em);
39
37
  --app-header-typography-12-tracking: calc(-2.4 / 1em);
38
+ --app-header-content-max-width: 100%;
39
+ --app-header-height: auto;
40
40
 
41
41
  /* Variable to set stuck header and drawer's top offset.
42
42
  Useful when something is absolutely positioned above the header. */
@@ -44,18 +44,34 @@
44
44
  --app-header-drawer-trigger-size: calc(var(--space-unit) * 4);
45
45
 
46
46
  /* Variable to customize header background color. */
47
- --app-header-bg: var(--color-white);
47
+ --app-header-bg: var(--color-surface01);
48
48
 
49
49
  /* Variable to customize stuck header background color. */
50
- --app-header-stucked-bg: var(--color-white);
50
+ --app-header-stucked-bg: var(--color-surface01);
51
51
 
52
52
  /* Variable to customize text and icon color. */
53
- --app-header-text-color: var(--gray800);
53
+ --app-header-text-color: var(--color-text01);
54
+
55
+ /* Variable to customize the title's font size.
56
+ NOTE: Only use one of the exported `--app-header-typography-*-size` as a value. */
57
+ --app-header-title-font-size: var(--app-header-typography-3-size);
58
+
59
+ /* Variable to customize the title's line-height.
60
+ NOTE: Only use one of the exported `--app-header-typography-*-lineheight` as a value
61
+ and use the same level as the one of the font size. */
62
+ --app-header-title-lineheight: var(--app-header-typography-3-lineheight);
63
+
64
+ /* Variable to customize the title's letter-spacing.
65
+ NOTE: Only use one of the exported `--app-header-typography-*-tracking` as a value
66
+ and use the same level as the one of the font size. */
67
+ --app-header-title-letter-spacing: var(--app-header-typography-3-tracking);
54
68
 
55
69
  /* Variable to customize stuck header's text and icon color. */
56
- --app-header-stucked-text-color: var(--gray800);
70
+ --app-header-stucked-text-color: var(--color-text01);
57
71
 
72
+ position: relative;
58
73
  display: block;
74
+ height: var(--app-header-height);
59
75
  color: var(--app-header-text-color);
60
76
  }
61
77
 
@@ -69,30 +85,97 @@
69
85
  display: flex;
70
86
  width: 100%;
71
87
  max-width: var(--app-header-content-max-width);
72
- height: var(--app-header-height);
73
88
  flex-direction: column;
74
89
  flex-grow: 0;
75
90
  flex-shrink: 0;
76
91
  align-items: baseline;
77
- justify-content: flex-start;
78
92
  padding: var(--grid-margin);
79
93
  margin: 0 auto;
80
94
  background: var(--app-header-bg);
95
+ gap: calc(var(--space-unit) * 2) calc(var(--space-unit) * 5);
96
+ }
97
+
98
+ .hero-container + .heading-panel {
99
+ background: transparent;
81
100
  }
82
101
 
83
102
  :host(:empty) .heading-panel {
84
103
  padding: 0;
85
104
  }
86
105
 
106
+ .heading-container {
107
+ position: relative;
108
+ z-index: 1;
109
+ display: flex;
110
+ width: 100%;
111
+ max-width: 100%;
112
+ flex: 1 auto;
113
+ flex-direction: column;
114
+ justify-content: flex-start;
115
+ }
116
+
87
117
  .heading-title {
88
118
  display: flex;
89
119
  max-width: 100%;
90
120
  flex-direction: row;
91
- align-items: center;
121
+ align-items: flex-start;
122
+ column-gap: calc(var(--space-unit) * 2);
123
+ }
124
+
125
+ ::slotted([slot="title"]),
126
+ .heading-stuck .heading-title > *,
127
+ ::slotted([slot="stucked-title"]) {
128
+ margin: 0;
129
+ font-family: "IBM Plex Serif", serif;
130
+ font-weight: var(--font-bd);
131
+ }
132
+
133
+ ::slotted([slot="title"]) {
134
+ font-size: var(--app-header-title-font-size);
135
+ letter-spacing: var(--app-header-title-letter-spacing);
136
+ line-height: var(--app-header-title-lineheight);
137
+ }
138
+
139
+ .heading-stuck .heading-title > *,
140
+ ::slotted([slot="stucked-title"]) {
141
+ font-size: var(--app-header-typography-3-size);
142
+ letter-spacing: var(--app-header-typography-3-tracking);
143
+ line-height: var(--app-header-typography-3-lineheight);
92
144
  }
93
145
 
94
146
  :host(:not([menu-length="0"])) .heading-subtitle {
95
- padding-left: calc(var(--app-header-drawer-trigger-size) + (var(--space-unit) * 1.5));
147
+ padding-left: calc(var(--app-header-drawer-trigger-size) + (var(--space-unit) * 2));
148
+ }
149
+
150
+ ::slotted([slot="subtitle"]) {
151
+ margin: 0;
152
+ font-family: var(--font-family-sans);
153
+ font-size: 20px;
154
+ font-style: italic;
155
+ font-weight: 500;
156
+ line-height: 26px;
157
+ }
158
+
159
+ .menu-container {
160
+ display: flex;
161
+ width: 100%;
162
+ flex: 1 auto;
163
+ flex-flow: row wrap;
164
+ }
165
+
166
+ .menu-container ::slotted([open]) {
167
+ position: relative;
168
+ z-index: 3;
169
+ }
170
+
171
+ z-searchbar {
172
+ z-index: 0;
173
+ display: flex;
174
+ width: auto;
175
+ min-width: calc(var(--space-unit) * 32);
176
+ flex: 1 auto;
177
+ align-items: center;
178
+ margin-left: auto;
96
179
  }
97
180
 
98
181
  .heading-stuck {
@@ -111,73 +194,28 @@
111
194
  .heading-stuck-content {
112
195
  display: flex;
113
196
  max-width: var(--app-header-content-max-width);
197
+ align-items: center;
114
198
  padding: var(--space-unit) var(--grid-margin);
115
199
  margin: 0 auto;
200
+ column-gap: calc(var(--space-unit) * 2);
116
201
  }
117
202
 
118
- .heading-stuck .heading-title,
119
203
  .heading-stuck .heading-title > *,
120
204
  .heading-stuck .heading-title ::slotted([slot="stucked-title"]) {
121
205
  display: block;
122
206
  overflow: hidden;
123
- line-height: 1.2;
124
207
  text-overflow: ellipsis;
125
208
  white-space: nowrap;
126
209
  }
127
210
 
128
- .heading-stuck .heading-title > *,
129
- ::slotted([slot="title"]),
130
- ::slotted([slot="stucked-title"]) {
131
- margin: 0;
132
- font-family: "IBM Plex Serif", serif;
133
- font-size: var(--app-header-typography-3-size);
134
- font-weight: 700;
135
- letter-spacing: var(--app-header-typography-3-tracking);
136
- }
137
-
138
- ::slotted([slot="title"]) {
139
- line-height: 1;
140
- }
141
-
142
- ::slotted([slot="subtitle"]) {
143
- margin: var(--space-unit) 0 0;
144
- font-family: var(--font-family-sans);
145
- font-size: 20px;
146
- font-style: italic;
147
- font-weight: 500;
148
- line-height: 1.2;
149
- }
150
-
151
- .heading-container {
152
- position: relative;
153
- z-index: 1;
154
- display: flex;
155
- max-width: 100%;
156
- flex-direction: column;
157
- align-items: flex-start;
158
- justify-content: flex-start;
159
- margin-right: auto;
160
- }
161
-
162
- .menu-container {
163
- display: none;
164
- flex-flow: row wrap;
165
- align-items: baseline;
166
- }
167
-
168
- .menu-container ::slotted([open]) {
169
- position: relative;
170
- z-index: 3;
171
- }
172
-
173
- .menu-container ::slotted(*:not(:last-of-type)) {
174
- margin-right: calc(var(--space-unit) * 4.5);
211
+ .heading-stuck-content z-button {
212
+ margin-left: auto;
175
213
  }
176
214
 
177
215
  .drawer-trigger {
178
216
  padding: 0;
179
217
  border: 0;
180
- margin: 0 calc(var(--space-unit) * 1.5) 0 0;
218
+ margin: 0;
181
219
  appearance: none;
182
220
  background: none;
183
221
  border-radius: 0;
@@ -192,93 +230,37 @@
192
230
  fill: currentcolor;
193
231
  }
194
232
 
195
- .drawer-container {
196
- position: fixed;
197
- z-index: 100;
198
- top: var(--app-header-top-offset);
199
- left: 0;
200
- width: 100%;
201
- height: 100%;
202
- pointer-events: none;
203
- }
204
-
205
- .drawer-container .drawer-overlay {
206
- position: absolute;
207
- z-index: 1;
208
- top: 0;
209
- left: 0;
210
- display: block;
211
- width: 100%;
212
- height: 100%;
213
- background: var(--gray900);
214
- opacity: 0;
215
- pointer-events: none;
216
- transition: opacity 400ms ease-out;
233
+ /* Simulate the height of the first line of text,
234
+ to correctly align drawer icon and search page button with the title */
235
+ .heading-container :is(.drawer-trigger, z-button.search-page-button) {
236
+ display: flex;
237
+ height: calc(var(--app-header-title-font-size) * var(--app-header-title-lineheight));
238
+ align-items: center;
217
239
  }
218
240
 
219
- .drawer-panel {
220
- position: absolute;
221
- z-index: 2;
222
- top: 0;
223
- left: 0;
224
- display: flex;
225
- width: 375px;
226
- max-width: 100%;
227
- height: 100%;
228
- flex-direction: column;
229
- align-items: flex-start;
230
- padding: calc(var(--space-unit) * 2) var(--space-unit);
231
- background: var(--color-white);
232
- color: var(--gray800);
233
- pointer-events: none;
234
- transform: translate3d(-100%, 0, 0);
235
- transition: transform 400ms ease-out;
241
+ .heading-container z-button.search-page-button {
242
+ margin-left: auto;
236
243
  }
237
244
 
238
245
  .drawer-content {
239
246
  display: flex;
240
- overflow: auto;
241
247
  width: 100%;
242
248
  flex: 1 auto;
243
249
  flex-direction: column;
244
- padding: calc(var(--space-unit) * 0.5) var(--space-unit);
245
- }
246
-
247
- .drawer-content::-webkit-scrollbar {
248
- width: 10px;
249
- background: linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);
250
- border-radius: var(--border-radius);
251
- }
252
-
253
- .drawer-content::-webkit-scrollbar-track {
254
- background-color: transparent;
255
- }
256
-
257
- .drawer-content::-webkit-scrollbar-thumb {
258
- width: 10px;
259
- background-color: var(--color-primary01);
260
- border-radius: var(--border-radius);
261
- }
262
-
263
- .drawer-content::-webkit-scrollbar-thumb:hover {
264
- background-color: var(--color-hover-primary);
250
+ row-gap: calc(var(--space-unit) * 2.5);
265
251
  }
266
252
 
267
253
  .drawer-content ::slotted(z-menu) {
268
254
  width: 100%;
269
255
  }
270
256
 
271
- .drawer-content ::slotted(z-menu:not(:last-of-type)) {
272
- margin-bottom: calc(var(--space-unit) * 2.5);
273
- }
274
-
275
257
  .drawer-close {
276
258
  --z-icon-width: var(--app-header-drawer-trigger-size);
277
259
  --z-icon-height: var(--app-header-drawer-trigger-size);
278
260
 
279
261
  padding: 0;
280
262
  border: 0;
281
- margin: 0 0 calc(var(--space-unit) * 2.5) var(--space-unit);
263
+ margin: var(--space-unit) 0 calc(var(--space-unit) * 2.5);
282
264
  appearance: none;
283
265
  background: transparent;
284
266
  border-radius: 0;
@@ -293,16 +275,6 @@
293
275
  box-shadow: var(--shadow-focus-primary);
294
276
  }
295
277
 
296
- :host([drawer-open]) .drawer-container .drawer-overlay {
297
- opacity: 0.7;
298
- pointer-events: all;
299
- }
300
-
301
- :host([drawer-open]) .drawer-container .drawer-panel {
302
- pointer-events: all;
303
- transform: none;
304
- }
305
-
306
278
  .hero-container {
307
279
  position: absolute;
308
280
  z-index: 0;
@@ -319,8 +291,8 @@
319
291
  fill: var(--color-white);
320
292
  }
321
293
 
322
- :host([overlay]) .heading-panel .menu-container ::slotted(z-menu:not([open])) {
323
- --color-surface05: var(--color-white);
294
+ :host([overlay]) .heading-panel .menu-container ::slotted(z-menu) {
295
+ --z-menu-label-color: var(--color-white);
324
296
  }
325
297
 
326
298
  :host([overlay]) .hero-container::after {
@@ -349,62 +321,91 @@
349
321
 
350
322
  /* Tablet breakpoint */
351
323
  @media (min-width: 768px) {
324
+ :host {
325
+ --app-header-title-font-size: var(--app-header-typography-6-size);
326
+ --app-header-title-lineheight: var(--app-header-typography-6-lineheight);
327
+ --app-header-title-letter-spacing: var(--app-header-typography-6-tracking);
328
+ }
329
+
330
+ .heading-panel {
331
+ flex-flow: row wrap;
332
+ align-items: center;
333
+ padding-bottom: calc(var(--space-unit) * 2);
334
+ }
335
+
336
+ .heading-container {
337
+ margin-right: auto;
338
+ }
339
+
340
+ :host(:is([flow="offcanvas"], [menu-length="0"])) :is(.heading-container, .menu-container) {
341
+ width: auto;
342
+ }
343
+
352
344
  :host(:not([flow="offcanvas"])) .heading-subtitle {
353
345
  padding-left: 0;
354
346
  }
355
347
 
348
+ .menu-container {
349
+ flex: initial;
350
+ align-items: center;
351
+ }
352
+
353
+ :host([menu-length="0"]) .menu-container:not(:empty) {
354
+ height: calc(var(--app-header-title-font-size) * var(--app-header-title-lineheight));
355
+ }
356
+
356
357
  :host(:not([flow="offcanvas"])) .menu-container {
357
- display: flex;
358
+ gap: var(--space-unit) calc(var(--space-unit) * 5);
358
359
  }
359
360
 
360
361
  :host(:not([flow="offcanvas"])) .heading-container .drawer-trigger {
361
362
  display: none;
362
363
  }
364
+ }
363
365
 
364
- :host(:not([flow="offcanvas"], [menu-length="0"])) .heading-container:not(:last-child) {
365
- margin-bottom: calc(var(--space-unit) * 3);
366
+ /* Desktop breakpoint */
367
+ @media (min-width: 1152px) {
368
+ :host {
369
+ --app-header-title-font-size: var(--app-header-typography-7-size);
370
+ --app-header-title-lineheight: var(--app-header-typography-7-lineheight);
371
+ --app-header-title-letter-spacing: var(--app-header-typography-7-tracking);
366
372
  }
367
373
 
368
- ::slotted([slot="title"]) {
369
- font-size: var(--app-header-typography-6-size);
370
- letter-spacing: var(--app-header-typography-6-tracking);
374
+ .heading-panel {
375
+ justify-content: flex-start;
376
+ padding-bottom: calc(var(--space-unit) * 3);
371
377
  }
372
378
 
373
- ::slotted([slot="subtitle"]) {
374
- margin-top: calc(var(--space-unit) * 1.5);
379
+ .heading-container,
380
+ .menu-container {
381
+ width: auto;
375
382
  }
376
- }
377
383
 
378
- /* Desktop breakpoint */
379
- @media (min-width: 1152px) {
380
- :host(:not([flow="stack"])) .heading-panel {
381
- flex-flow: row wrap;
384
+ :host([flow="stack"]) .heading-panel {
385
+ flex-flow: column;
386
+ align-items: flex-start;
382
387
  }
383
388
 
384
- ::slotted([slot="title"]) {
385
- margin-right: var(--grid-gutter);
386
- font-size: var(--app-header-typography-7-size);
387
- letter-spacing: var(--app-header-typography-7-tracking);
389
+ :host([flow="stack"]) .menu-container {
390
+ width: 100%;
388
391
  }
389
392
 
390
- :host(:not([flow="offcanvas"], [menu-length="0"])) .heading-container:not(:last-child) {
391
- margin-bottom: calc(var(--space-unit) * 2);
393
+ :host(:not([flow="offcanvas"], [menu-length="0"])) .heading-panel {
394
+ row-gap: calc(var(--space-unit) * 3);
392
395
  }
393
396
 
394
- .menu-container {
395
- margin-top: var(--space-unit);
397
+ z-searchbar {
398
+ min-width: calc(var(--space-unit) * 45);
399
+ flex: initial;
396
400
  }
397
401
  }
398
402
 
399
403
  /* Wide breakpoint */
400
404
  @media (min-width: 1366px) {
401
- ::slotted([slot="title"]) {
402
- font-size: var(--app-header-typography-9-size);
403
- letter-spacing: var(--app-header-typography-9-tracking);
404
- }
405
-
406
- :host(:not([flow="offcanvas"], [menu-length="0"])) .heading-container:not(:last-child) {
407
- margin-bottom: 0;
405
+ :host {
406
+ --app-header-title-font-size: var(--app-header-typography-9-size);
407
+ --app-header-title-lineheight: var(--app-header-typography-9-lineheight);
408
+ --app-header-title-letter-spacing: var(--app-header-typography-9-tracking);
408
409
  }
409
410
  }
410
411
 
@@ -3,6 +3,7 @@ import { h, Host } from "@stencil/core";
3
3
  * @slot - Menu label
4
4
  * @slot header - Header to display as the first entry of the open menu.
5
5
  * @slot item - Single entry of the section. Can be slotted multiple times to insert items onto the menu. Use `z-menu-section` for submenus.
6
+ * @cssprop --z-menu-label-color - Color of the label's text.
6
7
  */
7
8
  export class ZMenu {
8
9
  constructor() {
@@ -8,6 +8,8 @@
8
8
  position: relative;
9
9
  display: inline-flex;
10
10
  flex-direction: column;
11
+
12
+ --z-menu-label-color: var(--color-text01);
11
13
  }
12
14
 
13
15
  ::slotted(a) {
@@ -18,10 +20,6 @@
18
20
  color: var(--color-text01);
19
21
  font-family: var(--font-family-sans);
20
22
  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;
25
23
  }
26
24
 
27
25
  .menu-label {
@@ -55,13 +53,11 @@ button.menu-label {
55
53
  }
56
54
 
57
55
  :host(:is([active], [open])) .menu-label-content,
58
- .menu-label .menu-label-content:hover,
59
56
  .menu-label:focus-within .menu-label-content {
60
57
  font-weight: var(--font-bd);
61
58
  }
62
59
 
63
60
  :host(:is([active], [open])) .menu-label-content ::slotted(*),
64
- .menu-label .menu-label-content:hover ::slotted(*),
65
61
  .menu-label:focus-within .menu-label-content ::slotted(*) {
66
62
  letter-spacing: normal;
67
63
  }
@@ -123,8 +119,11 @@ when placed below the real text using `flex-direction: column`. */
123
119
  width: 100%;
124
120
  margin: 0;
125
121
  appearance: none;
122
+ color: var(--z-menu-label-color);
123
+ font-family: var(--font-family-sans);
126
124
  font-size: var(--font-size-5);
127
125
  font-weight: inherit;
126
+ letter-spacing: 0.36px; /* increasing the letter spacing of the regular text helps reduce the size difference between regular and bold text */
128
127
  line-height: 1.2;
129
128
  outline: none;
130
129
  }
@@ -136,7 +135,7 @@ when placed below the real text using `flex-direction: column`. */
136
135
 
137
136
  .menu-label .menu-label-content z-icon {
138
137
  margin-left: calc(var(--space-unit) * 1.5);
139
- fill: var(--color-icon02);
138
+ fill: currentcolor;
140
139
  }
141
140
 
142
141
  .content {
@@ -207,6 +206,7 @@ when placed below the real text using `flex-direction: column`. */
207
206
  }
208
207
 
209
208
  .items > ::slotted([slot="item"]:hover),
209
+ .items > ::slotted([slot="item"]:focus:focus-visible),
210
210
  .items > ::slotted([slot="item"]:active) {
211
211
  border-color: var(--color-secondary01);
212
212
  font-weight: var(--font-bd);
@@ -28,7 +28,9 @@
28
28
  border-color: var(--color-secondary01);
29
29
  }
30
30
 
31
- :is(:host(:is([active], [open])) .label, .label:hover) ::slotted(*) {
31
+ :host(:is([active], [open])) .label ::slotted(*),
32
+ .label:focus:focus-visible ::slotted(*),
33
+ .label:hover ::slotted(*) {
32
34
  font-weight: var(--font-bd);
33
35
  }
34
36
 
@@ -36,7 +38,7 @@
36
38
  display: flex;
37
39
  width: 100%;
38
40
  align-items: center;
39
- padding: calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);
41
+ padding: calc(var(--space-unit) * 2) calc(var(--space-unit) / 2);
40
42
  border: 0;
41
43
  border-bottom: var(--border-size-small) solid var(--color-surface05);
42
44
  margin: 0;
@@ -95,29 +97,26 @@ when placed below the real text using `flex-direction: column`. */
95
97
  display: flex;
96
98
  width: 100%;
97
99
  flex-direction: column;
98
- padding: calc(var(--space-unit) * 0.5);
99
- padding-bottom: calc(var(--space-unit) * 2);
100
+ padding: calc(var(--space-unit) / 2);
101
+ padding-bottom: calc(var(--space-unit) * 1.5);
100
102
  }
101
103
 
102
104
  .items > ::slotted([slot="item"]) {
103
105
  display: inline-flex;
104
- padding: calc(var(--space-unit) * 0.5);
106
+ padding: calc(var(--space-unit) / 2);
105
107
  margin: 0;
106
108
  font-size: var(--font-size-2);
107
109
  line-height: 1.4;
108
110
  outline: none;
109
111
  }
110
112
 
111
- .items > ::slotted([slot="item"]:last-child) {
112
- padding-bottom: 0;
113
- }
114
-
115
113
  .items > ::slotted([slot="item"]:focus:focus-visible) {
116
114
  box-shadow: var(--shadow-focus-primary);
117
115
  color: var(--color-secondary01);
118
116
  }
119
117
 
120
118
  .items > ::slotted([slot="item"]:hover),
119
+ .items > ::slotted([slot="item"]:focus:focus-visible),
121
120
  .items > ::slotted([slot="item"][active]) {
122
121
  color: var(--color-secondary01);
123
122
  font-weight: var(--font-bd);