@altinn/altinn-components 0.24.2 → 0.24.5
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/Checkmark-RgzvRNxP.js +25 -0
- package/dist/PersonCircle-DMwECpgW.js +25 -0
- package/dist/altinn-ds-overrides.css +5 -0
- package/dist/assets/AccountButton.css +1 -0
- package/dist/assets/EndUserLabel.css +1 -0
- package/dist/assets/GlobalMenuBase.css +1 -1
- package/dist/assets/MenuItemBase.css +1 -1
- package/dist/assets/MenuItemLabel.css +1 -1
- package/dist/components/Dialog/DialogListGroup.js +13 -32
- package/dist/components/Dropdown/DrawerBase.js +15 -8
- package/dist/components/Dropdown/DropdownBase.js +21 -21
- package/dist/components/DsComponents/index.js +23 -0
- package/dist/components/GlobalMenu/AccountButton.js +34 -12
- package/dist/components/GlobalMenu/AccountMenu.js +24 -24
- package/dist/components/GlobalMenu/EndUserLabel.js +13 -0
- package/dist/components/GlobalMenu/GlobalMenu.js +68 -60
- package/dist/components/GlobalMenu/GlobalMenuBase.js +9 -9
- package/dist/components/GlobalMenu/index.js +10 -8
- package/dist/components/Menu/MenuItemBase.js +5 -5
- package/dist/components/Menu/MenuItemLabel.js +21 -10
- package/dist/components/Menu/MenuItems.js +24 -23
- package/dist/components/Menu/MenuItemsVirtual.js +65 -602
- package/dist/components/index.js +266 -243
- package/dist/global.css +3 -0
- package/dist/index-DyDqjche.js +541 -0
- package/dist/index.js +256 -233
- package/dist/types/lib/components/Avatar/Examples.stories.d.ts +1 -1
- package/dist/types/lib/components/Avatar/avatar.stories.d.ts +1 -1
- package/dist/types/lib/components/Dropdown/DrawerBase.d.ts +2 -1
- package/dist/types/lib/components/Dropdown/DropdownBase.d.ts +2 -1
- package/dist/types/lib/components/DsComponents/DsComponents.stories.d.ts +23 -0
- package/dist/types/lib/components/DsComponents/index.d.ts +1 -0
- package/dist/types/lib/components/GlobalMenu/AccountMenu.d.ts +2 -2
- package/dist/types/lib/components/GlobalMenu/EndUserLabel.d.ts +5 -0
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.d.ts +2 -1
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +3 -1
- package/dist/types/lib/components/GlobalMenu/GlobalMenuBase.d.ts +3 -1
- package/dist/types/lib/components/GlobalMenu/index.d.ts +1 -0
- package/dist/types/lib/components/Header/LocaleSwitcher.stories.d.ts +1 -1
- package/dist/types/lib/components/Icon/IconOrAvatar.d.ts +1 -1
- package/dist/types/lib/components/Menu/Examples.stories.d.ts +4 -0
- package/dist/types/lib/components/Menu/MenuItemLabel.d.ts +2 -1
- package/dist/types/lib/components/Menu/MenuItems.d.ts +3 -1
- package/dist/types/lib/components/Search/AutocompleteBase.d.ts +1 -1
- package/dist/types/lib/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +9 -9
- package/dist/types/lib/components/index.d.ts +1 -0
- package/dist/usePagination-CBMPUKt_.js +4073 -0
- package/package.json +4 -1
- package/dist/userMenuItems-vSWEGGu2.js +0 -84
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { forwardRef as a } from "react";
|
|
4
|
+
import { u as f } from "./useId-CsCRkvK3.js";
|
|
5
|
+
var d = function(t, n) {
|
|
6
|
+
var r = {};
|
|
7
|
+
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && n.indexOf(e) < 0 && (r[e] = t[e]);
|
|
8
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
9
|
+
for (var l = 0, e = Object.getOwnPropertySymbols(t); l < e.length; l++)
|
|
10
|
+
n.indexOf(e[l]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[l]) && (r[e[l]] = t[e[l]]);
|
|
11
|
+
return r;
|
|
12
|
+
};
|
|
13
|
+
const p = a((t, n) => {
|
|
14
|
+
var { title: r, titleId: e } = t, l = d(t, ["title", "titleId"]);
|
|
15
|
+
let o = f();
|
|
16
|
+
return o = r ? e || "title-" + o : void 0, i.createElement(
|
|
17
|
+
"svg",
|
|
18
|
+
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: n, "aria-labelledby": o }, l),
|
|
19
|
+
r ? i.createElement("title", { id: o }, r) : null,
|
|
20
|
+
i.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M18.998 6.94a.75.75 0 0 1 .063 1.058l-8 9a.75.75 0 0 1-1.091.032l-5-5a.75.75 0 1 1 1.06-1.06l4.438 4.437 7.471-8.405A.75.75 0 0 1 19 6.939", clipRule: "evenodd" })
|
|
21
|
+
);
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
p as S
|
|
25
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { forwardRef as a } from "react";
|
|
4
|
+
import { u as f } from "./useId-CsCRkvK3.js";
|
|
5
|
+
var d = function(t, n) {
|
|
6
|
+
var l = {};
|
|
7
|
+
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && n.indexOf(e) < 0 && (l[e] = t[e]);
|
|
8
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
9
|
+
for (var r = 0, e = Object.getOwnPropertySymbols(t); r < e.length; r++)
|
|
10
|
+
n.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (l[e[r]] = t[e[r]]);
|
|
11
|
+
return l;
|
|
12
|
+
};
|
|
13
|
+
const p = a((t, n) => {
|
|
14
|
+
var { title: l, titleId: e } = t, r = d(t, ["title", "titleId"]);
|
|
15
|
+
let o = f();
|
|
16
|
+
return o = l ? e || "title-" + o : void 0, i.createElement(
|
|
17
|
+
"svg",
|
|
18
|
+
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: n, "aria-labelledby": o }, r),
|
|
19
|
+
l ? i.createElement("title", { id: o }, l) : null,
|
|
20
|
+
i.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M12 3.75a8.25 8.25 0 0 0-5.144 14.7 5.25 5.25 0 0 1 10.288 0A8.25 8.25 0 0 0 12 3.75m3.747 15.602a3.75 3.75 0 0 0-7.494 0A8.2 8.2 0 0 0 12 20.25c1.35 0 2.623-.324 3.747-.898M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12M12 7.25a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5M8.25 9.5a3.75 3.75 0 1 1 7.5 0 3.75 3.75 0 0 1-7.5 0", clipRule: "evenodd" })
|
|
21
|
+
);
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
p as S
|
|
25
|
+
};
|
|
@@ -36,4 +36,9 @@
|
|
|
36
36
|
--ds-color-accent-text-default: var(--ds-color-company-text-default);
|
|
37
37
|
--ds-color-accent-contrast-default: var(--ds-color-company-contrast-default);
|
|
38
38
|
--ds-color-accent-contrast-subtle: var(--ds-color-company-contrast-subtle);
|
|
39
|
+
|
|
40
|
+
/* Override tokens from designSystem & altinn-components */
|
|
41
|
+
--ds-color-neutral-surface-default: #fff;
|
|
42
|
+
--ds-body-md-font-size: 1rem;
|
|
43
|
+
--ds-color-text-subtle: #10204a;
|
|
39
44
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._label_1dcj3_1{display:flex;flex-direction:column;padding:0 .25rem}._title_1dcj3_7[data-size=lg]{font-size:1rem;line-height:1.25;font-weight:500}._description_1dcj3_13{font-size:.875rem;color:var(--ds-color-text-subtle)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._text_1tx3s_1{-webkit-user-select:none;user-select:none;display:flex;align-items:center;column-gap:.5rem;line-height:1.25rem;color:var(--ds-color-neutral-text-subtle);margin:0}._icon_1tx3s_11{font-size:1.25rem}._label_1tx3s_15{font-size:.875rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._nav_b7k4e_1{display:flex;flex-direction:column}._footer_b7k4e_6{padding:1rem .5rem;display:flex;row-gap:1rem;width:100%;flex-direction:column;align-items:stretch}._drawer_b7k4e_16[data-expanded=true]{display:block;padding:.5rem;z-index:2}._dropdown_b7k4e_22[data-expanded=true]{display:none}@media (min-width: 1024px){._drawer_b7k4e_16[data-expanded=true]{display:none}._dropdown_b7k4e_22[data-expanded=true]{display:block;z-index:2}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._item_1gk35_1{font:inherit;color:inherit;padding:0;border:0;text-align:inherit;text-decoration:none;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;width:100%;display:flex;align-items:center;column-gap:.25rem;margin:.5rem 0;border-radius:2px}._item_1gk35_1[aria-disabled=true]{opacity:.5;pointer-events:none}._item_1gk35_1[data-size=md]{min-height:56px}._item_1gk35_1[data-size=md]{min-height:44px}._item_1gk35_1[data-size=sm]{min-height:40px}._content_1gk35_45{display:flex;width:100%;align-items:center;column-gap:6px;padding:6px}._action_1gk35_53{display:flex;justify-content:center;align-items:center;padding:10px}._linkText_1gk35_60{font-size:.875rem;white-space:nowrap}._linkIcon_1gk35_65{font-size:1.5rem}._item_1gk35_1,._item_1gk35_1[data-theme]{background-color:transparent}[data-theme=subtle] ._item_1gk35_1:hover{background-color:var(--ds-color-surface-hover)}[data-theme=subtle] ._item_1gk35_1:active{background-color:var(--ds-color-surface-active)}[data-theme=subtle] ._item_1gk35_1[data-selected=true]{background-color:var(--ds-color-background-default)}[data-theme=default] ._item_1gk35_1:hover{background-color:var(--ds-color-surface-hover)}[data-theme=default] ._item_1gk35_1:active{background-color:var(--ds-color-surface-active)}[data-theme=default] ._item_1gk35_1[data-selected=true]{background-color:var(--ds-color-background-subtle)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._label_1ehsf_1{display:flex;flex-direction:column;padding:0 .25rem}._title_1ehsf_7{font-weight:400}._title_1ehsf_7[data-weight=medium]{font-weight:500}._title_1ehsf_7[data-size=lg]{font-size:1.125rem;line-height:1.25}._title_1ehsf_7[data-size=md],._title_1ehsf_7[data-size=sm]{font-size:1rem;line-height:1.25}._description_1ehsf_30{font-size:.875rem;color:var(--ds-color-text-subtle)}
|
|
@@ -1,41 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsxs as a, jsx as l } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
3
2
|
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { Button as p } from "../Button/Button.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { Button as e } from "../Button/Button.js";
|
|
7
5
|
import "../RootProvider/RootProvider.js";
|
|
8
|
-
import { ListBase as
|
|
9
|
-
import { Heading as
|
|
6
|
+
import { ListBase as n } from "../List/ListBase.js";
|
|
7
|
+
import { Heading as p } from "../Typography/Heading.js";
|
|
10
8
|
import "../Search/AutocompleteBase.js";
|
|
11
9
|
import "../Snackbar/useSnackbar.js";
|
|
12
10
|
import { Flex as s } from "../Page/Flex.js";
|
|
13
|
-
import { Section as
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
for (var o = 0, t = Object.getOwnPropertySymbols(e); o < t.length; o++)
|
|
20
|
-
i.indexOf(t[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[o]) && (r[t[o]] = e[t[o]]);
|
|
21
|
-
return r;
|
|
22
|
-
};
|
|
23
|
-
const w = f((e, i) => {
|
|
24
|
-
var { title: r, titleId: t } = e, o = v(e, ["title", "titleId"]);
|
|
25
|
-
let n = g();
|
|
26
|
-
return n = r ? t || "title-" + n : void 0, m.createElement(
|
|
27
|
-
"svg",
|
|
28
|
-
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": n }, o),
|
|
29
|
-
r ? m.createElement("title", { id: n }, r) : null,
|
|
30
|
-
m.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M18.998 6.94a.75.75 0 0 1 .063 1.058l-8 9a.75.75 0 0 1-1.091.032l-5-5a.75.75 0 1 1 1.06-1.06l4.438 4.437 7.471-8.405A.75.75 0 0 1 19 6.939", clipRule: "evenodd" })
|
|
31
|
-
);
|
|
32
|
-
}), P = ({ title: e, children: i, checkAllLabel: r }) => /* @__PURE__ */ a(u, { spacing: 3, children: [
|
|
33
|
-
e && /* @__PURE__ */ a(s, { direction: "row", align: "center", justify: "between", children: [
|
|
34
|
-
/* @__PURE__ */ l(d, { size: "lg", children: e }),
|
|
35
|
-
r && /* @__PURE__ */ l(p, { variant: "text", icon: w, size: "sm", children: r })
|
|
11
|
+
import { Section as c } from "../Page/Section.js";
|
|
12
|
+
import { S as a } from "../../Checkmark-RgzvRNxP.js";
|
|
13
|
+
const B = ({ title: i, children: m, checkAllLabel: o }) => /* @__PURE__ */ t(c, { spacing: 3, children: [
|
|
14
|
+
i && /* @__PURE__ */ t(s, { direction: "row", align: "center", justify: "between", children: [
|
|
15
|
+
/* @__PURE__ */ r(p, { size: "lg", children: i }),
|
|
16
|
+
o && /* @__PURE__ */ r(e, { variant: "text", icon: a, size: "sm", children: o })
|
|
36
17
|
] }),
|
|
37
|
-
/* @__PURE__ */
|
|
18
|
+
/* @__PURE__ */ r(n, { spacing: 3, children: m })
|
|
38
19
|
] });
|
|
39
20
|
export {
|
|
40
|
-
|
|
21
|
+
B as DialogListGroup
|
|
41
22
|
};
|
|
@@ -1,19 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { c as s } from "../../index-L8X2o7IH.js";
|
|
3
|
-
import '../../assets/DrawerBase.css';const c = "_drawer_18fhf_1",
|
|
3
|
+
import '../../assets/DrawerBase.css';const c = "_drawer_18fhf_1", m = {
|
|
4
4
|
drawer: c
|
|
5
|
-
},
|
|
6
|
-
|
|
5
|
+
}, i = ({
|
|
6
|
+
layout: a,
|
|
7
|
+
placement: e = "inline",
|
|
8
|
+
open: t = !1,
|
|
9
|
+
className: r,
|
|
10
|
+
children: o,
|
|
11
|
+
as: n = "div"
|
|
12
|
+
}) => /* @__PURE__ */ d(
|
|
13
|
+
n,
|
|
7
14
|
{
|
|
8
|
-
className: s(
|
|
15
|
+
className: s(m.drawer, r),
|
|
9
16
|
"data-placement": e,
|
|
10
17
|
"data-layout": a,
|
|
11
18
|
"data-theme": "default",
|
|
12
19
|
"data-color": "company",
|
|
13
|
-
"data-expanded":
|
|
14
|
-
children:
|
|
20
|
+
"data-expanded": t,
|
|
21
|
+
children: o
|
|
15
22
|
}
|
|
16
23
|
);
|
|
17
24
|
export {
|
|
18
|
-
|
|
25
|
+
i as DrawerBase
|
|
19
26
|
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "../../index-L8X2o7IH.js";
|
|
3
3
|
import { useRef as l } from "react";
|
|
4
|
-
import { useClickOutside as
|
|
5
|
-
import '../../assets/DropdownBase.css';const
|
|
6
|
-
dropdown:
|
|
7
|
-
},
|
|
8
|
-
layout:
|
|
9
|
-
placement:
|
|
10
|
-
padding:
|
|
4
|
+
import { useClickOutside as f } from "../../hooks/useClickOutside.js";
|
|
5
|
+
import '../../assets/DropdownBase.css';const i = "_dropdown_139me_1", u = {
|
|
6
|
+
dropdown: i
|
|
7
|
+
}, h = ({
|
|
8
|
+
layout: t,
|
|
9
|
+
placement: a = "left",
|
|
10
|
+
padding: d = !0,
|
|
11
11
|
open: e = !1,
|
|
12
|
-
className:
|
|
13
|
-
children:
|
|
14
|
-
onClose: s
|
|
12
|
+
className: n,
|
|
13
|
+
children: r,
|
|
14
|
+
onClose: s,
|
|
15
|
+
as: m = "div"
|
|
15
16
|
}) => {
|
|
16
17
|
const o = l(null);
|
|
17
|
-
return
|
|
18
|
-
|
|
18
|
+
return f(o, s), /* @__PURE__ */ p(
|
|
19
|
+
m,
|
|
19
20
|
{
|
|
20
21
|
ref: o,
|
|
21
|
-
className:
|
|
22
|
-
"data-layout":
|
|
22
|
+
className: c(u.dropdown, n),
|
|
23
|
+
"data-layout": t,
|
|
23
24
|
"data-theme": "default",
|
|
24
25
|
"data-color": "company",
|
|
25
26
|
"data-shadow": "md",
|
|
26
|
-
"data-placement":
|
|
27
|
-
"data-padding":
|
|
28
|
-
role: "menu",
|
|
27
|
+
"data-placement": a,
|
|
28
|
+
"data-padding": d,
|
|
29
29
|
"data-expanded": e,
|
|
30
|
-
children:
|
|
30
|
+
children: r
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
};
|
|
34
34
|
export {
|
|
35
|
-
|
|
35
|
+
h as DropdownBase
|
|
36
36
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { A as D, B as e, a as o, C as i, b as n, c as t, D as r, d as g, H as b, L as d, e as h, f as p, P, g as l, h as C, S as L, i as S, j as c, T as k, u as m } from "../../usePagination-CBMPUKt_.js";
|
|
2
|
+
export {
|
|
3
|
+
D as DsAlert,
|
|
4
|
+
e as DsBadge,
|
|
5
|
+
o as DsButton,
|
|
6
|
+
i as DsCheckbox,
|
|
7
|
+
n as DsChip,
|
|
8
|
+
t as DsCombobox,
|
|
9
|
+
r as DsDetails,
|
|
10
|
+
g as DsDialog,
|
|
11
|
+
b as DsHeading,
|
|
12
|
+
d as DsLink,
|
|
13
|
+
h as DsListItem,
|
|
14
|
+
p as DsListUnordered,
|
|
15
|
+
P as DsPagination,
|
|
16
|
+
l as DsParagraph,
|
|
17
|
+
C as DsPopover,
|
|
18
|
+
L as DsSearch,
|
|
19
|
+
S as DsSkeleton,
|
|
20
|
+
c as DsSpinner,
|
|
21
|
+
k as DsTabs,
|
|
22
|
+
m as useDsPagination
|
|
23
|
+
};
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { MenuItemBase as
|
|
3
|
-
import { MenuItemLabel as
|
|
4
|
-
import { MenuItemIcon as
|
|
1
|
+
import { jsxs as m, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { MenuItemBase as r } from "../Menu/MenuItemBase.js";
|
|
3
|
+
import { MenuItemLabel as s } from "../Menu/MenuItemLabel.js";
|
|
4
|
+
import { MenuItemIcon as t } from "../Menu/MenuItemIcon.js";
|
|
5
5
|
import "../../index-L8X2o7IH.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
8
|
import "../Search/AutocompleteBase.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { S as
|
|
11
|
-
const
|
|
10
|
+
import { S as n } from "../../ChevronRight-DUaHaWi-.js";
|
|
11
|
+
import '../../assets/AccountButton.css';const _ = "_label_1dcj3_1", b = "_title_1dcj3_7", f = "_description_1dcj3_13", l = {
|
|
12
|
+
label: _,
|
|
13
|
+
title: b,
|
|
14
|
+
description: f
|
|
15
|
+
}, w = ({ account: e, linkText: p, onClick: d, multipleAccounts: o }) => o ? /* @__PURE__ */ m(r, { size: "lg", onClick: d, linkText: p, linkIcon: n, as: "button", children: [
|
|
12
16
|
/* @__PURE__ */ i(
|
|
13
|
-
|
|
17
|
+
t,
|
|
14
18
|
{
|
|
15
19
|
size: "xl",
|
|
16
20
|
avatar: {
|
|
@@ -19,20 +23,38 @@ const j = ({ account: e, linkText: t, onClick: l, multipleAccounts: d }) => d ?
|
|
|
19
23
|
}
|
|
20
24
|
}
|
|
21
25
|
),
|
|
22
|
-
/* @__PURE__ */ i(p, { size: "lg", title: e == null ? void 0 : e.name, description: e == null ? void 0 : e.description })
|
|
23
|
-
] }) : /* @__PURE__ */ r(m, { size: "lg", as: "div", children: [
|
|
24
26
|
/* @__PURE__ */ i(
|
|
25
27
|
s,
|
|
26
28
|
{
|
|
27
|
-
|
|
29
|
+
className: l.label,
|
|
30
|
+
size: "md",
|
|
31
|
+
title: e == null ? void 0 : e.name,
|
|
32
|
+
weight: "medium",
|
|
33
|
+
description: e == null ? void 0 : e.description
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
] }) : /* @__PURE__ */ m(r, { size: "lg", as: "div", children: [
|
|
37
|
+
/* @__PURE__ */ i(
|
|
38
|
+
t,
|
|
39
|
+
{
|
|
40
|
+
size: "xl",
|
|
28
41
|
avatar: {
|
|
29
42
|
name: e.name,
|
|
30
43
|
type: e.type
|
|
31
44
|
}
|
|
32
45
|
}
|
|
33
46
|
),
|
|
34
|
-
/* @__PURE__ */ i(
|
|
47
|
+
/* @__PURE__ */ i(
|
|
48
|
+
s,
|
|
49
|
+
{
|
|
50
|
+
className: l.label,
|
|
51
|
+
size: "md",
|
|
52
|
+
title: e == null ? void 0 : e.name,
|
|
53
|
+
weight: "medium",
|
|
54
|
+
description: e == null ? void 0 : e.description
|
|
55
|
+
}
|
|
56
|
+
)
|
|
35
57
|
] });
|
|
36
58
|
export {
|
|
37
|
-
|
|
59
|
+
w as AccountButton
|
|
38
60
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
3
3
|
import { useState as L } from "react";
|
|
4
4
|
import "../../index-L8X2o7IH.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
6
|
import "../Search/AutocompleteBase.js";
|
|
7
7
|
import "../Snackbar/useSnackbar.js";
|
|
8
8
|
import { Menu as M } from "../Menu/Menu.js";
|
|
9
|
-
const
|
|
9
|
+
const w = (d) => `${d} hits`, k = ({
|
|
10
10
|
accounts: d = [],
|
|
11
|
-
accountGroups:
|
|
11
|
+
accountGroups: y = {},
|
|
12
12
|
accountSearch: s,
|
|
13
13
|
onSelectAccount: m,
|
|
14
14
|
currentAccount: p,
|
|
15
|
-
isVirtualized:
|
|
15
|
+
isVirtualized: C
|
|
16
16
|
}) => {
|
|
17
17
|
var f;
|
|
18
18
|
const t = d.map((e) => ({
|
|
@@ -20,16 +20,16 @@ const a = (d) => `${d} hits`, R = ({
|
|
|
20
20
|
groupId: e.groupId || "search",
|
|
21
21
|
selected: e.selected ?? (p == null ? void 0 : p.id) === e.id,
|
|
22
22
|
title: e.name,
|
|
23
|
-
...(e == null ? void 0 : e.
|
|
23
|
+
...(e == null ? void 0 : e.items) && {
|
|
24
24
|
avatarGroup: {
|
|
25
25
|
size: "sm",
|
|
26
|
-
items: e.
|
|
27
|
-
name:
|
|
28
|
-
type: e.type
|
|
26
|
+
items: e.items.map((i) => ({
|
|
27
|
+
name: i.name,
|
|
28
|
+
type: i.type || e.type
|
|
29
29
|
}))
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
...!(e != null && e.
|
|
32
|
+
...!(e != null && e.items) && {
|
|
33
33
|
avatar: {
|
|
34
34
|
size: "md",
|
|
35
35
|
type: e.type,
|
|
@@ -39,36 +39,36 @@ const a = (d) => `${d} hits`, R = ({
|
|
|
39
39
|
badge: e.badge,
|
|
40
40
|
alertBadge: e.alertBadge,
|
|
41
41
|
onClick: () => m == null ? void 0 : m(e.id || e.name)
|
|
42
|
-
})), [
|
|
43
|
-
var
|
|
44
|
-
return (
|
|
42
|
+
})), [l, g] = L(""), r = l ? t.filter((e) => {
|
|
43
|
+
var i;
|
|
44
|
+
return (i = e == null ? void 0 : e.title) == null ? void 0 : i.toLowerCase().includes(l.toLowerCase());
|
|
45
45
|
}).map((e) => ({
|
|
46
46
|
...e,
|
|
47
47
|
groupId: "search"
|
|
48
|
-
})) : t,
|
|
48
|
+
})) : t, I = l ? {
|
|
49
49
|
search: {
|
|
50
|
-
title: ((f = s == null ? void 0 : s.getResultsLabel) == null ? void 0 : f.call(s,
|
|
50
|
+
title: ((f = s == null ? void 0 : s.getResultsLabel) == null ? void 0 : f.call(s, r.length)) ?? w(r.length)
|
|
51
51
|
}
|
|
52
|
-
} :
|
|
52
|
+
} : y, b = {
|
|
53
53
|
name: "account-search",
|
|
54
|
-
value:
|
|
54
|
+
value: l,
|
|
55
55
|
placeholder: (s == null ? void 0 : s.placeholder) ?? "Find account",
|
|
56
56
|
onChange: (e) => g(e.target.value),
|
|
57
57
|
onClear: () => g("")
|
|
58
|
-
},
|
|
59
|
-
...
|
|
58
|
+
}, h = [
|
|
59
|
+
...r.length > 0 ? r : [{ id: "search", groupId: "search", hidden: !0 }]
|
|
60
60
|
];
|
|
61
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ v(
|
|
62
62
|
M,
|
|
63
63
|
{
|
|
64
64
|
theme: "default",
|
|
65
|
-
search: s &&
|
|
66
|
-
groups:
|
|
67
|
-
items:
|
|
68
|
-
isVirtualized:
|
|
65
|
+
search: s && b,
|
|
66
|
+
groups: I,
|
|
67
|
+
items: h,
|
|
68
|
+
isVirtualized: C
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
};
|
|
72
72
|
export {
|
|
73
|
-
|
|
73
|
+
k as AccountMenu
|
|
74
74
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { S as l } from "../../PersonCircle-DMwECpgW.js";
|
|
3
|
+
import '../../assets/EndUserLabel.css';const n = "_text_1tx3s_1", o = "_icon_1tx3s_11", c = "_label_1tx3s_15", s = {
|
|
4
|
+
text: n,
|
|
5
|
+
icon: o,
|
|
6
|
+
label: c
|
|
7
|
+
}, x = ({ children: e }) => /* @__PURE__ */ a("p", { className: s.text, children: [
|
|
8
|
+
/* @__PURE__ */ t(l, { className: s.icon, "aria-hidden": !0 }),
|
|
9
|
+
/* @__PURE__ */ t("span", { className: s.label, children: e })
|
|
10
|
+
] });
|
|
11
|
+
export {
|
|
12
|
+
x as EndUserLabel
|
|
13
|
+
};
|
|
@@ -1,80 +1,88 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as
|
|
2
|
+
import { jsxs as m, jsx as i, Fragment as g } from "react/jsx-runtime";
|
|
3
|
+
import { useState as I, useMemo as S } from "react";
|
|
4
4
|
import "../../index-L8X2o7IH.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { AccountMenu as
|
|
7
|
-
import { AccountButton as
|
|
8
|
-
import { BackButton as
|
|
9
|
-
import { LogoutButton as
|
|
6
|
+
import { AccountMenu as W } from "./AccountMenu.js";
|
|
7
|
+
import { AccountButton as q } from "./AccountButton.js";
|
|
8
|
+
import { BackButton as w } from "./BackButton.js";
|
|
9
|
+
import { LogoutButton as k } from "./LogoutButton.js";
|
|
10
|
+
import { EndUserLabel as v } from "./EndUserLabel.js";
|
|
10
11
|
import "../Search/AutocompleteBase.js";
|
|
11
12
|
import "../Snackbar/useSnackbar.js";
|
|
12
|
-
import { MenuListItem as
|
|
13
|
-
import { Menu as
|
|
14
|
-
import { GlobalMenuBase as
|
|
15
|
-
const
|
|
16
|
-
accounts:
|
|
17
|
-
accountGroups:
|
|
18
|
-
accountSearch:
|
|
19
|
-
items:
|
|
13
|
+
import { MenuListItem as o } from "../Menu/MenuBase.js";
|
|
14
|
+
import { Menu as x } from "../Menu/Menu.js";
|
|
15
|
+
import { GlobalMenuBase as h, GlobalMenuHeader as z, GlobalMenuFooter as G } from "./GlobalMenuBase.js";
|
|
16
|
+
const $ = ({
|
|
17
|
+
accounts: f = [],
|
|
18
|
+
accountGroups: b = {},
|
|
19
|
+
accountSearch: B,
|
|
20
|
+
items: n = [],
|
|
20
21
|
groups: s,
|
|
21
|
-
changeLabel:
|
|
22
|
-
backLabel:
|
|
23
|
-
currentAccount:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
changeLabel: T = "Change",
|
|
23
|
+
backLabel: j = "Back",
|
|
24
|
+
currentAccount: a,
|
|
25
|
+
currentEndUserLabel: t = "Signed in",
|
|
26
|
+
onSelectAccount: p,
|
|
27
|
+
onClose: e,
|
|
28
|
+
logoutButton: l,
|
|
29
|
+
isVirtualized: F
|
|
28
30
|
}) => {
|
|
29
|
-
const [
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
...
|
|
31
|
+
const [u, y] = I(!1), d = () => {
|
|
32
|
+
y((r) => !r);
|
|
33
|
+
}, H = (r) => {
|
|
34
|
+
d(), e == null || e(), p == null || p(r);
|
|
35
|
+
}, M = S(() => n.map((r) => ({
|
|
36
|
+
...r,
|
|
35
37
|
onClick: () => {
|
|
36
|
-
var
|
|
37
|
-
(
|
|
38
|
+
var c;
|
|
39
|
+
(c = r.onClick) == null || c.call(r), e == null || e();
|
|
38
40
|
}
|
|
39
|
-
})), [
|
|
40
|
-
return
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
41
|
+
})), [n, e]);
|
|
42
|
+
return u ? /* @__PURE__ */ m(h, { children: [
|
|
43
|
+
/* @__PURE__ */ i(z, { children: /* @__PURE__ */ i(w, { onClick: d, label: j }) }),
|
|
44
|
+
/* @__PURE__ */ i(o, { as: "div", role: "separator" }),
|
|
45
|
+
/* @__PURE__ */ i(
|
|
46
|
+
W,
|
|
45
47
|
{
|
|
46
|
-
currentAccount:
|
|
47
|
-
accounts:
|
|
48
|
-
accountGroups:
|
|
49
|
-
accountSearch:
|
|
50
|
-
onSelectAccount:
|
|
51
|
-
isVirtualized:
|
|
48
|
+
currentAccount: a,
|
|
49
|
+
accounts: f,
|
|
50
|
+
accountGroups: b,
|
|
51
|
+
accountSearch: B,
|
|
52
|
+
onSelectAccount: H,
|
|
53
|
+
isVirtualized: F
|
|
52
54
|
}
|
|
53
55
|
)
|
|
54
|
-
] }) :
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
|
|
56
|
+
] }) : a ? /* @__PURE__ */ m(h, { color: a == null ? void 0 : a.type, children: [
|
|
57
|
+
/* @__PURE__ */ i(
|
|
58
|
+
q,
|
|
57
59
|
{
|
|
58
|
-
account:
|
|
59
|
-
linkText:
|
|
60
|
-
multipleAccounts:
|
|
61
|
-
onClick:
|
|
60
|
+
account: a,
|
|
61
|
+
linkText: T,
|
|
62
|
+
multipleAccounts: f.length > 1,
|
|
63
|
+
onClick: d
|
|
62
64
|
}
|
|
63
|
-
)
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ i(o, { as: "div", role: "separator" }),
|
|
67
|
+
/* @__PURE__ */ i(x, { groups: s, items: M, theme: "default" }),
|
|
68
|
+
l && /* @__PURE__ */ m(g, { children: [
|
|
69
|
+
/* @__PURE__ */ i(o, { as: "div", role: "separator" }),
|
|
70
|
+
/* @__PURE__ */ m(G, { children: [
|
|
71
|
+
t && /* @__PURE__ */ i(v, { children: t }),
|
|
72
|
+
/* @__PURE__ */ i(k, { ...l })
|
|
73
|
+
] })
|
|
69
74
|
] })
|
|
70
|
-
] }) : /* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
+
] }) : /* @__PURE__ */ m(h, { children: [
|
|
76
|
+
/* @__PURE__ */ i(x, { groups: s, items: M }),
|
|
77
|
+
l && /* @__PURE__ */ m(g, { children: [
|
|
78
|
+
/* @__PURE__ */ i(o, { as: "div", role: "separator" }),
|
|
79
|
+
/* @__PURE__ */ m(G, { children: [
|
|
80
|
+
t && /* @__PURE__ */ i(v, { children: t }),
|
|
81
|
+
/* @__PURE__ */ i(k, { ...l })
|
|
82
|
+
] })
|
|
75
83
|
] })
|
|
76
84
|
] });
|
|
77
85
|
};
|
|
78
86
|
export {
|
|
79
|
-
|
|
87
|
+
$ as GlobalMenu
|
|
80
88
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import '../../assets/GlobalMenuBase.css';const
|
|
3
|
-
nav:
|
|
4
|
-
footer:
|
|
5
|
-
drawer:
|
|
6
|
-
dropdown:
|
|
7
|
-
},
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import '../../assets/GlobalMenuBase.css';const t = "_nav_b7k4e_1", n = "_footer_b7k4e_6", s = "_drawer_b7k4e_16", d = "_dropdown_b7k4e_22", r = {
|
|
3
|
+
nav: t,
|
|
4
|
+
footer: n,
|
|
5
|
+
drawer: s,
|
|
6
|
+
dropdown: d
|
|
7
|
+
}, l = ({ color: o = "company", children: a }) => /* @__PURE__ */ e("nav", { className: r.nav, "data-theme": "default", "data-color": o, children: a }), _ = ({ children: o }) => /* @__PURE__ */ e("header", { className: r.header, children: o }), b = ({ children: o }) => /* @__PURE__ */ e("footer", { className: r.footer, children: o });
|
|
8
8
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
l as GlobalMenuBase,
|
|
10
|
+
b as GlobalMenuFooter,
|
|
11
11
|
_ as GlobalMenuHeader
|
|
12
12
|
};
|