@mattilsynet/design 2.2.0 → 2.2.1

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.
@@ -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-toggle2.js";
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) => (
@@ -1,27 +1,11 @@
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
- };
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?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;"}
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;"}
@@ -1,11 +1,27 @@
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
- })();
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 (\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;"}
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-toggle.js";
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) {
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;