@cronos-labs/ui 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Footer/index.js +8 -1
- package/dist/Footer/styles.js +10 -1
- package/dist/FooterWaitlist/styles.js +12 -2
- package/dist/Header/styles.js +10 -0
- package/package.json +1 -1
package/dist/Footer/index.js
CHANGED
|
@@ -42,7 +42,14 @@ export function Footer({ brandWordmarkSrc, columns, content, forceDocumentNaviga
|
|
|
42
42
|
};
|
|
43
43
|
const renderLegalLink = (link) => {
|
|
44
44
|
if (link.isCookiePreferences) {
|
|
45
|
-
|
|
45
|
+
// Deliberately not OneTrust's `#ot-sdk-btn.ot-sdk-show-settings` hook:
|
|
46
|
+
// the SDK rewrites any element carrying it with the label configured in
|
|
47
|
+
// the OneTrust admin ("Cookies Settings"), replacing the localized copy
|
|
48
|
+
// and, on the Astro sites, changing the server-rendered text before the
|
|
49
|
+
// island hydrates — React then throws a hydration error and re-renders
|
|
50
|
+
// the whole tree on the client. `onOpenCookiePreferences` already opens
|
|
51
|
+
// the preference centre through the OneTrust API directly.
|
|
52
|
+
return (_jsx(FooterLegalButton, { type: "button", onClick: onOpenCookiePreferences, children: link.label }));
|
|
46
53
|
}
|
|
47
54
|
if (link.disabled) {
|
|
48
55
|
return _jsx(FooterLegalText, { "aria-disabled": "true", children: link.label });
|
package/dist/Footer/styles.js
CHANGED
|
@@ -19,7 +19,12 @@ export const FooterContainer = styled.div `
|
|
|
19
19
|
margin: 0 auto;
|
|
20
20
|
|
|
21
21
|
${({ theme }) => theme.mediaQueries.lg} {
|
|
22
|
-
|
|
22
|
+
/* The same shell as HeaderShell: the landing wide width with 80px
|
|
23
|
+
gutters. It was 1209px, 13px wider than the header it sits under. */
|
|
24
|
+
width: min(
|
|
25
|
+
calc(100% - (2 * ${({ theme }) => theme.layout.pagePaddingInlineWide})),
|
|
26
|
+
${({ theme }) => theme.layout.landingWideWidth}
|
|
27
|
+
);
|
|
23
28
|
margin: 0 auto;
|
|
24
29
|
}
|
|
25
30
|
`;
|
|
@@ -222,6 +227,10 @@ export const FooterLegalLink = styled.a `
|
|
|
222
227
|
line-height: 1.3333;
|
|
223
228
|
}
|
|
224
229
|
`;
|
|
230
|
+
// The `!important`s below date from when this button carried OneTrust's
|
|
231
|
+
// `#ot-sdk-btn.ot-sdk-show-settings` hook and had to beat the SDK's own
|
|
232
|
+
// button styles. The hook is gone (see Footer/index.tsx); they are kept for
|
|
233
|
+
// now so this change stays limited to the label/hydration fix.
|
|
225
234
|
export const FooterLegalButton = styled.button `
|
|
226
235
|
display: inline !important;
|
|
227
236
|
min-width: 0 !important;
|
|
@@ -273,10 +273,20 @@ export const WaitlistSocialBlock = styled.div `
|
|
|
273
273
|
margin-top: ${({ $variant }) => ($variant === 'footer' ? '10px' : '14px')};
|
|
274
274
|
}
|
|
275
275
|
`;
|
|
276
|
+
/* Seven 32px icons. The row wraps and closes up to 16px below 768px:
|
|
277
|
+
at 24px it is 368px wide, wider than a 360px phone's 328px column, and
|
|
278
|
+
as it could not shrink it widened every ancestor up to the footer, so
|
|
279
|
+
the whole footer ran past the viewport and the page scrolled sideways. */
|
|
276
280
|
export const WaitlistSocialLinks = styled.div `
|
|
277
|
-
display:
|
|
281
|
+
display: flex;
|
|
282
|
+
flex-wrap: wrap;
|
|
278
283
|
align-items: center;
|
|
279
|
-
gap:
|
|
284
|
+
gap: 16px;
|
|
285
|
+
min-width: 0;
|
|
286
|
+
|
|
287
|
+
${({ theme }) => theme.mediaQueries.sm} {
|
|
288
|
+
gap: 24px;
|
|
289
|
+
}
|
|
280
290
|
`;
|
|
281
291
|
export const WaitlistSocialLink = styled.a `
|
|
282
292
|
display: inline-flex;
|
package/dist/Header/styles.js
CHANGED
|
@@ -93,6 +93,16 @@ export const HeaderShell = styled.header `
|
|
|
93
93
|
calc(100% - (2 * ${({ theme }) => theme.layout.pagePaddingInline})),
|
|
94
94
|
${({ theme }) => theme.layout.landingWideWidth}
|
|
95
95
|
);
|
|
96
|
+
|
|
97
|
+
${({ theme }) => theme.mediaQueries.lg} {
|
|
98
|
+
/* The same 80px gutter the footer and every page shell use from 1024px;
|
|
99
|
+
with only the 16px gutter the header sat 64px further out than the
|
|
100
|
+
content beneath it between 1024px and 1276px. */
|
|
101
|
+
width: min(
|
|
102
|
+
calc(100% - (2 * ${({ theme }) => theme.layout.pagePaddingInlineWide})),
|
|
103
|
+
${({ theme }) => theme.layout.landingWideWidth}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
96
106
|
margin: 0 auto;
|
|
97
107
|
display: grid;
|
|
98
108
|
grid-template-columns: 1fr auto;
|