@redacto.io/consent-sdk-react 6.0.0 → 7.0.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @redacto.io/consent-sdk-react
2
2
 
3
+ ## 7.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - configurable privacy center SDK
8
+ - 331cbad: Apply org-level branding in `RedactoPrivacyCenter`. The privacy center now fetches `/user/api/0/public/org-branding/by-slug/{slug}` on mount and uses the response to:
9
+ - Swap the sidebar header avatar for the org's `icon_url` (collapsed) or wide `logo_url` (expanded).
10
+ - Show `brand_name` as the sidebar title.
11
+ - Hide the "Powered by Redacto" footer when `hide_platform_branding` is `true`.
12
+ - Apply the org's `theme` colors at runtime as `--pc-*` CSS custom-property overrides on `document.documentElement`. Primary/secondary hover and active variants are auto-derived. Cleared on unmount so the host page reverts to defaults.
13
+
14
+ **Breaking changes:**
15
+ - Removed dark mode from the privacy center. `ThemeProvider`, `useTheme`, `ThemeToggle`, and `ThemeTransitionOverlay` are deleted, the `[data-theme="dark"]` CSS block is gone, and the moon/sun toggle no longer appears in the navbar.
16
+ - Removed the `theme` prop from `RedactoPrivacyCenter`. The privacy center is now light-only; org-branding theme colors are applied on top.
17
+
18
+ Falls back to the previous initials avatar, slug-derived name, and SDK default colors when the branding response is unavailable.
19
+
3
20
  ## 6.0.0
4
21
 
5
22
  ### Major Changes
@@ -567,22 +567,20 @@ declare const useInternalNavigation: () => NavigationContextType;
567
567
  interface RedactoPrivacyCenterProps {
568
568
  baseUrl: string;
569
569
  slug: string;
570
- theme?: 'light' | 'dark';
571
570
  accessToken: string;
572
571
  refreshToken: string;
573
572
  onError: (error: Error) => boolean;
574
573
  initialPage?: InternalPage;
575
574
  onBack?: 'back' | 'signout';
576
575
  }
577
- declare function RedactoPrivacyCenter({ baseUrl, slug, theme, accessToken, refreshToken, onError, initialPage, onBack, }: RedactoPrivacyCenterProps): react_jsx_runtime.JSX.Element;
576
+ declare function RedactoPrivacyCenter({ baseUrl, slug, accessToken, refreshToken, onError, initialPage, onBack, }: RedactoPrivacyCenterProps): react_jsx_runtime.JSX.Element;
578
577
 
579
578
  interface PrivacyCenterLayoutProps {
580
579
  children: ReactNode;
581
- defaultTheme?: 'light' | 'dark';
582
580
  slug: string;
583
581
  onBack?: 'back' | 'signout';
584
582
  }
585
- declare function PrivacyCenterLayout({ children, defaultTheme, slug, onBack }: PrivacyCenterLayoutProps): react_jsx_runtime.JSX.Element;
583
+ declare function PrivacyCenterLayout({ children, slug, onBack }: PrivacyCenterLayoutProps): react_jsx_runtime.JSX.Element;
586
584
 
587
585
  declare function PrivacyCenterHomePage(): react_jsx_runtime.JSX.Element;
588
586
 
@@ -567,22 +567,20 @@ declare const useInternalNavigation: () => NavigationContextType;
567
567
  interface RedactoPrivacyCenterProps {
568
568
  baseUrl: string;
569
569
  slug: string;
570
- theme?: 'light' | 'dark';
571
570
  accessToken: string;
572
571
  refreshToken: string;
573
572
  onError: (error: Error) => boolean;
574
573
  initialPage?: InternalPage;
575
574
  onBack?: 'back' | 'signout';
576
575
  }
577
- declare function RedactoPrivacyCenter({ baseUrl, slug, theme, accessToken, refreshToken, onError, initialPage, onBack, }: RedactoPrivacyCenterProps): react_jsx_runtime.JSX.Element;
576
+ declare function RedactoPrivacyCenter({ baseUrl, slug, accessToken, refreshToken, onError, initialPage, onBack, }: RedactoPrivacyCenterProps): react_jsx_runtime.JSX.Element;
578
577
 
579
578
  interface PrivacyCenterLayoutProps {
580
579
  children: ReactNode;
581
- defaultTheme?: 'light' | 'dark';
582
580
  slug: string;
583
581
  onBack?: 'back' | 'signout';
584
582
  }
585
- declare function PrivacyCenterLayout({ children, defaultTheme, slug, onBack }: PrivacyCenterLayoutProps): react_jsx_runtime.JSX.Element;
583
+ declare function PrivacyCenterLayout({ children, slug, onBack }: PrivacyCenterLayoutProps): react_jsx_runtime.JSX.Element;
586
584
 
587
585
  declare function PrivacyCenterHomePage(): react_jsx_runtime.JSX.Element;
588
586