@foundrykit/blocks 0.1.0 → 0.2.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 +6 -6
- package/CHANGELOG.md +29 -0
- package/README.md +56 -53
- package/dist/index.d.ts +17 -1
- package/dist/index.js +449 -0
- package/dist/index.js.map +1 -1
- package/package.json +9 -8
- package/src/components/interactive-regions-map/config.ts +178 -0
- package/src/components/interactive-regions-map/index.tsx +572 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { ComponentConfig } from '@foundrykit/types';
|
|
2
|
+
|
|
3
|
+
export const interactiveRegionsMapConfig: ComponentConfig = {
|
|
4
|
+
name: 'Interactive Regions Map',
|
|
5
|
+
description: 'Interactive Regions Map is designed for sites with multiple hotels across multiple global regions.',
|
|
6
|
+
category: 'blocks',
|
|
7
|
+
tags: ['map', 'interactive', 'hotels', 'regions', 'geography'],
|
|
8
|
+
preview: {
|
|
9
|
+
type: 'static',
|
|
10
|
+
html: '<div class="flex h-12 w-full flex-col justify-center rounded-md bg-gray-50 p-2"><div class="mb-1 h-2 w-3/4 rounded bg-gray-300"></div><div class="mb-2 h-1 w-1/2 rounded bg-gray-200"></div><div class="flex space-x-1"><div class="h-4 w-8 rounded bg-blue-500"></div><div class="h-4 w-10 rounded bg-green-500"></div><div class="h-4 w-8 rounded bg-red-500"></div></div></div>',
|
|
11
|
+
},
|
|
12
|
+
variants: [
|
|
13
|
+
{
|
|
14
|
+
name: 'Default',
|
|
15
|
+
description: 'Basic interactive regions map with default styling',
|
|
16
|
+
code: `<InteractiveRegionsMap
|
|
17
|
+
title="Our Global Presence"
|
|
18
|
+
regions={[
|
|
19
|
+
{ countries: ["france", "germany", "spain"], name: "Europe" },
|
|
20
|
+
{ countries: ["iraq", "iran"], name: "Middle East" },
|
|
21
|
+
{ countries: ["madagascar", "south-africa", "kenya"], name: "Africa" }
|
|
22
|
+
]}
|
|
23
|
+
/>`,
|
|
24
|
+
preview: {
|
|
25
|
+
type: 'component',
|
|
26
|
+
component: 'InteractiveRegionsMap',
|
|
27
|
+
props: {
|
|
28
|
+
title: 'Our Global Presence',
|
|
29
|
+
regions: [
|
|
30
|
+
{ countries: ['france', 'germany', 'spain'], name: "Europe" },
|
|
31
|
+
{ countries: ['iraq', 'iran'], name: "Middle East" },
|
|
32
|
+
{ countries: ['madagascar', 'south-africa', 'kenya'], name: "Africa" }
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'With Content',
|
|
39
|
+
description: 'Map with descriptive content below the title',
|
|
40
|
+
code: `<InteractiveRegionsMap
|
|
41
|
+
title="Explore Our Hotel Destinations"
|
|
42
|
+
content="Discover luxury accommodations across multiple continents. Click on any region to learn more about our properties in that area."
|
|
43
|
+
regions={[
|
|
44
|
+
{ countries: ["united-states", "canada"], name: "North America", color: "#3b82f6" },
|
|
45
|
+
{ countries: ["france", "germany", "spain"], name: "Europe", color: "#10b981" },
|
|
46
|
+
{ countries: ["iraq", "iran"], name: "Middle East", color: "#f59e0b" }
|
|
47
|
+
]}
|
|
48
|
+
/>`,
|
|
49
|
+
preview: {
|
|
50
|
+
type: 'component',
|
|
51
|
+
component: 'InteractiveRegionsMap',
|
|
52
|
+
props: {
|
|
53
|
+
title: 'Explore Our Hotel Destinations',
|
|
54
|
+
content: 'Discover luxury accommodations across multiple continents. Click on any region to learn more about our properties in that area.',
|
|
55
|
+
regions: [
|
|
56
|
+
{ countries: ['united-states', 'canada'], name: "North America", color: "#3b82f6" },
|
|
57
|
+
{ countries: ['france', 'germany', 'spain'], name: "Europe", color: "#10b981" },
|
|
58
|
+
{ countries: ['iraq', 'iran'], name: "Middle East", color: "#f59e0b" }
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'Custom Colors',
|
|
65
|
+
description: 'Regions with custom color schemes',
|
|
66
|
+
code: `<InteractiveRegionsMap
|
|
67
|
+
title="Regional Divisions"
|
|
68
|
+
regions={[
|
|
69
|
+
{ countries: ["france", "germany", "spain"], name: "Western Europe", color: "#8b5cf6" },
|
|
70
|
+
{ countries: ["iraq", "iran", "saudi-arabia"], name: "Middle East", color: "#ef4444" },
|
|
71
|
+
{ countries: ["south-africa", "kenya", "madagascar"], name: "Africa", color: "#f97316" },
|
|
72
|
+
{ countries: ["united-states", "canada"], name: "North America", color: "#06b6d4" }
|
|
73
|
+
]}
|
|
74
|
+
/>`,
|
|
75
|
+
preview: {
|
|
76
|
+
type: 'component',
|
|
77
|
+
component: 'InteractiveRegionsMap',
|
|
78
|
+
props: {
|
|
79
|
+
title: 'Regional Divisions',
|
|
80
|
+
regions: [
|
|
81
|
+
{ countries: ['france', 'germany', 'spain'], name: "Western Europe", color: "#8b5cf6" },
|
|
82
|
+
{ countries: ['iraq', 'iran', 'saudi-arabia'], name: "Middle East", color: "#ef4444" },
|
|
83
|
+
{ countries: ['south-africa', 'kenya', 'madagascar'], name: "Africa", color: "#f97316" },
|
|
84
|
+
{ countries: ['united-states', 'canada'], name: "North America", color: "#06b6d4" }
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'With Navigation',
|
|
91
|
+
description: 'Regions configured with href navigation links',
|
|
92
|
+
code: `<InteractiveRegionsMap
|
|
93
|
+
title="Hotel Locations by Region"
|
|
94
|
+
content="Click on any region to view available properties"
|
|
95
|
+
regions={[
|
|
96
|
+
{ countries: ["france", "spain"], name: "Southern Europe", color: "#3b82f6", href: "/hotels/southern-europe" },
|
|
97
|
+
{ countries: ["germany"], name: "Central Europe", color: "#10b981", href: "/hotels/central-europe" },
|
|
98
|
+
{ countries: ["iraq", "iran"], name: "Middle East", color: "#f59e0b", href: "/hotels/middle-east" },
|
|
99
|
+
{ countries: ["south-africa", "kenya"], name: "Africa", color: "#ef4444", href: "/hotels/africa" }
|
|
100
|
+
]}
|
|
101
|
+
/>`,
|
|
102
|
+
preview: {
|
|
103
|
+
type: 'component',
|
|
104
|
+
component: 'InteractiveRegionsMap',
|
|
105
|
+
props: {
|
|
106
|
+
title: 'Hotel Locations by Region',
|
|
107
|
+
content: 'Click on any region to view available properties',
|
|
108
|
+
regions: [
|
|
109
|
+
{ countries: ['france', 'spain'], name: "Southern Europe", color: "#3b82f6", href: "/hotels/southern-europe" },
|
|
110
|
+
{ countries: ['germany'], name: "Central Europe", color: "#10b981", href: "/hotels/central-europe" },
|
|
111
|
+
{ countries: ['iraq', 'iran'], name: "Middle East", color: "#f59e0b", href: "/hotels/middle-east" },
|
|
112
|
+
{ countries: ['south-africa', 'kenya'], name: "Africa", color: "#ef4444", href: "/hotels/africa" }
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: 'Comprehensive Coverage',
|
|
119
|
+
description: 'Maximum regions showcasing all supported countries',
|
|
120
|
+
code: `<InteractiveRegionsMap
|
|
121
|
+
title="Global Hotel Network"
|
|
122
|
+
content="Our extensive portfolio spans continents with premium properties in key destinations"
|
|
123
|
+
regions={[
|
|
124
|
+
{ countries: ["united-states", "canada"], name: "North America", color: "#3b82f6" },
|
|
125
|
+
{ countries: ["brazil", "argentina", "mexico"], name: "Latin America", color: "#10b981" },
|
|
126
|
+
{ countries: ["france", "germany", "spain", "italy", "united-kingdom"], name: "Europe", color: "#8b5cf6" },
|
|
127
|
+
{ countries: ["iraq", "iran", "saudi-arabia"], name: "Middle East", color: "#f59e0b" },
|
|
128
|
+
{ countries: ["south-africa", "kenya", "madagascar", "egypt"], name: "Africa", color: "#ef4444" },
|
|
129
|
+
{ countries: ["china", "japan", "india"], name: "Asia", color: "#06b6d4" },
|
|
130
|
+
{ countries: ["australia"], name: "Oceania", color: "#f97316" },
|
|
131
|
+
{ countries: ["russia"], name: "Eastern Europe", color: "#84cc16" }
|
|
132
|
+
]}
|
|
133
|
+
/>`,
|
|
134
|
+
preview: {
|
|
135
|
+
type: 'component',
|
|
136
|
+
component: 'InteractiveRegionsMap',
|
|
137
|
+
props: {
|
|
138
|
+
title: 'Global Hotel Network',
|
|
139
|
+
content: 'Our extensive portfolio spans continents with premium properties in key destinations',
|
|
140
|
+
regions: [
|
|
141
|
+
{ countries: ['united-states', 'canada'], name: "North America", color: "#3b82f6" },
|
|
142
|
+
{ countries: ['brazil', 'argentina', 'mexico'], name: "Latin America", color: "#10b981" },
|
|
143
|
+
{ countries: ['france', 'germany', 'spain', 'italy', 'united-kingdom'], name: "Europe", color: "#8b5cf6" },
|
|
144
|
+
{ countries: ['iraq', 'iran', 'saudi-arabia'], name: "Middle East", color: "#f59e0b" },
|
|
145
|
+
{ countries: ['south-africa', 'kenya', 'madagascar', 'egypt'], name: "Africa", color: "#ef4444" },
|
|
146
|
+
{ countries: ['china', 'japan', 'india'], name: "Asia", color: "#06b6d4" },
|
|
147
|
+
{ countries: ['australia'], name: "Oceania", color: "#f97316" },
|
|
148
|
+
{ countries: ['russia'], name: "Eastern Europe", color: "#84cc16" }
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'Minimal',
|
|
155
|
+
description: 'Simple two-region setup with minimal styling',
|
|
156
|
+
code: `<InteractiveRegionsMap
|
|
157
|
+
title="Primary Markets"
|
|
158
|
+
regions={[
|
|
159
|
+
{ countries: ["united-states"], name: "United States" },
|
|
160
|
+
{ countries: ["france", "germany"], name: "Europe" }
|
|
161
|
+
]}
|
|
162
|
+
/>`,
|
|
163
|
+
preview: {
|
|
164
|
+
type: 'component',
|
|
165
|
+
component: 'InteractiveRegionsMap',
|
|
166
|
+
props: {
|
|
167
|
+
title: 'Primary Markets',
|
|
168
|
+
regions: [
|
|
169
|
+
{ countries: ['united-states'], name: "United States" },
|
|
170
|
+
{ countries: ['france', 'germany'], name: "Europe" }
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
dependencies: ['primitives', 'utils'],
|
|
177
|
+
files: ['components/interactive-regions-map/index.tsx'],
|
|
178
|
+
};
|