toggle-components-library 1.32.0-beta.6 → 1.32.0-beta.8

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-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toggle-components-library",
3
- "version": "1.32.0-beta.6",
3
+ "version": "1.32.0-beta.8",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toggle-components-library",
3
- "version": "1.32.0-beta.6",
3
+ "version": "1.32.0-beta.8",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
package/src/.DS_Store ADDED
Binary file
Binary file
@@ -5,7 +5,7 @@
5
5
  <slot name="toggle-rewards-card-header">{{ reward }}</slot>
6
6
  </div>
7
7
  <div class="toggle-rewards-card-card-body">
8
- <p class="toggle-rewards-card-body-header">Overall voucher performance</p>
8
+ <p class="toggle-rewards-card-body-header">Overall reward performance</p>
9
9
  <div class="toggle-rewards-card-body-stats">
10
10
  <div class="toggle-rewards-card-metrics">
11
11
  <p>Claimed</p>
@@ -2,7 +2,10 @@
2
2
  <swiper
3
3
  ref="swiper"
4
4
  class="swiper toggle-carousel"
5
- :class="carouselStyle == 'voucher' ? 'toggle-carousel--voucher' : ''"
5
+ :class="[
6
+ carouselStyle == 'voucher' && slidesLength > 1 ? 'toggle-carousel--voucher' : '',
7
+ carouselStyle == 'voucher' && isEnd && slidesLength > 1 ? 'toggle-carousel--voucher-end' : ''
8
+ ]"
6
9
  :options="carouselOptions"
7
10
  @slideChangeTransitionStart="onSlideTransition"
8
11
  >
@@ -34,7 +37,8 @@ export default {
34
37
  return {
35
38
  prevDisabled: false,
36
39
  nextDisabled: false,
37
- slidesLength: 0
40
+ slidesLength: 0,
41
+ isEnd: false
38
42
  };
39
43
  },
40
44
  props: {
@@ -78,28 +82,34 @@ export default {
78
82
  directives: {
79
83
  swiper: directive
80
84
  },
81
- mounted() {
82
- this.slidesLength = this.$refs.swiper.swiperInstance.slides.length;
83
- this.onSlideTransition();
85
+ mounted(){
86
+ this.refreshCarousel();
87
+ },
88
+ updated() {
89
+ this.refreshCarousel();
84
90
  },
85
91
  methods: {
92
+ refreshCarousel(){
93
+ this.slidesLength = this.$refs.swiper.swiperInstance.slides.length;
94
+ this.onSlideTransition();
95
+ },
86
96
  onSlideTransition(){
87
97
  // if loop is enabled, don't disable buttons, unless specified in prop
88
98
  const isLoop = this.$refs.swiper.swiperInstance.params.loop;
89
99
  if(isLoop) return;
90
100
 
91
101
  const isBeginning = this.$refs.swiper.swiperInstance.isBeginning;
92
- const isEnd = this.$refs.swiper.swiperInstance.isEnd;
102
+ this.isEnd = this.$refs.swiper.swiperInstance.isEnd;
93
103
 
94
104
  if(isBeginning){
95
105
  this.prevDisabled = true;
96
106
  this.nextDisabled = false;
97
107
  }
98
- else if(isEnd){
108
+ else if(this.isEnd){
99
109
  this.prevDisabled = false;
100
110
  this.nextDisabled = true;
101
111
  }
102
- else{
112
+ else if(this.carouselStyle != 'voucher'){
103
113
  this.prevDisabled = false;
104
114
  this.nextDisabled = false;
105
115
  }
@@ -23,6 +23,11 @@
23
23
  font-size: 2.2rem;
24
24
  font-weight: 600;
25
25
  margin-top: 20px;
26
+ overflow: hidden;
27
+ text-overflow: ellipsis;
28
+ display: -webkit-box;
29
+ -webkit-line-clamp: 2;
30
+ -webkit-box-orient: vertical;
26
31
  }
27
32
  }
28
33
 
@@ -154,6 +159,7 @@
154
159
  font-family: $toggle-font-family;
155
160
  font-size: $toggle-font-size-large;
156
161
  font-weight: bold;
162
+ word-wrap: break-word;
157
163
  }
158
164
 
159
165
  }
@@ -15,6 +15,13 @@
15
15
  height: 100%;
16
16
  z-index: 25;
17
17
  }
18
+ &-end{
19
+ &:after{
20
+ right: auto;
21
+ left: 0;
22
+ background: linear-gradient(-90deg, rgba(241, 245, 246, 0) 0%, rgba(241, 245, 246, 0.7) 50%, rgba(241, 245, 246, 1) 100%);
23
+ }
24
+ }
18
25
  }
19
26
  .toggle-carousel-slide{
20
27
  img{