@asd20/ui 3.2.453 → 3.2.455

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/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "*.scss",
6
6
  "*.vue"
7
7
  ],
8
- "version": "3.2.453",
8
+ "version": "3.2.455",
9
9
  "private": false,
10
10
  "license": "MIT",
11
11
  "repository": {
@@ -1,25 +1,32 @@
1
1
  <template>
2
2
  <div class="asd20-swiper" :style="styles">
3
- <!-- <button
3
+ <button
4
+ slot="before-wrapper"
4
5
  tabindex="-1"
5
6
  ref="prev"
6
7
  title="Previous"
7
8
  class="asd20-swiper__prev"
8
9
  >
9
10
  <span>Previous</span>
10
- </button> -->
11
+ </button>
11
12
  <div ref="swiper" class="swiper-container">
12
- <slot name="before-wrapper" />
13
13
  <div class="swiper-wrapper">
14
+ <slot name="before-wrapper" />
15
+
14
16
  <slot :swiper="index" />
17
+ <slot name="after-wrapper" />
15
18
  </div>
16
19
  <div ref="pagination" class="swiper-pagination" />
17
- <slot name="after-wrapper" />
18
20
  </div>
19
-
20
- <!-- <button tabindex="-1" ref="next" title="Next" class="asd20-swiper__next">
21
+ <button
22
+ slot="after-wrapper"
23
+ tabindex="-1"
24
+ ref="next"
25
+ title="Next"
26
+ class="asd20-swiper__next"
27
+ >
21
28
  <span>Next</span>
22
- </button> -->
29
+ </button>
23
30
  </div>
24
31
  </template>
25
32
 
@@ -80,6 +87,12 @@ export default {
80
87
  this.controlled = swiper
81
88
  this.recreateSwiper()
82
89
  },
90
+ triggerNext() {
91
+ this.$refs.next.click()
92
+ },
93
+ triggerPrev() {
94
+ this.$refs.prev.click()
95
+ },
83
96
 
84
97
  recreateSwiper() {
85
98
  if (this.swiper) this.swiper.destroy()
@@ -90,7 +103,7 @@ export default {
90
103
  {
91
104
  preloadImages: false,
92
105
  keyboard: {
93
- enabled: true,
106
+ enabled: false,
94
107
  onlyInViewport: true,
95
108
  },
96
109
  a11y: true,
@@ -289,8 +289,8 @@ export default {
289
289
  .asd20-icon {
290
290
  transform: rotate(90deg);
291
291
  margin-right: space(-0.5);
292
- --line-color: var(--website-menu__icon-line-color);
293
- color: var(--website-menu__icon-line-color);
292
+ --line-color: var(--color__primary);
293
+ color: var(--color__primary);
294
294
  fill: var(--website-menu__icon-fill-color);
295
295
  // opacity: 0.5;
296
296
  }
@@ -336,7 +336,7 @@ export default {
336
336
  transform: rotate(-90deg);
337
337
  margin-left: -1.5 * map-get($icon-sizes, 'sm');
338
338
  margin-right: 0.5 * map-get($icon-sizes, 'sm');
339
- // --line-color: var(--website-menu__line-color);
339
+ --line-color: var(--color__primary);
340
340
  // opacity: 0.5;
341
341
  }
342
342
  }
@@ -5,12 +5,14 @@
5
5
  v-html="title"
6
6
  ></span>
7
7
  </h2>
8
- <asd20-swiper :options="swiperOptions">
8
+ <asd20-swiper :options="swiperOptions" ref="swiper">
9
9
  <template v-if="!loading" v-slot:default="props">
10
10
  <div class="swiper-slide" v-for="(card, index) in cards" :key="index">
11
11
  <asd20-card
12
12
  v-bind="card"
13
13
  @click.native="$emit('select', card)"
14
+ @keydown.tab.exact.native="nextCard"
15
+ @keydown.tab.shift.native="prevCard"
14
16
  ></asd20-card>
15
17
  </div>
16
18
  <div class="swiper-slide">
@@ -95,6 +97,14 @@ export default {
95
97
  }
96
98
  },
97
99
  },
100
+ methods: {
101
+ nextCard() {
102
+ this.$refs.swiper.triggerNext()
103
+ },
104
+ prevCard() {
105
+ this.$refs.swiper.triggerPrev()
106
+ },
107
+ },
98
108
  }
99
109
  </script>
100
110