@energysage/es-ds-components 5.7.2 → 6.0.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.
- package/CHANGELOG.md +25 -0
- package/app/components/es-carousel.vue +38 -7
- package/app/composables/forms.ts +1 -1
- package/nuxt.config.ts +6 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [6.0.0](https://github.com/EnergySage/es-ds/compare/es-ds-components-v5.7.3...es-ds-components-v6.0.0) (2026-09-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* dependency updates ([#1782](https://github.com/EnergySage/es-ds/issues/1782))
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* dependency updates ([#1782](https://github.com/EnergySage/es-ds/issues/1782)) ([a0cdac3](https://github.com/EnergySage/es-ds/commit/a0cdac3e425d38b6636e631a380a362ffe7fb9bc))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Dependencies
|
|
16
|
+
|
|
17
|
+
* The following workspace dependencies were updated
|
|
18
|
+
* devDependencies
|
|
19
|
+
* @energysage/es-ds-styles bumped from ^3.5.9 to ^4.0.0
|
|
20
|
+
|
|
21
|
+
## [5.7.3](https://github.com/EnergySage/es-ds/compare/es-ds-components-v5.7.2...es-ds-components-v5.7.3) (2026-07-31)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* make EsCarousel autoplay stop upon interaction ([#1780](https://github.com/EnergySage/es-ds/issues/1780)) ([e5acf03](https://github.com/EnergySage/es-ds/commit/e5acf034f1af59d2ff25b5f50873c8a4312a1f5e))
|
|
27
|
+
|
|
3
28
|
## [5.7.2](https://github.com/EnergySage/es-ds/compare/es-ds-components-v5.7.1...es-ds-components-v5.7.2) (2026-07-29)
|
|
4
29
|
|
|
5
30
|
|
|
@@ -156,11 +156,14 @@ const emblaOptions = computed<EmblaOptionsType>(() => {
|
|
|
156
156
|
auto-advancing content is motion in its own right, so the preference should stop it entirely
|
|
157
157
|
rather than merely removing the slide animation. (Manual paging stays instant via `duration`.)
|
|
158
158
|
|
|
159
|
-
It is a plugin, added at creation time. stopOnInteraction is
|
|
160
|
-
|
|
159
|
+
It is a plugin, added at creation time. `stopOnInteraction` is on so that dragging the slides
|
|
160
|
+
stops autoplay and leaves it stopped — with it off, the plugin restarts the timer on pointer-up.
|
|
161
|
+
The plugin's own stop doesn't record anything on our side though, so we listen for the same
|
|
162
|
+
events (see onMounted) and route them through `stopAutoplay`, which remembers the stop and keeps
|
|
163
|
+
it from being undone by a reinitialization.
|
|
161
164
|
*/
|
|
162
165
|
const autoplayEnabled = props.autoPlay && !prefersReducedMotion.value;
|
|
163
|
-
const autoplayPlugins = autoplayEnabled ? [Autoplay({ delay: props.autoPlayInterval, stopOnInteraction:
|
|
166
|
+
const autoplayPlugins = autoplayEnabled ? [Autoplay({ delay: props.autoPlayInterval, stopOnInteraction: true })] : [];
|
|
164
167
|
|
|
165
168
|
// `emblaOptions` is passed as a ref, not unwrapped: the composable then watches it and reinitializes
|
|
166
169
|
// the carousel itself when the options change, skipping the work when the new options are equivalent.
|
|
@@ -202,15 +205,31 @@ const onReInit = () => {
|
|
|
202
205
|
}
|
|
203
206
|
};
|
|
204
207
|
|
|
205
|
-
const scrollPrev = () => emblaApi.value?.scrollPrev();
|
|
206
|
-
const scrollNext = () => emblaApi.value?.scrollNext();
|
|
207
|
-
const scrollTo = (index: number) => emblaApi.value?.scrollTo(index);
|
|
208
|
-
|
|
209
208
|
const stopAutoplay = () => {
|
|
210
209
|
autoplayStopped.value = true;
|
|
211
210
|
emblaApi.value?.plugins()?.autoplay?.stop();
|
|
212
211
|
};
|
|
213
212
|
|
|
213
|
+
/*
|
|
214
|
+
Paging the carousel yourself stops autoplay for good. Once someone has taken control, having the
|
|
215
|
+
carousel keep moving under them fights whatever they were trying to look at.
|
|
216
|
+
|
|
217
|
+
These three cover the arrows and the dots. Dragging and swiping are handled separately, by the
|
|
218
|
+
`pointerDown` listener in onMounted, since those never come through here.
|
|
219
|
+
*/
|
|
220
|
+
const scrollPrev = () => {
|
|
221
|
+
stopAutoplay();
|
|
222
|
+
emblaApi.value?.scrollPrev();
|
|
223
|
+
};
|
|
224
|
+
const scrollNext = () => {
|
|
225
|
+
stopAutoplay();
|
|
226
|
+
emblaApi.value?.scrollNext();
|
|
227
|
+
};
|
|
228
|
+
const scrollTo = (index: number) => {
|
|
229
|
+
stopAutoplay();
|
|
230
|
+
emblaApi.value?.scrollTo(index);
|
|
231
|
+
};
|
|
232
|
+
|
|
214
233
|
// stop carousel when user presses Escape key, in lieu of a pause button
|
|
215
234
|
// https://www.w3.org/WAI/WCAG22/Techniques/general/G187.html
|
|
216
235
|
const onEscapeKeyup = (e: KeyboardEvent) => {
|
|
@@ -298,6 +317,16 @@ onMounted(() => {
|
|
|
298
317
|
onReInit();
|
|
299
318
|
api.on('select', onSelect);
|
|
300
319
|
api.on('reInit', onReInit);
|
|
320
|
+
/*
|
|
321
|
+
The autoplay plugin stops itself on these two, but doesn't tell us, so a later
|
|
322
|
+
reinitialization would start it up again. Running our own handler on the same events
|
|
323
|
+
records the stop and keeps it stopped. Dragging and swiping arrive as `pointerDown`;
|
|
324
|
+
`slideFocusStart` is a slide receiving focus.
|
|
325
|
+
*/
|
|
326
|
+
if (autoplayEnabled) {
|
|
327
|
+
api.on('pointerDown', stopAutoplay);
|
|
328
|
+
api.on('slideFocusStart', stopAutoplay);
|
|
329
|
+
}
|
|
301
330
|
}
|
|
302
331
|
|
|
303
332
|
if (autoplayEnabled) {
|
|
@@ -310,6 +339,8 @@ onBeforeUnmount(() => {
|
|
|
310
339
|
if (api) {
|
|
311
340
|
api.off('select', onSelect);
|
|
312
341
|
api.off('reInit', onReInit);
|
|
342
|
+
api.off('pointerDown', stopAutoplay);
|
|
343
|
+
api.off('slideFocusStart', stopAutoplay);
|
|
313
344
|
}
|
|
314
345
|
document.removeEventListener('keyup', onEscapeKeyup);
|
|
315
346
|
});
|
package/app/composables/forms.ts
CHANGED
|
@@ -15,7 +15,7 @@ export function useEsForms<T extends { [key in keyof Vargs]: any }, Vargs extend
|
|
|
15
15
|
const isSubmitInProgress = computed(() => submitInProgress.value);
|
|
16
16
|
|
|
17
17
|
const getFields = (obj: any, valueKey = 'obj') => {
|
|
18
|
-
let objKeys
|
|
18
|
+
let objKeys;
|
|
19
19
|
try {
|
|
20
20
|
objKeys = Object.keys(obj);
|
|
21
21
|
|
package/nuxt.config.ts
CHANGED
|
@@ -39,6 +39,12 @@ export default defineNuxtConfig({
|
|
|
39
39
|
components: {
|
|
40
40
|
include: [],
|
|
41
41
|
},
|
|
42
|
+
// None of the PrimeVue composables (usePrimeVue, useStyle, useConfirm, useToast, useDialog)
|
|
43
|
+
// are used. Their auto-import presets also fail Nuxt's NUXT_B6005 resolution check because
|
|
44
|
+
// PrimeVue 3 has no `exports` map, so leave them out entirely.
|
|
45
|
+
composables: {
|
|
46
|
+
include: [],
|
|
47
|
+
},
|
|
42
48
|
options: {
|
|
43
49
|
unstyled: true,
|
|
44
50
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@energysage/es-ds-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "An EnergySage Vue component library",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@energysage/es-ds-styles": "^
|
|
32
|
+
"@energysage/es-ds-styles": "^4.0.0",
|
|
33
33
|
"@nuxt/eslint": "^1.14.0",
|
|
34
34
|
"@nuxtjs/google-fonts": "^3.2.0",
|
|
35
35
|
"@phosphor-icons/vue": "^2.2.1",
|