@altinn/altinn-components 0.20.0 → 0.20.2

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
- ._link_1yhch_1[data-size=xl]{padding:1em}._link_1yhch_1[data-size=lg]{padding:.875em}._link_1yhch_1[data-size=md]{padding:.75em}._link_1yhch_1[data-size=sm],._link_1yhch_1[data-size=xs]{padding:.625em}._border_1yhch_22{position:relative;border-left:.25rem solid;border-color:var(--ds-color-surface-active);display:flex;flex-direction:column}._border_1yhch_22[data-seen=true]{border-color:var(--ds-color-neutral-surface-default)}._border_1yhch_22[data-loading=true]{border-color:var(--ds-color-surface-default)}._border_1yhch_22[data-size=xs],._border_1yhch_22[data-size=sm]{width:100%;flex-direction:row;align-items:center;padding-left:.75rem}._border_1yhch_22[data-size=md]{padding-left:.75rem;row-gap:.5rem}._border_1yhch_22[data-size=lg]{padding-left:.875rem;row-gap:.875rem}._border_1yhch_22[data-size=xl]{padding-left:1rem;row-gap:1rem}._select_1yhch_61{position:absolute;top:0;right:0;margin:.375rem}._header_1yhch_68{display:flex;flex-direction:column;row-gap:.25rem}._header_1yhch_68[data-size=xs],._header_1yhch_68[data-size=sm]{display:flex;flex-direction:row}._summary_1yhch_80{font-size:1rem;font-weight:400;line-height:1.25;color:var(--ds-color-text-default);display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;margin:0}._summary_1yhch_80[data-size=xs],._summary_1yhch_80[data-size=sm],._summary_1yhch_80[data-size=md]{font-size:.875rem}._summary_1yhch_80[data-size=lg],._summary_1yhch_80[data-size=xl]{font-size:1rem}._footer_1yhch_108{width:100%}._touchedBy_1yhch_112{position:absolute;right:0;bottom:0;margin:8px}._heading_1yhch_121{padding-right:1.25rem;display:inline-flex;column-gap:.5em}._title_1yhch_127{line-height:1.25;font-weight:600;margin:0}._title_1yhch_127[data-size=xs],._title_1yhch_127[data-size=sm]{font-size:1rem}._title_1yhch_127[data-size=md],._title_1yhch_127[data-size=lg],._title_1yhch_127[data-size=xl]{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}._title_1yhch_127[data-size=md]{font-size:1rem}._title_1yhch_127[data-size=lg],._title_1yhch_127[data-size=xl]{font-size:1.25rem;line-height:1.25}._title_1yhch_127[data-seen=true],._title_1yhch_127[data-state=archived]{font-weight:400}._title_1yhch_127[data-state=trashed]{font-weight:400;text-decoration:line-through}
1
+ ._link_6y5ya_1[data-size=xl]{padding:1em}._link_6y5ya_1[data-size=lg]{padding:.875em}._link_6y5ya_1[data-size=md]{padding:.75em}._link_6y5ya_1[data-size=sm],._link_6y5ya_1[data-size=xs]{padding:.625em}._border_6y5ya_22{position:relative;border-left:.25rem solid;border-color:var(--ds-color-surface-active);display:flex;flex-direction:column}._border_6y5ya_22[data-seen=true]{border-color:var(--ds-color-neutral-surface-default)}._border_6y5ya_22[data-variant=draft]{border-color:var(--ds-color-neutral-surface-active);border-left-width:.125rem;margin-left:.125rem;border-left-style:dashed}._border_6y5ya_22[data-variant=sent]{border-color:var(--ds-color-neutral-surface-default)}._border_6y5ya_22[data-loading=true]{border-color:var(--ds-color-surface-default)}._border_6y5ya_22[data-size=xs],._border_6y5ya_22[data-size=sm]{width:100%;flex-direction:row;align-items:center;padding-left:.75rem}._border_6y5ya_22[data-size=md]{padding-left:.75rem;row-gap:.5rem}._border_6y5ya_22[data-size=lg]{padding-left:.875rem;row-gap:.875rem}._border_6y5ya_22[data-size=xl]{padding-left:1rem;row-gap:1rem}._select_6y5ya_72{position:absolute;top:0;right:0;margin:.375rem}._header_6y5ya_79{display:flex;flex-direction:column;row-gap:.25rem}._header_6y5ya_79[data-size=xs],._header_6y5ya_79[data-size=sm]{display:flex;flex-direction:row}._summary_6y5ya_91{font-size:1rem;font-weight:400;line-height:1.25;color:var(--ds-color-text-default);display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;margin:0}._summary_6y5ya_91[data-size=xs],._summary_6y5ya_91[data-size=sm],._summary_6y5ya_91[data-size=md]{font-size:.875rem}._summary_6y5ya_91[data-size=lg],._summary_6y5ya_91[data-size=xl]{font-size:1rem}._footer_6y5ya_119{width:100%}._touchedBy_6y5ya_123{position:absolute;right:0;bottom:0;margin:8px}._heading_6y5ya_132{padding-right:1.25rem;display:inline-flex;column-gap:.5em}._title_6y5ya_138{line-height:1.25;font-weight:600;margin:0}._title_6y5ya_138[data-size=xs],._title_6y5ya_138[data-size=sm]{font-size:1rem}._title_6y5ya_138[data-size=md],._title_6y5ya_138[data-size=lg],._title_6y5ya_138[data-size=xl]{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}._title_6y5ya_138[data-size=md]{font-size:1rem}._title_6y5ya_138[data-size=lg],._title_6y5ya_138[data-size=xl]{font-size:1.25rem;line-height:1.25}._title_6y5ya_138[data-seen=true],._title_6y5ya_138[data-state=archived]{font-weight:400}._title_6y5ya_138[data-state=trashed]{font-weight:400;text-decoration:line-through}
@@ -1,4 +1,4 @@
1
- import { jsx as t, jsxs as b } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as g } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "react";
4
4
  import "../RootProvider/RootProvider.js";
@@ -9,111 +9,131 @@ import { DialogHeading as F } from "./DialogHeading.js";
9
9
  import "../Search/AutocompleteBase.js";
10
10
  import { ListItemLabel as G } from "../List/ListItemLabel.js";
11
11
  import { ListItemSelect as J } from "../List/ListItemSelect.js";
12
- import { ListItem as N } from "../List/ListItem.js";
12
+ import { ListItem as x } from "../List/ListItem.js";
13
13
  import "../Snackbar/useSnackbar.js";
14
- import '../../assets/DialogListItem.css';const K = "_link_1yhch_1", O = "_border_1yhch_22", P = "_select_1yhch_61", Q = "_header_1yhch_68", R = "_summary_1yhch_80", U = "_footer_1yhch_108", V = "_touchedBy_1yhch_112", W = "_heading_1yhch_121", X = "_title_1yhch_127", a = {
14
+ import '../../assets/DialogListItem.css';const K = "_link_6y5ya_1", O = "_border_6y5ya_22", P = "_select_6y5ya_72", Q = "_header_6y5ya_79", R = "_summary_6y5ya_91", U = "_footer_6y5ya_119", W = "_touchedBy_6y5ya_123", X = "_heading_6y5ya_132", Y = "_title_6y5ya_138", o = {
15
15
  link: K,
16
16
  border: O,
17
17
  select: P,
18
18
  header: Q,
19
19
  summary: R,
20
20
  footer: U,
21
- touchedBy: V,
22
- heading: W,
23
- title: X
24
- }, he = ({
25
- size: e = "lg",
26
- state: x = "normal",
27
- loading: o,
28
- select: s,
29
- selected: c,
30
- status: B,
31
- sender: h,
32
- recipient: g,
21
+ touchedBy: W,
22
+ heading: X,
23
+ title: Y
24
+ }, sa = ({
25
+ size: a = "lg",
26
+ state: B = "normal",
27
+ loading: t,
28
+ select: i,
29
+ selected: l,
30
+ status: r,
31
+ sender: s,
32
+ recipient: v,
33
33
  recipientLabel: k = "to",
34
34
  grouped: D = !1,
35
- updatedAt: l,
36
- updatedAtLabel: i,
37
- archivedAt: d,
35
+ updatedAt: n,
36
+ updatedAtLabel: d,
37
+ archivedAt: y,
38
38
  archivedAtLabel: I,
39
39
  trashedAt: _,
40
40
  trashedAtLabel: L,
41
41
  label: S,
42
42
  dueAt: j,
43
- dueAtLabel: v,
44
- seen: m = !1,
45
- seenBy: H,
46
- touchedBy: M,
47
- attachmentsCount: T,
48
- title: r,
49
- description: n,
50
- summary: y,
43
+ dueAtLabel: H,
44
+ seen: c = !1,
45
+ seenBy: M,
46
+ touchedBy: T,
47
+ attachmentsCount: V,
48
+ title: m,
49
+ description: h,
50
+ summary: p,
51
51
  theme: q = "default",
52
- ...p
52
+ ...f
53
53
  }) => {
54
- const w = _ ? "trashed" : d ? "archived" : x, f = c ? "subtle" : q;
55
- return e === "xs" || e === "sm" || e === "md" ? /* @__PURE__ */ t(
56
- N,
54
+ const w = _ ? "trashed" : y ? "archived" : B, b = l ? "subtle" : q, N = r == null ? void 0 : r.value;
55
+ return a === "xs" || a === "sm" ? /* @__PURE__ */ e(
56
+ x,
57
57
  {
58
- ...p,
59
- size: e,
60
- selected: c,
61
- theme: f,
62
- label: /* @__PURE__ */ t("div", { className: a.border, "data-size": e, "data-seen": m, "data-loading": o, children: /* @__PURE__ */ t(G, { loading: o, size: e, title: r, description: y || n }) }),
63
- badge: /* @__PURE__ */ t(u, { loading: o, sender: h, updatedAt: l, updatedAtLabel: i }),
64
- title: r
58
+ ...f,
59
+ size: a,
60
+ selected: l,
61
+ theme: b,
62
+ label: /* @__PURE__ */ e(
63
+ "div",
64
+ {
65
+ className: o.border,
66
+ "data-variant": N,
67
+ "data-size": a,
68
+ "data-seen": c,
69
+ "data-loading": t,
70
+ children: /* @__PURE__ */ e(G, { loading: t, size: a, title: m, description: p || h })
71
+ }
72
+ ),
73
+ badge: /* @__PURE__ */ e(u, { loading: t, sender: s, updatedAt: n, updatedAtLabel: d }),
74
+ title: m
65
75
  }
66
- ) : /* @__PURE__ */ t(
67
- N,
76
+ ) : /* @__PURE__ */ e(
77
+ x,
68
78
  {
69
- ...p,
70
- size: e,
71
- selected: c,
72
- theme: f,
73
- controls: s && /* @__PURE__ */ t(J, { className: a.select, ...s, size: "xl" }),
74
- title: r,
75
- label: /* @__PURE__ */ b("div", { className: a.border, "data-size": e, "data-seen": m, "data-loading": o, children: [
76
- /* @__PURE__ */ b("header", { className: a.header, "data-size": e, children: [
77
- /* @__PURE__ */ t(F, { loading: o, size: e, state: w, label: S, seen: m, children: r }),
78
- /* @__PURE__ */ t(
79
- C,
80
- {
81
- size: "xs",
82
- loading: o,
83
- sender: h,
84
- recipient: g,
85
- recipientLabel: k,
86
- grouped: D
87
- }
88
- ),
89
- /* @__PURE__ */ t(E, { loading: o, children: /* @__PURE__ */ t("p", { "data-size": e, className: a.summary, children: y || n }) })
90
- ] }),
91
- /* @__PURE__ */ t(
92
- u,
93
- {
94
- className: a.footer,
95
- loading: o,
96
- status: B,
97
- updatedAt: l,
98
- updatedAtLabel: i,
99
- archivedAt: d,
100
- archivedAtLabel: I,
101
- trashedAt: _,
102
- trashedAtLabel: L,
103
- dueAt: j,
104
- dueAtLabel: v,
105
- attachmentsCount: T,
106
- seenBy: H,
107
- touchedBy: {
108
- touchedBy: M,
109
- className: a.touchedBy
110
- }
111
- }
112
- )
113
- ] })
79
+ ...f,
80
+ size: a,
81
+ selected: l,
82
+ theme: b,
83
+ controls: i && /* @__PURE__ */ e(J, { className: o.select, ...i, size: "xl" }),
84
+ title: m,
85
+ label: /* @__PURE__ */ g(
86
+ "div",
87
+ {
88
+ className: o.border,
89
+ "data-variant": N,
90
+ "data-size": a,
91
+ "data-seen": c,
92
+ "data-loading": t,
93
+ children: [
94
+ /* @__PURE__ */ g("header", { className: o.header, "data-size": a, children: [
95
+ /* @__PURE__ */ e(F, { loading: t, size: a, state: w, label: S, seen: c, children: m }),
96
+ /* @__PURE__ */ e(
97
+ C,
98
+ {
99
+ size: "xs",
100
+ loading: t,
101
+ sender: s,
102
+ recipient: v,
103
+ recipientLabel: k,
104
+ grouped: D
105
+ }
106
+ ),
107
+ a === "lg" && /* @__PURE__ */ e(E, { loading: t, children: /* @__PURE__ */ e("p", { "data-size": a, className: o.summary, children: p || h }) })
108
+ ] }),
109
+ /* @__PURE__ */ e(
110
+ u,
111
+ {
112
+ className: o.footer,
113
+ loading: t,
114
+ status: r,
115
+ updatedAt: n,
116
+ updatedAtLabel: d,
117
+ archivedAt: y,
118
+ archivedAtLabel: I,
119
+ trashedAt: _,
120
+ trashedAtLabel: L,
121
+ dueAt: j,
122
+ dueAtLabel: H,
123
+ attachmentsCount: V,
124
+ seenBy: M,
125
+ touchedBy: {
126
+ touchedBy: T,
127
+ className: o.touchedBy
128
+ }
129
+ }
130
+ )
131
+ ]
132
+ }
133
+ )
114
134
  }
115
135
  );
116
136
  };
117
137
  export {
118
- he as DialogListItem
138
+ sa as DialogListItem
119
139
  };
@@ -1,71 +1,77 @@
1
1
  "use client";
2
- import { jsxs as a, jsx as r, Fragment as T } from "react/jsx-runtime";
3
- import { useState as j, useMemo as A } from "react";
2
+ import { jsxs as i, jsx as r, Fragment as f } from "react/jsx-runtime";
3
+ import { useState as F, useMemo as L } from "react";
4
4
  import "../../index-L8X2o7IH.js";
5
5
  import "../RootProvider/RootProvider.js";
6
- import { AccountMenu as F } from "./AccountMenu.js";
7
- import { AccountButton as L } from "./AccountButton.js";
8
- import { BackButton as H } from "./BackButton.js";
9
- import { LogoutButton as I } from "./LogoutButton.js";
6
+ import { AccountMenu as H } from "./AccountMenu.js";
7
+ import { AccountButton as I } from "./AccountButton.js";
8
+ import { BackButton as W } from "./BackButton.js";
9
+ import { LogoutButton as M } from "./LogoutButton.js";
10
10
  import "../Search/AutocompleteBase.js";
11
11
  import "../Snackbar/useSnackbar.js";
12
- import { MenuListItem as m } from "../Menu/MenuBase.js";
13
- import { Menu as h } from "../Menu/Menu.js";
14
- import { GlobalMenuBase as l, GlobalMenuHeader as g, GlobalMenuFooter as W } from "./GlobalMenuBase.js";
12
+ import { MenuListItem as n } from "../Menu/MenuBase.js";
13
+ import { Menu as k } from "../Menu/Menu.js";
14
+ import { GlobalMenuBase as c, GlobalMenuHeader as g, GlobalMenuFooter as b } from "./GlobalMenuBase.js";
15
15
  const S = ({
16
- accounts: c = [],
17
- accountGroups: M = {},
18
- accountSearch: k,
19
- items: p = [],
20
- groups: u,
21
- changeLabel: b = "Change",
16
+ accounts: p = [],
17
+ accountGroups: v = {},
18
+ accountSearch: x,
19
+ items: d = [],
20
+ groups: s,
21
+ changeLabel: G = "Change",
22
22
  backLabel: B = "Back",
23
- currentAccount: i,
24
- onSelectAccount: o,
25
- onClose: e,
26
- logoutButton: s
23
+ currentAccount: m,
24
+ onSelectAccount: l,
25
+ onClose: t,
26
+ logoutButton: a
27
27
  }) => {
28
- const [x, G] = j(!1), n = () => {
29
- G((t) => !t);
30
- }, v = (t) => {
31
- n(), e == null || e(), o == null || o(t);
32
- }, d = A(() => p.map((t) => ({
33
- ...t,
28
+ const [T, j] = F(!1), o = () => {
29
+ j((e) => !e);
30
+ }, A = (e) => {
31
+ o(), t == null || t(), l == null || l(e);
32
+ }, h = L(() => d.map((e) => ({
33
+ ...e,
34
34
  onClick: () => {
35
- var f;
36
- (f = t.onClick) == null || f.call(t), e == null || e();
35
+ var u;
36
+ (u = e.onClick) == null || u.call(e), t == null || t();
37
37
  }
38
- })), [p, e]);
39
- return x ? /* @__PURE__ */ a(l, { children: [
40
- /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(H, { onClick: n, label: B }) }),
41
- /* @__PURE__ */ r(m, { as: "div", role: "separator" }),
38
+ })), [d, t]);
39
+ return T ? /* @__PURE__ */ i(c, { children: [
40
+ /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(W, { onClick: o, label: B }) }),
41
+ /* @__PURE__ */ r(n, { as: "div", role: "separator" }),
42
42
  /* @__PURE__ */ r(
43
- F,
43
+ H,
44
44
  {
45
- currentAccount: i,
46
- accounts: c,
47
- accountGroups: M,
48
- accountSearch: k,
49
- onSelectAccount: v
45
+ currentAccount: m,
46
+ accounts: p,
47
+ accountGroups: v,
48
+ accountSearch: x,
49
+ onSelectAccount: A
50
50
  }
51
51
  )
52
- ] }) : i ? /* @__PURE__ */ a(l, { children: [
52
+ ] }) : m ? /* @__PURE__ */ i(c, { children: [
53
53
  /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(
54
- L,
54
+ I,
55
55
  {
56
- account: i,
57
- linkText: b,
58
- multipleAccounts: c.length > 1,
59
- onClick: n
56
+ account: m,
57
+ linkText: G,
58
+ multipleAccounts: p.length > 1,
59
+ onClick: o
60
60
  }
61
61
  ) }),
62
- /* @__PURE__ */ r(m, { as: "div", role: "separator" }),
63
- /* @__PURE__ */ r(h, { groups: u, items: d, theme: "default" }),
64
- s && /* @__PURE__ */ a(T, { children: [
65
- /* @__PURE__ */ r(m, { as: "div", role: "separator" }),
66
- /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(I, { ...s }) })
62
+ /* @__PURE__ */ r(n, { as: "div", role: "separator" }),
63
+ /* @__PURE__ */ r(k, { groups: s, items: h, theme: "default" }),
64
+ a && /* @__PURE__ */ i(f, { children: [
65
+ /* @__PURE__ */ r(n, { as: "div", role: "separator" }),
66
+ /* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(M, { ...a }) })
67
67
  ] })
68
- ] }) : /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(h, { groups: u, items: d }) });
68
+ ] }) : /* @__PURE__ */ i(c, { children: [
69
+ /* @__PURE__ */ r(k, { groups: s, items: h }),
70
+ a && /* @__PURE__ */ i(f, { children: [
71
+ /* @__PURE__ */ r(n, { as: "div", role: "separator" }),
72
+ /* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(M, { ...a }) })
73
+ ] })
74
+ ] });
69
75
  };
70
76
  export {
71
77
  S as GlobalMenu
@@ -3,9 +3,6 @@ declare const meta: {
3
3
  title: string;
4
4
  component: ({ items, groups, sortGroupBy }: import('./DialogList').DialogListProps) => import("react/jsx-runtime").JSX.Element;
5
5
  tags: string[];
6
- parameters: {
7
- layout: string;
8
- };
9
6
  args: {
10
7
  items: import('./DialogListItem').DialogListItemProps[];
11
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.20.0",
3
+ "version": "0.20.2",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",