weg-shared-layout 0.0.35 → 0.0.37
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/cjs/loader.cjs.js +1 -1
- package/dist/cjs/weg-footer_2.cjs.entry.js +51 -23
- package/dist/cjs/weg-shared-layout.cjs.js +1 -1
- package/dist/collection/components/weg-header/weg-header.js +66 -23
- package/dist/collection/utils/layout.js +4 -0
- package/dist/components/p-AX3tramx.js +1 -0
- package/dist/components/weg-footer.js +1 -1
- package/dist/components/weg-header.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/weg-footer_2.entry.js +51 -23
- package/dist/esm/weg-shared-layout.js +1 -1
- package/dist/types/components/weg-header/weg-header.d.ts +6 -0
- package/dist/types/components.d.ts +9 -0
- package/dist/types/types/layout-data.d.ts +1 -0
- package/dist/weg-shared-layout/p-1b5c3108.entry.js +1 -0
- package/dist/weg-shared-layout/weg-shared-layout.esm.js +1 -1
- package/package.json +1 -1
- package/dist/components/p-BnMIy-A5.js +0 -1
- package/dist/weg-shared-layout/p-910c4f50.entry.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
|
6
6
|
const defineCustomElements = async (win, options) => {
|
|
7
7
|
if (typeof window === 'undefined') return undefined;
|
|
8
8
|
await appGlobals.globalScripts();
|
|
9
|
-
return index.bootstrapLazy([["weg-footer_2.cjs",[[513,"weg-footer",{"layout":[1],"resolved":[32]},null,{"layout":[{"watchLayout":0}]}],[513,"weg-header",{"layout":[1],"signedIn":[516,"signed-in"],"userName":[1,"user-name"],"resolved":[32],"menuOpen":[32],"openDropdown":[32]},[[8,"keydown","handleKeyDown"]],{"layout":[{"watchLayout":0}]}]]]], options);
|
|
9
|
+
return index.bootstrapLazy([["weg-footer_2.cjs",[[513,"weg-footer",{"layout":[1],"resolved":[32]},null,{"layout":[{"watchLayout":0}]}],[513,"weg-header",{"layout":[1],"signedIn":[516,"signed-in"],"userName":[1,"user-name"],"accountBaseUrl":[1,"account-base-url"],"resolved":[32],"menuOpen":[32],"openDropdown":[32]},[[8,"keydown","handleKeyDown"]],{"layout":[{"watchLayout":0}]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -52,6 +52,10 @@ function normalizeLayoutLink(input, options) {
|
|
|
52
52
|
const target = readLinkTarget(raw);
|
|
53
53
|
if (target)
|
|
54
54
|
link.target = target;
|
|
55
|
+
const authAction = raw.authAction;
|
|
56
|
+
if (authAction === 'sign-in' || authAction === 'sign-out') {
|
|
57
|
+
link.authAction = authAction;
|
|
58
|
+
}
|
|
55
59
|
return link;
|
|
56
60
|
}
|
|
57
61
|
return options?.requireHref === false ? null : null;
|
|
@@ -245,44 +249,58 @@ const sharedCss = () => `:host{--weg-breakpoint-sm:640px;--weg-breakpoint-md:960
|
|
|
245
249
|
const wegHeaderCss = () => `:host{--weg-breakpoint-sm:640px;--weg-breakpoint-md:960px;--weg-breakpoint-lg:1280px;--weg-breakpoint-xl:1440px}.header{width:100%;border-bottom:2px solid var(--weg-color-accent);background:#ffffff;color:#0f172a;font-family:var(--weg-font-family)}@media (width >= 960px){.header{border-bottom-width:0.25rem}}:host{position:relative;z-index:20}.header--menu-open{position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;overflow:hidden}.header--menu-open .header-inner{flex:1 1 auto;flex-wrap:wrap;align-content:flex-start;min-height:0}.header--menu-open .main-nav-panel{display:block;flex:1 1 100%;width:100%;min-height:0;overflow-y:auto;border-top:1px solid #d8d4f7}@media (width >= 960px){.header--menu-open{position:static;inset:auto;z-index:auto;display:block;overflow:visible}.header--menu-open .header-inner{flex:unset;flex-wrap:nowrap;align-content:unset;min-height:unset}}.logo-link{display:inline-flex;align-items:center;text-decoration:none;outline:none}.logo-link:focus-visible{outline:2px solid var(--weg-color-accent);outline-offset:4px;border-radius:4px}.logo{height:2.5rem;width:auto}@media (width >= 960px){.logo{height:3rem}}@media (width >= 1280px){.logo{height:5rem}}.header-inner{display:flex;width:100%;min-width:0;align-items:center;justify-content:space-between;gap:0.75rem;padding-block:0.75rem;padding-inline:var(--weg-container-padding-inline)}@media (width >= 960px){.header-inner{flex-wrap:nowrap;gap:1.5rem;padding-block:1.25rem}}@media (width >= 1440px){.header-inner{padding-block:1.75rem}}.header-inner .logo-link{flex:1 1 auto;min-width:0;justify-content:center}@media (width >= 960px){.header-inner .logo-link{flex:0 0 auto;justify-content:flex-start}}.header-inner .logo{max-width:100%}.header-actions{display:flex;align-items:center;flex-shrink:0}@media (width >= 960px){.header-actions{display:none}}.main-nav-panel{display:none;margin-inline:-0.5rem}@media (width >= 960px){.main-nav-panel{display:flex;flex:1 1 auto;width:auto;min-width:0;justify-content:flex-end;overflow:visible;border-top:none}}.main-nav{padding:0 1rem 1.5rem}@media (width >= 960px){.main-nav{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:1rem;padding:0}}.main-nav__list{list-style:none;margin:0;padding:0}@media (width >= 960px){.main-nav__list{display:flex;align-items:center;flex-wrap:wrap;gap:0.5rem}}@media (width >= 1280px){.main-nav__list{gap:1.5rem}}.main-nav__item{border-bottom:1px solid #d8d4f7}@media (width >= 960px){.main-nav__item{border-bottom:none}}.main-nav__item--dropdown{position:static}.nav-dropdown{position:relative}.nav-link{display:block;width:100%;padding:1rem 0;font-weight:600;color:inherit;text-decoration:none;outline:none}.nav-link:hover{opacity:0.85}.nav-link:focus-visible{outline:2px solid var(--weg-color-accent);outline-offset:2px;border-radius:4px}.nav-dropdown__trigger{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;width:100%;padding:1rem 0;border:none;background:transparent;font:inherit;font-weight:600;color:inherit;text-align:left;cursor:pointer;outline:none}.nav-dropdown__trigger:hover{opacity:0.85}.nav-dropdown__trigger:focus-visible{outline:2px solid var(--weg-color-accent);outline-offset:2px;border-radius:4px}.nav-dropdown__trigger--open{background:transparent}.toggle-icon{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:999rem;background:#312e81;color:#ffffff;flex-shrink:0}.nav-dropdown__panel{padding:0 0 0.75rem}@media (width >= 960px){.nav-dropdown__panel{position:absolute;top:calc(100% + 0.5rem);left:0;z-index:500;min-width:17.5rem;padding:0.75rem 0 0.75rem 0.75rem;border:1px solid #e2e8f0;border-radius:0.5rem;background:#f8fafc;box-shadow:0 0.25rem 1rem rgba(15, 23, 42, 0.08)}.nav-dropdown__panel::before{content:'';position:absolute;top:-0.5rem;left:0;right:0;height:0.5rem}}.nav-dropdown__accent{border-left:0.25rem solid var(--weg-color-accent);padding-left:0.75rem}.nav-dropdown__links{display:flex;flex-direction:column;gap:0.25rem}.nav-dropdown__link{display:block;padding:0.625rem 0;font-weight:400;color:inherit;text-decoration:none;outline:none}.nav-dropdown__link:hover{opacity:0.85}.nav-dropdown__link:focus-visible{outline:0.125rem solid var(--weg-color-accent);outline-offset:0.125rem;border-radius:0.25rem}@media (width >= 960px){.nav-dropdown__link{padding:0.5rem;margin-right:0.75rem;border-radius:0.5rem;font-weight:600}.nav-dropdown__link:hover,.nav-dropdown__link:focus-visible{background:#cdcff8;opacity:1}}@media (width >= 1280px){.nav-dropdown__link{padding:0.5rem 0.75rem}}.main-nav__item--auth>a{display:flex;align-items:center;gap:0.5rem;width:100%;padding:1rem 0}@media (width >= 960px){.nav-link,.nav-dropdown__trigger,.main-nav__item--auth>a{display:inline-flex;align-items:center;width:auto;padding:0.5rem;border-radius:0.5rem}.nav-dropdown__trigger{gap:0.5rem;cursor:pointer}.nav-dropdown__trigger--open{background:#f1f5f9}}@media (width >= 1280px){.main-nav{font-size:1.25rem}.main-nav__item--auth>a{padding:0.5rem 0.75rem}}.sign-in-link,.sign-out-link,.auth-button{display:inline-flex;align-items:center;gap:0.5rem;font-weight:600;color:inherit;text-decoration:none;outline:none}.auth-button{padding:0;border:none;background:transparent;font:inherit;cursor:pointer}.sign-in-link:hover,.sign-out-link:hover,.auth-button:hover{opacity:0.85}.sign-in-link:focus-visible,.sign-out-link:focus-visible,.auth-button:focus-visible{outline:2px solid var(--weg-color-accent);outline-offset:4px;border-radius:4px}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;padding:0;border:none;border-radius:0.5rem;background:transparent;color:inherit;cursor:pointer;text-decoration:none;outline:none}.icon-button:hover{background:#f1f5f9}.icon-button:focus-visible{outline:2px solid var(--weg-color-accent);outline-offset:2px}.menu-toggle{flex-shrink:0}@media (width >= 960px){.menu-toggle{display:none}}`;
|
|
246
250
|
|
|
247
251
|
const WEG_HOME = 'https://www.warwickemploymentgroup.com';
|
|
248
|
-
const
|
|
252
|
+
const DEFAULT_ACCOUNT_HOME = 'https://account.warwickemploymentgroup.com';
|
|
249
253
|
const DEFAULT_LOGO_HREF = `${WEG_HOME}/`;
|
|
250
|
-
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
254
|
+
function normalizeAccountBase(input) {
|
|
255
|
+
const base = input?.trim() || DEFAULT_ACCOUNT_HOME;
|
|
256
|
+
return base.replace(/\/$/, '');
|
|
257
|
+
}
|
|
258
|
+
function accountPath(accountHome, path) {
|
|
259
|
+
const normalizedPath = path.startsWith('/') ? path : `/${path}`;
|
|
260
|
+
return `${normalizeAccountBase(accountHome)}${normalizedPath}`;
|
|
261
|
+
}
|
|
262
|
+
function buildSignedInMenu(accountHome) {
|
|
263
|
+
return [
|
|
264
|
+
{ label: 'Find a job', href: `${WEG_HOME}/find-a-job` },
|
|
265
|
+
{ label: 'Dashboard', href: accountPath(accountHome, '/dashboard') },
|
|
266
|
+
{ label: 'Manage Account', href: accountPath(accountHome, '/account/manage') },
|
|
267
|
+
{ label: 'Sign out', href: accountPath(accountHome, '/account/login') },
|
|
268
|
+
];
|
|
269
|
+
}
|
|
258
270
|
const EMPTY_HEADER = {
|
|
259
271
|
menu: [],
|
|
260
272
|
};
|
|
261
|
-
function isSignInLink(link) {
|
|
273
|
+
function isSignInLink(link, accountHome) {
|
|
274
|
+
if (link.authAction === 'sign-in')
|
|
275
|
+
return true;
|
|
276
|
+
if (link.authAction === 'sign-out')
|
|
277
|
+
return false;
|
|
262
278
|
const label = link.label.trim().toLowerCase();
|
|
263
279
|
if (label === 'sign out')
|
|
264
280
|
return false;
|
|
265
281
|
if (label === 'sign in')
|
|
266
282
|
return true;
|
|
267
|
-
return link.href ===
|
|
283
|
+
return link.href === accountPath(accountHome, '/account/login');
|
|
268
284
|
}
|
|
269
285
|
function isSignOutLink(link) {
|
|
286
|
+
if (link.authAction === 'sign-out')
|
|
287
|
+
return true;
|
|
270
288
|
return link.label.trim().toLowerCase() === 'sign out';
|
|
271
289
|
}
|
|
272
|
-
function isManageAccountLink(link) {
|
|
290
|
+
function isManageAccountLink(link, accountHome) {
|
|
273
291
|
if (link.label.trim().toLowerCase() === 'manage account')
|
|
274
292
|
return true;
|
|
275
|
-
return link.href ===
|
|
293
|
+
return link.href === accountPath(accountHome, '/account/manage');
|
|
276
294
|
}
|
|
277
295
|
function isFindJobLink(link) {
|
|
278
296
|
if (link.label.trim().toLowerCase() === 'find a job')
|
|
279
297
|
return true;
|
|
280
298
|
return link.href === `${WEG_HOME}/find-a-job`;
|
|
281
299
|
}
|
|
282
|
-
function isDashboardLink(link) {
|
|
300
|
+
function isDashboardLink(link, accountHome) {
|
|
283
301
|
if (link.label.trim().toLowerCase() === 'dashboard')
|
|
284
302
|
return true;
|
|
285
|
-
return link.href ===
|
|
303
|
+
return link.href === accountPath(accountHome, '/dashboard');
|
|
286
304
|
}
|
|
287
305
|
function normalizeHeaderData(input) {
|
|
288
306
|
const root = (input && typeof input === 'object' ? input : {});
|
|
@@ -349,6 +367,11 @@ const WegHeader = class {
|
|
|
349
367
|
* Signed-in user's first name, shown beside the profile icon on Manage Account.
|
|
350
368
|
*/
|
|
351
369
|
userName;
|
|
370
|
+
/**
|
|
371
|
+
* Account portal origin for sign-in, register, dashboard, and manage-account links.
|
|
372
|
+
* Defaults to production when omitted.
|
|
373
|
+
*/
|
|
374
|
+
accountBaseUrl;
|
|
352
375
|
/**
|
|
353
376
|
* Fired when the user clicks Sign in or Sign out.
|
|
354
377
|
* Call `event.preventDefault()` in the host to handle navigation/logout yourself.
|
|
@@ -532,8 +555,11 @@ const WegHeader = class {
|
|
|
532
555
|
this.menuOpen = false;
|
|
533
556
|
this.closeDropdown();
|
|
534
557
|
}
|
|
558
|
+
getAccountHome() {
|
|
559
|
+
return normalizeAccountBase(this.accountBaseUrl);
|
|
560
|
+
}
|
|
535
561
|
getActiveMenu() {
|
|
536
|
-
return this.signedIn ?
|
|
562
|
+
return this.signedIn ? buildSignedInMenu(this.getAccountHome()) : this.resolved.menu;
|
|
537
563
|
}
|
|
538
564
|
getLogoSrc() {
|
|
539
565
|
return this.resolved.logoSrc ?? LOGO_SRC;
|
|
@@ -542,8 +568,9 @@ const WegHeader = class {
|
|
|
542
568
|
return this.resolved.logoHref ?? DEFAULT_LOGO_HREF;
|
|
543
569
|
}
|
|
544
570
|
findSignInLink(menu) {
|
|
571
|
+
const accountHome = this.getAccountHome();
|
|
545
572
|
for (const item of menu) {
|
|
546
|
-
if (!isMenuGroup(item) && isSignInLink(item))
|
|
573
|
+
if (!isMenuGroup(item) && isSignInLink(item, accountHome))
|
|
547
574
|
return item;
|
|
548
575
|
}
|
|
549
576
|
return null;
|
|
@@ -603,25 +630,26 @@ const WegHeader = class {
|
|
|
603
630
|
'sign-in-link': !iconOnly,
|
|
604
631
|
'manage-account-link': true,
|
|
605
632
|
'icon-button': iconOnly,
|
|
606
|
-
}, href:
|
|
633
|
+
}, href: accountPath(this.getAccountHome(), '/account/manage'), "aria-label": label, onClick: () => onNavigate?.() }, index.h(SignInIcon, null), !iconOnly ? label : null, iconOnly ? index.h("span", { class: "sr-only" }, label) : null));
|
|
607
634
|
}
|
|
608
635
|
renderNavItem(item, onNavigate) {
|
|
636
|
+
const accountHome = this.getAccountHome();
|
|
609
637
|
if (isMenuGroup(item)) {
|
|
610
638
|
return this.renderMenuGroup(item, onNavigate);
|
|
611
639
|
}
|
|
612
640
|
if (isSignOutLink(item)) {
|
|
613
641
|
return (index.h("li", { class: "main-nav__item main-nav__item--auth", key: "sign-out" }, this.renderAuthControl({ link: item, action: 'sign-out', onNavigate })));
|
|
614
642
|
}
|
|
615
|
-
if (isSignInLink(item)) {
|
|
643
|
+
if (isSignInLink(item, accountHome)) {
|
|
616
644
|
return (index.h("li", { class: "main-nav__item main-nav__item--auth", key: "sign-in" }, this.renderAuthControl({ link: item, action: 'sign-in', onNavigate })));
|
|
617
645
|
}
|
|
618
|
-
if (isManageAccountLink(item)) {
|
|
646
|
+
if (isManageAccountLink(item, accountHome)) {
|
|
619
647
|
return (index.h("li", { class: "main-nav__item main-nav__item--auth", key: "manage-account" }, this.renderManageAccountAnchor(onNavigate)));
|
|
620
648
|
}
|
|
621
649
|
if (this.signedIn && isFindJobLink(item)) {
|
|
622
650
|
return this.renderIconNavLink(item, FindJobIcon, 'find-a-job-link', onNavigate);
|
|
623
651
|
}
|
|
624
|
-
if (this.signedIn && isDashboardLink(item)) {
|
|
652
|
+
if (this.signedIn && isDashboardLink(item, accountHome)) {
|
|
625
653
|
return this.renderIconNavLink(item, DashboardIcon, 'dashboard-link', onNavigate);
|
|
626
654
|
}
|
|
627
655
|
return this.renderFlatNavLink(item, onNavigate);
|
|
@@ -648,10 +676,10 @@ const WegHeader = class {
|
|
|
648
676
|
const logoSrc = this.getLogoSrc();
|
|
649
677
|
const closeMenu = () => this.closeMenu();
|
|
650
678
|
const mobileMenuActive = this.isMobileMenuActive();
|
|
651
|
-
return (index.h("header", { key: '
|
|
679
|
+
return (index.h("header", { key: 'd2540b7c454ca836c432faed8ca9238d73dbba46', class: {
|
|
652
680
|
header: true,
|
|
653
681
|
'header--menu-open': mobileMenuActive,
|
|
654
|
-
} }, index.h("div", { key: '
|
|
682
|
+
} }, index.h("div", { key: '34607ff0111314f63675a268e073ca3c1dfb8f4d', class: "header-inner" }, index.h("button", { key: 'a82ddb85ea8b6531130b27e1b3146ce644c91639', type: "button", class: "menu-toggle icon-button", "aria-label": mobileMenuActive ? 'Close menu' : 'Open menu', "aria-expanded": mobileMenuActive ? 'true' : 'false', "aria-controls": "weg-header-main-nav", onClick: () => this.toggleMenu() }, mobileMenuActive ? index.h(CloseIcon, null) : index.h(HamburgerIcon, null)), index.h(Logo, { key: '8c453a60bfb520a35f67c57e7818ced428758db9', href: logoHref, src: logoSrc }), index.h("div", { key: '5a74710c7b131e53096ee4d9dda9f52bf048dad6', class: "header-actions" }, this.renderCompactAuth(mobileMenuActive ? closeMenu : undefined)), index.h("div", { key: '48725d9c56c861715b521b0d92e58cf32555041a', class: "main-nav-panel", id: "weg-header-main-nav", role: mobileMenuActive ? 'dialog' : undefined, "aria-modal": mobileMenuActive ? 'true' : undefined, "aria-label": mobileMenuActive ? 'Menu' : undefined }, this.renderNav(mobileMenuActive ? closeMenu : undefined)))));
|
|
655
683
|
}
|
|
656
684
|
static get watchers() { return {
|
|
657
685
|
"layout": [{
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["weg-footer_2.cjs",[[513,"weg-footer",{"layout":[1],"resolved":[32]},null,{"layout":[{"watchLayout":0}]}],[513,"weg-header",{"layout":[1],"signedIn":[516,"signed-in"],"userName":[1,"user-name"],"resolved":[32],"menuOpen":[32],"openDropdown":[32]},[[8,"keydown","handleKeyDown"]],{"layout":[{"watchLayout":0}]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["weg-footer_2.cjs",[[513,"weg-footer",{"layout":[1],"resolved":[32]},null,{"layout":[{"watchLayout":0}]}],[513,"weg-header",{"layout":[1],"signedIn":[516,"signed-in"],"userName":[1,"user-name"],"accountBaseUrl":[1,"account-base-url"],"resolved":[32],"menuOpen":[32],"openDropdown":[32]},[[8,"keydown","handleKeyDown"]],{"layout":[{"watchLayout":0}]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -3,44 +3,58 @@ import { isMenuGroup, isNonEmptyString, normalizeHeaderMenu, parseJsonProp, } fr
|
|
|
3
3
|
import { WEG_HOVER_CAPABLE_MEDIA_QUERY, WEG_MD_MEDIA_QUERY } from "../../constants/breakpoints";
|
|
4
4
|
import { LOGO_SRC } from "./logo-data";
|
|
5
5
|
const WEG_HOME = 'https://www.warwickemploymentgroup.com';
|
|
6
|
-
const
|
|
6
|
+
const DEFAULT_ACCOUNT_HOME = 'https://account.warwickemploymentgroup.com';
|
|
7
7
|
const DEFAULT_LOGO_HREF = `${WEG_HOME}/`;
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
function normalizeAccountBase(input) {
|
|
9
|
+
const base = input?.trim() || DEFAULT_ACCOUNT_HOME;
|
|
10
|
+
return base.replace(/\/$/, '');
|
|
11
|
+
}
|
|
12
|
+
function accountPath(accountHome, path) {
|
|
13
|
+
const normalizedPath = path.startsWith('/') ? path : `/${path}`;
|
|
14
|
+
return `${normalizeAccountBase(accountHome)}${normalizedPath}`;
|
|
15
|
+
}
|
|
16
|
+
function buildSignedInMenu(accountHome) {
|
|
17
|
+
return [
|
|
18
|
+
{ label: 'Find a job', href: `${WEG_HOME}/find-a-job` },
|
|
19
|
+
{ label: 'Dashboard', href: accountPath(accountHome, '/dashboard') },
|
|
20
|
+
{ label: 'Manage Account', href: accountPath(accountHome, '/account/manage') },
|
|
21
|
+
{ label: 'Sign out', href: accountPath(accountHome, '/account/login') },
|
|
22
|
+
];
|
|
23
|
+
}
|
|
16
24
|
const EMPTY_HEADER = {
|
|
17
25
|
menu: [],
|
|
18
26
|
};
|
|
19
|
-
function isSignInLink(link) {
|
|
27
|
+
function isSignInLink(link, accountHome) {
|
|
28
|
+
if (link.authAction === 'sign-in')
|
|
29
|
+
return true;
|
|
30
|
+
if (link.authAction === 'sign-out')
|
|
31
|
+
return false;
|
|
20
32
|
const label = link.label.trim().toLowerCase();
|
|
21
33
|
if (label === 'sign out')
|
|
22
34
|
return false;
|
|
23
35
|
if (label === 'sign in')
|
|
24
36
|
return true;
|
|
25
|
-
return link.href ===
|
|
37
|
+
return link.href === accountPath(accountHome, '/account/login');
|
|
26
38
|
}
|
|
27
39
|
function isSignOutLink(link) {
|
|
40
|
+
if (link.authAction === 'sign-out')
|
|
41
|
+
return true;
|
|
28
42
|
return link.label.trim().toLowerCase() === 'sign out';
|
|
29
43
|
}
|
|
30
|
-
function isManageAccountLink(link) {
|
|
44
|
+
function isManageAccountLink(link, accountHome) {
|
|
31
45
|
if (link.label.trim().toLowerCase() === 'manage account')
|
|
32
46
|
return true;
|
|
33
|
-
return link.href ===
|
|
47
|
+
return link.href === accountPath(accountHome, '/account/manage');
|
|
34
48
|
}
|
|
35
49
|
function isFindJobLink(link) {
|
|
36
50
|
if (link.label.trim().toLowerCase() === 'find a job')
|
|
37
51
|
return true;
|
|
38
52
|
return link.href === `${WEG_HOME}/find-a-job`;
|
|
39
53
|
}
|
|
40
|
-
function isDashboardLink(link) {
|
|
54
|
+
function isDashboardLink(link, accountHome) {
|
|
41
55
|
if (link.label.trim().toLowerCase() === 'dashboard')
|
|
42
56
|
return true;
|
|
43
|
-
return link.href ===
|
|
57
|
+
return link.href === accountPath(accountHome, '/dashboard');
|
|
44
58
|
}
|
|
45
59
|
function normalizeHeaderData(input) {
|
|
46
60
|
const root = (input && typeof input === 'object' ? input : {});
|
|
@@ -103,6 +117,11 @@ export class WegHeader {
|
|
|
103
117
|
* Signed-in user's first name, shown beside the profile icon on Manage Account.
|
|
104
118
|
*/
|
|
105
119
|
userName;
|
|
120
|
+
/**
|
|
121
|
+
* Account portal origin for sign-in, register, dashboard, and manage-account links.
|
|
122
|
+
* Defaults to production when omitted.
|
|
123
|
+
*/
|
|
124
|
+
accountBaseUrl;
|
|
106
125
|
/**
|
|
107
126
|
* Fired when the user clicks Sign in or Sign out.
|
|
108
127
|
* Call `event.preventDefault()` in the host to handle navigation/logout yourself.
|
|
@@ -286,8 +305,11 @@ export class WegHeader {
|
|
|
286
305
|
this.menuOpen = false;
|
|
287
306
|
this.closeDropdown();
|
|
288
307
|
}
|
|
308
|
+
getAccountHome() {
|
|
309
|
+
return normalizeAccountBase(this.accountBaseUrl);
|
|
310
|
+
}
|
|
289
311
|
getActiveMenu() {
|
|
290
|
-
return this.signedIn ?
|
|
312
|
+
return this.signedIn ? buildSignedInMenu(this.getAccountHome()) : this.resolved.menu;
|
|
291
313
|
}
|
|
292
314
|
getLogoSrc() {
|
|
293
315
|
return this.resolved.logoSrc ?? LOGO_SRC;
|
|
@@ -296,8 +318,9 @@ export class WegHeader {
|
|
|
296
318
|
return this.resolved.logoHref ?? DEFAULT_LOGO_HREF;
|
|
297
319
|
}
|
|
298
320
|
findSignInLink(menu) {
|
|
321
|
+
const accountHome = this.getAccountHome();
|
|
299
322
|
for (const item of menu) {
|
|
300
|
-
if (!isMenuGroup(item) && isSignInLink(item))
|
|
323
|
+
if (!isMenuGroup(item) && isSignInLink(item, accountHome))
|
|
301
324
|
return item;
|
|
302
325
|
}
|
|
303
326
|
return null;
|
|
@@ -357,25 +380,26 @@ export class WegHeader {
|
|
|
357
380
|
'sign-in-link': !iconOnly,
|
|
358
381
|
'manage-account-link': true,
|
|
359
382
|
'icon-button': iconOnly,
|
|
360
|
-
}, href:
|
|
383
|
+
}, href: accountPath(this.getAccountHome(), '/account/manage'), "aria-label": label, onClick: () => onNavigate?.() }, h(SignInIcon, null), !iconOnly ? label : null, iconOnly ? h("span", { class: "sr-only" }, label) : null));
|
|
361
384
|
}
|
|
362
385
|
renderNavItem(item, onNavigate) {
|
|
386
|
+
const accountHome = this.getAccountHome();
|
|
363
387
|
if (isMenuGroup(item)) {
|
|
364
388
|
return this.renderMenuGroup(item, onNavigate);
|
|
365
389
|
}
|
|
366
390
|
if (isSignOutLink(item)) {
|
|
367
391
|
return (h("li", { class: "main-nav__item main-nav__item--auth", key: "sign-out" }, this.renderAuthControl({ link: item, action: 'sign-out', onNavigate })));
|
|
368
392
|
}
|
|
369
|
-
if (isSignInLink(item)) {
|
|
393
|
+
if (isSignInLink(item, accountHome)) {
|
|
370
394
|
return (h("li", { class: "main-nav__item main-nav__item--auth", key: "sign-in" }, this.renderAuthControl({ link: item, action: 'sign-in', onNavigate })));
|
|
371
395
|
}
|
|
372
|
-
if (isManageAccountLink(item)) {
|
|
396
|
+
if (isManageAccountLink(item, accountHome)) {
|
|
373
397
|
return (h("li", { class: "main-nav__item main-nav__item--auth", key: "manage-account" }, this.renderManageAccountAnchor(onNavigate)));
|
|
374
398
|
}
|
|
375
399
|
if (this.signedIn && isFindJobLink(item)) {
|
|
376
400
|
return this.renderIconNavLink(item, FindJobIcon, 'find-a-job-link', onNavigate);
|
|
377
401
|
}
|
|
378
|
-
if (this.signedIn && isDashboardLink(item)) {
|
|
402
|
+
if (this.signedIn && isDashboardLink(item, accountHome)) {
|
|
379
403
|
return this.renderIconNavLink(item, DashboardIcon, 'dashboard-link', onNavigate);
|
|
380
404
|
}
|
|
381
405
|
return this.renderFlatNavLink(item, onNavigate);
|
|
@@ -402,10 +426,10 @@ export class WegHeader {
|
|
|
402
426
|
const logoSrc = this.getLogoSrc();
|
|
403
427
|
const closeMenu = () => this.closeMenu();
|
|
404
428
|
const mobileMenuActive = this.isMobileMenuActive();
|
|
405
|
-
return (h("header", { key: '
|
|
429
|
+
return (h("header", { key: 'd2540b7c454ca836c432faed8ca9238d73dbba46', class: {
|
|
406
430
|
header: true,
|
|
407
431
|
'header--menu-open': mobileMenuActive,
|
|
408
|
-
} }, h("div", { key: '
|
|
432
|
+
} }, h("div", { key: '34607ff0111314f63675a268e073ca3c1dfb8f4d', class: "header-inner" }, h("button", { key: 'a82ddb85ea8b6531130b27e1b3146ce644c91639', type: "button", class: "menu-toggle icon-button", "aria-label": mobileMenuActive ? 'Close menu' : 'Open menu', "aria-expanded": mobileMenuActive ? 'true' : 'false', "aria-controls": "weg-header-main-nav", onClick: () => this.toggleMenu() }, mobileMenuActive ? h(CloseIcon, null) : h(HamburgerIcon, null)), h(Logo, { key: '8c453a60bfb520a35f67c57e7818ced428758db9', href: logoHref, src: logoSrc }), h("div", { key: '5a74710c7b131e53096ee4d9dda9f52bf048dad6', class: "header-actions" }, this.renderCompactAuth(mobileMenuActive ? closeMenu : undefined)), h("div", { key: '48725d9c56c861715b521b0d92e58cf32555041a', class: "main-nav-panel", id: "weg-header-main-nav", role: mobileMenuActive ? 'dialog' : undefined, "aria-modal": mobileMenuActive ? 'true' : undefined, "aria-label": mobileMenuActive ? 'Menu' : undefined }, this.renderNav(mobileMenuActive ? closeMenu : undefined)))));
|
|
409
433
|
}
|
|
410
434
|
static get is() { return "weg-header"; }
|
|
411
435
|
static get encapsulation() { return "shadow"; }
|
|
@@ -485,6 +509,25 @@ export class WegHeader {
|
|
|
485
509
|
"setter": false,
|
|
486
510
|
"reflect": false,
|
|
487
511
|
"attribute": "user-name"
|
|
512
|
+
},
|
|
513
|
+
"accountBaseUrl": {
|
|
514
|
+
"type": "string",
|
|
515
|
+
"mutable": false,
|
|
516
|
+
"complexType": {
|
|
517
|
+
"original": "string",
|
|
518
|
+
"resolved": "string",
|
|
519
|
+
"references": {}
|
|
520
|
+
},
|
|
521
|
+
"required": false,
|
|
522
|
+
"optional": true,
|
|
523
|
+
"docs": {
|
|
524
|
+
"tags": [],
|
|
525
|
+
"text": "Account portal origin for sign-in, register, dashboard, and manage-account links.\r\nDefaults to production when omitted."
|
|
526
|
+
},
|
|
527
|
+
"getter": false,
|
|
528
|
+
"setter": false,
|
|
529
|
+
"reflect": false,
|
|
530
|
+
"attribute": "account-base-url"
|
|
488
531
|
}
|
|
489
532
|
};
|
|
490
533
|
}
|
|
@@ -48,6 +48,10 @@ export function normalizeLayoutLink(input, options) {
|
|
|
48
48
|
const target = readLinkTarget(raw);
|
|
49
49
|
if (target)
|
|
50
50
|
link.target = target;
|
|
51
|
+
const authAction = raw.authAction;
|
|
52
|
+
if (authAction === 'sign-in' || authAction === 'sign-out') {
|
|
53
|
+
link.authAction = authAction;
|
|
54
|
+
}
|
|
51
55
|
return link;
|
|
52
56
|
}
|
|
53
57
|
return options?.requireHref === false ? null : null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const n=new Set(["_blank","_self","_parent","_top"]);function t(n){if("string"!=typeof n)return n;const t=n.trim();if(t)try{return JSON.parse(t)}catch{return}}function r(n){return"string"==typeof n&&n.trim().length>0}function o(n){return Boolean(n.items?.length)}function e(t){if(!t||"object"!=typeof t)return null;const o=t,e=o.label;if(!r(e))return null;const f=function(n){return n.items??n.children}(o);if(Array.isArray(f)){const n=u(f);if(n.length>0)return{label:e.trim(),items:n}}const c=o.href;if(r(c)){const t={label:e.trim(),href:c.trim()},r=function(t){const r=t.target;if("string"==typeof r&&n.has(r))return r}(o);r&&(t.target=r);const u=o.authAction;return"sign-in"!==u&&"sign-out"!==u||(t.authAction=u),t}return null}function u(n){if(!Array.isArray(n))return[];const t=[];for(const r of n){const n=e(r);n&&t.push(n)}return t}function f(n){return u(n)}function c(n){if(!Array.isArray(n))return[];const t=[];for(const r of n){const n=u(r);0!==n.length&&t.push(n)}return t}export{o as a,f as b,r as i,c as n,t as p}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as i,H as t,h as n}from"./p-CtYuWNO6.js";import{p as o,n as r,i as a}from"./p-BnMIy-A5.js";const l={social:[],menu:[],credits:"",copyright:""};function s(e){return/^https?:\/\//.test(e)}function c(e){return"LinkedIn"===e||"Instagram"===e||"TikTok"===e||"YouTube"===e}function d(e){if(!Array.isArray(e))return[];const i=[];for(const t of e){if(!t||"object"!=typeof t)continue;const e=t.platform,n=t.href;c(e)&&a(n)&&i.push({platform:e,href:n.trim()})}return i}function m(e){return"_blank"===e.target||!!e.href&&s(e.href)}function p(e){return e.target?e.target:m(e)?"_blank":void 0}function f(e){return m(e)?"noreferrer noopener":void 0}function h({platform:e}){const i={viewBox:"0 0 48 48",width:48,height:48,fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false"};switch(e){case"LinkedIn":return n("svg",{...i},n("path",{d:"M24 0C37.2548 0 48 10.7452 48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24C0 10.7452 10.7452 0 24 0ZM12.9082 33.4736H17.5889V19.4111H12.9082V33.4736ZM29.0791 19.0811C26.5942 19.0811 25.4815 20.4458 24.8604 21.4033V19.4111H20.1797C20.2412 20.7279 20.1799 33.4203 20.1797 33.4736H24.8604V25.6201C24.8604 25.1998 24.8909 24.7804 25.0146 24.4795C25.3529 23.6399 26.1231 22.7705 27.416 22.7705C29.1103 22.7705 29.7881 24.0605 29.7881 25.9502V33.4736H34.4678V25.4102C34.4677 21.0909 32.1589 19.0811 29.0791 19.0811ZM15.2793 12.6318C13.6783 12.6319 12.6319 13.6818 12.6318 15.0605C12.6318 16.4108 13.6474 17.4912 15.2188 17.4912H15.249C16.8807 17.491 17.8965 16.4107 17.8965 15.0605C17.866 13.6818 16.8804 12.6318 15.2793 12.6318Z",fill:"white"}));case"Instagram":return n("svg",{...i},n("path",{d:"M24 0C37.2548 0 48 10.7452 48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24C0 10.7452 10.7452 0 24 0ZM23.999 11.2002C20.5245 11.2002 20.0877 11.2152 18.7227 11.2773C17.3602 11.3398 16.43 11.5556 15.6162 11.8721C14.7744 12.199 14.06 12.636 13.3486 13.3477C12.6366 14.0591 12.1991 14.7736 11.8711 15.6152C11.5538 16.4293 11.3377 17.3597 11.2764 18.7217C11.2153 20.087 11.2002 20.5238 11.2002 24C11.2002 27.476 11.2155 27.9113 11.2773 29.2764C11.34 30.639 11.5558 31.5699 11.8721 32.3838C12.1993 33.2255 12.636 33.94 13.3477 34.6514C14.0589 35.3634 14.7739 35.801 15.6152 36.1279C16.4295 36.4444 17.3596 36.6602 18.7217 36.7227C20.087 36.7848 20.5233 36.7998 23.999 36.7998C27.4756 36.7998 27.911 36.7848 29.2764 36.7227C30.639 36.6602 31.5704 36.4445 32.3848 36.1279C33.2261 35.801 33.9394 35.3631 34.6504 34.6514C35.3624 33.9399 35.7999 33.2254 36.1279 32.3838C36.4426 31.5697 36.6586 30.6393 36.7227 29.2773C36.784 27.912 36.7998 27.4763 36.7998 24C36.7998 20.5242 36.784 20.0876 36.7227 18.7227C36.6587 17.36 36.4426 16.4291 36.1279 15.6152C35.7999 14.7734 35.3623 14.0591 34.6504 13.3477C33.9385 12.6358 33.2264 12.1987 32.3838 11.8721C31.5678 11.5555 30.6371 11.3397 29.2744 11.2773C27.9093 11.2152 27.4745 11.2002 23.999 11.2002Z",fill:"white"}),n("path",{d:"M22.8525 13.5068C23.1933 13.5063 23.5739 13.5068 24.001 13.5068C27.4186 13.5068 27.8242 13.5197 29.1738 13.5811C30.4214 13.6381 31.0986 13.8463 31.5498 14.0215C32.1471 14.2535 32.5737 14.5305 33.0215 14.9785C33.4695 15.4265 33.746 15.8538 33.9785 16.4512C34.1537 16.9018 34.3631 17.5792 34.4199 18.8271C34.4812 20.1763 34.4941 20.5822 34.4941 23.998C34.4941 27.4134 34.4812 27.819 34.4199 29.168C34.3629 30.4158 34.1537 31.0933 33.9785 31.5439C33.7466 32.1412 33.4693 32.567 33.0215 33.0146C32.5735 33.4627 32.1474 33.7397 31.5498 33.9717C31.0992 34.1477 30.4216 34.356 29.1738 34.4131C27.8245 34.4744 27.4186 34.4883 24.001 34.4883C20.5835 34.4883 20.1783 34.4744 18.8291 34.4131C17.5811 34.3555 16.9036 34.1469 16.4521 33.9717C15.8549 33.7397 15.4284 33.4625 14.9805 33.0146C14.5325 32.5666 14.255 32.1406 14.0225 31.543C13.8473 31.0923 13.6378 30.4148 13.5811 29.167C13.5197 27.8179 13.5078 27.4121 13.5078 23.9941C13.5078 20.5762 13.5197 20.1726 13.5811 18.8232C13.6381 17.5755 13.8473 16.8984 14.0225 16.4473C14.2545 15.8499 14.5325 15.4236 14.9805 14.9756C15.4285 14.5276 15.8549 14.2501 16.4521 14.0176C16.9034 13.8416 17.5811 13.6335 18.8291 13.5762C20.0097 13.5228 20.4674 13.5066 22.8525 13.5039V13.5068ZM24.001 17.4268C20.371 17.427 17.4277 20.3709 17.4277 24.001C17.4279 27.6309 20.3711 30.5721 24.001 30.5723C27.631 30.5723 30.573 27.631 30.5732 24.001C30.5732 20.3708 27.6311 17.4268 24.001 17.4268ZM30.834 15.6318C29.9861 15.632 29.2979 16.3198 29.2979 17.168C29.2979 18.0159 29.9861 18.704 30.834 18.7041C31.682 18.7041 32.3701 18.016 32.3701 17.168C32.37 16.32 31.6819 15.6318 30.834 15.6318Z",fill:"white"}),n("path",{d:"M24.0011 19.7334C26.3574 19.7334 28.2678 21.6436 28.2678 24.0001C28.2678 26.3564 26.3574 28.2668 24.0011 28.2668C21.6445 28.2668 19.7344 26.3564 19.7344 24.0001C19.7344 21.6436 21.6445 19.7334 24.0011 19.7334Z",fill:"white"}));case"TikTok":return n("svg",{...i},n("path",{d:"M24 0C37.2548 0 48 10.7452 48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24C0 10.7452 10.7452 0 24 0ZM25.0273 28.3477C25.0273 30.2955 23.4721 31.8955 21.5361 31.8955C19.6003 31.8954 18.0449 30.2955 18.0449 28.3477C18.045 26.4347 19.5659 24.8693 21.4326 24.7998V20.6953C17.3188 20.7648 14.0001 24.1391 14 28.3477C14 32.5912 17.3883 36 21.5713 36C25.754 35.9998 29.1416 32.5562 29.1416 28.3477V19.9648C30.6627 21.0779 32.5295 21.7396 34.5 21.7744V17.6699C31.4579 17.5656 29.0723 15.0609 29.0723 12H25.0273V28.3477Z",fill:"white"}));case"YouTube":return n("svg",{...i},n("path",{d:"M24 0C37.2548 0 48 10.7452 48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24C0 10.7452 10.7452 0 24 0ZM24 15.2002C24 15.2002 15.9944 15.1997 13.998 15.749C12.8966 16.0513 12.0288 16.9423 11.7344 18.0732C11.1996 20.1231 11.2002 24.4004 11.2002 24.4004C11.2002 24.4472 11.2026 28.6878 11.7344 30.7266C12.0288 31.8575 12.8966 32.7483 13.998 33.0508C15.9944 33.6 24 33.5996 24 33.5996C24 33.5996 32.0057 33.6 34.002 33.0508C35.1033 32.7483 35.9703 31.8575 36.2646 30.7266C36.7966 28.6879 36.7998 24.4472 36.7998 24.4004C36.7998 24.4004 36.7996 20.1231 36.2646 18.0732C35.9703 16.9424 35.1033 16.0513 34.002 15.749C32.0057 15.1997 24 15.2002 24 15.2002Z",fill:"white"}),n("path",{d:"M21.6016 28.7998V20.7998L28.0016 24.8L21.6016 28.7998Z",fill:"white"}))}}const g=i(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}layout;resolved=l;resolve(){this.resolved=null!=this.layout?function(e){const i=e&&"object"==typeof e?e:{},t=i.footer&&"object"==typeof i.footer?i.footer:{};return{social:d(t?.social),menu:r(t?.menu),credits:a(t?.credits)?t.credits.trim():"",copyright:a(t?.copyright)?t.copyright.trim():""}}(o(this.layout)):l}componentWillLoad(){this.resolve()}watchLayout(){this.resolve()}renderLegalText(){const{credits:e,copyright:i}=this.resolved;return e||i?n("div",{class:"legal"},e?n("p",{class:"legal__p"},e):null,e&&i?n("p",{class:"legal__p"},""):null,i?n("p",{class:"legal__p"},i):null):null}renderSocialLinks(){const e=this.resolved.social;return 0===e.length?null:n("div",{class:"social"},e.map((e=>n("a",{class:"social__link",href:e.href,"aria-label":e.platform,target:s(e.href)?"_blank":void 0,rel:s(e.href)?"noreferrer noopener":void 0},n("span",{class:"social__icon","aria-hidden":"true"},n(h,{platform:e.platform}))))))}renderMenu(){const e=this.resolved.menu;return 0===e.length?null:n("div",{class:"columns"},e.map(((e,i)=>n("div",{class:"columns__col",key:i},i>0?n("div",{class:"columns__divider","aria-hidden":"true"}):null,n("nav",{class:"columns__links","aria-label":"Footer links column "+(i+1)},e.map(((e,i)=>n("a",{class:"footer-link",href:e.href,key:i,target:p(e),rel:f(e)},e.label))))))))}render(){return n("footer",{key:"44ce6d694eb145005f006b5a02ec68fe2da8ca44",class:"footer"},n("div",{key:"43dbb00e195a561a44cd9ae0e843c448dce546bb",class:"container footer__inner"},this.renderSocialLinks(),n("div",{key:"1ede37520397d4fa63671dccc7e3f83f26ac0955",class:"standard"},this.renderMenu(),this.renderLegalText())))}static get watchers(){return{layout:[{watchLayout:0}]}}static get style(){return":host{--weg-breakpoint-sm:640px;--weg-breakpoint-md:960px;--weg-breakpoint-lg:1280px;--weg-breakpoint-xl:1440px}:root,:host{--weg-container-breakpoint-sm:40rem;--weg-container-breakpoint-md:48rem;--weg-container-breakpoint-lg:64rem;--weg-container-breakpoint-xl:80rem;--weg-container-breakpoint-2xl:86rem;--weg-container-max-vw:95vw;--weg-container-padding-inline:1rem}@media (width >= 48rem){:root,:host{--weg-container-padding-inline:2rem}}.container{width:100%;max-width:var(--weg-container-max-vw);margin-inline:auto;padding-inline:var(--weg-container-padding-inline)}@media (width >= 40rem){.container{max-width:min(var(--weg-container-breakpoint-sm), var(--weg-container-max-vw))}}@media (width >= 48rem){.container{max-width:min(var(--weg-container-breakpoint-md), var(--weg-container-max-vw))}}@media (width >= 64rem){.container{max-width:min(var(--weg-container-breakpoint-lg), var(--weg-container-max-vw))}}@media (width >= 80rem){.container{max-width:min(var(--weg-container-breakpoint-xl), var(--weg-container-max-vw))}}@media (width >= 86rem){.container{max-width:min(var(--weg-container-breakpoint-xl), var(--weg-container-max-vw))}}*,*::before,*::after{box-sizing:border-box}:host{display:block;--weg-font-family:ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';--weg-color-accent:#948eeb}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}:host{--weg-breakpoint-sm:640px;--weg-breakpoint-md:960px;--weg-breakpoint-lg:1280px;--weg-breakpoint-xl:1440px}.footer{background:#030712;color:#ffffff;font-family:var(--weg-font-family);font-weight:300}.footer__inner{display:flex;flex-direction:column;align-items:center;gap:1.25rem;padding-block:2rem;padding-inline:0}@media (width >= 960px){.footer__inner{gap:2.25rem;padding-block:3.5rem}}.social{display:flex;align-items:center;justify-content:center;gap:1rem;flex-wrap:wrap}@media (width >= 960px){.social{gap:1.75rem}}.social__link{width:3rem;height:3rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999rem;background:transparent;color:inherit;text-decoration:none;transition:opacity 150ms ease;outline:none}.social__link:hover{opacity:0.9}.social__link:focus-visible{outline:2px solid rgba(255, 255, 255, 0.9);outline-offset:4px}.social__icon{display:inline-flex;width:3rem;height:3rem}.footer-link{color:#ffffff;font-family:'Open Sans', var(--weg-font-family);font-size:1rem;font-style:normal;font-weight:300;line-height:1.5rem;display:block;width:100%;text-align:center;text-decoration-line:underline;text-decoration-style:solid;text-decoration-skip-ink:none;text-decoration-thickness:auto;text-underline-offset:auto;text-underline-position:from-font;outline:none}@media (width >= 960px){.footer-link{display:inline;width:auto;text-align:left}}.footer-link:hover{opacity:0.9}.footer-link:focus-visible{outline:2px solid rgba(255, 255, 255, 0.9);outline-offset:4px}.legal{width:100%;max-width:860px;text-align:center;font-size:1rem;line-height:1.5rem}@media (width >= 960px){.legal{font-size:1.125rem;line-height:1.75rem}}.legal__p{margin:0}.standard{width:100%;display:flex;flex-direction:column;align-items:center;gap:2.25rem;text-align:center;font-size:1rem;line-height:1.5rem}@media (width >= 960px){.standard{font-size:1.125rem;line-height:1.75rem}}.columns{width:100%;display:grid;grid-template-columns:1fr;gap:0}.columns__col{display:flex;flex-direction:column;align-items:stretch;width:100%;min-width:0}.columns__col:not(:first-child){gap:2rem}.columns__divider{display:block;flex-shrink:0;width:100%;height:1px;margin-top:2rem;background:rgba(255, 255, 255, 0.35)}.columns__links{display:flex;flex-direction:column;align-items:stretch;gap:0.75rem;width:100%;min-width:0;text-align:center}@media (width >= 640px){.columns{grid-template-columns:repeat(3, minmax(0, 1fr));gap:1.5rem 3rem}.columns__col:not(:first-child){gap:0}.columns__col:nth-child(-n+3):not(:first-child) .columns__divider{display:none}.columns__col:nth-child(n+4) .columns__divider{display:block;width:100%;height:1px;margin:0 0 1.5rem}.footer-link{display:inline;width:auto;text-align:left}.columns__links{align-items:flex-start;text-align:left}}@media (width >= 960px){.columns{display:flex;flex-direction:row;align-items:stretch;justify-content:center;gap:0}.columns__col{flex:1 1 0;flex-direction:row;align-items:stretch}.columns__col:not(:first-child){gap:0}.columns__col:nth-child(-n+3):not(:first-child) .columns__divider,.columns__col:nth-child(n+4) .columns__divider{display:block;width:1px;height:auto;margin:0 1.5rem}.columns__links{flex:1;align-items:flex-start;text-align:left}}"}},[513,"weg-footer",{layout:[1],resolved:[32]},void 0,{layout:[{watchLayout:0}]}]);function u(){"undefined"!=typeof customElements&&["weg-footer"].forEach((i=>{"weg-footer"===i&&(customElements.get(e(i))||customElements.define(e(i),g))}))}u();const C=g,w=u;export{C as WegFooter,w as defineCustomElement}
|
|
1
|
+
import{t as e,p as i,H as t,h as n}from"./p-CtYuWNO6.js";import{p as o,n as r,i as a}from"./p-AX3tramx.js";const l={social:[],menu:[],credits:"",copyright:""};function s(e){return/^https?:\/\//.test(e)}function c(e){return"LinkedIn"===e||"Instagram"===e||"TikTok"===e||"YouTube"===e}function d(e){if(!Array.isArray(e))return[];const i=[];for(const t of e){if(!t||"object"!=typeof t)continue;const e=t.platform,n=t.href;c(e)&&a(n)&&i.push({platform:e,href:n.trim()})}return i}function m(e){return"_blank"===e.target||!!e.href&&s(e.href)}function p(e){return e.target?e.target:m(e)?"_blank":void 0}function f(e){return m(e)?"noreferrer noopener":void 0}function h({platform:e}){const i={viewBox:"0 0 48 48",width:48,height:48,fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false"};switch(e){case"LinkedIn":return n("svg",{...i},n("path",{d:"M24 0C37.2548 0 48 10.7452 48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24C0 10.7452 10.7452 0 24 0ZM12.9082 33.4736H17.5889V19.4111H12.9082V33.4736ZM29.0791 19.0811C26.5942 19.0811 25.4815 20.4458 24.8604 21.4033V19.4111H20.1797C20.2412 20.7279 20.1799 33.4203 20.1797 33.4736H24.8604V25.6201C24.8604 25.1998 24.8909 24.7804 25.0146 24.4795C25.3529 23.6399 26.1231 22.7705 27.416 22.7705C29.1103 22.7705 29.7881 24.0605 29.7881 25.9502V33.4736H34.4678V25.4102C34.4677 21.0909 32.1589 19.0811 29.0791 19.0811ZM15.2793 12.6318C13.6783 12.6319 12.6319 13.6818 12.6318 15.0605C12.6318 16.4108 13.6474 17.4912 15.2188 17.4912H15.249C16.8807 17.491 17.8965 16.4107 17.8965 15.0605C17.866 13.6818 16.8804 12.6318 15.2793 12.6318Z",fill:"white"}));case"Instagram":return n("svg",{...i},n("path",{d:"M24 0C37.2548 0 48 10.7452 48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24C0 10.7452 10.7452 0 24 0ZM23.999 11.2002C20.5245 11.2002 20.0877 11.2152 18.7227 11.2773C17.3602 11.3398 16.43 11.5556 15.6162 11.8721C14.7744 12.199 14.06 12.636 13.3486 13.3477C12.6366 14.0591 12.1991 14.7736 11.8711 15.6152C11.5538 16.4293 11.3377 17.3597 11.2764 18.7217C11.2153 20.087 11.2002 20.5238 11.2002 24C11.2002 27.476 11.2155 27.9113 11.2773 29.2764C11.34 30.639 11.5558 31.5699 11.8721 32.3838C12.1993 33.2255 12.636 33.94 13.3477 34.6514C14.0589 35.3634 14.7739 35.801 15.6152 36.1279C16.4295 36.4444 17.3596 36.6602 18.7217 36.7227C20.087 36.7848 20.5233 36.7998 23.999 36.7998C27.4756 36.7998 27.911 36.7848 29.2764 36.7227C30.639 36.6602 31.5704 36.4445 32.3848 36.1279C33.2261 35.801 33.9394 35.3631 34.6504 34.6514C35.3624 33.9399 35.7999 33.2254 36.1279 32.3838C36.4426 31.5697 36.6586 30.6393 36.7227 29.2773C36.784 27.912 36.7998 27.4763 36.7998 24C36.7998 20.5242 36.784 20.0876 36.7227 18.7227C36.6587 17.36 36.4426 16.4291 36.1279 15.6152C35.7999 14.7734 35.3623 14.0591 34.6504 13.3477C33.9385 12.6358 33.2264 12.1987 32.3838 11.8721C31.5678 11.5555 30.6371 11.3397 29.2744 11.2773C27.9093 11.2152 27.4745 11.2002 23.999 11.2002Z",fill:"white"}),n("path",{d:"M22.8525 13.5068C23.1933 13.5063 23.5739 13.5068 24.001 13.5068C27.4186 13.5068 27.8242 13.5197 29.1738 13.5811C30.4214 13.6381 31.0986 13.8463 31.5498 14.0215C32.1471 14.2535 32.5737 14.5305 33.0215 14.9785C33.4695 15.4265 33.746 15.8538 33.9785 16.4512C34.1537 16.9018 34.3631 17.5792 34.4199 18.8271C34.4812 20.1763 34.4941 20.5822 34.4941 23.998C34.4941 27.4134 34.4812 27.819 34.4199 29.168C34.3629 30.4158 34.1537 31.0933 33.9785 31.5439C33.7466 32.1412 33.4693 32.567 33.0215 33.0146C32.5735 33.4627 32.1474 33.7397 31.5498 33.9717C31.0992 34.1477 30.4216 34.356 29.1738 34.4131C27.8245 34.4744 27.4186 34.4883 24.001 34.4883C20.5835 34.4883 20.1783 34.4744 18.8291 34.4131C17.5811 34.3555 16.9036 34.1469 16.4521 33.9717C15.8549 33.7397 15.4284 33.4625 14.9805 33.0146C14.5325 32.5666 14.255 32.1406 14.0225 31.543C13.8473 31.0923 13.6378 30.4148 13.5811 29.167C13.5197 27.8179 13.5078 27.4121 13.5078 23.9941C13.5078 20.5762 13.5197 20.1726 13.5811 18.8232C13.6381 17.5755 13.8473 16.8984 14.0225 16.4473C14.2545 15.8499 14.5325 15.4236 14.9805 14.9756C15.4285 14.5276 15.8549 14.2501 16.4521 14.0176C16.9034 13.8416 17.5811 13.6335 18.8291 13.5762C20.0097 13.5228 20.4674 13.5066 22.8525 13.5039V13.5068ZM24.001 17.4268C20.371 17.427 17.4277 20.3709 17.4277 24.001C17.4279 27.6309 20.3711 30.5721 24.001 30.5723C27.631 30.5723 30.573 27.631 30.5732 24.001C30.5732 20.3708 27.6311 17.4268 24.001 17.4268ZM30.834 15.6318C29.9861 15.632 29.2979 16.3198 29.2979 17.168C29.2979 18.0159 29.9861 18.704 30.834 18.7041C31.682 18.7041 32.3701 18.016 32.3701 17.168C32.37 16.32 31.6819 15.6318 30.834 15.6318Z",fill:"white"}),n("path",{d:"M24.0011 19.7334C26.3574 19.7334 28.2678 21.6436 28.2678 24.0001C28.2678 26.3564 26.3574 28.2668 24.0011 28.2668C21.6445 28.2668 19.7344 26.3564 19.7344 24.0001C19.7344 21.6436 21.6445 19.7334 24.0011 19.7334Z",fill:"white"}));case"TikTok":return n("svg",{...i},n("path",{d:"M24 0C37.2548 0 48 10.7452 48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24C0 10.7452 10.7452 0 24 0ZM25.0273 28.3477C25.0273 30.2955 23.4721 31.8955 21.5361 31.8955C19.6003 31.8954 18.0449 30.2955 18.0449 28.3477C18.045 26.4347 19.5659 24.8693 21.4326 24.7998V20.6953C17.3188 20.7648 14.0001 24.1391 14 28.3477C14 32.5912 17.3883 36 21.5713 36C25.754 35.9998 29.1416 32.5562 29.1416 28.3477V19.9648C30.6627 21.0779 32.5295 21.7396 34.5 21.7744V17.6699C31.4579 17.5656 29.0723 15.0609 29.0723 12H25.0273V28.3477Z",fill:"white"}));case"YouTube":return n("svg",{...i},n("path",{d:"M24 0C37.2548 0 48 10.7452 48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24C0 10.7452 10.7452 0 24 0ZM24 15.2002C24 15.2002 15.9944 15.1997 13.998 15.749C12.8966 16.0513 12.0288 16.9423 11.7344 18.0732C11.1996 20.1231 11.2002 24.4004 11.2002 24.4004C11.2002 24.4472 11.2026 28.6878 11.7344 30.7266C12.0288 31.8575 12.8966 32.7483 13.998 33.0508C15.9944 33.6 24 33.5996 24 33.5996C24 33.5996 32.0057 33.6 34.002 33.0508C35.1033 32.7483 35.9703 31.8575 36.2646 30.7266C36.7966 28.6879 36.7998 24.4472 36.7998 24.4004C36.7998 24.4004 36.7996 20.1231 36.2646 18.0732C35.9703 16.9424 35.1033 16.0513 34.002 15.749C32.0057 15.1997 24 15.2002 24 15.2002Z",fill:"white"}),n("path",{d:"M21.6016 28.7998V20.7998L28.0016 24.8L21.6016 28.7998Z",fill:"white"}))}}const g=i(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}layout;resolved=l;resolve(){this.resolved=null!=this.layout?function(e){const i=e&&"object"==typeof e?e:{},t=i.footer&&"object"==typeof i.footer?i.footer:{};return{social:d(t?.social),menu:r(t?.menu),credits:a(t?.credits)?t.credits.trim():"",copyright:a(t?.copyright)?t.copyright.trim():""}}(o(this.layout)):l}componentWillLoad(){this.resolve()}watchLayout(){this.resolve()}renderLegalText(){const{credits:e,copyright:i}=this.resolved;return e||i?n("div",{class:"legal"},e?n("p",{class:"legal__p"},e):null,e&&i?n("p",{class:"legal__p"},""):null,i?n("p",{class:"legal__p"},i):null):null}renderSocialLinks(){const e=this.resolved.social;return 0===e.length?null:n("div",{class:"social"},e.map((e=>n("a",{class:"social__link",href:e.href,"aria-label":e.platform,target:s(e.href)?"_blank":void 0,rel:s(e.href)?"noreferrer noopener":void 0},n("span",{class:"social__icon","aria-hidden":"true"},n(h,{platform:e.platform}))))))}renderMenu(){const e=this.resolved.menu;return 0===e.length?null:n("div",{class:"columns"},e.map(((e,i)=>n("div",{class:"columns__col",key:i},i>0?n("div",{class:"columns__divider","aria-hidden":"true"}):null,n("nav",{class:"columns__links","aria-label":"Footer links column "+(i+1)},e.map(((e,i)=>n("a",{class:"footer-link",href:e.href,key:i,target:p(e),rel:f(e)},e.label))))))))}render(){return n("footer",{key:"44ce6d694eb145005f006b5a02ec68fe2da8ca44",class:"footer"},n("div",{key:"43dbb00e195a561a44cd9ae0e843c448dce546bb",class:"container footer__inner"},this.renderSocialLinks(),n("div",{key:"1ede37520397d4fa63671dccc7e3f83f26ac0955",class:"standard"},this.renderMenu(),this.renderLegalText())))}static get watchers(){return{layout:[{watchLayout:0}]}}static get style(){return":host{--weg-breakpoint-sm:640px;--weg-breakpoint-md:960px;--weg-breakpoint-lg:1280px;--weg-breakpoint-xl:1440px}:root,:host{--weg-container-breakpoint-sm:40rem;--weg-container-breakpoint-md:48rem;--weg-container-breakpoint-lg:64rem;--weg-container-breakpoint-xl:80rem;--weg-container-breakpoint-2xl:86rem;--weg-container-max-vw:95vw;--weg-container-padding-inline:1rem}@media (width >= 48rem){:root,:host{--weg-container-padding-inline:2rem}}.container{width:100%;max-width:var(--weg-container-max-vw);margin-inline:auto;padding-inline:var(--weg-container-padding-inline)}@media (width >= 40rem){.container{max-width:min(var(--weg-container-breakpoint-sm), var(--weg-container-max-vw))}}@media (width >= 48rem){.container{max-width:min(var(--weg-container-breakpoint-md), var(--weg-container-max-vw))}}@media (width >= 64rem){.container{max-width:min(var(--weg-container-breakpoint-lg), var(--weg-container-max-vw))}}@media (width >= 80rem){.container{max-width:min(var(--weg-container-breakpoint-xl), var(--weg-container-max-vw))}}@media (width >= 86rem){.container{max-width:min(var(--weg-container-breakpoint-xl), var(--weg-container-max-vw))}}*,*::before,*::after{box-sizing:border-box}:host{display:block;--weg-font-family:ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';--weg-color-accent:#948eeb}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}:host{--weg-breakpoint-sm:640px;--weg-breakpoint-md:960px;--weg-breakpoint-lg:1280px;--weg-breakpoint-xl:1440px}.footer{background:#030712;color:#ffffff;font-family:var(--weg-font-family);font-weight:300}.footer__inner{display:flex;flex-direction:column;align-items:center;gap:1.25rem;padding-block:2rem;padding-inline:0}@media (width >= 960px){.footer__inner{gap:2.25rem;padding-block:3.5rem}}.social{display:flex;align-items:center;justify-content:center;gap:1rem;flex-wrap:wrap}@media (width >= 960px){.social{gap:1.75rem}}.social__link{width:3rem;height:3rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999rem;background:transparent;color:inherit;text-decoration:none;transition:opacity 150ms ease;outline:none}.social__link:hover{opacity:0.9}.social__link:focus-visible{outline:2px solid rgba(255, 255, 255, 0.9);outline-offset:4px}.social__icon{display:inline-flex;width:3rem;height:3rem}.footer-link{color:#ffffff;font-family:'Open Sans', var(--weg-font-family);font-size:1rem;font-style:normal;font-weight:300;line-height:1.5rem;display:block;width:100%;text-align:center;text-decoration-line:underline;text-decoration-style:solid;text-decoration-skip-ink:none;text-decoration-thickness:auto;text-underline-offset:auto;text-underline-position:from-font;outline:none}@media (width >= 960px){.footer-link{display:inline;width:auto;text-align:left}}.footer-link:hover{opacity:0.9}.footer-link:focus-visible{outline:2px solid rgba(255, 255, 255, 0.9);outline-offset:4px}.legal{width:100%;max-width:860px;text-align:center;font-size:1rem;line-height:1.5rem}@media (width >= 960px){.legal{font-size:1.125rem;line-height:1.75rem}}.legal__p{margin:0}.standard{width:100%;display:flex;flex-direction:column;align-items:center;gap:2.25rem;text-align:center;font-size:1rem;line-height:1.5rem}@media (width >= 960px){.standard{font-size:1.125rem;line-height:1.75rem}}.columns{width:100%;display:grid;grid-template-columns:1fr;gap:0}.columns__col{display:flex;flex-direction:column;align-items:stretch;width:100%;min-width:0}.columns__col:not(:first-child){gap:2rem}.columns__divider{display:block;flex-shrink:0;width:100%;height:1px;margin-top:2rem;background:rgba(255, 255, 255, 0.35)}.columns__links{display:flex;flex-direction:column;align-items:stretch;gap:0.75rem;width:100%;min-width:0;text-align:center}@media (width >= 640px){.columns{grid-template-columns:repeat(3, minmax(0, 1fr));gap:1.5rem 3rem}.columns__col:not(:first-child){gap:0}.columns__col:nth-child(-n+3):not(:first-child) .columns__divider{display:none}.columns__col:nth-child(n+4) .columns__divider{display:block;width:100%;height:1px;margin:0 0 1.5rem}.footer-link{display:inline;width:auto;text-align:left}.columns__links{align-items:flex-start;text-align:left}}@media (width >= 960px){.columns{display:flex;flex-direction:row;align-items:stretch;justify-content:center;gap:0}.columns__col{flex:1 1 0;flex-direction:row;align-items:stretch}.columns__col:not(:first-child){gap:0}.columns__col:nth-child(-n+3):not(:first-child) .columns__divider,.columns__col:nth-child(n+4) .columns__divider{display:block;width:1px;height:auto;margin:0 1.5rem}.columns__links{flex:1;align-items:flex-start;text-align:left}}"}},[513,"weg-footer",{layout:[1],resolved:[32]},void 0,{layout:[{watchLayout:0}]}]);function u(){"undefined"!=typeof customElements&&["weg-footer"].forEach((i=>{"weg-footer"===i&&(customElements.get(e(i))||customElements.define(e(i),g))}))}u();const C=g,w=u;export{C as WegFooter,w as defineCustomElement}
|