@altinn/altinn-components 0.20.2 → 0.21.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/ArrowUp-Cn3ai5t6.js +25 -0
- package/dist/assets/ButtonBase.css +1 -1
- package/dist/assets/DialogListItem.css +1 -1
- package/dist/assets/ListItemLabel.css +1 -1
- package/dist/assets/ProgressIcon.css +1 -1
- package/dist/assets/TimelineBase.css +1 -1
- package/dist/assets/TimelineLink.css +1 -0
- package/dist/components/Button/ButtonBase.js +10 -10
- package/dist/components/Button/ButtonIcon.js +6 -6
- package/dist/components/Byline/Byline.js +12 -11
- package/dist/components/Dialog/DialogHeading.js +7 -7
- package/dist/components/Dialog/DialogHistory.js +37 -54
- package/dist/components/Dialog/DialogListItem.js +19 -19
- package/dist/components/Dialog/DialogMetadata.js +1 -1
- package/dist/components/Dialog/index.js +21 -23
- package/dist/components/Icon/ProgressIcon.js +4 -4
- package/dist/components/List/ListItemLabel.js +16 -9
- package/dist/components/Timeline/Timeline.js +2 -2
- package/dist/components/Timeline/TimelineBase.js +25 -23
- package/dist/components/Timeline/TimelineFooter.js +5 -5
- package/dist/components/Timeline/TimelineHeader.js +9 -9
- package/dist/components/Timeline/TimelineLink.js +39 -0
- package/dist/components/Timeline/TimelineSection.js +16 -15
- package/dist/components/Timeline/TimelineSegment.js +12 -12
- package/dist/components/Timeline/index.js +2 -0
- package/dist/components/Transmission/Transmission.js +36 -33
- package/dist/components/Transmission/TransmissionTimeline.js +22 -0
- package/dist/components/Transmission/TransmissionTimelineSegment.js +63 -0
- package/dist/components/Transmission/index.js +7 -3
- package/dist/components/index.js +207 -203
- package/dist/index.js +221 -217
- package/dist/types/lib/components/Button/ButtonBase.d.ts +1 -1
- package/dist/types/lib/components/Button/ButtonIcon.d.ts +3 -2
- package/dist/types/lib/components/Byline/Byline.d.ts +1 -1
- package/dist/types/lib/components/Byline/Byline.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogHeading.d.ts +4 -4
- package/dist/types/lib/components/Dialog/DialogListItem.d.ts +6 -4
- package/dist/types/lib/components/Dialog/index.d.ts +0 -1
- package/dist/types/lib/components/List/ListItemLabel.d.ts +2 -1
- package/dist/types/lib/components/Page/Flex.d.ts +2 -3
- package/dist/types/lib/components/Timeline/TimelineBase.d.ts +5 -4
- package/dist/types/lib/components/Timeline/TimelineLink.d.ts +9 -0
- package/dist/types/lib/components/Timeline/TimelineSection.d.ts +3 -2
- package/dist/types/lib/components/Timeline/TimelineSection.stories.d.ts +1 -1
- package/dist/types/lib/components/Timeline/TimelineSegment.d.ts +3 -3
- package/dist/types/lib/components/Timeline/index.d.ts +1 -0
- package/dist/types/lib/components/Transmission/Transmission.d.ts +2 -6
- package/dist/types/lib/components/Transmission/TransmissionTimeline.d.ts +10 -0
- package/dist/types/lib/components/Transmission/TransmissionTimeline.stories.d.ts +74 -0
- package/dist/types/lib/components/Transmission/TransmissionTimelineSegment.d.ts +14 -0
- package/dist/types/lib/components/Transmission/index.d.ts +2 -0
- package/package.json +1 -1
- package/dist/components/Dialog/DialogLabel.js +0 -21
- package/dist/types/lib/components/Dialog/DialogLabel.d.ts +0 -13
|
@@ -14,7 +14,6 @@ export * from './DialogSelect';
|
|
|
14
14
|
export * from './DialogStatus';
|
|
15
15
|
export * from './DialogHeading';
|
|
16
16
|
export * from './DialogTouchedBy';
|
|
17
|
-
export * from './DialogLabel';
|
|
18
17
|
export * from './DialogAttachments';
|
|
19
18
|
export * from './DialogHistory';
|
|
20
19
|
export * from './DialogActivity';
|
|
@@ -4,7 +4,8 @@ export interface ListItemLabelProps {
|
|
|
4
4
|
loading?: boolean;
|
|
5
5
|
size?: ListItemSize;
|
|
6
6
|
title?: string;
|
|
7
|
+
weight?: 'bold' | 'normal';
|
|
7
8
|
description?: string;
|
|
8
9
|
children?: ReactNode;
|
|
9
10
|
}
|
|
10
|
-
export declare const ListItemLabel: ({ loading, size, title, description, children }: ListItemLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const ListItemLabel: ({ loading, size, title, weight, description, children, }: ListItemLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, ElementType, ReactNode } from 'react';
|
|
2
2
|
import { Color, Range, Shadow, Theme } from '..';
|
|
3
|
-
export type FlexElement = 'div' | 'section' | 'article' | 'header' | 'footer' | 'nav' | 'ul';
|
|
4
3
|
export type FlexDirection = 'col' | 'row';
|
|
5
4
|
export type FlexAlign = 'initial' | 'start' | 'end' | 'center' | 'stretch';
|
|
6
5
|
export type FlexJustify = 'initial' | 'start' | 'end' | 'center' | 'between';
|
|
@@ -8,7 +7,7 @@ export type FlexSpacing = 'page' | 'xs' | Range<11>;
|
|
|
8
7
|
export type FlexPadding = 'page' | Range<11>;
|
|
9
8
|
export type FlexMargin = 0 | 'page' | 'section' | 'bottom';
|
|
10
9
|
export interface FlexProps {
|
|
11
|
-
as?:
|
|
10
|
+
as?: ElementType;
|
|
12
11
|
shadow?: Shadow;
|
|
13
12
|
color?: Color;
|
|
14
13
|
theme?: Theme;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { AvatarProps, Color,
|
|
1
|
+
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
import { AvatarProps, Color, SvgElement, Theme } from '..';
|
|
3
3
|
export type TimelineTheme = 'base' | 'surface';
|
|
4
4
|
export type TimelineBorder = 'strong' | 'solid' | 'dashed' | 'hidden';
|
|
5
5
|
export type TimelineBorderWidth = 1 | 2;
|
|
6
6
|
export interface TimelineBaseProps {
|
|
7
|
-
as?:
|
|
7
|
+
as?: ElementType;
|
|
8
8
|
loading?: boolean;
|
|
9
|
+
level?: number;
|
|
9
10
|
border?: TimelineBorder;
|
|
10
11
|
color?: Color;
|
|
11
12
|
theme?: Theme;
|
|
@@ -14,4 +15,4 @@ export interface TimelineBaseProps {
|
|
|
14
15
|
avatar?: AvatarProps;
|
|
15
16
|
children?: ReactNode;
|
|
16
17
|
}
|
|
17
|
-
export declare const TimelineBase: ({ as, loading, border, color, icon, iconColor, avatar, children, }: TimelineBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const TimelineBase: ({ as, loading, border, level, color, icon, iconColor, avatar, children, ...props }: TimelineBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonBaseProps, SvgElement } from '..';
|
|
3
|
+
export interface TimelineLinkProps extends Partial<ButtonBaseProps> {
|
|
4
|
+
icon?: SvgElement;
|
|
5
|
+
reverse?: boolean;
|
|
6
|
+
label?: string | ReactNode;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const TimelineLink: ({ size, color, icon, reverse, label, children, ...rest }: TimelineLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ElementType, ReactNode } from 'react';
|
|
2
2
|
import { SectionProps, TimelineBaseProps, TypographyProps } from '..';
|
|
3
3
|
export interface TimelineSectionProps {
|
|
4
4
|
loading?: boolean;
|
|
@@ -11,5 +11,6 @@ export interface TimelineSectionProps {
|
|
|
11
11
|
byline?: ReactNode;
|
|
12
12
|
children?: ReactNode;
|
|
13
13
|
footer?: ReactNode;
|
|
14
|
+
as?: ElementType;
|
|
14
15
|
}
|
|
15
|
-
export declare const TimelineSection: ({ loading, margin, spacing, border, color, typographyProps, datetime, byline, children, footer, }: TimelineSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const TimelineSection: ({ loading, margin, spacing, as, border, color, typographyProps, datetime, byline, children, footer, }: TimelineSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ loading, margin, spacing, border, color, typographyProps, datetime, byline, children, footer, }: import('./TimelineSection').TimelineSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ loading, margin, spacing, as, border, color, typographyProps, datetime, byline, children, footer, }: import('./TimelineSection').TimelineSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FlexMargin, FlexSpacing, SvgElement, TimelineBaseProps, TimelineBorder, TypographyProps } from '..';
|
|
3
3
|
export interface TimelineSegmentProps extends TimelineBaseProps {
|
|
4
4
|
loading?: boolean;
|
|
5
5
|
icon?: SvgElement;
|
|
@@ -9,7 +9,7 @@ export interface TimelineSegmentProps extends TimelineBaseProps {
|
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
footer?: ReactNode;
|
|
11
11
|
typographyProps?: TypographyProps;
|
|
12
|
-
margin?:
|
|
13
|
-
spacing?:
|
|
12
|
+
margin?: FlexMargin;
|
|
13
|
+
spacing?: FlexSpacing;
|
|
14
14
|
}
|
|
15
15
|
export declare const TimelineSegment: ({ loading, datetime, byline, icon, color, spacing, margin, children, footer, ...props }: TimelineSegmentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AttachmentListProps, AvatarProps, BadgeProps, ListItemProps } from '..';
|
|
3
|
-
export interface TransmissionType {
|
|
4
|
-
value: string;
|
|
5
|
-
label: string;
|
|
6
|
-
}
|
|
7
3
|
export interface TransmissionProps extends ListItemProps {
|
|
8
4
|
id: string;
|
|
9
5
|
datetime?: string;
|
|
10
6
|
byline?: ReactNode;
|
|
11
|
-
type?:
|
|
7
|
+
type?: string;
|
|
12
8
|
badge?: BadgeProps;
|
|
13
9
|
createdAt?: string;
|
|
14
10
|
createdAtLabel?: string;
|
|
@@ -17,4 +13,4 @@ export interface TransmissionProps extends ListItemProps {
|
|
|
17
13
|
summary?: string;
|
|
18
14
|
attachments?: AttachmentListProps;
|
|
19
15
|
}
|
|
20
|
-
export declare const Transmission: ({ size, theme, color, type, createdAt, createdAtLabel, badge, sender, summary, attachments, ...item }: TransmissionProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const Transmission: ({ size, theme, color, type, title, createdAt, createdAtLabel, badge, sender, summary, attachments, ...item }: TransmissionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TransmissionTimelineSegmentProps } from '..';
|
|
3
|
+
export interface TransmissionTimelineProps {
|
|
4
|
+
items: TransmissionTimelineSegmentProps[];
|
|
5
|
+
collapsible?: boolean;
|
|
6
|
+
expandLabel?: string | ReactNode;
|
|
7
|
+
collapseLabel?: string | ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const TransmissionTimeline: ({ items, collapsible, expandLabel, collapseLabel }: TransmissionTimelineProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ items, collapsible, expandLabel, collapseLabel }: import('./TransmissionTimeline').TransmissionTimelineProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {};
|
|
7
|
+
args: {
|
|
8
|
+
items: ({
|
|
9
|
+
id: string;
|
|
10
|
+
sender: import('..').AvatarProps;
|
|
11
|
+
byline: string;
|
|
12
|
+
title: string;
|
|
13
|
+
collapsible: false;
|
|
14
|
+
expandLabel: import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
items: ({
|
|
16
|
+
id: string;
|
|
17
|
+
sender: import('..').AvatarProps;
|
|
18
|
+
createdAtLabel: string;
|
|
19
|
+
byline: string;
|
|
20
|
+
title: string;
|
|
21
|
+
type?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
id: string;
|
|
24
|
+
type: string;
|
|
25
|
+
sender: {
|
|
26
|
+
type: "company";
|
|
27
|
+
name: string;
|
|
28
|
+
};
|
|
29
|
+
createdAtLabel: string;
|
|
30
|
+
byline: string;
|
|
31
|
+
title: string;
|
|
32
|
+
})[];
|
|
33
|
+
createdAtLabel?: undefined;
|
|
34
|
+
type?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
id: string;
|
|
37
|
+
sender: import('..').AvatarProps;
|
|
38
|
+
createdAtLabel: string;
|
|
39
|
+
byline: string;
|
|
40
|
+
title: string;
|
|
41
|
+
expandLabel: import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
items: {
|
|
43
|
+
id: string;
|
|
44
|
+
type: string;
|
|
45
|
+
sender: {
|
|
46
|
+
type: "company";
|
|
47
|
+
name: string;
|
|
48
|
+
};
|
|
49
|
+
byline: string;
|
|
50
|
+
title: string;
|
|
51
|
+
}[];
|
|
52
|
+
collapsible?: undefined;
|
|
53
|
+
type?: undefined;
|
|
54
|
+
} | {
|
|
55
|
+
id: string;
|
|
56
|
+
type: string;
|
|
57
|
+
sender: {
|
|
58
|
+
type: "person";
|
|
59
|
+
name: string;
|
|
60
|
+
};
|
|
61
|
+
createdAtLabel: string;
|
|
62
|
+
byline: string;
|
|
63
|
+
title: string;
|
|
64
|
+
collapsible?: undefined;
|
|
65
|
+
expandLabel?: undefined;
|
|
66
|
+
items?: undefined;
|
|
67
|
+
})[];
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
export default meta;
|
|
71
|
+
type Story = StoryObj<typeof meta>;
|
|
72
|
+
export declare const Default: Story;
|
|
73
|
+
export declare const Collapsible: Story;
|
|
74
|
+
export declare const LinkedItems: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TimelineLinkProps, TransmissionProps } from '..';
|
|
3
|
+
export interface TransmissionTimelineItemProps extends TransmissionProps {
|
|
4
|
+
byline?: string;
|
|
5
|
+
datetime?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface TransmissionTimelineSegmentProps extends TransmissionProps {
|
|
8
|
+
items?: TransmissionTimelineItemProps[];
|
|
9
|
+
collapsible?: boolean;
|
|
10
|
+
expandLabel?: string | ReactNode;
|
|
11
|
+
collapseLabel?: string | ReactNode;
|
|
12
|
+
link?: TimelineLinkProps;
|
|
13
|
+
}
|
|
14
|
+
export declare const TransmissionTimelineSegment: ({ collapsible, items, datetime, byline, expandLabel, collapseLabel, link, ...item }: TransmissionTimelineSegmentProps) => import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import "../../index-L8X2o7IH.js";
|
|
3
|
-
import { MetaItem as i } from "../Meta/MetaItem.js";
|
|
4
|
-
import "react";
|
|
5
|
-
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import "../Search/AutocompleteBase.js";
|
|
7
|
-
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import { S as n, a as m } from "../../Trash-DMlYh49i.js";
|
|
9
|
-
const g = ({ size: r = "xs", type: e, label: t, children: o }) => {
|
|
10
|
-
switch (e) {
|
|
11
|
-
case "trashed":
|
|
12
|
-
return /* @__PURE__ */ a(i, { size: r, icon: m, variant: "rounded", children: o || t });
|
|
13
|
-
case "archived":
|
|
14
|
-
return /* @__PURE__ */ a(i, { size: r, icon: n, variant: "rounded", children: o || t });
|
|
15
|
-
default:
|
|
16
|
-
return /* @__PURE__ */ a(i, { size: r, variant: "rounded", children: o || t });
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
g as DialogLabel
|
|
21
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { MetaItemSize } from '../Meta';
|
|
3
|
-
export type DialogLabelType = 'normal' | 'trashed' | 'archived';
|
|
4
|
-
export interface DialogLabelProps {
|
|
5
|
-
size?: MetaItemSize;
|
|
6
|
-
type?: DialogLabelType;
|
|
7
|
-
label?: string;
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Dialog label.
|
|
12
|
-
*/
|
|
13
|
-
export declare const DialogLabel: ({ size, type, label, children }: DialogLabelProps) => import("react/jsx-runtime").JSX.Element;
|