@altinn/altinn-components 0.41.6 → 0.41.7
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/MenuItemLabel.css +1 -1
- package/dist/assets/MenuOption.css +1 -1
- package/dist/components/Account/AccountMenu.js +29 -30
- package/dist/components/Header/Header.js +20 -20
- package/dist/components/Header/HeaderLogo.js +15 -12
- package/dist/components/Menu/MenuItemLabel.js +30 -30
- package/dist/components/Menu/MenuOption.js +28 -28
- package/dist/types/lib/components/Account/AccountMenu.d.ts +3 -2
- package/dist/types/lib/components/Account/AccountMenu.stories.d.ts +2 -1
- package/dist/types/lib/components/Header/Header.stories.d.ts +1 -0
- package/dist/types/lib/components/Header/HeaderLogo.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._label_1el1b_1{flex-grow:1;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0 .125rem}._label_1el1b_1[data-size=lg]{font-size:1.125rem}._label_1el1b_1[data-size=md],._label_1el1b_1[data-size=sm]{font-size:1rem}._title_1el1b_22{display:inline;vertical-align:center}._label_1el1b_1 mark{text-decoration:underline;background-color:transparent;color:inherit}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._label_e5maf_1{flex-grow:1;display:flex;flex-direction:row;align-items:center;justify-content:center;padding:0 .125rem;font-size:1rem;column-gap:.5em;pointer-events:none}._title_e5maf_13{color:var(--ds-color-text-default);display:inline;vertical-align:text-top}._count_e5maf_19{display:inline;vertical-align:super;font-size:smaller}._radio_e5maf_25,._checkbox_e5maf_26{flex-shrink:0;flex-grow:0;position:relative;width:1.25em;height:1.25em;display:flex;align-items:center;justify-content:center;color:transparent}._radio_e5maf_25{border:1px solid;border-color:var(--ds-color-border-subtle);outline:var(--ds-color-border-subtle) solid 1px;border-radius:50%}._checkbox_e5maf_26{border:2px solid;border-color:var(--ds-color-border-subtle);border-radius:2px}._radio_e5maf_25[data-checked=true],._checkbox_e5maf_26[data-checked=true]{background-color:var(--ds-color-base-default);border:none;outline-color:var(--ds-color-base-default);color:var(--ds-color-base-contrast-default)}._icon_e5maf_59{font-size:1.25em}@supports (-webkit-hyphens: none){._icon_e5maf_59{font-size:unset;width:1.25em;height:1.25em}._icon_e5maf_59 svg,._icon_e5maf_59 img{width:100%;height:100%}}
|
|
@@ -1,63 +1,62 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
2
|
+
import { jsx as M } from "react/jsx-runtime";
|
|
3
|
+
import { useState as v } from "react";
|
|
4
4
|
import "../../index-L8X2o7IH.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { Menu as
|
|
6
|
+
import { Menu as x } from "../Menu/Menu.js";
|
|
7
7
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
const
|
|
9
|
-
items:
|
|
8
|
+
const R = (e) => `${e} hits`, z = ({
|
|
9
|
+
items: e = [],
|
|
10
10
|
groups: f = {},
|
|
11
|
-
search:
|
|
12
|
-
|
|
11
|
+
search: t,
|
|
12
|
+
filterAccount: C,
|
|
13
|
+
onSelectAccount: r,
|
|
13
14
|
currentAccount: a,
|
|
14
|
-
isVirtualized:
|
|
15
|
-
keyboardEvents:
|
|
15
|
+
isVirtualized: h,
|
|
16
|
+
keyboardEvents: L
|
|
16
17
|
}) => {
|
|
17
18
|
var u;
|
|
18
|
-
const d =
|
|
19
|
+
const d = e.map((o) => ({
|
|
19
20
|
...o,
|
|
20
21
|
title: (o == null ? void 0 : o.title) || o.name,
|
|
21
22
|
groupId: o.groupId || "search",
|
|
22
23
|
selected: o.selected ?? (a == null ? void 0 : a.id) === o.id,
|
|
23
24
|
onClick: () => {
|
|
24
|
-
!o.disabled && (
|
|
25
|
+
!o.disabled && (r == null || r(o.id));
|
|
25
26
|
}
|
|
26
|
-
})), [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
).map((o) => ({
|
|
27
|
+
})), [l, s] = v(""), w = C || ((o, p) => {
|
|
28
|
+
var g, i, c;
|
|
29
|
+
return ((g = o == null ? void 0 : o.name) == null ? void 0 : g.toLowerCase().includes(p.toLowerCase())) || ((c = (i = o == null ? void 0 : o.description) == null ? void 0 : i.toString()) == null ? void 0 : c.toLowerCase().includes(p.toLowerCase()));
|
|
30
|
+
}), n = l ? d.filter((o) => w(o, l)).map((o) => ({
|
|
32
31
|
...o,
|
|
33
32
|
groupId: "search",
|
|
34
33
|
title: (o == null ? void 0 : o.title) || o.name,
|
|
35
|
-
highlightWords: [
|
|
36
|
-
})) : d,
|
|
34
|
+
highlightWords: [l]
|
|
35
|
+
})) : d, F = l ? {
|
|
37
36
|
search: {
|
|
38
|
-
title: ((u =
|
|
37
|
+
title: ((u = t == null ? void 0 : t.getResultsLabel) == null ? void 0 : u.call(t, n.length)) ?? R(n.length)
|
|
39
38
|
}
|
|
40
|
-
} : f,
|
|
39
|
+
} : f, b = {
|
|
41
40
|
name: "account-search",
|
|
42
|
-
value:
|
|
43
|
-
placeholder: (
|
|
41
|
+
value: l,
|
|
42
|
+
placeholder: (t == null ? void 0 : t.placeholder) ?? "Find account",
|
|
44
43
|
onChange: (o) => s(o.target.value),
|
|
45
44
|
onClear: () => s("")
|
|
46
45
|
}, I = [
|
|
47
46
|
...n.length > 0 ? n : [{ id: "search", groupId: "search", hidden: !0 }]
|
|
48
47
|
];
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
|
|
48
|
+
return /* @__PURE__ */ M(
|
|
49
|
+
x,
|
|
51
50
|
{
|
|
52
51
|
variant: "default",
|
|
53
|
-
search:
|
|
54
|
-
groups:
|
|
52
|
+
search: t && b,
|
|
53
|
+
groups: F,
|
|
55
54
|
items: I,
|
|
56
|
-
isVirtualized:
|
|
57
|
-
keyboardEvents:
|
|
55
|
+
isVirtualized: h,
|
|
56
|
+
keyboardEvents: L
|
|
58
57
|
}
|
|
59
58
|
);
|
|
60
59
|
};
|
|
61
60
|
export {
|
|
62
|
-
|
|
61
|
+
z as AccountMenu
|
|
63
62
|
};
|
|
@@ -5,14 +5,14 @@ import "react";
|
|
|
5
5
|
import { useRootContext as H } from "../RootProvider/RootProvider.js";
|
|
6
6
|
import { DropdownBase as S } from "../Dropdown/DropdownBase.js";
|
|
7
7
|
import { DrawerBase as k } from "../Dropdown/DrawerBase.js";
|
|
8
|
-
import { GlobalMenu as
|
|
8
|
+
import { GlobalMenu as w } from "../GlobalMenu/GlobalMenu.js";
|
|
9
9
|
import { GlobalMenuButton as B } from "../GlobalMenu/GlobalMenuButton.js";
|
|
10
10
|
import { HeaderBase as D } from "./HeaderBase.js";
|
|
11
11
|
import { HeaderLogo as I } from "./HeaderLogo.js";
|
|
12
12
|
import { HeaderGroup as N } from "./HeaderGroup.js";
|
|
13
|
-
import { HeaderSearch as
|
|
13
|
+
import { HeaderSearch as x } from "./HeaderSearch.js";
|
|
14
14
|
import { LocaleSwitcher as F } from "./LocaleSwitcher.js";
|
|
15
|
-
import { Searchbar as
|
|
15
|
+
import { Searchbar as _ } from "../Searchbar/Searchbar.js";
|
|
16
16
|
import "../Snackbar/useSnackbar.js";
|
|
17
17
|
import { useIsDesktop as G } from "../../hooks/useIsDesktop.js";
|
|
18
18
|
import '../../assets/Header.css';const L = "_drawer_afyu3_1", j = "_dropdown_afyu3_6", z = "_relative_afyu3_19", t = {
|
|
@@ -21,21 +21,21 @@ import '../../assets/Header.css';const L = "_drawer_afyu3_1", j = "_dropdown_afy
|
|
|
21
21
|
relative: z
|
|
22
22
|
}, A = ({
|
|
23
23
|
globalMenu: e,
|
|
24
|
-
desktopMenu:
|
|
25
|
-
mobileMenu:
|
|
24
|
+
desktopMenu: C,
|
|
25
|
+
mobileMenu: u,
|
|
26
26
|
locale: p,
|
|
27
27
|
search: s,
|
|
28
28
|
currentAccount: m,
|
|
29
|
-
logo:
|
|
30
|
-
badge:
|
|
29
|
+
logo: l = {},
|
|
30
|
+
badge: i
|
|
31
31
|
}) => {
|
|
32
|
-
const { currentId: r, toggleId:
|
|
32
|
+
const { currentId: r, toggleId: c, openId: v, closeAll: d } = H(), a = () => {
|
|
33
33
|
v("search");
|
|
34
|
-
},
|
|
35
|
-
|
|
34
|
+
}, h = () => {
|
|
35
|
+
c("search");
|
|
36
36
|
}, y = () => {
|
|
37
|
-
|
|
38
|
-
},
|
|
37
|
+
c("menu");
|
|
38
|
+
}, f = G();
|
|
39
39
|
return /* @__PURE__ */ n(
|
|
40
40
|
D,
|
|
41
41
|
{
|
|
@@ -43,15 +43,15 @@ import '../../assets/Header.css';const L = "_drawer_afyu3_1", j = "_dropdown_afy
|
|
|
43
43
|
open: r === "search" || r === "menu" || r === "locale",
|
|
44
44
|
onClose: d,
|
|
45
45
|
children: [
|
|
46
|
-
/* @__PURE__ */ o(I, { ...
|
|
47
|
-
s &&
|
|
46
|
+
/* @__PURE__ */ o(I, { ...l, badge: i, className: t.logo }),
|
|
47
|
+
s && f && /* @__PURE__ */ o(x, { expanded: r === "search", children: /* @__PURE__ */ o(_, { ...s, expanded: r === "search", onClose: h, onFocus: a }) }),
|
|
48
48
|
/* @__PURE__ */ n(N, { children: [
|
|
49
49
|
p && /* @__PURE__ */ o(F, { ...p }),
|
|
50
50
|
/* @__PURE__ */ n("div", { className: t.relative, children: [
|
|
51
51
|
/* @__PURE__ */ o(
|
|
52
52
|
B,
|
|
53
53
|
{
|
|
54
|
-
badge:
|
|
54
|
+
badge: i,
|
|
55
55
|
currentAccount: m,
|
|
56
56
|
onClick: y,
|
|
57
57
|
expanded: r === "menu",
|
|
@@ -68,10 +68,10 @@ import '../../assets/Header.css';const L = "_drawer_afyu3_1", j = "_dropdown_afy
|
|
|
68
68
|
open: r === "menu",
|
|
69
69
|
className: t.dropdown,
|
|
70
70
|
children: /* @__PURE__ */ o(
|
|
71
|
-
|
|
71
|
+
w,
|
|
72
72
|
{
|
|
73
73
|
...e,
|
|
74
|
-
menu:
|
|
74
|
+
menu: C || (e == null ? void 0 : e.menu),
|
|
75
75
|
currentAccount: m,
|
|
76
76
|
onClose: d
|
|
77
77
|
}
|
|
@@ -80,12 +80,12 @@ import '../../assets/Header.css';const L = "_drawer_afyu3_1", j = "_dropdown_afy
|
|
|
80
80
|
)
|
|
81
81
|
] })
|
|
82
82
|
] }),
|
|
83
|
-
s && !
|
|
83
|
+
s && !f && /* @__PURE__ */ o(x, { expanded: r === "search", children: /* @__PURE__ */ o(_, { ...s, expanded: r === "search", onClose: h, onFocus: a }) }),
|
|
84
84
|
e && /* @__PURE__ */ o(k, { open: r === "menu", className: t.drawer, children: /* @__PURE__ */ o(
|
|
85
|
-
|
|
85
|
+
w,
|
|
86
86
|
{
|
|
87
87
|
...e,
|
|
88
|
-
menu:
|
|
88
|
+
menu: u || (e == null ? void 0 : e.menu),
|
|
89
89
|
currentAccount: m,
|
|
90
90
|
onClose: d
|
|
91
91
|
}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import {
|
|
1
|
+
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as i } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { Badge as a } from "../Badge/Badge.js";
|
|
4
|
+
import { ButtonBase as c } from "../Button/ButtonBase.js";
|
|
4
5
|
import "react";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { DigdirLogomark as
|
|
7
|
+
import { DigdirLogomark as x } from "./DigdirLogomark.js";
|
|
7
8
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import '../../assets/HeaderLogo.css';const
|
|
9
|
-
logo:
|
|
10
|
-
symbol:
|
|
11
|
-
text:
|
|
12
|
-
},
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
9
|
+
import '../../assets/HeaderLogo.css';const p = "_logo_y48xn_1", _ = "_symbol_y48xn_8", y = "_text_y48xn_20", t = {
|
|
10
|
+
logo: p,
|
|
11
|
+
symbol: _,
|
|
12
|
+
text: y
|
|
13
|
+
}, u = ({ className: m, as: r = "a", title: e = "Altinn", href: l = "/", badge: s }) => /* @__PURE__ */ n(c, { as: r, className: i(t.logo, m), href: l, children: [
|
|
14
|
+
/* @__PURE__ */ o(x, { className: t.symbol }),
|
|
15
|
+
/* @__PURE__ */ o("span", { className: t.text, children: e }),
|
|
16
|
+
" ",
|
|
17
|
+
s && /* @__PURE__ */ o(a, { ...s })
|
|
15
18
|
] });
|
|
16
19
|
export {
|
|
17
|
-
|
|
20
|
+
u as HeaderLogo
|
|
18
21
|
};
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
1
|
+
import { jsx as s, jsxs as b, Fragment as g } from "react/jsx-runtime";
|
|
2
2
|
import { c as d } from "../../index-L8X2o7IH.js";
|
|
3
3
|
import { isValidElement as x } from "react";
|
|
4
|
-
import { Heading as
|
|
4
|
+
import { Heading as f } from "../Typography/Heading.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
6
|
import { isHeadingProps as o } from "../List/ListItemLabel.js";
|
|
7
7
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import '../../assets/MenuItemLabel.css';const
|
|
9
|
-
label:
|
|
10
|
-
title:
|
|
8
|
+
import '../../assets/MenuItemLabel.css';const _ = "_label_1el1b_1", y = "_title_1el1b_22", p = {
|
|
9
|
+
label: _,
|
|
10
|
+
title: y
|
|
11
11
|
};
|
|
12
12
|
function u(r) {
|
|
13
13
|
return typeof r == "string" || typeof r == "number" || typeof r == "boolean" || r === null || x(r);
|
|
14
14
|
}
|
|
15
|
-
const
|
|
16
|
-
const
|
|
15
|
+
const P = (r) => {
|
|
16
|
+
const e = {
|
|
17
17
|
as: "span"
|
|
18
18
|
};
|
|
19
|
-
return o(r) ? { ...
|
|
20
|
-
...
|
|
19
|
+
return o(r) ? { ...e, ...r } : u(r) ? {
|
|
20
|
+
...e,
|
|
21
21
|
children: r
|
|
22
22
|
} : null;
|
|
23
|
-
},
|
|
24
|
-
const
|
|
23
|
+
}, h = (r) => {
|
|
24
|
+
const e = {
|
|
25
25
|
as: "span",
|
|
26
26
|
weight: "normal",
|
|
27
27
|
variant: "subtle"
|
|
28
28
|
};
|
|
29
|
-
return o(r) ? { ...
|
|
30
|
-
...
|
|
29
|
+
return o(r) ? { ...e, ...r } : u(r) ? {
|
|
30
|
+
...e,
|
|
31
31
|
children: r
|
|
32
32
|
} : null;
|
|
33
33
|
};
|
|
@@ -39,32 +39,32 @@ function z(r) {
|
|
|
39
39
|
}
|
|
40
40
|
const A = ({
|
|
41
41
|
className: r,
|
|
42
|
-
size:
|
|
43
|
-
title:
|
|
44
|
-
description:
|
|
45
|
-
highlightWords:
|
|
42
|
+
size: e = "sm",
|
|
43
|
+
title: l,
|
|
44
|
+
description: a,
|
|
45
|
+
highlightWords: i,
|
|
46
46
|
loading: m,
|
|
47
|
-
children:
|
|
47
|
+
children: c
|
|
48
48
|
}) => {
|
|
49
|
-
const
|
|
50
|
-
return /* @__PURE__ */ s("span", { className: d(p.label, r), "data-size":
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
const n = l && P(l), t = a && h(a);
|
|
50
|
+
return /* @__PURE__ */ s("span", { className: d(p.label, r), "data-size": e, children: c || /* @__PURE__ */ b(g, { children: [
|
|
51
|
+
n && /* @__PURE__ */ s(
|
|
52
|
+
f,
|
|
53
53
|
{
|
|
54
|
-
...
|
|
54
|
+
...n,
|
|
55
55
|
loading: m,
|
|
56
|
-
highlightWords:
|
|
56
|
+
highlightWords: i,
|
|
57
57
|
className: p.title,
|
|
58
|
-
weight:
|
|
58
|
+
weight: n != null && n.weight || e === "lg" ? "medium" : "normal"
|
|
59
59
|
}
|
|
60
60
|
),
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
t && /* @__PURE__ */ s(
|
|
62
|
+
f,
|
|
63
63
|
{
|
|
64
|
-
...
|
|
64
|
+
...t,
|
|
65
65
|
loading: m,
|
|
66
|
-
highlightWords:
|
|
67
|
-
size:
|
|
66
|
+
highlightWords: i,
|
|
67
|
+
size: t.size || e === "lg" ? "xs" : "xxs"
|
|
68
68
|
}
|
|
69
69
|
)
|
|
70
70
|
] }) });
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
5
|
import { MenuItem as _ } from "./MenuItem.js";
|
|
6
6
|
import "../Snackbar/useSnackbar.js";
|
|
7
7
|
import { S as p } from "../../Checkmark-Byz_C9x4.js";
|
|
8
|
-
import '../../assets/MenuOption.css';const N = "
|
|
8
|
+
import '../../assets/MenuOption.css';const N = "_label_e5maf_1", k = "_title_e5maf_13", v = "_count_e5maf_19", I = "_radio_e5maf_25", M = "_checkbox_e5maf_26", j = "_icon_e5maf_59", e = {
|
|
9
9
|
label: N,
|
|
10
|
-
title:
|
|
11
|
-
count:
|
|
12
|
-
radio:
|
|
13
|
-
checkbox:
|
|
14
|
-
icon:
|
|
10
|
+
title: k,
|
|
11
|
+
count: v,
|
|
12
|
+
radio: I,
|
|
13
|
+
checkbox: M,
|
|
14
|
+
icon: j
|
|
15
15
|
}, C = ({
|
|
16
16
|
size: t = "md",
|
|
17
17
|
type: h,
|
|
18
18
|
name: S,
|
|
19
|
-
active:
|
|
19
|
+
active: o,
|
|
20
20
|
value: g,
|
|
21
21
|
label: n,
|
|
22
22
|
title: u,
|
|
23
23
|
description: b,
|
|
24
24
|
icon: f,
|
|
25
|
-
count:
|
|
25
|
+
count: s = 0,
|
|
26
26
|
checked: c = !1,
|
|
27
|
-
disabled:
|
|
27
|
+
disabled: r,
|
|
28
28
|
onMouseEnter: w,
|
|
29
|
-
onClick:
|
|
29
|
+
onClick: i,
|
|
30
30
|
role: l,
|
|
31
31
|
...m
|
|
32
32
|
}) => {
|
|
33
33
|
const x = () => {
|
|
34
34
|
switch (h) {
|
|
35
35
|
case "checkbox":
|
|
36
|
-
return /* @__PURE__ */ d("span", { className:
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
36
|
+
return /* @__PURE__ */ d("span", { className: e.label, children: [
|
|
37
|
+
/* @__PURE__ */ a("span", { className: e.checkbox, "data-checked": c, children: /* @__PURE__ */ a(p, { className: e.icon, "aria-hidden": !0 }) }),
|
|
38
|
+
/* @__PURE__ */ a("span", { className: e.title, children: n }),
|
|
39
|
+
s > 0 && /* @__PURE__ */ a("span", { className: e.count, children: s })
|
|
40
40
|
] });
|
|
41
41
|
case "radio":
|
|
42
|
-
return /* @__PURE__ */ d("span", { className:
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
42
|
+
return /* @__PURE__ */ d("span", { className: e.label, children: [
|
|
43
|
+
/* @__PURE__ */ a("span", { className: e.radio, "data-checked": c, children: /* @__PURE__ */ a(p, { className: e.icon, "aria-hidden": !0 }) }),
|
|
44
|
+
/* @__PURE__ */ a("span", { className: e.title, children: n }),
|
|
45
|
+
s > 0 && /* @__PURE__ */ a("span", { className: e.count, children: s })
|
|
46
46
|
] });
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
return n ? /* @__PURE__ */
|
|
49
|
+
return n ? /* @__PURE__ */ a(
|
|
50
50
|
_,
|
|
51
51
|
{
|
|
52
|
-
disabled:
|
|
52
|
+
disabled: r,
|
|
53
53
|
selected: c,
|
|
54
54
|
size: t,
|
|
55
55
|
as: "div",
|
|
56
|
-
active:
|
|
56
|
+
active: o,
|
|
57
57
|
tabIndex: -1,
|
|
58
|
-
onClick:
|
|
58
|
+
onClick: i,
|
|
59
59
|
role: l,
|
|
60
|
-
label: /* @__PURE__ */
|
|
60
|
+
label: /* @__PURE__ */ a(x, {}),
|
|
61
61
|
...m
|
|
62
62
|
}
|
|
63
|
-
) : /* @__PURE__ */
|
|
63
|
+
) : /* @__PURE__ */ a(
|
|
64
64
|
_,
|
|
65
65
|
{
|
|
66
|
-
disabled:
|
|
66
|
+
disabled: r,
|
|
67
67
|
selected: c,
|
|
68
68
|
size: t,
|
|
69
69
|
as: "div",
|
|
70
|
-
active:
|
|
70
|
+
active: o,
|
|
71
71
|
tabIndex: -1,
|
|
72
|
-
onClick:
|
|
72
|
+
onClick: i,
|
|
73
73
|
role: l,
|
|
74
74
|
icon: f,
|
|
75
75
|
title: u,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { MenuItemProps, MenuProps, MenuSearchProps } from '../';
|
|
3
3
|
export interface AccountSearchProps extends MenuSearchProps {
|
|
4
|
-
getResultsLabel?: (hits: number) => string;
|
|
5
4
|
hidden?: boolean;
|
|
5
|
+
getResultsLabel?: (hits: number) => string;
|
|
6
6
|
}
|
|
7
7
|
export interface AccountMenuItemProps extends MenuItemProps {
|
|
8
8
|
id: string;
|
|
@@ -14,7 +14,8 @@ export interface AccountMenuProps extends MenuProps {
|
|
|
14
14
|
search?: AccountSearchProps;
|
|
15
15
|
currentAccount?: AccountMenuItemProps;
|
|
16
16
|
onSelectAccount?: (id: string) => void;
|
|
17
|
+
filterAccount?: (item: AccountMenuItemProps, q: string) => boolean;
|
|
17
18
|
scrollRefStyles?: CSSProperties;
|
|
18
19
|
keyboardEvents?: boolean;
|
|
19
20
|
}
|
|
20
|
-
export declare const AccountMenu: ({ items, groups, search, onSelectAccount, currentAccount, isVirtualized, keyboardEvents, }: AccountMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const AccountMenu: ({ items, groups, search, filterAccount, onSelectAccount, currentAccount, isVirtualized, keyboardEvents, }: AccountMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AccountMenuProps } from '..';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ items, groups, search, onSelectAccount, currentAccount, isVirtualized, keyboardEvents, }: AccountMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ items, groups, search, filterAccount, onSelectAccount, currentAccount, isVirtualized, keyboardEvents, }: AccountMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: AccountMenuProps;
|
|
@@ -13,3 +13,4 @@ export declare const WithGroups: () => import("react/jsx-runtime").JSX.Element;
|
|
|
13
13
|
export declare const SingleCompany: () => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export declare const TwoCompanies: () => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export declare const VirtualizedMenu: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const CustomFilter: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -26,3 +26,4 @@ export declare const CurrentAccount: (args: HeaderProps) => import("react/jsx-ru
|
|
|
26
26
|
export declare const CompanyAccount: (args: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
export declare const SubcompanyAccount: (args: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
28
|
export declare const MobileMenu: (args: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const WithCustomBadge: (args: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ElementType, MouseEventHandler } from 'react';
|
|
2
|
+
import { BadgeProps } from '../Badge/Badge.tsx';
|
|
2
3
|
export interface HeaderLogoProps {
|
|
3
4
|
className?: string;
|
|
4
5
|
as?: ElementType;
|
|
5
6
|
href?: string;
|
|
6
7
|
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
7
8
|
title?: string;
|
|
9
|
+
badge?: BadgeProps;
|
|
8
10
|
}
|
|
9
|
-
export declare const HeaderLogo: ({ className, as, title, href }: HeaderLogoProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const HeaderLogo: ({ className, as, title, href, badge }: HeaderLogoProps) => import("react/jsx-runtime").JSX.Element;
|