weg-shared-layout 0.0.33 → 0.0.35

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.
Files changed (30) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/weg-footer_2.cjs.entry.js +8 -6
  3. package/dist/collection/components/weg-footer/icons/instagram.svg +5 -5
  4. package/dist/collection/components/weg-footer/icons/linkedin.svg +3 -3
  5. package/dist/collection/components/weg-footer/icons/tiktok.svg +3 -3
  6. package/dist/collection/components/weg-footer/icons/youtube.svg +4 -4
  7. package/dist/collection/components/weg-footer/weg-footer.css +263 -263
  8. package/dist/collection/components/weg-footer/weg-footer.js +2 -2
  9. package/dist/collection/components/weg-header/weg-header.css +483 -483
  10. package/dist/collection/components/weg-header/weg-header.js +7 -5
  11. package/dist/collection/styles/shared.css +103 -103
  12. package/dist/components/weg-footer.js +1 -1
  13. package/dist/components/weg-header.js +1 -1
  14. package/dist/esm/weg-footer_2.entry.js +8 -6
  15. package/dist/types/types/layout-data.d.ts +1 -0
  16. package/dist/weg-shared-layout/p-910c4f50.entry.js +1 -0
  17. package/dist/weg-shared-layout/weg-shared-layout.esm.js +1 -1
  18. package/docs/README.md +49 -49
  19. package/docs/angular.md +402 -402
  20. package/docs/nextjs.md +315 -314
  21. package/docs/publishing.md +65 -65
  22. package/docs/react.md +272 -272
  23. package/docs/vanilla.md +140 -139
  24. package/package.json +81 -81
  25. package/readme.md +96 -95
  26. package/src/constants/breakpoints.ts +7 -7
  27. package/src/styles/container.css +60 -60
  28. package/dist/weg-shared-layout/p-b38f951e.entry.js +0 -1
  29. /package/dist/types/Users/{tan/Documents/code → rakin/Documents/WEG/repos}/weg-shared-layout/.stencil/test-utils/axe.d.ts +0 -0
  30. /package/dist/types/Users/{tan/Documents/code → rakin/Documents/WEG/repos}/weg-shared-layout/.stencil/test-utils/viewport.d.ts +0 -0
@@ -1,263 +1,263 @@
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
- .footer {
20
- background: #030712; /* close to tailwind gray-950 */
21
- color: #ffffff;
22
- font-family: var(--weg-font-family);
23
- font-weight: 300;
24
- }
25
-
26
- .footer__inner {
27
- display: flex;
28
- flex-direction: column;
29
- align-items: center;
30
- gap: 1.25rem;
31
- padding-block: 2rem;
32
- padding-inline: 0;
33
- }
34
-
35
- @media (width >= 960px) {
36
- .footer__inner {
37
- gap: 2.25rem;
38
- padding-block: 3.5rem;
39
- }
40
- }
41
-
42
- .social {
43
- display: flex;
44
- align-items: center;
45
- justify-content: center;
46
- gap: 1rem;
47
- flex-wrap: wrap;
48
- }
49
-
50
- @media (width >= 960px) {
51
- .social {
52
- gap: 1.75rem;
53
- }
54
- }
55
-
56
- .social__link {
57
- width: 3rem;
58
- height: 3rem;
59
- display: inline-flex;
60
- align-items: center;
61
- justify-content: center;
62
- border-radius: 999rem;
63
- background: transparent;
64
- color: inherit;
65
- text-decoration: none;
66
- transition: opacity 150ms ease;
67
- outline: none;
68
- }
69
-
70
- .social__link:hover {
71
- opacity: 0.9;
72
- }
73
-
74
- .social__link:focus-visible {
75
- outline: 2px solid rgba(255, 255, 255, 0.9);
76
- outline-offset: 4px;
77
- }
78
-
79
- .social__icon {
80
- display: inline-flex;
81
- width: 3rem;
82
- height: 3rem;
83
- }
84
-
85
- .footer-link {
86
- color: #ffffff;
87
- font-family: 'Open Sans', var(--weg-font-family);
88
- font-size: 1rem;
89
- font-style: normal;
90
- font-weight: 300;
91
- line-height: 1.5rem;
92
- display: block;
93
- width: 100%;
94
- text-align: center;
95
- text-decoration-line: underline;
96
- text-decoration-style: solid;
97
- text-decoration-skip-ink: none;
98
- text-decoration-thickness: auto;
99
- text-underline-offset: auto;
100
- text-underline-position: from-font;
101
- outline: none;
102
- }
103
-
104
- @media (width >= 960px) {
105
- .footer-link {
106
- display: inline;
107
- width: auto;
108
- text-align: left;
109
- }
110
- }
111
-
112
- .footer-link:hover {
113
- opacity: 0.9;
114
- }
115
-
116
- .footer-link:focus-visible {
117
- outline: 2px solid rgba(255, 255, 255, 0.9);
118
- outline-offset: 4px;
119
- }
120
-
121
- .legal {
122
- width: 100%;
123
- max-width: 860px;
124
- text-align: center;
125
- font-size: 1rem;
126
- line-height: 1.5rem;
127
- }
128
-
129
- @media (width >= 960px) {
130
- .legal {
131
- font-size: 1.125rem;
132
- line-height: 1.75rem;
133
- }
134
- }
135
-
136
- .legal__p {
137
- margin: 0;
138
- }
139
-
140
- .standard {
141
- width: 100%;
142
- display: flex;
143
- flex-direction: column;
144
- align-items: center;
145
- gap: 2.25rem;
146
- text-align: center;
147
- font-size: 1rem;
148
- line-height: 1.5rem;
149
- }
150
-
151
- @media (width >= 960px) {
152
- .standard {
153
- font-size: 1.125rem;
154
- line-height: 1.75rem;
155
- }
156
- }
157
-
158
- .columns {
159
- width: 100%;
160
- display: grid;
161
- grid-template-columns: 1fr;
162
- gap: 0;
163
- }
164
-
165
- .columns__col {
166
- display: flex;
167
- flex-direction: column;
168
- align-items: stretch;
169
- width: 100%;
170
- min-width: 0;
171
- }
172
-
173
- .columns__col:not(:first-child) {
174
- gap: 2rem;
175
- }
176
-
177
- .columns__divider {
178
- display: block;
179
- flex-shrink: 0;
180
- width: 100%;
181
- height: 1px;
182
- margin-top: 2rem;
183
- background: rgba(255, 255, 255, 0.35);
184
- }
185
-
186
- .columns__links {
187
- display: flex;
188
- flex-direction: column;
189
- align-items: stretch;
190
- gap: 0.75rem;
191
- width: 100%;
192
- min-width: 0;
193
- text-align: center;
194
- }
195
-
196
- /* sm: 6 footer columns → 3 × 2 grid */
197
- @media (width >= 640px) {
198
- .columns {
199
- grid-template-columns: repeat(3, minmax(0, 1fr));
200
- gap: 1.5rem 3rem;
201
- }
202
-
203
- .columns__col:not(:first-child) {
204
- gap: 0;
205
- }
206
-
207
- .columns__col:nth-child(-n + 3):not(:first-child) .columns__divider {
208
- display: none;
209
- }
210
-
211
- .columns__col:nth-child(n + 4) .columns__divider {
212
- display: block;
213
- width: 100%;
214
- height: 1px;
215
- margin: 0 0 1.5rem;
216
- }
217
-
218
- .footer-link {
219
- display: inline;
220
- width: auto;
221
- text-align: left;
222
- }
223
-
224
- .columns__links {
225
- align-items: flex-start;
226
- text-align: left;
227
- }
228
- }
229
-
230
- /* md: 6 footer columns → single row */
231
- @media (width >= 960px) {
232
- .columns {
233
- display: flex;
234
- flex-direction: row;
235
- align-items: stretch;
236
- justify-content: center;
237
- gap: 0;
238
- }
239
-
240
- .columns__col {
241
- flex: 1 1 0;
242
- flex-direction: row;
243
- align-items: stretch;
244
- }
245
-
246
- .columns__col:not(:first-child) {
247
- gap: 0;
248
- }
249
-
250
- .columns__col:nth-child(-n + 3):not(:first-child) .columns__divider,
251
- .columns__col:nth-child(n + 4) .columns__divider {
252
- display: block;
253
- width: 1px;
254
- height: auto;
255
- margin: 0 1.5rem;
256
- }
257
-
258
- .columns__links {
259
- flex: 1;
260
- align-items: flex-start;
261
- text-align: left;
262
- }
263
- }
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
+ .footer {
20
+ background: #030712; /* close to tailwind gray-950 */
21
+ color: #ffffff;
22
+ font-family: var(--weg-font-family);
23
+ font-weight: 300;
24
+ }
25
+
26
+ .footer__inner {
27
+ display: flex;
28
+ flex-direction: column;
29
+ align-items: center;
30
+ gap: 1.25rem;
31
+ padding-block: 2rem;
32
+ padding-inline: 0;
33
+ }
34
+
35
+ @media (width >= 960px) {
36
+ .footer__inner {
37
+ gap: 2.25rem;
38
+ padding-block: 3.5rem;
39
+ }
40
+ }
41
+
42
+ .social {
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ gap: 1rem;
47
+ flex-wrap: wrap;
48
+ }
49
+
50
+ @media (width >= 960px) {
51
+ .social {
52
+ gap: 1.75rem;
53
+ }
54
+ }
55
+
56
+ .social__link {
57
+ width: 3rem;
58
+ height: 3rem;
59
+ display: inline-flex;
60
+ align-items: center;
61
+ justify-content: center;
62
+ border-radius: 999rem;
63
+ background: transparent;
64
+ color: inherit;
65
+ text-decoration: none;
66
+ transition: opacity 150ms ease;
67
+ outline: none;
68
+ }
69
+
70
+ .social__link:hover {
71
+ opacity: 0.9;
72
+ }
73
+
74
+ .social__link:focus-visible {
75
+ outline: 2px solid rgba(255, 255, 255, 0.9);
76
+ outline-offset: 4px;
77
+ }
78
+
79
+ .social__icon {
80
+ display: inline-flex;
81
+ width: 3rem;
82
+ height: 3rem;
83
+ }
84
+
85
+ .footer-link {
86
+ color: #ffffff;
87
+ font-family: 'Open Sans', var(--weg-font-family);
88
+ font-size: 1rem;
89
+ font-style: normal;
90
+ font-weight: 300;
91
+ line-height: 1.5rem;
92
+ display: block;
93
+ width: 100%;
94
+ text-align: center;
95
+ text-decoration-line: underline;
96
+ text-decoration-style: solid;
97
+ text-decoration-skip-ink: none;
98
+ text-decoration-thickness: auto;
99
+ text-underline-offset: auto;
100
+ text-underline-position: from-font;
101
+ outline: none;
102
+ }
103
+
104
+ @media (width >= 960px) {
105
+ .footer-link {
106
+ display: inline;
107
+ width: auto;
108
+ text-align: left;
109
+ }
110
+ }
111
+
112
+ .footer-link:hover {
113
+ opacity: 0.9;
114
+ }
115
+
116
+ .footer-link:focus-visible {
117
+ outline: 2px solid rgba(255, 255, 255, 0.9);
118
+ outline-offset: 4px;
119
+ }
120
+
121
+ .legal {
122
+ width: 100%;
123
+ max-width: 860px;
124
+ text-align: center;
125
+ font-size: 1rem;
126
+ line-height: 1.5rem;
127
+ }
128
+
129
+ @media (width >= 960px) {
130
+ .legal {
131
+ font-size: 1.125rem;
132
+ line-height: 1.75rem;
133
+ }
134
+ }
135
+
136
+ .legal__p {
137
+ margin: 0;
138
+ }
139
+
140
+ .standard {
141
+ width: 100%;
142
+ display: flex;
143
+ flex-direction: column;
144
+ align-items: center;
145
+ gap: 2.25rem;
146
+ text-align: center;
147
+ font-size: 1rem;
148
+ line-height: 1.5rem;
149
+ }
150
+
151
+ @media (width >= 960px) {
152
+ .standard {
153
+ font-size: 1.125rem;
154
+ line-height: 1.75rem;
155
+ }
156
+ }
157
+
158
+ .columns {
159
+ width: 100%;
160
+ display: grid;
161
+ grid-template-columns: 1fr;
162
+ gap: 0;
163
+ }
164
+
165
+ .columns__col {
166
+ display: flex;
167
+ flex-direction: column;
168
+ align-items: stretch;
169
+ width: 100%;
170
+ min-width: 0;
171
+ }
172
+
173
+ .columns__col:not(:first-child) {
174
+ gap: 2rem;
175
+ }
176
+
177
+ .columns__divider {
178
+ display: block;
179
+ flex-shrink: 0;
180
+ width: 100%;
181
+ height: 1px;
182
+ margin-top: 2rem;
183
+ background: rgba(255, 255, 255, 0.35);
184
+ }
185
+
186
+ .columns__links {
187
+ display: flex;
188
+ flex-direction: column;
189
+ align-items: stretch;
190
+ gap: 0.75rem;
191
+ width: 100%;
192
+ min-width: 0;
193
+ text-align: center;
194
+ }
195
+
196
+ /* sm: 6 footer columns → 3 × 2 grid */
197
+ @media (width >= 640px) {
198
+ .columns {
199
+ grid-template-columns: repeat(3, minmax(0, 1fr));
200
+ gap: 1.5rem 3rem;
201
+ }
202
+
203
+ .columns__col:not(:first-child) {
204
+ gap: 0;
205
+ }
206
+
207
+ .columns__col:nth-child(-n + 3):not(:first-child) .columns__divider {
208
+ display: none;
209
+ }
210
+
211
+ .columns__col:nth-child(n + 4) .columns__divider {
212
+ display: block;
213
+ width: 100%;
214
+ height: 1px;
215
+ margin: 0 0 1.5rem;
216
+ }
217
+
218
+ .footer-link {
219
+ display: inline;
220
+ width: auto;
221
+ text-align: left;
222
+ }
223
+
224
+ .columns__links {
225
+ align-items: flex-start;
226
+ text-align: left;
227
+ }
228
+ }
229
+
230
+ /* md: 6 footer columns → single row */
231
+ @media (width >= 960px) {
232
+ .columns {
233
+ display: flex;
234
+ flex-direction: row;
235
+ align-items: stretch;
236
+ justify-content: center;
237
+ gap: 0;
238
+ }
239
+
240
+ .columns__col {
241
+ flex: 1 1 0;
242
+ flex-direction: row;
243
+ align-items: stretch;
244
+ }
245
+
246
+ .columns__col:not(:first-child) {
247
+ gap: 0;
248
+ }
249
+
250
+ .columns__col:nth-child(-n + 3):not(:first-child) .columns__divider,
251
+ .columns__col:nth-child(n + 4) .columns__divider {
252
+ display: block;
253
+ width: 1px;
254
+ height: auto;
255
+ margin: 0 1.5rem;
256
+ }
257
+
258
+ .columns__links {
259
+ flex: 1;
260
+ align-items: flex-start;
261
+ text-align: left;
262
+ }
263
+ }
@@ -129,7 +129,7 @@ export class WegFooter {
129
129
  return (h("div", { class: "columns" }, menu.map((links, 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}` }, links.map((l, linkIndex) => (h("a", { class: "footer-link", href: l.href, key: linkIndex, target: linkTarget(l), rel: linkRel(l) }, l.label)))))))));
130
130
  }
131
131
  render() {
132
- return (h("footer", { key: '9cee16848dc91bb3a035c51168d02786626cb717', class: "footer" }, h("div", { key: '7e5b929cb2ffb5f04b96f34154a0b8320fa6c0c2', class: "container footer__inner" }, this.renderSocialLinks(), h("div", { key: '110bebc44f94fd4241675e00a9fb444e933d3311', class: "standard" }, this.renderMenu(), this.renderLegalText()))));
132
+ return (h("footer", { key: '44ce6d694eb145005f006b5a02ec68fe2da8ca44', class: "footer" }, h("div", { key: '43dbb00e195a561a44cd9ae0e843c448dce546bb', class: "container footer__inner" }, this.renderSocialLinks(), h("div", { key: '1ede37520397d4fa63671dccc7e3f83f26ac0955', class: "standard" }, this.renderMenu(), this.renderLegalText()))));
133
133
  }
134
134
  static get is() { return "weg-footer"; }
135
135
  static get encapsulation() { return "shadow"; }
@@ -164,7 +164,7 @@ export class WegFooter {
164
164
  "optional": true,
165
165
  "docs": {
166
166
  "tags": [],
167
- "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 \"menu\": [[{ \"label\": \"About Us\", \"href\": \"/about\" }]],\n \"credits\": \"...\",\n \"copyright\": \"...\"\n }\n}\n```"
167
+ "text": "Layout payload, supplied by the host application.\r\n\r\nIn JS / framework templates, pass the object directly (e.g. Angular\r\n`[layout]=\"layoutData\"`, React `layout={layoutData}`, vanilla\r\n`el.layout = layoutData`).\r\n\r\nIn plain HTML, pass the same JSON as a string on the `layout` attribute.\r\n\r\nExpected shape:\r\n```json\r\n{\r\n \"footer\": {\r\n \"social\": [{ \"platform\": \"LinkedIn\", \"href\": \"https://...\" }],\r\n \"menu\": [[{ \"label\": \"About Us\", \"href\": \"/about\" }]],\r\n \"credits\": \"...\",\r\n \"copyright\": \"...\"\r\n }\r\n}\r\n```"
168
168
  },
169
169
  "getter": false,
170
170
  "setter": false,