@tollerud/footer 1.1.3 → 1.1.4
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/README.md +31 -2
- package/dist/index.cjs +85 -68
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +85 -68
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,7 +95,36 @@ If a host app needs always-horizontal layout (logo left, text right), use `layou
|
|
|
95
95
|
- `responsive` (default): `flex-col md:flex-row` behavior
|
|
96
96
|
- `row`: always horizontal `flex-row` behavior
|
|
97
97
|
|
|
98
|
-
###
|
|
98
|
+
### Consistent branding with configurable surface
|
|
99
|
+
|
|
100
|
+
The footer now enforces a consistent design across host apps by default (`enforceBranding` defaults to `true`).
|
|
101
|
+
|
|
102
|
+
In enforced mode:
|
|
103
|
+
- custom visual override props are ignored
|
|
104
|
+
- only top border and background are configurable via `classNameBorder` and `classNameBackground`
|
|
105
|
+
|
|
106
|
+
```tsx
|
|
107
|
+
<Footer
|
|
108
|
+
layout="row"
|
|
109
|
+
classNameBorder="border-t border-white/10"
|
|
110
|
+
classNameBackground="bg-black/50 backdrop-blur-sm"
|
|
111
|
+
/>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Optional full customization (legacy behavior)
|
|
115
|
+
|
|
116
|
+
If you need full control, disable branding enforcement:
|
|
117
|
+
|
|
118
|
+
```tsx
|
|
119
|
+
<Footer
|
|
120
|
+
enforceBranding={false}
|
|
121
|
+
unstyled
|
|
122
|
+
className="border-t border-white/10 bg-black/50 backdrop-blur-sm"
|
|
123
|
+
classNameText="text-sm text-white/90"
|
|
124
|
+
classNameLogo="h-5 w-5 text-[#ffff00]"
|
|
125
|
+
classNameLink="decoration-[#ffff00] text-white/95"
|
|
126
|
+
/>
|
|
127
|
+
```
|
|
99
128
|
|
|
100
129
|
Default footer applies `bg-gray-50` / `dark:bg-gray-900` and a top border. For overlays (e.g. **50% black** on top of imagery or video), use **`unstyled`** and pass your own surface classes or inline styles so you are not fighting those defaults:
|
|
101
130
|
|
|
@@ -121,7 +150,7 @@ Same idea with inline style:
|
|
|
121
150
|
/>
|
|
122
151
|
```
|
|
123
152
|
|
|
124
|
-
Props: `layout`, `className` / `style
|
|
153
|
+
Props: `layout`, `enforceBranding`, `classNameBorder`, `classNameBackground`, `className` / `style`, `classNameInner`, `classNameLogo`, `classNameText`, `classNameLink`, `unstyled`. Tailwind’s build must still scan this package (see above).
|
|
125
154
|
|
|
126
155
|
## Develop and publish
|
|
127
156
|
|
package/dist/index.cjs
CHANGED
|
@@ -13,6 +13,9 @@ var defaultLabels = {
|
|
|
13
13
|
function Footer({
|
|
14
14
|
labels,
|
|
15
15
|
layout = "responsive",
|
|
16
|
+
enforceBranding = true,
|
|
17
|
+
classNameBorder,
|
|
18
|
+
classNameBackground,
|
|
16
19
|
className,
|
|
17
20
|
style,
|
|
18
21
|
unstyled = false,
|
|
@@ -23,80 +26,94 @@ function Footer({
|
|
|
23
26
|
}) {
|
|
24
27
|
const t = { ...defaultLabels, ...labels };
|
|
25
28
|
const attribution = t.attribution?.trim();
|
|
26
|
-
const
|
|
29
|
+
const brandingEnforced = enforceBranding;
|
|
30
|
+
const footerSurface = brandingEnforced ? cn(
|
|
31
|
+
classNameBorder ?? "border-t border-gray-200 dark:border-gray-800",
|
|
32
|
+
classNameBackground ?? "bg-gray-50 dark:bg-gray-900"
|
|
33
|
+
) : unstyled ? "" : "border-t border-gray-200 bg-gray-50 dark:border-gray-800 dark:bg-gray-900";
|
|
27
34
|
const innerLayoutClasses = layout === "row" ? "max-w-7xl mx-auto px-8 flex flex-row items-center justify-between gap-4" : "max-w-7xl mx-auto px-8 flex flex-col md:flex-row items-center justify-center md:justify-between gap-4 md:gap-0";
|
|
28
35
|
const textWrapperClasses = layout === "row" ? "flex-1 text-right ml-4" : "flex-1 text-center md:text-right md:ml-4";
|
|
29
36
|
const textLayoutClasses = layout === "row" ? "text-sm text-gray-600 dark:text-gray-400 inline-flex flex-row items-center justify-end text-right gap-0" : "text-sm text-gray-600 dark:text-gray-400 flex flex-col md:flex-row md:inline gap-0";
|
|
30
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
31
|
-
"
|
|
37
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
38
|
+
"footer",
|
|
32
39
|
{
|
|
33
|
-
className: cn(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
rel: "noopener noreferrer",
|
|
76
|
-
className: cn(
|
|
77
|
-
"underline decoration-[#ffff00] decoration-[3px] underline-offset-[4px] hover:opacity-80 transition-opacity",
|
|
78
|
-
classNameLink
|
|
79
|
-
),
|
|
80
|
-
style: {
|
|
81
|
-
textDecorationThickness: "3px",
|
|
82
|
-
textUnderlineOffset: "4px"
|
|
83
|
-
},
|
|
84
|
-
children: t.tollerudProject
|
|
85
|
-
}
|
|
40
|
+
className: cn("w-full pt-4 pb-4", footerSurface, brandingEnforced ? void 0 : className),
|
|
41
|
+
style: brandingEnforced ? void 0 : style,
|
|
42
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
className: cn(
|
|
46
|
+
innerLayoutClasses,
|
|
47
|
+
brandingEnforced ? void 0 : classNameInner
|
|
48
|
+
),
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 md:flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
51
|
+
"svg",
|
|
52
|
+
{
|
|
53
|
+
width: "24",
|
|
54
|
+
height: "24",
|
|
55
|
+
viewBox: "0 0 130 143",
|
|
56
|
+
version: "1.1",
|
|
57
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
58
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
59
|
+
className: cn(
|
|
60
|
+
"h-5 w-5 text-black dark:text-[#ffff00]",
|
|
61
|
+
brandingEnforced ? void 0 : classNameLogo
|
|
62
|
+
),
|
|
63
|
+
role: "img",
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ jsxRuntime.jsx("title", { children: "Tollerud Logo" }),
|
|
66
|
+
/* @__PURE__ */ jsxRuntime.jsx("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ jsxRuntime.jsx("g", { id: "Tollerud Monogram", transform: "translate(-86.000000, -109.000000)", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("g", { id: "Group-2", transform: "translate(32.000000, 55.000000)", children: /* @__PURE__ */ jsxRuntime.jsx("g", { id: "Group", transform: "translate(54.000000, 54.000000)", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
67
|
+
"path",
|
|
68
|
+
{
|
|
69
|
+
d: "M82.4839273,140.272626 L95.1738252,140.272626 L95.1738252,143 L34.8114657,143 L34.8114657,140.272626 L47.5013636,140.272626 L47.5013636,28.2924381 C40.1277806,26.4177752 32.9252955,25.2241422 26.4088393,25.2241422 C12.1757856,25.2241422 4.11617359,34.5982703 4.11617359,39.8821508 C4.11617359,40.9049161 4.63028596,41.5867596 5.65932936,41.5867596 C7.20248513,41.5867596 7.37440169,40.3931266 8.06043062,38.8593855 C10.4615319,33.575505 15.6059302,31.5307881 20.4073141,31.5307881 C29.152955,31.5307881 35.1552988,38.5184637 35.1552988,47.2107482 C35.1552988,56.2447681 28.8107592,62.8907084 18.0070315,62.8907084 C7.5454996,62.891522 0,53.6882617 0,43.8023442 C0,30.8497582 11.3178401,21.986606 26.5799372,21.986606 C51.1026062,21.986606 84.1989996,39.2011209 104.948509,39.2011209 C118.495534,39.2011209 126.384048,31.7016558 126.384048,19.4300996 C126.384048,10.3968933 118.667451,4.60203698 115.580321,4.60203698 C114.552096,4.60203698 113.69415,5.1130128 113.69415,6.13577809 C113.69415,7.49946515 114.552096,7.6695192 115.409223,8.01044097 C115.752237,8.18049502 122.268693,10.5669474 122.268693,19.2592319 C122.268693,28.2924381 115.238125,34.0872945 107.177694,34.0872945 C97.7460244,34.0872945 91.0584702,26.4177752 91.0584702,17.8955448 C91.0584702,6.64675391 99.9760277,0 109.749893,0 C122.268693,0 129.642276,9.88510384 129.642276,19.6001536 C129.642276,34.2581622 119.181563,42.4386572 104.947691,42.4386572 C98.0890388,42.4386572 90.5443579,40.9049161 82.4839273,38.6901451 L82.4839273,140.272626 Z",
|
|
70
|
+
id: "Monogram"
|
|
71
|
+
}
|
|
72
|
+
) }) }) }) })
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
) }),
|
|
76
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: textWrapperClasses, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
77
|
+
"p",
|
|
78
|
+
{
|
|
79
|
+
className: cn(
|
|
80
|
+
textLayoutClasses,
|
|
81
|
+
brandingEnforced ? void 0 : classNameText
|
|
86
82
|
),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
85
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
86
|
+
"a",
|
|
87
|
+
{
|
|
88
|
+
href: "https://tollerud.no",
|
|
89
|
+
target: "_blank",
|
|
90
|
+
rel: "noopener noreferrer",
|
|
91
|
+
className: cn(
|
|
92
|
+
"underline decoration-[#ffff00] decoration-[3px] underline-offset-[4px] hover:opacity-80 transition-opacity",
|
|
93
|
+
brandingEnforced ? void 0 : classNameLink
|
|
94
|
+
),
|
|
95
|
+
style: {
|
|
96
|
+
textDecorationThickness: "3px",
|
|
97
|
+
textUnderlineOffset: "4px"
|
|
98
|
+
},
|
|
99
|
+
children: t.tollerudProject
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
attribution ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
103
|
+
" ",
|
|
104
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: attribution })
|
|
105
|
+
] }) : null,
|
|
106
|
+
" "
|
|
107
|
+
] }),
|
|
108
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: layout === "row" ? "ml-1" : "md:ml-1", children: t.allRightsReserved })
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
) })
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
)
|
|
98
115
|
}
|
|
99
|
-
)
|
|
116
|
+
);
|
|
100
117
|
}
|
|
101
118
|
|
|
102
119
|
exports.Footer = Footer;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Footer.tsx"],"names":["jsx","jsxs","Fragment"],"mappings":";;;;;AAIA,SAAS,MAAM,KAAA,EAAsD;AACnE,EAAA,OAAO,KAAA,CAAM,MAAA,CAAO,OAAO,CAAA,CAAE,KAAK,GAAG,CAAA;AACvC;AAaA,IAAM,aAAA,GAA8B;AAAA,EAClC,eAAA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oBACJ,SAAA,EAAW,EAAA;AAAA,sBACT,4GAAA;AAAA,sBACA;AAAA,qBACF;AAAA,oBACA,KAAA,EAAO;AAAA,sBACL,uBAAA,EAAyB,KAAA;AAAA,sBACzB,mBAAA,EAAqB;AAAA,qBACvB;AAAA,oBAEC,QAAA,EAAA,CAAA,CAAE;AAAA;AAAA,iBACL;AAAA,gBACC,8BACCC,eAAA,CAAAC,mBAAA,EAAA,EACG,QAAA,EAAA;AAAA,kBAAA,GAAA;AAAA,kCACDF,cAAA,CAAC,UAAM,QAAA,EAAA,WAAA,EAAY;AAAA,iBAAA,EACrB,CAAA,GACE,IAAA;AAAA,gBAAM;AAAA,eAAA,EACZ,CAAA;AAAA,8BACAA,cAAA,CAAC,UAAK,SAAA,EAAW,MAAA,KAAW,QAAQ,MAAA,GAAS,SAAA,EAAY,YAAE,iBAAA,EAAkB;AAAA;AAAA;AAAA,SAC/E,EACF;AAAA;AAAA;AAAA,GACF,EACF,CAAA;AAEJ","file":"index.cjs","sourcesContent":["'use client'\n\nimport type { CSSProperties, ReactElement } from 'react'\n\nfunction cn(...parts: (string | undefined | null | false)[]): string {\n return parts.filter(Boolean).join(' ')\n}\n\nexport type FooterLabels = {\n /** Text for the tollerud.no link (e.g. “A Tollerud Project”). */\n tollerudProject: string\n /**\n * Optional middle segment after the link, before the rights line.\n * Example for [dispatch.tollerud.dev](https://dispatch.tollerud.dev/): `\"for Advania Norge AS.\"`\n */\n attribution?: string\n allRightsReserved: string\n}\n\nconst defaultLabels: FooterLabels = {\n tollerudProject: 'A Tollerud Project',\n allRightsReserved: 'All rights reserved.',\n}\n\nexport type FooterProps = {\n labels?: Partial<FooterLabels>\n /** Layout behavior: responsive keeps mobile-first stacking, row forces horizontal layout. */\n layout?: 'responsive' | 'row'\n /** Merged onto `<footer>`. Use for layout, surface, e.g. `border-t border-white/10 bg-black/50 backdrop-blur-sm`. */\n className?: string\n /** Merged onto `<footer>` (wins over conflicting `backgroundColor` from classes when needed). */\n style?: CSSProperties\n /**\n * When true, skips default border/background/dark surface so `className` / `style` fully control the bar\n * (avoids fighting `bg-gray-50` / `dark:bg-gray-900`).\n */\n unstyled?: boolean\n classNameInner?: string\n classNameLogo?: string\n classNameText?: string\n classNameLink?: string\n}\n\nexport function Footer({\n labels,\n layout = 'responsive',\n className,\n style,\n unstyled = false,\n classNameInner,\n classNameLogo,\n classNameText,\n classNameLink,\n}: FooterProps): ReactElement {\n const t = { ...defaultLabels, ...labels }\n const attribution = t.attribution?.trim()\n\n const footerSurface = unstyled\n ? ''\n : 'border-t border-gray-200 bg-gray-50 dark:border-gray-800 dark:bg-gray-900'\n\n const innerLayoutClasses =\n layout === 'row'\n ? 'max-w-7xl mx-auto px-8 flex flex-row items-center justify-between gap-4'\n : 'max-w-7xl mx-auto px-8 flex flex-col md:flex-row items-center justify-center md:justify-between gap-4 md:gap-0'\n\n const textWrapperClasses =\n layout === 'row' ? 'flex-1 text-right ml-4' : 'flex-1 text-center md:text-right md:ml-4'\n\n const textLayoutClasses =\n layout === 'row'\n ? 'text-sm text-gray-600 dark:text-gray-400 inline-flex flex-row items-center justify-end text-right gap-0'\n : 'text-sm text-gray-600 dark:text-gray-400 flex flex-col md:flex-row md:inline gap-0'\n\n return (\n <footer className={cn('w-full pt-4 pb-4', footerSurface, className)} style={style}>\n <div\n className={cn(\n innerLayoutClasses,\n classNameInner,\n )}\n >\n <div className=\"flex-shrink-0 md:flex-shrink-0\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 130 143\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n className={cn('h-5 w-5 text-black dark:text-[#ffff00]', classNameLogo)}\n role=\"img\"\n >\n <title>Tollerud Logo</title>\n <g id=\"Page-1\" stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <g id=\"Tollerud Monogram\" transform=\"translate(-86.000000, -109.000000)\" fill=\"currentColor\">\n <g id=\"Group-2\" transform=\"translate(32.000000, 55.000000)\">\n <g id=\"Group\" transform=\"translate(54.000000, 54.000000)\">\n <path\n d=\"M82.4839273,140.272626 L95.1738252,140.272626 L95.1738252,143 L34.8114657,143 L34.8114657,140.272626 L47.5013636,140.272626 L47.5013636,28.2924381 C40.1277806,26.4177752 32.9252955,25.2241422 26.4088393,25.2241422 C12.1757856,25.2241422 4.11617359,34.5982703 4.11617359,39.8821508 C4.11617359,40.9049161 4.63028596,41.5867596 5.65932936,41.5867596 C7.20248513,41.5867596 7.37440169,40.3931266 8.06043062,38.8593855 C10.4615319,33.575505 15.6059302,31.5307881 20.4073141,31.5307881 C29.152955,31.5307881 35.1552988,38.5184637 35.1552988,47.2107482 C35.1552988,56.2447681 28.8107592,62.8907084 18.0070315,62.8907084 C7.5454996,62.891522 0,53.6882617 0,43.8023442 C0,30.8497582 11.3178401,21.986606 26.5799372,21.986606 C51.1026062,21.986606 84.1989996,39.2011209 104.948509,39.2011209 C118.495534,39.2011209 126.384048,31.7016558 126.384048,19.4300996 C126.384048,10.3968933 118.667451,4.60203698 115.580321,4.60203698 C114.552096,4.60203698 113.69415,5.1130128 113.69415,6.13577809 C113.69415,7.49946515 114.552096,7.6695192 115.409223,8.01044097 C115.752237,8.18049502 122.268693,10.5669474 122.268693,19.2592319 C122.268693,28.2924381 115.238125,34.0872945 107.177694,34.0872945 C97.7460244,34.0872945 91.0584702,26.4177752 91.0584702,17.8955448 C91.0584702,6.64675391 99.9760277,0 109.749893,0 C122.268693,0 129.642276,9.88510384 129.642276,19.6001536 C129.642276,34.2581622 119.181563,42.4386572 104.947691,42.4386572 C98.0890388,42.4386572 90.5443579,40.9049161 82.4839273,38.6901451 L82.4839273,140.272626 Z\"\n id=\"Monogram\"\n />\n </g>\n </g>\n </g>\n </g>\n </svg>\n </div>\n\n <div className={textWrapperClasses}>\n <p\n className={cn(\n textLayoutClasses,\n classNameText,\n )}\n >\n <span>\n <a\n href=\"https://tollerud.no\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n 'underline decoration-[#ffff00] decoration-[3px] underline-offset-[4px] hover:opacity-80 transition-opacity',\n classNameLink,\n )}\n style={{\n textDecorationThickness: '3px',\n textUnderlineOffset: '4px',\n }}\n >\n {t.tollerudProject}\n </a>\n {attribution ? (\n <>\n {' '}\n <span>{attribution}</span>\n </>\n ) : null}{' '}\n </span>\n <span className={layout === 'row' ? 'ml-1' : 'md:ml-1'}>{t.allRightsReserved}</span>\n </p>\n </div>\n </div>\n </footer>\n )\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/Footer.tsx"],"names":["jsx","jsxs","Fragment"],"mappings":";;;;;AAIA,SAAS,MAAM,KAAA,EAAsD;AACnE,EAAA,OAAO,KAAA,CAAM,MAAA,CAAO,OAAO,CAAA,CAAE,KAAK,GAAG,CAAA;AACvC;AAaA,IAAM,aAAA,GAA8B;AAAA,EAClC,eAAA,EAAiB,oBAAA;AAAA,EACjB,iBAAA,EAAmB;AACrB,CAAA;AA+BO,SAAS,MAAA,CAAO;AAAA,EACrB,MAAA;AAAA,EACA,MAAA,GAAS,YAAA;AAAA,EACT,eAAA,GAAkB,IAAA;AAAA,EAClB,eAAA;AAAA,EACA,mBAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA,GAAW,KAAA;AAAA,EACX,cAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA,EACA;AACF,CAAA,EAA8B;AAC5B,EAAA,MAAM,CAAA,GAAI,EAAE,GAAG,aAAA,EAAe,GAAG,MAAA,EAAO;AACxC,EAAA,MAAM,WAAA,GAAc,CAAA,CAAE,WAAA,EAAa,IAAA,EAAK;AACxC,EAAA,MAAM,gBAAA,GAAmB,eAAA;AAEzB,EAAA,MAAM,gBAAgB,gBAAA,GAClB,EAAA;AAAA,IACE,eAAA,IAAmB,+CAAA;AAAA,IACnB,mBAAA,IAAuB;AAAA,GACzB,GACA,WACE,EAAA,GACA,2EAAA;AA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C,mBAAA,EAAA,EACG,QAAA,EAAA;AAAA,sBAAA,GAAA;AAAA,sCACDF,cAAA,CAAC,UAAM,QAAA,EAAA,WAAA,EAAY;AAAA,qBAAA,EACrB,CAAA,GACE,IAAA;AAAA,oBAAM;AAAA,mBAAA,EACZ,CAAA;AAAA,kCACAA,cAAA,CAAC,UAAK,SAAA,EAAW,MAAA,KAAW,QAAQ,MAAA,GAAS,SAAA,EAAY,YAAE,iBAAA,EAAkB;AAAA;AAAA;AAAA,aAC/E,EACF;AAAA;AAAA;AAAA;AACF;AAAA,GACF;AAEJ","file":"index.cjs","sourcesContent":["'use client'\n\nimport type { CSSProperties, ReactElement } from 'react'\n\nfunction cn(...parts: (string | undefined | null | false)[]): string {\n return parts.filter(Boolean).join(' ')\n}\n\nexport type FooterLabels = {\n /** Text for the tollerud.no link (e.g. “A Tollerud Project”). */\n tollerudProject: string\n /**\n * Optional middle segment after the link, before the rights line.\n * Example for [dispatch.tollerud.dev](https://dispatch.tollerud.dev/): `\"for Advania Norge AS.\"`\n */\n attribution?: string\n allRightsReserved: string\n}\n\nconst defaultLabels: FooterLabels = {\n tollerudProject: 'A Tollerud Project',\n allRightsReserved: 'All rights reserved.',\n}\n\nexport type FooterProps = {\n labels?: Partial<FooterLabels>\n /** Layout behavior: responsive keeps mobile-first stacking, row forces horizontal layout. */\n layout?: 'responsive' | 'row'\n /**\n * When true (default), enforces consistent footer branding across sites.\n * In enforced mode, visual override class props are ignored except top border and background controls below.\n */\n enforceBranding?: boolean\n /** Top border classes (used in enforced mode). */\n classNameBorder?: string\n /** Background/surface classes (used in enforced mode). */\n classNameBackground?: string\n /** Merged onto `<footer>`. */\n className?: string\n /** Merged onto `<footer>`. */\n style?: CSSProperties\n /**\n * When true, skips default border/background/dark surface so `className` / `style` fully control the bar\n * (avoids fighting `bg-gray-50` / `dark:bg-gray-900`).\n * Ignored when `enforceBranding` is true.\n */\n unstyled?: boolean\n classNameInner?: string\n classNameLogo?: string\n classNameText?: string\n classNameLink?: string\n}\n\nexport function Footer({\n labels,\n layout = 'responsive',\n enforceBranding = true,\n classNameBorder,\n classNameBackground,\n className,\n style,\n unstyled = false,\n classNameInner,\n classNameLogo,\n classNameText,\n classNameLink,\n}: FooterProps): ReactElement {\n const t = { ...defaultLabels, ...labels }\n const attribution = t.attribution?.trim()\n const brandingEnforced = enforceBranding\n\n const footerSurface = brandingEnforced\n ? cn(\n classNameBorder ?? 'border-t border-gray-200 dark:border-gray-800',\n classNameBackground ?? 'bg-gray-50 dark:bg-gray-900',\n )\n : unstyled\n ? ''\n : 'border-t border-gray-200 bg-gray-50 dark:border-gray-800 dark:bg-gray-900'\n\n const innerLayoutClasses =\n layout === 'row'\n ? 'max-w-7xl mx-auto px-8 flex flex-row items-center justify-between gap-4'\n : 'max-w-7xl mx-auto px-8 flex flex-col md:flex-row items-center justify-center md:justify-between gap-4 md:gap-0'\n\n const textWrapperClasses =\n layout === 'row' ? 'flex-1 text-right ml-4' : 'flex-1 text-center md:text-right md:ml-4'\n\n const textLayoutClasses =\n layout === 'row'\n ? 'text-sm text-gray-600 dark:text-gray-400 inline-flex flex-row items-center justify-end text-right gap-0'\n : 'text-sm text-gray-600 dark:text-gray-400 flex flex-col md:flex-row md:inline gap-0'\n\n return (\n <footer\n className={cn('w-full pt-4 pb-4', footerSurface, brandingEnforced ? undefined : className)}\n style={brandingEnforced ? undefined : style}\n >\n <div\n className={cn(\n innerLayoutClasses,\n brandingEnforced ? undefined : classNameInner,\n )}\n >\n <div className=\"flex-shrink-0 md:flex-shrink-0\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 130 143\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n className={cn(\n 'h-5 w-5 text-black dark:text-[#ffff00]',\n brandingEnforced ? undefined : classNameLogo,\n )}\n role=\"img\"\n >\n <title>Tollerud Logo</title>\n <g id=\"Page-1\" stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <g id=\"Tollerud Monogram\" transform=\"translate(-86.000000, -109.000000)\" fill=\"currentColor\">\n <g id=\"Group-2\" transform=\"translate(32.000000, 55.000000)\">\n <g id=\"Group\" transform=\"translate(54.000000, 54.000000)\">\n <path\n d=\"M82.4839273,140.272626 L95.1738252,140.272626 L95.1738252,143 L34.8114657,143 L34.8114657,140.272626 L47.5013636,140.272626 L47.5013636,28.2924381 C40.1277806,26.4177752 32.9252955,25.2241422 26.4088393,25.2241422 C12.1757856,25.2241422 4.11617359,34.5982703 4.11617359,39.8821508 C4.11617359,40.9049161 4.63028596,41.5867596 5.65932936,41.5867596 C7.20248513,41.5867596 7.37440169,40.3931266 8.06043062,38.8593855 C10.4615319,33.575505 15.6059302,31.5307881 20.4073141,31.5307881 C29.152955,31.5307881 35.1552988,38.5184637 35.1552988,47.2107482 C35.1552988,56.2447681 28.8107592,62.8907084 18.0070315,62.8907084 C7.5454996,62.891522 0,53.6882617 0,43.8023442 C0,30.8497582 11.3178401,21.986606 26.5799372,21.986606 C51.1026062,21.986606 84.1989996,39.2011209 104.948509,39.2011209 C118.495534,39.2011209 126.384048,31.7016558 126.384048,19.4300996 C126.384048,10.3968933 118.667451,4.60203698 115.580321,4.60203698 C114.552096,4.60203698 113.69415,5.1130128 113.69415,6.13577809 C113.69415,7.49946515 114.552096,7.6695192 115.409223,8.01044097 C115.752237,8.18049502 122.268693,10.5669474 122.268693,19.2592319 C122.268693,28.2924381 115.238125,34.0872945 107.177694,34.0872945 C97.7460244,34.0872945 91.0584702,26.4177752 91.0584702,17.8955448 C91.0584702,6.64675391 99.9760277,0 109.749893,0 C122.268693,0 129.642276,9.88510384 129.642276,19.6001536 C129.642276,34.2581622 119.181563,42.4386572 104.947691,42.4386572 C98.0890388,42.4386572 90.5443579,40.9049161 82.4839273,38.6901451 L82.4839273,140.272626 Z\"\n id=\"Monogram\"\n />\n </g>\n </g>\n </g>\n </g>\n </svg>\n </div>\n\n <div className={textWrapperClasses}>\n <p\n className={cn(\n textLayoutClasses,\n brandingEnforced ? undefined : classNameText,\n )}\n >\n <span>\n <a\n href=\"https://tollerud.no\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n 'underline decoration-[#ffff00] decoration-[3px] underline-offset-[4px] hover:opacity-80 transition-opacity',\n brandingEnforced ? undefined : classNameLink,\n )}\n style={{\n textDecorationThickness: '3px',\n textUnderlineOffset: '4px',\n }}\n >\n {t.tollerudProject}\n </a>\n {attribution ? (\n <>\n {' '}\n <span>{attribution}</span>\n </>\n ) : null}{' '}\n </span>\n <span className={layout === 'row' ? 'ml-1' : 'md:ml-1'}>{t.allRightsReserved}</span>\n </p>\n </div>\n </div>\n </footer>\n )\n}\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -14,13 +14,23 @@ type FooterProps = {
|
|
|
14
14
|
labels?: Partial<FooterLabels>;
|
|
15
15
|
/** Layout behavior: responsive keeps mobile-first stacking, row forces horizontal layout. */
|
|
16
16
|
layout?: 'responsive' | 'row';
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* When true (default), enforces consistent footer branding across sites.
|
|
19
|
+
* In enforced mode, visual override class props are ignored except top border and background controls below.
|
|
20
|
+
*/
|
|
21
|
+
enforceBranding?: boolean;
|
|
22
|
+
/** Top border classes (used in enforced mode). */
|
|
23
|
+
classNameBorder?: string;
|
|
24
|
+
/** Background/surface classes (used in enforced mode). */
|
|
25
|
+
classNameBackground?: string;
|
|
26
|
+
/** Merged onto `<footer>`. */
|
|
18
27
|
className?: string;
|
|
19
|
-
/** Merged onto `<footer
|
|
28
|
+
/** Merged onto `<footer>`. */
|
|
20
29
|
style?: CSSProperties;
|
|
21
30
|
/**
|
|
22
31
|
* When true, skips default border/background/dark surface so `className` / `style` fully control the bar
|
|
23
32
|
* (avoids fighting `bg-gray-50` / `dark:bg-gray-900`).
|
|
33
|
+
* Ignored when `enforceBranding` is true.
|
|
24
34
|
*/
|
|
25
35
|
unstyled?: boolean;
|
|
26
36
|
classNameInner?: string;
|
|
@@ -28,6 +38,6 @@ type FooterProps = {
|
|
|
28
38
|
classNameText?: string;
|
|
29
39
|
classNameLink?: string;
|
|
30
40
|
};
|
|
31
|
-
declare function Footer({ labels, layout, className, style, unstyled, classNameInner, classNameLogo, classNameText, classNameLink, }: FooterProps): ReactElement;
|
|
41
|
+
declare function Footer({ labels, layout, enforceBranding, classNameBorder, classNameBackground, className, style, unstyled, classNameInner, classNameLogo, classNameText, classNameLink, }: FooterProps): ReactElement;
|
|
32
42
|
|
|
33
43
|
export { Footer, type FooterLabels, type FooterProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -14,13 +14,23 @@ type FooterProps = {
|
|
|
14
14
|
labels?: Partial<FooterLabels>;
|
|
15
15
|
/** Layout behavior: responsive keeps mobile-first stacking, row forces horizontal layout. */
|
|
16
16
|
layout?: 'responsive' | 'row';
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* When true (default), enforces consistent footer branding across sites.
|
|
19
|
+
* In enforced mode, visual override class props are ignored except top border and background controls below.
|
|
20
|
+
*/
|
|
21
|
+
enforceBranding?: boolean;
|
|
22
|
+
/** Top border classes (used in enforced mode). */
|
|
23
|
+
classNameBorder?: string;
|
|
24
|
+
/** Background/surface classes (used in enforced mode). */
|
|
25
|
+
classNameBackground?: string;
|
|
26
|
+
/** Merged onto `<footer>`. */
|
|
18
27
|
className?: string;
|
|
19
|
-
/** Merged onto `<footer
|
|
28
|
+
/** Merged onto `<footer>`. */
|
|
20
29
|
style?: CSSProperties;
|
|
21
30
|
/**
|
|
22
31
|
* When true, skips default border/background/dark surface so `className` / `style` fully control the bar
|
|
23
32
|
* (avoids fighting `bg-gray-50` / `dark:bg-gray-900`).
|
|
33
|
+
* Ignored when `enforceBranding` is true.
|
|
24
34
|
*/
|
|
25
35
|
unstyled?: boolean;
|
|
26
36
|
classNameInner?: string;
|
|
@@ -28,6 +38,6 @@ type FooterProps = {
|
|
|
28
38
|
classNameText?: string;
|
|
29
39
|
classNameLink?: string;
|
|
30
40
|
};
|
|
31
|
-
declare function Footer({ labels, layout, className, style, unstyled, classNameInner, classNameLogo, classNameText, classNameLink, }: FooterProps): ReactElement;
|
|
41
|
+
declare function Footer({ labels, layout, enforceBranding, classNameBorder, classNameBackground, className, style, unstyled, classNameInner, classNameLogo, classNameText, classNameLink, }: FooterProps): ReactElement;
|
|
32
42
|
|
|
33
43
|
export { Footer, type FooterLabels, type FooterProps };
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,9 @@ var defaultLabels = {
|
|
|
11
11
|
function Footer({
|
|
12
12
|
labels,
|
|
13
13
|
layout = "responsive",
|
|
14
|
+
enforceBranding = true,
|
|
15
|
+
classNameBorder,
|
|
16
|
+
classNameBackground,
|
|
14
17
|
className,
|
|
15
18
|
style,
|
|
16
19
|
unstyled = false,
|
|
@@ -21,80 +24,94 @@ function Footer({
|
|
|
21
24
|
}) {
|
|
22
25
|
const t = { ...defaultLabels, ...labels };
|
|
23
26
|
const attribution = t.attribution?.trim();
|
|
24
|
-
const
|
|
27
|
+
const brandingEnforced = enforceBranding;
|
|
28
|
+
const footerSurface = brandingEnforced ? cn(
|
|
29
|
+
classNameBorder ?? "border-t border-gray-200 dark:border-gray-800",
|
|
30
|
+
classNameBackground ?? "bg-gray-50 dark:bg-gray-900"
|
|
31
|
+
) : unstyled ? "" : "border-t border-gray-200 bg-gray-50 dark:border-gray-800 dark:bg-gray-900";
|
|
25
32
|
const innerLayoutClasses = layout === "row" ? "max-w-7xl mx-auto px-8 flex flex-row items-center justify-between gap-4" : "max-w-7xl mx-auto px-8 flex flex-col md:flex-row items-center justify-center md:justify-between gap-4 md:gap-0";
|
|
26
33
|
const textWrapperClasses = layout === "row" ? "flex-1 text-right ml-4" : "flex-1 text-center md:text-right md:ml-4";
|
|
27
34
|
const textLayoutClasses = layout === "row" ? "text-sm text-gray-600 dark:text-gray-400 inline-flex flex-row items-center justify-end text-right gap-0" : "text-sm text-gray-600 dark:text-gray-400 flex flex-col md:flex-row md:inline gap-0";
|
|
28
|
-
return /* @__PURE__ */ jsx(
|
|
29
|
-
"
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
"footer",
|
|
30
37
|
{
|
|
31
|
-
className: cn(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
rel: "noopener noreferrer",
|
|
74
|
-
className: cn(
|
|
75
|
-
"underline decoration-[#ffff00] decoration-[3px] underline-offset-[4px] hover:opacity-80 transition-opacity",
|
|
76
|
-
classNameLink
|
|
77
|
-
),
|
|
78
|
-
style: {
|
|
79
|
-
textDecorationThickness: "3px",
|
|
80
|
-
textUnderlineOffset: "4px"
|
|
81
|
-
},
|
|
82
|
-
children: t.tollerudProject
|
|
83
|
-
}
|
|
38
|
+
className: cn("w-full pt-4 pb-4", footerSurface, brandingEnforced ? void 0 : className),
|
|
39
|
+
style: brandingEnforced ? void 0 : style,
|
|
40
|
+
children: /* @__PURE__ */ jsxs(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
className: cn(
|
|
44
|
+
innerLayoutClasses,
|
|
45
|
+
brandingEnforced ? void 0 : classNameInner
|
|
46
|
+
),
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ jsx("div", { className: "flex-shrink-0 md:flex-shrink-0", children: /* @__PURE__ */ jsxs(
|
|
49
|
+
"svg",
|
|
50
|
+
{
|
|
51
|
+
width: "24",
|
|
52
|
+
height: "24",
|
|
53
|
+
viewBox: "0 0 130 143",
|
|
54
|
+
version: "1.1",
|
|
55
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
56
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
57
|
+
className: cn(
|
|
58
|
+
"h-5 w-5 text-black dark:text-[#ffff00]",
|
|
59
|
+
brandingEnforced ? void 0 : classNameLogo
|
|
60
|
+
),
|
|
61
|
+
role: "img",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ jsx("title", { children: "Tollerud Logo" }),
|
|
64
|
+
/* @__PURE__ */ jsx("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ jsx("g", { id: "Tollerud Monogram", transform: "translate(-86.000000, -109.000000)", fill: "currentColor", children: /* @__PURE__ */ jsx("g", { id: "Group-2", transform: "translate(32.000000, 55.000000)", children: /* @__PURE__ */ jsx("g", { id: "Group", transform: "translate(54.000000, 54.000000)", children: /* @__PURE__ */ jsx(
|
|
65
|
+
"path",
|
|
66
|
+
{
|
|
67
|
+
d: "M82.4839273,140.272626 L95.1738252,140.272626 L95.1738252,143 L34.8114657,143 L34.8114657,140.272626 L47.5013636,140.272626 L47.5013636,28.2924381 C40.1277806,26.4177752 32.9252955,25.2241422 26.4088393,25.2241422 C12.1757856,25.2241422 4.11617359,34.5982703 4.11617359,39.8821508 C4.11617359,40.9049161 4.63028596,41.5867596 5.65932936,41.5867596 C7.20248513,41.5867596 7.37440169,40.3931266 8.06043062,38.8593855 C10.4615319,33.575505 15.6059302,31.5307881 20.4073141,31.5307881 C29.152955,31.5307881 35.1552988,38.5184637 35.1552988,47.2107482 C35.1552988,56.2447681 28.8107592,62.8907084 18.0070315,62.8907084 C7.5454996,62.891522 0,53.6882617 0,43.8023442 C0,30.8497582 11.3178401,21.986606 26.5799372,21.986606 C51.1026062,21.986606 84.1989996,39.2011209 104.948509,39.2011209 C118.495534,39.2011209 126.384048,31.7016558 126.384048,19.4300996 C126.384048,10.3968933 118.667451,4.60203698 115.580321,4.60203698 C114.552096,4.60203698 113.69415,5.1130128 113.69415,6.13577809 C113.69415,7.49946515 114.552096,7.6695192 115.409223,8.01044097 C115.752237,8.18049502 122.268693,10.5669474 122.268693,19.2592319 C122.268693,28.2924381 115.238125,34.0872945 107.177694,34.0872945 C97.7460244,34.0872945 91.0584702,26.4177752 91.0584702,17.8955448 C91.0584702,6.64675391 99.9760277,0 109.749893,0 C122.268693,0 129.642276,9.88510384 129.642276,19.6001536 C129.642276,34.2581622 119.181563,42.4386572 104.947691,42.4386572 C98.0890388,42.4386572 90.5443579,40.9049161 82.4839273,38.6901451 L82.4839273,140.272626 Z",
|
|
68
|
+
id: "Monogram"
|
|
69
|
+
}
|
|
70
|
+
) }) }) }) })
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
) }),
|
|
74
|
+
/* @__PURE__ */ jsx("div", { className: textWrapperClasses, children: /* @__PURE__ */ jsxs(
|
|
75
|
+
"p",
|
|
76
|
+
{
|
|
77
|
+
className: cn(
|
|
78
|
+
textLayoutClasses,
|
|
79
|
+
brandingEnforced ? void 0 : classNameText
|
|
84
80
|
),
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
83
|
+
/* @__PURE__ */ jsx(
|
|
84
|
+
"a",
|
|
85
|
+
{
|
|
86
|
+
href: "https://tollerud.no",
|
|
87
|
+
target: "_blank",
|
|
88
|
+
rel: "noopener noreferrer",
|
|
89
|
+
className: cn(
|
|
90
|
+
"underline decoration-[#ffff00] decoration-[3px] underline-offset-[4px] hover:opacity-80 transition-opacity",
|
|
91
|
+
brandingEnforced ? void 0 : classNameLink
|
|
92
|
+
),
|
|
93
|
+
style: {
|
|
94
|
+
textDecorationThickness: "3px",
|
|
95
|
+
textUnderlineOffset: "4px"
|
|
96
|
+
},
|
|
97
|
+
children: t.tollerudProject
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
attribution ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
101
|
+
" ",
|
|
102
|
+
/* @__PURE__ */ jsx("span", { children: attribution })
|
|
103
|
+
] }) : null,
|
|
104
|
+
" "
|
|
105
|
+
] }),
|
|
106
|
+
/* @__PURE__ */ jsx("span", { className: layout === "row" ? "ml-1" : "md:ml-1", children: t.allRightsReserved })
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
) })
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
)
|
|
96
113
|
}
|
|
97
|
-
)
|
|
114
|
+
);
|
|
98
115
|
}
|
|
99
116
|
|
|
100
117
|
export { Footer };
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Footer.tsx"],"names":[],"mappings":";;;AAIA,SAAS,MAAM,KAAA,EAAsD;AACnE,EAAA,OAAO,KAAA,CAAM,MAAA,CAAO,OAAO,CAAA,CAAE,KAAK,GAAG,CAAA;AACvC;AAaA,IAAM,aAAA,GAA8B;AAAA,EAClC,eAAA,EAAiB,oBAAA;AAAA,EACjB,iBAAA,EAAmB;AACrB,CAAA;AAqBO,SAAS,MAAA,CAAO;AAAA,EACrB,MAAA;AAAA,EACA,MAAA,GAAS,YAAA;AAAA,EACT,SAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA,GAAW,KAAA;AAAA,EACX,cAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA,EACA;AACF,CAAA,EAA8B;AAC5B,EAAA,MAAM,CAAA,GAAI,EAAE,G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,UAAM,QAAA,EAAA,WAAA,EAAY;AAAA,iBAAA,EACrB,CAAA,GACE,IAAA;AAAA,gBAAM;AAAA,eAAA,EACZ,CAAA;AAAA,8BACA,GAAA,CAAC,UAAK,SAAA,EAAW,MAAA,KAAW,QAAQ,MAAA,GAAS,SAAA,EAAY,YAAE,iBAAA,EAAkB;AAAA;AAAA;AAAA,SAC/E,EACF;AAAA;AAAA;AAAA,GACF,EACF,CAAA;AAEJ","file":"index.js","sourcesContent":["'use client'\n\nimport type { CSSProperties, ReactElement } from 'react'\n\nfunction cn(...parts: (string | undefined | null | false)[]): string {\n return parts.filter(Boolean).join(' ')\n}\n\nexport type FooterLabels = {\n /** Text for the tollerud.no link (e.g. “A Tollerud Project”). */\n tollerudProject: string\n /**\n * Optional middle segment after the link, before the rights line.\n * Example for [dispatch.tollerud.dev](https://dispatch.tollerud.dev/): `\"for Advania Norge AS.\"`\n */\n attribution?: string\n allRightsReserved: string\n}\n\nconst defaultLabels: FooterLabels = {\n tollerudProject: 'A Tollerud Project',\n allRightsReserved: 'All rights reserved.',\n}\n\nexport type FooterProps = {\n labels?: Partial<FooterLabels>\n /** Layout behavior: responsive keeps mobile-first stacking, row forces horizontal layout. */\n layout?: 'responsive' | 'row'\n /** Merged onto `<footer>`. Use for layout, surface, e.g. `border-t border-white/10 bg-black/50 backdrop-blur-sm`. */\n className?: string\n /** Merged onto `<footer>` (wins over conflicting `backgroundColor` from classes when needed). */\n style?: CSSProperties\n /**\n * When true, skips default border/background/dark surface so `className` / `style` fully control the bar\n * (avoids fighting `bg-gray-50` / `dark:bg-gray-900`).\n */\n unstyled?: boolean\n classNameInner?: string\n classNameLogo?: string\n classNameText?: string\n classNameLink?: string\n}\n\nexport function Footer({\n labels,\n layout = 'responsive',\n className,\n style,\n unstyled = false,\n classNameInner,\n classNameLogo,\n classNameText,\n classNameLink,\n}: FooterProps): ReactElement {\n const t = { ...defaultLabels, ...labels }\n const attribution = t.attribution?.trim()\n\n const footerSurface = unstyled\n ? ''\n : 'border-t border-gray-200 bg-gray-50 dark:border-gray-800 dark:bg-gray-900'\n\n const innerLayoutClasses =\n layout === 'row'\n ? 'max-w-7xl mx-auto px-8 flex flex-row items-center justify-between gap-4'\n : 'max-w-7xl mx-auto px-8 flex flex-col md:flex-row items-center justify-center md:justify-between gap-4 md:gap-0'\n\n const textWrapperClasses =\n layout === 'row' ? 'flex-1 text-right ml-4' : 'flex-1 text-center md:text-right md:ml-4'\n\n const textLayoutClasses =\n layout === 'row'\n ? 'text-sm text-gray-600 dark:text-gray-400 inline-flex flex-row items-center justify-end text-right gap-0'\n : 'text-sm text-gray-600 dark:text-gray-400 flex flex-col md:flex-row md:inline gap-0'\n\n return (\n <footer className={cn('w-full pt-4 pb-4', footerSurface, className)} style={style}>\n <div\n className={cn(\n innerLayoutClasses,\n classNameInner,\n )}\n >\n <div className=\"flex-shrink-0 md:flex-shrink-0\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 130 143\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n className={cn('h-5 w-5 text-black dark:text-[#ffff00]', classNameLogo)}\n role=\"img\"\n >\n <title>Tollerud Logo</title>\n <g id=\"Page-1\" stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <g id=\"Tollerud Monogram\" transform=\"translate(-86.000000, -109.000000)\" fill=\"currentColor\">\n <g id=\"Group-2\" transform=\"translate(32.000000, 55.000000)\">\n <g id=\"Group\" transform=\"translate(54.000000, 54.000000)\">\n <path\n d=\"M82.4839273,140.272626 L95.1738252,140.272626 L95.1738252,143 L34.8114657,143 L34.8114657,140.272626 L47.5013636,140.272626 L47.5013636,28.2924381 C40.1277806,26.4177752 32.9252955,25.2241422 26.4088393,25.2241422 C12.1757856,25.2241422 4.11617359,34.5982703 4.11617359,39.8821508 C4.11617359,40.9049161 4.63028596,41.5867596 5.65932936,41.5867596 C7.20248513,41.5867596 7.37440169,40.3931266 8.06043062,38.8593855 C10.4615319,33.575505 15.6059302,31.5307881 20.4073141,31.5307881 C29.152955,31.5307881 35.1552988,38.5184637 35.1552988,47.2107482 C35.1552988,56.2447681 28.8107592,62.8907084 18.0070315,62.8907084 C7.5454996,62.891522 0,53.6882617 0,43.8023442 C0,30.8497582 11.3178401,21.986606 26.5799372,21.986606 C51.1026062,21.986606 84.1989996,39.2011209 104.948509,39.2011209 C118.495534,39.2011209 126.384048,31.7016558 126.384048,19.4300996 C126.384048,10.3968933 118.667451,4.60203698 115.580321,4.60203698 C114.552096,4.60203698 113.69415,5.1130128 113.69415,6.13577809 C113.69415,7.49946515 114.552096,7.6695192 115.409223,8.01044097 C115.752237,8.18049502 122.268693,10.5669474 122.268693,19.2592319 C122.268693,28.2924381 115.238125,34.0872945 107.177694,34.0872945 C97.7460244,34.0872945 91.0584702,26.4177752 91.0584702,17.8955448 C91.0584702,6.64675391 99.9760277,0 109.749893,0 C122.268693,0 129.642276,9.88510384 129.642276,19.6001536 C129.642276,34.2581622 119.181563,42.4386572 104.947691,42.4386572 C98.0890388,42.4386572 90.5443579,40.9049161 82.4839273,38.6901451 L82.4839273,140.272626 Z\"\n id=\"Monogram\"\n />\n </g>\n </g>\n </g>\n </g>\n </svg>\n </div>\n\n <div className={textWrapperClasses}>\n <p\n className={cn(\n textLayoutClasses,\n classNameText,\n )}\n >\n <span>\n <a\n href=\"https://tollerud.no\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n 'underline decoration-[#ffff00] decoration-[3px] underline-offset-[4px] hover:opacity-80 transition-opacity',\n classNameLink,\n )}\n style={{\n textDecorationThickness: '3px',\n textUnderlineOffset: '4px',\n }}\n >\n {t.tollerudProject}\n </a>\n {attribution ? (\n <>\n {' '}\n <span>{attribution}</span>\n </>\n ) : null}{' '}\n </span>\n <span className={layout === 'row' ? 'ml-1' : 'md:ml-1'}>{t.allRightsReserved}</span>\n </p>\n </div>\n </div>\n </footer>\n )\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esContent":["'use client'\n\nimport type { CSSProperties, ReactElement } from 'react'\n\nfunction cn(...parts: (string | undefined | null | false)[]): string {\n return parts.filter(Boolean).join(' ')\n}\n\nexport type FooterLabels = {\n /** Text for the tollerud.no link (e.g. “A Tollerud Project”). */\n tollerudProject: string\n /**\n * Optional middle segment after the link, before the rights line.\n * Example for [dispatch.tollerud.dev](https://dispatch.tollerud.dev/): `\"for Advania Norge AS.\"`\n */\n attribution?: string\n allRightsReserved: string\n}\n\nconst defaultLabels: FooterLabels = {\n tollerudProject: 'A Tollerud Project',\n allRightsReserved: 'All rights reserved.',\n}\n\nexport type FooterProps = {\n labels?: Partial<FooterLabels>\n /** Layout behavior: responsive keeps mobile-first stacking, row forces horizontal layout. */\n layout?: 'responsive' | 'row'\n /**\n * When true (default), enforces consistent footer branding across sites.\n * In enforced mode, visual override class props are ignored except top border and background controls below.\n */\n enforceBranding?: boolean\n /** Top border classes (used in enforced mode). */\n classNameBorder?: string\n /** Background/surface classes (used in enforced mode). */\n classNameBackground?: string\n /** Merged onto `<footer>`. */\n className?: string\n /** Merged onto `<footer>`. */\n style?: CSSProperties\n /**\n * When true, skips default border/background/dark surface so `className` / `style` fully control the bar\n * (avoids fighting `bg-gray-50` / `dark:bg-gray-900`).\n * Ignored when `enforceBranding` is true.\n */\n unstyled?: boolean\n classNameInner?: string\n classNameLogo?: string\n classNameText?: string\n classNameLink?: string\n}\n\nexport function Footer({\n labels,\n layout = 'responsive',\n enforceBranding = true,\n classNameBorder,\n classNameBackground,\n className,\n style,\n unstyled = false,\n classNameInner,\n classNameLogo,\n classNameText,\n classNameLink,\n}: FooterProps): ReactElement {\n const t = { ...defaultLabels, ...labels }\n const attribution = t.attribution?.trim()\n const brandingEnforced = enforceBranding\n\n const footerSurface = brandingEnforced\n ? cn(\n classNameBorder ?? 'border-t border-gray-200 dark:border-gray-800',\n classNameBackground ?? 'bg-gray-50 dark:bg-gray-900',\n )\n : unstyled\n ? ''\n : 'border-t border-gray-200 bg-gray-50 dark:border-gray-800 dark:bg-gray-900'\n\n const innerLayoutClasses =\n layout === 'row'\n ? 'max-w-7xl mx-auto px-8 flex flex-row items-center justify-between gap-4'\n : 'max-w-7xl mx-auto px-8 flex flex-col md:flex-row items-center justify-center md:justify-between gap-4 md:gap-0'\n\n const textWrapperClasses =\n layout === 'row' ? 'flex-1 text-right ml-4' : 'flex-1 text-center md:text-right md:ml-4'\n\n const textLayoutClasses =\n layout === 'row'\n ? 'text-sm text-gray-600 dark:text-gray-400 inline-flex flex-row items-center justify-end text-right gap-0'\n : 'text-sm text-gray-600 dark:text-gray-400 flex flex-col md:flex-row md:inline gap-0'\n\n return (\n <footer\n className={cn('w-full pt-4 pb-4', footerSurface, brandingEnforced ? undefined : className)}\n style={brandingEnforced ? undefined : style}\n >\n <div\n className={cn(\n innerLayoutClasses,\n brandingEnforced ? undefined : classNameInner,\n )}\n >\n <div className=\"flex-shrink-0 md:flex-shrink-0\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 130 143\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n className={cn(\n 'h-5 w-5 text-black dark:text-[#ffff00]',\n brandingEnforced ? undefined : classNameLogo,\n )}\n role=\"img\"\n >\n <title>Tollerud Logo</title>\n <g id=\"Page-1\" stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <g id=\"Tollerud Monogram\" transform=\"translate(-86.000000, -109.000000)\" fill=\"currentColor\">\n <g id=\"Group-2\" transform=\"translate(32.000000, 55.000000)\">\n <g id=\"Group\" transform=\"translate(54.000000, 54.000000)\">\n <path\n d=\"M82.4839273,140.272626 L95.1738252,140.272626 L95.1738252,143 L34.8114657,143 L34.8114657,140.272626 L47.5013636,140.272626 L47.5013636,28.2924381 C40.1277806,26.4177752 32.9252955,25.2241422 26.4088393,25.2241422 C12.1757856,25.2241422 4.11617359,34.5982703 4.11617359,39.8821508 C4.11617359,40.9049161 4.63028596,41.5867596 5.65932936,41.5867596 C7.20248513,41.5867596 7.37440169,40.3931266 8.06043062,38.8593855 C10.4615319,33.575505 15.6059302,31.5307881 20.4073141,31.5307881 C29.152955,31.5307881 35.1552988,38.5184637 35.1552988,47.2107482 C35.1552988,56.2447681 28.8107592,62.8907084 18.0070315,62.8907084 C7.5454996,62.891522 0,53.6882617 0,43.8023442 C0,30.8497582 11.3178401,21.986606 26.5799372,21.986606 C51.1026062,21.986606 84.1989996,39.2011209 104.948509,39.2011209 C118.495534,39.2011209 126.384048,31.7016558 126.384048,19.4300996 C126.384048,10.3968933 118.667451,4.60203698 115.580321,4.60203698 C114.552096,4.60203698 113.69415,5.1130128 113.69415,6.13577809 C113.69415,7.49946515 114.552096,7.6695192 115.409223,8.01044097 C115.752237,8.18049502 122.268693,10.5669474 122.268693,19.2592319 C122.268693,28.2924381 115.238125,34.0872945 107.177694,34.0872945 C97.7460244,34.0872945 91.0584702,26.4177752 91.0584702,17.8955448 C91.0584702,6.64675391 99.9760277,0 109.749893,0 C122.268693,0 129.642276,9.88510384 129.642276,19.6001536 C129.642276,34.2581622 119.181563,42.4386572 104.947691,42.4386572 C98.0890388,42.4386572 90.5443579,40.9049161 82.4839273,38.6901451 L82.4839273,140.272626 Z\"\n id=\"Monogram\"\n />\n </g>\n </g>\n </g>\n </g>\n </svg>\n </div>\n\n <div className={textWrapperClasses}>\n <p\n className={cn(\n textLayoutClasses,\n brandingEnforced ? undefined : classNameText,\n )}\n >\n <span>\n <a\n href=\"https://tollerud.no\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n 'underline decoration-[#ffff00] decoration-[3px] underline-offset-[4px] hover:opacity-80 transition-opacity',\n brandingEnforced ? undefined : classNameLink,\n )}\n style={{\n textDecorationThickness: '3px',\n textUnderlineOffset: '4px',\n }}\n >\n {t.tollerudProject}\n </a>\n {attribution ? (\n <>\n {' '}\n <span>{attribution}</span>\n </>\n ) : null}{' '}\n </span>\n <span className={layout === 'row' ? 'ml-1' : 'md:ml-1'}>{t.allRightsReserved}</span>\n </p>\n </div>\n </div>\n </footer>\n )\n}\n"]}
|