@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.
- package/dist/assets/AccountListVirtual.css +1 -1
- package/dist/components/Account/AccountListVirtual.js +7 -7
- package/dist/components/GlobalHeader/AccountSelector.js +75 -74
- package/dist/components/GlobalHeader/GlobalHeader.js +73 -63
- package/dist/components/GlobalHeader/GlobalSearchButton.js +17 -19
- package/dist/types/lib/components/GlobalHeader/GlobalSearchButton.d.ts +4 -2
- package/dist/types/lib/stories/Profile.stories.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
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 $ = "
|
|
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:
|
|
18
|
+
}, j = ({ items: u, groups: d = {}, sortGroupBy: f }) => {
|
|
19
19
|
const n = I(null), { menu: y } = _({
|
|
20
|
-
items:
|
|
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
|
-
}),
|
|
46
|
+
}), p = m.getVirtualItems();
|
|
47
47
|
return h(() => {
|
|
48
48
|
var t, e, i;
|
|
49
|
-
for (const r of
|
|
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
|
-
}, [
|
|
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:
|
|
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
|
|
3
|
-
import { c as
|
|
4
|
-
import s, { forwardRef as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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
|
|
10
|
-
import { S as
|
|
11
|
-
import { H as
|
|
12
|
-
import { u as
|
|
13
|
-
import '../../assets/AccountSelector.css';var
|
|
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) &&
|
|
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
|
-
|
|
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
|
|
22
|
-
var { title: r, titleId: t } = e, n =
|
|
23
|
-
let
|
|
24
|
-
return
|
|
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:
|
|
27
|
-
r ? s.createElement("title", { id:
|
|
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
|
|
32
|
+
var B = function(e, i) {
|
|
32
33
|
var r = {};
|
|
33
|
-
for (var t in e) Object.prototype.hasOwnProperty.call(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
|
-
|
|
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
|
|
40
|
-
var { title: r, titleId: t } = e, n =
|
|
41
|
-
let
|
|
42
|
-
return
|
|
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:
|
|
45
|
-
r ? s.createElement("title", { id:
|
|
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
|
-
}),
|
|
49
|
-
accountSelector:
|
|
50
|
-
heading:
|
|
51
|
-
searchSection:
|
|
52
|
-
searchField:
|
|
53
|
-
accountMenu:
|
|
54
|
-
fullScreen:
|
|
55
|
-
virtualized:
|
|
56
|
-
btnIcon:
|
|
57
|
-
spinner:
|
|
58
|
-
},
|
|
59
|
-
const { currentId: n, openId:
|
|
60
|
-
|
|
61
|
-
!
|
|
62
|
-
}, [
|
|
63
|
-
d === !0 && !
|
|
64
|
-
}, [d,
|
|
65
|
-
const { minimize: O, fullscreen:
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
var
|
|
69
|
-
(
|
|
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__ */
|
|
72
|
-
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
|
|
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:
|
|
77
|
-
placeholder:
|
|
78
|
-
value:
|
|
79
|
-
onChange: (
|
|
80
|
-
onClear: () =>
|
|
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__ */
|
|
85
|
+
/* @__PURE__ */ a(
|
|
85
86
|
"div",
|
|
86
87
|
{
|
|
87
|
-
className:
|
|
88
|
+
className: _(
|
|
88
89
|
c.accountMenu,
|
|
89
|
-
|
|
90
|
+
o && c.fullScreen,
|
|
90
91
|
e.isVirtualized && c.virtualized
|
|
91
92
|
),
|
|
92
|
-
children: /* @__PURE__ */
|
|
93
|
-
|
|
93
|
+
children: /* @__PURE__ */ a(
|
|
94
|
+
N,
|
|
94
95
|
{
|
|
95
96
|
...e,
|
|
96
|
-
onSelectAccount:
|
|
97
|
+
onSelectAccount: E,
|
|
97
98
|
keyboardEvents: !1,
|
|
98
|
-
search: { hidden: !0, name: "", value:
|
|
99
|
-
scrollRefStyles: !
|
|
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__ */
|
|
105
|
-
|
|
105
|
+
d !== !0 && u && /* @__PURE__ */ a(
|
|
106
|
+
R,
|
|
106
107
|
{
|
|
107
|
-
icon:
|
|
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:
|
|
110
|
-
children:
|
|
110
|
+
onClick: C,
|
|
111
|
+
children: o ? O : z
|
|
111
112
|
}
|
|
112
113
|
)
|
|
113
114
|
] });
|
|
114
|
-
},
|
|
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
|
-
|
|
141
|
+
de as AccountSelector
|
|
141
142
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useIsDesktop as
|
|
4
|
-
import { AccountMenuButton as
|
|
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
|
|
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",
|
|
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
|
-
},
|
|
24
|
-
globalMenu:
|
|
23
|
+
}, oe = ({
|
|
24
|
+
globalMenu: r,
|
|
25
25
|
desktopMenu: k,
|
|
26
|
-
mobileMenu:
|
|
27
|
-
globalSearch:
|
|
26
|
+
mobileMenu: O,
|
|
27
|
+
globalSearch: d,
|
|
28
28
|
locale: a,
|
|
29
|
-
accountSelector:
|
|
30
|
-
logo:
|
|
31
|
-
badge:
|
|
32
|
-
onLoginClick:
|
|
29
|
+
accountSelector: e,
|
|
30
|
+
logo: _ = {},
|
|
31
|
+
badge: x,
|
|
32
|
+
onLoginClick: B
|
|
33
33
|
}) => {
|
|
34
|
-
var
|
|
35
|
-
const { currentId:
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */ o(R, { ...
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
|
|
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: (
|
|
49
|
-
minimized: !
|
|
50
|
-
onClick: (
|
|
51
|
-
expanded:
|
|
52
|
-
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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:
|
|
66
|
-
className:
|
|
81
|
+
open: n === "menu",
|
|
82
|
+
className: s.dropdown,
|
|
67
83
|
children: /* @__PURE__ */ o(
|
|
68
84
|
w,
|
|
69
85
|
{
|
|
70
|
-
...
|
|
71
|
-
menu: k || (
|
|
86
|
+
...r,
|
|
87
|
+
menu: k || (r == null ? void 0 : r.menu),
|
|
72
88
|
onClose: m,
|
|
73
89
|
localeSwitcher: a,
|
|
74
|
-
isOpen:
|
|
90
|
+
isOpen: n === "menu"
|
|
75
91
|
}
|
|
76
92
|
)
|
|
77
93
|
}
|
|
78
94
|
)
|
|
79
95
|
] })
|
|
80
96
|
] }),
|
|
81
|
-
|
|
97
|
+
r && /* @__PURE__ */ o(t, { open: n === "menu", className: s.drawer, children: /* @__PURE__ */ o(
|
|
82
98
|
w,
|
|
83
99
|
{
|
|
84
|
-
...
|
|
85
|
-
menu:
|
|
100
|
+
...r,
|
|
101
|
+
menu: O || (r == null ? void 0 : r.menu),
|
|
86
102
|
onClose: m,
|
|
87
103
|
localeSwitcher: a,
|
|
88
|
-
isOpen:
|
|
104
|
+
isOpen: n === "menu"
|
|
89
105
|
}
|
|
90
106
|
) }),
|
|
91
|
-
|
|
92
|
-
|
|
107
|
+
e && /* @__PURE__ */ o(
|
|
108
|
+
t,
|
|
93
109
|
{
|
|
94
|
-
open:
|
|
95
|
-
className: h(
|
|
96
|
-
dataLayout:
|
|
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
|
-
|
|
107
|
-
|
|
116
|
+
d && /* @__PURE__ */ o(
|
|
117
|
+
t,
|
|
108
118
|
{
|
|
109
|
-
open:
|
|
110
|
-
className: h(
|
|
111
|
-
dataLayout:
|
|
112
|
-
children: /* @__PURE__ */ o(T, { ...
|
|
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
|
-
|
|
128
|
+
oe as GlobalHeader
|
|
119
129
|
};
|
|
@@ -1,35 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
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
|
|
6
|
-
import { useRootContext as
|
|
7
|
-
import { s as
|
|
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
|
|
10
|
-
import { S as
|
|
11
|
-
import { S as
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
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 ?
|
|
20
|
+
title: o ? c : r,
|
|
23
21
|
onClick: t,
|
|
24
22
|
"data-color": "neutral",
|
|
25
|
-
className:
|
|
23
|
+
className: m.searchButton,
|
|
26
24
|
children: [
|
|
27
|
-
o ? /* @__PURE__ */ s(
|
|
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
|
-
},
|
|
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
|
-
|
|
50
|
+
D as GlobalSearchButton
|
|
53
51
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { DsButtonProps } from '../';
|
|
2
|
+
export interface GlobalSearchButtonProps extends DsButtonProps {
|
|
2
3
|
onClick: () => void;
|
|
3
4
|
expanded: boolean;
|
|
4
|
-
}
|
|
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;
|