@snokam/navbar 3.0.51 → 5.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,132 @@
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
+ # [5.0.0](https://github.com/snokam/monorepo/compare/@snokam/navbar@3.0.48...@snokam/navbar@5.0.0) (2026-10-14)
7
+
8
+ ### Features
9
+
10
+ - per-company branding (logo, dark logo, icon) ([#2907](https://github.com/snokam/monorepo/issues/2907)) ([dc32583](https://github.com/snokam/monorepo/commit/dc325832803c88158937f45fe5b9e1b64846a52d))
11
+
12
+ ### BREAKING CHANGES
13
+
14
+ - SimpleHeaderBase and FooterBase take `logo` as a ReactNode;
15
+ the HeaderLogo and FooterLogo types are removed.
16
+
17
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
19
+
20
+ - feat(platform-web): company branding in /manage, at login and in the shell
21
+
22
+ /manage/innstillinger gets a Merkevare section: the logo for light
23
+ backgrounds, the logo for dark backgrounds and the square icon, each with a
24
+ preview on its own background, upload (react-hook-form + zod: type and 2 MB
25
+ checked before sending) and remove. Server error codes map to CMS copy.
26
+ The central login shows the company's logo above "Logg inn hos …", from
27
+ login-config. The /manage shell shows the managed business's logo linking to
28
+ its front page; /admin and an operator without a business show the platform
29
+ business. The public snosky.no chrome keeps the Snøsky logo from the platform
30
+ CMS, through the same BusinessLogo.
31
+
32
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
34
+
35
+ - fix(my-page-web): drop leftover Snøkam favicons
36
+
37
+ The unused pages-router meta component and finance-web's public/favicon.ico
38
+ served Snøkam's icon to every company; favicons now come from the
39
+ company's uploaded icon.
40
+
41
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
42
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
43
+
44
+ - fix(handbook-web): no Snøkam share image, no raw-URL fallback in branding metadata
45
+
46
+ The handbook's root metadata no longer hardcodes the Snøkam icon as the
47
+ share image, so the company's share image from makeTenantMetadata applies.
48
+ The favicon and share helpers drop their raw-URL fallback: a transform that
49
+ yields nothing yields no image, never an untransformed (possibly SVG) URL.
50
+
51
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
52
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
53
+
54
+ - fix(ui): show the light logo inverted on dark when no dark logo is uploaded
55
+
56
+ Without a dark logo, a dark background shows the light logo turned white
57
+ (brightness(0) invert(1)) instead of the wordmark. The Merkevare previews
58
+ use static brand tokens, and upload errors are read by parsing the JSON
59
+ body rather than stripping quotes.
60
+
61
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
62
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
63
+
64
+ - chore(clients): regenerate platform-function clients for branding
65
+
66
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
67
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
68
+
69
+ # [4.0.0](https://github.com/snokam/monorepo/compare/@snokam/navbar@3.0.48...@snokam/navbar@4.0.0) (2026-10-14)
70
+
71
+ ### Features
72
+
73
+ - per-company branding (logo, dark logo, icon) ([#2907](https://github.com/snokam/monorepo/issues/2907)) ([dc32583](https://github.com/snokam/monorepo/commit/dc325832803c88158937f45fe5b9e1b64846a52d))
74
+
75
+ ### BREAKING CHANGES
76
+
77
+ - SimpleHeaderBase and FooterBase take `logo` as a ReactNode;
78
+ the HeaderLogo and FooterLogo types are removed.
79
+
80
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
81
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
82
+
83
+ - feat(platform-web): company branding in /manage, at login and in the shell
84
+
85
+ /manage/innstillinger gets a Merkevare section: the logo for light
86
+ backgrounds, the logo for dark backgrounds and the square icon, each with a
87
+ preview on its own background, upload (react-hook-form + zod: type and 2 MB
88
+ checked before sending) and remove. Server error codes map to CMS copy.
89
+ The central login shows the company's logo above "Logg inn hos …", from
90
+ login-config. The /manage shell shows the managed business's logo linking to
91
+ its front page; /admin and an operator without a business show the platform
92
+ business. The public snosky.no chrome keeps the Snøsky logo from the platform
93
+ CMS, through the same BusinessLogo.
94
+
95
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
96
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
97
+
98
+ - fix(my-page-web): drop leftover Snøkam favicons
99
+
100
+ The unused pages-router meta component and finance-web's public/favicon.ico
101
+ served Snøkam's icon to every company; favicons now come from the
102
+ company's uploaded icon.
103
+
104
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
105
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
106
+
107
+ - fix(handbook-web): no Snøkam share image, no raw-URL fallback in branding metadata
108
+
109
+ The handbook's root metadata no longer hardcodes the Snøkam icon as the
110
+ share image, so the company's share image from makeTenantMetadata applies.
111
+ The favicon and share helpers drop their raw-URL fallback: a transform that
112
+ yields nothing yields no image, never an untransformed (possibly SVG) URL.
113
+
114
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
115
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
116
+
117
+ - fix(ui): show the light logo inverted on dark when no dark logo is uploaded
118
+
119
+ Without a dark logo, a dark background shows the light logo turned white
120
+ (brightness(0) invert(1)) instead of the wordmark. The Merkevare previews
121
+ use static brand tokens, and upload errors are read by parsing the JSON
122
+ body rather than stripping quotes.
123
+
124
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
125
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
126
+
127
+ - chore(clients): regenerate platform-function clients for branding
128
+
129
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
130
+ Claude-Session: https://claude.ai/code/session_01Nv57F4rwzYRkuUVFdd2wXA
131
+
6
132
  ## [3.0.51](https://github.com/snokam/monorepo/compare/@snokam/navbar@3.0.48...@snokam/navbar@3.0.51) (2026-10-14)
7
133
 
8
134
  **Note:** Version bump only for package @snokam/navbar
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleHeader.stories.d.ts","sourceRoot":"","sources":["../../src/v1/SimpleHeader.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGlE;;;;GAIG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAavC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/C,eAAO,MAAM,KAAK,EAAE,KAAU,CAAC;AAE/B,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC"}
1
+ {"version":3,"file":"SimpleHeader.stories.d.ts","sourceRoot":"","sources":["../../src/v1/SimpleHeader.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGlE;;;;GAIG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAavC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/C,eAAO,MAAM,KAAK,EAAE,KAAU,CAAC;AAE/B,eAAO,MAAM,IAAI,EAAE,KAKlB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { BusinessLogo } from "@snokam/ui/business-logo";
1
3
  import { SimpleHeaderBase } from "./components/SimpleHeader/base";
2
4
  import { HeaderTheme } from "./components/SimpleHeader/types";
3
5
  /**
@@ -11,7 +13,7 @@ const meta = {
11
13
  parameters: { layout: "fullscreen" },
12
14
  args: {
13
15
  theme: HeaderTheme.Light,
14
- logo: { url: "/snokam-logo.svg", alt: "Snøkam" },
16
+ logo: _jsx(BusinessLogo, { name: "Sn\u00F8kam", tone: "light", height: 30 }),
15
17
  homeUrl: "https://snokam.no",
16
18
  myPageUrl: "https://minside.snokam.no",
17
19
  },
@@ -22,7 +24,10 @@ const meta = {
22
24
  export default meta;
23
25
  export const Light = {};
24
26
  export const Dark = {
25
- args: { theme: HeaderTheme.Dark, logo: { url: "/snokam-logo-white.svg", alt: "Snøkam" } },
27
+ args: {
28
+ theme: HeaderTheme.Dark,
29
+ logo: _jsx(BusinessLogo, { name: "Sn\u00F8kam", tone: "dark", height: 30 }),
30
+ },
26
31
  };
27
32
  export const WithBackLink = {
28
33
  args: { backUrl: "/", backText: "Tilbake" },
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleHeader.stories.js","sourceRoot":"","sources":["../../src/v1/SimpleHeader.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D;;;;GAIG;AACH,MAAM,IAA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IAC1C,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,gBAAgB;IAC3B,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,mBAAmB;QAC5B,SAAS,EAAE,2BAA2B;KACvC;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,YAAY,GAAU;IACjC,IAAI,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE;CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE;CAC1C,CAAC"}
@@ -7,11 +7,10 @@ import { SimpleHeaderBaseProps } from "./types";
7
7
  * available — a Storybook story, a test, a Vite app — where the wired version would only render
8
8
  * empty strings, or throw.
9
9
  *
10
- * The one context left is the framework, and it has working defaults: no provider means an `<a>`
11
- * and an `<img>`.
10
+ * The one context left is the framework, and it has working defaults: no provider means an `<a>`.
12
11
  */
13
12
  export declare function SimpleHeaderBase({ logo, homeUrl, myPageUrl, backUrl, backText, theme, user, settingsHref, children, }: SimpleHeaderBaseProps): import("react").JSX.Element;
14
13
  export { HeaderTheme } from "./types";
15
- export type { SimpleHeaderBaseProps, HeaderLogo, HeaderUser, } from "./types";
14
+ export type { SimpleHeaderBaseProps, HeaderUser } from "./types";
16
15
  export default SimpleHeaderBase;
17
16
  //# sourceMappingURL=base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/v1/components/SimpleHeader/base.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAe,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAK7D;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,OAAY,EACZ,SAAc,EACd,OAAO,EACP,QAAQ,EACR,KAAyB,EACzB,IAAI,EACJ,YAAY,EACZ,QAAQ,GACT,EAAE,qBAAqB,+BA0CvB;AAED,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,YAAY,EACV,qBAAqB,EACrB,UAAU,EACV,UAAU,GACX,MAAM,SAAS,CAAC;AAEjB,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/v1/components/SimpleHeader/base.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAe,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAK7D;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,OAAY,EACZ,SAAc,EACd,OAAO,EACP,QAAQ,EACR,KAAyB,EACzB,IAAI,EACJ,YAAY,EACZ,QAAQ,GACT,EAAE,qBAAqB,+BAkCvB;AAED,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,YAAY,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEjE,eAAe,gBAAgB,CAAC"}
@@ -13,12 +13,11 @@ import { useFramework } from "@snokam/ui/framework";
13
13
  * available — a Storybook story, a test, a Vite app — where the wired version would only render
14
14
  * empty strings, or throw.
15
15
  *
16
- * The one context left is the framework, and it has working defaults: no provider means an `<a>`
17
- * and an `<img>`.
16
+ * The one context left is the framework, and it has working defaults: no provider means an `<a>`.
18
17
  */
19
18
  export function SimpleHeaderBase({ logo, homeUrl = "", myPageUrl = "", backUrl, backText, theme = HeaderTheme.Light, user, settingsHref, children, }) {
20
- const { Link, Image } = useFramework();
21
- return (_jsx(Styled.Header, { theme: theme, children: _jsx(Layout.Content, { children: _jsxs(Styled.Menu, { children: [_jsx(Styled.Link, { href: homeUrl, children: _jsx(Image, { "data-sanity": logo.sanityAttr, alt: logo.alt || "Snøkam logo", src: logo.url, height: 30, width: 159 }) }), _jsxs(Styled.Right, { children: [_jsx(SystemThemeTag, { settingsHref: settingsHref ?? (user ? `${myPageUrl}/innstillinger` : "#tema") }), backUrl && (_jsxs(Styled.BackLink, { as: Link, href: backUrl, children: [_jsx(Styled.BackIcon, {}), _jsx(Styled.BackText, { children: backText })] })), user && (_jsx(Styled.Link, { href: myPageUrl, children: _jsxs(Styled.User, { children: [_jsx(Styled.Name, { children: user.name }), user.image && _jsx(Styled.UserAvatar, { src: user.image })] }) })), children] })] }) }) }));
19
+ const { Link } = useFramework();
20
+ return (_jsx(Styled.Header, { theme: theme, children: _jsx(Layout.Content, { children: _jsxs(Styled.Menu, { children: [_jsx(Styled.Link, { href: homeUrl, children: logo }), _jsxs(Styled.Right, { children: [_jsx(SystemThemeTag, { settingsHref: settingsHref ?? (user ? `${myPageUrl}/innstillinger` : "#tema") }), backUrl && (_jsxs(Styled.BackLink, { as: Link, href: backUrl, children: [_jsx(Styled.BackIcon, {}), _jsx(Styled.BackText, { children: backText })] })), user && (_jsx(Styled.Link, { href: myPageUrl, children: _jsxs(Styled.User, { children: [_jsx(Styled.Name, { children: user.name }), user.image && _jsx(Styled.UserAvatar, { src: user.image })] }) })), children] })] }) }) }));
22
21
  }
23
22
  export { HeaderTheme } from "./types";
24
23
  export default SimpleHeaderBase;
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../src/v1/components/SimpleHeader/base.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAyB,MAAM,SAAS,CAAC;AAC7D,OAAO,MAAuB,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,IAAI,EACJ,OAAO,GAAG,EAAE,EACZ,SAAS,GAAG,EAAE,EACd,OAAO,EACP,QAAQ,EACR,KAAK,GAAG,WAAW,CAAC,KAAK,EACzB,IAAI,EACJ,YAAY,EACZ,QAAQ,GACc;IACtB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IAEvC,OAAO,CACL,KAAC,MAAM,CAAC,MAAM,IAAC,KAAK,EAAE,KAA+B,YACnD,KAAC,MAAM,CAAC,OAAO,cACb,MAAC,MAAM,CAAC,IAAI,eACV,KAAC,MAAM,CAAC,IAAI,IAAC,IAAI,EAAE,OAAO,YACxB,KAAC,KAAK,mBACS,IAAI,CAAC,UAAU,EAC5B,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,aAAa,EAC9B,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,MAAM,EAAE,EAAE,EACV,KAAK,EAAE,GAAG,GACV,GACU,EACd,MAAC,MAAM,CAAC,KAAK,eACX,KAAC,cAAc,IACb,YAAY,EACV,YAAY,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,gBAAgB,CAAC,CAAC,CAAC,OAAO,CAAC,GAEjE,EACD,OAAO,IAAI,CACV,MAAC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E,KAA+B,YACnD,KAAC,MAAM,CAAC,OAAO,cACb,MAAC,MAAM,CAAC,IAAI,eACV,KAAC,MAAM,CAAC,IAAI,IAAC,IAAI,EAAE,OAAO,YAAG,IAAI,GAAe,EAChD,MAAC,MAAM,CAAC,KAAK,eACX,KAAC,cAAc,IACb,YAAY,EACV,YAAY,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,gBAAgB,CAAC,CAAC,CAAC,OAAO,CAAC,GAEjE,EACD,OAAO,IAAI,CACV,MAAC,MAAM,CAAC,QAAQ,IAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,aACtC,KAAC,MAAM,CAAC,QAAQ,KAAG,EACnB,KAAC,MAAM,CAAC,QAAQ,cAAE,QAAQ,GAAmB,IAC7B,CACnB,EACA,IAAI,IAAI,CACP,KAAC,MAAM,CAAC,IAAI,IAAC,IAAI,EAAE,SAAS,YAC1B,MAAC,MAAM,CAAC,IAAI,eACV,KAAC,MAAM,CAAC,IAAI,cAAE,IAAI,CAAC,IAAI,GAAe,EACrC,IAAI,CAAC,KAAK,IAAI,KAAC,MAAM,CAAC,UAAU,IAAC,GAAG,EAAE,IAAI,CAAC,KAAK,GAAI,IACzC,GACF,CACf,EACA,QAAQ,IACI,IACH,GACC,GACH,CACjB,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC,eAAe,gBAAgB,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { SimpleHeaderProps } from "./types";
2
- export declare function SimpleHeader({ backUrl, backText, theme, extraButtons, userHref, }: SimpleHeaderProps): import("react").JSX.Element;
2
+ export declare function SimpleHeader({ logo, backUrl, backText, theme, extraButtons, userHref, }: SimpleHeaderProps): import("react").JSX.Element;
3
3
  export default SimpleHeader;
4
4
  //# sourceMappingURL=index.app-router.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.app-router.d.ts","sourceRoot":"","sources":["../../../../src/v1/components/SimpleHeader/index.app-router.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAe,MAAM,SAAS,CAAC;AAoBzD,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,QAAQ,EACR,KAAyB,EACzB,YAAY,EACZ,QAAQ,GACT,EAAE,iBAAiB,+BA4DnB;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.app-router.d.ts","sourceRoot":"","sources":["../../../../src/v1/components/SimpleHeader/index.app-router.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAe,MAAM,SAAS,CAAC;AAqBzD,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,KAAyB,EACzB,YAAY,EACZ,QAAQ,GACT,EAAE,iBAAiB,+BA4DnB;AAED,eAAe,YAAY,CAAC"}
@@ -6,7 +6,8 @@ import { HeaderTheme } from "./types";
6
6
  import Layout from "@snokam/ui/layout";
7
7
  import { useColorScheme } from "@snokam/ui/theme/admin";
8
8
  import { useAuth } from "@snokam/auth/app-router";
9
- import { useConfig } from "@snokam/tenant";
9
+ import { useConfig, useTenantEntitlements } from "@snokam/tenant";
10
+ import { BusinessLogo } from "@snokam/ui/business-logo";
10
11
  import { SystemThemeTag } from "@snokam/ui";
11
12
  import { LanguagePicker } from "../LanguagePicker/index.app-router";
12
13
  import { useFramework } from "@snokam/ui/framework";
@@ -21,16 +22,15 @@ function initialsFrom(name) {
21
22
  .join("")
22
23
  .toUpperCase();
23
24
  }
24
- export function SimpleHeader({ backUrl, backText, theme = HeaderTheme.Light, extraButtons, userHref, }) {
25
- const { getText, getImage, getAttr } = usePageContent();
26
- const { Link, Image } = useFramework();
25
+ export function SimpleHeader({ logo, backUrl, backText, theme = HeaderTheme.Light, extraButtons, userHref, }) {
26
+ const { getText } = usePageContent();
27
+ const { Link } = useFramework();
27
28
  const { session } = useAuth();
28
29
  const config = useConfig();
30
+ const tenant = useTenantEntitlements();
29
31
  const resolvedTheme = useColorScheme();
30
- const logoKey = resolvedTheme === "dark" || theme === HeaderTheme.Dark
31
- ? "navbarWhiteLogo"
32
- : "navbarBlueLogo";
33
- return (_jsx(Styled.Header, { theme: theme, children: _jsx(Layout.Content, { children: _jsxs(Styled.Menu, { children: [_jsx(Styled.Logo, { href: config.NEXT_PUBLIC_SNOKAM_BASE_URL ?? "", children: _jsx(Image, { "data-sanity": getAttr(logoKey), alt: getImage(logoKey).alt || "Snøkam logo", src: getImage(logoKey).url, height: 30, width: 159 }) }), _jsxs(Styled.Right, { children: [_jsx(SystemThemeTag, { settingsHref: session
32
+ const tone = resolvedTheme === "dark" || theme === HeaderTheme.Dark ? "dark" : "light";
33
+ return (_jsx(Styled.Header, { theme: theme, children: _jsx(Layout.Content, { children: _jsxs(Styled.Menu, { children: [_jsx(Styled.Logo, { href: config.NEXT_PUBLIC_FRONTPAGE_BASE_URL ?? "", children: logo ?? (_jsx(BusinessLogo, { name: tenant?.businessName ?? "", branding: tenant?.branding, tone: tone, height: 30 })) }), _jsxs(Styled.Right, { children: [_jsx(SystemThemeTag, { settingsHref: session
34
34
  ? `${config.NEXT_PUBLIC_MY_PAGE_BASE_URL ?? ""}/innstillinger`
35
35
  : "#tema" }), backUrl && (_jsxs(Styled.BackLink, { as: Link, href: backUrl, children: [_jsx(Styled.BackIcon, {}), _jsx(Styled.BackText, { children: backText ?? getText("navbarBack") })] })), session ? (_jsx(Styled.Link, { href: userHref ?? config.NEXT_PUBLIC_MY_PAGE_BASE_URL ?? "", children: _jsxs(Styled.User, { children: [_jsx(Styled.Name, { children: session.user?.name }), _jsx(Styled.UserAvatar, { src: session.user?.image ?? undefined, children: initialsFrom(session.user?.name) })] }) })) : (extraButtons), _jsx(LanguagePicker, { theme: theme })] })] }) }) }));
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.app-router.js","sourceRoot":"","sources":["../../../../src/v1/components/SimpleHeader/index.app-router.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC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AI,EAAE,KAAK,IAAI,SAAS,YACrD,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,GACf,IACR,GACF,CACf,CAAC,CAAC,CAAC,CACF,YAAY,CACb,EACD,KAAC,cAAc,IAAC,KAAK,EAAE,KAAK,GAAI,IACnB,IACH,GACC,GACH,CACjB,CAAC;AACJ,CAAC;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.app-router.js","sourceRoot":"","sources":["../../../../src/v1/components/SimpleHeader/index.app-router.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAqB,WAAW,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,MAAuB,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,SAAS,YAAY,CAAC,IAAoB;IACxC,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,OAAO,IAAI;SACR,IAAI,EAAE;SACN,KAAK,CAAC,KAAK,CAAC;SACZ,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACtB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;SACX,IAAI,CAAC,EAAE,CAAC;SACR,WAAW,EAAE,CAAC;AACnB,CA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,QAAQ,KAAG,EACnB,KAAC,MAAM,CAAC,QAAQ,cACb,QAAQ,IAAI,OAAO,CAAC,YAAY,CAAC,GAClB,IACF,CACnB,EACA,OAAO,CAAC,CAAC,CAAC,CACT,KAAC,MAAM,CAAC,IAAI,IACV,IAAI,EAAE,QAAQ,IAAI,MAAM,CAAC,4BAA4B,IAAI,EAAE,YAE3D,MAAC,MAAM,CAAC,IAAI,eACV,KAAC,MAAM,CAAC,IAAI,cAAE,OAAO,CAAC,IAAI,EAAE,IAAI,GAAe,EAC/C,KAAC,MAAM,CAAC,UAAU,IAAC,GAAG,EAAE,OAAO,CAAC,IAAI,EAAE,KAAK,IAAI,SAAS,YACrD,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,GACf,IACR,GACF,CACf,CAAC,CAAC,CAAC,CACF,YAAY,CACb,EACD,KAAC,cAAc,IAAC,KAAK,EAAE,KAAK,GAAI,IACnB,IACH,GACC,GACH,CACjB,CAAC;AACJ,CAAC;AAED,eAAe,YAAY,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import { SimpleHeaderProps } from "./types";
2
2
  /**
3
- * The header, wired to the app it lives in: logo and labels from the CMS, the signed-in user from
4
- * the session, the links from the tenant config. {@link SimpleHeaderBase} is the same header with
3
+ * The header, wired to the app it lives in: the business's logo and links from the tenant config,
4
+ * labels from the CMS, the signed-in user from the session. {@link SimpleHeaderBase} is the same header with
5
5
  * those four passed in as props, for anywhere that has none of them.
6
6
  */
7
- export declare function SimpleHeader({ backUrl, backText, theme, }: SimpleHeaderProps): import("react").JSX.Element;
7
+ export declare function SimpleHeader({ logo, backUrl, backText, theme, }: SimpleHeaderProps): import("react").JSX.Element;
8
8
  export default SimpleHeader;
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v1/components/SimpleHeader/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAe,MAAM,SAAS,CAAC;AAOzD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,QAAQ,EACR,KAAyB,GAC1B,EAAE,iBAAiB,+BAwBnB;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v1/components/SimpleHeader/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAe,MAAM,SAAS,CAAC;AAQzD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,KAAyB,GAC1B,EAAE,iBAAiB,+BA+BnB;AAED,eAAe,YAAY,CAAC"}
@@ -4,24 +4,23 @@ import { usePageContent } from "@snokam/sanity-page-content";
4
4
  import { HeaderTheme } from "./types";
5
5
  import { useColorScheme } from "@snokam/ui/theme/admin";
6
6
  import { useAuth } from "@snokam/auth";
7
- import { useConfig } from "@snokam/tenant";
7
+ import { useConfig, useTenantEntitlements } from "@snokam/tenant";
8
+ import { BusinessLogo } from "@snokam/ui/business-logo";
8
9
  import { LanguagePicker } from "../LanguagePicker";
9
10
  import { SimpleHeaderBase } from "./base";
10
11
  /**
11
- * The header, wired to the app it lives in: logo and labels from the CMS, the signed-in user from
12
- * the session, the links from the tenant config. {@link SimpleHeaderBase} is the same header with
12
+ * The header, wired to the app it lives in: the business's logo and links from the tenant config,
13
+ * labels from the CMS, the signed-in user from the session. {@link SimpleHeaderBase} is the same header with
13
14
  * those four passed in as props, for anywhere that has none of them.
14
15
  */
15
- export function SimpleHeader({ backUrl, backText, theme = HeaderTheme.Light, }) {
16
- const { getText, getImage, getAttr } = usePageContent();
16
+ export function SimpleHeader({ logo, backUrl, backText, theme = HeaderTheme.Light, }) {
17
+ const { getText } = usePageContent();
17
18
  const { session } = useAuth();
18
19
  const config = useConfig();
20
+ const tenant = useTenantEntitlements();
19
21
  const resolvedTheme = useColorScheme();
20
- const logoKey = resolvedTheme === "dark" || theme === HeaderTheme.Dark
21
- ? "navbarWhiteLogo"
22
- : "navbarBlueLogo";
23
- const logo = getImage(logoKey);
24
- return (_jsx(SimpleHeaderBase, { theme: theme, backUrl: backUrl, backText: backText ?? getText("navbarBack"), logo: { url: logo.url, alt: logo.alt, sanityAttr: getAttr(logoKey) }, homeUrl: config.NEXT_PUBLIC_SNOKAM_BASE_URL ?? "", myPageUrl: config.NEXT_PUBLIC_MY_PAGE_BASE_URL ?? "", user: session?.user ?? null, children: _jsx(LanguagePicker, { theme: theme }) }));
22
+ const tone = resolvedTheme === "dark" || theme === HeaderTheme.Dark ? "dark" : "light";
23
+ return (_jsx(SimpleHeaderBase, { theme: theme, backUrl: backUrl, backText: backText ?? getText("navbarBack"), logo: logo ?? (_jsx(BusinessLogo, { name: tenant?.businessName ?? "", branding: tenant?.branding, tone: tone, height: 30 })), homeUrl: config.NEXT_PUBLIC_FRONTPAGE_BASE_URL ?? "", myPageUrl: config.NEXT_PUBLIC_MY_PAGE_BASE_URL ?? "", user: session?.user ?? null, children: _jsx(LanguagePicker, { theme: theme }) }));
25
24
  }
26
25
  export default SimpleHeader;
27
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/v1/components/SimpleHeader/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAqB,WAAW,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C;;;;GAIG;AACH,MAAM,UAAU,YAAY,CA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,OAAO,EAAE,IAAI,IAAI,IAAI,YAE3B,KAAC,cAAc,IAAC,KAAK,EAAE,KAAK,GAAI,GACf,CACpB,CAAC;AACJ,CAAC;AAED,eAAe,YAAY,CAAC"}
@@ -4,27 +4,23 @@ export declare enum HeaderTheme {
4
4
  Dark = "dark"
5
5
  }
6
6
  export interface SimpleHeaderProps {
7
+ logo?: ReactNode;
7
8
  backUrl?: string;
8
9
  backText?: string;
9
10
  theme?: HeaderTheme;
10
11
  extraButtons?: ReactNode;
11
12
  userHref?: string;
12
13
  }
13
- export interface HeaderLogo {
14
- url: string;
15
- alt?: string;
16
- sanityAttr?: string;
17
- }
18
14
  export interface HeaderUser {
19
15
  name?: string | null;
20
16
  image?: string | null;
21
17
  }
22
18
  /**
23
- * Everything {@link SimpleHeaderBase} draws. The wired `SimpleHeader` fills these in from the CMS,
24
- * the session and the tenant config; supply them yourself when none of those exist.
19
+ * Everything {@link SimpleHeaderBase} draws. The wired `SimpleHeader` fills these in from the tenant
20
+ * config, the CMS and the session; supply them yourself when none of those exist.
25
21
  */
26
22
  export interface SimpleHeaderBaseProps extends SimpleHeaderProps {
27
- logo: HeaderLogo;
23
+ logo: ReactNode;
28
24
  homeUrl?: string;
29
25
  myPageUrl?: string;
30
26
  user?: HeaderUser | null;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/v1/components/SimpleHeader/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,oBAAY,WAAW;IACrB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,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B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
@@ -1,7 +1,7 @@
1
1
  import { SimpleHeader } from "./components/SimpleHeader";
2
2
  export { SimpleHeaderBase } from "./components/SimpleHeader/base";
3
3
  export { HeaderTheme } from "./components/SimpleHeader/types";
4
- export type { SimpleHeaderProps, SimpleHeaderBaseProps, HeaderLogo, HeaderUser, } from "./components/SimpleHeader/types";
4
+ export type { SimpleHeaderProps, SimpleHeaderBaseProps, HeaderUser, } from "./components/SimpleHeader/types";
5
5
  export { LanguagePicker } from "./components/LanguagePicker";
6
6
  export default SimpleHeader;
7
7
  //# 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,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,YAAY,EACV,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,UAAU,GACX,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v1/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,YAAY,EACV,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,GACX,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,eAAe,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAO9D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAM9D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,eAAe,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.0.51",
2
+ "version": "5.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/auth": "3.9.0",
14
- "@snokam/sanity-page-content": "4.13.0",
15
- "@snokam/tenant": "2.1.19",
16
- "@snokam/ui": "4.2.0"
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",