@altinn/altinn-components 0.20.0 → 0.20.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._link_6y5ya_1[data-size=xl]{padding:1em}._link_6y5ya_1[data-size=lg]{padding:.875em}._link_6y5ya_1[data-size=md]{padding:.75em}._link_6y5ya_1[data-size=sm],._link_6y5ya_1[data-size=xs]{padding:.625em}._border_6y5ya_22{position:relative;border-left:.25rem solid;border-color:var(--ds-color-surface-active);display:flex;flex-direction:column}._border_6y5ya_22[data-seen=true]{border-color:var(--ds-color-neutral-surface-default)}._border_6y5ya_22[data-variant=draft]{border-color:var(--ds-color-neutral-surface-active);border-left-width:.125rem;margin-left:.125rem;border-left-style:dashed}._border_6y5ya_22[data-variant=sent]{border-color:var(--ds-color-neutral-surface-default)}._border_6y5ya_22[data-loading=true]{border-color:var(--ds-color-surface-default)}._border_6y5ya_22[data-size=xs],._border_6y5ya_22[data-size=sm]{width:100%;flex-direction:row;align-items:center;padding-left:.75rem}._border_6y5ya_22[data-size=md]{padding-left:.75rem;row-gap:.5rem}._border_6y5ya_22[data-size=lg]{padding-left:.875rem;row-gap:.875rem}._border_6y5ya_22[data-size=xl]{padding-left:1rem;row-gap:1rem}._select_6y5ya_72{position:absolute;top:0;right:0;margin:.375rem}._header_6y5ya_79{display:flex;flex-direction:column;row-gap:.25rem}._header_6y5ya_79[data-size=xs],._header_6y5ya_79[data-size=sm]{display:flex;flex-direction:row}._summary_6y5ya_91{font-size:1rem;font-weight:400;line-height:1.25;color:var(--ds-color-text-default);display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;margin:0}._summary_6y5ya_91[data-size=xs],._summary_6y5ya_91[data-size=sm],._summary_6y5ya_91[data-size=md]{font-size:.875rem}._summary_6y5ya_91[data-size=lg],._summary_6y5ya_91[data-size=xl]{font-size:1rem}._footer_6y5ya_119{width:100%}._touchedBy_6y5ya_123{position:absolute;right:0;bottom:0;margin:8px}._heading_6y5ya_132{padding-right:1.25rem;display:inline-flex;column-gap:.5em}._title_6y5ya_138{line-height:1.25;font-weight:600;margin:0}._title_6y5ya_138[data-size=xs],._title_6y5ya_138[data-size=sm]{font-size:1rem}._title_6y5ya_138[data-size=md],._title_6y5ya_138[data-size=lg],._title_6y5ya_138[data-size=xl]{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}._title_6y5ya_138[data-size=md]{font-size:1rem}._title_6y5ya_138[data-size=lg],._title_6y5ya_138[data-size=xl]{font-size:1.25rem;line-height:1.25}._title_6y5ya_138[data-seen=true],._title_6y5ya_138[data-state=archived]{font-weight:400}._title_6y5ya_138[data-state=trashed]{font-weight:400;text-decoration:line-through}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as g } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
@@ -9,111 +9,131 @@ import { DialogHeading as F } from "./DialogHeading.js";
|
|
|
9
9
|
import "../Search/AutocompleteBase.js";
|
|
10
10
|
import { ListItemLabel as G } from "../List/ListItemLabel.js";
|
|
11
11
|
import { ListItemSelect as J } from "../List/ListItemSelect.js";
|
|
12
|
-
import { ListItem as
|
|
12
|
+
import { ListItem as x } from "../List/ListItem.js";
|
|
13
13
|
import "../Snackbar/useSnackbar.js";
|
|
14
|
-
import '../../assets/DialogListItem.css';const K = "
|
|
14
|
+
import '../../assets/DialogListItem.css';const K = "_link_6y5ya_1", O = "_border_6y5ya_22", P = "_select_6y5ya_72", Q = "_header_6y5ya_79", R = "_summary_6y5ya_91", U = "_footer_6y5ya_119", W = "_touchedBy_6y5ya_123", X = "_heading_6y5ya_132", Y = "_title_6y5ya_138", o = {
|
|
15
15
|
link: K,
|
|
16
16
|
border: O,
|
|
17
17
|
select: P,
|
|
18
18
|
header: Q,
|
|
19
19
|
summary: R,
|
|
20
20
|
footer: U,
|
|
21
|
-
touchedBy:
|
|
22
|
-
heading:
|
|
23
|
-
title:
|
|
24
|
-
},
|
|
25
|
-
size:
|
|
26
|
-
state:
|
|
27
|
-
loading:
|
|
28
|
-
select:
|
|
29
|
-
selected:
|
|
30
|
-
status:
|
|
31
|
-
sender:
|
|
32
|
-
recipient:
|
|
21
|
+
touchedBy: W,
|
|
22
|
+
heading: X,
|
|
23
|
+
title: Y
|
|
24
|
+
}, sa = ({
|
|
25
|
+
size: a = "lg",
|
|
26
|
+
state: B = "normal",
|
|
27
|
+
loading: t,
|
|
28
|
+
select: i,
|
|
29
|
+
selected: l,
|
|
30
|
+
status: r,
|
|
31
|
+
sender: s,
|
|
32
|
+
recipient: v,
|
|
33
33
|
recipientLabel: k = "to",
|
|
34
34
|
grouped: D = !1,
|
|
35
|
-
updatedAt:
|
|
36
|
-
updatedAtLabel:
|
|
37
|
-
archivedAt:
|
|
35
|
+
updatedAt: n,
|
|
36
|
+
updatedAtLabel: d,
|
|
37
|
+
archivedAt: y,
|
|
38
38
|
archivedAtLabel: I,
|
|
39
39
|
trashedAt: _,
|
|
40
40
|
trashedAtLabel: L,
|
|
41
41
|
label: S,
|
|
42
42
|
dueAt: j,
|
|
43
|
-
dueAtLabel:
|
|
44
|
-
seen:
|
|
45
|
-
seenBy:
|
|
46
|
-
touchedBy:
|
|
47
|
-
attachmentsCount:
|
|
48
|
-
title:
|
|
49
|
-
description:
|
|
50
|
-
summary:
|
|
43
|
+
dueAtLabel: H,
|
|
44
|
+
seen: c = !1,
|
|
45
|
+
seenBy: M,
|
|
46
|
+
touchedBy: T,
|
|
47
|
+
attachmentsCount: V,
|
|
48
|
+
title: m,
|
|
49
|
+
description: h,
|
|
50
|
+
summary: p,
|
|
51
51
|
theme: q = "default",
|
|
52
|
-
...
|
|
52
|
+
...f
|
|
53
53
|
}) => {
|
|
54
|
-
const w = _ ? "trashed" :
|
|
55
|
-
return
|
|
56
|
-
|
|
54
|
+
const w = _ ? "trashed" : y ? "archived" : B, b = l ? "subtle" : q, N = r == null ? void 0 : r.value;
|
|
55
|
+
return a === "xs" || a === "sm" ? /* @__PURE__ */ e(
|
|
56
|
+
x,
|
|
57
57
|
{
|
|
58
|
-
...
|
|
59
|
-
size:
|
|
60
|
-
selected:
|
|
61
|
-
theme:
|
|
62
|
-
label: /* @__PURE__ */
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
...f,
|
|
59
|
+
size: a,
|
|
60
|
+
selected: l,
|
|
61
|
+
theme: b,
|
|
62
|
+
label: /* @__PURE__ */ e(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
className: o.border,
|
|
66
|
+
"data-variant": N,
|
|
67
|
+
"data-size": a,
|
|
68
|
+
"data-seen": c,
|
|
69
|
+
"data-loading": t,
|
|
70
|
+
children: /* @__PURE__ */ e(G, { loading: t, size: a, title: m, description: p || h })
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
badge: /* @__PURE__ */ e(u, { loading: t, sender: s, updatedAt: n, updatedAtLabel: d }),
|
|
74
|
+
title: m
|
|
65
75
|
}
|
|
66
|
-
) : /* @__PURE__ */
|
|
67
|
-
|
|
76
|
+
) : /* @__PURE__ */ e(
|
|
77
|
+
x,
|
|
68
78
|
{
|
|
69
|
-
...
|
|
70
|
-
size:
|
|
71
|
-
selected:
|
|
72
|
-
theme:
|
|
73
|
-
controls:
|
|
74
|
-
title:
|
|
75
|
-
label: /* @__PURE__ */
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
79
|
+
...f,
|
|
80
|
+
size: a,
|
|
81
|
+
selected: l,
|
|
82
|
+
theme: b,
|
|
83
|
+
controls: i && /* @__PURE__ */ e(J, { className: o.select, ...i, size: "xl" }),
|
|
84
|
+
title: m,
|
|
85
|
+
label: /* @__PURE__ */ g(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
className: o.border,
|
|
89
|
+
"data-variant": N,
|
|
90
|
+
"data-size": a,
|
|
91
|
+
"data-seen": c,
|
|
92
|
+
"data-loading": t,
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ g("header", { className: o.header, "data-size": a, children: [
|
|
95
|
+
/* @__PURE__ */ e(F, { loading: t, size: a, state: w, label: S, seen: c, children: m }),
|
|
96
|
+
/* @__PURE__ */ e(
|
|
97
|
+
C,
|
|
98
|
+
{
|
|
99
|
+
size: "xs",
|
|
100
|
+
loading: t,
|
|
101
|
+
sender: s,
|
|
102
|
+
recipient: v,
|
|
103
|
+
recipientLabel: k,
|
|
104
|
+
grouped: D
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
a === "lg" && /* @__PURE__ */ e(E, { loading: t, children: /* @__PURE__ */ e("p", { "data-size": a, className: o.summary, children: p || h }) })
|
|
108
|
+
] }),
|
|
109
|
+
/* @__PURE__ */ e(
|
|
110
|
+
u,
|
|
111
|
+
{
|
|
112
|
+
className: o.footer,
|
|
113
|
+
loading: t,
|
|
114
|
+
status: r,
|
|
115
|
+
updatedAt: n,
|
|
116
|
+
updatedAtLabel: d,
|
|
117
|
+
archivedAt: y,
|
|
118
|
+
archivedAtLabel: I,
|
|
119
|
+
trashedAt: _,
|
|
120
|
+
trashedAtLabel: L,
|
|
121
|
+
dueAt: j,
|
|
122
|
+
dueAtLabel: H,
|
|
123
|
+
attachmentsCount: V,
|
|
124
|
+
seenBy: M,
|
|
125
|
+
touchedBy: {
|
|
126
|
+
touchedBy: T,
|
|
127
|
+
className: o.touchedBy
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
)
|
|
114
134
|
}
|
|
115
135
|
);
|
|
116
136
|
};
|
|
117
137
|
export {
|
|
118
|
-
|
|
138
|
+
sa as DialogListItem
|
|
119
139
|
};
|
|
@@ -1,71 +1,77 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as
|
|
2
|
+
import { jsxs as i, jsx as r, Fragment as f } from "react/jsx-runtime";
|
|
3
|
+
import { useState as F, useMemo as L } from "react";
|
|
4
4
|
import "../../index-L8X2o7IH.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { AccountMenu as
|
|
7
|
-
import { AccountButton as
|
|
8
|
-
import { BackButton as
|
|
9
|
-
import { LogoutButton as
|
|
6
|
+
import { AccountMenu as H } from "./AccountMenu.js";
|
|
7
|
+
import { AccountButton as I } from "./AccountButton.js";
|
|
8
|
+
import { BackButton as W } from "./BackButton.js";
|
|
9
|
+
import { LogoutButton as M } from "./LogoutButton.js";
|
|
10
10
|
import "../Search/AutocompleteBase.js";
|
|
11
11
|
import "../Snackbar/useSnackbar.js";
|
|
12
|
-
import { MenuListItem as
|
|
13
|
-
import { Menu as
|
|
14
|
-
import { GlobalMenuBase as
|
|
12
|
+
import { MenuListItem as n } from "../Menu/MenuBase.js";
|
|
13
|
+
import { Menu as k } from "../Menu/Menu.js";
|
|
14
|
+
import { GlobalMenuBase as c, GlobalMenuHeader as g, GlobalMenuFooter as b } from "./GlobalMenuBase.js";
|
|
15
15
|
const S = ({
|
|
16
|
-
accounts:
|
|
17
|
-
accountGroups:
|
|
18
|
-
accountSearch:
|
|
19
|
-
items:
|
|
20
|
-
groups:
|
|
21
|
-
changeLabel:
|
|
16
|
+
accounts: p = [],
|
|
17
|
+
accountGroups: v = {},
|
|
18
|
+
accountSearch: x,
|
|
19
|
+
items: d = [],
|
|
20
|
+
groups: s,
|
|
21
|
+
changeLabel: G = "Change",
|
|
22
22
|
backLabel: B = "Back",
|
|
23
|
-
currentAccount:
|
|
24
|
-
onSelectAccount:
|
|
25
|
-
onClose:
|
|
26
|
-
logoutButton:
|
|
23
|
+
currentAccount: m,
|
|
24
|
+
onSelectAccount: l,
|
|
25
|
+
onClose: t,
|
|
26
|
+
logoutButton: a
|
|
27
27
|
}) => {
|
|
28
|
-
const [
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
...
|
|
28
|
+
const [T, j] = F(!1), o = () => {
|
|
29
|
+
j((e) => !e);
|
|
30
|
+
}, A = (e) => {
|
|
31
|
+
o(), t == null || t(), l == null || l(e);
|
|
32
|
+
}, h = L(() => d.map((e) => ({
|
|
33
|
+
...e,
|
|
34
34
|
onClick: () => {
|
|
35
|
-
var
|
|
36
|
-
(
|
|
35
|
+
var u;
|
|
36
|
+
(u = e.onClick) == null || u.call(e), t == null || t();
|
|
37
37
|
}
|
|
38
|
-
})), [
|
|
39
|
-
return
|
|
40
|
-
/* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(
|
|
41
|
-
/* @__PURE__ */ r(
|
|
38
|
+
})), [d, t]);
|
|
39
|
+
return T ? /* @__PURE__ */ i(c, { children: [
|
|
40
|
+
/* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(W, { onClick: o, label: B }) }),
|
|
41
|
+
/* @__PURE__ */ r(n, { as: "div", role: "separator" }),
|
|
42
42
|
/* @__PURE__ */ r(
|
|
43
|
-
|
|
43
|
+
H,
|
|
44
44
|
{
|
|
45
|
-
currentAccount:
|
|
46
|
-
accounts:
|
|
47
|
-
accountGroups:
|
|
48
|
-
accountSearch:
|
|
49
|
-
onSelectAccount:
|
|
45
|
+
currentAccount: m,
|
|
46
|
+
accounts: p,
|
|
47
|
+
accountGroups: v,
|
|
48
|
+
accountSearch: x,
|
|
49
|
+
onSelectAccount: A
|
|
50
50
|
}
|
|
51
51
|
)
|
|
52
|
-
] }) :
|
|
52
|
+
] }) : m ? /* @__PURE__ */ i(c, { children: [
|
|
53
53
|
/* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(
|
|
54
|
-
|
|
54
|
+
I,
|
|
55
55
|
{
|
|
56
|
-
account:
|
|
57
|
-
linkText:
|
|
58
|
-
multipleAccounts:
|
|
59
|
-
onClick:
|
|
56
|
+
account: m,
|
|
57
|
+
linkText: G,
|
|
58
|
+
multipleAccounts: p.length > 1,
|
|
59
|
+
onClick: o
|
|
60
60
|
}
|
|
61
61
|
) }),
|
|
62
|
-
/* @__PURE__ */ r(
|
|
63
|
-
/* @__PURE__ */ r(
|
|
64
|
-
|
|
65
|
-
/* @__PURE__ */ r(
|
|
66
|
-
/* @__PURE__ */ r(
|
|
62
|
+
/* @__PURE__ */ r(n, { as: "div", role: "separator" }),
|
|
63
|
+
/* @__PURE__ */ r(k, { groups: s, items: h, theme: "default" }),
|
|
64
|
+
a && /* @__PURE__ */ i(f, { children: [
|
|
65
|
+
/* @__PURE__ */ r(n, { as: "div", role: "separator" }),
|
|
66
|
+
/* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(M, { ...a }) })
|
|
67
67
|
] })
|
|
68
|
-
] }) : /* @__PURE__ */
|
|
68
|
+
] }) : /* @__PURE__ */ i(c, { children: [
|
|
69
|
+
/* @__PURE__ */ r(k, { groups: s, items: h }),
|
|
70
|
+
a && /* @__PURE__ */ i(f, { children: [
|
|
71
|
+
/* @__PURE__ */ r(n, { as: "div", role: "separator" }),
|
|
72
|
+
/* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(M, { ...a }) })
|
|
73
|
+
] })
|
|
74
|
+
] });
|
|
69
75
|
};
|
|
70
76
|
export {
|
|
71
77
|
S as GlobalMenu
|
|
@@ -3,9 +3,6 @@ declare const meta: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
component: ({ items, groups, sortGroupBy }: import('./DialogList').DialogListProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
6
|
args: {
|
|
10
7
|
items: import('./DialogListItem').DialogListItemProps[];
|
|
11
8
|
};
|