@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.
- package/mtds/app/app-observer.js +10 -10
- package/mtds/app/app-observer.js.map +1 -1
- package/mtds/app/app.d.ts +2 -0
- package/mtds/app/app.js +63 -19
- package/mtds/app/app.js.map +1 -1
- package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js +134 -134
- package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js.map +1 -1
- package/mtds/external/@u-elements/u-datalist/dist/u-datalist.js +55 -53
- package/mtds/external/@u-elements/u-datalist/dist/u-datalist.js.map +1 -1
- package/mtds/illustrations/bread.svg +1 -0
- package/mtds/illustrations/drop-apple-bread.svg +1 -0
- package/mtds/illustrations/drop-apple.svg +1 -0
- package/mtds/illustrations/fork-knife-spoon.svg +1 -0
- package/mtds/illustrations/fork-knife.svg +1 -0
- package/mtds/illustrations/fork.svg +1 -0
- package/mtds/illustrations/heart-cat.svg +1 -0
- package/mtds/illustrations/heart.svg +1 -0
- package/mtds/illustrations/hearts-blue.svg +1 -0
- package/mtds/illustrations/hearts-green.svg +1 -0
- package/mtds/illustrations/hearts-red.svg +1 -0
- package/mtds/illustrations/index.json +139 -1
- package/mtds/illustrations/inspector-ai.svg +1 -0
- package/mtds/illustrations/inspector-cow.svg +1 -0
- package/mtds/illustrations/knife.svg +1 -0
- package/mtds/illustrations/person-flask-water-fish-pig.svg +1 -0
- package/mtds/illustrations/plane.svg +1 -0
- package/mtds/illustrations/plant-dog-fish.svg +1 -0
- package/mtds/illustrations/postits.svg +1 -0
- package/mtds/illustrations/pregnant-fork-plant.svg +1 -0
- package/mtds/illustrations/pregnant-fork.svg +1 -0
- package/mtds/illustrations/ship.svg +1 -0
- package/mtds/illustrations/spoon.svg +1 -0
- package/mtds/illustrations/star-1.svg +1 -0
- package/mtds/illustrations/star-2.svg +1 -0
- package/mtds/illustrations/stars.svg +1 -0
- package/mtds/illustrations/turnip-meat.svg +1 -0
- package/mtds/index.iife.js +6 -6
- package/mtds/input/input.js +10 -9
- package/mtds/input/input.js.map +1 -1
- package/mtds/package.json.js +1 -1
- package/mtds/spinner/spinner.d.ts +2 -0
- package/mtds/spinner/spinner.js.map +1 -1
- package/mtds/spinner/spinner.stories.d.ts +2 -1
- package/mtds/steps/steps.d.ts +8 -7
- package/mtds/steps/steps.js +7 -7
- package/mtds/steps/steps.js.map +1 -1
- package/mtds/steps/steps.stories.d.ts +6 -7
- package/mtds/styles.css +1 -1
- package/mtds/styles.json +40 -40
- package/mtds/styles.module.css.js +53 -53
- package/mtds/validation/validation.js +14 -6
- package/mtds/validation/validation.js.map +1 -1
- package/package.json +17 -16
package/mtds/input/input.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { clsx as
|
|
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
|
|
5
|
-
const
|
|
6
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
9
|
+
suppressHydrationWarning: !0,
|
|
10
|
+
className: o(p.input, t),
|
|
10
11
|
type: r,
|
|
11
|
-
ref:
|
|
12
|
+
ref: u,
|
|
12
13
|
...e
|
|
13
14
|
}
|
|
14
15
|
);
|
|
15
16
|
}), x = s(
|
|
16
17
|
function({ className: t, ...r }, e) {
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ n("select", { className: o(p.input, t), ref: e, ...r });
|
|
18
19
|
}
|
|
19
20
|
);
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
l as Input,
|
|
22
23
|
x as Select
|
|
23
24
|
};
|
|
24
25
|
//# sourceMappingURL=input.js.map
|
package/mtds/input/input.js.map
CHANGED
|
@@ -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;"}
|
package/mtds/package.json.js
CHANGED
|
@@ -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":";;;;
|
|
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
|
|
13
|
+
export declare const WithText: Story;
|
|
14
|
+
export declare const WithStateComplete: Story;
|
package/mtds/steps/steps.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
8
|
-
export declare const Steps:
|
|
9
|
-
|
|
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>>;
|
package/mtds/steps/steps.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { clsx as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
9
|
+
a as Steps
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=steps.js.map
|
package/mtds/steps/steps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.js","sources":["../../designsystem/steps/steps.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport {
|
|
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
|
|
16
|
-
export declare const
|
|
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
|
|
19
|
-
export declare const
|
|
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;
|