@altinn/altinn-components 0.33.7 → 0.33.8

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,5 +1,5 @@
1
1
  "use client";
2
- import { jsx as s, jsxs as y } from "react/jsx-runtime";
2
+ import { jsx as e, jsxs as y } from "react/jsx-runtime";
3
3
  import { c as C } from "../../index-L8X2o7IH.js";
4
4
  import { useState as S } from "react";
5
5
  import { Skeleton as j } from "../Skeleton/Skeleton.js";
@@ -14,7 +14,7 @@ import '../../assets/Avatar.css';const E = "_avatar_1k073_1", I = "_shape_1k073_
14
14
  size: i,
15
15
  name: o = "Avatar",
16
16
  outline: n = !1,
17
- imageUrl: e,
17
+ imageUrl: t,
18
18
  imageUrlAlt: m,
19
19
  customLabel: p,
20
20
  loading: l,
@@ -23,12 +23,12 @@ import '../../assets/Avatar.css';const E = "_avatar_1k073_1", I = "_shape_1k073_
23
23
  innerContainerStyle: h = {},
24
24
  avatarImageStyle: u = {}
25
25
  }) => {
26
- const [v, _] = S(!1), f = a === "person" ? "circle" : "square", g = a === "person" ? "light" : "dark", { backgroundColor: k, foregroundColor: b } = A(o, g), N = (o[0] ?? "").toUpperCase(), t = e && !v, x = !l && !t ? {
26
+ const [v, _] = S(!1), f = a === "person" ? "circle" : "square", g = a === "person" ? "light" : "dark", { backgroundColor: k, foregroundColor: b } = A(o, g), N = (o[0] ?? "").toUpperCase(), s = t && !v, x = !l && !s ? {
27
27
  ...c,
28
28
  backgroundColor: k,
29
29
  color: b
30
30
  } : c;
31
- return /* @__PURE__ */ s(
31
+ return /* @__PURE__ */ e(
32
32
  "div",
33
33
  {
34
34
  className: C(r.avatar, { [r.outline]: n }, d),
@@ -38,19 +38,19 @@ import '../../assets/Avatar.css';const E = "_avatar_1k073_1", I = "_shape_1k073_
38
38
  "data-outline": n,
39
39
  "aria-hidden": !0,
40
40
  children: /* @__PURE__ */ y(j, { loading: l, className: r.shape, variant: "circle", children: [
41
- /* @__PURE__ */ s("div", { className: r.shape, style: h, children: t && /* @__PURE__ */ s(
41
+ /* @__PURE__ */ e("div", { className: r.shape, style: s ? h : {}, children: s && /* @__PURE__ */ e(
42
42
  "img",
43
43
  {
44
- src: e,
44
+ src: t,
45
45
  className: r.image,
46
- alt: m || e,
46
+ alt: m || t,
47
47
  style: u,
48
48
  onError: () => {
49
49
  _(!0);
50
50
  }
51
51
  }
52
52
  ) }),
53
- !t && /* @__PURE__ */ s("span", { className: r.label, children: p || N })
53
+ !s && /* @__PURE__ */ e("span", { className: r.label, children: p || N })
54
54
  ] })
55
55
  }
56
56
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.33.7",
3
+ "version": "0.33.8",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",