@convex-internal/web-analytics 1.0.1 → 1.0.3
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/README.md +4 -3
- package/dist/WebAnalyticsProvider.js +1 -2
- package/dist/banner.css +7 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -68,10 +68,11 @@ Theme with `--wa-banner-*` variables on `.wa-banner`:
|
|
|
68
68
|
- Buttons: `--wa-banner-button-border-radius`, `--wa-banner-button-padding`,
|
|
69
69
|
`--wa-banner-button-min-height`, `--wa-banner-button-font-size`,
|
|
70
70
|
`--wa-banner-button-font-weight`, `--wa-banner-button-line-height`
|
|
71
|
-
- Accept button: `--wa-banner-accept-background-color`, `--wa-banner-accept-text-color
|
|
72
|
-
`--wa-banner-accept-hover-background-color`
|
|
71
|
+
- Accept button: `--wa-banner-accept-background-color`, `--wa-banner-accept-text-color`
|
|
73
72
|
- Decline button: `--wa-banner-decline-background-color`,
|
|
74
|
-
`--wa-banner-decline-text-color
|
|
73
|
+
`--wa-banner-decline-text-color`
|
|
74
|
+
|
|
75
|
+
Buttons default to 80% opacity and go to 100% on hover or keyboard focus.
|
|
75
76
|
|
|
76
77
|
### `Consented`
|
|
77
78
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { posthog } from "posthog-js";
|
|
4
|
-
import { PostHogProvider } from "posthog-js/react";
|
|
5
4
|
import { createContext, useEffect } from "react";
|
|
6
5
|
import { ConsentBanner } from "./ConsentBanner.js";
|
|
7
6
|
import { useBooleanCookie } from "./useCookie.js";
|
|
@@ -84,5 +83,5 @@ export function WebAnalyticsProvider({ children, posthogConfig, }) {
|
|
|
84
83
|
setConsent: (status) => {
|
|
85
84
|
setValue(status === "consented" ? "true" : "false");
|
|
86
85
|
},
|
|
87
|
-
}, children: [
|
|
86
|
+
}, children: [children, _jsx(ConsentBanner, {})] }));
|
|
88
87
|
}
|
package/dist/banner.css
CHANGED
|
@@ -46,7 +46,13 @@
|
|
|
46
46
|
font-weight: var(--wa-banner-button-font-weight, inherit);
|
|
47
47
|
line-height: var(--wa-banner-button-line-height, inherit);
|
|
48
48
|
cursor: pointer;
|
|
49
|
-
|
|
49
|
+
opacity: 0.8;
|
|
50
|
+
transition: opacity 0.15s;
|
|
51
|
+
|
|
52
|
+
&:hover,
|
|
53
|
+
&:focus-visible {
|
|
54
|
+
opacity: 1;
|
|
55
|
+
}
|
|
50
56
|
|
|
51
57
|
&:focus-visible {
|
|
52
58
|
outline: 2px solid var(--wa-banner-focus-color, black);
|
|
@@ -56,22 +62,11 @@
|
|
|
56
62
|
&.wa-banner-decline {
|
|
57
63
|
background-color: var(--wa-banner-decline-background-color, lightgray);
|
|
58
64
|
color: var(--wa-banner-decline-text-color, black);
|
|
59
|
-
|
|
60
|
-
&:hover {
|
|
61
|
-
background-color: var(
|
|
62
|
-
--wa-banner-decline-hover-background-color,
|
|
63
|
-
lightgray
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
&.wa-banner-accept {
|
|
69
68
|
background-color: var(--wa-banner-accept-background-color, black);
|
|
70
69
|
color: var(--wa-banner-accept-text-color, white);
|
|
71
|
-
|
|
72
|
-
&:hover {
|
|
73
|
-
background-color: var(--wa-banner-accept-hover-background-color, black);
|
|
74
|
-
}
|
|
75
70
|
}
|
|
76
71
|
}
|
|
77
72
|
|