@altinn/altinn-components 0.43.5 → 0.43.7
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,34 +1,36 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { c
|
|
2
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { c } from "../../index-L8X2o7IH.js";
|
|
4
4
|
import { useMemo as f } from "react";
|
|
5
5
|
import { Avatar as h } from "./Avatar.js";
|
|
6
|
-
import '../../assets/AvatarGroup.css';const A = "_group_1ts6c_1", _ = "_item_1ts6c_10",
|
|
6
|
+
import '../../assets/AvatarGroup.css';const A = "_group_1ts6c_1", _ = "_item_1ts6c_10", t = {
|
|
7
7
|
group: A,
|
|
8
8
|
item: _
|
|
9
|
-
}, L = (
|
|
10
|
-
items:
|
|
11
|
-
maxItemsCount:
|
|
12
|
-
defaultType:
|
|
9
|
+
}, L = (o) => typeof o == "object" && o !== null && "items" in o, N = ({
|
|
10
|
+
items: o = [],
|
|
11
|
+
maxItemsCount: i = 4,
|
|
12
|
+
defaultType: r,
|
|
13
13
|
size: u,
|
|
14
14
|
className: m,
|
|
15
15
|
style: p
|
|
16
16
|
}) => {
|
|
17
|
-
const
|
|
18
|
-
return
|
|
19
|
-
const g =
|
|
20
|
-
return /* @__PURE__ */
|
|
17
|
+
const s = f(() => o.slice(0, i).reverse(), [o, i]);
|
|
18
|
+
return o.length === 0 ? /* @__PURE__ */ l("div", { className: t.avatarGroup }) : /* @__PURE__ */ l("ul", { className: c(t.group, m), "data-size": u, "data-count": s == null ? void 0 : s.length, style: p, children: s.map((e, n) => {
|
|
19
|
+
const g = n === i - 1, d = e.customLabel || g ? o.length.toString() : void 0;
|
|
20
|
+
return /* @__PURE__ */ l("li", { className: c(t.item), children: /* @__PURE__ */ l(
|
|
21
21
|
h,
|
|
22
22
|
{
|
|
23
23
|
name: e.name,
|
|
24
24
|
customLabel: d,
|
|
25
25
|
imageUrl: e.imageUrl,
|
|
26
26
|
imageUrlAlt: e.imageUrlAlt,
|
|
27
|
-
type: (e == null ? void 0 : e.type) ||
|
|
27
|
+
type: (e == null ? void 0 : e.type) || r,
|
|
28
|
+
isParent: e == null ? void 0 : e.isParent,
|
|
29
|
+
isDeleted: e == null ? void 0 : e.isDeleted,
|
|
28
30
|
variant: e == null ? void 0 : e.variant,
|
|
29
31
|
outline: !0
|
|
30
32
|
}
|
|
31
|
-
) },
|
|
33
|
+
) }, n);
|
|
32
34
|
}) });
|
|
33
35
|
};
|
|
34
36
|
export {
|
|
@@ -1,50 +1,52 @@
|
|
|
1
1
|
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { Skeleton as
|
|
5
|
-
import { Heading as
|
|
6
|
-
import { Badge as
|
|
4
|
+
import { Skeleton as x } from "../Skeleton/Skeleton.js";
|
|
5
|
+
import { Heading as j } from "../Typography/Heading.js";
|
|
6
|
+
import { Badge as D } from "../Badge/Badge.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
|
-
import { DialogMetadata as
|
|
8
|
+
import { DialogMetadata as H } from "./DialogMetadata.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { Flex as
|
|
11
|
-
import { Section as
|
|
12
|
-
const
|
|
10
|
+
import { Flex as S } from "../Page/Flex.js";
|
|
11
|
+
import { Section as k } from "../Page/Section.js";
|
|
12
|
+
const E = ({
|
|
13
13
|
loading: i,
|
|
14
14
|
title: e,
|
|
15
15
|
badge: o,
|
|
16
16
|
status: m,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
extendedStatusLabel: n,
|
|
18
|
+
draftsLabel: p,
|
|
19
|
+
sentCount: a,
|
|
20
|
+
receivedCount: l,
|
|
21
|
+
updatedAt: c,
|
|
22
|
+
updatedAtLabel: s,
|
|
23
|
+
attachmentsCount: d,
|
|
24
|
+
dueAt: f,
|
|
25
|
+
dueAtLabel: h,
|
|
26
|
+
activityLog: g
|
|
27
|
+
}) => /* @__PURE__ */ t(k, { as: "header", spacing: 3, align: "start", children: [
|
|
28
|
+
/* @__PURE__ */ r(j, { size: "xl", children: /* @__PURE__ */ t(S, { align: "center", children: [
|
|
29
|
+
/* @__PURE__ */ r("span", { children: /* @__PURE__ */ r(x, { loading: i, children: e }) }),
|
|
30
|
+
o && /* @__PURE__ */ r(D, { ...o })
|
|
30
31
|
] }) }),
|
|
31
32
|
/* @__PURE__ */ r(
|
|
32
|
-
|
|
33
|
+
H,
|
|
33
34
|
{
|
|
34
35
|
loading: i,
|
|
35
36
|
status: m,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
extendedStatusLabel: n,
|
|
38
|
+
draftsLabel: p,
|
|
39
|
+
sentCount: a,
|
|
40
|
+
receivedCount: l,
|
|
41
|
+
updatedAt: c,
|
|
42
|
+
updatedAtLabel: s,
|
|
43
|
+
dueAt: f,
|
|
44
|
+
dueAtLabel: h,
|
|
45
|
+
attachmentsCount: d,
|
|
46
|
+
activityLog: g
|
|
45
47
|
}
|
|
46
48
|
)
|
|
47
49
|
] });
|
|
48
50
|
export {
|
|
49
|
-
|
|
51
|
+
E as DialogHeader
|
|
50
52
|
};
|
|
@@ -8,6 +8,8 @@ export interface DialogHeaderProps extends DialogMetadataProps {
|
|
|
8
8
|
badge?: BadgeProps;
|
|
9
9
|
/** Dialog status */
|
|
10
10
|
status?: DialogStatusProps;
|
|
11
|
+
/** Extended Status Label */
|
|
12
|
+
extendedStatusLabel?: string;
|
|
11
13
|
/** Drafts label */
|
|
12
14
|
draftsLabel?: string;
|
|
13
15
|
/** Number of submissions sent */
|
|
@@ -23,4 +25,4 @@ export interface DialogHeaderProps extends DialogMetadataProps {
|
|
|
23
25
|
/** Due date label */
|
|
24
26
|
dueAtLabel?: string;
|
|
25
27
|
}
|
|
26
|
-
export declare const DialogHeader: ({ loading, title, badge, status, draftsLabel, sentCount, receivedCount, updatedAt, updatedAtLabel, attachmentsCount, dueAt, dueAtLabel, activityLog, }: DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const DialogHeader: ({ loading, title, badge, status, extendedStatusLabel, draftsLabel, sentCount, receivedCount, updatedAt, updatedAtLabel, attachmentsCount, dueAt, dueAtLabel, activityLog, }: DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ loading, title, badge, status, draftsLabel, sentCount, receivedCount, updatedAt, updatedAtLabel, attachmentsCount, dueAt, dueAtLabel, activityLog, }: import('./DialogHeader').DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ loading, title, badge, status, extendedStatusLabel, draftsLabel, sentCount, receivedCount, updatedAt, updatedAtLabel, attachmentsCount, dueAt, dueAtLabel, activityLog, }: import('./DialogHeader').DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
@@ -20,3 +20,4 @@ export declare const Default: Story;
|
|
|
20
20
|
export declare const InProgress: Story;
|
|
21
21
|
export declare const Completed: Story;
|
|
22
22
|
export declare const Loading: Story;
|
|
23
|
+
export declare const WithExtendedStatus: Story;
|