@altinn/altinn-components 0.56.19 → 0.56.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AccountSelector.css +1 -1
- package/dist/assets/AccountSelectorButton.css +1 -0
- package/dist/assets/BreadcrumbsLink.css +1 -1
- package/dist/assets/Dropdown.css +1 -1
- package/dist/assets/GlobalHeader.css +1 -1
- package/dist/assets/GlobalMenuButton2.css +1 -1
- package/dist/assets/HeaderLogo2.css +1 -1
- package/dist/assets/LayoutGrid.css +1 -1
- package/dist/assets/MenuItem.css +1 -1
- package/dist/assets/ModalBase.css +1 -1
- package/dist/assets/ModalFooter.css +1 -0
- package/dist/assets/SettingsSection.css +1 -1
- package/dist/components/Account/AccountMenu.js +20 -20
- package/dist/components/Bookmarks/BookmarkSettingsList.js +41 -11
- package/dist/components/Breadcrumbs/Breadcrumbs.js +29 -30
- package/dist/components/Breadcrumbs/BreadcrumbsLink.js +4 -4
- package/dist/components/Dropdown/Dropdown.js +10 -10
- package/dist/components/DsComponents/index.js +20 -21
- package/dist/components/GlobalHeader/AccountSelector.js +64 -124
- package/dist/components/GlobalHeader/AccountSelectorButton.js +127 -0
- package/dist/components/GlobalHeader/DigdirLogomark.js +23 -109
- package/dist/components/GlobalHeader/GlobalHeader.js +84 -117
- package/dist/components/GlobalHeader/GlobalMenuButton.js +64 -0
- package/dist/components/GlobalHeader/HeaderLogo.js +20 -13
- package/dist/components/GlobalHeader/index.js +2 -2
- package/dist/components/GlobalMenu/GlobalMenu.js +11 -10
- package/dist/components/GlobalMenu/index.js +2 -4
- package/dist/components/Layout/Layout.js +29 -29
- package/dist/components/Layout/LayoutGrid.js +3 -3
- package/dist/components/Menu/MenuItem.js +60 -60
- package/dist/components/Modal/ModalBase.js +35 -33
- package/dist/components/Modal/ModalFooter.js +7 -10
- package/dist/components/Modal/index.js +8 -6
- package/dist/components/Settings/SettingsItem.js +53 -35
- package/dist/components/Settings/SettingsItemBase.js +19 -20
- package/dist/components/Settings/SettingsSection.js +10 -10
- package/dist/components/index.js +89 -88
- package/dist/functions/index.js +6 -4
- package/dist/functions/orgno/index.js +4 -0
- package/dist/functions/orgno/orgno.js +4 -0
- package/dist/hooks/useAccountSelector.js +77 -75
- package/dist/index.js +88 -85
- package/dist/textfield-CNXt-27J.js +3403 -0
- package/dist/types/lib/components/Bookmarks/BookmarkSettingsItem.d.ts +2 -0
- package/dist/types/lib/components/Bookmarks/BookmarkSettingsList.d.ts +7 -1
- package/dist/types/lib/components/Bookmarks/BookmarkSettingsList.stories.d.ts +4 -1
- package/dist/types/lib/components/Breadcrumbs/Breadcrumbs.d.ts +3 -1
- package/dist/types/lib/components/Breadcrumbs/Breadcrumbs.stories.d.ts +1 -1
- package/dist/types/lib/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/types/lib/components/{Account/AccountMenuButton.d.ts → GlobalHeader/AccountSelectorButton.d.ts} +2 -2
- package/dist/types/lib/components/{Account/AccountMenuButton.stories.d.ts → GlobalHeader/AccountSelectorButton.stories.d.ts} +1 -1
- package/dist/types/lib/components/GlobalHeader/DigdirLogomark.d.ts +1 -2
- package/dist/types/lib/components/GlobalHeader/GlobalHeader.d.ts +1 -3
- package/dist/types/lib/components/GlobalHeader/GlobalHeader.stories.d.ts +1 -1
- package/dist/types/lib/components/{GlobalMenu → GlobalHeader}/GlobalMenuButton.d.ts +2 -2
- package/dist/types/lib/components/{GlobalMenu → GlobalHeader}/GlobalMenuButton.stories.d.ts +1 -1
- package/dist/types/lib/components/GlobalHeader/index.d.ts +1 -1
- package/dist/types/lib/components/GlobalMenu/index.d.ts +0 -1
- package/dist/types/lib/components/Layout/Layout.d.ts +1 -1
- package/dist/types/lib/components/Modal/ModalBase.d.ts +2 -1
- package/dist/types/lib/components/Modal/ModalFooter.d.ts +3 -3
- package/dist/types/lib/components/Modal/index.d.ts +1 -0
- package/dist/types/lib/components/Settings/SettingsModal.stories.d.ts +2 -1
- package/dist/types/lib/functions/index.d.ts +1 -0
- package/dist/types/lib/functions/orgno/index.d.ts +1 -0
- package/dist/types/lib/functions/orgno/orgno.d.ts +1 -0
- package/dist/types/lib/stories/Inbox.stories.d.ts +1 -1
- package/package.json +1 -1
- package/dist/assets/AccountMenuButton.css +0 -1
- package/dist/assets/GlobalHeaderBase.css +0 -1
- package/dist/assets/HeaderGroup2.css +0 -1
- package/dist/assets/globalSearch.css +0 -1
- package/dist/components/Account/AccountMenuButton.js +0 -134
- package/dist/components/GlobalHeader/GlobalHeaderBase.js +0 -24
- package/dist/components/GlobalHeader/GlobalSearch.js +0 -62
- package/dist/components/GlobalHeader/GlobalSearchButton.js +0 -54
- package/dist/components/GlobalHeader/HeaderGroup.js +0 -8
- package/dist/components/GlobalMenu/GlobalMenuButton.js +0 -83
- package/dist/globalSearch.module-DziLSGZg.js +0 -9
- package/dist/index--jNxJmA8.js +0 -2000
- package/dist/textfield-Drdr9bio.js +0 -1439
- package/dist/types/lib/components/GlobalHeader/GlobalHeaderBase.d.ts +0 -9
- package/dist/types/lib/components/GlobalHeader/GlobalSearch.d.ts +0 -4
- package/dist/types/lib/components/GlobalHeader/GlobalSearchButton.d.ts +0 -6
- package/dist/types/lib/components/GlobalHeader/HeaderGroup.d.ts +0 -6
|
@@ -1,138 +1,78 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { AccountMenu as L } from "../Account/AccountMenu.js";
|
|
7
|
-
import { Button as A } from "../Button/Button.js";
|
|
1
|
+
import { jsx as c, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { c as p } from "../../index-p1eeF8LQ.js";
|
|
3
|
+
import { useState as _, useEffect as g } from "react";
|
|
4
|
+
import { AccountMenu as w } from "../Account/AccountMenu.js";
|
|
5
|
+
import "../Button/Button.js";
|
|
8
6
|
import "react-dom";
|
|
9
|
-
import { useRootContext as
|
|
7
|
+
import { useRootContext as N } from "../RootProvider/RootProvider.js";
|
|
10
8
|
import "../Snackbar/useSnackbar.js";
|
|
11
|
-
import { S as
|
|
12
|
-
import { S as
|
|
13
|
-
import { H as
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
const D = z((e, l) => {
|
|
24
|
-
var { title: n, titleId: t } = e, r = $(e, ["title", "titleId"]);
|
|
25
|
-
let c = j();
|
|
26
|
-
return c = n ? t || "title-" + c : void 0, u.createElement(
|
|
27
|
-
"svg",
|
|
28
|
-
Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: l, "aria-labelledby": c }, r),
|
|
29
|
-
n ? u.createElement("title", { id: c }, n) : null,
|
|
30
|
-
u.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" })
|
|
31
|
-
);
|
|
32
|
-
});
|
|
33
|
-
var K = function(e, l) {
|
|
34
|
-
var n = {};
|
|
35
|
-
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && l.indexOf(t) < 0 && (n[t] = e[t]);
|
|
36
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
37
|
-
for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
|
|
38
|
-
l.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
|
|
39
|
-
return n;
|
|
40
|
-
};
|
|
41
|
-
const W = z((e, l) => {
|
|
42
|
-
var { title: n, titleId: t } = e, r = K(e, ["title", "titleId"]);
|
|
43
|
-
let c = j();
|
|
44
|
-
return c = n ? t || "title-" + c : void 0, u.createElement(
|
|
45
|
-
"svg",
|
|
46
|
-
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: l, "aria-labelledby": c }, r),
|
|
47
|
-
n ? u.createElement("title", { id: c }, n) : null,
|
|
48
|
-
u.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" })
|
|
49
|
-
);
|
|
50
|
-
}), q = "_accountSelector_lyp2e_1", G = "_heading_lyp2e_11", J = "_searchSection_lyp2e_17", Q = "_searchField_lyp2e_26", U = "_accountMenu_lyp2e_30", X = "_fullScreen_lyp2e_38", Y = "_virtualized_lyp2e_42", Z = "_btnIcon_lyp2e_46", ee = "_spinner_lyp2e_50", i = {
|
|
51
|
-
accountSelector: q,
|
|
52
|
-
heading: G,
|
|
53
|
-
searchSection: J,
|
|
54
|
-
searchField: Q,
|
|
55
|
-
accountMenu: U,
|
|
56
|
-
fullScreen: X,
|
|
57
|
-
virtualized: Y,
|
|
58
|
-
btnIcon: Z,
|
|
59
|
-
spinner: ee
|
|
60
|
-
}, ge = ({
|
|
9
|
+
import { S as A } from "../../SearchField-QTfebYdU.js";
|
|
10
|
+
import { S as L } from "../../button-BB5sYVKY.js";
|
|
11
|
+
import { H as M, S as F } from "../../switch-Cemfhx0H.js";
|
|
12
|
+
import '../../assets/AccountSelector.css';const T = "_accountSelector_139de_1", j = "_heading_139de_11", C = "_searchSection_139de_17", H = "_searchField_139de_26", V = "_accountMenu_139de_30", y = "_virtualized_139de_38", E = "_spinner_139de_47", r = {
|
|
13
|
+
accountSelector: T,
|
|
14
|
+
heading: j,
|
|
15
|
+
searchSection: C,
|
|
16
|
+
searchField: H,
|
|
17
|
+
accountMenu: V,
|
|
18
|
+
virtualized: y,
|
|
19
|
+
spinner: E
|
|
20
|
+
}, Z = ({
|
|
61
21
|
accountMenu: e,
|
|
62
|
-
forceOpenFullScreen:
|
|
63
|
-
className:
|
|
64
|
-
loading:
|
|
65
|
-
showDeletedUnits:
|
|
66
|
-
onShowDeletedUnitsChange:
|
|
22
|
+
forceOpenFullScreen: t,
|
|
23
|
+
className: i,
|
|
24
|
+
loading: v,
|
|
25
|
+
showDeletedUnits: s,
|
|
26
|
+
onShowDeletedUnitsChange: x
|
|
67
27
|
}) => {
|
|
68
|
-
const {
|
|
69
|
-
|
|
70
|
-
!
|
|
71
|
-
}, [
|
|
72
|
-
|
|
73
|
-
}, [
|
|
74
|
-
const {
|
|
75
|
-
|
|
76
|
-
}, N = (s) => {
|
|
77
|
-
e.onSelectAccount?.(s), g(), b(!1);
|
|
28
|
+
const { openId: o, closeAll: l, languageCode: d } = N(), [u, h] = _(""), [a, m] = _(t);
|
|
29
|
+
g(() => {
|
|
30
|
+
!t && a && l(), m(t);
|
|
31
|
+
}, [t]), g(() => {
|
|
32
|
+
a === !0 && o("account");
|
|
33
|
+
}, [a, o]);
|
|
34
|
+
const { searchText: S, heading: z, switchLabel: b } = I(d), k = (n) => {
|
|
35
|
+
e.onSelectAccount?.(n), l(), m(!1);
|
|
78
36
|
};
|
|
79
|
-
return
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
|
|
37
|
+
return v ? /* @__PURE__ */ c(L, { "aria-hidden": !0, "data-color": "neutral", className: r.spinner }) : /* @__PURE__ */ f("div", { className: p(i, r.accountSelector), children: [
|
|
38
|
+
/* @__PURE__ */ c(M, { "data-size": "sm", level: 2, className: r.heading, children: z }),
|
|
39
|
+
/* @__PURE__ */ f("div", { className: r.searchSection, children: [
|
|
40
|
+
/* @__PURE__ */ c(
|
|
41
|
+
A,
|
|
84
42
|
{
|
|
85
|
-
name:
|
|
86
|
-
placeholder:
|
|
87
|
-
value:
|
|
88
|
-
onChange: (
|
|
89
|
-
onClear: () =>
|
|
90
|
-
className:
|
|
43
|
+
name: S,
|
|
44
|
+
placeholder: S,
|
|
45
|
+
value: u,
|
|
46
|
+
onChange: (n) => h(n.target.value),
|
|
47
|
+
onClear: () => h(""),
|
|
48
|
+
className: r.searchField
|
|
91
49
|
}
|
|
92
50
|
),
|
|
93
|
-
|
|
94
|
-
|
|
51
|
+
s !== void 0 && /* @__PURE__ */ c(
|
|
52
|
+
F,
|
|
95
53
|
{
|
|
96
|
-
checked:
|
|
97
|
-
onChange: (
|
|
98
|
-
label:
|
|
54
|
+
checked: s,
|
|
55
|
+
onChange: (n) => x?.(n.target.checked),
|
|
56
|
+
label: b
|
|
99
57
|
}
|
|
100
58
|
)
|
|
101
59
|
] }),
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
|
|
60
|
+
/* @__PURE__ */ c("div", { className: p(r.accountMenu, e.virtualized && r.virtualized), children: /* @__PURE__ */ c(
|
|
61
|
+
w,
|
|
104
62
|
{
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
onSelectAccount: N,
|
|
115
|
-
keyboardEvents: !1,
|
|
116
|
-
search: {
|
|
117
|
-
hidden: !0,
|
|
118
|
-
name: "",
|
|
119
|
-
value: S,
|
|
120
|
-
getResultsLabel: (s) => ne(s, v)
|
|
121
|
-
},
|
|
122
|
-
scrollRefStyles: !o && e.virtualized ? { maxHeight: "calc(40vh)" } : void 0
|
|
123
|
-
}
|
|
124
|
-
)
|
|
63
|
+
...e,
|
|
64
|
+
onSelectAccount: k,
|
|
65
|
+
keyboardEvents: !1,
|
|
66
|
+
search: {
|
|
67
|
+
hidden: !0,
|
|
68
|
+
name: "",
|
|
69
|
+
value: u,
|
|
70
|
+
getResultsLabel: (n) => R(n, d)
|
|
71
|
+
}
|
|
125
72
|
}
|
|
126
|
-
)
|
|
127
|
-
f !== !0 && p && /* @__PURE__ */ a(A, { variant: "ghost", onClick: M, children: o ? /* @__PURE__ */ m(w, { children: [
|
|
128
|
-
/* @__PURE__ */ a(W, { className: i.btnIcon, "aria-hidden": "true" }),
|
|
129
|
-
k
|
|
130
|
-
] }) : /* @__PURE__ */ m(w, { children: [
|
|
131
|
-
/* @__PURE__ */ a(D, { className: i.btnIcon, "aria-hidden": "true" }),
|
|
132
|
-
C
|
|
133
|
-
] }) })
|
|
73
|
+
) })
|
|
134
74
|
] });
|
|
135
|
-
},
|
|
75
|
+
}, I = (e) => {
|
|
136
76
|
switch (e) {
|
|
137
77
|
case "nn":
|
|
138
78
|
return {
|
|
@@ -159,10 +99,10 @@ const W = z((e, l) => {
|
|
|
159
99
|
switchLabel: "Vis slettede"
|
|
160
100
|
};
|
|
161
101
|
}
|
|
162
|
-
},
|
|
163
|
-
const
|
|
164
|
-
return e === 0 ?
|
|
102
|
+
}, R = (e, t) => {
|
|
103
|
+
const i = t === "nb" || t === "nn";
|
|
104
|
+
return e === 0 ? i ? "Ingen treff" : "No hits" : i ? `${e} treff` : e === 1 ? "1 hit" : `${e} hits`;
|
|
165
105
|
};
|
|
166
106
|
export {
|
|
167
|
-
|
|
107
|
+
Z as AccountSelector
|
|
168
108
|
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i, jsxs as u } from "react/jsx-runtime";
|
|
3
|
+
import { c as d } from "../../index-p1eeF8LQ.js";
|
|
4
|
+
import g, { forwardRef as b, isValidElement as _ } from "react";
|
|
5
|
+
import { Avatar as p } from "../Avatar/Avatar.js";
|
|
6
|
+
import { Button as m } from "../Button/Button.js";
|
|
7
|
+
import "react-dom";
|
|
8
|
+
import { useRootContext as h } from "../RootProvider/RootProvider.js";
|
|
9
|
+
import "../Snackbar/useSnackbar.js";
|
|
10
|
+
import { S as v } from "../../XMark-tKk6aExO.js";
|
|
11
|
+
import { S as y } from "../../ChevronUpDown-DqGsU4MC.js";
|
|
12
|
+
import { u as k } from "../../useId-BVFxCjkq.js";
|
|
13
|
+
import '../../assets/AccountSelectorButton.css';var w = function(t, a) {
|
|
14
|
+
var o = {};
|
|
15
|
+
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && a.indexOf(e) < 0 && (o[e] = t[e]);
|
|
16
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
17
|
+
for (var l = 0, e = Object.getOwnPropertySymbols(t); l < e.length; l++)
|
|
18
|
+
a.indexOf(e[l]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[l]) && (o[e[l]] = t[e[l]]);
|
|
19
|
+
return o;
|
|
20
|
+
};
|
|
21
|
+
const N = b((t, a) => {
|
|
22
|
+
var { title: o, titleId: e } = t, l = w(t, ["title", "titleId"]);
|
|
23
|
+
let r = k();
|
|
24
|
+
return r = o ? e || "title-" + r : void 0, g.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: a, "aria-labelledby": r }, l),
|
|
27
|
+
o ? g.createElement("title", { id: r }, o) : null,
|
|
28
|
+
g.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M15.5 3.25a.75.75 0 0 0 0 1.5H19a.25.25 0 0 1 .25.25v14a.25.25 0 0 1-.25.25h-3.5a.75.75 0 0 0 0 1.5H19A1.75 1.75 0 0 0 20.75 19V5A1.75 1.75 0 0 0 19 3.25zM9.97 6.97a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 1 1-1.06-1.06l3.22-3.22H3.5a.75.75 0 0 1 0-1.5h9.69L9.97 8.03a.75.75 0 0 1 0-1.06", clipRule: "evenodd" })
|
|
29
|
+
);
|
|
30
|
+
}), O = "_button_18gkt_3", x = "_loginButton_18gkt_13", S = "_avatar_18gkt_17", j = "_label_18gkt_32", B = "_title_18gkt_37", E = "_description_18gkt_44", I = "_icon_18gkt_50", n = {
|
|
31
|
+
button: O,
|
|
32
|
+
loginButton: x,
|
|
33
|
+
avatar: S,
|
|
34
|
+
label: j,
|
|
35
|
+
title: B,
|
|
36
|
+
description: E,
|
|
37
|
+
icon: I
|
|
38
|
+
}, z = ({
|
|
39
|
+
className: t,
|
|
40
|
+
currentAccount: a,
|
|
41
|
+
expanded: o = !1,
|
|
42
|
+
minimized: e = !1,
|
|
43
|
+
loading: l = !1,
|
|
44
|
+
...r
|
|
45
|
+
}) => {
|
|
46
|
+
const { languageCode: f } = h(), c = L(f);
|
|
47
|
+
if (l)
|
|
48
|
+
return /* @__PURE__ */ i(
|
|
49
|
+
m,
|
|
50
|
+
{
|
|
51
|
+
...r,
|
|
52
|
+
as: "button",
|
|
53
|
+
type: "button",
|
|
54
|
+
variant: "ghost",
|
|
55
|
+
color: "company",
|
|
56
|
+
className: d(n.button, n.loading, t),
|
|
57
|
+
disabled: !0,
|
|
58
|
+
"aria-label": "loading",
|
|
59
|
+
children: /* @__PURE__ */ i(p, { name: "loading", loading: !0, className: n.avatar })
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
if (a) {
|
|
63
|
+
let s = a.description;
|
|
64
|
+
return a.role === "subunit" && typeof s == "string" && s && (s = `${s.split(",")[0]}, ${c.subunit}`), /* @__PURE__ */ u(
|
|
65
|
+
m,
|
|
66
|
+
{
|
|
67
|
+
...r,
|
|
68
|
+
as: "button",
|
|
69
|
+
type: "button",
|
|
70
|
+
variant: "ghost",
|
|
71
|
+
color: "company",
|
|
72
|
+
className: d(n.button, t),
|
|
73
|
+
"aria-label": o ? c.close : a.name,
|
|
74
|
+
"aria-expanded": o,
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ i(p, { ...a?.icon, className: n.avatar }),
|
|
77
|
+
!e && /* @__PURE__ */ u("div", { className: n.label, children: [
|
|
78
|
+
/* @__PURE__ */ i("span", { className: n.title, children: a.name }),
|
|
79
|
+
/* @__PURE__ */ i("span", { className: n.description, children: typeof s == "string" || _(s) ? s : null })
|
|
80
|
+
] }),
|
|
81
|
+
o ? /* @__PURE__ */ i(v, { className: n.icon, "aria-hidden": !0 }) : /* @__PURE__ */ i(y, { className: n.icon, "aria-hidden": !0 })
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
return o ? null : /* @__PURE__ */ u(
|
|
87
|
+
m,
|
|
88
|
+
{
|
|
89
|
+
...r,
|
|
90
|
+
as: "button",
|
|
91
|
+
type: "button",
|
|
92
|
+
variant: "ghost",
|
|
93
|
+
color: "company",
|
|
94
|
+
"aria-label": c.login,
|
|
95
|
+
className: d(n.button, n.loginButton, t),
|
|
96
|
+
"aria-expanded": o,
|
|
97
|
+
children: [
|
|
98
|
+
!e && /* @__PURE__ */ i("span", { className: n.label, children: c.login }),
|
|
99
|
+
/* @__PURE__ */ i(N, { className: n.icon, "aria-hidden": !0 })
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
}, L = (t) => {
|
|
104
|
+
switch (t) {
|
|
105
|
+
case "nn":
|
|
106
|
+
return {
|
|
107
|
+
login: "Logg inn",
|
|
108
|
+
close: "Lukk kontomeny",
|
|
109
|
+
subunit: "undereining"
|
|
110
|
+
};
|
|
111
|
+
case "en":
|
|
112
|
+
return {
|
|
113
|
+
login: "Log in",
|
|
114
|
+
close: "Close Account Menu",
|
|
115
|
+
subunit: "subunit"
|
|
116
|
+
};
|
|
117
|
+
default:
|
|
118
|
+
return {
|
|
119
|
+
login: "Logg inn",
|
|
120
|
+
close: "Lukk kontomeny",
|
|
121
|
+
subunit: "underenhet"
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
export {
|
|
126
|
+
z as AccountSelectorButton
|
|
127
|
+
};
|
|
@@ -1,111 +1,25 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
style: {
|
|
24
|
-
stroke: "none",
|
|
25
|
-
fillRule: "nonzero",
|
|
26
|
-
fill: "rgb(0%, 38.430786%, 72.157288%)",
|
|
27
|
-
fillOpacity: 1
|
|
28
|
-
},
|
|
29
|
-
d: "M 20.917969 28.097656 C 14.890625 29.082031 9.78125 23.96875 10.761719 17.941406 C 11.355469 14.296875 14.296875 11.355469 17.941406 10.761719 C 23.96875 9.78125 29.082031 14.890625 28.097656 20.917969 C 27.503906 24.5625 24.5625 27.503906 20.917969 28.097656 M 19.730469 7.0625 L 7.5625 7.0625 C 7.289063 7.0625 7.0625 7.289063 7.0625 7.5625 L 7.0625 31.296875 C 7.0625 31.574219 7.289063 31.796875 7.5625 31.796875 L 19.730469 31.796875 C 26.417969 31.644531 31.796875 26.164063 31.796875 19.429688 C 31.796875 12.695313 26.417969 7.214844 19.730469 7.0625 "
|
|
30
|
-
}
|
|
31
|
-
),
|
|
32
|
-
/* @__PURE__ */ C(
|
|
33
|
-
"path",
|
|
34
|
-
{
|
|
35
|
-
style: {
|
|
36
|
-
stroke: "none",
|
|
37
|
-
fillRule: "nonzero",
|
|
38
|
-
fill: "rgb(11.764526%, 16.862488%, 23.529053%)",
|
|
39
|
-
fillOpacity: 1
|
|
40
|
-
},
|
|
41
|
-
d: "M 46.734375 22.441406 L 52.929688 22.441406 C 53.03125 22.441406 53.066406 22.398438 53.035156 22.3125 L 50.109375 13.164063 C 50.0625 13.042969 49.972656 12.984375 49.839844 12.984375 C 49.710938 12.984375 49.628906 13.015625 49.59375 13.082031 L 46.632813 22.226563 C 46.601563 22.371094 46.632813 22.441406 46.734375 22.441406 M 48.464844 10.664063 L 51.769531 10.664063 C 51.839844 10.664063 51.894531 10.675781 51.941406 10.703125 L 57.753906 28.0625 C 57.789063 28.199219 57.742188 28.265625 57.621094 28.265625 L 55.03125 28.265625 C 54.980469 28.265625 54.933594 28.226563 54.898438 28.144531 L 53.753906 24.566406 L 46.058594 24.566406 C 45.988281 24.566406 45.941406 24.53125 45.90625 24.46875 L 44.746094 28.058594 C 44.714844 28.195313 44.679688 28.265625 44.632813 28.265625 L 42.539063 28.265625 C 42.4375 28.265625 42.390625 28.222656 42.40625 28.144531 L 48.304688 10.785156 C 48.339844 10.703125 48.394531 10.664063 48.464844 10.664063 "
|
|
42
|
-
}
|
|
43
|
-
),
|
|
44
|
-
/* @__PURE__ */ C(
|
|
45
|
-
"path",
|
|
46
|
-
{
|
|
47
|
-
style: {
|
|
48
|
-
stroke: "none",
|
|
49
|
-
fillRule: "nonzero",
|
|
50
|
-
fill: "rgb(11.764526%, 16.862488%, 23.529053%)",
|
|
51
|
-
fillOpacity: 1
|
|
52
|
-
},
|
|
53
|
-
d: "M 62.550781 10.785156 L 62.550781 28.140625 C 62.550781 28.222656 62.507813 28.265625 62.429688 28.265625 L 60.304688 28.265625 C 60.222656 28.265625 60.175781 28.222656 60.171875 28.140625 L 60.171875 10.785156 C 60.171875 10.703125 60.214844 10.664063 60.304688 10.664063 L 62.429688 10.664063 C 62.507813 10.664063 62.550781 10.703125 62.550781 10.785156 "
|
|
54
|
-
}
|
|
55
|
-
),
|
|
56
|
-
/* @__PURE__ */ C(
|
|
57
|
-
"path",
|
|
58
|
-
{
|
|
59
|
-
style: {
|
|
60
|
-
stroke: "none",
|
|
61
|
-
fillRule: "nonzero",
|
|
62
|
-
fill: "rgb(11.764526%, 16.862488%, 23.529053%)",
|
|
63
|
-
fillOpacity: 1
|
|
64
|
-
},
|
|
65
|
-
d: "M 72.621094 26.261719 L 72.621094 28.144531 C 72.621094 28.222656 72.574219 28.265625 72.488281 28.265625 L 70.570313 28.265625 C 68.390625 28.3125 67.292969 27.328125 67.285156 25.3125 L 67.285156 17.621094 C 67.285156 17.539063 67.246094 17.492188 67.164063 17.484375 L 64.941406 17.484375 C 64.859375 17.484375 64.820313 17.445313 64.820313 17.363281 L 64.820313 15.742188 C 64.820313 15.660156 64.859375 15.617188 64.941406 15.617188 L 67.164063 15.617188 C 67.246094 15.617188 67.285156 15.574219 67.285156 15.484375 L 67.285156 12.113281 C 67.285156 12.035156 67.332031 11.992188 67.421875 11.992188 L 69.542969 11.992188 C 69.625 11.992188 69.667969 12.035156 69.667969 12.113281 L 69.667969 15.484375 C 69.667969 15.566406 69.707031 15.609375 69.789063 15.617188 L 72.488281 15.617188 C 72.566406 15.617188 72.613281 15.660156 72.621094 15.742188 L 72.621094 17.363281 C 72.621094 17.445313 72.574219 17.484375 72.488281 17.484375 L 69.789063 17.484375 C 69.707031 17.484375 69.667969 17.53125 69.667969 17.621094 L 69.667969 24.894531 C 69.667969 25.726563 70.117188 26.140625 71.023438 26.140625 L 72.488281 26.140625 C 72.574219 26.140625 72.621094 26.183594 72.621094 26.261719 "
|
|
66
|
-
}
|
|
67
|
-
),
|
|
68
|
-
/* @__PURE__ */ C(
|
|
69
|
-
"path",
|
|
70
|
-
{
|
|
71
|
-
style: {
|
|
72
|
-
stroke: "none",
|
|
73
|
-
fillRule: "nonzero",
|
|
74
|
-
fill: "rgb(11.764526%, 16.862488%, 23.529053%)",
|
|
75
|
-
fillOpacity: 1
|
|
76
|
-
},
|
|
77
|
-
d: "M 77.539063 15.742188 L 77.539063 28.140625 C 77.539063 28.222656 77.5 28.265625 77.417969 28.265625 L 75.28125 28.265625 C 75.203125 28.265625 75.160156 28.222656 75.160156 28.140625 L 75.160156 15.742188 C 75.160156 15.660156 75.203125 15.617188 75.28125 15.617188 L 77.417969 15.617188 C 77.5 15.617188 77.539063 15.660156 77.539063 15.742188 M 77.796875 10.785156 L 77.796875 13.410156 C 77.796875 13.492188 77.75 13.535156 77.664063 13.542969 L 75.039063 13.542969 C 74.957031 13.542969 74.914063 13.5 74.914063 13.410156 L 74.914063 10.785156 C 74.914063 10.703125 74.957031 10.664063 75.039063 10.664063 L 77.664063 10.664063 C 77.75 10.664063 77.796875 10.703125 77.796875 10.785156 "
|
|
78
|
-
}
|
|
79
|
-
),
|
|
80
|
-
/* @__PURE__ */ C(
|
|
81
|
-
"path",
|
|
82
|
-
{
|
|
83
|
-
style: {
|
|
84
|
-
stroke: "none",
|
|
85
|
-
fillRule: "nonzero",
|
|
86
|
-
fill: "rgb(11.764526%, 16.862488%, 23.529053%)",
|
|
87
|
-
fillOpacity: 1
|
|
88
|
-
},
|
|
89
|
-
d: "M 81.105469 15.617188 L 82.984375 15.617188 C 83.035156 15.617188 83.074219 15.660156 83.105469 15.742188 L 83.363281 16.863281 C 83.386719 16.929688 83.433594 16.960938 83.496094 16.960938 C 83.5625 16.960938 83.609375 16.9375 83.644531 16.886719 C 84.375 15.871094 85.460938 15.363281 86.910156 15.363281 C 88.640625 15.363281 89.980469 15.914063 90.933594 17.023438 C 91.882813 18.128906 92.359375 19.546875 92.359375 21.269531 L 92.359375 28.140625 C 92.359375 28.222656 92.316406 28.265625 92.226563 28.265625 L 90.101563 28.265625 C 90.019531 28.265625 89.980469 28.222656 89.980469 28.140625 L 89.980469 21.269531 C 89.980469 20.203125 89.714844 19.304688 89.1875 18.574219 C 88.652344 17.847656 87.847656 17.488281 86.773438 17.488281 C 85.703125 17.488281 84.867188 17.855469 84.265625 18.597656 C 83.664063 19.335938 83.363281 20.226563 83.363281 21.269531 L 83.363281 28.140625 C 83.363281 28.222656 83.320313 28.265625 83.242188 28.265625 L 81.105469 28.265625 C 81.023438 28.265625 80.984375 28.222656 80.984375 28.140625 L 80.984375 15.742188 C 80.984375 15.660156 81.023438 15.617188 81.105469 15.617188 "
|
|
90
|
-
}
|
|
91
|
-
),
|
|
92
|
-
/* @__PURE__ */ C(
|
|
93
|
-
"path",
|
|
94
|
-
{
|
|
95
|
-
style: {
|
|
96
|
-
stroke: "none",
|
|
97
|
-
fillRule: "nonzero",
|
|
98
|
-
fill: "rgb(11.764526%, 16.862488%, 23.529053%)",
|
|
99
|
-
fillOpacity: 1
|
|
100
|
-
},
|
|
101
|
-
d: "M 95.421875 15.617188 L 97.304688 15.617188 C 97.351563 15.617188 97.394531 15.660156 97.425781 15.742188 L 97.683594 16.863281 C 97.707031 16.929688 97.75 16.960938 97.816406 16.960938 C 97.878906 16.960938 97.929688 16.9375 97.960938 16.886719 C 98.695313 15.871094 99.78125 15.363281 101.226563 15.363281 C 102.960938 15.363281 104.300781 15.914063 105.25 17.023438 C 106.203125 18.128906 106.679688 19.546875 106.679688 21.269531 L 106.679688 28.140625 C 106.679688 28.222656 106.632813 28.265625 106.542969 28.265625 L 104.421875 28.265625 C 104.339844 28.265625 104.296875 28.222656 104.296875 28.140625 L 104.296875 21.269531 C 104.296875 20.203125 104.035156 19.304688 103.507813 18.574219 C 102.96875 17.847656 102.164063 17.488281 101.09375 17.488281 C 100.023438 17.488281 99.183594 17.855469 98.582031 18.597656 C 97.984375 19.335938 97.683594 20.226563 97.683594 21.269531 L 97.683594 28.140625 C 97.683594 28.222656 97.640625 28.265625 97.558594 28.265625 L 95.421875 28.265625 C 95.34375 28.265625 95.300781 28.222656 95.300781 28.140625 L 95.300781 15.742188 C 95.300781 15.660156 95.339844 15.617188 95.421875 15.617188 "
|
|
102
|
-
}
|
|
103
|
-
)
|
|
104
|
-
] })
|
|
105
|
-
]
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
};
|
|
1
|
+
import { jsxs as o, jsx as C } from "react/jsx-runtime";
|
|
2
|
+
const e = ({ className: r, title: i = "Digdir logo" }) => /* @__PURE__ */ o(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
width: "1em",
|
|
6
|
+
height: "1em",
|
|
7
|
+
viewBox: "0 0 24 24",
|
|
8
|
+
fill: "none",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
className: r,
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ C("title", { children: i }),
|
|
13
|
+
/* @__PURE__ */ C(
|
|
14
|
+
"path",
|
|
15
|
+
{
|
|
16
|
+
d: "M12.3167 0H0.486059C0.357148 0 0.233518 0.0511029 0.142363 0.142066C0.0512097 0.23303 0 0.356402 0 0.485044V23.515C0 23.6436 0.0512097 23.767 0.142363 23.8579C0.233518 23.9489 0.357148 24 0.486059 24H12.3167C15.4455 23.9112 18.4163 22.6085 20.5979 20.3686C22.7795 18.1288 24 15.1284 24 12.0049C24 8.88133 22.7795 5.88089 20.5979 3.64106C18.4163 1.40122 15.4455 0.0985018 12.3167 0.00970113V0ZM13.4735 20.3815C11.6835 20.689 9.84199 20.4199 8.21543 19.6132C6.58891 18.8066 5.26188 17.5042 4.42651 15.8948C3.59114 14.2853 3.29078 12.4523 3.56892 10.6611C3.84707 8.86999 4.68929 7.2137 5.97362 5.93205C7.25795 4.6504 8.91774 3.80994 10.7126 3.53237C12.5075 3.25481 14.3444 3.55454 15.9572 4.38817C17.57 5.2218 18.875 6.54605 19.6834 8.16918C20.4918 9.79233 20.7614 11.6301 20.4534 13.4163C20.1535 15.1547 19.3216 16.7576 18.0717 18.0049C16.8218 19.2521 15.2155 20.0824 13.4735 20.3815Z",
|
|
17
|
+
fill: "currentColor"
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
);
|
|
109
23
|
export {
|
|
110
|
-
|
|
24
|
+
e as DigdirLogomark
|
|
111
25
|
};
|