@altinn/altinn-components 0.44.4 → 0.45.0
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/EditableBookmark.js +1 -1
- 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/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,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as a, jsxs as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { Skeleton as
|
|
6
|
-
import { fromStringToColor as
|
|
7
|
-
import '../../assets/Avatar.css';const
|
|
8
|
-
avatar:
|
|
9
|
-
shape:
|
|
10
|
-
label:
|
|
11
|
-
image:
|
|
12
|
-
deletedIcon:
|
|
13
|
-
},
|
|
2
|
+
import { jsx as a, jsxs as j } from "react/jsx-runtime";
|
|
3
|
+
import { c as y } from "../../index-L8X2o7IH.js";
|
|
4
|
+
import { useState as A } from "react";
|
|
5
|
+
import { Skeleton as E } from "../Skeleton/Skeleton.js";
|
|
6
|
+
import { fromStringToColor as q } from "./color.js";
|
|
7
|
+
import '../../assets/Avatar.css';const z = "_avatar_1en7r_1", B = "_shape_1en7r_20", H = "_label_1en7r_31", L = "_image_1en7r_41", M = "_deletedIcon_1en7r_47", r = {
|
|
8
|
+
avatar: z,
|
|
9
|
+
shape: B,
|
|
10
|
+
label: H,
|
|
11
|
+
image: L,
|
|
12
|
+
deletedIcon: M
|
|
13
|
+
}, J = (e) => typeof e == "object" && e !== null && "name" in e, K = ({
|
|
14
14
|
type: e = "person",
|
|
15
15
|
isParent: n,
|
|
16
16
|
isDeleted: m = !1,
|
|
@@ -24,12 +24,13 @@ import '../../assets/Avatar.css';const q = "_avatar_1en7r_1", z = "_shape_1en7r_
|
|
|
24
24
|
customLabel: v,
|
|
25
25
|
loading: c,
|
|
26
26
|
className: b,
|
|
27
|
+
colorKey: C,
|
|
27
28
|
style: i = {}
|
|
28
29
|
}) => {
|
|
29
|
-
const [
|
|
30
|
+
const [I, w] = A(!1), x = u || e === "person" ? "circle" : "square", N = g || e === "person" ? "light" : "dark";
|
|
30
31
|
let o = _;
|
|
31
32
|
e === "company" && typeof n == "boolean" && (o = n ? "solid" : "outline");
|
|
32
|
-
const { backgroundColor: p, foregroundColor: d } =
|
|
33
|
+
const { backgroundColor: p, foregroundColor: d } = q(C ?? l, N), k = (l[0] ?? "").toUpperCase(), s = t && !I, S = !c && !s ? {
|
|
33
34
|
...i,
|
|
34
35
|
backgroundColor: o === "outline" ? d : p,
|
|
35
36
|
color: o === "outline" ? p : d
|
|
@@ -37,12 +38,12 @@ import '../../assets/Avatar.css';const q = "_avatar_1en7r_1", z = "_shape_1en7r_
|
|
|
37
38
|
return /* @__PURE__ */ a(
|
|
38
39
|
"div",
|
|
39
40
|
{
|
|
40
|
-
className:
|
|
41
|
-
style:
|
|
42
|
-
"data-shape":
|
|
41
|
+
className: y(r.avatar, b),
|
|
42
|
+
style: S,
|
|
43
|
+
"data-shape": x,
|
|
43
44
|
"data-size": h,
|
|
44
45
|
"aria-hidden": !0,
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
+
children: /* @__PURE__ */ j(E, { loading: c, className: r.shape, variant: "circle", children: [
|
|
46
47
|
/* @__PURE__ */ a("div", { className: r.shape, "data-variant": o, children: s && /* @__PURE__ */ a(
|
|
47
48
|
"img",
|
|
48
49
|
{
|
|
@@ -50,11 +51,11 @@ import '../../assets/Avatar.css';const q = "_avatar_1en7r_1", z = "_shape_1en7r_
|
|
|
50
51
|
className: r.image,
|
|
51
52
|
alt: f || t,
|
|
52
53
|
onError: () => {
|
|
53
|
-
|
|
54
|
+
w(!0);
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
) }),
|
|
57
|
-
!s && /* @__PURE__ */ a("span", { className: r.label, children: v ||
|
|
58
|
+
!s && /* @__PURE__ */ a("span", { className: r.label, children: v || k }),
|
|
58
59
|
m && /* @__PURE__ */ a(
|
|
59
60
|
"svg",
|
|
60
61
|
{
|
|
@@ -73,6 +74,6 @@ import '../../assets/Avatar.css';const q = "_avatar_1en7r_1", z = "_shape_1en7r_
|
|
|
73
74
|
);
|
|
74
75
|
};
|
|
75
76
|
export {
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
K as Avatar,
|
|
78
|
+
J as isAvatarProps
|
|
78
79
|
};
|
|
@@ -7,9 +7,9 @@ import { IconButton as C } from "../Button/IconButton.js";
|
|
|
7
7
|
import { BookmarksListItem as L } from "./BookmarksListItem.js";
|
|
8
8
|
import "../RootProvider/RootProvider.js";
|
|
9
9
|
import { QueryLabel as j } from "../Searchbar/QueryLabel.js";
|
|
10
|
+
import { TextField as F } from "../Forms/TextField.js";
|
|
10
11
|
import "../Snackbar/useSnackbar.js";
|
|
11
12
|
import { Flex as x } from "../Page/Flex.js";
|
|
12
|
-
import { TextField as F } from "../Forms/TextField.js";
|
|
13
13
|
import { SettingsModal as M } from "../Settings/SettingsModal.js";
|
|
14
14
|
import { S as O } from "../../Pencil-BVHLEoQy.js";
|
|
15
15
|
import { S as h } from "../../MagnifyingGlass-bwVhw07z.js";
|
|
@@ -9,7 +9,7 @@ import "../Snackbar/useSnackbar.js";
|
|
|
9
9
|
import { Flex as t } from "../Page/Flex.js";
|
|
10
10
|
import { Section as d } from "../Page/Section.js";
|
|
11
11
|
import { DashboardIcon as h } from "./DashboardIcon.js";
|
|
12
|
-
const H = ({ icon: i, title: m, description: p, loading: r, children: s }) => /* @__PURE__ */ o(d, { as: "header", theme: "default", padding: "page", spacing: 6, shadow: "xs",
|
|
12
|
+
const H = ({ icon: i, title: m, description: p, loading: r, children: s }) => /* @__PURE__ */ o(d, { as: "header", theme: "default", padding: "page", spacing: 6, shadow: "xs", children: [
|
|
13
13
|
/* @__PURE__ */ o(t, { direction: "row", align: "center", spacing: 3, children: [
|
|
14
14
|
i && /* @__PURE__ */ e(h, { loading: r, icon: i }),
|
|
15
15
|
/* @__PURE__ */ o(t, { direction: "col", spacing: 0, children: [
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import '../../assets/DrawerBase.css';const
|
|
4
|
-
drawer:
|
|
5
|
-
},
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { c as s } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import '../../assets/DrawerBase.css';const c = "_drawer_tvpob_1", m = {
|
|
4
|
+
drawer: c
|
|
5
|
+
}, w = ({
|
|
6
6
|
placement: a = "inline",
|
|
7
|
-
open:
|
|
8
|
-
className:
|
|
9
|
-
children:
|
|
10
|
-
as:
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
open: t = !1,
|
|
8
|
+
className: e,
|
|
9
|
+
children: o,
|
|
10
|
+
as: r = "div",
|
|
11
|
+
dataLayout: n = "mobile"
|
|
12
|
+
}) => /* @__PURE__ */ d(
|
|
13
|
+
r,
|
|
13
14
|
{
|
|
14
|
-
className:
|
|
15
|
+
className: s(m.drawer, e),
|
|
15
16
|
"data-placement": a,
|
|
16
17
|
"data-variant": "default",
|
|
17
18
|
"data-color": "company",
|
|
18
|
-
"data-expanded":
|
|
19
|
-
|
|
19
|
+
"data-expanded": t,
|
|
20
|
+
"data-layout": n,
|
|
21
|
+
children: o
|
|
20
22
|
}
|
|
21
23
|
);
|
|
22
24
|
export {
|
|
23
|
-
|
|
25
|
+
w as DrawerBase
|
|
24
26
|
};
|
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { useClickOutside as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { useRef as l } from "react";
|
|
4
|
+
import { useClickOutside as f } from "../../hooks/useClickOutside.js";
|
|
5
|
+
import "../RootProvider/RootProvider.js";
|
|
6
|
+
import "../Snackbar/useSnackbar.js";
|
|
5
7
|
import '../../assets/DropdownBase.css';const u = "_dropdown_1tyzv_1", w = {
|
|
6
8
|
dropdown: u
|
|
7
|
-
},
|
|
9
|
+
}, g = ({
|
|
8
10
|
layout: t,
|
|
9
11
|
size: a = "auto",
|
|
10
12
|
placement: d = "left",
|
|
11
13
|
padding: e = !0,
|
|
12
|
-
open:
|
|
13
|
-
className:
|
|
14
|
+
open: r = !1,
|
|
15
|
+
className: n,
|
|
14
16
|
children: s,
|
|
15
17
|
onClose: p,
|
|
16
18
|
as: m = "div"
|
|
17
19
|
}) => {
|
|
18
|
-
const o =
|
|
19
|
-
return
|
|
20
|
+
const o = l(null);
|
|
21
|
+
return f(o, p), /* @__PURE__ */ i(
|
|
20
22
|
m,
|
|
21
23
|
{
|
|
22
24
|
ref: o,
|
|
23
|
-
className:
|
|
25
|
+
className: c(w.dropdown, n),
|
|
24
26
|
"data-layout": t,
|
|
25
27
|
"data-theme": "default",
|
|
26
28
|
"data-shadow": "md",
|
|
27
29
|
"data-size": a,
|
|
28
30
|
"data-placement": d,
|
|
29
31
|
"data-padding": e,
|
|
30
|
-
"data-expanded":
|
|
32
|
+
"data-expanded": r,
|
|
31
33
|
children: s
|
|
32
34
|
}
|
|
33
35
|
);
|
|
34
36
|
};
|
|
35
37
|
export {
|
|
36
|
-
|
|
38
|
+
g as DropdownBase
|
|
37
39
|
};
|
|
@@ -3,10 +3,10 @@ import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
|
3
3
|
import { useState as k, useRef as N } from "react";
|
|
4
4
|
import { useClickOutside as T } from "../../hooks/useClickOutside.js";
|
|
5
5
|
import { useEscapeKey as g } from "../../hooks/useEscapeKey.js";
|
|
6
|
-
import {
|
|
6
|
+
import { Icon as x } from "../Icon/Icon.js";
|
|
7
7
|
import "../../index-L8X2o7IH.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { ButtonBase as y } from "../Button/ButtonBase.js";
|
|
9
|
+
import { ButtonIcon as v } from "../Button/ButtonIcon.js";
|
|
10
10
|
import "../RootProvider/RootProvider.js";
|
|
11
11
|
import "../Snackbar/useSnackbar.js";
|
|
12
12
|
import '../../assets/FloatingDropdown.css';const B = "_container_1t2id_1", j = "_button_1t2id_13", z = "_dropdown_1t2id_21", E = "_dropdownItem_1t2id_45", O = "_itemTitle_1t2id_71", n = {
|
|
@@ -37,11 +37,11 @@ import '../../assets/FloatingDropdown.css';const B = "_container_1t2id_1", j = "
|
|
|
37
37
|
const a = e && s ? s : _;
|
|
38
38
|
return /* @__PURE__ */ m("div", { className: n.container, ref: l, children: [
|
|
39
39
|
e && /* @__PURE__ */ o("div", { className: n.dropdown, "data-color": d, children: h.map((t, r) => /* @__PURE__ */ m("button", { className: n.dropdownItem, onClick: C(t.onClick), type: "button", children: [
|
|
40
|
-
/* @__PURE__ */ o(
|
|
40
|
+
/* @__PURE__ */ o(x, { svgElement: t.icon, size: "md", color: "inherit" }),
|
|
41
41
|
/* @__PURE__ */ o("span", { className: n.itemTitle, children: t.title })
|
|
42
42
|
] }, r)) }),
|
|
43
43
|
/* @__PURE__ */ o(
|
|
44
|
-
|
|
44
|
+
y,
|
|
45
45
|
{
|
|
46
46
|
className: n.button,
|
|
47
47
|
variant: p,
|
|
@@ -51,7 +51,7 @@ import '../../assets/FloatingDropdown.css';const B = "_container_1t2id_1", j = "
|
|
|
51
51
|
"data-testid": I,
|
|
52
52
|
"aria-label": w,
|
|
53
53
|
"aria-expanded": e,
|
|
54
|
-
children: a && /* @__PURE__ */ o(
|
|
54
|
+
children: a && /* @__PURE__ */ o(v, { icon: a, size: f })
|
|
55
55
|
}
|
|
56
56
|
)
|
|
57
57
|
] });
|
|
@@ -1,30 +1,34 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { B as
|
|
3
|
-
import {
|
|
1
|
+
import { A as o } from "../../Alert-BzifOfXl.js";
|
|
2
|
+
import { B as D, C as r, a as t, b as i, D as p, L as n, c as x, d as f, P as m, e as g, f as d, S, g as l, T as P, u as b } from "../../usePagination-cq1YWZkE.js";
|
|
3
|
+
import { B as c } from "../../Button-B0t0vz2h.js";
|
|
4
|
+
import { D as C } from "../../index-D3Rt9ate.js";
|
|
5
|
+
import { H as k } from "../../Heading-By5DKz2H.js";
|
|
4
6
|
import { P as T } from "../../Paragraph-Bm-eoPYv.js";
|
|
5
|
-
import {
|
|
7
|
+
import { S as H } from "../../index-B6sKSsN9.js";
|
|
8
|
+
import { S as v } from "../../Spinner-BDXfwXIh.js";
|
|
9
|
+
import { V as I } from "../../index-CnWc2FNH.js";
|
|
6
10
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
o as DsAlert,
|
|
12
|
+
D as DsBadge,
|
|
13
|
+
c as DsButton,
|
|
14
|
+
r as DsCheckbox,
|
|
15
|
+
t as DsChip,
|
|
16
|
+
i as DsCombobox,
|
|
17
|
+
C as DsDetails,
|
|
14
18
|
p as DsDialog,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
k as DsHeading,
|
|
20
|
+
n as DsLink,
|
|
21
|
+
x as DsListItem,
|
|
18
22
|
f as DsListUnordered,
|
|
19
23
|
m as DsPagination,
|
|
20
24
|
T as DsParagraph,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
g as DsPopover,
|
|
26
|
+
H as DsSearch,
|
|
27
|
+
d as DsSkeleton,
|
|
28
|
+
v as DsSpinner,
|
|
25
29
|
S as DsSwitch,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
l as DsTabs,
|
|
31
|
+
P as DsTextfield,
|
|
32
|
+
I as DsValidationMessage,
|
|
33
|
+
b as useDsPagination
|
|
30
34
|
};
|
|
@@ -2,10 +2,10 @@ import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import "../Snackbar/useSnackbar.js";
|
|
6
5
|
import { Field as e } from "./Field.js";
|
|
7
6
|
import { Label as c } from "./Label.js";
|
|
8
7
|
import { Input as n } from "./Input.js";
|
|
8
|
+
import "../Snackbar/useSnackbar.js";
|
|
9
9
|
const l = ({ size: t, color: m, label: r, ...i }) => /* @__PURE__ */ p(e, { size: t, color: m, children: [
|
|
10
10
|
/* @__PURE__ */ o(n, { ...i, type: "checkbox" }),
|
|
11
11
|
!!r && /* @__PURE__ */ o(c, { children: r })
|
|
@@ -2,9 +2,9 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import "../Snackbar/useSnackbar.js";
|
|
6
5
|
import { Checkbox as i } from "./Checkbox.js";
|
|
7
6
|
import { OptionsBase as e } from "./OptionsBase.js";
|
|
7
|
+
import "../Snackbar/useSnackbar.js";
|
|
8
8
|
const b = ({ options: r = [], ...t }) => /* @__PURE__ */ o(e, { ...t, children: r.map((m, p) => /* @__PURE__ */ o(i, { ...m }, p)) });
|
|
9
9
|
export {
|
|
10
10
|
b as CheckboxOptions
|
|
@@ -3,9 +3,9 @@ import "../../index-L8X2o7IH.js";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import { Typography as e } from "../Typography/Typography.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import "../Snackbar/useSnackbar.js";
|
|
7
6
|
import { Field as n } from "./Field.js";
|
|
8
7
|
import { Label as c } from "./Label.js";
|
|
8
|
+
import "../Snackbar/useSnackbar.js";
|
|
9
9
|
const g = ({ size: r, color: p, label: o, helperText: i, children: t, ...s }) => /* @__PURE__ */ d(n, { size: r, color: p, ...s, children: [
|
|
10
10
|
o && /* @__PURE__ */ m(c, { size: r, children: o }),
|
|
11
11
|
t,
|
|
@@ -2,9 +2,9 @@ import { jsxs as i, jsx as m } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import "../Snackbar/useSnackbar.js";
|
|
6
5
|
import { Fieldset as e } from "./Fieldset.js";
|
|
7
6
|
import { Legend as p } from "./Legend.js";
|
|
7
|
+
import "../Snackbar/useSnackbar.js";
|
|
8
8
|
const h = ({ legend: r, children: o, ...t }) => /* @__PURE__ */ i(e, { ...t, children: [
|
|
9
9
|
!!r && /* @__PURE__ */ m(p, { children: r }),
|
|
10
10
|
o
|
|
@@ -2,10 +2,10 @@ import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import "../Snackbar/useSnackbar.js";
|
|
6
5
|
import { Field as e } from "./Field.js";
|
|
7
6
|
import { Label as d } from "./Label.js";
|
|
8
7
|
import { Input as n } from "./Input.js";
|
|
8
|
+
import "../Snackbar/useSnackbar.js";
|
|
9
9
|
const u = ({ size: i, color: t, label: r, ...m }) => /* @__PURE__ */ p(e, { size: i, color: t, children: [
|
|
10
10
|
/* @__PURE__ */ o(n, { ...m, type: "radio" }),
|
|
11
11
|
!!r && /* @__PURE__ */ o(d, { children: r })
|
|
@@ -2,9 +2,9 @@ import { jsx as m } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import "../Snackbar/useSnackbar.js";
|
|
6
5
|
import { Radio as o } from "./Radio.js";
|
|
7
6
|
import { OptionsBase as p } from "./OptionsBase.js";
|
|
7
|
+
import "../Snackbar/useSnackbar.js";
|
|
8
8
|
const R = ({ name: i, options: t = [], ...a }) => /* @__PURE__ */ m(p, { ...a, children: t.map((r, e) => /* @__PURE__ */ m(o, { name: (r == null ? void 0 : r.name) || i, ...r }, e)) });
|
|
9
9
|
export {
|
|
10
10
|
R as RadioOptions
|
|
@@ -4,9 +4,9 @@ import "../../index-L8X2o7IH.js";
|
|
|
4
4
|
import "react";
|
|
5
5
|
import { IconButton as f } from "../Button/IconButton.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import "../Snackbar/useSnackbar.js";
|
|
8
7
|
import { Input as _ } from "./Input.js";
|
|
9
8
|
import { FieldBase as d } from "./FieldBase.js";
|
|
9
|
+
import "../Snackbar/useSnackbar.js";
|
|
10
10
|
import { S as u } from "../../MagnifyingGlass-bwVhw07z.js";
|
|
11
11
|
import { S as k } from "../../XMark-tKk6aExO.js";
|
|
12
12
|
import '../../assets/SearchField.css';const g = "_field_zk1f7_1", h = "_icon_zk1f7_5", z = "_input_zk1f7_14", S = "_clear_zk1f7_24", o = {
|
|
@@ -2,9 +2,9 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import "../Snackbar/useSnackbar.js";
|
|
6
5
|
import { Select as i } from "./Select.js";
|
|
7
6
|
import { FieldBase as p } from "./FieldBase.js";
|
|
7
|
+
import "../Snackbar/useSnackbar.js";
|
|
8
8
|
const F = ({ size: r = "md", label: t, children: m, ...e }) => /* @__PURE__ */ o(p, { label: t, size: r, children: /* @__PURE__ */ o(i, { ...e, size: r, children: m }) });
|
|
9
9
|
export {
|
|
10
10
|
F as SelectField
|
|
@@ -2,10 +2,10 @@ import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import "../Snackbar/useSnackbar.js";
|
|
6
5
|
import { Field as c } from "./Field.js";
|
|
7
6
|
import { Label as h } from "./Label.js";
|
|
8
7
|
import { Input as n } from "./Input.js";
|
|
8
|
+
import "../Snackbar/useSnackbar.js";
|
|
9
9
|
const b = ({ reverse: t, size: i, color: m, label: r, ...p }) => /* @__PURE__ */ e(c, { size: i, color: m, reverse: t, children: [
|
|
10
10
|
/* @__PURE__ */ o(n, { ...p, type: "checkbox", role: "switch" }),
|
|
11
11
|
!!r && /* @__PURE__ */ o(h, { children: r })
|
|
@@ -2,9 +2,9 @@ import { jsx as m } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import "../Snackbar/useSnackbar.js";
|
|
6
5
|
import { Switch as s } from "./Switch.js";
|
|
7
6
|
import { OptionsBase as a } from "./OptionsBase.js";
|
|
7
|
+
import "../Snackbar/useSnackbar.js";
|
|
8
8
|
const O = ({ name: t, options: i = [], ...e }) => /* @__PURE__ */ m(a, { ...e, children: i.map((r, p) => /* @__PURE__ */ m(s, { name: (r == null ? void 0 : r.name) || t, ...r }, p)) });
|
|
9
9
|
export {
|
|
10
10
|
O as SwitchOptions
|
|
@@ -2,9 +2,9 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import "../Snackbar/useSnackbar.js";
|
|
6
5
|
import { Input as e } from "./Input.js";
|
|
7
6
|
import { FieldBase as n } from "./FieldBase.js";
|
|
7
|
+
import "../Snackbar/useSnackbar.js";
|
|
8
8
|
const F = ({ size: o, color: t, label: i, helperText: m, ...p }) => /* @__PURE__ */ r(n, { size: o, color: t, label: i, helperText: m, children: /* @__PURE__ */ r(e, { ...p }) });
|
|
9
9
|
export {
|
|
10
10
|
F as TextField
|
|
@@ -2,9 +2,9 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import "../Snackbar/useSnackbar.js";
|
|
6
5
|
import { Textarea as p } from "./Textarea.js";
|
|
7
6
|
import { FieldBase as a } from "./FieldBase.js";
|
|
7
|
+
import "../Snackbar/useSnackbar.js";
|
|
8
8
|
const F = ({ size: o, color: t, label: e, helperText: i, ...m }) => /* @__PURE__ */ r(a, { size: o, color: t, label: e, helperText: i, children: /* @__PURE__ */ r(p, { ...m }) });
|
|
9
9
|
export {
|
|
10
10
|
F as TextareaField
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o, jsxs as O } from "react/jsx-runtime";
|
|
3
|
+
import { c as g } from "../../index-L8X2o7IH.js";
|
|
4
|
+
import s, { forwardRef as v, useState as j, useEffect as z } from "react";
|
|
5
|
+
import { AccountMenu as C } from "../Account/AccountMenu.js";
|
|
6
|
+
import { Button as E } from "../Button/Button.js";
|
|
7
|
+
import { useRootContext as k } from "../RootProvider/RootProvider.js";
|
|
8
|
+
import "../Snackbar/useSnackbar.js";
|
|
9
|
+
import { SearchField as F } from "../Forms/SearchField.js";
|
|
10
|
+
import { S as N } from "../../Spinner-BDXfwXIh.js";
|
|
11
|
+
import { H as M } from "../../Heading-By5DKz2H.js";
|
|
12
|
+
import { u as _ } from "../../useId-BVFxCjkq.js";
|
|
13
|
+
import '../../assets/AccountSelector.css';var R = function(e, i) {
|
|
14
|
+
var r = {};
|
|
15
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && i.indexOf(t) < 0 && (r[t] = e[t]);
|
|
16
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
17
|
+
for (var n = 0, t = Object.getOwnPropertySymbols(e); n < t.length; n++)
|
|
18
|
+
i.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (r[t[n]] = e[t[n]]);
|
|
19
|
+
return r;
|
|
20
|
+
};
|
|
21
|
+
const P = v((e, i) => {
|
|
22
|
+
var { title: r, titleId: t } = e, n = R(e, ["title", "titleId"]);
|
|
23
|
+
let l = _();
|
|
24
|
+
return l = r ? t || "title-" + l : void 0, s.createElement(
|
|
25
|
+
"svg",
|
|
26
|
+
Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: i, "aria-labelledby": l }, n),
|
|
27
|
+
r ? s.createElement("title", { id: l }, r) : null,
|
|
28
|
+
s.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M3.75 12a8.25 8.25 0 1 1 16.5 0 8.25 8.25 0 0 1-16.5 0M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25m4.03 9.28-3.5 3.5a.75.75 0 0 1-1.06 0l-3.5-3.5a.75.75 0 0 1 .53-1.28h7a.75.75 0 0 1 .53 1.28m-2.34.22h-3.38L12 13.44z", clipRule: "evenodd" })
|
|
29
|
+
);
|
|
30
|
+
});
|
|
31
|
+
var A = function(e, i) {
|
|
32
|
+
var r = {};
|
|
33
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && i.indexOf(t) < 0 && (r[t] = e[t]);
|
|
34
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
35
|
+
for (var n = 0, t = Object.getOwnPropertySymbols(e); n < t.length; n++)
|
|
36
|
+
i.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (r[t[n]] = e[t[n]]);
|
|
37
|
+
return r;
|
|
38
|
+
};
|
|
39
|
+
const T = v((e, i) => {
|
|
40
|
+
var { title: r, titleId: t } = e, n = A(e, ["title", "titleId"]);
|
|
41
|
+
let l = _();
|
|
42
|
+
return l = r ? t || "title-" + l : void 0, s.createElement(
|
|
43
|
+
"svg",
|
|
44
|
+
Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: i, "aria-labelledby": l }, n),
|
|
45
|
+
r ? s.createElement("title", { id: l }, r) : null,
|
|
46
|
+
s.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M3.75 12a8.25 8.25 0 1 1 16.5 0 8.25 8.25 0 0 1-16.5 0M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25m.53 6.72a.75.75 0 0 0-1.06 0l-3.5 3.5a.75.75 0 0 0 .53 1.28h7a.75.75 0 0 0 .53-1.28zM12 10.56l1.69 1.69h-3.38z", clipRule: "evenodd" })
|
|
47
|
+
);
|
|
48
|
+
}), B = "_accountSelector_1f74n_1", H = "_heading_1f74n_11", V = "_searchSection_1f74n_17", D = "_searchField_1f74n_22", K = "_accountMenu_1f74n_26", L = "_fullScreen_1f74n_34", U = "_virtualized_1f74n_38", W = "_btnIcon_1f74n_42", $ = "_spinner_1f74n_46", c = {
|
|
49
|
+
accountSelector: B,
|
|
50
|
+
heading: H,
|
|
51
|
+
searchSection: V,
|
|
52
|
+
searchField: D,
|
|
53
|
+
accountMenu: K,
|
|
54
|
+
fullScreen: L,
|
|
55
|
+
virtualized: U,
|
|
56
|
+
btnIcon: W,
|
|
57
|
+
spinner: $
|
|
58
|
+
}, ie = ({ accountMenu: e, forceOpenFullScreen: i, className: r, loading: t }) => {
|
|
59
|
+
const { currentId: n, openId: l, toggleId: u, languageCode: S } = k(), a = n === "accountFullscreen", [f, m] = j(""), { minimize: b, fullscreen: w, searchText: h, heading: y } = q(S);
|
|
60
|
+
z(() => {
|
|
61
|
+
i === !0 && !a && l("accountFullscreen");
|
|
62
|
+
}, [i, a, l]);
|
|
63
|
+
const x = () => {
|
|
64
|
+
l(a ? "account" : "accountFullscreen");
|
|
65
|
+
}, I = (d) => {
|
|
66
|
+
var p;
|
|
67
|
+
(p = e.onSelectAccount) == null || p.call(e, d), u(a ? "accountFullscreen" : "account");
|
|
68
|
+
};
|
|
69
|
+
return t ? /* @__PURE__ */ o(N, { "aria-hidden": !0, "data-color": "neutral", className: c.spinner }) : /* @__PURE__ */ O("div", { className: g(r, c.accountSelector), children: [
|
|
70
|
+
a && /* @__PURE__ */ o(M, { "data-size": "md", level: 2, className: c.heading, children: y }),
|
|
71
|
+
/* @__PURE__ */ o("div", { className: c.searchSection, children: /* @__PURE__ */ o(
|
|
72
|
+
F,
|
|
73
|
+
{
|
|
74
|
+
name: h,
|
|
75
|
+
placeholder: h,
|
|
76
|
+
value: f,
|
|
77
|
+
onChange: (d) => m(d.target.value),
|
|
78
|
+
onClear: () => m(""),
|
|
79
|
+
className: c.searchField
|
|
80
|
+
}
|
|
81
|
+
) }),
|
|
82
|
+
/* @__PURE__ */ o(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
className: g(
|
|
86
|
+
c.accountMenu,
|
|
87
|
+
a && c.fullScreen,
|
|
88
|
+
e.isVirtualized && c.virtualized
|
|
89
|
+
),
|
|
90
|
+
children: /* @__PURE__ */ o(
|
|
91
|
+
C,
|
|
92
|
+
{
|
|
93
|
+
...e,
|
|
94
|
+
onSelectAccount: I,
|
|
95
|
+
keyboardEvents: !1,
|
|
96
|
+
search: { hidden: !0, name: "", value: f }
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
i !== !0 && /* @__PURE__ */ o(
|
|
102
|
+
E,
|
|
103
|
+
{
|
|
104
|
+
icon: a ? /* @__PURE__ */ o(T, { className: c.btnIcon, "aria-hidden": "true" }) : /* @__PURE__ */ o(P, { className: c.btnIcon, "aria-hidden": "true" }),
|
|
105
|
+
variant: "text",
|
|
106
|
+
onClick: x,
|
|
107
|
+
children: a ? b : w
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
] });
|
|
111
|
+
}, q = (e) => {
|
|
112
|
+
switch (e) {
|
|
113
|
+
case "nn":
|
|
114
|
+
return {
|
|
115
|
+
minimize: "Minimer",
|
|
116
|
+
fullscreen: "Vis i fullskjerm",
|
|
117
|
+
searchText: "Søk i aktørar",
|
|
118
|
+
heading: "Kven vil du representere?"
|
|
119
|
+
};
|
|
120
|
+
case "en":
|
|
121
|
+
return {
|
|
122
|
+
minimize: "Minimize",
|
|
123
|
+
fullscreen: "Show in fullscreen",
|
|
124
|
+
searchText: "Search in actors",
|
|
125
|
+
heading: "Who do you want to represent?"
|
|
126
|
+
};
|
|
127
|
+
default:
|
|
128
|
+
return {
|
|
129
|
+
minimize: "Minimer",
|
|
130
|
+
fullscreen: "Vis i fullskjerm",
|
|
131
|
+
searchText: "Søk i aktører",
|
|
132
|
+
heading: "Hvem vil du representere?"
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
export {
|
|
137
|
+
ie as AccountSelector
|
|
138
|
+
};
|