weg-shared-layout 0.0.40 → 0.0.41
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/LICENSE +21 -21
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/weg-footer_2.cjs.entry.js +187 -22
- package/dist/cjs/weg-shared-layout.cjs.js +1 -1
- package/dist/collection/components/weg-footer/icons/instagram.svg +5 -5
- package/dist/collection/components/weg-footer/icons/linkedin.svg +3 -3
- package/dist/collection/components/weg-footer/icons/tiktok.svg +3 -3
- package/dist/collection/components/weg-footer/icons/youtube.svg +4 -4
- package/dist/collection/components/weg-footer/weg-footer.css +263 -263
- package/dist/collection/components/weg-footer/weg-footer.js +2 -2
- package/dist/collection/components/weg-header/weg-header.css +508 -483
- package/dist/collection/components/weg-header/weg-header.js +84 -21
- package/dist/collection/styles/shared.css +104 -103
- package/dist/collection/utils/nav-active.js +121 -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 +187 -22
- package/dist/esm/weg-shared-layout.js +1 -1
- package/dist/types/components/weg-header/weg-header.d.ts +9 -0
- package/dist/types/components.d.ts +9 -0
- package/dist/types/utils/nav-active.d.ts +20 -0
- package/dist/weg-shared-layout/p-3362febf.entry.js +1 -0
- package/dist/weg-shared-layout/weg-shared-layout.esm.js +1 -1
- package/docs/README.md +51 -49
- package/docs/angular.md +451 -400
- package/docs/nextjs.md +312 -302
- package/docs/publishing.md +65 -65
- package/docs/react.md +287 -257
- package/docs/vanilla.md +155 -124
- package/package.json +81 -81
- package/readme.md +108 -97
- package/src/constants/breakpoints.ts +7 -7
- package/src/styles/container.css +60 -60
- package/dist/weg-shared-layout/p-6f83b24a.entry.js +0 -1
- /package/dist/types/Users/{tan/Documents/code → rakin/Documents/WEG/repos}/weg-shared-layout/.stencil/test-utils/axe.d.ts +0 -0
- /package/dist/types/Users/{tan/Documents/code → rakin/Documents/WEG/repos}/weg-shared-layout/.stencil/test-utils/viewport.d.ts +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { findAuthMenuLink, isMenuGroup, isNonEmptyString, normalizeHeaderMenu, parseJsonProp, } from "../../utils/layout";
|
|
3
3
|
import { WEG_HOVER_CAPABLE_MEDIA_QUERY, WEG_MD_MEDIA_QUERY } from "../../constants/breakpoints";
|
|
4
|
+
import { isAriaCurrentNavHref, isNavLinkActive, resolveAriaCurrentNavKey, } from "../../utils/nav-active";
|
|
4
5
|
import { LOGO_SRC } from "./logo-data";
|
|
5
6
|
const WEG_HOME = 'https://www.warwickemploymentgroup.com';
|
|
6
7
|
const DEFAULT_ACCOUNT_HOME = 'https://account.warwickemploymentgroup.com';
|
|
@@ -91,7 +92,7 @@ function ToggleIcon({ expanded }) {
|
|
|
91
92
|
return (h("span", { class: "toggle-icon", "aria-hidden": "true" }, expanded ? (h("svg", { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none" }, h("path", { d: "M6 12h12", stroke: "currentColor", "stroke-width": "2.5", "stroke-linecap": "round" }))) : (h("svg", { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none" }, h("path", { d: "M12 6v12M6 12h12", stroke: "currentColor", "stroke-width": "2.5", "stroke-linecap": "round" })))));
|
|
92
93
|
}
|
|
93
94
|
function Logo({ href, src }) {
|
|
94
|
-
return (h("a", { class: "logo-link", href: href, "aria-label": "Home" }, h("img", { class: "logo", src: src, alt: "
|
|
95
|
+
return (h("a", { class: "logo-link", href: href, "aria-label": "Home" }, h("img", { class: "logo", src: src, alt: "Warwick Employment Group logo", width: "225", height: "83" })));
|
|
95
96
|
}
|
|
96
97
|
export class WegHeader {
|
|
97
98
|
/**
|
|
@@ -124,6 +125,11 @@ export class WegHeader {
|
|
|
124
125
|
* Defaults to production when omitted.
|
|
125
126
|
*/
|
|
126
127
|
accountBaseUrl;
|
|
128
|
+
/**
|
|
129
|
+
* Current page path from the host application (e.g. `/career-advice/my-article`).
|
|
130
|
+
* Include a query string when matching dropdown links that use search params.
|
|
131
|
+
*/
|
|
132
|
+
currentPath;
|
|
127
133
|
/**
|
|
128
134
|
* Fired when the user clicks Sign in or Sign out.
|
|
129
135
|
* Call `event.preventDefault()` in the host to handle navigation/logout yourself.
|
|
@@ -334,23 +340,56 @@ export class WegHeader {
|
|
|
334
340
|
const name = this.userName?.trim();
|
|
335
341
|
return name || 'Manage Account';
|
|
336
342
|
}
|
|
337
|
-
|
|
338
|
-
return (
|
|
343
|
+
shouldExcludeFromNavActive(item, accountHome) {
|
|
344
|
+
return isSignOutLink(item) || isSignInLink(item, accountHome);
|
|
339
345
|
}
|
|
340
|
-
|
|
341
|
-
return (
|
|
346
|
+
isNavItemActive(href, mode) {
|
|
347
|
+
return isNavLinkActive(this.currentPath ?? '', href, mode);
|
|
342
348
|
}
|
|
343
|
-
|
|
349
|
+
resolveAriaCurrentHref() {
|
|
350
|
+
const accountHome = this.getAccountHome();
|
|
351
|
+
return resolveAriaCurrentNavKey(this.getActiveMenu(), this.currentPath ?? '', (item) => this.shouldExcludeFromNavActive(item, accountHome));
|
|
352
|
+
}
|
|
353
|
+
isAriaCurrentHref(href, ariaCurrentKey) {
|
|
354
|
+
return isAriaCurrentNavHref(href, ariaCurrentKey);
|
|
355
|
+
}
|
|
356
|
+
renderIconNavLink(link, Icon, className, onNavigate, ariaCurrentHref = null) {
|
|
357
|
+
const active = this.isNavItemActive(link.href, 'prefix');
|
|
358
|
+
const ariaCurrent = this.isAriaCurrentHref(link.href, ariaCurrentHref);
|
|
359
|
+
return (h("li", { class: "main-nav__item main-nav__item--auth", key: link.label }, h("a", { class: {
|
|
360
|
+
'sign-in-link': true,
|
|
361
|
+
[className]: true,
|
|
362
|
+
'nav-link--active': active,
|
|
363
|
+
}, href: link.href, "aria-current": ariaCurrent ? 'page' : undefined, onClick: () => onNavigate?.() }, h(Icon, null), link.label)));
|
|
364
|
+
}
|
|
365
|
+
renderFlatNavLink(link, onNavigate, ariaCurrentHref = null) {
|
|
366
|
+
const active = this.isNavItemActive(link.href, 'prefix');
|
|
367
|
+
const ariaCurrent = this.isAriaCurrentHref(link.href, ariaCurrentHref);
|
|
368
|
+
return (h("li", { class: "main-nav__item", key: link.label }, h("a", { class: {
|
|
369
|
+
'nav-link': true,
|
|
370
|
+
'nav-link--active': active,
|
|
371
|
+
}, href: link.href, "aria-current": ariaCurrent ? 'page' : undefined, onClick: () => onNavigate?.() }, link.label)));
|
|
372
|
+
}
|
|
373
|
+
renderMenuGroup(item, onNavigate, ariaCurrentHref = null) {
|
|
344
374
|
const items = item.items ?? [];
|
|
345
375
|
const isOpen = this.openDropdown === item.label;
|
|
346
376
|
const panelId = this.getDropdownPanelId(item.label);
|
|
377
|
+
const groupActive = items.some((child) => this.isNavItemActive(child.href, 'exact'));
|
|
347
378
|
return (h("li", { class: "main-nav__item main-nav__item--dropdown", key: item.label }, h("div", { class: "nav-dropdown", onMouseEnter: () => this.handleDropdownPointerEnter(item.label), onMouseLeave: (event) => this.handleDropdownPointerLeave(event), onFocusout: (event) => this.handleDropdownFocusOut(event, item.label) }, h("button", { type: "button", class: {
|
|
348
379
|
'nav-dropdown__trigger': true,
|
|
349
380
|
'nav-dropdown__trigger--open': isOpen,
|
|
381
|
+
'nav-dropdown__trigger--active': groupActive,
|
|
350
382
|
}, "aria-expanded": isOpen ? 'true' : 'false', "aria-haspopup": "true", "aria-controls": panelId, id: `${panelId}-trigger`, onClick: (event) => this.handleDropdownTriggerClick(event, item.label), onKeyDown: (event) => {
|
|
351
383
|
const container = event.currentTarget.closest('.nav-dropdown');
|
|
352
384
|
this.handleDropdownTriggerKeyDown(event, item.label, container);
|
|
353
|
-
} }, h("span", { class: "nav-dropdown__label" }, item.label), h(ToggleIcon, { expanded: isOpen })), isOpen ? (h("div", { class: "nav-dropdown__panel", id: panelId, role: "region", "aria-labelledby": `${panelId}-trigger`, onMouseEnter: () => this.handleDropdownPanelPointerEnter(item.label), onMouseLeave: (event) => this.handleDropdownPanelPointerLeave(event) }, h("div", { class: "nav-dropdown__accent" }, h("div", { class: "nav-dropdown__links" }, items.map((child) =>
|
|
385
|
+
} }, h("span", { class: "nav-dropdown__label" }, item.label), h(ToggleIcon, { expanded: isOpen })), isOpen ? (h("div", { class: "nav-dropdown__panel", id: panelId, role: "region", "aria-labelledby": `${panelId}-trigger`, onMouseEnter: () => this.handleDropdownPanelPointerEnter(item.label), onMouseLeave: (event) => this.handleDropdownPanelPointerLeave(event) }, h("div", { class: "nav-dropdown__accent" }, h("div", { class: "nav-dropdown__links" }, items.map((child) => {
|
|
386
|
+
const childActive = this.isNavItemActive(child.href, 'exact');
|
|
387
|
+
const ariaCurrent = this.isAriaCurrentHref(child.href, ariaCurrentHref);
|
|
388
|
+
return (h("a", { class: {
|
|
389
|
+
'nav-dropdown__link': true,
|
|
390
|
+
'nav-dropdown__link--active': childActive,
|
|
391
|
+
}, href: child.href, key: `${item.label}:${child.label}`, "aria-current": ariaCurrent ? 'page' : undefined, onClick: () => onNavigate?.() }, child.label));
|
|
392
|
+
}))))) : null)));
|
|
354
393
|
}
|
|
355
394
|
handleAuthClick(event, action, _href, onNavigate) {
|
|
356
395
|
const emitted = this.wegAuthClick.emit({ action });
|
|
@@ -376,18 +415,22 @@ export class WegHeader {
|
|
|
376
415
|
[options.className || '']: !!options.className,
|
|
377
416
|
}, href: link.href, "aria-label": link.label, onClick: (event) => this.handleAuthClick(event, action, link.href, onNavigate) }, h(Icon, null), !iconOnly ? link.label : null, iconOnly ? h("span", { class: "sr-only" }, link.label) : null));
|
|
378
417
|
}
|
|
379
|
-
renderManageAccountAnchor(onNavigate, iconOnly = false) {
|
|
418
|
+
renderManageAccountAnchor(onNavigate, iconOnly = false, ariaCurrentHref = null) {
|
|
380
419
|
const label = this.getManageAccountLabel();
|
|
420
|
+
const href = accountPath(this.getAccountHome(), '/account/manage');
|
|
421
|
+
const active = this.isNavItemActive(href, 'prefix');
|
|
422
|
+
const ariaCurrent = this.isAriaCurrentHref(href, ariaCurrentHref);
|
|
381
423
|
return (h("a", { class: {
|
|
382
424
|
'sign-in-link': !iconOnly,
|
|
383
425
|
'manage-account-link': true,
|
|
384
426
|
'icon-button': iconOnly,
|
|
385
|
-
|
|
427
|
+
'nav-link--active': active,
|
|
428
|
+
}, href: href, "aria-label": label, "aria-current": ariaCurrent ? 'page' : undefined, onClick: () => onNavigate?.() }, h(SignInIcon, null), !iconOnly ? label : null, iconOnly ? h("span", { class: "sr-only" }, label) : null));
|
|
386
429
|
}
|
|
387
|
-
renderNavItem(item, onNavigate) {
|
|
430
|
+
renderNavItem(item, onNavigate, ariaCurrentHref = null) {
|
|
388
431
|
const accountHome = this.getAccountHome();
|
|
389
432
|
if (isMenuGroup(item)) {
|
|
390
|
-
return this.renderMenuGroup(item, onNavigate);
|
|
433
|
+
return this.renderMenuGroup(item, onNavigate, ariaCurrentHref);
|
|
391
434
|
}
|
|
392
435
|
if (isSignOutLink(item)) {
|
|
393
436
|
return (h("li", { class: "main-nav__item main-nav__item--auth", key: "sign-out" }, this.renderAuthControl({ link: item, action: 'sign-out', onNavigate })));
|
|
@@ -396,18 +439,19 @@ export class WegHeader {
|
|
|
396
439
|
return (h("li", { class: "main-nav__item main-nav__item--auth", key: "sign-in" }, this.renderAuthControl({ link: item, action: 'sign-in', onNavigate })));
|
|
397
440
|
}
|
|
398
441
|
if (isManageAccountLink(item, accountHome)) {
|
|
399
|
-
return (h("li", { class: "main-nav__item main-nav__item--auth", key: "manage-account" }, this.renderManageAccountAnchor(onNavigate)));
|
|
442
|
+
return (h("li", { class: "main-nav__item main-nav__item--auth", key: "manage-account" }, this.renderManageAccountAnchor(onNavigate, false, ariaCurrentHref)));
|
|
400
443
|
}
|
|
401
444
|
if (this.signedIn && isFindJobLink(item)) {
|
|
402
|
-
return this.renderIconNavLink(item, FindJobIcon, 'find-a-job-link', onNavigate);
|
|
445
|
+
return this.renderIconNavLink(item, FindJobIcon, 'find-a-job-link', onNavigate, ariaCurrentHref);
|
|
403
446
|
}
|
|
404
447
|
if (this.signedIn && isDashboardLink(item, accountHome)) {
|
|
405
|
-
return this.renderIconNavLink(item, DashboardIcon, 'dashboard-link', onNavigate);
|
|
448
|
+
return this.renderIconNavLink(item, DashboardIcon, 'dashboard-link', onNavigate, ariaCurrentHref);
|
|
406
449
|
}
|
|
407
|
-
return this.renderFlatNavLink(item, onNavigate);
|
|
450
|
+
return this.renderFlatNavLink(item, onNavigate, ariaCurrentHref);
|
|
408
451
|
}
|
|
409
452
|
renderNav(onNavigate) {
|
|
410
|
-
|
|
453
|
+
const ariaCurrentHref = this.resolveAriaCurrentHref();
|
|
454
|
+
return (h("nav", { class: "main-nav", "aria-label": "Main" }, h("ul", { class: "main-nav__list" }, this.getActiveMenu().map((item) => this.renderNavItem(item, onNavigate, ariaCurrentHref)))));
|
|
411
455
|
}
|
|
412
456
|
renderCompactAuth(onNavigate) {
|
|
413
457
|
if (this.signedIn) {
|
|
@@ -428,10 +472,10 @@ export class WegHeader {
|
|
|
428
472
|
const logoSrc = this.getLogoSrc();
|
|
429
473
|
const closeMenu = () => this.closeMenu();
|
|
430
474
|
const mobileMenuActive = this.isMobileMenuActive();
|
|
431
|
-
return (h("header", { key: '
|
|
475
|
+
return (h("header", { key: '6b932d0c3dc20b53292b61fa3403e26e35182d05', class: {
|
|
432
476
|
header: true,
|
|
433
477
|
'header--menu-open': mobileMenuActive,
|
|
434
|
-
} }, h("div", { key: '
|
|
478
|
+
} }, h("div", { key: '426395d6e1245188bc103c8a2f72ccfc3819ba7d', class: "header-inner" }, h("button", { key: 'fe6128407500f5b1a1899aa9e7fdd00222f177b3', 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: 'bb19f9430217686834c4aec615bd7306d276a969', href: logoHref, src: logoSrc }), h("div", { key: 'cebab248840b8412479a90a83c5fc3d0a601476b', class: "header-actions" }, this.renderCompactAuth(mobileMenuActive ? closeMenu : undefined)), h("div", { key: 'c029db0bcd71a9940d93bef5b32e59625f94b76c', 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)))));
|
|
435
479
|
}
|
|
436
480
|
static get is() { return "weg-header"; }
|
|
437
481
|
static get encapsulation() { return "shadow"; }
|
|
@@ -466,7 +510,7 @@ export class WegHeader {
|
|
|
466
510
|
"optional": true,
|
|
467
511
|
"docs": {
|
|
468
512
|
"tags": [],
|
|
469
|
-
"text": "Layout payload, supplied by the host application.\n\nExpected shape:\n```json\n{\n \"header\": {\n \"menu\": [\n { \"label\": \"Find a job\", \"items\": [{ \"label\": \"Graduates\", \"href\": \"...\" }] },\n { \"label\": \"Career advice\", \"href\": \"/career-advice\" },\n { \"label\": \"Sign in\", \"href\": \"/account/login\" }\n ]\n }\n}\n```"
|
|
513
|
+
"text": "Layout payload, supplied by the host application.\r\n\r\nExpected shape:\r\n```json\r\n{\r\n \"header\": {\r\n \"menu\": [\r\n { \"label\": \"Find a job\", \"items\": [{ \"label\": \"Graduates\", \"href\": \"...\" }] },\r\n { \"label\": \"Career advice\", \"href\": \"/career-advice\" },\r\n { \"label\": \"Sign in\", \"href\": \"/account/login\" }\r\n ]\r\n }\r\n}\r\n```"
|
|
470
514
|
},
|
|
471
515
|
"getter": false,
|
|
472
516
|
"setter": false,
|
|
@@ -524,12 +568,31 @@ export class WegHeader {
|
|
|
524
568
|
"optional": true,
|
|
525
569
|
"docs": {
|
|
526
570
|
"tags": [],
|
|
527
|
-
"text": "Account portal origin for sign-in, register, dashboard, and manage-account links.\nDefaults to production when omitted."
|
|
571
|
+
"text": "Account portal origin for sign-in, register, dashboard, and manage-account links.\r\nDefaults to production when omitted."
|
|
528
572
|
},
|
|
529
573
|
"getter": false,
|
|
530
574
|
"setter": false,
|
|
531
575
|
"reflect": false,
|
|
532
576
|
"attribute": "account-base-url"
|
|
577
|
+
},
|
|
578
|
+
"currentPath": {
|
|
579
|
+
"type": "string",
|
|
580
|
+
"mutable": false,
|
|
581
|
+
"complexType": {
|
|
582
|
+
"original": "string",
|
|
583
|
+
"resolved": "string",
|
|
584
|
+
"references": {}
|
|
585
|
+
},
|
|
586
|
+
"required": false,
|
|
587
|
+
"optional": true,
|
|
588
|
+
"docs": {
|
|
589
|
+
"tags": [],
|
|
590
|
+
"text": "Current page path from the host application (e.g. `/career-advice/my-article`).\r\nInclude a query string when matching dropdown links that use search params."
|
|
591
|
+
},
|
|
592
|
+
"getter": false,
|
|
593
|
+
"setter": false,
|
|
594
|
+
"reflect": false,
|
|
595
|
+
"attribute": "current-path"
|
|
533
596
|
}
|
|
534
597
|
};
|
|
535
598
|
}
|
|
@@ -549,7 +612,7 @@ export class WegHeader {
|
|
|
549
612
|
"composed": true,
|
|
550
613
|
"docs": {
|
|
551
614
|
"tags": [],
|
|
552
|
-
"text": "Fired when the user clicks Sign in or Sign out.\nCall `event.preventDefault()` in the host to handle navigation/logout yourself."
|
|
615
|
+
"text": "Fired when the user clicks Sign in or Sign out.\r\nCall `event.preventDefault()` in the host to handle navigation/logout yourself."
|
|
553
616
|
},
|
|
554
617
|
"complexType": {
|
|
555
618
|
"original": "{ action: LayoutHeaderAuthAction }",
|
|
@@ -1,103 +1,104 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Breakpoint tokens (mobile-first min-width).
|
|
3
|
-
*
|
|
4
|
-
* - `@custom-media` names: e.g. `@media (--weg-md)` applies from 960px up.
|
|
5
|
-
* Compiled by PostCSS in stencil.config.ts.
|
|
6
|
-
* - `--weg-breakpoint-*` variables: use in property values, e.g. `max-width: var(--weg-breakpoint-md)`.
|
|
7
|
-
*
|
|
8
|
-
* Import this file in component stylesheets, or rely on shared.css which already imports it.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
:host {
|
|
12
|
-
--weg-breakpoint-sm: 640px;
|
|
13
|
-
--weg-breakpoint-md: 960px;
|
|
14
|
-
--weg-breakpoint-lg: 1280px;
|
|
15
|
-
--weg-breakpoint-xl: 1440px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Shared `.container` utility — source of truth for WEG layout width and gutters.
|
|
20
|
-
*
|
|
21
|
-
* Host apps (e.g. wegcms-v2) should import this file rather than defining `.container` locally:
|
|
22
|
-
* @import "weg-shared-layout/styles/container.css";
|
|
23
|
-
*/
|
|
24
|
-
:root,
|
|
25
|
-
:host {
|
|
26
|
-
--weg-container-breakpoint-sm: 40rem;
|
|
27
|
-
--weg-container-breakpoint-md: 48rem;
|
|
28
|
-
--weg-container-breakpoint-lg: 64rem;
|
|
29
|
-
--weg-container-breakpoint-xl: 80rem;
|
|
30
|
-
--weg-container-breakpoint-2xl: 86rem;
|
|
31
|
-
--weg-container-max-vw: 95vw;
|
|
32
|
-
--weg-container-padding-inline: 1rem;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@media (width >= 48rem) {
|
|
36
|
-
:root,
|
|
37
|
-
:host {
|
|
38
|
-
--weg-container-padding-inline: 2rem;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.container {
|
|
43
|
-
width: 100%;
|
|
44
|
-
max-width: var(--weg-container-max-vw);
|
|
45
|
-
margin-inline: auto;
|
|
46
|
-
padding-inline: var(--weg-container-padding-inline);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@media (width >= 40rem) {
|
|
50
|
-
.container {
|
|
51
|
-
max-width: min(var(--weg-container-breakpoint-sm), var(--weg-container-max-vw));
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@media (width >= 48rem) {
|
|
56
|
-
.container {
|
|
57
|
-
max-width: min(var(--weg-container-breakpoint-md), var(--weg-container-max-vw));
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
@media (width >= 64rem) {
|
|
62
|
-
.container {
|
|
63
|
-
max-width: min(var(--weg-container-breakpoint-lg), var(--weg-container-max-vw));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
@media (width >= 80rem) {
|
|
68
|
-
.container {
|
|
69
|
-
max-width: min(var(--weg-container-breakpoint-xl), var(--weg-container-max-vw));
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
@media (width >= 86rem) {
|
|
74
|
-
.container {
|
|
75
|
-
max-width: min(var(--weg-container-breakpoint-xl), var(--weg-container-max-vw));
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
*,
|
|
81
|
-
*::before,
|
|
82
|
-
*::after {
|
|
83
|
-
box-sizing: border-box;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
:host {
|
|
87
|
-
display: block;
|
|
88
|
-
--weg-font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, 'Apple Color Emoji',
|
|
89
|
-
'Segoe UI Emoji';
|
|
90
|
-
--weg-color-accent: #948eeb;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Breakpoint tokens (mobile-first min-width).
|
|
3
|
+
*
|
|
4
|
+
* - `@custom-media` names: e.g. `@media (--weg-md)` applies from 960px up.
|
|
5
|
+
* Compiled by PostCSS in stencil.config.ts.
|
|
6
|
+
* - `--weg-breakpoint-*` variables: use in property values, e.g. `max-width: var(--weg-breakpoint-md)`.
|
|
7
|
+
*
|
|
8
|
+
* Import this file in component stylesheets, or rely on shared.css which already imports it.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
:host {
|
|
12
|
+
--weg-breakpoint-sm: 640px;
|
|
13
|
+
--weg-breakpoint-md: 960px;
|
|
14
|
+
--weg-breakpoint-lg: 1280px;
|
|
15
|
+
--weg-breakpoint-xl: 1440px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Shared `.container` utility — source of truth for WEG layout width and gutters.
|
|
20
|
+
*
|
|
21
|
+
* Host apps (e.g. wegcms-v2) should import this file rather than defining `.container` locally:
|
|
22
|
+
* @import "weg-shared-layout/styles/container.css";
|
|
23
|
+
*/
|
|
24
|
+
:root,
|
|
25
|
+
:host {
|
|
26
|
+
--weg-container-breakpoint-sm: 40rem;
|
|
27
|
+
--weg-container-breakpoint-md: 48rem;
|
|
28
|
+
--weg-container-breakpoint-lg: 64rem;
|
|
29
|
+
--weg-container-breakpoint-xl: 80rem;
|
|
30
|
+
--weg-container-breakpoint-2xl: 86rem;
|
|
31
|
+
--weg-container-max-vw: 95vw;
|
|
32
|
+
--weg-container-padding-inline: 1rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (width >= 48rem) {
|
|
36
|
+
:root,
|
|
37
|
+
:host {
|
|
38
|
+
--weg-container-padding-inline: 2rem;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.container {
|
|
43
|
+
width: 100%;
|
|
44
|
+
max-width: var(--weg-container-max-vw);
|
|
45
|
+
margin-inline: auto;
|
|
46
|
+
padding-inline: var(--weg-container-padding-inline);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media (width >= 40rem) {
|
|
50
|
+
.container {
|
|
51
|
+
max-width: min(var(--weg-container-breakpoint-sm), var(--weg-container-max-vw));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@media (width >= 48rem) {
|
|
56
|
+
.container {
|
|
57
|
+
max-width: min(var(--weg-container-breakpoint-md), var(--weg-container-max-vw));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@media (width >= 64rem) {
|
|
62
|
+
.container {
|
|
63
|
+
max-width: min(var(--weg-container-breakpoint-lg), var(--weg-container-max-vw));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@media (width >= 80rem) {
|
|
68
|
+
.container {
|
|
69
|
+
max-width: min(var(--weg-container-breakpoint-xl), var(--weg-container-max-vw));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@media (width >= 86rem) {
|
|
74
|
+
.container {
|
|
75
|
+
max-width: min(var(--weg-container-breakpoint-xl), var(--weg-container-max-vw));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
*,
|
|
81
|
+
*::before,
|
|
82
|
+
*::after {
|
|
83
|
+
box-sizing: border-box;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:host {
|
|
87
|
+
display: block;
|
|
88
|
+
--weg-font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, 'Apple Color Emoji',
|
|
89
|
+
'Segoe UI Emoji';
|
|
90
|
+
--weg-color-accent: #948eeb;
|
|
91
|
+
--weg-purple-200: #cdcff8;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.sr-only {
|
|
95
|
+
position: absolute;
|
|
96
|
+
width: 1px;
|
|
97
|
+
height: 1px;
|
|
98
|
+
padding: 0;
|
|
99
|
+
margin: -1px;
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
clip: rect(0, 0, 0, 0);
|
|
102
|
+
white-space: nowrap;
|
|
103
|
+
border: 0;
|
|
104
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
export function normalizeNavPath(path) {
|
|
2
|
+
if (!path?.trim())
|
|
3
|
+
return '/';
|
|
4
|
+
let value = path.trim().toLowerCase().split('#')[0];
|
|
5
|
+
if (value.startsWith('http://') || value.startsWith('https://')) {
|
|
6
|
+
try {
|
|
7
|
+
value = new URL(value).pathname;
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
return '/';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
if (!value.startsWith('/')) {
|
|
14
|
+
value = `/${value}`;
|
|
15
|
+
}
|
|
16
|
+
if (value.length > 1 && value.endsWith('/')) {
|
|
17
|
+
value = value.slice(0, -1);
|
|
18
|
+
}
|
|
19
|
+
return value || '/';
|
|
20
|
+
}
|
|
21
|
+
export function parseCurrentLocation(currentPath) {
|
|
22
|
+
const trimmed = currentPath.trim();
|
|
23
|
+
const queryIndex = trimmed.indexOf('?');
|
|
24
|
+
const pathPart = queryIndex === -1 ? trimmed : trimmed.slice(0, queryIndex);
|
|
25
|
+
const queryPart = queryIndex === -1 ? '' : trimmed.slice(queryIndex + 1).split('#')[0];
|
|
26
|
+
return {
|
|
27
|
+
pathname: normalizeNavPath(pathPart),
|
|
28
|
+
search: queryPart ? `?${queryPart.toLowerCase()}` : '',
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export function parseNavHref(href) {
|
|
32
|
+
const trimmed = href.trim();
|
|
33
|
+
if (!trimmed || trimmed === '#')
|
|
34
|
+
return null;
|
|
35
|
+
try {
|
|
36
|
+
const url = trimmed.startsWith('http://') || trimmed.startsWith('https://')
|
|
37
|
+
? new URL(trimmed)
|
|
38
|
+
: new URL(trimmed, 'http://local');
|
|
39
|
+
return {
|
|
40
|
+
pathname: normalizeNavPath(url.pathname),
|
|
41
|
+
search: url.search.toLowerCase(),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export function isNavLinkActive(currentPath, href, mode = 'prefix') {
|
|
49
|
+
if (!currentPath?.trim() || !href?.trim())
|
|
50
|
+
return false;
|
|
51
|
+
const parsedHref = parseNavHref(href);
|
|
52
|
+
if (!parsedHref)
|
|
53
|
+
return false;
|
|
54
|
+
const current = parseCurrentLocation(currentPath);
|
|
55
|
+
if (parsedHref.search) {
|
|
56
|
+
return current.pathname === parsedHref.pathname && current.search === parsedHref.search;
|
|
57
|
+
}
|
|
58
|
+
if (parsedHref.pathname === '/' || mode === 'exact') {
|
|
59
|
+
return current.pathname === parsedHref.pathname;
|
|
60
|
+
}
|
|
61
|
+
if (current.pathname === parsedHref.pathname)
|
|
62
|
+
return true;
|
|
63
|
+
return current.pathname.startsWith(`${parsedHref.pathname}/`);
|
|
64
|
+
}
|
|
65
|
+
export function getNavLinkMatchScore(currentPath, href, mode = 'prefix') {
|
|
66
|
+
if (!isNavLinkActive(currentPath, href, mode))
|
|
67
|
+
return 0;
|
|
68
|
+
const parsedHref = parseNavHref(href);
|
|
69
|
+
if (!parsedHref)
|
|
70
|
+
return 0;
|
|
71
|
+
let score = parsedHref.pathname.length;
|
|
72
|
+
if (parsedHref.search)
|
|
73
|
+
score += 100;
|
|
74
|
+
if (mode === 'exact')
|
|
75
|
+
score += 50;
|
|
76
|
+
return score;
|
|
77
|
+
}
|
|
78
|
+
export function getNavHrefKey(href) {
|
|
79
|
+
if (!href?.trim())
|
|
80
|
+
return null;
|
|
81
|
+
const parsed = parseNavHref(href);
|
|
82
|
+
if (!parsed)
|
|
83
|
+
return null;
|
|
84
|
+
return `${parsed.pathname}${parsed.search}`;
|
|
85
|
+
}
|
|
86
|
+
export function resolveAriaCurrentNavKey(menu, currentPath, shouldExclude) {
|
|
87
|
+
const trimmedPath = currentPath.trim();
|
|
88
|
+
if (!trimmedPath)
|
|
89
|
+
return null;
|
|
90
|
+
let bestKey = null;
|
|
91
|
+
let bestScore = 0;
|
|
92
|
+
for (const item of menu) {
|
|
93
|
+
if (item.items?.length) {
|
|
94
|
+
for (const child of item.items) {
|
|
95
|
+
if (!child.href || shouldExclude?.(child))
|
|
96
|
+
continue;
|
|
97
|
+
const score = getNavLinkMatchScore(trimmedPath, child.href, 'exact');
|
|
98
|
+
const key = getNavHrefKey(child.href);
|
|
99
|
+
if (key && score > bestScore) {
|
|
100
|
+
bestScore = score;
|
|
101
|
+
bestKey = key;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
if (!item.href || shouldExclude?.(item))
|
|
107
|
+
continue;
|
|
108
|
+
const score = getNavLinkMatchScore(trimmedPath, item.href, 'prefix');
|
|
109
|
+
const key = getNavHrefKey(item.href);
|
|
110
|
+
if (key && score > bestScore) {
|
|
111
|
+
bestScore = score;
|
|
112
|
+
bestKey = key;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return bestKey;
|
|
116
|
+
}
|
|
117
|
+
export function isAriaCurrentNavHref(href, ariaCurrentKey) {
|
|
118
|
+
if (!ariaCurrentKey)
|
|
119
|
+
return false;
|
|
120
|
+
return getNavHrefKey(href) === ariaCurrentKey;
|
|
121
|
+
}
|
|
@@ -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-C9rPQ-RZ.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:"9cee16848dc91bb3a035c51168d02786626cb717",class:"footer"},n("div",{key:"7e5b929cb2ffb5f04b96f34154a0b8320fa6c0c2",class:"container footer__inner"},this.renderSocialLinks(),n("div",{key:"110bebc44f94fd4241675e00a9fb444e933d3311",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-C9rPQ-RZ.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;--weg-purple-200:#cdcff8}.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}
|