@mattilsynet/design 1.3.13 → 2.0.0

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 +1 @@
1
- {"version":3,"file":"tag.js","sources":["../../designsystem/tag/tag.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type JSX, forwardRef } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\nexport type TagProps<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n> = PolymorphicComponentPropWithRef<As>;\n\ntype TagComponent = <\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n>(\n\tprops: TagProps<Href, As>,\n) => JSX.Element;\n\nexport const Tag: TagComponent = forwardRef<null>(function Tag<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n>({ as, className, ...rest }: TagProps<Href, As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || (rest.href ? \"a\" : \"span\");\n\n\treturn <Tag className={clsx(styles.tag, className)} ref={ref} {...rest} />;\n}) as TagComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Tag","forwardRef","as","className","rest","ref","jsx","clsx","styles"],"mappings":";;;;AAoBa,MAAAA,IAAoBC,EAAiB,SAGhD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAuBC,GAA0B;AAC3E,QAAML,IAAME,MAAOE,EAAK,OAAO,MAAM;AAE9B,SAAA,gBAAAE,EAACN,GAAA,EAAI,WAAWO,EAAKC,EAAO,KAAKL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AACzE,CAAC;"}
1
+ {"version":3,"file":"tag.js","sources":["../../designsystem/tag/tag.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 TagProps<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n> = PolymorphicComponentPropWithRef<As>;\n\ntype TagComponent = <\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n>(\n\tprops: TagProps<Href, As>,\n) => JSX.Element;\n\nexport const Tag: TagComponent = forwardRef<null>(function Tag<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n>({ as, className, ...rest }: TagProps<Href, As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || (rest.href ? \"a\" : \"span\");\n\n\treturn <Tag className={clsx(styles.tag, className)} ref={ref} {...rest} />;\n}) as TagComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Tag","forwardRef","as","className","rest","ref","jsx","clsx","styles"],"mappings":";;;;AAoBa,MAAAA,IAAoBC,EAAiB,SAGhD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAuBC,GAA0B;AAC3E,QAAML,IAAME,MAAOE,EAAK,OAAO,MAAM;AAE9B,SAAA,gBAAAE,EAACN,GAAA,EAAI,WAAWO,EAAKC,EAAO,KAAKL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AACzE,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"typography.js","sources":["../../designsystem/typography/typography.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type JSX, forwardRef } 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<As>;\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":";;;;AAsBa,MAAAA,IAA4BC,EAAiB,SAExD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAqBC,GAA0B;AAIxE,SAAA,gBAAAC,EAHWJ,KAAM,MAGZ,EAAA,WAAWK,EAAKC,EAAO,SAASL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAEvE,CAAC,GASYK,IAAwBR,EAAiB,SAEpD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAmBC,GAA0B;AAEhE,SAAA,gBAAAC,EADKJ,KAAM,SACN,EAAA,WAAWK,EAAKC,EAAO,OAAOL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAC3E,CAAC,GASYM,IAA4BT,EAAiB,SAExD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAqBC,GAA0B;AAGxE,SAAA,gBAAAC,EAFWJ,KAAM,QAEZ,EAAA,WAAWK,EAAKC,EAAO,SAASL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAEvE,CAAC,GASYO,IAAsBV,EAAiB,SAElD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAkBC,GAA0B;AAE/D,SAAA,gBAAAC,EADKJ,KAAM,QACN,EAAA,WAAWK,EAAKC,EAAO,MAAML,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;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 = \"span\"> =\n\tPolymorphicComponentPropWithRef<As>;\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":";;;;AAsBa,MAAAA,IAA4BC,EAAiB,SAExD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAqBC,GAA0B;AAIxE,SAAA,gBAAAC,EAHWJ,KAAM,MAGZ,EAAA,WAAWK,EAAKC,EAAO,SAASL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAEvE,CAAC,GASYK,IAAwBR,EAAiB,SAEpD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAmBC,GAA0B;AAEhE,SAAA,gBAAAC,EADKJ,KAAM,SACN,EAAA,WAAWK,EAAKC,EAAO,OAAOL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAC3E,CAAC,GASYM,IAA4BT,EAAiB,SAExD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAqBC,GAA0B;AAGxE,SAAA,gBAAAC,EAFWJ,KAAM,QAEZ,EAAA,WAAWK,EAAKC,EAAO,SAASL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAEvE,CAAC,GASYO,IAAsBV,EAAiB,SAElD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAkBC,GAA0B;AAE/D,SAAA,gBAAAC,EADKJ,KAAM,QACN,EAAA,WAAWK,EAAKC,EAAO,MAAML,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAC1E,CAAC;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mattilsynet/design",
3
- "version": "1.3.13",
3
+ "version": "2.0.0",
4
4
  "type": "module",
5
5
  "main": "./mtds/index.js",
6
6
  "types": "./mtds/index.d.ts",
@@ -65,8 +65,8 @@
65
65
  "vite-plugin-dts": "^4.5.4"
66
66
  },
67
67
  "dependencies": {
68
- "@u-elements/u-combobox": "^0.0.19",
69
- "@u-elements/u-datalist": "^1.0.11",
68
+ "@u-elements/u-combobox": "^1.0.0",
69
+ "@u-elements/u-datalist": "^1.0.13",
70
70
  "@u-elements/u-details": "^0.1.1",
71
71
  "@u-elements/u-progress": "^0.0.5",
72
72
  "@u-elements/u-tabs": "^0.0.9",