@times-components/ts-components 1.146.2-be27d508c972211ad80599875cd69c63bf67d4b1.45 → 1.146.2-c9973aa4b92ab539c7e626ec928a64701390290d.3

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 (132) hide show
  1. package/dist/components/social-embed/SocialVendor.d.ts +3 -0
  2. package/dist/components/social-embed/SocialVendor.js +4 -2
  3. package/dist/components/social-embed/__tests__/SocialVendor.test.js +8 -1
  4. package/dist/components/social-embed/components/FacebookComponent.d.ts +3 -0
  5. package/dist/components/social-embed/components/FacebookComponent.js +28 -0
  6. package/dist/components/social-embed/constants.d.ts +1 -0
  7. package/dist/components/social-embed/constants.js +3 -2
  8. package/dist/components/social-embed/helpers/socialMediaVendors.js +6 -1
  9. package/dist/components/social-embed/styles.d.ts +1 -0
  10. package/dist/components/social-embed/styles.js +28 -1
  11. package/dist/index.d.ts +0 -1
  12. package/dist/index.js +1 -2
  13. package/package.json +12 -12
  14. package/rnw.js +1 -1
  15. package/src/components/social-embed/SocialVendor.tsx +3 -1
  16. package/src/components/social-embed/__tests__/SocialVendor.test.tsx +11 -0
  17. package/src/components/social-embed/components/FacebookComponent.tsx +38 -0
  18. package/src/components/social-embed/constants.ts +2 -1
  19. package/src/components/social-embed/helpers/socialMediaVendors.ts +5 -0
  20. package/src/components/social-embed/styles.ts +30 -0
  21. package/src/index.ts +0 -2
  22. package/dist/components/carousel-component/CarouselComponent.stories.d.ts +0 -1
  23. package/dist/components/carousel-component/CarouselComponent.stories.js +0 -146
  24. package/dist/components/carousel-component/CarouselItem.d.ts +0 -3
  25. package/dist/components/carousel-component/CarouselItem.js +0 -12
  26. package/dist/components/carousel-component/DefaultNavigationArrow.d.ts +0 -8
  27. package/dist/components/carousel-component/DefaultNavigationArrow.js +0 -6
  28. package/dist/components/carousel-component/DefaultPageDot.d.ts +0 -8
  29. package/dist/components/carousel-component/DefaultPageDot.js +0 -4
  30. package/dist/components/carousel-component/__tests__/CarouselComponent.test.d.ts +0 -1
  31. package/dist/components/carousel-component/__tests__/CarouselComponent.test.js +0 -163
  32. package/dist/components/carousel-component/__tests__/CarouselItem.test.d.ts +0 -1
  33. package/dist/components/carousel-component/__tests__/CarouselItem.test.js +0 -80
  34. package/dist/components/carousel-component/__tests__/DefaultNavigationArrow.test.d.ts +0 -1
  35. package/dist/components/carousel-component/__tests__/DefaultNavigationArrow.test.js +0 -62
  36. package/dist/components/carousel-component/__tests__/DefaultPageDot.test.d.ts +0 -1
  37. package/dist/components/carousel-component/__tests__/DefaultPageDot.test.js +0 -68
  38. package/dist/components/carousel-component/hooks/__tests__/useCarousel.test.d.ts +0 -1
  39. package/dist/components/carousel-component/hooks/__tests__/useCarousel.test.js +0 -459
  40. package/dist/components/carousel-component/hooks/useCarousel.d.ts +0 -2
  41. package/dist/components/carousel-component/hooks/useCarousel.js +0 -167
  42. package/dist/components/carousel-component/index.d.ts +0 -4
  43. package/dist/components/carousel-component/index.js +0 -20
  44. package/dist/components/carousel-component/styles.d.ts +0 -28
  45. package/dist/components/carousel-component/styles.js +0 -172
  46. package/dist/components/carousel-component/types.d.ts +0 -53
  47. package/dist/components/carousel-component/types.js +0 -2
  48. package/dist/components/trip-cards/SkeletonCard.d.ts +0 -7
  49. package/dist/components/trip-cards/SkeletonCard.js +0 -22
  50. package/dist/components/trip-cards/TripCard.d.ts +0 -3
  51. package/dist/components/trip-cards/TripCard.js +0 -49
  52. package/dist/components/trip-cards/TripCards.stories.d.ts +0 -1
  53. package/dist/components/trip-cards/TripCards.stories.js +0 -159
  54. package/dist/components/trip-cards/TripCardsLayout.d.ts +0 -3
  55. package/dist/components/trip-cards/TripCardsLayout.js +0 -56
  56. package/dist/components/trip-cards/__tests__/SkeletonCard.test.d.ts +0 -1
  57. package/dist/components/trip-cards/__tests__/SkeletonCard.test.js +0 -139
  58. package/dist/components/trip-cards/__tests__/TripCard.test.d.ts +0 -1
  59. package/dist/components/trip-cards/__tests__/TripCard.test.js +0 -95
  60. package/dist/components/trip-cards/__tests__/TripCardsLayout.test.d.ts +0 -1
  61. package/dist/components/trip-cards/__tests__/TripCardsLayout.test.js +0 -314
  62. package/dist/components/trip-cards/__tests__/assets.test.d.ts +0 -1
  63. package/dist/components/trip-cards/__tests__/assets.test.js +0 -165
  64. package/dist/components/trip-cards/__tests__/helpers.test.d.ts +0 -1
  65. package/dist/components/trip-cards/__tests__/helpers.test.js +0 -220
  66. package/dist/components/trip-cards/__tests__/index.test.d.ts +0 -1
  67. package/dist/components/trip-cards/__tests__/index.test.js +0 -478
  68. package/dist/components/trip-cards/__tests__/mockData.test.d.ts +0 -1
  69. package/dist/components/trip-cards/__tests__/mockData.test.js +0 -57
  70. package/dist/components/trip-cards/__tests__/skeletonStyles.test.d.ts +0 -1
  71. package/dist/components/trip-cards/__tests__/skeletonStyles.test.js +0 -194
  72. package/dist/components/trip-cards/assets/BoatIcon.d.ts +0 -1
  73. package/dist/components/trip-cards/assets/BoatIcon.js +0 -4
  74. package/dist/components/trip-cards/assets/CalendarIcon.d.ts +0 -1
  75. package/dist/components/trip-cards/assets/CalendarIcon.js +0 -4
  76. package/dist/components/trip-cards/assets/ChevronRightIcon.d.ts +0 -1
  77. package/dist/components/trip-cards/assets/ChevronRightIcon.js +0 -4
  78. package/dist/components/trip-cards/assets/LocationIcon.d.ts +0 -1
  79. package/dist/components/trip-cards/assets/LocationIcon.js +0 -4
  80. package/dist/components/trip-cards/assets/MoonIcon.d.ts +0 -1
  81. package/dist/components/trip-cards/assets/MoonIcon.js +0 -4
  82. package/dist/components/trip-cards/assets/index.d.ts +0 -6
  83. package/dist/components/trip-cards/assets/index.js +0 -7
  84. package/dist/components/trip-cards/helpers.d.ts +0 -11
  85. package/dist/components/trip-cards/helpers.js +0 -138
  86. package/dist/components/trip-cards/index.d.ts +0 -4
  87. package/dist/components/trip-cards/index.js +0 -68
  88. package/dist/components/trip-cards/mockData.d.ts +0 -3
  89. package/dist/components/trip-cards/mockData.js +0 -317
  90. package/dist/components/trip-cards/skeletonStyles.d.ts +0 -9
  91. package/dist/components/trip-cards/skeletonStyles.js +0 -37
  92. package/dist/components/trip-cards/styles.d.ts +0 -43
  93. package/dist/components/trip-cards/styles.js +0 -404
  94. package/dist/components/trip-cards/types.d.ts +0 -119
  95. package/dist/components/trip-cards/types.js +0 -2
  96. package/src/components/carousel-component/CarouselComponent.stories.tsx +0 -220
  97. package/src/components/carousel-component/CarouselItem.tsx +0 -26
  98. package/src/components/carousel-component/DefaultNavigationArrow.tsx +0 -37
  99. package/src/components/carousel-component/DefaultPageDot.tsx +0 -20
  100. package/src/components/carousel-component/__tests__/CarouselComponent.test.tsx +0 -259
  101. package/src/components/carousel-component/__tests__/CarouselItem.test.tsx +0 -140
  102. package/src/components/carousel-component/__tests__/DefaultNavigationArrow.test.tsx +0 -153
  103. package/src/components/carousel-component/__tests__/DefaultPageDot.test.tsx +0 -105
  104. package/src/components/carousel-component/hooks/__tests__/useCarousel.test.ts +0 -625
  105. package/src/components/carousel-component/hooks/useCarousel.ts +0 -229
  106. package/src/components/carousel-component/index.tsx +0 -92
  107. package/src/components/carousel-component/styles.ts +0 -188
  108. package/src/components/carousel-component/types.ts +0 -62
  109. package/src/components/trip-cards/SkeletonCard.tsx +0 -64
  110. package/src/components/trip-cards/TripCard.tsx +0 -140
  111. package/src/components/trip-cards/TripCards.stories.tsx +0 -224
  112. package/src/components/trip-cards/TripCardsLayout.tsx +0 -145
  113. package/src/components/trip-cards/__tests__/SkeletonCard.test.tsx +0 -169
  114. package/src/components/trip-cards/__tests__/TripCard.test.tsx +0 -120
  115. package/src/components/trip-cards/__tests__/TripCardsLayout.test.tsx +0 -583
  116. package/src/components/trip-cards/__tests__/assets.test.tsx +0 -206
  117. package/src/components/trip-cards/__tests__/helpers.test.ts +0 -272
  118. package/src/components/trip-cards/__tests__/index.test.tsx +0 -550
  119. package/src/components/trip-cards/__tests__/mockData.test.ts +0 -67
  120. package/src/components/trip-cards/__tests__/skeletonStyles.test.tsx +0 -256
  121. package/src/components/trip-cards/assets/BoatIcon.tsx +0 -17
  122. package/src/components/trip-cards/assets/CalendarIcon.tsx +0 -17
  123. package/src/components/trip-cards/assets/ChevronRightIcon.tsx +0 -20
  124. package/src/components/trip-cards/assets/LocationIcon.tsx +0 -17
  125. package/src/components/trip-cards/assets/MoonIcon.tsx +0 -17
  126. package/src/components/trip-cards/assets/index.ts +0 -7
  127. package/src/components/trip-cards/helpers.ts +0 -176
  128. package/src/components/trip-cards/index.tsx +0 -119
  129. package/src/components/trip-cards/mockData.ts +0 -345
  130. package/src/components/trip-cards/skeletonStyles.ts +0 -46
  131. package/src/components/trip-cards/styles.ts +0 -450
  132. package/src/components/trip-cards/types.ts +0 -128
@@ -1,450 +0,0 @@
1
- import styled from 'styled-components';
2
- import {
3
- ContainerProps,
4
- CurrentPriceProps,
5
- ImageContainerProps
6
- } from './types';
7
-
8
- const breakpoints = {
9
- xs: '0px',
10
- sm: '520px',
11
- md: '768px',
12
- lg: '1024px',
13
- xl: '1320px'
14
- };
15
-
16
- const colors = {
17
- primary: '#005C8A', // interactivePrimary030
18
- titleBlue: '#145683', // Title color
19
- ink: '#333333', // inkBase
20
- inkBrand: '#01000D', // inkBrand010 - active dot
21
- secondary: '#696969', // Secondary text
22
- border: '#E4E4E4', // Card border
23
- offerBg: '#FFEECF', // Offer label background
24
- offerBorder: '#FFB329', // Offer label left border
25
- strikethrough: '#9F0000', // Slashed price color
26
- dotActive: '#01000D', // inkBrand010
27
- dotInactive: '#AAAAAA', // inkNonEssential
28
- iconBlue: '#236FA3', // Data point icons
29
- white: '#FFFFFF'
30
- };
31
-
32
- export const Container = styled.div<ContainerProps>`
33
- max-width: 100%;
34
- margin: 0 auto;
35
- padding: 80px 0 40px;
36
-
37
- @media (min-width: ${breakpoints.md}) {
38
- max-width: var(
39
- --wp--style--global--content-size,
40
- ${props => props.tablet || '100%'}
41
- );
42
- }
43
-
44
- @media (min-width: ${breakpoints.lg}) {
45
- max-width: var(
46
- --wp--style--global--content-size,
47
- ${props => props.desktop || '100%'}
48
- );
49
- }
50
-
51
- @media (min-width: ${breakpoints.xl}) {
52
- max-width: var(
53
- --wp--style--global--content-size,
54
- ${props => props.xl || '100%'}
55
- );
56
- }
57
-
58
- @media (max-width: ${breakpoints.md}) {
59
- padding: 40px 0 0 ${props => (props.mobile ? '10px' : '20px')};
60
- }
61
- `;
62
-
63
- export const TitleSection = styled.div`
64
- padding: 0;
65
- margin-bottom: 16px;
66
- `;
67
-
68
- export const TitleBar = styled.div<{ applyRightPadding?: boolean }>`
69
- display: flex;
70
- flex-direction: row;
71
- align-items: center;
72
- gap: 12px;
73
- border-top: 1px dashed ${colors.border};
74
- border-bottom: 1px dashed ${colors.border};
75
- padding: 20px ${props => (props.applyRightPadding ? '10px' : '20px')} 20px 0px;
76
-
77
- @media (max-width: ${breakpoints.md}) {
78
- justify-content: space-between;
79
- }
80
- `;
81
-
82
- export const TitleContent = styled.div`
83
- display: flex;
84
- flex-direction: row;
85
- flex-wrap: wrap;
86
- align-items: baseline;
87
- gap: 8px;
88
- `;
89
-
90
- export const Title = styled.h2`
91
- font-family: 'Times Modern', serif;
92
- font-size: 24px;
93
- font-weight: 800;
94
- line-height: 1.13;
95
- color: #145683;
96
- margin: 0;
97
- `;
98
-
99
- export const Subtitle = styled.p`
100
- font-family: 'Times Modern', serif;
101
- font-size: 20px;
102
- font-weight: 400;
103
- line-height: 1.13;
104
- color: #333333;
105
- margin: 0;
106
- vertical-align: bottom;
107
- `;
108
-
109
- export const TitleLink = styled.a`
110
- display: inline-flex;
111
- align-items: center;
112
- justify-content: center;
113
- width: 32px;
114
- height: 32px;
115
- padding: 8px;
116
- background: #eeeeee;
117
- border-radius: 33.33px;
118
- text-decoration: none;
119
- transition: background-color 0.2s ease;
120
- flex-shrink: 0;
121
-
122
- &:hover {
123
- background: #dddddd;
124
- }
125
-
126
- svg {
127
- width: 16px;
128
- height: 16px;
129
- color: ${colors.ink};
130
- }
131
- `;
132
-
133
- export const Description = styled.p`
134
- font-family: 'Roboto', sans-serif;
135
- font-size: 16px;
136
- line-height: 1.5;
137
- color: ${colors.secondary};
138
- margin: 0 0 20px 0;
139
- `;
140
-
141
- export const StaticCardsGrid = styled.div<{
142
- $minWidthMobile?: string;
143
- $minWidthTablet?: string;
144
- $minWidthDesktop?: string;
145
- $minWidthXl?: string;
146
- }>`
147
- display: flex;
148
- gap: 20px;
149
- padding: 0;
150
- flex-wrap: nowrap;
151
- overflow-x: auto;
152
- scroll-snap-type: x mandatory;
153
- scrollbar-width: none;
154
- -ms-overflow-style: none;
155
- scroll-behavior: smooth;
156
- align-items: stretch;
157
-
158
- &::-webkit-scrollbar {
159
- display: none;
160
- }
161
-
162
- > * {
163
- flex: 0 0 ${props => props.$minWidthMobile || '90%'};
164
- min-width: ${props => props.$minWidthMobile || '280px'};
165
- scroll-snap-align: start;
166
- display: flex;
167
- flex-direction: column;
168
- }
169
-
170
- @media (min-width: ${breakpoints.md}) {
171
- overflow-x: visible;
172
-
173
- > * {
174
- flex: 1 1 0;
175
- min-width: 0;
176
- max-width: calc(50% - 10px);
177
- }
178
- }
179
-
180
- @media (min-width: ${breakpoints.lg}) {
181
- > * {
182
- flex: 1 1 0;
183
- min-width: 0;
184
- max-width: ${props => props.$minWidthDesktop || 'calc(50% - 10px)'};
185
- }
186
- }
187
-
188
- @media (min-width: ${breakpoints.xl}) {
189
- > * {
190
- flex: 1 1 0;
191
- min-width: 0;
192
- max-width: ${props => props.$minWidthXl || 'calc(50% - 10px)'};
193
- }
194
- }
195
- `;
196
-
197
- // Card Styles
198
- export const CardContainer = styled.div`
199
- flex: 1;
200
- border: 1.2px solid ${colors.border};
201
- background: ${colors.white};
202
- overflow: hidden;
203
- display: flex;
204
- flex-direction: column;
205
- `;
206
-
207
- export const ImageContainer = styled.div<ImageContainerProps>`
208
- position: relative;
209
- width: auto;
210
- aspect-ratio: 3 / 2;
211
- height: ${({ isStaticGrid, $heightXs }) =>
212
- !isStaticGrid && $heightXs ? $heightXs : '100%'};
213
- overflow: hidden;
214
- flex-shrink: 0;
215
-
216
- ${({ isStaticGrid, $heightSm, $heightMd, $heightLg, $heightXl }) =>
217
- !isStaticGrid &&
218
- `
219
-
220
- @media (min-width: ${breakpoints.sm}) {
221
- ${$heightSm && `height: ${$heightSm};`}
222
- }
223
-
224
- @media (min-width: ${breakpoints.md}) {
225
- ${$heightMd && `height: ${$heightMd};`}
226
- }
227
-
228
- @media (min-width: ${breakpoints.lg}) {
229
- ${$heightLg && `height: ${$heightLg};`}
230
- }
231
-
232
- @media (min-width: ${breakpoints.xl}) {
233
- ${$heightXl && `height: ${$heightXl};`}
234
- }
235
- `};
236
- `;
237
-
238
- export const CardImage = styled.img<{ isLoaded?: boolean }>`
239
- position: absolute;
240
- top: 0;
241
- left: 0;
242
- width: 100%;
243
- height: 100%;
244
- object-fit: cover;
245
- object-position: center;
246
- display: ${props => (props.isLoaded ? 'block' : 'none')};
247
- `;
248
-
249
- export const StyledLink = styled.a`
250
- text-decoration: none;
251
- color: inherit;
252
- `;
253
-
254
- export const OfferLabel = styled.div`
255
- position: absolute;
256
- bottom: 12px;
257
- left: 0;
258
- background: ${colors.offerBg};
259
- border-left: 1.2px solid ${colors.offerBorder};
260
- padding: 12px 16px;
261
- font-family: 'Roboto', sans-serif;
262
- font-size: 14px;
263
- font-weight: 400;
264
- line-height: 1.5;
265
- color: ${colors.ink};
266
- `;
267
-
268
- export const GiftBanner = styled.div`
269
- position: absolute;
270
- bottom: 12px;
271
- left: 0;
272
- max-width: 80%;
273
- background: ${colors.offerBg};
274
- padding: 12px 16px;
275
- font-family: 'Roboto', sans-serif;
276
- font-size: 14px;
277
- font-weight: 400;
278
- line-height: 1.5;
279
- color: ${colors.ink};
280
- text-align: left;
281
- `;
282
-
283
- export const CardContent = styled.div`
284
- display: flex;
285
- flex-direction: column;
286
- flex: 1;
287
- padding: 20px 16px 16px 16px;
288
- gap: 32px;
289
- `;
290
-
291
- export const TopContainer = styled.div`
292
- display: flex;
293
- flex-direction: column;
294
- gap: 16px;
295
- flex: 1;
296
- `;
297
-
298
- export const BottomContainer = styled.div`
299
- display: flex;
300
- flex-direction: column;
301
- gap: 16px;
302
- `;
303
-
304
- export const Headline = styled.h3`
305
- font-family: 'Times Modern', serif;
306
- font-size: 20px;
307
- font-weight: 700;
308
- line-height: 1.125;
309
- color: ${colors.ink};
310
- margin: 0;
311
- `;
312
-
313
- export const DataPointsList = styled.div`
314
- display: flex;
315
- flex-direction: column;
316
- gap: 2px;
317
- `;
318
-
319
- export const DataPoint = styled.div`
320
- display: flex;
321
- align-items: center;
322
- gap: 8px;
323
- font-family: 'Roboto', sans-serif;
324
- font-size: 14px;
325
- line-height: 1.5;
326
- color: ${colors.secondary};
327
- min-height: 21px;
328
- `;
329
-
330
- export const DataIcon = styled.span`
331
- width: 17px;
332
- height: 17px;
333
- display: flex;
334
- align-items: center;
335
- justify-content: center;
336
- flex-shrink: 0;
337
- color: ${colors.iconBlue};
338
- font-size: 17px;
339
- `;
340
-
341
- export const PriceSection = styled.div`
342
- display: flex;
343
- flex-direction: row;
344
- align-items: center;
345
- gap: 12px;
346
- `;
347
-
348
- export const PriceContainer = styled.div`
349
- display: flex;
350
- flex-direction: column;
351
- gap: 12px;
352
- flex: 1;
353
- `;
354
-
355
- export const OfferContainer = styled.div`
356
- display: flex;
357
- align-items: center;
358
- gap: 4px;
359
- `;
360
-
361
- export const PriceLabel = styled.span`
362
- font-family: 'Roboto', sans-serif;
363
- font-size: 14px;
364
- line-height: 1.5;
365
- color: ${colors.secondary};
366
- `;
367
-
368
- export const OriginalPrice = styled.span`
369
- font-family: 'Roboto', sans-serif;
370
- font-size: 14px;
371
- font-weight: 500;
372
- line-height: 1.5;
373
- color: ${colors.strikethrough};
374
- text-decoration: line-through;
375
- `;
376
-
377
- export const CurrentPrice = styled.span<CurrentPriceProps>`
378
- font-family: 'Times Modern', serif;
379
- font-size: ${props => (props.$isEnquire ? '24px' : '32px')};
380
- font-weight: 300;
381
- line-height: 1.125;
382
- color: ${colors.ink};
383
- `;
384
-
385
- export const PriceSuffix = styled.span`
386
- font-family: 'Times Modern', serif;
387
- font-size: 24px;
388
- font-weight: 300;
389
- line-height: 1.125;
390
- color: ${colors.ink};
391
- `;
392
-
393
- export const LogoContainer = styled.div`
394
- width: 88px;
395
- height: 44px;
396
- display: flex;
397
- align-items: center;
398
-
399
- a {
400
- display: flex;
401
- align-items: center;
402
- width: 100%;
403
- height: 100%;
404
- }
405
-
406
- img {
407
- max-width: 100%;
408
- max-height: 100%;
409
- object-fit: contain;
410
- }
411
- `;
412
-
413
- export const CTAButton = styled.a`
414
- display: flex;
415
- align-items: center;
416
- justify-content: center;
417
- width: 100%;
418
- padding: 12px 16px;
419
- background: ${colors.primary};
420
- color: ${colors.white};
421
- font-family: 'Roboto', sans-serif;
422
- font-size: 16px;
423
- font-weight: 500;
424
- line-height: 1.5;
425
- text-decoration: none;
426
- transition: background 0.2s ease;
427
-
428
- &:hover {
429
- background: #004a6e;
430
- }
431
- `;
432
-
433
- // Navigation Arrow - positioned on sides of carousel
434
- export const LoadingContainer = styled.div`
435
- display: flex;
436
- justify-content: center;
437
- align-items: center;
438
- min-height: 400px;
439
- font-family: 'Roboto', sans-serif;
440
- color: ${colors.secondary};
441
- `;
442
-
443
- export const ErrorContainer = styled.div`
444
- display: flex;
445
- justify-content: center;
446
- align-items: center;
447
- min-height: 200px;
448
- font-family: 'Roboto', sans-serif;
449
- color: ${colors.strikethrough};
450
- `;
@@ -1,128 +0,0 @@
1
- import { ComponentType } from 'react';
2
-
3
- export interface ResponsiveConfig {
4
- xs?: string;
5
- mobile?: string;
6
- tablet?: string;
7
- desktop?: string;
8
- xl?: string;
9
- }
10
-
11
- export type ResponsiveConfigNoXs = Omit<ResponsiveConfig, 'xs'>;
12
-
13
- export interface ImageHeightConfig {
14
- $heightXs?: string;
15
- $heightSm?: string;
16
- $heightMd?: string;
17
- $heightLg?: string;
18
- $heightXl?: string;
19
- isStaticGrid?: boolean;
20
- }
21
-
22
- export interface TripCardsElement {
23
- class?: string;
24
- tripcards: string;
25
- title?: string;
26
- titleurl?: string;
27
- description?: string;
28
- }
29
-
30
- export interface TripCardsProps {
31
- element: TripCardsElement;
32
- useMockData?: boolean;
33
- widthContainerConfig?: ResponsiveConfig;
34
- widthItemConfig?: ResponsiveConfig;
35
- maxWidthItemConfig?: ResponsiveConfig;
36
- imgHeight?: ImageHeightConfig;
37
- forceStaticGrid?: boolean;
38
- }
39
-
40
- export interface DecodedTripCard {
41
- cruise_id: string;
42
- }
43
-
44
- export interface TripCardApiData {
45
- cruise_id: string;
46
- image: string;
47
- offer_label?: string;
48
- gift_banner?: string;
49
- headline: string;
50
- date: string;
51
- duration: string;
52
- route: string;
53
- ship: string;
54
- original_price?: string;
55
- price: string;
56
- logo: string;
57
- logo_url: string;
58
- cta_url: string;
59
- cta_text: string;
60
- }
61
-
62
- export interface TripCardProps {
63
- card: TripCardApiData;
64
- isStaticGrid?: boolean;
65
- imgHeight?: ImageHeightConfig;
66
- }
67
-
68
- export interface ApiCruiseResult {
69
- post_id: number;
70
- cruise_id: number;
71
- cruise_title: string;
72
- cruise_line: {
73
- name: string;
74
- link: string;
75
- logo: string;
76
- };
77
- ship: {
78
- name: string;
79
- link: string;
80
- image: string;
81
- };
82
- departs: string;
83
- ends: string;
84
- date_label: string;
85
- destination: string[];
86
- duration: number;
87
- itinerary: string[];
88
- prices: {
89
- cheapest_price: number | string;
90
- inside: string | number;
91
- outside: string | number;
92
- balcony: string | number;
93
- suite: string | number;
94
- };
95
- was_prices: {
96
- inside: number;
97
- outside: number;
98
- balcony: number;
99
- suite: number;
100
- };
101
- link: string;
102
- campaigns: string[];
103
- extras: {
104
- date: string;
105
- duration: string;
106
- destination: string;
107
- info: string;
108
- };
109
- }
110
- export interface TripCardsLayoutProps {
111
- element: TripCardsElement;
112
- items: Array<{ id: string | number; data?: TripCardApiData }>;
113
- CardComponent: ComponentType<any>;
114
- itemsPerPage: number;
115
- widthContainerConfig?: ResponsiveConfig;
116
- widthItemConfig?: ResponsiveConfig;
117
- maxWidthItemConfig?: ResponsiveConfig;
118
- imgHeight?: ImageHeightConfig;
119
- forceStaticGrid?: boolean;
120
- }
121
-
122
- export type ImageContainerProps = ImageHeightConfig;
123
-
124
- export type ContainerProps = Partial<ResponsiveConfig>;
125
-
126
- export interface CurrentPriceProps {
127
- $isEnquire?: boolean;
128
- }