@anker-in/ui 0.1.9 → 0.1.10
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/demo-room.d.mts +3 -57
- package/dist/demo-room.d.ts +3 -57
- package/dist/demo-room.js +18 -211
- package/dist/demo-room.js.map +1 -1
- package/dist/demo-room.mjs +19 -210
- package/dist/demo-room.mjs.map +1 -1
- package/dist/index.js +314 -164
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +314 -164
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/demo-room.mjs
CHANGED
|
@@ -48,7 +48,10 @@ var StudioCard = ({
|
|
|
48
48
|
"div",
|
|
49
49
|
{
|
|
50
50
|
...props,
|
|
51
|
-
className: cn(
|
|
51
|
+
className: cn(
|
|
52
|
+
"p-6 cursor-pointer transition-colors duration-200",
|
|
53
|
+
className
|
|
54
|
+
),
|
|
52
55
|
style: {
|
|
53
56
|
backgroundColor: isHovered ? "#f3f4f6" : "transparent",
|
|
54
57
|
...style
|
|
@@ -70,7 +73,7 @@ var StudioCard = ({
|
|
|
70
73
|
pageData.away
|
|
71
74
|
] })
|
|
72
75
|
] }),
|
|
73
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 mb-3", children: [
|
|
76
|
+
availableTime && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 mb-3", children: [
|
|
74
77
|
/* @__PURE__ */ jsxs(
|
|
75
78
|
"svg",
|
|
76
79
|
{
|
|
@@ -124,7 +127,7 @@ var StudioCard = ({
|
|
|
124
127
|
}
|
|
125
128
|
),
|
|
126
129
|
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("p", { className: "text-sm text-gray-600", children: [
|
|
127
|
-
pageData.available,
|
|
130
|
+
availableTime === pageData.noAvailableTime ? "" : pageData.available,
|
|
128
131
|
" ",
|
|
129
132
|
availableTime
|
|
130
133
|
] }) })
|
|
@@ -359,7 +362,7 @@ var StudioMap = ({
|
|
|
359
362
|
<svg style="display: inline-block; width: 16px; height: 16px; margin-right: 4px; vertical-align: middle;" fill="currentColor" viewBox="0 0 20 20">
|
|
360
363
|
<path d="M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z"/>
|
|
361
364
|
</svg>
|
|
362
|
-
<span style="vertical-align: middle;"
|
|
365
|
+
<span style="vertical-align: middle;"> ${location.availableTime === pageData?.noAvailableTime ? "" : pageData.available} ${location.availableTime}</span>
|
|
363
366
|
</div>` : ""}
|
|
364
367
|
<div style="margin-bottom: 8px; color: #666;">
|
|
365
368
|
<svg style="display: inline-block; width: 16px; height: 16px; margin-right: 4px; vertical-align: middle;" fill="currentColor" viewBox="0 0 20 20">
|
|
@@ -1047,13 +1050,13 @@ var RoomsList = ({
|
|
|
1047
1050
|
state,
|
|
1048
1051
|
zipCode: "",
|
|
1049
1052
|
country,
|
|
1050
|
-
lat: Number(room.latitude) ||
|
|
1051
|
-
lng: Number(room.longitude) ||
|
|
1053
|
+
lat: Number(room.latitude) || 0,
|
|
1054
|
+
lng: Number(room.longitude) || 0,
|
|
1052
1055
|
availableTime: nextAvailableTimeslot ? `${nextAvailableTimeslot.start_time}` : mergedPageData.noAvailableTime,
|
|
1053
1056
|
euifyMakeModel: room?.description
|
|
1054
1057
|
};
|
|
1055
1058
|
});
|
|
1056
|
-
}, [demoRooms]);
|
|
1059
|
+
}, [demoRooms, mergedPageData.defaultCountry, mergedPageData.noAvailableTime]);
|
|
1057
1060
|
const filteredStudioLocations = useMemo(() => {
|
|
1058
1061
|
if (!selectedLocation) return studioLocations;
|
|
1059
1062
|
return studioLocations.filter((location) => {
|
|
@@ -1175,7 +1178,10 @@ var RoomsList = ({
|
|
|
1175
1178
|
onSchedule,
|
|
1176
1179
|
onMouseEnter: () => setHoveredRoomId(item.id),
|
|
1177
1180
|
onMouseLeave: () => setHoveredRoomId(null),
|
|
1178
|
-
pageData:
|
|
1181
|
+
pageData: {
|
|
1182
|
+
...mergedPageData.studioCard,
|
|
1183
|
+
noAvailableTime: mergedPageData?.noAvailableTime
|
|
1184
|
+
}
|
|
1179
1185
|
},
|
|
1180
1186
|
item.id
|
|
1181
1187
|
);
|
|
@@ -1208,7 +1214,10 @@ var RoomsList = ({
|
|
|
1208
1214
|
hoveredLocationId: hoveredRoomId,
|
|
1209
1215
|
onSchedule,
|
|
1210
1216
|
mapHeight: "794px",
|
|
1211
|
-
pageData:
|
|
1217
|
+
pageData: {
|
|
1218
|
+
...mergedPageData.map,
|
|
1219
|
+
noAvailableTime: pageData?.noAvailableTime
|
|
1220
|
+
}
|
|
1212
1221
|
}
|
|
1213
1222
|
) })
|
|
1214
1223
|
] })
|
|
@@ -1411,207 +1420,7 @@ var DemoRoom = ({
|
|
|
1411
1420
|
) });
|
|
1412
1421
|
};
|
|
1413
1422
|
DemoRoom.displayName = "DemoRoom";
|
|
1414
|
-
var EventCard = ({
|
|
1415
|
-
title,
|
|
1416
|
-
description,
|
|
1417
|
-
backgroundImage,
|
|
1418
|
-
aspectRatio,
|
|
1419
|
-
variant = "medium",
|
|
1420
|
-
buttons = [],
|
|
1421
|
-
subtitle,
|
|
1422
|
-
className,
|
|
1423
|
-
...props
|
|
1424
|
-
}) => {
|
|
1425
|
-
const isLarge = variant === "large";
|
|
1426
|
-
const isMedium = variant === "medium";
|
|
1427
|
-
const isProduct = variant === "product";
|
|
1428
|
-
return /* @__PURE__ */ jsx(
|
|
1429
|
-
"div",
|
|
1430
|
-
{
|
|
1431
|
-
className: cn("rounded-3xl overflow-hidden relative", className),
|
|
1432
|
-
style: {
|
|
1433
|
-
backgroundImage: backgroundImage ? `url(${backgroundImage})` : void 0,
|
|
1434
|
-
backgroundSize: "cover",
|
|
1435
|
-
backgroundPosition: "center",
|
|
1436
|
-
aspectRatio
|
|
1437
|
-
},
|
|
1438
|
-
...props,
|
|
1439
|
-
children: /* @__PURE__ */ jsxs(
|
|
1440
|
-
"div",
|
|
1441
|
-
{
|
|
1442
|
-
className: cn(
|
|
1443
|
-
"relative h-full flex flex-col",
|
|
1444
|
-
isLarge && "justify-center pl-8",
|
|
1445
|
-
!isLarge && "justify-end pl-8 pb-8"
|
|
1446
|
-
),
|
|
1447
|
-
children: [
|
|
1448
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
1449
|
-
/* @__PURE__ */ jsx(
|
|
1450
|
-
"h3",
|
|
1451
|
-
{
|
|
1452
|
-
className: cn(
|
|
1453
|
-
"font-semibold mb-3",
|
|
1454
|
-
isLarge && "text-3xl text-gray-900",
|
|
1455
|
-
isMedium && "text-2xl text-white",
|
|
1456
|
-
isProduct && "text-2xl text-gray-900"
|
|
1457
|
-
),
|
|
1458
|
-
children: title
|
|
1459
|
-
}
|
|
1460
|
-
),
|
|
1461
|
-
subtitle && isProduct && /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-600 mb-4", children: subtitle }),
|
|
1462
|
-
description && /* @__PURE__ */ jsx(
|
|
1463
|
-
"p",
|
|
1464
|
-
{
|
|
1465
|
-
className: cn(
|
|
1466
|
-
"text-sm leading-relaxed",
|
|
1467
|
-
isMedium && "text-white/90",
|
|
1468
|
-
(isLarge || isProduct) && "text-gray-600"
|
|
1469
|
-
),
|
|
1470
|
-
children: description
|
|
1471
|
-
}
|
|
1472
|
-
)
|
|
1473
|
-
] }),
|
|
1474
|
-
buttons.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex gap-3 mt-6", children: buttons.map((button, index) => /* @__PURE__ */ jsx(
|
|
1475
|
-
"button",
|
|
1476
|
-
{
|
|
1477
|
-
onClick: button.onClick,
|
|
1478
|
-
className: cn(
|
|
1479
|
-
"px-6 py-3 rounded-full font-medium text-sm transition-all duration-200",
|
|
1480
|
-
button.variant === "primary" && "bg-gray-900 text-white hover:bg-gray-800",
|
|
1481
|
-
button.variant === "secondary" && "bg-white text-gray-900 border border-gray-300 hover:bg-gray-50"
|
|
1482
|
-
),
|
|
1483
|
-
children: button.label
|
|
1484
|
-
},
|
|
1485
|
-
index
|
|
1486
|
-
)) })
|
|
1487
|
-
]
|
|
1488
|
-
}
|
|
1489
|
-
)
|
|
1490
|
-
}
|
|
1491
|
-
);
|
|
1492
|
-
};
|
|
1493
|
-
EventCard.displayName = "EventCard";
|
|
1494
|
-
var defaultEvents = [
|
|
1495
|
-
{
|
|
1496
|
-
variant: "large",
|
|
1497
|
-
title: "IFA 2025 Event Name Event Name",
|
|
1498
|
-
description: "Corem ipsum dolor sit amet, consectetur adipiscing elit.",
|
|
1499
|
-
backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
1500
|
-
buttons: [
|
|
1501
|
-
{
|
|
1502
|
-
label: "Schedule Now",
|
|
1503
|
-
variant: "primary"
|
|
1504
|
-
}
|
|
1505
|
-
],
|
|
1506
|
-
aspectRatio: "1664 / 640"
|
|
1507
|
-
},
|
|
1508
|
-
{
|
|
1509
|
-
variant: "medium",
|
|
1510
|
-
title: "Local Event Name Local Event Name Local Event Name",
|
|
1511
|
-
description: "Norem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis.",
|
|
1512
|
-
backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
1513
|
-
buttons: [
|
|
1514
|
-
{
|
|
1515
|
-
label: "Schedule Now",
|
|
1516
|
-
variant: "primary"
|
|
1517
|
-
}
|
|
1518
|
-
],
|
|
1519
|
-
aspectRatio: "824 / 640"
|
|
1520
|
-
},
|
|
1521
|
-
{
|
|
1522
|
-
variant: "product",
|
|
1523
|
-
title: "Anker Prime",
|
|
1524
|
-
subtitle: "Anker Prime 240W GaN Desktop Charger (4 Ports) Feb. 5th - 16th",
|
|
1525
|
-
backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
1526
|
-
buttons: [
|
|
1527
|
-
{
|
|
1528
|
-
label: "Learn More",
|
|
1529
|
-
variant: "secondary"
|
|
1530
|
-
},
|
|
1531
|
-
{
|
|
1532
|
-
label: "Shop Now",
|
|
1533
|
-
variant: "primary"
|
|
1534
|
-
}
|
|
1535
|
-
],
|
|
1536
|
-
aspectRatio: "824 / 640"
|
|
1537
|
-
},
|
|
1538
|
-
{
|
|
1539
|
-
variant: "medium",
|
|
1540
|
-
title: "Local Event Name Local Event Name Local Event Name",
|
|
1541
|
-
description: "Norem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis.",
|
|
1542
|
-
backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
1543
|
-
buttons: [
|
|
1544
|
-
{
|
|
1545
|
-
label: "Schedule Now",
|
|
1546
|
-
variant: "primary"
|
|
1547
|
-
}
|
|
1548
|
-
],
|
|
1549
|
-
aspectRatio: "824 / 640"
|
|
1550
|
-
},
|
|
1551
|
-
{
|
|
1552
|
-
variant: "product",
|
|
1553
|
-
title: "Anker Prime",
|
|
1554
|
-
subtitle: "Anker Prime 240W GaN Desktop Charger (4 Ports) Feb. 5th - 16th",
|
|
1555
|
-
backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
1556
|
-
buttons: [
|
|
1557
|
-
{
|
|
1558
|
-
label: "Learn More",
|
|
1559
|
-
variant: "secondary"
|
|
1560
|
-
},
|
|
1561
|
-
{
|
|
1562
|
-
label: "Shop Now",
|
|
1563
|
-
variant: "primary"
|
|
1564
|
-
}
|
|
1565
|
-
],
|
|
1566
|
-
aspectRatio: "824 / 640"
|
|
1567
|
-
}
|
|
1568
|
-
];
|
|
1569
|
-
var UpcomingEvents = ({
|
|
1570
|
-
title = "Upcoming Events",
|
|
1571
|
-
events = defaultEvents,
|
|
1572
|
-
showViewMore = true,
|
|
1573
|
-
onViewMore,
|
|
1574
|
-
className,
|
|
1575
|
-
...props
|
|
1576
|
-
}) => {
|
|
1577
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("w-full", className), ...props, children: [
|
|
1578
|
-
/* @__PURE__ */ jsx(Title, { title }),
|
|
1579
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-6 mb-[64px]", children: events.map((event, index) => /* @__PURE__ */ jsx("div", { className: cn(index === 0 ? "col-span-2" : ""), children: /* @__PURE__ */ jsx(EventCard, { ...event }) }, index)) }),
|
|
1580
|
-
showViewMore && /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs(
|
|
1581
|
-
"button",
|
|
1582
|
-
{
|
|
1583
|
-
onClick: onViewMore,
|
|
1584
|
-
className: "inline-flex items-center gap-2 text-gray-700 hover:text-gray-900 transition-colors duration-200",
|
|
1585
|
-
children: [
|
|
1586
|
-
/* @__PURE__ */ jsx("span", { className: "text-base font-bold", children: "View More" }),
|
|
1587
|
-
/* @__PURE__ */ jsx(
|
|
1588
|
-
"svg",
|
|
1589
|
-
{
|
|
1590
|
-
width: "16",
|
|
1591
|
-
height: "16",
|
|
1592
|
-
viewBox: "0 0 16 16",
|
|
1593
|
-
fill: "none",
|
|
1594
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1595
|
-
className: "transition-transform duration-200 group-hover:translate-y-0.5",
|
|
1596
|
-
children: /* @__PURE__ */ jsx(
|
|
1597
|
-
"path",
|
|
1598
|
-
{
|
|
1599
|
-
d: "M8 3L8 13M8 13L12 9M8 13L4 9",
|
|
1600
|
-
stroke: "currentColor",
|
|
1601
|
-
strokeWidth: "2",
|
|
1602
|
-
strokeLinecap: "round",
|
|
1603
|
-
strokeLinejoin: "round"
|
|
1604
|
-
}
|
|
1605
|
-
)
|
|
1606
|
-
}
|
|
1607
|
-
)
|
|
1608
|
-
]
|
|
1609
|
-
}
|
|
1610
|
-
) })
|
|
1611
|
-
] });
|
|
1612
|
-
};
|
|
1613
|
-
UpcomingEvents.displayName = "UpcomingEvents";
|
|
1614
1423
|
|
|
1615
|
-
export { DemoRoom,
|
|
1424
|
+
export { DemoRoom, StudioCard, StudioMap };
|
|
1616
1425
|
//# sourceMappingURL=demo-room.mjs.map
|
|
1617
1426
|
//# sourceMappingURL=demo-room.mjs.map
|