@altinn/altinn-components 0.47.5 → 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ ._virtualScrollRef_o3xco_1{height:100vh;overflow-y:auto;overflow-x:hidden;padding:0 .5rem;margin:0 -.5rem}._virtualList_o3xco_9{list-style-type:none;padding:0;margin:0}._virtualListItem_o3xco_15{position:absolute;top:0;left:0;width:100%}._virtualListItem_o3xco_15>*{margin:0}._lastChild_o3xco_26{padding-bottom:1rem}._virtualTitleItem_o3xco_30{position:absolute;top:0;left:0;width:100%;padding-top:1rem;padding-bottom:1rem}._virtualTitleItem_o3xco_30:first-child{padding-top:0}
@@ -1 +1 @@
1
- ._badges_1m5z5_1{display:flex;flex-direction:row;gap:.5rem;flex-wrap:wrap;justify-content:start;margin-bottom:auto;margin-top:calc(var(--dsc-item-my) * .85)}._label_1m5z5_11{display:flex;flex-direction:row;align-items:center;gap:.5rem}._subUnitAvatar_1m5z5_18{position:relative}._subUnitAvatar_1m5z5_18:before{content:"U";position:absolute;bottom:0;right:0;width:1rem;height:1rem;background-color:#fffc;clip-path:polygon(100% 100%,0% 100%,100% 0%);display:flex;align-items:flex-end;justify-content:flex-end;font-size:.5rem;font-weight:700;color:#333;z-index:1;padding-right:.1rem}
1
+ ._badges_hp9nk_1{display:flex;flex-direction:row;gap:.5rem;flex-wrap:wrap;justify-content:start;margin-bottom:auto;margin-top:calc(var(--dsc-item-my) * .85)}._label_hp9nk_11{display:flex;flex-direction:row;align-items:center;gap:.5rem}
@@ -1,32 +1,35 @@
1
1
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
2
- import { Fragment as f, createElement as d } from "react";
2
+ import { Fragment as d, createElement as h } from "react";
3
3
  import "../../index-L8X2o7IH.js";
4
- import { AccountListItem as h } from "./AccountListItem.js";
5
- import { Heading as y } from "../Typography/Heading.js";
4
+ import { AccountListItem as L } from "./AccountListItem.js";
5
+ import { Heading as u } from "../Typography/Heading.js";
6
6
  import { useMenu as x } from "../../hooks/useMenu.js";
7
7
  import "../RootProvider/RootProvider.js";
8
- import { List as L } from "../List/List.js";
8
+ import { List as y } from "../List/List.js";
9
9
  import "../Snackbar/useSnackbar.js";
10
- import { Section as j } from "../Page/Section.js";
11
- const H = ({ items: o, groups: m = {}, sortGroupBy: n }) => {
10
+ import { Section as A } from "../Page/Section.js";
11
+ import { AccountListVirtual as j } from "./AccountListVirtual.js";
12
+ const V = ({ items: m, groups: o = {}, sortGroupBy: n, isVirtualized: c }) => {
13
+ if (c)
14
+ return /* @__PURE__ */ i(j, { items: m, groups: o, sortGroupBy: n });
12
15
  const { menu: e } = x({
13
- items: o,
14
- groups: m,
16
+ items: m,
17
+ groups: o,
15
18
  groupByKey: "groupId",
16
19
  keyboardEvents: !1,
17
20
  sortGroupBy: n
18
21
  });
19
- return /* @__PURE__ */ i(j, { spacing: 6, children: e == null ? void 0 : e.map((t, s) => {
22
+ return /* @__PURE__ */ i(A, { spacing: 6, children: e == null ? void 0 : e.map((t, s) => {
20
23
  const r = t.props || {};
21
- return /* @__PURE__ */ a(f, { children: [
22
- (r == null ? void 0 : r.title) && /* @__PURE__ */ i(y, { size: "lg", children: r.title }),
23
- /* @__PURE__ */ i(L, { children: t == null ? void 0 : t.items.map((c, p) => {
24
- const l = c.props || {};
25
- return /* @__PURE__ */ d(h, { ...l, key: p });
24
+ return /* @__PURE__ */ a(d, { children: [
25
+ (r == null ? void 0 : r.title) && /* @__PURE__ */ i(u, { size: "lg", children: r.title }),
26
+ /* @__PURE__ */ i(y, { children: t == null ? void 0 : t.items.map((p, f) => {
27
+ const l = p.props || {};
28
+ return /* @__PURE__ */ h(L, { ...l, key: f });
26
29
  }) })
27
30
  ] }, s);
28
31
  }) });
29
32
  };
30
33
  export {
31
- H as AccountList
34
+ V as AccountList
32
35
  };
@@ -0,0 +1,96 @@
1
+ "use client";
2
+ import { jsx as l } from "react/jsx-runtime";
3
+ import { u as x } from "../../index-D-VWMqlv.js";
4
+ import { useRef as I, useEffect as h } from "react";
5
+ import "../../index-L8X2o7IH.js";
6
+ import { AccountListItem as v } from "./AccountListItem.js";
7
+ import { useMenu as _ } from "../../hooks/useMenu.js";
8
+ import { Heading as L } from "../Typography/Heading.js";
9
+ import "../RootProvider/RootProvider.js";
10
+ import "../Snackbar/useSnackbar.js";
11
+ import { Section as S } from "../Page/Section.js";
12
+ import '../../assets/AccountListVirtual.css';const $ = "_virtualScrollRef_o3xco_1", C = "_virtualList_o3xco_9", P = "_virtualListItem_o3xco_15", E = "_lastChild_o3xco_26", z = "_virtualTitleItem_o3xco_30", a = {
13
+ virtualScrollRef: $,
14
+ virtualList: C,
15
+ virtualListItem: P,
16
+ lastChild: E,
17
+ virtualTitleItem: z
18
+ }, j = ({ items: p, groups: d = {}, sortGroupBy: f }) => {
19
+ const n = I(null), { menu: y } = _({
20
+ items: p,
21
+ groups: d,
22
+ groupByKey: "groupId",
23
+ keyboardEvents: !1,
24
+ sortGroupBy: f
25
+ }), o = y.flatMap((t) => {
26
+ const e = (t == null ? void 0 : t.props) || {}, { title: i } = e, r = (t == null ? void 0 : t.items) || [];
27
+ return [
28
+ ...i ? [{ type: "title", title: i }] : [],
29
+ ...r.map((s) => ({
30
+ type: "item",
31
+ itemProps: s.props || {}
32
+ }))
33
+ ];
34
+ }), m = x({
35
+ count: o.length,
36
+ gap: 8,
37
+ estimateSize: (t) => {
38
+ var c;
39
+ const e = o[t];
40
+ if (!e) return 44;
41
+ if (e.type === "title") return t === 0 ? 48 : 88;
42
+ const i = o[t + 1], r = e.itemProps;
43
+ return (r == null ? void 0 : r.parentId) && (!i || i.type === "title" || i.type === "item" && !((c = i.itemProps) != null && c.parentId)) ? 96 : 80;
44
+ },
45
+ getScrollElement: () => n.current
46
+ }), u = m.getVirtualItems();
47
+ return h(() => {
48
+ var t, e, i;
49
+ for (const r of u) {
50
+ const s = ((t = n.current) == null ? void 0 : t.querySelector(`[data-index="${r.index}"]`)) ?? ((e = n.current) == null ? void 0 : e.querySelector(`[dataindex="${r.index}"]`)) ?? ((i = n.current) == null ? void 0 : i.querySelector(`[dataIndex="${r.index}"]`));
51
+ s && m.measureElement(s);
52
+ }
53
+ }, [u]), /* @__PURE__ */ l(S, { spacing: 6, children: /* @__PURE__ */ l("div", { ref: n, className: a.virtualScrollRef, children: /* @__PURE__ */ l(
54
+ "ul",
55
+ {
56
+ className: a.virtualList,
57
+ style: {
58
+ position: "relative",
59
+ height: `${m.getTotalSize()}px`
60
+ },
61
+ children: u.map((t) => {
62
+ var i, r;
63
+ const e = o[t.index];
64
+ if (!e) return null;
65
+ if (e.type === "title")
66
+ return /* @__PURE__ */ l(
67
+ "li",
68
+ {
69
+ "data-index": t.index,
70
+ className: a.virtualTitleItem,
71
+ style: { transform: `translateY(${t.start}px)` },
72
+ children: /* @__PURE__ */ l(L, { size: "lg", children: e.title })
73
+ },
74
+ t.key
75
+ );
76
+ if (e.type === "item") {
77
+ const s = o[t.index + 1], c = ((i = e.itemProps) == null ? void 0 : i.parentId) && (!s || s.type === "title" || s.type === "item" && !((r = s.itemProps) != null && r.parentId));
78
+ return /* @__PURE__ */ l(
79
+ "li",
80
+ {
81
+ "data-index": t.index,
82
+ className: `${a.virtualListItem} ${c ? a.lastChild : ""}`,
83
+ style: { transform: `translateY(${t.start}px)` },
84
+ children: /* @__PURE__ */ l(v, { ...e.itemProps, containerAs: "div" })
85
+ },
86
+ t.key
87
+ );
88
+ }
89
+ return null;
90
+ })
91
+ }
92
+ ) }) });
93
+ };
94
+ export {
95
+ j as AccountListVirtual
96
+ };
@@ -1,24 +1,24 @@
1
- import { jsxs as N, jsx as k } from "react/jsx-runtime";
2
- import { c as q } from "../../index-L8X2o7IH.js";
3
- import { ListItemBase as A } from "./ListItemBase.js";
4
- import { ListItemHeader as C } from "./ListItemHeader.js";
5
- import '../../assets/ListItem.css';const D = "_item_1nwey_3", E = {
6
- item: D
7
- }, M = ({
1
+ import { jsxs as k, jsx as q } from "react/jsx-runtime";
2
+ import { c as A } from "../../index-L8X2o7IH.js";
3
+ import { ListItemBase as C } from "./ListItemBase.js";
4
+ import { ListItemHeader as D } from "./ListItemHeader.js";
5
+ import '../../assets/ListItem.css';const E = "_item_1nwey_3", F = {
6
+ item: E
7
+ }, O = ({
8
8
  className: c,
9
- color: s,
9
+ color: m,
10
10
  variant: n = "default",
11
11
  shadow: f = "xs",
12
12
  border: p = "none",
13
13
  loading: e,
14
14
  disabled: o,
15
- collapsible: l,
15
+ collapsible: a,
16
16
  expanded: t,
17
17
  size: r,
18
- icon: u,
19
- label: m,
20
- title: L,
21
- description: a,
18
+ icon: l,
19
+ label: s,
20
+ title: u,
21
+ description: L,
22
22
  badge: x,
23
23
  linkIcon: y = !1,
24
24
  select: I,
@@ -27,15 +27,16 @@ import '../../assets/ListItem.css';const D = "_item_1nwey_3", E = {
27
27
  children: j,
28
28
  interactive: i,
29
29
  id: w,
30
- ...B
30
+ containerAs: B,
31
+ ...H
31
32
  }) => {
32
- const H = typeof m == "function" ? m() : m;
33
- return /* @__PURE__ */ N(
34
- A,
33
+ const N = typeof s == "function" ? s() : s;
34
+ return /* @__PURE__ */ k(
35
+ C,
35
36
  {
36
- className: q(E.item, c),
37
+ className: A(F.item, c),
37
38
  size: r,
38
- color: s,
39
+ color: m,
39
40
  variant: n,
40
41
  shadow: f,
41
42
  border: p,
@@ -45,26 +46,27 @@ import '../../assets/ListItem.css';const D = "_item_1nwey_3", E = {
45
46
  loading: e,
46
47
  interactive: i,
47
48
  id: w,
49
+ as: B,
48
50
  children: [
49
- /* @__PURE__ */ k(
50
- C,
51
+ /* @__PURE__ */ q(
52
+ D,
51
53
  {
52
- color: s,
54
+ color: m,
53
55
  loading: e,
54
56
  linkIcon: y,
55
57
  disabled: o,
56
- collapsible: l,
58
+ collapsible: a,
57
59
  expanded: t,
58
60
  select: I,
59
- title: L,
61
+ title: u,
60
62
  size: r,
61
- description: a,
62
- icon: u,
63
+ description: L,
64
+ icon: l,
63
65
  badge: x,
64
66
  controls: h,
65
67
  interactive: i,
66
- ...B,
67
- children: H
68
+ ...H,
69
+ children: N
68
70
  }
69
71
  ),
70
72
  t ? j : null
@@ -73,5 +75,5 @@ import '../../assets/ListItem.css';const D = "_item_1nwey_3", E = {
73
75
  );
74
76
  };
75
77
  export {
76
- M as ListItem
78
+ O as ListItem
77
79
  };
@@ -1,83 +1,71 @@
1
1
  "use client";
2
- import { jsx as s, jsxs as v } from "react/jsx-runtime";
3
- import { Avatar as y } from "../Avatar/Avatar.js";
2
+ import { jsx as s, jsxs as u } from "react/jsx-runtime";
3
+ import { Badge as y } from "../Badge/Badge.js";
4
4
  import "../../index-L8X2o7IH.js";
5
- import d, { forwardRef as _ } from "react";
6
- import { Badge as g } from "../Badge/Badge.js";
5
+ import m, { forwardRef as h } from "react";
7
6
  import "../RootProvider/RootProvider.js";
8
7
  import "../Snackbar/useSnackbar.js";
9
- import { ListItemLabel as h } from "../List/ListItemLabel.js";
10
- import { ListItem as w } from "../List/ListItem.js";
11
- import { u as O } from "../../useId-BVFxCjkq.js";
12
- import '../../assets/UserListItem.css';var z = function(e, o) {
13
- var a = {};
14
- for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (a[t] = e[t]);
8
+ import { ListItemLabel as v } from "../List/ListItemLabel.js";
9
+ import { ListItem as g } from "../List/ListItem.js";
10
+ import { u as _ } from "../../useId-BVFxCjkq.js";
11
+ import '../../assets/UserListItem.css';var w = function(e, r) {
12
+ var l = {};
13
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && r.indexOf(t) < 0 && (l[t] = e[t]);
15
14
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
16
- for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
17
- o.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (a[t[l]] = e[t[l]]);
18
- return a;
15
+ for (var a = 0, t = Object.getOwnPropertySymbols(e); a < t.length; a++)
16
+ r.indexOf(t[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[a]) && (l[t[a]] = e[t[a]]);
17
+ return l;
19
18
  };
20
- const I = _((e, o) => {
21
- var { title: a, titleId: t } = e, l = z(e, ["title", "titleId"]);
22
- let r = O();
23
- return r = a ? t || "title-" + r : void 0, d.createElement(
19
+ const O = h((e, r) => {
20
+ var { title: l, titleId: t } = e, a = w(e, ["title", "titleId"]);
21
+ let o = _();
22
+ return o = l ? t || "title-" + o : void 0, m.createElement(
24
23
  "svg",
25
- Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: o, "aria-labelledby": r }, l),
26
- a ? d.createElement("title", { id: r }, a) : null,
27
- d.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M11.625 2.35a.75.75 0 0 1 .75 0l7.794 4.5a.75.75 0 0 1 .375.65v9a.75.75 0 0 1-.375.65l-7.779 4.49a.75.75 0 0 1-.39.11h-.006a.76.76 0 0 1-.373-.103L3.83 17.15a.75.75 0 0 1-.375-.65V7.494a.75.75 0 0 1 .382-.648zm-.375 17.351-6.294-3.634V8.799l3.486 2.013a3.751 3.751 0 0 0 2.808 4.863zM15.75 12a3.75 3.75 0 0 1-3 3.675v4.026l6.294-3.634V8.799l-3.486 2.013c.124.373.192.773.192 1.188m-1.79-1.105a2.25 2.25 0 1 1-3.919-.003l.01-.017.01-.016a2.249 2.249 0 0 1 3.9.036m.847-1.382L18.294 7.5 12 3.866 5.706 7.5l3.487 2.013A3.74 3.74 0 0 1 12 8.25a3.74 3.74 0 0 1 2.807 1.263", clipRule: "evenodd" })
24
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: r, "aria-labelledby": o }, a),
25
+ l ? m.createElement("title", { id: o }, l) : null,
26
+ m.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M11.625 2.35a.75.75 0 0 1 .75 0l7.794 4.5a.75.75 0 0 1 .375.65v9a.75.75 0 0 1-.375.65l-7.779 4.49a.75.75 0 0 1-.39.11h-.006a.76.76 0 0 1-.373-.103L3.83 17.15a.75.75 0 0 1-.375-.65V7.494a.75.75 0 0 1 .382-.648zm-.375 17.351-6.294-3.634V8.799l3.486 2.013a3.751 3.751 0 0 0 2.808 4.863zM15.75 12a3.75 3.75 0 0 1-3 3.675v4.026l6.294-3.634V8.799l-3.486 2.013c.124.373.192.773.192 1.188m-1.79-1.105a2.25 2.25 0 1 1-3.919-.003l.01-.017.01-.016a2.249 2.249 0 0 1 3.9.036m.847-1.382L18.294 7.5 12 3.866 5.706 7.5l3.487 2.013A3.74 3.74 0 0 1 12 8.25a3.74 3.74 0 0 1 2.807 1.263", clipRule: "evenodd" })
28
27
  );
29
- }), j = "_badges_1m5z5_1", x = "_label_1m5z5_11", A = "_subUnitAvatar_1m5z5_18", f = {
30
- badges: j,
31
- label: x,
32
- subUnitAvatar: A
33
- }, N = ({
28
+ }), I = "_badges_hp9nk_1", j = "_label_hp9nk_11", f = {
29
+ badges: I,
30
+ label: j
31
+ }, B = ({
34
32
  name: e,
35
- type: o,
36
- description: a,
33
+ type: r,
34
+ description: l,
37
35
  roleNames: t,
38
- titleAs: l = "h3",
39
- subUnit: r = !1,
36
+ titleAs: a = "h3",
37
+ subUnit: o = !1,
40
38
  loading: c = !1,
41
39
  ...n
42
40
  }) => {
43
41
  let i;
44
- switch (o) {
42
+ switch (r) {
45
43
  case "person":
46
44
  i = { name: e, type: "person" };
47
45
  break;
48
46
  case "company":
49
- i = { name: e, type: "company" };
47
+ i = { name: e, type: "company", isParent: !o };
50
48
  break;
51
49
  case "system":
52
- i = I;
50
+ i = O;
53
51
  break;
54
52
  default:
55
53
  i = { name: e, type: "person" };
56
54
  }
57
- const b = r && /* @__PURE__ */ s(y, { name: e, type: "company", className: f.subUnitAvatar }), p = !c && t ? /* @__PURE__ */ s("div", { className: f.badges, children: t.map((m) => /* @__PURE__ */ s(g, { label: m, color: n.color, children: m }, m)) }) : void 0, u = /* @__PURE__ */ v("div", { className: f.label, "data-size": n.size, children: [
55
+ const b = !c && t ? /* @__PURE__ */ s("div", { className: f.badges, children: t.map((d) => /* @__PURE__ */ s(y, { label: d, color: n.color, children: d }, d)) }) : void 0, p = /* @__PURE__ */ u("div", { className: f.label, "data-size": n.size, children: [
58
56
  /* @__PURE__ */ s(
59
- h,
57
+ v,
60
58
  {
61
- title: { children: e, as: l },
62
- description: a,
59
+ title: { children: e, as: a },
60
+ description: l,
63
61
  size: n.size,
64
62
  loading: c
65
63
  }
66
64
  ),
67
- p
65
+ b
68
66
  ] });
69
- return /* @__PURE__ */ s(
70
- w,
71
- {
72
- icon: r ? b : i,
73
- ariaLabel: e,
74
- label: u,
75
- description: a,
76
- loading: c,
77
- ...n
78
- }
79
- );
67
+ return /* @__PURE__ */ s(g, { icon: i, ariaLabel: e, label: p, description: l, loading: c, ...n });
80
68
  };
81
69
  export {
82
- N as UserListItem
70
+ B as UserListItem
83
71
  };
@@ -9,5 +9,6 @@ export interface AccountListProps {
9
9
  sortGroupBy?: (a: [string, AccountListItemProps[]], b: [string, AccountListItemProps[]]) => number;
10
10
  emptyTitle?: string;
11
11
  emptyDescription?: string;
12
+ isVirtualized?: boolean;
12
13
  }
13
- export declare const AccountList: ({ items, groups, sortGroupBy }: AccountListProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const AccountList: ({ items, groups, sortGroupBy, isVirtualized }: AccountListProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@ import { AccountListItemProps, AccountListProps } from '..';
3
3
  import { UseAccountsProps } from '../../../examples';
4
4
  declare const meta: {
5
5
  title: string;
6
- component: ({ items, groups, sortGroupBy }: AccountListProps) => import("react/jsx-runtime").JSX.Element;
6
+ component: ({ items, groups, sortGroupBy, isVirtualized }: AccountListProps) => import("react/jsx-runtime").JSX.Element;
7
7
  tags: string[];
8
8
  parameters: {};
9
9
  args: AccountListProps;
@@ -35,3 +35,4 @@ export declare const CompanyDetails: ({ id, parentId, uniqueId, title, descripti
35
35
  export declare const PersonDetails: ({ id, uniqueId, isCurrentEndUser, address, onModal, ...props }: AccountDetailsProps) => import("react/jsx-runtime").JSX.Element;
36
36
  export declare const UserDetails: ({ id, phone, address, email, onModal, }: AccountDetailsProps) => import("react/jsx-runtime").JSX.Element;
37
37
  export declare const GroupDetails: ({ accountIds }: AccountDetailsProps) => import("react/jsx-runtime").JSX.Element;
38
+ export declare const Virtualized: () => import("react/jsx-runtime").JSX.Element;
@@ -36,6 +36,7 @@ declare const meta: {
36
36
  icon?: import('..').SvgElement | import('..').IconProps | React.ReactNode | import('..').AvatarProps | import('..').AvatarGroupProps;
37
37
  badge?: React.ReactNode | import('..').BadgeProps;
38
38
  linkIcon?: boolean | undefined;
39
+ containerAs?: React.ElementType | undefined;
39
40
  ref?: React.Ref<HTMLElement> | undefined;
40
41
  interactive?: boolean | undefined;
41
42
  as?: React.ElementType | undefined;
@@ -0,0 +1,8 @@
1
+ import { AccountListItemProps } from '..';
2
+ import { AccountListGroupProps } from './AccountList';
3
+ export interface AccountListVirtualProps {
4
+ items: AccountListItemProps[];
5
+ groups?: Record<string, AccountListGroupProps>;
6
+ sortGroupBy?: (a: [string, AccountListItemProps[]], b: [string, AccountListItemProps[]]) => number;
7
+ }
8
+ export declare const AccountListVirtual: ({ items, groups, sortGroupBy }: AccountListVirtualProps) => import("react/jsx-runtime").JSX.Element;
@@ -25,6 +25,8 @@ export interface ListItemProps extends ListItemBaseProps, ListItemHeaderProps {
25
25
  linkIcon?: ListItemHeaderProps['linkIcon'];
26
26
  /** Custom label */
27
27
  label?: ReactNode | (() => ReactElement);
28
+ /** Element type for the container (overrides 'as' for container only) */
29
+ containerAs?: ListItemBaseProps['as'];
28
30
  }
29
31
  export interface ListItemInputProps extends ListItemProps {
30
32
  id: string;
@@ -54,4 +56,4 @@ export interface ListItemInputProps extends ListItemProps {
54
56
  *
55
57
  * @returns {ReactElement} Rendered ListItem component.
56
58
  */
57
- export declare const ListItem: ({ className, color, variant, shadow, border, loading, disabled, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => ReactElement;
59
+ export declare const ListItem: ({ className, color, variant, shadow, border, loading, disabled, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, containerAs, ...rest }: ListItemProps) => ReactElement;
@@ -1,7 +1,7 @@
1
1
  import { ListItemProps } from '../';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: ({ className, color, variant, shadow, border, loading, disabled, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => React.ReactElement;
4
+ component: ({ className, color, variant, shadow, border, loading, disabled, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, containerAs, ...rest }: ListItemProps) => React.ReactElement;
5
5
  parameters: {};
6
6
  args: {
7
7
  id: string;
@@ -46,6 +46,7 @@ declare const meta: {
46
46
  ariaLabel?: string | undefined;
47
47
  interactive?: boolean | undefined;
48
48
  linkIcon?: boolean | undefined;
49
+ containerAs?: React.ElementType | undefined;
49
50
  shadow?: import('..').Shadow | undefined;
50
51
  collapsible?: boolean | undefined;
51
52
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.47.5",
3
+ "version": "0.48.0",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",