@altinn/altinn-components 0.7.2 → 0.7.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.
- package/dist/Autocomplete-BNV2UfH3.js +284 -0
- package/dist/assets/Autocomplete.css +1 -0
- package/dist/components/Bookmarks/BookmarksList.js +1 -1
- package/dist/components/Bookmarks/BookmarksListItem.js +4 -5
- package/dist/components/Bookmarks/BookmarksListItem.stories.js +7 -7
- package/dist/components/Bookmarks/index.js +4 -4
- package/dist/components/Button/Buttons.stories.js +5 -4
- package/dist/components/ContextMenu/ContextMenu.js +4 -27
- package/dist/components/ContextMenu/ContextMenu.stories.js +3 -3
- package/dist/components/ContextMenu/ContextMenuBase.js +6 -32
- package/dist/components/ContextMenu/index.js +1 -1
- package/dist/components/Dialog/DialogActions.js +3 -2
- package/dist/components/Dialog/{DialogSummary.d.ts → DialogDescription.d.ts} +2 -2
- package/dist/components/Dialog/DialogDescription.js +8 -0
- package/dist/components/Dialog/DialogGroup.js +3 -2
- package/dist/components/Dialog/DialogList.js +1 -1
- package/dist/components/Dialog/DialogListItem.d.ts +3 -3
- package/dist/components/Dialog/DialogListItem.js +13 -87
- package/dist/components/Dialog/DialogListItem.stories.js +1 -1
- package/dist/components/Dialog/DialogNav.js +11 -11
- package/dist/components/Dialog/Examples.stories.js +1 -1
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/Dropdown/DrawerButton.js +5 -4
- package/dist/components/Dropdown/DrawerOrDropdown.js +7 -6
- package/dist/components/GlobalMenu/AccountButton.js +3 -2
- package/dist/components/GlobalMenu/AccountMenu.js +3 -2
- package/dist/components/GlobalMenu/BackButton.js +3 -2
- package/dist/components/GlobalMenu/GlobalMenu.js +3 -2
- package/dist/components/Header/HeaderBase.js +5 -4
- package/dist/components/Layout/Layout.js +9 -8
- package/dist/components/Layout/Layout.stories.js +30 -28
- package/dist/components/LayoutAction/ActionMenu.js +5 -4
- package/dist/components/List/List.js +3 -3
- package/dist/components/List/List.stories.js +5 -4
- package/dist/components/List/ListItem.d.ts +1 -1
- package/dist/components/List/ListItem.js +6 -39
- package/dist/components/List/ListItem.stories.js +1 -1
- package/dist/components/List/ListItemControls.js +5 -15
- package/dist/components/List/index.js +12 -13
- package/dist/components/Menu/Menu.js +9 -9
- package/dist/components/Menu/MenuItem.stories.js +21 -20
- package/dist/components/Menu/MenuItems.js +8 -59
- package/dist/components/Menu/MenuItems.stories.js +1 -1
- package/dist/components/Menu/MenuSearch.js +6 -5
- package/dist/components/Menu/index.js +7 -7
- package/dist/components/Page/PageHeader.js +8 -7
- package/dist/components/Searchbar/Autocomplete.d.ts +1 -1
- package/dist/components/Searchbar/Autocomplete.js +7 -23
- package/dist/components/Searchbar/Autocomplete.stories.js +89 -63
- package/dist/components/Searchbar/AutocompleteBase.d.ts +2 -1
- package/dist/components/Searchbar/AutocompleteBase.js +9 -6
- package/dist/components/Searchbar/AutocompleteItem.js +3 -20
- package/dist/components/Searchbar/ScopeListItem.d.ts +2 -2
- package/dist/components/Searchbar/ScopeListItem.js +3 -6
- package/dist/components/Searchbar/SearchField.js +39 -39
- package/dist/components/Searchbar/Searchbar.js +24 -15
- package/dist/components/Searchbar/Searchbar.stories.js +63 -47
- package/dist/components/Toolbar/ToolbarAdd.js +3 -2
- package/dist/components/Toolbar/ToolbarDaterange.js +3 -2
- package/dist/components/Toolbar/ToolbarFilter.js +3 -2
- package/dist/components/Toolbar/ToolbarMenu.js +3 -2
- package/dist/components/Toolbar/ToolbarOptions.js +13 -12
- package/dist/components/Toolbar/ToolbarSearch.js +16 -15
- package/dist/components/index.js +213 -218
- package/dist/hooks/useEnterKey.d.ts +1 -0
- package/dist/hooks/useEnterKey.js +15 -0
- package/dist/index.js +226 -231
- package/package.json +1 -1
- package/dist/assets/ContextMenuBase.css +0 -1
- package/dist/assets/DialogListItem.css +0 -1
- package/dist/assets/ListItemControls.css +0 -1
- package/dist/assets/ScopeListItem.css +0 -1
- package/dist/components/Dialog/DialogSummary.js +0 -8
- /package/dist/assets/{DialogSummary.css → DialogDescription.css} +0 -0
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "../Badge/Badge.js";
|
|
3
|
+
import { L as e } from "../../Autocomplete-BNV2UfH3.js";
|
|
4
|
+
import "../Icon/Icon.js";
|
|
5
5
|
import "../Icon/SvgIcon.js";
|
|
6
6
|
import "../../index-L8X2o7IH.js";
|
|
7
|
-
import '../../assets/ListItemControls.css';const _ = "_controls_dduzt_1", p = "_linkText_dduzt_14", x = "_linkIcon_dduzt_19", o = {
|
|
8
|
-
controls: _,
|
|
9
|
-
linkText: p,
|
|
10
|
-
linkIcon: x
|
|
11
|
-
}, T = ({ badge: s, linkText: r, linkIcon: c, menu: n, children: e }) => /* @__PURE__ */ t("div", { className: o.controls, "data-menu": n && !0, children: e || /* @__PURE__ */ l(m, { children: [
|
|
12
|
-
s && /* @__PURE__ */ t(i, { ...s }),
|
|
13
|
-
r && /* @__PURE__ */ t("span", { className: o.linkText, children: r }),
|
|
14
|
-
c && /* @__PURE__ */ t(d, { name: c, className: o.linkIcon }),
|
|
15
|
-
n && /* @__PURE__ */ t(a, { ...n, className: o.menu })
|
|
16
|
-
] }) });
|
|
17
7
|
export {
|
|
18
|
-
|
|
8
|
+
e as ListItemControls
|
|
19
9
|
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { ListItemBase as o } from "./ListItemBase.js";
|
|
2
2
|
import { ListItemHeader as m } from "./ListItemHeader.js";
|
|
3
|
-
import { ListItemLabel as
|
|
4
|
-
import { ListItemMedia as
|
|
5
|
-
import {
|
|
6
|
-
import { ListItemSelect as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { List as n } from "./List.js";
|
|
3
|
+
import { ListItemLabel as L } from "./ListItemLabel.js";
|
|
4
|
+
import { ListItemMedia as a } from "./ListItemMedia.js";
|
|
5
|
+
import { a as p, L as x } from "../../Autocomplete-BNV2UfH3.js";
|
|
6
|
+
import { ListItemSelect as l } from "./ListItemSelect.js";
|
|
7
|
+
import { ListBase as B } from "./ListBase.js";
|
|
8
|
+
import { List as c } from "./List.js";
|
|
10
9
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
c as List,
|
|
11
|
+
B as ListBase,
|
|
12
|
+
p as ListItem,
|
|
14
13
|
o as ListItemBase,
|
|
15
14
|
x as ListItemControls,
|
|
16
15
|
m as ListItemHeader,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
L as ListItemLabel,
|
|
17
|
+
a as ListItemMedia,
|
|
18
|
+
l as ListItemSelect
|
|
20
19
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { MenuBase as u } from "./MenuBase.js";
|
|
3
|
-
import {
|
|
4
|
-
import { MenuSearch as
|
|
5
|
-
const
|
|
3
|
+
import { M as p } from "../../Autocomplete-BNV2UfH3.js";
|
|
4
|
+
import { MenuSearch as M } from "./MenuSearch.js";
|
|
5
|
+
const h = ({
|
|
6
6
|
theme: m = "inherit",
|
|
7
7
|
defaultItemColor: o = "subtle",
|
|
8
8
|
defaultItemSize: t = "sm",
|
|
9
9
|
groups: n,
|
|
10
|
-
items:
|
|
10
|
+
items: s = [],
|
|
11
11
|
search: r
|
|
12
|
-
}) => /* @__PURE__ */
|
|
13
|
-
r && /* @__PURE__ */ e(
|
|
14
|
-
/* @__PURE__ */ e(p, { items:
|
|
12
|
+
}) => /* @__PURE__ */ i(u, { theme: m, children: [
|
|
13
|
+
r && /* @__PURE__ */ e(M, { ...r }),
|
|
14
|
+
/* @__PURE__ */ e(p, { items: s, groups: n, defaultItemColor: o, defaultItemSize: t })
|
|
15
15
|
] });
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
h as Menu
|
|
18
18
|
};
|
|
@@ -8,7 +8,8 @@ import "../RootProvider/RootProvider.js";
|
|
|
8
8
|
import { MetaItem as p } from "../Meta/MetaItem.js";
|
|
9
9
|
import { MenuItem as o } from "./MenuItem.js";
|
|
10
10
|
import { MenuBase as m } from "./MenuBase.js";
|
|
11
|
-
|
|
11
|
+
import "../../Autocomplete-BNV2UfH3.js";
|
|
12
|
+
const I = {
|
|
12
13
|
title: "Menu/MenuItem",
|
|
13
14
|
component: o,
|
|
14
15
|
tags: ["autodocs"],
|
|
@@ -17,12 +18,12 @@ const v = {
|
|
|
17
18
|
id: "inbox",
|
|
18
19
|
onClick: i()
|
|
19
20
|
}
|
|
20
|
-
},
|
|
21
|
+
}, A = {
|
|
21
22
|
args: {
|
|
22
23
|
icon: "inbox",
|
|
23
24
|
title: "Innboks"
|
|
24
25
|
}
|
|
25
|
-
},
|
|
26
|
+
}, C = {
|
|
26
27
|
args: {
|
|
27
28
|
icon: "inbox",
|
|
28
29
|
title: "Innboks",
|
|
@@ -30,14 +31,14 @@ const v = {
|
|
|
30
31
|
label: "4"
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
|
-
},
|
|
34
|
+
}, G = {
|
|
34
35
|
args: {
|
|
35
36
|
size: "lg",
|
|
36
37
|
icon: "inbox",
|
|
37
38
|
title: "Innboks",
|
|
38
39
|
color: "strong"
|
|
39
40
|
}
|
|
40
|
-
},
|
|
41
|
+
}, M = {
|
|
41
42
|
args: {
|
|
42
43
|
size: "lg",
|
|
43
44
|
icon: "inbox",
|
|
@@ -56,7 +57,7 @@ const v = {
|
|
|
56
57
|
},
|
|
57
58
|
title: "Eirik Horneland"
|
|
58
59
|
}
|
|
59
|
-
},
|
|
60
|
+
}, z = {
|
|
60
61
|
args: {
|
|
61
62
|
avatarGroup: {
|
|
62
63
|
items: [
|
|
@@ -84,7 +85,7 @@ const v = {
|
|
|
84
85
|
},
|
|
85
86
|
title: "Sportsklubben Brann"
|
|
86
87
|
}
|
|
87
|
-
},
|
|
88
|
+
}, H = {
|
|
88
89
|
args: {
|
|
89
90
|
avatarGroup: {
|
|
90
91
|
defaultType: "company",
|
|
@@ -102,19 +103,19 @@ const v = {
|
|
|
102
103
|
},
|
|
103
104
|
title: "3 virksomheter"
|
|
104
105
|
}
|
|
105
|
-
},
|
|
106
|
+
}, S = {
|
|
106
107
|
args: {
|
|
107
108
|
...c.args,
|
|
108
109
|
size: "lg",
|
|
109
110
|
description: "Født: XX.XX.XXXX"
|
|
110
111
|
}
|
|
111
|
-
},
|
|
112
|
+
}, E = {
|
|
112
113
|
args: {
|
|
113
114
|
...g.args,
|
|
114
115
|
size: "lg",
|
|
115
116
|
description: "Org nr.: XX.XX.XXXX"
|
|
116
117
|
}
|
|
117
|
-
},
|
|
118
|
+
}, L = () => {
|
|
118
119
|
const t = ["global", "neutral", "company", "person", "global-dark"], a = ["neutral", "subtle", "strong", "company", "person"];
|
|
119
120
|
return /* @__PURE__ */ n("div", { style: { display: "flex", width: "100%" }, children: t.map((e) => /* @__PURE__ */ n("div", { style: { flexGrow: 1 }, children: /* @__PURE__ */ n(l, { theme: e, children: /* @__PURE__ */ n(m, { children: a.map((r) => /* @__PURE__ */ s("div", { children: [
|
|
120
121
|
/* @__PURE__ */ n(o, { icon: "inbox", title: "Title", color: r, id: "inbox" }),
|
|
@@ -122,16 +123,16 @@ const v = {
|
|
|
122
123
|
] }, r)) }) }) }, e)) });
|
|
123
124
|
};
|
|
124
125
|
export {
|
|
125
|
-
|
|
126
|
+
M as AlertBadge,
|
|
126
127
|
g as Company,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
E as CompanyAccount,
|
|
129
|
+
H as CompanyGroup,
|
|
130
|
+
A as Default,
|
|
131
|
+
C as DefaultBadge,
|
|
132
|
+
G as Large,
|
|
132
133
|
c as Person,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
S as PersonAccount,
|
|
135
|
+
z as PersonGroup,
|
|
136
|
+
L as ThemesAndColors,
|
|
137
|
+
I as default
|
|
137
138
|
};
|
|
@@ -1,64 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import { Fragment as L } from "react";
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
4
3
|
import "../../index-L8X2o7IH.js";
|
|
5
4
|
import "../Icon/SvgIcon.js";
|
|
6
5
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
level: c = 0,
|
|
13
|
-
expanded: I,
|
|
14
|
-
items: b,
|
|
15
|
-
groups: r = {},
|
|
16
|
-
defaultItemColor: l,
|
|
17
|
-
defaultItemSize: o
|
|
18
|
-
}) => {
|
|
19
|
-
const { menu: f } = G({
|
|
20
|
-
items: b,
|
|
21
|
-
groups: r,
|
|
22
|
-
groupByKey: "groupId",
|
|
23
|
-
keyboardEvents: !1
|
|
24
|
-
});
|
|
25
|
-
return /* @__PURE__ */ a(E, { expanded: I, children: f.map((t, s) => {
|
|
26
|
-
const n = (t == null ? void 0 : t.props) || {}, { title: x, divider: v = !0 } = n, y = f[s + 1];
|
|
27
|
-
return /* @__PURE__ */ i(L, { children: [
|
|
28
|
-
(c > 0 || s) && v ? /* @__PURE__ */ a(m, { role: "separator" }) : "",
|
|
29
|
-
x && /* @__PURE__ */ a(m, { children: /* @__PURE__ */ a(B, { title: x }) }),
|
|
30
|
-
t == null ? void 0 : t.items.map((M, h) => {
|
|
31
|
-
const { active: F } = M, { groupId: K, ...e } = M.props || {}, { expanded: d } = e, j = t == null ? void 0 : t.items[h + 1];
|
|
32
|
-
return /* @__PURE__ */ i(m, { role: "presentation", expanded: d, children: [
|
|
33
|
-
/* @__PURE__ */ a(
|
|
34
|
-
k,
|
|
35
|
-
{
|
|
36
|
-
...e,
|
|
37
|
-
color: (e == null ? void 0 : e.color) || (n == null ? void 0 : n.defaultItemColor) || l,
|
|
38
|
-
size: (e == null ? void 0 : e.size) || (n == null ? void 0 : n.defaultItemSize) || o,
|
|
39
|
-
active: F,
|
|
40
|
-
tabIndex: e != null && e.disabled ? -1 : 0
|
|
41
|
-
}
|
|
42
|
-
),
|
|
43
|
-
d && (e == null ? void 0 : e.items) && /* @__PURE__ */ i(z, { children: [
|
|
44
|
-
/* @__PURE__ */ a(
|
|
45
|
-
H,
|
|
46
|
-
{
|
|
47
|
-
expanded: d,
|
|
48
|
-
level: c + 1,
|
|
49
|
-
items: e == null ? void 0 : e.items,
|
|
50
|
-
groups: r,
|
|
51
|
-
defaultItemColor: l,
|
|
52
|
-
defaultItemSize: o
|
|
53
|
-
}
|
|
54
|
-
),
|
|
55
|
-
(y || j) && /* @__PURE__ */ a(m, { role: "separator" })
|
|
56
|
-
] })
|
|
57
|
-
] }, h);
|
|
58
|
-
})
|
|
59
|
-
] }, s);
|
|
60
|
-
}) });
|
|
61
|
-
};
|
|
6
|
+
import "./MenuItem.js";
|
|
7
|
+
import "./MenuHeader.js";
|
|
8
|
+
import { M as n } from "../../Autocomplete-BNV2UfH3.js";
|
|
9
|
+
import "./MenuBase.js";
|
|
10
|
+
import "../../hooks/useMenu.js";
|
|
62
11
|
export {
|
|
63
|
-
|
|
12
|
+
n as MenuItems
|
|
64
13
|
};
|
|
@@ -5,17 +5,18 @@ import "../../index-L8X2o7IH.js";
|
|
|
5
5
|
import "react";
|
|
6
6
|
import { IconButton as a } from "../Button/IconButton.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
|
+
import "../../Autocomplete-BNV2UfH3.js";
|
|
8
9
|
import '../../assets/MenuSearch.css';const l = "_field_mo7y9_1", p = "_icon_mo7y9_5", _ = "_input_mo7y9_14", f = "_clear_mo7y9_31", o = {
|
|
9
10
|
field: l,
|
|
10
11
|
icon: p,
|
|
11
12
|
input: _,
|
|
12
13
|
clear: f
|
|
13
|
-
},
|
|
14
|
+
}, j = ({ value: c, name: n, placeholder: s = "Søk", onChange: e, onClear: t }) => /* @__PURE__ */ m("div", { className: o.field, children: [
|
|
14
15
|
/* @__PURE__ */ i(
|
|
15
16
|
"input",
|
|
16
17
|
{
|
|
17
18
|
type: "search",
|
|
18
|
-
value:
|
|
19
|
+
value: c,
|
|
19
20
|
name: n,
|
|
20
21
|
placeholder: s,
|
|
21
22
|
className: o.input,
|
|
@@ -24,7 +25,7 @@ import '../../assets/MenuSearch.css';const l = "_field_mo7y9_1", p = "_icon_mo7y
|
|
|
24
25
|
}
|
|
25
26
|
),
|
|
26
27
|
/* @__PURE__ */ i(r, { name: "magnifying-glass", className: o.icon }),
|
|
27
|
-
|
|
28
|
+
t && /* @__PURE__ */ i(
|
|
28
29
|
a,
|
|
29
30
|
{
|
|
30
31
|
icon: "x-mark",
|
|
@@ -32,10 +33,10 @@ import '../../assets/MenuSearch.css';const l = "_field_mo7y9_1", p = "_icon_mo7y
|
|
|
32
33
|
variant: "solid",
|
|
33
34
|
size: "custom",
|
|
34
35
|
className: o.clear,
|
|
35
|
-
onClick:
|
|
36
|
+
onClick: t
|
|
36
37
|
}
|
|
37
38
|
)
|
|
38
39
|
] });
|
|
39
40
|
export {
|
|
40
|
-
|
|
41
|
+
j as MenuSearch
|
|
41
42
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { MenuItemBase as o } from "./MenuItemBase.js";
|
|
2
2
|
import { MenuItemLabel as m } from "./MenuItemLabel.js";
|
|
3
|
-
import { MenuItemMedia as
|
|
3
|
+
import { MenuItemMedia as M } from "./MenuItemMedia.js";
|
|
4
4
|
import { MenuItem as p } from "./MenuItem.js";
|
|
5
5
|
import { MenuInputField as x } from "./MenuInputField.js";
|
|
6
|
-
import { MenuOption as
|
|
7
|
-
import { MenuSearch as
|
|
6
|
+
import { MenuOption as I } from "./MenuOption.js";
|
|
7
|
+
import { MenuSearch as i } from "./MenuSearch.js";
|
|
8
8
|
import { MenuHeader as L } from "./MenuHeader.js";
|
|
9
|
-
import {
|
|
9
|
+
import { M as B } from "../../Autocomplete-BNV2UfH3.js";
|
|
10
10
|
import { MenuBase as c, MenuList as h, MenuListItem as F } from "./MenuBase.js";
|
|
11
11
|
import { Menu as O } from "./Menu.js";
|
|
12
12
|
export {
|
|
@@ -17,10 +17,10 @@ export {
|
|
|
17
17
|
p as MenuItem,
|
|
18
18
|
o as MenuItemBase,
|
|
19
19
|
m as MenuItemLabel,
|
|
20
|
-
|
|
20
|
+
M as MenuItemMedia,
|
|
21
21
|
B as MenuItems,
|
|
22
22
|
h as MenuList,
|
|
23
23
|
F as MenuListItem,
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
I as MenuOption,
|
|
25
|
+
i as MenuSearch
|
|
26
26
|
};
|
|
@@ -4,19 +4,20 @@ import "../Icon/SvgIcon.js";
|
|
|
4
4
|
import "react";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
6
|
import { Heading as c } from "../Typography/Heading.js";
|
|
7
|
+
import "../../Autocomplete-BNV2UfH3.js";
|
|
7
8
|
import { SectionBase as n } from "./SectionBase.js";
|
|
8
|
-
import { P as
|
|
9
|
-
import { PageNav as
|
|
10
|
-
const
|
|
11
|
-
/* @__PURE__ */ e(
|
|
9
|
+
import { P as p, s as i } from "../../PageHeaderMedia-DpZ09tLD.js";
|
|
10
|
+
import { PageNav as l } from "./PageNav.js";
|
|
11
|
+
const z = ({ title: a, description: o, icon: s, avatar: m, avatarGroup: t, children: h, ...d }) => /* @__PURE__ */ r(n, { as: "header", ...d, children: [
|
|
12
|
+
/* @__PURE__ */ e(l, {}),
|
|
12
13
|
/* @__PURE__ */ r("section", { className: i.header, children: [
|
|
13
|
-
/* @__PURE__ */ e(
|
|
14
|
+
/* @__PURE__ */ e(p, { icon: s, avatar: m, avatarGroup: t }),
|
|
14
15
|
/* @__PURE__ */ r("div", { className: i.title, children: [
|
|
15
16
|
/* @__PURE__ */ e(c, { size: "md", children: a }),
|
|
16
|
-
/* @__PURE__ */ e("div", { className: "description", children:
|
|
17
|
+
/* @__PURE__ */ e("div", { className: "description", children: o })
|
|
17
18
|
] })
|
|
18
19
|
] })
|
|
19
20
|
] });
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
z as PageHeader
|
|
22
23
|
};
|
|
@@ -6,4 +6,4 @@ export interface AutocompleteProps {
|
|
|
6
6
|
expanded?: boolean;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare const Autocomplete: (
|
|
9
|
+
export declare const Autocomplete: import('react').ForwardRefExoticComponent<AutocompleteProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,25 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
const M = ({ className: t, items: r, groups: m = {}, expanded: p }) => {
|
|
8
|
-
const { menu: n, setActiveIndex: u } = I({
|
|
9
|
-
items: r,
|
|
10
|
-
groups: m,
|
|
11
|
-
groupByKey: "groupId",
|
|
12
|
-
keyboardEvents: !0
|
|
13
|
-
});
|
|
14
|
-
return /* @__PURE__ */ e(x, { className: t, expanded: p, children: n.map((o, i) => /* @__PURE__ */ f(A, { ...o.props, key: i }, /* @__PURE__ */ e("ul", { children: o.items.map((c, s) => {
|
|
15
|
-
const {
|
|
16
|
-
active: l,
|
|
17
|
-
menuIndex: d,
|
|
18
|
-
props: { groupId: h, ...a }
|
|
19
|
-
} = c;
|
|
20
|
-
return /* @__PURE__ */ e("li", { tabIndex: -1, onMouseEnter: () => u(d), children: /* @__PURE__ */ e(y, { ...a, active: l }) }, s);
|
|
21
|
-
}) }))) });
|
|
22
|
-
};
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "../../hooks/useMenu.js";
|
|
4
|
+
import "./AutocompleteBase.js";
|
|
5
|
+
import "./AutocompleteGroup.js";
|
|
6
|
+
import { A } from "../../Autocomplete-BNV2UfH3.js";
|
|
23
7
|
export {
|
|
24
|
-
|
|
8
|
+
A as Autocomplete
|
|
25
9
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { A as l } from "../../Autocomplete-BNV2UfH3.js";
|
|
3
3
|
const o = {
|
|
4
4
|
title: "Header/Autocomplete",
|
|
5
5
|
component: l,
|
|
@@ -31,7 +31,10 @@ const o = {
|
|
|
31
31
|
id: "1a",
|
|
32
32
|
type: "scope",
|
|
33
33
|
href: "#",
|
|
34
|
-
label:
|
|
34
|
+
label: () => /* @__PURE__ */ e("span", { children: [
|
|
35
|
+
/* @__PURE__ */ t("mark", { children: "sk" }),
|
|
36
|
+
" i innboks"
|
|
37
|
+
] })
|
|
35
38
|
},
|
|
36
39
|
{
|
|
37
40
|
id: "1b",
|
|
@@ -44,11 +47,11 @@ const o = {
|
|
|
44
47
|
}
|
|
45
48
|
]
|
|
46
49
|
}
|
|
47
|
-
},
|
|
50
|
+
}, r = {
|
|
48
51
|
args: {
|
|
49
52
|
groups: {
|
|
50
53
|
3: {
|
|
51
|
-
title: "
|
|
54
|
+
title: "Anbefalte treff"
|
|
52
55
|
}
|
|
53
56
|
},
|
|
54
57
|
items: [
|
|
@@ -58,7 +61,7 @@ const o = {
|
|
|
58
61
|
type: "scope",
|
|
59
62
|
href: "#",
|
|
60
63
|
badge: {
|
|
61
|
-
label: "
|
|
64
|
+
label: "24 treff"
|
|
62
65
|
},
|
|
63
66
|
label: () => /* @__PURE__ */ e("span", { children: [
|
|
64
67
|
/* @__PURE__ */ t("mark", { children: "skatt" }),
|
|
@@ -81,7 +84,7 @@ const o = {
|
|
|
81
84
|
type: "dialog",
|
|
82
85
|
href: "#",
|
|
83
86
|
title: "Skattemeldingen 2023",
|
|
84
|
-
|
|
87
|
+
description: "Skattemeldingen er klar for innsending."
|
|
85
88
|
},
|
|
86
89
|
{
|
|
87
90
|
id: "2b",
|
|
@@ -89,15 +92,82 @@ const o = {
|
|
|
89
92
|
type: "dialog",
|
|
90
93
|
href: "#",
|
|
91
94
|
title: "Skatteoppgjør 2022",
|
|
92
|
-
|
|
95
|
+
description: "Skatteoppgjøret ditt er klart."
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: "2c",
|
|
99
|
+
groupId: "3",
|
|
100
|
+
type: "dialog",
|
|
101
|
+
href: "#",
|
|
102
|
+
title: "Skatteoppgjør 2020",
|
|
103
|
+
description: "Skatteoppgjøret ditt er ferdigstilt."
|
|
93
104
|
}
|
|
94
105
|
]
|
|
95
106
|
}
|
|
96
|
-
},
|
|
107
|
+
}, g = {
|
|
97
108
|
args: {
|
|
98
|
-
|
|
109
|
+
groups: {
|
|
110
|
+
3: {
|
|
111
|
+
title: "Søker etter «skatt» ..."
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
items: r.args.items.map((a) => a.groupId === "3" ? {
|
|
115
|
+
...a,
|
|
116
|
+
type: null,
|
|
117
|
+
icon: "inbox",
|
|
118
|
+
loading: !0
|
|
119
|
+
} : a)
|
|
120
|
+
}
|
|
121
|
+
}, k = {
|
|
122
|
+
args: {
|
|
123
|
+
...r.args,
|
|
124
|
+
groups: {
|
|
125
|
+
noHits: {
|
|
126
|
+
title: "Ingen treff"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
99
129
|
items: [
|
|
100
|
-
|
|
130
|
+
{
|
|
131
|
+
id: "1a",
|
|
132
|
+
groupId: "1",
|
|
133
|
+
type: "scope",
|
|
134
|
+
href: "#",
|
|
135
|
+
disabled: !0,
|
|
136
|
+
badge: {
|
|
137
|
+
label: "Ingen treff"
|
|
138
|
+
},
|
|
139
|
+
label: () => /* @__PURE__ */ e("span", { children: [
|
|
140
|
+
/* @__PURE__ */ t("mark", { children: "skatt" }),
|
|
141
|
+
" i innboks"
|
|
142
|
+
] })
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: "1b",
|
|
146
|
+
groupId: "1",
|
|
147
|
+
type: "scope",
|
|
148
|
+
href: "#",
|
|
149
|
+
label: () => /* @__PURE__ */ e("span", { children: [
|
|
150
|
+
/* @__PURE__ */ t("mark", { children: "skatt" }),
|
|
151
|
+
" i hele Altinn"
|
|
152
|
+
] })
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
groupId: "noHits",
|
|
156
|
+
id: "2a",
|
|
157
|
+
type: "information",
|
|
158
|
+
label: () => /* @__PURE__ */ e("span", { children: [
|
|
159
|
+
"Søk etter ",
|
|
160
|
+
/* @__PURE__ */ t("mark", { children: "skatt" }),
|
|
161
|
+
" ga ingen treff."
|
|
162
|
+
] })
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
}, i = {
|
|
167
|
+
args: {
|
|
168
|
+
...r.args,
|
|
169
|
+
items: [
|
|
170
|
+
...r.args.items,
|
|
101
171
|
{
|
|
102
172
|
id: "2c",
|
|
103
173
|
groupId: "4",
|
|
@@ -116,7 +186,7 @@ const o = {
|
|
|
116
186
|
}
|
|
117
187
|
]
|
|
118
188
|
}
|
|
119
|
-
},
|
|
189
|
+
}, c = {
|
|
120
190
|
args: {
|
|
121
191
|
groups: {
|
|
122
192
|
2: {
|
|
@@ -188,9 +258,9 @@ const o = {
|
|
|
188
258
|
}
|
|
189
259
|
]
|
|
190
260
|
}
|
|
191
|
-
},
|
|
261
|
+
}, f = {
|
|
192
262
|
args: {
|
|
193
|
-
...
|
|
263
|
+
...i.args,
|
|
194
264
|
groups: {
|
|
195
265
|
2: {
|
|
196
266
|
title: "Søkeforslag"
|
|
@@ -200,7 +270,7 @@ const o = {
|
|
|
200
270
|
}
|
|
201
271
|
},
|
|
202
272
|
items: [
|
|
203
|
-
...
|
|
273
|
+
...i.args.items,
|
|
204
274
|
{
|
|
205
275
|
id: "2a",
|
|
206
276
|
groupId: "2",
|
|
@@ -242,59 +312,15 @@ const o = {
|
|
|
242
312
|
}
|
|
243
313
|
]
|
|
244
314
|
}
|
|
245
|
-
}, k = {
|
|
246
|
-
args: {
|
|
247
|
-
...i.args,
|
|
248
|
-
groups: {
|
|
249
|
-
noHits: {
|
|
250
|
-
title: "Ingen treff"
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
|
-
items: [
|
|
254
|
-
{
|
|
255
|
-
id: "1a",
|
|
256
|
-
groupId: "1",
|
|
257
|
-
type: "scope",
|
|
258
|
-
href: "#",
|
|
259
|
-
disabled: !0,
|
|
260
|
-
badge: {
|
|
261
|
-
label: "Ingen treff"
|
|
262
|
-
},
|
|
263
|
-
label: () => /* @__PURE__ */ e("span", { children: [
|
|
264
|
-
/* @__PURE__ */ t("mark", { children: "skatt" }),
|
|
265
|
-
" i innboks"
|
|
266
|
-
] })
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
id: "1b",
|
|
270
|
-
groupId: "1",
|
|
271
|
-
type: "scope",
|
|
272
|
-
href: "#",
|
|
273
|
-
label: () => /* @__PURE__ */ e("span", { children: [
|
|
274
|
-
/* @__PURE__ */ t("mark", { children: "skatt" }),
|
|
275
|
-
" i hele Altinn"
|
|
276
|
-
] })
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
groupId: "noHits",
|
|
280
|
-
id: "2a",
|
|
281
|
-
type: "information",
|
|
282
|
-
label: () => /* @__PURE__ */ e("span", { children: [
|
|
283
|
-
"Søk etter ",
|
|
284
|
-
/* @__PURE__ */ t("mark", { children: "skatt" }),
|
|
285
|
-
" ga ingen treff."
|
|
286
|
-
] })
|
|
287
|
-
}
|
|
288
|
-
]
|
|
289
|
-
}
|
|
290
315
|
};
|
|
291
316
|
export {
|
|
317
|
+
g as LoadingResults,
|
|
292
318
|
k as NoHits,
|
|
293
319
|
p as Scopes,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
320
|
+
i as ScopesAndMixedResults,
|
|
321
|
+
r as ScopesAndResults,
|
|
322
|
+
c as ScopesAndSuggestions,
|
|
323
|
+
f as ScopesResultsAndSuggestions,
|
|
298
324
|
d as TooFewWords,
|
|
299
325
|
o as default
|
|
300
326
|
};
|
|
@@ -3,5 +3,6 @@ export interface AutocompleteBaseProps {
|
|
|
3
3
|
className?: string;
|
|
4
4
|
expanded?: boolean;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
6
7
|
}
|
|
7
|
-
export declare const AutocompleteBase: (
|
|
8
|
+
export declare const AutocompleteBase: import('react').ForwardRefExoticComponent<Omit<AutocompleteBaseProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|