@cronos-labs/ui 0.7.0 → 0.7.1

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.
@@ -42,7 +42,14 @@ export function Footer({ brandWordmarkSrc, columns, content, forceDocumentNaviga
42
42
  };
43
43
  const renderLegalLink = (link) => {
44
44
  if (link.isCookiePreferences) {
45
- return (_jsx(FooterLegalButton, { id: "ot-sdk-btn", className: "ot-sdk-show-settings", type: "button", onClick: onOpenCookiePreferences, children: link.label }));
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 });
@@ -19,7 +19,12 @@ export const FooterContainer = styled.div `
19
19
  margin: 0 auto;
20
20
 
21
21
  ${({ theme }) => theme.mediaQueries.lg} {
22
- width: min(calc(100% - (2 * ${({ theme }) => theme.layout.pagePaddingInlineWide})), 1209px);
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;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cronos-labs/ui",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Shared Header, Footer, Seo, locale and theme primitives for Cronos web properties.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",