@mattilsynet/design 2.2.18 → 2.2.19

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.
Files changed (81) hide show
  1. package/mtds/atlas/atlas-element.d.ts +24 -0
  2. package/mtds/atlas/atlas-element.js +57 -0
  3. package/mtds/atlas/atlas-element.js.map +1 -0
  4. package/mtds/atlas/atlas.css.js +72 -0
  5. package/mtds/atlas/atlas.css.js.map +1 -0
  6. package/mtds/atlas/atlas.d.ts +14 -0
  7. package/mtds/atlas/atlas.stories.d.ts +16 -0
  8. package/mtds/atlas.d.ts +1 -0
  9. package/mtds/atlas.iife.js +745 -0
  10. package/mtds/atlas.js +5 -0
  11. package/mtds/atlas.js.map +1 -0
  12. package/mtds/illustrations/byggning-1-gronn.svg +1 -0
  13. package/mtds/illustrations/byggning-1-mattilsynet.svg +1 -0
  14. package/mtds/illustrations/byggning-2-gronn.svg +1 -0
  15. package/mtds/illustrations/byggning-3-gronn.svg +1 -0
  16. package/mtds/illustrations/byggning-4-gronn.svg +1 -0
  17. package/mtds/illustrations/byggning-5-gronn.svg +1 -0
  18. package/mtds/illustrations/byggning-6-blaa.svg +1 -0
  19. package/mtds/illustrations/byggning-7-blaa.svg +1 -0
  20. package/mtds/illustrations/byggning-8-blaa.svg +1 -0
  21. package/mtds/illustrations/byggningsrekke-1-gronn.svg +1 -0
  22. package/mtds/illustrations/byggningsrekke-1-mattilsynet.svg +1 -0
  23. package/mtds/illustrations/byggningsrekke-2-gronn.svg +1 -0
  24. package/mtds/illustrations/byggningsrekke-3-blaa.svg +1 -0
  25. package/mtds/illustrations/debatt.svg +1 -0
  26. package/mtds/illustrations/egg.svg +1 -0
  27. package/mtds/illustrations/flagg-aaland.svg +1 -0
  28. package/mtds/illustrations/flagg-danmark.svg +1 -0
  29. package/mtds/illustrations/flagg-faeroyene.svg +1 -0
  30. package/mtds/illustrations/flagg-finland.svg +1 -0
  31. package/mtds/illustrations/flagg-gronland.svg +1 -0
  32. package/mtds/illustrations/flagg-island.svg +1 -0
  33. package/mtds/illustrations/flagg-norge.svg +1 -0
  34. package/mtds/illustrations/flagg-sapmi.svg +1 -0
  35. package/mtds/illustrations/flagg-sverige.svg +1 -0
  36. package/mtds/illustrations/forstorrelsesglass.svg +1 -0
  37. package/mtds/illustrations/hengelas.svg +1 -0
  38. package/mtds/illustrations/kompass.svg +1 -0
  39. package/mtds/illustrations/skinke.svg +1 -0
  40. package/mtds/illustrations/system-stotte.svg +1 -0
  41. package/mtds/illustrations/system.svg +1 -0
  42. package/mtds/illustrations/tre-1.svg +1 -0
  43. package/mtds/illustrations/tre-2.svg +1 -0
  44. package/mtds/illustrations/tre-3.svg +1 -0
  45. package/mtds/index.d.ts +2 -0
  46. package/mtds/index.iife.js +15 -15
  47. package/mtds/index.js +20 -15
  48. package/mtds/index.js.map +1 -1
  49. package/mtds/law/law-helper.d.ts +29 -22
  50. package/mtds/law/law-helper.js +78 -0
  51. package/mtds/law/law-helper.js.map +1 -0
  52. package/mtds/law/law.d.ts +2 -18
  53. package/mtds/law/law.js +10 -0
  54. package/mtds/law/law.js.map +1 -0
  55. package/mtds/law/law.stories.d.ts +6 -0
  56. package/mtds/law/vinforskriften-new.d.ts +1 -0
  57. package/mtds/law/vinforskriften-old.d.ts +1 -0
  58. package/mtds/logo/logo-observer.js +1 -1
  59. package/mtds/logo/logo-observer.js.map +1 -1
  60. package/mtds/package.json.js +1 -1
  61. package/mtds/react.d.ts +1 -0
  62. package/mtds/react.js +53 -51
  63. package/mtds/react.js.map +1 -1
  64. package/mtds/styles.css +1 -1
  65. package/mtds/styles.json +43 -42
  66. package/mtds/styles.module.css.js +88 -86
  67. package/mtds/styles.module.css.js.map +1 -1
  68. package/mtds/utils.js +36 -30
  69. package/mtds/utils.js.map +1 -1
  70. package/package.json +13 -14
  71. package/mtds/law/vin.d.ts +0 -1
  72. package/mtds/map/map-element.d.ts +0 -47
  73. package/mtds/map/map-element.js +0 -82
  74. package/mtds/map/map-element.js.map +0 -1
  75. package/mtds/map/map.css.js +0 -46
  76. package/mtds/map/map.css.js.map +0 -1
  77. package/mtds/map/map.stories.d.ts +0 -10
  78. package/mtds/map.d.ts +0 -1
  79. package/mtds/map.iife.js +0 -722
  80. package/mtds/map.js +0 -8
  81. package/mtds/map.js.map +0 -1
@@ -0,0 +1,24 @@
1
+ import { MTDSElement } from '../utils';
2
+ import * as L from "leaflet";
3
+ import type * as ReactTypes from "react";
4
+ declare global {
5
+ namespace React.JSX {
6
+ interface IntrinsicElements {
7
+ "mtds-atlas": ReactTypes.DetailedHTMLProps<ReactTypes.HTMLAttributes<MTDSAtlasElement>, MTDSAtlasElement> & {
8
+ class?: string;
9
+ "data-view"?: string;
10
+ };
11
+ }
12
+ }
13
+ }
14
+ export declare class MTDSAtlasElement extends MTDSElement {
15
+ map?: L.Map;
16
+ tiles?: L.TileLayer;
17
+ cluster?: L.MarkerClusterGroup;
18
+ leaflet: typeof L;
19
+ static get observedAttributes(): string[];
20
+ constructor();
21
+ connectedCallback(): void;
22
+ addMarker(latlng: L.LatLngExpression, options?: L.MarkerOptions): L.Marker<any>;
23
+ disconnectedCallback(): void;
24
+ }
@@ -0,0 +1,57 @@
1
+ import * as e from "leaflet";
2
+ import c from "leaflet/dist/leaflet.css?raw";
3
+ import d from "leaflet.markercluster/dist/MarkerCluster.css?raw";
4
+ import "leaflet.markercluster";
5
+ import { IS_BROWSER as h, MTDSElement as p, tag as s, attr as a } from "../utils.js";
6
+ import u from "./atlas.css.js";
7
+ e.Marker.prototype.options.icon = e.divIcon({
8
+ html: '<svg class="map-pin" viewBox="0 0 256 256"><rect x="78" y="50" width="100" height="100" /><path fill="var(--mtds-)" d="M128,16a88.1,88.1,0,0,0-88,88c0,75.3,80,132.17,83.41,134.55a8,8,0,0,0,9.18,0C136,236.17,216,179.3,216,104A88.1,88.1,0,0,0,128,16Zm0,56a32,32,0,1,1-32,32A32,32,0,0,1,128,72Z"/></svg>',
9
+ iconAnchor: [15, 30],
10
+ iconSize: [30, 30]
11
+ });
12
+ const f = "57.95, 4.73, 71.19, 31.44, 15", v = "https://cache.kartverket.no/v1/wmts/1.0.0/topo/default/webmercator/{z}/{y}/{x}.png", w = "https://cache.kartverket.no/v1/wmts/1.0.0/topograatone/default/webmercator/{z}/{y}/{x}.png";
13
+ class g extends p {
14
+ map;
15
+ tiles;
16
+ cluster;
17
+ leaflet;
18
+ static get observedAttributes() {
19
+ return ["data-view", "data-layers", "data-tiles"];
20
+ }
21
+ constructor() {
22
+ super(), this.leaflet = e, this.attachShadow({ mode: "open" }).append(
23
+ s("style", {}, `${c}
24
+ ${d}
25
+ ${u}`),
26
+ s("slot"),
27
+ s("div")
28
+ );
29
+ }
30
+ connectedCallback() {
31
+ const t = JSON.parse(`[${a(this, "data-view") || f}]`), o = this.shadowRoot?.lastElementChild, r = Number(a(this, "data-cluster")) || 1, i = a(this, "data-tiles") === "color" ? v : w;
32
+ if (this.tiles = e.tileLayer(i, { maxZoom: 18 }), this.cluster = e.markerClusterGroup({
33
+ showCoverageOnHover: !1,
34
+ disableClusteringAtZoom: r
35
+ }), this.map = e.map(o, {
36
+ layers: [this.tiles, this.cluster],
37
+ attributionControl: !1,
38
+ wheelPxPerZoomLevel: 20,
39
+ zoomControl: !1,
40
+ zoomSnap: 0
41
+ }), this.map.addControl(e.control.zoom({ position: "bottomright" })), t.length === 3 && this.map.setView([t[0], t[1]], t[2]), t.length >= 4) {
42
+ const l = [t[0], t[1]], n = [t[2], t[3]], m = [t[4] ?? 0, t[5] ?? t[4] ?? 0];
43
+ this.map.fitBounds([l, n], { padding: m });
44
+ }
45
+ }
46
+ addMarker(t, o) {
47
+ return e.marker(t, o).addTo(this.cluster || this.map);
48
+ }
49
+ disconnectedCallback() {
50
+ this.map?.remove();
51
+ }
52
+ }
53
+ h && !window.customElements.get("mtds-atlas") && window.customElements.define("mtds-atlas", g);
54
+ export {
55
+ g as MTDSAtlasElement
56
+ };
57
+ //# sourceMappingURL=atlas-element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atlas-element.js","sources":["../../designsystem/atlas/atlas-element.ts"],"sourcesContent":["import * as L from \"leaflet\";\nimport LeafletCSS from \"leaflet/dist/leaflet.css?raw\";\nimport LeafletClusterCSS from \"leaflet.markercluster/dist/MarkerCluster.css?raw\";\nimport type * as ReactTypes from \"react\";\nimport \"leaflet.markercluster\";\n\nimport { attr, IS_BROWSER, MTDSElement, tag } from \"../utils\";\nimport css from \"./atlas.css?raw\";\n\ndeclare global {\n\tnamespace React.JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t\"mtds-atlas\": ReactTypes.DetailedHTMLProps<\n\t\t\t\tReactTypes.HTMLAttributes<MTDSAtlasElement>,\n\t\t\t\tMTDSAtlasElement\n\t\t\t> & {\n\t\t\t\tclass?: string;\n\t\t\t\t\"data-view\"?: string;\n\t\t\t};\n\t\t}\n\t}\n}\n\nL.Marker.prototype.options.icon = L.divIcon({\n\thtml: '<svg class=\"map-pin\" viewBox=\"0 0 256 256\"><rect x=\"78\" y=\"50\" width=\"100\" height=\"100\" /><path fill=\"var(--mtds-)\" d=\"M128,16a88.1,88.1,0,0,0-88,88c0,75.3,80,132.17,83.41,134.55a8,8,0,0,0,9.18,0C136,236.17,216,179.3,216,104A88.1,88.1,0,0,0,128,16Zm0,56a32,32,0,1,1-32,32A32,32,0,0,1,128,72Z\"/></svg>',\n\ticonAnchor: [15, 30],\n\ticonSize: [30, 30],\n});\n\n// const strToLatLng = (str?: string | null) =>\n// \t[0, 0, ...(str || \"\").split(\",\").map(parseFloat)].slice(-2) as L.LatLngTuple;\n\nconst VIEW_NORWAY = \"57.95, 4.73, 71.19, 31.44, 15\";\nconst TILES_COLOR =\n\t\"https://cache.kartverket.no/v1/wmts/1.0.0/topo/default/webmercator/{z}/{y}/{x}.png\";\nconst TILES_GRAY =\n\t\"https://cache.kartverket.no/v1/wmts/1.0.0/topograatone/default/webmercator/{z}/{y}/{x}.png\";\n\nexport class MTDSAtlasElement extends MTDSElement {\n\tmap?: L.Map;\n\ttiles?: L.TileLayer;\n\tcluster?: L.MarkerClusterGroup;\n\tleaflet: typeof L;\n\n\tstatic get observedAttributes() {\n\t\treturn [\"data-view\", \"data-layers\", \"data-tiles\"]; // Using ES2015 syntax for backwards compatibility\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.leaflet = L;\n\t\tthis.attachShadow({ mode: \"open\" }).append(\n\t\t\ttag(\"style\", {}, `${LeafletCSS}\\n${LeafletClusterCSS}\\n${css}`),\n\t\t\ttag(\"slot\"),\n\t\t\ttag(\"div\"),\n\t\t);\n\t}\n\tconnectedCallback() {\n\t\tconst view = JSON.parse(`[${attr(this, \"data-view\") || VIEW_NORWAY}]`);\n\t\tconst div = this.shadowRoot?.lastElementChild;\n\t\tconst cluster = Number(attr(this, \"data-cluster\")) || 1;\n\t\tconst tiles =\n\t\t\tattr(this, \"data-tiles\") === \"color\" ? TILES_COLOR : TILES_GRAY;\n\n\t\tthis.tiles = L.tileLayer(tiles, { maxZoom: 18 });\n\t\tthis.cluster = L.markerClusterGroup({\n\t\t\tshowCoverageOnHover: false,\n\t\t\tdisableClusteringAtZoom: cluster,\n\t\t});\n\n\t\tthis.map = L.map(div as HTMLElement, {\n\t\t\tlayers: [this.tiles, this.cluster],\n\t\t\tattributionControl: false,\n\t\t\twheelPxPerZoomLevel: 20,\n\t\t\tzoomControl: false,\n\t\t\tzoomSnap: 0,\n\t\t});\n\t\tthis.map.addControl(L.control.zoom({ position: \"bottomright\" }));\n\n\t\t// If no view is set, use Norway as default bounding box\n\t\tif (view.length === 3) this.map.setView([view[0], view[1]], view[2]);\n\t\tif (view.length >= 4) {\n\t\t\tconst nw = [view[0], view[1]] as L.LatLngTuple;\n\t\t\tconst se = [view[2], view[3]] as L.LatLngTuple;\n\t\t\tconst padding = [view[4] ?? 0, view[5] ?? view[4] ?? 0] as L.PointTuple;\n\t\t\tthis.map.fitBounds([nw, se], { padding });\n\t\t}\n\t}\n\taddMarker(latlng: L.LatLngExpression, options?: L.MarkerOptions) {\n\t\treturn L.marker(latlng, options).addTo(this.cluster || (this.map as L.Map));\n\t}\n\tdisconnectedCallback() {\n\t\tthis.map?.remove();\n\t}\n}\n\nif (IS_BROWSER && !window.customElements.get(\"mtds-atlas\"))\n\twindow.customElements.define(\"mtds-atlas\", MTDSAtlasElement);\n\n// export type Adresse = {\n// \tadressekode: number;\n// \tadressetekst: string;\n// \tbokstav: string;\n// \tbruksenhetsnummer: string[];\n// \tbruksnummer: number;\n// \tfestenummer: number;\n// \tgardsnummer: number;\n// \tkommunenavn: string;\n// \tkommunenummer: string;\n// \tnummer: number;\n// \tobjtype: string;\n// \toppdateringsdato: string;\n// \tpostnummer: string;\n// \tpoststed: string;\n// \trepresentasjonspunkt: {\n// \t\tepsg: string;\n// \t\tlat: number;\n// \t\tlon: number;\n// \t};\n// \tstedfestingverifisert: boolean;\n// \tundernummer: string | null;\n// };\n\n// // Hent punkt for adresse fra GeoNorge\n// export async function getPunktFraAdresse(\n// \tadresseSoek: string,\n// ): Promise<Adresse[]> {\n// \ttry {\n// \t\tconst response = await fetch(\n// \t\t\t`https://ws.geonorge.no/adresser/v1/sok?sok=${adresseSoek}&fuzzy=false&utkoordsys=3857&treffPerSide=100&asciiKompatibel=true`,\n// \t\t);\n// \t\tconst jsonresponse = await response.json();\n// \t\tif (jsonresponse.adresser.length > 0) {\n// \t\t\treturn jsonresponse.adresser.map((adresse: Adresse) => ({\n// \t\t\t\tadressekode: adresse.adressekode,\n// \t\t\t\tadressetekst: adresse.adressetekst,\n// \t\t\t\tbokstav: adresse.bokstav,\n// \t\t\t\tbruksenhetsnummer: adresse.bruksenhetsnummer,\n// \t\t\t\tbruksnummer: adresse.bruksnummer,\n// \t\t\t\tfestenummer: adresse.festenummer,\n// \t\t\t\tgardsnummer: adresse.gardsnummer,\n// \t\t\t\tkommunenavn: adresse.kommunenavn,\n// \t\t\t\tkommunenummer: adresse.kommunenummer,\n// \t\t\t\tnummer: adresse.nummer,\n// \t\t\t\tobjtype: adresse.objtype,\n// \t\t\t\toppdateringsdato: adresse.oppdateringsdato,\n// \t\t\t\tpostnummer: adresse.postnummer,\n// \t\t\t\tpoststed: adresse.poststed,\n// \t\t\t\trepresentasjonspunkt: {\n// \t\t\t\t\tepsg: adresse.representasjonspunkt.epsg,\n// \t\t\t\t\tlat: adresse.representasjonspunkt.lat,\n// \t\t\t\t\tlon: adresse.representasjonspunkt.lon,\n// \t\t\t\t},\n// \t\t\t}));\n// \t\t} else {\n// \t\t\treturn [];\n// \t\t}\n// \t} catch (error) {\n// \t\tconsole.log(`Feilet i å hente adresse fra punkt: ${error}`);\n// \t\treturn [];\n// \t}\n// }\n"],"names":["L","VIEW_NORWAY","TILES_COLOR","TILES_GRAY","MTDSAtlasElement","MTDSElement","tag","LeafletCSS","LeafletClusterCSS","css","view","attr","div","cluster","tiles","nw","se","padding","latlng","options","IS_BROWSER"],"mappings":";;;;;;AAuBAA,EAAE,OAAO,UAAU,QAAQ,OAAOA,EAAE,QAAQ;AAAA,EAC3C,MAAM;AAAA,EACN,YAAY,CAAC,IAAI,EAAE;AAAA,EACnB,UAAU,CAAC,IAAI,EAAE;AAClB,CAAC;AAKD,MAAMC,IAAc,iCACdC,IACL,sFACKC,IACL;AAEM,MAAMC,UAAyBC,EAAY;AAAA,EACjD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,WAAW,qBAAqB;AAC/B,WAAO,CAAC,aAAa,eAAe,YAAY;AAAA,EACjD;AAAA,EAEA,cAAc;AACb,UAAA,GACA,KAAK,UAAUL,GACf,KAAK,aAAa,EAAE,MAAM,OAAA,CAAQ,EAAE;AAAA,MACnCM,EAAI,SAAS,IAAI,GAAGC,CAAU;AAAA,EAAKC,CAAiB;AAAA,EAAKC,CAAG,EAAE;AAAA,MAC9DH,EAAI,MAAM;AAAA,MACVA,EAAI,KAAK;AAAA,IAAA;AAAA,EAEX;AAAA,EACA,oBAAoB;AACnB,UAAMI,IAAO,KAAK,MAAM,IAAIC,EAAK,MAAM,WAAW,KAAKV,CAAW,GAAG,GAC/DW,IAAM,KAAK,YAAY,kBACvBC,IAAU,OAAOF,EAAK,MAAM,cAAc,CAAC,KAAK,GAChDG,IACLH,EAAK,MAAM,YAAY,MAAM,UAAUT,IAAcC;AAmBtD,QAjBA,KAAK,QAAQH,EAAE,UAAUc,GAAO,EAAE,SAAS,IAAI,GAC/C,KAAK,UAAUd,EAAE,mBAAmB;AAAA,MACnC,qBAAqB;AAAA,MACrB,yBAAyBa;AAAA,IAAA,CACzB,GAED,KAAK,MAAMb,EAAE,IAAIY,GAAoB;AAAA,MACpC,QAAQ,CAAC,KAAK,OAAO,KAAK,OAAO;AAAA,MACjC,oBAAoB;AAAA,MACpB,qBAAqB;AAAA,MACrB,aAAa;AAAA,MACb,UAAU;AAAA,IAAA,CACV,GACD,KAAK,IAAI,WAAWZ,EAAE,QAAQ,KAAK,EAAE,UAAU,cAAA,CAAe,CAAC,GAG3DU,EAAK,WAAW,KAAG,KAAK,IAAI,QAAQ,CAACA,EAAK,CAAC,GAAGA,EAAK,CAAC,CAAC,GAAGA,EAAK,CAAC,CAAC,GAC/DA,EAAK,UAAU,GAAG;AACrB,YAAMK,IAAK,CAACL,EAAK,CAAC,GAAGA,EAAK,CAAC,CAAC,GACtBM,IAAK,CAACN,EAAK,CAAC,GAAGA,EAAK,CAAC,CAAC,GACtBO,IAAU,CAACP,EAAK,CAAC,KAAK,GAAGA,EAAK,CAAC,KAAKA,EAAK,CAAC,KAAK,CAAC;AACtD,WAAK,IAAI,UAAU,CAACK,GAAIC,CAAE,GAAG,EAAE,SAAAC,GAAS;AAAA,IACzC;AAAA,EACD;AAAA,EACA,UAAUC,GAA4BC,GAA2B;AAChE,WAAOnB,EAAE,OAAOkB,GAAQC,CAAO,EAAE,MAAM,KAAK,WAAY,KAAK,GAAa;AAAA,EAC3E;AAAA,EACA,uBAAuB;AACtB,SAAK,KAAK,OAAA;AAAA,EACX;AACD;AAEIC,KAAc,CAAC,OAAO,eAAe,IAAI,YAAY,KACxD,OAAO,eAAe,OAAO,cAAchB,CAAgB;"}
@@ -0,0 +1,72 @@
1
+ const t = `:host {
2
+ --mtdsc-atlas-background: var(--mtds-color-surface-default);
3
+ --mtdsc-atlas-cluster-size: var(--mtds-8);
4
+
5
+ aspect-ratio: 2; /* TODO: make possible to overwrite */
6
+ border-radius: var(--mtds-border-radius-md);
7
+ border: 1px solid var(--mtds-color-border-subtle);
8
+ overflow: clip;
9
+ position: relative;
10
+ user-select: none;
11
+ }
12
+ :host(:not([hidden])) {
13
+ display: grid;
14
+ }
15
+
16
+ :host([data-cursor="pointer"]) .leaflet-grab {
17
+ cursor: pointer;
18
+ }
19
+ :host([data-tiles="color"]) {
20
+ --mtdsc-atlas-background: #e0fefe;
21
+ }
22
+ :host([data-tiles="grayscale"]) .leaflet-tile-container,
23
+ :host(:not([data-tiles])) .leaflet-tile-container {
24
+ filter: contrast(0.75) brightness(1.15);
25
+ }
26
+ slot {
27
+ display: grid;
28
+ inset: var(--mtds-3);
29
+ pointer-events: none; /* Ensure slot does not stop pointer from reaching leaflet */
30
+ position: absolute;
31
+ z-index: 2;
32
+ }
33
+ ::slotted(*) {
34
+ pointer-events: all; /* But let children of slot stop pointer from reaching leaflet */
35
+ }
36
+ .leaflet-div-icon {
37
+ background: none;
38
+ border: 0;
39
+ }
40
+ .leaflet-container {
41
+ font: inherit;
42
+ background: var(--mtdsc-atlas-background);
43
+ outline: 0;
44
+ }
45
+ .map-pin rect {
46
+ fill: var(--mtds-color-base-contrast-default);
47
+ }
48
+ .map-pin path {
49
+ fill: var(--mtds-color-base-default);
50
+ }
51
+
52
+ .marker-cluster {
53
+ background-color: var(--mtds-color-base-default);
54
+ border-radius: 100%;
55
+ color: var(--mtds-color-base-contrast-default);
56
+ font-weight: 500;
57
+ font-size: var(--mtds-body-xs-font-size);
58
+ line-height: var(--mtdsc-atlas-cluster-size);
59
+ text-align: center;
60
+
61
+ /* biome-ignore lint/complexity/noImportantStyles: need to overwrite style attribute */
62
+ width: var(--mtdsc-atlas-cluster-size) !important;
63
+ /* biome-ignore lint/complexity/noImportantStyles: need to overwrite style attribute */
64
+ height: var(--mtdsc-atlas-cluster-size) !important;
65
+ /* biome-ignore lint/complexity/noImportantStyles: need to overwrite style attribute */
66
+ margin: calc(var(--mtdsc-atlas-cluster-size) / -2) !important;
67
+ }
68
+ `;
69
+ export {
70
+ t as default
71
+ };
72
+ //# sourceMappingURL=atlas.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atlas.css.js","sources":["../../designsystem/atlas/atlas.css?raw"],"sourcesContent":["export default \":host {\\n\\t--mtdsc-atlas-background: var(--ds-color-surface-default);\\n\\t--mtdsc-atlas-cluster-size: var(--mtds-8);\\n\\n\\taspect-ratio: 2; /* TODO: make possible to overwrite */\\n\\tborder-radius: var(--ds-border-radius-md);\\n\\tborder: 1px solid var(--ds-color-border-subtle);\\n\\toverflow: clip;\\n\\tposition: relative;\\n\\tuser-select: none;\\n}\\n:host(:not([hidden])) {\\n\\tdisplay: grid;\\n}\\n\\n:host([data-cursor=\\\"pointer\\\"]) .leaflet-grab {\\n\\tcursor: pointer;\\n}\\n:host([data-tiles=\\\"color\\\"]) {\\n\\t--mtdsc-atlas-background: #e0fefe;\\n}\\n:host([data-tiles=\\\"grayscale\\\"]) .leaflet-tile-container,\\n:host(:not([data-tiles])) .leaflet-tile-container {\\n\\tfilter: contrast(0.75) brightness(1.15);\\n}\\nslot {\\n\\tdisplay: grid;\\n\\tinset: var(--mtds-3);\\n\\tpointer-events: none; /* Ensure slot does not stop pointer from reaching leaflet */\\n\\tposition: absolute;\\n\\tz-index: 2;\\n}\\n::slotted(*) {\\n\\tpointer-events: all; /* But let children of slot stop pointer from reaching leaflet */\\n}\\n.leaflet-div-icon {\\n\\tbackground: none;\\n\\tborder: 0;\\n}\\n.leaflet-container {\\n\\tfont: inherit;\\n\\tbackground: var(--mtdsc-atlas-background);\\n\\toutline: 0;\\n}\\n.map-pin rect {\\n\\tfill: var(--ds-color-base-contrast-default);\\n}\\n.map-pin path {\\n\\tfill: var(--ds-color-base-default);\\n}\\n\\n.marker-cluster {\\n\\tbackground-color: var(--mtds-color-base-default);\\n\\tborder-radius: 100%;\\n\\tcolor: var(--mtds-color-base-contrast-default);\\n\\tfont-weight: 500;\\n\\tfont-size: var(--ds-body-xs-font-size);\\n\\tline-height: var(--mtdsc-atlas-cluster-size);\\n\\ttext-align: center;\\n\\n\\t/* biome-ignore lint/complexity/noImportantStyles: need to overwrite style attribute */\\n\\twidth: var(--mtdsc-atlas-cluster-size) !important;\\n\\t/* biome-ignore lint/complexity/noImportantStyles: need to overwrite style attribute */\\n\\theight: var(--mtdsc-atlas-cluster-size) !important;\\n\\t/* biome-ignore lint/complexity/noImportantStyles: need to overwrite style attribute */\\n\\tmargin: calc(var(--mtdsc-atlas-cluster-size) / -2) !important;\\n}\\n\""],"names":["css"],"mappings":"AAAA,MAAAA,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -0,0 +1,14 @@
1
+ import { MTDSAtlasElement } from './atlas-element';
2
+ import type * as ReactTypes from "react";
3
+ declare global {
4
+ namespace React.JSX {
5
+ interface IntrinsicElements {
6
+ "mtds-atlas": AtlasProps;
7
+ }
8
+ }
9
+ }
10
+ export type AtlasProps = ReactTypes.DetailedHTMLProps<ReactTypes.HTMLAttributes<MTDSAtlasElement>, MTDSAtlasElement> & {
11
+ class?: string;
12
+ "data-view"?: string;
13
+ };
14
+ export declare const Atlas: ReactTypes.ForwardRefExoticComponent<Omit<AtlasProps, "ref"> & ReactTypes.RefAttributes<MTDSAtlasElement>>;
@@ -0,0 +1,16 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ };
7
+ };
8
+ export default meta;
9
+ type Story = StoryObj<typeof meta>;
10
+ export declare const Default: Story;
11
+ export declare const WithView: Story;
12
+ export declare const WithColor: Story;
13
+ export declare const WithCustomSize: Story;
14
+ export declare const WithMarker: Story;
15
+ export declare const WithClickToMarker: Story;
16
+ export declare const WithClustering: Story;
@@ -0,0 +1 @@
1
+ export * from './atlas/atlas-element';