toggle-components-library 1.36.1-beta.2 → 1.36.1-beta.4

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toggle-components-library",
3
- "version": "1.36.1-beta.2",
3
+ "version": "1.36.1-beta.4",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -2,7 +2,7 @@
2
2
  <div class="toggle-comment-card">
3
3
  <div class="toggle-comment-card-info" :style="{ backgroundColor: cardColor }">
4
4
  <div class="toggle-comment-card-text">
5
- <p>"{{ displayComment }}"</p>
5
+ <p>"{{ comment }}"</p>
6
6
  </div>
7
7
  <div class="toggle-comment-card-name">
8
8
  <slot name="button_contacts"></slot>
@@ -50,10 +50,7 @@ export default {
50
50
  (this.cardIndex / this.totalCards) * colorPalette.length
51
51
  );
52
52
  return colorPalette[paletteIndex];
53
- },
54
- displayComment() {
55
- return this.comment.length > 420 ? this.comment.substring(0, 420) + "..." : this.comment;
56
- },
53
+ }
57
54
  }
58
55
  };
59
56
  </script>
@@ -1,28 +1,34 @@
1
1
  <template>
2
- <swiper
3
- ref="swiper"
4
- class="swiper toggle-carousel"
5
- :class="[
6
- carouselStyle == 'voucher' && slidesLength > 1 ? 'toggle-carousel--voucher' : '',
7
- carouselStyle == 'voucher' && isEnd && slidesLength > 1 ? 'toggle-carousel--voucher-end' : ''
8
- ]"
9
- :options="carouselOptions"
10
- @slideChangeTransitionStart="onSlideTransition"
11
- >
12
- <slot></slot>
2
+ <div class="toggle-carousel-wrapper">
3
+ <swiper
4
+ ref="swiper"
5
+ class="swiper toggle-carousel"
6
+ :class="[
7
+ carouselStyle == 'voucher' && slidesLength > 1 ? 'toggle-carousel--voucher' : '',
8
+ carouselStyle == 'voucher' && isEnd && slidesLength > 1 ? 'toggle-carousel--voucher-end' : ''
9
+ ]"
10
+ :options="carouselOptions"
11
+ @slideChangeTransitionStart="onSlideTransition"
12
+ >
13
+ <slot></slot>
14
+ </swiper>
13
15
  <div v-if="carouselPrev && slidesLength > 1"
14
16
  class="toggle-carousel-button toggle-carousel-button--prev"
15
- :class="['toggle-carousel-button--' + carouselNavPosition, {'toggle-carousel-button--disabled': prevDisabled}]"
17
+ :class="['toggle-carousel-button--' + carouselNavPosition,
18
+ {'toggle-carousel-button--disabled': prevDisabled},
19
+ {'toggle-carousel-button--comments-left-arrow': carouselStyle == 'comments'}]"
16
20
  @click="slidePrev"
17
21
  slot="button-prev"
18
22
  ></div>
19
23
  <div v-if="carouselNext && slidesLength > 1"
20
24
  class="toggle-carousel-button toggle-carousel-button--next"
21
- :class="['toggle-carousel-button--' + carouselNavPosition, {'toggle-carousel-button--disabled': nextDisabled}]"
25
+ :class="['toggle-carousel-button--' + carouselNavPosition,
26
+ {'toggle-carousel-button--disabled': nextDisabled},
27
+ {'toggle-carousel-button--comments-right-arrow': carouselStyle == 'comments'}]"
22
28
  @click="$refs.swiper.swiperInstance.slideNext()"
23
29
  slot="button-next"
24
30
  ></div>
25
- </swiper>
31
+ </div>
26
32
  </template>
27
33
 
28
34
  <script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <swiper-slide class="toggle-carousel-slide" :style="'width:' + slideWidth + '; height:' + slideHeight">
2
+ <swiper-slide class="toggle-carousel-slide">
3
3
  <slot></slot>
4
4
  </swiper-slide>
5
5
  </template>
@@ -178,7 +178,7 @@
178
178
  display: flex;
179
179
  flex-direction: column;
180
180
  justify-content: space-between;
181
- padding: 30px 70px 20px 30px;
181
+ padding: 30px 30px 20px 30px;
182
182
  color: white;
183
183
  border-radius: 30px;
184
184
  width: 100%;
@@ -186,6 +186,11 @@
186
186
  .toggle-comment-card-text {
187
187
  text-align: justify;
188
188
  line-height: 1.5rem;
189
+ text-overflow: ellipsis;
190
+ -webkit-line-clamp: 6;
191
+ -webkit-box-orient: vertical;
192
+ overflow: hidden;
193
+ display: -webkit-box;
189
194
 
190
195
  p {
191
196
  margin: 0
@@ -28,6 +28,10 @@
28
28
  max-width: 100%;
29
29
  }
30
30
  }
31
+ }
32
+ .toggle-carousel-wrapper {
33
+ position: relative;
34
+
31
35
  .toggle-carousel-button{
32
36
  width: 50px;
33
37
  height: 50px;
@@ -102,6 +106,14 @@
102
106
  }
103
107
  }
104
108
  }
109
+ &--comments-left-arrow{
110
+ left: -24px;
111
+ opacity: 0.8;
112
+ }
113
+ &--comments-right-arrow{
114
+ right: -24px !important;
115
+ opacity: 0.8;
116
+ }
105
117
  &--next{
106
118
  right: 20px;
107
119
  @media only screen and (max-width:768px){
@@ -4,7 +4,7 @@
4
4
 
5
5
  .toggle-sidenav-container {
6
6
  font-size: $toggle-font-size-regular;
7
- width: 25%;
7
+ width: 20%;
8
8
  float: left;
9
9
  max-width: 280px;
10
10
  min-height: 100vh;
@@ -134,7 +134,7 @@
134
134
 
135
135
  line-height: 1rem;
136
136
  font-size: $toggle-font-size-regular;
137
- width: 25%;
137
+ width: 20%;
138
138
  float: left;
139
139
  max-width: 280px;
140
140
  min-height: 100vh;