@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.
@@ -1 +1 @@
1
- ._group_1k49o_1{display:flex}._reset_1k49o_5{margin:0;padding:0;text-indent:0;list-style-type:none}._item_1k49o_12{position:relative}._xs_1k49o_16{width:32px}._xs_1k49o_16[data-count="2"] *+*{margin-left:-8px}._xs_1k49o_16[data-count="3"] *+*{margin-left:-14px}._xs_1k49o_16[data-count="4"] *+*{margin-left:-16px}._sm_1k49o_32{width:42px}._sm_1k49o_32[data-count="2"] *+*{margin-left:-6px}._sm_1k49o_32[data-count="3"] *+*{margin-left:-15px}._sm_1k49o_32[data-count="4"] *+*{margin-left:-18px}._md_1k49o_48{width:54px}._md_1k49o_48[data-count="2"] *+*{margin-left:-6px}._md_1k49o_48[data-count="3"] *+*{margin-left:-18px}._md_1k49o_48[data-count="4"] *+*{margin-left:-22px}._lg_1k49o_64{width:66px}._lg_1k49o_64[data-count="2"] *+*{margin-left:-6px}._lg_1k49o_64[data-count="3"] *+*{margin-left:-21px}._lg_1k49o_64[data-count="4"] *+*{margin-left:-26px}
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
- ._button_1pg7d_1{border:1px solid;border-color:transparent;margin:0;padding:0;width:auto;overflow:visible;background:transparent;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_1pg7d_1:disabled{opacity:.5;pointer-events:none}._button_1pg7d_1:focus{border-color:var(--theme-base-active)}._button_1pg7d_1:hover{border-color:var(--theme-base-hover)}._button_1pg7d_1:active{border-color:var(--theme-base-active)}._button_1pg7d_1[data-size=sm]{height:2.25rem}._button_1pg7d_1[data-size=md]{height:2.75rem}._button_1pg7d_1[data-size=lg]{height:3.5rem}._button_1pg7d_1[data-variant=solid]{border-color:var(--theme-base-default);background-color:var(--theme-base-default);color:#fff}._button_1pg7d_1[data-variant=solid]:hover{border-color:var(--theme-base-hover);background-color:var(--theme-base-hover)}._button_1pg7d_1[data-variant=solid]:active{border-color:var(--theme-base-active);background-color:var(--theme-base-active)}._button_1pg7d_1[data-variant=outline],._button_1pg7d_1[data-variant=dotted]{border-color:var(--theme-base-default)}._button_1pg7d_1[data-variant=outline]{border-style:solid}._button_1pg7d_1[data-variant=dotted]{border-style:dotted}._button_1pg7d_1[data-variant=text]{border-color:transparent}._button_1pg7d_1[data-variant=outline]:hover,._button_1pg7d_1[data-variant=dotted]:hover,._button_1pg7d_1[data-variant=text]:hover{background-color:var(--theme-surface-default)}._button_1pg7d_1[data-variant=outline]:active,._button_1pg7d_1[data-variant=dotted]:active,._button_1pg7d_1[data-variant=text]:active{background-color:var(--theme-surface-active)}._button_1pg7d_1[aria-selected=true]{background-color:var(--theme-background-subtle);color:var(--theme-text-default)}._button_1pg7d_1[data-color=secondary]{color:var(--theme-text-subtle)}._button_1pg7d_1[data-color=secondary]:hover{border-color:var(--theme-surface-hover)}._button_1pg7d_1[data-color=secondary][data-variant=solid]{border-color:var(--theme-surface-default);background-color:var(--theme-surface-default)}._button_1pg7d_1[data-color=secondary][data-variant=solid]:hover{border-color:var(--theme-surface-hover);background-color:var(--theme-surface-hover)}._button_1pg7d_1[data-color=secondary][data-variant=solid]:active,._button_1pg7d_1[data-color=secondary][data-variant=outline]:active,._button_1pg7d_1[data-color=secondary][data-variant=dotted]:active,._button_1pg7d_1[data-color=secondary][data-variant=text]:active{border-color:var(--theme-surface-active);background-color:var(--theme-surface-active)}
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
- ._item_1ate4_1{background-color:var(--theme-background-default);position:relative;box-shadow:var(--ds-shadow-xs)}._item_1ate4_1[aria-selected=true]{background-color:var(--theme-background-subtle);outline:2px solid}._link_1ate4_13{display:flex;padding:1rem}._item_1ate4_1[aria-selected=false] ._link_1ate4_13:hover{outline:2px solid;outline-color:var(--global-base-default)}._select_1ate4_23{position:absolute;top:0;right:0;margin:.375rem}
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 s } from "react/jsx-runtime";
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 d } from "./Avatar.js";
6
- import '../../assets/AvatarGroup.css';const k = "_group_1k49o_1", h = "_reset_1k49o_5", f = "_item_1k49o_12", A = "_xs_1k49o_16", U = "_sm_1k49o_32", x = "_md_1k49o_48", y = "_lg_1k49o_64", t = {
7
- group: k,
8
- reset: h,
9
- item: f,
10
- xs: A,
11
- sm: U,
12
- md: x,
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: e = [],
16
- maxItemsCount: l = 4,
15
+ items: l = [],
16
+ maxItemsCount: s = 4,
17
17
  defaultType: _,
18
18
  size: c = "sm",
19
19
  className: m
20
20
  }) => {
21
- const r = p(() => e.slice(0, l), [e, l]);
22
- return (e == null ? void 0 : e.length) === 0 ? /* @__PURE__ */ s("div", { className: t.avatarGroup }) : /* @__PURE__ */ s("ul", { className: n(t.reset, t.group, t[c], m), "data-count": r == null ? void 0 : r.length, children: r.map((o, g) => {
23
- const u = g === l - 1, i = o.customLabel || u ? e.length.toString() : void 0;
24
- return /* @__PURE__ */ s("li", { className: n(t.reset, t.item), children: /* @__PURE__ */ s(
25
- d,
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: o.name,
27
+ name: e.name,
28
28
  customLabel: i,
29
- imageUrl: o.imageUrl,
30
- imageUrlAlt: o.imageUrlAlt,
31
- type: (o == null ? void 0 : o.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
- ) }, o.name);
35
+ ) }, e.name);
36
36
  }) });
37
37
  };
38
38
  export {
@@ -1,6 +1,6 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { c as p } from "../../index-L8X2o7IH.js";
3
- import '../../assets/ButtonBase.css';const b = "_button_1pg7d_1", d = {
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
- ...u
16
- }) => /* @__PURE__ */ i(
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: p(d.button, n),
27
- ...u,
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 p } from "../Menu/MenuItems.js";
7
- import { useRootContext as u } from "../RootProvider/RootProvider.js";
8
- import { ContextMenuBase as s } from "./ContextMenuBase.js";
9
- const I = ({ id: t = "context-menu", placement: e = "right", groups: r = {}, items: n }) => {
10
- const { currentId: m, toggleId: i } = u();
11
- return /* @__PURE__ */ o(s, { placement: e, expanded: m === t, onToggle: () => i(t), children: /* @__PURE__ */ o(p, { groups: r, items: n }) });
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
- I as ContextMenu
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 i, jsx as t } from "react/jsx-runtime";
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 a } from "../Button/IconButton.js";
5
+ import { IconButton as c } from "../Button/IconButton.js";
6
6
  import "../RootProvider/RootProvider.js";
7
- import { DropdownBase as c } from "../Dropdown/DropdownBase.js";
8
- import '../../assets/ContextMenuBase.css';const m = "_toggle_ya7jy_1", l = "_button_ya7jy_5", d = "_icon_ya7jy_14", p = "_dropdown_ya7jy_18", o = {
9
- toggle: m,
10
- button: l,
11
- icon: d,
12
- dropdown: p
13
- }, b = ({
14
- placement: n = "right",
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: r,
17
- children: s
18
- }) => /* @__PURE__ */ i("div", { className: o.toggle, "data-theme": "neutral", children: [
17
+ onToggle: s,
18
+ children: i
19
+ }) => /* @__PURE__ */ a("div", { className: o.toggle, "data-theme": "neutral", children: [
19
20
  /* @__PURE__ */ t(
20
- a,
21
+ c,
21
22
  {
22
23
  className: o.button,
23
- size: "sm",
24
+ size: n,
24
25
  icon: "menu-elipsis-horizontal",
25
26
  iconSize: "md",
26
27
  variant: "text",
27
28
  color: "secondary",
28
- onClick: r
29
+ onClick: s
29
30
  }
30
31
  ),
31
- /* @__PURE__ */ t(c, { className: o.dropdown, placement: n, expanded: e, children: s })
32
+ /* @__PURE__ */ t(m, { className: o.dropdown, placement: r, expanded: e, children: i })
32
33
  ] });
33
34
  export {
34
- b as ContextMenuBase
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?: string;
47
+ additionalInfo?: ReactNode;
48
48
  /** History */
49
49
  history?: DialogHistoryProps;
50
50
  }
@@ -1,64 +1,55 @@
1
- import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
- import { MetaBase as j } from "../Meta/MetaBase.js";
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 v } from "./DialogActivityLog.js";
6
- import { DialogArticleBase as H } from "./DialogArticleBase.js";
7
- import { DialogAttachments as S } from "./DialogAttachments.js";
8
- import { DialogBase as B } from "./DialogBase.js";
9
- import { DialogBodyBase as C } from "./DialogBodyBase.js";
10
- import { DialogContent as E } from "./DialogContent.js";
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 U } from "./DialogActions.js";
15
- import { DialogHistory as b } from "./DialogHistory.js";
16
- import { DialogNav as k } from "./DialogNav.js";
17
- const Z = ({
18
- backButton: e,
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: d,
23
- dueAtLabel: h,
24
- status: A,
25
- title: n,
26
- sender: s,
27
- recipient: u,
28
- summary: x = "Summary.",
29
- body: c,
30
- actions: m = [],
31
- attachments: t,
32
- history: l,
33
- seenBy: o,
34
- activityLog: p,
35
- additionalInfo: a
36
- }) => /* @__PURE__ */ i(B, { children: [
37
- /* @__PURE__ */ r(k, { status: A, dueAt: d, dueAtLabel: h, backButton: e, menu: f }),
38
- /* @__PURE__ */ i(H, { children: [
39
- /* @__PURE__ */ r(
40
- M,
41
- {
42
- title: n,
43
- sender: s,
44
- recipient: u,
45
- seen: (o == null ? void 0 : o.seenByEndUser) ?? !1,
46
- variant: "neutral"
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
- a && /* @__PURE__ */ r(F, { additionalInfo: a }),
59
- l && /* @__PURE__ */ r(b, { ...l })
49
+ p && /* @__PURE__ */ o(F, { additionalInfo: p }),
50
+ t && /* @__PURE__ */ o(k, { ...t })
60
51
  ] })
61
52
  ] });
62
53
  export {
63
- Z as Dialog
54
+ Y as Dialog
64
55
  };
@@ -1,43 +1,80 @@
1
- import { Dialog as e } from "./Dialog.js";
2
- const n = {
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: e,
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
- label: "Fjern",
14
- id: "remove"
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: "1999-05-26",
19
- updatedAtLabel: "26. mai 1999",
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
- }, i = {
62
+ }, o = {
24
63
  args: {
25
- body: `## Body
26
-
27
- Body will be loaded async.
28
-
29
- ### Syntax
30
-
31
- body supporters basic headings from h2 -> h4 + lists.
32
-
33
- - List 1
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
- }, s = {
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
- }, t = {
90
+ }, p = {
54
91
  args: {
55
- action: [
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
- }, o = {
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 31. oktober.",
92
- 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.",
93
- action: [
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
- }, d = {
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
- status: { value: "requires-attention" },
166
- sender: {
167
- name: "Statistisk sentralbyrå",
168
- imageUrl: "https://digdir-proto-proto.vercel.app/_next/static/media/SSB.0ca4474e.png"
169
- },
170
- recipient: {
171
- name: "Bergen Bar"
172
- },
173
- title: "Registrere enkeltmannsforetak",
174
- summary: "Skjema er klar til signering.",
175
- 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.",
176
- action: [
177
- {
178
- label: "Gå til signering"
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
- updatedAt: "2004-01-01 13:34",
186
- updatedBy: {
187
- name: "Eirik Horneland"
173
+ createdBy: {
174
+ type: "person",
175
+ name: "Ola Nordmann"
188
176
  },
189
- summary: "Rapportering ble sendt inn.",
190
- attachments: [
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
- updatedAt: "2004-01-01 13:34",
198
- updatedBy: {
199
- imageUrl: "https://digdir-proto-proto.vercel.app/_next/static/media/SSB.0ca4474e.png",
200
- name: "Statistisk sentralbyrå"
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
- summary: "Du levere bedriftsdata innen 31. oktober.",
203
- attachments: [
204
- {
205
- label: "Vedtak om innlevering av bedriftsdata.pdf"
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
- }, a = {
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
- action: [
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
- }, p = {
227
+ }, c = {
240
228
  args: {
241
- ...a.args,
242
- status: { value: "requires-attention" },
243
- summary: "Skjema er klar til signering.",
244
- action: [
245
- {
246
- label: "Til signering"
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
- createdAt: "2004-01-01 13:34",
256
- createdBy: {
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
- t as Action,
286
- s as Attachments,
287
- i as Body,
288
- a as BrregDraft,
289
- p as BrregSign,
290
- l as Example,
291
- d as HistoryContact,
292
- o as SeenBy,
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,4 +1,5 @@
1
+ import { ReactNode } from 'react';
1
2
  export interface DialogFooterProps {
2
- additionalInfo?: string;
3
+ additionalInfo?: ReactNode;
3
4
  }
4
5
  export declare const DialogFooter: ({ additionalInfo }: DialogFooterProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,14 @@
1
- import { jsx as s, jsxs as n } from "react/jsx-runtime";
2
- import { useState as f, Fragment as o } from "react";
3
- import { DialogListItem as l } from "./DialogListItem.js";
4
- import { DialogStatusEnum as b } from "./DialogStatus.js";
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 u } from "../Meta/MetaItem.js";
7
+ import { MetaItem as i } from "../Meta/MetaItem.js";
8
8
  import "../RootProvider/RootProvider.js";
9
- import { ListBase as d } from "../List/ListBase.js";
10
- const y = (r) => {
11
- switch (r) {
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
- }, i = ["lg", "md", "sm", "xs"];
26
- var g;
27
- const c = (g = Object.keys(b)) == null ? void 0 : g.map((r) => ({
28
- value: r,
29
- label: y(r)
30
- })), T = {
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: l,
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
- status: {
48
- value: "completed"
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
- }, q = {
58
- args: {
59
- selected: !0,
60
- select: {
61
- checked: !0
62
- }
63
- }
64
- }, x = {
65
- args: {
66
- seenByEndUser: !0
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
- }, M = {
86
- args: {
87
- status: {
88
- value: "sent"
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
- }, U = {
92
- args: {
93
- status: {
94
- value: "requires-attention"
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
- }, w = {
98
- args: {
99
- status: {
100
- value: "in-progress"
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
- }, O = {
104
- args: {
105
- status: {
106
- value: "completed"
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
- }, P = {
110
- args: {
111
- grouped: !0
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: e }) => {
144
- h((a) => ({
145
- ...a,
146
- [e]: {
147
- ...a[e],
148
- selected: !a[e].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(d, { children: (p = Object.values(t)) == null ? void 0 : p.map((e) => /* @__PURE__ */ n(o, { children: [
153
- /* @__PURE__ */ s(
154
- l,
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
- ...r,
157
- title: e.title,
158
- onClick: e.selected ? () => m(e) : null,
159
- selected: e.selected,
160
- select: { checked: e == null ? void 0 : e.selected, onChange: () => m(e) }
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__ */ n(u, { children: [
152
+ /* @__PURE__ */ l(i, { children: [
164
153
  "selected:",
165
- e.selected ? "true" : "false"
154
+ n.selected ? "true" : "false"
166
155
  ] })
167
- ] }, e == null ? void 0 : e.id)) });
168
- }, K = (r) => /* @__PURE__ */ s(d, { children: c == null ? void 0 : c.map((t) => /* @__PURE__ */ n(o, { children: [
169
- /* @__PURE__ */ s(l, { ...r, status: t }),
170
- /* @__PURE__ */ s(u, { children: t == null ? void 0 : t.value })
171
- ] }, t == null ? void 0 : t.value)) }), V = (r) => /* @__PURE__ */ s(d, { children: i == null ? void 0 : i.map((t) => /* @__PURE__ */ n(o, { children: [
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
- O as Completed,
177
- E as Draft,
178
- P as GroupedView,
179
- w as InProgress,
180
- R as LongSummary,
181
- F as LongTitle,
182
- U as RequiresAttention,
183
- G as SelectableSelected,
184
- M as Sent,
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 = "_item_1ate4_1", k = "_link_1ate4_13", p = "_select_1ate4_23", t = {
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: k,
6
- select: p
7
- }, b = ({
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
- b as DialogListItemBase
23
+ y as DialogListItemBase
24
24
  };
@@ -1,34 +1,34 @@
1
1
  "use client";
2
- import { jsxs as s, jsx as r } from "react/jsx-runtime";
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 l } from "../Button/Button.js";
6
- import { ContextMenu as c } from "../ContextMenu/ContextMenu.js";
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 f } from "./DialogTouchedBy.js";
10
- import '../../assets/DialogNav.css';const x = "_nav_678a5_1", _ = "_action_678a5_8", m = {
11
- nav: x,
12
- action: _
13
- }, T = ({
14
- backButton: o = {
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: a,
19
- dueAt: i,
18
+ status: i,
19
+ dueAt: a,
20
20
  dueAtLabel: e,
21
- touchedBy: t,
21
+ touchedBy: s,
22
22
  menu: n
23
- }) => /* @__PURE__ */ s("nav", { className: m.nav, children: [
24
- /* @__PURE__ */ r(l, { ...o, variant: "text", color: "secondary", icon: "arrow-left", reverse: !0, children: (o == null ? void 0 : o.label) || "Back" }),
25
- /* @__PURE__ */ s("div", { className: m.action, children: [
26
- i && e && /* @__PURE__ */ r(p, { datetime: i, size: "xs", children: e }),
27
- a && /* @__PURE__ */ r(v, { ...a }),
28
- t && /* @__PURE__ */ r(f, { touchedBy: t }),
29
- n && /* @__PURE__ */ r(c, { ...n })
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
- T as DialogNav
33
+ M as DialogNav
34
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.6.8",
3
+ "version": "0.6.9",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [