@altinn/altinn-components 0.67.10 → 0.67.12
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.
|
@@ -1,66 +1,47 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { s as c, B as l } from "../../ToolbarSearch-DyVcALSw.js";
|
|
3
3
|
import "../../index-p1eeF8LQ.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../../tooltip-Ct39-719.js";
|
|
6
6
|
import "../Typography/Link.js";
|
|
7
|
-
import { Button as
|
|
7
|
+
import { Button as p } from "../Button/Button.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
import "../GlobalMenu/GlobalMenuBase.js";
|
|
10
10
|
import "../Snackbar/useSnackbar.js";
|
|
11
|
-
import { S as
|
|
12
|
-
import '../../assets/GlobalMenuButton.css';const
|
|
13
|
-
button:
|
|
14
|
-
icon:
|
|
15
|
-
label:
|
|
16
|
-
badge:
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
import { S as b } from "../../MenuHamburger-YjDC-ncP.js";
|
|
12
|
+
import '../../assets/GlobalMenuButton.css';const _ = "_button_e58u8_3", d = "_icon_e58u8_14", g = "_label_e58u8_22", N = "_badge_e58u8_28", o = {
|
|
13
|
+
button: _,
|
|
14
|
+
icon: d,
|
|
15
|
+
label: g,
|
|
16
|
+
badge: N
|
|
17
|
+
}, q = ({
|
|
18
|
+
className: h,
|
|
19
|
+
as: f = "button",
|
|
20
|
+
color: s = "company",
|
|
21
|
+
variant: n = "solid",
|
|
22
|
+
onClick: r,
|
|
23
|
+
expanded: a,
|
|
24
|
+
label: i = "Menu",
|
|
25
|
+
badge: e,
|
|
26
|
+
...m
|
|
27
|
+
}) => /* @__PURE__ */ u(
|
|
28
|
+
p,
|
|
29
|
+
{
|
|
30
|
+
...m,
|
|
31
|
+
type: "button",
|
|
32
|
+
onClick: r,
|
|
33
|
+
color: s,
|
|
34
|
+
variant: n,
|
|
35
|
+
className: o.button,
|
|
36
|
+
"aria-haspopup": "menu",
|
|
37
|
+
"aria-expanded": a,
|
|
38
|
+
children: [
|
|
39
|
+
a ? /* @__PURE__ */ t(c, { className: o.icon, "aria-hidden": "true" }) : /* @__PURE__ */ t(b, { className: o.icon, "aria-hidden": "true" }),
|
|
40
|
+
/* @__PURE__ */ t("span", { className: o.label, children: i }),
|
|
41
|
+
e && /* @__PURE__ */ t(l, { ...e, className: o.badge })
|
|
42
|
+
]
|
|
31
43
|
}
|
|
32
|
-
|
|
33
|
-
className: s,
|
|
34
|
-
as: x = "button",
|
|
35
|
-
color: r = "company",
|
|
36
|
-
variant: c = "solid",
|
|
37
|
-
onClick: u,
|
|
38
|
-
expanded: o,
|
|
39
|
-
label: n = "Menu",
|
|
40
|
-
badge: a,
|
|
41
|
-
...i
|
|
42
|
-
}) => {
|
|
43
|
-
const { languageCode: l } = b(), { close: m } = M(l);
|
|
44
|
-
return /* @__PURE__ */ p(
|
|
45
|
-
g,
|
|
46
|
-
{
|
|
47
|
-
...i,
|
|
48
|
-
type: "button",
|
|
49
|
-
title: o ? m : n,
|
|
50
|
-
onClick: u,
|
|
51
|
-
color: r,
|
|
52
|
-
variant: c,
|
|
53
|
-
className: t.button,
|
|
54
|
-
"aria-haspopup": "menu",
|
|
55
|
-
"aria-expanded": o,
|
|
56
|
-
children: [
|
|
57
|
-
o ? /* @__PURE__ */ e(_, { className: t.icon, "aria-hidden": "true" }) : /* @__PURE__ */ e(h, { className: t.icon, "aria-hidden": "true" }),
|
|
58
|
-
/* @__PURE__ */ e("span", { className: t.label, children: n }),
|
|
59
|
-
a && /* @__PURE__ */ e(d, { ...a, className: t.badge })
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
};
|
|
44
|
+
);
|
|
64
45
|
export {
|
|
65
|
-
|
|
46
|
+
q as GlobalMenuButton
|
|
66
47
|
};
|
|
@@ -12,9 +12,9 @@ import "../Snackbar/useSnackbar.js";
|
|
|
12
12
|
import { SettingsItemBase as r } from "./SettingsItemBase.js";
|
|
13
13
|
import { SettingsModal as w } from "./SettingsModal.js";
|
|
14
14
|
const q = ({
|
|
15
|
-
loading:
|
|
16
|
-
variant:
|
|
17
|
-
id:
|
|
15
|
+
loading: h,
|
|
16
|
+
variant: u = "default",
|
|
17
|
+
id: a = "settings",
|
|
18
18
|
name: p,
|
|
19
19
|
title: i,
|
|
20
20
|
value: n,
|
|
@@ -22,14 +22,14 @@ const q = ({
|
|
|
22
22
|
checked: f,
|
|
23
23
|
onChange: g,
|
|
24
24
|
modalProps: o,
|
|
25
|
-
expanded:
|
|
26
|
-
children:
|
|
25
|
+
expanded: c,
|
|
26
|
+
children: m,
|
|
27
27
|
...e
|
|
28
28
|
}) => {
|
|
29
|
-
const [l,
|
|
30
|
-
if (
|
|
29
|
+
const [l, d] = b(!1);
|
|
30
|
+
if (h)
|
|
31
31
|
return /* @__PURE__ */ t(r, { icon: e?.icon, titleProps: { children: i }, loading: !0 });
|
|
32
|
-
switch (
|
|
32
|
+
switch (u) {
|
|
33
33
|
case "link":
|
|
34
34
|
return /* @__PURE__ */ t(
|
|
35
35
|
r,
|
|
@@ -51,6 +51,7 @@ const q = ({
|
|
|
51
51
|
return /* @__PURE__ */ t(
|
|
52
52
|
r,
|
|
53
53
|
{
|
|
54
|
+
id: a,
|
|
54
55
|
...e,
|
|
55
56
|
as: "div",
|
|
56
57
|
titleProps: {
|
|
@@ -67,7 +68,7 @@ const q = ({
|
|
|
67
68
|
{
|
|
68
69
|
type: "checkbox",
|
|
69
70
|
role: "switch",
|
|
70
|
-
"aria-labelledby":
|
|
71
|
+
"aria-labelledby": a,
|
|
71
72
|
name: p,
|
|
72
73
|
value: n,
|
|
73
74
|
checked: f,
|
|
@@ -85,7 +86,7 @@ const q = ({
|
|
|
85
86
|
as: "button",
|
|
86
87
|
linkIcon: !0,
|
|
87
88
|
collapsible: !0,
|
|
88
|
-
expanded:
|
|
89
|
+
expanded: c,
|
|
89
90
|
titleProps: {
|
|
90
91
|
children: i
|
|
91
92
|
},
|
|
@@ -95,7 +96,7 @@ const q = ({
|
|
|
95
96
|
variant: "subtle",
|
|
96
97
|
children: s
|
|
97
98
|
},
|
|
98
|
-
children:
|
|
99
|
+
children: c && /* @__PURE__ */ t("div", { children: m })
|
|
99
100
|
}
|
|
100
101
|
);
|
|
101
102
|
case "modal":
|
|
@@ -116,7 +117,7 @@ const q = ({
|
|
|
116
117
|
},
|
|
117
118
|
as: "button",
|
|
118
119
|
linkIcon: !0,
|
|
119
|
-
onClick: () =>
|
|
120
|
+
onClick: () => d(!0),
|
|
120
121
|
expanded: l,
|
|
121
122
|
children: l && /* @__PURE__ */ t(
|
|
122
123
|
w,
|
|
@@ -125,8 +126,8 @@ const q = ({
|
|
|
125
126
|
icon: o?.icon || e?.icon,
|
|
126
127
|
title: o?.title || i,
|
|
127
128
|
open: l,
|
|
128
|
-
onClose: () =>
|
|
129
|
-
children:
|
|
129
|
+
onClose: () => d(!1),
|
|
130
|
+
children: m
|
|
130
131
|
}
|
|
131
132
|
)
|
|
132
133
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { i as u, H as
|
|
1
|
+
import { jsxs as m, jsx as a, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { i as u, H as p, B, p as C } from "../../ToolbarSearch-DyVcALSw.js";
|
|
3
3
|
import "../../index-p1eeF8LQ.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../../tooltip-Ct39-719.js";
|
|
@@ -23,65 +23,65 @@ import '../../assets/SettingsItemBase.css';const A = "_listItem_9q1fv_1", D = "_
|
|
|
23
23
|
linkIcon: T,
|
|
24
24
|
label: U,
|
|
25
25
|
controls: E
|
|
26
|
-
},
|
|
27
|
-
as:
|
|
28
|
-
ref:
|
|
29
|
-
hidden:
|
|
30
|
-
disabled:
|
|
31
|
-
loading:
|
|
32
|
-
color:
|
|
33
|
-
collapsible:
|
|
34
|
-
expanded:
|
|
35
|
-
icon:
|
|
36
|
-
label:
|
|
37
|
-
titleProps:
|
|
38
|
-
descriptionProps:
|
|
26
|
+
}, is = ({
|
|
27
|
+
as: _,
|
|
28
|
+
ref: d,
|
|
29
|
+
hidden: f,
|
|
30
|
+
disabled: i,
|
|
31
|
+
loading: t,
|
|
32
|
+
color: v,
|
|
33
|
+
collapsible: o,
|
|
34
|
+
expanded: e,
|
|
35
|
+
icon: I,
|
|
36
|
+
label: N,
|
|
37
|
+
titleProps: k = {},
|
|
38
|
+
descriptionProps: h = {},
|
|
39
39
|
summary: n,
|
|
40
|
-
children:
|
|
40
|
+
children: q,
|
|
41
41
|
highlightWords: r,
|
|
42
42
|
badge: l,
|
|
43
|
-
linkIcon:
|
|
44
|
-
controls:
|
|
45
|
-
containerAs:
|
|
46
|
-
...
|
|
47
|
-
}) => /* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */ a(u, { icon:
|
|
51
|
-
|
|
43
|
+
linkIcon: x,
|
|
44
|
+
controls: y,
|
|
45
|
+
containerAs: S = "li",
|
|
46
|
+
...c
|
|
47
|
+
}) => /* @__PURE__ */ m(S, { className: s.listItem, "data-collapsible": o, "data-expanded": e, id: c.id, children: [
|
|
48
|
+
/* @__PURE__ */ m(R, { ref: d, as: "div", className: s.item, color: v, "aria-hidden": f, "data-loading": t, children: [
|
|
49
|
+
/* @__PURE__ */ m(j, { ...c, className: s.link, disabled: i, as: _, children: [
|
|
50
|
+
/* @__PURE__ */ a(u, { icon: I, className: s.media }),
|
|
51
|
+
N || /* @__PURE__ */ m("span", { className: s.label, children: [
|
|
52
52
|
/* @__PURE__ */ a(
|
|
53
|
-
|
|
53
|
+
p,
|
|
54
54
|
{
|
|
55
|
-
...
|
|
55
|
+
...k,
|
|
56
56
|
as: "span",
|
|
57
57
|
highlightWords: r,
|
|
58
|
-
loading:
|
|
58
|
+
loading: t,
|
|
59
59
|
maxRows: 2,
|
|
60
60
|
className: s.title
|
|
61
61
|
}
|
|
62
62
|
),
|
|
63
63
|
/* @__PURE__ */ a(
|
|
64
|
-
|
|
64
|
+
p,
|
|
65
65
|
{
|
|
66
|
-
...
|
|
66
|
+
...h,
|
|
67
67
|
as: "span",
|
|
68
68
|
highlightWords: r,
|
|
69
|
-
loading:
|
|
69
|
+
loading: t,
|
|
70
70
|
maxRows: 2,
|
|
71
71
|
className: s.description
|
|
72
72
|
}
|
|
73
73
|
)
|
|
74
74
|
] })
|
|
75
75
|
] }),
|
|
76
|
-
!
|
|
77
|
-
/* @__PURE__ */ a(w, { className: s.controls, children:
|
|
76
|
+
!i && /* @__PURE__ */ m(g, { children: [
|
|
77
|
+
/* @__PURE__ */ a(w, { className: s.controls, children: y }),
|
|
78
78
|
l && /* @__PURE__ */ a(B, { ...l }),
|
|
79
|
-
|
|
79
|
+
o && (e ? /* @__PURE__ */ a(H, { className: s.linkIcon }) : /* @__PURE__ */ a(z, { className: s.linkIcon })) || x && /* @__PURE__ */ a(C, { className: s.linkIcon })
|
|
80
80
|
] })
|
|
81
81
|
] }),
|
|
82
82
|
n && /* @__PURE__ */ a(b, { className: s.summary, size: "xs", variant: "subtle", children: n }),
|
|
83
|
-
|
|
83
|
+
q
|
|
84
84
|
] });
|
|
85
85
|
export {
|
|
86
|
-
|
|
86
|
+
is as SettingsItemBase
|
|
87
87
|
};
|