@mattilsynet/design 3.1.16 → 3.1.18

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 (45) hide show
  1. package/mtds/atlas/atlas-element.d.ts +1 -1
  2. package/mtds/atlas/atlas-element.js +41 -42
  3. package/mtds/atlas/atlas-element.js.map +1 -1
  4. package/mtds/atlas/atlas-matgeo.d.ts +0 -1
  5. package/mtds/atlas/atlas-matgeo.js +20 -22
  6. package/mtds/atlas/atlas-matgeo.js.map +1 -1
  7. package/mtds/atlas.iife.js +4 -4
  8. package/mtds/chart/chart.js +13 -12
  9. package/mtds/chart/chart.js.map +1 -1
  10. package/mtds/details/details.js +9 -9
  11. package/mtds/details/details.js.map +1 -1
  12. package/mtds/dialog/dialog.js +8 -9
  13. package/mtds/dialog/dialog.js.map +1 -1
  14. package/mtds/field/field.js +0 -1
  15. package/mtds/index.d.ts +1 -1
  16. package/mtds/index.iife.js +16 -196
  17. package/mtds/index.js +17 -35
  18. package/mtds/index.js.map +1 -1
  19. package/mtds/logo/logo.js +15 -7
  20. package/mtds/logo/logo.js.map +1 -1
  21. package/mtds/package.json.js +1 -1
  22. package/mtds/print/print.d.ts +8 -0
  23. package/mtds/print/print.js +11 -0
  24. package/mtds/print/print.js.map +1 -0
  25. package/mtds/print/print.stories.d.ts +2 -0
  26. package/mtds/react.d.ts +1 -0
  27. package/mtds/react.js +30 -28
  28. package/mtds/react.js.map +1 -1
  29. package/mtds/styles.css +1 -1
  30. package/mtds/styles.json +45 -44
  31. package/mtds/styles.module.css.js +82 -80
  32. package/mtds/styles.module.css.js.map +1 -1
  33. package/mtds/tag/tag.js +14 -5
  34. package/mtds/tag/tag.js.map +1 -1
  35. package/mtds/toast/toast.js +0 -1
  36. package/mtds/utils.d.ts +1 -1
  37. package/mtds/utils.js +7 -7
  38. package/mtds/utils.js.map +1 -1
  39. package/package.json +16 -14
  40. package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js +0 -284
  41. package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js.map +0 -1
  42. package/mtds/external/@u-elements/u-tabs/dist/u-tabs.js +0 -201
  43. package/mtds/external/@u-elements/u-tabs/dist/u-tabs.js.map +0 -1
  44. package/mtds/print/print.css.js +0 -185
  45. package/mtds/print/print.css.js.map +0 -1
package/mtds/index.js CHANGED
@@ -1,14 +1,13 @@
1
- import { UHTMLComboboxElement as U, UHTMLComboboxShadowRoot as d, UHTMLComboboxStyle as w } from "./external/@u-elements/u-combobox/dist/u-combobox.js";
2
- import { UHTMLTabElement as S, UHTMLTabListElement as c, UHTMLTabListShadowRoot as g, UHTMLTabListStyle as h, UHTMLTabPanelElement as y, UHTMLTabPanelShadowRoot as C, UHTMLTabPanelStyle as E, UHTMLTabShadowRoot as R, UHTMLTabStyle as k, UHTMLTabsElement as P, UHTMLTabsShadowRoot as u, UHTMLTabsStyle as v } from "./external/@u-elements/u-tabs/dist/u-tabs.js";
1
+ export * from "@u-elements/u-combobox";
2
+ export * from "@u-elements/u-tabs";
3
3
  import "@u-elements/u-details";
4
- import o from "./print/print.css.js";
5
4
  export * from "@digdir/designsystemet-web";
6
- import { version as _ } from "./package.json.js";
7
- import { analytics as q } from "./analytics/analytics.js";
8
- import { toggleAppExpanded as B } from "./app/app-observer.js";
9
- import { fixLawHtml as F, getLawChecked as G, parseLawIds as J, parseLawMeta as K, setLawChecked as N, toggleLawChecked as O } from "./law/law-helper.js";
5
+ import { version as h } from "./package.json.js";
6
+ import { analytics as n } from "./analytics/analytics.js";
7
+ import { toggleAppExpanded as C } from "./app/app-observer.js";
8
+ import { fixLawHtml as v, getLawChecked as A, parseLawIds as E, parseLawMeta as H, setLawChecked as I, toggleLawChecked as M } from "./law/law-helper.js";
10
9
  import * as r from "./styles.module.css.js";
11
- import { toast as V } from "./toast/toast-helper.js";
10
+ import { toast as b } from "./toast/toast-helper.js";
12
11
  import "./chart/chart-element.js";
13
12
  import "./deprecations.js";
14
13
  import "./logo/logo-observer.js";
@@ -19,34 +18,17 @@ import "./tooltip/tooltip-element.js";
19
18
  import "./validation/validation-observer.js";
20
19
  import "@u-elements/u-datalist";
21
20
  import "@u-elements/u-progress";
22
- const H = String(o).replace(/\/\*[^!][^*]*\*\//gs, "").replace(/(\n|\t)/g, "").replace(/\s+/g, " ");
23
21
  export {
24
- U as UHTMLComboboxElement,
25
- d as UHTMLComboboxShadowRoot,
26
- w as UHTMLComboboxStyle,
27
- S as UHTMLTabElement,
28
- c as UHTMLTabListElement,
29
- g as UHTMLTabListShadowRoot,
30
- h as UHTMLTabListStyle,
31
- y as UHTMLTabPanelElement,
32
- C as UHTMLTabPanelShadowRoot,
33
- E as UHTMLTabPanelStyle,
34
- R as UHTMLTabShadowRoot,
35
- k as UHTMLTabStyle,
36
- P as UHTMLTabsElement,
37
- u as UHTMLTabsShadowRoot,
38
- v as UHTMLTabsStyle,
39
- q as analytics,
40
- F as fixLawHtml,
41
- G as getLawChecked,
42
- J as parseLawIds,
43
- K as parseLawMeta,
44
- H as printcss,
45
- N as setLawChecked,
22
+ n as analytics,
23
+ v as fixLawHtml,
24
+ A as getLawChecked,
25
+ E as parseLawIds,
26
+ H as parseLawMeta,
27
+ I as setLawChecked,
46
28
  r as styles,
47
- V as toast,
48
- B as toggleAppExpanded,
49
- O as toggleLawChecked,
50
- _ as version
29
+ b as toast,
30
+ C as toggleAppExpanded,
31
+ M as toggleLawChecked,
32
+ h as version
51
33
  };
52
34
  //# sourceMappingURL=index.js.map
package/mtds/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../designsystem/index.ts"],"sourcesContent":["// Import and expose custom elements not matching HTML elements for backward compatibility\nexport * from \"@u-elements/u-combobox\";\nexport * from \"@u-elements/u-tabs\";\nimport \"@u-elements/u-details\";\n\nimport printcssraw from \"./print/print.css?raw\"; // Expose print CSS\n\n// Minify print CSS\nexport const printcss = String(printcssraw)\n\t.replace(/\\/\\*[^!][^*]*\\*\\//gs, \"\") // Strip comments\n\t.replace(/(\\n|\\t)/g, \"\") // Strip newlines and tabs\n\t.replace(/\\s+/g, \" \"); // Strip multiple spaces\n\n// Expose API\nexport * from \"@digdir/designsystemet-web\"; // Import and expose Digdir web functionality\nexport { version } from \"../package.json\"; // Expose version to make it easier to debug\nexport * from \"./analytics/analytics\";\nexport * from \"./app/app-observer\";\nexport * from \"./law/law-helper\";\nexport * as styles from \"./styles.module.css\";\nexport * from \"./toast/toast-helper\";\n\n// Load behaviors\nimport \"./chart/chart-element\";\nimport \"./deprecations\";\nimport \"./logo/logo-observer\";\nimport \"./popover/popover-observer\";\nimport \"./table/table-observer\";\nimport \"./toast/toast-observer\";\nimport \"./tooltip/tooltip-element\";\nimport \"./validation/validation-observer\";\nimport \"@u-elements/u-datalist\";\nimport \"@u-elements/u-progress\";\n\n// Expose types\nexport type Size = \"sm\" | \"md\" | \"lg\";\nexport type HeadingSize = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\n"],"names":["printcss","printcssraw"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAQO,MAAMA,IAAW,OAAOC,CAAW,EACxC,QAAQ,uBAAuB,EAAE,EACjC,QAAQ,YAAY,EAAE,EACtB,QAAQ,QAAQ,GAAG;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
package/mtds/logo/logo.js CHANGED
@@ -1,12 +1,20 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import a from "clsx";
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import f from "clsx";
3
3
  import { forwardRef as n } from "react";
4
- import p from "../styles.module.css.js";
5
- const x = n(function({ as: r, className: m, ...o }, t) {
6
- const f = r || (o.href ? "a" : "span");
7
- return /* @__PURE__ */ s(f, { className: a(p.logo, m), ref: t, ...o });
4
+ import i from "../styles.module.css.js";
5
+ const b = n(function({ as: r, className: m, style: t, ...o }, s) {
6
+ const e = r || (o.href ? "a" : "span");
7
+ return /* @__PURE__ */ a(
8
+ e,
9
+ {
10
+ className: f(i.logo, m),
11
+ style: { "-webkit-mask-box-image": "none", ...t },
12
+ ref: s,
13
+ ...o
14
+ }
15
+ );
8
16
  });
9
17
  export {
10
- x as Logo
18
+ b as Logo
11
19
  };
12
20
  //# sourceMappingURL=logo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logo.js","sources":["../../designsystem/logo/logo.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\ntype LogoBaseProps<Href> = {\n\t\"data-color\"?: \"danger\" | \"info\";\n\t\"data-env\"?: string | null;\n\thref?: Href;\n};\n\nexport type LogoProps<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n> = PolymorphicComponentPropWithRef<As, LogoBaseProps<Href>>;\n\ntype LogoComponent = <\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n>(\n\tprops: LogoProps<Href, As>,\n) => JSX.Element;\n\nexport const Logo: LogoComponent = forwardRef<null>(function Logo<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n>({ as, className, ...rest }: LogoProps<Href, As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || (rest.href ? \"a\" : \"span\");\n\n\treturn <Tag className={clsx(styles.logo, className)} ref={ref} {...rest} />;\n}) as LogoComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Logo","forwardRef","as","className","rest","ref","Tag","jsx","clsx","styles"],"mappings":";;;;AA0BO,MAAMA,IAAsBC,EAAiB,SAGlD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAA6BC,GAA0B;AAC5E,QAAMC,IAAMJ,MAAOE,EAAK,OAAO,MAAM;AAErC,SAAO,gBAAAG,EAACD,GAAA,EAAI,WAAWE,EAAKC,EAAO,MAAMN,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC1E,CAAC;"}
1
+ {"version":3,"file":"logo.js","sources":["../../designsystem/logo/logo.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\ntype LogoBaseProps<Href> = {\n\t\"data-color\"?: \"danger\" | \"info\";\n\t\"data-env\"?: string | null;\n\thref?: Href;\n};\n\nexport type LogoProps<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n> = PolymorphicComponentPropWithRef<As, LogoBaseProps<Href>>;\n\ntype LogoComponent = <\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n>(\n\tprops: LogoProps<Href, As>,\n) => JSX.Element;\n\nexport const Logo: LogoComponent = forwardRef<null>(function Logo<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n>(\n\t{ as, className, style, ...rest }: LogoProps<Href, As>,\n\tref?: PolymorphicRef<As>,\n) {\n\tconst Tag = as || (rest.href ? \"a\" : \"span\");\n\n\treturn (\n\t\t<Tag\n\t\t\tclassName={clsx(styles.logo, className)}\n\t\t\tstyle={{ \"-webkit-mask-box-image\": \"none\", ...style }} // Overwrite Autoprefixer\n\t\t\tref={ref}\n\t\t\t{...rest}\n\t\t/>\n\t);\n}) as LogoComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Logo","forwardRef","as","className","style","rest","ref","Tag","jsx","clsx","styles"],"mappings":";;;;AA0BO,MAAMA,IAAsBC,EAAiB,SAInD,EAAE,IAAAC,GAAI,WAAAC,GAAW,OAAAC,GAAO,GAAGC,EAAA,GAC3BC,GACC;AACD,QAAMC,IAAML,MAAOG,EAAK,OAAO,MAAM;AAErC,SACC,gBAAAG;AAAA,IAACD;AAAA,IAAA;AAAA,MACA,WAAWE,EAAKC,EAAO,MAAMP,CAAS;AAAA,MACtC,OAAO,EAAE,0BAA0B,QAAQ,GAAGC,EAAA;AAAA,MAC9C,KAAAE;AAAA,MACC,GAAGD;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
@@ -1,4 +1,4 @@
1
- const o = "3.1.16";
1
+ const o = "3.1.18";
2
2
  export {
3
3
  o as version
4
4
  };
@@ -0,0 +1,8 @@
1
+ import { JSX } from 'react';
2
+ import { PolymorphicComponentPropWithRef } from '../react-types';
3
+ export type PrintProps<As extends React.ElementType = "section"> = PolymorphicComponentPropWithRef<As, {
4
+ "data-variant"?: "front" | "back";
5
+ }>;
6
+ type PrintComponent = <As extends React.ElementType = "section">(props: PrintProps<As>) => JSX.Element;
7
+ export declare const Print: PrintComponent;
8
+ export {};
@@ -0,0 +1,11 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import n from "clsx";
3
+ import { forwardRef as s } from "react";
4
+ import f from "../styles.module.css.js";
5
+ const g = s(function({ as: r, className: o, ...t }, i) {
6
+ return /* @__PURE__ */ m(r || "section", { className: n(f.print, o), ref: i, ...t });
7
+ });
8
+ export {
9
+ g as Print
10
+ };
11
+ //# sourceMappingURL=print.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"print.js","sources":["../../designsystem/print/print.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\nexport type PrintProps<As extends React.ElementType = \"section\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{\n\t\t\t\"data-variant\"?: \"front\" | \"back\";\n\t\t}\n\t>;\n\ntype PrintComponent = <As extends React.ElementType = \"section\">(\n\tprops: PrintProps<As>,\n) => JSX.Element;\n\nexport const Print: PrintComponent = forwardRef<null>(function Print<\n\tAs extends React.ElementType = \"section\",\n>({ as, className, ...rest }: PrintProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"section\";\n\n\treturn <Tag className={clsx(styles.print, className)} ref={ref} {...rest} />;\n}) as PrintComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Print","forwardRef","as","className","rest","ref","jsx","clsx","styles"],"mappings":";;;;AAoBO,MAAMA,IAAwBC,EAAiB,SAEpD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAwBC,GAA0B;AAGvE,SAAO,gBAAAC,EAFKJ,KAAM,WAEV,EAAI,WAAWK,EAAKC,EAAO,OAAOL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC3E,CAAC;"}
@@ -13,3 +13,5 @@ export default meta;
13
13
  type Story = StoryObj<typeof meta>;
14
14
  export declare const Brevmal: Story;
15
15
  export declare const Rapportmal: Story;
16
+ export declare const BrevmalReact: Story;
17
+ export declare const RapportmalReact: Story;
package/mtds/react.d.ts CHANGED
@@ -22,6 +22,7 @@ export * from './link/link';
22
22
  export * from './logo/logo';
23
23
  export * from './pagination/pagination';
24
24
  export * from './popover/popover';
25
+ export * from './print/print';
25
26
  export * from './progress/progress';
26
27
  export * from './skeleton/skeleton';
27
28
  export * from './spinner/spinner';
package/mtds/react.js CHANGED
@@ -3,7 +3,7 @@ import { App as p } from "./app/app.js";
3
3
  import { Avatar as x } from "./avatar/avatar.js";
4
4
  import { Badge as a } from "./badge/badge.js";
5
5
  import { Breadcrumbs as l } from "./breadcrumbs/breadcrumbs.js";
6
- import { Button as s } from "./button/button.js";
6
+ import { Button as n } from "./button/button.js";
7
7
  import { Card as g, Group as u } from "./card/card.js";
8
8
  import { Chart as T } from "./chart/chart.js";
9
9
  import { Chip as P } from "./chip/chip.js";
@@ -22,24 +22,25 @@ import { Link as W } from "./link/link.js";
22
22
  import { Logo as Y } from "./logo/logo.js";
23
23
  import { Pagination as _ } from "./pagination/pagination.js";
24
24
  import { Popover as rr } from "./popover/popover.js";
25
- import { Progress as er } from "./progress/progress.js";
26
- import { Skeleton as pr } from "./skeleton/skeleton.js";
27
- import { Spinner as xr } from "./spinner/spinner.js";
28
- import { Steps as ar } from "./steps/steps.js";
29
- import { Table as lr } from "./table/table.js";
30
- import { Tabs as sr } from "./tabs/tabs.js";
31
- import { Tag as gr } from "./tag/tag.js";
32
- import { toast as Fr } from "./toast/toast.js";
33
- import { Togglegroup as Cr } from "./togglegroup/togglegroup.js";
34
- import { Heading as Sr, Info as br, Ingress as vr, Muted as Ar, Prose as Br } from "./typography/typography.js";
35
- import { Validation as Ir } from "./validation/validation.js";
25
+ import { Print as er } from "./print/print.js";
26
+ import { Progress as pr } from "./progress/progress.js";
27
+ import { Skeleton as xr } from "./skeleton/skeleton.js";
28
+ import { Spinner as ar } from "./spinner/spinner.js";
29
+ import { Steps as lr } from "./steps/steps.js";
30
+ import { Table as nr } from "./table/table.js";
31
+ import { Tabs as gr } from "./tabs/tabs.js";
32
+ import { Tag as Fr } from "./tag/tag.js";
33
+ import { toast as Cr } from "./toast/toast.js";
34
+ import { Togglegroup as Sr } from "./togglegroup/togglegroup.js";
35
+ import { Heading as vr, Info as Ar, Ingress as Br, Muted as Dr, Prose as Ir } from "./typography/typography.js";
36
+ import { Validation as cr } from "./validation/validation.js";
36
37
  export {
37
38
  e as Alert,
38
39
  p as App,
39
40
  x as Avatar,
40
41
  a as Badge,
41
42
  l as Breadcrumbs,
42
- s as Button,
43
+ n as Button,
43
44
  g as Card,
44
45
  T as Chart,
45
46
  P as Chip,
@@ -55,29 +56,30 @@ export {
55
56
  Q as Flex,
56
57
  R as Grid,
57
58
  u as Group,
58
- Sr as Heading,
59
+ vr as Heading,
59
60
  V as HelpText,
60
- br as Info,
61
- vr as Ingress,
61
+ Ar as Info,
62
+ Br as Ingress,
62
63
  q as Input,
63
64
  N as Law,
64
65
  W as Link,
65
66
  Y as Logo,
66
- Ar as Muted,
67
+ Dr as Muted,
67
68
  _ as Pagination,
68
69
  rr as Popover,
69
- er as Progress,
70
- Br as Prose,
70
+ er as Print,
71
+ pr as Progress,
72
+ Ir as Prose,
71
73
  z as Select,
72
- pr as Skeleton,
73
- xr as Spinner,
74
- ar as Steps,
75
- lr as Table,
76
- sr as Tabs,
77
- gr as Tag,
74
+ xr as Skeleton,
75
+ ar as Spinner,
76
+ lr as Steps,
77
+ nr as Table,
78
+ gr as Tabs,
79
+ Fr as Tag,
78
80
  J as Textarea,
79
- Cr as Togglegroup,
80
- Ir as Validation,
81
- Fr as toast
81
+ Sr as Togglegroup,
82
+ cr as Validation,
83
+ Cr as toast
82
84
  };
83
85
  //# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}