@altinn/altinn-components 0.44.4 → 0.45.1
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/ArrowUndo-hge1gMu8.js +24 -0
- package/dist/Button-B0t0vz2h.js +23 -0
- package/dist/Globe-BcPkcH4E.js +24 -0
- package/dist/Heading-By5DKz2H.js +12 -0
- package/dist/HeartFill-CYSrJ_xK.js +43 -0
- package/dist/PersonCircle-DlX_3kRO.js +24 -0
- package/dist/Spinner-BDXfwXIh.js +26 -0
- package/dist/assets/AccountMenuButton.css +1 -0
- package/dist/assets/AccountSelector.css +1 -0
- package/dist/assets/GlobalHeader.css +1 -0
- package/dist/assets/GlobalHeaderBase.css +1 -0
- package/dist/assets/GlobalMenuButton2.css +1 -0
- package/dist/assets/HeaderGroup2.css +1 -0
- package/dist/assets/HeaderLogo2.css +1 -0
- package/dist/assets/LayoutBody.css +1 -1
- package/dist/assets/NotificationItemBase.css +1 -0
- package/dist/assets/NotificationItemIcon.css +1 -0
- package/dist/assets/globalSearch.css +1 -0
- package/dist/components/Account/AccountListItemControls.js +22 -58
- package/dist/components/Account/AccountMenu.js +40 -36
- package/dist/components/Account/AccountMenuButton.js +131 -0
- package/dist/components/Account/AccountNotificationSettings.js +1 -1
- package/dist/components/Avatar/Avatar.js +23 -22
- package/dist/components/Bookmarks/BookmarksListItem.js +7 -9
- package/dist/components/Bookmarks/BookmarksSection.js +27 -23
- package/dist/components/Bookmarks/EditableBookmark.js +63 -78
- package/dist/components/Dashboard/DashboardHeader.js +1 -1
- package/dist/components/Dropdown/DrawerBase.js +17 -15
- package/dist/components/Dropdown/DropdownBase.js +14 -12
- package/dist/components/Dropdown/FloatingDropdown.js +6 -6
- package/dist/components/DsComponents/index.js +26 -22
- package/dist/components/Forms/Checkbox.js +1 -1
- package/dist/components/Forms/CheckboxOptions.js +1 -1
- package/dist/components/Forms/FieldBase.js +1 -1
- package/dist/components/Forms/FieldsetBase.js +1 -1
- package/dist/components/Forms/Radio.js +1 -1
- package/dist/components/Forms/RadioOptions.js +1 -1
- package/dist/components/Forms/SearchField.js +1 -1
- package/dist/components/Forms/SelectField.js +1 -1
- package/dist/components/Forms/Switch.js +1 -1
- package/dist/components/Forms/SwitchOptions.js +1 -1
- package/dist/components/Forms/TextField.js +1 -1
- package/dist/components/Forms/TextareaField.js +1 -1
- package/dist/components/GlobalHeader/AccountSelector.js +138 -0
- package/dist/components/GlobalHeader/DigdirLogomark.js +109 -0
- package/dist/components/GlobalHeader/GlobalHeader.js +117 -0
- package/dist/components/GlobalHeader/GlobalHeaderBase.js +22 -0
- package/dist/components/GlobalHeader/GlobalSearch.js +57 -0
- package/dist/components/GlobalHeader/GlobalSearchButton.js +53 -0
- package/dist/components/GlobalHeader/HeaderGroup.js +8 -0
- package/dist/components/GlobalHeader/HeaderLogo.js +17 -0
- package/dist/components/GlobalHeader/index.js +6 -0
- package/dist/components/GlobalMenu/BackButton.js +6 -24
- package/dist/components/GlobalMenu/EndUserLabel.js +10 -29
- package/dist/components/GlobalMenu/GlobalMenu.js +38 -61
- package/dist/components/GlobalMenu/GlobalMenuButton.js +69 -47
- package/dist/components/GlobalMenu/LocaleButton.js +12 -0
- package/dist/components/GlobalMenu/LocaleSwitcher.js +34 -0
- package/dist/components/GlobalMenu/index.js +6 -12
- package/dist/components/GlobalMenu_old/BackButton.js +11 -0
- package/dist/components/GlobalMenu_old/EndUserLabel.js +13 -0
- package/dist/components/GlobalMenu_old/GlobalMenu.js +75 -0
- package/dist/components/GlobalMenu_old/GlobalMenuBase.js +10 -0
- package/dist/components/GlobalMenu_old/GlobalMenuButton.js +58 -0
- package/dist/components/GlobalMenu_old/LogoutButton.js +14 -0
- package/dist/components/GlobalMenu_old/index.js +14 -0
- package/dist/components/Header/Header.js +25 -25
- package/dist/components/Header/LocaleButton.js +13 -30
- package/dist/components/Layout/Layout.js +25 -23
- package/dist/components/Layout/LayoutBody.js +1 -1
- package/dist/components/List/ListItemSelect.js +1 -1
- package/dist/components/Menu/MenuItem.js +1 -1
- package/dist/components/Menu/MenuSearch.js +2 -2
- package/dist/components/Notifications/NotificationItem.js +17 -0
- package/dist/components/Notifications/NotificationItemBase.js +86 -0
- package/dist/components/Notifications/NotificationItemControls.js +33 -0
- package/dist/components/Notifications/NotificationItemIcon.js +33 -0
- package/dist/components/Notifications/index.js +10 -0
- package/dist/components/RootProvider/RootProvider.js +42 -30
- package/dist/components/Searchbar/Searchbar.js +3 -3
- package/dist/components/Settings/BookmarksSettingsItem.js +1 -1
- package/dist/components/Settings/SettingsItem.js +22 -11
- package/dist/components/Toolbar/ToolbarAccountMenu.js +5 -5
- package/dist/components/Toolbar/ToolbarAdd.js +5 -5
- package/dist/components/Toolbar/ToolbarFilter.js +5 -5
- package/dist/components/Toolbar/ToolbarOptions.js +1 -1
- package/dist/components/Toolbar/ToolbarSearch.js +1 -1
- package/dist/components/index.js +305 -293
- package/dist/functions/date/date.js +16 -0
- package/dist/functions/date/date.spec.js +15 -0
- package/dist/functions/date/index.js +4 -0
- package/dist/functions/index.js +4 -2
- package/dist/globalSearch.module-Ejp7X0dO.js +9 -0
- package/dist/hooks/index.js +4 -2
- package/dist/hooks/useAccountSelector.js +214 -0
- package/dist/index-B6sKSsN9.js +2951 -0
- package/dist/index.js +304 -288
- package/dist/types/languageCode.js +1 -0
- package/dist/types/lib/components/Account/AccountMenu.d.ts +1 -1
- package/dist/types/lib/components/Account/AccountMenuButton.d.ts +11 -0
- package/dist/types/lib/components/Account/AccountMenuButton.stories.d.ts +31 -0
- package/dist/types/lib/components/Avatar/Avatar.d.ts +3 -1
- package/dist/types/lib/components/Avatar/Avatar.stories.d.ts +16 -1
- package/dist/types/lib/components/Bookmarks/BookmarksListItem.d.ts +1 -2
- package/dist/types/lib/components/Bookmarks/BookmarksListItem.stories.d.ts +1 -1
- package/dist/types/lib/components/Bookmarks/BookmarksSection.d.ts +3 -1
- package/dist/types/lib/components/Bookmarks/BookmarksSection.stories.d.ts +19 -1
- package/dist/types/lib/components/Bookmarks/EditableBookmark.d.ts +7 -3
- package/dist/types/lib/components/Dialog/SeenByLogItem.stories.d.ts +1 -0
- package/dist/types/lib/components/Dropdown/DrawerBase.d.ts +2 -1
- package/dist/types/lib/components/GlobalHeader/AccountSector.stories.d.ts +29 -0
- package/dist/types/lib/components/GlobalHeader/AccountSelector.d.ts +11 -0
- package/dist/types/lib/components/GlobalHeader/DigdirLogomark.d.ts +5 -0
- package/dist/types/lib/components/GlobalHeader/GlobalHeader.d.ts +20 -0
- package/dist/types/lib/components/GlobalHeader/GlobalHeader.stories.d.ts +27 -0
- package/dist/types/lib/components/GlobalHeader/GlobalHeaderBase.d.ts +9 -0
- package/dist/types/lib/components/GlobalHeader/GlobalSearch.d.ts +4 -0
- package/dist/types/lib/components/GlobalHeader/GlobalSearchButton.d.ts +4 -0
- package/dist/types/lib/components/GlobalHeader/HeaderGroup.d.ts +6 -0
- package/dist/types/lib/components/GlobalHeader/HeaderLogo.d.ts +10 -0
- package/dist/types/lib/components/GlobalHeader/index.d.ts +2 -0
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.d.ts +3 -5
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +6 -8
- package/dist/types/lib/components/GlobalMenu/GlobalMenuButton.d.ts +2 -3
- package/dist/types/lib/components/GlobalMenu/GlobalMenuButton.stories.d.ts +5 -9
- package/dist/types/lib/components/GlobalMenu/LocaleButton.d.ts +3 -0
- package/dist/types/lib/components/GlobalMenu/LocaleSwitcher.d.ts +7 -0
- package/dist/types/lib/components/GlobalMenu/index.d.ts +1 -4
- package/dist/types/lib/components/GlobalMenu_old/BackButton.d.ts +7 -0
- package/dist/types/lib/components/{GlobalMenu → GlobalMenu_old}/CurrentAccount.d.ts +1 -1
- package/dist/types/lib/components/GlobalMenu_old/EndUserLabel.d.ts +5 -0
- package/dist/types/lib/components/GlobalMenu_old/GlobalMenu.d.ts +18 -0
- package/dist/types/lib/components/GlobalMenu_old/GlobalMenu.stories.d.ts +30 -0
- package/dist/types/lib/components/GlobalMenu_old/GlobalMenuBase.d.ts +15 -0
- package/dist/types/lib/components/GlobalMenu_old/GlobalMenuButton.d.ts +13 -0
- package/dist/types/lib/components/GlobalMenu_old/GlobalMenuButton.stories.d.ts +19 -0
- package/dist/types/lib/components/GlobalMenu_old/LogoutButton.d.ts +7 -0
- package/dist/types/lib/components/GlobalMenu_old/index.d.ts +6 -0
- package/dist/types/lib/components/Header/Header.d.ts +2 -2
- package/dist/types/lib/components/Header/Header.stories.d.ts +2 -2
- package/dist/types/lib/components/Layout/Layout.d.ts +4 -2
- package/dist/types/lib/components/Layout/Layout.stories.d.ts +29 -5
- package/dist/types/lib/components/Notifications/NotificationItem.d.ts +7 -0
- package/dist/types/lib/components/Notifications/NotificationItemBase.d.ts +15 -0
- package/dist/types/lib/components/Notifications/NotificationItemControls.d.ts +10 -0
- package/dist/types/lib/components/Notifications/NotificationItemIcon.d.ts +11 -0
- package/dist/types/lib/components/Notifications/Notifications.stories.d.ts +10 -0
- package/dist/types/lib/components/Notifications/index.d.ts +4 -0
- package/dist/types/lib/components/RootProvider/RootProvider.d.ts +9 -4
- package/dist/types/lib/components/Settings/SettingsItem.d.ts +1 -1
- package/dist/types/lib/components/index.d.ts +2 -1
- package/dist/types/lib/functions/date/date.d.ts +6 -0
- package/dist/types/lib/functions/date/date.spec.d.ts +1 -0
- package/dist/types/lib/functions/date/index.d.ts +1 -0
- package/dist/types/lib/functions/index.d.ts +1 -0
- package/dist/types/lib/hooks/index.d.ts +1 -0
- package/dist/types/lib/hooks/useAccountSelector.d.ts +62 -0
- package/dist/types/lib/types/index.d.ts +1 -0
- package/dist/types/lib/types/languageCode.d.ts +1 -0
- package/dist/usePagination-cq1YWZkE.js +889 -0
- package/package.json +1 -1
- package/dist/usePagination-B24SmI8E.js +0 -3835
- /package/dist/components/{GlobalMenu → GlobalMenu_old}/CurrentAccount.js +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
4
|
import "react";
|
|
5
|
+
import { useIsDesktop as H } from "../../hooks/useIsDesktop.js";
|
|
5
6
|
import { useRootContext as S } from "../RootProvider/RootProvider.js";
|
|
6
7
|
import { DropdownBase as k } from "../Dropdown/DropdownBase.js";
|
|
7
8
|
import { DrawerBase as B } from "../Dropdown/DrawerBase.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { HeaderBase as l } from "./HeaderBase.js";
|
|
9
|
+
import { GlobalMenu_old as f } from "../GlobalMenu_old/GlobalMenu.js";
|
|
10
|
+
import { GlobalMenuButton_old as D } from "../GlobalMenu_old/GlobalMenuButton.js";
|
|
11
|
+
import { HeaderBase as I } from "./HeaderBase.js";
|
|
12
12
|
import { HeaderLogo as F } from "./HeaderLogo.js";
|
|
13
13
|
import { HeaderGroup as G } from "./HeaderGroup.js";
|
|
14
14
|
import { HeaderSearch as w } from "./HeaderSearch.js";
|
|
15
15
|
import { LocaleSwitcher as L } from "./LocaleSwitcher.js";
|
|
16
|
-
import { Searchbar as
|
|
16
|
+
import { Searchbar as _ } from "../Searchbar/Searchbar.js";
|
|
17
17
|
import "../Snackbar/useSnackbar.js";
|
|
18
18
|
import '../../assets/Header.css';const N = "_drawer_afyu3_1", j = "_dropdown_afyu3_6", z = "_relative_afyu3_19", n = {
|
|
19
19
|
drawer: N,
|
|
@@ -21,38 +21,38 @@ import '../../assets/Header.css';const N = "_drawer_afyu3_1", j = "_dropdown_afy
|
|
|
21
21
|
relative: z
|
|
22
22
|
}, A = ({
|
|
23
23
|
globalMenu: e,
|
|
24
|
-
desktopMenu:
|
|
24
|
+
desktopMenu: x,
|
|
25
25
|
mobileMenu: C,
|
|
26
26
|
locale: p,
|
|
27
27
|
search: s,
|
|
28
28
|
currentAccount: t,
|
|
29
29
|
logo: u = {},
|
|
30
|
-
badge:
|
|
30
|
+
badge: l
|
|
31
31
|
}) => {
|
|
32
|
-
const { currentId: r, toggleId: i, openId:
|
|
33
|
-
|
|
32
|
+
const { currentId: r, toggleId: i, openId: v, closeAll: d } = S(), c = () => {
|
|
33
|
+
v("search");
|
|
34
34
|
}, a = () => {
|
|
35
35
|
i("search");
|
|
36
|
-
},
|
|
36
|
+
}, y = () => {
|
|
37
37
|
i("menu");
|
|
38
|
-
}, h =
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
|
|
38
|
+
}, h = H();
|
|
39
|
+
return /* @__PURE__ */ m(
|
|
40
|
+
I,
|
|
41
41
|
{
|
|
42
42
|
currentId: r,
|
|
43
43
|
open: r === "search" || r === "menu" || r === "locale",
|
|
44
|
-
onClose:
|
|
44
|
+
onClose: d,
|
|
45
45
|
children: [
|
|
46
|
-
/* @__PURE__ */ o(F, { ...u, badge:
|
|
47
|
-
s && h && /* @__PURE__ */ o(w, { expanded: r === "search", children: /* @__PURE__ */ o(
|
|
48
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ o(F, { ...u, badge: l }),
|
|
47
|
+
s && h && /* @__PURE__ */ o(w, { expanded: r === "search", children: /* @__PURE__ */ o(_, { ...s, expanded: r === "search", onClose: a, onFocus: c }) }),
|
|
48
|
+
/* @__PURE__ */ m(G, { children: [
|
|
49
49
|
p && /* @__PURE__ */ o(L, { ...p }),
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ m("div", { className: n.relative, children: [
|
|
51
51
|
/* @__PURE__ */ o(
|
|
52
|
-
|
|
52
|
+
D,
|
|
53
53
|
{
|
|
54
54
|
currentAccount: t,
|
|
55
|
-
onClick:
|
|
55
|
+
onClick: y,
|
|
56
56
|
expanded: r === "menu",
|
|
57
57
|
label: e == null ? void 0 : e.menuLabel
|
|
58
58
|
}
|
|
@@ -70,23 +70,23 @@ import '../../assets/Header.css';const N = "_drawer_afyu3_1", j = "_dropdown_afy
|
|
|
70
70
|
f,
|
|
71
71
|
{
|
|
72
72
|
...e,
|
|
73
|
-
menu:
|
|
73
|
+
menu: x || (e == null ? void 0 : e.menu),
|
|
74
74
|
currentAccount: t,
|
|
75
|
-
onClose:
|
|
75
|
+
onClose: d
|
|
76
76
|
}
|
|
77
77
|
)
|
|
78
78
|
}
|
|
79
79
|
)
|
|
80
80
|
] })
|
|
81
81
|
] }),
|
|
82
|
-
s && !h && /* @__PURE__ */ o(w, { expanded: r === "search", children: /* @__PURE__ */ o(
|
|
82
|
+
s && !h && /* @__PURE__ */ o(w, { expanded: r === "search", children: /* @__PURE__ */ o(_, { ...s, expanded: r === "search", onClose: a, onFocus: c }) }),
|
|
83
83
|
e && /* @__PURE__ */ o(B, { open: r === "menu", className: n.drawer, children: /* @__PURE__ */ o(
|
|
84
84
|
f,
|
|
85
85
|
{
|
|
86
86
|
...e,
|
|
87
87
|
menu: C || (e == null ? void 0 : e.menu),
|
|
88
88
|
currentAccount: t,
|
|
89
|
-
onClose:
|
|
89
|
+
onClose: d
|
|
90
90
|
}
|
|
91
91
|
) })
|
|
92
92
|
]
|
|
@@ -1,44 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i } from "react/jsx-runtime";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import
|
|
5
|
-
import { IconButton as
|
|
4
|
+
import "react";
|
|
5
|
+
import { IconButton as r } from "../Button/IconButton.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
7
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import {
|
|
9
|
-
import '../../assets/LocaleButton.css';
|
|
10
|
-
var o = {};
|
|
11
|
-
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
|
|
12
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
13
|
-
for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
|
|
14
|
-
n.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (o[t[r]] = e[t[r]]);
|
|
15
|
-
return o;
|
|
16
|
-
};
|
|
17
|
-
const f = c((e, n) => {
|
|
18
|
-
var { title: o, titleId: t } = e, r = d(e, ["title", "titleId"]);
|
|
19
|
-
let l = u();
|
|
20
|
-
return l = o ? t || "title-" + l : void 0, a.createElement(
|
|
21
|
-
"svg",
|
|
22
|
-
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": l }, r),
|
|
23
|
-
o ? a.createElement("title", { id: l }, o) : null,
|
|
24
|
-
a.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M2.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 12m6.74-7.683A8.28 8.28 0 0 0 4.65 8.25h3.719a41 41 0 0 1 .62-3.934m1.63-.452a41 41 0 0 0-.742 4.385h4.245a41 41 0 0 0-.743-4.385 8.3 8.3 0 0 0-2.76 0M8.24 14.25a34.5 34.5 0 0 1 0-4.5H4.06A8.3 8.3 0 0 0 3.75 12c0 .78.108 1.535.31 2.25zm1.503 0a33 33 0 0 1 0-4.5h4.514c.103 1.51.103 2.997 0 4.5zm-.754 5.433a41 41 0 0 1-.62-3.933h-3.72a8.28 8.28 0 0 0 4.34 3.933m1.631.452a41 41 0 0 1-.743-4.385h4.246a41 41 0 0 1-.743 4.385 8.3 8.3 0 0 1-2.76 0m5.141-5.885c.098-1.502.098-2.99 0-4.5h4.179c.202.715.31 1.47.31 2.25a8.3 8.3 0 0 1-.31 2.25zm-.75-9.933a8.28 8.28 0 0 1 4.34 3.933h-3.72a41 41 0 0 0-.62-3.933m0 15.366c.276-1.344.483-2.648.62-3.933h3.72a8.28 8.28 0 0 1-4.34 3.933", clipRule: "evenodd" })
|
|
25
|
-
);
|
|
26
|
-
}), s = "_button_utwi0_1", p = {
|
|
8
|
+
import { S as m } from "../../Globe-BcPkcH4E.js";
|
|
9
|
+
import '../../assets/LocaleButton.css';const s = "_button_utwi0_1", c = {
|
|
27
10
|
button: s
|
|
28
|
-
},
|
|
29
|
-
|
|
11
|
+
}, f = ({ id: t = "language-switcher", expanded: o, onClick: e, onBlurCapture: n }) => /* @__PURE__ */ i(
|
|
12
|
+
r,
|
|
30
13
|
{
|
|
31
|
-
className:
|
|
14
|
+
className: c.button,
|
|
32
15
|
size: "md",
|
|
33
|
-
icon:
|
|
16
|
+
icon: m,
|
|
34
17
|
iconSize: "md",
|
|
35
18
|
variant: "text",
|
|
36
|
-
selected:
|
|
37
|
-
onClick:
|
|
38
|
-
iconAltText: `Open ${
|
|
39
|
-
onBlurCapture:
|
|
19
|
+
selected: o,
|
|
20
|
+
onClick: e,
|
|
21
|
+
iconAltText: `Open ${t}`,
|
|
22
|
+
onBlurCapture: n
|
|
40
23
|
}
|
|
41
24
|
);
|
|
42
25
|
export {
|
|
43
|
-
|
|
26
|
+
f as LocaleButton
|
|
44
27
|
};
|
|
@@ -1,41 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as p, jsx as m } from "react/jsx-runtime";
|
|
3
|
-
import { LayoutBase as
|
|
4
|
-
import { LayoutBody as
|
|
5
|
-
import { LayoutContent as
|
|
6
|
-
import { LayoutSidebar as
|
|
7
|
-
import { Footer as
|
|
8
|
-
import {
|
|
3
|
+
import { LayoutBase as L } from "./LayoutBase.js";
|
|
4
|
+
import { LayoutBody as x } from "./LayoutBody.js";
|
|
5
|
+
import { LayoutContent as j } from "./LayoutContent.js";
|
|
6
|
+
import { LayoutSidebar as B } from "./LayoutSidebar.js";
|
|
7
|
+
import { Footer as C } from "../Footer/Footer.js";
|
|
8
|
+
import { GlobalHeader as F } from "../GlobalHeader/GlobalHeader.js";
|
|
9
9
|
import "../../index-L8X2o7IH.js";
|
|
10
10
|
import "react";
|
|
11
|
-
import { useRootContext as
|
|
12
|
-
import { Menu as
|
|
11
|
+
import { useRootContext as H } from "../RootProvider/RootProvider.js";
|
|
12
|
+
import { Menu as S } from "../Menu/Menu.js";
|
|
13
|
+
import { Header as G } from "../Header/Header.js";
|
|
13
14
|
import "../Snackbar/useSnackbar.js";
|
|
14
|
-
import { SkipLink as
|
|
15
|
-
const
|
|
15
|
+
import { SkipLink as I } from "../SkipLink/SkipLink.js";
|
|
16
|
+
const O = ({
|
|
16
17
|
color: c,
|
|
17
18
|
theme: f = "subtle",
|
|
18
|
-
header:
|
|
19
|
+
header: t,
|
|
19
20
|
footer: n,
|
|
20
21
|
sidebar: o,
|
|
21
|
-
content:
|
|
22
|
+
content: l = {},
|
|
22
23
|
children: y,
|
|
23
|
-
skipLink: r
|
|
24
|
+
skipLink: r,
|
|
25
|
+
useGlobalHeader: h = !1
|
|
24
26
|
}) => {
|
|
25
|
-
const { currentId:
|
|
26
|
-
return /* @__PURE__ */ p(
|
|
27
|
-
r && /* @__PURE__ */ m(
|
|
28
|
-
|
|
29
|
-
/* @__PURE__ */ p(
|
|
30
|
-
o && /* @__PURE__ */ p(
|
|
31
|
-
(o == null ? void 0 : o.menu) && /* @__PURE__ */ m(
|
|
27
|
+
const { currentId: u } = H();
|
|
28
|
+
return /* @__PURE__ */ p(L, { color: c, theme: u === "accountFullscreen" ? "default" : f, currentId: u, children: [
|
|
29
|
+
r && /* @__PURE__ */ m(I, { ...r }),
|
|
30
|
+
t && (h ? /* @__PURE__ */ m(F, { ...t }) : /* @__PURE__ */ m(G, { ...t })),
|
|
31
|
+
/* @__PURE__ */ p(x, { currentId: u, children: [
|
|
32
|
+
o && /* @__PURE__ */ p(B, { hidden: o == null ? void 0 : o.hidden, color: o == null ? void 0 : o.color, ...o, children: [
|
|
33
|
+
(o == null ? void 0 : o.menu) && /* @__PURE__ */ m(S, { ...o == null ? void 0 : o.menu }),
|
|
32
34
|
o == null ? void 0 : o.children
|
|
33
35
|
] }),
|
|
34
|
-
/* @__PURE__ */ m(
|
|
36
|
+
/* @__PURE__ */ m(j, { color: l == null ? void 0 : l.color, id: "main-content", children: y })
|
|
35
37
|
] }),
|
|
36
|
-
n && /* @__PURE__ */ m(
|
|
38
|
+
n && /* @__PURE__ */ m(C, { ...n })
|
|
37
39
|
] });
|
|
38
40
|
};
|
|
39
41
|
export {
|
|
40
|
-
|
|
42
|
+
O as Layout
|
|
41
43
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import '../../assets/LayoutBody.css';const s = "
|
|
2
|
+
import '../../assets/LayoutBody.css';const s = "_body_1voih_1", r = {
|
|
3
3
|
body: s
|
|
4
4
|
}, a = ({ currentId: o, children: t }) => /* @__PURE__ */ d("div", { className: r.body, "data-current-id": o, children: t });
|
|
5
5
|
export {
|
|
@@ -2,9 +2,9 @@ import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { c as r } from "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import "../Snackbar/useSnackbar.js";
|
|
6
5
|
import { Label as l } from "../Forms/Label.js";
|
|
7
6
|
import { Input as n } from "../Forms/Input.js";
|
|
7
|
+
import "../Snackbar/useSnackbar.js";
|
|
8
8
|
import '../../assets/ListItemSelect.css';const i = "_select_kfgnl_1", m = "_checkbox_kfgnl_19", t = {
|
|
9
9
|
select: i,
|
|
10
10
|
checkbox: m
|
|
@@ -60,8 +60,8 @@ import '../../assets/MenuItem.css';const R = "_controls_w98qm_46", U = "_linkIco
|
|
|
60
60
|
}
|
|
61
61
|
),
|
|
62
62
|
/* @__PURE__ */ i("span", { className: m.controls, children: [
|
|
63
|
-
!r && k,
|
|
64
63
|
!r && B(),
|
|
64
|
+
!r && k,
|
|
65
65
|
s && /* @__PURE__ */ n("span", { className: m.linkIcon, children: /* @__PURE__ */ n(
|
|
66
66
|
N,
|
|
67
67
|
{
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import "../RootProvider/RootProvider.js";
|
|
5
4
|
import { useIsDesktop as a } from "../../hooks/useIsDesktop.js";
|
|
6
|
-
import "../
|
|
5
|
+
import "../RootProvider/RootProvider.js";
|
|
7
6
|
import { SearchField as c } from "../Forms/SearchField.js";
|
|
7
|
+
import "../Snackbar/useSnackbar.js";
|
|
8
8
|
import '../../assets/MenuSearch.css';const l = "_field_1w1s0_1", n = {
|
|
9
9
|
field: l
|
|
10
10
|
}, x = ({
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import "../../index-L8X2o7IH.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import "../RootProvider/RootProvider.js";
|
|
5
|
+
import { NotificationItemBase as r } from "./NotificationItemBase.js";
|
|
6
|
+
import "../Snackbar/useSnackbar.js";
|
|
7
|
+
const x = ({
|
|
8
|
+
loading: m,
|
|
9
|
+
id: e = "notification",
|
|
10
|
+
icon: t,
|
|
11
|
+
title: i,
|
|
12
|
+
description: n,
|
|
13
|
+
...p
|
|
14
|
+
}) => m ? /* @__PURE__ */ o(r, { icon: t, title: i, loading: !0 }) : /* @__PURE__ */ o(r, { ...p, icon: t, title: i, description: n });
|
|
15
|
+
export {
|
|
16
|
+
x as NotificationItem
|
|
17
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as o, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import "../../index-L8X2o7IH.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import "../RootProvider/RootProvider.js";
|
|
5
|
+
import { getAriaLabelFromTitle as j } from "../Menu/MenuItemLabel.js";
|
|
6
|
+
import { ListItemBase as B } from "../List/ListItemBase.js";
|
|
7
|
+
import { ListItemLink as v } from "../List/ListItemLink.js";
|
|
8
|
+
import { ListItemLabel as y } from "../List/ListItemLabel.js";
|
|
9
|
+
import { NotificationItemControls as z } from "./NotificationItemControls.js";
|
|
10
|
+
import { NotificationItemIcon as A } from "./NotificationItemIcon.js";
|
|
11
|
+
import "../Snackbar/useSnackbar.js";
|
|
12
|
+
import '../../assets/NotificationItemBase.css';const C = "_item_w20tn_1", T = "_header_w20tn_24", g = "_link_w20tn_43", q = "_linkFocus_w20tn_47", D = "_controls_w20tn_56", t = {
|
|
13
|
+
item: C,
|
|
14
|
+
header: T,
|
|
15
|
+
link: g,
|
|
16
|
+
linkFocus: q,
|
|
17
|
+
controls: D
|
|
18
|
+
}, U = ({
|
|
19
|
+
as: s,
|
|
20
|
+
href: m,
|
|
21
|
+
ref: n,
|
|
22
|
+
disabled: a,
|
|
23
|
+
loading: e,
|
|
24
|
+
onClick: c,
|
|
25
|
+
onKeyPress: l,
|
|
26
|
+
tabIndex: _,
|
|
27
|
+
color: d,
|
|
28
|
+
variant: p,
|
|
29
|
+
icon: f,
|
|
30
|
+
iconBadge: h,
|
|
31
|
+
label: k,
|
|
32
|
+
title: i,
|
|
33
|
+
description: N,
|
|
34
|
+
highlightWords: L,
|
|
35
|
+
dismissable: b,
|
|
36
|
+
dismissLabel: I,
|
|
37
|
+
onDismiss: u,
|
|
38
|
+
contextMenu: w,
|
|
39
|
+
...F
|
|
40
|
+
}) => {
|
|
41
|
+
const x = F.ariaLabel || j(i);
|
|
42
|
+
return /* @__PURE__ */ o(B, { ref: n, className: t.item, color: d, variant: p, size: "md", children: /* @__PURE__ */ r("header", { className: t.header, children: [
|
|
43
|
+
/* @__PURE__ */ o(A, { icon: f, badge: h }),
|
|
44
|
+
/* @__PURE__ */ r(
|
|
45
|
+
v,
|
|
46
|
+
{
|
|
47
|
+
as: s,
|
|
48
|
+
href: m,
|
|
49
|
+
onClick: c,
|
|
50
|
+
onKeyPress: l,
|
|
51
|
+
tabIndex: _,
|
|
52
|
+
loading: e,
|
|
53
|
+
disabled: a || e,
|
|
54
|
+
ariaLabel: x,
|
|
55
|
+
className: t.link,
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ o("div", { className: t.linkFocus, "aria-hidden": "true" }),
|
|
58
|
+
/* @__PURE__ */ o(
|
|
59
|
+
y,
|
|
60
|
+
{
|
|
61
|
+
loading: e,
|
|
62
|
+
highlightWords: L,
|
|
63
|
+
className: t.label,
|
|
64
|
+
title: i,
|
|
65
|
+
description: N,
|
|
66
|
+
children: k
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ o(
|
|
73
|
+
z,
|
|
74
|
+
{
|
|
75
|
+
className: t.controls,
|
|
76
|
+
contextMenu: w,
|
|
77
|
+
dismissable: b,
|
|
78
|
+
dismissLabel: I,
|
|
79
|
+
onDismiss: u
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
] }) });
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
U as NotificationItemBase
|
|
86
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import "../../index-L8X2o7IH.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { IconButton as p } from "../Button/IconButton.js";
|
|
5
|
+
import { ContextMenu as f } from "../ContextMenu/ContextMenu.js";
|
|
6
|
+
import "../RootProvider/RootProvider.js";
|
|
7
|
+
import { ListItemControls as l } from "../List/ListItemControls.js";
|
|
8
|
+
import "../Snackbar/useSnackbar.js";
|
|
9
|
+
import { S as c } from "../../XMark-tKk6aExO.js";
|
|
10
|
+
const S = ({
|
|
11
|
+
className: r,
|
|
12
|
+
loading: i,
|
|
13
|
+
dismissable: m,
|
|
14
|
+
dismissLabel: n,
|
|
15
|
+
onDismiss: s,
|
|
16
|
+
contextMenu: o
|
|
17
|
+
}) => i ? null : /* @__PURE__ */ e(l, { className: r, children: [
|
|
18
|
+
o && /* @__PURE__ */ t(f, { ...o }),
|
|
19
|
+
m && /* @__PURE__ */ t(
|
|
20
|
+
p,
|
|
21
|
+
{
|
|
22
|
+
rounded: !0,
|
|
23
|
+
variant: "text",
|
|
24
|
+
icon: c,
|
|
25
|
+
iconAltText: n || "Dismiss",
|
|
26
|
+
onClick: s,
|
|
27
|
+
size: "xs"
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
] });
|
|
31
|
+
export {
|
|
32
|
+
S as NotificationItemControls
|
|
33
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as r, jsxs as o, Fragment as n } from "react/jsx-runtime";
|
|
2
|
+
import { isValidElement as p } from "react";
|
|
3
|
+
import { Icon as e, isIconProps as i } from "../Icon/Icon.js";
|
|
4
|
+
import "../../index-L8X2o7IH.js";
|
|
5
|
+
import { isAvatarProps as c, Avatar as l } from "../Avatar/Avatar.js";
|
|
6
|
+
import { isAvatarGroupProps as _, AvatarGroup as f } from "../Avatar/AvatarGroup.js";
|
|
7
|
+
import { Badge as v } from "../Badge/Badge.js";
|
|
8
|
+
import "../RootProvider/RootProvider.js";
|
|
9
|
+
import "../Snackbar/useSnackbar.js";
|
|
10
|
+
import { S as d } from "../../XMark-tKk6aExO.js";
|
|
11
|
+
import '../../assets/NotificationItemIcon.css';const u = "_icon_15rz1_1", g = "_shape_15rz1_11", h = "_avatar_15rz1_29", N = "_avatarGroup_15rz1_35", b = "_badge_15rz1_39", s = {
|
|
12
|
+
icon: u,
|
|
13
|
+
shape: g,
|
|
14
|
+
avatar: h,
|
|
15
|
+
avatarGroup: N,
|
|
16
|
+
badge: b
|
|
17
|
+
};
|
|
18
|
+
function z(t) {
|
|
19
|
+
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null || p(t);
|
|
20
|
+
}
|
|
21
|
+
const B = ({ loading: t, icon: a, badge: m }) => a ? t ? /* @__PURE__ */ r("div", { className: s.icon, children: /* @__PURE__ */ r(e, { svgElement: d, loading: !0 }) }) : /* @__PURE__ */ o("div", { className: s.icon, children: [
|
|
22
|
+
c(a) && /* @__PURE__ */ r(l, { ...a, className: s.avatar }) || _(a) && /* @__PURE__ */ r(f, { ...a, className: s.avatarGroup }) || i(a) && /* @__PURE__ */ o(n, { children: [
|
|
23
|
+
/* @__PURE__ */ r("span", { className: s.shape }),
|
|
24
|
+
/* @__PURE__ */ r(e, { ...a })
|
|
25
|
+
] }) || z(a) && a || /* @__PURE__ */ o(n, { children: [
|
|
26
|
+
/* @__PURE__ */ r("span", { className: s.shape }),
|
|
27
|
+
/* @__PURE__ */ r(e, { svgElement: a })
|
|
28
|
+
] }),
|
|
29
|
+
m && /* @__PURE__ */ r(v, { ...m, size: "xs", variant: "base", className: s.badge })
|
|
30
|
+
] }) : null;
|
|
31
|
+
export {
|
|
32
|
+
B as NotificationItemIcon
|
|
33
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NotificationItem as i } from "./NotificationItem.js";
|
|
2
|
+
import { NotificationItemBase as r } from "./NotificationItemBase.js";
|
|
3
|
+
import { NotificationItemControls as m } from "./NotificationItemControls.js";
|
|
4
|
+
import { NotificationItemIcon as a } from "./NotificationItemIcon.js";
|
|
5
|
+
export {
|
|
6
|
+
i as NotificationItem,
|
|
7
|
+
r as NotificationItemBase,
|
|
8
|
+
m as NotificationItemControls,
|
|
9
|
+
a as NotificationItemIcon
|
|
10
|
+
};
|
|
@@ -1,47 +1,59 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { createContext as
|
|
2
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as p, useState as C, useContext as x } from "react";
|
|
4
4
|
import { useEscapeKey as f } from "../../hooks/useEscapeKey.js";
|
|
5
5
|
import "../../index-L8X2o7IH.js";
|
|
6
|
-
import { SnackbarProvider as
|
|
7
|
-
const
|
|
6
|
+
import { SnackbarProvider as i } from "../Snackbar/useSnackbar.js";
|
|
7
|
+
const P = {
|
|
8
8
|
currentId: "",
|
|
9
9
|
previousId: "",
|
|
10
|
-
debug: !1
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
debug: !1,
|
|
11
|
+
setCurrentId: () => {
|
|
12
|
+
console.warn("setCurrentId called outside of RootProvider context");
|
|
13
|
+
},
|
|
14
|
+
setPreviousId: () => {
|
|
15
|
+
console.warn("setPreviousId called outside of RootProvider context");
|
|
16
|
+
},
|
|
17
|
+
languageCode: "nb"
|
|
18
|
+
}, g = p(P), A = ({ children: s, initialValue: o, debug: n, languageCode: t }) => {
|
|
19
|
+
const [d, c] = C((o == null ? void 0 : o.currentId) || ""), [u, r] = C((o == null ? void 0 : o.previousId) || "");
|
|
20
|
+
return /* @__PURE__ */ v(
|
|
21
|
+
g.Provider,
|
|
15
22
|
{
|
|
16
23
|
value: {
|
|
17
|
-
currentId:
|
|
18
|
-
setCurrentId:
|
|
19
|
-
setPreviousId:
|
|
20
|
-
previousId:
|
|
21
|
-
debug:
|
|
24
|
+
currentId: d,
|
|
25
|
+
setCurrentId: c,
|
|
26
|
+
setPreviousId: r,
|
|
27
|
+
previousId: u,
|
|
28
|
+
debug: n,
|
|
29
|
+
languageCode: t
|
|
22
30
|
},
|
|
23
|
-
children: /* @__PURE__ */
|
|
31
|
+
children: /* @__PURE__ */ v(i, { children: s })
|
|
24
32
|
}
|
|
25
33
|
);
|
|
26
|
-
},
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
}, E = () => {
|
|
35
|
+
const s = x(g);
|
|
36
|
+
if (!s)
|
|
37
|
+
throw new Error("useRootContext must be used within a RootProvider.");
|
|
38
|
+
const { currentId: o, setCurrentId: n, debug: t, setPreviousId: d, previousId: c, languageCode: u } = s, r = (e) => {
|
|
39
|
+
o && d(o), n(e);
|
|
40
|
+
}, l = (e) => {
|
|
41
|
+
t && console.debug(`useRootContext: toggleId called with value: ${e}`), r(o === e ? "" : e);
|
|
42
|
+
}, I = () => {
|
|
43
|
+
t && console.debug("useRootContext: closeAll called"), r("");
|
|
33
44
|
};
|
|
34
|
-
return f(
|
|
35
|
-
currentId:
|
|
36
|
-
previousId:
|
|
37
|
-
toggleId:
|
|
38
|
-
closeAll:
|
|
45
|
+
return f(I), {
|
|
46
|
+
currentId: o,
|
|
47
|
+
previousId: c,
|
|
48
|
+
toggleId: l,
|
|
49
|
+
closeAll: I,
|
|
39
50
|
openId: (e) => {
|
|
40
|
-
|
|
41
|
-
}
|
|
51
|
+
t && console.debug(`useRootContext: openId called with value: ${e}`), r(e);
|
|
52
|
+
},
|
|
53
|
+
languageCode: u
|
|
42
54
|
};
|
|
43
55
|
};
|
|
44
56
|
export {
|
|
45
57
|
A as RootProvider,
|
|
46
|
-
|
|
58
|
+
E as useRootContext
|
|
47
59
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as S, jsx as g } from "react/jsx-runtime";
|
|
2
2
|
import { useState as k } from "react";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useIsDesktop as v } from "../../hooks/useIsDesktop.js";
|
|
5
|
+
import { useRootContext as j } from "../RootProvider/RootProvider.js";
|
|
6
6
|
import { SearchbarBase as x } from "./SearchbarBase.js";
|
|
7
7
|
import { SearchbarField as D } from "./SearchbarField.js";
|
|
8
8
|
import { Autocomplete as P } from "./Autocomplete.js";
|
|
@@ -15,7 +15,7 @@ const K = ({
|
|
|
15
15
|
tabIndex: T,
|
|
16
16
|
...e
|
|
17
17
|
}) => {
|
|
18
|
-
const [i, l] = k(!1), { previousId: A, openId: B } =
|
|
18
|
+
const [i, l] = k(!1), { previousId: A, openId: B } = j(), F = v();
|
|
19
19
|
return /* @__PURE__ */ S(
|
|
20
20
|
x,
|
|
21
21
|
{
|
|
@@ -6,8 +6,8 @@ import { IconButton as z } from "../Button/IconButton.js";
|
|
|
6
6
|
import { ButtonGroup as b } from "../Button/ButtonGroup.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
8
|
import { QueryLabel as S } from "../Searchbar/QueryLabel.js";
|
|
9
|
-
import "../Snackbar/useSnackbar.js";
|
|
10
9
|
import { TextField as h } from "../Forms/TextField.js";
|
|
10
|
+
import "../Snackbar/useSnackbar.js";
|
|
11
11
|
import { SettingsItemBase as G } from "./SettingsItemBase.js";
|
|
12
12
|
import { SettingsModal as j } from "./SettingsModal.js";
|
|
13
13
|
import { S as C } from "../../MagnifyingGlass-bwVhw07z.js";
|