@altinn/altinn-components 0.24.6 → 0.24.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.
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { createElement as t } from "react";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import { useMenu as
|
|
4
|
+
import { useMenu as y } from "../../hooks/useMenu.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { DialogListGroup as
|
|
6
|
+
import { DialogListGroup as u } from "./DialogListGroup.js";
|
|
7
7
|
import { DialogListItem as d } from "./DialogListItem.js";
|
|
8
8
|
import "../Search/AutocompleteBase.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
10
|
import { Section as g } from "../Page/Section.js";
|
|
11
|
-
const
|
|
12
|
-
const { menu:
|
|
11
|
+
const v = ({ items: i, groups: m = {}, sortGroupBy: e, isLoading: p }) => {
|
|
12
|
+
const { menu: o } = y({
|
|
13
13
|
items: i,
|
|
14
14
|
groups: m,
|
|
15
15
|
groupByKey: "groupId",
|
|
16
16
|
keyboardEvents: !1,
|
|
17
17
|
sortGroupBy: e
|
|
18
18
|
});
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
const
|
|
21
|
-
return /* @__PURE__ */ t(
|
|
22
|
-
const
|
|
23
|
-
return /* @__PURE__ */ t(d, { ...
|
|
19
|
+
return /* @__PURE__ */ l(g, { spacing: 3, margin: "section", "aria-busy": p, children: o == null ? void 0 : o.map((r, s) => {
|
|
20
|
+
const n = r.props || {};
|
|
21
|
+
return /* @__PURE__ */ t(u, { ...n, key: s }, r == null ? void 0 : r.items.map((a, c) => {
|
|
22
|
+
const f = a.props || {};
|
|
23
|
+
return /* @__PURE__ */ t(d, { ...f, key: c });
|
|
24
24
|
}));
|
|
25
25
|
}) });
|
|
26
26
|
};
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
v as DialogList
|
|
29
29
|
};
|
|
@@ -3,5 +3,6 @@ export interface DialogListProps {
|
|
|
3
3
|
items: DialogListItemProps[];
|
|
4
4
|
groups?: Record<string, DialogListGroupProps>;
|
|
5
5
|
sortGroupBy?: (a: [string, DialogListItemProps[]], b: [string, DialogListItemProps[]]) => number;
|
|
6
|
+
isLoading?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export declare const DialogList: ({ items, groups, sortGroupBy }: DialogListProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const DialogList: ({ items, groups, sortGroupBy, isLoading }: DialogListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ items, groups, sortGroupBy }: import('./DialogList').DialogListProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ items, groups, sortGroupBy, isLoading }: import('./DialogList').DialogListProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
args: {
|
|
7
7
|
items: import('./DialogListItem').DialogListItemProps[];
|
|
8
8
|
groups?: Record<string, import('./DialogListGroup').DialogListGroupProps>;
|
|
9
9
|
sortGroupBy?: (a: [string, import('./DialogListItem').DialogListItemProps[]], b: [string, import('./DialogListItem').DialogListItemProps[]]) => number;
|
|
10
|
+
isLoading?: boolean;
|
|
10
11
|
};
|
|
11
12
|
};
|
|
12
13
|
export default meta;
|