@mattilsynet/design 2.1.7 → 2.1.8

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.
@@ -13,9 +13,17 @@ export declare const Muted: MutedComponent;
13
13
  export type IngressProps<As extends React.ElementType = "span"> = PolymorphicComponentPropWithRef<As>;
14
14
  type IngressComponent = <As extends React.ElementType = "span">(props: MutedProps<As>) => JSX.Element;
15
15
  export declare const Ingress: IngressComponent;
16
- export type InfoProps<As extends React.ElementType = "span"> = PolymorphicComponentPropWithRef<As, {
16
+ export type InfoProps<As extends React.ElementType = "div"> = PolymorphicComponentPropWithRef<As, {
17
17
  "data-variant"?: "regular" | "circle";
18
18
  }>;
19
- type InfoComponent = <As extends React.ElementType = "span">(props: MutedProps<As>) => JSX.Element;
19
+ type InfoComponent = <As extends React.ElementType = "div">(props: MutedProps<As>) => JSX.Element;
20
20
  export declare const Info: InfoComponent;
21
+ /**
22
+ * Prose
23
+ */
24
+ export type ProseProps<As extends React.ElementType = "div"> = PolymorphicComponentPropWithRef<As, {
25
+ "data-justify"?: "start" | "center" | "end";
26
+ }>;
27
+ type ProseComponent = <As extends React.ElementType = "div">(props: ProseProps<As>) => JSX.Element;
28
+ export declare const Prose: ProseComponent;
21
29
  export {};
@@ -1,20 +1,23 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { clsx as r } from "../external/clsx/dist/clsx.js";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { clsx as a } from "../external/clsx/dist/clsx.js";
3
3
  import { forwardRef as e } from "react";
4
4
  import c from "../styles.module.css.js";
5
- const T = e(function({ as: n, className: s, ...o }, t) {
6
- return /* @__PURE__ */ a(n || "h2", { className: r(c.heading, s), ref: t, ...o });
7
- }), d = e(function({ as: n, className: s, ...o }, t) {
8
- return /* @__PURE__ */ a(n || "small", { className: r(c.muted, s), ref: t, ...o });
5
+ const d = e(function({ as: n, className: s, ...o }, t) {
6
+ return /* @__PURE__ */ r(n || "h2", { className: a(c.heading, s), ref: t, ...o });
7
+ }), l = e(function({ as: n, className: s, ...o }, t) {
8
+ return /* @__PURE__ */ r(n || "small", { className: a(c.muted, s), ref: t, ...o });
9
9
  }), p = e(function({ as: n, className: s, ...o }, t) {
10
- return /* @__PURE__ */ a(n || "span", { className: r(c.ingress, s), ref: t, ...o });
10
+ return /* @__PURE__ */ r(n || "span", { className: a(c.ingress, s), ref: t, ...o });
11
+ }), N = e(function({ as: n, className: s, ...o }, t) {
12
+ return /* @__PURE__ */ r(n || "div", { className: a(c.info, s), ref: t, ...o });
11
13
  }), I = e(function({ as: n, className: s, ...o }, t) {
12
- return /* @__PURE__ */ a(n || "span", { className: r(c.info, s), ref: t, ...o });
14
+ return /* @__PURE__ */ r(n || "div", { className: a(c.prose, s), ref: t, ...o });
13
15
  });
14
16
  export {
15
- T as Heading,
16
- I as Info,
17
+ d as Heading,
18
+ N as Info,
17
19
  p as Ingress,
18
- d as Muted
20
+ l as Muted,
21
+ I as Prose
19
22
  };
20
23
  //# sourceMappingURL=typography.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"typography.js","sources":["../../designsystem/typography/typography.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 HeadingSizes = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\nexport type HeadingProps<As extends React.ElementType = \"h2\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{\n\t\t\t\"data-size\"?: HeadingSizes;\n\t\t\t\"data-justify\"?: \"start\" | \"center\";\n\t\t}\n\t>;\n\ntype HeadingComponent = <As extends React.ElementType = \"h2\">(\n\tprops: HeadingProps<As>,\n) => JSX.Element;\n\nexport const Heading: HeadingComponent = forwardRef<null>(function Heading<\n\tAs extends React.ElementType = \"h2\",\n>({ as, className, ...rest }: HeadingProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"h2\";\n\n\treturn (\n\t\t<Tag className={clsx(styles.heading, className)} ref={ref} {...rest} />\n\t);\n}) as HeadingComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type MutedProps<As extends React.ElementType = \"small\"> =\n\tPolymorphicComponentPropWithRef<As>;\n\ntype MutedComponent = <As extends React.ElementType = \"small\">(\n\tprops: MutedProps<As>,\n) => JSX.Element;\n\nexport const Muted: MutedComponent = forwardRef<null>(function Muted<\n\tAs extends React.ElementType = \"small\",\n>({ as, className, ...rest }: MutedProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"small\";\n\treturn <Tag className={clsx(styles.muted, className)} ref={ref} {...rest} />;\n}) as MutedComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type IngressProps<As extends React.ElementType = \"span\"> =\n\tPolymorphicComponentPropWithRef<As>;\n\ntype IngressComponent = <As extends React.ElementType = \"span\">(\n\tprops: MutedProps<As>,\n) => JSX.Element;\n\nexport const Ingress: IngressComponent = forwardRef<null>(function Ingress<\n\tAs extends React.ElementType = \"span\",\n>({ as, className, ...rest }: IngressProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"span\";\n\treturn (\n\t\t<Tag className={clsx(styles.ingress, className)} ref={ref} {...rest} />\n\t);\n}) as IngressComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type InfoProps<As extends React.ElementType = \"span\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{ \"data-variant\"?: \"regular\" | \"circle\" }\n\t>;\n\ntype InfoComponent = <As extends React.ElementType = \"span\">(\n\tprops: MutedProps<As>,\n) => JSX.Element;\n\nexport const Info: InfoComponent = forwardRef<null>(function Info<\n\tAs extends React.ElementType = \"span\",\n>({ as, className, ...rest }: InfoProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"span\";\n\treturn <Tag className={clsx(styles.info, className)} ref={ref} {...rest} />;\n}) as InfoComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Heading","forwardRef","as","className","rest","ref","jsx","clsx","styles","Muted","Ingress","Info"],"mappings":";;;;AAsBO,MAAMA,IAA4BC,EAAiB,SAExD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAA0BC,GAA0B;AAGzE,SACC,gBAAAC,EAHWJ,KAAM,MAGhB,EAAI,WAAWK,EAAKC,EAAO,SAASL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAEvE,CAAC,GASYK,IAAwBR,EAAiB,SAEpD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAwBC,GAA0B;AAEvE,SAAO,gBAAAC,EADKJ,KAAM,SACV,EAAI,WAAWK,EAAKC,EAAO,OAAOL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC3E,CAAC,GASYM,IAA4BT,EAAiB,SAExD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAA0BC,GAA0B;AAEzE,SACC,gBAAAC,EAFWJ,KAAM,QAEhB,EAAI,WAAWK,EAAKC,EAAO,SAASL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAEvE,CAAC,GAYYO,IAAsBV,EAAiB,SAElD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAuBC,GAA0B;AAEtE,SAAO,gBAAAC,EADKJ,KAAM,QACV,EAAI,WAAWK,EAAKC,EAAO,MAAML,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC1E,CAAC;"}
1
+ {"version":3,"file":"typography.js","sources":["../../designsystem/typography/typography.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 HeadingSizes = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\nexport type HeadingProps<As extends React.ElementType = \"h2\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{\n\t\t\t\"data-size\"?: HeadingSizes;\n\t\t\t\"data-justify\"?: \"start\" | \"center\";\n\t\t}\n\t>;\n\ntype HeadingComponent = <As extends React.ElementType = \"h2\">(\n\tprops: HeadingProps<As>,\n) => JSX.Element;\n\nexport const Heading: HeadingComponent = forwardRef<null>(function Heading<\n\tAs extends React.ElementType = \"h2\",\n>({ as, className, ...rest }: HeadingProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"h2\";\n\n\treturn (\n\t\t<Tag className={clsx(styles.heading, className)} ref={ref} {...rest} />\n\t);\n}) as HeadingComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type MutedProps<As extends React.ElementType = \"small\"> =\n\tPolymorphicComponentPropWithRef<As>;\n\ntype MutedComponent = <As extends React.ElementType = \"small\">(\n\tprops: MutedProps<As>,\n) => JSX.Element;\n\nexport const Muted: MutedComponent = forwardRef<null>(function Muted<\n\tAs extends React.ElementType = \"small\",\n>({ as, className, ...rest }: MutedProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"small\";\n\treturn <Tag className={clsx(styles.muted, className)} ref={ref} {...rest} />;\n}) as MutedComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type IngressProps<As extends React.ElementType = \"span\"> =\n\tPolymorphicComponentPropWithRef<As>;\n\ntype IngressComponent = <As extends React.ElementType = \"span\">(\n\tprops: MutedProps<As>,\n) => JSX.Element;\n\nexport const Ingress: IngressComponent = forwardRef<null>(function Ingress<\n\tAs extends React.ElementType = \"span\",\n>({ as, className, ...rest }: IngressProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"span\";\n\treturn (\n\t\t<Tag className={clsx(styles.ingress, className)} ref={ref} {...rest} />\n\t);\n}) as IngressComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type InfoProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{ \"data-variant\"?: \"regular\" | \"circle\" }\n\t>;\n\ntype InfoComponent = <As extends React.ElementType = \"div\">(\n\tprops: MutedProps<As>,\n) => JSX.Element;\n\nexport const Info: InfoComponent = forwardRef<null>(function Info<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: InfoProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\treturn <Tag className={clsx(styles.info, className)} ref={ref} {...rest} />;\n}) as InfoComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\n/**\n * Prose\n */\nexport type ProseProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{ \"data-justify\"?: \"start\" | \"center\" | \"end\" }\n\t>;\n\ntype ProseComponent = <As extends React.ElementType = \"div\">(\n\tprops: ProseProps<As>,\n) => JSX.Element;\n\nexport const Prose: ProseComponent = forwardRef<null>(function Prose<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: ProseProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\n\treturn <Tag className={clsx(styles.prose, className)} ref={ref} {...rest} />;\n}) as ProseComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Heading","forwardRef","as","className","rest","ref","jsx","clsx","styles","Muted","Ingress","Info","Prose"],"mappings":";;;;AAsBO,MAAMA,IAA4BC,EAAiB,SAExD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAA0BC,GAA0B;AAGzE,SACC,gBAAAC,EAHWJ,KAAM,MAGhB,EAAI,WAAWK,EAAKC,EAAO,SAASL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAEvE,CAAC,GASYK,IAAwBR,EAAiB,SAEpD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAwBC,GAA0B;AAEvE,SAAO,gBAAAC,EADKJ,KAAM,SACV,EAAI,WAAWK,EAAKC,EAAO,OAAOL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC3E,CAAC,GASYM,IAA4BT,EAAiB,SAExD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAA0BC,GAA0B;AAEzE,SACC,gBAAAC,EAFWJ,KAAM,QAEhB,EAAI,WAAWK,EAAKC,EAAO,SAASL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAEvE,CAAC,GAYYO,IAAsBV,EAAiB,SAElD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAuBC,GAA0B;AAEtE,SAAO,gBAAAC,EADKJ,KAAM,OACV,EAAI,WAAWK,EAAKC,EAAO,MAAML,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC1E,CAAC,GAeYQ,IAAwBX,EAAiB,SAEpD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAwBC,GAA0B;AAGvE,SAAO,gBAAAC,EAFKJ,KAAM,OAEV,EAAI,WAAWK,EAAKC,EAAO,OAAOL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC3E,CAAC;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mattilsynet/design",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "type": "module",
5
5
  "main": "./mtds/index.js",
6
6
  "types": "./mtds/index.d.ts",
@@ -51,9 +51,9 @@
51
51
  "@storybook/react-vite": "^9.1.3",
52
52
  "@tanstack/react-table": "^8.21.3",
53
53
  "@types/node": "^24.3.0",
54
- "@types/react": "^19.1.11",
54
+ "@types/react": "^19.1.12",
55
55
  "@types/react-dom": "^19.1.8",
56
- "@vitejs/plugin-react": "^5.0.1",
56
+ "@vitejs/plugin-react": "^5.0.2",
57
57
  "fast-glob": "^3.3.3",
58
58
  "postcss": "^8.5.6",
59
59
  "postcss-nesting": "^13.0.2",