@times-components/ts-components 1.145.1-cfea81c4084e6f91221ea00fec9fc730d5b933cb.4 → 1.145.1-e871182934034874ea6a75e1e684090e5504df44.2

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 (136) hide show
  1. package/dist/components/travel-mini-cta/index.d.ts +3 -0
  2. package/dist/components/travel-mini-cta/index.js +86 -0
  3. package/dist/components/travel-mini-cta/styles.d.ts +42 -0
  4. package/dist/components/travel-mini-cta/styles.js +273 -0
  5. package/dist/components/travel-mini-cta/travel-mini-cta.stories.d.ts +110 -0
  6. package/dist/components/travel-mini-cta/travel-mini-cta.stories.js +121 -0
  7. package/dist/components/travel-mini-cta/types.d.ts +10 -0
  8. package/dist/components/{trip-cards → travel-mini-cta}/types.js +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.js +2 -2
  11. package/dist/utils/applyDarkMode.d.ts +1 -0
  12. package/dist/utils/applyDarkMode.js +12 -0
  13. package/dist/utils/getMediaQuery.d.ts +11 -0
  14. package/dist/utils/getMediaQuery.js +19 -0
  15. package/dist/utils/index.d.ts +2 -0
  16. package/dist/utils/index.js +3 -0
  17. package/package.json +3 -3
  18. package/rnw.js +1 -1
  19. package/src/components/travel-mini-cta/index.tsx +164 -0
  20. package/src/components/travel-mini-cta/styles.ts +336 -0
  21. package/src/components/travel-mini-cta/travel-mini-cta.stories.tsx +157 -0
  22. package/src/components/travel-mini-cta/types.ts +10 -0
  23. package/src/index.ts +1 -2
  24. package/src/utils/applyDarkMode.ts +12 -0
  25. package/src/utils/getMediaQuery.ts +25 -0
  26. package/src/utils/index.ts +2 -0
  27. package/dist/components/carousel-component/CarouselComponent.stories.d.ts +0 -1
  28. package/dist/components/carousel-component/CarouselComponent.stories.js +0 -146
  29. package/dist/components/carousel-component/CarouselItem.d.ts +0 -3
  30. package/dist/components/carousel-component/CarouselItem.js +0 -11
  31. package/dist/components/carousel-component/DefaultNavigationArrow.d.ts +0 -8
  32. package/dist/components/carousel-component/DefaultNavigationArrow.js +0 -6
  33. package/dist/components/carousel-component/DefaultPageDot.d.ts +0 -8
  34. package/dist/components/carousel-component/DefaultPageDot.js +0 -4
  35. package/dist/components/carousel-component/__tests__/CarouselComponent.test.d.ts +0 -1
  36. package/dist/components/carousel-component/__tests__/CarouselComponent.test.js +0 -163
  37. package/dist/components/carousel-component/__tests__/CarouselItem.test.d.ts +0 -1
  38. package/dist/components/carousel-component/__tests__/CarouselItem.test.js +0 -80
  39. package/dist/components/carousel-component/__tests__/DefaultNavigationArrow.test.d.ts +0 -1
  40. package/dist/components/carousel-component/__tests__/DefaultNavigationArrow.test.js +0 -62
  41. package/dist/components/carousel-component/__tests__/DefaultPageDot.test.d.ts +0 -1
  42. package/dist/components/carousel-component/__tests__/DefaultPageDot.test.js +0 -68
  43. package/dist/components/carousel-component/hooks/__tests__/useCarousel.test.d.ts +0 -1
  44. package/dist/components/carousel-component/hooks/__tests__/useCarousel.test.js +0 -314
  45. package/dist/components/carousel-component/hooks/useCarousel.d.ts +0 -2
  46. package/dist/components/carousel-component/hooks/useCarousel.js +0 -140
  47. package/dist/components/carousel-component/index.d.ts +0 -4
  48. package/dist/components/carousel-component/index.js +0 -20
  49. package/dist/components/carousel-component/styles.d.ts +0 -30
  50. package/dist/components/carousel-component/styles.js +0 -120
  51. package/dist/components/carousel-component/types.d.ts +0 -46
  52. package/dist/components/carousel-component/types.js +0 -2
  53. package/dist/components/trip-cards/SkeletonCard.d.ts +0 -2
  54. package/dist/components/trip-cards/SkeletonCard.js +0 -21
  55. package/dist/components/trip-cards/TripCard.d.ts +0 -3
  56. package/dist/components/trip-cards/TripCard.js +0 -47
  57. package/dist/components/trip-cards/TripCards.stories.d.ts +0 -1
  58. package/dist/components/trip-cards/TripCards.stories.js +0 -40
  59. package/dist/components/trip-cards/TripCardsLayout.d.ts +0 -3
  60. package/dist/components/trip-cards/TripCardsLayout.js +0 -26
  61. package/dist/components/trip-cards/__tests__/SkeletonCard.test.d.ts +0 -1
  62. package/dist/components/trip-cards/__tests__/SkeletonCard.test.js +0 -139
  63. package/dist/components/trip-cards/__tests__/TripCard.test.d.ts +0 -1
  64. package/dist/components/trip-cards/__tests__/TripCard.test.js +0 -95
  65. package/dist/components/trip-cards/__tests__/TripCardsLayout.test.d.ts +0 -1
  66. package/dist/components/trip-cards/__tests__/TripCardsLayout.test.js +0 -277
  67. package/dist/components/trip-cards/__tests__/assets.test.d.ts +0 -1
  68. package/dist/components/trip-cards/__tests__/assets.test.js +0 -165
  69. package/dist/components/trip-cards/__tests__/helpers.test.d.ts +0 -1
  70. package/dist/components/trip-cards/__tests__/helpers.test.js +0 -135
  71. package/dist/components/trip-cards/__tests__/index.test.d.ts +0 -1
  72. package/dist/components/trip-cards/__tests__/index.test.js +0 -437
  73. package/dist/components/trip-cards/__tests__/mockData.test.d.ts +0 -1
  74. package/dist/components/trip-cards/__tests__/mockData.test.js +0 -57
  75. package/dist/components/trip-cards/__tests__/skeletonStyles.test.d.ts +0 -1
  76. package/dist/components/trip-cards/__tests__/skeletonStyles.test.js +0 -194
  77. package/dist/components/trip-cards/assets/BoatIcon.d.ts +0 -1
  78. package/dist/components/trip-cards/assets/BoatIcon.js +0 -4
  79. package/dist/components/trip-cards/assets/CalendarIcon.d.ts +0 -1
  80. package/dist/components/trip-cards/assets/CalendarIcon.js +0 -4
  81. package/dist/components/trip-cards/assets/ChevronRightIcon.d.ts +0 -1
  82. package/dist/components/trip-cards/assets/ChevronRightIcon.js +0 -4
  83. package/dist/components/trip-cards/assets/LocationIcon.d.ts +0 -1
  84. package/dist/components/trip-cards/assets/LocationIcon.js +0 -4
  85. package/dist/components/trip-cards/assets/MoonIcon.d.ts +0 -1
  86. package/dist/components/trip-cards/assets/MoonIcon.js +0 -4
  87. package/dist/components/trip-cards/assets/index.d.ts +0 -6
  88. package/dist/components/trip-cards/assets/index.js +0 -7
  89. package/dist/components/trip-cards/helpers.d.ts +0 -4
  90. package/dist/components/trip-cards/helpers.js +0 -74
  91. package/dist/components/trip-cards/index.d.ts +0 -4
  92. package/dist/components/trip-cards/index.js +0 -70
  93. package/dist/components/trip-cards/mockData.d.ts +0 -3
  94. package/dist/components/trip-cards/mockData.js +0 -323
  95. package/dist/components/trip-cards/skeletonStyles.d.ts +0 -9
  96. package/dist/components/trip-cards/skeletonStyles.js +0 -37
  97. package/dist/components/trip-cards/styles.d.ts +0 -39
  98. package/dist/components/trip-cards/styles.js +0 -387
  99. package/dist/components/trip-cards/types.d.ts +0 -87
  100. package/src/components/carousel-component/CarouselComponent.stories.tsx +0 -220
  101. package/src/components/carousel-component/CarouselItem.tsx +0 -20
  102. package/src/components/carousel-component/DefaultNavigationArrow.tsx +0 -37
  103. package/src/components/carousel-component/DefaultPageDot.tsx +0 -20
  104. package/src/components/carousel-component/__tests__/CarouselComponent.test.tsx +0 -259
  105. package/src/components/carousel-component/__tests__/CarouselItem.test.tsx +0 -140
  106. package/src/components/carousel-component/__tests__/DefaultNavigationArrow.test.tsx +0 -153
  107. package/src/components/carousel-component/__tests__/DefaultPageDot.test.tsx +0 -105
  108. package/src/components/carousel-component/hooks/__tests__/useCarousel.test.ts +0 -438
  109. package/src/components/carousel-component/hooks/useCarousel.ts +0 -187
  110. package/src/components/carousel-component/index.tsx +0 -88
  111. package/src/components/carousel-component/styles.ts +0 -140
  112. package/src/components/carousel-component/types.ts +0 -51
  113. package/src/components/trip-cards/SkeletonCard.tsx +0 -54
  114. package/src/components/trip-cards/TripCard.tsx +0 -135
  115. package/src/components/trip-cards/TripCards.stories.tsx +0 -67
  116. package/src/components/trip-cards/TripCardsLayout.tsx +0 -75
  117. package/src/components/trip-cards/__tests__/SkeletonCard.test.tsx +0 -169
  118. package/src/components/trip-cards/__tests__/TripCard.test.tsx +0 -120
  119. package/src/components/trip-cards/__tests__/TripCardsLayout.test.tsx +0 -532
  120. package/src/components/trip-cards/__tests__/assets.test.tsx +0 -206
  121. package/src/components/trip-cards/__tests__/helpers.test.ts +0 -165
  122. package/src/components/trip-cards/__tests__/index.test.tsx +0 -499
  123. package/src/components/trip-cards/__tests__/mockData.test.ts +0 -67
  124. package/src/components/trip-cards/__tests__/skeletonStyles.test.tsx +0 -256
  125. package/src/components/trip-cards/assets/BoatIcon.tsx +0 -17
  126. package/src/components/trip-cards/assets/CalendarIcon.tsx +0 -17
  127. package/src/components/trip-cards/assets/ChevronRightIcon.tsx +0 -20
  128. package/src/components/trip-cards/assets/LocationIcon.tsx +0 -17
  129. package/src/components/trip-cards/assets/MoonIcon.tsx +0 -17
  130. package/src/components/trip-cards/assets/index.ts +0 -7
  131. package/src/components/trip-cards/helpers.ts +0 -99
  132. package/src/components/trip-cards/index.tsx +0 -104
  133. package/src/components/trip-cards/mockData.ts +0 -351
  134. package/src/components/trip-cards/skeletonStyles.ts +0 -46
  135. package/src/components/trip-cards/styles.ts +0 -426
  136. package/src/components/trip-cards/types.ts +0 -91
@@ -1,387 +0,0 @@
1
- import styled from 'styled-components';
2
- const breakpoints = {
3
- sm: '390px',
4
- md: '768px',
5
- lg: '1024px',
6
- xl: '1320px'
7
- };
8
- const colors = {
9
- primary: '#005C8A',
10
- titleBlue: '#145683',
11
- ink: '#333333',
12
- inkBrand: '#01000D',
13
- secondary: '#696969',
14
- border: '#E4E4E4',
15
- offerBg: '#FFEECF',
16
- offerBorder: '#FFB329',
17
- strikethrough: '#9F0000',
18
- dotActive: '#01000D',
19
- dotInactive: '#AAAAAA',
20
- iconBlue: '#236FA3',
21
- white: '#FFFFFF'
22
- };
23
- export const Container = styled.div `
24
- max-width: 800px;
25
- margin: 0 auto;
26
- padding: 80px 0 40px;
27
-
28
- @media (max-width: ${breakpoints.md}) {
29
- padding: 40px 0;
30
- }
31
- `;
32
- export const TitleSection = styled.div `
33
- padding: 0;
34
- margin-bottom: 16px;
35
-
36
- @media (max-width: ${breakpoints.md}) {
37
- padding: 0 10px;
38
- }
39
- `;
40
- export const TitleBar = styled.div `
41
- display: flex;
42
- flex-direction: row;
43
- align-items: center;
44
- gap: 12px;
45
- border-top: 1px dashed ${colors.border};
46
- border-bottom: 1px dashed ${colors.border};
47
- padding: 20px 0px;
48
-
49
- @media (max-width: ${breakpoints.md}) {
50
- justify-content: space-between;
51
- }
52
- `;
53
- export const TitleContent = styled.div `
54
- display: flex;
55
- flex-direction: column;
56
- gap: 4px;
57
-
58
- @media (min-width: ${breakpoints.md}) {
59
- flex-direction: row;
60
- align-items: baseline;
61
- gap: 8px;
62
- }
63
- `;
64
- export const Title = styled.h2 `
65
- font-family: 'Times Modern', serif;
66
- font-size: 24px;
67
- font-weight: 800;
68
- line-height: 1.13;
69
- color: #145683;
70
- margin: 0;
71
- `;
72
- export const Subtitle = styled.p `
73
- font-family: 'Times Modern', serif;
74
- font-size: 20px;
75
- font-weight: 400;
76
- line-height: 1.13;
77
- color: #333333;
78
- margin: 0;
79
- vertical-align: bottom;
80
- `;
81
- export const TitleLink = styled.a `
82
- display: inline-flex;
83
- align-items: center;
84
- justify-content: center;
85
- width: 32px;
86
- height: 32px;
87
- padding: 8px;
88
- background: #eeeeee;
89
- border-radius: 33.33px;
90
- text-decoration: none;
91
- transition: background-color 0.2s ease;
92
- flex-shrink: 0;
93
-
94
- &:hover {
95
- background: #dddddd;
96
- }
97
-
98
- svg {
99
- width: 16px;
100
- height: 16px;
101
- color: ${colors.ink};
102
- }
103
- `;
104
- export const Description = styled.p `
105
- font-family: 'Roboto', sans-serif;
106
- font-size: 16px;
107
- line-height: 1.5;
108
- color: ${colors.secondary};
109
- margin: 0 0 20px 0;
110
- `;
111
- export const StaticCardsGrid = styled.div `
112
- display: grid;
113
- grid-template-columns: 1fr;
114
- gap: 20px;
115
- padding: 0;
116
-
117
- @media (min-width: ${breakpoints.md}) {
118
- grid-template-columns: repeat(2, 1fr);
119
- }
120
- `;
121
- // Card Styles
122
- export const CardContainer = styled.div `
123
- width: 100%;
124
- height: 100%;
125
- border: 1.2px solid ${colors.border};
126
- background: ${colors.white};
127
- overflow: hidden;
128
- display: flex;
129
- flex-direction: column;
130
- `;
131
- export const ImageContainer = styled.div `
132
- position: relative;
133
- width: 100%;
134
- aspect-ratio: 3 / 2;
135
- height: 100%;
136
- overflow: hidden;
137
- flex-shrink: 0;
138
-
139
- @media (min-width: ${breakpoints.sm}) {
140
- height: 213px;
141
- }
142
-
143
- @media (min-width: ${breakpoints.md}) {
144
- height: 173px;
145
- }
146
-
147
- @media (min-width: ${breakpoints.xl}) {
148
- height: 200px;
149
- }
150
- `;
151
- export const CardImage = styled.img `
152
- position: absolute;
153
- top: 0;
154
- left: 0;
155
- width: 100%;
156
- height: 100%;
157
- object-fit: cover;
158
- object-position: center;
159
- `;
160
- export const OfferLabel = styled.div `
161
- position: absolute;
162
- bottom: 12px;
163
- left: 0;
164
- background: ${colors.offerBg};
165
- border-left: 1.2px solid ${colors.offerBorder};
166
- padding: 12px 16px;
167
- font-family: 'Roboto', sans-serif;
168
- font-size: 14px;
169
- font-weight: 400;
170
- line-height: 1.5;
171
- color: ${colors.ink};
172
- `;
173
- export const GiftBanner = styled.div `
174
- position: absolute;
175
- bottom: 12px;
176
- left: 0;
177
- max-width: 80%;
178
- background: ${colors.offerBg};
179
- padding: 12px 16px;
180
- font-family: 'Roboto', sans-serif;
181
- font-size: 14px;
182
- font-weight: 400;
183
- line-height: 1.5;
184
- color: ${colors.ink};
185
- text-align: left;
186
- `;
187
- export const CardContent = styled.div `
188
- display: flex;
189
- flex-direction: column;
190
- flex: 1;
191
- padding: 20px 16px 16px 16px;
192
- gap: 32px;
193
- `;
194
- export const TopContainer = styled.div `
195
- display: flex;
196
- flex-direction: column;
197
- gap: 16px;
198
- flex: 1;
199
- `;
200
- export const BottomContainer = styled.div `
201
- display: flex;
202
- flex-direction: column;
203
- gap: 16px;
204
- `;
205
- export const Headline = styled.h3 `
206
- font-family: 'Times Modern', serif;
207
- font-size: 20px;
208
- font-weight: 700;
209
- line-height: 1.125;
210
- color: ${colors.ink};
211
- margin: 0;
212
- `;
213
- export const DataPointsList = styled.div `
214
- display: flex;
215
- flex-direction: column;
216
- gap: 2px;
217
- `;
218
- export const DataPoint = styled.div `
219
- display: flex;
220
- align-items: center;
221
- gap: 8px;
222
- font-family: 'Roboto', sans-serif;
223
- font-size: 14px;
224
- line-height: 1.5;
225
- color: ${colors.secondary};
226
- min-height: 21px;
227
- `;
228
- export const DataIcon = styled.span `
229
- width: 17px;
230
- height: 17px;
231
- display: flex;
232
- align-items: center;
233
- justify-content: center;
234
- flex-shrink: 0;
235
- color: ${colors.iconBlue};
236
- font-size: 17px;
237
- `;
238
- export const PriceSection = styled.div `
239
- display: flex;
240
- flex-direction: row;
241
- align-items: center;
242
- gap: 12px;
243
- `;
244
- export const PriceContainer = styled.div `
245
- display: flex;
246
- flex-direction: column;
247
- gap: 12px;
248
- flex: 1;
249
- `;
250
- export const OfferContainer = styled.div `
251
- display: flex;
252
- align-items: center;
253
- gap: 4px;
254
- `;
255
- export const PriceLabel = styled.span `
256
- font-family: 'Roboto', sans-serif;
257
- font-size: 14px;
258
- line-height: 1.5;
259
- color: ${colors.secondary};
260
- `;
261
- export const OriginalPrice = styled.span `
262
- font-family: 'Roboto', sans-serif;
263
- font-size: 14px;
264
- font-weight: 500;
265
- line-height: 1.5;
266
- color: ${colors.strikethrough};
267
- text-decoration: line-through;
268
- `;
269
- export const CurrentPrice = styled.span `
270
- font-family: 'Times Modern', serif;
271
- font-size: 44px;
272
- font-weight: 300;
273
- line-height: 1.125;
274
- color: ${colors.ink};
275
- `;
276
- export const LogoContainer = styled.div `
277
- width: 88px;
278
- height: 44px;
279
- display: flex;
280
- align-items: center;
281
-
282
- a {
283
- display: flex;
284
- align-items: center;
285
- width: 100%;
286
- height: 100%;
287
- }
288
-
289
- img {
290
- max-width: 100%;
291
- max-height: 100%;
292
- object-fit: contain;
293
- }
294
- `;
295
- export const CTAButton = styled.a `
296
- display: flex;
297
- align-items: center;
298
- justify-content: center;
299
- width: 100%;
300
- padding: 12px 16px;
301
- background: ${colors.primary};
302
- color: ${colors.white};
303
- font-family: 'Roboto', sans-serif;
304
- font-size: 16px;
305
- font-weight: 500;
306
- line-height: 1.5;
307
- text-decoration: none;
308
- transition: background 0.2s ease;
309
-
310
- &:hover {
311
- background: #004a6e;
312
- }
313
- `;
314
- // Navigation Arrow - positioned on sides of carousel
315
- export const NavigationArrow = styled.button `
316
- display: none;
317
- position: absolute;
318
- top: 50%;
319
- transform: translateY(-50%);
320
- ${({ direction }) => direction === 'left' ? 'left: -65px;' : 'right: -65px;'} z-index: 10;
321
- width: 48px;
322
- height: 48px;
323
- border: none;
324
- border-radius: 50%;
325
- background: ${({ disabled }) => (disabled ? '#CCCCCC' : colors.primary)};
326
- cursor: ${({ disabled }) => (disabled ? 'default' : 'pointer')};
327
- align-items: center;
328
- justify-content: center;
329
- transition: background 0.2s ease;
330
- pointer-events: ${({ disabled }) => (disabled ? 'none' : 'auto')};
331
-
332
- svg {
333
- width: 24px;
334
- height: 24px;
335
- }
336
-
337
- svg path {
338
- stroke: ${colors.white};
339
- }
340
-
341
- &:hover:not(:disabled) {
342
- background: #004a6e;
343
- }
344
-
345
- @media (min-width: ${breakpoints.lg}) {
346
- display: flex;
347
- }
348
- `;
349
- export const PageControl = styled.div `
350
- display: flex;
351
- justify-content: center;
352
- align-items: center;
353
- gap: 10px;
354
- padding: 12px;
355
- background: ${colors.white};
356
- `;
357
- export const PageDot = styled.button `
358
- width: 8px;
359
- height: 8px;
360
- border-radius: 1000px;
361
- border: none;
362
- padding: 0;
363
- background: ${({ active }) => (active ? '#01000D' : '#AAAAAA')};
364
- cursor: pointer;
365
- transition: background 0.2s ease;
366
-
367
- &:hover {
368
- background: #01000d;
369
- }
370
- `;
371
- export const LoadingContainer = styled.div `
372
- display: flex;
373
- justify-content: center;
374
- align-items: center;
375
- min-height: 400px;
376
- font-family: 'Roboto', sans-serif;
377
- color: ${colors.secondary};
378
- `;
379
- export const ErrorContainer = styled.div `
380
- display: flex;
381
- justify-content: center;
382
- align-items: center;
383
- min-height: 200px;
384
- font-family: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Ozs7Ozs7Z0JBTXpDLENBQUMsRUFBRSxNQUFNLEVBQUUsRUFBRSxFQUFFLENBQUMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsU0FBUyxDQUFDOzs7Ozs7O0NBTy9ELENBQUM7QUFFRixNQUFNLENBQUMsTUFBTSxnQkFBZ0IsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFBOzs7Ozs7V0FNL0IsTUFBTSxDQUFDLFNBQVM7Q0FDMUIsQ0FBQztBQUVGLE1BQU0sQ0FBQyxNQUFNLGNBQWMsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFBOzs7Ozs7V0FNN0IsTUFBTSxDQUFDLGFBQWE7Q0FDOUIsQ0FBQyJ9
@@ -1,87 +0,0 @@
1
- import { ComponentType } from 'react';
2
- export interface TripCardsElement {
3
- class?: string;
4
- tripcards: string;
5
- title?: string;
6
- titleUrl?: string;
7
- description?: string;
8
- }
9
- export interface TripCardsProps {
10
- element: TripCardsElement;
11
- useMockData?: boolean;
12
- }
13
- export interface DecodedTripCard {
14
- cruise_id: string;
15
- }
16
- export interface TripCardApiData {
17
- cruise_id: string;
18
- image: string;
19
- offer_label?: string;
20
- gift_banner?: string;
21
- headline: string;
22
- date: string;
23
- duration: string;
24
- route: string;
25
- ship: string;
26
- original_price?: string;
27
- price: string;
28
- logo: string;
29
- logo_url: string;
30
- cta_url: string;
31
- cta_text: string;
32
- }
33
- export interface TripCardProps {
34
- card: TripCardApiData;
35
- }
36
- export interface ApiCruiseResult {
37
- post_id: number;
38
- cruise_id: number;
39
- cruise_title: string;
40
- cruise_line: {
41
- name: string;
42
- link: string;
43
- logo: string;
44
- };
45
- ship: {
46
- name: string;
47
- link: string;
48
- image: string;
49
- };
50
- departs: string;
51
- ends: string;
52
- date_label: string;
53
- destination: string[];
54
- duration: number;
55
- itinerary: string[];
56
- prices: {
57
- cheapest_price: number | string;
58
- inside: string | number;
59
- outside: string | number;
60
- balcony: string | number;
61
- suite: string | number;
62
- };
63
- was_prices: {
64
- cheapest_price: number | string;
65
- inside: number;
66
- outside: number;
67
- balcony: number;
68
- suite: number;
69
- };
70
- link: string;
71
- campaigns: string[];
72
- extras: {
73
- date: string;
74
- duration: string;
75
- destination: string;
76
- info: string;
77
- };
78
- }
79
- export interface TripCardsLayoutProps {
80
- element: TripCardsElement;
81
- items: Array<{
82
- id: string | number;
83
- data?: TripCardApiData;
84
- }>;
85
- CardComponent: ComponentType<any>;
86
- itemsPerPage: number;
87
- }
@@ -1,220 +0,0 @@
1
- import React from 'react';
2
- import { storiesOf } from '@storybook/react';
3
- import { CarouselComponent, CarouselItem } from './index';
4
- import styled from 'styled-components';
5
-
6
- // Simple card component for demos
7
- const SimpleCard = styled.div<{ color: string }>`
8
- background: ${props => props.color};
9
- height: 300px;
10
- border-radius: 8px;
11
- display: flex;
12
- align-items: center;
13
- justify-content: center;
14
- color: white;
15
- font-size: 24px;
16
- font-weight: 600;
17
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
18
- `;
19
-
20
- const Container = styled.div`
21
- max-width: 1200px;
22
- margin: 40px auto;
23
- padding: 0 20px;
24
- `;
25
-
26
- const Title = styled.h2`
27
- margin-bottom: 24px;
28
- font-size: 24px;
29
- font-weight: 600;
30
- `;
31
-
32
- storiesOf('Typescript Component/CarouselComponent', module)
33
- .add('Two Cards Per Page', () => {
34
- const colors = [
35
- '#005C8A',
36
- '#FF6B6B',
37
- '#4ECDC4',
38
- '#45B7D1',
39
- '#96CEB4',
40
- '#FFEAA7'
41
- ];
42
-
43
- const items = colors.map((color, index) => (
44
- <CarouselItem
45
- key={index}
46
- widthConfig={{
47
- mobile: '90%',
48
- tablet: '70%',
49
- desktop: 'calc(47% - 10px)'
50
- }}
51
- >
52
- <SimpleCard color={color}>Card {index + 1}</SimpleCard>
53
- </CarouselItem>
54
- ));
55
-
56
- return (
57
- <Container>
58
- <Title>Two Cards Per Page (with peek)</Title>
59
- <CarouselComponent
60
- items={items}
61
- options={{
62
- itemsPerPage: 2
63
- }}
64
- showArrows={true}
65
- showDots={true}
66
- />
67
- </Container>
68
- );
69
- })
70
- .add('Three Cards Per Page', () => {
71
- const colors = [
72
- '#005C8A',
73
- '#FF6B6B',
74
- '#4ECDC4',
75
- '#45B7D1',
76
- '#96CEB4',
77
- '#FFEAA7',
78
- '#DFE6E9',
79
- '#74B9FF',
80
- '#A29BFE'
81
- ];
82
-
83
- const items = colors.map((color, index) => (
84
- <CarouselItem
85
- key={index}
86
- widthConfig={{
87
- mobile: '85%',
88
- tablet: '40%',
89
- desktop: 'calc(31% - 14px)'
90
- }}
91
- >
92
- <SimpleCard color={color}>Card {index + 1}</SimpleCard>
93
- </CarouselItem>
94
- ));
95
-
96
- return (
97
- <Container>
98
- <Title>Three Cards Per Page (with peek)</Title>
99
- <CarouselComponent
100
- items={items}
101
- options={{
102
- itemsPerPage: 3
103
- }}
104
- showArrows={true}
105
- showDots={true}
106
- />
107
- </Container>
108
- );
109
- })
110
- .add('Minimal Example', () => {
111
- const items = [
112
- <CarouselItem
113
- key="1"
114
- widthConfig={{
115
- mobile: '90%',
116
- tablet: '70%',
117
- desktop: 'calc(47% - 10px)'
118
- }}
119
- >
120
- <SimpleCard color="#005C8A">Card 1</SimpleCard>
121
- </CarouselItem>,
122
- <CarouselItem
123
- key="2"
124
- widthConfig={{
125
- mobile: '90%',
126
- tablet: '70%',
127
- desktop: 'calc(47% - 10px)'
128
- }}
129
- >
130
- <SimpleCard color="#FF6B6B">Card 2</SimpleCard>
131
- </CarouselItem>,
132
- <CarouselItem
133
- key="3"
134
- widthConfig={{
135
- mobile: '90%',
136
- tablet: '70%',
137
- desktop: 'calc(47% - 10px)'
138
- }}
139
- >
140
- <SimpleCard color="#4ECDC4">Card 3</SimpleCard>
141
- </CarouselItem>,
142
- <CarouselItem
143
- key="4"
144
- widthConfig={{
145
- mobile: '90%',
146
- tablet: '70%',
147
- desktop: 'calc(47% - 10px)'
148
- }}
149
- >
150
- <SimpleCard color="#45B7D1">Card 4</SimpleCard>
151
- </CarouselItem>
152
- ];
153
-
154
- return (
155
- <Container>
156
- <Title>Simple 4 Cards</Title>
157
- <CarouselComponent items={items} />
158
- </Container>
159
- );
160
- })
161
- .add('Without Navigation', () => {
162
- const colors = ['#005C8A', '#FF6B6B', '#4ECDC4', '#45B7D1'];
163
-
164
- const items = colors.map((color, index) => (
165
- <CarouselItem
166
- key={index}
167
- widthConfig={{
168
- mobile: '90%',
169
- tablet: '70%',
170
- desktop: 'calc(47% - 10px)'
171
- }}
172
- >
173
- <SimpleCard color={color}>Card {index + 1}</SimpleCard>
174
- </CarouselItem>
175
- ));
176
-
177
- return (
178
- <Container>
179
- <Title>Scroll Only (No Arrows/Dots)</Title>
180
- <CarouselComponent items={items} showArrows={false} showDots={false} />
181
- </Container>
182
- );
183
- })
184
- .add('Three Cards Exact Width (No Peek)', () => {
185
- const colors = [
186
- '#005C8A',
187
- '#FF6B6B',
188
- '#4ECDC4',
189
- '#45B7D1',
190
- '#96CEB4',
191
- '#FFEAA7'
192
- ];
193
-
194
- const items = colors.map((color, index) => (
195
- <CarouselItem
196
- key={index}
197
- widthConfig={{
198
- mobile: '90%',
199
- tablet: '70%',
200
- desktop: 'calc(33% - 10px)'
201
- }}
202
- >
203
- <SimpleCard color={color}>Card {index + 1}</SimpleCard>
204
- </CarouselItem>
205
- ));
206
-
207
- return (
208
- <Container>
209
- <Title>Three Cards Per Page (exact width, no peek)</Title>
210
- <CarouselComponent
211
- items={items}
212
- options={{
213
- itemsPerPage: 3
214
- }}
215
- showArrows={true}
216
- showDots={true}
217
- />
218
- </Container>
219
- );
220
- });
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- import { ItemContainer } from './styles';
3
- import { CarouselItemProps } from './types';
4
-
5
- export const CarouselItem: React.FC<CarouselItemProps> = ({
6
- children,
7
- widthConfig = {
8
- mobile: '90%',
9
- tablet: '70%',
10
- desktop: 'calc(50% - 10px)',
11
- xl: 'calc(50% - 10px)'
12
- },
13
- className
14
- }) => {
15
- return (
16
- <ItemContainer widthConfig={widthConfig} className={className}>
17
- {children}
18
- </ItemContainer>
19
- );
20
- };