@kiva/kv-components 3.5.0 → 3.5.1

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.5.1](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.5.0...@kiva/kv-components@3.5.1) (2022-09-13)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **KvCarousel:** incorrect slide marked as current ([f496e7c](https://github.com/kiva/kv-ui-elements/commit/f496e7c0a8fdebd1f6e003f4c79b57a5926b0c4a))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.5.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.4.0...@kiva/kv-components@3.5.0) (2022-09-07)
7
18
 
8
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "3.5.0",
3
+ "version": "3.5.1",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -68,5 +68,5 @@
68
68
  "optional": true
69
69
  }
70
70
  },
71
- "gitHead": "09af63c2169df1b45e40de57569ce5b51b6141fc"
71
+ "gitHead": "2d6daa94997131992d6c86f8367504c560ea9e20"
72
72
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <section
3
3
  ref="rootEl"
4
- class="tw-overflow-hidden tw-w-full"
4
+ class="kv-carousel tw-overflow-hidden tw-w-full"
5
5
  aria-label="carousel"
6
6
  >
7
7
  <!-- Carousel Content -->
@@ -15,8 +15,8 @@
15
15
  class="tw-flex-none tw-relative"
16
16
  role="group"
17
17
  :aria-label="`slide ${index + 1} of ${componentSlotKeys.length}`"
18
- :aria-current="true ? currentIndex + 1 === index : false"
19
- :aria-hidden="isAriaHidden(index)"
18
+ :aria-current="currentIndex === index ? 'true' : 'false'"
19
+ :aria-hidden="isAriaHidden(index)? 'true' : 'false'"
20
20
  :tab-index="isAriaHidden(index) ? '-1' : false"
21
21
  :class="{ 'tw-w-full': !multipleSlidesVisible || slideMaxWidth }"
22
22
  :style="slideMaxWidth ? `max-width:${slideMaxWidth}` :''"
@@ -29,7 +29,7 @@
29
29
  <!-- Carousel Controls -->
30
30
  <div
31
31
  v-if="slideIndicatorCount > 1"
32
- class="tw-flex
32
+ class="kv-carousel__controls tw-flex
33
33
  tw-justify-between md:tw-justify-center tw-items-center
34
34
  tw-mt-4 tw-w-full"
35
35
  >
@@ -239,14 +239,12 @@ export default {
239
239
  * If the slide is not completely in view in the carousel
240
240
  * it should be aria-hidden
241
241
  *
242
- * @param {Number} index The current index of the slide (starts at 1)
242
+ * @param {Number} index The current index of the slide
243
243
  * @returns {Boolean}
244
244
  */
245
245
  const isAriaHidden = (index) => {
246
- // Index starts at 1
247
- // Embla starts at 0
248
246
  if (embla.value) {
249
- return !embla.value.slidesInView(true).includes(index - 1);
247
+ return !embla.value.slidesInView(true).includes(index);
250
248
  }
251
249
  return false;
252
250
  };