@altinn/altinn-components 0.43.3 → 0.43.4
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 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._label_xjlhn_1{flex-grow:1;display:flex;flex-direction:row;align-items:center;justify-content:center;padding:0 .125rem;font-size:1rem;column-gap:.5em;pointer-events:none;word-break:normal;white-space:normal;overflow-wrap:normal}._title_xjlhn_16{color:var(--ds-color-text-default);display:inline;vertical-align:text-top}._titleWrapper_xjlhn_22{display:inline;line-height:1.25}._count_xjlhn_27{margin-left:.5rem;display:inline;font-size:smaller;white-space:nowrap}._radio_xjlhn_34,._checkbox_xjlhn_35{flex-shrink:0;flex-grow:0;position:relative;width:1.25em;height:1.25em;display:flex;align-items:center;justify-content:center;color:transparent}._radio_xjlhn_34{border:1px solid;border-color:var(--ds-color-border-subtle);outline:var(--ds-color-border-subtle) solid 1px;border-radius:50%}._checkbox_xjlhn_35{border:2px solid;border-color:var(--ds-color-border-subtle);border-radius:2px}._radio_xjlhn_34[data-checked=true],._checkbox_xjlhn_35[data-checked=true]{background-color:var(--ds-color-base-default);border:none;outline-color:var(--ds-color-base-default);color:var(--ds-color-base-contrast-default)}._icon_xjlhn_68{font-size:1.25em}@supports (-webkit-hyphens: none){._icon_xjlhn_68{font-size:unset;width:1.25em;height:1.25em}._icon_xjlhn_68 svg,._icon_xjlhn_68 img{width:100%;height:100%}}
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
1
|
+
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import { MenuItem as
|
|
5
|
+
import { MenuItem as p } from "./MenuItem.js";
|
|
6
6
|
import "../Snackbar/useSnackbar.js";
|
|
7
|
-
import { S as
|
|
8
|
-
import '../../assets/MenuOption.css';const
|
|
9
|
-
label:
|
|
10
|
-
title:
|
|
11
|
-
titleWrapper:
|
|
12
|
-
count:
|
|
13
|
-
radio:
|
|
14
|
-
checkbox:
|
|
15
|
-
icon:
|
|
7
|
+
import { S as m } from "../../Checkmark-Byz_C9x4.js";
|
|
8
|
+
import '../../assets/MenuOption.css';const j = "_label_xjlhn_1", f = "_title_xjlhn_16", k = "_titleWrapper_xjlhn_22", v = "_count_xjlhn_27", W = "_radio_xjlhn_34", I = "_checkbox_xjlhn_35", M = "_icon_xjlhn_68", e = {
|
|
9
|
+
label: j,
|
|
10
|
+
title: f,
|
|
11
|
+
titleWrapper: k,
|
|
12
|
+
count: v,
|
|
13
|
+
radio: W,
|
|
14
|
+
checkbox: I,
|
|
15
|
+
icon: M
|
|
16
16
|
}, C = ({
|
|
17
|
-
size:
|
|
18
|
-
type:
|
|
19
|
-
name:
|
|
20
|
-
active:
|
|
21
|
-
value:
|
|
22
|
-
label:
|
|
23
|
-
title:
|
|
17
|
+
size: c = "md",
|
|
18
|
+
type: _,
|
|
19
|
+
name: S,
|
|
20
|
+
active: l,
|
|
21
|
+
value: g,
|
|
22
|
+
label: r,
|
|
23
|
+
title: x,
|
|
24
24
|
description: u,
|
|
25
|
-
icon:
|
|
26
|
-
count:
|
|
27
|
-
checked:
|
|
28
|
-
disabled:
|
|
29
|
-
onMouseEnter:
|
|
30
|
-
onClick:
|
|
25
|
+
icon: N,
|
|
26
|
+
count: n = 0,
|
|
27
|
+
checked: t = !1,
|
|
28
|
+
disabled: i,
|
|
29
|
+
onMouseEnter: w,
|
|
30
|
+
onClick: o,
|
|
31
31
|
role: d,
|
|
32
|
-
...
|
|
32
|
+
...h
|
|
33
33
|
}) => {
|
|
34
|
-
const
|
|
35
|
-
switch (
|
|
34
|
+
const b = () => {
|
|
35
|
+
switch (_) {
|
|
36
36
|
case "checkbox":
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */ a("span", { className: e.checkbox, "data-checked":
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */ a("span", { className: e.title, children:
|
|
41
|
-
|
|
37
|
+
return /* @__PURE__ */ s("span", { className: e.label, children: [
|
|
38
|
+
/* @__PURE__ */ a("span", { className: e.checkbox, "data-checked": t, children: /* @__PURE__ */ a(m, { className: e.icon, "aria-hidden": !0 }) }),
|
|
39
|
+
/* @__PURE__ */ s("div", { className: e.titleWrapper, children: [
|
|
40
|
+
/* @__PURE__ */ a("span", { className: e.title, children: r }),
|
|
41
|
+
n > 0 && /* @__PURE__ */ a("span", { className: e.count, "aria-hidden": "true", children: n })
|
|
42
42
|
] })
|
|
43
43
|
] });
|
|
44
44
|
case "radio":
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */ a("span", { className: e.radio, "data-checked":
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */ a("span", { className: e.title, children:
|
|
49
|
-
|
|
45
|
+
return /* @__PURE__ */ s("span", { className: e.label, children: [
|
|
46
|
+
/* @__PURE__ */ a("span", { className: e.radio, "data-checked": t, children: /* @__PURE__ */ a(m, { className: e.icon, "aria-hidden": !0 }) }),
|
|
47
|
+
/* @__PURE__ */ s("div", { className: e.titleWrapper, children: [
|
|
48
|
+
/* @__PURE__ */ a("span", { className: e.title, children: r }),
|
|
49
|
+
n > 0 && /* @__PURE__ */ a("span", { className: e.count, "aria-hidden": "true", children: n })
|
|
50
50
|
] })
|
|
51
51
|
] });
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
-
return
|
|
55
|
-
|
|
54
|
+
return r ? /* @__PURE__ */ a(
|
|
55
|
+
p,
|
|
56
56
|
{
|
|
57
|
-
disabled:
|
|
58
|
-
selected:
|
|
59
|
-
size:
|
|
57
|
+
disabled: i,
|
|
58
|
+
selected: t,
|
|
59
|
+
size: c,
|
|
60
60
|
as: "div",
|
|
61
|
-
active:
|
|
61
|
+
active: l,
|
|
62
62
|
tabIndex: -1,
|
|
63
|
-
onClick:
|
|
63
|
+
onClick: o,
|
|
64
64
|
role: d,
|
|
65
|
-
label: /* @__PURE__ */ a(
|
|
66
|
-
...
|
|
65
|
+
label: /* @__PURE__ */ a(b, {}),
|
|
66
|
+
...h
|
|
67
67
|
}
|
|
68
68
|
) : /* @__PURE__ */ a(
|
|
69
|
-
|
|
69
|
+
p,
|
|
70
70
|
{
|
|
71
|
-
disabled:
|
|
72
|
-
selected:
|
|
73
|
-
size:
|
|
71
|
+
disabled: i,
|
|
72
|
+
selected: t,
|
|
73
|
+
size: c,
|
|
74
74
|
as: "div",
|
|
75
|
-
active:
|
|
75
|
+
active: l,
|
|
76
76
|
tabIndex: -1,
|
|
77
|
-
onClick:
|
|
77
|
+
onClick: o,
|
|
78
78
|
role: d,
|
|
79
|
-
icon:
|
|
80
|
-
title:
|
|
79
|
+
icon: N,
|
|
80
|
+
title: x,
|
|
81
81
|
description: u,
|
|
82
|
-
...
|
|
82
|
+
...h
|
|
83
83
|
}
|
|
84
84
|
);
|
|
85
85
|
};
|