boreal-ui 0.0.880 → 0.0.882
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/dist/core/Footer-Cwi11hLk.cjs +441 -0
- package/dist/core/Footer-Cwi11hLk.cjs.map +1 -0
- package/dist/core/Footer-Dwh-2P5I.js +442 -0
- package/dist/core/Footer-Dwh-2P5I.js.map +1 -0
- package/dist/core/Footer.cjs.js +1 -1
- package/dist/core/Footer.css +240 -50
- package/dist/core/Footer.js +1 -1
- package/dist/core/index.cjs.js +113 -9
- package/dist/core/index.cjs.js.map +1 -1
- package/dist/core/index.js +113 -9
- package/dist/core/index.js.map +1 -1
- package/dist/next/Footer-Dzwh3OnQ.js +498 -0
- package/dist/next/Footer-Dzwh3OnQ.js.map +1 -0
- package/dist/next/Footer.css +282 -98
- package/dist/next/Footer.js +1 -1
- package/dist/next/index.js +113 -9
- package/dist/next/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/Footer/Footer.types.d.ts +53 -0
- package/dist/types/components/Footer/Footer.types.d.ts.map +1 -1
- package/dist/types/components/Footer/FooterBase.d.ts.map +1 -1
- package/dist/types/components/Footer/core/Footer.d.ts.map +1 -1
- package/dist/types/components/Footer/next/Footer.d.ts.map +1 -1
- package/dist/types/generated-docs/Button.props.d.ts.map +1 -1
- package/dist/types/generated-docs/Footer.props.d.ts.map +1 -1
- package/dist/types/generated-docs/Popover.props.d.ts.map +1 -1
- package/dist/types/generated-docs/Toolbar.props.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/core/Footer-BI7Bwc-6.js +0 -272
- package/dist/core/Footer-BI7Bwc-6.js.map +0 -1
- package/dist/core/Footer-CBtuZduq.cjs +0 -271
- package/dist/core/Footer-CBtuZduq.cjs.map +0 -1
- package/dist/next/Footer-Ct2O1TSA.js +0 -313
- package/dist/next/Footer-Ct2O1TSA.js.map +0 -1
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
require('./Footer.css');const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const classNames = require("./classNames-BcWMx052.cjs");
|
|
5
|
+
const borealStyleConfig = require("./boreal-style-config-C1UIwOFN.cjs");
|
|
6
|
+
const capitalize = require("./capitalize-DoV-nOmN.cjs");
|
|
7
|
+
const IconButton = require("./IconButton-CFSu6aoV.cjs");
|
|
8
|
+
const Select = require("./Select-BAv-TDRc.cjs");
|
|
9
|
+
const ThemeContext = require("./ThemeContext-AHk5GZwb.cjs");
|
|
10
|
+
const slugify = (value) => value.toLowerCase().trim().replace(/\s+/g, "-");
|
|
11
|
+
const FooterBase = ({
|
|
12
|
+
theme = borealStyleConfig.getDefaultTheme(),
|
|
13
|
+
attachment = "static",
|
|
14
|
+
shadow = "none",
|
|
15
|
+
rounding = "none",
|
|
16
|
+
layout = "inline",
|
|
17
|
+
className = "",
|
|
18
|
+
"data-testid": testId = "footer",
|
|
19
|
+
copyright,
|
|
20
|
+
copyrightInBottom,
|
|
21
|
+
links = [],
|
|
22
|
+
sections,
|
|
23
|
+
logo,
|
|
24
|
+
brandTitle,
|
|
25
|
+
brandDescription,
|
|
26
|
+
brandHref,
|
|
27
|
+
socialLinks = [],
|
|
28
|
+
showThemeSelect = false,
|
|
29
|
+
bottomEnd,
|
|
30
|
+
IconButton: IconButton2,
|
|
31
|
+
ImageComponent = "img",
|
|
32
|
+
ThemeSelect,
|
|
33
|
+
classMap,
|
|
34
|
+
LinkWrapper = ({ href, children, ...rest2 }) => /* @__PURE__ */ jsxRuntime.jsx("a", { href, ...rest2, children }),
|
|
35
|
+
"aria-label": ariaLabel,
|
|
36
|
+
"aria-labelledby": ariaLabelledBy,
|
|
37
|
+
"aria-describedby": ariaDescribedBy,
|
|
38
|
+
navAriaLabel = "Footer site links",
|
|
39
|
+
socialNavAriaLabel = "Social media",
|
|
40
|
+
themeSelectAriaLabel = "Theme selector",
|
|
41
|
+
logoAriaLabel = "Logo",
|
|
42
|
+
logoDecorative = false,
|
|
43
|
+
labelId,
|
|
44
|
+
...rest
|
|
45
|
+
}) => {
|
|
46
|
+
const footerClass = React.useMemo(
|
|
47
|
+
() => classNames.combineClassNames(
|
|
48
|
+
classMap.footer,
|
|
49
|
+
classMap[theme],
|
|
50
|
+
layout !== "inline" && classMap[`layout${capitalize.capitalize(layout)}`],
|
|
51
|
+
shadow !== "none" && classMap[`shadow${capitalize.capitalize(shadow)}`],
|
|
52
|
+
rounding !== "none" && classMap[`round${capitalize.capitalize(rounding)}`],
|
|
53
|
+
classMap[`attachment${capitalize.capitalize(attachment)}`],
|
|
54
|
+
className
|
|
55
|
+
),
|
|
56
|
+
[classMap, theme, layout, shadow, rounding, attachment, className]
|
|
57
|
+
);
|
|
58
|
+
const isLogoImage = (value) => typeof value === "object" && value !== null && "src" in value;
|
|
59
|
+
const isImgLike = typeof logo === "string" || isLogoImage(logo);
|
|
60
|
+
const imgLogo = isImgLike ? typeof logo === "string" ? { src: logo } : logo : void 0;
|
|
61
|
+
const logoSrc = imgLogo == null ? void 0 : imgLogo.src;
|
|
62
|
+
const logoW = (imgLogo == null ? void 0 : imgLogo.width) ?? 20;
|
|
63
|
+
const logoH = (imgLogo == null ? void 0 : imgLogo.height) ?? 20;
|
|
64
|
+
const normalizedSections = sections && sections.length > 0 ? sections : links.length > 0 ? [
|
|
65
|
+
{
|
|
66
|
+
title: "Links",
|
|
67
|
+
links,
|
|
68
|
+
"aria-label": navAriaLabel,
|
|
69
|
+
testId: "links"
|
|
70
|
+
}
|
|
71
|
+
] : [];
|
|
72
|
+
const shouldRenderCopyrightInBottom = copyrightInBottom ?? layout === "columns";
|
|
73
|
+
const renderLogo = () => {
|
|
74
|
+
if (isImgLike && logoSrc) {
|
|
75
|
+
if (typeof ImageComponent === "string") {
|
|
76
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
77
|
+
"img",
|
|
78
|
+
{
|
|
79
|
+
className: classMap.logo,
|
|
80
|
+
"data-testid": `${testId}-logo`,
|
|
81
|
+
loading: "lazy",
|
|
82
|
+
src: logoSrc,
|
|
83
|
+
alt: logoDecorative ? "" : logoAriaLabel,
|
|
84
|
+
"aria-hidden": logoDecorative ? true : void 0,
|
|
85
|
+
height: logoH,
|
|
86
|
+
width: logoW
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
91
|
+
ImageComponent,
|
|
92
|
+
{
|
|
93
|
+
className: classMap.logo,
|
|
94
|
+
"data-testid": `${testId}-logo`,
|
|
95
|
+
src: logoSrc,
|
|
96
|
+
alt: logoDecorative ? "" : logoAriaLabel,
|
|
97
|
+
"aria-hidden": logoDecorative ? true : void 0,
|
|
98
|
+
height: logoH,
|
|
99
|
+
width: logoW
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
if (!logo) {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
107
|
+
"span",
|
|
108
|
+
{
|
|
109
|
+
className: classMap.logo,
|
|
110
|
+
role: logoDecorative ? void 0 : "img",
|
|
111
|
+
"aria-label": logoDecorative ? void 0 : logoAriaLabel,
|
|
112
|
+
"aria-hidden": logoDecorative ? true : void 0,
|
|
113
|
+
"data-testid": `${testId}-logo`,
|
|
114
|
+
children: logo
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
};
|
|
118
|
+
const renderFooterLink = (link, index) => {
|
|
119
|
+
const slug = slugify(link.label || link.href || `link-${index}`);
|
|
120
|
+
const key = `${link.href ?? slug}-${index}`;
|
|
121
|
+
if (link.disabled) {
|
|
122
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
123
|
+
"span",
|
|
124
|
+
{
|
|
125
|
+
className: classMap.link,
|
|
126
|
+
"data-testid": `${testId}-link-${slug}`,
|
|
127
|
+
"aria-disabled": "true",
|
|
128
|
+
title: link.title,
|
|
129
|
+
children: link.label
|
|
130
|
+
}
|
|
131
|
+
) }, key);
|
|
132
|
+
}
|
|
133
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
134
|
+
LinkWrapper,
|
|
135
|
+
{
|
|
136
|
+
href: link.href,
|
|
137
|
+
className: classMap.link,
|
|
138
|
+
"data-testid": `${testId}-link-${slug}`,
|
|
139
|
+
"aria-label": link["aria-label"],
|
|
140
|
+
"aria-current": link["aria-current"],
|
|
141
|
+
title: link.title,
|
|
142
|
+
rel: link.rel,
|
|
143
|
+
target: link.target,
|
|
144
|
+
children: link.label
|
|
145
|
+
}
|
|
146
|
+
) }, key);
|
|
147
|
+
};
|
|
148
|
+
const renderSocialLinks = () => {
|
|
149
|
+
if (socialLinks.length === 0) {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
153
|
+
"nav",
|
|
154
|
+
{
|
|
155
|
+
className: classMap.social,
|
|
156
|
+
"aria-label": socialNavAriaLabel,
|
|
157
|
+
"data-testid": `${testId}-social`,
|
|
158
|
+
children: socialLinks.map((social, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
159
|
+
IconButton2,
|
|
160
|
+
{
|
|
161
|
+
icon: social.icon,
|
|
162
|
+
href: social.href,
|
|
163
|
+
isExternal: social.isExternal ?? true,
|
|
164
|
+
shadow: "none",
|
|
165
|
+
"aria-label": social["aria-label"] ?? social.title,
|
|
166
|
+
title: social.tooltip ?? social.title,
|
|
167
|
+
theme: "clear",
|
|
168
|
+
disabled: social.disabled,
|
|
169
|
+
rel: social.rel,
|
|
170
|
+
target: social.target,
|
|
171
|
+
"data-testid": `${testId}-social-${slugify(social.title)}`
|
|
172
|
+
},
|
|
173
|
+
`${social.href ?? social.title}-${index}`
|
|
174
|
+
))
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
};
|
|
178
|
+
const renderThemeSelect = () => {
|
|
179
|
+
if (!showThemeSelect) {
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
183
|
+
"div",
|
|
184
|
+
{
|
|
185
|
+
className: classMap.themeToggle,
|
|
186
|
+
"data-testid": `${testId}-theme-select`,
|
|
187
|
+
"aria-label": themeSelectAriaLabel,
|
|
188
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
189
|
+
ThemeSelect,
|
|
190
|
+
{
|
|
191
|
+
theme: "clear",
|
|
192
|
+
label: brandDescription,
|
|
193
|
+
shadow: "none",
|
|
194
|
+
"aria-label": themeSelectAriaLabel
|
|
195
|
+
}
|
|
196
|
+
)
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
};
|
|
200
|
+
const renderBrand = () => {
|
|
201
|
+
const brandContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
202
|
+
renderLogo(),
|
|
203
|
+
brandTitle && /* @__PURE__ */ jsxRuntime.jsx(
|
|
204
|
+
"span",
|
|
205
|
+
{
|
|
206
|
+
className: classMap.brandTitle,
|
|
207
|
+
"data-testid": `${testId}-brand-title`,
|
|
208
|
+
children: brandTitle
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
] });
|
|
212
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classMap.brand, "data-testid": `${testId}-brand`, children: [
|
|
213
|
+
brandHref ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
214
|
+
LinkWrapper,
|
|
215
|
+
{
|
|
216
|
+
href: brandHref,
|
|
217
|
+
className: classMap.brandLink,
|
|
218
|
+
"aria-label": typeof brandTitle === "string" ? brandTitle : logoAriaLabel,
|
|
219
|
+
children: brandContent
|
|
220
|
+
}
|
|
221
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: classMap.brandLink, children: brandContent }),
|
|
222
|
+
brandDescription && /* @__PURE__ */ jsxRuntime.jsx(
|
|
223
|
+
"p",
|
|
224
|
+
{
|
|
225
|
+
className: classMap.brandDescription,
|
|
226
|
+
"data-testid": `${testId}-brand-description`,
|
|
227
|
+
children: brandDescription
|
|
228
|
+
}
|
|
229
|
+
),
|
|
230
|
+
copyright && !shouldRenderCopyrightInBottom && /* @__PURE__ */ jsxRuntime.jsx(
|
|
231
|
+
"div",
|
|
232
|
+
{
|
|
233
|
+
className: classMap.copyright,
|
|
234
|
+
"data-testid": `${testId}-copyright`,
|
|
235
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("p", { id: labelId, children: copyright })
|
|
236
|
+
}
|
|
237
|
+
)
|
|
238
|
+
] });
|
|
239
|
+
};
|
|
240
|
+
const renderSections = () => {
|
|
241
|
+
if (normalizedSections.length === 0) {
|
|
242
|
+
return null;
|
|
243
|
+
}
|
|
244
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classMap.sections, "data-testid": `${testId}-sections`, children: normalizedSections.map((section, sectionIndex) => {
|
|
245
|
+
const titleText = typeof section.title === "string" ? section.title : `section-${sectionIndex + 1}`;
|
|
246
|
+
const sectionSlug = section.testId ?? slugify(titleText);
|
|
247
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
248
|
+
"nav",
|
|
249
|
+
{
|
|
250
|
+
className: classMap.section,
|
|
251
|
+
"aria-label": section["aria-label"] ?? `${titleText} links`,
|
|
252
|
+
"data-testid": `${testId}-section-${sectionSlug}`,
|
|
253
|
+
children: [
|
|
254
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: classMap.sectionTitle, children: section.title }),
|
|
255
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: classMap.sectionList, children: section.links.map(renderFooterLink) })
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
sectionSlug
|
|
259
|
+
);
|
|
260
|
+
}) });
|
|
261
|
+
};
|
|
262
|
+
if (layout === "columns") {
|
|
263
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
264
|
+
"footer",
|
|
265
|
+
{
|
|
266
|
+
className: footerClass,
|
|
267
|
+
"data-testid": testId,
|
|
268
|
+
role: "contentinfo",
|
|
269
|
+
"aria-label": ariaLabel,
|
|
270
|
+
"aria-labelledby": ariaLabelledBy ?? labelId,
|
|
271
|
+
"aria-describedby": ariaDescribedBy,
|
|
272
|
+
...rest,
|
|
273
|
+
children: [
|
|
274
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: classMap.content, children: [
|
|
275
|
+
renderBrand(),
|
|
276
|
+
renderSections(),
|
|
277
|
+
(socialLinks.length > 0 || showThemeSelect) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classMap.actions, "data-testid": `${testId}-actions`, children: [
|
|
278
|
+
socialLinks.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classMap.actionGroup, children: [
|
|
279
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: classMap.sectionTitle, children: "Connect" }),
|
|
280
|
+
renderSocialLinks()
|
|
281
|
+
] }),
|
|
282
|
+
renderThemeSelect()
|
|
283
|
+
] })
|
|
284
|
+
] }),
|
|
285
|
+
(copyright || bottomEnd) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classMap.bottom, "data-testid": `${testId}-bottom`, children: [
|
|
286
|
+
copyright && shouldRenderCopyrightInBottom && /* @__PURE__ */ jsxRuntime.jsx(
|
|
287
|
+
"p",
|
|
288
|
+
{
|
|
289
|
+
id: labelId,
|
|
290
|
+
className: classMap.bottomCopyright,
|
|
291
|
+
"data-testid": `${testId}-copyright`,
|
|
292
|
+
children: copyright
|
|
293
|
+
}
|
|
294
|
+
),
|
|
295
|
+
bottomEnd && /* @__PURE__ */ jsxRuntime.jsx(
|
|
296
|
+
"div",
|
|
297
|
+
{
|
|
298
|
+
className: classMap.bottomEnd,
|
|
299
|
+
"data-testid": `${testId}-bottom-end`,
|
|
300
|
+
children: bottomEnd
|
|
301
|
+
}
|
|
302
|
+
)
|
|
303
|
+
] })
|
|
304
|
+
]
|
|
305
|
+
}
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
309
|
+
"footer",
|
|
310
|
+
{
|
|
311
|
+
className: footerClass,
|
|
312
|
+
"data-testid": testId,
|
|
313
|
+
role: "contentinfo",
|
|
314
|
+
"aria-label": ariaLabel,
|
|
315
|
+
"aria-labelledby": ariaLabelledBy ?? labelId,
|
|
316
|
+
"aria-describedby": ariaDescribedBy,
|
|
317
|
+
...rest,
|
|
318
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classMap.content, children: [
|
|
319
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: classMap.left, "data-testid": `${testId}-left`, children: [
|
|
320
|
+
renderLogo(),
|
|
321
|
+
copyright && /* @__PURE__ */ jsxRuntime.jsx(
|
|
322
|
+
"div",
|
|
323
|
+
{
|
|
324
|
+
className: classMap.copyright ?? classMap.left,
|
|
325
|
+
"data-testid": `${testId}-copyright`,
|
|
326
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("p", { id: labelId, children: copyright })
|
|
327
|
+
}
|
|
328
|
+
)
|
|
329
|
+
] }),
|
|
330
|
+
links.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
331
|
+
"nav",
|
|
332
|
+
{
|
|
333
|
+
className: classMap.links,
|
|
334
|
+
"aria-label": navAriaLabel,
|
|
335
|
+
"data-testid": `${testId}-nav`,
|
|
336
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("ul", { children: links.map(renderFooterLink) })
|
|
337
|
+
}
|
|
338
|
+
),
|
|
339
|
+
renderThemeSelect(),
|
|
340
|
+
renderSocialLinks()
|
|
341
|
+
] })
|
|
342
|
+
}
|
|
343
|
+
);
|
|
344
|
+
};
|
|
345
|
+
FooterBase.displayName = "FooterBase";
|
|
346
|
+
const UserThemeSettings = React.forwardRef(
|
|
347
|
+
({
|
|
348
|
+
theme = borealStyleConfig.getDefaultTheme(),
|
|
349
|
+
shadow = borealStyleConfig.getDefaultShadow(),
|
|
350
|
+
rounding = borealStyleConfig.getDefaultRounding(),
|
|
351
|
+
"data-testid": testId = "theme-select",
|
|
352
|
+
state = ""
|
|
353
|
+
}, ref) => {
|
|
354
|
+
const ctx = React.useContext(ThemeContext.ThemeContext);
|
|
355
|
+
if (!ctx)
|
|
356
|
+
throw new Error("ThemeContext is undefined. Wrap with ThemeProvider.");
|
|
357
|
+
const { selectedScheme, setSelectedScheme, schemes } = ctx;
|
|
358
|
+
const options = React.useMemo(
|
|
359
|
+
() => schemes.map((scheme, index) => ({
|
|
360
|
+
value: String(index),
|
|
361
|
+
label: scheme.name
|
|
362
|
+
})),
|
|
363
|
+
[schemes]
|
|
364
|
+
);
|
|
365
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "control-container", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
366
|
+
Select.Select,
|
|
367
|
+
{
|
|
368
|
+
ref,
|
|
369
|
+
theme,
|
|
370
|
+
state,
|
|
371
|
+
shadow,
|
|
372
|
+
rounding,
|
|
373
|
+
options,
|
|
374
|
+
"data-testid": testId,
|
|
375
|
+
value: String(selectedScheme),
|
|
376
|
+
"aria-label": "Select Theme",
|
|
377
|
+
onChange: (value) => setSelectedScheme(parseInt(String(value), 10))
|
|
378
|
+
}
|
|
379
|
+
) });
|
|
380
|
+
}
|
|
381
|
+
);
|
|
382
|
+
UserThemeSettings.displayName = "UserThemeSettings";
|
|
383
|
+
const classes = {
|
|
384
|
+
footer: "footer",
|
|
385
|
+
primary: "footer_primary",
|
|
386
|
+
secondary: "footer_secondary",
|
|
387
|
+
tertiary: "footer_tertiary",
|
|
388
|
+
quaternary: "footer_quaternary",
|
|
389
|
+
clear: "footer_clear",
|
|
390
|
+
layoutColumns: "footer_layout-columns",
|
|
391
|
+
shadowNone: "footer_shadow-None",
|
|
392
|
+
shadowLight: "footer_shadow-Light",
|
|
393
|
+
shadowMedium: "footer_shadow-Medium",
|
|
394
|
+
shadowStrong: "footer_shadow-Strong",
|
|
395
|
+
shadowIntense: "footer_shadow-Intense",
|
|
396
|
+
roundNone: "footer_round-None",
|
|
397
|
+
roundSmall: "footer_round-Small",
|
|
398
|
+
roundMedium: "footer_round-Medium",
|
|
399
|
+
roundLarge: "footer_round-Large",
|
|
400
|
+
attachmentStatic: "footer_attachment-static",
|
|
401
|
+
attachmentFixed: "footer_attachment-fixed",
|
|
402
|
+
attachmentSticky: "footer_attachment-sticky",
|
|
403
|
+
content: "footer_content",
|
|
404
|
+
// Existing inline layout
|
|
405
|
+
logo: "footer_logo",
|
|
406
|
+
left: "footer_left",
|
|
407
|
+
links: "footer_links",
|
|
408
|
+
link: "footer_link",
|
|
409
|
+
social: "footer_social",
|
|
410
|
+
themeToggle: "footer_theme-toggle",
|
|
411
|
+
copyright: "footer_copyright",
|
|
412
|
+
// New column layout
|
|
413
|
+
brand: "footer_brand",
|
|
414
|
+
brandLink: "footer_brand-link",
|
|
415
|
+
brandTitle: "footer_brand-title",
|
|
416
|
+
brandDescription: "footer_brand-description",
|
|
417
|
+
sections: "footer_sections",
|
|
418
|
+
section: "footer_section",
|
|
419
|
+
sectionTitle: "footer_section-title",
|
|
420
|
+
sectionList: "footer_section-list",
|
|
421
|
+
actions: "footer_actions",
|
|
422
|
+
actionGroup: "footer_action-group",
|
|
423
|
+
bottom: "footer_bottom",
|
|
424
|
+
bottomCopyright: "footer_bottom-copyright",
|
|
425
|
+
bottomEnd: "footer_bottom-end"
|
|
426
|
+
};
|
|
427
|
+
const Footer = (props) => {
|
|
428
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
429
|
+
FooterBase,
|
|
430
|
+
{
|
|
431
|
+
...props,
|
|
432
|
+
IconButton: IconButton.IconButton,
|
|
433
|
+
ThemeSelect: UserThemeSettings,
|
|
434
|
+
classMap: classes
|
|
435
|
+
}
|
|
436
|
+
);
|
|
437
|
+
};
|
|
438
|
+
Footer.displayName = "Footer";
|
|
439
|
+
exports.Footer = Footer;
|
|
440
|
+
exports.UserThemeSettings = UserThemeSettings;
|
|
441
|
+
//# sourceMappingURL=Footer-Cwi11hLk.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Footer-Cwi11hLk.cjs","sources":["../../src/components/Footer/FooterBase.tsx","../../src/components/Select/ThemeSelect/core/ThemeSelect.tsx","../../src/components/Footer/core/Footer.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\r\nimport {\r\n BaseFooterProps,\r\n FooterLink,\r\n FooterSection,\r\n LogoSource,\r\n} from \"./Footer.types\";\r\nimport { combineClassNames } from \"../../utils/classNames\";\r\nimport { getDefaultTheme } from \"../../config/boreal-style-config\";\r\nimport { capitalize } from \"@/utils/capitalize\";\r\n\r\nconst slugify = (value: string) =>\r\n value.toLowerCase().trim().replace(/\\s+/g, \"-\");\r\n\r\nconst FooterBase: React.FC<BaseFooterProps> = ({\r\n theme = getDefaultTheme(),\r\n attachment = \"static\",\r\n shadow = \"none\",\r\n rounding = \"none\",\r\n layout = \"inline\",\r\n className = \"\",\r\n \"data-testid\": testId = \"footer\",\r\n\r\n copyright,\r\n copyrightInBottom,\r\n links = [],\r\n sections,\r\n logo,\r\n brandTitle,\r\n brandDescription,\r\n brandHref,\r\n\r\n socialLinks = [],\r\n showThemeSelect = false,\r\n bottomEnd,\r\n\r\n IconButton,\r\n ImageComponent = \"img\",\r\n ThemeSelect,\r\n classMap,\r\n LinkWrapper = ({ href, children, ...rest }) => (\r\n <a href={href} {...rest}>\r\n {children}\r\n </a>\r\n ),\r\n\r\n \"aria-label\": ariaLabel,\r\n \"aria-labelledby\": ariaLabelledBy,\r\n \"aria-describedby\": ariaDescribedBy,\r\n navAriaLabel = \"Footer site links\",\r\n socialNavAriaLabel = \"Social media\",\r\n themeSelectAriaLabel = \"Theme selector\",\r\n logoAriaLabel = \"Logo\",\r\n logoDecorative = false,\r\n labelId,\r\n ...rest\r\n}) => {\r\n const footerClass = useMemo(\r\n () =>\r\n combineClassNames(\r\n classMap.footer,\r\n classMap[theme],\r\n layout !== \"inline\" && classMap[`layout${capitalize(layout)}`],\r\n shadow !== \"none\" && classMap[`shadow${capitalize(shadow)}`],\r\n rounding !== \"none\" && classMap[`round${capitalize(rounding)}`],\r\n classMap[`attachment${capitalize(attachment)}`],\r\n className,\r\n ),\r\n [classMap, theme, layout, shadow, rounding, attachment, className],\r\n );\r\n\r\n const isLogoImage = (\r\n value: unknown,\r\n ): value is { src: string; width?: number; height?: number } =>\r\n typeof value === \"object\" &&\r\n value !== null &&\r\n \"src\" in (value as Record<string, unknown>);\r\n\r\n const isImgLike = typeof logo === \"string\" || isLogoImage(logo);\r\n\r\n const imgLogo = isImgLike\r\n ? typeof logo === \"string\"\r\n ? { src: logo }\r\n : logo\r\n : undefined;\r\n\r\n const logoSrc = imgLogo?.src;\r\n const logoW = imgLogo?.width ?? 20;\r\n const logoH = imgLogo?.height ?? 20;\r\n\r\n const normalizedSections: FooterSection[] =\r\n sections && sections.length > 0\r\n ? sections\r\n : links.length > 0\r\n ? [\r\n {\r\n title: \"Links\",\r\n links,\r\n \"aria-label\": navAriaLabel,\r\n testId: \"links\",\r\n },\r\n ]\r\n : [];\r\n\r\n const shouldRenderCopyrightInBottom =\r\n copyrightInBottom ?? layout === \"columns\";\r\n\r\n const renderLogo = () => {\r\n if (isImgLike && logoSrc) {\r\n if (typeof ImageComponent === \"string\") {\r\n return (\r\n <img\r\n className={classMap.logo}\r\n data-testid={`${testId}-logo`}\r\n loading=\"lazy\"\r\n src={logoSrc}\r\n alt={logoDecorative ? \"\" : logoAriaLabel}\r\n aria-hidden={logoDecorative ? true : undefined}\r\n height={logoH}\r\n width={logoW}\r\n />\r\n );\r\n }\r\n\r\n return (\r\n <ImageComponent\r\n className={classMap.logo}\r\n data-testid={`${testId}-logo`}\r\n src={logoSrc}\r\n alt={logoDecorative ? \"\" : logoAriaLabel}\r\n aria-hidden={logoDecorative ? true : undefined}\r\n height={logoH}\r\n width={logoW}\r\n />\r\n );\r\n }\r\n\r\n if (!logo) {\r\n return null;\r\n }\r\n\r\n return (\r\n <span\r\n className={classMap.logo}\r\n role={logoDecorative ? undefined : \"img\"}\r\n aria-label={logoDecorative ? undefined : logoAriaLabel}\r\n aria-hidden={logoDecorative ? true : undefined}\r\n data-testid={`${testId}-logo`}\r\n >\r\n {\r\n logo as Exclude<\r\n LogoSource,\r\n string | { src: string; width?: number; height?: number }\r\n >\r\n }\r\n </span>\r\n );\r\n };\r\n\r\n const renderFooterLink = (link: FooterLink, index: number) => {\r\n const slug = slugify(link.label || link.href || `link-${index}`);\r\n const key = `${link.href ?? slug}-${index}`;\r\n\r\n if (link.disabled) {\r\n return (\r\n <li key={key}>\r\n <span\r\n className={classMap.link}\r\n data-testid={`${testId}-link-${slug}`}\r\n aria-disabled=\"true\"\r\n title={link.title}\r\n >\r\n {link.label}\r\n </span>\r\n </li>\r\n );\r\n }\r\n\r\n return (\r\n <li key={key}>\r\n <LinkWrapper\r\n href={link.href}\r\n className={classMap.link}\r\n data-testid={`${testId}-link-${slug}`}\r\n aria-label={link[\"aria-label\"]}\r\n aria-current={link[\"aria-current\"]}\r\n title={link.title}\r\n rel={link.rel}\r\n target={link.target}\r\n >\r\n {link.label}\r\n </LinkWrapper>\r\n </li>\r\n );\r\n };\r\n\r\n const renderSocialLinks = () => {\r\n if (socialLinks.length === 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n <nav\r\n className={classMap.social}\r\n aria-label={socialNavAriaLabel}\r\n data-testid={`${testId}-social`}\r\n >\r\n {socialLinks.map((social, index) => (\r\n <IconButton\r\n key={`${social.href ?? social.title}-${index}`}\r\n icon={social.icon}\r\n href={social.href}\r\n isExternal={social.isExternal ?? true}\r\n shadow=\"none\"\r\n aria-label={social[\"aria-label\"] ?? social.title}\r\n title={social.tooltip ?? social.title}\r\n theme=\"clear\"\r\n disabled={social.disabled}\r\n rel={social.rel}\r\n target={social.target}\r\n data-testid={`${testId}-social-${slugify(social.title)}`}\r\n />\r\n ))}\r\n </nav>\r\n );\r\n };\r\n\r\n const renderThemeSelect = () => {\r\n if (!showThemeSelect) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div\r\n className={classMap.themeToggle}\r\n data-testid={`${testId}-theme-select`}\r\n aria-label={themeSelectAriaLabel}\r\n >\r\n <ThemeSelect\r\n theme=\"clear\"\r\n label={brandDescription}\r\n shadow=\"none\"\r\n aria-label={themeSelectAriaLabel}\r\n />\r\n </div>\r\n );\r\n };\r\n\r\n const renderBrand = () => {\r\n const brandContent = (\r\n <>\r\n {renderLogo()}\r\n\r\n {brandTitle && (\r\n <span\r\n className={classMap.brandTitle}\r\n data-testid={`${testId}-brand-title`}\r\n >\r\n {brandTitle}\r\n </span>\r\n )}\r\n </>\r\n );\r\n\r\n return (\r\n <div className={classMap.brand} data-testid={`${testId}-brand`}>\r\n {brandHref ? (\r\n <LinkWrapper\r\n href={brandHref}\r\n className={classMap.brandLink}\r\n aria-label={\r\n typeof brandTitle === \"string\" ? brandTitle : logoAriaLabel\r\n }\r\n >\r\n {brandContent}\r\n </LinkWrapper>\r\n ) : (\r\n <div className={classMap.brandLink}>{brandContent}</div>\r\n )}\r\n\r\n {brandDescription && (\r\n <p\r\n className={classMap.brandDescription}\r\n data-testid={`${testId}-brand-description`}\r\n >\r\n {brandDescription}\r\n </p>\r\n )}\r\n\r\n {copyright && !shouldRenderCopyrightInBottom && (\r\n <div\r\n className={classMap.copyright}\r\n data-testid={`${testId}-copyright`}\r\n >\r\n <p id={labelId}>{copyright}</p>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n };\r\n\r\n const renderSections = () => {\r\n if (normalizedSections.length === 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div className={classMap.sections} data-testid={`${testId}-sections`}>\r\n {normalizedSections.map((section, sectionIndex) => {\r\n const titleText =\r\n typeof section.title === \"string\"\r\n ? section.title\r\n : `section-${sectionIndex + 1}`;\r\n\r\n const sectionSlug = section.testId ?? slugify(titleText);\r\n\r\n return (\r\n <nav\r\n key={sectionSlug}\r\n className={classMap.section}\r\n aria-label={section[\"aria-label\"] ?? `${titleText} links`}\r\n data-testid={`${testId}-section-${sectionSlug}`}\r\n >\r\n <h2 className={classMap.sectionTitle}>{section.title}</h2>\r\n\r\n <ul className={classMap.sectionList}>\r\n {section.links.map(renderFooterLink)}\r\n </ul>\r\n </nav>\r\n );\r\n })}\r\n </div>\r\n );\r\n };\r\n\r\n if (layout === \"columns\") {\r\n return (\r\n <footer\r\n className={footerClass}\r\n data-testid={testId}\r\n role=\"contentinfo\"\r\n aria-label={ariaLabel}\r\n aria-labelledby={ariaLabelledBy ?? labelId}\r\n aria-describedby={ariaDescribedBy}\r\n {...rest}\r\n >\r\n <div className={classMap.content}>\r\n {renderBrand()}\r\n\r\n {renderSections()}\r\n\r\n {(socialLinks.length > 0 || showThemeSelect) && (\r\n <div className={classMap.actions} data-testid={`${testId}-actions`}>\r\n {socialLinks.length > 0 && (\r\n <div className={classMap.actionGroup}>\r\n <h2 className={classMap.sectionTitle}>Connect</h2>\r\n {renderSocialLinks()}\r\n </div>\r\n )}\r\n\r\n {renderThemeSelect()}\r\n </div>\r\n )}\r\n </div>\r\n\r\n {(copyright || bottomEnd) && (\r\n <div className={classMap.bottom} data-testid={`${testId}-bottom`}>\r\n {copyright && shouldRenderCopyrightInBottom && (\r\n <p\r\n id={labelId}\r\n className={classMap.bottomCopyright}\r\n data-testid={`${testId}-copyright`}\r\n >\r\n {copyright}\r\n </p>\r\n )}\r\n\r\n {bottomEnd && (\r\n <div\r\n className={classMap.bottomEnd}\r\n data-testid={`${testId}-bottom-end`}\r\n >\r\n {bottomEnd}\r\n </div>\r\n )}\r\n </div>\r\n )}\r\n </footer>\r\n );\r\n }\r\n\r\n return (\r\n <footer\r\n className={footerClass}\r\n data-testid={testId}\r\n role=\"contentinfo\"\r\n aria-label={ariaLabel}\r\n aria-labelledby={ariaLabelledBy ?? labelId}\r\n aria-describedby={ariaDescribedBy}\r\n {...rest}\r\n >\r\n <div className={classMap.content}>\r\n <div className={classMap.left} data-testid={`${testId}-left`}>\r\n {renderLogo()}\r\n\r\n {copyright && (\r\n <div\r\n className={classMap.copyright ?? classMap.left}\r\n data-testid={`${testId}-copyright`}\r\n >\r\n <p id={labelId}>{copyright}</p>\r\n </div>\r\n )}\r\n </div>\r\n\r\n {links.length > 0 && (\r\n <nav\r\n className={classMap.links}\r\n aria-label={navAriaLabel}\r\n data-testid={`${testId}-nav`}\r\n >\r\n <ul>{links.map(renderFooterLink)}</ul>\r\n </nav>\r\n )}\r\n\r\n {renderThemeSelect()}\r\n {renderSocialLinks()}\r\n </div>\r\n </footer>\r\n );\r\n};\r\n\r\nFooterBase.displayName = \"FooterBase\";\r\nexport default FooterBase;\r\n","import { useContext, useMemo, forwardRef } from \"react\";\r\nimport Select from \"../../core/Select\";\r\nimport { ThemeContext } from \"../../../../context/ThemeContext\";\r\nimport {\r\n getDefaultRounding,\r\n getDefaultShadow,\r\n getDefaultTheme,\r\n} from \"@/config/boreal-style-config\";\r\nimport { ThemeSelectProps } from \"../../Select.types\";\r\n\r\nconst UserThemeSettings = forwardRef<HTMLSelectElement, ThemeSelectProps>(\r\n (\r\n {\r\n theme = getDefaultTheme(),\r\n shadow = getDefaultShadow(),\r\n rounding = getDefaultRounding(),\r\n \"data-testid\": testId = \"theme-select\",\r\n state = \"\",\r\n },\r\n ref,\r\n ) => {\r\n const ctx = useContext(ThemeContext);\r\n if (!ctx)\r\n throw new Error(\"ThemeContext is undefined. Wrap with ThemeProvider.\");\r\n\r\n const { selectedScheme, setSelectedScheme, schemes } = ctx;\r\n\r\n const options = useMemo(\r\n () =>\r\n schemes.map((scheme, index) => ({\r\n value: String(index),\r\n label: scheme.name,\r\n })),\r\n [schemes],\r\n );\r\n\r\n return (\r\n <div className=\"control-container\">\r\n <Select\r\n ref={ref}\r\n theme={theme}\r\n state={state}\r\n shadow={shadow}\r\n rounding={rounding}\r\n options={options}\r\n data-testid={testId}\r\n value={String(selectedScheme)}\r\n aria-label=\"Select Theme\"\r\n onChange={(value: string | number) =>\r\n setSelectedScheme(parseInt(String(value), 10))\r\n }\r\n />\r\n </div>\r\n );\r\n },\r\n);\r\nUserThemeSettings.displayName = \"UserThemeSettings\";\r\nexport default UserThemeSettings;\r\n","import React from \"react\";\r\nimport FooterBase from \"../FooterBase\";\r\nimport { FooterProps } from \"../Footer.types\";\r\nimport IconButton from \"../../IconButton/core/IconButton\";\r\nimport ThemeSelect from \"../../Select/ThemeSelect/core/ThemeSelect\";\r\nimport \"./Footer.scss\";\r\n\r\nconst classes = {\r\n footer: \"footer\",\r\n\r\n primary: \"footer_primary\",\r\n secondary: \"footer_secondary\",\r\n tertiary: \"footer_tertiary\",\r\n quaternary: \"footer_quaternary\",\r\n clear: \"footer_clear\",\r\n\r\n layoutColumns: \"footer_layout-columns\",\r\n\r\n shadowNone: \"footer_shadow-None\",\r\n shadowLight: \"footer_shadow-Light\",\r\n shadowMedium: \"footer_shadow-Medium\",\r\n shadowStrong: \"footer_shadow-Strong\",\r\n shadowIntense: \"footer_shadow-Intense\",\r\n\r\n roundNone: \"footer_round-None\",\r\n roundSmall: \"footer_round-Small\",\r\n roundMedium: \"footer_round-Medium\",\r\n roundLarge: \"footer_round-Large\",\r\n\r\n attachmentStatic: \"footer_attachment-static\",\r\n attachmentFixed: \"footer_attachment-fixed\",\r\n attachmentSticky: \"footer_attachment-sticky\",\r\n\r\n content: \"footer_content\",\r\n\r\n // Existing inline layout\r\n logo: \"footer_logo\",\r\n left: \"footer_left\",\r\n links: \"footer_links\",\r\n link: \"footer_link\",\r\n social: \"footer_social\",\r\n themeToggle: \"footer_theme-toggle\",\r\n copyright: \"footer_copyright\",\r\n\r\n // New column layout\r\n brand: \"footer_brand\",\r\n brandLink: \"footer_brand-link\",\r\n brandTitle: \"footer_brand-title\",\r\n brandDescription: \"footer_brand-description\",\r\n\r\n sections: \"footer_sections\",\r\n section: \"footer_section\",\r\n sectionTitle: \"footer_section-title\",\r\n sectionList: \"footer_section-list\",\r\n\r\n actions: \"footer_actions\",\r\n actionGroup: \"footer_action-group\",\r\n\r\n bottom: \"footer_bottom\",\r\n bottomCopyright: \"footer_bottom-copyright\",\r\n bottomEnd: \"footer_bottom-end\",\r\n};\r\n\r\nconst Footer: React.FC<FooterProps> = (props) => {\r\n return (\r\n <FooterBase\r\n {...props}\r\n IconButton={IconButton}\r\n ThemeSelect={ThemeSelect}\r\n classMap={classes}\r\n />\r\n );\r\n};\r\n\r\nFooter.displayName = \"Footer\";\r\n\r\nexport default Footer;\r\n"],"names":["getDefaultTheme","IconButton","rest","jsx","useMemo","combineClassNames","capitalize","jsxs","Fragment","forwardRef","getDefaultShadow","getDefaultRounding","useContext","ThemeContext","Select","ThemeSelect"],"mappings":";;;;;;;;;AAWA,MAAM,UAAU,CAAC,UACf,MAAM,YAAA,EAAc,OAAO,QAAQ,QAAQ,GAAG;AAEhD,MAAM,aAAwC,CAAC;AAAA,EAC7C,QAAQA,kBAAAA,gBAAA;AAAA,EACR,aAAa;AAAA,EACb,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,eAAe,SAAS;AAAA,EAExB;AAAA,EACA;AAAA,EACA,QAAQ,CAAA;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,cAAc,CAAA;AAAA,EACd,kBAAkB;AAAA,EAClB;AAAA,EAEA,YAAAC;AAAA,EACA,iBAAiB;AAAA,EACjB;AAAA,EACA;AAAA,EACA,cAAc,CAAC,EAAE,MAAM,UAAU,GAAGC,MAAAA,MAClCC,+BAAC,KAAA,EAAE,MAAa,GAAGD,OAChB,SAAA,CACH;AAAA,EAGF,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,uBAAuB;AAAA,EACvB,gBAAgB;AAAA,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