@altinn/altinn-components 0.30.1 → 0.30.3
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/ArrowDown-DtiYfZHZ.js +25 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/DialogListItem.css +1 -1
- package/dist/assets/SeenByLog.css +1 -1
- package/dist/assets/SeenByLogButton.css +1 -0
- package/dist/components/Button/Button.js +42 -41
- package/dist/components/Dialog/DialogBody.js +12 -12
- package/dist/components/Dialog/DialogContact.js +11 -4
- package/dist/components/Dialog/DialogHeader.js +26 -8
- package/dist/components/Dialog/DialogHistorySegment.js +37 -54
- package/dist/components/Dialog/DialogListItem.js +87 -83
- package/dist/components/Dialog/DialogMetadata.js +91 -86
- package/dist/components/Dialog/DialogSeenBy.js +36 -19
- package/dist/components/Dialog/DialogStatus.js +13 -13
- package/dist/components/Dialog/SeenByLog.js +21 -23
- package/dist/components/Dialog/SeenByLogButton.js +30 -0
- package/dist/components/Dialog/index.js +30 -30
- package/dist/components/Transmission/Transmission.js +9 -8
- package/dist/components/index.js +40 -40
- package/dist/index.js +53 -53
- package/dist/types/lib/components/Dialog/DialogContact.d.ts +6 -3
- package/dist/types/lib/components/Dialog/DialogHeader.d.ts +5 -1
- package/dist/types/lib/components/Dialog/DialogHeader.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogLayout.stories.d.ts +20 -0
- package/dist/types/lib/components/Dialog/DialogListItem.d.ts +10 -4
- package/dist/types/lib/components/Dialog/DialogListItem.stories.d.ts +6 -1
- package/dist/types/lib/components/Dialog/DialogMetadata.d.ts +8 -4
- package/dist/types/lib/components/Dialog/DialogMetadata.stories.d.ts +2 -1
- package/dist/types/lib/components/Dialog/DialogStatus.d.ts +4 -4
- package/dist/types/lib/components/Dialog/DialogStatus.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/SeenByLogButton.d.ts +13 -0
- package/dist/types/lib/components/Dialog/index.d.ts +1 -1
- package/dist/types/lib/stories/Inbox.stories.d.ts +7 -5
- package/package.json +1 -1
- package/dist/Eye-BuhFHkaK.js +0 -25
- package/dist/components/Dialog/DialogTouchedBy.js +0 -8
- package/dist/types/lib/components/Dialog/DialogTouchedBy.d.ts +0 -11
- package/dist/types/lib/components/Dialog/DialogTouchedBy.stories.d.ts +0 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AvatarProps, BadgeProps, Color, DialogSeenByProps, DialogStatusProps,
|
|
1
|
+
import { AvatarProps, BadgeProps, Color, DialogSeenByProps, DialogStatusProps, ListItemProps, SeenByLogProps } from '..';
|
|
2
2
|
export type DialogListItemSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
3
|
export type DialogListItemState = 'normal' | 'trashed' | 'archived';
|
|
4
4
|
export type DialogListItemTheme = 'default' | 'subtle' | 'transparent';
|
|
@@ -23,6 +23,12 @@ export interface DialogListItemProps extends ListItemProps {
|
|
|
23
23
|
state?: DialogListItemState;
|
|
24
24
|
/** Dialog status */
|
|
25
25
|
status?: DialogStatusProps;
|
|
26
|
+
/** Drafts label */
|
|
27
|
+
draftsLabel?: string;
|
|
28
|
+
/** Number of submissions sent */
|
|
29
|
+
sentCount?: number;
|
|
30
|
+
/** Number of received transmissions */
|
|
31
|
+
receivedCount?: number;
|
|
26
32
|
/** Dialog Recipient */
|
|
27
33
|
recipient?: AvatarProps;
|
|
28
34
|
/** Dialog Recipient */
|
|
@@ -53,8 +59,8 @@ export interface DialogListItemProps extends ListItemProps {
|
|
|
53
59
|
seen?: boolean;
|
|
54
60
|
/** Dialog is seen by the user */
|
|
55
61
|
seenBy?: DialogSeenByProps;
|
|
56
|
-
/**
|
|
57
|
-
|
|
62
|
+
/** Seen by log */
|
|
63
|
+
seenByLog?: SeenByLogProps;
|
|
58
64
|
/** Number of attachments */
|
|
59
65
|
attachmentsCount?: number;
|
|
60
66
|
/** Group id */
|
|
@@ -69,4 +75,4 @@ export interface DialogListItemProps extends ListItemProps {
|
|
|
69
75
|
* summary, sender, and receiver.
|
|
70
76
|
* to mark the item as checked/unchecked and can visually indicate if it is unread.
|
|
71
77
|
*/
|
|
72
|
-
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,
|
|
78
|
+
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, seenByLog, draftsLabel, sentCount, receivedCount, attachmentsCount, title, description, summary, variant, id, ...rest }: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -23,9 +23,14 @@ export { Loading };
|
|
|
23
23
|
export declare const Variants: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
export declare const DueAt: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
25
|
export declare const Attachments: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
export declare const TouchedBy: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
26
|
export declare const TextLength: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
27
|
export declare const Selectable: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element[];
|
|
29
28
|
export declare const Sizes: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element[];
|
|
30
29
|
export declare const AsLink: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
30
|
export declare const CustomControls: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare const TransmissionsUnseen: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare const TransmissionsSeen: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare const TransmissionsWithSummary: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare const DraftDialog: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare const MultipleDrafts: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare const StatusAndDraft: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AvatarProps, DialogActivityLogProps, DialogSeenByProps, DialogStatusProps
|
|
1
|
+
import { AvatarProps, DialogActivityLogProps, DialogSeenByProps, DialogStatusProps } from '..';
|
|
2
2
|
export type DialogMetadataProps = {
|
|
3
3
|
className?: string;
|
|
4
4
|
/** Metadata is loading */
|
|
@@ -25,10 +25,14 @@ export type DialogMetadataProps = {
|
|
|
25
25
|
trashedAtLabel?: string;
|
|
26
26
|
/** Who have seen the dialog after latest update */
|
|
27
27
|
seenBy?: DialogSeenByProps;
|
|
28
|
-
/** Who have seen the dialog after latest update */
|
|
29
|
-
touchedBy?: DialogTouchedByProps;
|
|
30
28
|
/** Number of attachments */
|
|
31
29
|
attachmentsCount?: number;
|
|
30
|
+
/** Drafts label */
|
|
31
|
+
draftsLabel?: string;
|
|
32
|
+
/** Number of submissions sent */
|
|
33
|
+
sentCount?: number;
|
|
34
|
+
/** Number of received transmissions */
|
|
35
|
+
receivedCount?: number;
|
|
32
36
|
/** Attachments label */
|
|
33
37
|
attachmentsLabel?: string;
|
|
34
38
|
/** Transmissions label */
|
|
@@ -41,4 +45,4 @@ export type DialogMetadataProps = {
|
|
|
41
45
|
/**
|
|
42
46
|
* Metadata for a dialog in list view.
|
|
43
47
|
*/
|
|
44
|
-
export declare const DialogMetadata: ({ className, loading, status, sender, updatedAt, updatedAtLabel, dueAt, dueAtLabel, trashedAt, trashedAtLabel, archivedAt, archivedAtLabel, seenBy,
|
|
48
|
+
export declare const DialogMetadata: ({ className, loading, status, sender, updatedAt, updatedAtLabel, dueAt, dueAtLabel, trashedAt, trashedAtLabel, archivedAt, archivedAtLabel, seenBy, draftsLabel, sentCount, receivedCount, attachmentsCount, attachmentsLabel, transmissionsLabel, activityLog, }: DialogMetadataProps) => 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: ({ className, loading, status, sender, updatedAt, updatedAtLabel, dueAt, dueAtLabel, trashedAt, trashedAtLabel, archivedAt, archivedAtLabel, seenBy,
|
|
4
|
+
component: ({ className, loading, status, sender, updatedAt, updatedAtLabel, dueAt, dueAtLabel, trashedAt, trashedAtLabel, archivedAt, archivedAtLabel, seenBy, draftsLabel, sentCount, receivedCount, attachmentsCount, attachmentsLabel, transmissionsLabel, activityLog, }: import('./DialogMetadata').DialogMetadataProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
@@ -20,3 +20,4 @@ export declare const SeenByEndUserAndOthers: Story;
|
|
|
20
20
|
export declare const SeenByAndActivityLog: Story;
|
|
21
21
|
export declare const SeenByLog: Story;
|
|
22
22
|
export declare const ActivityLog: Story;
|
|
23
|
+
export declare const SentAndReceivedCount: Story;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { MetaItemSize } from '../Metadata';
|
|
2
2
|
export declare enum DialogStatusEnum {
|
|
3
|
+
/** No explicit status. This is the default. */
|
|
4
|
+
'not-applicable' = "NOT_APPLICABLE",
|
|
3
5
|
/** Used to indicate user-initiated dialogs not yet sent. */
|
|
4
6
|
draft = "DRAFT",
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
/** The dialogue is considered new. Typically used for simple messages that do not require any interaction, or as an initial step for dialogues. This is the default. */
|
|
8
|
-
new = "NEW",
|
|
7
|
+
/** Awaiting action by the service owner. Indicates that the dialog is in a state where the party representative has no further tasks, and the responsibility lies with the service owner. */
|
|
8
|
+
awaiting = "AWAITING",
|
|
9
9
|
/** The dialogue was completed. This typically means that the dialogue is moved to a GUI archive or similar. */
|
|
10
10
|
completed = "COMPLETED",
|
|
11
11
|
/** Started. In a serial process, this is used to indicate that, for example, a form filling is ongoing. */
|
|
@@ -15,7 +15,7 @@ export default meta;
|
|
|
15
15
|
type Story = StoryObj<typeof meta>;
|
|
16
16
|
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export declare const Draft: Story;
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const Awaiting: Story;
|
|
19
19
|
export declare const RequiresAttention: Story;
|
|
20
20
|
export declare const InProgress: Story;
|
|
21
21
|
export declare const Completed: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AvatarProps } from '..';
|
|
3
|
+
export interface SeenByLogButtonProps {
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
items: AvatarProps[];
|
|
7
|
+
className?: string;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* SeenByLog Button
|
|
12
|
+
*/
|
|
13
|
+
export declare const SeenByLogButton: ({ ariaLabel, items, children, className, onClick }: SeenByLogButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,6 +19,6 @@ export * from './DialogSeenBy';
|
|
|
19
19
|
export * from './DialogSelect';
|
|
20
20
|
export * from './DialogStatus';
|
|
21
21
|
export * from './DialogHeading';
|
|
22
|
-
export * from './DialogTouchedBy';
|
|
23
22
|
export * from './DialogAttachments';
|
|
24
23
|
export * from './SeenByLog';
|
|
24
|
+
export * from './SeenByLogButton';
|
|
@@ -7,11 +7,13 @@ declare const meta: {
|
|
|
7
7
|
args: {};
|
|
8
8
|
};
|
|
9
9
|
export default meta;
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
10
|
+
export declare const InboxPage: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const SearchPage: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const DraftsPage: () => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const SentPage: () => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const BookmarksPage: () => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const ArchivePage: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const TrashPage: () => import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
export declare const Dialog: ({ tabId }: {
|
|
16
18
|
tabId?: string | undefined;
|
|
17
19
|
}) => import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
package/dist/Eye-BuhFHkaK.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as a from "react";
|
|
3
|
-
import { forwardRef as i } from "react";
|
|
4
|
-
import { u as c } from "./useId-BVFxCjkq.js";
|
|
5
|
-
var f = function(t, n) {
|
|
6
|
-
var r = {};
|
|
7
|
-
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && n.indexOf(e) < 0 && (r[e] = t[e]);
|
|
8
|
-
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
9
|
-
for (var l = 0, e = Object.getOwnPropertySymbols(t); l < e.length; l++)
|
|
10
|
-
n.indexOf(e[l]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[l]) && (r[e[l]] = t[e[l]]);
|
|
11
|
-
return r;
|
|
12
|
-
};
|
|
13
|
-
const p = i((t, n) => {
|
|
14
|
-
var { title: r, titleId: e } = t, l = f(t, ["title", "titleId"]);
|
|
15
|
-
let o = c();
|
|
16
|
-
return o = r ? e || "title-" + o : void 0, a.createElement(
|
|
17
|
-
"svg",
|
|
18
|
-
Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: n, "aria-labelledby": o }, l),
|
|
19
|
-
r ? a.createElement("title", { id: o }, r) : null,
|
|
20
|
-
a.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M4.148 12.317A10 10 0 0 1 3.905 12q.103-.14.243-.317c.35-.438.878-1.025 1.582-1.61C7.136 8.902 9.222 7.75 12 7.75a4.25 4.25 0 0 0 0 8.5c-2.778 0-4.864-1.152-6.27-2.323a11.3 11.3 0 0 1-1.582-1.61M12 16.25a4.25 4.25 0 0 0 0-8.5c2.778 0 4.864 1.152 6.27 2.323A11.3 11.3 0 0 1 20.095 12q-.103.14-.243.317a11.3 11.3 0 0 1-1.582 1.61c-1.406 1.171-3.492 2.323-6.27 2.323m0-10c-3.222 0-5.636 1.343-7.23 2.67a12.8 12.8 0 0 0-1.793 1.826 10 10 0 0 0-.576.796l-.05.08-.011.022a1 1 0 0 0-.037.078c-.012.032-.045.17-.053.278.008.108.041.246.053.278l.037.078.012.022.05.08q.04.069.12.182c.103.152.254.363.455.614.4.5.997 1.163 1.793 1.826 1.594 1.327 4.008 2.67 7.23 2.67s5.636-1.343 7.23-2.67a12.8 12.8 0 0 0 1.793-1.826 10 10 0 0 0 .576-.796l.035-.056.005-.009.01-.015.011-.022.016-.03c.004-.01.015-.033.02-.048.013-.032.046-.17.054-.278a1.4 1.4 0 0 0-.053-.278l-.021-.047q-.012-.024-.016-.031l-.02-.034-.006-.012a4 4 0 0 0-.155-.238 10 10 0 0 0-.456-.614c-.4-.5-.997-1.163-1.793-1.826-1.594-1.327-4.008-2.67-7.23-2.67M9.25 12a2.75 2.75 0 1 1 5.5 0 2.75 2.75 0 0 1-5.5 0", clipRule: "evenodd" })
|
|
21
|
-
);
|
|
22
|
-
});
|
|
23
|
-
export {
|
|
24
|
-
p as S
|
|
25
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import "../../index-L8X2o7IH.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { AvatarGroup as t } from "../Avatar/AvatarGroup.js";
|
|
5
|
-
const e = ({ loading: m, size: p = "sm", touchedBy: r = [], className: i }) => !(r != null && r.length) || m ? null : /* @__PURE__ */ o(t, { defaultType: "person", items: r, size: p, className: i });
|
|
6
|
-
export {
|
|
7
|
-
e as DialogTouchedBy
|
|
8
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AvatarSize } from '../Avatar';
|
|
2
|
-
export interface DialogTouchedByActor {
|
|
3
|
-
name: string;
|
|
4
|
-
}
|
|
5
|
-
export interface DialogTouchedByProps {
|
|
6
|
-
loading?: boolean;
|
|
7
|
-
size?: AvatarSize;
|
|
8
|
-
touchedBy?: DialogTouchedByActor[];
|
|
9
|
-
className?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare const DialogTouchedBy: ({ loading, size, touchedBy, className }: DialogTouchedByProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: ({ loading, size, touchedBy, className }: import('./DialogTouchedBy').DialogTouchedByProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
-
tags: string[];
|
|
6
|
-
parameters: {};
|
|
7
|
-
args: {
|
|
8
|
-
touchedBy: {
|
|
9
|
-
name: string;
|
|
10
|
-
}[];
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export default meta;
|
|
14
|
-
type Story = StoryObj<typeof meta>;
|
|
15
|
-
export declare const Default: Story;
|