@altinn/altinn-components 0.50.5 → 0.50.7
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/SearchbarBase.css +1 -1
- package/dist/components/List/ListItem.js +55 -53
- package/dist/components/List/ListItemHeader.js +69 -65
- package/dist/components/List/ListItemLink.js +23 -18
- package/dist/components/Searchbar/SearchbarBase.js +9 -9
- package/dist/types/lib/components/Account/AccountListItem.stories.d.ts +1 -0
- package/dist/types/lib/components/List/ListItemHeader.d.ts +1 -1
- package/dist/types/lib/components/List/ListItemLink.d.ts +4 -1
- package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +1 -0
- package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._searchbar_1lexx_1{position:relative}._searchbar_1lexx_1[data-autocomplete=true][aria-expanded=true] input{border-bottom-left-radius:0;border-bottom-right-radius:0}._searchbar_1lexx_1 nav{display:none}._searchbarExpanded_1lexx_14 nav{position:absolute;display:block;border-top-left-radius:0;border-top-right-radius:0;margin-top:-2px}._searchbarLocal_1lexx_22{width:100%;padding:var(--dsc-spacing-4) 0;margin-bottom:16px}._searchbarLocal_1lexx_22._searchbarExpanded_1lexx_14{z-index:100}@media (min-width: 1024px){._searchbarLocal_1lexx_22{max-width:360px;margin-right:auto;z-index:100}._searchbarLocal_1lexx_22._searchbarExpanded_1lexx_14{max-width:640px}}
|
|
@@ -1,79 +1,81 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import {
|
|
1
|
+
import { jsxs as N, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c as k } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { useId as q } from "react";
|
|
4
|
+
import { ListItemBase as A } from "./ListItemBase.js";
|
|
4
5
|
import { ListItemHeader as D } from "./ListItemHeader.js";
|
|
5
6
|
import '../../assets/ListItem.css';const E = "_item_1nwey_3", F = {
|
|
6
7
|
item: E
|
|
7
|
-
},
|
|
8
|
-
className:
|
|
9
|
-
color:
|
|
10
|
-
variant:
|
|
11
|
-
shadow:
|
|
12
|
-
border:
|
|
13
|
-
loading:
|
|
14
|
-
disabled:
|
|
8
|
+
}, P = ({
|
|
9
|
+
className: f,
|
|
10
|
+
color: o,
|
|
11
|
+
variant: l = "default",
|
|
12
|
+
shadow: p = "xs",
|
|
13
|
+
border: I = "none",
|
|
14
|
+
loading: m,
|
|
15
|
+
disabled: r,
|
|
15
16
|
collapsible: a,
|
|
16
17
|
expanded: t,
|
|
17
|
-
size:
|
|
18
|
-
icon:
|
|
18
|
+
size: i,
|
|
19
|
+
icon: u,
|
|
19
20
|
label: s,
|
|
20
|
-
title:
|
|
21
|
-
description:
|
|
22
|
-
badge:
|
|
23
|
-
linkIcon:
|
|
24
|
-
select:
|
|
25
|
-
selected:
|
|
26
|
-
controls:
|
|
27
|
-
children:
|
|
28
|
-
interactive:
|
|
21
|
+
title: L,
|
|
22
|
+
description: h,
|
|
23
|
+
badge: y,
|
|
24
|
+
linkIcon: _ = !1,
|
|
25
|
+
select: d,
|
|
26
|
+
selected: j,
|
|
27
|
+
controls: x,
|
|
28
|
+
children: v,
|
|
29
|
+
interactive: e,
|
|
29
30
|
id: w,
|
|
30
31
|
containerAs: B,
|
|
31
|
-
...
|
|
32
|
+
...C
|
|
32
33
|
}) => {
|
|
33
|
-
const
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
|
|
34
|
+
const H = typeof s == "function" ? s() : s, c = q();
|
|
35
|
+
return /* @__PURE__ */ N(
|
|
36
|
+
A,
|
|
36
37
|
{
|
|
37
|
-
className:
|
|
38
|
-
size:
|
|
39
|
-
color:
|
|
40
|
-
variant:
|
|
41
|
-
shadow:
|
|
42
|
-
border:
|
|
43
|
-
disabled:
|
|
44
|
-
selected:
|
|
38
|
+
className: k(F.item, f),
|
|
39
|
+
size: i,
|
|
40
|
+
color: o,
|
|
41
|
+
variant: l,
|
|
42
|
+
shadow: p,
|
|
43
|
+
border: I,
|
|
44
|
+
disabled: r,
|
|
45
|
+
selected: j,
|
|
45
46
|
expanded: t,
|
|
46
|
-
loading:
|
|
47
|
-
interactive:
|
|
47
|
+
loading: m,
|
|
48
|
+
interactive: e,
|
|
48
49
|
id: w,
|
|
49
50
|
as: B,
|
|
50
51
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ n(
|
|
52
53
|
D,
|
|
53
54
|
{
|
|
54
|
-
color:
|
|
55
|
-
loading:
|
|
56
|
-
linkIcon:
|
|
57
|
-
disabled:
|
|
55
|
+
color: o,
|
|
56
|
+
loading: m,
|
|
57
|
+
linkIcon: _,
|
|
58
|
+
disabled: r,
|
|
58
59
|
collapsible: a,
|
|
59
60
|
expanded: t,
|
|
60
|
-
select:
|
|
61
|
-
title:
|
|
62
|
-
size:
|
|
63
|
-
description:
|
|
64
|
-
icon:
|
|
65
|
-
badge:
|
|
66
|
-
controls:
|
|
67
|
-
interactive:
|
|
68
|
-
|
|
69
|
-
|
|
61
|
+
select: d,
|
|
62
|
+
title: L,
|
|
63
|
+
size: i,
|
|
64
|
+
description: h,
|
|
65
|
+
icon: u,
|
|
66
|
+
badge: y,
|
|
67
|
+
controls: x,
|
|
68
|
+
interactive: e,
|
|
69
|
+
ariaControlsId: t ? c : void 0,
|
|
70
|
+
...C,
|
|
71
|
+
children: H
|
|
70
72
|
}
|
|
71
73
|
),
|
|
72
|
-
t ?
|
|
74
|
+
t ? /* @__PURE__ */ n("div", { id: c, children: v }) : null
|
|
73
75
|
]
|
|
74
76
|
}
|
|
75
77
|
);
|
|
76
78
|
};
|
|
77
79
|
export {
|
|
78
|
-
|
|
80
|
+
P as ListItem
|
|
79
81
|
};
|
|
@@ -1,102 +1,106 @@
|
|
|
1
|
-
import { jsxs as i, jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { Badge as
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { c as w } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { useId as z, isValidElement as A } from "react";
|
|
4
|
+
import { Icon as D } from "../Icon/Icon.js";
|
|
5
|
+
import { Badge as H } from "../Badge/Badge.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { ListItemLink as
|
|
8
|
-
import { ListItemLabel as
|
|
9
|
-
import { ListItemIcon as
|
|
10
|
-
import { ListItemControls as
|
|
11
|
-
import { ListItemSelect as
|
|
7
|
+
import { ListItemLink as R } from "./ListItemLink.js";
|
|
8
|
+
import { ListItemLabel as U } from "./ListItemLabel.js";
|
|
9
|
+
import { ListItemIcon as V } from "./ListItemIcon.js";
|
|
10
|
+
import { ListItemControls as q } from "./ListItemControls.js";
|
|
11
|
+
import { ListItemSelect as G } from "./ListItemSelect.js";
|
|
12
12
|
import "../Snackbar/useSnackbar.js";
|
|
13
|
-
import { S as
|
|
14
|
-
import { S as
|
|
15
|
-
import '../../assets/ListItemHeader.css';const
|
|
16
|
-
header:
|
|
17
|
-
label:
|
|
18
|
-
link:
|
|
19
|
-
badge:
|
|
20
|
-
linkIcon:
|
|
21
|
-
linkFocus:
|
|
22
|
-
controls:
|
|
23
|
-
},
|
|
24
|
-
as:
|
|
25
|
-
highlightWords:
|
|
13
|
+
import { S as J, a as K } from "../../ChevronUp-_BBfEirx.js";
|
|
14
|
+
import { S as M } from "../../ChevronRight-ANFWmIs1.js";
|
|
15
|
+
import '../../assets/ListItemHeader.css';const O = "_header_29hv7_1", P = "_label_29hv7_27", Q = "_link_29hv7_43", T = "_badge_29hv7_47", W = "_linkIcon_29hv7_51", X = "_linkFocus_29hv7_61", Y = "_controls_29hv7_69", o = {
|
|
16
|
+
header: O,
|
|
17
|
+
label: P,
|
|
18
|
+
link: Q,
|
|
19
|
+
badge: T,
|
|
20
|
+
linkIcon: W,
|
|
21
|
+
linkFocus: X,
|
|
22
|
+
controls: Y
|
|
23
|
+
}, _o = ({
|
|
24
|
+
as: f,
|
|
25
|
+
highlightWords: I,
|
|
26
26
|
interactive: a = !0,
|
|
27
|
-
color:
|
|
27
|
+
color: k,
|
|
28
28
|
loading: s,
|
|
29
29
|
disabled: r,
|
|
30
|
-
collapsible:
|
|
31
|
-
linkIcon:
|
|
32
|
-
expanded:
|
|
33
|
-
select:
|
|
30
|
+
collapsible: c,
|
|
31
|
+
linkIcon: u,
|
|
32
|
+
expanded: l,
|
|
33
|
+
select: m,
|
|
34
34
|
href: L,
|
|
35
|
-
onClick:
|
|
36
|
-
onKeyPress:
|
|
35
|
+
onClick: N,
|
|
36
|
+
onKeyPress: b,
|
|
37
37
|
tabIndex: S,
|
|
38
|
-
size:
|
|
38
|
+
size: h,
|
|
39
39
|
title: n,
|
|
40
40
|
description: C,
|
|
41
|
-
icon:
|
|
42
|
-
active:
|
|
43
|
-
badge:
|
|
44
|
-
controls:
|
|
45
|
-
className:
|
|
46
|
-
children:
|
|
47
|
-
ariaLabel:
|
|
41
|
+
icon: y,
|
|
42
|
+
active: d,
|
|
43
|
+
badge: e,
|
|
44
|
+
controls: _,
|
|
45
|
+
className: F,
|
|
46
|
+
children: j,
|
|
47
|
+
ariaLabel: p,
|
|
48
|
+
ariaControlsId: x
|
|
48
49
|
}) => {
|
|
49
|
-
const
|
|
50
|
+
const v = c ? l ? J : K : u ? M : void 0, g = () => e && !s && typeof e == "object" && "label" in e ? /* @__PURE__ */ t(H, { ...e, className: o.badge }) : A(e) ? e : null, B = p !== void 0 ? p : typeof n == "string" ? n : void 0, E = z();
|
|
50
51
|
return /* @__PURE__ */ i(
|
|
51
52
|
"div",
|
|
52
53
|
{
|
|
53
|
-
className:
|
|
54
|
-
"data-color":
|
|
54
|
+
className: w(o.header, F),
|
|
55
|
+
"data-color": k,
|
|
55
56
|
"data-interactive": a,
|
|
56
|
-
"data-size":
|
|
57
|
-
"data-has-active-child":
|
|
57
|
+
"data-size": h,
|
|
58
|
+
"data-has-active-child": d,
|
|
58
59
|
"aria-disabled": r,
|
|
59
60
|
children: [
|
|
60
61
|
/* @__PURE__ */ i(
|
|
61
|
-
|
|
62
|
+
R,
|
|
62
63
|
{
|
|
63
|
-
as:
|
|
64
|
+
as: f,
|
|
64
65
|
href: L,
|
|
65
|
-
onClick:
|
|
66
|
-
onKeyPress:
|
|
66
|
+
onClick: N,
|
|
67
|
+
onKeyPress: b,
|
|
67
68
|
tabIndex: S,
|
|
68
69
|
loading: s,
|
|
69
70
|
disabled: r || s,
|
|
70
|
-
active:
|
|
71
|
-
ariaLabel:
|
|
71
|
+
active: d,
|
|
72
|
+
ariaLabel: B,
|
|
72
73
|
className: o.link,
|
|
74
|
+
expanded: l,
|
|
75
|
+
ariaControlsId: x,
|
|
76
|
+
collapsible: c,
|
|
73
77
|
children: [
|
|
74
|
-
a && /* @__PURE__ */
|
|
75
|
-
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
|
|
78
|
+
a && /* @__PURE__ */ t("div", { className: o.linkFocus, "aria-hidden": "true" }),
|
|
79
|
+
m && /* @__PURE__ */ t(G, { ...m, className: o.select }),
|
|
80
|
+
/* @__PURE__ */ t(V, { loading: s, icon: y }),
|
|
81
|
+
/* @__PURE__ */ t(
|
|
82
|
+
U,
|
|
79
83
|
{
|
|
80
|
-
size:
|
|
84
|
+
size: h,
|
|
81
85
|
loading: s,
|
|
82
|
-
highlightWords:
|
|
86
|
+
highlightWords: I,
|
|
83
87
|
title: n,
|
|
84
88
|
description: C,
|
|
85
|
-
id:
|
|
89
|
+
id: E,
|
|
86
90
|
className: o.label,
|
|
87
|
-
children:
|
|
91
|
+
children: j
|
|
88
92
|
}
|
|
89
93
|
)
|
|
90
94
|
]
|
|
91
95
|
}
|
|
92
96
|
),
|
|
93
|
-
/* @__PURE__ */ i(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
/* @__PURE__ */ i(q, { className: o.controls, children: [
|
|
98
|
+
_ && !s && /* @__PURE__ */ t("span", { className: o.customControls, children: _ }),
|
|
99
|
+
g(),
|
|
100
|
+
v && !r && /* @__PURE__ */ t("span", { className: o.linkIcon, children: /* @__PURE__ */ t(
|
|
101
|
+
D,
|
|
98
102
|
{
|
|
99
|
-
svgElement:
|
|
103
|
+
svgElement: v,
|
|
100
104
|
style: {
|
|
101
105
|
fontSize: "1.5rem"
|
|
102
106
|
}
|
|
@@ -108,5 +112,5 @@ import '../../assets/ListItemHeader.css';const M = "_header_29hv7_1", O = "_labe
|
|
|
108
112
|
);
|
|
109
113
|
};
|
|
110
114
|
export {
|
|
111
|
-
|
|
115
|
+
_o as ListItemHeader
|
|
112
116
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import '../../assets/ListItemLink.css';const
|
|
4
|
-
link:
|
|
5
|
-
},
|
|
1
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
2
|
+
import { c as p } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import '../../assets/ListItemLink.css';const I = "_link_c8adz_1", l = {
|
|
4
|
+
link: I
|
|
5
|
+
}, z = ({
|
|
6
6
|
as: u,
|
|
7
7
|
loading: a,
|
|
8
8
|
disabled: e,
|
|
@@ -10,35 +10,40 @@ import '../../assets/ListItemLink.css';const f = "_link_c8adz_1", l = {
|
|
|
10
10
|
href: s,
|
|
11
11
|
onClick: t,
|
|
12
12
|
onKeyPress: i,
|
|
13
|
-
className:
|
|
14
|
-
active:
|
|
13
|
+
className: d,
|
|
14
|
+
active: _,
|
|
15
15
|
ariaLabel: n,
|
|
16
16
|
children: c,
|
|
17
|
-
tabIndex:
|
|
17
|
+
tabIndex: b = 0,
|
|
18
|
+
expanded: m,
|
|
19
|
+
collapsible: f,
|
|
20
|
+
ariaControlsId: k
|
|
18
21
|
}) => {
|
|
19
22
|
const r = u || "div";
|
|
20
23
|
if (r === "div")
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
const
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ v("div", { className: p(l.link, d), children: c });
|
|
25
|
+
const A = !a && s || r !== "a" && n;
|
|
26
|
+
return /* @__PURE__ */ v(
|
|
24
27
|
r,
|
|
25
28
|
{
|
|
26
|
-
className:
|
|
29
|
+
className: p(l.link, d),
|
|
27
30
|
href: s,
|
|
28
|
-
onKeyPress: (
|
|
29
|
-
|
|
31
|
+
onKeyPress: (o) => {
|
|
32
|
+
o.key === "Enter" && (t == null || t()), i == null || i(o);
|
|
30
33
|
},
|
|
31
34
|
onClick: t,
|
|
32
35
|
"data-interactive": "true",
|
|
33
36
|
"aria-disabled": a || e,
|
|
34
37
|
"aria-selected": x,
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
+
"aria-expanded": f ? m : void 0,
|
|
39
|
+
"aria-controls": m ? k : void 0,
|
|
40
|
+
...A && { "aria-label": n },
|
|
41
|
+
"data-active": _,
|
|
42
|
+
tabIndex: a || e ? -1 : b,
|
|
38
43
|
children: c
|
|
39
44
|
}
|
|
40
45
|
);
|
|
41
46
|
};
|
|
42
47
|
export {
|
|
43
|
-
|
|
48
|
+
z as ListItemLink
|
|
44
49
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { c as b } from "../../index-L8X2o7IH.js";
|
|
3
|
-
import '../../assets/SearchbarBase.css';const
|
|
4
|
-
searchbar:
|
|
5
|
-
searchbarExpanded:
|
|
6
|
-
searchbarLocal:
|
|
3
|
+
import '../../assets/SearchbarBase.css';const x = "_searchbar_1lexx_1", n = "_searchbarExpanded_1lexx_14", d = "_searchbarLocal_1lexx_22", a = {
|
|
4
|
+
searchbar: x,
|
|
5
|
+
searchbarExpanded: n,
|
|
6
|
+
searchbarLocal: d
|
|
7
7
|
}, m = ({
|
|
8
8
|
className: r,
|
|
9
|
-
children:
|
|
10
|
-
expanded:
|
|
9
|
+
children: e,
|
|
10
|
+
expanded: s = !1,
|
|
11
11
|
onBlurCapture: c,
|
|
12
12
|
autocomplete: o = !1,
|
|
13
13
|
useGlobalHeader: t = !1
|
|
@@ -15,10 +15,10 @@ import '../../assets/SearchbarBase.css';const l = "_searchbar_1sz2n_1", d = "_se
|
|
|
15
15
|
const h = b(
|
|
16
16
|
a.searchbar,
|
|
17
17
|
r,
|
|
18
|
-
|
|
18
|
+
s && a.searchbarExpanded,
|
|
19
19
|
t && a.searchbarLocal
|
|
20
20
|
);
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ l("div", { className: h, "data-autocomplete": o, onBlurCapture: c, children: e });
|
|
22
22
|
};
|
|
23
23
|
export {
|
|
24
24
|
m as SearchbarBase
|
|
@@ -59,6 +59,7 @@ declare const meta: {
|
|
|
59
59
|
href?: string | undefined;
|
|
60
60
|
onClick?: (() => void) | undefined;
|
|
61
61
|
onKeyPress?: React.KeyboardEventHandler | undefined;
|
|
62
|
+
ariaControlsId?: string | undefined;
|
|
62
63
|
favourite?: boolean | undefined;
|
|
63
64
|
favouriteLabel?: string | undefined;
|
|
64
65
|
onToggleFavourite?: ((id: string) => void) | undefined;
|
|
@@ -40,4 +40,4 @@ export interface ListItemHeaderProps extends ListItemLinkProps {
|
|
|
40
40
|
/** Used as decerning text for the ListItem without title, defaults to title */
|
|
41
41
|
ariaLabel?: string;
|
|
42
42
|
}
|
|
43
|
-
export declare const ListItemHeader: ({ as, highlightWords, interactive, color, loading, disabled, collapsible, linkIcon, expanded, select, href, onClick, onKeyPress, tabIndex, size, title, description, icon, active, badge, controls, className, children, ariaLabel, }: ListItemHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export declare const ListItemHeader: ({ as, highlightWords, interactive, color, loading, disabled, collapsible, linkIcon, expanded, select, href, onClick, onKeyPress, tabIndex, size, title, description, icon, active, badge, controls, className, children, ariaLabel, ariaControlsId, }: ListItemHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,5 +12,8 @@ export interface ListItemLinkProps {
|
|
|
12
12
|
className?: string;
|
|
13
13
|
active?: boolean;
|
|
14
14
|
children?: React.ReactNode;
|
|
15
|
+
expanded?: boolean;
|
|
16
|
+
collapsible?: boolean;
|
|
17
|
+
ariaControlsId?: string;
|
|
15
18
|
}
|
|
16
|
-
export declare const ListItemLink: ({ as, loading, disabled, selected, href, onClick, onKeyPress, className, active, ariaLabel, children, tabIndex, }: ListItemLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const ListItemLink: ({ as, loading, disabled, selected, href, onClick, onKeyPress, className, active, ariaLabel, children, tabIndex, expanded, collapsible, ariaControlsId, }: ListItemLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -50,6 +50,7 @@ declare const meta: {
|
|
|
50
50
|
href?: string | undefined;
|
|
51
51
|
onClick?: (() => void) | undefined;
|
|
52
52
|
onKeyPress?: React.KeyboardEventHandler | undefined;
|
|
53
|
+
ariaControlsId?: string | undefined;
|
|
53
54
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
54
55
|
};
|
|
55
56
|
export default meta;
|