@juv/codego-react-ui 1.1.3 → 1.1.7
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 +116 -5
- package/dist/index.cjs +2716 -1244
- package/dist/index.css +692 -0
- package/dist/index.d.cts +120 -10
- package/dist/index.d.ts +120 -10
- package/dist/index.global.js +39036 -3641
- package/dist/index.js +2754 -1286
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -226,7 +226,19 @@ npm install tailwind-merge clsx
|
|
|
226
226
|
```
|
|
227
227
|
|
|
228
228
|
---
|
|
229
|
+
### 7. Leaflet
|
|
229
230
|
|
|
231
|
+
```bash
|
|
232
|
+
npm install leaflet react-leaflet @types/leaflet
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### 8. MapLibre GL
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
npm install maplibre-gl
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
---
|
|
230
242
|
## Installation
|
|
231
243
|
|
|
232
244
|
Once all prerequisites are installed:
|
|
@@ -261,10 +273,10 @@ import { Button, Card, Modal } from "@juv/codego-react-ui"
|
|
|
261
273
|
| Combobox | `Combobox` |
|
|
262
274
|
| Command Palette | `CommandPalette` |
|
|
263
275
|
| Context Menu | `ContextMenu` |
|
|
264
|
-
| Dashboard Widget | `StatsWidget`, `ChartWidget`, `TableWidget`, `ComposableWidget` |
|
|
276
|
+
| Dashboard Widget | `StatsWidget`, `ChartWidget`, `TableWidget`, `ComposableWidget`, `MetricRow` |
|
|
265
277
|
| Data Grid | `DataGrid` |
|
|
266
278
|
| Date Picker | `DatePickerPopup` |
|
|
267
|
-
| Date Range Picker | `DateRangePicker` |
|
|
279
|
+
| Date Range Picker | `DateRangePicker`, `CalendarDateRangePicker` |
|
|
268
280
|
| Drawer | `Drawer` |
|
|
269
281
|
| Dropdown | `Dropdown` |
|
|
270
282
|
| File Upload | `FileUpload` |
|
|
@@ -273,14 +285,17 @@ import { Button, Card, Modal } from "@juv/codego-react-ui"
|
|
|
273
285
|
| Input | `Input` |
|
|
274
286
|
| Kanban Board | `KanbanBoard` |
|
|
275
287
|
| Label | `Label` |
|
|
288
|
+
| Leaflet Map | `LeafletMap` |
|
|
289
|
+
| MapLibre Map | `MapLibreMap` |
|
|
276
290
|
| Modal | `Modal` |
|
|
277
291
|
| Modal Variants | `ModalUnchange`, `ModalConfirmation`, `ModalWithForms` |
|
|
278
|
-
| Navigation | `Navigation` |
|
|
292
|
+
| Navigation | `Navigation`, `Topbar`, `LeftSidebar`, `RightSidebar`, `GroupNavigation` |
|
|
279
293
|
| Notification | `NotificationPanel`, `NotificationBanner`, `useToast`, `ToastProvider` |
|
|
280
294
|
| OTP Input | `OtpInput` |
|
|
281
295
|
| Pagination | `Pagination` |
|
|
296
|
+
| Panel | `Panel` |
|
|
282
297
|
| Popover | `Popover` |
|
|
283
|
-
| Progress | `Progress` |
|
|
298
|
+
| Progress | `Progress`, `CircularProgress` |
|
|
284
299
|
| Radio Group | `RadioGroup` |
|
|
285
300
|
| Repeater | `Repeater` |
|
|
286
301
|
| Resizable Panels | `ResizablePanels` |
|
|
@@ -289,7 +304,7 @@ import { Button, Card, Modal } from "@juv/codego-react-ui"
|
|
|
289
304
|
| Section Block | `SectionBlock` |
|
|
290
305
|
| Select | `Select` |
|
|
291
306
|
| Skeleton | `Skeleton` |
|
|
292
|
-
| Slider | `Slider` |
|
|
307
|
+
| Slider | `Slider`, `RangeSlider` |
|
|
293
308
|
| Stat Card | `StatCard` |
|
|
294
309
|
| Stepper | `Stepper` |
|
|
295
310
|
| Table | `Table` |
|
|
@@ -301,6 +316,102 @@ import { Button, Card, Modal } from "@juv/codego-react-ui"
|
|
|
301
316
|
| Tooltip | `Tooltip` |
|
|
302
317
|
| Tree View | `TreeView` |
|
|
303
318
|
| Widget | `Widget` |
|
|
319
|
+
| Wizard | `Wizard` |
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## LeafletMap Props
|
|
324
|
+
|
|
325
|
+
| Prop | Type | Default | Description |
|
|
326
|
+
|---|---|---|---|
|
|
327
|
+
| `center` | `[number, number]` | `[51.505, -0.09]` | Map center `[lat, lng]`. |
|
|
328
|
+
| `zoom` | `number` | `13` | Initial zoom level. |
|
|
329
|
+
| `height` | `string \| number` | `480` | Map height in px or CSS string. |
|
|
330
|
+
| `markers` | `MapMarker[]` | `[]` | Array of markers to render. |
|
|
331
|
+
| `routes` | `MapRoute[]` | `[]` | Array of routes to draw via OSRM. |
|
|
332
|
+
| `cluster` | `boolean` | `false` | Enable marker clustering. |
|
|
333
|
+
| `clusterVariant` | `"default" \| "bubble" \| "donut"` | `"default"` | Cluster icon style. |
|
|
334
|
+
| `tileUrl` | `string` | OSM tiles | Custom tile URL template. |
|
|
335
|
+
| `tileAttribution` | `string` | OSM attribution | Custom tile attribution. |
|
|
336
|
+
| `darkTile` | `boolean` | `false` | Use CartoDB dark tile preset. |
|
|
337
|
+
| `className` | `string` | | Additional CSS classes on the wrapper. |
|
|
338
|
+
| `onMarkerClick` | `(marker: MapMarker) => void` | | Fired when a marker is clicked. |
|
|
339
|
+
|
|
340
|
+
### MapMarker
|
|
341
|
+
|
|
342
|
+
| Prop | Type | Required | Description |
|
|
343
|
+
|---|---|---|---|
|
|
344
|
+
| `id` | `string \| number` | ✓ | Unique marker identifier. |
|
|
345
|
+
| `lat` | `number` | ✓ | Latitude. |
|
|
346
|
+
| `lng` | `number` | ✓ | Longitude. |
|
|
347
|
+
| `label` | `string` | | Text shown in default popup. |
|
|
348
|
+
| `color` | `MarkerColor` | | Pin color: `primary` \| `info` \| `success` \| `warning` \| `danger` \| any hex. |
|
|
349
|
+
| `icon` | `string` | | Emoji or character rendered inside the pin. |
|
|
350
|
+
| `image` | `string` | | Image URL — renders a circular avatar pin. |
|
|
351
|
+
| `popup` | `React.ReactNode` | | Custom popup content. Overrides `label`. |
|
|
352
|
+
|
|
353
|
+
### MapRoute
|
|
354
|
+
|
|
355
|
+
| Prop | Type | Required | Description |
|
|
356
|
+
|---|---|---|---|
|
|
357
|
+
| `start` | `{ lat: number; lng: number }` | ✓ | Route start point. |
|
|
358
|
+
| `end` | `{ lat: number; lng: number }` | ✓ | Route end point. |
|
|
359
|
+
| `waypoints` | `{ lat: number; lng: number }[]` | | Intermediate waypoints. |
|
|
360
|
+
| `routeType` | `"drive" \| "walk"` | | Routing profile. Default `"drive"`. |
|
|
361
|
+
| `color` | `string` | | Line color hex. |
|
|
362
|
+
| `weight` | `number` | | Line weight in px. Default `5`. |
|
|
363
|
+
| `label` | `string` | | Label shown in start/end popups. |
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
## MapLibreMap Props
|
|
368
|
+
|
|
369
|
+
| Prop | Type | Default | Description |
|
|
370
|
+
|---|---|---|---|
|
|
371
|
+
| `style` | `MapLibreStyle` | `"street"` | Map style: `globe` \| `3d` \| `3d-globe` \| `street` \| `satellite` \| `dark` \| `light`. |
|
|
372
|
+
| `center` | `[number, number]` | `[0, 20]` | Initial center `[lng, lat]` (MapLibre order). |
|
|
373
|
+
| `zoom` | `number` | `2` | Initial zoom level. |
|
|
374
|
+
| `minZoom` | `number` | `0` | Minimum zoom level. |
|
|
375
|
+
| `maxZoom` | `number` | `22` | Maximum zoom level. |
|
|
376
|
+
| `pitch` | `number` | `0` | Camera pitch in degrees (0–85). Reactive. Auto `55` for `3d`/`3d-globe`. |
|
|
377
|
+
| `minPitch` | `number` | `0` | Minimum pitch constraint. |
|
|
378
|
+
| `maxPitch` | `number` | `85` | Maximum pitch constraint. |
|
|
379
|
+
| `bearing` | `number` | `0` | Camera bearing in degrees (-180–180). Reactive. Auto `-20` for `3d`/`3d-globe`. |
|
|
380
|
+
| `minBearing` | `number` | `-180` | Minimum bearing constraint. |
|
|
381
|
+
| `maxBearing` | `number` | `180` | Maximum bearing constraint. |
|
|
382
|
+
| `flyTo` | `FlyToOptions` | | Triggers animated camera flight when reference changes. |
|
|
383
|
+
| `markers` | `MapLibreMarker[]` | `[]` | Array of markers to render. |
|
|
384
|
+
| `height` | `string \| number` | `480` | Map height in px or CSS string. |
|
|
385
|
+
| `showControls` | `boolean` | `true` | Show navigation, scale, and fullscreen controls. |
|
|
386
|
+
| `showStyleSwitcher` | `boolean` | `true` | Show the bottom style switcher bar. |
|
|
387
|
+
| `showCameraControls` | `boolean` | `false` | Always show pitch/bearing slider panel. |
|
|
388
|
+
| `className` | `string` | | Additional CSS classes on the wrapper. |
|
|
389
|
+
| `onMarkerClick` | `(marker: MapLibreMarker) => void` | | Fired when a marker is clicked. |
|
|
390
|
+
|
|
391
|
+
### MapLibreMarker
|
|
392
|
+
|
|
393
|
+
| Prop | Type | Required | Description |
|
|
394
|
+
|---|---|---|---|
|
|
395
|
+
| `id` | `string \| number` | ✓ | Unique marker identifier. |
|
|
396
|
+
| `lat` | `number` | ✓ | Latitude. |
|
|
397
|
+
| `lng` | `number` | ✓ | Longitude. |
|
|
398
|
+
| `label` | `string` | | Text shown in default popup. |
|
|
399
|
+
| `color` | `string` | | Pin color: `primary` \| `info` \| `success` \| `warning` \| `danger` \| any hex. |
|
|
400
|
+
| `icon` | `string` | | Emoji or character rendered inside the pin. |
|
|
401
|
+
| `image` | `string` | | Image URL — renders a circular avatar pin. |
|
|
402
|
+
| `popup` | `string \| HTMLElement` | | Custom popup — HTML string or DOM element. Overrides `label`. |
|
|
403
|
+
|
|
404
|
+
### FlyToOptions
|
|
405
|
+
|
|
406
|
+
| Prop | Type | Default | Description |
|
|
407
|
+
|---|---|---|---|
|
|
408
|
+
| `center` | `[number, number]` | | Target center `[lng, lat]`. |
|
|
409
|
+
| `zoom` | `number` | | Target zoom level. |
|
|
410
|
+
| `pitch` | `number` | | Target pitch in degrees. Clamped to `minPitch`/`maxPitch`. |
|
|
411
|
+
| `bearing` | `number` | | Target bearing in degrees. Clamped to `minBearing`/`maxBearing`. |
|
|
412
|
+
| `duration` | `number` | `1500` | Animation duration in milliseconds. |
|
|
413
|
+
| `curve` | `number` | `1.42` | Zoom curve during flight. Higher = more zoom-out arc. |
|
|
414
|
+
| `essential` | `boolean` | `true` | If `true`, bypasses `prefers-reduced-motion`. |
|
|
304
415
|
|
|
305
416
|
---
|
|
306
417
|
|