@altinn/altinn-components 0.56.17 → 0.56.18
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/PageMenu.css +1 -1
- package/dist/components/LayoutAction/LayoutAction.js +18 -18
- package/dist/components/Page/PageMenu.js +14 -9
- package/dist/types/lib/components/Page/PageMenu.d.ts +11 -7
- package/dist/types/lib/components/Page/PageMenu.stories.d.ts +0 -1
- package/package.json +1 -1
package/dist/assets/PageMenu.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._buttonGroup_1ybcg_1{display:flex;flex-direction:column;padding:.5rem;gap:.5rem}@media(min-width:1024px){._buttonGroup_1ybcg_1{flex-direction:row}}._button_1ybcg_1{justify-content:flex-start}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../Button/Button.js";
|
|
@@ -9,30 +9,30 @@ import { ActionHeader as f } from "./ActionHeader.js";
|
|
|
9
9
|
import { ActionFooter as u } from "./ActionFooter.js";
|
|
10
10
|
import "../Snackbar/useSnackbar.js";
|
|
11
11
|
import { PageMenu as x } from "../Page/PageMenu.js";
|
|
12
|
-
const
|
|
13
|
-
color:
|
|
14
|
-
theme:
|
|
15
|
-
hidden:
|
|
12
|
+
const H = ({
|
|
13
|
+
color: m = "company",
|
|
14
|
+
theme: i = "base",
|
|
15
|
+
hidden: r,
|
|
16
16
|
title: p,
|
|
17
|
-
menu:
|
|
18
|
-
dismissable:
|
|
19
|
-
onDismiss:
|
|
20
|
-
children:
|
|
21
|
-
}) => /* @__PURE__ */
|
|
17
|
+
menu: t,
|
|
18
|
+
dismissable: e,
|
|
19
|
+
onDismiss: a,
|
|
20
|
+
children: c
|
|
21
|
+
}) => /* @__PURE__ */ n(s, { children: [
|
|
22
22
|
/* @__PURE__ */ o(
|
|
23
23
|
f,
|
|
24
24
|
{
|
|
25
|
-
theme:
|
|
26
|
-
color:
|
|
27
|
-
hidden:
|
|
25
|
+
theme: i,
|
|
26
|
+
color: m,
|
|
27
|
+
hidden: r,
|
|
28
28
|
title: p,
|
|
29
|
-
dismissable:
|
|
30
|
-
onDismiss:
|
|
29
|
+
dismissable: e,
|
|
30
|
+
onDismiss: a
|
|
31
31
|
}
|
|
32
32
|
),
|
|
33
|
-
|
|
34
|
-
/* @__PURE__ */ o(u, { hidden:
|
|
33
|
+
c,
|
|
34
|
+
/* @__PURE__ */ o(u, { hidden: r, children: t && /* @__PURE__ */ o(x, { ...t }) })
|
|
35
35
|
] });
|
|
36
36
|
export {
|
|
37
|
-
|
|
37
|
+
H as LayoutAction
|
|
38
38
|
};
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
|
+
import { Icon as u } from "../Icon/Icon.js";
|
|
3
4
|
import "react";
|
|
4
|
-
import "../Button/Button.js";
|
|
5
|
+
import { Button as p } from "../Button/Button.js";
|
|
5
6
|
import "react-dom";
|
|
6
7
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { MenuItem as s } from "../Menu/MenuItem.js";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
import '../../assets/PageMenu.css';const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
import '../../assets/PageMenu.css';const c = "_buttonGroup_1ybcg_1", a = "_button_1ybcg_1", r = {
|
|
10
|
+
buttonGroup: c,
|
|
11
|
+
button: a
|
|
12
|
+
}, v = ({ items: s }) => /* @__PURE__ */ t("nav", { "data-size": "sm", className: r.buttonGroup, children: s?.map((o) => {
|
|
13
|
+
const { icon: n, title: e, ...i } = o;
|
|
14
|
+
return /* @__PURE__ */ m(p, { variant: "ghost", className: r.button, size: "sm", ...i, children: [
|
|
15
|
+
n && /* @__PURE__ */ t(u, { svgElement: n }),
|
|
16
|
+
/* @__PURE__ */ t("span", { children: e })
|
|
17
|
+
] }, o.id);
|
|
18
|
+
}) });
|
|
14
19
|
export {
|
|
15
|
-
|
|
20
|
+
v as PageMenu
|
|
16
21
|
};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
1
|
+
import { ButtonProps, SvgElement } from '..';
|
|
2
|
+
export interface PageMenuButtonProps extends ButtonProps {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
icon?: SvgElement;
|
|
6
|
+
}
|
|
3
7
|
export interface PageMenuProps {
|
|
4
|
-
|
|
5
|
-
theme?: PageMenuTheme;
|
|
6
|
-
color?: MenuItemColor;
|
|
7
|
-
items?: MenuItemProps[];
|
|
8
|
+
items?: PageMenuButtonProps[];
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Page menu
|
|
12
|
+
*/
|
|
13
|
+
export declare const PageMenu: ({ items }: PageMenuProps) => import("react/jsx-runtime").JSX.Element;
|