@altinn/altinn-components 0.24.4 → 0.24.6
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/README.md +16 -2
- package/dist/PersonCircle-DMwECpgW.js +25 -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/Dropdown/DrawerBase.js +15 -8
- package/dist/components/Dropdown/DropdownBase.js +21 -21
- package/dist/components/GlobalMenu/AccountButton.js +34 -12
- 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/Header/LocaleSwitcher.js +24 -10
- 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/Toolbar/Toolbar.js +32 -31
- package/dist/components/index.js +252 -250
- package/dist/index.js +260 -258
- 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/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/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/package.json +1 -1
- package/dist/userMenuItems-vSWEGGu2.js +0 -84
package/README.md
CHANGED
|
@@ -9,8 +9,22 @@ Today these teams are [Team Arbeidsflate](https://github.com/digdir/dialogporten
|
|
|
9
9
|
Note that this package is specifically designed to meet the unique needs of the aforementioned teams and is not intended to serve as a general-purpose library.
|
|
10
10
|
We already have the amazing [Norwegian public sector's Design System](https://designsystemet.no/), and we aim to incorporate its elements wherever it makes sense, ensuring alignment and leveraging its strengths while adapting to the specific requirements of Altinn.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
|
|
13
|
+
## Strategy for Adopting Designsystemet
|
|
14
|
+
|
|
15
|
+
As of April 10th, 2024, we’ve decided to start importing components from the [Norwegian public sector’s Design System](https://designsystemet.no/) as needed. These components will be exported from our own library using the `DS<Component>` prefix.
|
|
16
|
+
Consumers of `altinn-components` will be able to use these components directly, without needing `@digdir/designsystemet` as a dependency.
|
|
17
|
+
|
|
18
|
+
This approach allows us to:
|
|
19
|
+
|
|
20
|
+
- Avoid conflicts with existing components during the transition phase.
|
|
21
|
+
- Experiment with and adapt the appearance and behavior to fit the Altinn brand.
|
|
22
|
+
- Gradually replace legacy components: once a `DS<Component>` has been sufficiently customized and tested, we will remove the `DS` prefix and promote it to a first-class component.
|
|
23
|
+
- Leverage the strengths of the Design System while maintaining full control over the visual consistency of our solutions.
|
|
24
|
+
- Maintain a curated and well-integrated selection of components from the `@digdir/designsystemet` with the look and feel of Altinn.
|
|
25
|
+
|
|
26
|
+
This strategy is a natural progression from our previous approach, where we did not use components from `@digdir/designsystemet` directly but relied on its token structure and explored opportunities for deeper integration.
|
|
27
|
+
That approach helped us move faster and build understanding — and now we're ready to take the next step.
|
|
14
28
|
|
|
15
29
|
## Feedback and questions
|
|
16
30
|
|
|
@@ -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
|
+
};
|
|
@@ -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,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
|
};
|
|
@@ -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
|
};
|
|
@@ -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
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { AccountMenu as r } from "./AccountMenu.js";
|
|
2
|
-
import { GlobalMenu as
|
|
3
|
-
import { AccountButton as
|
|
4
|
-
import { BackButton as
|
|
5
|
-
import { LogoutButton as
|
|
2
|
+
import { GlobalMenu as n } from "./GlobalMenu.js";
|
|
3
|
+
import { AccountButton as f } from "./AccountButton.js";
|
|
4
|
+
import { BackButton as p } from "./BackButton.js";
|
|
5
|
+
import { LogoutButton as c } from "./LogoutButton.js";
|
|
6
|
+
import { EndUserLabel as a } from "./EndUserLabel.js";
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
+
f as AccountButton,
|
|
8
9
|
r as AccountMenu,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
p as BackButton,
|
|
11
|
+
a as EndUserLabel,
|
|
12
|
+
n as GlobalMenu,
|
|
13
|
+
c as LogoutButton
|
|
12
14
|
};
|
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "../RootProvider/RootProvider.js";
|
|
5
|
+
import { useRootContext as n } from "../RootProvider/RootProvider.js";
|
|
6
6
|
import "../Search/AutocompleteBase.js";
|
|
7
7
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import { MenuOption as
|
|
9
|
-
import { MenuHeader as
|
|
10
|
-
import { MenuBase as
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
import { MenuOption as p } from "../Menu/MenuOption.js";
|
|
9
|
+
import { MenuHeader as u } from "../Menu/MenuHeader.js";
|
|
10
|
+
import { MenuBase as d, MenuList as s, MenuListItem as o } from "../Menu/MenuBase.js";
|
|
11
|
+
const k = ({ title: l = "Select language", options: c, onChange: r }) => {
|
|
12
|
+
const { toggleId: i } = n(), m = (e) => {
|
|
13
|
+
i("locale"), r == null || r(e);
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ t(d, { theme: "default", children: /* @__PURE__ */ a(s, { children: [
|
|
16
|
+
/* @__PURE__ */ t(o, { children: /* @__PURE__ */ t(u, { title: l }) }),
|
|
17
|
+
c.map((e) => /* @__PURE__ */ t(o, { children: /* @__PURE__ */ t(
|
|
18
|
+
p,
|
|
19
|
+
{
|
|
20
|
+
onChange: m,
|
|
21
|
+
label: e.label,
|
|
22
|
+
type: "radio",
|
|
23
|
+
value: e.value,
|
|
24
|
+
checked: e.checked
|
|
25
|
+
}
|
|
26
|
+
) }, e.value))
|
|
27
|
+
] }) });
|
|
28
|
+
};
|
|
15
29
|
export {
|
|
16
|
-
|
|
30
|
+
k as LocaleSwitcher
|
|
17
31
|
};
|
|
@@ -6,7 +6,7 @@ import { Badge as T } from "../Badge/Badge.js";
|
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
7
|
import "../Search/AutocompleteBase.js";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
import '../../assets/MenuItemBase.css';const j = "
|
|
9
|
+
import '../../assets/MenuItemBase.css';const j = "_item_1gk35_1", B = "_content_1gk35_45", E = "_action_1gk35_53", g = "_linkText_1gk35_60", z = "_linkIcon_1gk35_65", n = {
|
|
10
10
|
item: j,
|
|
11
11
|
content: B,
|
|
12
12
|
action: E,
|
|
@@ -19,8 +19,8 @@ import '../../assets/MenuItemBase.css';const j = "_item_go19k_1", B = "_content_
|
|
|
19
19
|
size: d,
|
|
20
20
|
className: h,
|
|
21
21
|
href: x,
|
|
22
|
-
onClick:
|
|
23
|
-
onKeyPress:
|
|
22
|
+
onClick: e,
|
|
23
|
+
onKeyPress: o,
|
|
24
24
|
tabIndex: f = 0,
|
|
25
25
|
hidden: k,
|
|
26
26
|
selected: I,
|
|
@@ -42,9 +42,9 @@ import '../../assets/MenuItemBase.css';const j = "_item_go19k_1", B = "_content_
|
|
|
42
42
|
"data-selected": I,
|
|
43
43
|
href: x,
|
|
44
44
|
onKeyPress: (r) => {
|
|
45
|
-
r.key === "Enter" && (
|
|
45
|
+
r.key === "Enter" && (e == null || e()), o == null || o(r);
|
|
46
46
|
},
|
|
47
|
-
onClick:
|
|
47
|
+
onClick: e,
|
|
48
48
|
children: [
|
|
49
49
|
/* @__PURE__ */ c("div", { className: n.content, children: [
|
|
50
50
|
N,
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as m, Fragment as d } from "react/jsx-runtime";
|
|
2
2
|
import { c as p } from "../../index-L8X2o7IH.js";
|
|
3
|
-
import '../../assets/MenuItemLabel.css';const
|
|
4
|
-
label:
|
|
5
|
-
title:
|
|
6
|
-
description:
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
import '../../assets/MenuItemLabel.css';const _ = "_label_1ehsf_1", h = "_title_1ehsf_7", b = "_description_1ehsf_30", s = {
|
|
4
|
+
label: _,
|
|
5
|
+
title: h,
|
|
6
|
+
description: b
|
|
7
|
+
}, x = ({
|
|
8
|
+
className: l,
|
|
9
|
+
size: e = "sm",
|
|
10
|
+
label: i,
|
|
11
|
+
title: n,
|
|
12
|
+
weight: c,
|
|
13
|
+
description: o,
|
|
14
|
+
children: a
|
|
15
|
+
}) => {
|
|
16
|
+
const r = c || e === "lg" ? "medium" : "normal";
|
|
17
|
+
return /* @__PURE__ */ t("span", { className: p(s.label, l), "data-size": e, children: a || /* @__PURE__ */ m(d, { children: [
|
|
18
|
+
/* @__PURE__ */ t("strong", { className: s.title, "data-size": e, "data-weight": r, children: n || i }),
|
|
19
|
+
/* @__PURE__ */ t("span", { className: s.description, "data-size": e, children: o })
|
|
20
|
+
] }) });
|
|
21
|
+
};
|
|
11
22
|
export {
|
|
12
|
-
|
|
23
|
+
x as MenuItemLabel
|
|
13
24
|
};
|