weg-shared-layout 0.0.23 → 0.0.24

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 (47) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/weg-footer_2.cjs.entry.js +121 -58
  4. package/dist/cjs/weg-shared-layout.cjs.js +1 -1
  5. package/dist/collection/collection-manifest.json +0 -1
  6. package/dist/collection/components/weg-footer/icons/instagram.svg +5 -5
  7. package/dist/collection/components/weg-footer/icons/linkedin.svg +3 -3
  8. package/dist/collection/components/weg-footer/icons/tiktok.svg +3 -3
  9. package/dist/collection/components/weg-footer/icons/youtube.svg +4 -4
  10. package/dist/collection/components/weg-footer/weg-footer.css +218 -201
  11. package/dist/collection/components/weg-footer/weg-footer.js +2 -2
  12. package/dist/collection/components/weg-header/weg-header.css +473 -365
  13. package/dist/collection/components/weg-header/weg-header.js +114 -58
  14. package/dist/collection/constants/breakpoints.js +6 -0
  15. package/dist/collection/styles/shared.css +72 -78
  16. package/dist/components/weg-footer.js +1 -1
  17. package/dist/components/weg-header.js +1 -1
  18. package/dist/esm/loader.js +1 -1
  19. package/dist/esm/weg-footer_2.entry.js +121 -58
  20. package/dist/esm/weg-shared-layout.js +1 -1
  21. package/dist/types/components/weg-header/weg-header.d.ts +20 -7
  22. package/dist/types/components.d.ts +0 -42
  23. package/dist/types/constants/breakpoints.d.ts +6 -0
  24. package/dist/weg-shared-layout/p-c6ec3888.entry.js +1 -0
  25. package/dist/weg-shared-layout/weg-shared-layout.esm.js +1 -1
  26. package/docs/angular-integration-guide.md +1026 -0
  27. package/docs/angular.md +247 -138
  28. package/docs/nextjs.md +305 -305
  29. package/docs/publishing.md +48 -48
  30. package/docs/react.md +261 -261
  31. package/docs/vanilla.md +140 -140
  32. package/package.json +12 -8
  33. package/readme.md +108 -107
  34. package/src/assets/dummy-data.json +147 -147
  35. package/src/constants/breakpoints.ts +7 -0
  36. package/src/constants/weg-urls.ts +23 -23
  37. package/dist/cjs/my-component.cjs.entry.js +0 -33
  38. package/dist/collection/components/my-component/my-component.css +0 -3
  39. package/dist/collection/components/my-component/my-component.js +0 -95
  40. package/dist/components/my-component.d.ts +0 -11
  41. package/dist/components/my-component.js +0 -1
  42. package/dist/esm/my-component.entry.js +0 -31
  43. package/dist/types/components/my-component/my-component.d.ts +0 -16
  44. package/dist/weg-shared-layout/p-80fa529c.entry.js +0 -1
  45. package/dist/weg-shared-layout/p-d61033bd.entry.js +0 -1
  46. /package/dist/types/Users/{tan/Documents/code → rakin/Documents/WEG/repos}/weg-shared-layout/.stencil/test-utils/axe.d.ts +0 -0
  47. /package/dist/types/Users/{tan/Documents/code → rakin/Documents/WEG/repos}/weg-shared-layout/.stencil/test-utils/viewport.d.ts +0 -0
@@ -1,201 +1,218 @@
1
- .footer {
2
- background: #030712; /* close to tailwind gray-950 */
3
- color: #ffffff;
4
- font-family: var(--weg-font-family);
5
- font-weight: 300;
6
- }
7
-
8
- .footer__inner {
9
- display: flex;
10
- flex-direction: column;
11
- align-items: center;
12
- gap: 20px;
13
- padding-block: 32px;
14
- }
15
-
16
- .social {
17
- display: flex;
18
- align-items: center;
19
- justify-content: center;
20
- gap: 16px;
21
- }
22
-
23
- .social__link {
24
- width: 48px;
25
- height: 48px;
26
- display: inline-flex;
27
- align-items: center;
28
- justify-content: center;
29
- border-radius: 999px;
30
- background: transparent;
31
- color: inherit;
32
- text-decoration: none;
33
- transition: opacity 150ms ease;
34
- outline: none;
35
- }
36
-
37
- .social__link:hover {
38
- opacity: 0.9;
39
- }
40
-
41
- .social__link:focus-visible {
42
- outline: 2px solid rgba(255, 255, 255, 0.9);
43
- outline-offset: 4px;
44
- }
45
-
46
- .social__icon {
47
- display: inline-flex;
48
- width: 48px;
49
- height: 48px;
50
- }
51
-
52
- .footer-link {
53
- color: #ffffff;
54
- font-family: 'Open Sans', var(--weg-font-family);
55
- font-size: 16px;
56
- font-style: normal;
57
- font-weight: 300;
58
- line-height: 24px;
59
- display: block;
60
- width: 100%;
61
- text-align: center;
62
- text-decoration-line: underline;
63
- text-decoration-style: solid;
64
- text-decoration-skip-ink: none;
65
- text-decoration-thickness: auto;
66
- text-underline-offset: auto;
67
- text-underline-position: from-font;
68
- outline: none;
69
- }
70
-
71
- .footer-link:hover {
72
- opacity: 0.9;
73
- }
74
-
75
- .footer-link:focus-visible {
76
- outline: 2px solid rgba(255, 255, 255, 0.9);
77
- outline-offset: 4px;
78
- }
79
-
80
- .legal {
81
- width: 100%;
82
- max-width: 860px;
83
- text-align: center;
84
- font-size: 16px;
85
- line-height: 24px;
86
- }
87
-
88
- .legal__p {
89
- margin: 0;
90
- }
91
-
92
- .standard {
93
- width: 100%;
94
- display: flex;
95
- flex-direction: column;
96
- align-items: center;
97
- gap: 36px;
98
- text-align: center;
99
- font-size: 16px;
100
- line-height: 24px;
101
- }
102
-
103
- .columns {
104
- width: 100%;
105
- display: grid;
106
- gap: 0;
107
- grid-template-columns: 1fr;
108
- }
109
-
110
- .columns__col {
111
- display: flex;
112
- flex: 1 1 0;
113
- min-width: 0;
114
- width: 100%;
115
- align-items: stretch;
116
- flex-direction: column;
117
- }
118
-
119
- .columns__col:not(:first-child) {
120
- gap: 32px;
121
- }
122
-
123
- .columns__divider {
124
- display: block;
125
- background: rgba(255, 255, 255, 0.35);
126
- flex-shrink: 0;
127
- width: 100%;
128
- height: 1px;
129
- align-self: stretch;
130
- margin-top: 32px;
131
- margin-bottom: 0;
132
- }
133
-
134
- .columns__links {
135
- display: flex;
136
- flex-direction: column;
137
- align-items: stretch;
138
- gap: 12px;
139
- flex: 1;
140
- width: 100%;
141
- min-width: 0;
142
- padding: 0 4px;
143
- text-align: center;
144
- }
145
-
146
- /* md: matches --weg-breakpoint-md */
147
- @media (width >= 768px) {
148
- .footer__inner {
149
- gap: 36px;
150
- padding-block: 56px;
151
- }
152
-
153
- .social {
154
- gap: 28px;
155
- }
156
-
157
- .footer-link {
158
- display: inline;
159
- width: auto;
160
- text-align: left;
161
- }
162
-
163
- .legal {
164
- font-size: 18px;
165
- line-height: 28px;
166
- }
167
-
168
- .standard {
169
- font-size: 18px;
170
- line-height: 28px;
171
- }
172
-
173
- .columns {
174
- display: flex;
175
- flex-direction: row;
176
- align-items: stretch;
177
- justify-content: center;
178
- gap: 0;
179
- }
180
-
181
- .columns__col {
182
- flex-direction: row;
183
- align-items: stretch;
184
- }
185
-
186
- .columns__col:not(:first-child) {
187
- gap: 0;
188
- }
189
-
190
- .columns__divider {
191
- width: 1px;
192
- height: auto;
193
- margin: 0 12px;
194
- }
195
-
196
- .columns__links {
197
- align-items: flex-start;
198
- padding: 0 12px;
199
- text-align: left;
200
- }
201
- }
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: 20px;
31
+ padding-block: 32px;
32
+ }
33
+
34
+ .social {
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ gap: 16px;
39
+ }
40
+
41
+ .social__link {
42
+ width: 48px;
43
+ height: 48px;
44
+ display: inline-flex;
45
+ align-items: center;
46
+ justify-content: center;
47
+ border-radius: 999px;
48
+ background: transparent;
49
+ color: inherit;
50
+ text-decoration: none;
51
+ transition: opacity 150ms ease;
52
+ outline: none;
53
+ }
54
+
55
+ .social__link:hover {
56
+ opacity: 0.9;
57
+ }
58
+
59
+ .social__link:focus-visible {
60
+ outline: 2px solid rgba(255, 255, 255, 0.9);
61
+ outline-offset: 4px;
62
+ }
63
+
64
+ .social__icon {
65
+ display: inline-flex;
66
+ width: 48px;
67
+ height: 48px;
68
+ }
69
+
70
+ .footer-link {
71
+ color: #ffffff;
72
+ font-family: 'Open Sans', var(--weg-font-family);
73
+ font-size: 16px;
74
+ font-style: normal;
75
+ font-weight: 300;
76
+ line-height: 24px;
77
+ display: block;
78
+ width: 100%;
79
+ text-align: center;
80
+ text-decoration-line: underline;
81
+ text-decoration-style: solid;
82
+ text-decoration-skip-ink: none;
83
+ text-decoration-thickness: auto;
84
+ text-underline-offset: auto;
85
+ text-underline-position: from-font;
86
+ outline: none;
87
+ }
88
+
89
+ .footer-link:hover {
90
+ opacity: 0.9;
91
+ }
92
+
93
+ .footer-link:focus-visible {
94
+ outline: 2px solid rgba(255, 255, 255, 0.9);
95
+ outline-offset: 4px;
96
+ }
97
+
98
+ .legal {
99
+ width: 100%;
100
+ max-width: 860px;
101
+ text-align: center;
102
+ font-size: 16px;
103
+ line-height: 24px;
104
+ }
105
+
106
+ .legal__p {
107
+ margin: 0;
108
+ }
109
+
110
+ .standard {
111
+ width: 100%;
112
+ display: flex;
113
+ flex-direction: column;
114
+ align-items: center;
115
+ gap: 36px;
116
+ text-align: center;
117
+ font-size: 16px;
118
+ line-height: 24px;
119
+ }
120
+
121
+ .columns {
122
+ width: 100%;
123
+ display: grid;
124
+ gap: 0;
125
+ grid-template-columns: 1fr;
126
+ }
127
+
128
+ .columns__col {
129
+ display: flex;
130
+ flex: 1 1 0;
131
+ min-width: 0;
132
+ width: 100%;
133
+ align-items: stretch;
134
+ flex-direction: column;
135
+ }
136
+
137
+ .columns__col:not(:first-child) {
138
+ gap: 32px;
139
+ }
140
+
141
+ .columns__divider {
142
+ display: block;
143
+ background: rgba(255, 255, 255, 0.35);
144
+ flex-shrink: 0;
145
+ width: 100%;
146
+ height: 1px;
147
+ align-self: stretch;
148
+ margin-top: 32px;
149
+ margin-bottom: 0;
150
+ }
151
+
152
+ .columns__links {
153
+ display: flex;
154
+ flex-direction: column;
155
+ align-items: stretch;
156
+ gap: 12px;
157
+ flex: 1;
158
+ width: 100%;
159
+ min-width: 0;
160
+ padding: 0 4px;
161
+ text-align: center;
162
+ }
163
+
164
+ @media (width >= 960px) {
165
+ .footer__inner {
166
+ gap: 36px;
167
+ padding-block: 56px;
168
+ }
169
+
170
+ .social {
171
+ gap: 28px;
172
+ }
173
+
174
+ .footer-link {
175
+ display: inline;
176
+ width: auto;
177
+ text-align: left;
178
+ }
179
+
180
+ .legal {
181
+ font-size: 18px;
182
+ line-height: 28px;
183
+ }
184
+
185
+ .standard {
186
+ font-size: 18px;
187
+ line-height: 28px;
188
+ }
189
+
190
+ .columns {
191
+ display: flex;
192
+ flex-direction: row;
193
+ align-items: stretch;
194
+ justify-content: center;
195
+ gap: 0;
196
+ }
197
+
198
+ .columns__col {
199
+ flex-direction: row;
200
+ align-items: stretch;
201
+ }
202
+
203
+ .columns__col:not(:first-child) {
204
+ gap: 0;
205
+ }
206
+
207
+ .columns__divider {
208
+ width: 1px;
209
+ height: auto;
210
+ margin: 0 12px;
211
+ }
212
+
213
+ .columns__links {
214
+ align-items: flex-start;
215
+ padding: 0 12px;
216
+ text-align: left;
217
+ }
218
+ }
@@ -133,7 +133,7 @@ export class WegFooter {
133
133
  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)))))))));
134
134
  }
135
135
  render() {
136
- return (h("footer", { key: 'f592a5632d0b39833ac01384f8541082afc36c6b', class: "footer" }, h("div", { key: 'b988ca82747dea2a60e40d8140cd8adf0232bc54', class: "container footer__inner" }, this.renderSocialLinks(), h("div", { key: '0a66f43415f96f0ffbebd3f8e324f413ea29ec9d', class: "standard" }, this.renderColumns(), this.renderLegalText()))));
136
+ return (h("footer", { key: 'ba0581c526990148d89fca1c9d6bd69a7d94ab4a', class: "footer" }, h("div", { key: '929f83df41eddc9128036c76108c36182aebe6d7', class: "container footer__inner" }, this.renderSocialLinks(), h("div", { key: '3635cfe0c5e6f4efb79e28a776b6974840875f88', class: "standard" }, this.renderColumns(), this.renderLegalText()))));
137
137
  }
138
138
  static get is() { return "weg-footer"; }
139
139
  static get encapsulation() { return "shadow"; }
@@ -168,7 +168,7 @@ export class WegFooter {
168
168
  "optional": true,
169
169
  "docs": {
170
170
  "tags": [],
171
- "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```"
171
+ "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 \"columns\": [{ \"links\": [{ \"label\": \"About Us\", \"href\": \"/about\" }] }],\r\n \"credits\": \"...\",\r\n \"copyright\": \"...\"\r\n }\r\n}\r\n```"
172
172
  },
173
173
  "getter": false,
174
174
  "setter": false,