@altinn/altinn-components 0.48.1 → 0.48.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
- ._virtualScrollRef_rixtf_1{height:100vh;overflow-y:auto;overflow-x:hidden;padding:0 .5rem;margin:0 -.5rem}._virtualList_rixtf_9{list-style-type:none;padding:0;margin:0}._virtualListItem_rixtf_15{position:absolute;top:0;left:0;width:100%;z-index:1}._virtualListItem_rixtf_15:focus-within,._virtualListItem_rixtf_15:has([data-state=open]){z-index:20}._virtualListItem_rixtf_15>*{margin:0}._lastChild_rixtf_32{padding-bottom:1rem}._virtualTitleItem_rixtf_36{position:absolute;top:0;left:0;width:100%;padding-top:1rem;padding-bottom:1rem}._virtualTitleItem_rixtf_36:first-child{padding-top:0}
1
+ ._virtualScrollRef_188ep_1{height:100vh;overflow-y:auto;overflow-x:hidden;padding:0 .5rem;margin:0 -.5rem}._virtualList_188ep_9{list-style-type:none;padding:0;margin:0}._virtualListItem_188ep_15{position:absolute;top:0;left:0;width:100%}._virtualListItem_188ep_15:focus-within,._virtualListItem_188ep_15:has([data-expanded=true]){z-index:20}._virtualListItem_188ep_15>*{margin:0}._lastChild_188ep_31{padding-bottom:1rem}._virtualTitleItem_188ep_35{position:absolute;top:0;left:0;width:100%;padding-top:1rem;padding-bottom:1rem}._virtualTitleItem_188ep_35:first-child{padding-top:0}
@@ -9,15 +9,15 @@ import { Heading as L } from "../Typography/Heading.js";
9
9
  import "../RootProvider/RootProvider.js";
10
10
  import "../Snackbar/useSnackbar.js";
11
11
  import { Section as S } from "../Page/Section.js";
12
- import '../../assets/AccountListVirtual.css';const $ = "_virtualScrollRef_rixtf_1", C = "_virtualList_rixtf_9", P = "_virtualListItem_rixtf_15", E = "_lastChild_rixtf_32", z = "_virtualTitleItem_rixtf_36", o = {
12
+ import '../../assets/AccountListVirtual.css';const $ = "_virtualScrollRef_188ep_1", C = "_virtualList_188ep_9", P = "_virtualListItem_188ep_15", E = "_lastChild_188ep_31", z = "_virtualTitleItem_188ep_35", o = {
13
13
  virtualScrollRef: $,
14
14
  virtualList: C,
15
15
  virtualListItem: P,
16
16
  lastChild: E,
17
17
  virtualTitleItem: z
18
- }, j = ({ items: p, groups: d = {}, sortGroupBy: f }) => {
18
+ }, j = ({ items: u, groups: d = {}, sortGroupBy: f }) => {
19
19
  const n = I(null), { menu: y } = _({
20
- items: p,
20
+ items: u,
21
21
  groups: d,
22
22
  groupByKey: "groupId",
23
23
  keyboardEvents: !1,
@@ -43,14 +43,14 @@ import '../../assets/AccountListVirtual.css';const $ = "_virtualScrollRef_rixtf_
43
43
  return (r == null ? void 0 : r.parentId) && (!i || i.type === "title" || i.type === "item" && !((c = i.itemProps) != null && c.parentId)) ? 96 : 80;
44
44
  },
45
45
  getScrollElement: () => n.current
46
- }), u = m.getVirtualItems();
46
+ }), p = m.getVirtualItems();
47
47
  return h(() => {
48
48
  var t, e, i;
49
- for (const r of u) {
49
+ for (const r of p) {
50
50
  const s = ((t = n.current) == null ? void 0 : t.querySelector(`[data-index="${r.index}"]`)) ?? ((e = n.current) == null ? void 0 : e.querySelector(`[dataindex="${r.index}"]`)) ?? ((i = n.current) == null ? void 0 : i.querySelector(`[dataIndex="${r.index}"]`));
51
51
  s && m.measureElement(s);
52
52
  }
53
- }, [u]), /* @__PURE__ */ l(S, { spacing: 6, children: /* @__PURE__ */ l("div", { ref: n, className: o.virtualScrollRef, children: /* @__PURE__ */ l(
53
+ }, [p]), /* @__PURE__ */ l(S, { spacing: 6, children: /* @__PURE__ */ l("div", { ref: n, className: o.virtualScrollRef, children: /* @__PURE__ */ l(
54
54
  "ul",
55
55
  {
56
56
  className: o.virtualList,
@@ -58,7 +58,7 @@ import '../../assets/AccountListVirtual.css';const $ = "_virtualScrollRef_rixtf_
58
58
  position: "relative",
59
59
  height: `${m.getTotalSize()}px`
60
60
  },
61
- children: u.map((t) => {
61
+ children: p.map((t) => {
62
62
  var i, r;
63
63
  const e = a[t.index];
64
64
  if (!e) return null;
@@ -1,117 +1,118 @@
1
1
  "use client";
2
- import { jsx as o, jsxs as E } from "react/jsx-runtime";
3
- import { c as S } from "../../index-L8X2o7IH.js";
4
- import s, { forwardRef as y, useState as _, useEffect as b } from "react";
5
- import { AccountMenu as F } from "../Account/AccountMenu.js";
6
- import { Button as k } from "../Button/Button.js";
7
- import { useRootContext as N } from "../RootProvider/RootProvider.js";
2
+ import { jsx as a, jsxs as k } from "react/jsx-runtime";
3
+ import { c as _ } from "../../index-L8X2o7IH.js";
4
+ import s, { forwardRef as w, useState as b, useEffect as y } from "react";
5
+ import { useIsDesktop as F } from "../../hooks/useIsDesktop.js";
6
+ import { AccountMenu as N } from "../Account/AccountMenu.js";
7
+ import { Button as R } from "../Button/Button.js";
8
+ import { useRootContext as A } from "../RootProvider/RootProvider.js";
8
9
  import "../Snackbar/useSnackbar.js";
9
- import { SearchField as R } from "../Forms/SearchField.js";
10
- import { S as A } from "../../Spinner-BDXfwXIh.js";
11
- import { H as M } from "../../Heading-By5DKz2H.js";
12
- import { u as w } from "../../useId-BVFxCjkq.js";
13
- import '../../assets/AccountSelector.css';var P = function(e, l) {
10
+ import { SearchField as M } from "../Forms/SearchField.js";
11
+ import { S as P } from "../../Spinner-BDXfwXIh.js";
12
+ import { H as T } from "../../Heading-By5DKz2H.js";
13
+ import { u as x } from "../../useId-BVFxCjkq.js";
14
+ import '../../assets/AccountSelector.css';var H = function(e, i) {
14
15
  var r = {};
15
- for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && l.indexOf(t) < 0 && (r[t] = e[t]);
16
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && i.indexOf(t) < 0 && (r[t] = e[t]);
16
17
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
17
18
  for (var n = 0, t = Object.getOwnPropertySymbols(e); n < t.length; n++)
18
- l.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (r[t[n]] = e[t[n]]);
19
+ i.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (r[t[n]] = e[t[n]]);
19
20
  return r;
20
21
  };
21
- const T = y((e, l) => {
22
- var { title: r, titleId: t } = e, n = P(e, ["title", "titleId"]);
23
- let i = w();
24
- return i = r ? t || "title-" + i : void 0, s.createElement(
22
+ const V = w((e, i) => {
23
+ var { title: r, titleId: t } = e, n = H(e, ["title", "titleId"]);
24
+ let l = x();
25
+ return l = r ? t || "title-" + l : void 0, s.createElement(
25
26
  "svg",
26
- 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: l, "aria-labelledby": i }, n),
27
- r ? s.createElement("title", { id: i }, r) : null,
27
+ 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: i, "aria-labelledby": l }, n),
28
+ r ? s.createElement("title", { id: l }, r) : null,
28
29
  s.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M3.75 12a8.25 8.25 0 1 1 16.5 0 8.25 8.25 0 0 1-16.5 0M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25m4.03 9.28-3.5 3.5a.75.75 0 0 1-1.06 0l-3.5-3.5a.75.75 0 0 1 .53-1.28h7a.75.75 0 0 1 .53 1.28m-2.34.22h-3.38L12 13.44z", clipRule: "evenodd" })
29
30
  );
30
31
  });
31
- var H = function(e, l) {
32
+ var B = function(e, i) {
32
33
  var r = {};
33
- for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && l.indexOf(t) < 0 && (r[t] = e[t]);
34
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && i.indexOf(t) < 0 && (r[t] = e[t]);
34
35
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
35
36
  for (var n = 0, t = Object.getOwnPropertySymbols(e); n < t.length; n++)
36
- l.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (r[t[n]] = e[t[n]]);
37
+ i.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (r[t[n]] = e[t[n]]);
37
38
  return r;
38
39
  };
39
- const V = y((e, l) => {
40
- var { title: r, titleId: t } = e, n = H(e, ["title", "titleId"]);
41
- let i = w();
42
- return i = r ? t || "title-" + i : void 0, s.createElement(
40
+ const D = w((e, i) => {
41
+ var { title: r, titleId: t } = e, n = B(e, ["title", "titleId"]);
42
+ let l = x();
43
+ return l = r ? t || "title-" + l : void 0, s.createElement(
43
44
  "svg",
44
- 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: l, "aria-labelledby": i }, n),
45
- r ? s.createElement("title", { id: i }, r) : null,
45
+ 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: i, "aria-labelledby": l }, n),
46
+ r ? s.createElement("title", { id: l }, r) : null,
46
47
  s.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M3.75 12a8.25 8.25 0 1 1 16.5 0 8.25 8.25 0 0 1-16.5 0M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25m.53 6.72a.75.75 0 0 0-1.06 0l-3.5 3.5a.75.75 0 0 0 .53 1.28h7a.75.75 0 0 0 .53-1.28zM12 10.56l1.69 1.69h-3.38z", clipRule: "evenodd" })
47
48
  );
48
- }), B = "_accountSelector_1f74n_1", D = "_heading_1f74n_11", K = "_searchSection_1f74n_17", L = "_searchField_1f74n_22", U = "_accountMenu_1f74n_26", W = "_fullScreen_1f74n_34", $ = "_virtualized_1f74n_38", q = "_btnIcon_1f74n_42", G = "_spinner_1f74n_46", c = {
49
- accountSelector: B,
50
- heading: D,
51
- searchSection: K,
52
- searchField: L,
53
- accountMenu: U,
54
- fullScreen: W,
55
- virtualized: $,
56
- btnIcon: q,
57
- spinner: G
58
- }, ae = ({ accountMenu: e, forceOpenFullScreen: l, className: r, loading: t }) => {
59
- const { currentId: n, openId: i, closeAll: f, languageCode: x } = N(), a = n === "accountFullscreen", [m, h] = _(""), [d, p] = _(l);
60
- b(() => {
61
- !l && d && a && f(), p(l);
62
- }, [l]), b(() => {
63
- d === !0 && !a && i("accountFullscreen");
64
- }, [d, a, i]);
65
- const { minimize: O, fullscreen: I, searchText: v, heading: z } = J(x), j = () => {
66
- i(a ? "account" : "accountFullscreen");
67
- }, C = (u) => {
68
- var g;
69
- (g = e.onSelectAccount) == null || g.call(e, u), f(), p(!1);
49
+ }), K = "_accountSelector_1f74n_1", L = "_heading_1f74n_11", U = "_searchSection_1f74n_17", W = "_searchField_1f74n_22", $ = "_accountMenu_1f74n_26", q = "_fullScreen_1f74n_34", G = "_virtualized_1f74n_38", J = "_btnIcon_1f74n_42", Q = "_spinner_1f74n_46", c = {
50
+ accountSelector: K,
51
+ heading: L,
52
+ searchSection: U,
53
+ searchField: W,
54
+ accountMenu: $,
55
+ fullScreen: q,
56
+ virtualized: G,
57
+ btnIcon: J,
58
+ spinner: Q
59
+ }, de = ({ accountMenu: e, forceOpenFullScreen: i, className: r, loading: t }) => {
60
+ const { currentId: n, openId: l, closeAll: m, languageCode: I } = A(), u = F(), o = n === "accountFullscreen", [h, p] = b(""), [d, v] = b(i);
61
+ y(() => {
62
+ !i && d && o && m(), v(i);
63
+ }, [i]), y(() => {
64
+ (d === !0 && !o || !u && n === "account") && l("accountFullscreen");
65
+ }, [d, o, u, n, l]);
66
+ const { minimize: O, fullscreen: z, searchText: g, heading: j } = X(I), C = () => {
67
+ l(o ? "account" : "accountFullscreen");
68
+ }, E = (f) => {
69
+ var S;
70
+ (S = e.onSelectAccount) == null || S.call(e, f), m(), v(!1);
70
71
  };
71
- return t ? /* @__PURE__ */ o(A, { "aria-hidden": !0, "data-color": "neutral", className: c.spinner }) : /* @__PURE__ */ E("div", { className: S(r, c.accountSelector), children: [
72
- a && /* @__PURE__ */ o(M, { "data-size": "md", level: 2, className: c.heading, children: z }),
73
- /* @__PURE__ */ o("div", { className: c.searchSection, children: /* @__PURE__ */ o(
74
- R,
72
+ return t ? /* @__PURE__ */ a(P, { "aria-hidden": !0, "data-color": "neutral", className: c.spinner }) : /* @__PURE__ */ k("div", { className: _(r, c.accountSelector), children: [
73
+ o && /* @__PURE__ */ a(T, { "data-size": "md", level: 2, className: c.heading, children: j }),
74
+ /* @__PURE__ */ a("div", { className: c.searchSection, children: /* @__PURE__ */ a(
75
+ M,
75
76
  {
76
- name: v,
77
- placeholder: v,
78
- value: m,
79
- onChange: (u) => h(u.target.value),
80
- onClear: () => h(""),
77
+ name: g,
78
+ placeholder: g,
79
+ value: h,
80
+ onChange: (f) => p(f.target.value),
81
+ onClear: () => p(""),
81
82
  className: c.searchField
82
83
  }
83
84
  ) }),
84
- /* @__PURE__ */ o(
85
+ /* @__PURE__ */ a(
85
86
  "div",
86
87
  {
87
- className: S(
88
+ className: _(
88
89
  c.accountMenu,
89
- a && c.fullScreen,
90
+ o && c.fullScreen,
90
91
  e.isVirtualized && c.virtualized
91
92
  ),
92
- children: /* @__PURE__ */ o(
93
- F,
93
+ children: /* @__PURE__ */ a(
94
+ N,
94
95
  {
95
96
  ...e,
96
- onSelectAccount: C,
97
+ onSelectAccount: E,
97
98
  keyboardEvents: !1,
98
- search: { hidden: !0, name: "", value: m },
99
- scrollRefStyles: !a && e.isVirtualized ? { maxHeight: "calc(40vh)" } : void 0
99
+ search: { hidden: !0, name: "", value: h },
100
+ scrollRefStyles: !o && e.isVirtualized ? { maxHeight: "calc(40vh)" } : void 0
100
101
  }
101
102
  )
102
103
  }
103
104
  ),
104
- d !== !0 && /* @__PURE__ */ o(
105
- k,
105
+ d !== !0 && u && /* @__PURE__ */ a(
106
+ R,
106
107
  {
107
- icon: a ? /* @__PURE__ */ o(V, { className: c.btnIcon, "aria-hidden": "true" }) : /* @__PURE__ */ o(T, { className: c.btnIcon, "aria-hidden": "true" }),
108
+ icon: o ? /* @__PURE__ */ a(D, { className: c.btnIcon, "aria-hidden": "true" }) : /* @__PURE__ */ a(V, { className: c.btnIcon, "aria-hidden": "true" }),
108
109
  variant: "text",
109
- onClick: j,
110
- children: a ? O : I
110
+ onClick: C,
111
+ children: o ? O : z
111
112
  }
112
113
  )
113
114
  ] });
114
- }, J = (e) => {
115
+ }, X = (e) => {
115
116
  switch (e) {
116
117
  case "nn":
117
118
  return {
@@ -137,5 +138,5 @@ const V = y((e, l) => {
137
138
  }
138
139
  };
139
140
  export {
140
- ae as AccountSelector
141
+ de as AccountSelector
141
142
  };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { jsxs as d, jsx as o } from "react/jsx-runtime";
3
- import { useIsDesktop as O } from "../../hooks/useIsDesktop.js";
4
- import { AccountMenuButton as F } from "../Account/AccountMenuButton.js";
2
+ import { jsxs as p, jsx as o } from "react/jsx-runtime";
3
+ import { useIsDesktop as N } from "../../hooks/useIsDesktop.js";
4
+ import { AccountMenuButton as v } from "../Account/AccountMenuButton.js";
5
5
  import { DropdownBase as y } from "../Dropdown/DropdownBase.js";
6
6
  import { c as h } from "../../index-L8X2o7IH.js";
7
- import { DrawerBase as p } from "../Dropdown/DrawerBase.js";
7
+ import { DrawerBase as t } from "../Dropdown/DrawerBase.js";
8
8
  import "react";
9
9
  import { useRootContext as D } from "../RootProvider/RootProvider.js";
10
10
  import { GlobalHeaderBase as H } from "./GlobalHeaderBase.js";
@@ -16,104 +16,114 @@ import { GlobalSearch as T } from "./GlobalSearch.js";
16
16
  import { GlobalSearchButton as j } from "./GlobalSearchButton.js";
17
17
  import { HeaderGroup as z } from "./HeaderGroup.js";
18
18
  import { HeaderLogo as R } from "./HeaderLogo.js";
19
- import '../../assets/GlobalHeader.css';const q = "_drawer_1r5ak_1", E = "_dropdown_1r5ak_6", J = "_relative_1r5ak_19", t = {
19
+ import '../../assets/GlobalHeader.css';const q = "_drawer_1r5ak_1", E = "_dropdown_1r5ak_6", J = "_relative_1r5ak_19", s = {
20
20
  drawer: q,
21
21
  dropdown: E,
22
22
  relative: J
23
- }, ne = ({
24
- globalMenu: e,
23
+ }, oe = ({
24
+ globalMenu: r,
25
25
  desktopMenu: k,
26
- mobileMenu: _,
27
- globalSearch: i,
26
+ mobileMenu: O,
27
+ globalSearch: d,
28
28
  locale: a,
29
- accountSelector: n,
30
- logo: x = {},
31
- badge: B,
32
- onLoginClick: A
29
+ accountSelector: e,
30
+ logo: _ = {},
31
+ badge: x,
32
+ onLoginClick: B
33
33
  }) => {
34
- var f, l;
35
- const { currentId: r, toggleId: u, openId: C, closeAll: m } = D(), G = () => {
36
- u("search");
37
- }, v = () => {
38
- r === "account" || r === "accountFullscreen" ? m() : C("account");
39
- }, N = () => {
40
- u("menu");
41
- }, c = r === "account" || r === "accountFullscreen" || (n == null ? void 0 : n.forceOpenFullScreen), s = O();
42
- return /* @__PURE__ */ d(H, { currentId: r, openBackdrop: r === "menu", onCloseBackdrop: m, children: [
43
- /* @__PURE__ */ o(R, { ...x, badge: B, className: t.logo }),
44
- /* @__PURE__ */ d(z, { children: [
45
- n && /* @__PURE__ */ o(
46
- F,
34
+ var l, u;
35
+ const { currentId: n, toggleId: c, openId: F, closeAll: m } = D(), A = () => {
36
+ c("search");
37
+ }, C = () => {
38
+ n === "account" || n === "accountFullscreen" ? m() : F("account");
39
+ }, G = () => {
40
+ c("menu");
41
+ }, f = n === "account" || n === "accountFullscreen" || (e == null ? void 0 : e.forceOpenFullScreen), i = N();
42
+ return /* @__PURE__ */ p(H, { currentId: n, openBackdrop: n === "menu", onCloseBackdrop: m, children: [
43
+ /* @__PURE__ */ o(R, { ..._, badge: x, className: s.logo }),
44
+ /* @__PURE__ */ p(z, { children: [
45
+ e && /* @__PURE__ */ o(
46
+ v,
47
47
  {
48
- currentAccount: (f = n.accountMenu) == null ? void 0 : f.currentAccount,
49
- minimized: !s,
50
- onClick: (l = n.accountMenu) != null && l.currentAccount ? v : A,
51
- expanded: c,
52
- loading: n.loading
48
+ currentAccount: (l = e.accountMenu) == null ? void 0 : l.currentAccount,
49
+ minimized: !i,
50
+ onClick: (u = e.accountMenu) != null && u.currentAccount ? C : B,
51
+ expanded: f,
52
+ loading: e.loading,
53
+ disabled: e.forceOpenFullScreen
53
54
  }
54
55
  ),
55
- i && /* @__PURE__ */ o(j, { onClick: G, expanded: r === "search" }),
56
- /* @__PURE__ */ d("div", { className: t.relative, children: [
57
- /* @__PURE__ */ o(I, { onClick: N, expanded: r === "menu", label: e == null ? void 0 : e.menuLabel }),
58
- e && /* @__PURE__ */ o(
56
+ d && /* @__PURE__ */ o(
57
+ j,
58
+ {
59
+ onClick: A,
60
+ expanded: n === "search",
61
+ disabled: e == null ? void 0 : e.forceOpenFullScreen
62
+ }
63
+ ),
64
+ /* @__PURE__ */ p("div", { className: s.relative, children: [
65
+ /* @__PURE__ */ o(
66
+ I,
67
+ {
68
+ onClick: G,
69
+ expanded: n === "menu",
70
+ disabled: e == null ? void 0 : e.forceOpenFullScreen,
71
+ label: r == null ? void 0 : r.menuLabel
72
+ }
73
+ ),
74
+ r && /* @__PURE__ */ o(
59
75
  y,
60
76
  {
61
77
  layout: "desktop",
62
78
  padding: !0,
63
79
  size: "lg",
64
80
  placement: "right",
65
- open: r === "menu",
66
- className: t.dropdown,
81
+ open: n === "menu",
82
+ className: s.dropdown,
67
83
  children: /* @__PURE__ */ o(
68
84
  w,
69
85
  {
70
- ...e,
71
- menu: k || (e == null ? void 0 : e.menu),
86
+ ...r,
87
+ menu: k || (r == null ? void 0 : r.menu),
72
88
  onClose: m,
73
89
  localeSwitcher: a,
74
- isOpen: r === "menu"
90
+ isOpen: n === "menu"
75
91
  }
76
92
  )
77
93
  }
78
94
  )
79
95
  ] })
80
96
  ] }),
81
- e && /* @__PURE__ */ o(p, { open: r === "menu", className: t.drawer, children: /* @__PURE__ */ o(
97
+ r && /* @__PURE__ */ o(t, { open: n === "menu", className: s.drawer, children: /* @__PURE__ */ o(
82
98
  w,
83
99
  {
84
- ...e,
85
- menu: _ || (e == null ? void 0 : e.menu),
100
+ ...r,
101
+ menu: O || (r == null ? void 0 : r.menu),
86
102
  onClose: m,
87
103
  localeSwitcher: a,
88
- isOpen: r === "menu"
104
+ isOpen: n === "menu"
89
105
  }
90
106
  ) }),
91
- n && /* @__PURE__ */ o(
92
- p,
107
+ e && /* @__PURE__ */ o(
108
+ t,
93
109
  {
94
- open: c,
95
- className: h(t.drawer),
96
- dataLayout: s ? "desktop" : "mobile",
97
- children: /* @__PURE__ */ o(
98
- L,
99
- {
100
- ...n,
101
- forceOpenFullScreen: n.forceOpenFullScreen || !s ? c : void 0
102
- }
103
- )
110
+ open: f,
111
+ className: h(s.drawer),
112
+ dataLayout: i ? "desktop" : "mobile",
113
+ children: /* @__PURE__ */ o(L, { ...e, forceOpenFullScreen: e.forceOpenFullScreen })
104
114
  }
105
115
  ),
106
- i && /* @__PURE__ */ o(
107
- p,
116
+ d && /* @__PURE__ */ o(
117
+ t,
108
118
  {
109
- open: r === "search",
110
- className: h(t.drawer),
111
- dataLayout: s ? "desktop" : "mobile",
112
- children: /* @__PURE__ */ o(T, { ...i })
119
+ open: n === "search",
120
+ className: h(s.drawer),
121
+ dataLayout: i ? "desktop" : "mobile",
122
+ children: /* @__PURE__ */ o(T, { ...d })
113
123
  }
114
124
  )
115
125
  ] });
116
126
  };
117
127
  export {
118
- ne as GlobalHeader
128
+ oe as GlobalHeader
119
129
  };
@@ -1,35 +1,33 @@
1
1
  "use client";
2
- import { jsxs as c, jsx as s } from "react/jsx-runtime";
2
+ import { jsxs as i, jsx as s } from "react/jsx-runtime";
3
3
  import "../../index-L8X2o7IH.js";
4
4
  import "react";
5
- import { useIsDesktop as i } from "../../hooks/useIsDesktop.js";
6
- import { useRootContext as l } from "../RootProvider/RootProvider.js";
7
- import { s as u } from "../../globalSearch.module-Ejp7X0dO.js";
5
+ import { useIsDesktop as l } from "../../hooks/useIsDesktop.js";
6
+ import { useRootContext as u } from "../RootProvider/RootProvider.js";
7
+ import { s as m } from "../../globalSearch.module-Ejp7X0dO.js";
8
8
  import "../Snackbar/useSnackbar.js";
9
- import { B as m } from "../../Button-B0t0vz2h.js";
10
- import { S as p } from "../../XMark-tKk6aExO.js";
11
- import { S as h } from "../../MagnifyingGlass-bwVhw07z.js";
12
- const v = ({
13
- onClick: t,
14
- expanded: o
15
- }) => {
16
- const { languageCode: a } = l(), { search: r, close: n } = f(a), e = i();
17
- return /* @__PURE__ */ c(
18
- m,
9
+ import { B as p } from "../../Button-B0t0vz2h.js";
10
+ import { S as h } from "../../XMark-tKk6aExO.js";
11
+ import { S as f } from "../../MagnifyingGlass-bwVhw07z.js";
12
+ const D = ({ onClick: t, expanded: o, ...a }) => {
13
+ const { languageCode: n } = u(), { search: r, close: c } = k(n), e = l();
14
+ return /* @__PURE__ */ i(
15
+ p,
19
16
  {
17
+ ...a,
20
18
  type: "button",
21
19
  icon: !e,
22
- title: o ? n : r,
20
+ title: o ? c : r,
23
21
  onClick: t,
24
22
  "data-color": "neutral",
25
- className: u.searchButton,
23
+ className: m.searchButton,
26
24
  children: [
27
- o ? /* @__PURE__ */ s(p, { "aria-hidden": "true" }) : /* @__PURE__ */ s(h, { "aria-hidden": "true" }),
25
+ o ? /* @__PURE__ */ s(h, { "aria-hidden": "true" }) : /* @__PURE__ */ s(f, { "aria-hidden": "true" }),
28
26
  e ? r : null
29
27
  ]
30
28
  }
31
29
  );
32
- }, f = (t) => {
30
+ }, k = (t) => {
33
31
  switch (t) {
34
32
  case "nn":
35
33
  return {
@@ -49,5 +47,5 @@ const v = ({
49
47
  }
50
48
  };
51
49
  export {
52
- v as GlobalSearchButton
50
+ D as GlobalSearchButton
53
51
  };
@@ -1,4 +1,6 @@
1
- export declare const GlobalSearchButton: ({ onClick, expanded, }: {
1
+ import { DsButtonProps } from '../';
2
+ export interface GlobalSearchButtonProps extends DsButtonProps {
2
3
  onClick: () => void;
3
4
  expanded: boolean;
4
- }) => import("react/jsx-runtime").JSX.Element;
5
+ }
6
+ export declare const GlobalSearchButton: ({ onClick, expanded, ...buttonProps }: GlobalSearchButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -9,6 +9,7 @@ declare const meta: {
9
9
  export default meta;
10
10
  export declare const DashboardPage: () => import("react/jsx-runtime").JSX.Element;
11
11
  export declare const AccountsPage: () => import("react/jsx-runtime").JSX.Element;
12
+ export declare const AccountsPageVirtualized: () => import("react/jsx-runtime").JSX.Element;
12
13
  export declare const AlertsPage: () => import("react/jsx-runtime").JSX.Element;
13
14
  export declare const SettingsPage: () => import("react/jsx-runtime").JSX.Element;
14
15
  export declare const ActivityLogPage: () => 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.48.1",
3
+ "version": "0.48.3",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",