@altinn/altinn-components 0.25.5 → 0.26.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.
@@ -1 +1 @@
1
- ._avatar_vbrzn_1{flex-grow:0;flex-shrink:0;display:flex;justify-content:center;align-items:center;overflow:hidden;--avatar-font-size-xs: .75rem;--avatar-font-size-sm: .875rem;--avatar-font-size-md: 1.125rem;--avatar-font-size-lg: 1.25rem;--avatar-font-size-xl: 1.5rem}._circle_vbrzn_15{border-radius:50%}._square_vbrzn_19{border-radius:5%}._outline_vbrzn_23{outline:1px solid #ffffff;box-sizing:border-box}._xs_vbrzn_28{font-size:var(--avatar-font-size-xs);width:20px;height:20px}._sm_vbrzn_34{font-size:var(--avatar-font-size-sm);width:24px;height:24px}._md_vbrzn_40{font-size:var(--avatar-font-size-md);width:32px;height:32px}._lg_vbrzn_46{font-size:var(--avatar-font-size-lg);width:36px;height:36px}._xl_vbrzn_52{font-size:var(--avatar-font-size-xl);width:44px;height:44px}._image_vbrzn_58{width:100%;height:100%}
1
+ ._avatar_14nr9_1{flex-grow:0;flex-shrink:0;display:flex;justify-content:center;align-items:center;overflow:hidden;--avatar-font-size-xs: .75rem;--avatar-font-size-sm: .875rem;--avatar-font-size-md: 1.125rem;--avatar-font-size-lg: 1.25rem;--avatar-font-size-xl: 1.5rem}._circle_14nr9_15{border-radius:50%}._square_14nr9_19{border-radius:5%}._outline_14nr9_23{outline:1px solid #ffffff;box-sizing:border-box}._xs_14nr9_28{font-size:var(--avatar-font-size-xs);width:20px;height:20px}._sm_14nr9_34{font-size:var(--avatar-font-size-sm);width:24px;height:24px}._md_14nr9_40{font-size:var(--avatar-font-size-md);width:32px;height:32px}._lg_14nr9_46{font-size:var(--avatar-font-size-lg);width:36px;height:36px}._xl_14nr9_52{font-size:var(--avatar-font-size-xl);width:44px;height:44px}._image_14nr9_58,._avatarSkeleton_14nr9_63{width:100%;height:100%}
@@ -1,53 +1,56 @@
1
1
  "use client";
2
- import { jsx as s } from "react/jsx-runtime";
3
- import { c as f } from "../../index-L8X2o7IH.js";
4
- import { useState as x } from "react";
5
- import { fromStringToColor as h } from "./color.js";
6
- import '../../assets/Avatar.css';const q = "_avatar_vbrzn_1", C = "_circle_vbrzn_15", E = "_square_vbrzn_19", I = "_outline_vbrzn_23", S = "_xs_vbrzn_28", k = "_sm_vbrzn_34", y = "_md_vbrzn_40", A = "_lg_vbrzn_46", N = "_xl_vbrzn_52", j = "_image_vbrzn_58", r = {
7
- avatar: q,
8
- circle: C,
9
- square: E,
10
- outline: I,
11
- xs: S,
12
- sm: k,
13
- md: y,
14
- lg: A,
15
- xl: N,
16
- image: j
17
- }, D = ({
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ import { c as k } from "../../index-L8X2o7IH.js";
4
+ import { useState as h } from "react";
5
+ import { Skeleton as q } from "../Skeleton/Skeleton.js";
6
+ import { fromStringToColor as C } from "./color.js";
7
+ import '../../assets/Avatar.css';const E = "_avatar_14nr9_1", I = "_circle_14nr9_15", N = "_square_14nr9_19", y = "_outline_14nr9_23", A = "_xs_14nr9_28", b = "_sm_14nr9_34", j = "_md_14nr9_40", H = "_lg_14nr9_46", T = "_xl_14nr9_52", w = "_image_14nr9_58", z = "_avatarSkeleton_14nr9_63", r = {
8
+ avatar: E,
9
+ circle: I,
10
+ square: N,
11
+ outline: y,
12
+ xs: A,
13
+ sm: b,
14
+ md: j,
15
+ lg: H,
16
+ xl: T,
17
+ image: w,
18
+ avatarSkeleton: z
19
+ }, K = ({
18
20
  type: n = "person",
19
- size: e = "sm",
20
- name: t = "Avatar",
21
- outline: c = !1,
22
- imageUrl: o,
23
- imageUrlAlt: l,
24
- customLabel: i,
25
- className: _
21
+ size: c = "sm",
22
+ name: a = "Avatar",
23
+ outline: l = !1,
24
+ imageUrl: t,
25
+ imageUrlAlt: i,
26
+ customLabel: _,
27
+ loading: s,
28
+ className: m
26
29
  }) => {
27
- const [m, v] = x(!1), u = n === "person" ? "circle" : "square", g = n === "person" ? "light" : "dark", { backgroundColor: d, foregroundColor: b } = h(t, g), p = (t[0] ?? "").toUpperCase(), a = o && !m, z = a ? void 0 : {
28
- backgroundColor: d,
29
- color: b
30
- };
31
- return /* @__PURE__ */ s(
30
+ const [u, d] = h(!1), g = n === "person" ? "circle" : "square", v = n === "person" ? "light" : "dark", { backgroundColor: p, foregroundColor: f } = C(a, v), x = (a[0] ?? "").toUpperCase(), e = t && !u, S = !s && !e ? {
31
+ backgroundColor: p,
32
+ color: f
33
+ } : void 0;
34
+ return /* @__PURE__ */ o(
32
35
  "div",
33
36
  {
34
- className: f(r.avatar, r[u], r[e], { [r.outline]: c }, _),
35
- style: z,
37
+ className: k(r.avatar, r[g], r[c], { [r.outline]: l }, m),
38
+ style: S,
36
39
  "aria-hidden": !0,
37
- children: a ? /* @__PURE__ */ s(
40
+ children: /* @__PURE__ */ o(q, { loading: s, className: r.avatarSkeleton, variant: "circle", children: e ? /* @__PURE__ */ o(
38
41
  "img",
39
42
  {
40
- src: o,
43
+ src: t,
41
44
  className: r.image,
42
- alt: l || o,
45
+ alt: i || t,
43
46
  onError: () => {
44
- v(!0);
47
+ d(!0);
45
48
  }
46
49
  }
47
- ) : /* @__PURE__ */ s("span", { children: i || p })
50
+ ) : /* @__PURE__ */ o("span", { children: _ || x }) })
48
51
  }
49
52
  );
50
53
  };
51
54
  export {
52
- D as Avatar
55
+ K as Avatar
53
56
  };
@@ -1,17 +1,17 @@
1
1
  import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "react";
4
- import { Badge as l } from "../Badge/Badge.js";
4
+ import { Skeleton as l } from "../Skeleton/Skeleton.js";
5
+ import { Badge as d } from "../Badge/Badge.js";
5
6
  import "../RootProvider/RootProvider.js";
6
- import { Skeleton as d } from "../Skeleton/Skeleton.js";
7
7
  import "../Search/AutocompleteBase.js";
8
8
  import "../Snackbar/useSnackbar.js";
9
9
  import '../../assets/DialogHeading.css';const p = "_heading_rx9gi_1", c = "_title_rx9gi_7", r = {
10
10
  heading: p,
11
11
  title: c
12
12
  }, u = ({ loading: e, size: s = "sm", seen: a = !1, state: o, badge: i, children: m }) => /* @__PURE__ */ n("div", { className: r.heading, children: [
13
- /* @__PURE__ */ t(d, { loading: e, children: /* @__PURE__ */ t("h2", { className: r.title, "data-seen": a, "data-size": s, "data-state": o, children: m }) }),
14
- !e && i && /* @__PURE__ */ t(l, { ...i })
13
+ /* @__PURE__ */ t(l, { loading: e, children: /* @__PURE__ */ t("h2", { className: r.title, "data-seen": a, "data-size": s, "data-state": o, children: m }) }),
14
+ !e && i && /* @__PURE__ */ t(d, { ...i })
15
15
  ] });
16
16
  export {
17
17
  u as DialogHeading
@@ -1,11 +1,11 @@
1
1
  import { jsx as o, jsxs as N } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "react";
4
+ import { Skeleton as C } from "../Skeleton/Skeleton.js";
4
5
  import "../RootProvider/RootProvider.js";
5
- import { ListItemLabel as C } from "../List/ListItemLabel.js";
6
- import { ListItemSelect as E } from "../List/ListItemSelect.js";
6
+ import { ListItemLabel as E } from "../List/ListItemLabel.js";
7
+ import { ListItemSelect as F } from "../List/ListItemSelect.js";
7
8
  import { ListItem as g } from "../List/ListItem.js";
8
- import { Skeleton as F } from "../Skeleton/Skeleton.js";
9
9
  import { DialogMetadata as v } from "./DialogMetadata.js";
10
10
  import { DialogByline as G } from "./DialogByline.js";
11
11
  import { DialogHeading as J } from "./DialogHeading.js";
@@ -67,7 +67,7 @@ import '../../assets/DialogListItem.css';const K = "_border_1wzcc_1", O = "_cont
67
67
  "data-size": a,
68
68
  "data-seen": l,
69
69
  "data-loading": r,
70
- children: /* @__PURE__ */ o(C, { loading: r, size: a, title: c, description: i || f })
70
+ children: /* @__PURE__ */ o(E, { loading: r, size: a, title: c, description: i || f })
71
71
  }
72
72
  ),
73
73
  badge: /* @__PURE__ */ o(v, { loading: r, sender: s, updatedAt: d, updatedAtLabel: _ }),
@@ -80,7 +80,7 @@ import '../../assets/DialogListItem.css';const K = "_border_1wzcc_1", O = "_cont
80
80
  size: a,
81
81
  selected: m,
82
82
  theme: y,
83
- controls: /* @__PURE__ */ o("div", { className: e.controls, children: B || n && /* @__PURE__ */ o(E, { ...n, size: "xl" }) }),
83
+ controls: /* @__PURE__ */ o("div", { className: e.controls, children: B || n && /* @__PURE__ */ o(F, { ...n, size: "xl" }) }),
84
84
  title: c,
85
85
  label: /* @__PURE__ */ N(
86
86
  "div",
@@ -104,7 +104,7 @@ import '../../assets/DialogListItem.css';const K = "_border_1wzcc_1", O = "_cont
104
104
  grouped: D
105
105
  }
106
106
  ),
107
- a === "lg" && i && /* @__PURE__ */ o(F, { loading: r, children: /* @__PURE__ */ o("p", { "data-size": a, className: e.summary, children: i || f }) })
107
+ a === "lg" && i && /* @__PURE__ */ o(C, { loading: r, children: /* @__PURE__ */ o("p", { "data-size": a, className: e.summary, children: i || f }) })
108
108
  ] }),
109
109
  /* @__PURE__ */ o(
110
110
  v,
@@ -1,8 +1,8 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { c as t } from "../../index-L8X2o7IH.js";
3
3
  import "react";
4
- import "../RootProvider/RootProvider.js";
5
4
  import { Skeleton as d } from "../Skeleton/Skeleton.js";
5
+ import "../RootProvider/RootProvider.js";
6
6
  import "../Search/AutocompleteBase.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
8
  import '../../assets/Icon.css';const p = "_icon_ti5cw_1", a = {
@@ -1,31 +1,40 @@
1
1
  "use client";
2
- import { jsx as c, jsxs as d } from "react/jsx-runtime";
3
- import { Icon as B } from "../Icon/Icon.js";
2
+ import { jsx as i, jsxs as d } from "react/jsx-runtime";
3
+ import { Icon as R } from "../Icon/Icon.js";
4
4
  import "../../index-L8X2o7IH.js";
5
- import { forwardRef as m, useRef as R, useEffect as w } from "react";
5
+ import { forwardRef as p, useRef as g, useEffect as w } from "react";
6
+ import { Skeleton as y } from "../Skeleton/Skeleton.js";
6
7
  import "../RootProvider/RootProvider.js";
7
- import { Heading as y } from "../Typography/Heading.js";
8
+ import { Heading as S } from "../Typography/Heading.js";
8
9
  import "../Search/AutocompleteBase.js";
9
10
  import "../Snackbar/useSnackbar.js";
10
11
  import { u as b, c as u } from "../../floating-ui.react-BQwG1HOM.js";
11
- import { S as p } from "../../index-C8BS_2GY.js";
12
- const j = m(function({ asChild: o = !1, variant: r = "default", className: n, ...s }, a) {
13
- const C = o ? p : "div", l = R(null), k = b([l, a]);
12
+ import { S as h } from "../../index-C8BS_2GY.js";
13
+ const j = p(function({ asChild: n = !1, variant: r = "default", className: s, ...c }, t) {
14
+ const l = n ? h : "div", f = g(null), k = b([f, t]);
14
15
  return w(() => {
15
- const e = l.current, f = ({ ctrlKey: x, metaKey: v, target: g }) => {
16
- const t = e == null ? void 0 : e.querySelector(":is(h1,h2,h3,h4,h5,h6) a");
17
- !t || t != null && t.contains(g) || (x || v ? window.open(t.href, "", "noreferrer") : t.click());
16
+ const e = f.current, m = ({ ctrlKey: x, metaKey: v, target: B }) => {
17
+ const o = e == null ? void 0 : e.querySelector(":is(h1,h2,h3,h4,h5,h6) a");
18
+ !o || o != null && o.contains(B) || (x || v ? window.open(o.href, "", "noreferrer") : o.click());
18
19
  };
19
- return e == null || e.addEventListener("click", f), () => e == null ? void 0 : e.removeEventListener("click", f);
20
- }, []), c(C, { className: u("ds-card", n), "data-variant": r, ref: k, ...s });
21
- }), E = m(function({ asChild: o, className: r, ...n }, s) {
22
- return c(o ? p : "div", { className: u("ds-card__block", r), ref: s, ...n });
23
- }), h = Object.assign(j, {
20
+ return e == null || e.addEventListener("click", m), () => e == null ? void 0 : e.removeEventListener("click", m);
21
+ }, []), i(l, { className: u("ds-card", s), "data-variant": r, ref: k, ...c });
22
+ }), E = p(function({ asChild: n, className: r, ...s }, c) {
23
+ return i(n ? h : "div", { className: u("ds-card__block", r), ref: c, ...s });
24
+ }), C = Object.assign(j, {
24
25
  Block: E
25
26
  });
26
- h.Block.displayName = "Card.Block";
27
- function M({ color: i, theme: o = "tinted", icon: r, title: n, children: s }) {
28
- return /* @__PURE__ */ d(h, { "data-color": i, variant: o, children: [
27
+ C.Block.displayName = "Card.Block";
28
+ function $({
29
+ color: a,
30
+ theme: n = "tinted",
31
+ icon: r,
32
+ title: s,
33
+ children: c,
34
+ loading: t,
35
+ className: l
36
+ }) {
37
+ return /* @__PURE__ */ d(C, { "data-color": a, variant: n, className: l, children: [
29
38
  /* @__PURE__ */ d(
30
39
  "header",
31
40
  {
@@ -36,14 +45,14 @@ function M({ color: i, theme: o = "tinted", icon: r, title: n, children: s }) {
36
45
  rowGap: "1rem"
37
46
  },
38
47
  children: [
39
- r && /* @__PURE__ */ c(B, { ...r, size: "xl", theme: "default" }),
40
- /* @__PURE__ */ c(y, { size: "lg", children: n })
48
+ r && /* @__PURE__ */ i(R, { loading: t, ...r, size: "xl", theme: "default" }),
49
+ /* @__PURE__ */ i(S, { size: "lg", loading: t, children: s })
41
50
  ]
42
51
  }
43
52
  ),
44
- s
53
+ /* @__PURE__ */ i(y, { loading: t, children: c })
45
54
  ] });
46
55
  }
47
56
  export {
48
- M as DashboardCard
57
+ $ as DashboardCard
49
58
  };
@@ -3,22 +3,23 @@ import "../../index-L8X2o7IH.js";
3
3
  import "react";
4
4
  import { Avatar as n } from "../Avatar/Avatar.js";
5
5
  import "../RootProvider/RootProvider.js";
6
+ import { Skeleton as c } from "../Skeleton/Skeleton.js";
6
7
  import { Typography as l } from "../Typography/Typography.js";
7
- import { Heading as s } from "../Typography/Heading.js";
8
+ import { Heading as a } from "../Typography/Heading.js";
8
9
  import "../Search/AutocompleteBase.js";
9
10
  import "../Snackbar/useSnackbar.js";
10
- import { Flex as t } from "./Flex.js";
11
- import { Section as a } from "./Section.js";
12
- const y = ({ type: e, name: o, title: d, description: p, children: m }) => /* @__PURE__ */ i(a, { as: "header", theme: "default", padding: "page", spacing: 6, shadow: "xs", bleed: !0, children: [
13
- /* @__PURE__ */ i(t, { direction: "row", align: "center", spacing: 3, children: [
14
- /* @__PURE__ */ r("div", { style: { position: "relative" }, children: /* @__PURE__ */ r(n, { size: "xl", type: e, name: o }) }),
15
- /* @__PURE__ */ i(t, { direction: "col", children: [
16
- /* @__PURE__ */ r(s, { size: "lg", children: d || o }),
17
- /* @__PURE__ */ r(l, { theme: "subtle", size: "xs", children: /* @__PURE__ */ r("p", { children: p || e }) })
11
+ import { Flex as m } from "./Flex.js";
12
+ import { Section as h } from "./Section.js";
13
+ const k = ({ type: o, name: t, title: p, description: s, loading: e, children: d }) => /* @__PURE__ */ i(h, { as: "header", theme: "default", padding: "page", spacing: 6, shadow: "xs", bleed: !0, children: [
14
+ /* @__PURE__ */ i(m, { direction: "row", align: "center", spacing: 3, children: [
15
+ /* @__PURE__ */ r("div", { style: { position: "relative" }, children: /* @__PURE__ */ r(n, { size: "xl", type: o, name: t, loading: e }) }),
16
+ /* @__PURE__ */ i(m, { direction: "col", children: [
17
+ /* @__PURE__ */ r(a, { size: "lg", loading: e, children: p || t }),
18
+ /* @__PURE__ */ r(l, { theme: "subtle", size: "xs", loading: e, children: /* @__PURE__ */ r("p", { children: s || o }) })
18
19
  ] })
19
20
  ] }),
20
- m
21
+ /* @__PURE__ */ r(c, { loading: e, children: d })
21
22
  ] });
22
23
  export {
23
- y as DashboardHeader
24
+ k as DashboardHeader
24
25
  };
@@ -1,41 +1,41 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
- import { useRef as v, createElement as A } from "react";
2
+ import { useRef as I, createElement as k } from "react";
3
3
  import "../../index-L8X2o7IH.js";
4
- import { useMenu as I } from "../../hooks/useMenu.js";
4
+ import { useMenu as l } from "../../hooks/useMenu.js";
5
5
  import "../RootProvider/RootProvider.js";
6
- import { AutocompleteBase as l } from "./AutocompleteBase.js";
7
- import { AutocompleteGroup as x } from "./AutocompleteGroup.js";
6
+ import { AutocompleteBase as y } from "./AutocompleteBase.js";
7
+ import { AutocompleteGroup as E } from "./AutocompleteGroup.js";
8
8
  import { AutocompleteItem as h } from "./AutocompleteItem.js";
9
9
  import "../Snackbar/useSnackbar.js";
10
- import { useEnterKey as k } from "../../hooks/useEnterKey.js";
11
- const C = ({ className: s, items: i, groups: n = {}, expanded: u, onSelect: r }) => {
12
- const p = v(null);
13
- k(() => {
14
- var t;
15
- if (u) {
16
- const e = (t = p.current) == null ? void 0 : t.querySelector('[data-active="true"]');
17
- e == null || e.dispatchEvent(new MouseEvent("click", { bubbles: !0 })), r == null || r();
10
+ import { useEnterKey as x } from "../../hooks/useEnterKey.js";
11
+ const R = ({ className: p, items: n, groups: a = {}, expanded: i, onSelect: r }) => {
12
+ const u = I(null);
13
+ x(() => {
14
+ var e;
15
+ if (i) {
16
+ const t = (e = u.current) == null ? void 0 : e.querySelector('[data-active="true"]');
17
+ t && (t.tagName === "A" && t.hasAttribute("href") ? t.click() : t.dispatchEvent(new MouseEvent("click", { bubbles: !0 }))), r == null || r();
18
18
  }
19
19
  });
20
- const { menu: a, setActiveIndex: c } = I({
21
- items: i,
22
- groups: n,
20
+ const { menu: c, setActiveIndex: f } = l({
21
+ items: n,
22
+ groups: a,
23
23
  groupByKey: "groupId",
24
24
  keyboardEvents: !0
25
25
  });
26
- return /* @__PURE__ */ m(l, { className: s, expanded: u, ref: p, children: a.map((t, e) => /* @__PURE__ */ A(x, { ...t.props, key: e }, /* @__PURE__ */ m("ul", { children: t.items.map((f, d) => {
26
+ return /* @__PURE__ */ m(y, { className: p, expanded: i, ref: u, children: c.map((e, t) => /* @__PURE__ */ k(E, { ...e.props, key: t }, /* @__PURE__ */ m("ul", { children: e.items.map((s, d) => {
27
27
  const {
28
28
  active: b,
29
- menuIndex: y,
30
- props: { groupId: M, onClick: o, ...E }
31
- } = f;
29
+ menuIndex: v,
30
+ props: { groupId: g, onClick: o, ...A }
31
+ } = s;
32
32
  return /* @__PURE__ */ m(
33
33
  h,
34
34
  {
35
35
  as: "button",
36
36
  tabIndex: -1,
37
- onMouseEnter: () => c(y),
38
- ...E,
37
+ onMouseEnter: () => f(v),
38
+ ...A,
39
39
  onClick: () => {
40
40
  o == null || o(), r == null || r();
41
41
  },
@@ -46,5 +46,5 @@ const C = ({ className: s, items: i, groups: n = {}, expanded: u, onSelect: r })
46
46
  }) }))) });
47
47
  };
48
48
  export {
49
- C as Autocomplete
49
+ R as Autocomplete
50
50
  };
@@ -2,9 +2,9 @@ import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import { IconOrAvatar as l } from "../Icon/IconOrAvatar.js";
4
4
  import "react";
5
- import { Byline as d } from "../Byline/Byline.js";
5
+ import { Skeleton as d } from "../Skeleton/Skeleton.js";
6
+ import { Byline as p } from "../Byline/Byline.js";
6
7
  import "../RootProvider/RootProvider.js";
7
- import { Skeleton as p } from "../Skeleton/Skeleton.js";
8
8
  import "../Search/AutocompleteBase.js";
9
9
  import "../Snackbar/useSnackbar.js";
10
10
  import { Flex as _ } from "../Page/Flex.js";
@@ -21,8 +21,8 @@ import '../../assets/TimelineHeader.css';const h = "_header_177gq_1", b = "_side
21
21
  avatar: a,
22
22
  children: c
23
23
  }) => /* @__PURE__ */ m(_, { as: i, className: r.header, color: o, children: [
24
- /* @__PURE__ */ e("aside", { className: r.sidebar, children: /* @__PURE__ */ e(p, { variant: "circle", loading: t, children: /* @__PURE__ */ e(l, { size: "lg", icon: s, iconTheme: n, avatar: a }) }) }),
25
- /* @__PURE__ */ e("div", { className: r.content, children: /* @__PURE__ */ e(d, { loading: t, size: "lg", children: c }) })
24
+ /* @__PURE__ */ e("aside", { className: r.sidebar, children: /* @__PURE__ */ e(d, { variant: "circle", loading: t, children: /* @__PURE__ */ e(l, { size: "lg", icon: s, iconTheme: n, avatar: a }) }) }),
25
+ /* @__PURE__ */ e("div", { className: r.content, children: /* @__PURE__ */ e(p, { loading: t, size: "lg", children: c }) })
26
26
  ] });
27
27
  export {
28
28
  A as TimelineHeader
@@ -1,8 +1,8 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { c as s } from "../../index-L8X2o7IH.js";
3
3
  import "react";
4
- import "../RootProvider/RootProvider.js";
5
4
  import { Skeleton as p } from "../Skeleton/Skeleton.js";
5
+ import "../RootProvider/RootProvider.js";
6
6
  import "../Search/AutocompleteBase.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
8
  import '../../assets/Heading.css';const c = "_heading_1mp1p_1", h = {
@@ -21,8 +21,10 @@ export interface AvatarProps {
21
21
  outline?: boolean;
22
22
  /** Custom label to display inside the avatar. */
23
23
  customLabel?: string;
24
+ /** Whether the avatar is loading. */
25
+ loading?: boolean;
24
26
  }
25
27
  /**
26
28
  * Avatar component to display user or company avatars with various customization options.
27
29
  */
28
- export declare const Avatar: ({ type, size, name, outline, imageUrl, imageUrlAlt, customLabel, className, }: AvatarProps) => ReactElement;
30
+ export declare const Avatar: ({ type, size, name, outline, imageUrl, imageUrlAlt, customLabel, loading, className, }: AvatarProps) => ReactElement;
@@ -1,6 +1,6 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: ({ type, size, name, outline, imageUrl, imageUrlAlt, customLabel, className, }: import('./Avatar').AvatarProps) => React.ReactElement;
3
+ component: ({ type, size, name, outline, imageUrl, imageUrlAlt, customLabel, loading, className, }: import('./Avatar').AvatarProps) => React.ReactElement;
4
4
  parameters: {};
5
5
  args: {};
6
6
  };
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from '@storybook/react';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: ({ type, size, name, outline, imageUrl, imageUrlAlt, customLabel, className, }: import('./Avatar').AvatarProps) => React.ReactElement;
4
+ component: ({ type, size, name, outline, imageUrl, imageUrlAlt, customLabel, loading, className, }: import('./Avatar').AvatarProps) => React.ReactElement;
5
5
  tags: string[];
6
6
  parameters: {
7
7
  layout: string;
@@ -6,5 +6,7 @@ export interface DashboardCardProps {
6
6
  icon?: IconProps;
7
7
  title?: ReactNode;
8
8
  children?: ReactNode;
9
+ className?: string;
10
+ loading?: boolean;
9
11
  }
10
- export declare function DashboardCard({ color, theme, icon, title, children }: DashboardCardProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function DashboardCard({ color, theme, icon, title, children, loading, className, }: DashboardCardProps): import("react/jsx-runtime").JSX.Element;
@@ -6,5 +6,6 @@ export interface DashboardHeaderProps {
6
6
  title?: string;
7
7
  description?: string;
8
8
  children?: ReactNode;
9
+ loading?: boolean;
9
10
  }
10
- export declare const DashboardHeader: ({ type, name, title, description, children }: DashboardHeaderProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const DashboardHeader: ({ type, name, title, description, loading, children }: DashboardHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -34,6 +34,8 @@ declare const meta: {
34
34
  avatar?: import('..').AvatarProps | undefined;
35
35
  avatarGroup?: import('..').AvatarGroupProps | undefined;
36
36
  href?: string | undefined;
37
+ controls?: React.ReactNode;
38
+ selected?: boolean | undefined;
37
39
  ariaLabel?: string | undefined;
38
40
  titleAs?: React.ElementType | undefined;
39
41
  description?: string | undefined;
@@ -41,10 +43,8 @@ declare const meta: {
41
43
  interactive?: boolean | undefined;
42
44
  tabIndex?: number | undefined;
43
45
  shadow?: import('..').ListItemShadow | undefined;
44
- selected?: boolean | undefined;
45
46
  onMouseEnter?: React.MouseEventHandler<HTMLDivElement> | undefined;
46
47
  collapsible?: boolean | undefined;
47
- controls?: React.ReactNode;
48
48
  onClick?: (() => void) | undefined;
49
49
  onKeyPress?: React.KeyboardEventHandler | undefined;
50
50
  describedby?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.25.5",
3
+ "version": "0.26.0",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",