@altinn/altinn-components 0.56.9 → 0.56.11
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/{SearchField-CXMhgFiw.js → SearchField-CYYz0JvC.js} +91 -91
- package/dist/assets/DatepickerFilter.css +1 -0
- package/dist/assets/FooterBase.css +1 -1
- package/dist/assets/GlobalHeaderBase.css +1 -1
- package/dist/assets/LayoutBody.css +1 -1
- package/dist/assets/LayoutContent.css +1 -1
- package/dist/assets/LayoutGrid.css +1 -0
- package/dist/assets/LayoutSidebar.css +1 -1
- package/dist/assets/SearchField.css +1 -1
- package/dist/components/Account/AccountMenu.js +1 -1
- package/dist/components/Breadcrumbs/index.js +6 -0
- package/dist/components/ContextMenu/ContextMenu.js +1 -1
- package/dist/components/Dialog/DialogActions.js +1 -1
- package/dist/components/Footer/FooterBase.js +7 -7
- package/dist/components/Forms/SearchField.js +1 -1
- package/dist/components/Forms/index.js +1 -1
- package/dist/components/GlobalHeader/AccountSelector.js +1 -1
- package/dist/components/GlobalHeader/GlobalHeaderBase.js +4 -4
- package/dist/components/GlobalMenu/GlobalMenu.js +1 -1
- package/dist/components/GlobalMenu/LocaleSwitcher.js +1 -1
- package/dist/components/GlobalMenu_old/GlobalMenu.js +1 -1
- package/dist/components/Header/LocaleSwitcher.js +1 -1
- package/dist/components/Layout/Layout.js +44 -33
- package/dist/components/Layout/LayoutBody.js +5 -5
- package/dist/components/Layout/LayoutContent.js +1 -1
- package/dist/components/Layout/LayoutGrid.js +7 -0
- package/dist/components/Layout/LayoutSidebar.js +4 -4
- package/dist/components/Layout/index.js +12 -10
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuItems.js +1 -1
- package/dist/components/Menu/MenuListSearch.js +1 -1
- package/dist/components/Menu/VirtualizedMenuItems.js +1 -1
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Page/PageNav.js +4 -4
- package/dist/components/Page/index.js +18 -22
- package/dist/components/Toolbar/DatepickerFilter.js +57 -57
- package/dist/components/Toolbar/SelectDateFilter.js +49 -34
- package/dist/components/Toolbar/ToolbarFilter.js +6 -6
- package/dist/components/Toolbar/ToolbarFilterAddMenu.js +1 -1
- package/dist/components/Toolbar/ToolbarFilterMenu.js +83 -78
- package/dist/components/Toolbar/ToolbarMenu.js +1 -1
- package/dist/components/Toolbar/ToolbarSearch.js +1 -1
- package/dist/components/Toolbar/index.js +10 -8
- package/dist/components/index.js +445 -441
- package/dist/index.js +457 -453
- package/dist/types/lib/components/Breadcrumbs/index.d.ts +2 -0
- package/dist/types/lib/components/Layout/Layout.d.ts +3 -1
- package/dist/types/lib/components/Layout/Layout.stories.d.ts +2 -1
- package/dist/types/lib/components/Layout/LayoutGrid.d.ts +13 -0
- package/dist/types/lib/components/Layout/index.d.ts +1 -0
- package/dist/types/lib/components/Page/index.d.ts +0 -2
- package/dist/types/lib/components/Toolbar/SelectDateFilter.d.ts +1 -0
- package/dist/types/lib/components/Toolbar/index.d.ts +1 -0
- package/dist/types/lib/components/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/{Page → Breadcrumbs}/Breadcrumbs.js +1 -1
- /package/dist/components/{Page → Breadcrumbs}/BreadcrumbsLink.js +0 -0
- /package/dist/types/lib/components/{Page → Breadcrumbs}/Breadcrumbs.d.ts +0 -0
- /package/dist/types/lib/components/{Page → Breadcrumbs}/Breadcrumbs.stories.d.ts +0 -0
- /package/dist/types/lib/components/{Page → Breadcrumbs}/BreadcrumbsLink.d.ts +0 -0
|
@@ -5,7 +5,7 @@ import { Button as b } from "../Button/Button.js";
|
|
|
5
5
|
import "../../index-p1eeF8LQ.js";
|
|
6
6
|
import { Dropdown as O } from "../Dropdown/Dropdown.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
|
-
import { M as I } from "../../SearchField-
|
|
8
|
+
import { M as I } from "../../SearchField-CYYz0JvC.js";
|
|
9
9
|
import { useDropdownMenuController as x } from "../Menu/useDropdownMenuController.js";
|
|
10
10
|
import "../Snackbar/useSnackbar.js";
|
|
11
11
|
import { u as R } from "../../useId-BVFxCjkq.js";
|
|
@@ -1,118 +1,123 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as G, useEffect as H } from "react";
|
|
3
3
|
import "../../index-p1eeF8LQ.js";
|
|
4
4
|
import "../Button/Button.js";
|
|
5
|
-
import { M as
|
|
6
|
-
import { useDropdownMenuController as
|
|
5
|
+
import { M as J } from "../../SearchField-CYYz0JvC.js";
|
|
6
|
+
import { useDropdownMenuController as K } from "../Menu/useDropdownMenuController.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
import { Dropdown as
|
|
10
|
-
import { ToolbarFilterButton as
|
|
11
|
-
const
|
|
12
|
-
as:
|
|
13
|
-
size:
|
|
14
|
-
name:
|
|
15
|
-
label:
|
|
9
|
+
import { Dropdown as C } from "../Dropdown/Dropdown.js";
|
|
10
|
+
import { ToolbarFilterButton as F } from "./ToolbarFilterButton.js";
|
|
11
|
+
const S = ({
|
|
12
|
+
as: P,
|
|
13
|
+
size: a,
|
|
14
|
+
name: o,
|
|
15
|
+
label: f = "",
|
|
16
16
|
searchable: m,
|
|
17
|
-
groups:
|
|
18
|
-
items:
|
|
19
|
-
removable:
|
|
20
|
-
removeLabel:
|
|
21
|
-
filterState:
|
|
22
|
-
onFilterStateChange:
|
|
17
|
+
groups: p,
|
|
18
|
+
items: g,
|
|
19
|
+
removable: E,
|
|
20
|
+
removeLabel: V = "Fjern filter",
|
|
21
|
+
filterState: c,
|
|
22
|
+
onFilterStateChange: v,
|
|
23
23
|
onFilterChange: j,
|
|
24
|
-
onRemove:
|
|
24
|
+
onRemove: h,
|
|
25
25
|
open: t,
|
|
26
|
-
onToggle:
|
|
27
|
-
onClose:
|
|
28
|
-
submitLabel:
|
|
29
|
-
search:
|
|
26
|
+
onToggle: y,
|
|
27
|
+
onClose: d,
|
|
28
|
+
submitLabel: b,
|
|
29
|
+
search: k,
|
|
30
30
|
virtualized: w,
|
|
31
|
-
title:
|
|
31
|
+
title: I,
|
|
32
32
|
variant: D,
|
|
33
33
|
dropdownSize: x = "sm"
|
|
34
34
|
}) => {
|
|
35
|
-
const M =
|
|
36
|
-
|
|
35
|
+
const M = G(t), e = K({ id: "toolbar-filter-menu" });
|
|
36
|
+
H(() => {
|
|
37
37
|
const r = M.current;
|
|
38
|
-
M.current = t, r && !t &&
|
|
39
|
-
}, [t,
|
|
38
|
+
M.current = t, r && !t && e?.triggerRef?.current?.focus();
|
|
39
|
+
}, [t, e.triggerRef]);
|
|
40
40
|
const O = (r) => {
|
|
41
|
-
const
|
|
42
|
-
j?.(
|
|
43
|
-
},
|
|
41
|
+
const i = r.target.type, l = r.target.name, q = r.target.value;
|
|
42
|
+
j?.(i, l, q), i === "radio" && d();
|
|
43
|
+
}, u = g?.map((r) => ({
|
|
44
44
|
...r,
|
|
45
|
-
onChange: (
|
|
46
|
-
})),
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
onChange: (i) => O(i)
|
|
46
|
+
})), B = (g?.filter((r) => r.checked)?.map((r) => r.value || "true")).length > 0 || c?.[o]?.length, A = D || B ? "tinted" : "outline", R = P || J, s = m ? "combobox" : "menu", T = () => {
|
|
47
|
+
d();
|
|
48
|
+
const r = c?.[o]?.[0];
|
|
49
|
+
u?.filter((l) => l.checked)?.length === 0 && !r && h?.();
|
|
50
|
+
};
|
|
51
|
+
return E ? /* @__PURE__ */ n(
|
|
52
|
+
C,
|
|
49
53
|
{
|
|
50
|
-
submitLabel:
|
|
51
|
-
title:
|
|
54
|
+
submitLabel: b,
|
|
55
|
+
title: I,
|
|
52
56
|
variant: "drawer-dropdown",
|
|
53
57
|
size: x,
|
|
54
|
-
trigger: /* @__PURE__ */
|
|
55
|
-
|
|
58
|
+
trigger: /* @__PURE__ */ n(
|
|
59
|
+
F,
|
|
56
60
|
{
|
|
57
|
-
name:
|
|
58
|
-
onClick:
|
|
59
|
-
onRemove:
|
|
61
|
+
name: o,
|
|
62
|
+
onClick: y,
|
|
63
|
+
onRemove: h,
|
|
60
64
|
removable: !0,
|
|
61
|
-
variant:
|
|
62
|
-
removeLabel:
|
|
65
|
+
variant: A,
|
|
66
|
+
removeLabel: V,
|
|
63
67
|
open: t,
|
|
64
68
|
"aria-expanded": t,
|
|
65
|
-
"aria-controls":
|
|
66
|
-
ref:
|
|
67
|
-
children:
|
|
69
|
+
"aria-controls": e.menuId,
|
|
70
|
+
ref: e.triggerRef,
|
|
71
|
+
children: f
|
|
68
72
|
}
|
|
69
73
|
),
|
|
70
74
|
open: t,
|
|
71
|
-
onClose:
|
|
72
|
-
...
|
|
73
|
-
children: /* @__PURE__ */
|
|
74
|
-
|
|
75
|
+
onClose: T,
|
|
76
|
+
...e.dropdownA11yProps,
|
|
77
|
+
children: /* @__PURE__ */ n(
|
|
78
|
+
R,
|
|
75
79
|
{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
open: t,
|
|
81
|
+
search: k,
|
|
82
|
+
name: o,
|
|
83
|
+
filterState: c,
|
|
84
|
+
onFilterStateChange: v,
|
|
85
|
+
size: a,
|
|
81
86
|
searchable: m,
|
|
82
|
-
groups:
|
|
83
|
-
items:
|
|
87
|
+
groups: p,
|
|
88
|
+
items: u,
|
|
84
89
|
keyboardEvents: t,
|
|
85
|
-
a11yMode:
|
|
86
|
-
...
|
|
90
|
+
a11yMode: s,
|
|
91
|
+
...s === "combobox" ? { id: e.menuId } : e.menuA11yProps,
|
|
87
92
|
virtualized: w
|
|
88
93
|
}
|
|
89
94
|
)
|
|
90
95
|
}
|
|
91
|
-
) : /* @__PURE__ */
|
|
92
|
-
|
|
96
|
+
) : /* @__PURE__ */ n(
|
|
97
|
+
C,
|
|
93
98
|
{
|
|
94
99
|
size: x,
|
|
95
|
-
title:
|
|
100
|
+
title: I,
|
|
96
101
|
variant: "drawer-dropdown",
|
|
97
|
-
submitLabel:
|
|
98
|
-
trigger: /* @__PURE__ */
|
|
102
|
+
submitLabel: b,
|
|
103
|
+
trigger: /* @__PURE__ */ n(F, { name: o, onClick: y, variant: A, children: f }),
|
|
99
104
|
open: t,
|
|
100
|
-
onClose:
|
|
101
|
-
...
|
|
102
|
-
children: /* @__PURE__ */
|
|
103
|
-
|
|
105
|
+
onClose: d,
|
|
106
|
+
...e.dropdownA11yProps,
|
|
107
|
+
children: /* @__PURE__ */ n(
|
|
108
|
+
R,
|
|
104
109
|
{
|
|
105
|
-
search:
|
|
106
|
-
name:
|
|
107
|
-
filterState:
|
|
108
|
-
onFilterStateChange:
|
|
109
|
-
size:
|
|
110
|
+
search: k,
|
|
111
|
+
name: o,
|
|
112
|
+
filterState: c,
|
|
113
|
+
onFilterStateChange: v,
|
|
114
|
+
size: a,
|
|
110
115
|
searchable: m,
|
|
111
|
-
groups:
|
|
112
|
-
items:
|
|
116
|
+
groups: p,
|
|
117
|
+
items: u,
|
|
113
118
|
keyboardEvents: t,
|
|
114
|
-
a11yMode:
|
|
115
|
-
...
|
|
119
|
+
a11yMode: s,
|
|
120
|
+
...s === "combobox" ? { id: e.menuId } : e.menuA11yProps,
|
|
116
121
|
virtualized: w
|
|
117
122
|
}
|
|
118
123
|
)
|
|
@@ -120,5 +125,5 @@ const L = ({
|
|
|
120
125
|
);
|
|
121
126
|
};
|
|
122
127
|
export {
|
|
123
|
-
|
|
128
|
+
S as ToolbarFilterMenu
|
|
124
129
|
};
|
|
@@ -4,7 +4,7 @@ import "../../index-p1eeF8LQ.js";
|
|
|
4
4
|
import "react";
|
|
5
5
|
import { Dropdown as c } from "../Dropdown/Dropdown.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { M as b } from "../../SearchField-
|
|
7
|
+
import { M as b } from "../../SearchField-CYYz0JvC.js";
|
|
8
8
|
import { useDropdownMenuController as f } from "../Menu/useDropdownMenuController.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
10
|
import { S as h } from "../../ChevronUpDown-DqGsU4MC.js";
|
|
@@ -5,7 +5,7 @@ import "../Button/Button.js";
|
|
|
5
5
|
import "react-dom";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
7
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import { S as f } from "../../SearchField-
|
|
8
|
+
import { S as f } from "../../SearchField-CYYz0JvC.js";
|
|
9
9
|
const b = ({
|
|
10
10
|
value: r,
|
|
11
11
|
name: o,
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { Toolbar as e } from "./Toolbar.js";
|
|
2
2
|
import { ToolbarFilter as l } from "./ToolbarFilter.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { ToolbarFilterMenu as f } from "./ToolbarFilterMenu.js";
|
|
4
|
+
import { ToolbarSearch as p } from "./ToolbarSearch.js";
|
|
5
|
+
import { ToolbarMenu as b } from "./ToolbarMenu.js";
|
|
6
|
+
import { useFilter as i } from "./useFilter.js";
|
|
7
|
+
import { SelectDateFilter as u } from "./SelectDateFilter.js";
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
+
u as SelectDateFilter,
|
|
9
10
|
e as Toolbar,
|
|
10
11
|
l as ToolbarFilter,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
f as ToolbarFilterMenu,
|
|
13
|
+
b as ToolbarMenu,
|
|
14
|
+
p as ToolbarSearch,
|
|
15
|
+
i as useFilter
|
|
14
16
|
};
|