@kiva/kv-components 4.8.4 → 4.8.6
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 +22 -0
- package/dist/components/KvCarousel.vue +0 -3
- package/dist/components/KvSideSheet.vue +5 -12
- package/dist/components/KvVerticalCarousel.vue +0 -3
- package/dist/utils/carousels.cjs +0 -7
- package/dist/utils/carousels.js +1 -1
- package/dist/utils/{chunk-NP3OH5YJ.js → chunk-TR3NWLTZ.js} +0 -7
- package/dist/utils/index.cjs +0 -7
- package/dist/utils/index.js +1 -1
- package/package.json +2 -2
- package/utils/carousels.js +1 -8
- package/vue/KvCarousel.vue +0 -3
- package/vue/KvSideSheet.vue +5 -12
- package/vue/KvVerticalCarousel.vue +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.8.6](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@4.8.5...@kiva/kv-components@4.8.6) (2025-01-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* adjust modal position and remove scroll when visible ([af17714](https://github.com/kiva/kv-ui-elements/commit/af17714803c84ca2b4f3d9f1a9f7730303429530))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [4.8.5](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@4.8.4...@kiva/kv-components@4.8.5) (2025-01-10)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* click events after removal of clickAllowed ([58388bb](https://github.com/kiva/kv-ui-elements/commit/58388bbfbf1b16a803a6f6e8a327babebb6393e2))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [4.8.4](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@4.8.3...@kiva/kv-components@4.8.4) (2025-01-10)
|
|
7
29
|
|
|
8
30
|
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
'tw-mx-auto aside-controls-content': asideControls,
|
|
13
13
|
'circle-carousel': inCircle
|
|
14
14
|
}"
|
|
15
|
-
@click.capture="onCarouselContainerClick"
|
|
16
15
|
>
|
|
17
16
|
<div
|
|
18
17
|
v-for="(slotName, index) in componentSlotKeys"
|
|
@@ -251,7 +250,6 @@ export default {
|
|
|
251
250
|
isAriaHidden,
|
|
252
251
|
isAutoplaying,
|
|
253
252
|
nextIndex,
|
|
254
|
-
onCarouselContainerClick,
|
|
255
253
|
previousIndex,
|
|
256
254
|
reInit,
|
|
257
255
|
reInitVisible,
|
|
@@ -275,7 +273,6 @@ export default {
|
|
|
275
273
|
mdiChevronLeft,
|
|
276
274
|
mdiChevronRight,
|
|
277
275
|
nextIndex,
|
|
278
|
-
onCarouselContainerClick,
|
|
279
276
|
previousIndex,
|
|
280
277
|
reInit,
|
|
281
278
|
reInitVisible,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
v-if="visible"
|
|
4
|
-
class="tw-block lg:tw-mt-0 tw-
|
|
4
|
+
class="tw-block lg:tw-mt-0 tw-fixed tw-inset-0
|
|
5
5
|
tw-bg-black tw-transition-all md:tw-duration-150 tw-z-modal"
|
|
6
6
|
:class="{
|
|
7
7
|
'tw-bg-opacity-0 tw-delay-300': !open,
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
@click.self="closeSideSheet"
|
|
11
11
|
>
|
|
12
12
|
<div
|
|
13
|
-
class="tw-
|
|
13
|
+
class="tw-fixed tw-right-0 tw-transition-all tw-duration-300 tw-bg-white
|
|
14
14
|
tw-overflow-y-auto tw-p-2"
|
|
15
15
|
:class="{
|
|
16
16
|
'tw-w-0 tw-delay-200 tw-opacity-0': !open,
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
</button>
|
|
48
48
|
</div>
|
|
49
49
|
<div
|
|
50
|
-
class="tw-p-4 tw-overflow-y-auto tw-transition-opacity tw-duration-500 tw-delay-200
|
|
50
|
+
class="tw-p-4 tw-overflow-y-auto tw-transition-opacity tw-duration-500 tw-delay-200
|
|
51
|
+
tw-overscroll-y-contain"
|
|
51
52
|
:class="{
|
|
52
53
|
'tw-opacity-0': !open,
|
|
53
54
|
'tw-opacity-full': open,
|
|
@@ -119,18 +120,12 @@ export default {
|
|
|
119
120
|
const open = ref(false);
|
|
120
121
|
const initialStyles = ref({});
|
|
121
122
|
const modalStyles = ref({});
|
|
122
|
-
const userScrollPosition = ref(0);
|
|
123
123
|
|
|
124
124
|
const closeSideSheet = () => {
|
|
125
125
|
open.value = false;
|
|
126
126
|
kvTrackFunction.value(trackEventCategory.value, 'click', 'side-sheet-closed');
|
|
127
127
|
|
|
128
|
-
if (animationSourceElement.value
|
|
129
|
-
window.scrollTo({
|
|
130
|
-
top: userScrollPosition.value,
|
|
131
|
-
behavior: 'smooth',
|
|
132
|
-
});
|
|
133
|
-
|
|
128
|
+
if (animationSourceElement.value) {
|
|
134
129
|
modalStyles.value = {
|
|
135
130
|
...initialStyles.value,
|
|
136
131
|
transition: 'all 0.5s ease-in-out',
|
|
@@ -160,8 +155,6 @@ export default {
|
|
|
160
155
|
const height = rect?.height ?? 0;
|
|
161
156
|
|
|
162
157
|
if (top || left || width || height) {
|
|
163
|
-
userScrollPosition.value = window.scrollY ?? 0;
|
|
164
|
-
|
|
165
158
|
initialStyles.value = {
|
|
166
159
|
position: 'fixed',
|
|
167
160
|
top: `${top}px`,
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
<div
|
|
10
10
|
class="tw-flex tw-flex-col"
|
|
11
11
|
:style="`height: ${heightStyle}`"
|
|
12
|
-
@click.capture="onCarouselContainerClick"
|
|
13
12
|
>
|
|
14
13
|
<div
|
|
15
14
|
v-for="(slotName, index) in componentSlotKeys"
|
|
@@ -177,7 +176,6 @@ export default {
|
|
|
177
176
|
isAriaHidden,
|
|
178
177
|
isAutoplaying,
|
|
179
178
|
nextIndex,
|
|
180
|
-
onCarouselContainerClick,
|
|
181
179
|
previousIndex,
|
|
182
180
|
reInit,
|
|
183
181
|
reInitVisible,
|
|
@@ -205,7 +203,6 @@ export default {
|
|
|
205
203
|
mdiChevronDown,
|
|
206
204
|
mdiChevronUp,
|
|
207
205
|
nextIndex,
|
|
208
|
-
onCarouselContainerClick,
|
|
209
206
|
previousIndex,
|
|
210
207
|
reInit,
|
|
211
208
|
reInitVisible,
|
package/dist/utils/carousels.cjs
CHANGED
|
@@ -128,12 +128,6 @@ function carouselUtil(props, { emit, slots }, extraEmblaOptions) {
|
|
|
128
128
|
slides.value = embla.value.slideNodes();
|
|
129
129
|
slideIndicatorListLength();
|
|
130
130
|
};
|
|
131
|
-
const onCarouselContainerClick = (e) => {
|
|
132
|
-
if (embla.value) {
|
|
133
|
-
e.preventDefault();
|
|
134
|
-
e.stopPropagation();
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
131
|
const isAriaHidden = (index) => {
|
|
138
132
|
if (embla.value) {
|
|
139
133
|
return !embla.value.slidesInView(true).includes(index);
|
|
@@ -214,7 +208,6 @@ function carouselUtil(props, { emit, slots }, extraEmblaOptions) {
|
|
|
214
208
|
goToSlide,
|
|
215
209
|
reInit,
|
|
216
210
|
reInitVisible,
|
|
217
|
-
onCarouselContainerClick,
|
|
218
211
|
isAriaHidden,
|
|
219
212
|
isAutoplaying,
|
|
220
213
|
slideIndicatorListLength,
|
package/dist/utils/carousels.js
CHANGED
|
@@ -92,12 +92,6 @@ function carouselUtil(props, { emit, slots }, extraEmblaOptions) {
|
|
|
92
92
|
slides.value = embla.value.slideNodes();
|
|
93
93
|
slideIndicatorListLength();
|
|
94
94
|
};
|
|
95
|
-
const onCarouselContainerClick = (e) => {
|
|
96
|
-
if (embla.value) {
|
|
97
|
-
e.preventDefault();
|
|
98
|
-
e.stopPropagation();
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
95
|
const isAriaHidden = (index) => {
|
|
102
96
|
if (embla.value) {
|
|
103
97
|
return !embla.value.slidesInView(true).includes(index);
|
|
@@ -178,7 +172,6 @@ function carouselUtil(props, { emit, slots }, extraEmblaOptions) {
|
|
|
178
172
|
goToSlide,
|
|
179
173
|
reInit,
|
|
180
174
|
reInitVisible,
|
|
181
|
-
onCarouselContainerClick,
|
|
182
175
|
isAriaHidden,
|
|
183
176
|
isAutoplaying,
|
|
184
177
|
slideIndicatorListLength,
|
package/dist/utils/index.cjs
CHANGED
|
@@ -236,12 +236,6 @@ function carouselUtil(props, { emit, slots }, extraEmblaOptions) {
|
|
|
236
236
|
slides.value = embla.value.slideNodes();
|
|
237
237
|
slideIndicatorListLength();
|
|
238
238
|
};
|
|
239
|
-
const onCarouselContainerClick = (e) => {
|
|
240
|
-
if (embla.value) {
|
|
241
|
-
e.preventDefault();
|
|
242
|
-
e.stopPropagation();
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
239
|
const isAriaHidden = (index) => {
|
|
246
240
|
if (embla.value) {
|
|
247
241
|
return !embla.value.slidesInView(true).includes(index);
|
|
@@ -322,7 +316,6 @@ function carouselUtil(props, { emit, slots }, extraEmblaOptions) {
|
|
|
322
316
|
goToSlide,
|
|
323
317
|
reInit,
|
|
324
318
|
reInitVisible,
|
|
325
|
-
onCarouselContainerClick,
|
|
326
319
|
isAriaHidden,
|
|
327
320
|
isAutoplaying,
|
|
328
321
|
slideIndicatorListLength,
|
package/dist/utils/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"peerDependencies": {
|
|
99
99
|
"vue": ">=3.0.0"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "205d010ba5569aee5146faeb28040dd8a0adebde"
|
|
102
102
|
}
|
package/utils/carousels.js
CHANGED
|
@@ -126,13 +126,7 @@ export function carouselUtil(props, { emit, slots }, extraEmblaOptions) {
|
|
|
126
126
|
slides.value = embla.value.slideNodes();
|
|
127
127
|
slideIndicatorListLength();
|
|
128
128
|
};
|
|
129
|
-
|
|
130
|
-
// If we're dragging, block click handlers within slides
|
|
131
|
-
if (embla.value) {
|
|
132
|
-
e.preventDefault();
|
|
133
|
-
e.stopPropagation();
|
|
134
|
-
}
|
|
135
|
-
};
|
|
129
|
+
|
|
136
130
|
/**
|
|
137
131
|
* If the slide is not completely in view in the carousel
|
|
138
132
|
* it should be aria-hidden
|
|
@@ -250,7 +244,6 @@ export function carouselUtil(props, { emit, slots }, extraEmblaOptions) {
|
|
|
250
244
|
goToSlide,
|
|
251
245
|
reInit,
|
|
252
246
|
reInitVisible,
|
|
253
|
-
onCarouselContainerClick,
|
|
254
247
|
isAriaHidden,
|
|
255
248
|
isAutoplaying,
|
|
256
249
|
slideIndicatorListLength,
|
package/vue/KvCarousel.vue
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
'tw-mx-auto aside-controls-content': asideControls,
|
|
13
13
|
'circle-carousel': inCircle
|
|
14
14
|
}"
|
|
15
|
-
@click.capture="onCarouselContainerClick"
|
|
16
15
|
>
|
|
17
16
|
<div
|
|
18
17
|
v-for="(slotName, index) in componentSlotKeys"
|
|
@@ -251,7 +250,6 @@ export default {
|
|
|
251
250
|
isAriaHidden,
|
|
252
251
|
isAutoplaying,
|
|
253
252
|
nextIndex,
|
|
254
|
-
onCarouselContainerClick,
|
|
255
253
|
previousIndex,
|
|
256
254
|
reInit,
|
|
257
255
|
reInitVisible,
|
|
@@ -275,7 +273,6 @@ export default {
|
|
|
275
273
|
mdiChevronLeft,
|
|
276
274
|
mdiChevronRight,
|
|
277
275
|
nextIndex,
|
|
278
|
-
onCarouselContainerClick,
|
|
279
276
|
previousIndex,
|
|
280
277
|
reInit,
|
|
281
278
|
reInitVisible,
|
package/vue/KvSideSheet.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
v-if="visible"
|
|
4
|
-
class="tw-block lg:tw-mt-0 tw-
|
|
4
|
+
class="tw-block lg:tw-mt-0 tw-fixed tw-inset-0
|
|
5
5
|
tw-bg-black tw-transition-all md:tw-duration-150 tw-z-modal"
|
|
6
6
|
:class="{
|
|
7
7
|
'tw-bg-opacity-0 tw-delay-300': !open,
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
@click.self="closeSideSheet"
|
|
11
11
|
>
|
|
12
12
|
<div
|
|
13
|
-
class="tw-
|
|
13
|
+
class="tw-fixed tw-right-0 tw-transition-all tw-duration-300 tw-bg-white
|
|
14
14
|
tw-overflow-y-auto tw-p-2"
|
|
15
15
|
:class="{
|
|
16
16
|
'tw-w-0 tw-delay-200 tw-opacity-0': !open,
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
</button>
|
|
48
48
|
</div>
|
|
49
49
|
<div
|
|
50
|
-
class="tw-p-4 tw-overflow-y-auto tw-transition-opacity tw-duration-500 tw-delay-200
|
|
50
|
+
class="tw-p-4 tw-overflow-y-auto tw-transition-opacity tw-duration-500 tw-delay-200
|
|
51
|
+
tw-overscroll-y-contain"
|
|
51
52
|
:class="{
|
|
52
53
|
'tw-opacity-0': !open,
|
|
53
54
|
'tw-opacity-full': open,
|
|
@@ -119,18 +120,12 @@ export default {
|
|
|
119
120
|
const open = ref(false);
|
|
120
121
|
const initialStyles = ref({});
|
|
121
122
|
const modalStyles = ref({});
|
|
122
|
-
const userScrollPosition = ref(0);
|
|
123
123
|
|
|
124
124
|
const closeSideSheet = () => {
|
|
125
125
|
open.value = false;
|
|
126
126
|
kvTrackFunction.value(trackEventCategory.value, 'click', 'side-sheet-closed');
|
|
127
127
|
|
|
128
|
-
if (animationSourceElement.value
|
|
129
|
-
window.scrollTo({
|
|
130
|
-
top: userScrollPosition.value,
|
|
131
|
-
behavior: 'smooth',
|
|
132
|
-
});
|
|
133
|
-
|
|
128
|
+
if (animationSourceElement.value) {
|
|
134
129
|
modalStyles.value = {
|
|
135
130
|
...initialStyles.value,
|
|
136
131
|
transition: 'all 0.5s ease-in-out',
|
|
@@ -160,8 +155,6 @@ export default {
|
|
|
160
155
|
const height = rect?.height ?? 0;
|
|
161
156
|
|
|
162
157
|
if (top || left || width || height) {
|
|
163
|
-
userScrollPosition.value = window.scrollY ?? 0;
|
|
164
|
-
|
|
165
158
|
initialStyles.value = {
|
|
166
159
|
position: 'fixed',
|
|
167
160
|
top: `${top}px`,
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
<div
|
|
10
10
|
class="tw-flex tw-flex-col"
|
|
11
11
|
:style="`height: ${heightStyle}`"
|
|
12
|
-
@click.capture="onCarouselContainerClick"
|
|
13
12
|
>
|
|
14
13
|
<div
|
|
15
14
|
v-for="(slotName, index) in componentSlotKeys"
|
|
@@ -177,7 +176,6 @@ export default {
|
|
|
177
176
|
isAriaHidden,
|
|
178
177
|
isAutoplaying,
|
|
179
178
|
nextIndex,
|
|
180
|
-
onCarouselContainerClick,
|
|
181
179
|
previousIndex,
|
|
182
180
|
reInit,
|
|
183
181
|
reInitVisible,
|
|
@@ -205,7 +203,6 @@ export default {
|
|
|
205
203
|
mdiChevronDown,
|
|
206
204
|
mdiChevronUp,
|
|
207
205
|
nextIndex,
|
|
208
|
-
onCarouselContainerClick,
|
|
209
206
|
previousIndex,
|
|
210
207
|
reInit,
|
|
211
208
|
reInitVisible,
|