@altinn/altinn-components 0.50.2 → 0.50.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 +1 @@
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
+ ._badges_1csip_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_1csip_11{display:flex;flex-direction:row;align-items:center;gap:.5rem;min-width:0;flex:1;overflow:hidden}._label_1csip_11>span{min-width:0;flex:1;overflow:hidden}._label_1csip_11 span[data-size]{overflow:hidden}._label_1csip_11 span[data-size] span[data-variant=subtle]{display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal}._description_1csip_42{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;min-width:0}
@@ -1,12 +1,12 @@
1
1
  "use client";
2
- import { jsx as s, jsxs as u } from "react/jsx-runtime";
2
+ import { jsx as n, jsxs as u } from "react/jsx-runtime";
3
3
  import { Badge as y } from "../Badge/Badge.js";
4
4
  import "../../index-L8X2o7IH.js";
5
- import m, { forwardRef as h } from "react";
5
+ import m, { forwardRef as v } from "react";
6
6
  import "../RootProvider/RootProvider.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
- import { ListItemLabel as v } from "../List/ListItemLabel.js";
9
- import { ListItem as g } from "../List/ListItem.js";
8
+ import { ListItemLabel as g } from "../List/ListItemLabel.js";
9
+ import { ListItem as h } from "../List/ListItem.js";
10
10
  import { u as _ } from "../../useId-BVFxCjkq.js";
11
11
  import '../../assets/UserListItem.css';var w = function(e, r) {
12
12
  var l = {};
@@ -16,16 +16,16 @@ import '../../assets/UserListItem.css';var w = function(e, r) {
16
16
  r.indexOf(t[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[a]) && (l[t[a]] = e[t[a]]);
17
17
  return l;
18
18
  };
19
- const O = h((e, r) => {
19
+ const O = v((e, r) => {
20
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(
21
+ let i = _();
22
+ return i = l ? t || "title-" + i : void 0, m.createElement(
23
23
  "svg",
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,
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": i }, a),
25
+ l ? m.createElement("title", { id: i }, l) : null,
26
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" })
27
27
  );
28
- }), I = "_badges_hp9nk_1", j = "_label_hp9nk_11", f = {
28
+ }), I = "_badges_1csip_1", j = "_label_1csip_11", f = {
29
29
  badges: I,
30
30
  label: j
31
31
  }, B = ({
@@ -34,37 +34,37 @@ const O = h((e, r) => {
34
34
  description: l,
35
35
  roleNames: t,
36
36
  titleAs: a = "h3",
37
- subUnit: o = !1,
37
+ subUnit: i = !1,
38
38
  loading: c = !1,
39
- ...n
39
+ ...s
40
40
  }) => {
41
- let i;
41
+ let o;
42
42
  switch (r) {
43
43
  case "person":
44
- i = { name: e, type: "person" };
44
+ o = { name: e, type: "person" };
45
45
  break;
46
46
  case "company":
47
- i = { name: e, type: "company", isParent: !o };
47
+ o = { name: e, type: "company", isParent: !i };
48
48
  break;
49
49
  case "system":
50
- i = O;
50
+ o = O;
51
51
  break;
52
52
  default:
53
- i = { name: e, type: "person" };
53
+ o = { name: e, type: "person" };
54
54
  }
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: [
56
- /* @__PURE__ */ s(
57
- v,
55
+ const b = !c && t ? /* @__PURE__ */ n("div", { className: f.badges, children: t.map((d) => /* @__PURE__ */ n(y, { label: d, color: s.color, children: d }, d)) }) : void 0, p = /* @__PURE__ */ u("div", { className: f.label, "data-size": s.size, children: [
56
+ /* @__PURE__ */ n(
57
+ g,
58
58
  {
59
59
  title: { children: e, as: a },
60
60
  description: l,
61
- size: n.size,
61
+ size: s.size,
62
62
  loading: c
63
63
  }
64
64
  ),
65
65
  b
66
66
  ] });
67
- return /* @__PURE__ */ s(g, { icon: i, ariaLabel: e, label: p, description: l, loading: c, ...n });
67
+ return /* @__PURE__ */ n(h, { icon: o, ariaLabel: e, label: p, description: l, loading: c, ...s });
68
68
  };
69
69
  export {
70
70
  B as UserListItem
@@ -115,5 +115,6 @@ export default meta;
115
115
  export declare const Default: (args: UserListItemProps) => import("react/jsx-runtime").JSX.Element;
116
116
  export declare const MultipleRoles: (args: UserListItemProps) => import("react/jsx-runtime").JSX.Element;
117
117
  export declare const WithSubUnits: (args: UserListItemProps) => import("react/jsx-runtime").JSX.Element;
118
+ export declare const WithInheritingParties: (args: UserListItemProps) => import("react/jsx-runtime").JSX.Element;
118
119
  export declare const DifferentHeadingLevelsAndSizes: (args: UserListItemProps) => import("react/jsx-runtime").JSX.Element;
119
120
  export declare const WithControls: (args: UserListItemProps) => 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.50.2",
3
+ "version": "0.50.3",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",