@altinn/altinn-components 0.27.0 → 0.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,113 +1,116 @@
1
- import { jsx as o, jsxs as N } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as g } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "react";
4
- import { Skeleton as C } from "../Skeleton/Skeleton.js";
4
+ import { Skeleton as E } from "../Skeleton/Skeleton.js";
5
5
  import "../RootProvider/RootProvider.js";
6
- import { ListItemLabel as E } from "../List/ListItemLabel.js";
7
- import { ListItemSelect as F } from "../List/ListItemSelect.js";
8
- import { ListItem as g } from "../List/ListItem.js";
9
- import { DialogMetadata as v } from "./DialogMetadata.js";
10
- import { DialogByline as G } from "./DialogByline.js";
11
- import { DialogHeading as J } from "./DialogHeading.js";
6
+ import { ListItemLabel as F } from "../List/ListItemLabel.js";
7
+ import { ListItemSelect as G } from "../List/ListItemSelect.js";
8
+ import { ListItem as v } from "../List/ListItem.js";
9
+ import { DialogMetadata as x } from "./DialogMetadata.js";
10
+ import { DialogByline as J } from "./DialogByline.js";
11
+ import { DialogHeading as K } from "./DialogHeading.js";
12
12
  import "../Search/AutocompleteBase.js";
13
13
  import "../Snackbar/useSnackbar.js";
14
- import '../../assets/DialogListItem.css';const K = "_border_1wzcc_1", O = "_controls_1wzcc_51", P = "_header_1wzcc_57", Q = "_summary_1wzcc_69", R = "_footer_1wzcc_97", U = "_touchedBy_1wzcc_101", W = "_heading_1wzcc_110", X = "_title_1wzcc_116", e = {
15
- border: K,
16
- controls: O,
17
- header: P,
18
- summary: Q,
19
- footer: R,
20
- touchedBy: U,
21
- heading: W,
22
- title: X
23
- }, no = ({
14
+ import '../../assets/DialogListItem.css';const O = "_border_1wzcc_1", P = "_controls_1wzcc_51", Q = "_header_1wzcc_57", R = "_summary_1wzcc_69", U = "_footer_1wzcc_97", W = "_touchedBy_1wzcc_101", X = "_heading_1wzcc_110", Y = "_title_1wzcc_116", e = {
15
+ border: O,
16
+ controls: P,
17
+ header: Q,
18
+ summary: R,
19
+ footer: U,
20
+ touchedBy: W,
21
+ heading: X,
22
+ title: Y
23
+ }, so = ({
24
24
  size: a = "lg",
25
- state: x = "normal",
25
+ state: B = "normal",
26
26
  loading: r,
27
- controls: B,
27
+ controls: u,
28
28
  select: n,
29
29
  selected: m,
30
30
  status: t,
31
31
  sender: s,
32
- recipient: u,
33
- recipientLabel: z = "to",
34
- grouped: D = !1,
32
+ recipient: z,
33
+ recipientLabel: D = "to",
34
+ grouped: I = !1,
35
35
  updatedAt: d,
36
36
  updatedAtLabel: _,
37
37
  archivedAt: h,
38
- archivedAtLabel: I,
38
+ archivedAtLabel: L,
39
39
  trashedAt: p,
40
- trashedAtLabel: L,
41
- badge: S,
42
- dueAt: j,
43
- dueAtLabel: k,
40
+ trashedAtLabel: S,
41
+ badge: j,
42
+ dueAt: k,
43
+ dueAtLabel: H,
44
44
  seen: l = !1,
45
- seenBy: H,
46
- touchedBy: M,
47
- attachmentsCount: T,
45
+ seenBy: M,
46
+ touchedBy: T,
47
+ attachmentsCount: V,
48
48
  title: c,
49
49
  description: f,
50
50
  summary: i,
51
- theme: V = "default",
52
- ...b
51
+ theme: q = "default",
52
+ id: b,
53
+ ...y
53
54
  }) => {
54
- const q = p ? "trashed" : h ? "archived" : x, y = m ? "subtle" : V, w = t == null ? void 0 : t.value;
55
+ const C = p ? "trashed" : h ? "archived" : B, w = m ? "subtle" : q, N = t == null ? void 0 : t.value;
55
56
  return a === "xs" || a === "sm" ? /* @__PURE__ */ o(
56
- g,
57
+ v,
57
58
  {
58
- ...b,
59
+ ...y,
60
+ id: b,
59
61
  size: a,
60
62
  selected: m,
61
- theme: y,
63
+ theme: w,
62
64
  label: /* @__PURE__ */ o(
63
65
  "div",
64
66
  {
65
67
  className: e.border,
66
- "data-variant": w,
68
+ "data-variant": N,
67
69
  "data-size": a,
68
70
  "data-seen": l,
69
71
  "data-loading": r,
70
- children: /* @__PURE__ */ o(E, { loading: r, size: a, title: c, description: i || f })
72
+ children: /* @__PURE__ */ o(F, { loading: r, size: a, title: c, description: i || f })
71
73
  }
72
74
  ),
73
- badge: /* @__PURE__ */ o(v, { loading: r, sender: s, updatedAt: d, updatedAtLabel: _ }),
75
+ badge: /* @__PURE__ */ o(x, { loading: r, sender: s, updatedAt: d, updatedAtLabel: _ }),
74
76
  title: c
75
77
  }
76
78
  ) : /* @__PURE__ */ o(
77
- g,
79
+ v,
78
80
  {
79
- ...b,
81
+ ...y,
82
+ id: b,
80
83
  size: a,
81
84
  selected: m,
82
- theme: y,
83
- controls: /* @__PURE__ */ o("div", { className: e.controls, children: B || n && /* @__PURE__ */ o(F, { ...n, size: "xl" }) }),
85
+ theme: w,
86
+ controls: /* @__PURE__ */ o("div", { className: e.controls, children: u || n && /* @__PURE__ */ o(G, { ...n, size: "xl" }) }),
84
87
  title: c,
85
- label: /* @__PURE__ */ N(
88
+ label: /* @__PURE__ */ g(
86
89
  "div",
87
90
  {
88
91
  className: e.border,
89
- "data-variant": w,
92
+ "data-variant": N,
90
93
  "data-size": a,
91
94
  "data-seen": l,
92
95
  "data-loading": r,
93
96
  children: [
94
- /* @__PURE__ */ N("header", { className: e.header, "data-size": a, children: [
95
- /* @__PURE__ */ o(J, { loading: r, size: a, state: q, badge: S, seen: l, children: c }),
97
+ /* @__PURE__ */ g("header", { className: e.header, "data-size": a, children: [
98
+ /* @__PURE__ */ o(K, { loading: r, size: a, state: C, badge: j, seen: l, children: c }),
96
99
  /* @__PURE__ */ o(
97
- G,
100
+ J,
98
101
  {
99
102
  size: "xs",
100
103
  loading: r,
101
104
  sender: s,
102
- recipient: u,
103
- recipientLabel: z,
104
- grouped: D
105
+ recipient: z,
106
+ recipientLabel: D,
107
+ grouped: I
105
108
  }
106
109
  ),
107
- a === "lg" && i && /* @__PURE__ */ o(C, { loading: r, children: /* @__PURE__ */ o("p", { "data-size": a, className: e.summary, children: i || f }) })
110
+ a === "lg" && i && /* @__PURE__ */ o(E, { loading: r, children: /* @__PURE__ */ o("p", { "data-size": a, className: e.summary, children: i || f }) })
108
111
  ] }),
109
112
  /* @__PURE__ */ o(
110
- v,
113
+ x,
111
114
  {
112
115
  className: e.footer,
113
116
  loading: r,
@@ -115,15 +118,15 @@ import '../../assets/DialogListItem.css';const K = "_border_1wzcc_1", O = "_cont
115
118
  updatedAt: d,
116
119
  updatedAtLabel: _,
117
120
  archivedAt: h,
118
- archivedAtLabel: I,
121
+ archivedAtLabel: L,
119
122
  trashedAt: p,
120
- trashedAtLabel: L,
121
- dueAt: j,
122
- dueAtLabel: k,
123
- attachmentsCount: T,
124
- seenBy: H,
123
+ trashedAtLabel: S,
124
+ dueAt: k,
125
+ dueAtLabel: H,
126
+ attachmentsCount: V,
127
+ seenBy: M,
125
128
  touchedBy: {
126
- touchedBy: M,
129
+ touchedBy: T,
127
130
  className: e.touchedBy
128
131
  }
129
132
  }
@@ -135,5 +138,5 @@ import '../../assets/DialogListItem.css';const K = "_border_1wzcc_1", O = "_cont
135
138
  );
136
139
  };
137
140
  export {
138
- no as DialogListItem
141
+ so as DialogListItem
139
142
  };
@@ -1,7 +1,7 @@
1
- import { jsxs as q, jsx as w } from "react/jsx-runtime";
2
- import { ListItemBase as z } from "./ListItemBase.js";
3
- import { ListItemHeader as A } from "./ListItemHeader.js";
4
- const F = ({
1
+ import { jsxs as w, jsx as z } from "react/jsx-runtime";
2
+ import { ListItemBase as A } from "./ListItemBase.js";
3
+ import { ListItemHeader as C } from "./ListItemHeader.js";
4
+ const G = ({
5
5
  className: p,
6
6
  variant: c = "solid",
7
7
  color: r,
@@ -25,11 +25,12 @@ const F = ({
25
25
  controls: H,
26
26
  children: b,
27
27
  interactive: i,
28
- ...d
28
+ id: d,
29
+ ...k
29
30
  }) => {
30
- const k = typeof t == "function" ? t() : t;
31
- return /* @__PURE__ */ q(
32
- z,
31
+ const q = typeof t == "function" ? t() : t;
32
+ return /* @__PURE__ */ w(
33
+ A,
33
34
  {
34
35
  variant: c,
35
36
  color: r,
@@ -40,9 +41,10 @@ const F = ({
40
41
  title: f,
41
42
  loading: o,
42
43
  interactive: i,
44
+ id: d,
43
45
  children: [
44
- /* @__PURE__ */ w(
45
- A,
46
+ /* @__PURE__ */ z(
47
+ C,
46
48
  {
47
49
  className: p,
48
50
  color: r,
@@ -62,8 +64,8 @@ const F = ({
62
64
  controls: H,
63
65
  titleAs: j,
64
66
  interactive: i,
65
- ...d,
66
- children: k
67
+ ...k,
68
+ children: q
67
69
  }
68
70
  ),
69
71
  s ? b : null
@@ -72,5 +74,5 @@ const F = ({
72
74
  );
73
75
  };
74
76
  export {
75
- F as ListItem
77
+ G as ListItem
76
78
  };
@@ -1,11 +1,11 @@
1
- import { jsx as S } from "react/jsx-runtime";
2
- import { c as q } from "../../index-L8X2o7IH.js";
3
- import '../../assets/ListItemBase.css';const H = "_item_2saqu_1", f = "_interactiveSelected_2saqu_83", x = "_interactiveHidden_2saqu_87", h = "_interactive_2saqu_83", t = {
4
- item: H,
5
- interactiveSelected: f,
6
- interactiveHidden: x,
7
- interactive: h
8
- }, j = ({
1
+ import { jsx as q } from "react/jsx-runtime";
2
+ import { c as H } from "../../index-L8X2o7IH.js";
3
+ import '../../assets/ListItemBase.css';const f = "_item_2saqu_1", x = "_interactiveSelected_2saqu_83", h = "_interactiveHidden_2saqu_87", w = "_interactive_2saqu_83", t = {
4
+ item: f,
5
+ interactiveSelected: x,
6
+ interactiveHidden: h,
7
+ interactive: w
8
+ }, y = ({
9
9
  as: i,
10
10
  interactive: n = !0,
11
11
  size: c,
@@ -17,30 +17,32 @@ import '../../assets/ListItemBase.css';const H = "_item_2saqu_1", f = "_interact
17
17
  selected: d,
18
18
  className: v,
19
19
  onMouseEnter: m,
20
- children: _
20
+ id: _,
21
+ children: l
21
22
  }) => {
22
- const l = i || "li", p = e === "transparent" ? "none" : o, u = q(
23
+ const p = i || "li", u = e === "transparent" ? "none" : o, S = H(
23
24
  t.item,
24
25
  v,
25
26
  n && t.interactive,
26
27
  d && t.interactiveSelected,
27
28
  a && t.interactiveHidden
28
29
  );
29
- return /* @__PURE__ */ S(
30
- l,
30
+ return /* @__PURE__ */ q(
31
+ p,
31
32
  {
32
- className: u,
33
+ className: S,
33
34
  "data-variant": s,
34
35
  "data-color": r,
35
36
  "data-theme": e,
36
37
  "data-size": c,
37
- "data-shadow": p,
38
+ "data-shadow": u,
38
39
  "aria-hidden": a,
39
40
  onMouseEnter: m,
40
- children: _
41
+ id: _,
42
+ children: l
41
43
  }
42
44
  );
43
45
  };
44
46
  export {
45
- j as ListItemBase
47
+ y as ListItemBase
46
48
  };
@@ -71,4 +71,4 @@ export interface DialogListItemProps extends ListItemProps {
71
71
  * summary, sender, and receiver.
72
72
  * to mark the item as checked/unchecked and can visually indicate if it is unread.
73
73
  */
74
- export declare const DialogListItem: ({ size, state, loading, controls, select, selected, status, sender, recipient, recipientLabel, grouped, updatedAt, updatedAtLabel, archivedAt, archivedAtLabel, trashedAt, trashedAtLabel, badge, dueAt, dueAtLabel, seen, seenBy, touchedBy, attachmentsCount, title, description, summary, theme, ...rest }: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
74
+ export declare const DialogListItem: ({ size, state, loading, controls, select, selected, status, sender, recipient, recipientLabel, grouped, updatedAt, updatedAtLabel, archivedAt, archivedAtLabel, trashedAt, trashedAtLabel, badge, dueAt, dueAtLabel, seen, seenBy, touchedBy, attachmentsCount, title, description, summary, theme, id, ...rest }: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -35,4 +35,4 @@ export interface ListItemInputProps extends ListItemProps {
35
35
  /** Child items */
36
36
  items?: ListItemProps[];
37
37
  }
38
- export declare const ListItem: ({ className, variant, color, theme, shadow, loading, collapsible, expanded, size, icon, avatar, avatarGroup, title, titleAs, description, badge, linkIcon, label, select, selected, controls, children, interactive, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
38
+ export declare const ListItem: ({ className, variant, color, theme, shadow, loading, collapsible, expanded, size, icon, avatar, avatarGroup, title, titleAs, description, badge, linkIcon, label, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
2
2
  import { ListItemProps } from '../';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ className, variant, color, theme, shadow, loading, collapsible, expanded, size, icon, avatar, avatarGroup, title, titleAs, description, badge, linkIcon, label, select, selected, controls, children, interactive, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
5
+ component: ({ className, variant, color, theme, shadow, loading, collapsible, expanded, size, icon, avatar, avatarGroup, title, titleAs, description, badge, linkIcon, label, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
6
6
  parameters: {};
7
7
  args: {
8
8
  id: string;
@@ -42,5 +42,7 @@ export interface ListItemBaseProps {
42
42
  onMouseEnter?: HTMLProps<HTMLDivElement>['onMouseEnter'];
43
43
  /** The children elements of the list item. */
44
44
  children?: ReactNode;
45
+ /** Id of list item. */
46
+ id?: string;
45
47
  }
46
- export declare const ListItemBase: ({ as, interactive, size, variant, color, theme, shadow, hidden, selected, className, onMouseEnter, children, }: ListItemBaseProps) => import("react/jsx-runtime").JSX.Element;
48
+ export declare const ListItemBase: ({ as, interactive, size, variant, color, theme, shadow, hidden, selected, className, onMouseEnter, id, children, }: ListItemBaseProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { ListItemProps } from '../';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: ({ className, variant, color, theme, shadow, loading, collapsible, expanded, size, icon, avatar, avatarGroup, title, titleAs, description, badge, linkIcon, label, select, selected, controls, children, interactive, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
4
+ component: ({ className, variant, color, theme, shadow, loading, collapsible, expanded, size, icon, avatar, avatarGroup, title, titleAs, description, badge, linkIcon, label, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
5
5
  parameters: {};
6
6
  args: {
7
7
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.27.0",
3
+ "version": "0.27.1",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",