@altinn/altinn-components 0.27.0 → 0.27.1
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/components/Dialog/DialogListItem.js +65 -62
- package/dist/components/List/ListItem.js +15 -13
- package/dist/components/List/ListItemBase.js +18 -16
- package/dist/types/lib/components/Dialog/DialogListItem.d.ts +1 -1
- package/dist/types/lib/components/List/ListItem.d.ts +1 -1
- package/dist/types/lib/components/List/ListItem.stories.d.ts +1 -1
- package/dist/types/lib/components/List/ListItemBase.d.ts +3 -1
- package/dist/types/lib/components/List/Specimens.stories.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,113 +1,116 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as g } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { Skeleton as
|
|
4
|
+
import { Skeleton as E } from "../Skeleton/Skeleton.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { ListItemLabel as
|
|
7
|
-
import { ListItemSelect as
|
|
8
|
-
import { ListItem as
|
|
9
|
-
import { DialogMetadata as
|
|
10
|
-
import { DialogByline as
|
|
11
|
-
import { DialogHeading as
|
|
6
|
+
import { ListItemLabel as F } from "../List/ListItemLabel.js";
|
|
7
|
+
import { ListItemSelect as G } from "../List/ListItemSelect.js";
|
|
8
|
+
import { ListItem as v } from "../List/ListItem.js";
|
|
9
|
+
import { DialogMetadata as x } from "./DialogMetadata.js";
|
|
10
|
+
import { DialogByline as J } from "./DialogByline.js";
|
|
11
|
+
import { DialogHeading as K } from "./DialogHeading.js";
|
|
12
12
|
import "../Search/AutocompleteBase.js";
|
|
13
13
|
import "../Snackbar/useSnackbar.js";
|
|
14
|
-
import '../../assets/DialogListItem.css';const
|
|
15
|
-
border:
|
|
16
|
-
controls:
|
|
17
|
-
header:
|
|
18
|
-
summary:
|
|
19
|
-
footer:
|
|
20
|
-
touchedBy:
|
|
21
|
-
heading:
|
|
22
|
-
title:
|
|
23
|
-
},
|
|
14
|
+
import '../../assets/DialogListItem.css';const O = "_border_1wzcc_1", P = "_controls_1wzcc_51", Q = "_header_1wzcc_57", R = "_summary_1wzcc_69", U = "_footer_1wzcc_97", W = "_touchedBy_1wzcc_101", X = "_heading_1wzcc_110", Y = "_title_1wzcc_116", e = {
|
|
15
|
+
border: O,
|
|
16
|
+
controls: P,
|
|
17
|
+
header: Q,
|
|
18
|
+
summary: R,
|
|
19
|
+
footer: U,
|
|
20
|
+
touchedBy: W,
|
|
21
|
+
heading: X,
|
|
22
|
+
title: Y
|
|
23
|
+
}, so = ({
|
|
24
24
|
size: a = "lg",
|
|
25
|
-
state:
|
|
25
|
+
state: B = "normal",
|
|
26
26
|
loading: r,
|
|
27
|
-
controls:
|
|
27
|
+
controls: u,
|
|
28
28
|
select: n,
|
|
29
29
|
selected: m,
|
|
30
30
|
status: t,
|
|
31
31
|
sender: s,
|
|
32
|
-
recipient:
|
|
33
|
-
recipientLabel:
|
|
34
|
-
grouped:
|
|
32
|
+
recipient: z,
|
|
33
|
+
recipientLabel: D = "to",
|
|
34
|
+
grouped: I = !1,
|
|
35
35
|
updatedAt: d,
|
|
36
36
|
updatedAtLabel: _,
|
|
37
37
|
archivedAt: h,
|
|
38
|
-
archivedAtLabel:
|
|
38
|
+
archivedAtLabel: L,
|
|
39
39
|
trashedAt: p,
|
|
40
|
-
trashedAtLabel:
|
|
41
|
-
badge:
|
|
42
|
-
dueAt:
|
|
43
|
-
dueAtLabel:
|
|
40
|
+
trashedAtLabel: S,
|
|
41
|
+
badge: j,
|
|
42
|
+
dueAt: k,
|
|
43
|
+
dueAtLabel: H,
|
|
44
44
|
seen: l = !1,
|
|
45
|
-
seenBy:
|
|
46
|
-
touchedBy:
|
|
47
|
-
attachmentsCount:
|
|
45
|
+
seenBy: M,
|
|
46
|
+
touchedBy: T,
|
|
47
|
+
attachmentsCount: V,
|
|
48
48
|
title: c,
|
|
49
49
|
description: f,
|
|
50
50
|
summary: i,
|
|
51
|
-
theme:
|
|
52
|
-
|
|
51
|
+
theme: q = "default",
|
|
52
|
+
id: b,
|
|
53
|
+
...y
|
|
53
54
|
}) => {
|
|
54
|
-
const
|
|
55
|
+
const C = p ? "trashed" : h ? "archived" : B, w = m ? "subtle" : q, N = t == null ? void 0 : t.value;
|
|
55
56
|
return a === "xs" || a === "sm" ? /* @__PURE__ */ o(
|
|
56
|
-
|
|
57
|
+
v,
|
|
57
58
|
{
|
|
58
|
-
...
|
|
59
|
+
...y,
|
|
60
|
+
id: b,
|
|
59
61
|
size: a,
|
|
60
62
|
selected: m,
|
|
61
|
-
theme:
|
|
63
|
+
theme: w,
|
|
62
64
|
label: /* @__PURE__ */ o(
|
|
63
65
|
"div",
|
|
64
66
|
{
|
|
65
67
|
className: e.border,
|
|
66
|
-
"data-variant":
|
|
68
|
+
"data-variant": N,
|
|
67
69
|
"data-size": a,
|
|
68
70
|
"data-seen": l,
|
|
69
71
|
"data-loading": r,
|
|
70
|
-
children: /* @__PURE__ */ o(
|
|
72
|
+
children: /* @__PURE__ */ o(F, { loading: r, size: a, title: c, description: i || f })
|
|
71
73
|
}
|
|
72
74
|
),
|
|
73
|
-
badge: /* @__PURE__ */ o(
|
|
75
|
+
badge: /* @__PURE__ */ o(x, { loading: r, sender: s, updatedAt: d, updatedAtLabel: _ }),
|
|
74
76
|
title: c
|
|
75
77
|
}
|
|
76
78
|
) : /* @__PURE__ */ o(
|
|
77
|
-
|
|
79
|
+
v,
|
|
78
80
|
{
|
|
79
|
-
...
|
|
81
|
+
...y,
|
|
82
|
+
id: b,
|
|
80
83
|
size: a,
|
|
81
84
|
selected: m,
|
|
82
|
-
theme:
|
|
83
|
-
controls: /* @__PURE__ */ o("div", { className: e.controls, children:
|
|
85
|
+
theme: w,
|
|
86
|
+
controls: /* @__PURE__ */ o("div", { className: e.controls, children: u || n && /* @__PURE__ */ o(G, { ...n, size: "xl" }) }),
|
|
84
87
|
title: c,
|
|
85
|
-
label: /* @__PURE__ */
|
|
88
|
+
label: /* @__PURE__ */ g(
|
|
86
89
|
"div",
|
|
87
90
|
{
|
|
88
91
|
className: e.border,
|
|
89
|
-
"data-variant":
|
|
92
|
+
"data-variant": N,
|
|
90
93
|
"data-size": a,
|
|
91
94
|
"data-seen": l,
|
|
92
95
|
"data-loading": r,
|
|
93
96
|
children: [
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */ o(
|
|
97
|
+
/* @__PURE__ */ g("header", { className: e.header, "data-size": a, children: [
|
|
98
|
+
/* @__PURE__ */ o(K, { loading: r, size: a, state: C, badge: j, seen: l, children: c }),
|
|
96
99
|
/* @__PURE__ */ o(
|
|
97
|
-
|
|
100
|
+
J,
|
|
98
101
|
{
|
|
99
102
|
size: "xs",
|
|
100
103
|
loading: r,
|
|
101
104
|
sender: s,
|
|
102
|
-
recipient:
|
|
103
|
-
recipientLabel:
|
|
104
|
-
grouped:
|
|
105
|
+
recipient: z,
|
|
106
|
+
recipientLabel: D,
|
|
107
|
+
grouped: I
|
|
105
108
|
}
|
|
106
109
|
),
|
|
107
|
-
a === "lg" && i && /* @__PURE__ */ o(
|
|
110
|
+
a === "lg" && i && /* @__PURE__ */ o(E, { loading: r, children: /* @__PURE__ */ o("p", { "data-size": a, className: e.summary, children: i || f }) })
|
|
108
111
|
] }),
|
|
109
112
|
/* @__PURE__ */ o(
|
|
110
|
-
|
|
113
|
+
x,
|
|
111
114
|
{
|
|
112
115
|
className: e.footer,
|
|
113
116
|
loading: r,
|
|
@@ -115,15 +118,15 @@ import '../../assets/DialogListItem.css';const K = "_border_1wzcc_1", O = "_cont
|
|
|
115
118
|
updatedAt: d,
|
|
116
119
|
updatedAtLabel: _,
|
|
117
120
|
archivedAt: h,
|
|
118
|
-
archivedAtLabel:
|
|
121
|
+
archivedAtLabel: L,
|
|
119
122
|
trashedAt: p,
|
|
120
|
-
trashedAtLabel:
|
|
121
|
-
dueAt:
|
|
122
|
-
dueAtLabel:
|
|
123
|
-
attachmentsCount:
|
|
124
|
-
seenBy:
|
|
123
|
+
trashedAtLabel: S,
|
|
124
|
+
dueAt: k,
|
|
125
|
+
dueAtLabel: H,
|
|
126
|
+
attachmentsCount: V,
|
|
127
|
+
seenBy: M,
|
|
125
128
|
touchedBy: {
|
|
126
|
-
touchedBy:
|
|
129
|
+
touchedBy: T,
|
|
127
130
|
className: e.touchedBy
|
|
128
131
|
}
|
|
129
132
|
}
|
|
@@ -135,5 +138,5 @@ import '../../assets/DialogListItem.css';const K = "_border_1wzcc_1", O = "_cont
|
|
|
135
138
|
);
|
|
136
139
|
};
|
|
137
140
|
export {
|
|
138
|
-
|
|
141
|
+
so as DialogListItem
|
|
139
142
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { ListItemBase as
|
|
3
|
-
import { ListItemHeader as
|
|
4
|
-
const
|
|
1
|
+
import { jsxs as w, jsx as z } from "react/jsx-runtime";
|
|
2
|
+
import { ListItemBase as A } from "./ListItemBase.js";
|
|
3
|
+
import { ListItemHeader as C } from "./ListItemHeader.js";
|
|
4
|
+
const G = ({
|
|
5
5
|
className: p,
|
|
6
6
|
variant: c = "solid",
|
|
7
7
|
color: r,
|
|
@@ -25,11 +25,12 @@ const F = ({
|
|
|
25
25
|
controls: H,
|
|
26
26
|
children: b,
|
|
27
27
|
interactive: i,
|
|
28
|
-
|
|
28
|
+
id: d,
|
|
29
|
+
...k
|
|
29
30
|
}) => {
|
|
30
|
-
const
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
|
|
31
|
+
const q = typeof t == "function" ? t() : t;
|
|
32
|
+
return /* @__PURE__ */ w(
|
|
33
|
+
A,
|
|
33
34
|
{
|
|
34
35
|
variant: c,
|
|
35
36
|
color: r,
|
|
@@ -40,9 +41,10 @@ const F = ({
|
|
|
40
41
|
title: f,
|
|
41
42
|
loading: o,
|
|
42
43
|
interactive: i,
|
|
44
|
+
id: d,
|
|
43
45
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
46
|
+
/* @__PURE__ */ z(
|
|
47
|
+
C,
|
|
46
48
|
{
|
|
47
49
|
className: p,
|
|
48
50
|
color: r,
|
|
@@ -62,8 +64,8 @@ const F = ({
|
|
|
62
64
|
controls: H,
|
|
63
65
|
titleAs: j,
|
|
64
66
|
interactive: i,
|
|
65
|
-
...
|
|
66
|
-
children:
|
|
67
|
+
...k,
|
|
68
|
+
children: q
|
|
67
69
|
}
|
|
68
70
|
),
|
|
69
71
|
s ? b : null
|
|
@@ -72,5 +74,5 @@ const F = ({
|
|
|
72
74
|
);
|
|
73
75
|
};
|
|
74
76
|
export {
|
|
75
|
-
|
|
77
|
+
G as ListItem
|
|
76
78
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import '../../assets/ListItemBase.css';const
|
|
4
|
-
item:
|
|
5
|
-
interactiveSelected:
|
|
6
|
-
interactiveHidden:
|
|
7
|
-
interactive:
|
|
8
|
-
},
|
|
1
|
+
import { jsx as q } from "react/jsx-runtime";
|
|
2
|
+
import { c as H } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import '../../assets/ListItemBase.css';const f = "_item_2saqu_1", x = "_interactiveSelected_2saqu_83", h = "_interactiveHidden_2saqu_87", w = "_interactive_2saqu_83", t = {
|
|
4
|
+
item: f,
|
|
5
|
+
interactiveSelected: x,
|
|
6
|
+
interactiveHidden: h,
|
|
7
|
+
interactive: w
|
|
8
|
+
}, y = ({
|
|
9
9
|
as: i,
|
|
10
10
|
interactive: n = !0,
|
|
11
11
|
size: c,
|
|
@@ -17,30 +17,32 @@ import '../../assets/ListItemBase.css';const H = "_item_2saqu_1", f = "_interact
|
|
|
17
17
|
selected: d,
|
|
18
18
|
className: v,
|
|
19
19
|
onMouseEnter: m,
|
|
20
|
-
|
|
20
|
+
id: _,
|
|
21
|
+
children: l
|
|
21
22
|
}) => {
|
|
22
|
-
const
|
|
23
|
+
const p = i || "li", u = e === "transparent" ? "none" : o, S = H(
|
|
23
24
|
t.item,
|
|
24
25
|
v,
|
|
25
26
|
n && t.interactive,
|
|
26
27
|
d && t.interactiveSelected,
|
|
27
28
|
a && t.interactiveHidden
|
|
28
29
|
);
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
|
|
30
|
+
return /* @__PURE__ */ q(
|
|
31
|
+
p,
|
|
31
32
|
{
|
|
32
|
-
className:
|
|
33
|
+
className: S,
|
|
33
34
|
"data-variant": s,
|
|
34
35
|
"data-color": r,
|
|
35
36
|
"data-theme": e,
|
|
36
37
|
"data-size": c,
|
|
37
|
-
"data-shadow":
|
|
38
|
+
"data-shadow": u,
|
|
38
39
|
"aria-hidden": a,
|
|
39
40
|
onMouseEnter: m,
|
|
40
|
-
|
|
41
|
+
id: _,
|
|
42
|
+
children: l
|
|
41
43
|
}
|
|
42
44
|
);
|
|
43
45
|
};
|
|
44
46
|
export {
|
|
45
|
-
|
|
47
|
+
y as ListItemBase
|
|
46
48
|
};
|
|
@@ -71,4 +71,4 @@ export interface DialogListItemProps extends ListItemProps {
|
|
|
71
71
|
* summary, sender, and receiver.
|
|
72
72
|
* to mark the item as checked/unchecked and can visually indicate if it is unread.
|
|
73
73
|
*/
|
|
74
|
-
export declare const DialogListItem: ({ size, state, loading, controls, select, selected, status, sender, recipient, recipientLabel, grouped, updatedAt, updatedAtLabel, archivedAt, archivedAtLabel, trashedAt, trashedAtLabel, badge, dueAt, dueAtLabel, seen, seenBy, touchedBy, attachmentsCount, title, description, summary, theme, ...rest }: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
export declare const DialogListItem: ({ size, state, loading, controls, select, selected, status, sender, recipient, recipientLabel, grouped, updatedAt, updatedAtLabel, archivedAt, archivedAtLabel, trashedAt, trashedAtLabel, badge, dueAt, dueAtLabel, seen, seenBy, touchedBy, attachmentsCount, title, description, summary, theme, id, ...rest }: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -35,4 +35,4 @@ export interface ListItemInputProps extends ListItemProps {
|
|
|
35
35
|
/** Child items */
|
|
36
36
|
items?: ListItemProps[];
|
|
37
37
|
}
|
|
38
|
-
export declare const ListItem: ({ className, variant, color, theme, shadow, loading, collapsible, expanded, size, icon, avatar, avatarGroup, title, titleAs, description, badge, linkIcon, label, select, selected, controls, children, interactive, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare const ListItem: ({ className, variant, color, theme, shadow, loading, collapsible, expanded, size, icon, avatar, avatarGroup, title, titleAs, description, badge, linkIcon, label, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { ListItemProps } from '../';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ className, variant, color, theme, shadow, loading, collapsible, expanded, size, icon, avatar, avatarGroup, title, titleAs, description, badge, linkIcon, label, select, selected, controls, children, interactive, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: ({ className, variant, color, theme, shadow, loading, collapsible, expanded, size, icon, avatar, avatarGroup, title, titleAs, description, badge, linkIcon, label, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
8
8
|
id: string;
|
|
@@ -42,5 +42,7 @@ export interface ListItemBaseProps {
|
|
|
42
42
|
onMouseEnter?: HTMLProps<HTMLDivElement>['onMouseEnter'];
|
|
43
43
|
/** The children elements of the list item. */
|
|
44
44
|
children?: ReactNode;
|
|
45
|
+
/** Id of list item. */
|
|
46
|
+
id?: string;
|
|
45
47
|
}
|
|
46
|
-
export declare const ListItemBase: ({ as, interactive, size, variant, color, theme, shadow, hidden, selected, className, onMouseEnter, children, }: ListItemBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export declare const ListItemBase: ({ as, interactive, size, variant, color, theme, shadow, hidden, selected, className, onMouseEnter, id, children, }: ListItemBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ListItemProps } from '../';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ className, variant, color, theme, shadow, loading, collapsible, expanded, size, icon, avatar, avatarGroup, title, titleAs, description, badge, linkIcon, label, select, selected, controls, children, interactive, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ className, variant, color, theme, shadow, loading, collapsible, expanded, size, icon, avatar, avatarGroup, title, titleAs, description, badge, linkIcon, label, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
parameters: {};
|
|
6
6
|
args: {
|
|
7
7
|
id: string;
|