@foundrykit/blocks 1.0.24 → 1.1.0
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/.turbo/turbo-build.log +18 -0
- package/.turbo/turbo-type-check.log +4 -0
- package/CHANGELOG.md +20 -0
- package/dist/index.d.ts +2 -17
- package/dist/index.js +1 -460
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
- package/src/components/interactive-regions-map/config.ts +277 -56
- package/src/index.ts +1 -1
- package/src/components/interactive-regions-map/index.tsx +0 -583
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @foundrykit/blocks@1.0.24 build /Users/isj/Desktop/work/projects/foundry/packages/blocks
|
|
4
|
+
> tsup
|
|
5
|
+
|
|
6
|
+
[34mCLI[39m Building entry: src/index.ts
|
|
7
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
8
|
+
[34mCLI[39m tsup v8.5.0
|
|
9
|
+
[34mCLI[39m Using tsup config: /Users/isj/Desktop/work/projects/foundry/packages/blocks/tsup.config.ts
|
|
10
|
+
[34mCLI[39m Target: es2022
|
|
11
|
+
[34mCLI[39m Cleaning output folder
|
|
12
|
+
[34mESM[39m Build start
|
|
13
|
+
[32mESM[39m [1mdist/index.js [22m[32m7.08 KB[39m
|
|
14
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m10.90 KB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 231ms
|
|
16
|
+
DTS Build start
|
|
17
|
+
DTS ⚡️ Build success in 3781ms
|
|
18
|
+
DTS dist/index.d.ts 1.36 KB
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @foundrykit/blocks
|
|
2
2
|
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c666749: mass update
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [c666749]
|
|
12
|
+
- @foundrykit/components@1.1.0
|
|
13
|
+
- @foundrykit/maps@1.1.0
|
|
14
|
+
|
|
15
|
+
## 1.0.25
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updating maps
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
- @foundrykit/maps@1.0.1
|
|
22
|
+
|
|
3
23
|
## 1.0.24
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
export { InteractiveRegionsMap } from '@foundrykit/maps';
|
|
2
3
|
export { cn } from '@foundrykit/utils';
|
|
3
4
|
|
|
4
5
|
interface HeroMinimalProps {
|
|
@@ -44,20 +45,4 @@ interface TestimonialsProps {
|
|
|
44
45
|
}
|
|
45
46
|
declare function Testimonials({ testimonials, title, subtitle, className, }: TestimonialsProps): react_jsx_runtime.JSX.Element;
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
countries: string[];
|
|
49
|
-
name: string;
|
|
50
|
-
color?: string;
|
|
51
|
-
href?: string;
|
|
52
|
-
}
|
|
53
|
-
interface InteractiveRegionsMapProps {
|
|
54
|
-
title: string;
|
|
55
|
-
content?: string;
|
|
56
|
-
regions: Region[];
|
|
57
|
-
onRegionClick?: (region: Region) => void;
|
|
58
|
-
onRegionHover?: (region: Region | null) => void;
|
|
59
|
-
className?: string;
|
|
60
|
-
}
|
|
61
|
-
declare function InteractiveRegionsMap({ title, content, regions, onRegionClick, onRegionHover, className, }: InteractiveRegionsMapProps): react_jsx_runtime.JSX.Element;
|
|
62
|
-
|
|
63
|
-
export { HeroMinimal, InteractiveRegionsMap, Pricing, Testimonials };
|
|
48
|
+
export { HeroMinimal, Pricing, Testimonials };
|
package/dist/index.js
CHANGED
|
@@ -137,467 +137,8 @@ function Testimonials({
|
|
|
137
137
|
] }) });
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
// src/components/interactive-regions-map/index.tsx
|
|
141
|
-
import { useState, useCallback, useMemo } from "react";
|
|
142
|
-
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
143
|
-
var COUNTRY_MAPPING = {
|
|
144
|
-
us: "united-states",
|
|
145
|
-
ca: "canada",
|
|
146
|
-
mx: "mexico",
|
|
147
|
-
br: "brazil",
|
|
148
|
-
ar: "argentina",
|
|
149
|
-
gb: "united-kingdom",
|
|
150
|
-
fr: "france",
|
|
151
|
-
de: "germany",
|
|
152
|
-
es: "spain",
|
|
153
|
-
it: "italy",
|
|
154
|
-
ru: "russia",
|
|
155
|
-
cn: "china",
|
|
156
|
-
in: "india",
|
|
157
|
-
jp: "japan",
|
|
158
|
-
au: "australia",
|
|
159
|
-
za: "south-africa",
|
|
160
|
-
eg: "egypt",
|
|
161
|
-
ke: "kenya",
|
|
162
|
-
mg: "madagascar",
|
|
163
|
-
iq: "iraq",
|
|
164
|
-
ir: "iran",
|
|
165
|
-
sa: "saudi-arabia"
|
|
166
|
-
};
|
|
167
|
-
var NAME_TO_CODE = Object.entries(COUNTRY_MAPPING).reduce(
|
|
168
|
-
(acc, [code, name]) => ({ ...acc, [name]: code }),
|
|
169
|
-
{}
|
|
170
|
-
);
|
|
171
|
-
function InteractiveRegionsMap({
|
|
172
|
-
title = "Interactive Regions Map",
|
|
173
|
-
content,
|
|
174
|
-
regions = [],
|
|
175
|
-
onRegionClick,
|
|
176
|
-
onRegionHover,
|
|
177
|
-
className = ""
|
|
178
|
-
}) {
|
|
179
|
-
const [hoveredRegion, setHoveredRegion] = useState(null);
|
|
180
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
181
|
-
const countryToRegion = useMemo(() => {
|
|
182
|
-
const mapping = {};
|
|
183
|
-
regions.forEach((region) => {
|
|
184
|
-
region.countries.forEach((country) => {
|
|
185
|
-
const countryCode = NAME_TO_CODE[country.toLowerCase()];
|
|
186
|
-
if (countryCode) {
|
|
187
|
-
mapping[countryCode] = region;
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
});
|
|
191
|
-
return mapping;
|
|
192
|
-
}, [regions]);
|
|
193
|
-
const handleCountryHover = useCallback(
|
|
194
|
-
(countryCode) => {
|
|
195
|
-
if (!countryCode) {
|
|
196
|
-
setHoveredRegion(null);
|
|
197
|
-
onRegionHover?.(null);
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
const region = countryToRegion[countryCode];
|
|
201
|
-
if (region) {
|
|
202
|
-
setHoveredRegion(region.name);
|
|
203
|
-
onRegionHover?.(region);
|
|
204
|
-
} else {
|
|
205
|
-
setHoveredRegion(null);
|
|
206
|
-
onRegionHover?.(null);
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
[countryToRegion, onRegionHover]
|
|
210
|
-
);
|
|
211
|
-
const handleCountryClick = useCallback(
|
|
212
|
-
async (countryCode) => {
|
|
213
|
-
const region = countryToRegion[countryCode];
|
|
214
|
-
if (!region) return;
|
|
215
|
-
setIsLoading(true);
|
|
216
|
-
try {
|
|
217
|
-
if (onRegionClick) {
|
|
218
|
-
onRegionClick(region);
|
|
219
|
-
} else if (region.href) {
|
|
220
|
-
window.location.href = region.href;
|
|
221
|
-
}
|
|
222
|
-
} catch (error) {
|
|
223
|
-
console.error("Navigation error:", error);
|
|
224
|
-
} finally {
|
|
225
|
-
setIsLoading(false);
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
[countryToRegion, onRegionClick]
|
|
229
|
-
);
|
|
230
|
-
const getCountryFill = useCallback(
|
|
231
|
-
(countryCode) => {
|
|
232
|
-
const region = countryToRegion[countryCode];
|
|
233
|
-
if (!region) return "#e5e7eb";
|
|
234
|
-
if (hoveredRegion && hoveredRegion !== region.name) {
|
|
235
|
-
return region.color ? `${region.color}66` : "#d1d5db";
|
|
236
|
-
}
|
|
237
|
-
return region.color || "#3b82f6";
|
|
238
|
-
},
|
|
239
|
-
[countryToRegion, hoveredRegion]
|
|
240
|
-
);
|
|
241
|
-
const isCountryInteractive = useCallback(
|
|
242
|
-
(countryCode) => {
|
|
243
|
-
return countryCode in countryToRegion;
|
|
244
|
-
},
|
|
245
|
-
[countryToRegion]
|
|
246
|
-
);
|
|
247
|
-
return /* @__PURE__ */ jsxs4("section", { className: `mx-auto flex max-w-6xl flex-col p-6 ${className}`, children: [
|
|
248
|
-
/* @__PURE__ */ jsxs4("div", { className: "mb-8 flex flex-col items-center justify-center text-center", children: [
|
|
249
|
-
/* @__PURE__ */ jsx4("h2", { className: "mb-2 text-3xl font-bold text-gray-900", children: title }),
|
|
250
|
-
content && /* @__PURE__ */ jsx4("p", { className: "max-w-2xl text-lg text-gray-600", children: content })
|
|
251
|
-
] }),
|
|
252
|
-
/* @__PURE__ */ jsxs4("div", { className: "relative w-full overflow-hidden rounded-lg bg-gray-50 shadow-lg", children: [
|
|
253
|
-
isLoading && /* @__PURE__ */ jsx4("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-white bg-opacity-75", children: /* @__PURE__ */ jsx4("div", { className: "h-8 w-8 animate-spin rounded-full border-b-2 border-blue-600" }) }),
|
|
254
|
-
/* @__PURE__ */ jsxs4(
|
|
255
|
-
"svg",
|
|
256
|
-
{
|
|
257
|
-
viewBox: "0 0 1000 500",
|
|
258
|
-
className: "h-auto max-h-96 w-full",
|
|
259
|
-
style: { maxHeight: "500px" },
|
|
260
|
-
children: [
|
|
261
|
-
/* @__PURE__ */ jsx4(
|
|
262
|
-
"path",
|
|
263
|
-
{
|
|
264
|
-
id: "us",
|
|
265
|
-
d: "M200 200 L350 200 L350 250 L200 250 Z",
|
|
266
|
-
fill: getCountryFill("us"),
|
|
267
|
-
stroke: "#374151",
|
|
268
|
-
strokeWidth: "0.5",
|
|
269
|
-
className: `transition-all duration-200 ${isCountryInteractive("us") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
270
|
-
onMouseEnter: () => handleCountryHover("us"),
|
|
271
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
272
|
-
onClick: () => handleCountryClick("us")
|
|
273
|
-
}
|
|
274
|
-
),
|
|
275
|
-
/* @__PURE__ */ jsx4(
|
|
276
|
-
"path",
|
|
277
|
-
{
|
|
278
|
-
id: "ca",
|
|
279
|
-
d: "M200 150 L350 150 L350 200 L200 200 Z",
|
|
280
|
-
fill: getCountryFill("ca"),
|
|
281
|
-
stroke: "#374151",
|
|
282
|
-
strokeWidth: "0.5",
|
|
283
|
-
className: `transition-all duration-200 ${isCountryInteractive("ca") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
284
|
-
onMouseEnter: () => handleCountryHover("ca"),
|
|
285
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
286
|
-
onClick: () => handleCountryClick("ca")
|
|
287
|
-
}
|
|
288
|
-
),
|
|
289
|
-
/* @__PURE__ */ jsx4(
|
|
290
|
-
"path",
|
|
291
|
-
{
|
|
292
|
-
id: "fr",
|
|
293
|
-
d: "M450 220 L480 220 L480 250 L450 250 Z",
|
|
294
|
-
fill: getCountryFill("fr"),
|
|
295
|
-
stroke: "#374151",
|
|
296
|
-
strokeWidth: "0.5",
|
|
297
|
-
className: `transition-all duration-200 ${isCountryInteractive("fr") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
298
|
-
onMouseEnter: () => handleCountryHover("fr"),
|
|
299
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
300
|
-
onClick: () => handleCountryClick("fr")
|
|
301
|
-
}
|
|
302
|
-
),
|
|
303
|
-
/* @__PURE__ */ jsx4(
|
|
304
|
-
"path",
|
|
305
|
-
{
|
|
306
|
-
id: "de",
|
|
307
|
-
d: "M480 220 L510 220 L510 250 L480 250 Z",
|
|
308
|
-
fill: getCountryFill("de"),
|
|
309
|
-
stroke: "#374151",
|
|
310
|
-
strokeWidth: "0.5",
|
|
311
|
-
className: `transition-all duration-200 ${isCountryInteractive("de") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
312
|
-
onMouseEnter: () => handleCountryHover("de"),
|
|
313
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
314
|
-
onClick: () => handleCountryClick("de")
|
|
315
|
-
}
|
|
316
|
-
),
|
|
317
|
-
/* @__PURE__ */ jsx4(
|
|
318
|
-
"path",
|
|
319
|
-
{
|
|
320
|
-
id: "es",
|
|
321
|
-
d: "M420 250 L450 250 L450 280 L420 280 Z",
|
|
322
|
-
fill: getCountryFill("es"),
|
|
323
|
-
stroke: "#374151",
|
|
324
|
-
strokeWidth: "0.5",
|
|
325
|
-
className: `transition-all duration-200 ${isCountryInteractive("es") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
326
|
-
onMouseEnter: () => handleCountryHover("es"),
|
|
327
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
328
|
-
onClick: () => handleCountryClick("es")
|
|
329
|
-
}
|
|
330
|
-
),
|
|
331
|
-
/* @__PURE__ */ jsx4(
|
|
332
|
-
"path",
|
|
333
|
-
{
|
|
334
|
-
id: "iq",
|
|
335
|
-
d: "M550 280 L570 280 L570 300 L550 300 Z",
|
|
336
|
-
fill: getCountryFill("iq"),
|
|
337
|
-
stroke: "#374151",
|
|
338
|
-
strokeWidth: "0.5",
|
|
339
|
-
className: `transition-all duration-200 ${isCountryInteractive("iq") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
340
|
-
onMouseEnter: () => handleCountryHover("iq"),
|
|
341
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
342
|
-
onClick: () => handleCountryClick("iq")
|
|
343
|
-
}
|
|
344
|
-
),
|
|
345
|
-
/* @__PURE__ */ jsx4(
|
|
346
|
-
"path",
|
|
347
|
-
{
|
|
348
|
-
id: "ir",
|
|
349
|
-
d: "M570 280 L600 280 L600 300 L570 300 Z",
|
|
350
|
-
fill: getCountryFill("ir"),
|
|
351
|
-
stroke: "#374151",
|
|
352
|
-
strokeWidth: "0.5",
|
|
353
|
-
className: `transition-all duration-200 ${isCountryInteractive("ir") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
354
|
-
onMouseEnter: () => handleCountryHover("ir"),
|
|
355
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
356
|
-
onClick: () => handleCountryClick("ir")
|
|
357
|
-
}
|
|
358
|
-
),
|
|
359
|
-
/* @__PURE__ */ jsx4(
|
|
360
|
-
"path",
|
|
361
|
-
{
|
|
362
|
-
id: "za",
|
|
363
|
-
d: "M480 380 L510 380 L510 410 L480 410 Z",
|
|
364
|
-
fill: getCountryFill("za"),
|
|
365
|
-
stroke: "#374151",
|
|
366
|
-
strokeWidth: "0.5",
|
|
367
|
-
className: `transition-all duration-200 ${isCountryInteractive("za") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
368
|
-
onMouseEnter: () => handleCountryHover("za"),
|
|
369
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
370
|
-
onClick: () => handleCountryClick("za")
|
|
371
|
-
}
|
|
372
|
-
),
|
|
373
|
-
/* @__PURE__ */ jsx4(
|
|
374
|
-
"path",
|
|
375
|
-
{
|
|
376
|
-
id: "ke",
|
|
377
|
-
d: "M520 350 L540 350 L540 370 L520 370 Z",
|
|
378
|
-
fill: getCountryFill("ke"),
|
|
379
|
-
stroke: "#374151",
|
|
380
|
-
strokeWidth: "0.5",
|
|
381
|
-
className: `transition-all duration-200 ${isCountryInteractive("ke") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
382
|
-
onMouseEnter: () => handleCountryHover("ke"),
|
|
383
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
384
|
-
onClick: () => handleCountryClick("ke")
|
|
385
|
-
}
|
|
386
|
-
),
|
|
387
|
-
/* @__PURE__ */ jsx4(
|
|
388
|
-
"path",
|
|
389
|
-
{
|
|
390
|
-
id: "mg",
|
|
391
|
-
d: "M540 380 L555 380 L555 400 L540 400 Z",
|
|
392
|
-
fill: getCountryFill("mg"),
|
|
393
|
-
stroke: "#374151",
|
|
394
|
-
strokeWidth: "0.5",
|
|
395
|
-
className: `transition-all duration-200 ${isCountryInteractive("mg") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
396
|
-
onMouseEnter: () => handleCountryHover("mg"),
|
|
397
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
398
|
-
onClick: () => handleCountryClick("mg")
|
|
399
|
-
}
|
|
400
|
-
),
|
|
401
|
-
/* @__PURE__ */ jsx4(
|
|
402
|
-
"path",
|
|
403
|
-
{
|
|
404
|
-
id: "gb",
|
|
405
|
-
d: "M420 200 L440 200 L440 220 L420 220 Z",
|
|
406
|
-
fill: getCountryFill("gb"),
|
|
407
|
-
stroke: "#374151",
|
|
408
|
-
strokeWidth: "0.5",
|
|
409
|
-
className: `transition-all duration-200 ${isCountryInteractive("gb") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
410
|
-
onMouseEnter: () => handleCountryHover("gb"),
|
|
411
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
412
|
-
onClick: () => handleCountryClick("gb")
|
|
413
|
-
}
|
|
414
|
-
),
|
|
415
|
-
/* @__PURE__ */ jsx4(
|
|
416
|
-
"path",
|
|
417
|
-
{
|
|
418
|
-
id: "it",
|
|
419
|
-
d: "M480 250 L500 250 L500 280 L480 280 Z",
|
|
420
|
-
fill: getCountryFill("it"),
|
|
421
|
-
stroke: "#374151",
|
|
422
|
-
strokeWidth: "0.5",
|
|
423
|
-
className: `transition-all duration-200 ${isCountryInteractive("it") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
424
|
-
onMouseEnter: () => handleCountryHover("it"),
|
|
425
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
426
|
-
onClick: () => handleCountryClick("it")
|
|
427
|
-
}
|
|
428
|
-
),
|
|
429
|
-
/* @__PURE__ */ jsx4(
|
|
430
|
-
"path",
|
|
431
|
-
{
|
|
432
|
-
id: "ru",
|
|
433
|
-
d: "M550 150 L650 150 L650 200 L550 200 Z",
|
|
434
|
-
fill: getCountryFill("ru"),
|
|
435
|
-
stroke: "#374151",
|
|
436
|
-
strokeWidth: "0.5",
|
|
437
|
-
className: `transition-all duration-200 ${isCountryInteractive("ru") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
438
|
-
onMouseEnter: () => handleCountryHover("ru"),
|
|
439
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
440
|
-
onClick: () => handleCountryClick("ru")
|
|
441
|
-
}
|
|
442
|
-
),
|
|
443
|
-
/* @__PURE__ */ jsx4(
|
|
444
|
-
"path",
|
|
445
|
-
{
|
|
446
|
-
id: "cn",
|
|
447
|
-
d: "M700 220 L750 220 L750 270 L700 270 Z",
|
|
448
|
-
fill: getCountryFill("cn"),
|
|
449
|
-
stroke: "#374151",
|
|
450
|
-
strokeWidth: "0.5",
|
|
451
|
-
className: `transition-all duration-200 ${isCountryInteractive("cn") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
452
|
-
onMouseEnter: () => handleCountryHover("cn"),
|
|
453
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
454
|
-
onClick: () => handleCountryClick("cn")
|
|
455
|
-
}
|
|
456
|
-
),
|
|
457
|
-
/* @__PURE__ */ jsx4(
|
|
458
|
-
"path",
|
|
459
|
-
{
|
|
460
|
-
id: "in",
|
|
461
|
-
d: "M650 280 L700 280 L700 320 L650 320 Z",
|
|
462
|
-
fill: getCountryFill("in"),
|
|
463
|
-
stroke: "#374151",
|
|
464
|
-
strokeWidth: "0.5",
|
|
465
|
-
className: `transition-all duration-200 ${isCountryInteractive("in") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
466
|
-
onMouseEnter: () => handleCountryHover("in"),
|
|
467
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
468
|
-
onClick: () => handleCountryClick("in")
|
|
469
|
-
}
|
|
470
|
-
),
|
|
471
|
-
/* @__PURE__ */ jsx4(
|
|
472
|
-
"path",
|
|
473
|
-
{
|
|
474
|
-
id: "jp",
|
|
475
|
-
d: "M750 240 L770 240 L770 270 L750 270 Z",
|
|
476
|
-
fill: getCountryFill("jp"),
|
|
477
|
-
stroke: "#374151",
|
|
478
|
-
strokeWidth: "0.5",
|
|
479
|
-
className: `transition-all duration-200 ${isCountryInteractive("jp") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
480
|
-
onMouseEnter: () => handleCountryHover("jp"),
|
|
481
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
482
|
-
onClick: () => handleCountryClick("jp")
|
|
483
|
-
}
|
|
484
|
-
),
|
|
485
|
-
/* @__PURE__ */ jsx4(
|
|
486
|
-
"path",
|
|
487
|
-
{
|
|
488
|
-
id: "au",
|
|
489
|
-
d: "M750 380 L800 380 L800 420 L750 420 Z",
|
|
490
|
-
fill: getCountryFill("au"),
|
|
491
|
-
stroke: "#374151",
|
|
492
|
-
strokeWidth: "0.5",
|
|
493
|
-
className: `transition-all duration-200 ${isCountryInteractive("au") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
494
|
-
onMouseEnter: () => handleCountryHover("au"),
|
|
495
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
496
|
-
onClick: () => handleCountryClick("au")
|
|
497
|
-
}
|
|
498
|
-
),
|
|
499
|
-
/* @__PURE__ */ jsx4(
|
|
500
|
-
"path",
|
|
501
|
-
{
|
|
502
|
-
id: "br",
|
|
503
|
-
d: "M300 320 L380 320 L380 400 L300 400 Z",
|
|
504
|
-
fill: getCountryFill("br"),
|
|
505
|
-
stroke: "#374151",
|
|
506
|
-
strokeWidth: "0.5",
|
|
507
|
-
className: `transition-all duration-200 ${isCountryInteractive("br") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
508
|
-
onMouseEnter: () => handleCountryHover("br"),
|
|
509
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
510
|
-
onClick: () => handleCountryClick("br")
|
|
511
|
-
}
|
|
512
|
-
),
|
|
513
|
-
/* @__PURE__ */ jsx4(
|
|
514
|
-
"path",
|
|
515
|
-
{
|
|
516
|
-
id: "ar",
|
|
517
|
-
d: "M280 400 L320 400 L320 460 L280 460 Z",
|
|
518
|
-
fill: getCountryFill("ar"),
|
|
519
|
-
stroke: "#374151",
|
|
520
|
-
strokeWidth: "0.5",
|
|
521
|
-
className: `transition-all duration-200 ${isCountryInteractive("ar") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
522
|
-
onMouseEnter: () => handleCountryHover("ar"),
|
|
523
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
524
|
-
onClick: () => handleCountryClick("ar")
|
|
525
|
-
}
|
|
526
|
-
),
|
|
527
|
-
/* @__PURE__ */ jsx4(
|
|
528
|
-
"path",
|
|
529
|
-
{
|
|
530
|
-
id: "mx",
|
|
531
|
-
d: "M150 280 L250 280 L250 320 L150 320 Z",
|
|
532
|
-
fill: getCountryFill("mx"),
|
|
533
|
-
stroke: "#374151",
|
|
534
|
-
strokeWidth: "0.5",
|
|
535
|
-
className: `transition-all duration-200 ${isCountryInteractive("mx") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
536
|
-
onMouseEnter: () => handleCountryHover("mx"),
|
|
537
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
538
|
-
onClick: () => handleCountryClick("mx")
|
|
539
|
-
}
|
|
540
|
-
),
|
|
541
|
-
/* @__PURE__ */ jsx4(
|
|
542
|
-
"path",
|
|
543
|
-
{
|
|
544
|
-
id: "eg",
|
|
545
|
-
d: "M500 310 L520 310 L520 330 L500 330 Z",
|
|
546
|
-
fill: getCountryFill("eg"),
|
|
547
|
-
stroke: "#374151",
|
|
548
|
-
strokeWidth: "0.5",
|
|
549
|
-
className: `transition-all duration-200 ${isCountryInteractive("eg") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
550
|
-
onMouseEnter: () => handleCountryHover("eg"),
|
|
551
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
552
|
-
onClick: () => handleCountryClick("eg")
|
|
553
|
-
}
|
|
554
|
-
),
|
|
555
|
-
/* @__PURE__ */ jsx4(
|
|
556
|
-
"path",
|
|
557
|
-
{
|
|
558
|
-
id: "sa",
|
|
559
|
-
d: "M530 300 L570 300 L570 330 L530 330 Z",
|
|
560
|
-
fill: getCountryFill("sa"),
|
|
561
|
-
stroke: "#374151",
|
|
562
|
-
strokeWidth: "0.5",
|
|
563
|
-
className: `transition-all duration-200 ${isCountryInteractive("sa") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
564
|
-
onMouseEnter: () => handleCountryHover("sa"),
|
|
565
|
-
onMouseLeave: () => handleCountryHover(null),
|
|
566
|
-
onClick: () => handleCountryClick("sa")
|
|
567
|
-
}
|
|
568
|
-
)
|
|
569
|
-
]
|
|
570
|
-
}
|
|
571
|
-
)
|
|
572
|
-
] }),
|
|
573
|
-
regions.length > 0 && /* @__PURE__ */ jsx4("div", { className: "mt-6 flex flex-wrap justify-center gap-4", children: regions.map((region, index) => /* @__PURE__ */ jsxs4(
|
|
574
|
-
"div",
|
|
575
|
-
{
|
|
576
|
-
className: `flex items-center gap-2 rounded-lg border px-3 py-2 transition-all duration-200 ${hoveredRegion === region.name ? "border-gray-400 bg-gray-100 shadow-md" : "border-gray-200 bg-white"}`,
|
|
577
|
-
children: [
|
|
578
|
-
/* @__PURE__ */ jsx4(
|
|
579
|
-
"div",
|
|
580
|
-
{
|
|
581
|
-
className: "h-4 w-4 rounded border border-gray-300",
|
|
582
|
-
style: {
|
|
583
|
-
backgroundColor: region.color || "#3b82f6"
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
),
|
|
587
|
-
/* @__PURE__ */ jsx4("span", { className: "text-sm font-medium text-gray-700", children: region.name })
|
|
588
|
-
]
|
|
589
|
-
},
|
|
590
|
-
index
|
|
591
|
-
)) }),
|
|
592
|
-
process.env.NODE_ENV === "development" && hoveredRegion && /* @__PURE__ */ jsxs4("div", { className: "mt-4 rounded border border-yellow-200 bg-yellow-50 p-3 text-sm", children: [
|
|
593
|
-
/* @__PURE__ */ jsx4("strong", { children: "Debug:" }),
|
|
594
|
-
" Hovering over region: ",
|
|
595
|
-
hoveredRegion
|
|
596
|
-
] })
|
|
597
|
-
] });
|
|
598
|
-
}
|
|
599
|
-
|
|
600
140
|
// src/index.ts
|
|
141
|
+
import { InteractiveRegionsMap } from "@foundrykit/maps";
|
|
601
142
|
import { cn } from "@foundrykit/utils";
|
|
602
143
|
export {
|
|
603
144
|
HeroMinimal,
|