@progressive-development/pd-page 0.1.98 → 0.1.100
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.
- package/package.json +1 -1
- package/src/PdMenu.js +39 -26
- package/src/stories/menu.stories.js +1 -1
package/package.json
CHANGED
package/src/PdMenu.js
CHANGED
|
@@ -48,8 +48,9 @@ export class PdMenu extends LitElement {
|
|
|
48
48
|
.menu-container {
|
|
49
49
|
height: 100%;
|
|
50
50
|
padding-left: 10px;
|
|
51
|
-
padding-right: 10px;
|
|
51
|
+
padding-right: 10px;
|
|
52
52
|
display: flex;
|
|
53
|
+
justify-content: space-between;
|
|
53
54
|
align-items: center;
|
|
54
55
|
white-space: nowrap;
|
|
55
56
|
max-width: 1170px;
|
|
@@ -183,41 +184,51 @@ export class PdMenu extends LitElement {
|
|
|
183
184
|
padding-left: 10px;
|
|
184
185
|
}
|
|
185
186
|
|
|
186
|
-
.burger-menu {
|
|
187
|
-
display: flex;
|
|
188
|
-
gap: 0.3rem;
|
|
189
|
-
width: 100%;
|
|
190
|
-
justify-content: end;
|
|
191
|
-
align-items: center;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.burger-menu .item{
|
|
195
|
-
padding: 0;
|
|
196
|
-
font-size: 1.5em;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
187
|
.topItemLogo {
|
|
200
188
|
--pd-icon-size: 1.4rem;
|
|
201
189
|
--pd-icon-bg-col: transparent;
|
|
202
190
|
--pd-icon-stroke-col: var(--pd-menu-font-col, var(--pd-default-bg-col));
|
|
203
191
|
--pd-icon-col: var(--pd-menu-font-col, var(--pd-default-bg-col));
|
|
204
192
|
pointer-events: none;
|
|
205
|
-
}
|
|
193
|
+
}
|
|
206
194
|
|
|
207
195
|
.burgerLogo {
|
|
208
|
-
--pd-icon-size: 2rem;
|
|
209
|
-
--pd-icon-bg-col: transparent;
|
|
196
|
+
--pd-icon-size: 2rem;
|
|
197
|
+
--pd-icon-bg-col: transparent;
|
|
198
|
+
pointer-events: none;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.burger-menu {
|
|
202
|
+
display: flex;
|
|
203
|
+
gap: 0.3rem;
|
|
204
|
+
align-items: center;
|
|
205
|
+
cursor: pointer;
|
|
206
|
+
|
|
210
207
|
--pd-icon-stroke-col: var(--pd-menu-font-col, var(--pd-default-bg-col));
|
|
211
|
-
--pd-icon-col: var(--pd-default-hover-col);
|
|
208
|
+
--pd-icon-col: var(--pd-default-hover-col);
|
|
209
|
+
|
|
212
210
|
--pd-icon-stroke-col-active: var(--pd-menu-font-col, var(--pd-default-bg-col));
|
|
213
211
|
--pd-icon-col-active: lightgrey;
|
|
214
|
-
|
|
215
|
-
}
|
|
212
|
+
}
|
|
216
213
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
214
|
+
.burger-menu:hover {
|
|
215
|
+
--pd-icon-col: var(--pd-default-hover-col);
|
|
216
|
+
--pd-icon-col-active: var(--pd-default-hover-col);
|
|
217
|
+
--pd-icon-stroke-col: var(--pd-menu-font-col, var(--pd-default-bg-col));
|
|
218
|
+
--pd-icon-stroke-col-active: var(--pd-menu-font-col, var(--pd-default-bg-col));
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.burger-menu .item{
|
|
222
|
+
padding: 0;
|
|
223
|
+
font-size: 1.5em;
|
|
224
|
+
transition: color ease 0.5s;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.burger-menu:hover .item {
|
|
228
|
+
color: var(--pd-default-hover-col);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.logo-container {
|
|
221
232
|
max-width: var(--pd-menu-logo-maxwidth, 8rem);
|
|
222
233
|
width: 100%;
|
|
223
234
|
padding: var(--pd-menu-logo-padding, 2em);
|
|
@@ -309,7 +320,9 @@ export class PdMenu extends LitElement {
|
|
|
309
320
|
|
|
310
321
|
return html`
|
|
311
322
|
<div class="menu-container">
|
|
312
|
-
<
|
|
323
|
+
<div class="logo-container">
|
|
324
|
+
<slot @click="${this._logoClicked}" name="slotLogo"></slot>
|
|
325
|
+
</div>
|
|
313
326
|
<ul class="menu-ul ${this._smallScreen ? "burger-ul" : ""}">
|
|
314
327
|
${this._renderItems(this._smallScreen ? [...this.menuItems, ...this.topMenuItems] : this.menuItems, true, this._smallScreen)}
|
|
315
328
|
</ul>
|
|
@@ -338,7 +351,7 @@ export class PdMenu extends LitElement {
|
|
|
338
351
|
` : html`
|
|
339
352
|
<div class="burger-menu" @click="${this._toggleBurgerMenu}">
|
|
340
353
|
<pd-icon class="burgerLogo" icon="${burgerIcon}" ?activeIcon="${!this._activeBurgerMenu}"></pd-icon>
|
|
341
|
-
<span class="item">Menu</span>
|
|
354
|
+
<span class="item ${this._activeBurgerMenu ? 'active' : ''}">Menu</span>
|
|
342
355
|
</div>
|
|
343
356
|
`}
|
|
344
357
|
|
|
@@ -86,7 +86,7 @@ function Template({ menuItems, topMenuItems, color, logo, menuColor, locales, se
|
|
|
86
86
|
return html`
|
|
87
87
|
<pd-menu
|
|
88
88
|
style="--pd-menu-bg-col: ${menuColor || color};
|
|
89
|
-
--pd-menu-height: ${menuHeight ||
|
|
89
|
+
--pd-menu-height: ${menuHeight || 80}px;
|
|
90
90
|
transition: background-color 1s;"
|
|
91
91
|
.menuItems=${menuItems}
|
|
92
92
|
.topMenuItems=${topMenuItems}
|