@mattilsynet/design 1.3.1 → 1.3.3

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 (53) hide show
  1. package/mtds/app/app-observer.js +10 -10
  2. package/mtds/app/app-observer.js.map +1 -1
  3. package/mtds/app/app.d.ts +2 -0
  4. package/mtds/app/app.js +63 -19
  5. package/mtds/app/app.js.map +1 -1
  6. package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js +134 -134
  7. package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js.map +1 -1
  8. package/mtds/external/@u-elements/u-datalist/dist/u-datalist.js +55 -53
  9. package/mtds/external/@u-elements/u-datalist/dist/u-datalist.js.map +1 -1
  10. package/mtds/illustrations/bread.svg +1 -0
  11. package/mtds/illustrations/drop-apple-bread.svg +1 -0
  12. package/mtds/illustrations/drop-apple.svg +1 -0
  13. package/mtds/illustrations/fork-knife-spoon.svg +1 -0
  14. package/mtds/illustrations/fork-knife.svg +1 -0
  15. package/mtds/illustrations/fork.svg +1 -0
  16. package/mtds/illustrations/heart-cat.svg +1 -0
  17. package/mtds/illustrations/heart.svg +1 -0
  18. package/mtds/illustrations/hearts-blue.svg +1 -0
  19. package/mtds/illustrations/hearts-green.svg +1 -0
  20. package/mtds/illustrations/hearts-red.svg +1 -0
  21. package/mtds/illustrations/index.json +139 -1
  22. package/mtds/illustrations/inspector-ai.svg +1 -0
  23. package/mtds/illustrations/inspector-cow.svg +1 -0
  24. package/mtds/illustrations/knife.svg +1 -0
  25. package/mtds/illustrations/person-flask-water-fish-pig.svg +1 -0
  26. package/mtds/illustrations/plane.svg +1 -0
  27. package/mtds/illustrations/plant-dog-fish.svg +1 -0
  28. package/mtds/illustrations/postits.svg +1 -0
  29. package/mtds/illustrations/pregnant-fork-plant.svg +1 -0
  30. package/mtds/illustrations/pregnant-fork.svg +1 -0
  31. package/mtds/illustrations/ship.svg +1 -0
  32. package/mtds/illustrations/spoon.svg +1 -0
  33. package/mtds/illustrations/star-1.svg +1 -0
  34. package/mtds/illustrations/star-2.svg +1 -0
  35. package/mtds/illustrations/stars.svg +1 -0
  36. package/mtds/illustrations/turnip-meat.svg +1 -0
  37. package/mtds/index.iife.js +6 -6
  38. package/mtds/input/input.js +10 -9
  39. package/mtds/input/input.js.map +1 -1
  40. package/mtds/package.json.js +1 -1
  41. package/mtds/spinner/spinner.d.ts +2 -0
  42. package/mtds/spinner/spinner.js.map +1 -1
  43. package/mtds/spinner/spinner.stories.d.ts +2 -1
  44. package/mtds/steps/steps.d.ts +8 -7
  45. package/mtds/steps/steps.js +7 -7
  46. package/mtds/steps/steps.js.map +1 -1
  47. package/mtds/steps/steps.stories.d.ts +6 -7
  48. package/mtds/styles.css +1 -1
  49. package/mtds/styles.json +40 -40
  50. package/mtds/styles.module.css.js +53 -53
  51. package/mtds/validation/validation.js +14 -6
  52. package/mtds/validation/validation.js.map +1 -1
  53. package/package.json +17 -16
@@ -1,24 +1,25 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { clsx as n } from "../external/clsx/dist/clsx.js";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { clsx as o } from "../external/clsx/dist/clsx.js";
3
3
  import { forwardRef as s } from "react";
4
- import c from "../styles.module.css.js";
5
- const a = s(function({ className: t, type: r = "text", ...e }, p) {
6
- return /* @__PURE__ */ o(
4
+ import p from "../styles.module.css.js";
5
+ const l = s(function({ className: t, type: r = "text", ...e }, u) {
6
+ return /* @__PURE__ */ n(
7
7
  "input",
8
8
  {
9
- className: n(c.input, t),
9
+ suppressHydrationWarning: !0,
10
+ className: o(p.input, t),
10
11
  type: r,
11
- ref: p,
12
+ ref: u,
12
13
  ...e
13
14
  }
14
15
  );
15
16
  }), x = s(
16
17
  function({ className: t, ...r }, e) {
17
- return /* @__PURE__ */ o("select", { className: n(c.input, t), ref: e, ...r });
18
+ return /* @__PURE__ */ n("select", { className: o(p.input, t), ref: e, ...r });
18
19
  }
19
20
  );
20
21
  export {
21
- a as Input,
22
+ l as Input,
22
23
  x as Select
23
24
  };
24
25
  //# sourceMappingURL=input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sources":["../../designsystem/input/input.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nimport styles from \"../styles.module.css\";\n\nexport type InputProps = React.ComponentPropsWithoutRef<\"input\">;\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n\t{ className, type = \"text\", ...rest },\n\tref,\n) {\n\treturn (\n\t\t<input\n\t\t\tclassName={clsx(styles.input, className)}\n\t\t\ttype={type}\n\t\t\tref={ref}\n\t\t\t{...rest}\n\t\t/>\n\t);\n});\n\nexport type SelectProps = React.ComponentPropsWithoutRef<\"select\">;\n\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(\n\tfunction Select({ className, ...rest }, ref) {\n\t\treturn (\n\t\t\t<select className={clsx(styles.input, className)} ref={ref} {...rest} />\n\t\t);\n\t},\n);\n"],"names":["Input","forwardRef","className","type","rest","ref","jsx","clsx","styles","Select"],"mappings":";;;;AAMa,MAAAA,IAAQC,EAAyC,SAC7D,EAAE,WAAAC,GAAW,MAAAC,IAAO,QAAQ,GAAGC,EAAK,GACpCC,GACC;AAEA,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAWC,EAAKC,EAAO,OAAON,CAAS;AAAA,MACvC,MAAAC;AAAA,MACA,KAAAE;AAAA,MACC,GAAGD;AAAA,IAAA;AAAA,EACL;AAEF,CAAC,GAIYK,IAASR;AAAA,EACrB,SAAgB,EAAE,WAAAC,GAAW,GAAGE,EAAA,GAAQC,GAAK;AAE3C,WAAA,gBAAAC,EAAC,UAAO,EAAA,WAAWC,EAAKC,EAAO,OAAON,CAAS,GAAG,KAAAG,GAAW,GAAGD,EAAM,CAAA;AAAA,EAAA;AAGzE;"}
1
+ {"version":3,"file":"input.js","sources":["../../designsystem/input/input.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nimport styles from \"../styles.module.css\";\n\nexport type InputProps = React.ComponentPropsWithoutRef<\"input\">;\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n\t{ className, type = \"text\", ...rest },\n\tref,\n) {\n\treturn (\n\t\t<input\n\t\t\tsuppressHydrationWarning // Prevent hydration mismatch for SSR due to field-observer.ts\n\t\t\tclassName={clsx(styles.input, className)}\n\t\t\ttype={type}\n\t\t\tref={ref}\n\t\t\t{...rest}\n\t\t/>\n\t);\n});\n\nexport type SelectProps = React.ComponentPropsWithoutRef<\"select\">;\n\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(\n\tfunction Select({ className, ...rest }, ref) {\n\t\treturn (\n\t\t\t<select className={clsx(styles.input, className)} ref={ref} {...rest} />\n\t\t);\n\t},\n);\n"],"names":["Input","forwardRef","className","type","rest","ref","jsx","clsx","styles","Select"],"mappings":";;;;AAMa,MAAAA,IAAQC,EAAyC,SAC7D,EAAE,WAAAC,GAAW,MAAAC,IAAO,QAAQ,GAAGC,EAAK,GACpCC,GACC;AAEA,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,0BAAwB;AAAA,MACxB,WAAWC,EAAKC,EAAO,OAAON,CAAS;AAAA,MACvC,MAAAC;AAAA,MACA,KAAAE;AAAA,MACC,GAAGD;AAAA,IAAA;AAAA,EACL;AAEF,CAAC,GAIYK,IAASR;AAAA,EACrB,SAAgB,EAAE,WAAAC,GAAW,GAAGE,EAAA,GAAQC,GAAK;AAE3C,WAAA,gBAAAC,EAAC,UAAO,EAAA,WAAWC,EAAKC,EAAO,OAAON,CAAS,GAAG,KAAAG,GAAW,GAAGD,EAAM,CAAA;AAAA,EAAA;AAGzE;"}
@@ -1,4 +1,4 @@
1
- const o = "1.3.1";
1
+ const o = "1.3.3";
2
2
  export {
3
3
  o as version
4
4
  };
@@ -1,6 +1,8 @@
1
1
  export type SpinnerProps = React.ComponentPropsWithoutRef<"span"> & {
2
2
  "data-size"?: "xs" | "sm" | "md" | "lg";
3
+ "data-state"?: "complete";
3
4
  };
4
5
  export declare const Spinner: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
5
6
  "data-size"?: "xs" | "sm" | "md" | "lg";
7
+ "data-state"?: "complete";
6
8
  } & React.RefAttributes<HTMLSpanElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.js","sources":["../../designsystem/spinner/spinner.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nimport styles from \"../styles.module.css\";\n\nexport type SpinnerProps = React.ComponentPropsWithoutRef<\"span\"> & {\n\t\"data-size\"?: \"xs\" | \"sm\" | \"md\" | \"lg\";\n};\n\nexport const Spinner = forwardRef<HTMLSpanElement, SpinnerProps>(\n\tfunction Spinner({ className, ...rest }, ref) {\n\t\treturn (\n\t\t\t<span className={clsx(styles.spinner, className)} ref={ref} {...rest} />\n\t\t);\n\t},\n);\n"],"names":["Spinner","forwardRef","className","rest","ref","jsx","clsx","styles"],"mappings":";;;;AAQO,MAAMA,IAAUC;AAAA,EACtB,SAAiB,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAAQC,GAAK;AAE5C,WAAA,gBAAAC,EAAC,QAAK,EAAA,WAAWC,EAAKC,EAAO,SAASL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAAA,EAAA;AAGzE;"}
1
+ {"version":3,"file":"spinner.js","sources":["../../designsystem/spinner/spinner.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nimport styles from \"../styles.module.css\";\n\nexport type SpinnerProps = React.ComponentPropsWithoutRef<\"span\"> & {\n\t\"data-size\"?: \"xs\" | \"sm\" | \"md\" | \"lg\";\n\t\"data-state\"?: \"complete\";\n};\n\nexport const Spinner = forwardRef<HTMLSpanElement, SpinnerProps>(\n\tfunction Spinner({ className, ...rest }, ref) {\n\t\treturn (\n\t\t\t<span className={clsx(styles.spinner, className)} ref={ref} {...rest} />\n\t\t);\n\t},\n);\n"],"names":["Spinner","forwardRef","className","rest","ref","jsx","clsx","styles"],"mappings":";;;;AASO,MAAMA,IAAUC;AAAA,EACtB,SAAiB,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAAQC,GAAK;AAE5C,WAAA,gBAAAC,EAAC,QAAK,EAAA,WAAWC,EAAKC,EAAO,SAASL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAAA,EAAA;AAGzE;"}
@@ -10,4 +10,5 @@ type Story = StoryObj<typeof meta>;
10
10
  export declare const Default: Story;
11
11
  export declare const React: Story;
12
12
  export declare const Sizes: Story;
13
- export declare const Text: Story;
13
+ export declare const WithText: Story;
14
+ export declare const WithStateComplete: Story;
@@ -1,9 +1,10 @@
1
- import { JSX } from 'react';
2
- import { PolymorphicComponentPropWithRef } from '../react-types';
3
- export type StepsProps<As extends React.ElementType = "div"> = PolymorphicComponentPropWithRef<As, {
1
+ export type StepsProps = React.ComponentPropsWithoutRef<"ol"> & {
4
2
  "data-direction"?: "right" | "up" | "down";
5
3
  "data-fade"?: "true" | "false" | "start" | "end";
6
- }>;
7
- type StepsComponent = <As extends React.ElementType = "div">(props: StepsProps<As>) => JSX.Element;
8
- export declare const Steps: StepsComponent;
9
- export {};
4
+ "data-state"?: "complete";
5
+ };
6
+ export declare const Steps: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & {
7
+ "data-direction"?: "right" | "up" | "down";
8
+ "data-fade"?: "true" | "false" | "start" | "end";
9
+ "data-state"?: "complete";
10
+ } & React.RefAttributes<HTMLOListElement>>;
@@ -1,11 +1,11 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { clsx as e } from "../external/clsx/dist/clsx.js";
3
- import { forwardRef as p } from "react";
4
- import f from "../styles.module.css.js";
5
- const d = p(function({ as: o, className: r, ...t }, s) {
6
- return /* @__PURE__ */ m(o || "div", { className: e(f.steps, r), ref: s, ...t });
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { clsx as m } from "../external/clsx/dist/clsx.js";
3
+ import { forwardRef as e } from "react";
4
+ import p from "../styles.module.css.js";
5
+ const a = e(function({ className: o, ...r }, t) {
6
+ return /* @__PURE__ */ s("ol", { className: m(p.steps, o), ref: t, ...r });
7
7
  });
8
8
  export {
9
- d as Steps
9
+ a as Steps
10
10
  };
11
11
  //# sourceMappingURL=steps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"steps.js","sources":["../../designsystem/steps/steps.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 StepsProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{\n\t\t\t\"data-direction\"?: \"right\" | \"up\" | \"down\";\n\t\t\t\"data-fade\"?: \"true\" | \"false\" | \"start\" | \"end\";\n\t\t}\n\t>;\n\ntype StepsComponent = <As extends React.ElementType = \"div\">(\n\tprops: StepsProps<As>,\n) => JSX.Element;\n\nexport const Steps: StepsComponent = forwardRef<null>(function Steps<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: StepsProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\n\treturn <Tag className={clsx(styles.steps, className)} ref={ref} {...rest} />;\n}) as StepsComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Steps","forwardRef","as","className","rest","ref","jsx","clsx","styles"],"mappings":";;;;AAqBa,MAAAA,IAAwBC,EAAiB,SAEpD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAmBC,GAA0B;AAGhE,SAAA,gBAAAC,EAFKJ,KAAM,OAEN,EAAA,WAAWK,EAAKC,EAAO,OAAOL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAC3E,CAAC;"}
1
+ {"version":3,"file":"steps.js","sources":["../../designsystem/steps/steps.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nimport styles from \"../styles.module.css\";\n\nexport type StepsProps = React.ComponentPropsWithoutRef<\"ol\"> & {\n\t\"data-direction\"?: \"right\" | \"up\" | \"down\";\n\t\"data-fade\"?: \"true\" | \"false\" | \"start\" | \"end\";\n\t\"data-state\"?: \"complete\";\n};\nexport const Steps = forwardRef<HTMLOListElement, StepsProps>(function Steps(\n\t{ className, ...rest }: StepsProps,\n\tref,\n) {\n\treturn <ol className={clsx(styles.steps, className)} ref={ref} {...rest} />;\n});\n"],"names":["Steps","forwardRef","className","rest","ref","jsx","clsx","styles"],"mappings":";;;;AASa,MAAAA,IAAQC,EAAyC,SAC7D,EAAE,WAAAC,GAAW,GAAGC,EAAK,GACrBC,GACC;AACM,SAAA,gBAAAC,EAAC,MAAG,EAAA,WAAWC,EAAKC,EAAO,OAAOL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAC1E,CAAC;"}
@@ -1,6 +1,5 @@
1
1
  import { StoryObj } from '@storybook/react-vite';
2
2
  declare const meta: {
3
- id: string;
4
3
  title: string;
5
4
  parameters: {
6
5
  layout: string;
@@ -12,11 +11,11 @@ declare const meta: {
12
11
  export default meta;
13
12
  type Story = StoryObj<typeof meta>;
14
13
  export declare const Default: Story;
15
- export declare const WithDirectionDown: Story;
16
- export declare const WithDirectionUp: Story;
14
+ export declare const React: Story;
15
+ export declare const WithStateComplete: Story;
16
+ export declare const WithDirection: Story;
17
17
  export declare const WithFade: Story;
18
- export declare const WithFadeDirectionDown: Story;
19
- export declare const WithFadeDirectionUp: Story;
18
+ export declare const WithFadeAndDirection: Story;
19
+ export declare const WithColors: Story;
20
+ export declare const WithInteraction: Story;
20
21
  export declare const Timeline: Story;
21
- export declare const Colors: Story;
22
- export declare const React: Story;