@energysage/es-ds-components 5.5.4 → 5.5.5
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/CHANGELOG.md +7 -0
- package/app/components/es-mobile-nav.vue +37 -32
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.5.5](https://github.com/EnergySage/es-ds/compare/es-ds-components-v5.5.4...es-ds-components-v5.5.5) (2026-05-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* mobile nav hydration issue ([#1760](https://github.com/EnergySage/es-ds/issues/1760)) ([677f043](https://github.com/EnergySage/es-ds/commit/677f0430d82c0732a95811e9cdf7cf2806d8ba03))
|
|
9
|
+
|
|
3
10
|
## [5.5.4](https://github.com/EnergySage/es-ds/compare/es-ds-components-v5.5.3...es-ds-components-v5.5.4) (2026-05-26)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -155,16 +155,6 @@ watch(activeMenuId, async (newVal: string, oldVal: string) => {
|
|
|
155
155
|
class="es-mobile-nav d-flex"
|
|
156
156
|
disable-hover-trigger
|
|
157
157
|
disable-pointer-leave-close>
|
|
158
|
-
<!-- overlay -->
|
|
159
|
-
<teleport to="body">
|
|
160
|
-
<div
|
|
161
|
-
class="es-mobile-nav-overlay position-fixed"
|
|
162
|
-
:class="{
|
|
163
|
-
active: !!activeMenuId,
|
|
164
|
-
}"
|
|
165
|
-
@click="activeMenuId = ''" />
|
|
166
|
-
</teleport>
|
|
167
|
-
|
|
168
158
|
<!--
|
|
169
159
|
since the first level is a single item - the trigger to open the mobile nav -
|
|
170
160
|
prevent it from being a <ul> and <li>
|
|
@@ -179,39 +169,54 @@ watch(activeMenuId, async (newVal: string, oldVal: string) => {
|
|
|
179
169
|
</navigation-menu-item>
|
|
180
170
|
</navigation-menu-list>
|
|
181
171
|
</navigation-menu-root>
|
|
172
|
+
|
|
173
|
+
<!--
|
|
174
|
+
overlay teleport needs to live outside NavigationMenuRoot to prevent
|
|
175
|
+
a hydration issue caused by NavigationMenuRoot traversing its slot children
|
|
176
|
+
-->
|
|
177
|
+
<teleport to="body">
|
|
178
|
+
<transition name="es-mobile-nav-overlay">
|
|
179
|
+
<div
|
|
180
|
+
v-if="activeMenuId"
|
|
181
|
+
class="es-mobile-nav-overlay position-fixed"
|
|
182
|
+
:style="{ '--es-mobile-nav-animation-duration': ANIMATION_DURATION_MS }"
|
|
183
|
+
@click="activeMenuId = ''" />
|
|
184
|
+
</transition>
|
|
185
|
+
</teleport>
|
|
182
186
|
</template>
|
|
183
187
|
|
|
184
188
|
<style lang="scss" scoped>
|
|
185
189
|
@use '@energysage/es-ds-styles/scss/mixins/breakpoints' as breakpoints;
|
|
186
190
|
@use '@energysage/es-ds-styles/scss/variables';
|
|
187
191
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
192
|
+
.es-mobile-nav-overlay {
|
|
193
|
+
opacity: 0.3;
|
|
194
|
+
pointer-events: all;
|
|
195
|
+
|
|
196
|
+
@include breakpoints.media-breakpoint-up(sm) {
|
|
197
|
+
background-color: variables.$gray-900;
|
|
198
|
+
bottom: 0;
|
|
199
|
+
left: 0;
|
|
200
|
+
right: 0;
|
|
201
|
+
top: 0;
|
|
202
|
+
z-index: 1010;
|
|
203
|
+
}
|
|
196
204
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
205
|
+
@media not (prefers-reduced-motion) {
|
|
206
|
+
&-enter-active,
|
|
207
|
+
&-leave-active {
|
|
208
|
+
transition: opacity var(--es-mobile-nav-animation-duration) ease-in-out;
|
|
200
209
|
}
|
|
201
210
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
left: 0;
|
|
206
|
-
right: 0;
|
|
207
|
-
top: 0;
|
|
208
|
-
z-index: 1010;
|
|
209
|
-
|
|
210
|
-
@media not (prefers-reduced-motion) {
|
|
211
|
-
transition: opacity $animation-duration ease-in-out;
|
|
212
|
-
}
|
|
211
|
+
&-enter-from,
|
|
212
|
+
&-leave-to {
|
|
213
|
+
opacity: 0;
|
|
213
214
|
}
|
|
214
215
|
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.es-mobile-nav {
|
|
219
|
+
--mobile-nav-width: v-bind(widthPx);
|
|
215
220
|
|
|
216
221
|
:deep(> div) {
|
|
217
222
|
/* ensure the button is full-height with the rest of the nav bar items */
|