@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.
@@ -1 +1 @@
1
- ._menu_13em0_1{padding:0 .5rem;border-radius:.375rem}._list_13em0_6{display:flex;flex-direction:column;list-style:none;padding:0;margin:0}@media(min-width:1024px){._list_13em0_6{flex-direction:row;align-items:center;justify-content:start;column-gap:.5rem;width:auto}}._menu_13em0_1[data-theme=base],._item_13em0_29[data-theme=base]{background-color:var(--ds-color-base-default);color:var(--ds-color-base-contrast-default)}._item_13em0_29[data-theme=base]:hover{background-color:var(--ds-color-base-hover)}._item_13em0_29[data-theme=base]:active{background-color:var(--ds-color-base-active)}
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 c, jsx as o } from "react/jsx-runtime";
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 M = ({
13
- color: r = "company",
14
- theme: t = "base",
15
- hidden: i,
12
+ const H = ({
13
+ color: m = "company",
14
+ theme: i = "base",
15
+ hidden: r,
16
16
  title: p,
17
- menu: m,
18
- dismissable: a,
19
- onDismiss: e,
20
- children: n
21
- }) => /* @__PURE__ */ c(s, { children: [
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: t,
26
- color: r,
27
- hidden: i,
25
+ theme: i,
26
+ color: m,
27
+ hidden: r,
28
28
  title: p,
29
- dismissable: a,
30
- onDismiss: e
29
+ dismissable: e,
30
+ onDismiss: a
31
31
  }
32
32
  ),
33
- n,
34
- /* @__PURE__ */ o(u, { hidden: i, children: m && /* @__PURE__ */ o(x, { ...m, theme: t, color: r }) })
33
+ c,
34
+ /* @__PURE__ */ o(u, { hidden: r, children: t && /* @__PURE__ */ o(x, { ...t }) })
35
35
  ] });
36
36
  export {
37
- M as LayoutAction
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 n = "_menu_13em0_1", l = "_list_13em0_6", a = "_item_13em0_29", e = {
10
- menu: n,
11
- list: l,
12
- item: a
13
- }, x = ({ theme: i, color: r, items: o = [] }) => /* @__PURE__ */ t("nav", { "data-theme": i, "data-color": r, className: e.menu, children: /* @__PURE__ */ t("ul", { className: e.list, children: o.map((m) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(s, { ...m, className: e.item }) }, m.id)) }) });
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
- x as PageMenu
20
+ v as PageMenu
16
21
  };
@@ -1,9 +1,13 @@
1
- import { MenuItemColor, MenuItemProps } from '..';
2
- export type PageMenuTheme = 'default' | 'subtle' | 'base';
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
- id?: string;
5
- theme?: PageMenuTheme;
6
- color?: MenuItemColor;
7
- items?: MenuItemProps[];
8
+ items?: PageMenuButtonProps[];
8
9
  }
9
- export declare const PageMenu: ({ theme, color, items }: PageMenuProps) => import("react/jsx-runtime").JSX.Element;
10
+ /**
11
+ * Page menu
12
+ */
13
+ export declare const PageMenu: ({ items }: PageMenuProps) => import("react/jsx-runtime").JSX.Element;
@@ -4,4 +4,3 @@ declare const meta: Meta<typeof PageMenu>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Default: Story;
7
- export declare const BulkActionbar: Story;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.56.17",
3
+ "version": "0.56.18",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",