@mattilsynet/design 3.1.10 → 3.1.12
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/mtds/atlas/atlas-element.js +29 -36
- package/mtds/atlas/atlas-element.js.map +1 -1
- package/mtds/atlas.iife.js +4 -4
- package/mtds/atlas.js +8 -8
- package/mtds/chart/chart-axis.js +16 -15
- package/mtds/chart/chart-axis.js.map +1 -1
- package/mtds/chart/chart-bars.js +16 -18
- package/mtds/chart/chart-bars.js.map +1 -1
- package/mtds/chart/chart-element.d.ts +1 -1
- package/mtds/chart/chart-element.js +35 -34
- package/mtds/chart/chart-element.js.map +1 -1
- package/mtds/chart/chart-lines.js +29 -34
- package/mtds/chart/chart-lines.js.map +1 -1
- package/mtds/chart/chart-pies.js +11 -11
- package/mtds/chart/chart-pies.js.map +1 -1
- package/mtds/chart/chart.stories.d.ts +1 -0
- package/mtds/deprecations.js +3 -3
- package/mtds/external/robust-predicates/esm/orient2d.js +1 -1
- package/mtds/index.iife.js +17 -17
- package/mtds/package.json.js +1 -1
- package/mtds/popover/popover-observer.js +8 -8
- package/mtds/popover/popover-observer.js.map +1 -1
- package/mtds/react-atlas.js +11 -11
- package/mtds/styles.css +1 -1
- package/mtds/utils.d.ts +7 -0
- package/mtds/utils.js +47 -40
- package/mtds/utils.js.map +1 -1
- package/mtds/validation/validation-observer.js +45 -34
- package/mtds/validation/validation-observer.js.map +1 -1
- package/package.json +6 -6
package/mtds/package.json.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { onHotReload as
|
|
2
|
-
function
|
|
3
|
-
const o =
|
|
4
|
-
if (o && e instanceof HTMLElement && e.popover) {
|
|
5
|
-
const n = c(o, "popovertargetaction"),
|
|
6
|
-
e.togglePopover(
|
|
1
|
+
import { onHotReload as i, on as s, attr as c } from "../utils.js";
|
|
2
|
+
function l({ target: r }) {
|
|
3
|
+
const o = r?.closest?.('a,button,[role="button"]'), t = o && c(o, "popovertarget"), e = t ? document.getElementById(t) : o?.closest("[popover]");
|
|
4
|
+
if (!(t && o instanceof HTMLButtonElement) && o && e instanceof HTMLElement && e.popover) {
|
|
5
|
+
const n = c(o, "popovertargetaction"), p = n === "show" || (n === "hide" ? !1 : void 0);
|
|
6
|
+
e.togglePopover(p);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
i("popover", () => [
|
|
10
|
+
s(document, "click", l)
|
|
11
11
|
// Allow `<a>` to use `popovertarget` as well
|
|
12
12
|
]);
|
|
13
13
|
//# sourceMappingURL=popover-observer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-observer.js","sources":["../../designsystem/popover/popover-observer.ts"],"sourcesContent":["import { attr, on, onHotReload } from \"../utils\";\n\n// Polyfill popovertarget for <a> (not supported by native)\n// and automatically assume popovertarget is the closest parent popover\n// but respect the popovertarget and popovertargetaction attribute\nfunction handlePopoverClick({ target }: Event) {\n\tconst
|
|
1
|
+
{"version":3,"file":"popover-observer.js","sources":["../../designsystem/popover/popover-observer.ts"],"sourcesContent":["import { attr, on, onHotReload } from \"../utils\";\n\n// Polyfill popovertarget for <a> (not supported by native)\n// and automatically assume popovertarget is the closest parent popover\n// but respect the popovertarget and popovertargetaction attribute\nfunction handlePopoverClick({ target }: Event) {\n\tconst trigger = (target as Element)?.closest?.(`a,button,[role=\"button\"]`);\n\tconst id = trigger && attr(trigger, \"popovertarget\");\n\tconst pop = id ? document.getElementById(id) : trigger?.closest(\"[popover]\");\n\n\tif (id && trigger instanceof HTMLButtonElement) return; // Native support for buttons with popovertarget, only polyfill for <a> or missing popovertarget\n\tif (trigger && pop instanceof HTMLElement && pop.popover) {\n\t\tconst action = attr(trigger, \"popovertargetaction\");\n\t\tconst open = action === \"show\" || (action === \"hide\" ? false : undefined);\n\t\tpop.togglePopover(open);\n\t}\n}\n\nonHotReload(\"popover\", () => [\n\ton(document, \"click\", handlePopoverClick), // Allow `<a>` to use `popovertarget` as well\n]);\n"],"names":["handlePopoverClick","target","trigger","id","attr","pop","action","open","onHotReload","on"],"mappings":";AAKA,SAASA,EAAmB,EAAE,QAAAC,KAAiB;AAC9C,QAAMC,IAAWD,GAAoB,UAAU,0BAA0B,GACnEE,IAAKD,KAAWE,EAAKF,GAAS,eAAe,GAC7CG,IAAMF,IAAK,SAAS,eAAeA,CAAE,IAAID,GAAS,QAAQ,WAAW;AAE3E,MAAI,EAAAC,KAAMD,aAAmB,sBACzBA,KAAWG,aAAe,eAAeA,EAAI,SAAS;AACzD,UAAMC,IAASF,EAAKF,GAAS,qBAAqB,GAC5CK,IAAOD,MAAW,WAAWA,MAAW,SAAS,KAAQ;AAC/D,IAAAD,EAAI,cAAcE,CAAI;AAAA,EACvB;AACD;AAEAC,EAAY,WAAW,MAAM;AAAA,EAC5BC,EAAG,UAAU,SAAST,CAAkB;AAAA;AACzC,CAAC;"}
|
package/mtds/react-atlas.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Atlas as r } from "./atlas/atlas.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { default as l } from "./external/leaflet/dist/leaflet-src.js";
|
|
3
|
+
import { MATGEO_URL as a, MTDSAtlasElement as M } from "./atlas/atlas-element.js";
|
|
4
|
+
import { MTDSAtlasMarkerElement as p } from "./atlas/atlas-marker.js";
|
|
5
|
+
import { MTDSAtlasMatgeoElement as x } from "./atlas/atlas-matgeo.js";
|
|
6
|
+
import { MTDSAtlasWMSElement as E } from "./atlas/atlas-wms.js";
|
|
7
7
|
export {
|
|
8
8
|
r as Atlas,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
l as L,
|
|
10
|
+
a as MATGEO_URL,
|
|
11
|
+
M as MTDSAtlasElement,
|
|
12
|
+
p as MTDSAtlasMarkerElement,
|
|
13
|
+
x as MTDSAtlasMatgeoElement,
|
|
14
|
+
E as MTDSAtlasWMSElement
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=react-atlas.js.map
|