@mattilsynet/design 2.1.7 → 2.1.9
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/index.iife.js +3 -3
- package/mtds/layout/layout.d.ts +0 -7
- package/mtds/layout/layout.js +10 -13
- package/mtds/layout/layout.js.map +1 -1
- package/mtds/package.json.js +1 -1
- package/mtds/progress/progress.stories.d.ts +0 -3
- package/mtds/react.js +31 -31
- package/mtds/styles.css +1 -1
- package/mtds/tooltip/tooltip-observer.js +1 -1
- package/mtds/tooltip/tooltip-observer.js.map +1 -1
- package/mtds/typography/typography.d.ts +10 -2
- package/mtds/typography/typography.js +14 -11
- package/mtds/typography/typography.js.map +1 -1
- package/package.json +3 -3
package/mtds/layout/layout.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ type SharedProps = {
|
|
|
10
10
|
"data-column-gap"?: Sizes;
|
|
11
11
|
"data-nowrap"?: boolean;
|
|
12
12
|
"data-justify"?: "start" | "center" | "end" | "space-between" | "space-around" | "space-evenly";
|
|
13
|
-
"data-justify-items"?: "normal" | "stretch" | "start" | "center" | "end";
|
|
14
13
|
"data-fixed"?: boolean;
|
|
15
14
|
"data-items"?: "auto" | "full" | "50" | "100" | "150" | "200" | "250" | "300" | "350" | "400" | "450" | "500" | 50 | 100 | 150 | 200 | 250 | 300 | 350 | 400 | 450 | 500;
|
|
16
15
|
};
|
|
@@ -26,10 +25,4 @@ export declare const Flex: FlexComponent;
|
|
|
26
25
|
export type GridProps<As extends React.ElementType = "div"> = PolymorphicComponentPropWithRef<As, SharedProps>;
|
|
27
26
|
type GridComponent = <As extends React.ElementType = "div">(props: GridProps<As>) => JSX.Element;
|
|
28
27
|
export declare const Grid: GridComponent;
|
|
29
|
-
/**
|
|
30
|
-
* Prose
|
|
31
|
-
*/
|
|
32
|
-
export type ProseProps<As extends React.ElementType = "div"> = PolymorphicComponentPropWithRef<As>;
|
|
33
|
-
type ProseComponent = <As extends React.ElementType = "div">(props: ProseProps<As>) => JSX.Element;
|
|
34
|
-
export declare const Prose: ProseComponent;
|
|
35
28
|
export {};
|
package/mtds/layout/layout.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { clsx as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
-
}),
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
}), x = a(function({ as: r, className: o, ...s }, t) {
|
|
10
|
-
return /* @__PURE__ */ e(r || "div", { className: n(c.prose, o), ref: t, ...s });
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as e } from "../external/clsx/dist/clsx.js";
|
|
3
|
+
import { forwardRef as m } from "react";
|
|
4
|
+
import n from "../styles.module.css.js";
|
|
5
|
+
const g = m(function({ as: r, className: o, ...t }, s) {
|
|
6
|
+
return /* @__PURE__ */ i(r || "div", { className: e(n.flex, o), ref: s, ...t });
|
|
7
|
+
}), p = m(function({ as: r, className: o, ...t }, s) {
|
|
8
|
+
return /* @__PURE__ */ i(r || "div", { className: e(n.grid, o), ref: s, ...t });
|
|
11
9
|
});
|
|
12
10
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
x as Prose
|
|
11
|
+
g as Flex,
|
|
12
|
+
p as Grid
|
|
16
13
|
};
|
|
17
14
|
//# sourceMappingURL=layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sources":["../../designsystem/layout/layout.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n\tSizes,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\ntype GapOld = \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n\ntype SharedProps = {\n\t\"data-align\"?: \"normal\" | \"stretch\" | \"start\" | \"center\" | \"end\";\n\t\"data-align-content\"?:\n\t\t| \"start\"\n\t\t| \"center\"\n\t\t| \"end\"\n\t\t| \"space-between\"\n\t\t| \"space-around\"\n\t\t| \"space-evenly\";\n\t\"data-center\"?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\n\t\"data-gap\"?: Sizes | GapOld;\n\t\"data-row-gap\"?: Sizes;\n\t\"data-column-gap\"?: Sizes;\n\t\"data-nowrap\"?: boolean;\n\t\"data-justify\"?:\n\t\t| \"start\"\n\t\t| \"center\"\n\t\t| \"end\"\n\t\t| \"space-between\"\n\t\t| \"space-around\"\n\t\t| \"space-evenly\";\n\t\"data-
|
|
1
|
+
{"version":3,"file":"layout.js","sources":["../../designsystem/layout/layout.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n\tSizes,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\ntype GapOld = \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n\ntype SharedProps = {\n\t\"data-align\"?: \"normal\" | \"stretch\" | \"start\" | \"center\" | \"end\";\n\t\"data-align-content\"?:\n\t\t| \"start\"\n\t\t| \"center\"\n\t\t| \"end\"\n\t\t| \"space-between\"\n\t\t| \"space-around\"\n\t\t| \"space-evenly\";\n\t\"data-center\"?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\n\t\"data-gap\"?: Sizes | GapOld;\n\t\"data-row-gap\"?: Sizes;\n\t\"data-column-gap\"?: Sizes;\n\t\"data-nowrap\"?: boolean;\n\t\"data-justify\"?:\n\t\t| \"start\"\n\t\t| \"center\"\n\t\t| \"end\"\n\t\t| \"space-between\"\n\t\t| \"space-around\"\n\t\t| \"space-evenly\";\n\t\"data-fixed\"?: boolean;\n\t\"data-items\"?:\n\t\t| \"auto\"\n\t\t| \"full\"\n\t\t| \"50\"\n\t\t| \"100\"\n\t\t| \"150\"\n\t\t| \"200\"\n\t\t| \"250\"\n\t\t| \"300\"\n\t\t| \"350\"\n\t\t| \"400\"\n\t\t| \"450\"\n\t\t| \"500\"\n\t\t| 50\n\t\t| 100\n\t\t| 150\n\t\t| 200\n\t\t| 250\n\t\t| 300\n\t\t| 350\n\t\t| 400\n\t\t| 450\n\t\t| 500;\n};\n\n/**\n * Flex\n */\nexport type FlexProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<As, SharedProps>;\n\ntype FlexComponent = <As extends React.ElementType = \"div\">(\n\tprops: FlexProps<As>,\n) => JSX.Element;\n\nexport const Flex: FlexComponent = forwardRef<null>(function Flex<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: FlexProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\n\treturn <Tag className={clsx(styles.flex, className)} ref={ref} {...rest} />;\n}) as FlexComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\n/**\n * Grid\n */\nexport type GridProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<As, SharedProps>;\n\ntype GridComponent = <As extends React.ElementType = \"div\">(\n\tprops: GridProps<As>,\n) => JSX.Element;\n\nexport const Grid: GridComponent = forwardRef<null>(function Grid<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: GridProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\n\treturn <Tag className={clsx(styles.grid, className)} ref={ref} {...rest} />;\n}) as GridComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Flex","forwardRef","as","className","rest","ref","jsx","clsx","styles","Grid"],"mappings":";;;;AAoEO,MAAMA,IAAsBC,EAAiB,SAElD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAuBC,GAA0B;AAGtE,SAAO,gBAAAC,EAFKJ,KAAM,OAEV,EAAI,WAAWK,EAAKC,EAAO,MAAML,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC1E,CAAC,GAYYK,IAAsBR,EAAiB,SAElD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAuBC,GAA0B;AAGtE,SAAO,gBAAAC,EAFKJ,KAAM,OAEV,EAAI,WAAWK,EAAKC,EAAO,MAAML,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC1E,CAAC;"}
|
package/mtds/package.json.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
parameters: {
|
|
5
|
-
layout: string;
|
|
6
|
-
};
|
|
7
4
|
decorators: ((Story: import('storybook/internal/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
8
5
|
[x: string]: any;
|
|
9
6
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
package/mtds/react.js
CHANGED
|
@@ -14,20 +14,20 @@ import { Field as c, FieldComp as k } from "./field/field.js";
|
|
|
14
14
|
import { Fieldset as H } from "./fieldset/fieldset.js";
|
|
15
15
|
import { HelpText as h } from "./helptext/helptext.js";
|
|
16
16
|
import { Input as E, Select as M, Textarea as V } from "./input/input.js";
|
|
17
|
-
import { Flex as q, Grid as w
|
|
18
|
-
import { Link as
|
|
19
|
-
import { Logo as
|
|
20
|
-
import { Pagination as
|
|
21
|
-
import { Popover as
|
|
22
|
-
import { Progress as
|
|
23
|
-
import { Skeleton as
|
|
24
|
-
import { Spinner as
|
|
25
|
-
import { Steps as
|
|
26
|
-
import { Table as
|
|
27
|
-
import { Tabs as
|
|
28
|
-
import { Tag as
|
|
29
|
-
import { Togglegroup as
|
|
30
|
-
import { Heading as
|
|
17
|
+
import { Flex as q, Grid as w } from "./layout/layout.js";
|
|
18
|
+
import { Link as J } from "./link/link.js";
|
|
19
|
+
import { Logo as N } from "./logo/logo.js";
|
|
20
|
+
import { Pagination as Q } from "./pagination/pagination.js";
|
|
21
|
+
import { Popover as U } from "./popover/popover.js";
|
|
22
|
+
import { Progress as X } from "./progress/progress.js";
|
|
23
|
+
import { Skeleton as Z } from "./skeleton/skeleton.js";
|
|
24
|
+
import { Spinner as $ } from "./spinner/spinner.js";
|
|
25
|
+
import { Steps as or } from "./steps/steps.js";
|
|
26
|
+
import { Table as tr } from "./table/table.js";
|
|
27
|
+
import { Tabs as mr } from "./tabs/tabs.js";
|
|
28
|
+
import { Tag as fr } from "./tag/tag.js";
|
|
29
|
+
import { Togglegroup as ir } from "./togglegroup/togglegroup.js";
|
|
30
|
+
import { Heading as nr, Info as dr, Ingress as gr, Muted as sr, Prose as ur } from "./typography/typography.js";
|
|
31
31
|
import { Validation as Fr } from "./validation/validation.js";
|
|
32
32
|
export {
|
|
33
33
|
e as Alert,
|
|
@@ -48,27 +48,27 @@ export {
|
|
|
48
48
|
q as Flex,
|
|
49
49
|
w as Grid,
|
|
50
50
|
u as Group,
|
|
51
|
-
|
|
51
|
+
nr as Heading,
|
|
52
52
|
h as HelpText,
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
dr as Info,
|
|
54
|
+
gr as Ingress,
|
|
55
55
|
E as Input,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
J as Link,
|
|
57
|
+
N as Logo,
|
|
58
|
+
sr as Muted,
|
|
59
|
+
Q as Pagination,
|
|
60
|
+
U as Popover,
|
|
61
|
+
X as Progress,
|
|
62
|
+
ur as Prose,
|
|
63
63
|
M as Select,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
Z as Skeleton,
|
|
65
|
+
$ as Spinner,
|
|
66
|
+
or as Steps,
|
|
67
|
+
tr as Table,
|
|
68
|
+
mr as Tabs,
|
|
69
|
+
fr as Tag,
|
|
70
70
|
V as Textarea,
|
|
71
|
-
|
|
71
|
+
ir as Togglegroup,
|
|
72
72
|
Fr as Validation
|
|
73
73
|
};
|
|
74
74
|
//# sourceMappingURL=react.js.map
|