virtuo-ui-library 1.0.4 → 1.0.5
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/dist/index.js +22 -97
- package/dist/index.mjs +21 -95
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31,8 +31,7 @@ var index_exports = {};
|
|
|
31
31
|
__export(index_exports, {
|
|
32
32
|
Button: () => Button,
|
|
33
33
|
Card: () => Card,
|
|
34
|
-
EcommerceCard: () => EcommerceCard
|
|
35
|
-
ProfileCard: () => ProfileCard
|
|
34
|
+
EcommerceCard: () => EcommerceCard
|
|
36
35
|
});
|
|
37
36
|
module.exports = __toCommonJS(index_exports);
|
|
38
37
|
|
|
@@ -263,81 +262,8 @@ function shadeColor2(hex, percent) {
|
|
|
263
262
|
return `rgb(${r},${g},${b})`;
|
|
264
263
|
}
|
|
265
264
|
|
|
266
|
-
// src/components/ProfileCard/ProfileCard.jsx
|
|
267
|
-
var import_react3 = __toESM(require("react"));
|
|
268
|
-
var ProfileCard = ({
|
|
269
|
-
name = "John Doe",
|
|
270
|
-
role = "Software Engineer",
|
|
271
|
-
avatarUrl = "https://i.pravatar.cc/150?img=3",
|
|
272
|
-
color = "#4f46e5",
|
|
273
|
-
size = "medium"
|
|
274
|
-
}) => {
|
|
275
|
-
const [isHovered, setIsHovered] = (0, import_react3.useState)(false);
|
|
276
|
-
const [isFollowing, setIsFollowing] = (0, import_react3.useState)(false);
|
|
277
|
-
const sizeMap = {
|
|
278
|
-
small: { width: 220, avatar: 60, fontSize: 14 },
|
|
279
|
-
medium: { width: 280, avatar: 80, fontSize: 16 },
|
|
280
|
-
large: { width: 340, avatar: 100, fontSize: 18 }
|
|
281
|
-
};
|
|
282
|
-
const { width, avatar, fontSize } = sizeMap[size] || sizeMap.medium;
|
|
283
|
-
const cardStyle = {
|
|
284
|
-
width,
|
|
285
|
-
padding: "20px",
|
|
286
|
-
borderRadius: "16px",
|
|
287
|
-
textAlign: "center",
|
|
288
|
-
fontFamily: "Arial, sans-serif",
|
|
289
|
-
backgroundColor: "#ffffff",
|
|
290
|
-
boxShadow: isHovered ? "0 12px 24px rgba(0,0,0,0.15)" : "0 4px 12px rgba(0,0,0,0.08)",
|
|
291
|
-
transform: isHovered ? "translateY(-4px)" : "translateY(0)",
|
|
292
|
-
transition: "all 0.25s ease-in-out",
|
|
293
|
-
border: `1px solid ${color}20`
|
|
294
|
-
};
|
|
295
|
-
const avatarStyle = {
|
|
296
|
-
width: avatar,
|
|
297
|
-
height: avatar,
|
|
298
|
-
borderRadius: "50%",
|
|
299
|
-
objectFit: "cover",
|
|
300
|
-
border: `3px solid ${color}`,
|
|
301
|
-
marginBottom: "12px"
|
|
302
|
-
};
|
|
303
|
-
const nameStyle = {
|
|
304
|
-
margin: 0,
|
|
305
|
-
fontSize: fontSize + 4,
|
|
306
|
-
fontWeight: "bold",
|
|
307
|
-
color: "#1f2937"
|
|
308
|
-
};
|
|
309
|
-
const roleStyle = {
|
|
310
|
-
margin: "4px 0 16px",
|
|
311
|
-
fontSize,
|
|
312
|
-
color: "#6b7280"
|
|
313
|
-
};
|
|
314
|
-
const buttonStyle = {
|
|
315
|
-
padding: "8px 20px",
|
|
316
|
-
borderRadius: "999px",
|
|
317
|
-
cursor: "pointer",
|
|
318
|
-
fontSize,
|
|
319
|
-
fontWeight: 600,
|
|
320
|
-
color: isFollowing ? color : "#ffffff",
|
|
321
|
-
backgroundColor: isFollowing ? "#ffffff" : color,
|
|
322
|
-
border: `2px solid ${color}`,
|
|
323
|
-
transition: "all 0.2s ease-in-out"
|
|
324
|
-
};
|
|
325
|
-
return /* @__PURE__ */ import_react3.default.createElement(
|
|
326
|
-
"div",
|
|
327
|
-
{
|
|
328
|
-
style: cardStyle,
|
|
329
|
-
onMouseEnter: () => setIsHovered(true),
|
|
330
|
-
onMouseLeave: () => setIsHovered(false)
|
|
331
|
-
},
|
|
332
|
-
/* @__PURE__ */ import_react3.default.createElement("img", { src: avatarUrl, alt: name, style: avatarStyle }),
|
|
333
|
-
/* @__PURE__ */ import_react3.default.createElement("h3", { style: nameStyle }, name),
|
|
334
|
-
/* @__PURE__ */ import_react3.default.createElement("p", { style: roleStyle }, role),
|
|
335
|
-
/* @__PURE__ */ import_react3.default.createElement("button", { style: buttonStyle, onClick: () => setIsFollowing(!isFollowing) }, isFollowing ? "Following" : "Follow")
|
|
336
|
-
);
|
|
337
|
-
};
|
|
338
|
-
|
|
339
265
|
// src/components/EcommerceCard/EcommerceCard.jsx
|
|
340
|
-
var
|
|
266
|
+
var import_react3 = __toESM(require("react"));
|
|
341
267
|
var EcommerceCard = ({
|
|
342
268
|
image = "https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=600&q=80",
|
|
343
269
|
title = "Wireless Headphones",
|
|
@@ -352,8 +278,8 @@ var EcommerceCard = ({
|
|
|
352
278
|
onAddToCart = () => {
|
|
353
279
|
}
|
|
354
280
|
}) => {
|
|
355
|
-
const [hovered, setHovered] = (0,
|
|
356
|
-
const [wishlisted, setWishlisted] = (0,
|
|
281
|
+
const [hovered, setHovered] = (0, import_react3.useState)(false);
|
|
282
|
+
const [wishlisted, setWishlisted] = (0, import_react3.useState)(false);
|
|
357
283
|
const alpha = (hex, op) => {
|
|
358
284
|
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
359
285
|
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
@@ -365,21 +291,21 @@ var EcommerceCard = ({
|
|
|
365
291
|
for (let i = 1; i <= 5; i++) {
|
|
366
292
|
if (i <= fullStars) {
|
|
367
293
|
stars.push(
|
|
368
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ import_react3.default.createElement("svg", { key: i, width: "14", height: "14", viewBox: "0 0 24 24", fill: "#fbbf24", stroke: "none" }, /* @__PURE__ */ import_react3.default.createElement("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }))
|
|
369
295
|
);
|
|
370
296
|
} else if (i === fullStars + 1 && hasHalfStar) {
|
|
371
297
|
stars.push(
|
|
372
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ import_react3.default.createElement("svg", { key: i, width: "14", height: "14", viewBox: "0 0 24 24", fill: "#fbbf24", stroke: "none" }, /* @__PURE__ */ import_react3.default.createElement("defs", null, /* @__PURE__ */ import_react3.default.createElement("linearGradient", { id: "half", x1: "0", x2: "100%", y1: "0", y2: "0" }, /* @__PURE__ */ import_react3.default.createElement("stop", { offset: "50%", stopColor: "#fbbf24" }), /* @__PURE__ */ import_react3.default.createElement("stop", { offset: "50%", stopColor: "rgba(255,255,255,0.1)" }))), /* @__PURE__ */ import_react3.default.createElement("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2", fill: "url(#half)" }))
|
|
373
299
|
);
|
|
374
300
|
} else {
|
|
375
301
|
stars.push(
|
|
376
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ import_react3.default.createElement("svg", { key: i, width: "14", height: "14", viewBox: "0 0 24 24", fill: "rgba(255,255,255,0.1)", stroke: "none" }, /* @__PURE__ */ import_react3.default.createElement("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }))
|
|
377
303
|
);
|
|
378
304
|
}
|
|
379
305
|
}
|
|
380
306
|
return stars;
|
|
381
307
|
};
|
|
382
|
-
return /* @__PURE__ */
|
|
308
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
|
383
309
|
"div",
|
|
384
310
|
{
|
|
385
311
|
onMouseEnter: () => setHovered(true),
|
|
@@ -396,7 +322,7 @@ var EcommerceCard = ({
|
|
|
396
322
|
boxShadow: hovered ? "0 12px 30px rgba(0,0,0,0.4)" : "0 4px 16px rgba(0,0,0,0.3)"
|
|
397
323
|
}
|
|
398
324
|
},
|
|
399
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ import_react3.default.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ import_react3.default.createElement(
|
|
400
326
|
"img",
|
|
401
327
|
{
|
|
402
328
|
src: image,
|
|
@@ -409,7 +335,7 @@ var EcommerceCard = ({
|
|
|
409
335
|
transform: hovered ? "scale(1.05)" : "scale(1)"
|
|
410
336
|
}
|
|
411
337
|
}
|
|
412
|
-
), badge && /* @__PURE__ */
|
|
338
|
+
), badge && /* @__PURE__ */ import_react3.default.createElement("div", { style: {
|
|
413
339
|
position: "absolute",
|
|
414
340
|
top: "10px",
|
|
415
341
|
left: "10px",
|
|
@@ -421,7 +347,7 @@ var EcommerceCard = ({
|
|
|
421
347
|
color: "#fff",
|
|
422
348
|
textTransform: "uppercase",
|
|
423
349
|
letterSpacing: "0.5px"
|
|
424
|
-
} }, badge), /* @__PURE__ */
|
|
350
|
+
} }, badge), /* @__PURE__ */ import_react3.default.createElement(
|
|
425
351
|
"button",
|
|
426
352
|
{
|
|
427
353
|
onClick: () => setWishlisted(!wishlisted),
|
|
@@ -440,7 +366,7 @@ var EcommerceCard = ({
|
|
|
440
366
|
cursor: "pointer"
|
|
441
367
|
}
|
|
442
368
|
},
|
|
443
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
444
370
|
"svg",
|
|
445
371
|
{
|
|
446
372
|
width: "16",
|
|
@@ -450,38 +376,38 @@ var EcommerceCard = ({
|
|
|
450
376
|
stroke: wishlisted ? "#ef4444" : "#fff",
|
|
451
377
|
strokeWidth: "2"
|
|
452
378
|
},
|
|
453
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ import_react3.default.createElement("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" })
|
|
454
380
|
)
|
|
455
381
|
)),
|
|
456
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ import_react3.default.createElement("div", { style: { padding: "16px" } }, /* @__PURE__ */ import_react3.default.createElement("h3", { style: {
|
|
457
383
|
fontSize: "16px",
|
|
458
384
|
fontWeight: "700",
|
|
459
385
|
color: "#fff",
|
|
460
386
|
margin: "0 0 8px",
|
|
461
387
|
lineHeight: 1.4
|
|
462
|
-
} }, title), /* @__PURE__ */
|
|
388
|
+
} }, title), /* @__PURE__ */ import_react3.default.createElement("div", { style: {
|
|
463
389
|
display: "flex",
|
|
464
390
|
alignItems: "center",
|
|
465
391
|
gap: "6px",
|
|
466
392
|
marginBottom: "12px"
|
|
467
|
-
} }, /* @__PURE__ */
|
|
393
|
+
} }, /* @__PURE__ */ import_react3.default.createElement("div", { style: { display: "flex" } }, renderStars()), /* @__PURE__ */ import_react3.default.createElement("span", { style: {
|
|
468
394
|
fontSize: "12px",
|
|
469
395
|
color: "rgba(255,255,255,0.45)"
|
|
470
|
-
} }, "(", reviewCount, ")")), /* @__PURE__ */
|
|
396
|
+
} }, "(", reviewCount, ")")), /* @__PURE__ */ import_react3.default.createElement("div", { style: {
|
|
471
397
|
display: "flex",
|
|
472
398
|
alignItems: "center",
|
|
473
399
|
gap: "10px",
|
|
474
400
|
marginBottom: "16px"
|
|
475
|
-
} }, /* @__PURE__ */
|
|
401
|
+
} }, /* @__PURE__ */ import_react3.default.createElement("span", { style: {
|
|
476
402
|
fontSize: "20px",
|
|
477
403
|
fontWeight: "800",
|
|
478
404
|
color: "#fff"
|
|
479
|
-
} }, currency, price.toFixed(2)), discount > 0 && /* @__PURE__ */
|
|
405
|
+
} }, currency, price.toFixed(2)), discount > 0 && /* @__PURE__ */ import_react3.default.createElement("span", { style: {
|
|
480
406
|
fontSize: "14px",
|
|
481
407
|
fontWeight: "500",
|
|
482
408
|
color: "#86efac",
|
|
483
409
|
textDecoration: "line-through"
|
|
484
|
-
} }, currency, (price + price * discount / 100).toFixed(2))), /* @__PURE__ */
|
|
410
|
+
} }, currency, (price + price * discount / 100).toFixed(2))), /* @__PURE__ */ import_react3.default.createElement(
|
|
485
411
|
"button",
|
|
486
412
|
{
|
|
487
413
|
onClick: onAddToCart,
|
|
@@ -502,7 +428,7 @@ var EcommerceCard = ({
|
|
|
502
428
|
gap: "8px"
|
|
503
429
|
}
|
|
504
430
|
},
|
|
505
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ import_react3.default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#fff", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react3.default.createElement("circle", { cx: "9", cy: "21", r: "1" }), /* @__PURE__ */ import_react3.default.createElement("circle", { cx: "20", cy: "21", r: "1" }), /* @__PURE__ */ import_react3.default.createElement("path", { d: "M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6" })),
|
|
506
432
|
"Add to Cart"
|
|
507
433
|
))
|
|
508
434
|
);
|
|
@@ -511,6 +437,5 @@ var EcommerceCard = ({
|
|
|
511
437
|
0 && (module.exports = {
|
|
512
438
|
Button,
|
|
513
439
|
Card,
|
|
514
|
-
EcommerceCard
|
|
515
|
-
ProfileCard
|
|
440
|
+
EcommerceCard
|
|
516
441
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -225,81 +225,8 @@ function shadeColor2(hex, percent) {
|
|
|
225
225
|
return `rgb(${r},${g},${b})`;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
// src/components/ProfileCard/ProfileCard.jsx
|
|
229
|
-
import React3, { useState as useState3 } from "react";
|
|
230
|
-
var ProfileCard = ({
|
|
231
|
-
name = "John Doe",
|
|
232
|
-
role = "Software Engineer",
|
|
233
|
-
avatarUrl = "https://i.pravatar.cc/150?img=3",
|
|
234
|
-
color = "#4f46e5",
|
|
235
|
-
size = "medium"
|
|
236
|
-
}) => {
|
|
237
|
-
const [isHovered, setIsHovered] = useState3(false);
|
|
238
|
-
const [isFollowing, setIsFollowing] = useState3(false);
|
|
239
|
-
const sizeMap = {
|
|
240
|
-
small: { width: 220, avatar: 60, fontSize: 14 },
|
|
241
|
-
medium: { width: 280, avatar: 80, fontSize: 16 },
|
|
242
|
-
large: { width: 340, avatar: 100, fontSize: 18 }
|
|
243
|
-
};
|
|
244
|
-
const { width, avatar, fontSize } = sizeMap[size] || sizeMap.medium;
|
|
245
|
-
const cardStyle = {
|
|
246
|
-
width,
|
|
247
|
-
padding: "20px",
|
|
248
|
-
borderRadius: "16px",
|
|
249
|
-
textAlign: "center",
|
|
250
|
-
fontFamily: "Arial, sans-serif",
|
|
251
|
-
backgroundColor: "#ffffff",
|
|
252
|
-
boxShadow: isHovered ? "0 12px 24px rgba(0,0,0,0.15)" : "0 4px 12px rgba(0,0,0,0.08)",
|
|
253
|
-
transform: isHovered ? "translateY(-4px)" : "translateY(0)",
|
|
254
|
-
transition: "all 0.25s ease-in-out",
|
|
255
|
-
border: `1px solid ${color}20`
|
|
256
|
-
};
|
|
257
|
-
const avatarStyle = {
|
|
258
|
-
width: avatar,
|
|
259
|
-
height: avatar,
|
|
260
|
-
borderRadius: "50%",
|
|
261
|
-
objectFit: "cover",
|
|
262
|
-
border: `3px solid ${color}`,
|
|
263
|
-
marginBottom: "12px"
|
|
264
|
-
};
|
|
265
|
-
const nameStyle = {
|
|
266
|
-
margin: 0,
|
|
267
|
-
fontSize: fontSize + 4,
|
|
268
|
-
fontWeight: "bold",
|
|
269
|
-
color: "#1f2937"
|
|
270
|
-
};
|
|
271
|
-
const roleStyle = {
|
|
272
|
-
margin: "4px 0 16px",
|
|
273
|
-
fontSize,
|
|
274
|
-
color: "#6b7280"
|
|
275
|
-
};
|
|
276
|
-
const buttonStyle = {
|
|
277
|
-
padding: "8px 20px",
|
|
278
|
-
borderRadius: "999px",
|
|
279
|
-
cursor: "pointer",
|
|
280
|
-
fontSize,
|
|
281
|
-
fontWeight: 600,
|
|
282
|
-
color: isFollowing ? color : "#ffffff",
|
|
283
|
-
backgroundColor: isFollowing ? "#ffffff" : color,
|
|
284
|
-
border: `2px solid ${color}`,
|
|
285
|
-
transition: "all 0.2s ease-in-out"
|
|
286
|
-
};
|
|
287
|
-
return /* @__PURE__ */ React3.createElement(
|
|
288
|
-
"div",
|
|
289
|
-
{
|
|
290
|
-
style: cardStyle,
|
|
291
|
-
onMouseEnter: () => setIsHovered(true),
|
|
292
|
-
onMouseLeave: () => setIsHovered(false)
|
|
293
|
-
},
|
|
294
|
-
/* @__PURE__ */ React3.createElement("img", { src: avatarUrl, alt: name, style: avatarStyle }),
|
|
295
|
-
/* @__PURE__ */ React3.createElement("h3", { style: nameStyle }, name),
|
|
296
|
-
/* @__PURE__ */ React3.createElement("p", { style: roleStyle }, role),
|
|
297
|
-
/* @__PURE__ */ React3.createElement("button", { style: buttonStyle, onClick: () => setIsFollowing(!isFollowing) }, isFollowing ? "Following" : "Follow")
|
|
298
|
-
);
|
|
299
|
-
};
|
|
300
|
-
|
|
301
228
|
// src/components/EcommerceCard/EcommerceCard.jsx
|
|
302
|
-
import
|
|
229
|
+
import React3, { useState as useState3 } from "react";
|
|
303
230
|
var EcommerceCard = ({
|
|
304
231
|
image = "https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=600&q=80",
|
|
305
232
|
title = "Wireless Headphones",
|
|
@@ -314,8 +241,8 @@ var EcommerceCard = ({
|
|
|
314
241
|
onAddToCart = () => {
|
|
315
242
|
}
|
|
316
243
|
}) => {
|
|
317
|
-
const [hovered, setHovered] =
|
|
318
|
-
const [wishlisted, setWishlisted] =
|
|
244
|
+
const [hovered, setHovered] = useState3(false);
|
|
245
|
+
const [wishlisted, setWishlisted] = useState3(false);
|
|
319
246
|
const alpha = (hex, op) => {
|
|
320
247
|
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
321
248
|
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
@@ -327,21 +254,21 @@ var EcommerceCard = ({
|
|
|
327
254
|
for (let i = 1; i <= 5; i++) {
|
|
328
255
|
if (i <= fullStars) {
|
|
329
256
|
stars.push(
|
|
330
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ React3.createElement("svg", { key: i, width: "14", height: "14", viewBox: "0 0 24 24", fill: "#fbbf24", stroke: "none" }, /* @__PURE__ */ React3.createElement("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }))
|
|
331
258
|
);
|
|
332
259
|
} else if (i === fullStars + 1 && hasHalfStar) {
|
|
333
260
|
stars.push(
|
|
334
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ React3.createElement("svg", { key: i, width: "14", height: "14", viewBox: "0 0 24 24", fill: "#fbbf24", stroke: "none" }, /* @__PURE__ */ React3.createElement("defs", null, /* @__PURE__ */ React3.createElement("linearGradient", { id: "half", x1: "0", x2: "100%", y1: "0", y2: "0" }, /* @__PURE__ */ React3.createElement("stop", { offset: "50%", stopColor: "#fbbf24" }), /* @__PURE__ */ React3.createElement("stop", { offset: "50%", stopColor: "rgba(255,255,255,0.1)" }))), /* @__PURE__ */ React3.createElement("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2", fill: "url(#half)" }))
|
|
335
262
|
);
|
|
336
263
|
} else {
|
|
337
264
|
stars.push(
|
|
338
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ React3.createElement("svg", { key: i, width: "14", height: "14", viewBox: "0 0 24 24", fill: "rgba(255,255,255,0.1)", stroke: "none" }, /* @__PURE__ */ React3.createElement("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }))
|
|
339
266
|
);
|
|
340
267
|
}
|
|
341
268
|
}
|
|
342
269
|
return stars;
|
|
343
270
|
};
|
|
344
|
-
return /* @__PURE__ */
|
|
271
|
+
return /* @__PURE__ */ React3.createElement(
|
|
345
272
|
"div",
|
|
346
273
|
{
|
|
347
274
|
onMouseEnter: () => setHovered(true),
|
|
@@ -358,7 +285,7 @@ var EcommerceCard = ({
|
|
|
358
285
|
boxShadow: hovered ? "0 12px 30px rgba(0,0,0,0.4)" : "0 4px 16px rgba(0,0,0,0.3)"
|
|
359
286
|
}
|
|
360
287
|
},
|
|
361
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ React3.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React3.createElement(
|
|
362
289
|
"img",
|
|
363
290
|
{
|
|
364
291
|
src: image,
|
|
@@ -371,7 +298,7 @@ var EcommerceCard = ({
|
|
|
371
298
|
transform: hovered ? "scale(1.05)" : "scale(1)"
|
|
372
299
|
}
|
|
373
300
|
}
|
|
374
|
-
), badge && /* @__PURE__ */
|
|
301
|
+
), badge && /* @__PURE__ */ React3.createElement("div", { style: {
|
|
375
302
|
position: "absolute",
|
|
376
303
|
top: "10px",
|
|
377
304
|
left: "10px",
|
|
@@ -383,7 +310,7 @@ var EcommerceCard = ({
|
|
|
383
310
|
color: "#fff",
|
|
384
311
|
textTransform: "uppercase",
|
|
385
312
|
letterSpacing: "0.5px"
|
|
386
|
-
} }, badge), /* @__PURE__ */
|
|
313
|
+
} }, badge), /* @__PURE__ */ React3.createElement(
|
|
387
314
|
"button",
|
|
388
315
|
{
|
|
389
316
|
onClick: () => setWishlisted(!wishlisted),
|
|
@@ -402,7 +329,7 @@ var EcommerceCard = ({
|
|
|
402
329
|
cursor: "pointer"
|
|
403
330
|
}
|
|
404
331
|
},
|
|
405
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ React3.createElement(
|
|
406
333
|
"svg",
|
|
407
334
|
{
|
|
408
335
|
width: "16",
|
|
@@ -412,38 +339,38 @@ var EcommerceCard = ({
|
|
|
412
339
|
stroke: wishlisted ? "#ef4444" : "#fff",
|
|
413
340
|
strokeWidth: "2"
|
|
414
341
|
},
|
|
415
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" })
|
|
416
343
|
)
|
|
417
344
|
)),
|
|
418
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ React3.createElement("div", { style: { padding: "16px" } }, /* @__PURE__ */ React3.createElement("h3", { style: {
|
|
419
346
|
fontSize: "16px",
|
|
420
347
|
fontWeight: "700",
|
|
421
348
|
color: "#fff",
|
|
422
349
|
margin: "0 0 8px",
|
|
423
350
|
lineHeight: 1.4
|
|
424
|
-
} }, title), /* @__PURE__ */
|
|
351
|
+
} }, title), /* @__PURE__ */ React3.createElement("div", { style: {
|
|
425
352
|
display: "flex",
|
|
426
353
|
alignItems: "center",
|
|
427
354
|
gap: "6px",
|
|
428
355
|
marginBottom: "12px"
|
|
429
|
-
} }, /* @__PURE__ */
|
|
356
|
+
} }, /* @__PURE__ */ React3.createElement("div", { style: { display: "flex" } }, renderStars()), /* @__PURE__ */ React3.createElement("span", { style: {
|
|
430
357
|
fontSize: "12px",
|
|
431
358
|
color: "rgba(255,255,255,0.45)"
|
|
432
|
-
} }, "(", reviewCount, ")")), /* @__PURE__ */
|
|
359
|
+
} }, "(", reviewCount, ")")), /* @__PURE__ */ React3.createElement("div", { style: {
|
|
433
360
|
display: "flex",
|
|
434
361
|
alignItems: "center",
|
|
435
362
|
gap: "10px",
|
|
436
363
|
marginBottom: "16px"
|
|
437
|
-
} }, /* @__PURE__ */
|
|
364
|
+
} }, /* @__PURE__ */ React3.createElement("span", { style: {
|
|
438
365
|
fontSize: "20px",
|
|
439
366
|
fontWeight: "800",
|
|
440
367
|
color: "#fff"
|
|
441
|
-
} }, currency, price.toFixed(2)), discount > 0 && /* @__PURE__ */
|
|
368
|
+
} }, currency, price.toFixed(2)), discount > 0 && /* @__PURE__ */ React3.createElement("span", { style: {
|
|
442
369
|
fontSize: "14px",
|
|
443
370
|
fontWeight: "500",
|
|
444
371
|
color: "#86efac",
|
|
445
372
|
textDecoration: "line-through"
|
|
446
|
-
} }, currency, (price + price * discount / 100).toFixed(2))), /* @__PURE__ */
|
|
373
|
+
} }, currency, (price + price * discount / 100).toFixed(2))), /* @__PURE__ */ React3.createElement(
|
|
447
374
|
"button",
|
|
448
375
|
{
|
|
449
376
|
onClick: onAddToCart,
|
|
@@ -464,7 +391,7 @@ var EcommerceCard = ({
|
|
|
464
391
|
gap: "8px"
|
|
465
392
|
}
|
|
466
393
|
},
|
|
467
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ React3.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#fff", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React3.createElement("circle", { cx: "9", cy: "21", r: "1" }), /* @__PURE__ */ React3.createElement("circle", { cx: "20", cy: "21", r: "1" }), /* @__PURE__ */ React3.createElement("path", { d: "M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6" })),
|
|
468
395
|
"Add to Cart"
|
|
469
396
|
))
|
|
470
397
|
);
|
|
@@ -472,6 +399,5 @@ var EcommerceCard = ({
|
|
|
472
399
|
export {
|
|
473
400
|
Button,
|
|
474
401
|
Card,
|
|
475
|
-
EcommerceCard
|
|
476
|
-
ProfileCard
|
|
402
|
+
EcommerceCard
|
|
477
403
|
};
|