ethio-map-kit 0.1.1 → 0.1.3

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/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Ethio Map Kit
2
2
 
3
- Type-safe React components for an interactive Ethiopia regional SVG map.
3
+ React components for building interactive Ethiopia map visualizations.
4
4
 
5
- Ethio Map Kit ships a polished Ethiopia map surface, region legend, selected-region card, service-stat card, and location list. It includes default demo data, a bundled Ethiopia regions SVG, a lightweight transparent terrain WebP, and CSS for light/dark dashboard-style layouts.
5
+ Ethio Map Kit includes a regional Ethiopia map, smooth region selection, light/dark themes, terrain and heat layers, marker support, service stats, and TypeScript types.
6
6
 
7
7
  ## Install
8
8
 
@@ -10,13 +10,7 @@ Ethio Map Kit ships a polished Ethiopia map surface, region legend, selected-reg
10
10
  npm install ethio-map-kit
11
11
  ```
12
12
 
13
- React and React DOM are peer dependencies:
14
-
15
- ```bash
16
- npm install react react-dom
17
- ```
18
-
19
- Import the stylesheet once in your app:
13
+ Import the stylesheet once:
20
14
 
21
15
  ```tsx
22
16
  import "ethio-map-kit/styles.css";
@@ -40,95 +34,98 @@ export function App() {
40
34
  serviceStats={defaultRegionServiceStats}
41
35
  locations={defaultLocations}
42
36
  theme="light"
43
- layer="terrain"
37
+ layer="regions"
44
38
  showLabels
45
- showMarkers
46
- onRegionSelect={(selection) => {
47
- console.log(selection.regionId, selection.region);
39
+ onRegionSelect={({ regionId, region }) => {
40
+ console.log(regionId, region);
48
41
  }}
49
42
  />
50
43
  );
51
44
  }
52
45
  ```
53
46
 
54
- You can also import from the React subpath:
47
+ ## Terrain Layer
55
48
 
56
49
  ```tsx
57
- import { EthiopiaMap } from "ethio-map-kit/react";
50
+ <EthiopiaMap
51
+ data={defaultRegionData}
52
+ layer="terrain"
53
+ theme="dark"
54
+ />
58
55
  ```
59
56
 
60
- ## Exports
61
-
62
- Components:
57
+ The bundled terrain image is a transparent WebP, so it works in both light and dark mode.
63
58
 
64
- - `EthiopiaMap`
65
- - `EthiopiaMapSurface`
66
- - `EthiopiaMapProvider`
67
- - `EthiopiaMapRoot`
68
- - `EthiopiaMapLegend`
69
- - `EthiopiaSelectedRegionCard`
70
- - `EthiopiaRegionServicesCard`
71
- - `EthiopiaLocationsPanel`
72
-
73
- Hooks:
74
-
75
- - `useEthiopiaMap`
76
- - `useSelectedRegionId`
59
+ ## Custom Data
77
60
 
78
- Default data and map metadata:
61
+ ```tsx
62
+ import type { RegionRecord, RegionDatum } from "ethio-map-kit";
79
63
 
80
- - `defaultRegionData`
81
- - `defaultRegionServiceStats`
82
- - `defaultLocations`
83
- - `regionPathMap`
84
- - `ETHIOPIA_REGION_IDS`
85
- - `ETHIOPIA_AUTO_TOUR_SEQUENCE`
64
+ const data: RegionRecord<RegionDatum> = {
65
+ ...defaultRegionData,
66
+ amhara: {
67
+ name: "Amhara",
68
+ value: 78,
69
+ trend: "+12%",
70
+ copy: "High regional index with several sample cities.",
71
+ },
72
+ };
86
73
 
87
- ## Main Component
74
+ <EthiopiaMap data={data} />;
75
+ ```
88
76
 
89
- `EthiopiaMap` is the fastest way to render a complete standalone map. It wraps `EthiopiaMapProvider` and `EthiopiaMapSurface` for you.
77
+ ## Common Props
78
+
79
+ | Prop | Type | Description |
80
+ | --- | --- | --- |
81
+ | `data` | `RegionRecord<RegionDatum>` | Region values and copy keyed by region ID. |
82
+ | `serviceStats` | `RegionServiceStats` | Optional service indicators for each region. |
83
+ | `locations` | `LatLngLocation[]` | Optional marker/location data. |
84
+ | `theme` | `"light" \| "dark"` | Map theme. |
85
+ | `layer` | `"regions" \| "heat" \| "terrain"` | Active visual layer. |
86
+ | `viewMode` | `"map" \| "bars"` | Map view or bar view. |
87
+ | `selectionAnimation` | `"pulse" \| "static" \| "none" \| "outline"` | Selected-region animation style. |
88
+ | `showLabels` | `boolean` | Show or hide region labels. |
89
+ | `showMarkers` | `boolean` | Show or hide location markers. |
90
+ | `showInMapStats` | `boolean` | Show or hide the selected region service overlay inside the map surface. |
91
+ | `regionColors` | `PartialRegionRecord<string>` | Override region colors. |
92
+ | `selectedRegionId` | `EthiopiaRegionId \| null` | Controlled selected region. |
93
+ | `defaultSelectedRegionId` | `EthiopiaRegionId \| null` | Initial selected region. |
94
+ | `onRegionSelect` | `(selection) => void` | Called when a region is selected or cleared. |
95
+ | `className` | `string` | Class applied to the map surface in the all-in-one `EthiopiaMap`. |
96
+ | `style` | `React.CSSProperties` | Inline style applied to the map surface in the all-in-one `EthiopiaMap`. Useful for height and width. |
97
+ | `terrainImageUrl` | `string` | Custom terrain image URL. |
98
+
99
+ ## Sizing The Map
100
+
101
+ The map surface fills its own container and has a default minimum height. Use `className`, `style`, or your layout wrapper to control the rendered size.
90
102
 
91
103
  ```tsx
92
104
  <EthiopiaMap
93
- data={regionData}
94
- serviceStats={serviceStats}
95
- locations={locations}
96
- theme="dark"
97
- layer="heat"
98
- selectedRegionId={selectedRegionId}
99
- onRegionSelect={setSelection}
105
+ data={defaultRegionData}
106
+ serviceStats={defaultRegionServiceStats}
107
+ className="w-full"
108
+ style={{ width: "100%", height: 640, minHeight: 640 }}
100
109
  />
101
110
  ```
102
111
 
103
- ### `EthiopiaMap` Props
104
-
105
- | Prop | Type | Default | Description |
106
- | --- | --- | --- | --- |
107
- | `data` | `RegionRecord<RegionDatum>` | Required | Region data keyed by Ethiopia region ID. |
108
- | `serviceStats` | `RegionServiceStats` | `{}` | Per-region service statistics shown in the in-map panel and service card. |
109
- | `locations` | `readonly LatLngLocation[]` | `[]` | Lat/lng points for marker and location-list UI. |
110
- | `theme` | `"light" \| "dark"` | `"light"` | Visual theme. |
111
- | `layer` | `"regions" \| "heat" \| "terrain"` | `"regions"` | Main visual layer. |
112
- | `viewMode` | `"map" \| "bars"` | `"map"` | Standard map view or bar morph view. |
113
- | `selectionAnimation` | `"pulse" \| "static" \| "none" \| "outline"` | `"pulse"` | Selected-region visual treatment. |
114
- | `showLabels` | `boolean` | `true` | Show or hide SVG labels. |
115
- | `showMarkers` | `boolean` | `false` | Show or hide location markers. |
116
- | `showInMapStats` | `boolean` | `true` | Show selected-region stats inside the map surface. |
117
- | `autoTour` | `boolean` | `false` | Automatically cycle through regions. |
118
- | `autoTourSequence` | `readonly (EthiopiaRegionId \| null)[]` | `ETHIOPIA_AUTO_TOUR_SEQUENCE` | Custom tour route. Use `null` for reset steps. |
119
- | `autoTourIntervalMs` | `number` | `3200` | Delay between auto-tour steps. |
120
- | `regionColors` | `PartialRegionRecord<string>` | `{}` | Override choropleth color for one or more regions. |
121
- | `selectedRegionId` | `EthiopiaRegionId \| null` | Uncontrolled | Controlled selected region. |
122
- | `defaultSelectedRegionId` | `EthiopiaRegionId \| null` | `null` | Initial selected region for uncontrolled usage. |
123
- | `onRegionSelect` | `(selection: EthiopiaMapSelection) => void` | `undefined` | Called when the user selects or clears a region. |
124
- | `className` | `string` | `undefined` | Extra class for the map surface. |
125
- | `svgText` | `string` | Bundled SVG | Raw SVG text override. |
126
- | `svgUrl` | `string` | `undefined` | Fetch an SVG from a URL instead of using the bundled SVG. |
127
- | `terrainImageUrl` | `string` | Bundled WebP | Custom terrain image URL. |
128
-
129
- ## Composable Layout
130
-
131
- Use the provider when you want to arrange the map and panels yourself.
112
+ With composable components, size `EthiopiaMapSurface` directly:
113
+
114
+ ```tsx
115
+ <EthiopiaMapProvider data={defaultRegionData}>
116
+ <div className="grid gap-4 lg:grid-cols-[minmax(0,1fr)_320px]">
117
+ <EthiopiaMapSurface
118
+ className="w-full"
119
+ style={{ height: 620, minHeight: 620 }}
120
+ />
121
+ <EthiopiaSelectedRegionCard />
122
+ </div>
123
+ </EthiopiaMapProvider>
124
+ ```
125
+
126
+ ## Composable Components
127
+
128
+ For custom layouts, wrap components with `EthiopiaMapProvider`.
132
129
 
133
130
  ```tsx
134
131
  import {
@@ -137,292 +134,143 @@ import {
137
134
  EthiopiaMapLegend,
138
135
  EthiopiaSelectedRegionCard,
139
136
  EthiopiaRegionServicesCard,
137
+ EthiopiaRegionServicesPanel,
140
138
  EthiopiaLocationsPanel,
141
139
  defaultRegionData,
140
+ defaultRegionServiceStats,
142
141
  } from "ethio-map-kit";
143
142
 
144
143
  export function Dashboard() {
145
144
  return (
146
- <EthiopiaMapProvider data={defaultRegionData} theme="light" layer="regions">
147
- <div className="dashboard-grid">
148
- <EthiopiaMapSurface />
149
- <aside>
150
- <EthiopiaMapLegend maxItems={8} />
151
- <EthiopiaSelectedRegionCard />
152
- <EthiopiaRegionServicesCard />
153
- <EthiopiaLocationsPanel />
154
- </aside>
155
- </div>
145
+ <EthiopiaMapProvider
146
+ data={defaultRegionData}
147
+ serviceStats={defaultRegionServiceStats}
148
+ >
149
+ <EthiopiaMapSurface />
150
+ <EthiopiaMapLegend />
151
+ <EthiopiaSelectedRegionCard />
152
+ <EthiopiaRegionServicesCard />
153
+ <EthiopiaLocationsPanel />
156
154
  </EthiopiaMapProvider>
157
155
  );
158
156
  }
159
157
  ```
160
158
 
161
- ### `EthiopiaMapProvider` Props
162
-
163
- `EthiopiaMapProvider` accepts the same data, selection, theme, layer, marker, label, service-stat, and auto-tour props as `EthiopiaMap`, except it requires `children` and does not accept `className`, `svgText`, `svgUrl`, or `terrainImageUrl`.
164
-
165
- Use this when you want shared state across multiple package components.
166
-
167
- ### `EthiopiaMapSurface` Props
168
-
169
- | Prop | Type | Default | Description |
170
- | --- | --- | --- | --- |
171
- | `className` | `string` | `undefined` | Extra class for the surface wrapper. |
172
- | `svgText` | `string` | Bundled SVG | Raw SVG text override. |
173
- | `svgUrl` | `string` | `undefined` | Runtime SVG URL override. |
174
- | `terrainImageUrl` | `string` | Bundled WebP | Terrain raster URL override. |
175
-
176
- `EthiopiaMapSurface` reads all map behavior from `EthiopiaMapProvider`.
177
-
178
- ## Panel Components
179
-
180
- ### `EthiopiaMapLegend`
181
-
182
- Renders a sorted clickable legend using the current provider data.
183
-
184
- | Prop | Type | Default | Description |
185
- | --- | --- | --- | --- |
186
- | `className` | `string` | `undefined` | Extra class for the legend panel. |
187
- | `title` | `string` | `"Region index"` | Legend heading. |
188
- | `kicker` | `string` | `"Legend"` | Small label above the heading. |
189
- | `maxItems` | `number` | All regions | Limit visible legend rows. |
190
- | `onRegionClick` | `(regionId: EthiopiaRegionId) => void` | `undefined` | Called when a non-active region is clicked. |
191
-
192
- ### `EthiopiaSelectedRegionCard`
193
-
194
- Shows selected-region copy, preview SVG, and summary stats.
195
-
196
- | Prop | Type | Default | Description |
197
- | --- | --- | --- | --- |
198
- | `className` | `string` | `undefined` | Extra class for the panel. |
199
- | `emptyTitle` | `string` | `"Click a region"` | Title shown when nothing is selected. |
200
- | `emptyCopy` | `string` | Built-in helper copy | Body text shown when nothing is selected. |
201
- | `showStats` | `boolean` | `true` | Show or hide the three summary-stat boxes. |
202
- | `previewSelectionAnimation` | `SelectionAnimationMode` | Provider value | Override preview animation mode. |
203
- | `summaryStats` | `(selection) => readonly RegionSummaryStat[]` | Built-in stats | Custom stat rows for the card. |
204
- | `renderPreview` | `(selection) => ReactNode` | Built-in SVG preview | Replace the selected-region preview area. |
205
-
206
- ### `EthiopiaRegionServicesCard`
207
-
208
- Shows service indicators for the selected region.
209
-
210
- | Prop | Type | Default | Description |
211
- | --- | --- | --- | --- |
212
- | `className` | `string` | `undefined` | Extra class for the service panel. |
213
- | `emptyText` | `string` | `"Select a region to inspect service statistics."` | Empty state text. |
214
-
215
- ### `EthiopiaLocationsPanel`
216
-
217
- Lists provided locations and their coordinates.
218
-
219
- | Prop | Type | Default | Description |
220
- | --- | --- | --- | --- |
221
- | `className` | `string` | `undefined` | Extra class for the locations panel. |
222
- | `title` | `string` | `"Locations"` | Panel heading. |
223
- | `kicker` | `string` | `"Lat/lng overlay"` | Small label above the heading. |
224
- | `showMarkerToggle` | `boolean` | `true` | Show current marker on/off state. |
225
-
226
- ## Data Types
227
-
228
- ### Region Data
229
-
230
- Each region must be present in the `data` object.
231
-
232
- ```tsx
233
- import type { RegionRecord, RegionDatum } from "ethio-map-kit";
234
-
235
- const data: RegionRecord<RegionDatum> = {
236
- amhara: {
237
- name: "Amhara",
238
- value: 78,
239
- trend: "+12%",
240
- copy: "High regional index with several sample cities.",
241
- color: "#176b54",
242
- summaryStats: [
243
- { label: "Index", value: 78 },
244
- { label: "Trend", value: "+12%" },
245
- ],
246
- },
247
- // include the remaining EthiopiaRegionId keys...
248
- };
249
- ```
250
-
251
- Valid region IDs:
159
+ ## Service Stats Layouts
252
160
 
253
- ```text
254
- tigray
255
- afar
256
- amhara
257
- benishangul-gumuz
258
- gambela
259
- south-west-ethiopia
260
- central-ethiopia
261
- sidama
262
- south-ethiopia
263
- oromia
264
- addis-ababa
265
- somali
266
- dire-dawa
267
- harari
268
- ```
269
-
270
- ### Service Stats
271
-
272
- ```tsx
273
- import type { RegionServiceStats } from "ethio-map-kit";
274
-
275
- const serviceStats: RegionServiceStats = {
276
- amhara: [
277
- {
278
- label: "Maternal death rate",
279
- valueKind: "percent",
280
- value: 67,
281
- comparison: {
282
- enabled: true,
283
- percent: 12,
284
- direction: "increase",
285
- period: "last month",
286
- outcome: "negative",
287
- },
288
- },
289
- {
290
- label: "Hospitals",
291
- valueKind: "number",
292
- value: 86,
293
- comparison: {
294
- enabled: true,
295
- percent: 5,
296
- direction: "increase",
297
- period: "last year",
298
- outcome: "positive",
299
- },
300
- },
301
- ],
302
- };
303
- ```
161
+ Service stats can appear inside the map surface, outside the map, or in a standalone details page. Use either the in-map overlay or the external card unless you intentionally want both.
304
162
 
305
- ### Locations
163
+ In-map overlay only:
306
164
 
307
165
  ```tsx
308
- import type { LatLngLocation } from "ethio-map-kit";
309
-
310
- const locations: LatLngLocation[] = [
311
- {
312
- name: "Bahir Dar",
313
- region: "amhara",
314
- lat: 11.59,
315
- lng: 37.39,
316
- category: "hospital",
317
- color: "#f7c948",
318
- radius: 5,
319
- intensity: 76,
320
- },
321
- ];
166
+ <EthiopiaMapProvider
167
+ data={defaultRegionData}
168
+ serviceStats={defaultRegionServiceStats}
169
+ showInMapStats
170
+ >
171
+ <EthiopiaMapSurface />
172
+ <EthiopiaSelectedRegionCard />
173
+ </EthiopiaMapProvider>
322
174
  ```
323
175
 
324
- ## Customization Examples
325
-
326
- ### Controlled Selection
176
+ External service card only:
327
177
 
328
178
  ```tsx
329
- const [selectedRegionId, setSelectedRegionId] =
330
- useState<EthiopiaRegionId | null>(null);
331
-
332
- <EthiopiaMap
179
+ <EthiopiaMapProvider
333
180
  data={defaultRegionData}
334
- selectedRegionId={selectedRegionId}
335
- onRegionSelect={({ regionId }) => setSelectedRegionId(regionId)}
336
- />;
181
+ serviceStats={defaultRegionServiceStats}
182
+ showInMapStats={false}
183
+ >
184
+ <div className="grid gap-4 lg:grid-cols-[minmax(0,1fr)_320px]">
185
+ <EthiopiaMapSurface className="w-full" style={{ height: 620 }} />
186
+ <EthiopiaRegionServicesCard />
187
+ </div>
188
+ </EthiopiaMapProvider>
337
189
  ```
338
190
 
339
- ### Custom Region Colors
191
+ Customize the in-map overlay and its scroll list from `EthiopiaMapSurface`:
340
192
 
341
193
  ```tsx
342
- <EthiopiaMap
343
- data={defaultRegionData}
344
- regionColors={{
345
- amhara: "#2563eb",
346
- oromia: "#16a34a",
347
- "addis-ababa": "#dc2626",
348
- }}
194
+ <EthiopiaMapSurface
195
+ inMapStatsClassName="my-map-stats"
196
+ inMapStatsStyle={{ maxHeight: 320 }}
197
+ inMapStatsListClassName="my-map-stats-list"
198
+ inMapStatsListStyle={{ maxHeight: 240 }}
349
199
  />
350
200
  ```
351
201
 
352
- ### Custom Terrain Asset
202
+ Opt in to incremental row rendering when a region has many indicators:
353
203
 
354
204
  ```tsx
355
- <EthiopiaMap
356
- data={defaultRegionData}
357
- layer="terrain"
358
- terrainImageUrl="/assets/ethiopia-terrain.webp"
205
+ <EthiopiaRegionServicesCard
206
+ incrementalRows={{
207
+ enabled: true,
208
+ initialCount: 8,
209
+ step: 8,
210
+ }}
359
211
  />
360
212
  ```
361
213
 
362
- The bundled terrain asset is a transparent WebP so it works in both light and dark mode.
363
-
364
- ### Auto Tour
214
+ The same option works on the in-map overlay:
365
215
 
366
216
  ```tsx
367
- <EthiopiaMap
368
- data={defaultRegionData}
369
- autoTour
370
- autoTourIntervalMs={4500}
371
- autoTourSequence={["amhara", "oromia", "addis-ababa", null]}
217
+ <EthiopiaMapSurface
218
+ incrementalRows={{
219
+ enabled: true,
220
+ initialCount: 8,
221
+ step: 8,
222
+ thresholdPx: 80,
223
+ }}
372
224
  />
373
225
  ```
374
226
 
375
- The default route is:
376
-
377
- ```text
378
- Afar -> Tigray -> Amhara -> Benishangul-Gumuz -> Gambela -> South West Ethiopia -> South Ethiopia -> Sidama -> Central Ethiopia -> Addis Ababa -> Dire Dawa -> Harari -> Somali -> Oromia -> reset
379
- ```
380
-
381
- ### Custom Selected-Region Preview
227
+ For server-rendered detail pages, fetch data in your app and pass it directly to the context-free panel. The package does not include Prisma, Next.js caching, route generation, ISR, or database fetching.
382
228
 
383
229
  ```tsx
384
- <EthiopiaSelectedRegionCard
385
- renderPreview={({ region }) =>
386
- region ? <strong>{region.name}</strong> : <span>No region</span>
387
- }
388
- />
230
+ const services = await getCachedMapsData("afar", 2021, true);
231
+
232
+ return (
233
+ <EthiopiaRegionServicesPanel
234
+ regionName="Afar"
235
+ regionValue={34}
236
+ services={services.afar ?? []}
237
+ />
238
+ );
389
239
  ```
390
240
 
391
- ## Package Boundary And Source Visibility
392
-
393
- The published npm package contains compiled output from `dist` and this README. It does not publish the TypeScript source files or the original private repository structure.
394
-
395
- This is the normal model for frontend npm packages: consumers receive JavaScript, CSS, type declarations, and assets needed to run the component. The code can still be inspected by determined users after installation, even when it is compiled or minified. Minification and narrow package exports are useful for distribution and casual obfuscation, but they are not a security boundary.
396
-
397
- The same rule applies to browser deployments: any JavaScript, SVG, image, or CSS needed by a public client-side page can be downloaded by the browser. Keep sensitive business logic on a server if it must be private.
398
-
399
- ## Local Development
400
-
401
- From the repository root:
241
+ ## Exports
402
242
 
403
- ```bash
404
- npm install
405
- npm run dev:react
406
- npm run typecheck --workspace ethio-map-kit
407
- npm run build --workspace ethio-map-kit
408
- ```
243
+ - `EthiopiaMap`
244
+ - `EthiopiaMapProvider`
245
+ - `EthiopiaMapSurface`
246
+ - `EthiopiaMapLegend`
247
+ - `EthiopiaSelectedRegionCard`
248
+ - `EthiopiaRegionServicesCard`
249
+ - `EthiopiaRegionServicesPanel`
250
+ - `EthiopiaLocationsPanel`
251
+ - `useEthiopiaMap`
252
+ - `useSelectedRegionId`
253
+ - `defaultRegionData`
254
+ - `defaultRegionServiceStats`
255
+ - `defaultLocations`
256
+ - `ETHIOPIA_REGION_IDS`
257
+ - `ETHIOPIA_AUTO_TOUR_SEQUENCE`
409
258
 
410
- Open the local demo at:
259
+ ## Region IDs
411
260
 
412
261
  ```text
413
- http://localhost:5174/
414
- ```
415
-
416
- ## Publishing
417
-
418
- Before publishing a new package version:
419
-
420
- ```bash
421
- npm run typecheck --workspace ethio-map-kit
422
- npm run build --workspace ethio-map-kit
423
- npm pack --workspace ethio-map-kit --dry-run
424
- npm version patch --workspace ethio-map-kit
425
- npm publish --workspace ethio-map-kit --access public
262
+ tigray
263
+ afar
264
+ amhara
265
+ benishangul-gumuz
266
+ gambela
267
+ south-west-ethiopia
268
+ central-ethiopia
269
+ sidama
270
+ south-ethiopia
271
+ oromia
272
+ addis-ababa
273
+ somali
274
+ dire-dawa
275
+ harari
426
276
  ```
427
-
428
- npm package versions are immutable. If `ethio-map-kit@0.1.0` has already been published, publish the next patch, minor, or major version instead of trying to overwrite it.
@@ -1,10 +1,18 @@
1
- import type { EthiopiaMapProps, EthiopiaRegionId } from "../types";
1
+ import { type CSSProperties } from "react";
2
+ import type { EthiopiaMapProps, EthiopiaRegionId, EthiopiaServiceRowsIncrementalConfig } from "../types";
2
3
  export interface EthiopiaMapSurfaceProps {
3
4
  className?: string;
5
+ style?: CSSProperties;
4
6
  svgText?: string;
5
7
  svgUrl?: string;
6
8
  terrainImageUrl?: string;
9
+ inMapStatsClassName?: string;
10
+ inMapStatsStyle?: CSSProperties;
11
+ inMapStatsListClassName?: string;
12
+ inMapStatsListStyle?: CSSProperties;
13
+ inMapStatsEmptyText?: string;
14
+ incrementalRows?: EthiopiaServiceRowsIncrementalConfig;
7
15
  }
8
- export declare function EthiopiaMapSurface({ className, svgText, svgUrl, terrainImageUrl, }: EthiopiaMapSurfaceProps): import("react").JSX.Element;
9
- export declare function EthiopiaMap({ className, svgText, svgUrl, terrainImageUrl, ...providerProps }: EthiopiaMapProps): import("react").JSX.Element;
16
+ export declare function EthiopiaMapSurface({ className, style, svgText, svgUrl, terrainImageUrl, inMapStatsClassName, inMapStatsStyle, inMapStatsListClassName, inMapStatsListStyle, inMapStatsEmptyText, incrementalRows, }: EthiopiaMapSurfaceProps): import("react").JSX.Element;
17
+ export declare function EthiopiaMap({ className, style, svgText, svgUrl, terrainImageUrl, inMapStatsClassName, inMapStatsStyle, inMapStatsListClassName, inMapStatsListStyle, inMapStatsEmptyText, incrementalRows, ...providerProps }: EthiopiaMapProps): import("react").JSX.Element;
10
18
  export declare function useSelectedRegionId(): EthiopiaRegionId | null;
@@ -1,5 +1,11 @@
1
+ import type { CSSProperties } from "react";
2
+ import type { EthiopiaServiceRowsIncrementalConfig } from "../types";
1
3
  export interface EthiopiaRegionServicesCardProps {
2
4
  className?: string;
5
+ style?: CSSProperties;
6
+ listClassName?: string;
7
+ listStyle?: CSSProperties;
3
8
  emptyText?: string;
9
+ incrementalRows?: EthiopiaServiceRowsIncrementalConfig;
4
10
  }
5
- export declare function EthiopiaRegionServicesCard({ className, emptyText, }: EthiopiaRegionServicesCardProps): import("react").JSX.Element;
11
+ export declare function EthiopiaRegionServicesCard({ className, style, listClassName, listStyle, emptyText, incrementalRows, }: EthiopiaRegionServicesCardProps): import("react").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { type CSSProperties } from "react";
2
+ import type { EthiopiaServiceRowsIncrementalConfig, ServiceStat } from "../types";
3
+ type ServicesPanelVariant = "card" | "overlay";
4
+ export interface EthiopiaRegionServicesPanelProps {
5
+ className?: string;
6
+ style?: CSSProperties;
7
+ listClassName?: string;
8
+ listStyle?: CSSProperties;
9
+ title?: string;
10
+ kicker?: string;
11
+ regionName?: string | null;
12
+ regionValue?: number | null;
13
+ services?: readonly ServiceStat[];
14
+ emptyText?: string;
15
+ variant?: ServicesPanelVariant;
16
+ incrementalRows?: EthiopiaServiceRowsIncrementalConfig;
17
+ getBarPercent?: (stat: ServiceStat) => number;
18
+ }
19
+ export declare function EthiopiaRegionServicesPanel({ className, style, listClassName, listStyle, title, kicker, regionName, regionValue, services, emptyText, variant, incrementalRows, getBarPercent, }: EthiopiaRegionServicesPanelProps): import("react").JSX.Element;
20
+ export {};