weg-shared-layout 0.0.13 → 0.0.14

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.
@@ -2,11 +2,11 @@
2
2
 
3
3
  var index = require('./index-CmiaQ_Dj.js');
4
4
 
5
- const wegFooterCss = () => `:host{display:block}.footer{background:#030712;color:#ffffff;padding:28px 32px;font-family:ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";font-weight:300}.container{max-width:1024px;margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:20px}@media (min-width: 768px){.footer{padding:44px 56px}.container{gap:36px}}.social{display:flex;align-items:center;justify-content:center;gap:16px}@media (min-width: 768px){.social{gap:28px}}.social__link{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;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:48px;height:48px}.footer-link{color:#ffffff;text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px;outline:none}.footer-link:hover{text-decoration-thickness:2px}.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:16px;line-height:24px}@media (min-width: 768px){.legal{font-size:18px;line-height:28px}}.legal__p{margin:0}.standard{width:100%;display:flex;flex-direction:column;align-items:center;gap:36px;text-align:center;font-size:16px;line-height:24px}@media (min-width: 768px){.standard{font-size:18px;line-height:28px}}.standard__links{display:flex;flex-direction:column;align-items:center;gap:16px}@media (min-width: 768px){.standard__links{flex-direction:row;flex-wrap:wrap;justify-content:center;gap:36px}}`;
5
+ const wegFooterCss = () => `:host{display:block}.footer{background:#030712;color:#ffffff;padding:28px 32px;font-family:ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";font-weight:300}.container{max-width:1024px;margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:20px}@media (min-width: 768px){.footer{padding:44px 56px}.container{gap:36px}}.social{display:flex;align-items:center;justify-content:center;gap:16px}@media (min-width: 768px){.social{gap:28px}}.social__link{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;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:48px;height:48px}.footer-link{color:#ffffff;text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px;outline:none}.footer-link:hover{text-decoration-thickness:2px}.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:16px;line-height:24px}@media (min-width: 768px){.legal{font-size:18px;line-height:28px}}.legal__p{margin:0}.standard{width:100%;display:flex;flex-direction:column;align-items:center;gap:36px;text-align:center;font-size:16px;line-height:24px}@media (min-width: 768px){.standard{font-size:18px;line-height:28px}}.columns{width:100%;display:grid;gap:28px 16px;grid-template-columns:1fr}@media (min-width: 640px){.columns{grid-template-columns:repeat(2, minmax(0, 1fr))}}@media (min-width: 768px){.columns{display:flex;flex-direction:row;align-items:stretch;justify-content:center;gap:0}}.columns__col{display:flex;flex:1 1 0;min-width:0;align-items:stretch}@media (max-width: 767px){.columns__col{flex-direction:column}}.columns__divider{display:none;width:1px;background:rgba(255, 255, 255, 0.35);align-self:center;min-height:72px;margin:0 12px;flex-shrink:0}@media (min-width: 768px){.columns__divider{display:block}}.columns__links{display:flex;flex-direction:column;align-items:flex-start;gap:12px;flex:1;min-width:0;padding:0 4px;text-align:left}@media (min-width: 768px){.columns__links{padding:0 12px}}`;
6
6
 
7
7
  const EMPTY_FOOTER = {
8
8
  social: [],
9
- standardLinks: [],
9
+ columns: [],
10
10
  credits: '',
11
11
  copyright: '',
12
12
  };
@@ -62,7 +62,24 @@ function normalizeLinks(input) {
62
62
  continue;
63
63
  if (!isNonEmptyString(href))
64
64
  continue;
65
- result.push({ label: label.trim(), href: href.trim() });
65
+ result.push({
66
+ label: label.trim(),
67
+ href: href.trim(),
68
+ });
69
+ }
70
+ return result;
71
+ }
72
+ function normalizeColumns(input) {
73
+ if (!Array.isArray(input))
74
+ return [];
75
+ const result = [];
76
+ for (const item of input) {
77
+ if (!item || typeof item !== 'object')
78
+ continue;
79
+ const links = normalizeLinks(item.links);
80
+ if (links.length === 0)
81
+ continue;
82
+ result.push({ links });
66
83
  }
67
84
  return result;
68
85
  }
@@ -71,13 +88,15 @@ function normalizeFooterData(input) {
71
88
  const footer = (root.footer && typeof root.footer === 'object' ? root.footer : {});
72
89
  return {
73
90
  social: normalizeSocialLinks(footer?.social),
74
- standardLinks: normalizeLinks(footer?.standardLinks),
91
+ columns: normalizeColumns(footer?.columns),
75
92
  credits: isNonEmptyString(footer?.credits) ? footer.credits.trim() : '',
76
93
  copyright: isNonEmptyString(footer?.copyright) ? footer.copyright.trim() : '',
77
94
  };
78
95
  }
96
+ function linkOpensNewTab(link) {
97
+ return isExternalHref(link.href);
98
+ }
79
99
  function SocialIcon({ platform }) {
80
- // Inline SVGs keep the component framework-agnostic and avoid additional bundling concerns.
81
100
  const common = {
82
101
  viewBox: '0 0 48 48',
83
102
  width: 48,
@@ -116,7 +135,7 @@ const WegFooter = class {
116
135
  * {
117
136
  * "footer": {
118
137
  * "social": [{ "platform": "LinkedIn", "href": "https://..." }],
119
- * "standardLinks": [{ "label": "About Us", "href": "/about" }],
138
+ * "columns": [{ "links": [{ "label": "About Us", "href": "/about" }] }],
120
139
  * "credits": "...",
121
140
  * "copyright": "..."
122
141
  * }
@@ -150,14 +169,14 @@ const WegFooter = class {
150
169
  return null;
151
170
  return (index.h("div", { class: "social" }, links.map((l) => (index.h("a", { class: "social__link", href: l.href, "aria-label": l.platform, target: isExternalHref(l.href) ? '_blank' : undefined, rel: isExternalHref(l.href) ? 'noreferrer noopener' : undefined }, index.h("span", { class: "social__icon", "aria-hidden": "true" }, index.h(SocialIcon, { platform: l.platform })))))));
152
171
  }
153
- renderStandardLinks() {
154
- const links = this.resolved.standardLinks;
155
- if (links.length === 0)
172
+ renderColumns() {
173
+ const columns = this.resolved.columns;
174
+ if (columns.length === 0)
156
175
  return null;
157
- return (index.h("div", { class: "standard__links" }, links.map((l) => (index.h("a", { class: "footer-link", href: l.href }, l.label)))));
176
+ return (index.h("div", { class: "columns" }, columns.map((column, columnIndex) => (index.h("div", { class: "columns__col", key: columnIndex }, columnIndex > 0 ? index.h("div", { class: "columns__divider", "aria-hidden": "true" }) : null, index.h("nav", { class: "columns__links", "aria-label": `Footer links column ${columnIndex + 1}` }, column.links.map((l, linkIndex) => (index.h("a", { class: "footer-link", href: l.href, key: linkIndex, target: linkOpensNewTab(l) ? '_blank' : undefined, rel: linkOpensNewTab(l) ? 'noreferrer noopener' : undefined }, l.label)))))))));
158
177
  }
159
178
  render() {
160
- return (index.h("footer", { key: 'ba9a2b07235bbad73f4f2aea762af917249f621b', class: "footer" }, index.h("div", { key: '88a8a9de95c09bf4c5524fc942976b7ababe110d', class: "container" }, this.renderSocialLinks(), index.h("div", { key: '2a21b07909bcb975c4bade8a291b050d83d52e8c', class: "standard" }, this.renderStandardLinks(), this.renderLegalText()))));
179
+ return (index.h("footer", { key: '6aea0fd57f4ce816f31975b4b62638000370f0f0', class: "footer" }, index.h("div", { key: '56a87925be4d1c19cd1020224297c135368d17b1', class: "container" }, this.renderSocialLinks(), index.h("div", { key: 'c3e8c38bf81ea81326d74b0fdd66421eb397a300', class: "standard" }, this.renderColumns(), this.renderLegalText()))));
161
180
  }
162
181
  static get watchers() { return {
163
182
  "layout": [{
@@ -124,18 +124,71 @@
124
124
  }
125
125
  }
126
126
 
127
- .standard__links {
128
- display: flex;
129
- flex-direction: column;
130
- align-items: center;
131
- gap: 16px;
127
+ .columns {
128
+ width: 100%;
129
+ display: grid;
130
+ gap: 28px 16px;
131
+ grid-template-columns: 1fr;
132
+ }
133
+
134
+ @media (min-width: 640px) {
135
+ .columns {
136
+ grid-template-columns: repeat(2, minmax(0, 1fr));
137
+ }
132
138
  }
133
139
 
134
140
  @media (min-width: 768px) {
135
- .standard__links {
141
+ .columns {
142
+ display: flex;
136
143
  flex-direction: row;
137
- flex-wrap: wrap;
144
+ align-items: stretch;
138
145
  justify-content: center;
139
- gap: 36px;
146
+ gap: 0;
147
+ }
148
+ }
149
+
150
+ .columns__col {
151
+ display: flex;
152
+ flex: 1 1 0;
153
+ min-width: 0;
154
+ align-items: stretch;
155
+ }
156
+
157
+ @media (max-width: 767px) {
158
+ .columns__col {
159
+ flex-direction: column;
160
+ }
161
+ }
162
+
163
+ .columns__divider {
164
+ display: none;
165
+ width: 1px;
166
+ background: rgba(255, 255, 255, 0.35);
167
+ align-self: center;
168
+ min-height: 72px;
169
+ margin: 0 12px;
170
+ flex-shrink: 0;
171
+ }
172
+
173
+ @media (min-width: 768px) {
174
+ .columns__divider {
175
+ display: block;
176
+ }
177
+ }
178
+
179
+ .columns__links {
180
+ display: flex;
181
+ flex-direction: column;
182
+ align-items: flex-start;
183
+ gap: 12px;
184
+ flex: 1;
185
+ min-width: 0;
186
+ padding: 0 4px;
187
+ text-align: left;
188
+ }
189
+
190
+ @media (min-width: 768px) {
191
+ .columns__links {
192
+ padding: 0 12px;
140
193
  }
141
194
  }
@@ -1,7 +1,7 @@
1
1
  import { h } from "@stencil/core";
2
2
  const EMPTY_FOOTER = {
3
3
  social: [],
4
- standardLinks: [],
4
+ columns: [],
5
5
  credits: '',
6
6
  copyright: '',
7
7
  };
@@ -57,7 +57,24 @@ function normalizeLinks(input) {
57
57
  continue;
58
58
  if (!isNonEmptyString(href))
59
59
  continue;
60
- result.push({ label: label.trim(), href: href.trim() });
60
+ result.push({
61
+ label: label.trim(),
62
+ href: href.trim(),
63
+ });
64
+ }
65
+ return result;
66
+ }
67
+ function normalizeColumns(input) {
68
+ if (!Array.isArray(input))
69
+ return [];
70
+ const result = [];
71
+ for (const item of input) {
72
+ if (!item || typeof item !== 'object')
73
+ continue;
74
+ const links = normalizeLinks(item.links);
75
+ if (links.length === 0)
76
+ continue;
77
+ result.push({ links });
61
78
  }
62
79
  return result;
63
80
  }
@@ -66,13 +83,15 @@ function normalizeFooterData(input) {
66
83
  const footer = (root.footer && typeof root.footer === 'object' ? root.footer : {});
67
84
  return {
68
85
  social: normalizeSocialLinks(footer?.social),
69
- standardLinks: normalizeLinks(footer?.standardLinks),
86
+ columns: normalizeColumns(footer?.columns),
70
87
  credits: isNonEmptyString(footer?.credits) ? footer.credits.trim() : '',
71
88
  copyright: isNonEmptyString(footer?.copyright) ? footer.copyright.trim() : '',
72
89
  };
73
90
  }
91
+ function linkOpensNewTab(link) {
92
+ return isExternalHref(link.href);
93
+ }
74
94
  function SocialIcon({ platform }) {
75
- // Inline SVGs keep the component framework-agnostic and avoid additional bundling concerns.
76
95
  const common = {
77
96
  viewBox: '0 0 48 48',
78
97
  width: 48,
@@ -108,7 +127,7 @@ export class WegFooter {
108
127
  * {
109
128
  * "footer": {
110
129
  * "social": [{ "platform": "LinkedIn", "href": "https://..." }],
111
- * "standardLinks": [{ "label": "About Us", "href": "/about" }],
130
+ * "columns": [{ "links": [{ "label": "About Us", "href": "/about" }] }],
112
131
  * "credits": "...",
113
132
  * "copyright": "..."
114
133
  * }
@@ -142,14 +161,14 @@ export class WegFooter {
142
161
  return null;
143
162
  return (h("div", { class: "social" }, links.map((l) => (h("a", { class: "social__link", href: l.href, "aria-label": l.platform, target: isExternalHref(l.href) ? '_blank' : undefined, rel: isExternalHref(l.href) ? 'noreferrer noopener' : undefined }, h("span", { class: "social__icon", "aria-hidden": "true" }, h(SocialIcon, { platform: l.platform })))))));
144
163
  }
145
- renderStandardLinks() {
146
- const links = this.resolved.standardLinks;
147
- if (links.length === 0)
164
+ renderColumns() {
165
+ const columns = this.resolved.columns;
166
+ if (columns.length === 0)
148
167
  return null;
149
- return (h("div", { class: "standard__links" }, links.map((l) => (h("a", { class: "footer-link", href: l.href }, l.label)))));
168
+ return (h("div", { class: "columns" }, columns.map((column, columnIndex) => (h("div", { class: "columns__col", key: columnIndex }, columnIndex > 0 ? h("div", { class: "columns__divider", "aria-hidden": "true" }) : null, h("nav", { class: "columns__links", "aria-label": `Footer links column ${columnIndex + 1}` }, column.links.map((l, linkIndex) => (h("a", { class: "footer-link", href: l.href, key: linkIndex, target: linkOpensNewTab(l) ? '_blank' : undefined, rel: linkOpensNewTab(l) ? 'noreferrer noopener' : undefined }, l.label)))))))));
150
169
  }
151
170
  render() {
152
- return (h("footer", { key: 'ba9a2b07235bbad73f4f2aea762af917249f621b', class: "footer" }, h("div", { key: '88a8a9de95c09bf4c5524fc942976b7ababe110d', class: "container" }, this.renderSocialLinks(), h("div", { key: '2a21b07909bcb975c4bade8a291b050d83d52e8c', class: "standard" }, this.renderStandardLinks(), this.renderLegalText()))));
171
+ return (h("footer", { key: '6aea0fd57f4ce816f31975b4b62638000370f0f0', class: "footer" }, h("div", { key: '56a87925be4d1c19cd1020224297c135368d17b1', class: "container" }, this.renderSocialLinks(), h("div", { key: 'c3e8c38bf81ea81326d74b0fdd66421eb397a300', class: "standard" }, this.renderColumns(), this.renderLegalText()))));
153
172
  }
154
173
  static get is() { return "weg-footer"; }
155
174
  static get encapsulation() { return "shadow"; }
@@ -170,11 +189,13 @@ export class WegFooter {
170
189
  "mutable": false,
171
190
  "complexType": {
172
191
  "original": "LayoutData | string",
173
- "resolved": "string | { header?: unknown; footer?: Partial<{ social: unknown; standardLinks: unknown; credits: unknown; copyright: unknown; }>; }",
192
+ "resolved": "string | { header?: unknown; footer?: Partial<{ social: unknown; columns: unknown; credits: unknown; copyright: unknown; }>; }",
174
193
  "references": {
175
194
  "LayoutData": {
176
- "location": "global",
177
- "id": "global::LayoutData"
195
+ "location": "import",
196
+ "path": "../../types/layout-data",
197
+ "id": "src/types/layout-data.ts::LayoutData",
198
+ "referenceLocation": "LayoutData"
178
199
  }
179
200
  }
180
201
  },
@@ -182,7 +203,7 @@ export class WegFooter {
182
203
  "optional": true,
183
204
  "docs": {
184
205
  "tags": [],
185
- "text": "Layout payload, supplied by the host application.\n\nIn JS / framework templates, pass the object directly (e.g. Angular\n`[layout]=\"layoutData\"`, React `layout={layoutData}`, vanilla\n`el.layout = layoutData`).\n\nIn plain HTML, pass the same JSON as a string on the `layout` attribute.\n\nExpected shape:\n```json\n{\n \"footer\": {\n \"social\": [{ \"platform\": \"LinkedIn\", \"href\": \"https://...\" }],\n \"standardLinks\": [{ \"label\": \"About Us\", \"href\": \"/about\" }],\n \"credits\": \"...\",\n \"copyright\": \"...\"\n }\n}\n```"
206
+ "text": "Layout payload, supplied by the host application.\n\nIn JS / framework templates, pass the object directly (e.g. Angular\n`[layout]=\"layoutData\"`, React `layout={layoutData}`, vanilla\n`el.layout = layoutData`).\n\nIn plain HTML, pass the same JSON as a string on the `layout` attribute.\n\nExpected shape:\n```json\n{\n \"footer\": {\n \"social\": [{ \"platform\": \"LinkedIn\", \"href\": \"https://...\" }],\n \"columns\": [{ \"links\": [{ \"label\": \"About Us\", \"href\": \"/about\" }] }],\n \"credits\": \"...\",\n \"copyright\": \"...\"\n }\n}\n```"
186
207
  },
187
208
  "getter": false,
188
209
  "setter": false,
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1 @@
1
- import{t,p as e,H as i,h as n}from"./p-BTQYW5OR.js";const o={social:[],standardLinks:[],credits:"",copyright:""};function a(t){return/^https?:\/\//.test(t)}function s(t){return"string"==typeof t&&t.trim().length>0}function r(t){return"LinkedIn"===t||"Instagram"===t||"TikTok"===t||"YouTube"===t}function l(t){if(!Array.isArray(t))return[];const e=[];for(const i of t){if(!i||"object"!=typeof i)continue;const t=i.platform,n=i.href;r(t)&&s(n)&&e.push({platform:t,href:n.trim()})}return e}function c(t){if(!Array.isArray(t))return[];const e=[];for(const i of t){if(!i||"object"!=typeof i)continue;const t=i.label,n=i.href;s(t)&&s(n)&&e.push({label:t.trim(),href:n.trim()})}return e}function C({platform:t}){const e={viewBox:"0 0 48 48",width:48,height:48,fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false"};switch(t){case"LinkedIn":return n("svg",{...e},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",{...e},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",{...e},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",{...e},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 f=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}layout;resolved=o;resolve(){this.resolved=null!=this.layout?function(t){const e=t&&"object"==typeof t?t:{},i=e.footer&&"object"==typeof e.footer?e.footer:{};return{social:l(i?.social),standardLinks:c(i?.standardLinks),credits:s(i?.credits)?i.credits.trim():"",copyright:s(i?.copyright)?i.copyright.trim():""}}(function(t){if("string"!=typeof t)return t;const e=t.trim();if(e)try{return JSON.parse(e)}catch{return}}(this.layout)):o}componentWillLoad(){this.resolve()}watchLayout(){this.resolve()}renderLegalText(){const{credits:t,copyright:e}=this.resolved;return t||e?n("div",{class:"legal"},t?n("p",{class:"legal__p"},t):null,t&&e?n("p",{class:"legal__p"},"​"):null,e?n("p",{class:"legal__p"},e):null):null}renderSocialLinks(){const t=this.resolved.social;return 0===t.length?null:n("div",{class:"social"},t.map((t=>n("a",{class:"social__link",href:t.href,"aria-label":t.platform,target:a(t.href)?"_blank":void 0,rel:a(t.href)?"noreferrer noopener":void 0},n("span",{class:"social__icon","aria-hidden":"true"},n(C,{platform:t.platform}))))))}renderStandardLinks(){const t=this.resolved.standardLinks;return 0===t.length?null:n("div",{class:"standard__links"},t.map((t=>n("a",{class:"footer-link",href:t.href},t.label))))}render(){return n("footer",{key:"ba9a2b07235bbad73f4f2aea762af917249f621b",class:"footer"},n("div",{key:"88a8a9de95c09bf4c5524fc942976b7ababe110d",class:"container"},this.renderSocialLinks(),n("div",{key:"2a21b07909bcb975c4bade8a291b050d83d52e8c",class:"standard"},this.renderStandardLinks(),this.renderLegalText())))}static get watchers(){return{layout:[{watchLayout:0}]}}static get style(){return':host{display:block}.footer{background:#030712;color:#ffffff;padding:28px 32px;font-family:ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";font-weight:300}.container{max-width:1024px;margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:20px}@media (min-width: 768px){.footer{padding:44px 56px}.container{gap:36px}}.social{display:flex;align-items:center;justify-content:center;gap:16px}@media (min-width: 768px){.social{gap:28px}}.social__link{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;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:48px;height:48px}.footer-link{color:#ffffff;text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px;outline:none}.footer-link:hover{text-decoration-thickness:2px}.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:16px;line-height:24px}@media (min-width: 768px){.legal{font-size:18px;line-height:28px}}.legal__p{margin:0}.standard{width:100%;display:flex;flex-direction:column;align-items:center;gap:36px;text-align:center;font-size:16px;line-height:24px}@media (min-width: 768px){.standard{font-size:18px;line-height:28px}}.standard__links{display:flex;flex-direction:column;align-items:center;gap:16px}@media (min-width: 768px){.standard__links{flex-direction:row;flex-wrap:wrap;justify-content:center;gap:36px}}'}},[513,"weg-footer",{layout:[1],resolved:[32]},void 0,{layout:[{watchLayout:0}]}]);function d(){"undefined"!=typeof customElements&&["weg-footer"].forEach((e=>{"weg-footer"===e&&(customElements.get(t(e))||customElements.define(t(e),f))}))}d();const p=f,u=d;export{p as WegFooter,u as defineCustomElement}
1
+ import{t as e,p as t,H as i,h as n}from"./p-BTQYW5OR.js";const o={social:[],columns:[],credits:"",copyright:""};function l(e){return/^https?:\/\//.test(e)}function s(e){return"string"==typeof e&&e.trim().length>0}function r(e){return"LinkedIn"===e||"Instagram"===e||"TikTok"===e||"YouTube"===e}function a(e){if(!Array.isArray(e))return[];const t=[];for(const i of e){if(!i||"object"!=typeof i)continue;const e=i.platform,n=i.href;r(e)&&s(n)&&t.push({platform:e,href:n.trim()})}return t}function c(e){if(!Array.isArray(e))return[];const t=[];for(const i of e){if(!i||"object"!=typeof i)continue;const e=i.label,n=i.href;s(e)&&s(n)&&t.push({label:e.trim(),href:n.trim()})}return t}function d(e){if(!Array.isArray(e))return[];const t=[];for(const i of e){if(!i||"object"!=typeof i)continue;const e=c(i.links);0!==e.length&&t.push({links:e})}return t}function f(e){return l(e.href)}function p({platform:e}){const t={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",{...t},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",{...t},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",{...t},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",{...t},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 u=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}layout;resolved=o;resolve(){this.resolved=null!=this.layout?function(e){const t=e&&"object"==typeof e?e:{},i=t.footer&&"object"==typeof t.footer?t.footer:{};return{social:a(i?.social),columns:d(i?.columns),credits:s(i?.credits)?i.credits.trim():"",copyright:s(i?.copyright)?i.copyright.trim():""}}(function(e){if("string"!=typeof e)return e;const t=e.trim();if(t)try{return JSON.parse(t)}catch{return}}(this.layout)):o}componentWillLoad(){this.resolve()}watchLayout(){this.resolve()}renderLegalText(){const{credits:e,copyright:t}=this.resolved;return e||t?n("div",{class:"legal"},e?n("p",{class:"legal__p"},e):null,e&&t?n("p",{class:"legal__p"},"​"):null,t?n("p",{class:"legal__p"},t):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:l(e.href)?"_blank":void 0,rel:l(e.href)?"noreferrer noopener":void 0},n("span",{class:"social__icon","aria-hidden":"true"},n(p,{platform:e.platform}))))))}renderColumns(){const e=this.resolved.columns;return 0===e.length?null:n("div",{class:"columns"},e.map(((e,t)=>n("div",{class:"columns__col",key:t},t>0?n("div",{class:"columns__divider","aria-hidden":"true"}):null,n("nav",{class:"columns__links","aria-label":"Footer links column "+(t+1)},e.links.map(((e,t)=>n("a",{class:"footer-link",href:e.href,key:t,target:f(e)?"_blank":void 0,rel:f(e)?"noreferrer noopener":void 0},e.label))))))))}render(){return n("footer",{key:"6aea0fd57f4ce816f31975b4b62638000370f0f0",class:"footer"},n("div",{key:"56a87925be4d1c19cd1020224297c135368d17b1",class:"container"},this.renderSocialLinks(),n("div",{key:"c3e8c38bf81ea81326d74b0fdd66421eb397a300",class:"standard"},this.renderColumns(),this.renderLegalText())))}static get watchers(){return{layout:[{watchLayout:0}]}}static get style(){return':host{display:block}.footer{background:#030712;color:#ffffff;padding:28px 32px;font-family:ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";font-weight:300}.container{max-width:1024px;margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:20px}@media (min-width: 768px){.footer{padding:44px 56px}.container{gap:36px}}.social{display:flex;align-items:center;justify-content:center;gap:16px}@media (min-width: 768px){.social{gap:28px}}.social__link{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;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:48px;height:48px}.footer-link{color:#ffffff;text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px;outline:none}.footer-link:hover{text-decoration-thickness:2px}.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:16px;line-height:24px}@media (min-width: 768px){.legal{font-size:18px;line-height:28px}}.legal__p{margin:0}.standard{width:100%;display:flex;flex-direction:column;align-items:center;gap:36px;text-align:center;font-size:16px;line-height:24px}@media (min-width: 768px){.standard{font-size:18px;line-height:28px}}.columns{width:100%;display:grid;gap:28px 16px;grid-template-columns:1fr}@media (min-width: 640px){.columns{grid-template-columns:repeat(2, minmax(0, 1fr))}}@media (min-width: 768px){.columns{display:flex;flex-direction:row;align-items:stretch;justify-content:center;gap:0}}.columns__col{display:flex;flex:1 1 0;min-width:0;align-items:stretch}@media (max-width: 767px){.columns__col{flex-direction:column}}.columns__divider{display:none;width:1px;background:rgba(255, 255, 255, 0.35);align-self:center;min-height:72px;margin:0 12px;flex-shrink:0}@media (min-width: 768px){.columns__divider{display:block}}.columns__links{display:flex;flex-direction:column;align-items:flex-start;gap:12px;flex:1;min-width:0;padding:0 4px;text-align:left}@media (min-width: 768px){.columns__links{padding:0 12px}}'}},[513,"weg-footer",{layout:[1],resolved:[32]},void 0,{layout:[{watchLayout:0}]}]);function C(){"undefined"!=typeof customElements&&["weg-footer"].forEach((t=>{"weg-footer"===t&&(customElements.get(e(t))||customElements.define(e(t),u))}))}C();const h=u,x=C;export{h as WegFooter,x as defineCustomElement}
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, h } from './index-QiJxC4Ow.js';
2
2
 
3
- const wegFooterCss = () => `:host{display:block}.footer{background:#030712;color:#ffffff;padding:28px 32px;font-family:ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";font-weight:300}.container{max-width:1024px;margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:20px}@media (min-width: 768px){.footer{padding:44px 56px}.container{gap:36px}}.social{display:flex;align-items:center;justify-content:center;gap:16px}@media (min-width: 768px){.social{gap:28px}}.social__link{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;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:48px;height:48px}.footer-link{color:#ffffff;text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px;outline:none}.footer-link:hover{text-decoration-thickness:2px}.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:16px;line-height:24px}@media (min-width: 768px){.legal{font-size:18px;line-height:28px}}.legal__p{margin:0}.standard{width:100%;display:flex;flex-direction:column;align-items:center;gap:36px;text-align:center;font-size:16px;line-height:24px}@media (min-width: 768px){.standard{font-size:18px;line-height:28px}}.standard__links{display:flex;flex-direction:column;align-items:center;gap:16px}@media (min-width: 768px){.standard__links{flex-direction:row;flex-wrap:wrap;justify-content:center;gap:36px}}`;
3
+ const wegFooterCss = () => `:host{display:block}.footer{background:#030712;color:#ffffff;padding:28px 32px;font-family:ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";font-weight:300}.container{max-width:1024px;margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:20px}@media (min-width: 768px){.footer{padding:44px 56px}.container{gap:36px}}.social{display:flex;align-items:center;justify-content:center;gap:16px}@media (min-width: 768px){.social{gap:28px}}.social__link{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;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:48px;height:48px}.footer-link{color:#ffffff;text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px;outline:none}.footer-link:hover{text-decoration-thickness:2px}.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:16px;line-height:24px}@media (min-width: 768px){.legal{font-size:18px;line-height:28px}}.legal__p{margin:0}.standard{width:100%;display:flex;flex-direction:column;align-items:center;gap:36px;text-align:center;font-size:16px;line-height:24px}@media (min-width: 768px){.standard{font-size:18px;line-height:28px}}.columns{width:100%;display:grid;gap:28px 16px;grid-template-columns:1fr}@media (min-width: 640px){.columns{grid-template-columns:repeat(2, minmax(0, 1fr))}}@media (min-width: 768px){.columns{display:flex;flex-direction:row;align-items:stretch;justify-content:center;gap:0}}.columns__col{display:flex;flex:1 1 0;min-width:0;align-items:stretch}@media (max-width: 767px){.columns__col{flex-direction:column}}.columns__divider{display:none;width:1px;background:rgba(255, 255, 255, 0.35);align-self:center;min-height:72px;margin:0 12px;flex-shrink:0}@media (min-width: 768px){.columns__divider{display:block}}.columns__links{display:flex;flex-direction:column;align-items:flex-start;gap:12px;flex:1;min-width:0;padding:0 4px;text-align:left}@media (min-width: 768px){.columns__links{padding:0 12px}}`;
4
4
 
5
5
  const EMPTY_FOOTER = {
6
6
  social: [],
7
- standardLinks: [],
7
+ columns: [],
8
8
  credits: '',
9
9
  copyright: '',
10
10
  };
@@ -60,7 +60,24 @@ function normalizeLinks(input) {
60
60
  continue;
61
61
  if (!isNonEmptyString(href))
62
62
  continue;
63
- result.push({ label: label.trim(), href: href.trim() });
63
+ result.push({
64
+ label: label.trim(),
65
+ href: href.trim(),
66
+ });
67
+ }
68
+ return result;
69
+ }
70
+ function normalizeColumns(input) {
71
+ if (!Array.isArray(input))
72
+ return [];
73
+ const result = [];
74
+ for (const item of input) {
75
+ if (!item || typeof item !== 'object')
76
+ continue;
77
+ const links = normalizeLinks(item.links);
78
+ if (links.length === 0)
79
+ continue;
80
+ result.push({ links });
64
81
  }
65
82
  return result;
66
83
  }
@@ -69,13 +86,15 @@ function normalizeFooterData(input) {
69
86
  const footer = (root.footer && typeof root.footer === 'object' ? root.footer : {});
70
87
  return {
71
88
  social: normalizeSocialLinks(footer?.social),
72
- standardLinks: normalizeLinks(footer?.standardLinks),
89
+ columns: normalizeColumns(footer?.columns),
73
90
  credits: isNonEmptyString(footer?.credits) ? footer.credits.trim() : '',
74
91
  copyright: isNonEmptyString(footer?.copyright) ? footer.copyright.trim() : '',
75
92
  };
76
93
  }
94
+ function linkOpensNewTab(link) {
95
+ return isExternalHref(link.href);
96
+ }
77
97
  function SocialIcon({ platform }) {
78
- // Inline SVGs keep the component framework-agnostic and avoid additional bundling concerns.
79
98
  const common = {
80
99
  viewBox: '0 0 48 48',
81
100
  width: 48,
@@ -114,7 +133,7 @@ const WegFooter = class {
114
133
  * {
115
134
  * "footer": {
116
135
  * "social": [{ "platform": "LinkedIn", "href": "https://..." }],
117
- * "standardLinks": [{ "label": "About Us", "href": "/about" }],
136
+ * "columns": [{ "links": [{ "label": "About Us", "href": "/about" }] }],
118
137
  * "credits": "...",
119
138
  * "copyright": "..."
120
139
  * }
@@ -148,14 +167,14 @@ const WegFooter = class {
148
167
  return null;
149
168
  return (h("div", { class: "social" }, links.map((l) => (h("a", { class: "social__link", href: l.href, "aria-label": l.platform, target: isExternalHref(l.href) ? '_blank' : undefined, rel: isExternalHref(l.href) ? 'noreferrer noopener' : undefined }, h("span", { class: "social__icon", "aria-hidden": "true" }, h(SocialIcon, { platform: l.platform })))))));
150
169
  }
151
- renderStandardLinks() {
152
- const links = this.resolved.standardLinks;
153
- if (links.length === 0)
170
+ renderColumns() {
171
+ const columns = this.resolved.columns;
172
+ if (columns.length === 0)
154
173
  return null;
155
- return (h("div", { class: "standard__links" }, links.map((l) => (h("a", { class: "footer-link", href: l.href }, l.label)))));
174
+ return (h("div", { class: "columns" }, columns.map((column, columnIndex) => (h("div", { class: "columns__col", key: columnIndex }, columnIndex > 0 ? h("div", { class: "columns__divider", "aria-hidden": "true" }) : null, h("nav", { class: "columns__links", "aria-label": `Footer links column ${columnIndex + 1}` }, column.links.map((l, linkIndex) => (h("a", { class: "footer-link", href: l.href, key: linkIndex, target: linkOpensNewTab(l) ? '_blank' : undefined, rel: linkOpensNewTab(l) ? 'noreferrer noopener' : undefined }, l.label)))))))));
156
175
  }
157
176
  render() {
158
- return (h("footer", { key: 'ba9a2b07235bbad73f4f2aea762af917249f621b', class: "footer" }, h("div", { key: '88a8a9de95c09bf4c5524fc942976b7ababe110d', class: "container" }, this.renderSocialLinks(), h("div", { key: '2a21b07909bcb975c4bade8a291b050d83d52e8c', class: "standard" }, this.renderStandardLinks(), this.renderLegalText()))));
177
+ return (h("footer", { key: '6aea0fd57f4ce816f31975b4b62638000370f0f0', class: "footer" }, h("div", { key: '56a87925be4d1c19cd1020224297c135368d17b1', class: "container" }, this.renderSocialLinks(), h("div", { key: 'c3e8c38bf81ea81326d74b0fdd66421eb397a300', class: "standard" }, this.renderColumns(), this.renderLegalText()))));
159
178
  }
160
179
  static get watchers() { return {
161
180
  "layout": [{
@@ -1,12 +1,4 @@
1
- type LayoutData = {
2
- header?: unknown;
3
- footer?: Partial<{
4
- social: unknown;
5
- standardLinks: unknown;
6
- credits: unknown;
7
- copyright: unknown;
8
- }>;
9
- };
1
+ import type { LayoutData } from '../../types/layout-data';
10
2
  export declare class WegFooter {
11
3
  /**
12
4
  * Layout payload, supplied by the host application.
@@ -22,7 +14,7 @@ export declare class WegFooter {
22
14
  * {
23
15
  * "footer": {
24
16
  * "social": [{ "platform": "LinkedIn", "href": "https://..." }],
25
- * "standardLinks": [{ "label": "About Us", "href": "/about" }],
17
+ * "columns": [{ "links": [{ "label": "About Us", "href": "/about" }] }],
26
18
  * "credits": "...",
27
19
  * "copyright": "..."
28
20
  * }
@@ -36,7 +28,6 @@ export declare class WegFooter {
36
28
  protected watchLayout(): void;
37
29
  private renderLegalText;
38
30
  private renderSocialLinks;
39
- private renderStandardLinks;
31
+ private renderColumns;
40
32
  render(): any;
41
33
  }
42
- export {};
@@ -5,6 +5,8 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ import { LayoutData } from "./types/layout-data";
9
+ export { LayoutData } from "./types/layout-data";
8
10
  export namespace Components {
9
11
  interface MyComponent {
10
12
  /**
@@ -22,7 +24,7 @@ export namespace Components {
22
24
  }
23
25
  interface WegFooter {
24
26
  /**
25
- * Layout payload, supplied by the host application. In JS / framework templates, pass the object directly (e.g. Angular `[layout]="layoutData"`, React `layout={layoutData}`, vanilla `el.layout = layoutData`). In plain HTML, pass the same JSON as a string on the `layout` attribute. Expected shape: ```json { "footer": { "social": [{ "platform": "LinkedIn", "href": "https://..." }], "standardLinks": [{ "label": "About Us", "href": "/about" }], "credits": "...", "copyright": "..." } } ```
27
+ * Layout payload, supplied by the host application. In JS / framework templates, pass the object directly (e.g. Angular `[layout]="layoutData"`, React `layout={layoutData}`, vanilla `el.layout = layoutData`). In plain HTML, pass the same JSON as a string on the `layout` attribute. Expected shape: ```json { "footer": { "social": [{ "platform": "LinkedIn", "href": "https://..." }], "columns": [{ "links": [{ "label": "About Us", "href": "/about" }] }], "credits": "...", "copyright": "..." } } ```
26
28
  */
27
29
  "layout"?: LayoutData | string;
28
30
  }
@@ -62,7 +64,7 @@ declare namespace LocalJSX {
62
64
  }
63
65
  interface WegFooter {
64
66
  /**
65
- * Layout payload, supplied by the host application. In JS / framework templates, pass the object directly (e.g. Angular `[layout]="layoutData"`, React `layout={layoutData}`, vanilla `el.layout = layoutData`). In plain HTML, pass the same JSON as a string on the `layout` attribute. Expected shape: ```json { "footer": { "social": [{ "platform": "LinkedIn", "href": "https://..." }], "standardLinks": [{ "label": "About Us", "href": "/about" }], "credits": "...", "copyright": "..." } } ```
67
+ * Layout payload, supplied by the host application. In JS / framework templates, pass the object directly (e.g. Angular `[layout]="layoutData"`, React `layout={layoutData}`, vanilla `el.layout = layoutData`). In plain HTML, pass the same JSON as a string on the `layout` attribute. Expected shape: ```json { "footer": { "social": [{ "platform": "LinkedIn", "href": "https://..." }], "columns": [{ "links": [{ "label": "About Us", "href": "/about" }] }], "credits": "...", "copyright": "..." } } ```
66
68
  */
67
69
  "layout"?: LayoutData | string;
68
70
  }
@@ -0,0 +1,25 @@
1
+ export type LayoutFooterLink = {
2
+ label: string;
3
+ href: string;
4
+ };
5
+ export type LayoutFooterColumn = {
6
+ links: LayoutFooterLink[];
7
+ };
8
+ export type LayoutFooterSocialPlatform = 'LinkedIn' | 'Instagram' | 'TikTok' | 'YouTube';
9
+ export type LayoutFooterSocialLink = {
10
+ platform: LayoutFooterSocialPlatform;
11
+ href: string;
12
+ };
13
+ /**
14
+ * Layout payload accepted by `<weg-footer layout={...}>`.
15
+ * Matches `GET /api/layout` footer shape from the WEG CMS.
16
+ */
17
+ export type LayoutData = {
18
+ header?: unknown;
19
+ footer?: Partial<{
20
+ social: unknown;
21
+ columns: unknown;
22
+ credits: unknown;
23
+ copyright: unknown;
24
+ }>;
25
+ };
@@ -0,0 +1 @@
1
+ import{r as e,h as i}from"./p-QiJxC4Ow.js";const t={social:[],columns:[],credits:"",copyright:""};function n(e){return/^https?:\/\//.test(e)}function o(e){return"string"==typeof e&&e.trim().length>0}function l(e){if(!Array.isArray(e))return[];const i=[];for(const n of e){if(!n||"object"!=typeof n)continue;const e=n.platform,l=n.href;("LinkedIn"===(t=e)||"Instagram"===t||"TikTok"===t||"YouTube"===t)&&o(l)&&i.push({platform:e,href:l.trim()})}var t;return i}function r(e){if(!Array.isArray(e))return[];const i=[];for(const t of e){if(!t||"object"!=typeof t)continue;const e=t.label,n=t.href;o(e)&&o(n)&&i.push({label:e.trim(),href:n.trim()})}return i}function s(e){if(!Array.isArray(e))return[];const i=[];for(const t of e){if(!t||"object"!=typeof t)continue;const e=r(t.links);0!==e.length&&i.push({links:e})}return i}function a(e){return n(e.href)}function c({platform:e}){const t={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 i("svg",{...t},i("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 i("svg",{...t},i("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"}),i("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"}),i("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 i("svg",{...t},i("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 i("svg",{...t},i("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"}),i("path",{d:"M21.6016 28.7998V20.7998L28.0016 24.8L21.6016 28.7998Z",fill:"white"}))}}const d=class{constructor(i){e(this,i)}layout;resolved=t;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:l(t?.social),columns:s(t?.columns),credits:o(t?.credits)?t.credits.trim():"",copyright:o(t?.copyright)?t.copyright.trim():""}}(function(e){if("string"!=typeof e)return e;const i=e.trim();if(i)try{return JSON.parse(i)}catch{return}}(this.layout)):t}componentWillLoad(){this.resolve()}watchLayout(){this.resolve()}renderLegalText(){const{credits:e,copyright:t}=this.resolved;return e||t?i("div",{class:"legal"},e?i("p",{class:"legal__p"},e):null,e&&t?i("p",{class:"legal__p"},String.fromCharCode(8203)):null,t?i("p",{class:"legal__p"},t):null):null}renderSocialLinks(){const e=this.resolved.social;return 0===e.length?null:i("div",{class:"social"},e.map((e=>i("a",{class:"social__link",href:e.href,"aria-label":e.platform,target:n(e.href)?"_blank":void 0,rel:n(e.href)?"noreferrer noopener":void 0},i("span",{class:"social__icon","aria-hidden":"true"},i(c,{platform:e.platform}))))))}renderColumns(){const e=this.resolved.columns;return 0===e.length?null:i("div",{class:"columns"},e.map(((e,t)=>i("div",{class:"columns__col",key:t},t>0?i("div",{class:"columns__divider","aria-hidden":"true"}):null,i("nav",{class:"columns__links","aria-label":`Footer links column ${t+1}`},e.links.map(((e,t)=>i("a",{class:"footer-link",href:e.href,key:t,target:a(e)?"_blank":void 0,rel:a(e)?"noreferrer noopener":void 0},e.label))))))))}render(){return i("footer",{key:"6aea0fd57f4ce816f31975b4b62638000370f0f0",class:"footer"},i("div",{key:"56a87925be4d1c19cd1020224297c135368d17b1",class:"container"},this.renderSocialLinks(),i("div",{key:"c3e8c38bf81ea81326d74b0fdd66421eb397a300",class:"standard"},this.renderColumns(),this.renderLegalText())))}static get watchers(){return{layout:[{watchLayout:0}]}}};d.style=':host{display:block}.footer{background:#030712;color:#ffffff;padding:28px 32px;font-family:ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";font-weight:300}.container{max-width:1024px;margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:20px}@media (min-width: 768px){.footer{padding:44px 56px}.container{gap:36px}}.social{display:flex;align-items:center;justify-content:center;gap:16px}@media (min-width: 768px){.social{gap:28px}}.social__link{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;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:48px;height:48px}.footer-link{color:#ffffff;text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px;outline:none}.footer-link:hover{text-decoration-thickness:2px}.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:16px;line-height:24px}@media (min-width: 768px){.legal{font-size:18px;line-height:28px}}.legal__p{margin:0}.standard{width:100%;display:flex;flex-direction:column;align-items:center;gap:36px;text-align:center;font-size:16px;line-height:24px}@media (min-width: 768px){.standard{font-size:18px;line-height:28px}}.columns{width:100%;display:grid;gap:28px 16px;grid-template-columns:1fr}@media (min-width: 640px){.columns{grid-template-columns:repeat(2, minmax(0, 1fr))}}@media (min-width: 768px){.columns{display:flex;flex-direction:row;align-items:stretch;justify-content:center;gap:0}}.columns__col{display:flex;flex:1 1 0;min-width:0;align-items:stretch}@media (max-width: 767px){.columns__col{flex-direction:column}}.columns__divider{display:none;width:1px;background:rgba(255, 255, 255, 0.35);align-self:center;min-height:72px;margin:0 12px;flex-shrink:0}@media (min-width: 768px){.columns__divider{display:block}}.columns__links{display:flex;flex-direction:column;align-items:flex-start;gap:12px;flex:1;min-width:0;padding:0 4px;text-align:left}@media (min-width: 768px){.columns__links{padding:0 12px}}';export{d as weg_footer}
@@ -1 +1 @@
1
- import{p as o,b as t}from"./p-QiJxC4Ow.js";export{s as setNonce}from"./p-QiJxC4Ow.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),o(a)})().then((async o=>(await a(),t([["p-d1addb13",[[513,"my-component",{first:[1],middle:[1],last:[1]}]]],["p-99843bbd",[[513,"weg-footer",{layout:[1],resolved:[32]},null,{layout:[{watchLayout:0}]}]]]],o))));
1
+ import{p as o,b as t}from"./p-QiJxC4Ow.js";export{s as setNonce}from"./p-QiJxC4Ow.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),o(a)})().then((async o=>(await a(),t([["p-d1addb13",[[513,"my-component",{first:[1],middle:[1],last:[1]}]]],["p-0c28f34f",[[513,"weg-footer",{layout:[1],resolved:[32]},null,{layout:[{watchLayout:0}]}]]]],o))));
package/docs/nextjs.md CHANGED
@@ -139,7 +139,7 @@ defineCustomElements();
139
139
  type LayoutData = {
140
140
  footer?: {
141
141
  social?: { platform: string; href: string }[];
142
- standardLinks?: { label: string; href: string }[];
142
+ columns?: { links: { label: string; href: string }[] }[];
143
143
  credits?: string;
144
144
  copyright?: string;
145
145
  };
package/docs/react.md CHANGED
@@ -4,7 +4,7 @@ Guide for **client-rendered** React apps (Vite, Create React App, etc.). If you
4
4
 
5
5
  ## What is `<weg-footer>`?
6
6
 
7
- `<weg-footer>` is a **presentational** [Stencil](https://stenciljs.com/) Web Component shipped by `weg-shared-layout`. It renders the site footer (social links, standard links, credits, copyright) from a **layout payload** you provide.
7
+ `<weg-footer>` is a **presentational** [Stencil](https://stenciljs.com/) Web Component shipped by `weg-shared-layout`. It renders the site footer (social links, link columns, credits, copyright) from a **layout payload** you provide.
8
8
 
9
9
  The component **does not fetch data**. Your app loads JSON (from an API, CMS, or a static file) and passes it on the `layout` property.
10
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weg-shared-layout",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "Shared layout Web Components built with Stencil",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -43,6 +43,14 @@
43
43
  "loader/",
44
44
  "src/assets/dummy-data.json"
45
45
  ],
46
+ "scripts": {
47
+ "prepack": "npm run build",
48
+ "build": "stencil build",
49
+ "start": "stencil build --dev --watch --serve",
50
+ "test": "stencil-test --prod",
51
+ "test:watch": "stencil-test --prod --watch",
52
+ "generate": "stencil generate"
53
+ },
46
54
  "devDependencies": {
47
55
  "@stencil/core": "^4.27.1 || ^5.0.0-0",
48
56
  "@stencil/vitest": "^1.8.3",
@@ -51,12 +59,5 @@
51
59
  "playwright": "^1.52.0",
52
60
  "vitest": "^4.0.0"
53
61
  },
54
- "license": "MIT",
55
- "scripts": {
56
- "build": "stencil build",
57
- "start": "stencil build --dev --watch --serve",
58
- "test": "stencil-test --prod",
59
- "test:watch": "stencil-test --prod --watch",
60
- "generate": "stencil generate"
61
- }
62
- }
62
+ "license": "MIT"
63
+ }
package/readme.md CHANGED
@@ -16,7 +16,18 @@ npm i weg-shared-layout
16
16
 
17
17
  You **can** load that object however you normally fetch JSON in your app. For example, [https://weg-payload-test.vercel.app/api/layout](https://weg-payload-test.vercel.app/api/layout) returns the same shape as **`dummy-data.json`**; pass the response into `layout` on `<weg-footer>` (or your framework wrapper) like any other prop.
18
18
 
19
- The payload shape matches **`dummy-data.json`**:
19
+ The payload shape matches **`dummy-data.json`** (and `GET /api/layout` from the WEG CMS):
20
+
21
+ ```json
22
+ {
23
+ "footer": {
24
+ "social": [{ "platform": "LinkedIn", "href": "https://..." }],
25
+ "columns": [{ "links": [{ "label": "About Us", "href": "/about" }] }],
26
+ "credits": "...",
27
+ "copyright": "..."
28
+ }
29
+ }
30
+ ```
20
31
 
21
32
  - **From npm:** `import layout from 'weg-shared-layout/dummy-data.json'` (enable `resolveJsonModule` in TypeScript if needed).
22
33
 
@@ -2,17 +2,63 @@
2
2
  "header": {},
3
3
  "footer": {
4
4
  "social": [
5
- { "platform": "LinkedIn", "href": "https://www.linkedin.com/" },
6
- { "platform": "Instagram", "href": "https://www.instagram.com/" },
7
- { "platform": "TikTok", "href": "https://www.tiktok.com/" },
8
- { "platform": "YouTube", "href": "https://www.youtube.com/" }
5
+ { "platform": "LinkedIn", "href": "https://www.linkedin.com/company/warwickemploymentgroup/" },
6
+ { "platform": "TikTok", "href": "https://www.tiktok.com/@weg_updates" },
7
+ { "platform": "Instagram", "href": "https://www.instagram.com/warwickemploymentgroup/" },
8
+ { "platform": "YouTube", "href": "https://www.youtube.com/@WarwickEmploymentGroup" }
9
9
  ],
10
- "standardLinks": [
11
- { "label": "About Us", "href": "/about" },
12
- { "label": "Privacy Policy", "href": "/privacy" },
13
- { "label": "Terms of Use", "href": "/terms" },
14
- { "label": "Cookie Policy", "href": "/cookies" },
15
- { "label": "Accessibility Statement", "href": "/accessibility" }
10
+ "columns": [
11
+ {
12
+ "links": [
13
+ { "label": "Find a job", "href": "/jobs" },
14
+ { "label": "Professional & operational", "href": "/jobs/professional" },
15
+ { "label": "Engineering & technology", "href": "/jobs/engineering" },
16
+ { "label": "Graduates", "href": "/jobs/graduates" },
17
+ { "label": "Senior & leadership", "href": "/jobs/senior" }
18
+ ]
19
+ },
20
+ {
21
+ "links": [
22
+ { "label": "Hire talent", "href": "/hire" },
23
+ { "label": "Professional & operational", "href": "/hire/professional" },
24
+ { "label": "Engineering & technology", "href": "/hire/engineering" },
25
+ { "label": "Graduates", "href": "/hire/graduates" },
26
+ { "label": "Executive search & selection", "href": "/hire/executive" }
27
+ ]
28
+ },
29
+ {
30
+ "links": [
31
+ { "label": "HE solutions", "href": "/he-solutions" },
32
+ { "label": "Franchise solution", "href": "/franchise" },
33
+ { "label": "Payroll bureau", "href": "/payroll" },
34
+ { "label": "Disability support", "href": "/disability-support" }
35
+ ]
36
+ },
37
+ {
38
+ "links": [
39
+ { "label": "Career advice", "href": "/career-advice" },
40
+ { "label": "News & events", "href": "/news" },
41
+ { "label": "Insights", "href": "/insights" }
42
+ ]
43
+ },
44
+ {
45
+ "links": [
46
+ { "label": "About WEG", "href": "/about" },
47
+ { "label": "Our brands", "href": "/brands" },
48
+ { "label": "Careers at WEG", "href": "/careers" },
49
+ { "label": "Contact us", "href": "/contact" }
50
+ ]
51
+ },
52
+ {
53
+ "links": [
54
+ { "label": "Privacy policy", "href": "/privacy" },
55
+ { "label": "Terms of use", "href": "/terms" },
56
+ { "label": "Cookie policy", "href": "/cookies" },
57
+ { "label": "Accessibility statement", "href": "/accessibility" },
58
+ { "label": "Diversity & inclusion", "href": "/diversity" },
59
+ { "label": "Modern slavery", "href": "/modern-slavery" }
60
+ ]
61
+ }
16
62
  ],
17
63
  "credits": "Warwick Employment Group is a department of the Campus and Commercial Services Group at the University of Warwick.",
18
64
  "copyright": "Copyright © Warwick Employment Group."
@@ -1 +0,0 @@
1
- import{r as t,h as e}from"./p-QiJxC4Ow.js";const i={social:[],standardLinks:[],credits:"",copyright:""};function n(t){return/^https?:\/\//.test(t)}function o(t){return"string"==typeof t&&t.trim().length>0}function a(t){if(!Array.isArray(t))return[];const e=[];for(const n of t){if(!n||"object"!=typeof n)continue;const t=n.platform,a=n.href;("LinkedIn"===(i=t)||"Instagram"===i||"TikTok"===i||"YouTube"===i)&&o(a)&&e.push({platform:t,href:a.trim()})}var i;return e}function r(t){if(!Array.isArray(t))return[];const e=[];for(const i of t){if(!i||"object"!=typeof i)continue;const t=i.label,n=i.href;o(t)&&o(n)&&e.push({label:t.trim(),href:n.trim()})}return e}function l({platform:t}){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(t){case"LinkedIn":return e("svg",{...i},e("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 e("svg",{...i},e("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"}),e("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"}),e("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 e("svg",{...i},e("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 e("svg",{...i},e("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"}),e("path",{d:"M21.6016 28.7998V20.7998L28.0016 24.8L21.6016 28.7998Z",fill:"white"}))}}const s=class{constructor(e){t(this,e)}layout;resolved=i;resolve(){this.resolved=null!=this.layout?function(t){const e=t&&"object"==typeof t?t:{},i=e.footer&&"object"==typeof e.footer?e.footer:{};return{social:a(i?.social),standardLinks:r(i?.standardLinks),credits:o(i?.credits)?i.credits.trim():"",copyright:o(i?.copyright)?i.copyright.trim():""}}(function(t){if("string"!=typeof t)return t;const e=t.trim();if(e)try{return JSON.parse(e)}catch{return}}(this.layout)):i}componentWillLoad(){this.resolve()}watchLayout(){this.resolve()}renderLegalText(){const{credits:t,copyright:i}=this.resolved;return t||i?e("div",{class:"legal"},t?e("p",{class:"legal__p"},t):null,t&&i?e("p",{class:"legal__p"},String.fromCharCode(8203)):null,i?e("p",{class:"legal__p"},i):null):null}renderSocialLinks(){const t=this.resolved.social;return 0===t.length?null:e("div",{class:"social"},t.map((t=>e("a",{class:"social__link",href:t.href,"aria-label":t.platform,target:n(t.href)?"_blank":void 0,rel:n(t.href)?"noreferrer noopener":void 0},e("span",{class:"social__icon","aria-hidden":"true"},e(l,{platform:t.platform}))))))}renderStandardLinks(){const t=this.resolved.standardLinks;return 0===t.length?null:e("div",{class:"standard__links"},t.map((t=>e("a",{class:"footer-link",href:t.href},t.label))))}render(){return e("footer",{key:"ba9a2b07235bbad73f4f2aea762af917249f621b",class:"footer"},e("div",{key:"88a8a9de95c09bf4c5524fc942976b7ababe110d",class:"container"},this.renderSocialLinks(),e("div",{key:"2a21b07909bcb975c4bade8a291b050d83d52e8c",class:"standard"},this.renderStandardLinks(),this.renderLegalText())))}static get watchers(){return{layout:[{watchLayout:0}]}}};s.style=':host{display:block}.footer{background:#030712;color:#ffffff;padding:28px 32px;font-family:ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";font-weight:300}.container{max-width:1024px;margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:20px}@media (min-width: 768px){.footer{padding:44px 56px}.container{gap:36px}}.social{display:flex;align-items:center;justify-content:center;gap:16px}@media (min-width: 768px){.social{gap:28px}}.social__link{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;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:48px;height:48px}.footer-link{color:#ffffff;text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px;outline:none}.footer-link:hover{text-decoration-thickness:2px}.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:16px;line-height:24px}@media (min-width: 768px){.legal{font-size:18px;line-height:28px}}.legal__p{margin:0}.standard{width:100%;display:flex;flex-direction:column;align-items:center;gap:36px;text-align:center;font-size:16px;line-height:24px}@media (min-width: 768px){.standard{font-size:18px;line-height:28px}}.standard__links{display:flex;flex-direction:column;align-items:center;gap:16px}@media (min-width: 768px){.standard__links{flex-direction:row;flex-wrap:wrap;justify-content:center;gap:36px}}';export{s as weg_footer}