@anker-in/ui 0.1.4 → 0.1.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/demo-room.css +3 -0
- package/dist/demo-room.css.map +1 -1
- package/dist/demo-room.d.mts +11 -64
- package/dist/demo-room.d.ts +11 -64
- package/dist/demo-room.js +415 -553
- package/dist/demo-room.js.map +1 -1
- package/dist/demo-room.mjs +417 -553
- package/dist/demo-room.mjs.map +1 -1
- package/dist/index.css +3 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +3 -41
- package/dist/index.d.ts +3 -41
- package/dist/index.js +1103 -1238
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1105 -1239
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/demo-room.js
CHANGED
|
@@ -4,7 +4,6 @@ var React2 = require('react');
|
|
|
4
4
|
var clsx = require('clsx');
|
|
5
5
|
var tailwindMerge = require('tailwind-merge');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
var headlessUi = require('@anker-in/headless-ui');
|
|
8
7
|
var IndexBar = require('antd-mobile/es/components/index-bar');
|
|
9
8
|
var List = require('antd-mobile/es/components/list');
|
|
10
9
|
require('antd-mobile/es/components/index-bar/index-bar.css');
|
|
@@ -19,158 +18,6 @@ var List__default = /*#__PURE__*/_interopDefault(List);
|
|
|
19
18
|
function cn(...inputs) {
|
|
20
19
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
21
20
|
}
|
|
22
|
-
var defaultTabs = [
|
|
23
|
-
{ id: "upcoming-events", label: "Upcoming Events" },
|
|
24
|
-
{ id: "find-demoroom", label: "Find Demoroom" },
|
|
25
|
-
{ id: "4-easy-steps", label: "4 Easy Steps" },
|
|
26
|
-
{ id: "faq", label: "FAQ" }
|
|
27
|
-
];
|
|
28
|
-
var HelpNav = ({
|
|
29
|
-
tabs = defaultTabs,
|
|
30
|
-
activeTabId: controlledActiveTabId,
|
|
31
|
-
onTabChange,
|
|
32
|
-
activeBorderColor = "#3ADB67",
|
|
33
|
-
className,
|
|
34
|
-
...props
|
|
35
|
-
}) => {
|
|
36
|
-
const [internalActiveTabId, setInternalActiveTabId] = React2.useState(
|
|
37
|
-
tabs[1]?.id || tabs[0]?.id
|
|
38
|
-
);
|
|
39
|
-
const activeTabId = controlledActiveTabId ?? internalActiveTabId;
|
|
40
|
-
const handleTabClick = (tabId) => {
|
|
41
|
-
if (!controlledActiveTabId) {
|
|
42
|
-
setInternalActiveTabId(tabId);
|
|
43
|
-
}
|
|
44
|
-
onTabChange?.(tabId);
|
|
45
|
-
};
|
|
46
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
47
|
-
"div",
|
|
48
|
-
{
|
|
49
|
-
className: cn(
|
|
50
|
-
"w-full pt-5 flex items-center justify-center gap-8 pb-8",
|
|
51
|
-
className
|
|
52
|
-
),
|
|
53
|
-
...props,
|
|
54
|
-
children: tabs.map((tab) => {
|
|
55
|
-
const isActive = tab.id === activeTabId;
|
|
56
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
57
|
-
"button",
|
|
58
|
-
{
|
|
59
|
-
onClick: () => handleTabClick(tab.id),
|
|
60
|
-
className: cn(
|
|
61
|
-
"relative text-[#080A0F]",
|
|
62
|
-
"pb-4",
|
|
63
|
-
"flex items-center gap-2",
|
|
64
|
-
"transition-all duration-200",
|
|
65
|
-
"outline-none focus:outline-none"
|
|
66
|
-
),
|
|
67
|
-
style: {
|
|
68
|
-
fontSize: "18px",
|
|
69
|
-
fontWeight: 600,
|
|
70
|
-
letterSpacing: "-0.36px",
|
|
71
|
-
lineHeight: "25.2px"
|
|
72
|
-
},
|
|
73
|
-
children: [
|
|
74
|
-
tab.label,
|
|
75
|
-
isActive && /* @__PURE__ */ jsxRuntime.jsx(
|
|
76
|
-
"span",
|
|
77
|
-
{
|
|
78
|
-
className: "absolute bottom-0 left-0 right-0 h-1 rounded-t",
|
|
79
|
-
style: {
|
|
80
|
-
backgroundColor: activeBorderColor,
|
|
81
|
-
height: "4px"
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
)
|
|
85
|
-
]
|
|
86
|
-
},
|
|
87
|
-
tab.id
|
|
88
|
-
);
|
|
89
|
-
})
|
|
90
|
-
}
|
|
91
|
-
);
|
|
92
|
-
};
|
|
93
|
-
HelpNav.displayName = "HelpNav";
|
|
94
|
-
var EventCard = ({
|
|
95
|
-
title,
|
|
96
|
-
description,
|
|
97
|
-
backgroundImage,
|
|
98
|
-
aspectRatio,
|
|
99
|
-
variant = "medium",
|
|
100
|
-
buttons = [],
|
|
101
|
-
subtitle,
|
|
102
|
-
className,
|
|
103
|
-
...props
|
|
104
|
-
}) => {
|
|
105
|
-
const isLarge = variant === "large";
|
|
106
|
-
const isMedium = variant === "medium";
|
|
107
|
-
const isProduct = variant === "product";
|
|
108
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
109
|
-
"div",
|
|
110
|
-
{
|
|
111
|
-
className: cn("rounded-3xl overflow-hidden relative", className),
|
|
112
|
-
style: {
|
|
113
|
-
backgroundImage: backgroundImage ? `url(${backgroundImage})` : void 0,
|
|
114
|
-
backgroundSize: "cover",
|
|
115
|
-
backgroundPosition: "center",
|
|
116
|
-
aspectRatio
|
|
117
|
-
},
|
|
118
|
-
...props,
|
|
119
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
120
|
-
"div",
|
|
121
|
-
{
|
|
122
|
-
className: cn(
|
|
123
|
-
"relative h-full flex flex-col",
|
|
124
|
-
isLarge && "justify-center pl-8",
|
|
125
|
-
!isLarge && "justify-end pl-8 pb-8"
|
|
126
|
-
),
|
|
127
|
-
children: [
|
|
128
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
129
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
130
|
-
"h3",
|
|
131
|
-
{
|
|
132
|
-
className: cn(
|
|
133
|
-
"font-semibold mb-3",
|
|
134
|
-
isLarge && "text-3xl text-gray-900",
|
|
135
|
-
isMedium && "text-2xl text-white",
|
|
136
|
-
isProduct && "text-2xl text-gray-900"
|
|
137
|
-
),
|
|
138
|
-
children: title
|
|
139
|
-
}
|
|
140
|
-
),
|
|
141
|
-
subtitle && isProduct && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-600 mb-4", children: subtitle }),
|
|
142
|
-
description && /* @__PURE__ */ jsxRuntime.jsx(
|
|
143
|
-
"p",
|
|
144
|
-
{
|
|
145
|
-
className: cn(
|
|
146
|
-
"text-sm leading-relaxed",
|
|
147
|
-
isMedium && "text-white/90",
|
|
148
|
-
(isLarge || isProduct) && "text-gray-600"
|
|
149
|
-
),
|
|
150
|
-
children: description
|
|
151
|
-
}
|
|
152
|
-
)
|
|
153
|
-
] }),
|
|
154
|
-
buttons.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-3 mt-6", children: buttons.map((button, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
155
|
-
"button",
|
|
156
|
-
{
|
|
157
|
-
onClick: button.onClick,
|
|
158
|
-
className: cn(
|
|
159
|
-
"px-6 py-3 rounded-full font-medium text-sm transition-all duration-200",
|
|
160
|
-
button.variant === "primary" && "bg-gray-900 text-white hover:bg-gray-800",
|
|
161
|
-
button.variant === "secondary" && "bg-white text-gray-900 border border-gray-300 hover:bg-gray-50"
|
|
162
|
-
),
|
|
163
|
-
children: button.label
|
|
164
|
-
},
|
|
165
|
-
index
|
|
166
|
-
)) })
|
|
167
|
-
]
|
|
168
|
-
}
|
|
169
|
-
)
|
|
170
|
-
}
|
|
171
|
-
);
|
|
172
|
-
};
|
|
173
|
-
EventCard.displayName = "EventCard";
|
|
174
21
|
var Title = ({
|
|
175
22
|
title = "",
|
|
176
23
|
...props
|
|
@@ -178,275 +25,6 @@ var Title = ({
|
|
|
178
25
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full"), ...props, children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-[48px] font-semibold mb-12 text-[#080A0F]", children: title }) });
|
|
179
26
|
};
|
|
180
27
|
Title.displayName = "Title";
|
|
181
|
-
var defaultEvents = [
|
|
182
|
-
{
|
|
183
|
-
variant: "large",
|
|
184
|
-
title: "IFA 2025 Event Name Event Name",
|
|
185
|
-
description: "Corem ipsum dolor sit amet, consectetur adipiscing elit.",
|
|
186
|
-
backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
187
|
-
buttons: [
|
|
188
|
-
{
|
|
189
|
-
label: "Schedule Now",
|
|
190
|
-
variant: "primary"
|
|
191
|
-
}
|
|
192
|
-
],
|
|
193
|
-
aspectRatio: "1664 / 640"
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
variant: "medium",
|
|
197
|
-
title: "Local Event Name Local Event Name Local Event Name",
|
|
198
|
-
description: "Norem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis.",
|
|
199
|
-
backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
200
|
-
buttons: [
|
|
201
|
-
{
|
|
202
|
-
label: "Schedule Now",
|
|
203
|
-
variant: "primary"
|
|
204
|
-
}
|
|
205
|
-
],
|
|
206
|
-
aspectRatio: "824 / 640"
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
variant: "product",
|
|
210
|
-
title: "Anker Prime",
|
|
211
|
-
subtitle: "Anker Prime 240W GaN Desktop Charger (4 Ports) Feb. 5th - 16th",
|
|
212
|
-
backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
213
|
-
buttons: [
|
|
214
|
-
{
|
|
215
|
-
label: "Learn More",
|
|
216
|
-
variant: "secondary"
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
label: "Shop Now",
|
|
220
|
-
variant: "primary"
|
|
221
|
-
}
|
|
222
|
-
],
|
|
223
|
-
aspectRatio: "824 / 640"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
variant: "medium",
|
|
227
|
-
title: "Local Event Name Local Event Name Local Event Name",
|
|
228
|
-
description: "Norem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis.",
|
|
229
|
-
backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
230
|
-
buttons: [
|
|
231
|
-
{
|
|
232
|
-
label: "Schedule Now",
|
|
233
|
-
variant: "primary"
|
|
234
|
-
}
|
|
235
|
-
],
|
|
236
|
-
aspectRatio: "824 / 640"
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
variant: "product",
|
|
240
|
-
title: "Anker Prime",
|
|
241
|
-
subtitle: "Anker Prime 240W GaN Desktop Charger (4 Ports) Feb. 5th - 16th",
|
|
242
|
-
backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
243
|
-
buttons: [
|
|
244
|
-
{
|
|
245
|
-
label: "Learn More",
|
|
246
|
-
variant: "secondary"
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
label: "Shop Now",
|
|
250
|
-
variant: "primary"
|
|
251
|
-
}
|
|
252
|
-
],
|
|
253
|
-
aspectRatio: "824 / 640"
|
|
254
|
-
}
|
|
255
|
-
];
|
|
256
|
-
var UpcomingEvents = ({
|
|
257
|
-
title = "Upcoming Events",
|
|
258
|
-
events = defaultEvents,
|
|
259
|
-
showViewMore = true,
|
|
260
|
-
onViewMore,
|
|
261
|
-
className,
|
|
262
|
-
...props
|
|
263
|
-
}) => {
|
|
264
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full", className), ...props, children: [
|
|
265
|
-
/* @__PURE__ */ jsxRuntime.jsx(Title, { title }),
|
|
266
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-6 mb-[64px]", children: events.map((event, index) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(index === 0 ? "col-span-2" : ""), children: /* @__PURE__ */ jsxRuntime.jsx(EventCard, { ...event }) }, index)) }),
|
|
267
|
-
showViewMore && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
268
|
-
"button",
|
|
269
|
-
{
|
|
270
|
-
onClick: onViewMore,
|
|
271
|
-
className: "inline-flex items-center gap-2 text-gray-700 hover:text-gray-900 transition-colors duration-200",
|
|
272
|
-
children: [
|
|
273
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-bold", children: "View More" }),
|
|
274
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
275
|
-
"svg",
|
|
276
|
-
{
|
|
277
|
-
width: "16",
|
|
278
|
-
height: "16",
|
|
279
|
-
viewBox: "0 0 16 16",
|
|
280
|
-
fill: "none",
|
|
281
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
282
|
-
className: "transition-transform duration-200 group-hover:translate-y-0.5",
|
|
283
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
284
|
-
"path",
|
|
285
|
-
{
|
|
286
|
-
d: "M8 3L8 13M8 13L12 9M8 13L4 9",
|
|
287
|
-
stroke: "currentColor",
|
|
288
|
-
strokeWidth: "2",
|
|
289
|
-
strokeLinecap: "round",
|
|
290
|
-
strokeLinejoin: "round"
|
|
291
|
-
}
|
|
292
|
-
)
|
|
293
|
-
}
|
|
294
|
-
)
|
|
295
|
-
]
|
|
296
|
-
}
|
|
297
|
-
) })
|
|
298
|
-
] });
|
|
299
|
-
};
|
|
300
|
-
UpcomingEvents.displayName = "UpcomingEvents";
|
|
301
|
-
var defaultBannerData = {
|
|
302
|
-
title: "See it. Touch it. Make it Locally.",
|
|
303
|
-
subTitle: "Visit your local studio right around the corner.",
|
|
304
|
-
backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
305
|
-
backgroundImageMobile: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638"
|
|
306
|
-
};
|
|
307
|
-
var Banner = ({
|
|
308
|
-
data = defaultBannerData,
|
|
309
|
-
className,
|
|
310
|
-
style,
|
|
311
|
-
...props
|
|
312
|
-
}) => {
|
|
313
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
314
|
-
"div",
|
|
315
|
-
{
|
|
316
|
-
className: cn("relative"),
|
|
317
|
-
style: { aspectRatio: "1920/480", ...style },
|
|
318
|
-
...props,
|
|
319
|
-
children: [
|
|
320
|
-
data?.backgroundImage && /* @__PURE__ */ jsxRuntime.jsx(
|
|
321
|
-
"img",
|
|
322
|
-
{
|
|
323
|
-
src: data.backgroundImage,
|
|
324
|
-
alt: "",
|
|
325
|
-
className: "inset-0 h-full w-full object-cover"
|
|
326
|
-
}
|
|
327
|
-
),
|
|
328
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
329
|
-
"div",
|
|
330
|
-
{
|
|
331
|
-
className: cn(
|
|
332
|
-
"absolute flex flex-col gap-4 justify-center m-auto top-0 bottom-0 left-0 right-0 z-10",
|
|
333
|
-
className
|
|
334
|
-
),
|
|
335
|
-
children: [
|
|
336
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
337
|
-
headlessUi.Text,
|
|
338
|
-
{
|
|
339
|
-
className: "text-[48px] font-bold text-white leading-[1]",
|
|
340
|
-
html: data?.title
|
|
341
|
-
}
|
|
342
|
-
),
|
|
343
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
344
|
-
headlessUi.Text,
|
|
345
|
-
{
|
|
346
|
-
className: "text-[18px] font-bold text-white leading-[1.4]",
|
|
347
|
-
html: data?.subTitle
|
|
348
|
-
}
|
|
349
|
-
)
|
|
350
|
-
]
|
|
351
|
-
}
|
|
352
|
-
)
|
|
353
|
-
]
|
|
354
|
-
}
|
|
355
|
-
);
|
|
356
|
-
};
|
|
357
|
-
Banner.displayName = "Banner";
|
|
358
|
-
var BreadCrumbs = ({
|
|
359
|
-
items,
|
|
360
|
-
className,
|
|
361
|
-
...props
|
|
362
|
-
}) => {
|
|
363
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center py-6 gap-1 text-[18px]", className), ...props, children: items?.map((item, i) => {
|
|
364
|
-
const isLast = i === items?.length - 1;
|
|
365
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
366
|
-
headlessUi.Link,
|
|
367
|
-
{
|
|
368
|
-
className: cn(
|
|
369
|
-
"flex items-center gap-1 text-[#6D6D6F] no-underline",
|
|
370
|
-
isLast && "text-[#080A0F]",
|
|
371
|
-
item?.link ? "cursor-pointer" : "cursor-default hover:text-[#080A0F]"
|
|
372
|
-
),
|
|
373
|
-
href: item?.link,
|
|
374
|
-
children: [
|
|
375
|
-
item?.label,
|
|
376
|
-
!isLast && /* @__PURE__ */ jsxRuntime.jsx("span", { children: "/" })
|
|
377
|
-
]
|
|
378
|
-
},
|
|
379
|
-
i
|
|
380
|
-
);
|
|
381
|
-
}) });
|
|
382
|
-
};
|
|
383
|
-
BreadCrumbs.displayName = "BreadCrumbs";
|
|
384
|
-
var defaultSteps = [
|
|
385
|
-
{
|
|
386
|
-
stepNumber: 1,
|
|
387
|
-
title: 'Find a demo room you would like to visit, and click "Schedule Now"',
|
|
388
|
-
description: 'Find a demo room you would like to visit, and click "Schedule Now"',
|
|
389
|
-
mapImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638"
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
stepNumber: 2,
|
|
393
|
-
title: "Fill out the form and confirm your time of visit",
|
|
394
|
-
description: "Fill out the form and confirm your time of visit",
|
|
395
|
-
mapImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638"
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
stepNumber: 3,
|
|
399
|
-
title: "Once you arrive at the demo room, scan the QR code to check in",
|
|
400
|
-
description: "Once you arrive at the demo room, scan the QR code to check in",
|
|
401
|
-
mapImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638"
|
|
402
|
-
},
|
|
403
|
-
{
|
|
404
|
-
stepNumber: 4,
|
|
405
|
-
title: "Have fun!",
|
|
406
|
-
description: "Have fun!",
|
|
407
|
-
mapImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638"
|
|
408
|
-
}
|
|
409
|
-
];
|
|
410
|
-
var EasySteps = ({
|
|
411
|
-
title = "Schedule in 4 Easy Steps",
|
|
412
|
-
steps = defaultSteps,
|
|
413
|
-
className,
|
|
414
|
-
...props
|
|
415
|
-
}) => {
|
|
416
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full", className), ...props, children: [
|
|
417
|
-
/* @__PURE__ */ jsxRuntime.jsx(Title, { title }),
|
|
418
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 md:grid-cols-2 gap-6", children: steps.map((step) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
419
|
-
"div",
|
|
420
|
-
{
|
|
421
|
-
className: cn(
|
|
422
|
-
"bg-white rounded-2xl overflow-hidden",
|
|
423
|
-
"border border-gray-200",
|
|
424
|
-
"hover:shadow-lg transition-shadow duration-200"
|
|
425
|
-
),
|
|
426
|
-
children: [
|
|
427
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-6 pb-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3 mb-3", children: [
|
|
428
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-semibold text-gray-900", children: [
|
|
429
|
-
"Step ",
|
|
430
|
-
step.stepNumber,
|
|
431
|
-
":"
|
|
432
|
-
] }),
|
|
433
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-900 font-medium flex-1", children: step.title })
|
|
434
|
-
] }) }),
|
|
435
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full aspect-[356/220] bg-gray-100", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
436
|
-
"img",
|
|
437
|
-
{
|
|
438
|
-
src: step.mapImage,
|
|
439
|
-
alt: `Step ${step.stepNumber} - ${step.title}`,
|
|
440
|
-
className: "w-full h-full object-cover"
|
|
441
|
-
}
|
|
442
|
-
) })
|
|
443
|
-
]
|
|
444
|
-
},
|
|
445
|
-
step.stepNumber
|
|
446
|
-
)) })
|
|
447
|
-
] });
|
|
448
|
-
};
|
|
449
|
-
EasySteps.displayName = "EasySteps";
|
|
450
28
|
var StudioCard = ({
|
|
451
29
|
code,
|
|
452
30
|
name,
|
|
@@ -457,25 +35,48 @@ var StudioCard = ({
|
|
|
457
35
|
zipCode,
|
|
458
36
|
country = "United States",
|
|
459
37
|
euifyMakeModel,
|
|
38
|
+
distance,
|
|
460
39
|
onSchedule,
|
|
461
40
|
className,
|
|
41
|
+
style,
|
|
462
42
|
...props
|
|
463
43
|
}) => {
|
|
464
44
|
const fullAddress = `${address}, ${city}, ${state} ${country} ${zipCode}`;
|
|
45
|
+
const [isHovered, setIsHovered] = React2__default.default.useState(false);
|
|
465
46
|
const handleScheduleClick = () => {
|
|
466
47
|
onSchedule?.(code);
|
|
467
48
|
};
|
|
49
|
+
const formatDistance = (dist) => {
|
|
50
|
+
if (dist < 1) {
|
|
51
|
+
return `${Math.round(dist * 1e3)} m`;
|
|
52
|
+
}
|
|
53
|
+
return `${dist.toFixed(1)} km`;
|
|
54
|
+
};
|
|
468
55
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
469
56
|
"div",
|
|
470
57
|
{
|
|
471
|
-
className: cn(
|
|
472
|
-
"p-6",
|
|
473
|
-
"hover:shadow-lg transition-shadow duration-200",
|
|
474
|
-
className
|
|
475
|
-
),
|
|
476
58
|
...props,
|
|
59
|
+
className: cn("p-6 cursor-pointer transition-colors duration-200", className),
|
|
60
|
+
style: {
|
|
61
|
+
backgroundColor: isHovered ? "#f3f4f6" : "transparent",
|
|
62
|
+
...style
|
|
63
|
+
},
|
|
64
|
+
onMouseEnter: (e) => {
|
|
65
|
+
setIsHovered(true);
|
|
66
|
+
props.onMouseEnter?.(e);
|
|
67
|
+
},
|
|
68
|
+
onMouseLeave: (e) => {
|
|
69
|
+
setIsHovered(false);
|
|
70
|
+
props.onMouseLeave?.(e);
|
|
71
|
+
},
|
|
477
72
|
children: [
|
|
478
|
-
/* @__PURE__ */ jsxRuntime.
|
|
73
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between mb-4", children: [
|
|
74
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl font-semibold text-gray-900", children: name }),
|
|
75
|
+
distance !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-medium text-[#2E8B57] bg-[#E8F5E9] px-3 py-1 rounded-full whitespace-nowrap ml-2", children: [
|
|
76
|
+
formatDistance(distance),
|
|
77
|
+
" away"
|
|
78
|
+
] })
|
|
79
|
+
] }),
|
|
479
80
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3 mb-3", children: [
|
|
480
81
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
481
82
|
"svg",
|
|
@@ -621,7 +222,7 @@ var StudioCard = ({
|
|
|
621
222
|
"w-full px-6 py-3 rounded-full",
|
|
622
223
|
"bg-white text-gray-900 border border-gray-900",
|
|
623
224
|
"font-medium text-sm",
|
|
624
|
-
"hover:bg-gray-900
|
|
225
|
+
"hover:bg-gray-900",
|
|
625
226
|
"transition-all duration-200"
|
|
626
227
|
),
|
|
627
228
|
children: "Schedule Now"
|
|
@@ -650,6 +251,7 @@ var defaultLocations = [
|
|
|
650
251
|
var StudioMap = ({
|
|
651
252
|
googleMapsApiKey,
|
|
652
253
|
locations = defaultLocations,
|
|
254
|
+
hoveredLocationId,
|
|
653
255
|
defaultCenter = { lat: 39.8283, lng: -98.5795 },
|
|
654
256
|
// US center
|
|
655
257
|
defaultZoom = 4,
|
|
@@ -798,7 +400,7 @@ var StudioMap = ({
|
|
|
798
400
|
if (btn) {
|
|
799
401
|
btn.addEventListener("click", () => {
|
|
800
402
|
if (onSchedule) {
|
|
801
|
-
onSchedule(location);
|
|
403
|
+
onSchedule(location.id);
|
|
802
404
|
}
|
|
803
405
|
});
|
|
804
406
|
}
|
|
@@ -818,7 +420,83 @@ var StudioMap = ({
|
|
|
818
420
|
});
|
|
819
421
|
googleMapRef.current.fitBounds(bounds);
|
|
820
422
|
}
|
|
821
|
-
}, [isLoaded, locations, onSchedule]);
|
|
423
|
+
}, [isLoaded, locations, onSchedule]);
|
|
424
|
+
React2__default.default.useEffect(() => {
|
|
425
|
+
if (!isLoaded || !googleMapRef.current || !hoveredLocationId) {
|
|
426
|
+
if (!hoveredLocationId && infoWindowRef.current) {
|
|
427
|
+
infoWindowRef.current.close();
|
|
428
|
+
}
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
const location = locations.find((loc) => loc.id === hoveredLocationId);
|
|
432
|
+
const markerIndex = locations.findIndex(
|
|
433
|
+
(loc) => loc.id === hoveredLocationId
|
|
434
|
+
);
|
|
435
|
+
const marker = markersRef.current[markerIndex];
|
|
436
|
+
if (location && marker) {
|
|
437
|
+
const content = `
|
|
438
|
+
<div style="padding: 16px; max-width: 300px; font-family: system-ui, sans-serif;">
|
|
439
|
+
<h3 style="margin: 0 0 12px 0; font-size: 18px; font-weight: 600;">${location.name}</h3>
|
|
440
|
+
${location.availableTime ? `<div style="margin-bottom: 8px; color: #666;">
|
|
441
|
+
<svg style="display: inline-block; width: 16px; height: 16px; margin-right: 4px; vertical-align: middle;" fill="currentColor" viewBox="0 0 20 20">
|
|
442
|
+
<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"/>
|
|
443
|
+
</svg>
|
|
444
|
+
<span style="vertical-align: middle;">Available ${location.availableTime}</span>
|
|
445
|
+
</div>` : ""}
|
|
446
|
+
<div style="margin-bottom: 8px; color: #666;">
|
|
447
|
+
<svg style="display: inline-block; width: 16px; height: 16px; margin-right: 4px; vertical-align: middle;" fill="currentColor" viewBox="0 0 20 20">
|
|
448
|
+
<path fill-rule="evenodd" d="M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z" clip-rule="evenodd"/>
|
|
449
|
+
</svg>
|
|
450
|
+
<span style="vertical-align: middle;">${location.address}, ${location.city}, ${location.state} ${location.country} ${location.zipCode}</span>
|
|
451
|
+
</div>
|
|
452
|
+
${location.euifyMakeModel ? `<div style="margin-bottom: 12px; color: #666;">
|
|
453
|
+
<svg style="display: inline-block; width: 16px; height: 16px; margin-right: 4px; vertical-align: middle;" fill="currentColor" viewBox="0 0 20 20">
|
|
454
|
+
<path d="M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zM3 10a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1v-6zM14 9a1 1 0 00-1 1v6a1 1 0 001 1h2a1 1 0 001-1v-6a1 1 0 00-1-1h-2z"/>
|
|
455
|
+
</svg>
|
|
456
|
+
<span style="vertical-align: middle;">${location.euifyMakeModel}</span>
|
|
457
|
+
</div>` : ""}
|
|
458
|
+
<button
|
|
459
|
+
id="schedule-btn-hover-${location.id}"
|
|
460
|
+
style="
|
|
461
|
+
width: 100%;
|
|
462
|
+
padding: 10px 16px;
|
|
463
|
+
background: #000;
|
|
464
|
+
color: #fff;
|
|
465
|
+
border: none;
|
|
466
|
+
border-radius: 6px;
|
|
467
|
+
font-weight: 500;
|
|
468
|
+
cursor: pointer;
|
|
469
|
+
font-size: 14px;
|
|
470
|
+
"
|
|
471
|
+
onmouseover="this.style.background='#333'"
|
|
472
|
+
onmouseout="this.style.background='#000'"
|
|
473
|
+
>
|
|
474
|
+
Schedule Now
|
|
475
|
+
</button>
|
|
476
|
+
</div>
|
|
477
|
+
`;
|
|
478
|
+
if (infoWindowRef.current) {
|
|
479
|
+
infoWindowRef.current.setContent(content);
|
|
480
|
+
infoWindowRef.current.open(googleMapRef.current, marker);
|
|
481
|
+
google.maps.event.addListenerOnce(
|
|
482
|
+
infoWindowRef.current,
|
|
483
|
+
"domready",
|
|
484
|
+
() => {
|
|
485
|
+
const btn = document.getElementById(
|
|
486
|
+
`schedule-btn-hover-${location.id}`
|
|
487
|
+
);
|
|
488
|
+
if (btn) {
|
|
489
|
+
btn.addEventListener("click", () => {
|
|
490
|
+
if (onSchedule) {
|
|
491
|
+
onSchedule(location.id);
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}, [hoveredLocationId, isLoaded, locations, onSchedule]);
|
|
822
500
|
if (!googleMapsApiKey) {
|
|
823
501
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
824
502
|
"div",
|
|
@@ -938,20 +616,58 @@ var AntdMobileIsolated = ({
|
|
|
938
616
|
AntdMobileIsolated.displayName = "AntdMobileIsolated";
|
|
939
617
|
|
|
940
618
|
// src/components/DemoRoom/utils/addressParser.ts
|
|
619
|
+
var KNOWN_COUNTRIES = [
|
|
620
|
+
"United States",
|
|
621
|
+
"United Kingdom",
|
|
622
|
+
"American Samoa",
|
|
623
|
+
"United Arab Emirates",
|
|
624
|
+
"Bosnia and Herzegovina",
|
|
625
|
+
"Trinidad and Tobago",
|
|
626
|
+
"Saint Kitts and Nevis",
|
|
627
|
+
"Antigua and Barbuda",
|
|
628
|
+
"Saint Vincent and the Grenadines",
|
|
629
|
+
"S\xE3o Tom\xE9 and Pr\xEDncipe",
|
|
630
|
+
"United States Minor Outlying Islands",
|
|
631
|
+
"British Virgin Islands",
|
|
632
|
+
"United States Virgin Islands",
|
|
633
|
+
"Cayman Islands",
|
|
634
|
+
"Cook Islands",
|
|
635
|
+
"Falkland Islands",
|
|
636
|
+
"Faroe Islands",
|
|
637
|
+
"Marshall Islands",
|
|
638
|
+
"Northern Mariana Islands",
|
|
639
|
+
"Pitcairn Islands",
|
|
640
|
+
"Solomon Islands",
|
|
641
|
+
"Turks and Caicos Islands",
|
|
642
|
+
"Wallis and Futuna"
|
|
643
|
+
];
|
|
941
644
|
function parseAddress(address) {
|
|
942
|
-
const parts = address.split(",").map((part) => part.trim());
|
|
645
|
+
const parts = address.split(",").map((part) => part.trim()).filter(Boolean);
|
|
943
646
|
let country = "United States";
|
|
944
647
|
let state = "";
|
|
945
648
|
let city = "";
|
|
946
|
-
if (parts.length
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
649
|
+
if (parts.length === 0) {
|
|
650
|
+
return { country, state, city };
|
|
651
|
+
}
|
|
652
|
+
const lastPart = parts[parts.length - 1];
|
|
653
|
+
const matchedCountry = KNOWN_COUNTRIES.find(
|
|
654
|
+
(knownCountry) => lastPart.toLowerCase() === knownCountry.toLowerCase()
|
|
655
|
+
);
|
|
656
|
+
if (matchedCountry) {
|
|
657
|
+
country = matchedCountry;
|
|
658
|
+
if (parts.length >= 2) {
|
|
659
|
+
state = parts[parts.length - 2].split(" ")[0];
|
|
660
|
+
}
|
|
661
|
+
if (parts.length >= 3) {
|
|
662
|
+
city = parts[parts.length - 3];
|
|
663
|
+
}
|
|
664
|
+
} else {
|
|
665
|
+
if (parts.length >= 2) {
|
|
666
|
+
state = parts[parts.length - 1].split(" ")[0];
|
|
667
|
+
city = parts[parts.length - 2];
|
|
668
|
+
} else if (parts.length === 1) {
|
|
669
|
+
city = parts[0];
|
|
670
|
+
}
|
|
955
671
|
}
|
|
956
672
|
return {
|
|
957
673
|
country: country.trim(),
|
|
@@ -1039,9 +755,7 @@ var LocationFilter = ({
|
|
|
1039
755
|
items = locationData.countries;
|
|
1040
756
|
break;
|
|
1041
757
|
case "state":
|
|
1042
|
-
items = selectedCountry ? locationData.states.filter(
|
|
1043
|
-
(s) => s.parentCode === selectedCountry
|
|
1044
|
-
) : [];
|
|
758
|
+
items = selectedCountry ? locationData.states.filter((s) => s.parentCode === selectedCountry) : [];
|
|
1045
759
|
break;
|
|
1046
760
|
case "city":
|
|
1047
761
|
items = selectedState ? locationData.cities.filter((c) => c.parentCode === selectedState) : [];
|
|
@@ -1058,6 +772,7 @@ var LocationFilter = ({
|
|
|
1058
772
|
() => groupByAlphabet(filteredItems),
|
|
1059
773
|
[filteredItems]
|
|
1060
774
|
);
|
|
775
|
+
const showIndexBar = filteredItems.length >= 10;
|
|
1061
776
|
const handleItemClick = (item) => {
|
|
1062
777
|
if (currentLevel === "country") {
|
|
1063
778
|
setSelectedCountry(item.code);
|
|
@@ -1101,42 +816,30 @@ var LocationFilter = ({
|
|
|
1101
816
|
style: { background: "#F8F8F8" },
|
|
1102
817
|
className: "rounded-[12px] rounded-b-none h-[72px] font-bold text-[14px] flex flex-col",
|
|
1103
818
|
children: [
|
|
1104
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1129
|
-
"path",
|
|
1130
|
-
{
|
|
1131
|
-
d: "M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",
|
|
1132
|
-
fill: "#1D1D1F"
|
|
1133
|
-
}
|
|
1134
|
-
)
|
|
1135
|
-
}
|
|
1136
|
-
)
|
|
1137
|
-
}
|
|
1138
|
-
)
|
|
1139
|
-
] }),
|
|
819
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-end px-[20px] pt-[12px] pb-[8px]", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
820
|
+
"button",
|
|
821
|
+
{
|
|
822
|
+
onClick: onClose,
|
|
823
|
+
className: "ml-[12px] w-[24px] h-[24px] flex items-center justify-end",
|
|
824
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
825
|
+
"svg",
|
|
826
|
+
{
|
|
827
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
828
|
+
width: "24",
|
|
829
|
+
height: "24",
|
|
830
|
+
viewBox: "0 0 24 24",
|
|
831
|
+
fill: "none",
|
|
832
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
833
|
+
"path",
|
|
834
|
+
{
|
|
835
|
+
d: "M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",
|
|
836
|
+
fill: "#1D1D1F"
|
|
837
|
+
}
|
|
838
|
+
)
|
|
839
|
+
}
|
|
840
|
+
)
|
|
841
|
+
}
|
|
842
|
+
) }),
|
|
1140
843
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center px-[20px] gap-[16px] pb-[8px]", children: [
|
|
1141
844
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1142
845
|
"button",
|
|
@@ -1179,38 +882,26 @@ var LocationFilter = ({
|
|
|
1179
882
|
]
|
|
1180
883
|
}
|
|
1181
884
|
),
|
|
1182
|
-
/* @__PURE__ */ jsxRuntime.jsx(AntdMobileIsolated, { style: { height: "calc(100% - 72px)" }, children: /* @__PURE__ */ jsxRuntime.jsx(IndexBar__default.default, { style: { height: "100%" }, children: groupedItems.map((group) => {
|
|
885
|
+
/* @__PURE__ */ jsxRuntime.jsx(AntdMobileIsolated, { style: { height: "calc(100% - 72px)" }, children: showIndexBar ? /* @__PURE__ */ jsxRuntime.jsx(IndexBar__default.default, { style: { height: "100%" }, children: groupedItems.map((group) => {
|
|
1183
886
|
const { title, items } = group;
|
|
1184
887
|
return /* @__PURE__ */ jsxRuntime.jsx(IndexBar__default.default.Panel, { index: title, title, children: /* @__PURE__ */ jsxRuntime.jsx(List__default.default, { children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1185
888
|
List__default.default.Item,
|
|
1186
889
|
{
|
|
1187
|
-
clickable: true,
|
|
1188
890
|
onClick: () => handleItemClick(item),
|
|
1189
|
-
|
|
1190
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[#767880] text-[14px]", children: item.count }),
|
|
1191
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1192
|
-
"svg",
|
|
1193
|
-
{
|
|
1194
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1195
|
-
width: "16",
|
|
1196
|
-
height: "16",
|
|
1197
|
-
viewBox: "0 0 16 16",
|
|
1198
|
-
fill: "none",
|
|
1199
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1200
|
-
"path",
|
|
1201
|
-
{
|
|
1202
|
-
d: "M6.4 12L5.6 11.2L9.06667 7.73333L5.6 4.26667L6.4 3.46667L10.6667 7.73333L6.4 12Z",
|
|
1203
|
-
fill: "#767880"
|
|
1204
|
-
}
|
|
1205
|
-
)
|
|
1206
|
-
}
|
|
1207
|
-
)
|
|
1208
|
-
] }),
|
|
891
|
+
style: { cursor: "pointer" },
|
|
1209
892
|
children: item.name
|
|
1210
893
|
},
|
|
1211
894
|
item.code
|
|
1212
895
|
)) }) }, title);
|
|
1213
|
-
}) }) })
|
|
896
|
+
}) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: "100%", overflow: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsx(List__default.default, { children: filteredItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
897
|
+
List__default.default.Item,
|
|
898
|
+
{
|
|
899
|
+
onClick: () => handleItemClick(item),
|
|
900
|
+
style: { cursor: "pointer" },
|
|
901
|
+
children: item.name
|
|
902
|
+
},
|
|
903
|
+
item.code
|
|
904
|
+
)) }) }) })
|
|
1214
905
|
]
|
|
1215
906
|
}
|
|
1216
907
|
);
|
|
@@ -1333,6 +1024,7 @@ var RoomsList = ({
|
|
|
1333
1024
|
}) => {
|
|
1334
1025
|
const [showLocationFilter, setShowLocationFilter] = React2.useState(false);
|
|
1335
1026
|
const [selectedLocation, setSelectedLocation] = React2.useState();
|
|
1027
|
+
const [hoveredRoomId, setHoveredRoomId] = React2.useState(null);
|
|
1336
1028
|
const {
|
|
1337
1029
|
data: demoRooms,
|
|
1338
1030
|
loading,
|
|
@@ -1345,25 +1037,9 @@ var RoomsList = ({
|
|
|
1345
1037
|
const studioLocations = React2.useMemo(() => {
|
|
1346
1038
|
if (!demoRooms) return defaultStudioLocations;
|
|
1347
1039
|
return demoRooms.map((room) => {
|
|
1348
|
-
const
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
start_time: "2026-01-13T09:00:00-05:00",
|
|
1352
|
-
end_time: "2026-01-13T10:00:00-05:00",
|
|
1353
|
-
capacity: 5,
|
|
1354
|
-
booked_count: 2,
|
|
1355
|
-
status: "available"
|
|
1356
|
-
},
|
|
1357
|
-
{
|
|
1358
|
-
id: 131,
|
|
1359
|
-
start_time: "2026-01-13T14:00:00-05:00",
|
|
1360
|
-
end_time: "2026-01-13T15:00:00-05:00",
|
|
1361
|
-
capacity: 5,
|
|
1362
|
-
booked_count: 5,
|
|
1363
|
-
status: "full"
|
|
1364
|
-
}
|
|
1365
|
-
];
|
|
1366
|
-
const nextAvailableTimeslot = (room.timeslots?.length ? room.timeslots : timeslots)?.find((slot) => slot.status === "available");
|
|
1040
|
+
const nextAvailableTimeslot = room?.timeslots?.find(
|
|
1041
|
+
(slot) => slot.status === "available"
|
|
1042
|
+
);
|
|
1367
1043
|
const { country, state, city } = parseAddress(room.address);
|
|
1368
1044
|
return {
|
|
1369
1045
|
id: room.code,
|
|
@@ -1414,18 +1090,18 @@ var RoomsList = ({
|
|
|
1414
1090
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, ...props, children: [
|
|
1415
1091
|
/* @__PURE__ */ jsxRuntime.jsx(Title, { title: "Find a Studio Near You" }),
|
|
1416
1092
|
loading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-[794px]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-lg font-medium", children: "Loading demo rooms..." }) }) }),
|
|
1417
|
-
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-[794px]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center
|
|
1093
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-[794px]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", style: { color: "#FF4D4D" }, children: [
|
|
1418
1094
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-lg font-medium", children: "Failed to load demo rooms" }),
|
|
1419
1095
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm mt-2", children: error.message })
|
|
1420
1096
|
] }) }),
|
|
1421
|
-
!loading && !error && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-[794px]
|
|
1097
|
+
!loading && !error && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-[794px] gap-4", children: [
|
|
1422
1098
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1423
1099
|
"div",
|
|
1424
1100
|
{
|
|
1425
1101
|
className: "flex-none relative w-[420px]",
|
|
1426
1102
|
style: { height: "794px" },
|
|
1427
1103
|
children: [
|
|
1428
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1104
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-[12px] mb-4 bg-white border border-[#E4E5E6] px-[20px] py-[16px]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-[40px] font-bold text-[16px] gap-10 flex items-center", children: [
|
|
1429
1105
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1430
1106
|
"button",
|
|
1431
1107
|
{
|
|
@@ -1481,7 +1157,7 @@ var RoomsList = ({
|
|
|
1481
1157
|
}
|
|
1482
1158
|
)
|
|
1483
1159
|
] })
|
|
1484
|
-
] }),
|
|
1160
|
+
] }) }),
|
|
1485
1161
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1486
1162
|
"div",
|
|
1487
1163
|
{
|
|
@@ -1499,7 +1175,9 @@ var RoomsList = ({
|
|
|
1499
1175
|
state: item?.state,
|
|
1500
1176
|
zipCode: item?.zipCode,
|
|
1501
1177
|
euifyMakeModel: item?.euifyMakeModel || "",
|
|
1502
|
-
onSchedule
|
|
1178
|
+
onSchedule,
|
|
1179
|
+
onMouseEnter: () => setHoveredRoomId(item.id),
|
|
1180
|
+
onMouseLeave: () => setHoveredRoomId(null)
|
|
1503
1181
|
},
|
|
1504
1182
|
item.id
|
|
1505
1183
|
);
|
|
@@ -1526,9 +1204,8 @@ var RoomsList = ({
|
|
|
1526
1204
|
{
|
|
1527
1205
|
googleMapsApiKey,
|
|
1528
1206
|
locations: filteredStudioLocations,
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
},
|
|
1207
|
+
hoveredLocationId: hoveredRoomId,
|
|
1208
|
+
onSchedule,
|
|
1532
1209
|
mapHeight: "794px"
|
|
1533
1210
|
}
|
|
1534
1211
|
) })
|
|
@@ -1705,7 +1382,7 @@ function createDemoRoomApi(config) {
|
|
|
1705
1382
|
}
|
|
1706
1383
|
var DemoRoom = ({
|
|
1707
1384
|
className,
|
|
1708
|
-
layoutClassName
|
|
1385
|
+
layoutClassName,
|
|
1709
1386
|
googleMapsApiKey,
|
|
1710
1387
|
apiConfig,
|
|
1711
1388
|
teamCode,
|
|
@@ -1717,37 +1394,222 @@ var DemoRoom = ({
|
|
|
1717
1394
|
() => createDemoRoomApi(apiConfig),
|
|
1718
1395
|
[apiConfig]
|
|
1719
1396
|
);
|
|
1720
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1397
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1398
|
+
RoomsList,
|
|
1399
|
+
{
|
|
1400
|
+
className: layoutClassName,
|
|
1401
|
+
googleMapsApiKey,
|
|
1402
|
+
apiClient,
|
|
1403
|
+
teamCode,
|
|
1404
|
+
brandWebsite,
|
|
1405
|
+
onSchedule
|
|
1406
|
+
}
|
|
1407
|
+
) });
|
|
1408
|
+
};
|
|
1409
|
+
DemoRoom.displayName = "DemoRoom";
|
|
1410
|
+
var EventCard = ({
|
|
1411
|
+
title,
|
|
1412
|
+
description,
|
|
1413
|
+
backgroundImage,
|
|
1414
|
+
aspectRatio,
|
|
1415
|
+
variant = "medium",
|
|
1416
|
+
buttons = [],
|
|
1417
|
+
subtitle,
|
|
1418
|
+
className,
|
|
1419
|
+
...props
|
|
1420
|
+
}) => {
|
|
1421
|
+
const isLarge = variant === "large";
|
|
1422
|
+
const isMedium = variant === "medium";
|
|
1423
|
+
const isProduct = variant === "product";
|
|
1424
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1425
|
+
"div",
|
|
1426
|
+
{
|
|
1427
|
+
className: cn("rounded-3xl overflow-hidden relative", className),
|
|
1428
|
+
style: {
|
|
1429
|
+
backgroundImage: backgroundImage ? `url(${backgroundImage})` : void 0,
|
|
1430
|
+
backgroundSize: "cover",
|
|
1431
|
+
backgroundPosition: "center",
|
|
1432
|
+
aspectRatio
|
|
1433
|
+
},
|
|
1434
|
+
...props,
|
|
1435
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1436
|
+
"div",
|
|
1437
|
+
{
|
|
1438
|
+
className: cn(
|
|
1439
|
+
"relative h-full flex flex-col",
|
|
1440
|
+
isLarge && "justify-center pl-8",
|
|
1441
|
+
!isLarge && "justify-end pl-8 pb-8"
|
|
1442
|
+
),
|
|
1443
|
+
children: [
|
|
1444
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1445
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1446
|
+
"h3",
|
|
1447
|
+
{
|
|
1448
|
+
className: cn(
|
|
1449
|
+
"font-semibold mb-3",
|
|
1450
|
+
isLarge && "text-3xl text-gray-900",
|
|
1451
|
+
isMedium && "text-2xl text-white",
|
|
1452
|
+
isProduct && "text-2xl text-gray-900"
|
|
1453
|
+
),
|
|
1454
|
+
children: title
|
|
1455
|
+
}
|
|
1456
|
+
),
|
|
1457
|
+
subtitle && isProduct && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-600 mb-4", children: subtitle }),
|
|
1458
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1459
|
+
"p",
|
|
1460
|
+
{
|
|
1461
|
+
className: cn(
|
|
1462
|
+
"text-sm leading-relaxed",
|
|
1463
|
+
isMedium && "text-white/90",
|
|
1464
|
+
(isLarge || isProduct) && "text-gray-600"
|
|
1465
|
+
),
|
|
1466
|
+
children: description
|
|
1467
|
+
}
|
|
1468
|
+
)
|
|
1469
|
+
] }),
|
|
1470
|
+
buttons.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-3 mt-6", children: buttons.map((button, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1471
|
+
"button",
|
|
1472
|
+
{
|
|
1473
|
+
onClick: button.onClick,
|
|
1474
|
+
className: cn(
|
|
1475
|
+
"px-6 py-3 rounded-full font-medium text-sm transition-all duration-200",
|
|
1476
|
+
button.variant === "primary" && "bg-gray-900 text-white hover:bg-gray-800",
|
|
1477
|
+
button.variant === "secondary" && "bg-white text-gray-900 border border-gray-300 hover:bg-gray-50"
|
|
1478
|
+
),
|
|
1479
|
+
children: button.label
|
|
1480
|
+
},
|
|
1481
|
+
index
|
|
1482
|
+
)) })
|
|
1483
|
+
]
|
|
1484
|
+
}
|
|
1485
|
+
)
|
|
1486
|
+
}
|
|
1487
|
+
);
|
|
1488
|
+
};
|
|
1489
|
+
EventCard.displayName = "EventCard";
|
|
1490
|
+
var defaultEvents = [
|
|
1491
|
+
{
|
|
1492
|
+
variant: "large",
|
|
1493
|
+
title: "IFA 2025 Event Name Event Name",
|
|
1494
|
+
description: "Corem ipsum dolor sit amet, consectetur adipiscing elit.",
|
|
1495
|
+
backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
1496
|
+
buttons: [
|
|
1497
|
+
{
|
|
1498
|
+
label: "Schedule Now",
|
|
1499
|
+
variant: "primary"
|
|
1500
|
+
}
|
|
1501
|
+
],
|
|
1502
|
+
aspectRatio: "1664 / 640"
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
variant: "medium",
|
|
1506
|
+
title: "Local Event Name Local Event Name Local Event Name",
|
|
1507
|
+
description: "Norem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis.",
|
|
1508
|
+
backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
1509
|
+
buttons: [
|
|
1510
|
+
{
|
|
1511
|
+
label: "Schedule Now",
|
|
1512
|
+
variant: "primary"
|
|
1513
|
+
}
|
|
1514
|
+
],
|
|
1515
|
+
aspectRatio: "824 / 640"
|
|
1516
|
+
},
|
|
1517
|
+
{
|
|
1518
|
+
variant: "product",
|
|
1519
|
+
title: "Anker Prime",
|
|
1520
|
+
subtitle: "Anker Prime 240W GaN Desktop Charger (4 Ports) Feb. 5th - 16th",
|
|
1521
|
+
backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
1522
|
+
buttons: [
|
|
1523
|
+
{
|
|
1524
|
+
label: "Learn More",
|
|
1525
|
+
variant: "secondary"
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
label: "Shop Now",
|
|
1529
|
+
variant: "primary"
|
|
1530
|
+
}
|
|
1531
|
+
],
|
|
1532
|
+
aspectRatio: "824 / 640"
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
variant: "medium",
|
|
1536
|
+
title: "Local Event Name Local Event Name Local Event Name",
|
|
1537
|
+
description: "Norem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis.",
|
|
1538
|
+
backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
1539
|
+
buttons: [
|
|
1540
|
+
{
|
|
1541
|
+
label: "Schedule Now",
|
|
1542
|
+
variant: "primary"
|
|
1543
|
+
}
|
|
1544
|
+
],
|
|
1545
|
+
aspectRatio: "824 / 640"
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
variant: "product",
|
|
1549
|
+
title: "Anker Prime",
|
|
1550
|
+
subtitle: "Anker Prime 240W GaN Desktop Charger (4 Ports) Feb. 5th - 16th",
|
|
1551
|
+
backgroundImage: "https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
1552
|
+
buttons: [
|
|
1553
|
+
{
|
|
1554
|
+
label: "Learn More",
|
|
1555
|
+
variant: "secondary"
|
|
1556
|
+
},
|
|
1724
1557
|
{
|
|
1725
|
-
|
|
1726
|
-
|
|
1558
|
+
label: "Shop Now",
|
|
1559
|
+
variant: "primary"
|
|
1727
1560
|
}
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1561
|
+
],
|
|
1562
|
+
aspectRatio: "824 / 640"
|
|
1563
|
+
}
|
|
1564
|
+
];
|
|
1565
|
+
var UpcomingEvents = ({
|
|
1566
|
+
title = "Upcoming Events",
|
|
1567
|
+
events = defaultEvents,
|
|
1568
|
+
showViewMore = true,
|
|
1569
|
+
onViewMore,
|
|
1570
|
+
className,
|
|
1571
|
+
...props
|
|
1572
|
+
}) => {
|
|
1573
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full", className), ...props, children: [
|
|
1574
|
+
/* @__PURE__ */ jsxRuntime.jsx(Title, { title }),
|
|
1575
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-6 mb-[64px]", children: events.map((event, index) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(index === 0 ? "col-span-2" : ""), children: /* @__PURE__ */ jsxRuntime.jsx(EventCard, { ...event }) }, index)) }),
|
|
1576
|
+
showViewMore && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1577
|
+
"button",
|
|
1733
1578
|
{
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1579
|
+
onClick: onViewMore,
|
|
1580
|
+
className: "inline-flex items-center gap-2 text-gray-700 hover:text-gray-900 transition-colors duration-200",
|
|
1581
|
+
children: [
|
|
1582
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-bold", children: "View More" }),
|
|
1583
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1584
|
+
"svg",
|
|
1585
|
+
{
|
|
1586
|
+
width: "16",
|
|
1587
|
+
height: "16",
|
|
1588
|
+
viewBox: "0 0 16 16",
|
|
1589
|
+
fill: "none",
|
|
1590
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1591
|
+
className: "transition-transform duration-200 group-hover:translate-y-0.5",
|
|
1592
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1593
|
+
"path",
|
|
1594
|
+
{
|
|
1595
|
+
d: "M8 3L8 13M8 13L12 9M8 13L4 9",
|
|
1596
|
+
stroke: "currentColor",
|
|
1597
|
+
strokeWidth: "2",
|
|
1598
|
+
strokeLinecap: "round",
|
|
1599
|
+
strokeLinejoin: "round"
|
|
1600
|
+
}
|
|
1601
|
+
)
|
|
1602
|
+
}
|
|
1603
|
+
)
|
|
1604
|
+
]
|
|
1740
1605
|
}
|
|
1741
|
-
)
|
|
1742
|
-
/* @__PURE__ */ jsxRuntime.jsx(EasySteps, { className: layoutClassName })
|
|
1606
|
+
) })
|
|
1743
1607
|
] });
|
|
1744
1608
|
};
|
|
1745
|
-
|
|
1609
|
+
UpcomingEvents.displayName = "UpcomingEvents";
|
|
1746
1610
|
|
|
1747
1611
|
exports.DemoRoom = DemoRoom;
|
|
1748
|
-
exports.EasySteps = EasySteps;
|
|
1749
1612
|
exports.EventCard = EventCard;
|
|
1750
|
-
exports.HelpNav = HelpNav;
|
|
1751
1613
|
exports.StudioCard = StudioCard;
|
|
1752
1614
|
exports.StudioMap = StudioMap;
|
|
1753
1615
|
exports.UpcomingEvents = UpcomingEvents;
|