@altinn/altinn-components 0.6.7 → 0.6.8
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
|
+
._item_1cdyi_3{border:0;color:inherit;font:inherit;text-align:inherit;text-decoration:none;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;width:100%;display:flex;align-items:center}._item_1cdyi_3[data-size=xs]{min-height:36px}._item_1cdyi_3[data-size=sm]{min-height:44px}._item_1cdyi_3[data-size=md]{min-height:56px}._item_1cdyi_3[data-size=lg]{min-height:64px}._item_1cdyi_3[data-size=xl]{min-height:72px}._content_1cdyi_46{flex-grow:1;display:flex;align-items:center;gap:.625rem;padding:.5rem .625rem}._action_1cdyi_56{display:flex;align-items:center;gap:.625rem;padding:.625rem}._linkIcon_1cdyi_63{font-size:1.5rem}._item_1cdyi_3{background-color:var(--theme-background-default);box-shadow:var(--ds-shadow-xs)}._item_1cdyi_3:hover{outline:2px solid var(--theme-border-strong);z-index:2}._item_1cdyi_3:hover strong{text-decoration:underline}._item_1cdyi_3[data-active=true],._item_1cdyi_3[data-color=accent]{background-color:var(--theme-surface-default)}._item_1cdyi_3[data-color=accent]:hover{background-color:var(--theme-surface-hover)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._item_1m3xe_1{border:0;color:inherit;font:inherit;text-align:inherit;text-decoration:none;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;width:100%;display:flex;align-items:center;column-gap:.25rem;margin:.5rem 0}._item_1m3xe_1[aria-disabled=true]{opacity:.5;pointer-events:none}._item_1m3xe_1[data-size=sm]{min-height:44px}._content_1m3xe_35{display:flex;width:100%;align-items:center;column-gap:6px;padding:6px}._action_1m3xe_43{display:flex;justify-content:center;align-items:center;padding:10px}._linkText_1m3xe_50{font-size:.875rem;white-space:nowrap}._linkIcon_1m3xe_55{font-size:1.5rem}._item_1m3xe_1{background-color:transparent;color:var(--theme-text-default)}._item_1m3xe_1[aria-selected=true]{background-color:var(--theme-background-default)}._item_1m3xe_1:hover,._item_1m3xe_1:active{background-color:var(--theme-surface-hover)}._media_1m3xe_75[data-color=subtle]{background-color:var(--theme-background-default);color:var(--theme-text-default)}._media_1m3xe_75[data-color=strong]{background-color:var(--theme-base-default);color:var(--theme-background-default)}
|
|
@@ -4,50 +4,50 @@ import { Badge as g } from "../Badge/Badge.js";
|
|
|
4
4
|
import { ContextMenu as w } from "../ContextMenu/ContextMenu.js";
|
|
5
5
|
import { Icon as z } from "../Icon/Icon.js";
|
|
6
6
|
import "../Icon/SvgIcon.js";
|
|
7
|
-
import '../../assets/ListItemBase.css';const E = "
|
|
7
|
+
import '../../assets/ListItemBase.css';const E = "_item_1cdyi_3", L = "_content_1cdyi_46", M = "_action_1cdyi_56", b = "_linkIcon_1cdyi_63", a = {
|
|
8
8
|
item: E,
|
|
9
9
|
content: L,
|
|
10
10
|
action: M,
|
|
11
11
|
linkIcon: b
|
|
12
|
-
},
|
|
13
|
-
as:
|
|
14
|
-
children:
|
|
15
|
-
className:
|
|
16
|
-
href:
|
|
12
|
+
}, H = ({
|
|
13
|
+
as: l,
|
|
14
|
+
children: I,
|
|
15
|
+
className: f,
|
|
16
|
+
href: o,
|
|
17
17
|
size: i,
|
|
18
|
-
color:
|
|
19
|
-
active:
|
|
20
|
-
hidden:
|
|
18
|
+
color: h,
|
|
19
|
+
active: v = !1,
|
|
20
|
+
hidden: x = !1,
|
|
21
21
|
collapsible: e,
|
|
22
|
-
selected:
|
|
22
|
+
selected: N,
|
|
23
23
|
expanded: m,
|
|
24
|
-
linkIcon:
|
|
24
|
+
linkIcon: y,
|
|
25
25
|
menu: r,
|
|
26
26
|
badge: s,
|
|
27
27
|
onClick: t,
|
|
28
|
-
onKeyPress:
|
|
29
|
-
style:
|
|
28
|
+
onKeyPress: c,
|
|
29
|
+
style: j
|
|
30
30
|
}) => {
|
|
31
|
-
const u =
|
|
31
|
+
const u = l || "a", d = e && m ? "chevron-up" : e ? "chevron-down" : o ? "chevron-right" : y;
|
|
32
32
|
return /* @__PURE__ */ p(
|
|
33
33
|
u,
|
|
34
34
|
{
|
|
35
|
-
className: B(a.item,
|
|
36
|
-
"data-color":
|
|
35
|
+
className: B(a.item, f),
|
|
36
|
+
"data-color": h,
|
|
37
37
|
"data-size": i,
|
|
38
|
-
"data-active":
|
|
39
|
-
"aria-hidden":
|
|
40
|
-
"aria-selected":
|
|
38
|
+
"data-active": v,
|
|
39
|
+
"aria-hidden": x,
|
|
40
|
+
"aria-selected": N,
|
|
41
41
|
"aria-expanded": m,
|
|
42
|
-
href:
|
|
42
|
+
href: o,
|
|
43
43
|
onKeyPress: (_) => {
|
|
44
|
-
_.key === "Enter" && (t == null || t()),
|
|
44
|
+
_.key === "Enter" && (t == null || t()), c == null || c(_);
|
|
45
45
|
},
|
|
46
46
|
onClick: t,
|
|
47
47
|
tabIndex: -1,
|
|
48
|
-
style:
|
|
48
|
+
style: j,
|
|
49
49
|
children: [
|
|
50
|
-
/* @__PURE__ */ n("div", { className: a.content, "data-size": i, children:
|
|
50
|
+
/* @__PURE__ */ n("div", { className: a.content, "data-size": i, children: I }),
|
|
51
51
|
/* @__PURE__ */ p("div", { className: a.action, children: [
|
|
52
52
|
s && /* @__PURE__ */ n(g, { ...s }),
|
|
53
53
|
r && /* @__PURE__ */ n(w, { ...r }),
|
|
@@ -58,5 +58,5 @@ import '../../assets/ListItemBase.css';const E = "_item_ximjk_3", L = "_content_
|
|
|
58
58
|
);
|
|
59
59
|
};
|
|
60
60
|
export {
|
|
61
|
-
|
|
61
|
+
H as ListItemBase
|
|
62
62
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { Badge as
|
|
4
|
-
import { Icon as
|
|
1
|
+
import { jsxs as t, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { c as u } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { Badge as T } from "../Badge/Badge.js";
|
|
4
|
+
import { Icon as j } from "../Icon/Icon.js";
|
|
5
5
|
import "../Icon/SvgIcon.js";
|
|
6
|
-
import '../../assets/MenuItemBase.css';const B = "
|
|
6
|
+
import '../../assets/MenuItemBase.css';const B = "_item_1m3xe_1", g = "_content_1m3xe_35", w = "_action_1m3xe_43", y = "_linkText_1m3xe_50", z = "_linkIcon_1m3xe_55", C = "_media_1m3xe_75", e = {
|
|
7
7
|
item: B,
|
|
8
8
|
content: g,
|
|
9
9
|
action: w,
|
|
@@ -16,41 +16,41 @@ import '../../assets/MenuItemBase.css';const B = "_item_u3jth_1", g = "_content_
|
|
|
16
16
|
size: _,
|
|
17
17
|
color: d,
|
|
18
18
|
linkIcon: o,
|
|
19
|
-
linkText:
|
|
19
|
+
linkText: x,
|
|
20
20
|
badge: c,
|
|
21
21
|
tabIndex: p = 0,
|
|
22
|
-
active:
|
|
22
|
+
active: f = !1,
|
|
23
23
|
collapsible: i = !1,
|
|
24
24
|
expanded: s = !1,
|
|
25
|
-
selected:
|
|
25
|
+
selected: h = !1,
|
|
26
26
|
disabled: m = !1,
|
|
27
|
-
className:
|
|
28
|
-
children:
|
|
29
|
-
...
|
|
27
|
+
className: k,
|
|
28
|
+
children: I,
|
|
29
|
+
...v
|
|
30
30
|
}) => {
|
|
31
|
-
const
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
|
|
31
|
+
const N = r || "a", n = i && s ? "chevron-up" : i ? "chevron-down" : o && "chevron-right";
|
|
32
|
+
return /* @__PURE__ */ t(
|
|
33
|
+
N,
|
|
34
34
|
{
|
|
35
35
|
role: "menuitem",
|
|
36
36
|
tabIndex: m ? "-1" : p ?? 0,
|
|
37
37
|
"data-size": _,
|
|
38
38
|
"data-color": d,
|
|
39
|
-
"data-active":
|
|
39
|
+
"data-active": f,
|
|
40
40
|
"aria-expanded": s,
|
|
41
41
|
"aria-disabled": m,
|
|
42
|
-
"aria-selected":
|
|
42
|
+
"aria-selected": h,
|
|
43
43
|
onClick: l,
|
|
44
|
-
className:
|
|
45
|
-
...
|
|
44
|
+
className: u(e.item, k),
|
|
45
|
+
...v,
|
|
46
46
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
49
|
-
c && /* @__PURE__ */ a(
|
|
47
|
+
/* @__PURE__ */ t("div", { className: e.content, children: [
|
|
48
|
+
I,
|
|
49
|
+
c && /* @__PURE__ */ a(T, { ...c })
|
|
50
50
|
] }),
|
|
51
|
-
n && /* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */ a("span", { className:
|
|
53
|
-
n && /* @__PURE__ */ a(
|
|
51
|
+
n && /* @__PURE__ */ t("div", { className: e.action, children: [
|
|
52
|
+
/* @__PURE__ */ a("span", { className: e.linkText, children: x }),
|
|
53
|
+
n && /* @__PURE__ */ a(j, { name: n, className: e.linkIcon })
|
|
54
54
|
] })
|
|
55
55
|
]
|
|
56
56
|
}
|