@kiva/kv-components 3.91.1 → 3.92.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 +28 -1
- package/vue/stories/KvCarousel.stories.js +14 -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.92.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.91.1...@kiva/kv-components@3.92.0) (2024-08-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* dotted version for carousel controls ([#444](https://github.com/kiva/kv-ui-elements/issues/444)) ([a719d75](https://github.com/kiva/kv-ui-elements/commit/a719d75ce7622695668fe1467bf1129d916800c2))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [3.91.1](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.91.0...@kiva/kv-components@3.91.1) (2024-08-14)
|
|
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.92.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"optional": true
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "fb2c7d62581911858d5b04e6d1dd81f371981a03"
|
|
86
86
|
}
|
package/vue/KvCarousel.vue
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
</div>
|
|
31
31
|
<!-- Carousel Controls -->
|
|
32
32
|
<div
|
|
33
|
-
v-if="slideIndicatorCount > 1"
|
|
33
|
+
v-if="slideIndicatorCount > 1 && !isDotted"
|
|
34
34
|
class="kv-carousel__controls tw-flex
|
|
35
35
|
tw-justify-between md:tw-justify-center tw-items-center
|
|
36
36
|
tw-mt-4 tw-w-full"
|
|
@@ -75,6 +75,26 @@
|
|
|
75
75
|
<span class="tw-sr-only">Show next slide</span>
|
|
76
76
|
</button>
|
|
77
77
|
</div>
|
|
78
|
+
<!-- Dotted Controls -->
|
|
79
|
+
<div
|
|
80
|
+
v-else-if="slideIndicatorCount > 1"
|
|
81
|
+
class="kv-carousel__controls tw-flex tw-justify-center tw-items-center tw-gap-1.5 tw-mt-4 tw-w-full"
|
|
82
|
+
>
|
|
83
|
+
<button
|
|
84
|
+
v-for="slide in slideIndicatorCount"
|
|
85
|
+
:key="slide"
|
|
86
|
+
@click="goToSlide(slide - 1)"
|
|
87
|
+
>
|
|
88
|
+
<div
|
|
89
|
+
class="tw-rounded-full tw-border tw-transition tw-duration-500 tw-ease-in-out"
|
|
90
|
+
:class="[
|
|
91
|
+
{ 'tw-bg-black tw-border-black tw-h-1.5 tw-w-1.5': currentIndex === slide - 1 },
|
|
92
|
+
{ 'tw-bg-tertiary tw-border-tertiary tw-h-1 tw-w-1': currentIndex !== slide - 1 }
|
|
93
|
+
]"
|
|
94
|
+
>
|
|
95
|
+
</div>
|
|
96
|
+
</button>
|
|
97
|
+
</div>
|
|
78
98
|
<!-- Aside Buttons -->
|
|
79
99
|
<template v-if="asideControls">
|
|
80
100
|
<div
|
|
@@ -192,6 +212,13 @@ export default {
|
|
|
192
212
|
type: Boolean,
|
|
193
213
|
default: false,
|
|
194
214
|
},
|
|
215
|
+
/**
|
|
216
|
+
* Dotted controls version of the carousel
|
|
217
|
+
* */
|
|
218
|
+
isDotted: {
|
|
219
|
+
type: Boolean,
|
|
220
|
+
default: false,
|
|
221
|
+
},
|
|
195
222
|
},
|
|
196
223
|
emits: [
|
|
197
224
|
'change',
|
|
@@ -394,3 +394,17 @@ export const AsideControls = () => ({
|
|
|
394
394
|
</kv-carousel>
|
|
395
395
|
`,
|
|
396
396
|
});
|
|
397
|
+
|
|
398
|
+
export const Dotted = () => ({
|
|
399
|
+
components: {
|
|
400
|
+
KvCarousel,
|
|
401
|
+
},
|
|
402
|
+
template: `
|
|
403
|
+
<kv-carousel
|
|
404
|
+
style="max-width: 400px;"
|
|
405
|
+
is-dotted="true"
|
|
406
|
+
>
|
|
407
|
+
${defaultCarouselSlides}
|
|
408
|
+
</kv-carousel>
|
|
409
|
+
`,
|
|
410
|
+
});
|