@mattilsynet/design 2.2.18 → 2.2.20

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 (88) hide show
  1. package/mtds/atlas/atlas-element.d.ts +26 -0
  2. package/mtds/atlas/atlas-element.js +74 -0
  3. package/mtds/atlas/atlas-element.js.map +1 -0
  4. package/mtds/atlas/atlas.css.js +88 -0
  5. package/mtds/atlas/atlas.css.js.map +1 -0
  6. package/mtds/atlas/atlas.stories.d.ts +18 -0
  7. package/mtds/atlas/cluster.js +1149 -0
  8. package/mtds/atlas/cluster.js.map +1 -0
  9. package/mtds/atlas.d.ts +1 -0
  10. package/mtds/atlas.iife.js +687 -0
  11. package/mtds/atlas.js +7 -0
  12. package/mtds/atlas.js.map +1 -0
  13. package/mtds/external/leaflet/dist/leaflet-src.js +6265 -0
  14. package/mtds/external/leaflet/dist/leaflet-src.js.map +1 -0
  15. package/mtds/external/leaflet/dist/leaflet.css.js +607 -0
  16. package/mtds/external/leaflet/dist/leaflet.css.js.map +1 -0
  17. package/mtds/illustrations/byggning-1-gronn.svg +1 -0
  18. package/mtds/illustrations/byggning-1-mattilsynet.svg +1 -0
  19. package/mtds/illustrations/byggning-2-gronn.svg +1 -0
  20. package/mtds/illustrations/byggning-3-gronn.svg +1 -0
  21. package/mtds/illustrations/byggning-4-gronn.svg +1 -0
  22. package/mtds/illustrations/byggning-5-gronn.svg +1 -0
  23. package/mtds/illustrations/byggning-6-blaa.svg +1 -0
  24. package/mtds/illustrations/byggning-7-blaa.svg +1 -0
  25. package/mtds/illustrations/byggning-8-blaa.svg +1 -0
  26. package/mtds/illustrations/byggningsrekke-1-gronn.svg +1 -0
  27. package/mtds/illustrations/byggningsrekke-1-mattilsynet.svg +1 -0
  28. package/mtds/illustrations/byggningsrekke-2-gronn.svg +1 -0
  29. package/mtds/illustrations/byggningsrekke-3-blaa.svg +1 -0
  30. package/mtds/illustrations/debatt.svg +1 -0
  31. package/mtds/illustrations/egg.svg +1 -0
  32. package/mtds/illustrations/flagg-aaland.svg +1 -0
  33. package/mtds/illustrations/flagg-danmark.svg +1 -0
  34. package/mtds/illustrations/flagg-faeroyene.svg +1 -0
  35. package/mtds/illustrations/flagg-finland.svg +1 -0
  36. package/mtds/illustrations/flagg-gronland.svg +1 -0
  37. package/mtds/illustrations/flagg-island.svg +1 -0
  38. package/mtds/illustrations/flagg-norge.svg +1 -0
  39. package/mtds/illustrations/flagg-sapmi.svg +1 -0
  40. package/mtds/illustrations/flagg-sverige.svg +1 -0
  41. package/mtds/illustrations/forstorrelsesglass.svg +1 -0
  42. package/mtds/illustrations/hengelas.svg +1 -0
  43. package/mtds/illustrations/kompass.svg +1 -0
  44. package/mtds/illustrations/skinke.svg +1 -0
  45. package/mtds/illustrations/system-stotte.svg +1 -0
  46. package/mtds/illustrations/system.svg +1 -0
  47. package/mtds/illustrations/tre-1.svg +1 -0
  48. package/mtds/illustrations/tre-2.svg +1 -0
  49. package/mtds/illustrations/tre-3.svg +1 -0
  50. package/mtds/index.d.ts +2 -0
  51. package/mtds/index.iife.js +15 -15
  52. package/mtds/index.js +20 -15
  53. package/mtds/index.js.map +1 -1
  54. package/mtds/law/law-helper.d.ts +29 -22
  55. package/mtds/law/law-helper.js +78 -0
  56. package/mtds/law/law-helper.js.map +1 -0
  57. package/mtds/law/law.d.ts +2 -18
  58. package/mtds/law/law.js +10 -0
  59. package/mtds/law/law.js.map +1 -0
  60. package/mtds/law/law.stories.d.ts +6 -0
  61. package/mtds/law/vinforskriften-new.d.ts +1 -0
  62. package/mtds/law/vinforskriften-old.d.ts +1 -0
  63. package/mtds/logo/logo-observer.js +1 -1
  64. package/mtds/logo/logo-observer.js.map +1 -1
  65. package/mtds/package.json.js +1 -1
  66. package/mtds/react.d.ts +1 -0
  67. package/mtds/react.js +53 -51
  68. package/mtds/react.js.map +1 -1
  69. package/mtds/styles.css +1 -1
  70. package/mtds/styles.json +43 -42
  71. package/mtds/styles.module.css.js +88 -86
  72. package/mtds/styles.module.css.js.map +1 -1
  73. package/mtds/tabs/tabs.stories.d.ts +1 -0
  74. package/mtds/utils.d.ts +1 -1
  75. package/mtds/utils.js +37 -31
  76. package/mtds/utils.js.map +1 -1
  77. package/package.json +17 -19
  78. package/mtds/law/vin.d.ts +0 -1
  79. package/mtds/map/map-element.d.ts +0 -47
  80. package/mtds/map/map-element.js +0 -82
  81. package/mtds/map/map-element.js.map +0 -1
  82. package/mtds/map/map.css.js +0 -46
  83. package/mtds/map/map.css.js.map +0 -1
  84. package/mtds/map/map.stories.d.ts +0 -10
  85. package/mtds/map.d.ts +0 -1
  86. package/mtds/map.iife.js +0 -722
  87. package/mtds/map.js +0 -8
  88. package/mtds/map.js.map +0 -1
@@ -6,7 +6,7 @@ function u() {
6
6
  if (t instanceof SVGSVGElement) {
7
7
  for (const i of document.head.querySelectorAll("link[rel~='icon']"))
8
8
  i.setAttribute("rel", "disabled");
9
- const o = e?.hasAttribute("data-env"), n = window.getComputedStyle(t), s = n.getPropertyValue("color"), l = n.getPropertyValue("--mtds-logo-color"), r = t.outerHTML.replace(/\n+/g, " ").replace(/(fill|width|height|xmlns)="[^"]+"/gi, "").replace("<svg", `<svg width="40" height="40" fill="${s}"`);
9
+ const o = e?.hasAttribute("data-env"), n = window.getComputedStyle(t), s = n.getPropertyValue("color"), l = n.getPropertyValue("--mtdsc-logo-background"), r = t.outerHTML.replace(/\n+/g, " ").replace(/(fill|width|height|xmlns)="[^"]+"/gi, "").replace("<svg", `<svg width="40" height="40" fill="${s}"`);
10
10
  document.head.appendChild(
11
11
  h("link", {
12
12
  href: `data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${o ? "none" : l}' width='51' height='51' x='2' y='2' stroke='${s}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${o ? 0.6 : 0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${r}</g></svg>`)}`,
@@ -1 +1 @@
1
- {"version":3,"file":"logo-observer.js","sources":["../../designsystem/logo/logo-observer.ts"],"sourcesContent":["import styles from \"../styles.module.css\";\nimport { IS_BROWSER, onLoaded, onMutation, tag } from \"../utils\";\n\nconst CSS_LOGO = styles.logo.split(\" \")[0];\nconst LOGOS = IS_BROWSER ? document.getElementsByClassName(CSS_LOGO) : [];\n\nfunction handleLogoMutation() {\n\tconst logo = LOGOS[0];\n\tconst svg = logo?.firstElementChild;\n\n\tif (svg instanceof SVGSVGElement) {\n\t\tfor (const icon of document.head.querySelectorAll(\"link[rel~='icon']\"))\n\t\t\ticon.setAttribute(\"rel\", \"disabled\"); // Disable previous icon (but not remove is as this makes Next.js sad)\n\n\t\tconst isDot = logo?.hasAttribute(\"data-env\");\n\t\tconst style = window.getComputedStyle(svg);\n\t\tconst text = style.getPropertyValue(\"color\");\n\t\tconst back = style.getPropertyValue(\"--mtds-logo-color\");\n\t\tconst icon = svg.outerHTML\n\t\t\t.replace(/\\n+/g, \" \") // Prevent line breaks\n\t\t\t.replace(/(fill|width|height|xmlns)=\"[^\"]+\"/gi, \"\")\n\t\t\t.replace(\"<svg\", `<svg width=\"40\" height=\"40\" fill=\"${text}\"`);\n\n\t\tdocument.head.appendChild(\n\t\t\ttag(\"link\", {\n\t\t\t\thref: `data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${isDot ? \"none\" : back}' width='51' height='51' x='2' y='2' stroke='${text}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${isDot ? 0.6 : 0}' stroke-width='2.3' rx='25.5'/><g transform=\"translate(7.5 7.5)\">${icon}</g></svg>`)}`,\n\t\t\t\trel: \"icon\",\n\t\t\t}),\n\t\t);\n\t}\n}\n\nonLoaded(() => [onMutation(handleLogoMutation, \"class\")]);\n"],"names":["CSS_LOGO","styles","LOGOS","IS_BROWSER","handleLogoMutation","logo","svg","icon","isDot","style","text","back","tag","onLoaded","onMutation"],"mappings":";;AAGA,MAAMA,IAAWC,EAAO,KAAK,MAAM,GAAG,EAAE,CAAC,GACnCC,IAAQC,IAAa,SAAS,uBAAuBH,CAAQ,IAAI,CAAA;AAEvE,SAASI,IAAqB;AAC7B,QAAMC,IAAOH,EAAM,CAAC,GACdI,IAAMD,GAAM;AAElB,MAAIC,aAAe,eAAe;AACjC,eAAWC,KAAQ,SAAS,KAAK,iBAAiB,mBAAmB;AACpEA,MAAAA,EAAK,aAAa,OAAO,UAAU;AAEpC,UAAMC,IAAQH,GAAM,aAAa,UAAU,GACrCI,IAAQ,OAAO,iBAAiBH,CAAG,GACnCI,IAAOD,EAAM,iBAAiB,OAAO,GACrCE,IAAOF,EAAM,iBAAiB,mBAAmB,GACjDF,IAAOD,EAAI,UACf,QAAQ,QAAQ,GAAG,EACnB,QAAQ,uCAAuC,EAAE,EACjD,QAAQ,QAAQ,qCAAqCI,CAAI,GAAG;AAE9D,aAAS,KAAK;AAAA,MACbE,EAAI,QAAQ;AAAA,QACX,MAAM,sBAAsB,mBAAmB,2EAA2EJ,IAAQ,SAASG,CAAI,gDAAgDD,CAAI,yEAAyEF,IAAQ,MAAM,CAAC,qEAAqED,CAAI,YAAY,CAAC;AAAA,QACjX,KAAK;AAAA,MAAA,CACL;AAAA,IAAA;AAAA,EAEH;AACD;AAEAM,EAAS,MAAM,CAACC,EAAWV,GAAoB,OAAO,CAAC,CAAC;"}
1
+ {"version":3,"file":"logo-observer.js","sources":["../../designsystem/logo/logo-observer.ts"],"sourcesContent":["import styles from \"../styles.module.css\";\nimport { IS_BROWSER, onLoaded, onMutation, tag } from \"../utils\";\n\nconst CSS_LOGO = styles.logo.split(\" \")[0];\nconst LOGOS = IS_BROWSER ? document.getElementsByClassName(CSS_LOGO) : [];\n\nfunction handleLogoMutation() {\n\tconst logo = LOGOS[0];\n\tconst svg = logo?.firstElementChild;\n\n\tif (svg instanceof SVGSVGElement) {\n\t\tfor (const icon of document.head.querySelectorAll(\"link[rel~='icon']\"))\n\t\t\ticon.setAttribute(\"rel\", \"disabled\"); // Disable previous icon (but not remove is as this makes Next.js sad)\n\n\t\tconst isDot = logo?.hasAttribute(\"data-env\");\n\t\tconst style = window.getComputedStyle(svg);\n\t\tconst text = style.getPropertyValue(\"color\");\n\t\tconst back = style.getPropertyValue(\"--mtdsc-logo-background\");\n\t\tconst icon = svg.outerHTML\n\t\t\t.replace(/\\n+/g, \" \") // Prevent line breaks\n\t\t\t.replace(/(fill|width|height|xmlns)=\"[^\"]+\"/gi, \"\")\n\t\t\t.replace(\"<svg\", `<svg width=\"40\" height=\"40\" fill=\"${text}\"`);\n\n\t\tdocument.head.appendChild(\n\t\t\ttag(\"link\", {\n\t\t\t\thref: `data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${isDot ? \"none\" : back}' width='51' height='51' x='2' y='2' stroke='${text}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${isDot ? 0.6 : 0}' stroke-width='2.3' rx='25.5'/><g transform=\"translate(7.5 7.5)\">${icon}</g></svg>`)}`,\n\t\t\t\trel: \"icon\",\n\t\t\t}),\n\t\t);\n\t}\n}\n\nonLoaded(() => [onMutation(handleLogoMutation, \"class\")]);\n"],"names":["CSS_LOGO","styles","LOGOS","IS_BROWSER","handleLogoMutation","logo","svg","icon","isDot","style","text","back","tag","onLoaded","onMutation"],"mappings":";;AAGA,MAAMA,IAAWC,EAAO,KAAK,MAAM,GAAG,EAAE,CAAC,GACnCC,IAAQC,IAAa,SAAS,uBAAuBH,CAAQ,IAAI,CAAA;AAEvE,SAASI,IAAqB;AAC7B,QAAMC,IAAOH,EAAM,CAAC,GACdI,IAAMD,GAAM;AAElB,MAAIC,aAAe,eAAe;AACjC,eAAWC,KAAQ,SAAS,KAAK,iBAAiB,mBAAmB;AACpEA,MAAAA,EAAK,aAAa,OAAO,UAAU;AAEpC,UAAMC,IAAQH,GAAM,aAAa,UAAU,GACrCI,IAAQ,OAAO,iBAAiBH,CAAG,GACnCI,IAAOD,EAAM,iBAAiB,OAAO,GACrCE,IAAOF,EAAM,iBAAiB,yBAAyB,GACvDF,IAAOD,EAAI,UACf,QAAQ,QAAQ,GAAG,EACnB,QAAQ,uCAAuC,EAAE,EACjD,QAAQ,QAAQ,qCAAqCI,CAAI,GAAG;AAE9D,aAAS,KAAK;AAAA,MACbE,EAAI,QAAQ;AAAA,QACX,MAAM,sBAAsB,mBAAmB,2EAA2EJ,IAAQ,SAASG,CAAI,gDAAgDD,CAAI,yEAAyEF,IAAQ,MAAM,CAAC,qEAAqED,CAAI,YAAY,CAAC;AAAA,QACjX,KAAK;AAAA,MAAA,CACL;AAAA,IAAA;AAAA,EAEH;AACD;AAEAM,EAAS,MAAM,CAACC,EAAWV,GAAoB,OAAO,CAAC,CAAC;"}
@@ -1,4 +1,4 @@
1
- const o = "2.2.18";
1
+ const o = "2.2.20";
2
2
  export {
3
3
  o as version
4
4
  };
package/mtds/react.d.ts CHANGED
@@ -16,6 +16,7 @@ export * from './fieldset/fieldset';
16
16
  export * from './fileupload/fileupload';
17
17
  export * from './helptext/helptext';
18
18
  export * from './input/input';
19
+ export * from './law/law';
19
20
  export * from './layout/layout';
20
21
  export * from './link/link';
21
22
  export * from './logo/logo';
package/mtds/react.js CHANGED
@@ -10,28 +10,29 @@ import { Chip as P } from "./chip/chip.js";
10
10
  import { Details as b } from "./details/details.js";
11
11
  import { Dialog as A } from "./dialog/dialog.js";
12
12
  import { Divider as D } from "./divider/divider.js";
13
- import { Errorsummary as c } from "./errorsummary/errorsummary.js";
14
- import { Field as k, FieldComp as G } from "./field/field.js";
15
- import { Fieldset as L } from "./fieldset/fieldset.js";
16
- import { Fileupload as E } from "./fileupload/fileupload.js";
17
- import { HelpText as V } from "./helptext/helptext.js";
18
- import { Input as q, Select as w, Textarea as z } from "./input/input.js";
19
- import { Flex as K, Grid as N } from "./layout/layout.js";
20
- import { Link as Q } from "./link/link.js";
21
- import { Logo as U } from "./logo/logo.js";
22
- import { Pagination as X } from "./pagination/pagination.js";
23
- import { Popover as Z } from "./popover/popover.js";
24
- import { Progress as $ } from "./progress/progress.js";
25
- import { Skeleton as or } from "./skeleton/skeleton.js";
26
- import { Spinner as tr } from "./spinner/spinner.js";
27
- import { Steps as mr } from "./steps/steps.js";
28
- import { Table as fr } from "./table/table.js";
29
- import { Tabs as ir } from "./tabs/tabs.js";
30
- import { Tag as dr } from "./tag/tag.js";
31
- import { toast as sr } from "./toast/toast.js";
32
- import { Togglegroup as ur } from "./togglegroup/togglegroup.js";
33
- import { Heading as Fr, Info as Cr, Ingress as Pr, Muted as Sr, Prose as br } from "./typography/typography.js";
34
- import { Validation as Ar } from "./validation/validation.js";
13
+ import { Errorsummary as L } from "./errorsummary/errorsummary.js";
14
+ import { Field as h, FieldComp as k } from "./field/field.js";
15
+ import { Fieldset as H } from "./fieldset/fieldset.js";
16
+ import { Fileupload as y } from "./fileupload/fileupload.js";
17
+ import { HelpText as M } from "./helptext/helptext.js";
18
+ import { Input as j, Select as q, Textarea as z } from "./input/input.js";
19
+ import { Law as K } from "./law/law.js";
20
+ import { Flex as O, Grid as Q } from "./layout/layout.js";
21
+ import { Link as U } from "./link/link.js";
22
+ import { Logo as X } from "./logo/logo.js";
23
+ import { Pagination as Z } from "./pagination/pagination.js";
24
+ import { Popover as $ } from "./popover/popover.js";
25
+ import { Progress as or } from "./progress/progress.js";
26
+ import { Skeleton as tr } from "./skeleton/skeleton.js";
27
+ import { Spinner as mr } from "./spinner/spinner.js";
28
+ import { Steps as fr } from "./steps/steps.js";
29
+ import { Table as ir } from "./table/table.js";
30
+ import { Tabs as dr } from "./tabs/tabs.js";
31
+ import { Tag as sr } from "./tag/tag.js";
32
+ import { toast as ur } from "./toast/toast.js";
33
+ import { Togglegroup as Fr } from "./togglegroup/togglegroup.js";
34
+ import { Heading as Pr, Info as Sr, Ingress as br, Muted as vr, Prose as Ar } from "./typography/typography.js";
35
+ import { Validation as Dr } from "./validation/validation.js";
35
36
  export {
36
37
  e as Alert,
37
38
  p as App,
@@ -45,36 +46,37 @@ export {
45
46
  b as Details,
46
47
  A as Dialog,
47
48
  D as Divider,
48
- c as Errorsummary,
49
- k as Field,
50
- G as FieldComp,
51
- L as Fieldset,
52
- E as Fileupload,
53
- K as Flex,
54
- N as Grid,
49
+ L as Errorsummary,
50
+ h as Field,
51
+ k as FieldComp,
52
+ H as Fieldset,
53
+ y as Fileupload,
54
+ O as Flex,
55
+ Q as Grid,
55
56
  u as Group,
56
- Fr as Heading,
57
- V as HelpText,
58
- Cr as Info,
59
- Pr as Ingress,
60
- q as Input,
61
- Q as Link,
62
- U as Logo,
63
- Sr as Muted,
64
- X as Pagination,
65
- Z as Popover,
66
- $ as Progress,
67
- br as Prose,
68
- w as Select,
69
- or as Skeleton,
70
- tr as Spinner,
71
- mr as Steps,
72
- fr as Table,
73
- ir as Tabs,
74
- dr as Tag,
57
+ Pr as Heading,
58
+ M as HelpText,
59
+ Sr as Info,
60
+ br as Ingress,
61
+ j as Input,
62
+ K as Law,
63
+ U as Link,
64
+ X as Logo,
65
+ vr as Muted,
66
+ Z as Pagination,
67
+ $ as Popover,
68
+ or as Progress,
69
+ Ar as Prose,
70
+ q as Select,
71
+ tr as Skeleton,
72
+ mr as Spinner,
73
+ fr as Steps,
74
+ ir as Table,
75
+ dr as Tabs,
76
+ sr as Tag,
75
77
  z as Textarea,
76
- ur as Togglegroup,
77
- Ar as Validation,
78
- sr as toast
78
+ Fr as Togglegroup,
79
+ Dr as Validation,
80
+ ur as toast
79
81
  };
80
82
  //# sourceMappingURL=react.js.map
package/mtds/react.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"react.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"react.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}