@kiva/kv-components 3.77.0 → 3.78.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 +11 -0
- package/package.json +2 -2
- package/vue/KvCarousel.vue +2 -1
- package/vue/stories/KvCarousel.stories.js +43 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
# [3.78.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.77.0...@kiva/kv-components@3.78.0) (2024-05-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* start index added to kvcarousel component ([#398](https://github.com/kiva/kv-ui-elements/issues/398)) ([0477155](https://github.com/kiva/kv-ui-elements/commit/0477155d8bb02cce80777dbb3d2296b63d146ea8))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.77.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.76.0...@kiva/kv-components@3.77.0) (2024-05-08)
|
|
7
18
|
|
|
8
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.78.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"optional": true
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "d2a856513aff1fdd814ad021bff7a4e64c408b8e"
|
|
79
79
|
}
|
package/vue/KvCarousel.vue
CHANGED
|
@@ -146,7 +146,8 @@ export default {
|
|
|
146
146
|
const rootEl = ref(null);
|
|
147
147
|
const embla = ref(null);
|
|
148
148
|
const slides = ref([]);
|
|
149
|
-
const
|
|
149
|
+
const startIndex = emblaOptions.value?.startIndex ?? 0;
|
|
150
|
+
const currentIndex = ref(startIndex);
|
|
150
151
|
// The indicator count may differ from the slide count when multiple slides are in view
|
|
151
152
|
const slideIndicatorCount = ref(0);
|
|
152
153
|
|
|
@@ -310,3 +310,46 @@ export const ResponsiveSlides = () => ({
|
|
|
310
310
|
</kv-carousel>
|
|
311
311
|
`,
|
|
312
312
|
});
|
|
313
|
+
|
|
314
|
+
export const CustomStartIndex = () => ({
|
|
315
|
+
components: {
|
|
316
|
+
KvCarousel,
|
|
317
|
+
KvButton,
|
|
318
|
+
},
|
|
319
|
+
template: `
|
|
320
|
+
<kv-carousel
|
|
321
|
+
:embla-options="{ loop: false, align: 'center', startIndex: 1 }"
|
|
322
|
+
:multiple-slides-visible="true"
|
|
323
|
+
slides-to-scroll="visible"
|
|
324
|
+
style="max-width: 1072px;"
|
|
325
|
+
>
|
|
326
|
+
<template #slide1>
|
|
327
|
+
${generateLoanCardTemplate(1)}
|
|
328
|
+
</template>
|
|
329
|
+
<template #slide2>
|
|
330
|
+
${generateLoanCardTemplate(2)}
|
|
331
|
+
</template>
|
|
332
|
+
<template #slide3>
|
|
333
|
+
${generateLoanCardTemplate(3)}
|
|
334
|
+
</template>
|
|
335
|
+
<template #slide4>
|
|
336
|
+
${generateLoanCardTemplate(4)}
|
|
337
|
+
</template>
|
|
338
|
+
<template #slide5>
|
|
339
|
+
${generateLoanCardTemplate(5)}
|
|
340
|
+
</template>
|
|
341
|
+
<template #slide6>
|
|
342
|
+
${generateLoanCardTemplate(6)}
|
|
343
|
+
</template>
|
|
344
|
+
<template #slide7>
|
|
345
|
+
${generateLoanCardTemplate(7)}
|
|
346
|
+
</template>
|
|
347
|
+
<template #slide8>
|
|
348
|
+
${generateLoanCardTemplate(8)}
|
|
349
|
+
</template>
|
|
350
|
+
<template #slide9>
|
|
351
|
+
${generateLoanCardTemplate(9)}
|
|
352
|
+
</template>
|
|
353
|
+
</kv-carousel>
|
|
354
|
+
`,
|
|
355
|
+
});
|