@mattilsynet/design 2.2.0 → 2.2.2
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/app/app-observer.js +1 -1
- package/mtds/app/app-toggle.js +10 -26
- package/mtds/app/app-toggle.js.map +1 -1
- package/mtds/app/app-toggle2.js +26 -10
- package/mtds/app/app-toggle2.js.map +1 -1
- package/mtds/app/app.js +1 -1
- package/mtds/illustrations/bucket-feed.svg +1 -0
- package/mtds/illustrations/index.json +20 -0
- package/mtds/illustrations/supplement-group.svg +1 -0
- package/mtds/illustrations/supplement-jar.svg +1 -0
- package/mtds/illustrations/supplement-tube.svg +1 -0
- package/mtds/index.d.ts +0 -22
- package/mtds/index.iife.js +16 -16
- package/mtds/map/map.stories.d.ts +10 -0
- package/mtds/package.json.js +1 -1
- package/mtds/popover/popover-observer.js +15 -12
- package/mtds/popover/popover-observer.js.map +1 -1
- package/mtds/styles.css +1 -1
- package/mtds/styles.json +41 -63
- package/mtds/styles.module.css.js +100 -138
- package/mtds/styles.module.css.js.map +1 -1
- package/mtds/utils.js +34 -33
- package/mtds/utils.js.map +1 -1
- package/package.json +2 -1
package/mtds/app/app-observer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import S from "../styles.module.css.js";
|
|
2
2
|
import { onLoaded as _, onMutation as P, on as r, QUICK_EVENT as p, debounce as E } from "../utils.js";
|
|
3
|
-
import "./app-
|
|
3
|
+
import "./app-toggle.js";
|
|
4
4
|
const g = S.app.split(" ")[0], h = S.sticky.split(" ")[0], I = '[data-command="toggle-app-expanded"]', y = `.${g} > dialog,.${g} dialog ~ main`, C = (t) => {
|
|
5
5
|
document.startViewTransition ? document.startViewTransition(t) : t();
|
|
6
6
|
}, x = (t) => (
|
package/mtds/app/app-toggle.js
CHANGED
|
@@ -1,27 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
document.adoptedStyleSheets.push(sheet);
|
|
12
|
-
window.mtdsToggleAppExpanded = (force) => {
|
|
13
|
-
try {
|
|
14
|
-
const next = force ?? !prev();
|
|
15
|
-
sheet.replaceSync?.(\`:root { \${key}: var(\${key}--\${next})}\`);
|
|
16
|
-
window.localStorage.setItem(key, next);
|
|
17
|
-
} catch (_err) {} // localStorage is full or replaceSync is not supported
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
// Set and store initial state
|
|
21
|
-
window.mtdsToggleAppExpanded(prev());
|
|
22
|
-
})();
|
|
23
|
-
`;
|
|
24
|
-
export {
|
|
25
|
-
t as default
|
|
26
|
-
};
|
|
1
|
+
typeof window < "u" && window.CSSStyleSheet && document.adoptedStyleSheets && (() => {
|
|
2
|
+
const e = "--mtds-app-expanded", d = new CSSStyleSheet(), o = () => !window.localStorage.getItem(e)?.includes("false");
|
|
3
|
+
document.adoptedStyleSheets.push(d), window.mtdsToggleAppExpanded = (n) => {
|
|
4
|
+
try {
|
|
5
|
+
const t = n ?? !o();
|
|
6
|
+
d.replaceSync?.(`:root { ${e}: var(${e}--${t})}`), window.localStorage.setItem(e, t);
|
|
7
|
+
} catch {
|
|
8
|
+
}
|
|
9
|
+
}, window.mtdsToggleAppExpanded(o());
|
|
10
|
+
})();
|
|
27
11
|
//# sourceMappingURL=app-toggle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-toggle.js","sources":["../../designsystem/app/app-toggle.js
|
|
1
|
+
{"version":3,"file":"app-toggle.js","sources":["../../designsystem/app/app-toggle.js"],"sourcesContent":["if (\n\ttypeof window !== \"undefined\" &&\n\twindow.CSSStyleSheet &&\n\tdocument.adoptedStyleSheets\n)\n\t(() => {\n\t\tconst key = \"--mtds-app-expanded\";\n\t\tconst sheet = new CSSStyleSheet();\n\t\tconst prev = () => !window.localStorage.getItem(key)?.includes(\"false\");\n\n\t\tdocument.adoptedStyleSheets.push(sheet);\n\t\twindow.mtdsToggleAppExpanded = (force) => {\n\t\t\ttry {\n\t\t\t\tconst next = force ?? !prev();\n\t\t\t\tsheet.replaceSync?.(`:root { ${key}: var(${key}--${next})}`);\n\t\t\t\twindow.localStorage.setItem(key, next);\n\t\t\t} catch (_err) {} // localStorage is full or replaceSync is not supported\n\t\t};\n\n\t\t// Set and store initial state\n\t\twindow.mtdsToggleAppExpanded(prev());\n\t})();\n"],"names":["key","sheet","prev","force","next"],"mappings":"AACC,OAAO,SAAW,OAClB,OAAO,iBACP,SAAS,uBAER,MAAM;AACN,QAAMA,IAAM,uBACNC,IAAQ,IAAI,cAAa,GACzBC,IAAO,MAAM,CAAC,OAAO,aAAa,QAAQF,CAAG,GAAG,SAAS,OAAO;AAEtE,WAAS,mBAAmB,KAAKC,CAAK,GACtC,OAAO,wBAAwB,CAACE,MAAU;AACzC,QAAI;AACH,YAAMC,IAAOD,KAAS,CAACD,EAAI;AAC3B,MAAAD,EAAM,cAAc,WAAWD,CAAG,SAASA,CAAG,KAAKI,CAAI,IAAI,GAC3D,OAAO,aAAa,QAAQJ,GAAKI,CAAI;AAAA,IACtC,QAAe;AAAA,IAAC;AAAA,EACjB,GAGA,OAAO,sBAAsBF,GAAM;AACpC,GAAC;"}
|
package/mtds/app/app-toggle2.js
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
const t = `if (
|
|
2
|
+
typeof window !== "undefined" &&
|
|
3
|
+
window.CSSStyleSheet &&
|
|
4
|
+
document.adoptedStyleSheets
|
|
5
|
+
)
|
|
6
|
+
(() => {
|
|
7
|
+
const key = "--mtds-app-expanded";
|
|
8
|
+
const sheet = new CSSStyleSheet();
|
|
9
|
+
const prev = () => !window.localStorage.getItem(key)?.includes("false");
|
|
10
|
+
|
|
11
|
+
document.adoptedStyleSheets.push(sheet);
|
|
12
|
+
window.mtdsToggleAppExpanded = (force) => {
|
|
13
|
+
try {
|
|
14
|
+
const next = force ?? !prev();
|
|
15
|
+
sheet.replaceSync?.(\`:root { \${key}: var(\${key}--\${next})}\`);
|
|
16
|
+
window.localStorage.setItem(key, next);
|
|
17
|
+
} catch (_err) {} // localStorage is full or replaceSync is not supported
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// Set and store initial state
|
|
21
|
+
window.mtdsToggleAppExpanded(prev());
|
|
22
|
+
})();
|
|
23
|
+
`;
|
|
24
|
+
export {
|
|
25
|
+
t as default
|
|
26
|
+
};
|
|
11
27
|
//# sourceMappingURL=app-toggle2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-toggle2.js","sources":["../../designsystem/app/app-toggle.js"],"sourcesContent":["if (
|
|
1
|
+
{"version":3,"file":"app-toggle2.js","sources":["../../designsystem/app/app-toggle.js?raw"],"sourcesContent":["export default \"if (\\n\\ttypeof window !== \\\"undefined\\\" &&\\n\\twindow.CSSStyleSheet &&\\n\\tdocument.adoptedStyleSheets\\n)\\n\\t(() => {\\n\\t\\tconst key = \\\"--mtds-app-expanded\\\";\\n\\t\\tconst sheet = new CSSStyleSheet();\\n\\t\\tconst prev = () => !window.localStorage.getItem(key)?.includes(\\\"false\\\");\\n\\n\\t\\tdocument.adoptedStyleSheets.push(sheet);\\n\\t\\twindow.mtdsToggleAppExpanded = (force) => {\\n\\t\\t\\ttry {\\n\\t\\t\\t\\tconst next = force ?? !prev();\\n\\t\\t\\t\\tsheet.replaceSync?.(`:root { ${key}: var(${key}--${next})}`);\\n\\t\\t\\t\\twindow.localStorage.setItem(key, next);\\n\\t\\t\\t} catch (_err) {} // localStorage is full or replaceSync is not supported\\n\\t\\t};\\n\\n\\t\\t// Set and store initial state\\n\\t\\twindow.mtdsToggleAppExpanded(prev());\\n\\t})();\\n\""],"names":["script"],"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;"}
|
package/mtds/app/app.js
CHANGED
|
@@ -33,7 +33,7 @@ import "../togglegroup/togglegroup.js";
|
|
|
33
33
|
import "../typography/typography.js";
|
|
34
34
|
import "../validation/validation.js";
|
|
35
35
|
import a from "../styles.module.css.js";
|
|
36
|
-
import d from "./app-
|
|
36
|
+
import d from "./app-toggle2.js";
|
|
37
37
|
const f = p(function({ as: t, className: r, ...m }, n) {
|
|
38
38
|
return /* @__PURE__ */ o(t || "div", { className: e(a.app, r), ref: n, ...m });
|
|
39
39
|
}), u = p(function({ as: t, className: r, ...m }, n) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="233" height="386" fill="none" viewBox="0 0 233 386"><path fill="#116E6B" d="M14.54 168.68c0-16.86.83-57.32 12.82-90.24 10.88-29.9 33.1-50.9 48.65-58.65 15.54-7.7 63.55-14.96 91.78 5.23 28.23 20.19 38.96 50.96 41.43 62.2 2.48 11.26 9.18 50.23 6.7 81.46l9.9 2.82s0-30.54-1.41-48.45c-1.42-17.91-8.13-55.83-21.2-75.84C190.14 27.2 170.71 2.63 124.42.17c-46.27-2.46-73.5 22.8-87.99 39.66C21.94 56.69 9.77 81.62 6.86 112.52s-2.04 44.24-.7 61.8l8.38-5.61v-.03Z"/><path fill="#116E6B" d="M229.49 158.79c0 13.84-51.1 25.08-114.11 25.08S1.27 172.62 1.27 158.8c0 0 3.79 33.38 4.9 56.5.97 20.7 8.37 99 8.7 102.86.73 8.05 3.36 30.96 3.36 30.96 0 20.36 43.34 36.89 96.78 36.89 53.45 0 95.96-16.86 96.79-36.9 0 0 3.14-31.54 5.2-51.88 1.76-17.32 3.82-62.9 6.25-85.3 1.41-13.14 6.24-53.13 6.24-53.13Z"/><path fill="#F4ECE6" d="m96.71 78.64 14.91 2.06c1 .14 1.7 1.05 1.56 2.05l-.93 6.72 10.9 2.24 17.8-12.28a1.82 1.82 0 0 1 2.54.46l8.55 12.4c.57.82.36 1.95-.46 2.53l-3.07 2.1 5 1.03 10.17-.49c1-.04 1.86.73 1.9 1.74l.18 3.6 4.53-3.12a1.82 1.82 0 0 1 2.54.47l8.55 12.38c.57.83.36 1.97-.47 2.54l-2.66 1.84 9.97 8.12 7.4-5.1a1.82 1.82 0 0 1 2.53.47l8.55 12.38c.25.38.35.8.31 1.22l7.2-1.96c.97-.27 1.97.3 2.24 1.28l3.76 13.73c8.17 3.9 12.79 8.31 12.79 12.99 0 15.73-52.16 28.48-116.5 28.48S0 175.77 0 160.04c0-2.7 1.54-5.31 4.4-7.79v-5.2l-.47-.14a1.82 1.82 0 0 1-1.26-2.25l4.1-14.48A1.82 1.82 0 0 1 9 128.92l13.75 3.88 3.2-2.2-.54-11.1c-.05-1.01.72-1.87 1.73-1.92l13.82-.66c-.04-.25-.03-.52.05-.78l4.1-14.48a1.82 1.82 0 0 1 2.24-1.26l15.86 4.49 22.23-15.34a1.82 1.82 0 0 1 2.54.47l4.42 6.41 2.24-16.23c.14-1 1.06-1.7 2.06-1.56Z"/></svg>
|
|
@@ -126,6 +126,18 @@
|
|
|
126
126
|
"categories": ["Kosmetikk"],
|
|
127
127
|
"tags": ["tube", "håndkrem", "ansiktskrem", "hudkrem", "hudpleieprodukt"]
|
|
128
128
|
},
|
|
129
|
+
"supplement-jar.svg": {
|
|
130
|
+
"categories": ["Kosttilskudd"],
|
|
131
|
+
"tags": ["krukke", "glass", "kosttilskudd", "burk"]
|
|
132
|
+
},
|
|
133
|
+
"supplement-tube.svg": {
|
|
134
|
+
"categories": ["Kosttilskudd"],
|
|
135
|
+
"tags": ["tube", "glass", "kosttilskudd", "reagensrør"]
|
|
136
|
+
},
|
|
137
|
+
"supplement-group.svg": {
|
|
138
|
+
"categories": ["Kosttilskudd"],
|
|
139
|
+
"tags": ["tube", "krukke", "bruk", "glass", "kosttilskudd", "reagensrør"]
|
|
140
|
+
},
|
|
129
141
|
"apple-cup.svg": {
|
|
130
142
|
"categories": ["Mat"],
|
|
131
143
|
"tags": ["eple", "kaffekopp", "te", "frukt", "drikke"]
|
|
@@ -456,6 +468,14 @@
|
|
|
456
468
|
"categories": ["Utstyr"],
|
|
457
469
|
"tags": ["høygaffel", "gårdsdrift", "bondegård"]
|
|
458
470
|
},
|
|
471
|
+
"bucket.svg": {
|
|
472
|
+
"categories": ["Utstyr"],
|
|
473
|
+
"tags": ["bøtte", "gårdsdrift", "bondegård"]
|
|
474
|
+
},
|
|
475
|
+
"bucket-feed.svg": {
|
|
476
|
+
"categories": ["Utstyr"],
|
|
477
|
+
"tags": ["bøtte", "for", "mat", "gårdsdrift", "bondegård"]
|
|
478
|
+
},
|
|
459
479
|
"heart-cat.svg": {
|
|
460
480
|
"categories": ["Dyr"],
|
|
461
481
|
"tags": ["hjerte", "katt", "dyr", "kjæledyr", "dyrevelferd"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="672" height="528" fill="none" viewBox="0 0 672 528"><path fill="#153F7B" d="M334.35 177.23c-6-19.89-19.34-38.62-38.48-45.96-7.16-2.7-15.08-4.05-21.08-8.88-5.6-4.64-4.64-10.62-4.64-19.12H67.88c0 11.4.58 13.33-4.26 17.77-5.41 5.02-12.76 6.95-19.53 10.04a68.47 68.47 0 0 0-20.3 13.7C9.67 158.12 2.32 176.47.97 195.97c-1.74 26.07-.39 52.72-.39 78.79C.38 328.24 0 381.92 0 435.4c0 18.92.58 39.58 13.15 53.68 14.5 16.22 38.87 17.57 60.53 17.57 62.46.39 124.92.58 187.38.97 23.4 0 49.9-1.16 65.17-18.93 12.38-14.48 13.15-35.14 13.15-54.06.39-65.27.58-130.54.97-195.81 0-20.66 0-41.9-6-61.6Z"/><path fill="#1E1A28" d="M295.07 74.56V57.09c0-5.24-.2-11.06-3.68-15.13-4.26-5.05-11.63-5.43-18.22-5.43h-46.31c-55.42-.2-110.65-.4-165.88-.4-3.49 0-7.56 0-10.07 2.72-2.33 2.33-2.72 6.21-2.91 9.51L46.84 76.5v20.17c0 3.7 4.07 6.6 9.1 6.6h229.83c5.04 0 9.1-2.9 9.1-6.6V74.56h.2Z"/><path fill="#116E6B" d="M477.6 86.85s.83-.4.85-.48l-131.9 64.34s3.8 7.51 4.65 9.16c4.58 9.38 18.55 38.39 18.55 38.39 1.17 2.4 25.9 52.5 36.75 75.11 14.88 31 30.27 61.8 45.2 92.65 17.53 36.2 35.12 72.02 52.68 108.03 5.92 12.13 10.63 24.67 23.66 30.9 6.53 3.14 14.24 3.33 21.38 1.86 11.36-2.32 23.22-7.86 33.63-12.88.78-.38 38.14-19.09 41.08-20.82 10-6.1 19.26-15.72 21.44-27.61 2.44-13.35-5.43-25.87-10.99-37.4-6.8-13.94-14.68-28.59-21.04-42.51l-50.1-102.72c-14.38-29.48-28.32-59.95-43.37-88.92-.74-1.52-42.68-86.75-42.48-87.1Z"/><path fill="#ED9A32" d="M327.19 146.62c1.74 2.44 3.87 4.44 6.63 5.6 1.82.74 3.68 1.42 5.66 1.49 5.21.31 10.02-3.07 14.55-5.28l8.13-3.96 22-10.73c17.62-8.6 35.27-17.14 52.96-25.7l26.83-13.1c8.27-4.03 17.65-6.66 21.64-15.84 1.83-4.24.03-9.45-1.77-13.38-2.87-6.39-20.12-40.87-23.13-47.8-2.06-4.72-8.46-10.6-13.47-11.62-2.22-.44-6.17-.53-8.28.5 0 0-29.44 14.6-38.5 19.03-4.87 2.37-9.67 4.29-14.4 6.96-6.42 3.56-51.1 24.92-52.54 25.69l-6.4 3.12c-7.24 3.53-17.85 6.76-22.6 13.64a20.33 20.33 0 0 0-2.4 5.43c-1.86 5.83-1.02 12.05 1.72 17.41.26.54 22.86 47.75 23.42 48.52l-.05.02Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="218" height="302" fill="none" viewBox="0 0 218 302"><path fill="#153F7B" d="M214.16 90.37c-3.84-12.74-12.39-24.74-24.65-29.44-4.58-1.73-9.66-2.6-13.5-5.69-3.6-2.96-2.97-6.8-2.97-12.24H43.48c0 7.3.37 8.53-2.73 11.38-3.47 3.21-8.17 4.45-12.5 6.43a43.85 43.85 0 0 0-13.01 8.78C6.19 78.13 1.49 89.88.62 102.37c-1.12 16.7-.25 33.77-.25 50.46C.25 187.1 0 221.48 0 255.74c0 12.12.37 25.36 8.42 34.39 9.3 10.39 24.9 11.25 38.77 11.25 40.01.25 80.02.37 120.03.62 14.98 0 31.95-.74 41.74-12.12 7.92-9.28 8.42-22.51 8.42-34.63.25-41.81.37-83.62.62-125.42 0-13.24 0-26.84-3.84-39.46Z"/><path fill="#1E1A28" d="M189 24.6V13.43c0-3.35-.12-7.08-2.36-9.7C183.91.5 179.2.26 174.97.26h-29.66C109.8.12 74.44 0 39.06 0c-2.23 0-4.84 0-6.45 1.74-1.5 1.5-1.74 3.98-1.87 6.09L30 25.85v12.93c0 2.36 2.6 4.22 5.83 4.22h147.21c3.23 0 5.84-1.86 5.84-4.23V24.61h.12Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="113" height="321" fill="none" viewBox="0 0 113 321"><path fill="#116E6B" d="M103.37 57.03s.6 0 .63-.03H10s.07 5.4.1 6.58c0 6.69-.1 27.3-.1 27.3 0 1.72.18 37.5.07 53.57-.14 22.02.07 44.08 0 66.03-.07 25.76 0 51.32 0 76.98 0 8.65-.8 17.2 4.95 24.44 2.87 3.64 7.26 5.91 11.78 7.07 7.2 1.85 15.57 2 22.97 2.03.57 0 27.33-.28 29.5-.45 7.47-.7 15.5-3.65 20.1-9.88 5.16-7 4.14-16.42 4.17-24.6 0-9.95-.42-20.6-.17-30.4v-73.2c0-21 .52-42.47 0-63.36 0-1.09-.21-61.94 0-62.08Z"/><path fill="#ED9A32" d="M0 49.21c.32 1.9.98 3.64 2.25 5.08.84.95 1.71 1.86 2.84 2.45 2.9 1.65 6.63 1.05 9.85 1.05h21.47c12.56 0 25.12.04 37.71.07h19.12c5.9 0 12.04 1.12 16.91-3.04 2.25-1.93 2.67-5.43 2.74-8.2.14-4.49-.1-29.18.1-34.02.14-3.29-1.9-8.47-4.49-10.47-1.16-.88-3.4-2.03-4.9-2.03 0 0-21.06.14-27.51.14-3.47 0-6.77-.25-10.24-.04-4.7.25-36.42 0-37.47.04h-4.56c-5.16 0-12.17-1.12-16.84 1.5A13.04 13.04 0 0 0 4.07 4.2a14.74 14.74 0 0 0-3.9 10.5c0 .4-.24 33.91-.13 34.51H0Z"/></svg>
|
package/mtds/index.d.ts
CHANGED
|
@@ -14,28 +14,6 @@ breadcrumbs: string;
|
|
|
14
14
|
button: string;
|
|
15
15
|
card: string;
|
|
16
16
|
group: string;
|
|
17
|
-
doughnut: string;
|
|
18
|
-
color-1: string;
|
|
19
|
-
color-2: string;
|
|
20
|
-
color-3: string;
|
|
21
|
-
axis: string;
|
|
22
|
-
axisSteps: string;
|
|
23
|
-
axisStep: string;
|
|
24
|
-
axisGroups: string;
|
|
25
|
-
axisGroup: string;
|
|
26
|
-
is-horizontal: string;
|
|
27
|
-
axisLabel: string;
|
|
28
|
-
is-vertical: string;
|
|
29
|
-
axisGroupContent: string;
|
|
30
|
-
is-stacked: string;
|
|
31
|
-
bar: string;
|
|
32
|
-
lineContainer: string;
|
|
33
|
-
linePoint: string;
|
|
34
|
-
line: string;
|
|
35
|
-
lineBorder: string;
|
|
36
|
-
lineShade: string;
|
|
37
|
-
legends: string;
|
|
38
|
-
legend: string;
|
|
39
17
|
chip: string;
|
|
40
18
|
details: string;
|
|
41
19
|
dialog: string;
|