@redacto.io/consent-sdk-react 10.3.0 → 10.3.1-beta.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/dist/{chunk-FT5G2PXK.mjs → chunk-4SCWX74J.mjs} +1 -0
- package/dist/{chunk-SZWLAJB7.mjs → chunk-RG4PVVKF.mjs} +104 -0
- package/dist/fonts.mjs +1 -1
- package/dist/index.js +8 -7
- package/dist/index.mjs +12 -110
- package/dist/privacy-center.js +311 -1
- package/dist/privacy-center.mjs +19 -2
- package/package.json +1 -1
package/dist/privacy-center.mjs
CHANGED
|
@@ -11,11 +11,16 @@ import {
|
|
|
11
11
|
USER_SERVICE_PATH,
|
|
12
12
|
getAppearanceLayout,
|
|
13
13
|
glassPalette,
|
|
14
|
+
loadNoticeWebfont,
|
|
14
15
|
resolveAppearance,
|
|
15
16
|
useIsomorphicLayoutEffect,
|
|
16
17
|
useMediaQuery,
|
|
17
18
|
withIdempotencyKey
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RG4PVVKF.mjs";
|
|
20
|
+
import {
|
|
21
|
+
INHERIT_FONT_FAMILY,
|
|
22
|
+
resolveNoticeFontFamily
|
|
23
|
+
} from "./chunk-4SCWX74J.mjs";
|
|
19
24
|
|
|
20
25
|
// src/RedactoPrivacyCenter/RedactoPrivacyCenter.tsx
|
|
21
26
|
import { I18nextProvider } from "react-i18next";
|
|
@@ -13794,7 +13799,8 @@ var OVERRIDDEN_VARS = [
|
|
|
13794
13799
|
"--pc-border-color",
|
|
13795
13800
|
"--pc-success",
|
|
13796
13801
|
"--pc-warning",
|
|
13797
|
-
"--pc-error"
|
|
13802
|
+
"--pc-error",
|
|
13803
|
+
"--pc-font-family"
|
|
13798
13804
|
];
|
|
13799
13805
|
function darken(hex, amount) {
|
|
13800
13806
|
const h = hex.replace("#", "").trim();
|
|
@@ -13826,6 +13832,17 @@ function applyBrandingTheme(theme) {
|
|
|
13826
13832
|
set("--pc-success", theme.success);
|
|
13827
13833
|
set("--pc-warning", theme.warning);
|
|
13828
13834
|
set("--pc-error", theme.danger);
|
|
13835
|
+
applyBrandingFont(theme.font_family);
|
|
13836
|
+
}
|
|
13837
|
+
function applyBrandingFont(fontFamily) {
|
|
13838
|
+
const root = document.documentElement;
|
|
13839
|
+
const stack = resolveNoticeFontFamily({ noticeFont: fontFamily });
|
|
13840
|
+
if (!(fontFamily == null ? void 0 : fontFamily.trim()) || stack === INHERIT_FONT_FAMILY) {
|
|
13841
|
+
root.style.removeProperty("--pc-font-family");
|
|
13842
|
+
return;
|
|
13843
|
+
}
|
|
13844
|
+
root.style.setProperty("--pc-font-family", stack);
|
|
13845
|
+
void loadNoticeWebfont(stack);
|
|
13829
13846
|
}
|
|
13830
13847
|
function clearBrandingTheme() {
|
|
13831
13848
|
if (typeof document === "undefined") return;
|