@altinn/altinn-components 0.22.3 → 0.22.5
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/dist/assets/Typography.css +1 -1
- package/dist/components/Dialog/DialogBody.js +7 -7
- package/dist/components/Page/ContactSection.js +18 -17
- package/dist/components/Search/AutocompleteItem.js +23 -11
- package/dist/components/Search/SuggestListItem.js +3 -3
- package/dist/components/Transmission/Transmission.js +30 -28
- package/dist/components/Typography/Typography.js +16 -10
- package/dist/types/lib/components/Page/ContactSection.d.ts +3 -2
- package/dist/types/lib/components/Typography/Typography.d.ts +4 -2
- package/dist/types/lib/components/Typography/Typography.stories.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._typography_cr720_1{width:100%;line-height:1.5}p._typography_cr720_1{margin:0}._typography_cr720_1[data-theme=default]{background-color:transparent;color:var(--ds-color-text-default)}._typography_cr720_1[data-theme=subtle]{background-color:transparent;color:var(--ds-color-text-subtle)}._typography_cr720_1[data-size=xs]{font-size:.875rem}._typography_cr720_1[data-size=sm]{font-size:1rem}._typography_cr720_1[data-size=md]{font-size:1.125rem}._typography_cr720_1[data-size=lg]{font-size:1.25rem}._typography_cr720_1[data-size=xl]{font-size:1.5rem}._typography_cr720_1>*:first-child{margin-top:0}._typography_cr720_1>*:last-child{margin-bottom:0}._typography_cr720_1 strong{font-weight:500}._typography_cr720_1 a{color:var(--ds-color-base-default)}._typography_cr720_1 a:hover{color:var(--ds-color-base-hover)}._typography_cr720_1>p{font-size:1em;margin:1em 0}._typography_cr720_1>h1{font-size:1.5rem;font-weight:500;margin-top:1.5em;margin-bottom:0}._typography_cr720_1>h2{font-size:1.25rem;font-weight:600;margin-top:1.5em;margin-bottom:0}._typography_cr720_1>h3{font-size:1em;font-weight:600;margin:1em 0}._typography_cr720_1>h4{font-size:1em;font-weight:600;margin:1em 0 0}._typography_cr720_1>h5,._typography_cr720_1>h6{font-size:.875rem;margin:1em 0 0}._typography_cr720_1>h6{font-weight:500;color:var(--ds-color-text-subtle)}._typography_cr720_1>h6{font-weight:400;color:var(--ds-color-text-subtle)}._typography_cr720_1>h5+*,._typography_cr720_1>h6+*{margin-top:0}._typography_cr720_1>section{margin:1em 0}._typography_cr720_1 ul:not([class]),._typography_cr720_1 ol:not([class]){list-style-position:inside;padding-left:1rem;margin:1em 0}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as i, jsx as m, Fragment as
|
|
1
|
+
import { jsxs as i, jsx as m, Fragment as h } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
5
|
import { Timeline as d } from "../Timeline/Timeline.js";
|
|
6
|
-
import { TimelineSection as
|
|
6
|
+
import { TimelineSection as f } from "../Timeline/TimelineSection.js";
|
|
7
7
|
import { TimelineHeader as c } from "../Timeline/TimelineHeader.js";
|
|
8
8
|
import { Typography as s } from "../Typography/Typography.js";
|
|
9
|
-
import { SeenByLog as
|
|
9
|
+
import { SeenByLog as x } from "./SeenByLog.js";
|
|
10
10
|
import "../Search/AutocompleteBase.js";
|
|
11
11
|
import "../Snackbar/useSnackbar.js";
|
|
12
12
|
const H = ({
|
|
@@ -24,16 +24,16 @@ const H = ({
|
|
|
24
24
|
n + " " + (o == null ? void 0 : o.name)
|
|
25
25
|
] }),
|
|
26
26
|
/* @__PURE__ */ m(
|
|
27
|
-
|
|
27
|
+
f,
|
|
28
28
|
{
|
|
29
29
|
loading: r,
|
|
30
30
|
datetime: p,
|
|
31
31
|
byline: a,
|
|
32
32
|
spacing: 4,
|
|
33
33
|
color: r ? "neutral" : void 0,
|
|
34
|
-
children: !r && /* @__PURE__ */ i(
|
|
35
|
-
/* @__PURE__ */ m(s, { children: l }),
|
|
36
|
-
e && /* @__PURE__ */ m(
|
|
34
|
+
children: !r && /* @__PURE__ */ i(h, { children: [
|
|
35
|
+
/* @__PURE__ */ m(s, { maxWidth: "60ch", children: l }),
|
|
36
|
+
e && /* @__PURE__ */ m(x, { ...e })
|
|
37
37
|
] })
|
|
38
38
|
}
|
|
39
39
|
)
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createElement as
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { createElement as s } from "react";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import { Button as
|
|
4
|
+
import { Button as f } from "../Button/Button.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { Typography as
|
|
7
|
-
import { Heading as
|
|
6
|
+
import { Typography as g } from "../Typography/Typography.js";
|
|
7
|
+
import { Heading as h } from "../Typography/Heading.js";
|
|
8
8
|
import "../Search/AutocompleteBase.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { Flex as
|
|
11
|
-
import { Section as
|
|
12
|
-
const
|
|
10
|
+
import { Flex as x } from "./Flex.js";
|
|
11
|
+
import { Section as u } from "./Section.js";
|
|
12
|
+
const T = ({
|
|
13
|
+
variant: o = "inline",
|
|
13
14
|
theme: t,
|
|
14
15
|
color: e,
|
|
15
|
-
|
|
16
|
+
typographyProps: p,
|
|
16
17
|
title: i,
|
|
17
|
-
description:
|
|
18
|
-
children:
|
|
18
|
+
description: m,
|
|
19
|
+
children: c,
|
|
19
20
|
items: n
|
|
20
|
-
}) => /* @__PURE__ */
|
|
21
|
-
|
|
21
|
+
}) => /* @__PURE__ */ l(
|
|
22
|
+
u,
|
|
22
23
|
{
|
|
23
24
|
direction: "col",
|
|
24
25
|
theme: t,
|
|
@@ -27,12 +28,12 @@ const H = ({
|
|
|
27
28
|
shadow: o === "card" ? "xs" : "none",
|
|
28
29
|
spacing: 4,
|
|
29
30
|
children: [
|
|
30
|
-
i && /* @__PURE__ */ r(
|
|
31
|
-
/* @__PURE__ */ r(
|
|
32
|
-
n && /* @__PURE__ */ r(
|
|
31
|
+
i && /* @__PURE__ */ r(h, { size: "lg", children: i }),
|
|
32
|
+
/* @__PURE__ */ r(g, { ...p, children: c || /* @__PURE__ */ r("p", { children: m }) }),
|
|
33
|
+
n && /* @__PURE__ */ r(x, { spacing: 2, children: n.map((a, d) => /* @__PURE__ */ s(f, { ...a, variant: "outline", key: d })) })
|
|
33
34
|
]
|
|
34
35
|
}
|
|
35
36
|
);
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
+
T as ContactSection
|
|
38
39
|
};
|
|
@@ -1,42 +1,44 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { BookmarksListItem as
|
|
4
|
+
import { BookmarksListItem as n } from "../Bookmarks/BookmarksListItem.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
6
|
import { ListItem as o } from "../List/ListItem.js";
|
|
7
7
|
import { DialogListItem as r } from "../Dialog/DialogListItem.js";
|
|
8
8
|
import "./AutocompleteBase.js";
|
|
9
|
-
import { ScopeListItem as
|
|
10
|
-
import { SuggestListItem as
|
|
9
|
+
import { ScopeListItem as a } from "./ScopeListItem.js";
|
|
10
|
+
import { SuggestListItem as i } from "./SuggestListItem.js";
|
|
11
11
|
import "../Snackbar/useSnackbar.js";
|
|
12
|
-
const
|
|
12
|
+
const p = ({ type: m, ...e }) => {
|
|
13
13
|
switch (m) {
|
|
14
14
|
case "scope":
|
|
15
15
|
return /* @__PURE__ */ t(
|
|
16
|
-
|
|
16
|
+
a,
|
|
17
17
|
{
|
|
18
18
|
...e,
|
|
19
19
|
color: "company",
|
|
20
20
|
theme: "default",
|
|
21
21
|
shadow: "none",
|
|
22
|
-
tabIndex: -1
|
|
22
|
+
tabIndex: -1,
|
|
23
|
+
linkIcon: !0
|
|
23
24
|
}
|
|
24
25
|
);
|
|
25
26
|
case "suggest":
|
|
26
27
|
return /* @__PURE__ */ t(
|
|
27
|
-
|
|
28
|
+
i,
|
|
28
29
|
{
|
|
29
30
|
...e,
|
|
30
31
|
color: "company",
|
|
31
32
|
theme: "default",
|
|
32
33
|
shadow: "none",
|
|
33
34
|
size: "sm",
|
|
34
|
-
tabIndex: -1
|
|
35
|
+
tabIndex: -1,
|
|
36
|
+
linkIcon: !0
|
|
35
37
|
}
|
|
36
38
|
);
|
|
37
39
|
case "bookmark":
|
|
38
40
|
return /* @__PURE__ */ t(
|
|
39
|
-
|
|
41
|
+
n,
|
|
40
42
|
{
|
|
41
43
|
...e,
|
|
42
44
|
theme: "default",
|
|
@@ -46,7 +48,17 @@ const w = ({ type: m, ...e }) => {
|
|
|
46
48
|
}
|
|
47
49
|
);
|
|
48
50
|
case "dialog":
|
|
49
|
-
return /* @__PURE__ */ t(
|
|
51
|
+
return /* @__PURE__ */ t(
|
|
52
|
+
r,
|
|
53
|
+
{
|
|
54
|
+
...e,
|
|
55
|
+
theme: "default",
|
|
56
|
+
shadow: "none",
|
|
57
|
+
size: "sm",
|
|
58
|
+
tabIndex: -1,
|
|
59
|
+
linkIcon: !0
|
|
60
|
+
}
|
|
61
|
+
);
|
|
50
62
|
case "information":
|
|
51
63
|
return /* @__PURE__ */ t(o, { ...e, theme: "default", shadow: "none", tabIndex: -1, interactive: !1 });
|
|
52
64
|
default:
|
|
@@ -54,5 +66,5 @@ const w = ({ type: m, ...e }) => {
|
|
|
54
66
|
}
|
|
55
67
|
};
|
|
56
68
|
export {
|
|
57
|
-
|
|
69
|
+
p as AutocompleteItem
|
|
58
70
|
};
|
|
@@ -2,11 +2,11 @@ import { jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import { ListItem as
|
|
5
|
+
import { ListItem as i } from "../List/ListItem.js";
|
|
6
6
|
import "./AutocompleteBase.js";
|
|
7
|
-
import { QueryLabel as
|
|
7
|
+
import { QueryLabel as p } from "./QueryLabel.js";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
const g = ({ as:
|
|
9
|
+
const g = ({ as: r = "a", params: m, ...o }) => /* @__PURE__ */ t(i, { label: /* @__PURE__ */ t(p, { params: m }), ...o, as: r });
|
|
10
10
|
export {
|
|
11
11
|
g as SuggestListItem
|
|
12
12
|
};
|
|
@@ -1,59 +1,61 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i, jsxs as l } from "react/jsx-runtime";
|
|
3
|
-
import { useState as
|
|
3
|
+
import { useState as y } from "react";
|
|
4
4
|
import "../../index-L8X2o7IH.js";
|
|
5
|
-
import { AttachmentList as
|
|
6
|
-
import { Byline as
|
|
5
|
+
import { AttachmentList as b } from "../Attachment/AttachmentList.js";
|
|
6
|
+
import { Byline as d } from "../Byline/Byline.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
|
-
import { ListItemLabel as
|
|
9
|
-
import { ListItem as
|
|
10
|
-
import { Typography as
|
|
8
|
+
import { ListItemLabel as I } from "../List/ListItemLabel.js";
|
|
9
|
+
import { ListItem as j } from "../List/ListItem.js";
|
|
10
|
+
import { Typography as k } from "../Typography/Typography.js";
|
|
11
11
|
import "../Search/AutocompleteBase.js";
|
|
12
12
|
import "../Snackbar/useSnackbar.js";
|
|
13
|
-
import { Section as
|
|
13
|
+
import { Section as A } from "../Page/Section.js";
|
|
14
14
|
const J = ({
|
|
15
|
-
size:
|
|
16
|
-
theme:
|
|
17
|
-
color:
|
|
18
|
-
title:
|
|
19
|
-
createdAt:
|
|
15
|
+
size: n = "xs",
|
|
16
|
+
theme: s = "subtle",
|
|
17
|
+
color: f = "neutral",
|
|
18
|
+
title: p,
|
|
19
|
+
createdAt: S,
|
|
20
20
|
createdAtLabel: u,
|
|
21
21
|
badge: o,
|
|
22
22
|
sender: r,
|
|
23
23
|
summary: c,
|
|
24
24
|
attachments: t,
|
|
25
|
-
type:
|
|
25
|
+
type: a,
|
|
26
26
|
children: m,
|
|
27
|
-
...
|
|
27
|
+
...x
|
|
28
28
|
}) => {
|
|
29
|
-
const [
|
|
29
|
+
const [e, L] = y(!1);
|
|
30
30
|
return /* @__PURE__ */ i(
|
|
31
|
-
|
|
31
|
+
j,
|
|
32
32
|
{
|
|
33
|
-
...
|
|
33
|
+
...x,
|
|
34
34
|
avatar: r,
|
|
35
35
|
badge: o && {
|
|
36
36
|
...o,
|
|
37
37
|
theme: (o == null ? void 0 : o.theme) || "surface"
|
|
38
38
|
},
|
|
39
|
-
size:
|
|
40
|
-
theme:
|
|
41
|
-
color:
|
|
42
|
-
label: /* @__PURE__ */ i(
|
|
43
|
-
expanded:
|
|
44
|
-
onClick: () =>
|
|
39
|
+
size: n,
|
|
40
|
+
theme: s,
|
|
41
|
+
color: f,
|
|
42
|
+
label: /* @__PURE__ */ i(I, { title: p, weight: a === "submission" ? "normal" : "bold" }),
|
|
43
|
+
expanded: e,
|
|
44
|
+
onClick: () => L((h) => !h),
|
|
45
45
|
collapsible: !0,
|
|
46
46
|
linkIcon: !0,
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
as: "button",
|
|
48
|
+
ariaLabel: p,
|
|
49
|
+
children: /* @__PURE__ */ l(A, { padding: 4, children: [
|
|
50
|
+
/* @__PURE__ */ l(d, { children: [
|
|
49
51
|
/* @__PURE__ */ i("strong", { children: (r == null ? void 0 : r.name) + ", " }),
|
|
50
52
|
" ",
|
|
51
53
|
u
|
|
52
54
|
] }),
|
|
53
|
-
/* @__PURE__ */ l(
|
|
55
|
+
/* @__PURE__ */ l(k, { size: "md", children: [
|
|
54
56
|
/* @__PURE__ */ i("p", { children: c }),
|
|
55
|
-
|
|
56
|
-
(t == null ? void 0 : t.items) && /* @__PURE__ */ i(
|
|
57
|
+
e ? typeof m == "function" ? m() : m : null,
|
|
58
|
+
(t == null ? void 0 : t.items) && /* @__PURE__ */ i(b, { ...t })
|
|
57
59
|
] })
|
|
58
60
|
] })
|
|
59
61
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { c } from "../../index-L8X2o7IH.js";
|
|
3
|
-
import { Skeleton as
|
|
4
|
-
import '../../assets/Typography.css';const
|
|
5
|
-
typography:
|
|
6
|
-
},
|
|
2
|
+
import { c as d } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { Skeleton as i } from "../Skeleton/Skeleton.js";
|
|
4
|
+
import '../../assets/Typography.css';const l = "_typography_cr720_1", g = {
|
|
5
|
+
typography: l
|
|
6
|
+
}, j = ({
|
|
7
7
|
loading: o,
|
|
8
8
|
loadingText: r = "Loading ...",
|
|
9
9
|
as: p = "div",
|
|
@@ -11,19 +11,25 @@ import '../../assets/Typography.css';const d = "_typography_g5s4h_1", i = {
|
|
|
11
11
|
color: e,
|
|
12
12
|
theme: n,
|
|
13
13
|
className: s,
|
|
14
|
+
style: y = {},
|
|
15
|
+
maxWidth: c,
|
|
14
16
|
children: m,
|
|
15
|
-
...
|
|
17
|
+
...h
|
|
16
18
|
}) => /* @__PURE__ */ t(
|
|
17
19
|
p,
|
|
18
20
|
{
|
|
19
|
-
className:
|
|
21
|
+
className: d(g.typography, s),
|
|
22
|
+
style: {
|
|
23
|
+
maxWidth: c,
|
|
24
|
+
...y
|
|
25
|
+
},
|
|
20
26
|
"data-size": a,
|
|
21
27
|
"data-color": e,
|
|
22
28
|
"data-theme": n,
|
|
23
|
-
...
|
|
24
|
-
children: o && /* @__PURE__ */ t(
|
|
29
|
+
...h,
|
|
30
|
+
children: o && /* @__PURE__ */ t(i, { loading: o, children: r }) || m
|
|
25
31
|
}
|
|
26
32
|
);
|
|
27
33
|
export {
|
|
28
|
-
|
|
34
|
+
j as Typography
|
|
29
35
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ButtonProps, Color, Theme } from '..';
|
|
2
|
+
import { ButtonProps, Color, Theme, TypographyProps } from '..';
|
|
3
3
|
export type ContactSectionVariant = 'inline' | 'card';
|
|
4
4
|
export interface ContactSectionProps {
|
|
5
5
|
id?: string;
|
|
@@ -8,7 +8,8 @@ export interface ContactSectionProps {
|
|
|
8
8
|
children?: ReactNode;
|
|
9
9
|
items: ButtonProps[];
|
|
10
10
|
variant?: ContactSectionVariant;
|
|
11
|
+
typographyProps?: TypographyProps;
|
|
11
12
|
color?: Color;
|
|
12
13
|
theme?: Theme;
|
|
13
14
|
}
|
|
14
|
-
export declare const ContactSection: ({ theme, color,
|
|
15
|
+
export declare const ContactSection: ({ variant, theme, color, typographyProps, title, description, children, items, }: ContactSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementType, ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, ElementType, ReactNode } from 'react';
|
|
2
2
|
export type TypographyColor = 'neutral' | 'company' | 'person' | 'article';
|
|
3
3
|
export type TypographyTheme = 'default' | 'subtle';
|
|
4
4
|
export type TypographySize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -12,5 +12,7 @@ export interface TypographyProps {
|
|
|
12
12
|
className?: string;
|
|
13
13
|
children?: ReactNode;
|
|
14
14
|
href?: string;
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
maxWidth?: string;
|
|
15
17
|
}
|
|
16
|
-
export declare const Typography: ({ loading, loadingText, as, size, color, theme, className, children, ...restProps }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const Typography: ({ loading, loadingText, as, size, color, theme, className, style, maxWidth, children, ...restProps }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ loading, loadingText, as, size, color, theme, className, children, ...restProps }: import('./Typography').TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ loading, loadingText, as, size, color, theme, className, style, maxWidth, children, ...restProps }: import('./Typography').TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|