@hellobetterdigitalnz/selwynui 0.0.1-45 → 0.0.1-47

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.
Files changed (34) hide show
  1. package/dist/Components/DataDisplay/ContactsBlock/ContactsBlockProps.d.ts +1 -1
  2. package/dist/Components/DataDisplay/ContentBlock/ContentBlockProps.d.ts +2 -1
  3. package/dist/Components/DataDisplay/DetailsCard/DetailsCardProps.d.ts +0 -1
  4. package/dist/Components/DataDisplay/ListBlock/ListBlockProps.d.ts +1 -1
  5. package/dist/Components/DataDisplay/Media/Media.d.ts +0 -0
  6. package/dist/Components/DataDisplay/Media/MediaProps.d.ts +0 -0
  7. package/dist/Components/Shared/ElementHolder/ElementHolderProps.d.ts +1 -1
  8. package/dist/index.cjs.js +5 -5
  9. package/dist/index.cjs.js.map +1 -1
  10. package/dist/index.es.js +2372 -2345
  11. package/dist/index.es.js.map +1 -1
  12. package/dist/selwynui.css +1 -1
  13. package/package.json +1 -1
  14. package/src/Components/DataDisplay/ChatItenaryBlock/ChatItenaryBlock.stories.tsx +1 -1
  15. package/src/Components/DataDisplay/ChatItenaryBlock/chatItenaryBlock.module.scss +17 -17
  16. package/src/Components/DataDisplay/ContactsBlock/ContactsBlock.stories.tsx +16 -20
  17. package/src/Components/DataDisplay/ContactsBlock/ContactsBlock.tsx +3 -3
  18. package/src/Components/DataDisplay/ContactsBlock/ContactsBlockProps.tsx +1 -1
  19. package/src/Components/DataDisplay/ContactsBlock/contactsBlock.module.scss +1 -8
  20. package/src/Components/DataDisplay/ContentBlock/ContentBlock.stories.tsx +2 -2
  21. package/src/Components/DataDisplay/ContentBlock/ContentBlock.tsx +14 -2
  22. package/src/Components/DataDisplay/ContentBlock/ContentBlockProps.tsx +6 -1
  23. package/src/Components/DataDisplay/ContentBlock/contentBlock.module.scss +62 -30
  24. package/src/Components/DataDisplay/DetailsCard/DetailsCard.tsx +2 -3
  25. package/src/Components/DataDisplay/DetailsCard/DetailsCardProps.tsx +0 -1
  26. package/src/Components/DataDisplay/KPIBlock/kpiBlock.module.scss +5 -3
  27. package/src/Components/DataDisplay/ListBlock/ListBlock.tsx +88 -60
  28. package/src/Components/DataDisplay/ListBlock/ListBlockProps.tsx +1 -1
  29. package/src/Components/DataDisplay/Media/Media.tsx +0 -0
  30. package/src/Components/DataDisplay/Media/MediaProps.tsx +0 -0
  31. package/src/Components/DataDisplay/TestimonyCard/TestimonyCard.stories.tsx +1 -1
  32. package/src/Components/DataDisplay/TestimonyCard/TestimonyCard.tsx +59 -63
  33. package/src/Components/DataDisplay/TestimonyCard/testimonyCard.module.scss +92 -53
  34. package/src/Components/Shared/ElementHolder/ElementHolderProps.tsx +1 -1
@@ -13,7 +13,7 @@ export interface Card {
13
13
  pillar?: 'visit' | 'live' | 'business' | 'participate' | 'taste'
14
14
  image?:string,
15
15
  variation?: "long" | "short";
16
- category?: 'all' | 'adventure' | 'ski' | 'nature',
16
+ category?: string | undefined,
17
17
  }
18
18
 
19
19
  interface ListBlockProps {
File without changes
@@ -21,7 +21,7 @@ const TestimonyCardTemplate: Story = {
21
21
  render: () => {
22
22
  return (
23
23
  <>
24
- <ElementHolder paddingTop="sm" paddingBottom="sm" pillar="visit" level="primary">
24
+ <ElementHolder paddingTop="sm" paddingBottom="sm" pillar="business" level="primary">
25
25
  <TestimonyCard
26
26
  testimonies={[
27
27
  {
@@ -1,84 +1,80 @@
1
- import { useState, useEffect } from 'react';
1
+ import { useRef, useState } from 'react';
2
+ import Slider from 'react-slick';
2
3
  import TestimonyCardProps from "./TestimonyCardProps.tsx";
3
4
  import styles from './testimonyCard.module.scss';
4
5
  import Container from "../../Shared/Container/Container.tsx";
6
+ import 'slick-carousel/slick/slick.css';
7
+ import 'slick-carousel/slick/slick-theme.css';
5
8
 
6
9
  const TestimonyCard = (props: TestimonyCardProps) => {
7
10
  const {
8
11
  testimonies,
9
- pillar = 'visit'
12
+ pillar,
10
13
  } = props;
11
14
 
12
- const [currentIndex, setCurrentIndex] = useState(0);
13
- const [direction, setDirection] = useState<'left' | 'right'>('right');
14
-
15
+ const sliderRef = useRef<Slider>(null);
16
+ const [currentSlide, setCurrentSlide] = useState(0);
15
17
  const defaultImage = 'https://images.pexels.com/photos/1563356/pexels-photo-1563356.jpeg';
16
18
 
17
- const handleDotClick = (index: number) => {
18
- if (index > currentIndex) {
19
- setDirection('right');
20
- } else {
21
- setDirection('left');
22
- }
23
- setCurrentIndex(index);
19
+ const settings = {
20
+ dots: false,
21
+ infinite: true,
22
+ speed: 900,
23
+ slidesToShow: 1,
24
+ slidesToScroll: 1,
25
+ autoplay: true,
26
+ autoplaySpeed: 5000,
27
+ cssEase: 'cubic-bezier(0, 0, 1, 1)',
28
+ arrows: false,
29
+ fade: false,
30
+ swipe: true,
31
+ touchMove: true,
32
+ beforeChange: (_current: number, next: number) => setCurrentSlide(next),
24
33
  };
25
34
 
35
+ const handleDotClick = (index: number) => {
36
+ sliderRef.current?.slickGoTo(index);
37
+ };
26
38
 
27
- useEffect(() => {
28
- const interval = setInterval(() => {
29
- setDirection('right');
30
- setCurrentIndex((prev) => (prev + 1) % testimonies.length);
31
- }, 5000); // change every 5 seconds
32
-
33
- return () => clearInterval(interval); // cleanup on unmount
34
- }, [testimonies.length]);
39
+ return (
40
+ <div className={`${styles.testimonyCard} ${styles.testimonyCardLarge} ${pillar ? `${pillar}` : ""}`}>
41
+ <Container>
42
+ <div className={styles.testimonyCardContainer}>
43
+ <Slider ref={sliderRef} {...settings} className={styles.carouselWrapper}>
44
+ {testimonies.map((testimony, index) => (
45
+ <div key={index}>
46
+ <div className={styles.testimonySlide}>
47
+ <div className={styles.testimonyCardLeft}>
48
+ <img
49
+ src={testimony.image || defaultImage}
50
+ alt={`${testimony.author} testimonial`}
51
+ />
52
+ </div>
35
53
 
36
- return <div
37
- className={`
38
- ${styles.testimonyCard}
39
- ${styles.testimonyCardLarge}
40
- ${pillar ? `${pillar}` : ""}
41
- `}
42
- >
43
- <Container>
44
- <div className={styles.testimonyCardWrapper}>
45
- <div className={styles.testimonyCardLeft}>
46
- <img
47
- key={`image-${currentIndex}`}
48
- className={styles[`slideIn${direction === 'right' ? 'Right' : 'Left'}`]}
49
- src={testimonies[currentIndex].image || defaultImage}
50
- alt={`${testimonies[currentIndex].author} testimonial`}
51
- />
52
- </div>
53
- <div className={styles.testimonyCardRight}>
54
- <div className={styles.testimonyContent}>
55
- <div className={styles[`slideIn${direction === 'right' ? 'Right' : 'Left'}`]} >
56
- <svg xmlns="http://www.w3.org/2000/svg" width="56" height="39" viewBox="0 0 56 39" fill="none">
57
- <path d="M23.1134 27.0562C23.1134 32.4847 18.9331 36 13.4798 36C8.02648 36 4.75277 33.6194 3.3652 27.0562C1.97764 20.493 7.78599 17.227 13.2393 17.227C18.6926 17.227 23.1134 21.6276 23.1134 27.0562Z" fill="#92C134"/>
58
- <path d="M53.0015 27.0558C53.0015 32.4844 48.8212 35.9997 43.3679 35.9997C37.9145 35.9997 34.6408 33.619 33.2533 27.0558C31.8657 20.4926 37.674 17.2267 43.1274 17.2267C48.5807 17.2267 53.0015 21.6273 53.0015 27.0558Z" fill="#92C134"/>
59
- <path d="M3.3652 27.0562C4.75277 33.6194 8.02648 36 13.4798 36C18.9331 36 23.1134 32.4847 23.1134 27.0562C23.1134 21.6276 18.6926 17.227 13.2393 17.227C7.78599 17.227 1.97764 20.493 3.3652 27.0562ZM3.3652 27.0562C1.97764 20.493 4.78431 13.7613 7.99019 9.54638C11.1961 5.33146 17.2399 2.24873 21.5318 3.16115M33.2533 27.0558C34.6408 33.619 37.9145 35.9997 43.3679 35.9997C48.8212 35.9997 53.0015 32.4844 53.0015 27.0558C53.0015 21.6273 48.5807 17.2267 43.1274 17.2267C37.674 17.2267 31.8657 20.4926 33.2533 27.0558ZM33.2533 27.0558C31.8657 20.4926 34.6724 13.761 37.8782 9.54606C41.0841 5.33115 47.1279 2.24841 51.4199 3.16083" stroke="#92C134" strokeWidth="6" strokeLinecap="round" strokeLinejoin="round"/>
60
- </svg>
61
- </div>
62
- <h6
63
- key={`testimony-${currentIndex}`}
64
- className={styles[`slideIn${direction === 'right' ? 'Right' : 'Left'}`]}
65
- >
66
- {testimonies[currentIndex].testimony}
67
- </h6>
68
- </div>
69
- <p
70
- key={`author-${currentIndex}`}
71
- className={styles[`slideIn${direction === 'right' ? 'Right' : 'Left'}`]}
72
- >
73
- {testimonies[currentIndex].author}
74
- </p>
54
+ <div className={styles.testimonyCardRight}>
55
+ <div className={styles.testimonyContent}>
56
+ <div className={styles.quoteIcon}>
57
+ <svg xmlns="http://www.w3.org/2000/svg" width="56" height="39" viewBox="0 0 56 39" fill="none">
58
+ <path d="M23.1134 27.0562C23.1134 32.4847 18.9331 36 13.4798 36C8.02648 36 4.75277 33.6194 3.3652 27.0562C1.97764 20.493 7.78599 17.227 13.2393 17.227C18.6926 17.227 23.1134 21.6276 23.1134 27.0562Z" fill="currentColor"/>
59
+ <path d="M53.0015 27.0558C53.0015 32.4844 48.8212 35.9997 43.3679 35.9997C37.9145 35.9997 34.6408 33.619 33.2533 27.0558C31.8657 20.4926 37.674 17.2267 43.1274 17.2267C48.5807 17.2267 53.0015 21.6273 53.0015 27.0558Z" fill="currentColor"/>
60
+ <path d="M3.3652 27.0562C4.75277 33.6194 8.02648 36 13.4798 36C18.9331 36 23.1134 32.4847 23.1134 27.0562C23.1134 21.6276 18.6926 17.227 13.2393 17.227C7.78599 17.227 1.97764 20.493 3.3652 27.0562ZM3.3652 27.0562C1.97764 20.493 4.78431 13.7613 7.99019 9.54638C11.1961 5.33146 17.2399 2.24873 21.5318 3.16115M33.2533 27.0558C34.6408 33.619 37.9145 35.9997 43.3679 35.9997C48.8212 35.9997 53.0015 32.4844 53.0015 27.0558C53.0015 21.6273 48.5807 17.2267 43.1274 17.2267C37.674 17.2267 31.8657 20.4926 33.2533 27.0558ZM33.2533 27.0558C31.8657 20.4926 34.6724 13.761 37.8782 9.54606C41.0841 5.33115 47.1279 2.24841 51.4199 3.16083" stroke="currentColor" strokeWidth="6" strokeLinecap="round" strokeLinejoin="round"/>
61
+ </svg>
62
+ </div>
63
+ <h6>{testimony.testimony}</h6>
64
+ </div>
65
+ <p>{testimony.author}</p>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ ))}
70
+ </Slider>
75
71
 
76
72
  {testimonies.length > 1 && (
77
73
  <div className={styles.pagination}>
78
74
  {testimonies.map((_, index) => (
79
75
  <button
80
76
  key={index}
81
- className={`${styles.dot} ${index === currentIndex ? styles.active : ''}`}
77
+ className={`${styles.dot} ${index === currentSlide ? styles.active : ''}`}
82
78
  onClick={() => handleDotClick(index)}
83
79
  aria-label={`Go to testimonial ${index + 1}`}
84
80
  />
@@ -86,9 +82,9 @@ const TestimonyCard = (props: TestimonyCardProps) => {
86
82
  </div>
87
83
  )}
88
84
  </div>
89
- </div>
90
- </Container>
91
- </div>
85
+ </Container>
86
+ </div>
87
+ );
92
88
  };
93
89
 
94
90
  export default TestimonyCard;
@@ -6,10 +6,71 @@
6
6
  }
7
7
  }
8
8
 
9
- .testimonyCardWrapper {
9
+ .testimonyCardContainer {
10
+ position: relative;
11
+ }
12
+
13
+ .carouselWrapper {
14
+ position: relative;
15
+ overflow: hidden;
16
+ min-height: 400px;
17
+
18
+ @media (max-width: 834px) {
19
+ min-height: 600px;
20
+ }
21
+
22
+ :global {
23
+ .slick-slider {
24
+ position: relative;
25
+ display: block;
26
+ box-sizing: border-box;
27
+ user-select: none;
28
+ touch-action: pan-y;
29
+ }
30
+
31
+ .slick-list {
32
+ position: relative;
33
+ display: block;
34
+ overflow: hidden;
35
+ margin: 0;
36
+ padding: 0;
37
+ }
38
+
39
+ .slick-track {
40
+ position: relative;
41
+ top: 0;
42
+ left: 0;
43
+ display: block;
44
+ margin-left: auto;
45
+ margin-right: auto;
46
+ }
47
+
48
+ .slick-slide {
49
+ display: none;
50
+ float: left;
51
+ height: 100%;
52
+ min-height: 1px;
53
+
54
+ > div {
55
+ display: block;
56
+ }
57
+ }
58
+
59
+ .slick-slide.slick-active {
60
+ display: block;
61
+ }
62
+
63
+ .slick-initialized .slick-slide {
64
+ display: block;
65
+ }
66
+ }
67
+ }
68
+
69
+ .testimonySlide {
10
70
  display: flex;
11
- gap: 69px;
71
+ gap: 67px;
12
72
  align-items: center;
73
+ outline: none;
13
74
 
14
75
  @media (max-width: 1032px) {
15
76
  flex-direction: column;
@@ -19,12 +80,11 @@
19
80
 
20
81
  .testimonyCardLeft {
21
82
  flex-shrink: 0;
22
- overflow: hidden;
23
83
 
24
84
  @media (max-width: 834px) {
25
85
  padding-top: 0;
26
86
  padding-bottom: 0;
27
- width: calc(100% + 32px);
87
+ width: 100%;
28
88
  display: flex;
29
89
  justify-content: center;
30
90
  }
@@ -42,6 +102,7 @@
42
102
  }
43
103
 
44
104
  @media (max-width: 480px) {
105
+ width: 100%;
45
106
  border-radius: 2px 2px 96px 2px;
46
107
  }
47
108
  }
@@ -51,29 +112,22 @@
51
112
  flex: 1;
52
113
  display: flex;
53
114
  flex-direction: column;
54
- gap: 24px;
55
- overflow: hidden;
56
- position: relative;
57
- min-height: 340px;
58
- height: 100%;
59
-
60
- @media (max-width: 1390px) {
61
- height: 100%;
62
- }
63
115
 
116
+ gap: 30px;
117
+ min-height: 273px;
118
+ width: 172px;
64
119
 
65
120
  @media (max-width: 1032px) {
66
121
  width: 100%;
67
- height: 100%;
68
122
  gap: 16px;
69
123
  }
70
124
 
71
125
  p {
72
126
  font-size: 14px;
73
127
  font-weight: var(--font-weight-h5);
74
- letter-spacing: -0.14px;
128
+ letter-spacing: -0.48px;
75
129
  line-height: var(--line-height-body-regular);
76
- padding-left: 70px;
130
+ padding-left: 83px;
77
131
 
78
132
  @media (max-width: 834px) {
79
133
  padding-left: 0;
@@ -83,9 +137,8 @@
83
137
 
84
138
  .testimonyContent {
85
139
  display: flex;
86
- gap: 16px;
140
+ gap: 25px;
87
141
  align-items: flex-start;
88
- overflow: hidden;
89
142
 
90
143
  @media (max-width: 834px) {
91
144
  flex-direction: column;
@@ -109,11 +162,13 @@
109
162
  }
110
163
 
111
164
  h6 {
165
+
112
166
  font-size: var(--font-size-h6);
113
167
  line-height: 1.3;
114
168
  font-weight: var(--font-weight-body-sm);
115
169
  letter-spacing: -0.48px;
116
170
  white-space: pre-line;
171
+ margin-top: -5px;
117
172
 
118
173
  @media (max-width: 834px) {
119
174
  font-size: var(--font-size-body-regular);
@@ -128,10 +183,20 @@
128
183
  .pagination {
129
184
  display: flex;
130
185
  gap: 12px;
131
- padding-left: 70px;
186
+ padding-left: 477px;
187
+ margin-top: -110px;
132
188
  position: absolute;
133
- bottom: 0;
134
- left: 0;
189
+ z-index: 2;
190
+
191
+ @media (max-width: 1132px) {
192
+ padding-left: 480px;
193
+ margin-top: 0;
194
+ }
195
+
196
+ @media (max-width: 923px) {
197
+ padding-left: 0;
198
+ gap: 8px;
199
+ }
135
200
 
136
201
  @media (max-width: 834px) {
137
202
  padding-left: 0;
@@ -145,11 +210,12 @@
145
210
  cursor: pointer;
146
211
  border: none;
147
212
  padding: 0;
148
- background-color: var(--color-taste);
213
+ background-color: var(--color-text);
149
214
  position: relative;
150
215
  display: flex;
151
216
  align-items: center;
152
217
  justify-content: center;
218
+ transition: all 0.3s ease;
153
219
 
154
220
  @media (max-width: 834px) {
155
221
  width: 16px;
@@ -161,43 +227,16 @@
161
227
  width: 12px;
162
228
  height: 12px;
163
229
  border-radius: 50%;
164
- background-color: var(--color-visit);
230
+ background-color: var(--color-bg);
165
231
 
166
232
  @media (max-width: 834px) {
167
233
  width: 8px;
168
234
  height: 8px;
169
235
  }
170
236
  }
171
- }
172
- }
173
-
174
- // Animations
175
- @keyframes slideInRight {
176
- from {
177
- opacity: 0;
178
- transform: translateX(50px);
179
- }
180
- to {
181
- opacity: 1;
182
- transform: translateX(0);
183
- }
184
- }
185
237
 
186
- @keyframes slideInLeft {
187
- from {
188
- opacity: 0;
189
- transform: translateX(-50px);
190
- }
191
- to {
192
- opacity: 1;
193
- transform: translateX(0);
238
+ &:hover {
239
+ transform: scale(1.1);
240
+ }
194
241
  }
195
- }
196
-
197
- .slideInRight {
198
- animation: slideInRight 0.5s ease-out;
199
- }
200
-
201
- .slideInLeft {
202
- animation: slideInLeft 0.5s ease-out;
203
242
  }
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from "react"
2
2
 
3
- type SpacingOption = "none" | "sm" | "md" | "lg"
3
+ type SpacingOption = "none" | "xsm" |"sm" | "md" | "lg" | "xl"
4
4
 
5
5
  interface ElementHolderProps {
6
6
  children?: ReactNode