@altinn/altinn-components 0.48.4 → 0.50.0

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
- ._sidebar_bcso7_1,._sidebar_bcso7_1[aria-hidden=true]{display:none}@media (min-width: 1024px){._sidebar_bcso7_1{align-self:flex-start;flex-shrink:0;display:flex;flex-direction:column;width:224px}._sidebar_bcso7_1[data-use-global-header=true]{margin-top:4.125rem}._sidebar_bcso7_1[data-sticky=true]{position:sticky;top:0}._sidebar_bcso7_1[aria-hidden=true]{display:none}}
1
+ ._sidebar_16tee_1,._sidebar_16tee_1[aria-hidden=true]{display:none}._footer_16tee_9{margin-top:.75rem;padding-top:1rem;padding-left:.5rem;border-top:1px solid var(--ds-color-border-subtle)}@media (min-width: 1024px){._sidebar_16tee_1{align-self:flex-start;flex-shrink:0;display:flex;flex-direction:column;width:224px}._sidebar_16tee_1[data-use-global-header=true]{margin-top:4.125rem}._sidebar_16tee_1[data-sticky=true]{position:sticky;top:0}._sidebar_16tee_1[aria-hidden=true]{display:none}}
@@ -1,47 +1,56 @@
1
1
  "use client";
2
- import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
+ import { jsxs as c, jsx as m } from "react/jsx-runtime";
3
3
  import { LayoutBase as L } from "./LayoutBase.js";
4
4
  import { LayoutBody as S } from "./LayoutBody.js";
5
- import { LayoutContent as i } from "./LayoutContent.js";
6
- import { LayoutSidebar as j } from "./LayoutSidebar.js";
7
- import { Footer as B } from "../Footer/Footer.js";
8
- import { GlobalHeader as C } from "../GlobalHeader/GlobalHeader.js";
5
+ import { LayoutContent as j } from "./LayoutContent.js";
6
+ import { LayoutSidebar as B } from "./LayoutSidebar.js";
7
+ import { Footer as C } from "../Footer/Footer.js";
8
+ import { GlobalHeader as F } from "../GlobalHeader/GlobalHeader.js";
9
9
  import "../../index-L8X2o7IH.js";
10
10
  import "react";
11
- import { useRootContext as F } from "../RootProvider/RootProvider.js";
12
- import { Menu as I } from "../Menu/Menu.js";
13
- import { Header as v } from "../Header/Header.js";
11
+ import { useRootContext as I } from "../RootProvider/RootProvider.js";
12
+ import { Menu as v } from "../Menu/Menu.js";
13
+ import { Header as M } from "../Header/Header.js";
14
14
  import "../Snackbar/useSnackbar.js";
15
- import { InboxSearch as M } from "../InboxSearch/InboxSearch.js";
16
- import { SkipLink as R } from "../SkipLink/SkipLink.js";
17
- const T = ({
15
+ import { InboxSearch as R } from "../InboxSearch/InboxSearch.js";
16
+ import { SkipLink as g } from "../SkipLink/SkipLink.js";
17
+ const U = ({
18
18
  color: h,
19
19
  theme: y = "subtle",
20
- header: m,
21
- footer: u,
20
+ header: t,
21
+ footer: r,
22
22
  sidebar: o,
23
23
  content: n = {},
24
24
  children: x,
25
- skipLink: f,
25
+ skipLink: u,
26
26
  useGlobalHeader: p = !1
27
27
  }) => {
28
- const { currentId: r } = F(), l = m && "search" in m ? m.search : void 0;
29
- return /* @__PURE__ */ c(L, { color: h, theme: r === "accountFullscreen" ? "default" : y, currentId: r, children: [
30
- f && /* @__PURE__ */ t(R, { ...f }),
31
- m && (p ? /* @__PURE__ */ t(C, { ...m }) : /* @__PURE__ */ t(v, { ...m })),
32
- /* @__PURE__ */ c(S, { currentId: r, children: [
33
- o && /* @__PURE__ */ c(j, { hidden: o == null ? void 0 : o.hidden, color: o == null ? void 0 : o.color, ...o, useGlobalHeader: p, children: [
34
- (o == null ? void 0 : o.menu) && /* @__PURE__ */ t(I, { ...o == null ? void 0 : o.menu }),
35
- o == null ? void 0 : o.children
36
- ] }),
37
- /* @__PURE__ */ c(i, { color: n == null ? void 0 : n.color, id: "main-content", children: [
38
- p && l && /* @__PURE__ */ t(M, { search: l }),
28
+ const { currentId: f } = I(), l = t && "search" in t ? t.search : void 0;
29
+ return /* @__PURE__ */ c(L, { color: h, theme: f === "accountFullscreen" ? "default" : y, currentId: f, children: [
30
+ u && /* @__PURE__ */ m(g, { ...u }),
31
+ t && (p ? /* @__PURE__ */ m(F, { ...t }) : /* @__PURE__ */ m(M, { ...t })),
32
+ /* @__PURE__ */ c(S, { currentId: f, children: [
33
+ o && /* @__PURE__ */ c(
34
+ B,
35
+ {
36
+ hidden: o == null ? void 0 : o.hidden,
37
+ color: o == null ? void 0 : o.color,
38
+ footer: o == null ? void 0 : o.footer,
39
+ useGlobalHeader: p,
40
+ children: [
41
+ (o == null ? void 0 : o.menu) && /* @__PURE__ */ m(v, { ...o == null ? void 0 : o.menu }),
42
+ o == null ? void 0 : o.children
43
+ ]
44
+ }
45
+ ),
46
+ /* @__PURE__ */ c(j, { color: n == null ? void 0 : n.color, id: "main-content", children: [
47
+ p && l && /* @__PURE__ */ m(R, { search: l }),
39
48
  x
40
49
  ] })
41
50
  ] }),
42
- u && /* @__PURE__ */ t(B, { ...u })
51
+ r && /* @__PURE__ */ m(C, { ...r })
43
52
  ] });
44
53
  };
45
54
  export {
46
- T as Layout
55
+ U as Layout
47
56
  };
@@ -1,23 +1,28 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import '../../assets/LayoutSidebar.css';const o = "_sidebar_bcso7_1", i = {
3
- sidebar: o
4
- }, c = ({
5
- color: a,
6
- hidden: s = !1,
7
- sticky: e,
8
- children: r,
1
+ import { jsxs as i, jsx as c } from "react/jsx-runtime";
2
+ import '../../assets/LayoutSidebar.css';const l = "_sidebar_16tee_1", n = "_footer_16tee_9", a = {
3
+ sidebar: l,
4
+ footer: n
5
+ }, f = ({
6
+ color: s,
7
+ hidden: r = !1,
8
+ sticky: t,
9
+ children: o,
10
+ footer: e,
9
11
  useGlobalHeader: d = !1
10
- }) => /* @__PURE__ */ t(
12
+ }) => /* @__PURE__ */ i(
11
13
  "aside",
12
14
  {
13
- className: i.sidebar,
14
- "data-color": a,
15
- "data-sticky": e,
15
+ className: a.sidebar,
16
+ "data-color": s,
17
+ "data-sticky": t,
16
18
  "data-use-global-header": d,
17
- "aria-hidden": s,
18
- children: r
19
+ "aria-hidden": r,
20
+ children: [
21
+ o,
22
+ e && /* @__PURE__ */ c("div", { className: a.footer, children: e })
23
+ ]
19
24
  }
20
25
  );
21
26
  export {
22
- c as LayoutSidebar
27
+ f as LayoutSidebar
23
28
  };
@@ -51,3 +51,4 @@ export declare const StickySidebar: (args: LayoutStoryArgs) => import("react/jsx
51
51
  export declare const HiddenSidebar: (args: LayoutStoryArgs) => import("react/jsx-runtime").JSX.Element;
52
52
  export declare const Fullscreen: (args: LayoutStoryArgs) => import("react/jsx-runtime").JSX.Element;
53
53
  export declare const Profile: (args: LayoutStoryArgs) => import("react/jsx-runtime").JSX.Element;
54
+ export declare const SidebarReference: (args: LayoutStoryArgs) => import("react/jsx-runtime").JSX.Element;
@@ -10,6 +10,7 @@ export interface LayoutSidebarProps {
10
10
  hidden?: boolean;
11
11
  sticky?: boolean;
12
12
  children?: ReactNode;
13
+ footer?: ReactNode;
13
14
  useGlobalHeader?: boolean;
14
15
  }
15
- export declare const LayoutSidebar: ({ color, hidden, sticky, children, useGlobalHeader, }: LayoutSidebarProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const LayoutSidebar: ({ color, hidden, sticky, children, footer, useGlobalHeader, }: LayoutSidebarProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,7 @@
1
+ import { ReactNode } from 'react';
1
2
  import { SettingsItemProps } from '..';
2
3
  export interface SettingsGroupProps {
3
- title?: string;
4
+ title?: string | ReactNode;
4
5
  }
5
6
  export interface SettingsListProps {
6
7
  items: SettingsItemProps[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.48.4",
3
+ "version": "0.50.0",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",