@altinn/altinn-components 0.30.3 → 0.32.0
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/Badge.css +1 -1
- package/dist/assets/DialogListItem.css +1 -1
- package/dist/assets/DrawerBase.css +1 -1
- package/dist/assets/DrawerOrDropdown.css +1 -0
- package/dist/assets/DropdownBase.css +1 -1
- package/dist/assets/ListItemHeader.css +1 -1
- package/dist/assets/MenuItemBase.css +1 -1
- package/dist/assets/ModalBase.css +1 -0
- package/dist/assets/Transmission.css +1 -0
- package/dist/components/Account/AccountList.js +6 -6
- package/dist/components/Account/AccountListItem.js +1 -1
- package/dist/components/Account/AccountListItemControls.js +1 -1
- package/dist/components/ActivityLog/ActivityLog.js +24 -8
- package/dist/components/ActivityLog/ActivityLogItem.js +4 -5
- package/dist/components/ActivityLog/ActivityLogSegment.js +17 -0
- package/dist/components/ActivityLog/index.js +6 -4
- package/dist/components/Badge/Badge.js +12 -11
- package/dist/components/Bookmarks/BookmarksListItem.js +1 -1
- package/dist/components/Bookmarks/BookmarksSection.js +1 -1
- package/dist/components/Dialog/Dialog.js +33 -11
- package/dist/components/Dialog/DialogActivityLog.js +10 -4
- package/dist/components/Dialog/DialogBody.js +13 -32
- package/dist/components/Dialog/DialogByline.js +1 -1
- package/dist/components/Dialog/DialogHeader.js +37 -23
- package/dist/components/Dialog/DialogHistory.js +22 -21
- package/dist/components/Dialog/DialogHistoryItem.js +6 -39
- package/dist/components/Dialog/DialogHistorySegment.js +11 -50
- package/dist/components/Dialog/DialogListGroup.js +4 -4
- package/dist/components/Dialog/DialogListItem.js +112 -98
- package/dist/components/Dialog/DialogMetadata.js +158 -96
- package/dist/components/Dialog/SeenByLog.js +4 -4
- package/dist/components/Dialog/index.js +9 -11
- package/dist/components/Dropdown/DrawerBase.js +15 -17
- package/dist/components/Dropdown/DrawerOrDropdown.js +20 -19
- package/dist/components/Dropdown/DropdownBase.js +1 -1
- package/dist/components/GlobalMenu/GlobalMenu.js +44 -43
- package/dist/components/GlobalMenu/GlobalMenuBase.js +7 -7
- package/dist/components/Header/Header.js +26 -26
- package/dist/components/List/List.js +1 -1
- package/dist/components/List/ListItemHeader.js +56 -56
- package/dist/components/Menu/MenuItemBase.js +15 -15
- package/dist/components/Menu/MenuOption.js +11 -12
- package/dist/components/Modal/ModalBase.js +37 -0
- package/dist/components/Modal/ModalBody.js +11 -0
- package/dist/components/Modal/ModalHeader.js +30 -0
- package/dist/components/Modal/index.js +8 -0
- package/dist/components/Search/SearchItem.js +2 -2
- package/dist/components/Searchbar/AutocompleteItem.js +1 -1
- package/dist/components/Searchbar/SuggestListItem.js +1 -1
- package/dist/components/Settings/SettingsItem.js +7 -7
- package/dist/components/Settings/SettingsList.js +1 -1
- package/dist/components/Transmission/Transmission.js +53 -48
- package/dist/components/Transmission/TransmissionList.js +2 -2
- package/dist/components/Transmission/TransmissionType.js +28 -0
- package/dist/components/Transmission/index.js +5 -2
- package/dist/components/index.js +354 -345
- package/dist/index.js +362 -353
- package/dist/types/lib/components/ActivityLog/ActivityLog.d.ts +8 -3
- package/dist/types/lib/components/ActivityLog/ActivityLog.stories.d.ts +1 -0
- package/dist/types/lib/components/ActivityLog/ActivityLogItem.d.ts +3 -2
- package/dist/types/lib/components/ActivityLog/ActivityLogSegment.d.ts +11 -0
- package/dist/types/lib/components/ActivityLog/index.d.ts +1 -0
- package/dist/types/lib/components/Badge/Badge.d.ts +1 -1
- package/dist/types/lib/components/Button/Button.stories.d.ts +0 -1
- package/dist/types/lib/components/Dialog/Dialog.d.ts +13 -11
- package/dist/types/lib/components/Dialog/Dialog.stories.d.ts +5 -3
- package/dist/types/lib/components/Dialog/DialogActivityLog.d.ts +7 -10
- package/dist/types/lib/components/Dialog/DialogBody.d.ts +5 -17
- package/dist/types/lib/components/Dialog/DialogBody.stories.d.ts +1 -3
- package/dist/types/lib/components/Dialog/DialogHeader.d.ts +12 -4
- package/dist/types/lib/components/Dialog/DialogHeader.stories.d.ts +3 -1
- package/dist/types/lib/components/Dialog/DialogHistory.d.ts +2 -1
- package/dist/types/lib/components/Dialog/DialogHistory.stories.d.ts +2 -8
- package/dist/types/lib/components/Dialog/DialogHistoryItem.d.ts +4 -7
- package/dist/types/lib/components/Dialog/DialogHistorySegment.d.ts +7 -8
- package/dist/types/lib/components/Dialog/DialogListItem.d.ts +13 -35
- package/dist/types/lib/components/Dialog/DialogMetadata.d.ts +14 -7
- package/dist/types/lib/components/Dialog/DialogMetadata.stories.d.ts +6 -9
- package/dist/types/lib/components/Dialog/index.d.ts +0 -1
- package/dist/types/lib/components/Dropdown/DrawerBase.d.ts +1 -3
- package/dist/types/lib/components/Forms/Radio.stories.d.ts +1 -0
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.d.ts +2 -1
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +2 -1
- package/dist/types/lib/components/GlobalMenu/GlobalMenuBase.d.ts +3 -3
- package/dist/types/lib/components/Modal/ModalBase.d.ts +11 -0
- package/dist/types/lib/components/Modal/ModalBase.stories.d.ts +9 -0
- package/dist/types/lib/components/Modal/ModalBody.d.ts +6 -0
- package/dist/types/lib/components/Modal/ModalHeader.d.ts +9 -0
- package/dist/types/lib/components/Modal/index.d.ts +3 -0
- package/dist/types/lib/components/Transmission/Transmission.d.ts +8 -5
- package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +5 -3
- package/dist/types/lib/components/Transmission/TransmissionList.stories.d.ts +16 -0
- package/dist/types/lib/components/Transmission/TransmissionType.d.ts +22 -0
- package/dist/types/lib/components/Transmission/index.d.ts +1 -0
- package/dist/types/lib/components/index.d.ts +1 -0
- package/dist/types/lib/stories/Dialog/Dialog.stories.d.ts +17 -0
- package/dist/types/lib/stories/Inbox.stories.d.ts +3 -6
- package/package.json +2 -2
- package/dist/ArrowDown-DtiYfZHZ.js +0 -25
- package/dist/DialogActivityLog-BoPREh7Y.js +0 -37
- package/dist/assets/DialogHeading.css +0 -1
- package/dist/components/Dialog/DialogActivity.js +0 -32
- package/dist/components/Dialog/DialogHeading.js +0 -18
- package/dist/types/lib/components/Dialog/DialogActivity.d.ts +0 -22
- package/dist/types/lib/components/Dialog/DialogHeading.d.ts +0 -19
- package/dist/types/lib/components/Dialog/DialogLayout.stories.d.ts +0 -20
- package/dist/types/lib/components/Dialog/DialogListItem.stories.d.ts +0 -36
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ActivityLogSegmentProps } from '..';
|
|
2
2
|
export interface ActivityLogProps {
|
|
3
|
-
items:
|
|
3
|
+
items: ActivityLogSegmentProps[];
|
|
4
|
+
maxItems?: number;
|
|
5
|
+
collapsible?: boolean;
|
|
6
|
+
expanded?: boolean;
|
|
7
|
+
expandLabel?: string;
|
|
8
|
+
collapseLabel?: string;
|
|
4
9
|
}
|
|
5
|
-
export declare
|
|
10
|
+
export declare const ActivityLog: ({ items, maxItems, expandLabel, collapseLabel, }: ActivityLogProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -7,3 +7,4 @@ declare const meta: {
|
|
|
7
7
|
export default meta;
|
|
8
8
|
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export declare const Controlled: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const Modal: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export interface ActivityLogItemProps {
|
|
3
|
-
id
|
|
3
|
+
id?: string;
|
|
4
4
|
byline?: string;
|
|
5
5
|
datetime?: string;
|
|
6
6
|
children?: ReactNode;
|
|
7
|
+
summary?: ReactNode;
|
|
7
8
|
}
|
|
8
|
-
export declare const ActivityLogItem: ({ byline, datetime, children }: ActivityLogItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const ActivityLogItem: ({ byline, datetime, children, summary, ...props }: ActivityLogItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ActivityLogItemProps } from '../';
|
|
3
|
+
export interface ActivityLogSegmentProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
items?: ActivityLogItemProps[];
|
|
6
|
+
datetime?: string;
|
|
7
|
+
byline?: string;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
summary?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const ActivityLogSegment: ({ id, items, datetime, byline, children, summary }: ActivityLogSegmentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Color, Theme } from '..';
|
|
3
3
|
export type BadgeColor = Color;
|
|
4
|
-
export type BadgeVariant = 'tinted' | 'base' | 'text';
|
|
4
|
+
export type BadgeVariant = 'subtle' | 'outline' | 'tinted' | 'base' | 'text';
|
|
5
5
|
/** Theme is deprecated, use variant instead */
|
|
6
6
|
export type BadgeTheme = Theme;
|
|
7
7
|
export type BadgeSize = 'sm' | 'xs';
|
|
@@ -2,7 +2,6 @@ import { StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: ({ variant, color, size, selected, icon, iconSize, href, label, labelSize, children, className, loading, ariaLabel, ...rest }: import('./Button').ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
tags: string[];
|
|
6
5
|
parameters: {};
|
|
7
6
|
args: {
|
|
8
7
|
children: string;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { DialogBodyProps, DialogHeaderProps, DialogLayoutProps,
|
|
3
|
-
export interface DialogProps extends DialogLayoutProps {
|
|
2
|
+
import { DialogBodyProps, DialogContactProps, DialogHeaderProps, DialogHistoryProps, DialogLayoutProps, DialogSectionProps } from '..';
|
|
3
|
+
export interface DialogProps extends DialogLayoutProps, DialogHeaderProps, DialogBodyProps {
|
|
4
4
|
/** Dialog is loading */
|
|
5
5
|
loading?: boolean;
|
|
6
|
-
/** Dialog
|
|
7
|
-
|
|
8
|
-
/** Dialog
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
/**
|
|
6
|
+
/** Dialog title */
|
|
7
|
+
title: string;
|
|
8
|
+
/** Dialog history */
|
|
9
|
+
history?: DialogHistoryProps;
|
|
10
|
+
/** Dialog history */
|
|
11
|
+
additionalInfo?: DialogSectionProps;
|
|
12
|
+
/** Dialog history */
|
|
13
|
+
contact?: DialogContactProps;
|
|
14
|
+
/** Content */
|
|
13
15
|
children?: ReactNode;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
|
-
* Full representation of a dialog, including attachments, actions and
|
|
18
|
+
* Full representation of a dialog, including attachments, actions, history, additional information, and contact information.
|
|
17
19
|
*/
|
|
18
|
-
export declare const Dialog: ({ loading, backButton, contextMenu, pageMenu,
|
|
20
|
+
export declare const Dialog: ({ loading, backButton, contextMenu, pageMenu, sender, title, history, additionalInfo, contact, children, ...props }: DialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,6 +4,8 @@ declare const meta: Meta<typeof Dialog>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
7
|
+
export declare const RequiresAttention: Story;
|
|
8
|
+
export declare const InProgress: Story;
|
|
9
|
+
export declare const Completed: Story;
|
|
10
|
+
export declare const Transmissions: Story;
|
|
11
|
+
export declare const ActivityLog: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
as?: ElementType;
|
|
8
|
-
onClick?: MouseEventHandler;
|
|
9
|
-
href?: string;
|
|
1
|
+
import { ActivityLogProps, ToolbarProps } from '../';
|
|
2
|
+
export interface DialogActivityLogProps extends ActivityLogProps {
|
|
3
|
+
title: string;
|
|
4
|
+
toolbar?: ToolbarProps;
|
|
5
|
+
open: boolean;
|
|
6
|
+
onClose: () => void;
|
|
10
7
|
}
|
|
11
|
-
export declare const DialogActivityLog: ({
|
|
8
|
+
export declare const DialogActivityLog: ({ title, items, open, onClose }: DialogActivityLogProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,32 +1,20 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { AvatarProps,
|
|
2
|
+
import { AvatarProps, SeenByLogProps } from '..';
|
|
3
3
|
export interface DialogBodyProps {
|
|
4
|
+
/** Loading */
|
|
5
|
+
loading?: boolean;
|
|
4
6
|
/** Sender */
|
|
5
|
-
sender
|
|
7
|
+
sender?: AvatarProps;
|
|
6
8
|
/** Recipient */
|
|
7
9
|
recipient?: AvatarProps;
|
|
8
|
-
/** Loading */
|
|
9
|
-
loading?: boolean;
|
|
10
|
-
/** Loading text */
|
|
11
|
-
loadingText?: string;
|
|
12
|
-
/** Updated date time */
|
|
13
|
-
updatedAt?: string;
|
|
14
|
-
/** Updated label */
|
|
15
|
-
updatedAtLabel?: string;
|
|
16
|
-
/** Due date */
|
|
17
|
-
dueAt?: string;
|
|
18
|
-
/** Due at label */
|
|
19
|
-
dueAtLabel?: string;
|
|
20
10
|
/** Recipient label (prefix) */
|
|
21
11
|
recipientLabel?: string;
|
|
22
12
|
/** Group recipient, show both sender and recipient avatars */
|
|
23
13
|
recipientGroup?: boolean;
|
|
24
14
|
/** Dialog is seen by the end user or others */
|
|
25
15
|
seenByLog?: SeenByLogProps;
|
|
26
|
-
/** Activity Log */
|
|
27
|
-
activityLog?: DialogActivityLogProps;
|
|
28
16
|
/** Content */
|
|
29
17
|
children?: ReactNode;
|
|
30
18
|
}
|
|
31
19
|
/** DialogBody represents the body, or main part of a dialog, including sender and recipient. */
|
|
32
|
-
export declare const DialogBody: ({ loading, sender, recipient, recipientLabel,
|
|
20
|
+
export declare const DialogBody: ({ loading, sender, recipient, recipientLabel, children, seenByLog }: DialogBodyProps) => 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, sender, recipient, recipientLabel,
|
|
4
|
+
component: ({ loading, sender, recipient, recipientLabel, children, seenByLog }: import('./DialogBody').DialogBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
args: {
|
|
7
7
|
sender: {
|
|
@@ -14,8 +14,6 @@ declare const meta: {
|
|
|
14
14
|
type: "person";
|
|
15
15
|
name: string;
|
|
16
16
|
};
|
|
17
|
-
updatedAt: string;
|
|
18
|
-
updatedAtLabel: string;
|
|
19
17
|
children: import("react/jsx-runtime").JSX.Element;
|
|
20
18
|
seenByLog: {
|
|
21
19
|
collapsible: true;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import { DialogStatusProps } from '..';
|
|
2
|
-
export interface DialogHeaderProps {
|
|
1
|
+
import { BadgeProps, DialogMetadataProps, DialogStatusProps } from '..';
|
|
2
|
+
export interface DialogHeaderProps extends DialogMetadataProps {
|
|
3
3
|
/** Loading state */
|
|
4
4
|
loading?: boolean;
|
|
5
5
|
/** Dialog title */
|
|
6
|
-
title
|
|
6
|
+
title: string;
|
|
7
|
+
/** Badge */
|
|
8
|
+
badge?: BadgeProps;
|
|
7
9
|
/** Dialog status */
|
|
8
10
|
status?: DialogStatusProps;
|
|
11
|
+
/** Drafts label */
|
|
12
|
+
draftsLabel?: string;
|
|
13
|
+
/** Number of submissions sent */
|
|
14
|
+
sentCount?: number;
|
|
15
|
+
/** Number of received transmissions */
|
|
16
|
+
receivedCount?: number;
|
|
9
17
|
/** Updated date time */
|
|
10
18
|
updatedAt?: string;
|
|
11
19
|
/** Updated label */
|
|
@@ -15,4 +23,4 @@ export interface DialogHeaderProps {
|
|
|
15
23
|
/** Due date label */
|
|
16
24
|
dueAtLabel?: string;
|
|
17
25
|
}
|
|
18
|
-
export declare const DialogHeader: ({ loading, title, status, updatedAt, updatedAtLabel, dueAt, dueAtLabel, }: DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const DialogHeader: ({ loading, title, badge, status, draftsLabel, sentCount, receivedCount, updatedAt, updatedAtLabel, dueAt, dueAtLabel, activityLog, }: DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ loading, title, status, updatedAt, updatedAtLabel, dueAt, dueAtLabel, }: import('./DialogHeader').DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ loading, title, badge, status, draftsLabel, sentCount, receivedCount, updatedAt, updatedAtLabel, dueAt, dueAtLabel, activityLog, }: import('./DialogHeader').DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
8
8
|
title: string;
|
|
9
|
+
updatedAt: string;
|
|
10
|
+
updatedAtLabel: string;
|
|
9
11
|
status: {
|
|
10
12
|
value: "requires-attention";
|
|
11
13
|
label: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { DialogHistorySegmentProps } from '..';
|
|
2
2
|
export interface DialogHistoryProps {
|
|
3
3
|
items: DialogHistorySegmentProps[];
|
|
4
|
+
maxItems?: number;
|
|
4
5
|
collapsible?: boolean;
|
|
5
6
|
expanded?: boolean;
|
|
6
7
|
expandLabel?: string;
|
|
7
8
|
collapseLabel?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare const DialogHistory: ({ items,
|
|
10
|
+
export declare const DialogHistory: ({ items, maxItems, expandLabel, collapseLabel, }: DialogHistoryProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ items,
|
|
4
|
+
component: ({ items, maxItems, expandLabel, collapseLabel, }: import('./DialogHistory').DialogHistoryProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
8
8
|
expandLabel: string;
|
|
9
9
|
collapseLabel: string;
|
|
10
|
-
items: import('./DialogHistorySegment').DialogHistorySegmentProps[];
|
|
11
|
-
collapsible?: boolean;
|
|
12
|
-
expanded?: boolean;
|
|
13
10
|
};
|
|
14
11
|
};
|
|
15
12
|
export default meta;
|
|
16
13
|
type Story = StoryObj<typeof meta>;
|
|
17
14
|
export declare const Default: Story;
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const ItemExpanded: Story;
|
|
20
|
-
export declare const EverythingExpanded: Story;
|
|
21
|
-
export declare const ActivityLog: Story;
|
|
15
|
+
export declare const Transmissions: Story;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export interface DialogHistoryItemProps extends Omit<TransmissionProps, 'variant'> {
|
|
5
|
-
variant?: 'transmission' | 'activity';
|
|
2
|
+
export interface DialogHistoryItemProps {
|
|
3
|
+
id?: string;
|
|
6
4
|
byline?: string;
|
|
7
5
|
datetime?: string;
|
|
8
6
|
children?: ReactNode;
|
|
9
|
-
|
|
10
|
-
link?: TimelineLinkProps;
|
|
7
|
+
summary?: ReactNode;
|
|
11
8
|
}
|
|
12
|
-
export declare const DialogHistoryItem: ({
|
|
9
|
+
export declare const DialogHistoryItem: ({ byline, datetime, children, summary, ...props }: DialogHistoryItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { DialogHistoryItemProps
|
|
3
|
-
export interface DialogHistorySegmentProps
|
|
4
|
-
|
|
2
|
+
import { DialogHistoryItemProps } from '../index.ts';
|
|
3
|
+
export interface DialogHistorySegmentProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
items?: DialogHistoryItemProps[];
|
|
5
6
|
datetime?: string;
|
|
6
7
|
byline?: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
expandLabel?: string | ReactNode;
|
|
10
|
-
collapseLabel?: string | ReactNode;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
summary?: ReactNode;
|
|
11
10
|
}
|
|
12
|
-
export declare const DialogHistorySegment: ({ items, datetime, byline,
|
|
11
|
+
export declare const DialogHistorySegment: ({ id, items, datetime, byline, children, summary }: DialogHistorySegmentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import { AvatarProps, BadgeProps, Color,
|
|
1
|
+
import { AvatarProps, BadgeProps, Color, DialogMetadataProps, DialogSeenByProps, 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';
|
|
5
|
-
export interface DialogListItemProps extends ListItemProps {
|
|
5
|
+
export interface DialogListItemProps extends ListItemProps, DialogMetadataProps {
|
|
6
6
|
/** Dialog title */
|
|
7
7
|
title: string;
|
|
8
8
|
/** Dialog id */
|
|
9
9
|
id?: string;
|
|
10
10
|
/** Dialog sender */
|
|
11
11
|
sender?: AvatarProps;
|
|
12
|
+
/** Dialog Recipient */
|
|
13
|
+
recipient?: AvatarProps;
|
|
14
|
+
/** Dialog Recipient */
|
|
15
|
+
recipientLabel?: string;
|
|
16
|
+
/** Group recipient, show both sender and recipient avatars */
|
|
17
|
+
grouped?: boolean;
|
|
12
18
|
/** Dialog description */
|
|
13
19
|
description?: string;
|
|
14
20
|
/** Dialog summary (will override description) */
|
|
@@ -21,48 +27,20 @@ export interface DialogListItemProps extends ListItemProps {
|
|
|
21
27
|
selected?: boolean;
|
|
22
28
|
/** Dialog state */
|
|
23
29
|
state?: DialogListItemState;
|
|
24
|
-
/** Dialog status */
|
|
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;
|
|
32
|
-
/** Dialog Recipient */
|
|
33
|
-
recipient?: AvatarProps;
|
|
34
|
-
/** Dialog Recipient */
|
|
35
|
-
recipientLabel?: string;
|
|
36
|
-
/** Group recipient, show both sender and recipient avatars */
|
|
37
|
-
grouped?: boolean;
|
|
38
|
-
/** Updated datetime */
|
|
39
|
-
updatedAt?: string;
|
|
40
|
-
/** Updated at label */
|
|
41
|
-
updatedAtLabel?: string;
|
|
42
|
-
/** Dialog due date */
|
|
43
|
-
dueAt?: string;
|
|
44
|
-
/** Dialog due date label */
|
|
45
|
-
dueAtLabel?: string;
|
|
46
|
-
/** Archived date time */
|
|
47
|
-
archivedAt?: string;
|
|
48
|
-
/** Archived label */
|
|
49
|
-
archivedAtLabel?: string;
|
|
50
|
-
/** Deleted at date time */
|
|
51
|
-
trashedAt?: string;
|
|
52
|
-
/** Deleted label */
|
|
53
|
-
trashedAtLabel?: string;
|
|
54
30
|
/** Tab index */
|
|
55
31
|
tabIndex?: number;
|
|
56
32
|
/** Custom badge */
|
|
57
33
|
badge?: BadgeProps;
|
|
58
|
-
/** Dialog has been
|
|
59
|
-
|
|
34
|
+
/** Dialog has not been opened or is marked as unread */
|
|
35
|
+
unread?: boolean;
|
|
60
36
|
/** Dialog is seen by the user */
|
|
61
37
|
seenBy?: DialogSeenByProps;
|
|
62
38
|
/** Seen by log */
|
|
63
39
|
seenByLog?: SeenByLogProps;
|
|
64
40
|
/** Number of attachments */
|
|
65
41
|
attachmentsCount?: number;
|
|
42
|
+
/** Attachments label */
|
|
43
|
+
attachmentsLabel?: string;
|
|
66
44
|
/** Group id */
|
|
67
45
|
groupId?: string;
|
|
68
46
|
/** Theme */
|
|
@@ -75,4 +53,4 @@ export interface DialogListItemProps extends ListItemProps {
|
|
|
75
53
|
* summary, sender, and receiver.
|
|
76
54
|
* to mark the item as checked/unchecked and can visually indicate if it is unread.
|
|
77
55
|
*/
|
|
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,
|
|
56
|
+
export declare const DialogListItem: ({ size, state, loading, controls, select, selected, status, sender, recipient, recipientLabel, grouped, updatedAt, updatedAtLabel, archived, archivedAt, archivedAtLabel, trashed, trashedAt, trashedAtLabel, badge, dueAt, dueAtLabel, unread, seenBy, seenByLog, draftsLabel, sentCount, receivedCount, attachmentsCount, attachmentsLabel, title, description, summary, variant, id, ...rest }: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { AvatarProps,
|
|
1
|
+
import { AvatarProps, DialogSeenByProps, DialogStatusProps } from '..';
|
|
2
|
+
interface DialogMetadataButtonProps {
|
|
3
|
+
label: string;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
}
|
|
2
6
|
export type DialogMetadataProps = {
|
|
3
7
|
className?: string;
|
|
4
8
|
/** Metadata is loading */
|
|
@@ -15,34 +19,37 @@ export type DialogMetadataProps = {
|
|
|
15
19
|
dueAt?: string;
|
|
16
20
|
/** Due date label */
|
|
17
21
|
dueAtLabel?: string;
|
|
22
|
+
/** Dialog is moved to archive */
|
|
23
|
+
archived?: boolean;
|
|
18
24
|
/** Archived date time */
|
|
19
25
|
archivedAt?: string;
|
|
20
26
|
/** Archived label */
|
|
21
27
|
archivedAtLabel?: string;
|
|
28
|
+
/** Dialog is moved to trash */
|
|
29
|
+
trashed?: boolean;
|
|
22
30
|
/** Deleted at date time */
|
|
23
31
|
trashedAt?: string;
|
|
24
32
|
/** Deleted label */
|
|
25
33
|
trashedAtLabel?: string;
|
|
26
34
|
/** Who have seen the dialog after latest update */
|
|
27
35
|
seenBy?: DialogSeenByProps;
|
|
28
|
-
/** Number of attachments */
|
|
29
|
-
attachmentsCount?: number;
|
|
30
36
|
/** Drafts label */
|
|
31
37
|
draftsLabel?: string;
|
|
32
38
|
/** Number of submissions sent */
|
|
33
39
|
sentCount?: number;
|
|
34
40
|
/** Number of received transmissions */
|
|
35
41
|
receivedCount?: number;
|
|
42
|
+
/** Attachments count */
|
|
43
|
+
attachmentsCount?: number;
|
|
36
44
|
/** Attachments label */
|
|
37
45
|
attachmentsLabel?: string;
|
|
38
46
|
/** Transmissions label */
|
|
39
47
|
transmissionsLabel?: string;
|
|
40
48
|
/** Activity Log */
|
|
41
|
-
activityLog?:
|
|
42
|
-
/** Clickable items */
|
|
43
|
-
onClick?: () => void;
|
|
49
|
+
activityLog?: DialogMetadataButtonProps;
|
|
44
50
|
};
|
|
45
51
|
/**
|
|
46
52
|
* Metadata for a dialog in list view.
|
|
47
53
|
*/
|
|
48
|
-
export declare const DialogMetadata: ({ className, loading, status, sender, updatedAt, updatedAtLabel, dueAt, dueAtLabel,
|
|
54
|
+
export declare const DialogMetadata: ({ className, loading, status, sender, updatedAt, updatedAtLabel, dueAt, dueAtLabel, archivedAt, archivedAtLabel, trashedAt, trashedAtLabel, seenBy, draftsLabel, sentCount, receivedCount, attachmentsCount, attachmentsLabel, transmissionsLabel, activityLog, }: DialogMetadataProps) => import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export {};
|
|
@@ -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,
|
|
4
|
+
component: ({ className, loading, status, sender, updatedAt, updatedAtLabel, dueAt, dueAtLabel, archivedAt, archivedAtLabel, trashedAt, trashedAtLabel, 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: {
|
|
@@ -12,12 +12,9 @@ declare const meta: {
|
|
|
12
12
|
export default meta;
|
|
13
13
|
type Story = StoryObj<typeof meta>;
|
|
14
14
|
export declare const Draft: Story;
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const SeenByAndActivityLog: Story;
|
|
21
|
-
export declare const SeenByLog: Story;
|
|
15
|
+
export declare const RequiresAttention: Story;
|
|
16
|
+
export declare const InProgress: Story;
|
|
17
|
+
export declare const Completed: Story;
|
|
18
|
+
export declare const NotApplicable: Story;
|
|
19
|
+
export declare const Transmissions: Story;
|
|
22
20
|
export declare const ActivityLog: Story;
|
|
23
|
-
export declare const SentAndReceivedCount: Story;
|
|
@@ -18,7 +18,6 @@ export * from './DialogActivityLog';
|
|
|
18
18
|
export * from './DialogSeenBy';
|
|
19
19
|
export * from './DialogSelect';
|
|
20
20
|
export * from './DialogStatus';
|
|
21
|
-
export * from './DialogHeading';
|
|
22
21
|
export * from './DialogAttachments';
|
|
23
22
|
export * from './SeenByLog';
|
|
24
23
|
export * from './SeenByLogButton';
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export type DrawerPlacement = 'inline' | 'bottom';
|
|
3
|
-
export type DrawerLayout = 'mobile' | 'desktop';
|
|
4
3
|
export interface DrawerBaseProps {
|
|
5
4
|
placement?: DrawerPlacement;
|
|
6
|
-
layout?: DrawerLayout;
|
|
7
5
|
open?: boolean;
|
|
8
6
|
className?: string;
|
|
9
7
|
children?: ReactNode;
|
|
10
8
|
as?: 'nav' | 'div';
|
|
11
9
|
}
|
|
12
|
-
export declare const DrawerBase: ({
|
|
10
|
+
export declare const DrawerBase: ({ placement, open, className, children, as, }: DrawerBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -14,5 +14,6 @@ export interface GlobalMenuProps {
|
|
|
14
14
|
currentEndUserLabel?: string;
|
|
15
15
|
onSelectAccount?: (id: string) => void;
|
|
16
16
|
onClose?: () => void;
|
|
17
|
+
ariaLabel?: string;
|
|
17
18
|
}
|
|
18
|
-
export declare const GlobalMenu: ({ accountMenu, items, groups, backLabel, currentAccount, currentEndUserLabel, onSelectAccount, onClose, logoutButton, }: GlobalMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const GlobalMenu: ({ accountMenu, items, groups, backLabel, currentAccount, currentEndUserLabel, onSelectAccount, onClose, logoutButton, ariaLabel, }: GlobalMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { Account } from '..';
|
|
|
3
3
|
import { GlobalMenuProps } from './GlobalMenu';
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: ({ accountMenu, items, groups, backLabel, currentAccount, currentEndUserLabel, onSelectAccount, onClose, logoutButton, }: GlobalMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
component: ({ accountMenu, items, groups, backLabel, currentAccount, currentEndUserLabel, onSelectAccount, onClose, logoutButton, ariaLabel, }: GlobalMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
tags: string[];
|
|
8
8
|
parameters: {};
|
|
9
9
|
args: {
|
|
@@ -19,6 +19,7 @@ declare const meta: {
|
|
|
19
19
|
currentEndUserLabel?: string;
|
|
20
20
|
onSelectAccount?: (id: string) => void;
|
|
21
21
|
onClose?: () => void;
|
|
22
|
+
ariaLabel?: string;
|
|
22
23
|
};
|
|
23
24
|
};
|
|
24
25
|
export default meta;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Color } from '../';
|
|
3
|
-
export
|
|
3
|
+
export type GlobalMenuBaseProps = {
|
|
4
4
|
color?: Color;
|
|
5
5
|
children: ReactNode;
|
|
6
|
-
}
|
|
6
|
+
} & React.HTMLAttributes<HTMLElement>;
|
|
7
7
|
export interface GlobalMenuHeaderProps {
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
}
|
|
10
10
|
export interface GlobalMenuFooterProps {
|
|
11
11
|
children: ReactNode;
|
|
12
12
|
}
|
|
13
|
-
export declare const GlobalMenuBase: ({ color, children }: GlobalMenuBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const GlobalMenuBase: ({ color, children, ...rest }: GlobalMenuBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export declare const GlobalMenuHeader: ({ children }: GlobalMenuHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export declare const GlobalMenuFooter: ({ children }: GlobalMenuFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BackdropColor } from '../';
|
|
2
|
+
export interface ModalBaseProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
backdropColor?: BackdropColor;
|
|
7
|
+
variant?: 'default' | 'content' | 'full';
|
|
8
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
9
|
+
color?: 'default' | 'primary' | 'secondary' | 'tertiary' | 'inherit';
|
|
10
|
+
}
|
|
11
|
+
export declare const ModalBase: ({ open, onClose, children, backdropColor, size, color, variant, }: ModalBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ModalBase } from './';
|
|
3
|
+
declare const meta: Meta<typeof ModalBase>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ModalBase>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const NoContent: Story;
|
|
8
|
+
export declare const Content: Story;
|
|
9
|
+
export declare const Full: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SectionProps } from '../';
|
|
3
|
+
export interface ModalBodyProps extends SectionProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const ModalBody: ({ children, ...props }: ModalBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ModalHeaderProps {
|
|
3
|
+
title: string;
|
|
4
|
+
closeTitle?: string;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
sticky?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const ModalHeader: ({ title, onClose, closeTitle, children }: ModalHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { AttachmentListProps, AvatarProps, BadgeProps, ListItemProps } from '..';
|
|
3
|
-
|
|
2
|
+
import { AttachmentListProps, AvatarProps, BadgeProps, ListItemProps, SeenByLogProps } from '..';
|
|
3
|
+
import { TransmissionTypeProps } from './TransmissionType';
|
|
4
4
|
export interface TransmissionProps extends Omit<ListItemProps, 'children'> {
|
|
5
5
|
id: string;
|
|
6
|
+
type?: TransmissionTypeProps;
|
|
7
|
+
unread?: boolean;
|
|
8
|
+
badge?: BadgeProps;
|
|
6
9
|
datetime?: string;
|
|
7
10
|
byline?: ReactNode;
|
|
8
|
-
badge?: BadgeProps;
|
|
9
11
|
createdAt?: string;
|
|
10
12
|
createdAtLabel?: string;
|
|
11
13
|
sender?: AvatarProps;
|
|
12
14
|
title?: string;
|
|
13
15
|
summary?: string;
|
|
14
16
|
attachments?: AttachmentListProps;
|
|
15
|
-
|
|
17
|
+
/** Transmission is seen by the end user or others */
|
|
18
|
+
seenByLog?: SeenByLogProps;
|
|
16
19
|
children?: ReactNode | (() => ReactElement);
|
|
17
20
|
}
|
|
18
|
-
export declare const Transmission: ({
|
|
21
|
+
export declare const Transmission: ({ type, unread, size, color, title, createdAt, createdAtLabel, badge, sender, summary, attachments, children, seenByLog, ...item }: TransmissionProps) => import("react/jsx-runtime").JSX.Element;
|