@foundrykit/blocks 1.0.22 → 1.0.24
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/CHANGELOG.md +19 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +107 -95
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/components/interactive-regions-map/index.tsx +232 -221
- package/src/index.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @foundrykit/blocks
|
|
2
2
|
|
|
3
|
+
## 1.0.24
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Just a quick demo for Anvar
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @foundrykit/animation@1.0.9
|
|
10
|
+
- @foundrykit/components@1.0.23
|
|
11
|
+
- @foundrykit/primitives@1.0.14
|
|
12
|
+
- @foundrykit/types@1.0.9
|
|
13
|
+
- @foundrykit/utils@1.0.6
|
|
14
|
+
|
|
15
|
+
## 1.0.23
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
- @foundrykit/components@1.0.22
|
|
21
|
+
|
|
3
22
|
## 1.0.22
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -58,6 +58,6 @@ interface InteractiveRegionsMapProps {
|
|
|
58
58
|
onRegionHover?: (region: Region | null) => void;
|
|
59
59
|
className?: string;
|
|
60
60
|
}
|
|
61
|
-
declare function InteractiveRegionsMap({ title, content, regions, onRegionClick, onRegionHover, className }: InteractiveRegionsMapProps): react_jsx_runtime.JSX.Element;
|
|
61
|
+
declare function InteractiveRegionsMap({ title, content, regions, onRegionClick, onRegionHover, className, }: InteractiveRegionsMapProps): react_jsx_runtime.JSX.Element;
|
|
62
62
|
|
|
63
63
|
export { HeroMinimal, InteractiveRegionsMap, Pricing, Testimonials };
|
package/dist/index.js
CHANGED
|
@@ -141,28 +141,28 @@ function Testimonials({
|
|
|
141
141
|
import { useState, useCallback, useMemo } from "react";
|
|
142
142
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
143
143
|
var COUNTRY_MAPPING = {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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
166
|
};
|
|
167
167
|
var NAME_TO_CODE = Object.entries(COUNTRY_MAPPING).reduce(
|
|
168
168
|
(acc, [code, name]) => ({ ...acc, [name]: code }),
|
|
@@ -190,60 +190,72 @@ function InteractiveRegionsMap({
|
|
|
190
190
|
});
|
|
191
191
|
return mapping;
|
|
192
192
|
}, [regions]);
|
|
193
|
-
const handleCountryHover = useCallback(
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
const region = countryToRegion[countryCode];
|
|
200
|
-
if (region) {
|
|
201
|
-
setHoveredRegion(region.name);
|
|
202
|
-
onRegionHover?.(region);
|
|
203
|
-
} else {
|
|
204
|
-
setHoveredRegion(null);
|
|
205
|
-
onRegionHover?.(null);
|
|
206
|
-
}
|
|
207
|
-
}, [countryToRegion, onRegionHover]);
|
|
208
|
-
const handleCountryClick = useCallback(async (countryCode) => {
|
|
209
|
-
const region = countryToRegion[countryCode];
|
|
210
|
-
if (!region) return;
|
|
211
|
-
setIsLoading(true);
|
|
212
|
-
try {
|
|
213
|
-
if (onRegionClick) {
|
|
214
|
-
onRegionClick(region);
|
|
215
|
-
} else if (region.href) {
|
|
216
|
-
window.location.href = region.href;
|
|
193
|
+
const handleCountryHover = useCallback(
|
|
194
|
+
(countryCode) => {
|
|
195
|
+
if (!countryCode) {
|
|
196
|
+
setHoveredRegion(null);
|
|
197
|
+
onRegionHover?.(null);
|
|
198
|
+
return;
|
|
217
199
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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 })
|
|
239
251
|
] }),
|
|
240
|
-
/* @__PURE__ */ jsxs4("div", { className: "relative w-full
|
|
241
|
-
isLoading && /* @__PURE__ */ jsx4("div", { className: "absolute inset-0
|
|
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" }) }),
|
|
242
254
|
/* @__PURE__ */ jsxs4(
|
|
243
255
|
"svg",
|
|
244
256
|
{
|
|
245
257
|
viewBox: "0 0 1000 500",
|
|
246
|
-
className: "
|
|
258
|
+
className: "h-auto max-h-96 w-full",
|
|
247
259
|
style: { maxHeight: "500px" },
|
|
248
260
|
children: [
|
|
249
261
|
/* @__PURE__ */ jsx4(
|
|
@@ -254,7 +266,7 @@ function InteractiveRegionsMap({
|
|
|
254
266
|
fill: getCountryFill("us"),
|
|
255
267
|
stroke: "#374151",
|
|
256
268
|
strokeWidth: "0.5",
|
|
257
|
-
className: `transition-all duration-200 ${isCountryInteractive("us") ? "cursor-pointer hover:stroke-
|
|
269
|
+
className: `transition-all duration-200 ${isCountryInteractive("us") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
258
270
|
onMouseEnter: () => handleCountryHover("us"),
|
|
259
271
|
onMouseLeave: () => handleCountryHover(null),
|
|
260
272
|
onClick: () => handleCountryClick("us")
|
|
@@ -268,7 +280,7 @@ function InteractiveRegionsMap({
|
|
|
268
280
|
fill: getCountryFill("ca"),
|
|
269
281
|
stroke: "#374151",
|
|
270
282
|
strokeWidth: "0.5",
|
|
271
|
-
className: `transition-all duration-200 ${isCountryInteractive("ca") ? "cursor-pointer hover:stroke-
|
|
283
|
+
className: `transition-all duration-200 ${isCountryInteractive("ca") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
272
284
|
onMouseEnter: () => handleCountryHover("ca"),
|
|
273
285
|
onMouseLeave: () => handleCountryHover(null),
|
|
274
286
|
onClick: () => handleCountryClick("ca")
|
|
@@ -282,7 +294,7 @@ function InteractiveRegionsMap({
|
|
|
282
294
|
fill: getCountryFill("fr"),
|
|
283
295
|
stroke: "#374151",
|
|
284
296
|
strokeWidth: "0.5",
|
|
285
|
-
className: `transition-all duration-200 ${isCountryInteractive("fr") ? "cursor-pointer hover:stroke-
|
|
297
|
+
className: `transition-all duration-200 ${isCountryInteractive("fr") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
286
298
|
onMouseEnter: () => handleCountryHover("fr"),
|
|
287
299
|
onMouseLeave: () => handleCountryHover(null),
|
|
288
300
|
onClick: () => handleCountryClick("fr")
|
|
@@ -296,7 +308,7 @@ function InteractiveRegionsMap({
|
|
|
296
308
|
fill: getCountryFill("de"),
|
|
297
309
|
stroke: "#374151",
|
|
298
310
|
strokeWidth: "0.5",
|
|
299
|
-
className: `transition-all duration-200 ${isCountryInteractive("de") ? "cursor-pointer hover:stroke-
|
|
311
|
+
className: `transition-all duration-200 ${isCountryInteractive("de") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
300
312
|
onMouseEnter: () => handleCountryHover("de"),
|
|
301
313
|
onMouseLeave: () => handleCountryHover(null),
|
|
302
314
|
onClick: () => handleCountryClick("de")
|
|
@@ -310,7 +322,7 @@ function InteractiveRegionsMap({
|
|
|
310
322
|
fill: getCountryFill("es"),
|
|
311
323
|
stroke: "#374151",
|
|
312
324
|
strokeWidth: "0.5",
|
|
313
|
-
className: `transition-all duration-200 ${isCountryInteractive("es") ? "cursor-pointer hover:stroke-
|
|
325
|
+
className: `transition-all duration-200 ${isCountryInteractive("es") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
314
326
|
onMouseEnter: () => handleCountryHover("es"),
|
|
315
327
|
onMouseLeave: () => handleCountryHover(null),
|
|
316
328
|
onClick: () => handleCountryClick("es")
|
|
@@ -324,7 +336,7 @@ function InteractiveRegionsMap({
|
|
|
324
336
|
fill: getCountryFill("iq"),
|
|
325
337
|
stroke: "#374151",
|
|
326
338
|
strokeWidth: "0.5",
|
|
327
|
-
className: `transition-all duration-200 ${isCountryInteractive("iq") ? "cursor-pointer hover:stroke-
|
|
339
|
+
className: `transition-all duration-200 ${isCountryInteractive("iq") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
328
340
|
onMouseEnter: () => handleCountryHover("iq"),
|
|
329
341
|
onMouseLeave: () => handleCountryHover(null),
|
|
330
342
|
onClick: () => handleCountryClick("iq")
|
|
@@ -338,7 +350,7 @@ function InteractiveRegionsMap({
|
|
|
338
350
|
fill: getCountryFill("ir"),
|
|
339
351
|
stroke: "#374151",
|
|
340
352
|
strokeWidth: "0.5",
|
|
341
|
-
className: `transition-all duration-200 ${isCountryInteractive("ir") ? "cursor-pointer hover:stroke-
|
|
353
|
+
className: `transition-all duration-200 ${isCountryInteractive("ir") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
342
354
|
onMouseEnter: () => handleCountryHover("ir"),
|
|
343
355
|
onMouseLeave: () => handleCountryHover(null),
|
|
344
356
|
onClick: () => handleCountryClick("ir")
|
|
@@ -352,7 +364,7 @@ function InteractiveRegionsMap({
|
|
|
352
364
|
fill: getCountryFill("za"),
|
|
353
365
|
stroke: "#374151",
|
|
354
366
|
strokeWidth: "0.5",
|
|
355
|
-
className: `transition-all duration-200 ${isCountryInteractive("za") ? "cursor-pointer hover:stroke-
|
|
367
|
+
className: `transition-all duration-200 ${isCountryInteractive("za") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
356
368
|
onMouseEnter: () => handleCountryHover("za"),
|
|
357
369
|
onMouseLeave: () => handleCountryHover(null),
|
|
358
370
|
onClick: () => handleCountryClick("za")
|
|
@@ -366,7 +378,7 @@ function InteractiveRegionsMap({
|
|
|
366
378
|
fill: getCountryFill("ke"),
|
|
367
379
|
stroke: "#374151",
|
|
368
380
|
strokeWidth: "0.5",
|
|
369
|
-
className: `transition-all duration-200 ${isCountryInteractive("ke") ? "cursor-pointer hover:stroke-
|
|
381
|
+
className: `transition-all duration-200 ${isCountryInteractive("ke") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
370
382
|
onMouseEnter: () => handleCountryHover("ke"),
|
|
371
383
|
onMouseLeave: () => handleCountryHover(null),
|
|
372
384
|
onClick: () => handleCountryClick("ke")
|
|
@@ -380,7 +392,7 @@ function InteractiveRegionsMap({
|
|
|
380
392
|
fill: getCountryFill("mg"),
|
|
381
393
|
stroke: "#374151",
|
|
382
394
|
strokeWidth: "0.5",
|
|
383
|
-
className: `transition-all duration-200 ${isCountryInteractive("mg") ? "cursor-pointer hover:stroke-
|
|
395
|
+
className: `transition-all duration-200 ${isCountryInteractive("mg") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
384
396
|
onMouseEnter: () => handleCountryHover("mg"),
|
|
385
397
|
onMouseLeave: () => handleCountryHover(null),
|
|
386
398
|
onClick: () => handleCountryClick("mg")
|
|
@@ -394,7 +406,7 @@ function InteractiveRegionsMap({
|
|
|
394
406
|
fill: getCountryFill("gb"),
|
|
395
407
|
stroke: "#374151",
|
|
396
408
|
strokeWidth: "0.5",
|
|
397
|
-
className: `transition-all duration-200 ${isCountryInteractive("gb") ? "cursor-pointer hover:stroke-
|
|
409
|
+
className: `transition-all duration-200 ${isCountryInteractive("gb") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
398
410
|
onMouseEnter: () => handleCountryHover("gb"),
|
|
399
411
|
onMouseLeave: () => handleCountryHover(null),
|
|
400
412
|
onClick: () => handleCountryClick("gb")
|
|
@@ -408,7 +420,7 @@ function InteractiveRegionsMap({
|
|
|
408
420
|
fill: getCountryFill("it"),
|
|
409
421
|
stroke: "#374151",
|
|
410
422
|
strokeWidth: "0.5",
|
|
411
|
-
className: `transition-all duration-200 ${isCountryInteractive("it") ? "cursor-pointer hover:stroke-
|
|
423
|
+
className: `transition-all duration-200 ${isCountryInteractive("it") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
412
424
|
onMouseEnter: () => handleCountryHover("it"),
|
|
413
425
|
onMouseLeave: () => handleCountryHover(null),
|
|
414
426
|
onClick: () => handleCountryClick("it")
|
|
@@ -422,7 +434,7 @@ function InteractiveRegionsMap({
|
|
|
422
434
|
fill: getCountryFill("ru"),
|
|
423
435
|
stroke: "#374151",
|
|
424
436
|
strokeWidth: "0.5",
|
|
425
|
-
className: `transition-all duration-200 ${isCountryInteractive("ru") ? "cursor-pointer hover:stroke-
|
|
437
|
+
className: `transition-all duration-200 ${isCountryInteractive("ru") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
426
438
|
onMouseEnter: () => handleCountryHover("ru"),
|
|
427
439
|
onMouseLeave: () => handleCountryHover(null),
|
|
428
440
|
onClick: () => handleCountryClick("ru")
|
|
@@ -436,7 +448,7 @@ function InteractiveRegionsMap({
|
|
|
436
448
|
fill: getCountryFill("cn"),
|
|
437
449
|
stroke: "#374151",
|
|
438
450
|
strokeWidth: "0.5",
|
|
439
|
-
className: `transition-all duration-200 ${isCountryInteractive("cn") ? "cursor-pointer hover:stroke-
|
|
451
|
+
className: `transition-all duration-200 ${isCountryInteractive("cn") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
440
452
|
onMouseEnter: () => handleCountryHover("cn"),
|
|
441
453
|
onMouseLeave: () => handleCountryHover(null),
|
|
442
454
|
onClick: () => handleCountryClick("cn")
|
|
@@ -450,7 +462,7 @@ function InteractiveRegionsMap({
|
|
|
450
462
|
fill: getCountryFill("in"),
|
|
451
463
|
stroke: "#374151",
|
|
452
464
|
strokeWidth: "0.5",
|
|
453
|
-
className: `transition-all duration-200 ${isCountryInteractive("in") ? "cursor-pointer hover:stroke-
|
|
465
|
+
className: `transition-all duration-200 ${isCountryInteractive("in") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
454
466
|
onMouseEnter: () => handleCountryHover("in"),
|
|
455
467
|
onMouseLeave: () => handleCountryHover(null),
|
|
456
468
|
onClick: () => handleCountryClick("in")
|
|
@@ -464,7 +476,7 @@ function InteractiveRegionsMap({
|
|
|
464
476
|
fill: getCountryFill("jp"),
|
|
465
477
|
stroke: "#374151",
|
|
466
478
|
strokeWidth: "0.5",
|
|
467
|
-
className: `transition-all duration-200 ${isCountryInteractive("jp") ? "cursor-pointer hover:stroke-
|
|
479
|
+
className: `transition-all duration-200 ${isCountryInteractive("jp") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
468
480
|
onMouseEnter: () => handleCountryHover("jp"),
|
|
469
481
|
onMouseLeave: () => handleCountryHover(null),
|
|
470
482
|
onClick: () => handleCountryClick("jp")
|
|
@@ -478,7 +490,7 @@ function InteractiveRegionsMap({
|
|
|
478
490
|
fill: getCountryFill("au"),
|
|
479
491
|
stroke: "#374151",
|
|
480
492
|
strokeWidth: "0.5",
|
|
481
|
-
className: `transition-all duration-200 ${isCountryInteractive("au") ? "cursor-pointer hover:stroke-
|
|
493
|
+
className: `transition-all duration-200 ${isCountryInteractive("au") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
482
494
|
onMouseEnter: () => handleCountryHover("au"),
|
|
483
495
|
onMouseLeave: () => handleCountryHover(null),
|
|
484
496
|
onClick: () => handleCountryClick("au")
|
|
@@ -492,7 +504,7 @@ function InteractiveRegionsMap({
|
|
|
492
504
|
fill: getCountryFill("br"),
|
|
493
505
|
stroke: "#374151",
|
|
494
506
|
strokeWidth: "0.5",
|
|
495
|
-
className: `transition-all duration-200 ${isCountryInteractive("br") ? "cursor-pointer hover:stroke-
|
|
507
|
+
className: `transition-all duration-200 ${isCountryInteractive("br") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
496
508
|
onMouseEnter: () => handleCountryHover("br"),
|
|
497
509
|
onMouseLeave: () => handleCountryHover(null),
|
|
498
510
|
onClick: () => handleCountryClick("br")
|
|
@@ -506,7 +518,7 @@ function InteractiveRegionsMap({
|
|
|
506
518
|
fill: getCountryFill("ar"),
|
|
507
519
|
stroke: "#374151",
|
|
508
520
|
strokeWidth: "0.5",
|
|
509
|
-
className: `transition-all duration-200 ${isCountryInteractive("ar") ? "cursor-pointer hover:stroke-
|
|
521
|
+
className: `transition-all duration-200 ${isCountryInteractive("ar") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
510
522
|
onMouseEnter: () => handleCountryHover("ar"),
|
|
511
523
|
onMouseLeave: () => handleCountryHover(null),
|
|
512
524
|
onClick: () => handleCountryClick("ar")
|
|
@@ -520,7 +532,7 @@ function InteractiveRegionsMap({
|
|
|
520
532
|
fill: getCountryFill("mx"),
|
|
521
533
|
stroke: "#374151",
|
|
522
534
|
strokeWidth: "0.5",
|
|
523
|
-
className: `transition-all duration-200 ${isCountryInteractive("mx") ? "cursor-pointer hover:stroke-
|
|
535
|
+
className: `transition-all duration-200 ${isCountryInteractive("mx") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
524
536
|
onMouseEnter: () => handleCountryHover("mx"),
|
|
525
537
|
onMouseLeave: () => handleCountryHover(null),
|
|
526
538
|
onClick: () => handleCountryClick("mx")
|
|
@@ -534,7 +546,7 @@ function InteractiveRegionsMap({
|
|
|
534
546
|
fill: getCountryFill("eg"),
|
|
535
547
|
stroke: "#374151",
|
|
536
548
|
strokeWidth: "0.5",
|
|
537
|
-
className: `transition-all duration-200 ${isCountryInteractive("eg") ? "cursor-pointer hover:stroke-
|
|
549
|
+
className: `transition-all duration-200 ${isCountryInteractive("eg") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
538
550
|
onMouseEnter: () => handleCountryHover("eg"),
|
|
539
551
|
onMouseLeave: () => handleCountryHover(null),
|
|
540
552
|
onClick: () => handleCountryClick("eg")
|
|
@@ -548,7 +560,7 @@ function InteractiveRegionsMap({
|
|
|
548
560
|
fill: getCountryFill("sa"),
|
|
549
561
|
stroke: "#374151",
|
|
550
562
|
strokeWidth: "0.5",
|
|
551
|
-
className: `transition-all duration-200 ${isCountryInteractive("sa") ? "cursor-pointer hover:stroke-
|
|
563
|
+
className: `transition-all duration-200 ${isCountryInteractive("sa") ? "cursor-pointer hover:stroke-gray-700 hover:stroke-2" : "cursor-default"}`,
|
|
552
564
|
onMouseEnter: () => handleCountryHover("sa"),
|
|
553
565
|
onMouseLeave: () => handleCountryHover(null),
|
|
554
566
|
onClick: () => handleCountryClick("sa")
|
|
@@ -561,12 +573,12 @@ function InteractiveRegionsMap({
|
|
|
561
573
|
regions.length > 0 && /* @__PURE__ */ jsx4("div", { className: "mt-6 flex flex-wrap justify-center gap-4", children: regions.map((region, index) => /* @__PURE__ */ jsxs4(
|
|
562
574
|
"div",
|
|
563
575
|
{
|
|
564
|
-
className: `flex items-center gap-2 px-3 py-2
|
|
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"}`,
|
|
565
577
|
children: [
|
|
566
578
|
/* @__PURE__ */ jsx4(
|
|
567
579
|
"div",
|
|
568
580
|
{
|
|
569
|
-
className: "
|
|
581
|
+
className: "h-4 w-4 rounded border border-gray-300",
|
|
570
582
|
style: {
|
|
571
583
|
backgroundColor: region.color || "#3b82f6"
|
|
572
584
|
}
|
|
@@ -577,7 +589,7 @@ function InteractiveRegionsMap({
|
|
|
577
589
|
},
|
|
578
590
|
index
|
|
579
591
|
)) }),
|
|
580
|
-
process.env.NODE_ENV === "development" && hoveredRegion && /* @__PURE__ */ jsxs4("div", { className: "mt-4
|
|
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: [
|
|
581
593
|
/* @__PURE__ */ jsx4("strong", { children: "Debug:" }),
|
|
582
594
|
" Hovering over region: ",
|
|
583
595
|
hoveredRegion
|