@altinn/altinn-components 0.6.8 → 0.6.9
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/AvatarGroup.css +1 -1
- package/dist/assets/ButtonBase.css +1 -1
- package/dist/assets/DialogListItemBase.css +1 -1
- package/dist/components/Avatar/AvatarGroup.js +21 -21
- package/dist/components/Button/ButtonBase.js +7 -7
- package/dist/components/ContextMenu/ContextMenu.d.ts +3 -1
- package/dist/components/ContextMenu/ContextMenu.js +13 -7
- package/dist/components/ContextMenu/ContextMenuBase.d.ts +3 -1
- package/dist/components/ContextMenu/ContextMenuBase.js +19 -18
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.js +41 -50
- package/dist/components/Dialog/Dialog.stories.js +150 -192
- package/dist/components/Dialog/DialogFooter.d.ts +2 -1
- package/dist/components/Dialog/DialogListItem.stories.js +110 -131
- package/dist/components/Dialog/DialogListItemBase.js +5 -5
- package/dist/components/Dialog/DialogNav.js +20 -20
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._group_1xzlf_1{display:flex}._reset_1xzlf_5{margin:0;padding:0;text-indent:0;list-style-type:none}._item_1xzlf_12{position:relative}._xs_1xzlf_16{width:32px}._xs_1xzlf_16[data-count="1"]{width:20px}._xs_1xzlf_16[data-count="2"] *+*{margin-left:-8px}._xs_1xzlf_16[data-count="3"] *+*{margin-left:-14px}._xs_1xzlf_16[data-count="4"] *+*{margin-left:-16px}._sm_1xzlf_36{width:42px}._sm_1xzlf_36[data-count="1"]{width:24px}._sm_1xzlf_36[data-count="2"] *+*{margin-left:-6px}._sm_1xzlf_36[data-count="3"] *+*{margin-left:-15px}._sm_1xzlf_36[data-count="4"] *+*{margin-left:-18px}._md_1xzlf_56{width:54px}._md_1xzlf_56[data-count="1"]{width:30px}._md_1xzlf_56[data-count="2"] *+*{margin-left:-6px}._md_1xzlf_56[data-count="3"] *+*{margin-left:-18px}._md_1xzlf_56[data-count="4"] *+*{margin-left:-22px}._lg_1xzlf_76{width:66px}._lg_1xzlf_76[data-count="1"]{width:36px}._lg_1xzlf_76[data-count="2"] *+*{margin-left:-6px}._lg_1xzlf_76[data-count="3"] *+*{margin-left:-21px}._lg_1xzlf_76[data-count="4"] *+*{margin-left:-26px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._button_1p2ap_1{border:1px solid;border-color:transparent;margin:0;padding:0;width:auto;overflow:visible;background:transparent;text-decoration:none;color:inherit;font:inherit;text-align:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer}._button_1p2ap_1:disabled{opacity:.5;pointer-events:none}._button_1p2ap_1:focus{border-color:var(--theme-base-active)}._button_1p2ap_1:hover{border-color:var(--theme-base-hover)}._button_1p2ap_1:active{border-color:var(--theme-base-active)}._button_1p2ap_1[data-size=sm]{height:2.25rem}._button_1p2ap_1[data-size=md]{height:2.75rem}._button_1p2ap_1[data-size=lg]{height:3.5rem}._button_1p2ap_1[data-variant=solid]{border-color:var(--theme-base-default);background-color:var(--theme-base-default);color:#fff}._button_1p2ap_1[data-variant=solid]:hover{border-color:var(--theme-base-hover);background-color:var(--theme-base-hover)}._button_1p2ap_1[data-variant=solid]:active{border-color:var(--theme-base-active);background-color:var(--theme-base-active)}._button_1p2ap_1[data-variant=outline],._button_1p2ap_1[data-variant=dotted]{border-color:var(--theme-base-default)}._button_1p2ap_1[data-variant=outline]{border-style:solid}._button_1p2ap_1[data-variant=dotted]{border-style:dotted}._button_1p2ap_1[data-variant=text]{border-color:transparent}._button_1p2ap_1[data-variant=outline]:hover,._button_1p2ap_1[data-variant=dotted]:hover,._button_1p2ap_1[data-variant=text]:hover{background-color:var(--theme-surface-default)}._button_1p2ap_1[data-variant=outline]:active,._button_1p2ap_1[data-variant=dotted]:active,._button_1p2ap_1[data-variant=text]:active{background-color:var(--theme-surface-active)}._button_1p2ap_1[aria-selected=true]{background-color:var(--theme-background-subtle);color:var(--theme-text-default)}._button_1p2ap_1[data-color=secondary]{color:var(--theme-text-subtle)}._button_1p2ap_1[data-color=secondary]:hover{border-color:var(--theme-surface-hover)}._button_1p2ap_1[data-color=secondary][data-variant=solid]{border-color:var(--theme-surface-default);background-color:var(--theme-surface-default)}._button_1p2ap_1[data-color=secondary][data-variant=solid]:hover{border-color:var(--theme-surface-hover);background-color:var(--theme-surface-hover)}._button_1p2ap_1[data-color=secondary][data-variant=solid]:active,._button_1p2ap_1[data-color=secondary][data-variant=outline]:active,._button_1p2ap_1[data-color=secondary][data-variant=dotted]:active,._button_1p2ap_1[data-color=secondary][data-variant=text]:active{border-color:var(--theme-surface-active);background-color:var(--theme-surface-active)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._item_1uvy5_1{background-color:var(--theme-background-default);position:relative;box-shadow:var(--ds-shadow-xs)}._item_1uvy5_1[aria-selected=true]{background-color:var(--theme-background-subtle);outline:2px solid}._link_1uvy5_13{margin:0;padding:0;width:auto;overflow:visible;background:transparent;text-decoration:none;color:inherit;font:inherit;text-align:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;padding:1rem}._item_1uvy5_1[aria-selected=false] ._link_1uvy5_13:hover{outline:2px solid;outline-color:var(--global-base-default)}._select_1uvy5_46{position:absolute;top:0;right:0;margin:.375rem}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import { c as n } from "../../index-L8X2o7IH.js";
|
|
4
4
|
import { useMemo as p } from "react";
|
|
5
|
-
import { Avatar as
|
|
6
|
-
import '../../assets/AvatarGroup.css';const
|
|
7
|
-
group:
|
|
8
|
-
reset:
|
|
9
|
-
item:
|
|
10
|
-
xs:
|
|
11
|
-
sm:
|
|
12
|
-
md:
|
|
5
|
+
import { Avatar as f } from "./Avatar.js";
|
|
6
|
+
import '../../assets/AvatarGroup.css';const x = "_group_1xzlf_1", d = "_reset_1xzlf_5", h = "_item_1xzlf_12", z = "_xs_1xzlf_16", A = "_sm_1xzlf_36", U = "_md_1xzlf_56", y = "_lg_1xzlf_76", o = {
|
|
7
|
+
group: x,
|
|
8
|
+
reset: d,
|
|
9
|
+
item: h,
|
|
10
|
+
xs: z,
|
|
11
|
+
sm: A,
|
|
12
|
+
md: U,
|
|
13
13
|
lg: y
|
|
14
14
|
}, a = ({
|
|
15
|
-
items:
|
|
16
|
-
maxItemsCount:
|
|
15
|
+
items: l = [],
|
|
16
|
+
maxItemsCount: s = 4,
|
|
17
17
|
defaultType: _,
|
|
18
18
|
size: c = "sm",
|
|
19
19
|
className: m
|
|
20
20
|
}) => {
|
|
21
|
-
const
|
|
22
|
-
return (
|
|
23
|
-
const u = g ===
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
21
|
+
const t = p(() => l.slice(0, s), [l, s]);
|
|
22
|
+
return (l == null ? void 0 : l.length) === 0 ? /* @__PURE__ */ r("div", { className: o.avatarGroup }) : /* @__PURE__ */ r("ul", { className: n(o.reset, o.group, o[c], m), "data-count": t == null ? void 0 : t.length, children: t.map((e, g) => {
|
|
23
|
+
const u = g === s - 1, i = e.customLabel || u ? l.length.toString() : void 0;
|
|
24
|
+
return /* @__PURE__ */ r("li", { className: n(o.reset, o.item), children: /* @__PURE__ */ r(
|
|
25
|
+
f,
|
|
26
26
|
{
|
|
27
|
-
name:
|
|
27
|
+
name: e.name,
|
|
28
28
|
customLabel: i,
|
|
29
|
-
imageUrl:
|
|
30
|
-
imageUrlAlt:
|
|
31
|
-
type: (
|
|
29
|
+
imageUrl: e.imageUrl,
|
|
30
|
+
imageUrlAlt: e.imageUrlAlt,
|
|
31
|
+
type: (e == null ? void 0 : e.type) || _,
|
|
32
32
|
size: c,
|
|
33
33
|
outline: !0
|
|
34
34
|
}
|
|
35
|
-
) },
|
|
35
|
+
) }, e.name);
|
|
36
36
|
}) });
|
|
37
37
|
};
|
|
38
38
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import '../../assets/ButtonBase.css';const b = "
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { c as i } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import '../../assets/ButtonBase.css';const b = "_button_1p2ap_1", l = {
|
|
4
4
|
button: b
|
|
5
5
|
}, _ = ({
|
|
6
6
|
as: o,
|
|
@@ -12,8 +12,8 @@ import '../../assets/ButtonBase.css';const b = "_button_1pg7d_1", d = {
|
|
|
12
12
|
selected: r,
|
|
13
13
|
variant: c,
|
|
14
14
|
tabIndex: m = 0,
|
|
15
|
-
...
|
|
16
|
-
}) => /* @__PURE__ */
|
|
15
|
+
...p
|
|
16
|
+
}) => /* @__PURE__ */ u(
|
|
17
17
|
o || "button",
|
|
18
18
|
{
|
|
19
19
|
tabIndex: m,
|
|
@@ -23,8 +23,8 @@ import '../../assets/ButtonBase.css';const b = "_button_1pg7d_1", d = {
|
|
|
23
23
|
"aria-selected": r,
|
|
24
24
|
"aria-disabled": t,
|
|
25
25
|
disabled: t,
|
|
26
|
-
className:
|
|
27
|
-
...
|
|
26
|
+
className: i(l.button, n),
|
|
27
|
+
...p,
|
|
28
28
|
children: s
|
|
29
29
|
}
|
|
30
30
|
);
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { DropdownPlacement, MenuItemProps, MenuItemGroups } from '../';
|
|
2
|
+
import { ContextMenuSize } from './ContextMenuBase';
|
|
2
3
|
export interface ContextMenuProps {
|
|
3
4
|
id: string;
|
|
4
5
|
items: MenuItemProps[];
|
|
5
6
|
placement?: DropdownPlacement;
|
|
7
|
+
size?: ContextMenuSize;
|
|
6
8
|
groups?: MenuItemGroups;
|
|
7
9
|
}
|
|
8
|
-
export declare const ContextMenu: ({ id, placement, groups, items }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const ContextMenu: ({ id, placement, size, groups, items, }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,13 +3,19 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
4
|
import "../Icon/SvgIcon.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import { MenuItems as
|
|
7
|
-
import { useRootContext as
|
|
8
|
-
import { ContextMenuBase as
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
import { MenuItems as u } from "../Menu/MenuItems.js";
|
|
7
|
+
import { useRootContext as s } from "../RootProvider/RootProvider.js";
|
|
8
|
+
import { ContextMenuBase as x } from "./ContextMenuBase.js";
|
|
9
|
+
const M = ({
|
|
10
|
+
id: t = "context-menu",
|
|
11
|
+
placement: e = "right",
|
|
12
|
+
size: r,
|
|
13
|
+
groups: n = {},
|
|
14
|
+
items: m
|
|
15
|
+
}) => {
|
|
16
|
+
const { currentId: i, toggleId: p } = s();
|
|
17
|
+
return /* @__PURE__ */ o(x, { size: r, placement: e, expanded: i === t, onToggle: () => p(t), children: /* @__PURE__ */ o(u, { groups: n, items: m }) });
|
|
12
18
|
};
|
|
13
19
|
export {
|
|
14
|
-
|
|
20
|
+
M as ContextMenu
|
|
15
21
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DropdownPlacement } from '../';
|
|
3
|
+
export type ContextMenuSize = 'sm' | 'md';
|
|
3
4
|
export interface ContextMenuBaseProps {
|
|
4
5
|
placement: DropdownPlacement;
|
|
5
6
|
expanded: boolean;
|
|
7
|
+
size?: ContextMenuSize;
|
|
6
8
|
onToggle?: () => void;
|
|
7
9
|
children?: ReactNode;
|
|
8
10
|
}
|
|
9
|
-
export declare const ContextMenuBase: ({ placement, expanded, onToggle, children, }: ContextMenuBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const ContextMenuBase: ({ size, placement, expanded, onToggle, children, }: ContextMenuBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "../Icon/SvgIcon.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import { IconButton as
|
|
5
|
+
import { IconButton as c } from "../Button/IconButton.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { DropdownBase as
|
|
8
|
-
import '../../assets/ContextMenuBase.css';const
|
|
9
|
-
toggle:
|
|
10
|
-
button:
|
|
11
|
-
icon:
|
|
12
|
-
dropdown:
|
|
13
|
-
},
|
|
14
|
-
|
|
7
|
+
import { DropdownBase as m } from "../Dropdown/DropdownBase.js";
|
|
8
|
+
import '../../assets/ContextMenuBase.css';const l = "_toggle_ya7jy_1", d = "_button_ya7jy_5", p = "_icon_ya7jy_14", _ = "_dropdown_ya7jy_18", o = {
|
|
9
|
+
toggle: l,
|
|
10
|
+
button: d,
|
|
11
|
+
icon: p,
|
|
12
|
+
dropdown: _
|
|
13
|
+
}, f = ({
|
|
14
|
+
size: n = "sm",
|
|
15
|
+
placement: r = "right",
|
|
15
16
|
expanded: e = !1,
|
|
16
|
-
onToggle:
|
|
17
|
-
children:
|
|
18
|
-
}) => /* @__PURE__ */
|
|
17
|
+
onToggle: s,
|
|
18
|
+
children: i
|
|
19
|
+
}) => /* @__PURE__ */ a("div", { className: o.toggle, "data-theme": "neutral", children: [
|
|
19
20
|
/* @__PURE__ */ t(
|
|
20
|
-
|
|
21
|
+
c,
|
|
21
22
|
{
|
|
22
23
|
className: o.button,
|
|
23
|
-
size:
|
|
24
|
+
size: n,
|
|
24
25
|
icon: "menu-elipsis-horizontal",
|
|
25
26
|
iconSize: "md",
|
|
26
27
|
variant: "text",
|
|
27
28
|
color: "secondary",
|
|
28
|
-
onClick:
|
|
29
|
+
onClick: s
|
|
29
30
|
}
|
|
30
31
|
),
|
|
31
|
-
/* @__PURE__ */ t(
|
|
32
|
+
/* @__PURE__ */ t(m, { className: o.dropdown, placement: r, expanded: e, children: i })
|
|
32
33
|
] });
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
+
f as ContextMenuBase
|
|
35
36
|
};
|
|
@@ -44,7 +44,7 @@ export interface DialogProps {
|
|
|
44
44
|
/** Activity Log */
|
|
45
45
|
activityLog?: DialogActivityLogProps;
|
|
46
46
|
/** More information about the dialog, process, etc. */
|
|
47
|
-
additionalInfo?:
|
|
47
|
+
additionalInfo?: ReactNode;
|
|
48
48
|
/** History */
|
|
49
49
|
history?: DialogHistoryProps;
|
|
50
50
|
}
|
|
@@ -1,64 +1,55 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { MetaBase as
|
|
1
|
+
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { MetaBase as c } from "../Meta/MetaBase.js";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
4
|
import "../Icon/SvgIcon.js";
|
|
5
|
-
import { DialogActivityLog as
|
|
6
|
-
import { DialogArticleBase as
|
|
7
|
-
import { DialogAttachments as
|
|
8
|
-
import { DialogBase as
|
|
9
|
-
import { DialogBodyBase as
|
|
10
|
-
import { DialogContent as
|
|
5
|
+
import { DialogActivityLog as j } from "./DialogActivityLog.js";
|
|
6
|
+
import { DialogArticleBase as v } from "./DialogArticleBase.js";
|
|
7
|
+
import { DialogAttachments as y } from "./DialogAttachments.js";
|
|
8
|
+
import { DialogBase as H } from "./DialogBase.js";
|
|
9
|
+
import { DialogBodyBase as S } from "./DialogBodyBase.js";
|
|
10
|
+
import { DialogContent as C } from "./DialogContent.js";
|
|
11
11
|
import { DialogFooter as F } from "./DialogFooter.js";
|
|
12
12
|
import { DialogHeader as M } from "./DialogHeader.js";
|
|
13
13
|
import { DialogSeenBy as N } from "./DialogSeenBy.js";
|
|
14
|
-
import { DialogActions as
|
|
15
|
-
import { DialogHistory as
|
|
16
|
-
import { DialogNav as
|
|
17
|
-
const
|
|
18
|
-
backButton:
|
|
14
|
+
import { DialogActions as b } from "./DialogActions.js";
|
|
15
|
+
import { DialogHistory as k } from "./DialogHistory.js";
|
|
16
|
+
import { DialogNav as q } from "./DialogNav.js";
|
|
17
|
+
const Y = ({
|
|
18
|
+
backButton: a,
|
|
19
19
|
menu: f,
|
|
20
20
|
updatedAt: g,
|
|
21
21
|
updatedAtLabel: D,
|
|
22
|
-
dueAt:
|
|
23
|
-
dueAtLabel:
|
|
24
|
-
status:
|
|
25
|
-
title:
|
|
26
|
-
sender:
|
|
27
|
-
recipient:
|
|
28
|
-
summary:
|
|
29
|
-
body:
|
|
30
|
-
actions:
|
|
31
|
-
attachments:
|
|
32
|
-
history:
|
|
33
|
-
seenBy:
|
|
34
|
-
activityLog:
|
|
35
|
-
additionalInfo:
|
|
36
|
-
}) => /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
),
|
|
49
|
-
/* @__PURE__ */ i(C, { children: [
|
|
50
|
-
/* @__PURE__ */ r(E, { updatedAt: g, updatedAtLabel: D, summary: x, body: c }),
|
|
51
|
-
t && /* @__PURE__ */ r(S, { ...t }),
|
|
52
|
-
(m == null ? void 0 : m.length) > 0 && /* @__PURE__ */ r(U, { items: m }),
|
|
53
|
-
/* @__PURE__ */ i(j, { children: [
|
|
54
|
-
o && /* @__PURE__ */ r(N, { ...o }),
|
|
55
|
-
p && /* @__PURE__ */ r(v, { ...p })
|
|
22
|
+
dueAt: n,
|
|
23
|
+
dueAtLabel: s,
|
|
24
|
+
status: B,
|
|
25
|
+
title: d,
|
|
26
|
+
sender: h,
|
|
27
|
+
recipient: A,
|
|
28
|
+
summary: u = "Summary.",
|
|
29
|
+
body: x,
|
|
30
|
+
actions: r = [],
|
|
31
|
+
attachments: i,
|
|
32
|
+
history: t,
|
|
33
|
+
seenBy: e,
|
|
34
|
+
activityLog: l,
|
|
35
|
+
additionalInfo: p
|
|
36
|
+
}) => /* @__PURE__ */ m(H, { children: [
|
|
37
|
+
/* @__PURE__ */ o(q, { status: B, dueAt: n, dueAtLabel: s, backButton: a, menu: f }),
|
|
38
|
+
/* @__PURE__ */ m(v, { children: [
|
|
39
|
+
/* @__PURE__ */ o(M, { title: d, sender: h, recipient: A, seen: !1, variant: "neutral" }),
|
|
40
|
+
/* @__PURE__ */ m(S, { children: [
|
|
41
|
+
/* @__PURE__ */ o(C, { updatedAt: g, updatedAtLabel: D, summary: u, body: x }),
|
|
42
|
+
i && /* @__PURE__ */ o(y, { ...i }),
|
|
43
|
+
(r == null ? void 0 : r.length) > 0 && /* @__PURE__ */ o(b, { items: r }),
|
|
44
|
+
/* @__PURE__ */ m(c, { children: [
|
|
45
|
+
e && /* @__PURE__ */ o(N, { ...e }),
|
|
46
|
+
l && /* @__PURE__ */ o(j, { ...l })
|
|
56
47
|
] })
|
|
57
48
|
] }),
|
|
58
|
-
|
|
59
|
-
|
|
49
|
+
p && /* @__PURE__ */ o(F, { additionalInfo: p }),
|
|
50
|
+
t && /* @__PURE__ */ o(k, { ...t })
|
|
60
51
|
] })
|
|
61
52
|
] });
|
|
62
53
|
export {
|
|
63
|
-
|
|
54
|
+
Y as Dialog
|
|
64
55
|
};
|
|
@@ -1,43 +1,80 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { jsxs as t, Fragment as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Dialog as a } from "./Dialog.js";
|
|
3
|
+
const d = {
|
|
3
4
|
title: "Dialog/Dialog",
|
|
4
|
-
component:
|
|
5
|
+
component: a,
|
|
5
6
|
tags: ["autodocs"],
|
|
6
7
|
parameters: {},
|
|
7
8
|
argTypes: { body: { control: "text" } },
|
|
8
9
|
args: {
|
|
10
|
+
seenBy: {
|
|
11
|
+
as: "a",
|
|
12
|
+
href: "#",
|
|
13
|
+
label: "Sett av deg + 2",
|
|
14
|
+
seenByEndUser: !0,
|
|
15
|
+
seenByOthersCount: 24
|
|
16
|
+
},
|
|
17
|
+
activityLog: {
|
|
18
|
+
as: "a",
|
|
19
|
+
href: "#",
|
|
20
|
+
label: "Aktivitetslogg"
|
|
21
|
+
},
|
|
9
22
|
menu: {
|
|
10
23
|
id: "context-menu",
|
|
11
24
|
items: [
|
|
12
25
|
{
|
|
13
|
-
|
|
14
|
-
id: "
|
|
26
|
+
groupId: "1",
|
|
27
|
+
id: "1",
|
|
28
|
+
icon: "arrow-redo",
|
|
29
|
+
title: "Del og gi tilgang"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
groupId: "1",
|
|
33
|
+
id: "2",
|
|
34
|
+
icon: "eye",
|
|
35
|
+
title: "Marker som lest"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
groupId: "2",
|
|
39
|
+
id: "3",
|
|
40
|
+
icon: "archive",
|
|
41
|
+
title: "Flytt til arkiv"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
groupId: "2",
|
|
45
|
+
id: "4",
|
|
46
|
+
icon: "trash",
|
|
47
|
+
title: "Flytt til papirkurv"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
groupId: "3",
|
|
51
|
+
id: "4",
|
|
52
|
+
icon: "clock-dashed",
|
|
53
|
+
title: "Aktivitetslogg"
|
|
15
54
|
}
|
|
16
55
|
]
|
|
17
56
|
},
|
|
18
|
-
updatedAt: "
|
|
19
|
-
updatedAtLabel: "
|
|
57
|
+
updatedAt: "2024-11-25 15:30",
|
|
58
|
+
updatedAtLabel: "25. november 1999 kl 15.30",
|
|
20
59
|
title: "Title",
|
|
21
60
|
summary: "Summary"
|
|
22
61
|
}
|
|
23
|
-
},
|
|
62
|
+
}, o = {
|
|
24
63
|
args: {
|
|
25
|
-
body:
|
|
26
|
-
|
|
27
|
-
Body
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- List 2
|
|
35
|
-
- List 3
|
|
36
|
-
`
|
|
64
|
+
body: /* @__PURE__ */ t(r, { children: [
|
|
65
|
+
/* @__PURE__ */ e("h2", { children: "Heading 2" }),
|
|
66
|
+
/* @__PURE__ */ e("p", { children: "Body can be displayed using HTML." }),
|
|
67
|
+
/* @__PURE__ */ t("ul", { children: [
|
|
68
|
+
/* @__PURE__ */ e("li", { children: "List item 1" }),
|
|
69
|
+
/* @__PURE__ */ e("li", { children: "List item 2" }),
|
|
70
|
+
/* @__PURE__ */ e("li", { children: "List item 3" })
|
|
71
|
+
] })
|
|
72
|
+
] })
|
|
37
73
|
}
|
|
38
|
-
},
|
|
74
|
+
}, m = {
|
|
39
75
|
args: {
|
|
40
76
|
attachments: {
|
|
77
|
+
title: "2 vedlegg",
|
|
41
78
|
items: [
|
|
42
79
|
{
|
|
43
80
|
label: "Dokument 1.pdf",
|
|
@@ -50,36 +87,24 @@ body supporters basic headings from h2 -> h4 + lists.
|
|
|
50
87
|
]
|
|
51
88
|
}
|
|
52
89
|
}
|
|
53
|
-
},
|
|
90
|
+
}, p = {
|
|
54
91
|
args: {
|
|
55
|
-
|
|
92
|
+
actions: [
|
|
56
93
|
{
|
|
94
|
+
id: "1",
|
|
95
|
+
priority: "primary",
|
|
57
96
|
label: "Primary"
|
|
58
97
|
},
|
|
59
98
|
{
|
|
99
|
+
id: "2",
|
|
100
|
+
priority: "secondary",
|
|
60
101
|
label: "Secondary"
|
|
61
102
|
}
|
|
62
103
|
]
|
|
63
104
|
}
|
|
64
|
-
},
|
|
65
|
-
args: {
|
|
66
|
-
...t.args,
|
|
67
|
-
seenBy: {
|
|
68
|
-
as: "a",
|
|
69
|
-
href: "#",
|
|
70
|
-
label: "Sett av deg + 24",
|
|
71
|
-
seenByEndUser: !0,
|
|
72
|
-
seenByOthersCount: 24
|
|
73
|
-
},
|
|
74
|
-
activityLog: {
|
|
75
|
-
as: "a",
|
|
76
|
-
href: "#",
|
|
77
|
-
label: "Aktivitetslogg"
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}, l = {
|
|
105
|
+
}, i = {
|
|
81
106
|
args: {
|
|
82
|
-
status: { value: "requires-attention" },
|
|
107
|
+
status: { label: "Krever handling", value: "requires-attention" },
|
|
83
108
|
sender: {
|
|
84
109
|
name: "Statistisk sentralbyrå",
|
|
85
110
|
imageUrl: "https://digdir-proto-proto.vercel.app/_next/static/media/SSB.0ca4474e.png"
|
|
@@ -88,14 +113,22 @@ body supporters basic headings from h2 -> h4 + lists.
|
|
|
88
113
|
name: "Bergen Bar"
|
|
89
114
|
},
|
|
90
115
|
title: "Rapportering av bedriftsdata",
|
|
91
|
-
summary: "Du må levere bedriftsdata innen
|
|
92
|
-
additionalInfo:
|
|
93
|
-
|
|
116
|
+
summary: "Du må levere bedriftsdata innen 1. januar.",
|
|
117
|
+
additionalInfo: /* @__PURE__ */ t("p", { children: [
|
|
118
|
+
"Din bedrift er en av 8.000 virksomheter som har opplysningsplikt i 2024. Statistikken er viktig for samfunnet og det er ikke valgfritt å delta. Hvis dere ikke sender opplysningene innen fristen, vil foretaket kunne få tvangsmulkt. ",
|
|
119
|
+
/* @__PURE__ */ e("a", { href: "https://www.ssb.no/innrapportering/ledige-stillinger", children: "Les mer på SSB.no" })
|
|
120
|
+
] }),
|
|
121
|
+
actions: [
|
|
94
122
|
{
|
|
123
|
+
id: "1",
|
|
124
|
+
priority: "primary",
|
|
95
125
|
label: "Rapporter bedriftsdata"
|
|
96
126
|
}
|
|
97
127
|
],
|
|
128
|
+
dueAt: "2025-01-01",
|
|
129
|
+
dueAtLabel: "Frist: 1. januar 2025",
|
|
98
130
|
attachments: {
|
|
131
|
+
title: "1 vedlegg",
|
|
99
132
|
items: [
|
|
100
133
|
{
|
|
101
134
|
label: "Vedtak om innlevering av bedriftsdata.pdf",
|
|
@@ -104,118 +137,70 @@ body supporters basic headings from h2 -> h4 + lists.
|
|
|
104
137
|
]
|
|
105
138
|
}
|
|
106
139
|
}
|
|
107
|
-
},
|
|
108
|
-
args: {
|
|
109
|
-
status: { value: "requires-attention" },
|
|
110
|
-
sender: {
|
|
111
|
-
name: "Statistisk sentralbyrå",
|
|
112
|
-
imageUrl: "https://digdir-proto-proto.vercel.app/_next/static/media/SSB.0ca4474e.png"
|
|
113
|
-
},
|
|
114
|
-
recipient: {
|
|
115
|
-
name: "Bergen Bar"
|
|
116
|
-
},
|
|
117
|
-
title: "Rapportering av bedriftsdata",
|
|
118
|
-
summary: "Innrapporteringen inneholder feil. Se over og lever på nytt.",
|
|
119
|
-
additionalInfo: "Din bedrift er pålagt å rapportere inn bedriftsdata innen **31. oktober**. Vi bruker svarene dine kun til å utarbeide statistikk, og enkeltsvar vil aldri bli offentliggjort. Du kan når som helst kontakte oss og kreve av opplysningene om deg blir slettet.",
|
|
120
|
-
action: [
|
|
121
|
-
{
|
|
122
|
-
label: "Rapporter bedriftsdata"
|
|
123
|
-
}
|
|
124
|
-
],
|
|
125
|
-
attachments: {
|
|
126
|
-
items: [
|
|
127
|
-
{
|
|
128
|
-
label: "Feilliste.pdf"
|
|
129
|
-
}
|
|
130
|
-
]
|
|
131
|
-
},
|
|
132
|
-
history: [
|
|
133
|
-
{
|
|
134
|
-
createdAt: "2004-01-01 13:34",
|
|
135
|
-
createdBy: {
|
|
136
|
-
name: "Eirik Horneland"
|
|
137
|
-
},
|
|
138
|
-
summary: "Rapportering ble sendt inn.",
|
|
139
|
-
attachments: [
|
|
140
|
-
{
|
|
141
|
-
label: "Kvittering.pdf"
|
|
142
|
-
}
|
|
143
|
-
]
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
createdAt: "2004-01-01 13:34",
|
|
147
|
-
createdBy: {
|
|
148
|
-
imageUrl: "https://digdir-proto-proto.vercel.app/_next/static/media/SSB.0ca4474e.png",
|
|
149
|
-
name: "Statistisk sentralbyrå"
|
|
150
|
-
},
|
|
151
|
-
summary: "Du må levere bedriftsdata innen 31. oktober.",
|
|
152
|
-
attachments: [
|
|
153
|
-
{
|
|
154
|
-
label: "Vedtak om innlevering av bedriftsdata.pdf"
|
|
155
|
-
}
|
|
156
|
-
]
|
|
157
|
-
}
|
|
158
|
-
],
|
|
159
|
-
contactInfo: `Kontakt oss på svar@ssb.no eller ring 62 88 56 08.
|
|
160
|
-
|
|
161
|
-
Svartjenesten er åpen alle hverdager fra kl. 9-21 og lørdager fra kl. 10-16.`
|
|
162
|
-
}
|
|
163
|
-
}, m = {
|
|
140
|
+
}, g = {
|
|
164
141
|
args: {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
142
|
+
...i.args,
|
|
143
|
+
status: { value: "in-progress", label: "Under arbeid" },
|
|
144
|
+
dueAt: null,
|
|
145
|
+
dueAtLabel: null,
|
|
146
|
+
updatedAtLabel: "27. november 2024 kl 10.30",
|
|
147
|
+
summary: "Saken er sendt til manuell behandling. Forventet behandlingstid: 2 uker.",
|
|
148
|
+
body: /* @__PURE__ */ t(r, { children: [
|
|
149
|
+
/* @__PURE__ */ e("h2", { children: "Hva skjer nå?" }),
|
|
150
|
+
/* @__PURE__ */ e("p", { children: "Saken din har fått saksbehandler og blir behandlet manuelt." }),
|
|
151
|
+
/* @__PURE__ */ t("ul", { children: [
|
|
152
|
+
/* @__PURE__ */ t("li", { children: [
|
|
153
|
+
/* @__PURE__ */ e("strong", { children: "Din saksbehandler:" }),
|
|
154
|
+
" Siri Saksbehander"
|
|
155
|
+
] }),
|
|
156
|
+
/* @__PURE__ */ t("li", { children: [
|
|
157
|
+
/* @__PURE__ */ e("strong", { children: "Ditt saksnummer:" }),
|
|
158
|
+
" XRT0987"
|
|
159
|
+
] })
|
|
160
|
+
] }),
|
|
161
|
+
/* @__PURE__ */ e("p", { children: "Oppgi saksnummer ved kontakt." })
|
|
162
|
+
] }),
|
|
163
|
+
actions: null,
|
|
181
164
|
attachments: {},
|
|
165
|
+
additionalInfo: /* @__PURE__ */ t("p", { children: [
|
|
166
|
+
"Din bedrift er en av 8.000 virksomheter som har opplysningsplikt i 2024. Statistikken er viktig for samfunnet og det er ikke valgfritt å delta. Hvis dere ikke sender opplysningene innen fristen, vil foretaket kunne få tvangsmulkt. ",
|
|
167
|
+
/* @__PURE__ */ e("a", { href: "https://www.ssb.no/innrapportering/ledige-stillinger", children: "Les mer på SSB.no" })
|
|
168
|
+
] }),
|
|
182
169
|
history: {
|
|
170
|
+
title: "Hva har skjedd?",
|
|
183
171
|
items: [
|
|
184
172
|
{
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
name: "
|
|
173
|
+
createdBy: {
|
|
174
|
+
type: "person",
|
|
175
|
+
name: "Ola Nordmann"
|
|
188
176
|
},
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
{
|
|
192
|
-
label: "Kvittering.pdf"
|
|
193
|
-
}
|
|
194
|
-
]
|
|
177
|
+
createdAtLabel: "27. november 2024 kl 10.24",
|
|
178
|
+
summary: "Bedriftsdata ble levert."
|
|
195
179
|
},
|
|
196
180
|
{
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
181
|
+
createdBy: {
|
|
182
|
+
type: "company",
|
|
183
|
+
name: "Statistisk sentralbyrå",
|
|
184
|
+
imageUrl: "https://digdir-proto-proto.vercel.app/_next/static/media/SSB.0ca4474e.png"
|
|
201
185
|
},
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
186
|
+
createdAtLabel: "24. november 2024 kl 15.30",
|
|
187
|
+
summary: "Du må levere bedriftsdata innen 1. januar.",
|
|
188
|
+
attachments: {
|
|
189
|
+
title: "1 vedlegg",
|
|
190
|
+
items: [
|
|
191
|
+
{
|
|
192
|
+
label: "Vedtak om innlevering av bedriftsdata.pdf",
|
|
193
|
+
href: ""
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
}
|
|
208
197
|
}
|
|
209
198
|
]
|
|
210
|
-
},
|
|
211
|
-
contact: {
|
|
212
|
-
title: "Ta kontakt",
|
|
213
|
-
body: "Ta kontakt for mer informasjon på telefon 99 00 00 00."
|
|
214
199
|
}
|
|
215
200
|
}
|
|
216
|
-
},
|
|
201
|
+
}, n = {
|
|
217
202
|
args: {
|
|
218
|
-
status: { value: "draft" },
|
|
203
|
+
status: { value: "draft", label: "Utkast" },
|
|
219
204
|
sender: {
|
|
220
205
|
name: "Statistisk sentralbyrå",
|
|
221
206
|
imageUrl: "https://digdir-proto-proto.vercel.app/_next/static/media/SSB.0ca4474e.png"
|
|
@@ -225,71 +210,44 @@ Svartjenesten er åpen alle hverdager fra kl. 9-21 og lørdager fra kl. 10-16.`
|
|
|
225
210
|
},
|
|
226
211
|
title: "Registrere enkeltmannsforetak",
|
|
227
212
|
summary: "Skjema er opprettet.",
|
|
228
|
-
|
|
213
|
+
actions: [
|
|
229
214
|
{
|
|
215
|
+
id: "1",
|
|
216
|
+
priority: "primary",
|
|
230
217
|
label: "Gå til skjema"
|
|
231
218
|
},
|
|
232
219
|
{
|
|
220
|
+
id: "2",
|
|
221
|
+
priority: "secondary",
|
|
233
222
|
label: "Forkast"
|
|
234
223
|
}
|
|
235
224
|
],
|
|
236
|
-
attachments: {}
|
|
237
|
-
additionalInfo: "Enkeltpersonforetak må registreres i Enhetsregisteret for å få et organisasjonsnummer. Enkelte må også registreres i Foretaksregisteret."
|
|
225
|
+
attachments: {}
|
|
238
226
|
}
|
|
239
|
-
},
|
|
227
|
+
}, c = {
|
|
240
228
|
args: {
|
|
241
|
-
...
|
|
242
|
-
status: { value: "
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
label: "Avslå signering"
|
|
250
|
-
}
|
|
251
|
-
],
|
|
252
|
-
history: {
|
|
229
|
+
...n.args,
|
|
230
|
+
status: { value: "sent", label: "Sendt" },
|
|
231
|
+
actions: null,
|
|
232
|
+
summary: "Skjema er sendt inn.",
|
|
233
|
+
attachments: {
|
|
234
|
+
title: "1 vedlegg",
|
|
253
235
|
items: [
|
|
254
236
|
{
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
type: "person",
|
|
258
|
-
name: "Eirik Horneland"
|
|
259
|
-
},
|
|
260
|
-
summary: "Rapportering ble sendt inn.",
|
|
261
|
-
attachments: [
|
|
262
|
-
{
|
|
263
|
-
label: "Kvittering.pdf"
|
|
264
|
-
}
|
|
265
|
-
]
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
createdAt: "2004-01-01 13:34",
|
|
269
|
-
createdBy: {
|
|
270
|
-
imageUrl: "https://digdir-proto-proto.vercel.app/_next/static/media/SSB.0ca4474e.png",
|
|
271
|
-
name: "Statistisk sentralbyrå"
|
|
272
|
-
},
|
|
273
|
-
summary: "Du må levere bedriftsdata innen 31. oktober.",
|
|
274
|
-
attachments: [
|
|
275
|
-
{
|
|
276
|
-
label: "Vedtak om innlevering av bedriftsdata.pdf"
|
|
277
|
-
}
|
|
278
|
-
]
|
|
237
|
+
href: "#",
|
|
238
|
+
label: "Kvittering på innsendt skjema.pdf"
|
|
279
239
|
}
|
|
280
240
|
]
|
|
281
241
|
}
|
|
282
242
|
}
|
|
283
243
|
};
|
|
284
244
|
export {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
m as Signering,
|
|
294
|
-
n as default
|
|
245
|
+
p as Actions,
|
|
246
|
+
m as Attachments,
|
|
247
|
+
o as Body,
|
|
248
|
+
n as Draft,
|
|
249
|
+
g as InProgress,
|
|
250
|
+
i as RequiresAttention,
|
|
251
|
+
c as Sent,
|
|
252
|
+
d as default
|
|
295
253
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import { DialogListItem as
|
|
4
|
-
import { DialogStatusEnum as
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as u, useState as y } from "react";
|
|
3
|
+
import { DialogListItem as r } from "./DialogListItem.js";
|
|
4
|
+
import { DialogStatusEnum as g } from "./DialogStatus.js";
|
|
5
5
|
import "../../index-L8X2o7IH.js";
|
|
6
6
|
import "../Icon/SvgIcon.js";
|
|
7
|
-
import { MetaItem as
|
|
7
|
+
import { MetaItem as i } from "../Meta/MetaItem.js";
|
|
8
8
|
import "../RootProvider/RootProvider.js";
|
|
9
|
-
import { ListBase as
|
|
10
|
-
const
|
|
11
|
-
switch (
|
|
9
|
+
import { ListBase as s } from "../List/ListBase.js";
|
|
10
|
+
const f = (t) => {
|
|
11
|
+
switch (t) {
|
|
12
12
|
case "draft":
|
|
13
13
|
return "Utkast";
|
|
14
14
|
case "sent":
|
|
@@ -22,16 +22,18 @@ const y = (r) => {
|
|
|
22
22
|
default:
|
|
23
23
|
return "";
|
|
24
24
|
}
|
|
25
|
-
},
|
|
26
|
-
var
|
|
27
|
-
const
|
|
28
|
-
value:
|
|
29
|
-
label:
|
|
30
|
-
})),
|
|
25
|
+
}, d = ["lg", "md", "sm", "xs"];
|
|
26
|
+
var p;
|
|
27
|
+
const o = (p = Object.keys(g)) == null ? void 0 : p.map((t) => ({
|
|
28
|
+
value: t,
|
|
29
|
+
label: f(t)
|
|
30
|
+
})), I = {
|
|
31
31
|
title: "Dialog/DialogListItem",
|
|
32
|
-
component:
|
|
32
|
+
component: r,
|
|
33
33
|
tags: ["autodocs"],
|
|
34
|
-
parameters: {
|
|
34
|
+
parameters: {
|
|
35
|
+
theme: "company"
|
|
36
|
+
},
|
|
35
37
|
argTypes: {},
|
|
36
38
|
args: {
|
|
37
39
|
title: "Title",
|
|
@@ -44,87 +46,74 @@ const c = (g = Object.keys(b)) == null ? void 0 : g.map((r) => ({
|
|
|
44
46
|
type: "person",
|
|
45
47
|
name: "Recipient name"
|
|
46
48
|
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}, j = {
|
|
52
|
-
args: {
|
|
53
|
-
select: {
|
|
54
|
-
checked: !1
|
|
55
|
-
}
|
|
49
|
+
updatedAt: "2024-11-25 15:30",
|
|
50
|
+
updatedAtLabel: "25. november 2024 kl 15.30",
|
|
51
|
+
status: {}
|
|
56
52
|
}
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}, A = {
|
|
69
|
-
args: {
|
|
70
|
-
touchedBy: [
|
|
71
|
-
{
|
|
72
|
-
name: "Lars"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
name: "Trine"
|
|
76
|
-
}
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
}, E = {
|
|
80
|
-
args: {
|
|
81
|
-
status: {
|
|
82
|
-
value: "draft"
|
|
53
|
+
}, O = (t) => /* @__PURE__ */ e(s, { children: o == null ? void 0 : o.map((a) => /* @__PURE__ */ l(u, { children: [
|
|
54
|
+
/* @__PURE__ */ e(r, { ...t, status: a }),
|
|
55
|
+
/* @__PURE__ */ e(i, { children: a == null ? void 0 : a.value })
|
|
56
|
+
] }, a == null ? void 0 : a.value)) }), j = (t) => /* @__PURE__ */ l(s, { children: [
|
|
57
|
+
/* @__PURE__ */ e(
|
|
58
|
+
r,
|
|
59
|
+
{
|
|
60
|
+
...t,
|
|
61
|
+
status: { label: "Krever handling", value: "requires-attention" },
|
|
62
|
+
dueAt: "2025-01-01",
|
|
63
|
+
dueAtLabel: "Frist: 1. januar 2025"
|
|
83
64
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ e(i, { children: "Dialog requires action wihtin a spesific due date." })
|
|
67
|
+
] }), x = (t) => /* @__PURE__ */ l(s, { children: [
|
|
68
|
+
/* @__PURE__ */ e(r, { ...t, attachmentsCount: 2 }),
|
|
69
|
+
/* @__PURE__ */ e(i, { children: "Dialog has attachments." })
|
|
70
|
+
] }), K = (t) => /* @__PURE__ */ l(s, { children: [
|
|
71
|
+
/* @__PURE__ */ e(r, { ...t, seen: !0, seenBy: { seenByEndUser: !0, label: "Sett av deg" } }),
|
|
72
|
+
/* @__PURE__ */ e(i, { children: "Seen by end user. Dialog is marked as seen." }),
|
|
73
|
+
/* @__PURE__ */ e(r, { ...t, seenBy: { seenByOthersCount: 4, label: "Sett av 4" } }),
|
|
74
|
+
/* @__PURE__ */ e(i, { children: "Seen by others. Dialog is not marked as seen." }),
|
|
75
|
+
/* @__PURE__ */ e(
|
|
76
|
+
r,
|
|
77
|
+
{
|
|
78
|
+
...t,
|
|
79
|
+
seen: !0,
|
|
80
|
+
seenBy: { seenByOthersCount: 4, seenByEndUser: !0, label: "Sett av deg + 4" }
|
|
89
81
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ e(i, { children: "Seen by end user and others. Dialog is marked as seen." })
|
|
84
|
+
] }), q = (t) => /* @__PURE__ */ l(s, { children: [
|
|
85
|
+
/* @__PURE__ */ e(r, { ...t, touchedBy: [{ name: "Kari Nordmann" }] }),
|
|
86
|
+
/* @__PURE__ */ e(i, { children: "Dialog has been touched by a single actor." }),
|
|
87
|
+
/* @__PURE__ */ e(r, { ...t, touchedBy: [{ name: "Kari Nordmann" }, { name: "Ola Nordmann" }] }),
|
|
88
|
+
/* @__PURE__ */ e(i, { children: "Dialog has been touched by two actors." }),
|
|
89
|
+
/* @__PURE__ */ e(
|
|
90
|
+
r,
|
|
91
|
+
{
|
|
92
|
+
...t,
|
|
93
|
+
touchedBy: [{ name: "Kari Nordmann" }, { name: "Ola Nordmann" }, { name: "Per Nordmann" }]
|
|
95
94
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ e(i, { children: "Dialog has been touched by a multiple actors." })
|
|
97
|
+
] }), E = (t) => /* @__PURE__ */ l(s, { children: [
|
|
98
|
+
/* @__PURE__ */ e(
|
|
99
|
+
r,
|
|
100
|
+
{
|
|
101
|
+
...t,
|
|
102
|
+
title: "Cras mattis consectetur purus sit amet fermentum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia bibendum nulla sed consectetur. Maecenas faucibus mollis interdum. Nullam id dolor id nibh ultricies vehicula ut id elit. Nullam id dolor id nibh ultricies vehicula ut id elit."
|
|
101
103
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ e(i, { children: "Long title" }),
|
|
106
|
+
/* @__PURE__ */ e(
|
|
107
|
+
r,
|
|
108
|
+
{
|
|
109
|
+
...t,
|
|
110
|
+
summary: "Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Etiam porta sem malesuada magna mollis euismod. Maecenas faucibus mollis interdum. Nullam id dolor id nibh ultricies vehicula ut id elit.\\n\\nCras mattis consectetur purus sit amet fermentum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia bibendum nulla sed consectetur. Maecenas faucibus mollis interdum. Nullam id dolor id nibh ultricies vehicula ut id elit. Nullam id dolor id nibh ultricies vehicula ut id elit."
|
|
107
111
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}, R = {
|
|
114
|
-
args: {
|
|
115
|
-
title: "Long summary",
|
|
116
|
-
summary: `Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Etiam porta sem malesuada magna mollis euismod. Maecenas faucibus mollis interdum. Nullam id dolor id nibh ultricies vehicula ut id elit.
|
|
117
|
-
|
|
118
|
-
Cras mattis consectetur purus sit amet fermentum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia bibendum nulla sed consectetur. Maecenas faucibus mollis interdum. Nullam id dolor id nibh ultricies vehicula ut id elit. Nullam id dolor id nibh ultricies vehicula ut id elit.`
|
|
119
|
-
}
|
|
120
|
-
}, F = {
|
|
121
|
-
args: {
|
|
122
|
-
title: "Cras mattis consectetur purus sit amet fermentum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia bibendum nulla sed consectetur. Maecenas faucibus mollis interdum. Nullam id dolor id nibh ultricies vehicula ut id elit. Nullam id dolor id nibh ultricies vehicula ut id elit.",
|
|
123
|
-
summary: "Short summary."
|
|
124
|
-
}
|
|
125
|
-
}, G = (r) => {
|
|
126
|
-
var p;
|
|
127
|
-
const [t, h] = f({
|
|
112
|
+
),
|
|
113
|
+
/* @__PURE__ */ e(i, { children: "Long summary" })
|
|
114
|
+
] }), M = (t) => {
|
|
115
|
+
var h;
|
|
116
|
+
const [a, b] = y({
|
|
128
117
|
1: {
|
|
129
118
|
id: "1",
|
|
130
119
|
title: "Item 1",
|
|
@@ -140,53 +129,43 @@ Cras mattis consectetur purus sit amet fermentum. Lorem ipsum dolor sit amet, co
|
|
|
140
129
|
title: "Item 2",
|
|
141
130
|
selected: !1
|
|
142
131
|
}
|
|
143
|
-
}), m = ({ id:
|
|
144
|
-
|
|
145
|
-
...
|
|
146
|
-
[
|
|
147
|
-
...
|
|
148
|
-
selected: !
|
|
132
|
+
}), m = ({ id: n }) => {
|
|
133
|
+
b((c) => ({
|
|
134
|
+
...c,
|
|
135
|
+
[n]: {
|
|
136
|
+
...c[n],
|
|
137
|
+
selected: !c[n].selected
|
|
149
138
|
}
|
|
150
139
|
}));
|
|
151
140
|
};
|
|
152
|
-
return /* @__PURE__ */ s
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
|
|
141
|
+
return /* @__PURE__ */ e(s, { children: (h = Object.values(a)) == null ? void 0 : h.map((n) => /* @__PURE__ */ l(u, { children: [
|
|
142
|
+
/* @__PURE__ */ e(
|
|
143
|
+
r,
|
|
155
144
|
{
|
|
156
|
-
...
|
|
157
|
-
title:
|
|
158
|
-
onClick:
|
|
159
|
-
selected:
|
|
160
|
-
select: { checked:
|
|
145
|
+
...t,
|
|
146
|
+
title: n.title,
|
|
147
|
+
onClick: n.selected ? () => m(n) : null,
|
|
148
|
+
selected: n.selected,
|
|
149
|
+
select: { checked: n == null ? void 0 : n.selected, onChange: () => m(n) }
|
|
161
150
|
}
|
|
162
151
|
),
|
|
163
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ l(i, { children: [
|
|
164
153
|
"selected:",
|
|
165
|
-
|
|
154
|
+
n.selected ? "true" : "false"
|
|
166
155
|
] })
|
|
167
|
-
] },
|
|
168
|
-
},
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
] },
|
|
172
|
-
/* @__PURE__ */ s(l, { ...r, size: t }),
|
|
173
|
-
/* @__PURE__ */ s(u, { children: t })
|
|
174
|
-
] }, t)) });
|
|
156
|
+
] }, n == null ? void 0 : n.id)) });
|
|
157
|
+
}, T = (t) => /* @__PURE__ */ e(s, { children: d == null ? void 0 : d.map((a) => /* @__PURE__ */ l(u, { children: [
|
|
158
|
+
/* @__PURE__ */ e(r, { ...t, size: a }),
|
|
159
|
+
/* @__PURE__ */ e(i, { children: a })
|
|
160
|
+
] }, a)) });
|
|
175
161
|
export {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
V as Sizes,
|
|
186
|
-
K as Statuses,
|
|
187
|
-
A as TouchedBy,
|
|
188
|
-
T as default,
|
|
189
|
-
x as seenByEndUser,
|
|
190
|
-
j as selectable,
|
|
191
|
-
q as selected
|
|
162
|
+
x as Attachments,
|
|
163
|
+
j as DueAt,
|
|
164
|
+
K as SeenBy,
|
|
165
|
+
M as Selectable,
|
|
166
|
+
T as Sizes,
|
|
167
|
+
O as Statuses,
|
|
168
|
+
E as TextLength,
|
|
169
|
+
q as TouchedBy,
|
|
170
|
+
I as default
|
|
192
171
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as r, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { DialogSelect as _ } from "./DialogSelect.js";
|
|
3
|
-
import '../../assets/DialogListItemBase.css';const d = "
|
|
3
|
+
import '../../assets/DialogListItemBase.css';const d = "_item_1uvy5_1", u = "_link_1uvy5_13", k = "_select_1uvy5_46", t = {
|
|
4
4
|
item: d,
|
|
5
|
-
link:
|
|
6
|
-
select:
|
|
7
|
-
},
|
|
5
|
+
link: u,
|
|
6
|
+
select: k
|
|
7
|
+
}, y = ({
|
|
8
8
|
as: i = "a",
|
|
9
9
|
size: e,
|
|
10
10
|
href: l,
|
|
@@ -20,5 +20,5 @@ import '../../assets/DialogListItemBase.css';const d = "_item_1ate4_1", k = "_li
|
|
|
20
20
|
] });
|
|
21
21
|
};
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
y as DialogListItemBase
|
|
24
24
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
4
|
import "../Icon/SvgIcon.js";
|
|
5
|
-
import { Button as
|
|
6
|
-
import { ContextMenu as
|
|
5
|
+
import { Button as c } from "../Button/Button.js";
|
|
6
|
+
import { ContextMenu as l } from "../ContextMenu/ContextMenu.js";
|
|
7
7
|
import { MetaTimestamp as p } from "../Meta/MetaTimestamp.js";
|
|
8
8
|
import { DialogStatus as v } from "./DialogStatus.js";
|
|
9
|
-
import { DialogTouchedBy as
|
|
10
|
-
import '../../assets/DialogNav.css';const
|
|
11
|
-
nav:
|
|
12
|
-
action:
|
|
13
|
-
},
|
|
14
|
-
backButton:
|
|
9
|
+
import { DialogTouchedBy as d } from "./DialogTouchedBy.js";
|
|
10
|
+
import '../../assets/DialogNav.css';const f = "_nav_678a5_1", x = "_action_678a5_8", m = {
|
|
11
|
+
nav: f,
|
|
12
|
+
action: x
|
|
13
|
+
}, M = ({
|
|
14
|
+
backButton: r = {
|
|
15
15
|
as: "a",
|
|
16
16
|
label: "Back"
|
|
17
17
|
},
|
|
18
|
-
status:
|
|
19
|
-
dueAt:
|
|
18
|
+
status: i,
|
|
19
|
+
dueAt: a,
|
|
20
20
|
dueAtLabel: e,
|
|
21
|
-
touchedBy:
|
|
21
|
+
touchedBy: s,
|
|
22
22
|
menu: n
|
|
23
|
-
}) => /* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
n && /* @__PURE__ */
|
|
23
|
+
}) => /* @__PURE__ */ t("nav", { className: m.nav, children: [
|
|
24
|
+
/* @__PURE__ */ o(c, { ...r, variant: "text", color: "secondary", icon: "arrow-left", reverse: !0, children: (r == null ? void 0 : r.label) || "Back" }),
|
|
25
|
+
/* @__PURE__ */ t("div", { className: m.action, children: [
|
|
26
|
+
a && e && /* @__PURE__ */ o(p, { datetime: a, icon: "clock-dashed", size: "xs", children: e }),
|
|
27
|
+
i && /* @__PURE__ */ o(v, { ...i }),
|
|
28
|
+
s && /* @__PURE__ */ o(d, { touchedBy: s }),
|
|
29
|
+
n && /* @__PURE__ */ o(l, { ...n, size: "md" })
|
|
30
30
|
] })
|
|
31
31
|
] });
|
|
32
32
|
export {
|
|
33
|
-
|
|
33
|
+
M as DialogNav
|
|
34
34
|
};
|