diff --git a/.changeset/map-blocks.md b/.changeset/map-blocks.md new file mode 100644 index 000000000..191aaa759 --- /dev/null +++ b/.changeset/map-blocks.md @@ -0,0 +1,6 @@ +--- +"@tabler/preview": minor +"@tabler/docs": patch +--- + +Added the Map blocks page: a store locator, a delivery tracker, a live users map and a users by country card. diff --git a/docs/content/ui/components/map.mdx b/docs/content/ui/components/map.mdx index b40d110eb..243d7c80f 100644 --- a/docs/content/ui/components/map.mdx +++ b/docs/content/ui/components/map.mdx @@ -521,6 +521,10 @@ Drop the card body to let the map fill the whole card. Add `rounded` to the cont Live versions of these maps are on the [maps preview page](https://preview.tabler.io/maps.html). +### Blocks + +The [map blocks preview page](https://preview.tabler.io/map-blocks.html) has larger examples that pair a map with other components: a store locator with a searchable list, a delivery tracker with a route and a status card over the map, a world map of live users, and a vector map of users by country next to a table. + ## Using Mapbox GL JS MapLibre GL JS started as a fork of Mapbox GL JS, so the two share most of their API. To use Mapbox instead, load its script and stylesheet, replace `maplibregl` with `mapboxgl`, set `mapboxgl.accessToken` to your public token, and use a `mapbox://` style URL. diff --git a/preview/pages/map-blocks.astro b/preview/pages/map-blocks.astro new file mode 100644 index 000000000..4fbecb22e --- /dev/null +++ b/preview/pages/map-blocks.astro @@ -0,0 +1,29 @@ +--- +import DefaultLayout from '@shared/layouts/DefaultLayout.astro' +import MapPalette from '@components/demo/MapPalette.astro' +import MapStoreLocator from '@components/cards/MapStoreLocator.astro' +import MapDeliveryTracker from '@components/cards/MapDeliveryTracker.astro' +import MapLiveUsers from '@components/cards/MapLiveUsers.astro' +import MapUsersByCountry from '@components/cards/MapUsersByCountry.astro' +import DocsLink from '@ui/DocsLink.astro' +--- + + + + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
diff --git a/preview/pages/maps.astro b/preview/pages/maps.astro index 0f5279d31..ef8ac355f 100644 --- a/preview/pages/maps.astro +++ b/preview/pages/maps.astro @@ -80,24 +80,6 @@ const places = [ - - -
{ mapEntries.map(([mapId, data]) => diff --git a/screenshots/layouts/ScreenshotAppLayout.astro b/screenshots/layouts/ScreenshotAppLayout.astro index f671dfc55..611410472 100644 --- a/screenshots/layouts/ScreenshotAppLayout.astro +++ b/screenshots/layouts/ScreenshotAppLayout.astro @@ -92,12 +92,13 @@ const libModules = pageLibEntries.flatMap(([, lib]) => (lib.module ? [`import * + {/* Library styles first, so the Tabler overrides in tabler-vendors.css win (same order as BaseLayout) */} + {libCssFiles.map((href) => )} + {stylePlugins.map((plugin) => )} - {libCssFiles.map((href) => )} -