@snokam/footer 2.0.0 → 2.1.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 +12 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/v1/Footer.stories.d.ts +8 -3
- package/dist/v1/Footer.stories.d.ts.map +1 -1
- package/dist/v1/Footer.stories.js +18 -4
- package/dist/v1/Footer.stories.js.map +1 -1
- package/dist/v1/components/Footer/base.d.ts +11 -0
- package/dist/v1/components/Footer/base.d.ts.map +1 -0
- package/dist/v1/components/Footer/base.js +23 -0
- package/dist/v1/components/Footer/base.js.map +1 -0
- package/dist/v1/components/Footer/index.d.ts +4 -0
- package/dist/v1/components/Footer/index.d.ts.map +1 -1
- package/dist/v1/components/Footer/index.js +36 -13
- package/dist/v1/components/Footer/index.js.map +1 -1
- package/dist/v1/components/Footer/types.d.ts +18 -0
- package/dist/v1/components/Footer/types.d.ts.map +1 -1
- package/dist/v1/components/Footer/types.js.map +1 -1
- package/dist/v1/index.d.ts +2 -1
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +1 -0
- package/dist/v1/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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
|
+
# [2.1.0](https://github.com/snokam/monorepo/compare/@snokam/footer@2.0.1...@snokam/footer@2.1.0) (2026-08-18)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **navbar,footer:** split the markup from the wiring ([#2358](https://github.com/snokam/monorepo/issues/2358)) ([084865a](https://github.com/snokam/monorepo/commit/084865ae9b41e00cee07c3829f645b789c50ee97))
|
|
11
|
+
|
|
12
|
+
## [2.0.1](https://github.com/snokam/monorepo/compare/@snokam/footer@2.0.0...@snokam/footer@2.0.1) (2026-08-18)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- **navbar,footer:** add the root entry both packages advertise ([#2357](https://github.com/snokam/monorepo/issues/2357)) ([8f64dd3](https://github.com/snokam/monorepo/commit/8f64dd3242794f40afae308deaaec7feb7282fa1))
|
|
17
|
+
|
|
6
18
|
# 2.0.0 (2026-08-18)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { FooterBase } from "./components/Footer/base";
|
|
3
|
+
/**
|
|
4
|
+
* These render `FooterBase`. The wired `Footer` reads its logo, body copy and link targets from
|
|
5
|
+
* the CMS and the tenant config, which Storybook has neither of — `useConfig` throws outright
|
|
6
|
+
* without a provider. The base takes them as props.
|
|
7
|
+
*/
|
|
8
|
+
declare const meta: Meta<typeof FooterBase>;
|
|
4
9
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
10
|
+
type Story = StoryObj<typeof FooterBase>;
|
|
6
11
|
export declare const Light: Story;
|
|
7
12
|
export declare const Dark: Story;
|
|
8
13
|
export declare const WithWaveTransition: Story;
|
|
@@ -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,
|
|
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,KAElB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAIhC,CAAC"}
|
|
@@ -1,11 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { TransitionType } from "@snokam/ui/layout";
|
|
2
|
-
import
|
|
3
|
+
import { FooterBase } from "./components/Footer/base";
|
|
3
4
|
import { FooterTheme } from "./components/Footer/types";
|
|
5
|
+
/**
|
|
6
|
+
* These render `FooterBase`. The wired `Footer` reads its logo, body copy and link targets from
|
|
7
|
+
* the CMS and the tenant config, which Storybook has neither of — `useConfig` throws outright
|
|
8
|
+
* without a provider. The base takes them as props.
|
|
9
|
+
*/
|
|
4
10
|
const meta = {
|
|
5
11
|
title: "Chrome/Footer",
|
|
6
|
-
component:
|
|
12
|
+
component: FooterBase,
|
|
7
13
|
parameters: { layout: "fullscreen" },
|
|
8
|
-
args: {
|
|
14
|
+
args: {
|
|
15
|
+
theme: FooterTheme.Light,
|
|
16
|
+
logo: { url: "/snokam-logo.svg", alt: "Snøkam" },
|
|
17
|
+
content: _jsx("p", { children: "Sn\u00F8kam AS \u00B7 Postboks 123 \u00B7 0150 Oslo" }),
|
|
18
|
+
links: [
|
|
19
|
+
{ href: "https://snokam.no/miljofyrtorn", text: "Miljøfyrtårn" },
|
|
20
|
+
{ href: "https://blogg.snokam.no", text: "Blogg" },
|
|
21
|
+
],
|
|
22
|
+
},
|
|
9
23
|
argTypes: {
|
|
10
24
|
theme: { control: "radio", options: Object.values(FooterTheme) },
|
|
11
25
|
},
|
|
@@ -13,7 +27,7 @@ const meta = {
|
|
|
13
27
|
export default meta;
|
|
14
28
|
export const Light = {};
|
|
15
29
|
export const Dark = {
|
|
16
|
-
args: { theme: FooterTheme.Dark },
|
|
30
|
+
args: { theme: FooterTheme.Dark, logo: { url: "/snokam-logo-white.svg", alt: "Snøkam" } },
|
|
17
31
|
};
|
|
18
32
|
export const WithWaveTransition = {
|
|
19
33
|
args: {
|
|
@@ -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,
|
|
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;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,EAAE,KAAK,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,wBAAwB,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;CAC1F,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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FooterBaseProps } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* The footer as markup: the logo, the body copy and every link arrive as props.
|
|
4
|
+
*
|
|
5
|
+
* `Footer` is this component with the CMS and the tenant config read for you. Use that one inside
|
|
6
|
+
* a Snøkam app; use this one where those do not exist, such as a Storybook story or an app outside
|
|
7
|
+
* the platform, where the wired version would throw on `useConfig`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const FooterBase: ({ theme, logo, content, links, transitions, onThemeSave, }: FooterBaseProps) => import("react").JSX.Element;
|
|
10
|
+
export default FooterBase;
|
|
11
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +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;AAIvD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,4DAOxB,eAAe,gCAqCjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronRight } from "@snokam/ui/icons";
|
|
4
|
+
import Styled from "./styled";
|
|
5
|
+
import { useFramework } from "@snokam/ui/framework";
|
|
6
|
+
import { Layout } from "@snokam/ui";
|
|
7
|
+
import { PortableText } from "@portabletext/react";
|
|
8
|
+
import { FooterTheme } from "./types";
|
|
9
|
+
import { Padding } from "@snokam/ui/layout";
|
|
10
|
+
import { ThemeModeToggle } from "./ThemeModeToggle";
|
|
11
|
+
/**
|
|
12
|
+
* The footer as markup: the logo, the body copy and every link arrive as props.
|
|
13
|
+
*
|
|
14
|
+
* `Footer` is this component with the CMS and the tenant config read for you. Use that one inside
|
|
15
|
+
* a Snøkam app; use this one where those do not exist, such as a Storybook story or an app outside
|
|
16
|
+
* the platform, where the wired version would throw on `useConfig`.
|
|
17
|
+
*/
|
|
18
|
+
export const FooterBase = ({ theme = FooterTheme.Dark, logo, content, links = [], transitions, onThemeSave, }) => {
|
|
19
|
+
const { Link, Image } = useFramework();
|
|
20
|
+
return (_jsx(Layout.Container, { as: "footer", theme: theme, transitions: transitions, children: _jsx(Layout.Content, { children: _jsxs(Layout.Section, { padding: Padding.Large, children: [_jsx(Styled.Logo, { as: Image, "data-sanity": logo.sanityAttr, alt: logo.alt || "Snøkam logo", 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))), _jsx(Styled.ToggleRow, { id: "tema", children: _jsx(ThemeModeToggle, { onThemeSave: onThemeSave }) })] }) }) }));
|
|
21
|
+
};
|
|
22
|
+
export default FooterBase;
|
|
23
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../src/v1/components/Footer/base.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAmB,WAAW,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAe,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,KAAK,GAAG,WAAW,CAAC,IAAI,EACxB,IAAI,EACJ,OAAO,EACP,KAAK,GAAG,EAAE,EACV,WAAW,EACX,WAAW,GACK,EAAE,EAAE;IACpB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IAEvC,OAAO,CACL,KAAC,MAAM,CAAC,SAAS,IACf,EAAE,EAAC,QAAQ,EACX,KAAK,EAAE,KAA+B,EACtC,WAAW,EAAE,WAAW,YAExB,KAAC,MAAM,CAAC,OAAO,cACb,MAAC,MAAM,CAAC,OAAO,IAAC,OAAO,EAAE,OAAO,CAAC,KAAK,aACpC,KAAC,MAAM,CAAC,IAAI,IACV,EAAE,EAAE,KAAK,iBACI,IAAI,CAAC,UAAU,EAC5B,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,aAAa,EAC9B,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,KAAK,EAAE,GAAG,EACV,MAAM,EAAE,EAAE,GACV,EACD,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CACxB,KAAC,YAAY,IAAC,KAAK,EAAE,OAAO,GAAI,CACjC,CAAC,CAAC,CAAC,CACF,OAAO,CACR,EACA,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,EACF,KAAC,MAAM,CAAC,SAAS,IAAC,EAAE,EAAC,MAAM,YACzB,KAAC,eAAe,IAAC,WAAW,EAAE,WAAW,GAAI,GAC5B,IACJ,GACF,GACA,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { FooterProps } from "./types";
|
|
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.
|
|
5
|
+
*/
|
|
2
6
|
export declare const Footer: ({ theme, showMiljofyrtorn, showBlog, showPresentations, extraLinks, transitions, onThemeSave, }: FooterProps) => import("react").JSX.Element;
|
|
3
7
|
export default Footer;
|
|
4
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":"
|
|
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;AAG/D;;;GAGG;AACH,eAAO,MAAM,MAAM,GAAI,iGAQpB,WAAW,gCAkDb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,28 +1,51 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx
|
|
3
|
-
import { ChevronRight } from "@snokam/ui/icons";
|
|
4
|
-
import Styled from "./styled";
|
|
5
|
-
import { useFramework } from "@snokam/ui/framework";
|
|
6
|
-
import { Layout } from "@snokam/ui";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
3
|
import { useColorScheme } from "@snokam/ui/theme/admin";
|
|
8
4
|
import { usePageContent } from "@snokam/sanity-page-content";
|
|
9
|
-
import { PortableText } from "@portabletext/react";
|
|
10
5
|
import { useConfig } from "@snokam/config";
|
|
11
6
|
import { FooterTheme } from "./types";
|
|
12
|
-
import {
|
|
13
|
-
|
|
7
|
+
import { FooterBase } from "./base";
|
|
8
|
+
/**
|
|
9
|
+
* The footer, wired to the app it lives in: logo and copy from the CMS, link targets from the
|
|
10
|
+
* tenant config. {@link FooterBase} is the same footer with those passed in as props.
|
|
11
|
+
*/
|
|
14
12
|
export const Footer = ({ theme = FooterTheme.Dark, showMiljofyrtorn = true, showBlog = true, showPresentations = false, extraLinks, transitions, onThemeSave, }) => {
|
|
15
13
|
const { getImage, getText, getAttr, getBlock } = usePageContent();
|
|
16
14
|
const config = useConfig();
|
|
17
15
|
const resolvedTheme = useColorScheme();
|
|
18
|
-
const
|
|
19
|
-
const blogUrl = config.NEXT_PUBLIC_BLOG_BASE_URL ?? "";
|
|
20
|
-
const miljofyrtornUrl = `${config.NEXT_PUBLIC_SNOKAM_BASE_URL ?? ""}/miljofyrtorn`;
|
|
21
|
-
const presentationsUrl = `${config.NEXT_PUBLIC_SNOKAM_BASE_URL ?? ""}/presentasjoner`;
|
|
16
|
+
const snokamUrl = config.NEXT_PUBLIC_SNOKAM_BASE_URL ?? "";
|
|
22
17
|
const logoKey = resolvedTheme === "dark" || theme === FooterTheme.Dark
|
|
23
18
|
? "footerWhiteLogo"
|
|
24
19
|
: "footerBlueLogo";
|
|
25
|
-
|
|
20
|
+
const logo = getImage(logoKey);
|
|
21
|
+
const links = [
|
|
22
|
+
...(showMiljofyrtorn
|
|
23
|
+
? [
|
|
24
|
+
{
|
|
25
|
+
href: `${snokamUrl}/miljofyrtorn`,
|
|
26
|
+
text: getText("footerMiljofyrtornLinkText"),
|
|
27
|
+
},
|
|
28
|
+
]
|
|
29
|
+
: []),
|
|
30
|
+
...(showBlog
|
|
31
|
+
? [
|
|
32
|
+
{
|
|
33
|
+
href: config.NEXT_PUBLIC_BLOG_BASE_URL ?? "",
|
|
34
|
+
text: getText("footerBlogLinkText"),
|
|
35
|
+
},
|
|
36
|
+
]
|
|
37
|
+
: []),
|
|
38
|
+
...(showPresentations
|
|
39
|
+
? [
|
|
40
|
+
{
|
|
41
|
+
href: `${snokamUrl}/presentasjoner`,
|
|
42
|
+
text: getText("footerPresentationsLinkText"),
|
|
43
|
+
},
|
|
44
|
+
]
|
|
45
|
+
: []),
|
|
46
|
+
...(extraLinks ?? []),
|
|
47
|
+
];
|
|
48
|
+
return (_jsx(FooterBase, { theme: theme, logo: { url: logo.url, alt: logo.alt, sanityAttr: getAttr(logoKey) }, content: getBlock("footerContent"), links: links, transitions: transitions, onThemeSave: onThemeSave }));
|
|
26
49
|
};
|
|
27
50
|
export default Footer;
|
|
28
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,
|
|
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;AAEpC;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,KAAK,GAAG,WAAW,CAAC,IAAI,EACxB,gBAAgB,GAAG,IAAI,EACvB,QAAQ,GAAG,IAAI,EACf,iBAAiB,GAAG,KAAK,EACzB,UAAU,EACV,WAAW,EACX,WAAW,GACC,EAAE,EAAE;IAChB,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,cAAc,EAAE,CAAC;IAClE,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,aAAa,GAAG,cAAc,EAAE,CAAC;IAEvC,MAAM,SAAS,GAAG,MAAM,CAAC,2BAA2B,IAAI,EAAE,CAAC;IAC3D,MAAM,OAAO,GACX,aAAa,KAAK,MAAM,IAAI,KAAK,KAAK,WAAW,CAAC,IAAI;QACpD,CAAC,CAAC,iBAAiB;QACnB,CAAC,CAAC,gBAAgB,CAAC;IACvB,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IAE/B,MAAM,KAAK,GAAiB;QAC1B,GAAG,CAAC,gBAAgB;YAClB,CAAC,CAAC;gBACE;oBACE,IAAI,EAAE,GAAG,SAAS,eAAe;oBACjC,IAAI,EAAE,OAAO,CAAC,4BAA4B,CAAC;iBAC5C;aACF;YACH,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,QAAQ;YACV,CAAC,CAAC;gBACE;oBACE,IAAI,EAAE,MAAM,CAAC,yBAAyB,IAAI,EAAE;oBAC5C,IAAI,EAAE,OAAO,CAAC,oBAAoB,CAAC;iBACpC;aACF;YACH,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,iBAAiB;YACnB,CAAC,CAAC;gBACE;oBACE,IAAI,EAAE,GAAG,SAAS,iBAAiB;oBACnC,IAAI,EAAE,OAAO,CAAC,6BAA6B,CAAC;iBAC7C;aACF;YACH,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC;KACtB,CAAC;IAEF,OAAO,CACL,KAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,EACpE,OAAO,EAAE,QAAQ,CAAC,eAAe,CAAC,EAClC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,GACxB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
1
2
|
import { Transitions } from "@snokam/ui/layout";
|
|
2
3
|
import type { ColorSchemeMode } from "@snokam/ui/theme/admin";
|
|
3
4
|
export declare enum FooterTheme {
|
|
@@ -8,6 +9,23 @@ export interface FooterLink {
|
|
|
8
9
|
href: string;
|
|
9
10
|
text: string;
|
|
10
11
|
}
|
|
12
|
+
export interface FooterLogo {
|
|
13
|
+
url: string;
|
|
14
|
+
alt?: string;
|
|
15
|
+
sanityAttr?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Everything {@link FooterBase} draws. The wired `Footer` fills these in from the CMS and the
|
|
19
|
+
* tenant config; supply them yourself when neither exists.
|
|
20
|
+
*/
|
|
21
|
+
export interface FooterBaseProps {
|
|
22
|
+
logo: FooterLogo;
|
|
23
|
+
content?: ReactNode | unknown[];
|
|
24
|
+
links?: FooterLink[];
|
|
25
|
+
theme?: FooterTheme;
|
|
26
|
+
transitions?: Transitions;
|
|
27
|
+
onThemeSave?: (_mode: ColorSchemeMode) => void;
|
|
28
|
+
}
|
|
11
29
|
export interface FooterProps {
|
|
12
30
|
showMiljofyrtorn?: boolean;
|
|
13
31
|
showBlog?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/v1/components/Footer/types.tsx"],"names":[],"mappings":"AAAA,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,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,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,EAAE,UAAU,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,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;CAChD;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/v1/components/Footer/types.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/v1/components/Footer/types.tsx"],"names":[],"mappings":"AAIA,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,4BAAa,CAAA;AACf,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB"}
|
package/dist/v1/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Footer } from "./components/Footer";
|
|
2
|
+
export { FooterBase } from "./components/Footer/base";
|
|
2
3
|
export { FooterTheme } from "./components/Footer/types";
|
|
3
|
-
export type { FooterProps, FooterLink } from "./components/Footer/types";
|
|
4
|
+
export type { FooterProps, FooterBaseProps, FooterLink, FooterLogo, } from "./components/Footer/types";
|
|
4
5
|
export default Footer;
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/v1/index.d.ts.map
CHANGED
|
@@ -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,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,
|
|
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,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,EACV,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,GACX,MAAM,2BAA2B,CAAC;AACnC,eAAe,MAAM,CAAC"}
|
package/dist/v1/index.js
CHANGED
package/dist/v1/index.js.map
CHANGED
|
@@ -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,WAAW,EAAE,MAAM,2BAA2B,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,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAOxD,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED