@altinn/altinn-components 0.38.12 → 0.38.14
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/LayoutContent.css +1 -1
- package/dist/components/Button/ButtonBase.js +18 -16
- package/dist/components/Button/ComboButton.js +27 -16
- package/dist/components/Dialog/DialogActions.js +8 -8
- package/dist/components/Layout/LayoutContent.js +1 -1
- package/dist/components/List/ListItemLabel.js +11 -11
- package/dist/components/Menu/MenuItemBase.js +19 -17
- package/dist/components/Modal/ModalHeader.js +33 -18
- package/dist/components/Modal/ModalIcon.js +22 -0
- package/dist/components/Modal/index.js +7 -5
- package/dist/components/Settings/SettingsModal.js +15 -0
- package/dist/components/Settings/index.js +2 -0
- package/dist/components/Snackbar/SnackbarBase.js +4 -4
- package/dist/components/Snackbar/SnackbarItem.js +11 -11
- package/dist/components/Toolbar/Toolbar.js +13 -13
- package/dist/components/Toolbar/ToolbarAccountMenu.js +17 -16
- package/dist/components/Toolbar/ToolbarButton.js +20 -18
- package/dist/components/index.js +57 -53
- package/dist/index.js +63 -59
- package/dist/types/lib/components/Account/AccountSettingsList.stories.d.ts +1 -1
- package/dist/types/lib/components/Button/ButtonBase.d.ts +2 -1
- package/dist/types/lib/components/Button/ComboButton.d.ts +2 -1
- package/dist/types/lib/components/Menu/MenuItem.d.ts +1 -0
- package/dist/types/lib/components/Menu/MenuItemBase.d.ts +2 -1
- package/dist/types/lib/components/Modal/Modal.stories.d.ts +2 -0
- package/dist/types/lib/components/Modal/ModalHeader.d.ts +4 -1
- package/dist/types/lib/components/Modal/ModalIcon.d.ts +9 -0
- package/dist/types/lib/components/Modal/index.d.ts +1 -0
- package/dist/types/lib/components/Settings/SettingsModal.d.ts +7 -0
- package/dist/types/lib/components/Settings/index.d.ts +1 -0
- package/dist/types/lib/components/Toolbar/ToolbarAccountMenu.d.ts +2 -1
- package/dist/types/lib/components/Toolbar/ToolbarButton.d.ts +2 -1
- package/dist/types/lib/components/Toolbar/ToolbarButton.stories.d.ts +1 -1
- package/dist/types/lib/stories/Admin/Settings.stories.d.ts +3 -2
- package/dist/types/lib/stories/Profile/Settings.stories.d.ts +3 -4
- package/dist/types/lib/stories/Profile.stories.d.ts +1 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._content_1xz06_1{overflow-wrap:anywhere;flex-grow:1;display:flex;flex-direction:column;width:100%;margin:0 auto}@media (min-width: 1024px){[aria-hidden=true]+._content_1xz06_1{padding:0 112px}}
|
|
@@ -1,39 +1,41 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import '../../assets/ButtonBase.css';const
|
|
4
|
-
button:
|
|
5
|
-
},
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { c as p } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import '../../assets/ButtonBase.css';const x = "_button_1q3ym_1", _ = {
|
|
4
|
+
button: x
|
|
5
|
+
}, C = ({
|
|
6
6
|
as: a,
|
|
7
7
|
color: o,
|
|
8
8
|
className: e,
|
|
9
|
-
children:
|
|
9
|
+
children: s,
|
|
10
10
|
disabled: t = !1,
|
|
11
|
-
ariaLabel:
|
|
11
|
+
ariaLabel: n,
|
|
12
12
|
size: r,
|
|
13
|
-
selected:
|
|
14
|
-
variant:
|
|
13
|
+
selected: d,
|
|
14
|
+
variant: c,
|
|
15
15
|
reverse: l = !1,
|
|
16
16
|
rounded: m = !1,
|
|
17
17
|
tabIndex: u = 0,
|
|
18
|
+
dataTestId: i,
|
|
18
19
|
...b
|
|
19
|
-
}) => /* @__PURE__ */
|
|
20
|
+
}) => /* @__PURE__ */ f(
|
|
20
21
|
a || "button",
|
|
21
22
|
{
|
|
22
23
|
tabIndex: u,
|
|
23
24
|
"data-size": r,
|
|
24
25
|
"data-color": o,
|
|
25
|
-
"data-variant":
|
|
26
|
+
"data-variant": c,
|
|
26
27
|
"data-reverse": l,
|
|
27
28
|
"data-rounded": m,
|
|
28
|
-
"data-selected":
|
|
29
|
+
"data-selected": d,
|
|
29
30
|
"aria-disabled": t,
|
|
30
31
|
disabled: t,
|
|
31
|
-
className:
|
|
32
|
-
"aria-label":
|
|
32
|
+
className: p(_.button, e),
|
|
33
|
+
"aria-label": n,
|
|
34
|
+
"data-testid": i,
|
|
33
35
|
...b,
|
|
34
|
-
children:
|
|
36
|
+
children: s
|
|
35
37
|
}
|
|
36
38
|
);
|
|
37
39
|
export {
|
|
38
|
-
|
|
40
|
+
C as ButtonBase
|
|
39
41
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsxs as k, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as v } from "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { ButtonBase as s } from "./ButtonBase.js";
|
|
5
|
-
import { ButtonLabel as
|
|
6
|
-
import { ButtonIcon as
|
|
5
|
+
import { ButtonLabel as x } from "./ButtonLabel.js";
|
|
6
|
+
import { ButtonIcon as B } from "./ButtonIcon.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
import '../../assets/ComboButton.css';const
|
|
10
|
-
button:
|
|
11
|
-
divider:
|
|
12
|
-
primary:
|
|
13
|
-
secondary:
|
|
14
|
-
},
|
|
9
|
+
import '../../assets/ComboButton.css';const h = "_button_kd2d3_1", N = "_divider_kd2d3_7", C = "_primary_kd2d3_14", j = "_secondary_kd2d3_15", r = {
|
|
10
|
+
button: h,
|
|
11
|
+
divider: N,
|
|
12
|
+
primary: C,
|
|
13
|
+
secondary: j
|
|
14
|
+
}, E = ({
|
|
15
15
|
variant: a = "solid",
|
|
16
16
|
color: n,
|
|
17
17
|
size: t,
|
|
@@ -25,8 +25,9 @@ import '../../assets/ComboButton.css';const B = "_button_kd2d3_1", h = "_divider
|
|
|
25
25
|
className: _,
|
|
26
26
|
ariaLabel: u,
|
|
27
27
|
onLabelClick: y,
|
|
28
|
-
onIconClick: b
|
|
29
|
-
|
|
28
|
+
onIconClick: b,
|
|
29
|
+
dataTestId: f
|
|
30
|
+
}) => /* @__PURE__ */ k(
|
|
30
31
|
s,
|
|
31
32
|
{
|
|
32
33
|
as: "div",
|
|
@@ -34,10 +35,20 @@ import '../../assets/ComboButton.css';const B = "_button_kd2d3_1", h = "_divider
|
|
|
34
35
|
variant: a,
|
|
35
36
|
color: n,
|
|
36
37
|
selected: e,
|
|
37
|
-
className:
|
|
38
|
+
className: v(r.button, _),
|
|
38
39
|
tabIndex: -1,
|
|
39
40
|
children: [
|
|
40
|
-
/* @__PURE__ */ o(
|
|
41
|
+
/* @__PURE__ */ o(
|
|
42
|
+
s,
|
|
43
|
+
{
|
|
44
|
+
ariaLabel: u,
|
|
45
|
+
size: t,
|
|
46
|
+
onClick: y,
|
|
47
|
+
className: r.primary,
|
|
48
|
+
dataTestId: f,
|
|
49
|
+
children: /* @__PURE__ */ o(x, { size: i, children: l || p })
|
|
50
|
+
}
|
|
51
|
+
),
|
|
41
52
|
/* @__PURE__ */ o("span", { "data-size": t, className: r.divider }),
|
|
42
53
|
/* @__PURE__ */ o(
|
|
43
54
|
s,
|
|
@@ -46,12 +57,12 @@ import '../../assets/ComboButton.css';const B = "_button_kd2d3_1", h = "_divider
|
|
|
46
57
|
className: r.secondary,
|
|
47
58
|
ariaLabel: m,
|
|
48
59
|
size: c || i,
|
|
49
|
-
children: d && /* @__PURE__ */ o(
|
|
60
|
+
children: d && /* @__PURE__ */ o(B, { icon: d })
|
|
50
61
|
}
|
|
51
62
|
)
|
|
52
63
|
]
|
|
53
64
|
}
|
|
54
65
|
);
|
|
55
66
|
export {
|
|
56
|
-
|
|
67
|
+
E as ComboButton
|
|
57
68
|
};
|
|
@@ -13,9 +13,9 @@ import '../../assets/DialogActions.css';const k = "_action_m3crc_1", I = "_combo
|
|
|
13
13
|
action: k,
|
|
14
14
|
comboButton: I
|
|
15
15
|
}, T = ({ items: c, maxItems: s = 2, id: l = "dialog-actions", expandAltLabel: a }) => {
|
|
16
|
-
const { currentId: d, closeAll: p, toggleId: u } = v(),
|
|
17
|
-
const
|
|
18
|
-
return
|
|
16
|
+
const { currentId: d, closeAll: p, toggleId: u } = v(), i = d === l, r = g(() => (c || []).filter((n) => !n.hidden).sort((n, o) => {
|
|
17
|
+
const e = ["primary", "secondary", "tertiary"];
|
|
18
|
+
return e.indexOf(n == null ? void 0 : n.priority) - e.indexOf(o == null ? void 0 : o.priority);
|
|
19
19
|
}), [c]);
|
|
20
20
|
if (!r.length || s <= 0)
|
|
21
21
|
return null;
|
|
@@ -32,21 +32,21 @@ import '../../assets/DialogActions.css';const k = "_action_m3crc_1", I = "_combo
|
|
|
32
32
|
C,
|
|
33
33
|
{
|
|
34
34
|
variant: "solid",
|
|
35
|
-
icon:
|
|
35
|
+
icon: i ? B : _,
|
|
36
36
|
size: "md",
|
|
37
37
|
onIconClick: () => u(l),
|
|
38
38
|
onLabelClick: r[0].onClick,
|
|
39
|
-
ariaLabel:
|
|
39
|
+
ariaLabel: i ? "chevron up icon" : "chevron down icon",
|
|
40
40
|
iconAltText: a,
|
|
41
41
|
children: r[0].label
|
|
42
42
|
}
|
|
43
43
|
),
|
|
44
|
-
/* @__PURE__ */ t(b, { open:
|
|
44
|
+
i && /* @__PURE__ */ t(b, { open: i, onClose: p, children: /* @__PURE__ */ t(x, { items: n }) })
|
|
45
45
|
] });
|
|
46
46
|
}
|
|
47
47
|
return /* @__PURE__ */ t("section", { className: m.action, children: r.map((n, o) => {
|
|
48
|
-
const { priority:
|
|
49
|
-
return /* @__PURE__ */ t(y, { variant:
|
|
48
|
+
const { priority: e, id: w, ...h } = n;
|
|
49
|
+
return /* @__PURE__ */ t(y, { variant: e === "primary" ? "solid" : "outline", size: "md", ...h, children: n.label }, "button-" + o);
|
|
50
50
|
}) });
|
|
51
51
|
};
|
|
52
52
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import '../../assets/LayoutContent.css';const e = "
|
|
2
|
+
import '../../assets/LayoutContent.css';const e = "_content_1xz06_1", s = {
|
|
3
3
|
content: e
|
|
4
4
|
}, r = ({ color: t, children: n, id: o = "main-content" }) => /* @__PURE__ */ c("main", { className: s.content, "data-color": t, id: o, children: n });
|
|
5
5
|
export {
|
|
@@ -4,8 +4,8 @@ import { isValidElement as N } from "react";
|
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
5
|
import { Heading as o } from "../Typography/Heading.js";
|
|
6
6
|
import "../Snackbar/useSnackbar.js";
|
|
7
|
-
import '../../assets/ListItemLabel.css';const
|
|
8
|
-
label:
|
|
7
|
+
import '../../assets/ListItemLabel.css';const w = "_label_1cju7_1", j = {
|
|
8
|
+
label: w
|
|
9
9
|
}, H = (r) => typeof r == "object" && r !== null && "children" in r;
|
|
10
10
|
function L(r) {
|
|
11
11
|
return typeof r == "string" || typeof r == "number" || typeof r == "boolean" || r === null || N(r);
|
|
@@ -30,7 +30,7 @@ const z = (r) => {
|
|
|
30
30
|
...s,
|
|
31
31
|
children: r
|
|
32
32
|
} : null;
|
|
33
|
-
},
|
|
33
|
+
}, V = ({
|
|
34
34
|
loading: r = !1,
|
|
35
35
|
highlightWords: s,
|
|
36
36
|
size: p,
|
|
@@ -38,23 +38,23 @@ const z = (r) => {
|
|
|
38
38
|
value: c,
|
|
39
39
|
description: a,
|
|
40
40
|
children: e,
|
|
41
|
-
id:
|
|
42
|
-
className:
|
|
41
|
+
id: l,
|
|
42
|
+
className: f
|
|
43
43
|
}) => {
|
|
44
44
|
if (t && c) {
|
|
45
|
-
const
|
|
46
|
-
return /* @__PURE__ */ n("span", { className: y(j.label,
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
const b = t && _(t), i = c && z(c);
|
|
46
|
+
return /* @__PURE__ */ n("span", { className: y(j.label, f), id: l, "data-size": p, children: e || /* @__PURE__ */ P(x, { children: [
|
|
47
|
+
b && /* @__PURE__ */ n(o, { ...b, loading: r, highlightWords: s }),
|
|
48
|
+
i && /* @__PURE__ */ n(o, { ...i, loading: r, highlightWords: s })
|
|
49
49
|
] }) });
|
|
50
50
|
}
|
|
51
51
|
const m = t && z(t), u = a && _(a);
|
|
52
|
-
return /* @__PURE__ */ n("span", { className: y(j.label,
|
|
52
|
+
return /* @__PURE__ */ n("span", { className: y(j.label, f), id: l, "data-size": p, children: e || /* @__PURE__ */ P(x, { children: [
|
|
53
53
|
m && /* @__PURE__ */ n(o, { ...m, loading: r, highlightWords: s }),
|
|
54
54
|
u && /* @__PURE__ */ n(o, { ...u, loading: r, highlightWords: s })
|
|
55
55
|
] }) });
|
|
56
56
|
};
|
|
57
57
|
export {
|
|
58
|
-
|
|
58
|
+
V as ListItemLabel,
|
|
59
59
|
H as isHeadingProps
|
|
60
60
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import '../../assets/MenuItemBase.css';const
|
|
4
|
-
item:
|
|
5
|
-
content:
|
|
6
|
-
},
|
|
7
|
-
interactive:
|
|
8
|
-
ariaLabel:
|
|
2
|
+
import { c as j } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import '../../assets/MenuItemBase.css';const z = "_item_1pvle_1", B = "_content_1pvle_45", d = {
|
|
4
|
+
item: z,
|
|
5
|
+
content: B
|
|
6
|
+
}, q = ({
|
|
7
|
+
interactive: m = !0,
|
|
8
|
+
ariaLabel: r,
|
|
9
9
|
role: s,
|
|
10
|
-
as:
|
|
11
|
-
color:
|
|
10
|
+
as: i,
|
|
11
|
+
color: o,
|
|
12
12
|
variant: p,
|
|
13
13
|
size: l,
|
|
14
14
|
className: _,
|
|
@@ -21,18 +21,19 @@ import '../../assets/MenuItemBase.css';const j = "_item_1pvle_1", z = "_content_
|
|
|
21
21
|
disabled: e = !1,
|
|
22
22
|
children: b,
|
|
23
23
|
active: h,
|
|
24
|
-
onMouseEnter: I
|
|
24
|
+
onMouseEnter: I,
|
|
25
|
+
dataTestId: N
|
|
25
26
|
}) => /* @__PURE__ */ c(
|
|
26
|
-
|
|
27
|
+
i || "a",
|
|
27
28
|
{
|
|
28
29
|
tabIndex: e ? "-1" : x ?? 0,
|
|
29
|
-
className:
|
|
30
|
+
className: j(d.item, _),
|
|
30
31
|
role: s,
|
|
31
|
-
"aria-label":
|
|
32
|
-
"data-interactive":
|
|
32
|
+
"aria-label": r,
|
|
33
|
+
"data-interactive": m,
|
|
33
34
|
"data-active": h,
|
|
34
35
|
"data-size": l,
|
|
35
|
-
"data-color":
|
|
36
|
+
"data-color": o,
|
|
36
37
|
"data-variant": p,
|
|
37
38
|
"aria-hidden": f,
|
|
38
39
|
"aria-disabled": e,
|
|
@@ -43,9 +44,10 @@ import '../../assets/MenuItemBase.css';const j = "_item_1pvle_1", z = "_content_
|
|
|
43
44
|
},
|
|
44
45
|
onClick: t,
|
|
45
46
|
onMouseEnter: I,
|
|
46
|
-
|
|
47
|
+
"data-testid": N,
|
|
48
|
+
children: /* @__PURE__ */ c("span", { className: d.content, children: b })
|
|
47
49
|
}
|
|
48
50
|
);
|
|
49
51
|
export {
|
|
50
|
-
|
|
52
|
+
q as MenuItemBase
|
|
51
53
|
};
|
|
@@ -1,29 +1,44 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as r, jsxs as e } from "react/jsx-runtime";
|
|
2
|
+
import { c as p } from "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { IconButton as
|
|
4
|
+
import { IconButton as h } from "../Button/IconButton.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { Heading as
|
|
6
|
+
import { Heading as s } from "../Typography/Heading.js";
|
|
7
7
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import { Flex as
|
|
9
|
-
import { Section as
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
import { Flex as o } from "../Page/Flex.js";
|
|
9
|
+
import { Section as f } from "../Page/Section.js";
|
|
10
|
+
import { ModalIcon as g } from "./ModalIcon.js";
|
|
11
|
+
import { S as y } from "../../XMark-DIqxCTTQ.js";
|
|
12
|
+
import '../../assets/ModalHeader.css';const x = "_header_7ty99_1", k = "_sticky_7ty99_6", a = {
|
|
13
|
+
header: x,
|
|
14
|
+
sticky: k
|
|
15
|
+
}, A = ({
|
|
16
|
+
title: t,
|
|
17
|
+
description: i,
|
|
18
|
+
icon: n,
|
|
19
|
+
onClose: c,
|
|
20
|
+
closeTitle: m,
|
|
21
|
+
children: d,
|
|
22
|
+
sticky: l = !0
|
|
23
|
+
}) => /* @__PURE__ */ r(f, { as: "header", spacing: 2, padding: 4, className: p(a.header, l && a.sticky), children: /* @__PURE__ */ e(o, { direction: "row", justify: "between", align: "center", spacing: 8, children: [
|
|
24
|
+
d || /* @__PURE__ */ e(o, { direction: "row", align: "center", spacing: 3, children: [
|
|
25
|
+
n && /* @__PURE__ */ r(g, { icon: n }),
|
|
26
|
+
/* @__PURE__ */ e(o, { direction: "col", spacing: 0, children: [
|
|
27
|
+
t && /* @__PURE__ */ r(s, { as: "h2", size: i ? "md" : "lg", children: t }),
|
|
28
|
+
i && /* @__PURE__ */ r(s, { as: "h3", size: "xs", weight: "normal", children: i })
|
|
29
|
+
] })
|
|
30
|
+
] }),
|
|
31
|
+
typeof c == "function" && /* @__PURE__ */ r(
|
|
32
|
+
h,
|
|
18
33
|
{
|
|
19
|
-
icon:
|
|
34
|
+
icon: y,
|
|
20
35
|
variant: "outline",
|
|
21
|
-
onClick:
|
|
22
|
-
iconAltText:
|
|
36
|
+
onClick: c,
|
|
37
|
+
iconAltText: m ?? "Close",
|
|
23
38
|
size: "sm"
|
|
24
39
|
}
|
|
25
40
|
)
|
|
26
41
|
] }) });
|
|
27
42
|
export {
|
|
28
|
-
|
|
43
|
+
A as ModalHeader
|
|
29
44
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { isValidElement as p } from "react";
|
|
3
|
+
import { Icon as e, isIconProps as m } from "../Icon/Icon.js";
|
|
4
|
+
import "../../index-L8X2o7IH.js";
|
|
5
|
+
import { isAvatarProps as n, Avatar as c } from "../Avatar/Avatar.js";
|
|
6
|
+
import { isAvatarGroupProps as i, AvatarGroup as v } from "../Avatar/AvatarGroup.js";
|
|
7
|
+
import "../RootProvider/RootProvider.js";
|
|
8
|
+
import "../Snackbar/useSnackbar.js";
|
|
9
|
+
import { S as l } from "../../XMark-DIqxCTTQ.js";
|
|
10
|
+
import '../../assets/ListItemIcon.css';const f = "_wrapper_rcjve_1", _ = "_icon_rcjve_11", u = "_avatar_rcjve_19", N = "_avatarGroup_rcjve_23", o = {
|
|
11
|
+
wrapper: f,
|
|
12
|
+
icon: _,
|
|
13
|
+
avatar: u,
|
|
14
|
+
avatarGroup: N
|
|
15
|
+
};
|
|
16
|
+
function d(a) {
|
|
17
|
+
return typeof a == "string" || typeof a == "number" || typeof a == "boolean" || a === null || p(a);
|
|
18
|
+
}
|
|
19
|
+
const b = ({ loading: a, icon: r, theme: s }) => r ? a ? /* @__PURE__ */ t(e, { className: o.wrapper, svgElement: l, loading: !0 }) : /* @__PURE__ */ t("div", { className: o.wrapper, children: n(r) && /* @__PURE__ */ t(c, { ...r, className: o.avatar }) || i(r) && /* @__PURE__ */ t(v, { ...r, className: o.avatarGroup }) || m(r) && /* @__PURE__ */ t(e, { ...r, theme: r.theme || s, className: o.icon }) || d(r) && r || /* @__PURE__ */ t(e, { theme: s, svgElement: r, className: o.icon }) }) : null;
|
|
20
|
+
export {
|
|
21
|
+
b as ModalIcon
|
|
22
|
+
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { ModalBase as e } from "./ModalBase.js";
|
|
2
2
|
import { ModalHeader as d } from "./ModalHeader.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { ModalIcon as l } from "./ModalIcon.js";
|
|
4
|
+
import { ModalBody as p } from "./ModalBody.js";
|
|
5
|
+
import { Modal as x } from "./Modal.js";
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
+
x as Modal,
|
|
7
8
|
e as ModalBase,
|
|
8
|
-
|
|
9
|
-
d as ModalHeader
|
|
9
|
+
p as ModalBody,
|
|
10
|
+
d as ModalHeader,
|
|
11
|
+
l as ModalIcon
|
|
10
12
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "../../index-L8X2o7IH.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import "../RootProvider/RootProvider.js";
|
|
5
|
+
import "../Snackbar/useSnackbar.js";
|
|
6
|
+
import { ModalBase as s } from "../Modal/ModalBase.js";
|
|
7
|
+
import { ModalHeader as f } from "../Modal/ModalHeader.js";
|
|
8
|
+
import { ModalBody as l } from "../Modal/ModalBody.js";
|
|
9
|
+
const u = ({ icon: t, title: m, description: i, open: p, onClose: o, children: d, ...a }) => /* @__PURE__ */ e(s, { ...a, open: p, onClose: o, children: [
|
|
10
|
+
/* @__PURE__ */ r(f, { icon: t, title: m, description: i, onClose: o }),
|
|
11
|
+
/* @__PURE__ */ r(l, { children: d })
|
|
12
|
+
] });
|
|
13
|
+
export {
|
|
14
|
+
u as SettingsModal
|
|
15
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { SettingsSection as o } from "./SettingsSection.js";
|
|
2
2
|
import { SettingsItem as i } from "./SettingsItem.js";
|
|
3
3
|
import { SettingsList as n } from "./SettingsList.js";
|
|
4
|
+
import { SettingsModal as S } from "./SettingsModal.js";
|
|
4
5
|
export {
|
|
5
6
|
i as SettingsItem,
|
|
6
7
|
n as SettingsList,
|
|
8
|
+
S as SettingsModal,
|
|
7
9
|
o as SettingsSection
|
|
8
10
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import '../../assets/SnackbarBase.css';const
|
|
3
|
-
stack:
|
|
4
|
-
},
|
|
2
|
+
import '../../assets/SnackbarBase.css';const c = "_stack_ilsfl_1", a = {
|
|
3
|
+
stack: c
|
|
4
|
+
}, e = ({ children: s }) => /* @__PURE__ */ t("section", { className: a.stack, children: s });
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as SnackbarBase
|
|
7
7
|
};
|
|
@@ -19,14 +19,14 @@ import '../../assets/SnackbarItem.css';var w = function(e, i) {
|
|
|
19
19
|
};
|
|
20
20
|
const y = u((e, i) => {
|
|
21
21
|
var { title: o, titleId: t } = e, n = w(e, ["title", "titleId"]);
|
|
22
|
-
let
|
|
23
|
-
return
|
|
22
|
+
let r = _();
|
|
23
|
+
return r = o ? t || "title-" + r : void 0, a.createElement(
|
|
24
24
|
"svg",
|
|
25
|
-
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":
|
|
26
|
-
o ? a.createElement("title", { id:
|
|
25
|
+
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": r }, n),
|
|
26
|
+
o ? a.createElement("title", { id: r }, o) : null,
|
|
27
27
|
a.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M12.75 2.5a.75.75 0 0 0-1.5 0v1.273c-2.222.14-3.655.92-4.499 2.186-.887 1.33-1.001 3.04-1.001 4.541v3c0 .809-.424 1.92-.92 2.915a18 18 0 0 1-.936 1.641l-.014.022-.004.006A.75.75 0 0 0 4.5 19.25h4.338a3.25 3.25 0 0 0 6.324 0H19.5a.75.75 0 0 0 .624-1.166l-.004-.006-.014-.022-.06-.091c-.05-.081-.125-.2-.215-.35-.18-.301-.42-.722-.66-1.2-.497-.994-.921-2.106-.921-2.915v-3c0-1.501-.114-3.21-1.001-4.541-.844-1.266-2.277-2.046-4.499-2.186zm-1.987 17.237a1.8 1.8 0 0 1-.344-.487h3.162a1.75 1.75 0 0 1-1.581 1 1.75 1.75 0 0 1-1.237-.513", clipRule: "evenodd" })
|
|
28
28
|
);
|
|
29
|
-
}), x = "_item_1a13i_1", O = "_icon_1a13i_23", I = "_content_1a13i_33", b = "_action_1a13i_41",
|
|
29
|
+
}), x = "_item_1a13i_1", O = "_icon_1a13i_23", I = "_content_1a13i_33", b = "_action_1a13i_41", c = {
|
|
30
30
|
item: x,
|
|
31
31
|
icon: O,
|
|
32
32
|
content: I,
|
|
@@ -39,20 +39,20 @@ const F = ({
|
|
|
39
39
|
className: o,
|
|
40
40
|
color: t,
|
|
41
41
|
icon: n = y,
|
|
42
|
-
iconAltText:
|
|
42
|
+
iconAltText: r = "Bell icon",
|
|
43
43
|
dismissable: s = !0,
|
|
44
44
|
onDismiss: m,
|
|
45
45
|
...d
|
|
46
|
-
}) => /* @__PURE__ */ f(e || "div", { className: p(
|
|
47
|
-
/* @__PURE__ */ l(v, { svgElement: n, className:
|
|
48
|
-
/* @__PURE__ */ l("div", { className:
|
|
49
|
-
s && /* @__PURE__ */ l("div", { className:
|
|
46
|
+
}) => /* @__PURE__ */ f(e || "div", { className: p(c.item, o), "data-color": t, role: "alert", ...d, children: [
|
|
47
|
+
/* @__PURE__ */ l(v, { svgElement: n, className: c.icon, "aria-hidden": "true" }),
|
|
48
|
+
/* @__PURE__ */ l("div", { className: c.content, children: i }),
|
|
49
|
+
s && /* @__PURE__ */ l("div", { className: c.action, children: /* @__PURE__ */ l(
|
|
50
50
|
g,
|
|
51
51
|
{
|
|
52
52
|
icon: h,
|
|
53
53
|
variant: "solid",
|
|
54
54
|
onClick: m,
|
|
55
|
-
className:
|
|
55
|
+
className: c.dismiss,
|
|
56
56
|
iconAltText: "close"
|
|
57
57
|
}
|
|
58
58
|
) })
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as G, jsx as c } from "react/jsx-runtime";
|
|
3
|
-
import { useState as V, useMemo as
|
|
3
|
+
import { useState as V, useMemo as T, useEffect as k } from "react";
|
|
4
4
|
import { useRootContext as w } from "../RootProvider/RootProvider.js";
|
|
5
5
|
import { ToolbarAccountMenu as B } from "./ToolbarAccountMenu.js";
|
|
6
6
|
import { ToolbarAdd as E } from "./ToolbarAdd.js";
|
|
7
7
|
import { ToolbarBase as L } from "./ToolbarBase.js";
|
|
8
8
|
import { ToolbarFilter as M } from "./ToolbarFilter.js";
|
|
9
9
|
import { ToolbarSearch as $ } from "./ToolbarSearch.js";
|
|
10
|
-
const
|
|
10
|
+
const g = (n, m) => m || `toolbar-filter-${n}`, Q = ({
|
|
11
11
|
filters: n = [],
|
|
12
12
|
filterState: m,
|
|
13
|
-
onFilterStateChange:
|
|
14
|
-
search:
|
|
13
|
+
onFilterStateChange: u,
|
|
14
|
+
search: b,
|
|
15
15
|
accountMenu: v,
|
|
16
16
|
getFilterLabel: y,
|
|
17
17
|
children: F,
|
|
@@ -19,13 +19,13 @@ const T = (n, m) => m || `toolbar-filter-${n}`, Q = ({
|
|
|
19
19
|
removeButtonAltText: x,
|
|
20
20
|
addFilterButtonLabel: A
|
|
21
21
|
}) => {
|
|
22
|
-
const { openId: h, closeAll:
|
|
22
|
+
const { openId: h, closeAll: I } = w(), t = m || {}, i = typeof u == "function" ? u : () => {
|
|
23
23
|
}, [r, p] = V(
|
|
24
24
|
() => n.filter((e) => !e.removable || typeof t[e.name] < "u").map((e) => e.name)
|
|
25
|
-
),
|
|
25
|
+
), C = T(
|
|
26
26
|
() => r.map((e) => n.find((o) => o.name === e)).filter((e) => typeof e < "u"),
|
|
27
27
|
[n, r]
|
|
28
|
-
), s =
|
|
28
|
+
), s = T(
|
|
29
29
|
() => n.filter((e) => !r.includes(e.name)),
|
|
30
30
|
[n, r]
|
|
31
31
|
);
|
|
@@ -38,7 +38,7 @@ const T = (n, m) => m || `toolbar-filter-${n}`, Q = ({
|
|
|
38
38
|
}, [n, t]);
|
|
39
39
|
const N = (e) => {
|
|
40
40
|
const { name: o, value: l, type: d } = e.target, a = [l];
|
|
41
|
-
d === "radio" ? (
|
|
41
|
+
d === "radio" ? (I(), i({
|
|
42
42
|
...t,
|
|
43
43
|
[o]: a
|
|
44
44
|
})) : i({
|
|
@@ -57,12 +57,12 @@ const T = (n, m) => m || `toolbar-filter-${n}`, Q = ({
|
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
59
|
return /* @__PURE__ */ G(L, { children: [
|
|
60
|
-
v && /* @__PURE__ */ c(B, { ...v }),
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
v && /* @__PURE__ */ c(B, { buttonTestId: "account-menu-button", ...v }),
|
|
61
|
+
b && /* @__PURE__ */ c($, { ...b }),
|
|
62
|
+
C.map((e) => /* @__PURE__ */ c(
|
|
63
63
|
M,
|
|
64
64
|
{
|
|
65
|
-
id:
|
|
65
|
+
id: g(e.name, e.id),
|
|
66
66
|
showResultsLabel: S,
|
|
67
67
|
onRemove: () => R(e.name),
|
|
68
68
|
onChange: N,
|
|
@@ -84,7 +84,7 @@ const T = (n, m) => m || `toolbar-filter-${n}`, Q = ({
|
|
|
84
84
|
id: "toolbar-filter-add",
|
|
85
85
|
label: A,
|
|
86
86
|
items: s.map((e) => {
|
|
87
|
-
const o =
|
|
87
|
+
const o = g(e.name, e.id);
|
|
88
88
|
return {
|
|
89
89
|
id: o,
|
|
90
90
|
title: e.label,
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createElement as
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { createElement as T } from "react";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
4
|
import { AccountMenu as x } from "../Account/AccountMenu.js";
|
|
5
|
-
import { useRootContext as
|
|
6
|
-
import { DrawerOrDropdown as
|
|
5
|
+
import { useRootContext as b } from "../RootProvider/RootProvider.js";
|
|
6
|
+
import { DrawerOrDropdown as g } from "../Dropdown/DrawerOrDropdown.js";
|
|
7
7
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import { ToolbarButton as
|
|
9
|
-
import { ToolbarFilterBase as
|
|
10
|
-
const
|
|
8
|
+
import { ToolbarButton as h } from "./ToolbarButton.js";
|
|
9
|
+
import { ToolbarFilterBase as w } from "./ToolbarFilterBase.js";
|
|
10
|
+
const v = ({
|
|
11
11
|
currentAccount: o,
|
|
12
12
|
id: e = "toolbar-accounts",
|
|
13
13
|
onSelectAccount: r,
|
|
14
|
-
|
|
14
|
+
buttonTestId: p,
|
|
15
|
+
...s
|
|
15
16
|
}) => {
|
|
16
|
-
const { currentId: m, toggleId:
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
17
|
+
const { currentId: m, toggleId: l, closeAll: t } = b(), d = () => l(e), i = m === e;
|
|
18
|
+
return /* @__PURE__ */ n(w, { expanded: i, children: [
|
|
19
|
+
/* @__PURE__ */ a(h, { type: "switch", onToggle: d, active: !!o, dataTestId: p, children: o == null ? void 0 : o.name }),
|
|
20
|
+
/* @__PURE__ */ a(g, { open: i, drawerTitle: "Endre konto", onClose: t, children: /* @__PURE__ */ T(
|
|
20
21
|
x,
|
|
21
22
|
{
|
|
22
|
-
...
|
|
23
|
+
...s,
|
|
23
24
|
key: m,
|
|
24
|
-
onSelectAccount: (
|
|
25
|
-
r == null || r(
|
|
25
|
+
onSelectAccount: (f) => {
|
|
26
|
+
r == null || r(f), t();
|
|
26
27
|
},
|
|
27
28
|
currentAccount: o
|
|
28
29
|
}
|
|
@@ -30,5 +31,5 @@ const M = ({
|
|
|
30
31
|
] });
|
|
31
32
|
};
|
|
32
33
|
export {
|
|
33
|
-
|
|
34
|
+
v as ToolbarAccountMenu
|
|
34
35
|
};
|