@altinn/altinn-components 0.49.0 → 0.50.1

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,6 +1,6 @@
1
1
  import { jsxs as e, jsx as C } from "react/jsx-runtime";
2
2
  import { useIsDesktop as r } from "../../hooks/useIsDesktop.js";
3
- const p = ({ className: L, title: i = "Digdir logomark", "aria-hidden": o }) => {
3
+ const a = ({ className: i, title: L = "Digdir logo", "aria-hidden": o }) => {
4
4
  const l = r() ? 8.5 : 7, { width: t, height: n } = { width: `${l}em`, height: `${l * 0.34}em` };
5
5
  return /* @__PURE__ */ e(
6
6
  "svg",
@@ -11,10 +11,11 @@ const p = ({ className: L, title: i = "Digdir logomark", "aria-hidden": o }) =>
11
11
  height: n,
12
12
  viewBox: "0 0 113.779 38.8565",
13
13
  version: "1.1",
14
- className: L,
14
+ className: i,
15
15
  "aria-hidden": o,
16
+ "aria-labelledby": "digdir-logo-title",
16
17
  children: [
17
- /* @__PURE__ */ C("title", { children: i }),
18
+ /* @__PURE__ */ C("title", { id: "digdir-logo-title", children: L }),
18
19
  /* @__PURE__ */ e("g", { id: "surface1", children: [
19
20
  /* @__PURE__ */ C(
20
21
  "path",
@@ -106,5 +107,5 @@ const p = ({ className: L, title: i = "Digdir logomark", "aria-hidden": o }) =>
106
107
  );
107
108
  };
108
109
  export {
109
- p as DigdirLogomark
110
+ a as DigdirLogomark
110
111
  };
@@ -1,5 +1,5 @@
1
- import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
- import { c as n } from "../../index-L8X2o7IH.js";
1
+ import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
+ import { c as a } from "../../index-L8X2o7IH.js";
3
3
  import { Badge as g } from "../Badge/Badge.js";
4
4
  import { ButtonBase as l } from "../Button/ButtonBase.js";
5
5
  import "react";
@@ -13,8 +13,8 @@ import '../../assets/HeaderLogo2.css';const f = "_logo_1d6ig_1", d = {
13
13
  en: "Go to homepage"
14
14
  }, C = ({ className: r, as: m = "a", href: s = "/", badge: o }) => {
15
15
  const { languageCode: e } = c(), i = x[e ?? ""] ?? "Gå til forsiden";
16
- return /* @__PURE__ */ a(l, { as: m, className: n(d.logo, r), href: s, ariaLabel: i, children: [
17
- /* @__PURE__ */ t(p, {}),
16
+ return /* @__PURE__ */ n(l, { as: m, className: a(d.logo, r), href: s, children: [
17
+ /* @__PURE__ */ t(p, { title: i }),
18
18
  o && /* @__PURE__ */ t(g, { ...o })
19
19
  ] });
20
20
  };
@@ -1,5 +1,5 @@
1
1
  import { jsxs as o, jsx as C } from "react/jsx-runtime";
2
- const e = ({ className: r, title: i = "Digdir logomark" }) => /* @__PURE__ */ o(
2
+ const e = ({ className: r, title: i = "Digdir logo" }) => /* @__PURE__ */ o(
3
3
  "svg",
4
4
  {
5
5
  width: "1em",
@@ -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
  };
@@ -1,5 +1,5 @@
1
1
  import { ElementType, MouseEventHandler } from 'react';
2
- import { BadgeProps } from '../Badge/Badge.tsx';
2
+ import { BadgeProps } from '../Badge';
3
3
  export interface HeaderLogoProps {
4
4
  className?: string;
5
5
  as?: ElementType;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.49.0",
3
+ "version": "0.50.1",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",