@snokam/footer 5.0.29 → 6.0.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,73 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [6.0.0](https://github.com/snokam/monorepo/compare/@snokam/footer@5.0.26...@snokam/footer@6.0.0) (2026-10-14)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **platform:** SaaS onboarding batch 3 — platform sender, internal costs, empty states ([#2900](https://github.com/snokam/monorepo/issues/2900)) ([bdb5a7e](https://github.com/snokam/monorepo/commit/bdb5a7e4bc7865dc32f367a7e1f3f6521ff1d7cb))
11
+
12
+ ### Features
13
+
14
+ - per-company branding (logo, dark logo, icon) ([#2907](https://github.com/snokam/monorepo/issues/2907)) ([dc32583](https://github.com/snokam/monorepo/commit/dc325832803c88158937f45fe5b9e1b64846a52d))
15
+
16
+ ### BREAKING CHANGES
17
+
18
+ - SimpleHeaderBase and FooterBase take `logo` as a ReactNode;
19
+ the HeaderLogo and FooterLogo types are removed.
20
+
21
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
23
+
24
+ - feat(platform-web): company branding in /manage, at login and in the shell
25
+
26
+ /manage/innstillinger gets a Merkevare section: the logo for light
27
+ backgrounds, the logo for dark backgrounds and the square icon, each with a
28
+ preview on its own background, upload (react-hook-form + zod: type and 2 MB
29
+ checked before sending) and remove. Server error codes map to CMS copy.
30
+ The central login shows the company's logo above "Logg inn hos …", from
31
+ login-config. The /manage shell shows the managed business's logo linking to
32
+ its front page; /admin and an operator without a business show the platform
33
+ business. The public snosky.no chrome keeps the Snøsky logo from the platform
34
+ CMS, through the same BusinessLogo.
35
+
36
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
38
+
39
+ - fix(my-page-web): drop leftover Snøkam favicons
40
+
41
+ The unused pages-router meta component and finance-web's public/favicon.ico
42
+ served Snøkam's icon to every company; favicons now come from the
43
+ company's uploaded icon.
44
+
45
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
46
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
47
+
48
+ - fix(handbook-web): no Snøkam share image, no raw-URL fallback in branding metadata
49
+
50
+ The handbook's root metadata no longer hardcodes the Snøkam icon as the
51
+ share image, so the company's share image from makeTenantMetadata applies.
52
+ The favicon and share helpers drop their raw-URL fallback: a transform that
53
+ yields nothing yields no image, never an untransformed (possibly SVG) URL.
54
+
55
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
56
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
57
+
58
+ - fix(ui): show the light logo inverted on dark when no dark logo is uploaded
59
+
60
+ Without a dark logo, a dark background shows the light logo turned white
61
+ (brightness(0) invert(1)) instead of the wordmark. The Merkevare previews
62
+ use static brand tokens, and upload errors are read by parsing the JSON
63
+ body rather than stripping quotes.
64
+
65
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
66
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
67
+
68
+ - chore(clients): regenerate platform-function clients for branding
69
+
70
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
71
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
72
+
6
73
  ## [5.0.29](https://github.com/snokam/monorepo/compare/@snokam/footer@5.0.26...@snokam/footer@5.0.29) (2026-10-14)
7
74
 
8
75
  ### Bug Fixes
@@ -1 +1 @@
1
- {"version":3,"file":"Footer.stories.d.ts","sourceRoot":"","sources":["../../src/v1/Footer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGtD;;;;GAIG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAgBjC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzC,eAAO,MAAM,KAAK,EAAE,KAAU,CAAC;AAE/B,eAAO,MAAM,IAAI,EAAE,KAKlB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAIhC,CAAC"}
1
+ {"version":3,"file":"Footer.stories.d.ts","sourceRoot":"","sources":["../../src/v1/Footer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGtD;;;;GAIG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAgBjC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzC,eAAO,MAAM,KAAK,EAAE,KAAU,CAAC;AAE/B,eAAO,MAAM,IAAI,EAAE,KAKlB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAIhC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { BusinessLogo } from "@snokam/ui/business-logo";
2
3
  import { TransitionType } from "@snokam/ui/layout";
3
4
  import { FooterBase } from "./components/Footer/base";
4
5
  import { FooterTheme } from "./components/Footer/types";
@@ -13,7 +14,7 @@ const meta = {
13
14
  parameters: { layout: "fullscreen" },
14
15
  args: {
15
16
  theme: FooterTheme.Light,
16
- logo: { url: "/snokam-logo.svg", alt: "Snøkam" },
17
+ logo: _jsx(BusinessLogo, { name: "Sn\u00F8kam", tone: "light", height: 46 }),
17
18
  content: _jsx("p", { children: "Sn\u00F8kam AS \u00B7 Postboks 123 \u00B7 0150 Oslo" }),
18
19
  links: [
19
20
  { href: "https://snokam.no/miljofyrtorn", text: "Miljøfyrtårn" },
@@ -29,7 +30,7 @@ export const Light = {};
29
30
  export const Dark = {
30
31
  args: {
31
32
  theme: FooterTheme.Dark,
32
- logo: { url: "/snokam-logo-white.svg", alt: "Snøkam" },
33
+ logo: _jsx(BusinessLogo, { name: "Sn\u00F8kam", tone: "dark", height: 46 }),
33
34
  },
34
35
  };
35
36
  export const WithWaveTransition = {
@@ -1 +1 @@
1
- {"version":3,"file":"Footer.stories.js","sourceRoot":"","sources":["../../src/v1/Footer.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD;;;;GAIG;AACH,MAAM,IAAI,GAA4B;IACpC,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,UAAU;IACrB,UAAU,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE;IACpC,IAAI,EAAE;QACJ,KAAK,EAAE,WAAW,CAAC,KAAK;QACxB,IAAI,EAAE,EAAE,GAAG,EAAE,kBAAkB,EAAE,GAAG,EAAE,QAAQ,EAAE;QAChD,OAAO,EAAE,8EAA2C;QACpD,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,gCAAgC,EAAE,IAAI,EAAE,cAAc,EAAE;YAChE,EAAE,IAAI,EAAE,yBAAyB,EAAE,IAAI,EAAE,OAAO,EAAE;SACnD;KACF;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE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EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE;KACjE;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,KAAK,GAAU,EAAE,CAAC;AAE/B,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,IAAI,EAAE;QACJ,KAAK,EAAE,WAAW,CAAC,IAAI;QACvB,IAAI,EAAE,KAAC,YAAY,IAAC,IAAI,EAAC,aAAQ,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAE,EAAE,GAAI;KAC7D;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAU;IACvC,IAAI,EAAE;QACJ,WAAW,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;KACjE;CACF,CAAC"}
@@ -12,6 +12,6 @@ import { FooterBaseProps } from "./types";
12
12
  */
13
13
  export declare const FooterBase: ({ theme, logo, content, links, transitions, themeToggle, }: FooterBaseProps) => import("react").JSX.Element;
14
14
  export { FooterTheme } from "./types";
15
- export type { FooterBaseProps, FooterLink, FooterLogo } from "./types";
15
+ export type { FooterBaseProps, FooterLink } from "./types";
16
16
  export default FooterBase;
17
17
  //# sourceMappingURL=base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/v1/components/Footer/base.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAe,MAAM,SAAS,CAAC;AAGvD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,GAAI,4DAOxB,eAAe,gCAmCjB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEvE,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/v1/components/Footer/base.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAe,MAAM,SAAS,CAAC;AAGvD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,GAAI,4DAOxB,eAAe,gCA0BjB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE3D,eAAe,UAAU,CAAC"}
@@ -18,8 +18,8 @@ import Layout, { Padding } from "@snokam/ui/layout";
18
18
  * all three back in through the back door.
19
19
  */
20
20
  export const FooterBase = ({ theme = FooterTheme.Dark, logo, content, links = [], transitions, themeToggle, }) => {
21
- const { Link, Image } = useFramework();
22
- return (_jsx(Layout.Container, { as: "footer", theme: theme, transitions: transitions, children: _jsx(Layout.Content, { children: _jsxs(Layout.Section, { padding: Padding.Large, children: [logo && (_jsx(Styled.Logo, { as: Image, "data-sanity": logo.sanityAttr, alt: logo.alt, src: logo.url, width: 236, height: 46 })), Array.isArray(content) ? _jsx(PortableText, { value: content }) : content, links.map((link) => (_jsxs(Styled.Link, { as: Link, href: link.href, children: [link.text, _jsx(ChevronRight, {})] }, link.href))), themeToggle && (_jsx(Styled.ToggleRow, { id: "tema", children: themeToggle }))] }) }) }));
21
+ const { Link } = useFramework();
22
+ return (_jsx(Layout.Container, { as: "footer", theme: theme, transitions: transitions, children: _jsx(Layout.Content, { children: _jsxs(Layout.Section, { padding: Padding.Large, children: [logo && _jsx(Styled.Logo, { children: logo }), Array.isArray(content) ? _jsx(PortableText, { value: content }) : content, links.map((link) => (_jsxs(Styled.Link, { as: Link, href: link.href, children: [link.text, _jsx(ChevronRight, {})] }, link.href))), themeToggle && (_jsx(Styled.ToggleRow, { id: "tema", children: themeToggle }))] }) }) }));
23
23
  };
24
24
  export { FooterTheme } from "./types";
25
25
  export default FooterBase;
@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MAAC,MAAM,CAAC,OAAO,IAAC,OAAO,EAAE,OAAO,CAAC,KAAK,aACnC,IAAI,IAAI,KAAC,MAAM,CAAC,IAAI,cAAE,IAAI,GAAe,EACzC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAC,YAAY,IAAC,KAAK,EAAE,OAAO,GAAI,CAAC,CAAC,CAAC,OAAO,EACnE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,MAAC,MAAM,CAAC,IAAI,IAAC,EAAE,EAAE,IAAI,EAAkB,IAAI,EAAE,IAAI,CAAC,IAAI,aACnD,IAAI,CAAC,IAAI,EACV,KAAC,YAAY,KAAG,KAFU,IAAI,CAAC,IAAI,CAGvB,CACf,CAAC,EACD,WAAW,IAAI,CACd,KAAC,MAAM,CAAC,SAAS,IAAC,EAAE,EAAC,MAAM,YAAE,WAAW,GAAoB,CAC7D,IACc,GACF,GACA,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC,eAAe,UAAU,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { FooterProps } from "./types";
2
2
  /**
3
- * The footer, wired to the app it lives in: logo and copy from the CMS, link targets from the
4
- * tenant config. {@link FooterBase} is the same footer with those passed in as props.
3
+ * The footer, wired to the app it lives in: the business's logo and link targets from the tenant
4
+ * config, copy from the CMS. {@link FooterBase} is the same footer with those passed in as props.
5
5
  */
6
- export declare const Footer: ({ theme, showMiljofyrtorn, showBlog, showPresentations, extraLinks, transitions, onThemeSave, }: FooterProps) => import("react").JSX.Element;
6
+ export declare const Footer: ({ logo, theme, showMiljofyrtorn, showBlog, showPresentations, extraLinks, transitions, onThemeSave, }: FooterProps) => import("react").JSX.Element;
7
7
  export default Footer;
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v1/components/Footer/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAc,WAAW,EAAe,MAAM,SAAS,CAAC;AAI/D;;;GAGG;AACH,eAAO,MAAM,MAAM,GAAI,iGAQpB,WAAW,gCA0Db,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v1/components/Footer/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAc,WAAW,EAAe,MAAM,SAAS,CAAC;AAI/D;;;GAGG;AACH,eAAO,MAAM,MAAM,GAAI,uGASpB,WAAW,gCAyDb,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -2,23 +2,22 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { useColorScheme } from "@snokam/ui/theme/admin";
4
4
  import { usePageContent } from "@snokam/sanity-page-content";
5
- import { useConfig } from "@snokam/tenant";
5
+ import { useConfig, useTenantEntitlements } from "@snokam/tenant";
6
+ import { BusinessLogo } from "@snokam/ui/business-logo";
6
7
  import { FooterTheme } from "./types";
7
8
  import { FooterBase } from "./base";
8
9
  import { ThemeModeToggle } from "./ThemeModeToggle";
9
10
  /**
10
- * The footer, wired to the app it lives in: logo and copy from the CMS, link targets from the
11
- * tenant config. {@link FooterBase} is the same footer with those passed in as props.
11
+ * The footer, wired to the app it lives in: the business's logo and link targets from the tenant
12
+ * config, copy from the CMS. {@link FooterBase} is the same footer with those passed in as props.
12
13
  */
13
- export const Footer = ({ theme = FooterTheme.Dark, showMiljofyrtorn = true, showBlog = true, showPresentations = false, extraLinks, transitions, onThemeSave, }) => {
14
- const { getImage, getText, getAttr, getBlock, hasContent } = usePageContent();
14
+ export const Footer = ({ logo, theme = FooterTheme.Dark, showMiljofyrtorn = true, showBlog = true, showPresentations = false, extraLinks, transitions, onThemeSave, }) => {
15
+ const { getText, getBlock, hasContent } = usePageContent();
15
16
  const config = useConfig();
17
+ const tenant = useTenantEntitlements();
16
18
  const resolvedTheme = useColorScheme();
17
19
  const snokamUrl = config.NEXT_PUBLIC_SNOKAM_BASE_URL ?? "";
18
- const logoKey = resolvedTheme === "dark" || theme === FooterTheme.Dark
19
- ? "footerWhiteLogo"
20
- : "footerBlueLogo";
21
- const logo = hasContent(logoKey) ? getImage(logoKey) : undefined;
20
+ const tone = resolvedTheme === "dark" || theme === FooterTheme.Dark ? "dark" : "light";
22
21
  const links = [
23
22
  ...(showMiljofyrtorn
24
23
  ? [
@@ -46,11 +45,7 @@ export const Footer = ({ theme = FooterTheme.Dark, showMiljofyrtorn = true, show
46
45
  : []),
47
46
  ...(extraLinks ?? []),
48
47
  ];
49
- return (_jsx(FooterBase, { theme: theme, logo: logo && {
50
- url: logo.url,
51
- alt: getText("footerLogoAlt"),
52
- sanityAttr: getAttr(logoKey),
53
- }, content: hasContent("footerContent") ? getBlock("footerContent") : undefined, links: links, transitions: transitions, themeToggle: _jsx(ThemeModeToggle, { onThemeSave: onThemeSave }) }));
48
+ return (_jsx(FooterBase, { theme: theme, logo: logo ?? (_jsx(BusinessLogo, { name: tenant?.businessName ?? "", branding: tenant?.branding, tone: tone, height: 46 })), content: getBlock("footerContent"), links: links, transitions: transitions, themeToggle: _jsx(ThemeModeToggle, { onThemeSave: onThemeSave }) }));
54
49
  };
55
50
  export default Footer;
56
51
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/v1/components/Footer/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAA2B,WAAW,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC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AAE,EAChC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAC1B,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,EAAE,GACV,CACH,EAEH,OAAO,EAAE,QAAQ,CAAC,eAAe,CAAC,EAClC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,KAAC,eAAe,IAAC,WAAW,EAAE,WAAW,GAAI,GAC1D,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -2,7 +2,7 @@ declare const _default: {
2
2
  Logo: import("@emotion/styled").StyledComponent<{
3
3
  theme?: import("@emotion/react").Theme;
4
4
  as?: React.ElementType;
5
- }, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
6
  Link: import("@emotion/styled").StyledComponent<{
7
7
  theme?: import("@emotion/react").Theme;
8
8
  as?: React.ElementType;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import styled from "@emotion/styled";
3
- const Logo = styled.img `
3
+ const Logo = styled.div `
4
4
  margin-bottom: 2.5rem;
5
5
  max-width: 100%;
6
6
  `;
@@ -9,17 +9,12 @@ export interface FooterLink {
9
9
  href: string;
10
10
  text: string;
11
11
  }
12
- export interface FooterLogo {
13
- url: string;
14
- alt?: string;
15
- sanityAttr?: string;
16
- }
17
12
  /**
18
13
  * Everything {@link FooterBase} draws. The wired `Footer` fills these in from the CMS and the
19
14
  * tenant config; supply them yourself when neither exists.
20
15
  */
21
16
  export interface FooterBaseProps {
22
- logo?: FooterLogo;
17
+ logo?: ReactNode;
23
18
  content?: ReactNode | unknown[];
24
19
  links?: FooterLink[];
25
20
  theme?: FooterTheme;
@@ -28,6 +23,7 @@ export interface FooterBaseProps {
28
23
  themeToggle?: ReactNode;
29
24
  }
30
25
  export interface FooterProps {
26
+ logo?: ReactNode;
31
27
  showMiljofyrtorn?: boolean;
32
28
  showBlog?: boolean;
33
29
  showPresentations?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/v1/components/Footer/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,oBAAY,WAAW;IACrB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,EAAE,CAAC;IAChC,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,mFAAmF;IACnF,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;CAChD"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/v1/components/Footer/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,oBAAY,WAAW;IACrB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,EAAE,CAAC;IAChC,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,mFAAmF;IACnF,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;CAChD"}
@@ -3,6 +3,6 @@ export { FooterBase } from "./components/Footer/base";
3
3
  export { SystemFooter } from "./components/SystemFooter";
4
4
  export type { SystemFooterProps } from "./components/SystemFooter";
5
5
  export { FooterTheme } from "./components/Footer/types";
6
- export type { FooterProps, FooterBaseProps, FooterLink, FooterLogo, } from "./components/Footer/types";
6
+ export type { FooterProps, FooterBaseProps, FooterLink, } from "./components/Footer/types";
7
7
  export default Footer;
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v1/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,EACV,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,GACX,MAAM,2BAA2B,CAAC;AACnC,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v1/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,EACV,WAAW,EACX,eAAe,EACf,UAAU,GACX,MAAM,2BAA2B,CAAC;AACnC,eAAe,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAOxD,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAMxD,eAAe,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.0.29",
2
+ "version": "6.0.0",
3
3
  "dependencies": {
4
4
  "@emotion/react": "^11.14.0",
5
5
  "@emotion/styled": "^11.14.1",
@@ -10,10 +10,10 @@
10
10
  "next-auth": "4.24.15",
11
11
  "react": "19.2.8",
12
12
  "react-dom": "19.2.8",
13
- "@snokam/sanity-page-content": "4.13.0",
14
- "@snokam/tenant": "2.1.19",
15
- "@snokam/ui": "4.2.0",
16
- "@snokam/auth": "3.9.0"
13
+ "@snokam/auth": "4.0.0",
14
+ "@snokam/sanity-page-content": "5.0.0",
15
+ "@snokam/ui": "5.0.0",
16
+ "@snokam/tenant": "3.0.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/node": "^26.1.1",