@asd20/ui 3.2.454 → 3.2.456

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.454",
8
+ "version": "3.2.456",
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,
@@ -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
 
@@ -124,12 +124,12 @@
124
124
  display: table;
125
125
  clear: both;
126
126
  }
127
- // If more than 24 items are in the list,
127
+ // If more than 30 items are in the list,
128
128
  // split into up to 12 columns
129
129
  // with a minimum width of 240px
130
130
  // and ensure at least a 1rem space between columns
131
- .asd20-messaging li:first-child:nth-last-child(n+24),
132
- .asd20-messaging li:first-child:nth-last-child(n+24) ~ li {
131
+ .asd20-messaging li:first-child:nth-last-child(n+30),
132
+ .asd20-messaging li:first-child:nth-last-child(n+30) ~ li {
133
133
  width: clamp(160px, 100vw/12, 100%);
134
134
  padding-right: 1rem;
135
135
  float:left;