@anker-in/ui 0.1.8 → 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.
@@ -48,7 +48,10 @@ var StudioCard = ({
48
48
  "div",
49
49
  {
50
50
  ...props,
51
- className: cn("p-6 cursor-pointer transition-colors duration-200", className),
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
  ] }) })
@@ -333,18 +336,22 @@ var StudioMap = ({
333
336
  validLocations.forEach((location) => {
334
337
  const lat = Number(location.lat);
335
338
  const lng = Number(location.lng);
339
+ const svgIcon = {
340
+ url: `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(`
341
+ <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
342
+ <circle cx="24" cy="24" r="22" fill="#00000010"/>
343
+ <circle cx="24" cy="24" r="10" fill="#000000"/>
344
+ <circle cx="24" cy="24" r="5" fill="#3ADB67"/>
345
+ </svg>
346
+ `)}`,
347
+ scaledSize: { width: 48, height: 48 },
348
+ anchor: { x: 24, y: 24 }
349
+ };
336
350
  const marker = new google.maps.Marker({
337
351
  position: { lat, lng },
338
352
  map: googleMapRef.current,
339
353
  title: location.name,
340
- icon: {
341
- path: google.maps.SymbolPath.CIRCLE,
342
- scale: 10,
343
- fillColor: "#000000",
344
- fillOpacity: 1,
345
- strokeColor: "#ffffff",
346
- strokeWeight: 2
347
- }
354
+ icon: svgIcon
348
355
  });
349
356
  marker.addListener("click", () => {
350
357
  setSelectedLocation(location);
@@ -355,7 +362,7 @@ var StudioMap = ({
355
362
  <svg style="display: inline-block; width: 16px; height: 16px; margin-right: 4px; vertical-align: middle;" fill="currentColor" viewBox="0 0 20 20">
356
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"/>
357
364
  </svg>
358
- <span style="vertical-align: middle;">${pageData.available} ${location.availableTime}</span>
365
+ <span style="vertical-align: middle;"> ${location.availableTime === pageData?.noAvailableTime ? "" : pageData.available} ${location.availableTime}</span>
359
366
  </div>` : ""}
360
367
  <div style="margin-bottom: 8px; color: #666;">
361
368
  <svg style="display: inline-block; width: 16px; height: 16px; margin-right: 4px; vertical-align: middle;" fill="currentColor" viewBox="0 0 20 20">
@@ -860,6 +867,7 @@ var defaultPageData = {
860
867
  title: "Find a Studio Near You",
861
868
  loadingText: "Loading demo rooms...",
862
869
  errorTitle: "Failed to load demo rooms",
870
+ machine: "eufymake E1",
863
871
  locationFilter: {
864
872
  allLocations: "All Locations",
865
873
  clear: "Clear",
@@ -1042,13 +1050,13 @@ var RoomsList = ({
1042
1050
  state,
1043
1051
  zipCode: "",
1044
1052
  country,
1045
- lat: Number(room.latitude) || 34.0522,
1046
- lng: Number(room.longitude) || -118.2437,
1053
+ lat: Number(room.latitude) || 0,
1054
+ lng: Number(room.longitude) || 0,
1047
1055
  availableTime: nextAvailableTimeslot ? `${nextAvailableTimeslot.start_time}` : mergedPageData.noAvailableTime,
1048
1056
  euifyMakeModel: room?.description
1049
1057
  };
1050
1058
  });
1051
- }, [demoRooms]);
1059
+ }, [demoRooms, mergedPageData.defaultCountry, mergedPageData.noAvailableTime]);
1052
1060
  const filteredStudioLocations = useMemo(() => {
1053
1061
  if (!selectedLocation) return studioLocations;
1054
1062
  return studioLocations.filter((location) => {
@@ -1130,7 +1138,7 @@ var RoomsList = ({
1130
1138
  }
1131
1139
  ),
1132
1140
  /* @__PURE__ */ jsxs("div", { className: "flex text-[#767880] cursor-not-allowed", children: [
1133
- "eufymake E1",
1141
+ mergedPageData.machine,
1134
1142
  /* @__PURE__ */ jsx(
1135
1143
  "svg",
1136
1144
  {
@@ -1170,7 +1178,10 @@ var RoomsList = ({
1170
1178
  onSchedule,
1171
1179
  onMouseEnter: () => setHoveredRoomId(item.id),
1172
1180
  onMouseLeave: () => setHoveredRoomId(null),
1173
- pageData: mergedPageData.studioCard
1181
+ pageData: {
1182
+ ...mergedPageData.studioCard,
1183
+ noAvailableTime: mergedPageData?.noAvailableTime
1184
+ }
1174
1185
  },
1175
1186
  item.id
1176
1187
  );
@@ -1203,7 +1214,10 @@ var RoomsList = ({
1203
1214
  hoveredLocationId: hoveredRoomId,
1204
1215
  onSchedule,
1205
1216
  mapHeight: "794px",
1206
- pageData: mergedPageData.map
1217
+ pageData: {
1218
+ ...mergedPageData.map,
1219
+ noAvailableTime: pageData?.noAvailableTime
1220
+ }
1207
1221
  }
1208
1222
  ) })
1209
1223
  ] })
@@ -1406,207 +1420,7 @@ var DemoRoom = ({
1406
1420
  ) });
1407
1421
  };
1408
1422
  DemoRoom.displayName = "DemoRoom";
1409
- var EventCard = ({
1410
- title,
1411
- description,
1412
- backgroundImage,
1413
- aspectRatio,
1414
- variant = "medium",
1415
- buttons = [],
1416
- subtitle,
1417
- className,
1418
- ...props
1419
- }) => {
1420
- const isLarge = variant === "large";
1421
- const isMedium = variant === "medium";
1422
- const isProduct = variant === "product";
1423
- return /* @__PURE__ */ jsx(
1424
- "div",
1425
- {
1426
- className: cn("rounded-3xl overflow-hidden relative", className),
1427
- style: {
1428
- backgroundImage: backgroundImage ? `url(${backgroundImage})` : void 0,
1429
- backgroundSize: "cover",
1430
- backgroundPosition: "center",
1431
- aspectRatio
1432
- },
1433
- ...props,
1434
- children: /* @__PURE__ */ jsxs(
1435
- "div",
1436
- {
1437
- className: cn(
1438
- "relative h-full flex flex-col",
1439
- isLarge && "justify-center pl-8",
1440
- !isLarge && "justify-end pl-8 pb-8"
1441
- ),
1442
- children: [
1443
- /* @__PURE__ */ jsxs("div", { children: [
1444
- /* @__PURE__ */ jsx(
1445
- "h3",
1446
- {
1447
- className: cn(
1448
- "font-semibold mb-3",
1449
- isLarge && "text-3xl text-gray-900",
1450
- isMedium && "text-2xl text-white",
1451
- isProduct && "text-2xl text-gray-900"
1452
- ),
1453
- children: title
1454
- }
1455
- ),
1456
- subtitle && isProduct && /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-600 mb-4", children: subtitle }),
1457
- description && /* @__PURE__ */ jsx(
1458
- "p",
1459
- {
1460
- className: cn(
1461
- "text-sm leading-relaxed",
1462
- isMedium && "text-white/90",
1463
- (isLarge || isProduct) && "text-gray-600"
1464
- ),
1465
- children: description
1466
- }
1467
- )
1468
- ] }),
1469
- buttons.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex gap-3 mt-6", children: buttons.map((button, index) => /* @__PURE__ */ jsx(
1470
- "button",
1471
- {
1472
- onClick: button.onClick,
1473
- className: cn(
1474
- "px-6 py-3 rounded-full font-medium text-sm transition-all duration-200",
1475
- button.variant === "primary" && "bg-gray-900 text-white hover:bg-gray-800",
1476
- button.variant === "secondary" && "bg-white text-gray-900 border border-gray-300 hover:bg-gray-50"
1477
- ),
1478
- children: button.label
1479
- },
1480
- index
1481
- )) })
1482
- ]
1483
- }
1484
- )
1485
- }
1486
- );
1487
- };
1488
- EventCard.displayName = "EventCard";
1489
- var defaultEvents = [
1490
- {
1491
- variant: "large",
1492
- title: "IFA 2025 Event Name Event Name",
1493
- description: "Corem ipsum dolor sit amet, consectetur adipiscing elit.",
1494
- backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
1495
- buttons: [
1496
- {
1497
- label: "Schedule Now",
1498
- variant: "primary"
1499
- }
1500
- ],
1501
- aspectRatio: "1664 / 640"
1502
- },
1503
- {
1504
- variant: "medium",
1505
- title: "Local Event Name Local Event Name Local Event Name",
1506
- description: "Norem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis.",
1507
- backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
1508
- buttons: [
1509
- {
1510
- label: "Schedule Now",
1511
- variant: "primary"
1512
- }
1513
- ],
1514
- aspectRatio: "824 / 640"
1515
- },
1516
- {
1517
- variant: "product",
1518
- title: "Anker Prime",
1519
- subtitle: "Anker Prime 240W GaN Desktop Charger (4 Ports) Feb. 5th - 16th",
1520
- backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
1521
- buttons: [
1522
- {
1523
- label: "Learn More",
1524
- variant: "secondary"
1525
- },
1526
- {
1527
- label: "Shop Now",
1528
- variant: "primary"
1529
- }
1530
- ],
1531
- aspectRatio: "824 / 640"
1532
- },
1533
- {
1534
- variant: "medium",
1535
- title: "Local Event Name Local Event Name Local Event Name",
1536
- description: "Norem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis.",
1537
- backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
1538
- buttons: [
1539
- {
1540
- label: "Schedule Now",
1541
- variant: "primary"
1542
- }
1543
- ],
1544
- aspectRatio: "824 / 640"
1545
- },
1546
- {
1547
- variant: "product",
1548
- title: "Anker Prime",
1549
- subtitle: "Anker Prime 240W GaN Desktop Charger (4 Ports) Feb. 5th - 16th",
1550
- backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
1551
- buttons: [
1552
- {
1553
- label: "Learn More",
1554
- variant: "secondary"
1555
- },
1556
- {
1557
- label: "Shop Now",
1558
- variant: "primary"
1559
- }
1560
- ],
1561
- aspectRatio: "824 / 640"
1562
- }
1563
- ];
1564
- var UpcomingEvents = ({
1565
- title = "Upcoming Events",
1566
- events = defaultEvents,
1567
- showViewMore = true,
1568
- onViewMore,
1569
- className,
1570
- ...props
1571
- }) => {
1572
- return /* @__PURE__ */ jsxs("div", { className: cn("w-full", className), ...props, children: [
1573
- /* @__PURE__ */ jsx(Title, { title }),
1574
- /* @__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)) }),
1575
- showViewMore && /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs(
1576
- "button",
1577
- {
1578
- onClick: onViewMore,
1579
- className: "inline-flex items-center gap-2 text-gray-700 hover:text-gray-900 transition-colors duration-200",
1580
- children: [
1581
- /* @__PURE__ */ jsx("span", { className: "text-base font-bold", children: "View More" }),
1582
- /* @__PURE__ */ jsx(
1583
- "svg",
1584
- {
1585
- width: "16",
1586
- height: "16",
1587
- viewBox: "0 0 16 16",
1588
- fill: "none",
1589
- xmlns: "http://www.w3.org/2000/svg",
1590
- className: "transition-transform duration-200 group-hover:translate-y-0.5",
1591
- children: /* @__PURE__ */ jsx(
1592
- "path",
1593
- {
1594
- d: "M8 3L8 13M8 13L12 9M8 13L4 9",
1595
- stroke: "currentColor",
1596
- strokeWidth: "2",
1597
- strokeLinecap: "round",
1598
- strokeLinejoin: "round"
1599
- }
1600
- )
1601
- }
1602
- )
1603
- ]
1604
- }
1605
- ) })
1606
- ] });
1607
- };
1608
- UpcomingEvents.displayName = "UpcomingEvents";
1609
1423
 
1610
- export { DemoRoom, EventCard, StudioCard, StudioMap, UpcomingEvents };
1424
+ export { DemoRoom, StudioCard, StudioMap };
1611
1425
  //# sourceMappingURL=demo-room.mjs.map
1612
1426
  //# sourceMappingURL=demo-room.mjs.map