@kiva/kv-components 3.92.1 → 3.93.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 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.93.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.92.1...@kiva/kv-components@3.93.0) (2024-08-22)
7
+
8
+
9
+ ### Features
10
+
11
+ * carousel circle effect ([c982be4](https://github.com/kiva/kv-ui-elements/commit/c982be4d088f18cb53b5d97b3071fa7dac72e1c6))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [3.92.1](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.92.0...@kiva/kv-components@3.92.1) (2024-08-19)
7
18
 
8
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "3.92.1",
3
+ "version": "3.93.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": "52085aeb1c92162fd732cd3fe4cb9839cdd49b16"
85
+ "gitHead": "56fc9a0c3f8657e2bc69c6acecf01009ec86ee57"
86
86
  }
@@ -8,7 +8,10 @@
8
8
  <!-- Carousel Content -->
9
9
  <div
10
10
  class="tw-flex tw-gap-x-4"
11
- :class="{ 'tw-mx-auto aside-controls-content': asideControls }"
11
+ :class="{
12
+ 'tw-mx-auto aside-controls-content': asideControls,
13
+ 'circle-carousel': inCircle
14
+ }"
12
15
  @click.capture="onCarouselContainerClick"
13
16
  >
14
17
  <div
@@ -20,7 +23,7 @@
20
23
  :aria-current="currentIndex === index ? 'true' : 'false'"
21
24
  :aria-hidden="isAriaHidden(index)? 'true' : 'false'"
22
25
  :tab-index="isAriaHidden(index) ? '-1' : false"
23
- :class="{ 'tw-w-full': !multipleSlidesVisible || slideMaxWidth }"
26
+ :class="{ 'tw-w-full': !multipleSlidesVisible || slideMaxWidth, 'cirle-slide': inCircle }"
24
27
  :style="slideMaxWidth ? `max-width:${slideMaxWidth}` :''"
25
28
  >
26
29
  <slot
@@ -219,6 +222,13 @@ export default {
219
222
  type: Boolean,
220
223
  default: false,
221
224
  },
225
+ /**
226
+ * Enables carousel slides to have a circle effect
227
+ * */
228
+ inCircle: {
229
+ type: Boolean,
230
+ default: false,
231
+ },
222
232
  },
223
233
  emits: [
224
234
  'change',
@@ -414,4 +424,23 @@ export default {
414
424
  width: 82%;
415
425
  }
416
426
  }
427
+
428
+ .cirle-slide {
429
+ width: auto;
430
+ }
431
+
432
+ .cirle-slide.is-selected >>> img {
433
+ opacity: 1;
434
+ transform: scale(1);
435
+ max-width: 300px;
436
+ }
437
+
438
+ .cirle-slide:not(.is-selected) >>> img {
439
+ opacity: 0.5;
440
+ transform: scale(0.5);
441
+ }
442
+
443
+ .circle-carousel {
444
+ margin: 0 auto;
445
+ }
417
446
  </style>
@@ -402,7 +402,23 @@ export const Dotted = () => ({
402
402
  template: `
403
403
  <kv-carousel
404
404
  style="max-width: 400px;"
405
- is-dotted="true"
405
+ :is-dotted="true"
406
+ >
407
+ ${defaultCarouselSlides}
408
+ </kv-carousel>
409
+ `,
410
+ });
411
+
412
+ export const ThreeDimensional = () => ({
413
+ components: {
414
+ KvCarousel,
415
+ },
416
+ template: `
417
+ <kv-carousel
418
+ :embla-options="{ loop: false, align: 'center' }"
419
+ style="max-width: 600px;"
420
+ :is-dotted="true"
421
+ :in-circle="true"
406
422
  >
407
423
  ${defaultCarouselSlides}
408
424
  </kv-carousel>