kupos-ui-components-lib 9.7.1 → 9.7.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.
@@ -23,194 +23,9 @@ const HARDCODED_OPERATORS = [
23
23
  },
24
24
  ];
25
25
 
26
- const HARDCODED_COUNTDOWN = "09:55";
27
-
28
- const HOW_IT_WORKS_STEPS = [
29
- {
30
- icon: "flexible",
31
- name: "1. Salida flexible",
32
- text: "Viajas en un horario entre las 07:00 y las 10:00 AM del día elegido.",
33
- },
34
- {
35
- icon: "bus",
36
- name: "2. Empresa asignada",
37
- text: "Una de las empresas disponibles confirma tu viaje una vez pagado.",
38
- },
39
- {
40
- icon: "price",
41
- name: "3. Precio garantizado",
42
- text: "Al seleccionar este servicio aseguras el precio reducido.",
43
- },
44
- {
45
- icon: "ticket",
46
- name: "4. ¡Listo!",
47
- text: "Recibe todos los detalles de tu viaje al instante tras la compra.",
48
- },
49
- ];
50
-
51
- const FeatureStepIcon = ({ icon }) => {
52
- const iconClassName = "h-[30px] w-[30px] text-[#171717]";
53
-
54
- switch (icon) {
55
- case "flexible":
56
- return (
57
- <svg
58
- className={iconClassName}
59
- viewBox="0 0 40 40"
60
- fill="none"
61
- aria-hidden="true"
62
- >
63
- <path
64
- d="M31.5 13.4A13 13 0 0 0 8 12.3"
65
- stroke="currentColor"
66
- strokeWidth="2.2"
67
- strokeLinecap="round"
68
- />
69
- <path
70
- d="m7.4 7.7.2 5.2 5.1-1.2M8.5 26.6A13 13 0 0 0 32 27.7"
71
- stroke="currentColor"
72
- strokeWidth="2.2"
73
- strokeLinecap="round"
74
- strokeLinejoin="round"
75
- />
76
- <path
77
- d="m32.6 32.3-.2-5.2-5.1 1.2"
78
- stroke="currentColor"
79
- strokeWidth="2.2"
80
- strokeLinecap="round"
81
- strokeLinejoin="round"
82
- />
83
- </svg>
84
- );
85
- case "bus":
86
- return (
87
- <svg
88
- className={iconClassName}
89
- viewBox="0 0 40 40"
90
- fill="none"
91
- aria-hidden="true"
92
- >
93
- <rect
94
- x="8"
95
- y="4.5"
96
- width="24"
97
- height="27"
98
- rx="2.5"
99
- stroke="currentColor"
100
- strokeWidth="2.2"
101
- />
102
- <path
103
- d="M8 18.5h24M12 9h16M12 26h4m8 0h4M11 31.5v3h5v-3m8 0v3h5v-3M5.5 10v7m29-7v7"
104
- stroke="currentColor"
105
- strokeWidth="2.2"
106
- strokeLinecap="round"
107
- />
108
- </svg>
109
- );
110
- case "price":
111
- return (
112
- <svg
113
- className={iconClassName}
114
- viewBox="0 0 40 40"
115
- fill="none"
116
- aria-hidden="true"
117
- >
118
- <circle
119
- cx="20"
120
- cy="20"
121
- r="14"
122
- stroke="currentColor"
123
- strokeWidth="2.2"
124
- />
125
- <path
126
- d="M23.7 15.4c-1-.7-2.2-1-3.6-1-2.2 0-3.8 1.1-3.8 2.8 0 4.2 7.4 1.8 7.4 5.8 0 1.8-1.6 2.8-4 2.8-1.5 0-2.9-.4-4-1.2M20 11.7v2.5m0 11.8v2.4"
127
- stroke="currentColor"
128
- strokeWidth="2.2"
129
- strokeLinecap="round"
130
- />
131
- </svg>
132
- );
133
- default:
134
- return (
135
- <svg
136
- className={iconClassName}
137
- viewBox="0 0 40 40"
138
- fill="none"
139
- aria-hidden="true"
140
- >
141
- <path
142
- d="M7 11h26v6a3.5 3.5 0 0 0 0 7v6H7v-6a3.5 3.5 0 0 0 0-7v-6Z"
143
- stroke="currentColor"
144
- strokeWidth="2.2"
145
- strokeLinejoin="round"
146
- />
147
- <path
148
- d="M22 12.5v3m0 3v3m0 3v4"
149
- stroke="currentColor"
150
- strokeWidth="2.2"
151
- strokeLinecap="round"
152
- />
153
- </svg>
154
- );
155
- }
156
- };
157
-
158
- const AssuranceIcon = ({ type }) => {
159
- const iconClassName = "h-[18px] w-[18px] shrink-0 text-white";
160
-
161
- if (type === "pending") {
162
- return (
163
- <svg
164
- className={iconClassName}
165
- viewBox="0 0 20 20"
166
- fill="none"
167
- aria-hidden="true"
168
- >
169
- <path
170
- d="M4.2 8.2a6.2 6.2 0 1 1 .5 5.1"
171
- stroke="currentColor"
172
- strokeWidth="1.8"
173
- strokeLinecap="round"
174
- />
175
- <path
176
- d="M4.2 4.8v3.4h3.4"
177
- stroke="currentColor"
178
- strokeWidth="1.8"
179
- strokeLinecap="round"
180
- strokeLinejoin="round"
181
- />
182
- </svg>
183
- );
184
- }
185
-
186
- return (
187
- <svg
188
- className={iconClassName}
189
- viewBox="0 0 20 20"
190
- fill="none"
191
- aria-hidden="true"
192
- >
193
- <path
194
- d="M10 2.2 16.3 4v5c0 4-2.4 6.8-6.3 8.7C6.1 15.8 3.7 13 3.7 9V4L10 2.2Z"
195
- stroke="currentColor"
196
- strokeWidth="1.6"
197
- strokeLinejoin="round"
198
- />
199
- <path
200
- d="m6.9 9.7 2.1 2.1 4.3-4.4"
201
- stroke="currentColor"
202
- strokeWidth="1.7"
203
- strokeLinecap="round"
204
- strokeLinejoin="round"
205
- />
206
- </svg>
207
- );
208
- };
209
-
210
26
  const FeatureServiceUi = ({
211
27
  serviceItem,
212
28
  showTopLabel,
213
- colors,
214
29
  isSoldOut,
215
30
  getAnimationIcon,
216
31
  cityOrigin,
@@ -234,6 +49,42 @@ const FeatureServiceUi = ({
234
49
  isFeatureDropDownExpand === true;
235
50
  const canDecreaseTicketQuantity = ticketQuantity > 1;
236
51
 
52
+ const HOW_IT_WORKS_STEPS = [
53
+ {
54
+ icon: "flexible",
55
+ name: "1. Salida flexible",
56
+ text: "Viajas en un horario entre las 07:00 y las 10:00 AM del día elegido.",
57
+ },
58
+ {
59
+ icon: "bus",
60
+ name: "2. Empresa asignada",
61
+ text: "Una de las empresas disponibles confirma tu viaje una vez pagado.",
62
+ },
63
+ {
64
+ icon: "price",
65
+ name: "3. Precio garantizado",
66
+ text: "Al seleccionar este servicio aseguras el precio reducido.",
67
+ },
68
+ {
69
+ icon: "ticket",
70
+ name: "4. ¡Listo!",
71
+ text: "Recibe todos los detalles de tu viaje al instante tras la compra.",
72
+ },
73
+ ];
74
+
75
+ const FeatureStepIcon = ({ icon }) => {
76
+ switch (icon) {
77
+ case "flexible":
78
+ return renderIcon("flexibleIcon", "24px");
79
+ case "bus":
80
+ return renderIcon("empressaIcon", "24px");
81
+ case "price":
82
+ return renderIcon("precioIcon", "24px");
83
+ default:
84
+ return renderIcon("listoIcon", "24px");
85
+ }
86
+ };
87
+
237
88
  return (
238
89
  <div
239
90
  // ${
@@ -266,6 +117,8 @@ const FeatureServiceUi = ({
266
117
  padding: "1px 8px",
267
118
  borderRadius: "4px",
268
119
  color: "#fff",
120
+ animation: "pulse-zoom 2s ease-in-out infinite",
121
+ whiteSpace: "nowrap",
269
122
  }}
270
123
  >
271
124
  <span>AHORRAS 60%</span>
@@ -332,7 +185,7 @@ const FeatureServiceUi = ({
332
185
 
333
186
  <div className="flex flex-col items-start gap-[10px] text-[12px] ">
334
187
  <div className="flex items-justify gap-[8px]">
335
- <AssuranceIcon type="pending" />
188
+ {renderIcon("sheildIcon", "16px")}
336
189
 
337
190
  <span
338
191
  className="text-[10px]"
@@ -344,7 +197,7 @@ const FeatureServiceUi = ({
344
197
  </span>
345
198
  </div>
346
199
  <div className="flex items-justify gap-[8px]">
347
- <AssuranceIcon type="secured" />
200
+ {renderIcon("confirmarIcon", "16px")}
348
201
 
349
202
  <span
350
203
  className="text-[10px]"
@@ -410,10 +263,11 @@ const FeatureServiceUi = ({
410
263
  borderRadius: "24px",
411
264
  }}
412
265
  >
413
- <img
414
- src={serviceItem.icons?.userIcon}
415
- alt="eye"
416
- style={{ width: "16px", height: "16px" }}
266
+ <LottiePlayer
267
+ // animationData={serviceItem.icons.flexibleAnim}
268
+ animationData={getAnimationIcon("usersAnimation")}
269
+ width="18px"
270
+ height="18px"
417
271
  />
418
272
  <span>
419
273
  <span className="bold-text text-white">
@@ -428,15 +282,8 @@ const FeatureServiceUi = ({
428
282
  color: "#FF5C60",
429
283
  }}
430
284
  />{" "}
431
- <span
432
- style={{
433
- color: "#FF5C60",
434
- }}
435
- >
436
- personas
437
- </span>
438
285
  </span>{" "}
439
- viendo este viaje |{" "}
286
+ viendo |{" "}
440
287
  <span
441
288
  className="bold-text"
442
289
  ref={(node) =>
@@ -457,7 +304,13 @@ const FeatureServiceUi = ({
457
304
  alignItems: "center",
458
305
  }}
459
306
  >
460
- <span className="text-[#FF8F45] bold-text text-[26px] leading-tight">
307
+ <span
308
+ className="text-[#FF8F45] bold-text text-[26px] leading-tight"
309
+ style={{
310
+ animation: "pulse-zoom 2s ease-in-out infinite",
311
+ whiteSpace: "nowrap",
312
+ }}
313
+ >
461
314
  60% OFF
462
315
  </span>
463
316
  {/* <span className="text-[#666] text-[14px] line-through">
@@ -484,7 +337,7 @@ const FeatureServiceUi = ({
484
337
  />
485
338
  </span>
486
339
  <span className="text-white bold-text text-[28px] leading-none">
487
- $4.000
340
+ {`$${(4000 * ticketQuantity).toLocaleString()}`}
488
341
  </span>
489
342
  </div>
490
343
 
@@ -534,6 +387,8 @@ const FeatureServiceUi = ({
534
387
  className="flex items-center gap-[6px] px-[20px] py-[10px] rounded-[16px] text-white bold-text text-[13px] mt-[4px] justify-center border-none cursor-pointer"
535
388
  style={{
536
389
  backgroundColor: "#FF5C60",
390
+ animation: "pulse-zoom 2s ease-in-out infinite",
391
+ whiteSpace: "nowrap",
537
392
  }}
538
393
  >
539
394
  <LottiePlayer
@@ -477,7 +477,7 @@ function SeatSection({
477
477
  className="absolute"
478
478
  style={{
479
479
  left: isPeru ? "-1px" : "-18px",
480
- bottom:"1px"
480
+ bottom: "1px",
481
481
  }}
482
482
  >
483
483
  {renderIcon("fireIcon", "16px")}