@altinn/altinn-components 0.54.2 → 0.54.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.
@@ -1,15 +1,15 @@
1
- import { jsx as e, jsxs as p } from "react/jsx-runtime";
2
- import { Badge as _ } from "../Badge/Badge.js";
1
+ import { jsx as e, jsxs as _ } from "react/jsx-runtime";
2
+ import { Badge as h } from "../Badge/Badge.js";
3
3
  import "../../index-p1eeF8LQ.js";
4
4
  import "react";
5
5
  import "../Button/Button.js";
6
6
  import "../RootProvider/RootProvider.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
- import { ListItemLabel as h } from "../List/ListItemLabel.js";
9
- import { ListItem as L } from "../List/ListItem.js";
10
- import '../../assets/UserListItem.css';const g = "_badges_1csip_1", z = "_label_1csip_11", r = {
11
- badges: g,
12
- label: z
8
+ import { ListItemLabel as L } from "../List/ListItemLabel.js";
9
+ import { ListItem as g } from "../List/ListItem.js";
10
+ import '../../assets/UserListItem.css';const z = "_badges_1csip_1", v = "_label_1csip_11", r = {
11
+ badges: z,
12
+ label: v
13
13
  }, U = ({
14
14
  name: t,
15
15
  type: l,
@@ -18,15 +18,17 @@ import '../../assets/UserListItem.css';const g = "_badges_1csip_1", z = "_label_
18
18
  titleAs: m = "h3",
19
19
  subUnit: b = !1,
20
20
  loading: i = !1,
21
+ deleted: d = !1,
21
22
  ...s
22
23
  }) => {
23
- const d = {
24
+ const n = {
24
25
  name: t,
25
26
  type: l,
26
- isParent: l === "company" && !b
27
- }, n = !i && c ? /* @__PURE__ */ e("div", { className: r.badges, children: c.map((a) => /* @__PURE__ */ e(_, { label: a, color: s.color, children: a }, a)) }) : void 0, f = /* @__PURE__ */ p("div", { className: r.label, "data-size": s.size, children: [
27
+ isParent: l === "company" && !b,
28
+ isDeleted: d
29
+ }, f = !i && c ? /* @__PURE__ */ e("div", { className: r.badges, children: c.map((a) => /* @__PURE__ */ e(h, { label: a, color: s.color, children: a }, a)) }) : void 0, p = /* @__PURE__ */ _("div", { className: r.label, "data-size": s.size, children: [
28
30
  /* @__PURE__ */ e(
29
- h,
31
+ L,
30
32
  {
31
33
  title: { children: t, as: m },
32
34
  description: o,
@@ -34,9 +36,9 @@ import '../../assets/UserListItem.css';const g = "_badges_1csip_1", z = "_label_
34
36
  loading: i
35
37
  }
36
38
  ),
37
- n
39
+ f
38
40
  ] });
39
- return /* @__PURE__ */ e(L, { icon: d, ariaLabel: t, label: f, description: o, loading: i, ...s });
41
+ return /* @__PURE__ */ e(g, { icon: n, ariaLabel: t, label: p, description: o, loading: i, ...s });
40
42
  };
41
43
  export {
42
44
  U as UserListItem
@@ -14,5 +14,7 @@ export interface UserListItemProps extends Pick<ListItemProps, 'size' | 'control
14
14
  titleAs?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span';
15
15
  /** Display as subUnit */
16
16
  subUnit?: boolean;
17
+ /** Display as deleted unit */
18
+ deleted?: boolean;
17
19
  }
18
- export declare const UserListItem: ({ name, type, description, roleNames, titleAs, subUnit, loading, ...props }: UserListItemProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const UserListItem: ({ name, type, description, roleNames, titleAs, subUnit, loading, deleted, ...props }: UserListItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { UserListItemProps } from './UserListItem';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: ({ name, type, description, roleNames, titleAs, subUnit, loading, ...props }: UserListItemProps) => import("react/jsx-runtime").JSX.Element;
4
+ component: ({ name, type, description, roleNames, titleAs, subUnit, loading, deleted, ...props }: UserListItemProps) => import("react/jsx-runtime").JSX.Element;
5
5
  tags: string[];
6
6
  parameters: {};
7
7
  args: {
@@ -18,6 +18,7 @@ declare const meta: {
18
18
  as: "div";
19
19
  interactive: true;
20
20
  subUnit: false;
21
+ deleted: false;
21
22
  titleAs: "h3";
22
23
  border: "none";
23
24
  color: "company";
@@ -97,6 +98,11 @@ declare const meta: {
97
98
  type: "boolean";
98
99
  };
99
100
  };
101
+ deleted: {
102
+ control: {
103
+ type: "boolean";
104
+ };
105
+ };
100
106
  children: {
101
107
  control: false;
102
108
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.54.2",
3
+ "version": "0.54.3",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",