@energysage/es-ds-components 5.6.2 → 5.7.1
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 +14 -0
- package/app/components/es-sticky-bar.vue +20 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.7.1](https://github.com/EnergySage/es-ds/compare/es-ds-components-v5.7.0...es-ds-components-v5.7.1) (2026-06-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* floating sticky bar no longer causes mobile layout shift ([#1773](https://github.com/EnergySage/es-ds/issues/1773)) ([077eb77](https://github.com/EnergySage/es-ds/commit/077eb77f062df07a2e8714e8146c842e11c1b2db))
|
|
9
|
+
|
|
10
|
+
## [5.7.0](https://github.com/EnergySage/es-ds/compare/es-ds-components-v5.6.2...es-ds-components-v5.7.0) (2026-06-11)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* enable EsStickyBar to float above page content ([#1771](https://github.com/EnergySage/es-ds/issues/1771)) ([08a420c](https://github.com/EnergySage/es-ds/commit/08a420c2d95ed52328c991346217b2955fe88995))
|
|
16
|
+
|
|
3
17
|
## [5.6.2](https://github.com/EnergySage/es-ds/compare/es-ds-components-v5.6.1...es-ds-components-v5.6.2) (2026-06-03)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -7,9 +7,13 @@ import {
|
|
|
7
7
|
} from '../utils/menu-bar';
|
|
8
8
|
|
|
9
9
|
interface IProps {
|
|
10
|
+
floatStartingAtBreakpoint?: 'lg' | 'xl' | 'xxl' | '';
|
|
11
|
+
transparentColor?: string;
|
|
10
12
|
transparentStartingAtBreakpoint?: 'lg' | 'xl' | 'xxl' | '';
|
|
11
13
|
}
|
|
12
14
|
withDefaults(defineProps<IProps>(), {
|
|
15
|
+
floatStartingAtBreakpoint: '',
|
|
16
|
+
transparentColor: 'transparent',
|
|
13
17
|
transparentStartingAtBreakpoint: '',
|
|
14
18
|
});
|
|
15
19
|
|
|
@@ -185,6 +189,7 @@ onUnmounted(() => {
|
|
|
185
189
|
class="es-sticky-bar"
|
|
186
190
|
:class="[
|
|
187
191
|
`es-sticky-bar--${barState}`,
|
|
192
|
+
floatStartingAtBreakpoint && `es-sticky-bar--float-from-${floatStartingAtBreakpoint}`,
|
|
188
193
|
transparentStartingAtBreakpoint && `es-sticky-bar--transparent-from-${transparentStartingAtBreakpoint}`,
|
|
189
194
|
{
|
|
190
195
|
'es-sticky-bar--no-transition': suppressTransition,
|
|
@@ -196,9 +201,11 @@ onUnmounted(() => {
|
|
|
196
201
|
@mouseout="isHovered = false">
|
|
197
202
|
<slot />
|
|
198
203
|
</div>
|
|
199
|
-
<!-- holds the bar's space in normal flow when the bar is absolutely or fixed positioned
|
|
204
|
+
<!-- holds the bar's space in normal flow when the bar is absolutely or fixed positioned;
|
|
205
|
+
hidden at/above the float breakpoint, where the bar overlaps page content instead -->
|
|
200
206
|
<div
|
|
201
207
|
v-if="barState !== 'static'"
|
|
208
|
+
:class="floatStartingAtBreakpoint && `d-${floatStartingAtBreakpoint}-none`"
|
|
202
209
|
:style="{ height: `${barHeight}px` }"
|
|
203
210
|
aria-hidden="true" />
|
|
204
211
|
</template>
|
|
@@ -224,12 +231,23 @@ $shadow: 0 0 6px 0 rgba(34, 38, 51, 0.2);
|
|
|
224
231
|
@each $bp in (lg, xl, xxl) {
|
|
225
232
|
&--transparent-from-#{$bp} {
|
|
226
233
|
@include breakpoints.media-breakpoint-up($bp) {
|
|
227
|
-
background-color:
|
|
234
|
+
background-color: v-bind(transparentColor);
|
|
228
235
|
box-shadow: none;
|
|
229
236
|
}
|
|
230
237
|
}
|
|
231
238
|
}
|
|
232
239
|
|
|
240
|
+
// while still in the pre-mount static state, take the bar out of flow at/above the float
|
|
241
|
+
// breakpoint so it overlaps page content from the first paint; below the breakpoint the
|
|
242
|
+
// bar stays in flow until mount (when the spacer appears), avoiding a layout shift
|
|
243
|
+
@each $bp in (lg, xl, xxl) {
|
|
244
|
+
&--float-from-#{$bp}.es-sticky-bar--static {
|
|
245
|
+
@include breakpoints.media-breakpoint-up($bp) {
|
|
246
|
+
position: absolute;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
233
251
|
@media not (prefers-reduced-motion) {
|
|
234
252
|
transition:
|
|
235
253
|
background 0.2s ease-in-out,
|