@snokam/footer 5.0.29 → 7.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 +134 -0
- package/dist/v1/Footer.stories.d.ts.map +1 -1
- package/dist/v1/Footer.stories.js +3 -2
- package/dist/v1/Footer.stories.js.map +1 -1
- package/dist/v1/components/Footer/base.d.ts +1 -1
- package/dist/v1/components/Footer/base.d.ts.map +1 -1
- package/dist/v1/components/Footer/base.js +2 -2
- package/dist/v1/components/Footer/base.js.map +1 -1
- package/dist/v1/components/Footer/index.d.ts +3 -3
- package/dist/v1/components/Footer/index.d.ts.map +1 -1
- package/dist/v1/components/Footer/index.js +9 -14
- package/dist/v1/components/Footer/index.js.map +1 -1
- package/dist/v1/components/Footer/styled.d.ts +1 -1
- package/dist/v1/components/Footer/styled.js +1 -1
- package/dist/v1/components/Footer/types.d.ts +2 -6
- package/dist/v1/components/Footer/types.d.ts.map +1 -1
- package/dist/v1/index.d.ts +1 -1
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,140 @@
|
|
|
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
|
+
# [7.0.0](https://github.com/snokam/monorepo/compare/@snokam/footer@5.0.26...@snokam/footer@7.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
|
+
|
|
73
|
+
# [6.0.0](https://github.com/snokam/monorepo/compare/@snokam/footer@5.0.26...@snokam/footer@6.0.0) (2026-10-14)
|
|
74
|
+
|
|
75
|
+
### Bug Fixes
|
|
76
|
+
|
|
77
|
+
- **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))
|
|
78
|
+
|
|
79
|
+
### Features
|
|
80
|
+
|
|
81
|
+
- per-company branding (logo, dark logo, icon) ([#2907](https://github.com/snokam/monorepo/issues/2907)) ([dc32583](https://github.com/snokam/monorepo/commit/dc325832803c88158937f45fe5b9e1b64846a52d))
|
|
82
|
+
|
|
83
|
+
### BREAKING CHANGES
|
|
84
|
+
|
|
85
|
+
- SimpleHeaderBase and FooterBase take `logo` as a ReactNode;
|
|
86
|
+
the HeaderLogo and FooterLogo types are removed.
|
|
87
|
+
|
|
88
|
+
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
89
|
+
Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
|
|
90
|
+
|
|
91
|
+
- feat(platform-web): company branding in /manage, at login and in the shell
|
|
92
|
+
|
|
93
|
+
/manage/innstillinger gets a Merkevare section: the logo for light
|
|
94
|
+
backgrounds, the logo for dark backgrounds and the square icon, each with a
|
|
95
|
+
preview on its own background, upload (react-hook-form + zod: type and 2 MB
|
|
96
|
+
checked before sending) and remove. Server error codes map to CMS copy.
|
|
97
|
+
The central login shows the company's logo above "Logg inn hos …", from
|
|
98
|
+
login-config. The /manage shell shows the managed business's logo linking to
|
|
99
|
+
its front page; /admin and an operator without a business show the platform
|
|
100
|
+
business. The public snosky.no chrome keeps the Snøsky logo from the platform
|
|
101
|
+
CMS, through the same BusinessLogo.
|
|
102
|
+
|
|
103
|
+
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
104
|
+
Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
|
|
105
|
+
|
|
106
|
+
- fix(my-page-web): drop leftover Snøkam favicons
|
|
107
|
+
|
|
108
|
+
The unused pages-router meta component and finance-web's public/favicon.ico
|
|
109
|
+
served Snøkam's icon to every company; favicons now come from the
|
|
110
|
+
company's uploaded icon.
|
|
111
|
+
|
|
112
|
+
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
113
|
+
Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
|
|
114
|
+
|
|
115
|
+
- fix(handbook-web): no Snøkam share image, no raw-URL fallback in branding metadata
|
|
116
|
+
|
|
117
|
+
The handbook's root metadata no longer hardcodes the Snøkam icon as the
|
|
118
|
+
share image, so the company's share image from makeTenantMetadata applies.
|
|
119
|
+
The favicon and share helpers drop their raw-URL fallback: a transform that
|
|
120
|
+
yields nothing yields no image, never an untransformed (possibly SVG) URL.
|
|
121
|
+
|
|
122
|
+
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
123
|
+
Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
|
|
124
|
+
|
|
125
|
+
- fix(ui): show the light logo inverted on dark when no dark logo is uploaded
|
|
126
|
+
|
|
127
|
+
Without a dark logo, a dark background shows the light logo turned white
|
|
128
|
+
(brightness(0) invert(1)) instead of the wordmark. The Merkevare previews
|
|
129
|
+
use static brand tokens, and upload errors are read by parsing the JSON
|
|
130
|
+
body rather than stripping quotes.
|
|
131
|
+
|
|
132
|
+
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
133
|
+
Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
|
|
134
|
+
|
|
135
|
+
- chore(clients): regenerate platform-function clients for branding
|
|
136
|
+
|
|
137
|
+
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
138
|
+
Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
|
|
139
|
+
|
|
6
140
|
## [5.0.29](https://github.com/snokam/monorepo/compare/@snokam/footer@5.0.26...@snokam/footer@5.0.29) (2026-10-14)
|
|
7
141
|
|
|
8
142
|
### 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;
|
|
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: {
|
|
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: {
|
|
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,
|
|
1
|
+
{"version":3,"file":"Footer.stories.js","sourceRoot":"","sources":["../../src/v1/Footer.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,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,KAAC,YAAY,IAAC,IAAI,EAAC,aAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAE,EAAE,GAAI;QAC7D,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;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
|
|
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,
|
|
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
|
|
22
|
-
return (_jsx(Layout.Container, { as: "footer", theme: theme, transitions: transitions, children: _jsx(Layout.Content, { children: _jsxs(Layout.Section, { padding: Padding.Large, children: [logo &&
|
|
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;
|
|
@@ -1 +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,MAA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W,EAAE,WAAW,YAExB,KAAC,MAAM,CAAC,OAAO,cACb,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
|
|
4
|
-
*
|
|
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":"
|
|
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
|
|
11
|
-
*
|
|
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 {
|
|
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
|
|
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,MA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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,EACF,IAAI,IAAI,CACN,KAAC,YAAY,IACX,IAAI,EAAE,MAAM,EAAE,YAAY,IAAI,EAAE,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").
|
|
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;
|
|
@@ -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?:
|
|
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
|
|
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"}
|
package/dist/v1/index.d.ts
CHANGED
|
@@ -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,
|
|
6
|
+
export type { FooterProps, FooterBaseProps, FooterLink, } from "./components/Footer/types";
|
|
7
7
|
export default Footer;
|
|
8
8
|
//# 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,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,
|
|
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"}
|
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,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,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,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": "
|
|
2
|
+
"version": "7.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/
|
|
14
|
-
"@snokam/
|
|
15
|
-
"@snokam/
|
|
16
|
-
"@snokam/
|
|
13
|
+
"@snokam/auth": "5.0.0",
|
|
14
|
+
"@snokam/sanity-page-content": "6.0.0",
|
|
15
|
+
"@snokam/tenant": "4.0.0",
|
|
16
|
+
"@snokam/ui": "6.0.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/node": "^26.1.1",
|