@altinn/altinn-components 0.21.5 → 0.22.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/Heading.css +1 -1
- package/dist/assets/SeenByLog.css +1 -0
- package/dist/assets/Typography.css +1 -1
- package/dist/components/Bookmarks/BookmarksListItem.js +1 -1
- package/dist/components/Bookmarks/BookmarksSection.js +7 -7
- package/dist/components/Dialog/Dialog.js +11 -80
- package/dist/components/Dialog/DialogActions.js +5 -5
- package/dist/components/Dialog/DialogActivity.js +7 -7
- package/dist/components/Dialog/DialogAttachments.js +7 -7
- package/dist/components/Dialog/DialogBody.js +26 -25
- package/dist/components/Dialog/DialogContact.js +11 -0
- package/dist/components/Dialog/DialogHeader.js +6 -6
- package/dist/components/Dialog/DialogHistory.js +20 -54
- package/dist/components/Dialog/DialogHistoryItem.js +45 -0
- package/dist/components/Dialog/DialogHistorySegment.js +72 -0
- package/dist/components/Dialog/DialogLayout.js +30 -0
- package/dist/components/Dialog/DialogListGroup.js +7 -7
- package/dist/components/Dialog/DialogListItem.js +29 -29
- package/dist/components/Dialog/DialogMetadata.js +1 -1
- package/dist/components/Dialog/DialogSection.js +5 -5
- package/dist/components/Dialog/DialogTabs.js +11 -0
- package/dist/components/Dialog/SeenByLog.js +33 -21
- package/dist/components/Dialog/index.js +47 -39
- package/dist/components/LayoutAction/ActionHeader.js +1 -1
- package/dist/components/List/List.js +1 -1
- package/dist/components/List/ListItemHeader.js +1 -1
- package/dist/components/Page/ContactSection.js +25 -26
- package/dist/components/Page/PageHeader.js +16 -16
- package/dist/components/Search/AutocompleteItem.js +1 -1
- package/dist/components/Search/SuggestListItem.js +1 -1
- package/dist/components/Timeline/TimelineActivity.js +4 -4
- package/dist/components/Timeline/TimelineFooter.js +1 -1
- package/dist/components/Timeline/TimelineSection.js +17 -21
- package/dist/components/Timeline/TimelineSegment.js +1 -1
- package/dist/components/Transmission/Transmission.js +39 -36
- package/dist/components/Transmission/TransmissionList.js +2 -2
- package/dist/components/Transmission/index.js +3 -7
- package/dist/components/Typography/Heading.js +29 -6
- package/dist/components/Typography/Typography.js +16 -16
- package/dist/components/index.js +293 -289
- package/dist/index.js +299 -295
- package/dist/types/lib/components/Byline/Byline.d.ts +1 -0
- package/dist/types/lib/components/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/types/lib/components/Dialog/Dialog.d.ts +11 -27
- package/dist/types/lib/components/Dialog/Dialog.stories.d.ts +4 -4
- package/dist/types/lib/components/Dialog/DialogBody.d.ts +3 -3
- package/dist/types/lib/components/Dialog/DialogBody.stories.d.ts +20 -9
- package/dist/types/lib/components/Dialog/DialogContact.d.ts +4 -0
- package/dist/types/lib/components/Dialog/DialogHeader.stories.d.ts +2 -2
- package/dist/types/lib/components/Dialog/DialogHistory.d.ts +5 -6
- package/dist/types/lib/components/Dialog/DialogHistory.stories.d.ts +9 -3
- package/dist/types/lib/components/Dialog/DialogHistoryItem.d.ts +12 -0
- package/dist/types/lib/components/Dialog/DialogHistorySegment.d.ts +13 -0
- package/dist/types/lib/components/Dialog/DialogLayout.d.ts +16 -0
- package/dist/types/lib/components/Dialog/DialogList.stories.d.ts +3 -0
- package/dist/types/lib/components/Dialog/DialogStatus.stories.d.ts +2 -3
- package/dist/types/lib/components/Dialog/DialogTabs.d.ts +4 -0
- package/dist/types/lib/components/Dialog/SeenByLog.d.ts +7 -7
- package/dist/types/lib/components/Dialog/SeenByLog.stories.d.ts +9 -11
- package/dist/types/lib/components/Dialog/index.d.ts +7 -3
- package/dist/types/lib/components/List/ListBase.d.ts +1 -0
- package/dist/types/lib/components/Page/ContactSection.d.ts +6 -3
- package/dist/types/lib/components/Page/PageMenu.d.ts +1 -0
- package/dist/types/lib/components/Page/PageTabs.d.ts +1 -1
- package/dist/types/lib/components/Timeline/TimelineSection.d.ts +3 -3
- package/dist/types/lib/components/Timeline/TimelineSection.stories.d.ts +1 -1
- package/dist/types/lib/components/Transmission/Transmission.d.ts +4 -3
- package/dist/types/lib/components/Transmission/index.d.ts +0 -2
- package/dist/types/lib/components/Typography/Heading.d.ts +4 -1
- package/dist/types/lib/components/Typography/Heading.stories.d.ts +1 -1
- package/dist/types/lib/components/Typography/Typography.d.ts +3 -3
- package/dist/types/lib/components/Typography/Typography.stories.d.ts +1 -1
- package/dist/types/lib/types/color.d.ts +1 -1
- package/package.json +1 -1
- package/dist/ArrowUp-Cn3ai5t6.js +0 -25
- package/dist/assets/DialogHistory.css +0 -1
- package/dist/components/Transmission/TransmissionTimeline.js +0 -22
- package/dist/components/Transmission/TransmissionTimelineSegment.js +0 -63
- package/dist/components/Transmission/TransmissionType.js +0 -8
- package/dist/types/lib/components/Transmission/TransmissionList.stories.d.ts +0 -13
- package/dist/types/lib/components/Transmission/TransmissionTimeline.d.ts +0 -10
- package/dist/types/lib/components/Transmission/TransmissionTimeline.stories.d.ts +0 -74
- package/dist/types/lib/components/Transmission/TransmissionTimelineSegment.d.ts +0 -14
- package/dist/types/lib/components/Transmission/TransmissionType.d.ts +0 -26
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as a, jsx as n } from "react/jsx-runtime";
|
|
3
|
-
import * as u from "react";
|
|
4
|
-
import { forwardRef as x, useState as O } from "react";
|
|
5
|
-
import "../../index-L8X2o7IH.js";
|
|
6
|
-
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import "../Search/AutocompleteBase.js";
|
|
8
|
-
import { ListBase as f } from "../List/ListBase.js";
|
|
9
|
-
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { Timeline as b } from "../Timeline/Timeline.js";
|
|
11
|
-
import { TimelineSegment as p } from "../Timeline/TimelineSegment.js";
|
|
12
|
-
import { TimelineActivity as S } from "../Timeline/TimelineActivity.js";
|
|
13
|
-
import { TimelineLink as h } from "../Timeline/TimelineLink.js";
|
|
14
|
-
import { Transmission as m } from "./Transmission.js";
|
|
15
|
-
import { u as T } from "../../useId-CsCRkvK3.js";
|
|
16
|
-
import { S as j } from "../../ArrowUp-Cn3ai5t6.js";
|
|
17
|
-
var E = function(r, o) {
|
|
18
|
-
var t = {};
|
|
19
|
-
for (var e in r) Object.prototype.hasOwnProperty.call(r, e) && o.indexOf(e) < 0 && (t[e] = r[e]);
|
|
20
|
-
if (r != null && typeof Object.getOwnPropertySymbols == "function")
|
|
21
|
-
for (var i = 0, e = Object.getOwnPropertySymbols(r); i < e.length; i++)
|
|
22
|
-
o.indexOf(e[i]) < 0 && Object.prototype.propertyIsEnumerable.call(r, e[i]) && (t[e[i]] = r[e[i]]);
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
const g = x((r, o) => {
|
|
26
|
-
var { title: t, titleId: e } = r, i = E(r, ["title", "titleId"]);
|
|
27
|
-
let d = T();
|
|
28
|
-
return d = t ? e || "title-" + d : void 0, u.createElement(
|
|
29
|
-
"svg",
|
|
30
|
-
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: o, "aria-labelledby": d }, i),
|
|
31
|
-
t ? u.createElement("title", { id: d }, t) : null,
|
|
32
|
-
u.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M13.672 3.825a.75.75 0 0 1 .791.085l7 5.5a.75.75 0 0 1 0 1.18l-7 5.5a.75.75 0 0 1-1.213-.59v-2.724a9.1 9.1 0 0 0-2.63.565c-2.284.87-3.759 2.562-4.671 4.077a12.4 12.4 0 0 0-.957 1.965 10 10 0 0 0-.263.792l-.001.007A.75.75 0 0 1 3.25 20c0-1.654.322-3.941 1.224-6.123.903-2.184 2.413-4.32 4.823-5.558 1.133-.581 2.445-.954 3.953-1.046V4.5a.75.75 0 0 1 .422-.675", clipRule: "evenodd" })
|
|
33
|
-
);
|
|
34
|
-
}), D = ({
|
|
35
|
-
collapsible: r,
|
|
36
|
-
items: o,
|
|
37
|
-
datetime: t,
|
|
38
|
-
byline: e,
|
|
39
|
-
expandLabel: i = "Expand",
|
|
40
|
-
collapseLabel: d,
|
|
41
|
-
link: c,
|
|
42
|
-
...s
|
|
43
|
-
}) => {
|
|
44
|
-
const [w, y] = O(!r), v = () => {
|
|
45
|
-
y((l) => !l);
|
|
46
|
-
};
|
|
47
|
-
return o != null && o.length ? r && !w ? /* @__PURE__ */ a(p, { datetime: t, byline: e, children: [
|
|
48
|
-
/* @__PURE__ */ n(f, { children: /* @__PURE__ */ n(m, { ...s }) }),
|
|
49
|
-
/* @__PURE__ */ n(h, { icon: g, onClick: v, children: i })
|
|
50
|
-
] }) : /* @__PURE__ */ a(p, { datetime: t, byline: e, children: [
|
|
51
|
-
/* @__PURE__ */ n(f, { children: /* @__PURE__ */ n(m, { ...s }) }),
|
|
52
|
-
o.length > 0 && /* @__PURE__ */ n(b, { children: /* @__PURE__ */ a(p, { level: 2, icon: g, border: "dashed", margin: 0, children: [
|
|
53
|
-
o.map((l) => /* @__PURE__ */ n(S, { spacing: 2, datetime: l == null ? void 0 : l.datetime, byline: l == null ? void 0 : l.byline, children: /* @__PURE__ */ n(f, { children: /* @__PURE__ */ n(m, { ...l }) }) }, l.id)),
|
|
54
|
-
r && d && /* @__PURE__ */ n(h, { reverse: !0, icon: j, onClick: v, children: d })
|
|
55
|
-
] }) })
|
|
56
|
-
] }) : /* @__PURE__ */ a(p, { datetime: t, byline: e, children: [
|
|
57
|
-
/* @__PURE__ */ n(f, { children: /* @__PURE__ */ n(m, { ...s }) }),
|
|
58
|
-
c && /* @__PURE__ */ n(h, { ...c, icon: (c == null ? void 0 : c.icon) || g })
|
|
59
|
-
] });
|
|
60
|
-
};
|
|
61
|
-
export {
|
|
62
|
-
D as TransmissionTimelineSegment
|
|
63
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Badge as o } from "../Badge/Badge.js";
|
|
3
|
-
var a = /* @__PURE__ */ ((r) => (r.draft = "draft", r.submission = "submission", r.correction = "correction", r.acceptance = "acceptance", r.rejection = "Rejection", r.alert = "Alert", r))(a || {});
|
|
4
|
-
const d = ({ loading: r, size: t = "sm", label: c }) => r ? null : /* @__PURE__ */ e(o, { size: t, children: c });
|
|
5
|
-
export {
|
|
6
|
-
d as TransmissionType,
|
|
7
|
-
a as TransmissionTypeEnum
|
|
8
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: ({ items }: import('./TransmissionList').TransmissionListProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
-
tags: string[];
|
|
6
|
-
parameters: {};
|
|
7
|
-
args: {
|
|
8
|
-
items: import('./Transmission').TransmissionProps[];
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
type Story = StoryObj<typeof meta>;
|
|
13
|
-
export declare const Default: Story;
|
|
@@ -1,10 +0,0 @@
|
|
|
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;
|
|
@@ -1,74 +0,0 @@
|
|
|
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;
|
|
@@ -1,14 +0,0 @@
|
|
|
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;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { BadgeSize } from '../Badge';
|
|
2
|
-
export declare enum TransmissionTypeEnum {
|
|
3
|
-
/** Used to indicate a user-initiated transmission not yet sent. */
|
|
4
|
-
draft = "draft",
|
|
5
|
-
/** Transmissions submitted by an end user. */
|
|
6
|
-
submission = "submission",
|
|
7
|
-
/** User submitted correction. */
|
|
8
|
-
correction = "correction",
|
|
9
|
-
/** The transmission has been accepted. */
|
|
10
|
-
acceptance = "acceptance",
|
|
11
|
-
/** The transmission has been rejected. */
|
|
12
|
-
rejection = "Rejection",
|
|
13
|
-
/** The transmission is an elert. */
|
|
14
|
-
alert = "Alert"
|
|
15
|
-
}
|
|
16
|
-
export type TransmissionTypeValue = keyof typeof TransmissionTypeEnum;
|
|
17
|
-
export interface TransmissionTypeProps {
|
|
18
|
-
loading?: boolean;
|
|
19
|
-
size?: BadgeSize;
|
|
20
|
-
value?: TransmissionTypeValue;
|
|
21
|
-
label?: string;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Transmission type.
|
|
25
|
-
*/
|
|
26
|
-
export declare const TransmissionType: ({ loading, size, label }: TransmissionTypeProps) => import("react/jsx-runtime").JSX.Element | null;
|