@altinn/altinn-components 0.13.2 → 0.13.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,5 +1,5 @@
1
1
  "use client";
2
- import { jsxs as l, jsx as r, Fragment as T } from "react/jsx-runtime";
2
+ import { jsxs as m, jsx as r, Fragment as T } from "react/jsx-runtime";
3
3
  import { useState as j, useMemo as A } from "react";
4
4
  import "../../index-L8X2o7IH.js";
5
5
  import "../Icon/SvgIcon.js";
@@ -10,36 +10,36 @@ import { AccountButton as L } from "./AccountButton.js";
10
10
  import { BackButton as H } from "./BackButton.js";
11
11
  import { LogoutButton as I } from "./LogoutButton.js";
12
12
  import "../Snackbar/useSnackbar.js";
13
- import { MenuListItem as m } from "../Menu/MenuBase.js";
13
+ import { MenuListItem as a } from "../Menu/MenuBase.js";
14
14
  import { Menu as h } from "../Menu/Menu.js";
15
- import { GlobalMenuBase as a, GlobalMenuHeader as g, GlobalMenuFooter as W } from "./GlobalMenuBase.js";
16
- const S = ({
15
+ import { GlobalMenuBase as l, GlobalMenuHeader as g, GlobalMenuFooter as W } from "./GlobalMenuBase.js";
16
+ const U = ({
17
17
  accounts: c = [],
18
18
  accountGroups: M = {},
19
19
  accountSearch: k,
20
20
  items: p = [],
21
- groups: s,
21
+ groups: u,
22
22
  changeLabel: b = "Change",
23
23
  backLabel: B = "Back",
24
24
  currentAccount: e,
25
- onSelectAccount: i,
26
- onClose: o,
27
- logoutButton: u
25
+ onSelectAccount: o,
26
+ onClose: i,
27
+ logoutButton: s
28
28
  }) => {
29
29
  const [x, G] = j(!1), n = () => {
30
30
  G((t) => !t);
31
31
  }, v = (t) => {
32
- n(), i == null || i(t);
32
+ n(), i == null || i(), o == null || o(t);
33
33
  }, d = A(() => p.map((t) => ({
34
34
  ...t,
35
35
  onClick: () => {
36
36
  var f;
37
- (f = t.onClick) == null || f.call(t), o == null || o();
37
+ (f = t.onClick) == null || f.call(t), i == null || i();
38
38
  }
39
- })), [p, o]);
40
- return x ? /* @__PURE__ */ l(a, { children: [
39
+ })), [p, i]);
40
+ return x ? /* @__PURE__ */ m(l, { children: [
41
41
  /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(H, { onClick: n, label: B }) }),
42
- /* @__PURE__ */ r(m, { as: "div", role: "separator" }),
42
+ /* @__PURE__ */ r(a, { as: "div", role: "separator" }),
43
43
  /* @__PURE__ */ r(
44
44
  F,
45
45
  {
@@ -50,7 +50,7 @@ const S = ({
50
50
  onSelectAccount: v
51
51
  }
52
52
  )
53
- ] }) : e ? /* @__PURE__ */ l(a, { children: [
53
+ ] }) : e ? /* @__PURE__ */ m(l, { children: [
54
54
  /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(
55
55
  L,
56
56
  {
@@ -60,14 +60,14 @@ const S = ({
60
60
  onClick: n
61
61
  }
62
62
  ) }),
63
- /* @__PURE__ */ r(m, { as: "div", role: "separator" }),
64
- /* @__PURE__ */ r(h, { groups: s, items: d }),
65
- u && /* @__PURE__ */ l(T, { children: [
66
- /* @__PURE__ */ r(m, { as: "div", role: "separator" }),
67
- /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(I, { ...u }) })
63
+ /* @__PURE__ */ r(a, { as: "div", role: "separator" }),
64
+ /* @__PURE__ */ r(h, { groups: u, items: d }),
65
+ s && /* @__PURE__ */ m(T, { children: [
66
+ /* @__PURE__ */ r(a, { as: "div", role: "separator" }),
67
+ /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(I, { ...s }) })
68
68
  ] })
69
- ] }) : /* @__PURE__ */ r(a, { children: /* @__PURE__ */ r(h, { groups: s, items: d }) });
69
+ ] }) : /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(h, { groups: u, items: d }) });
70
70
  };
71
71
  export {
72
- S as GlobalMenu
72
+ U as GlobalMenu
73
73
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",