@altinn/altinn-components 0.55.2 → 0.55.3

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.
@@ -3,10 +3,10 @@ import "../../index-p1eeF8LQ.js";
3
3
  import "react";
4
4
  import "../Button/Button.js";
5
5
  import "../RootProvider/RootProvider.js";
6
- import { ListItem as h } from "../List/ListItem.js";
6
+ import { ListItem as q } from "../List/ListItem.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
- import { AccountListItemControls as q } from "./AccountListItemControls.js";
9
- const G = ({
8
+ import { AccountListItemControls as w } from "./AccountListItemControls.js";
9
+ const H = ({
10
10
  id: m,
11
11
  type: c,
12
12
  size: s,
@@ -22,15 +22,16 @@ const G = ({
22
22
  favouriteLabel: v,
23
23
  onToggleFavourite: A,
24
24
  contextMenu: j,
25
- children: k,
26
- interactive: C,
25
+ isPreselectedParty: k,
26
+ children: C,
27
+ interactive: M,
27
28
  disabled: r,
28
29
  loading: o,
29
- ...M
30
+ ...h
30
31
  }) => /* @__PURE__ */ i(
31
- h,
32
+ q,
32
33
  {
33
- ...M,
34
+ ...h,
34
35
  loading: o,
35
36
  size: s,
36
37
  icon: e,
@@ -40,13 +41,14 @@ const G = ({
40
41
  selected: t,
41
42
  disabled: r,
42
43
  controls: !o && !r && /* @__PURE__ */ i(
43
- q,
44
+ w,
44
45
  {
45
46
  id: m,
46
47
  type: c,
47
48
  favourite: L,
48
49
  favouriteLabel: v,
49
50
  badge: l,
51
+ isPreselectedParty: k,
50
52
  isCurrentEndUser: f,
51
53
  isDeleted: I,
52
54
  onToggleFavourite: A,
@@ -54,10 +56,10 @@ const G = ({
54
56
  }
55
57
  ),
56
58
  linkIcon: !o && !0,
57
- interactive: C,
58
- children: k
59
+ interactive: M,
60
+ children: C
59
61
  }
60
62
  );
61
63
  export {
62
- G as AccountListItem
64
+ H as AccountListItem
63
65
  };
@@ -1,38 +1,39 @@
1
1
  import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
- import { Badge as a } from "../Badge/Badge.js";
2
+ import { Badge as u } from "../Badge/Badge.js";
3
3
  import "../../index-p1eeF8LQ.js";
4
- import { isValidElement as u } from "react";
5
- import { Button as c } from "../Button/Button.js";
6
- import { ContextMenu as d } from "../ContextMenu/ContextMenu.js";
4
+ import { isValidElement as c } from "react";
5
+ import { Button as d } from "../Button/Button.js";
6
+ import { ContextMenu as v } from "../ContextMenu/ContextMenu.js";
7
7
  import "../RootProvider/RootProvider.js";
8
- import { ListItemControls as v } from "../List/ListItemControls.js";
8
+ import { ListItemControls as x } from "../List/ListItemControls.js";
9
9
  import "../Snackbar/useSnackbar.js";
10
- import { S as x, a as B } from "../../HeartFill-CYSrJ_xK.js";
11
- const A = ({
10
+ import { S as B, a as C } from "../../HeartFill-CYSrJ_xK.js";
11
+ const E = ({
12
12
  id: e,
13
13
  type: i,
14
14
  badge: r,
15
15
  isCurrentEndUser: m = !1,
16
16
  favourite: n = !1,
17
- favouriteLabel: l,
18
- onToggleFavourite: s,
17
+ isPreselectedParty: l = !1,
18
+ favouriteLabel: s,
19
+ onToggleFavourite: f,
19
20
  contextMenu: o,
20
- loading: f
21
- }) => /* @__PURE__ */ p(v, { children: [
22
- r && (r && !f && typeof r == "object" && "label" in r ? /* @__PURE__ */ t(a, { ...r }) : u(r) ? r : null),
23
- !m && i !== "group" && /* @__PURE__ */ t(
24
- c,
21
+ loading: a
22
+ }) => /* @__PURE__ */ p(x, { children: [
23
+ r && (r && !a && typeof r == "object" && "label" in r ? /* @__PURE__ */ t(u, { ...r }) : c(r) ? r : null),
24
+ !m && !l && i !== "group" && /* @__PURE__ */ t(
25
+ d,
25
26
  {
26
27
  size: "xs",
27
28
  variant: "ghost",
28
29
  rounded: !0,
29
- "aria-label": l || "Toggle favourite",
30
- onClick: () => s?.(e),
31
- children: n ? /* @__PURE__ */ t(x, {}) : /* @__PURE__ */ t(B, {})
30
+ "aria-label": s || "Toggle favourite",
31
+ onClick: () => f?.(e),
32
+ children: n ? /* @__PURE__ */ t(B, {}) : /* @__PURE__ */ t(C, {})
32
33
  }
33
34
  ),
34
- o && /* @__PURE__ */ t(d, { ...o })
35
+ o && /* @__PURE__ */ t(v, { ...o })
35
36
  ] });
36
37
  export {
37
- A as AccountListItemControls
38
+ E as AccountListItemControls
38
39
  };
@@ -14,7 +14,8 @@ export interface AccountListItemProps extends ListItemProps, AccountListItemCont
14
14
  isCurrentEndUser?: boolean;
15
15
  isDeleted?: boolean;
16
16
  isParent?: boolean;
17
+ isPreselectedParty?: boolean;
17
18
  contextMenu?: ContextMenuProps;
18
19
  label?: string;
19
20
  }
20
- export declare const AccountListItem: ({ id, type, size, expanded, icon, name, title, description, isCurrentEndUser, isDeleted, badge, favourite, favouriteLabel, onToggleFavourite, contextMenu, children, interactive, disabled, loading, ...item }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const AccountListItem: ({ id, type, size, expanded, icon, name, title, description, isCurrentEndUser, isDeleted, badge, favourite, favouriteLabel, onToggleFavourite, contextMenu, isPreselectedParty, children, interactive, disabled, loading, ...item }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react-vite';
2
2
  import { AccountListItemProps } from '..';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ id, type, size, expanded, icon, name, title, description, isCurrentEndUser, isDeleted, badge, favourite, favouriteLabel, onToggleFavourite, contextMenu, children, interactive, disabled, loading, ...item }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
5
+ component: ({ id, type, size, expanded, icon, name, title, description, isCurrentEndUser, isDeleted, badge, favourite, favouriteLabel, onToggleFavourite, contextMenu, isPreselectedParty, children, interactive, disabled, loading, ...item }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
6
6
  tags: string[];
7
7
  parameters: {};
8
8
  args: {
@@ -26,6 +26,7 @@ declare const meta: {
26
26
  isCurrentEndUser?: boolean | undefined;
27
27
  isDeleted?: boolean | undefined;
28
28
  isParent?: boolean | undefined;
29
+ isPreselectedParty?: boolean | undefined;
29
30
  contextMenu?: import('..').ContextMenuProps | undefined;
30
31
  label?: string | undefined;
31
32
  variant?: import('..').ListItemVariant | undefined;
@@ -7,6 +7,7 @@ export interface AccountListItemControlsProps {
7
7
  isCurrentEndUser?: boolean;
8
8
  isDeleted?: boolean;
9
9
  favourite?: boolean;
10
+ isPreselectedParty?: boolean;
10
11
  favouriteLabel?: string;
11
12
  onToggleFavourite?: (id: string) => void;
12
13
  accountLabel?: string;
@@ -14,4 +15,4 @@ export interface AccountListItemControlsProps {
14
15
  loading?: boolean;
15
16
  badge?: BadgeProps | ReactNode;
16
17
  }
17
- export declare const AccountListItemControls: ({ id, type, badge, isCurrentEndUser, favourite, favouriteLabel, onToggleFavourite, contextMenu, loading, }: AccountListItemControlsProps) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const AccountListItemControls: ({ id, type, badge, isCurrentEndUser, favourite, isPreselectedParty, favouriteLabel, onToggleFavourite, contextMenu, loading, }: AccountListItemControlsProps) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.55.2",
3
+ "version": "0.55.3",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",