@c15t/react 0.0.1-rc.13 → 0.0.1-rc.14
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/components/consent-manager-dialog/__tests__/styles.spec.cjs +7 -7
- package/dist/components/consent-manager-dialog/__tests__/styles.spec.js +6 -6
- package/dist/components/consent-manager-dialog/consent-manager-dialog_module.css +3 -3
- package/dist/components/consent-manager-widget/__tests__/styles.spec.cjs +7 -7
- package/dist/components/consent-manager-widget/__tests__/styles.spec.js +6 -6
- package/dist/components/cookie-banner/__tests__/styles.spec.cjs +24 -7
- package/dist/components/cookie-banner/__tests__/styles.spec.js +23 -6
- package/dist/components/cookie-banner/error-boundary.cjs +0 -1
- package/dist/components/cookie-banner/error-boundary.js +0 -1
- package/dist/components/shared/libs/polymorphic.d.ts +1 -7
- package/dist/components/shared/libs/polymorphic.d.ts.map +1 -1
- package/dist/components/shared/primitives/button.types.d.ts +1 -8
- package/dist/components/shared/primitives/button.types.d.ts.map +1 -1
- package/dist/components/shared/ui/accordion/accordion.types.d.ts +0 -10
- package/dist/components/shared/ui/accordion/accordion.types.d.ts.map +1 -1
- package/dist/components/shared/ui/logo.cjs +4 -5
- package/dist/components/shared/ui/logo.d.ts.map +1 -1
- package/dist/components/shared/ui/logo.js +4 -5
- package/dist/context/consent-manager-context.d.ts +2 -2
- package/dist/context/consent-manager-context.d.ts.map +1 -1
- package/dist/hooks/use-consent-manager.cjs +2 -2
- package/dist/hooks/use-consent-manager.d.ts +2 -7
- package/dist/hooks/use-consent-manager.d.ts.map +1 -1
- package/dist/hooks/use-consent-manager.js +2 -2
- package/dist/hooks/use-focus-trap.cjs +1 -1
- package/dist/hooks/use-focus-trap.js +1 -1
- package/dist/hooks/use-theme.d.ts.map +1 -1
- package/dist/index.cjs +6 -12
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -4
- package/dist/providers/consent-manager-provider.cjs +26 -18
- package/dist/providers/consent-manager-provider.d.ts +16 -2
- package/dist/providers/consent-manager-provider.d.ts.map +1 -1
- package/dist/providers/consent-manager-provider.js +26 -18
- package/dist/types/consent-manager.d.ts +26 -55
- package/dist/types/consent-manager.d.ts.map +1 -1
- package/dist/utils/cn.cjs +0 -2
- package/dist/utils/cn.d.ts +1 -5
- package/dist/utils/cn.d.ts.map +1 -1
- package/dist/utils/cn.js +1 -2
- package/dist/{components/consent-manager-dialog/__tests__/utils.cjs → utils/test-helpers.cjs} +26 -28
- package/dist/utils/test-helpers.d.ts +30 -0
- package/dist/utils/test-helpers.d.ts.map +1 -0
- package/dist/utils/test-helpers.js +36 -0
- package/package.json +2 -2
- package/dist/components/consent-manager-dialog/__tests__/utils.d.ts +0 -13
- package/dist/components/consent-manager-dialog/__tests__/utils.d.ts.map +0 -1
- package/dist/components/consent-manager-dialog/__tests__/utils.js +0 -39
- package/dist/components/consent-manager-widget/__tests__/utils.cjs +0 -71
- package/dist/components/consent-manager-widget/__tests__/utils.d.ts +0 -13
- package/dist/components/consent-manager-widget/__tests__/utils.d.ts.map +0 -1
- package/dist/components/consent-manager-widget/__tests__/utils.js +0 -39
- package/dist/components/consent-manager-widget/atoms/logo.cjs +0 -99
- package/dist/components/consent-manager-widget/atoms/logo.d.ts +0 -8
- package/dist/components/consent-manager-widget/atoms/logo.d.ts.map +0 -1
- package/dist/components/consent-manager-widget/atoms/logo.js +0 -67
- package/dist/components/cookie-banner/__tests__/utils.cjs +0 -70
- package/dist/components/cookie-banner/__tests__/utils.d.ts +0 -13
- package/dist/components/cookie-banner/__tests__/utils.d.ts.map +0 -1
- package/dist/components/cookie-banner/__tests__/utils.js +0 -38
- package/dist/hooks/use-consent-client.cjs +0 -41
- package/dist/hooks/use-consent-client.d.ts +0 -26
- package/dist/hooks/use-consent-client.d.ts.map +0 -1
- package/dist/hooks/use-consent-client.js +0 -9
|
@@ -24,8 +24,8 @@ var __webpack_exports__ = {};
|
|
|
24
24
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
25
25
|
const external_vitest_namespaceObject = require("vitest");
|
|
26
26
|
const external_consent_manager_dialog_cjs_namespaceObject = require("../consent-manager-dialog.cjs");
|
|
27
|
-
const
|
|
28
|
-
var
|
|
27
|
+
const test_helpers_cjs_namespaceObject = require("../../../utils/test-helpers.cjs");
|
|
28
|
+
var test_helpers_cjs_default = /*#__PURE__*/ __webpack_require__.n(test_helpers_cjs_namespaceObject);
|
|
29
29
|
const ALL_COMPONENTS = [
|
|
30
30
|
{
|
|
31
31
|
testId: 'consent-manager-dialog-root',
|
|
@@ -72,7 +72,7 @@ const ALL_COMPONENTS = [
|
|
|
72
72
|
return acc;
|
|
73
73
|
}, {})
|
|
74
74
|
});
|
|
75
|
-
await
|
|
75
|
+
await test_helpers_cjs_default()({
|
|
76
76
|
component: test,
|
|
77
77
|
testCases: ALL_COMPONENTS.map(({ testId, styles })=>({
|
|
78
78
|
testId,
|
|
@@ -103,7 +103,7 @@ const ALL_COMPONENTS = [
|
|
|
103
103
|
return acc;
|
|
104
104
|
}, {})
|
|
105
105
|
});
|
|
106
|
-
await
|
|
106
|
+
await test_helpers_cjs_default()({
|
|
107
107
|
component: test,
|
|
108
108
|
testCases: testCases.map(({ testId, className, style })=>({
|
|
109
109
|
testId,
|
|
@@ -124,7 +124,7 @@ const ALL_COMPONENTS = [
|
|
|
124
124
|
return acc;
|
|
125
125
|
}, {})
|
|
126
126
|
});
|
|
127
|
-
await
|
|
127
|
+
await test_helpers_cjs_default()({
|
|
128
128
|
component: test,
|
|
129
129
|
testCases: ALL_COMPONENTS.map(({ testId, styles })=>({
|
|
130
130
|
testId,
|
|
@@ -149,7 +149,7 @@ const ALL_COMPONENTS = [
|
|
|
149
149
|
theme: mixedTheme,
|
|
150
150
|
open: true
|
|
151
151
|
});
|
|
152
|
-
await
|
|
152
|
+
await test_helpers_cjs_default()({
|
|
153
153
|
component: test,
|
|
154
154
|
testCases: [
|
|
155
155
|
{
|
|
@@ -186,7 +186,7 @@ const ALL_COMPONENTS = [
|
|
|
186
186
|
open: true,
|
|
187
187
|
theme: edgeCaseTheme
|
|
188
188
|
});
|
|
189
|
-
await
|
|
189
|
+
await test_helpers_cjs_default()({
|
|
190
190
|
component: test,
|
|
191
191
|
testCases: [
|
|
192
192
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE_vitest__ from "vitest";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE__consent_manager_dialog_js_fdf416e1__ from "../consent-manager-dialog.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__ from "../../../utils/test-helpers.js";
|
|
5
5
|
const ALL_COMPONENTS = [
|
|
6
6
|
{
|
|
7
7
|
testId: 'consent-manager-dialog-root',
|
|
@@ -48,7 +48,7 @@ const ALL_COMPONENTS = [
|
|
|
48
48
|
return acc;
|
|
49
49
|
}, {})
|
|
50
50
|
});
|
|
51
|
-
await (0,
|
|
51
|
+
await (0, __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__["default"])({
|
|
52
52
|
component: test,
|
|
53
53
|
testCases: ALL_COMPONENTS.map(({ testId, styles })=>({
|
|
54
54
|
testId,
|
|
@@ -79,7 +79,7 @@ const ALL_COMPONENTS = [
|
|
|
79
79
|
return acc;
|
|
80
80
|
}, {})
|
|
81
81
|
});
|
|
82
|
-
await (0,
|
|
82
|
+
await (0, __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__["default"])({
|
|
83
83
|
component: test,
|
|
84
84
|
testCases: testCases.map(({ testId, className, style })=>({
|
|
85
85
|
testId,
|
|
@@ -100,7 +100,7 @@ const ALL_COMPONENTS = [
|
|
|
100
100
|
return acc;
|
|
101
101
|
}, {})
|
|
102
102
|
});
|
|
103
|
-
await (0,
|
|
103
|
+
await (0, __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__["default"])({
|
|
104
104
|
component: test,
|
|
105
105
|
testCases: ALL_COMPONENTS.map(({ testId, styles })=>({
|
|
106
106
|
testId,
|
|
@@ -125,7 +125,7 @@ const ALL_COMPONENTS = [
|
|
|
125
125
|
theme: mixedTheme,
|
|
126
126
|
open: true
|
|
127
127
|
});
|
|
128
|
-
await (0,
|
|
128
|
+
await (0, __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__["default"])({
|
|
129
129
|
component: test,
|
|
130
130
|
testCases: [
|
|
131
131
|
{
|
|
@@ -162,7 +162,7 @@ const ALL_COMPONENTS = [
|
|
|
162
162
|
open: true,
|
|
163
163
|
theme: edgeCaseTheme
|
|
164
164
|
});
|
|
165
|
-
await (0,
|
|
165
|
+
await (0, __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__["default"])({
|
|
166
166
|
component: test,
|
|
167
167
|
testCases: [
|
|
168
168
|
{
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
--dialog-card-gap: .375rem;
|
|
34
34
|
--dialog-header-gap: .375rem;
|
|
35
35
|
--dialog-content-gap: 1rem;
|
|
36
|
-
--dialog-footer-padding-
|
|
36
|
+
--dialog-footer-padding-y: 1rem;
|
|
37
37
|
--dialog-card-radius: 1.25rem;
|
|
38
38
|
--dialog-max-width: 28rem;
|
|
39
39
|
--dialog-height: 80%;
|
|
@@ -188,8 +188,8 @@
|
|
|
188
188
|
|
|
189
189
|
.c15t-footer-oOtr_ {
|
|
190
190
|
font-size: var(--dialog-footer-font-size);
|
|
191
|
-
padding: var(--dialog-
|
|
192
|
-
padding-
|
|
191
|
+
padding-top: var(--dialog-footer-padding-y);
|
|
192
|
+
padding-bottom: var(--dialog-footer-padding-y);
|
|
193
193
|
border-top: var(--dialog-border-width) var(--dialog-border-style) var(--dialog-stroke-color);
|
|
194
194
|
justify-content: center;
|
|
195
195
|
align-items: center;
|
|
@@ -24,8 +24,8 @@ var __webpack_exports__ = {};
|
|
|
24
24
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
25
25
|
const external_vitest_namespaceObject = require("vitest");
|
|
26
26
|
const external_consent_manager_widget_cjs_namespaceObject = require("../consent-manager-widget.cjs");
|
|
27
|
-
const
|
|
28
|
-
var
|
|
27
|
+
const test_helpers_cjs_namespaceObject = require("../../../utils/test-helpers.cjs");
|
|
28
|
+
var test_helpers_cjs_default = /*#__PURE__*/ __webpack_require__.n(test_helpers_cjs_namespaceObject);
|
|
29
29
|
const ALL_COMPONENTS = [
|
|
30
30
|
{
|
|
31
31
|
testId: 'consent-manager-widget-root',
|
|
@@ -85,7 +85,7 @@ const ALL_COMPONENTS = [
|
|
|
85
85
|
return acc;
|
|
86
86
|
}, {})
|
|
87
87
|
});
|
|
88
|
-
await
|
|
88
|
+
await test_helpers_cjs_default()({
|
|
89
89
|
component: test,
|
|
90
90
|
testCases: ALL_COMPONENTS.map(({ testId, styles })=>({
|
|
91
91
|
testId,
|
|
@@ -114,7 +114,7 @@ const ALL_COMPONENTS = [
|
|
|
114
114
|
return acc;
|
|
115
115
|
}, {})
|
|
116
116
|
});
|
|
117
|
-
await
|
|
117
|
+
await test_helpers_cjs_default()({
|
|
118
118
|
component: test,
|
|
119
119
|
testCases: testCases.map(({ testId, className, style })=>({
|
|
120
120
|
testId,
|
|
@@ -133,7 +133,7 @@ const ALL_COMPONENTS = [
|
|
|
133
133
|
return acc;
|
|
134
134
|
}, {})
|
|
135
135
|
});
|
|
136
|
-
await
|
|
136
|
+
await test_helpers_cjs_default()({
|
|
137
137
|
component: test,
|
|
138
138
|
testCases: ALL_COMPONENTS.map(({ testId, styles })=>({
|
|
139
139
|
testId,
|
|
@@ -156,7 +156,7 @@ const ALL_COMPONENTS = [
|
|
|
156
156
|
const test = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_consent_manager_widget_cjs_namespaceObject.ConsentManagerWidget, {
|
|
157
157
|
theme: mixedTheme
|
|
158
158
|
});
|
|
159
|
-
await
|
|
159
|
+
await test_helpers_cjs_default()({
|
|
160
160
|
component: test,
|
|
161
161
|
testCases: [
|
|
162
162
|
{
|
|
@@ -191,7 +191,7 @@ const ALL_COMPONENTS = [
|
|
|
191
191
|
const test = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_consent_manager_widget_cjs_namespaceObject.ConsentManagerWidget, {
|
|
192
192
|
theme: edgeCaseTheme
|
|
193
193
|
});
|
|
194
|
-
await
|
|
194
|
+
await test_helpers_cjs_default()({
|
|
195
195
|
component: test,
|
|
196
196
|
testCases: [
|
|
197
197
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE_vitest__ from "vitest";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE__consent_manager_widget_js_ec34d749__ from "../consent-manager-widget.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__ from "../../../utils/test-helpers.js";
|
|
5
5
|
const ALL_COMPONENTS = [
|
|
6
6
|
{
|
|
7
7
|
testId: 'consent-manager-widget-root',
|
|
@@ -61,7 +61,7 @@ const ALL_COMPONENTS = [
|
|
|
61
61
|
return acc;
|
|
62
62
|
}, {})
|
|
63
63
|
});
|
|
64
|
-
await (0,
|
|
64
|
+
await (0, __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__["default"])({
|
|
65
65
|
component: test,
|
|
66
66
|
testCases: ALL_COMPONENTS.map(({ testId, styles })=>({
|
|
67
67
|
testId,
|
|
@@ -90,7 +90,7 @@ const ALL_COMPONENTS = [
|
|
|
90
90
|
return acc;
|
|
91
91
|
}, {})
|
|
92
92
|
});
|
|
93
|
-
await (0,
|
|
93
|
+
await (0, __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__["default"])({
|
|
94
94
|
component: test,
|
|
95
95
|
testCases: testCases.map(({ testId, className, style })=>({
|
|
96
96
|
testId,
|
|
@@ -109,7 +109,7 @@ const ALL_COMPONENTS = [
|
|
|
109
109
|
return acc;
|
|
110
110
|
}, {})
|
|
111
111
|
});
|
|
112
|
-
await (0,
|
|
112
|
+
await (0, __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__["default"])({
|
|
113
113
|
component: test,
|
|
114
114
|
testCases: ALL_COMPONENTS.map(({ testId, styles })=>({
|
|
115
115
|
testId,
|
|
@@ -132,7 +132,7 @@ const ALL_COMPONENTS = [
|
|
|
132
132
|
const test = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__consent_manager_widget_js_ec34d749__.ConsentManagerWidget, {
|
|
133
133
|
theme: mixedTheme
|
|
134
134
|
});
|
|
135
|
-
await (0,
|
|
135
|
+
await (0, __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__["default"])({
|
|
136
136
|
component: test,
|
|
137
137
|
testCases: [
|
|
138
138
|
{
|
|
@@ -167,7 +167,7 @@ const ALL_COMPONENTS = [
|
|
|
167
167
|
const test = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__consent_manager_widget_js_ec34d749__.ConsentManagerWidget, {
|
|
168
168
|
theme: edgeCaseTheme
|
|
169
169
|
});
|
|
170
|
-
await (0,
|
|
170
|
+
await (0, __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__["default"])({
|
|
171
171
|
component: test,
|
|
172
172
|
testCases: [
|
|
173
173
|
{
|
|
@@ -24,8 +24,25 @@ var __webpack_exports__ = {};
|
|
|
24
24
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
25
25
|
const external_vitest_namespaceObject = require("vitest");
|
|
26
26
|
const external_cookie_banner_cjs_namespaceObject = require("../cookie-banner.cjs");
|
|
27
|
-
const
|
|
28
|
-
var
|
|
27
|
+
const test_helpers_cjs_namespaceObject = require("../../../utils/test-helpers.cjs");
|
|
28
|
+
var test_helpers_cjs_default = /*#__PURE__*/ __webpack_require__.n(test_helpers_cjs_namespaceObject);
|
|
29
|
+
external_vitest_namespaceObject.vi.mock('~/hooks/use-consent-manager', ()=>({
|
|
30
|
+
useConsentManager: ()=>({
|
|
31
|
+
showPopup: true,
|
|
32
|
+
...external_vitest_namespaceObject.vi.fn()
|
|
33
|
+
})
|
|
34
|
+
}));
|
|
35
|
+
external_vitest_namespaceObject.vi.mock('~/hooks/use-translations', ()=>({
|
|
36
|
+
useTranslations: ()=>({
|
|
37
|
+
cookieBanner: {
|
|
38
|
+
title: 'Cookie Settings',
|
|
39
|
+
description: 'We use cookies to enhance your experience',
|
|
40
|
+
acceptAll: 'Accept All',
|
|
41
|
+
rejectAll: 'Reject All',
|
|
42
|
+
customize: 'Customize'
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
}));
|
|
29
46
|
const ALL_COMPONENTS = [
|
|
30
47
|
{
|
|
31
48
|
testId: 'cookie-banner-root',
|
|
@@ -91,7 +108,7 @@ const ALL_COMPONENTS = [
|
|
|
91
108
|
return acc;
|
|
92
109
|
}, {})
|
|
93
110
|
});
|
|
94
|
-
await
|
|
111
|
+
await test_helpers_cjs_default()({
|
|
95
112
|
component: test,
|
|
96
113
|
testCases: ALL_COMPONENTS.map(({ testId, styles })=>({
|
|
97
114
|
testId,
|
|
@@ -121,7 +138,7 @@ const ALL_COMPONENTS = [
|
|
|
121
138
|
return acc;
|
|
122
139
|
}, {})
|
|
123
140
|
});
|
|
124
|
-
await
|
|
141
|
+
await test_helpers_cjs_default()({
|
|
125
142
|
component: test,
|
|
126
143
|
testCases: testCases.map(({ testId, className, style })=>({
|
|
127
144
|
testId,
|
|
@@ -141,7 +158,7 @@ const ALL_COMPONENTS = [
|
|
|
141
158
|
return acc;
|
|
142
159
|
}, {})
|
|
143
160
|
});
|
|
144
|
-
await
|
|
161
|
+
await test_helpers_cjs_default()({
|
|
145
162
|
component: test,
|
|
146
163
|
testCases: ALL_COMPONENTS.map(({ testId, styles })=>({
|
|
147
164
|
testId,
|
|
@@ -165,7 +182,7 @@ const ALL_COMPONENTS = [
|
|
|
165
182
|
scrollLock: true,
|
|
166
183
|
theme: mixedTheme
|
|
167
184
|
});
|
|
168
|
-
await
|
|
185
|
+
await test_helpers_cjs_default()({
|
|
169
186
|
component: test,
|
|
170
187
|
testCases: [
|
|
171
188
|
{
|
|
@@ -204,7 +221,7 @@ const ALL_COMPONENTS = [
|
|
|
204
221
|
scrollLock: true,
|
|
205
222
|
theme: edgeCaseTheme
|
|
206
223
|
});
|
|
207
|
-
await
|
|
224
|
+
await test_helpers_cjs_default()({
|
|
208
225
|
component: test,
|
|
209
226
|
testCases: [
|
|
210
227
|
{
|
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE_vitest__ from "vitest";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE__cookie_banner_js_0a2d98b7__ from "../cookie-banner.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__ from "../../../utils/test-helpers.js";
|
|
5
|
+
__WEBPACK_EXTERNAL_MODULE_vitest__.vi.mock('~/hooks/use-consent-manager', ()=>({
|
|
6
|
+
useConsentManager: ()=>({
|
|
7
|
+
showPopup: true,
|
|
8
|
+
...__WEBPACK_EXTERNAL_MODULE_vitest__.vi.fn()
|
|
9
|
+
})
|
|
10
|
+
}));
|
|
11
|
+
__WEBPACK_EXTERNAL_MODULE_vitest__.vi.mock('~/hooks/use-translations', ()=>({
|
|
12
|
+
useTranslations: ()=>({
|
|
13
|
+
cookieBanner: {
|
|
14
|
+
title: 'Cookie Settings',
|
|
15
|
+
description: 'We use cookies to enhance your experience',
|
|
16
|
+
acceptAll: 'Accept All',
|
|
17
|
+
rejectAll: 'Reject All',
|
|
18
|
+
customize: 'Customize'
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
}));
|
|
5
22
|
const ALL_COMPONENTS = [
|
|
6
23
|
{
|
|
7
24
|
testId: 'cookie-banner-root',
|
|
@@ -67,7 +84,7 @@ const ALL_COMPONENTS = [
|
|
|
67
84
|
return acc;
|
|
68
85
|
}, {})
|
|
69
86
|
});
|
|
70
|
-
await (0,
|
|
87
|
+
await (0, __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__["default"])({
|
|
71
88
|
component: test,
|
|
72
89
|
testCases: ALL_COMPONENTS.map(({ testId, styles })=>({
|
|
73
90
|
testId,
|
|
@@ -97,7 +114,7 @@ const ALL_COMPONENTS = [
|
|
|
97
114
|
return acc;
|
|
98
115
|
}, {})
|
|
99
116
|
});
|
|
100
|
-
await (0,
|
|
117
|
+
await (0, __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__["default"])({
|
|
101
118
|
component: test,
|
|
102
119
|
testCases: testCases.map(({ testId, className, style })=>({
|
|
103
120
|
testId,
|
|
@@ -117,7 +134,7 @@ const ALL_COMPONENTS = [
|
|
|
117
134
|
return acc;
|
|
118
135
|
}, {})
|
|
119
136
|
});
|
|
120
|
-
await (0,
|
|
137
|
+
await (0, __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__["default"])({
|
|
121
138
|
component: test,
|
|
122
139
|
testCases: ALL_COMPONENTS.map(({ testId, styles })=>({
|
|
123
140
|
testId,
|
|
@@ -141,7 +158,7 @@ const ALL_COMPONENTS = [
|
|
|
141
158
|
scrollLock: true,
|
|
142
159
|
theme: mixedTheme
|
|
143
160
|
});
|
|
144
|
-
await (0,
|
|
161
|
+
await (0, __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__["default"])({
|
|
145
162
|
component: test,
|
|
146
163
|
testCases: [
|
|
147
164
|
{
|
|
@@ -180,7 +197,7 @@ const ALL_COMPONENTS = [
|
|
|
180
197
|
scrollLock: true,
|
|
181
198
|
theme: edgeCaseTheme
|
|
182
199
|
});
|
|
183
|
-
await (0,
|
|
200
|
+
await (0, __WEBPACK_EXTERNAL_MODULE__utils_test_helpers_js_1e3d26b6__["default"])({
|
|
184
201
|
component: test,
|
|
185
202
|
testCases: [
|
|
186
203
|
{
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentPropsWithoutRef, ElementType, PropsWithChildren } from 'react';
|
|
2
2
|
type AsProp<T extends ElementType> = {
|
|
3
3
|
as?: T;
|
|
4
4
|
};
|
|
5
5
|
type PropsToOmit<T extends ElementType, P> = keyof (AsProp<T> & P);
|
|
6
6
|
type PolymorphicComponentProp<T extends ElementType, Props extends Record<string, unknown> = Record<string, unknown>> = PropsWithChildren<Props & AsProp<T>> & Omit<ComponentPropsWithoutRef<T>, PropsToOmit<T, Props>>;
|
|
7
|
-
export type PolymorphicRef<T extends ElementType> = ComponentPropsWithRef<T>['ref'];
|
|
8
|
-
type PolymorphicComponentPropWithRef<T extends ElementType, Props extends Record<string, unknown> = Record<string, unknown>> = PolymorphicComponentProp<T, Props> & {
|
|
9
|
-
ref?: PolymorphicRef<T>;
|
|
10
|
-
};
|
|
11
|
-
export type PolymorphicComponentPropsWithRef<T extends ElementType, P extends Record<string, unknown> = Record<string, unknown>> = PolymorphicComponentPropWithRef<T, P>;
|
|
12
7
|
export type PolymorphicComponentProps<T extends ElementType, P extends Record<string, unknown> = Record<string, unknown>> = PolymorphicComponentProp<T, P>;
|
|
13
|
-
export type PolymorphicComponent<P extends Record<string, unknown>> = <T extends ElementType>(props: PolymorphicComponentPropsWithRef<T, P>) => ReactNode;
|
|
14
8
|
export {};
|
|
15
9
|
//# sourceMappingURL=polymorphic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polymorphic.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/libs/polymorphic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,
|
|
1
|
+
{"version":3,"file":"polymorphic.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/libs/polymorphic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,wBAAwB,EACxB,WAAW,EACX,iBAAiB,EACjB,MAAM,OAAO,CAAC;AAEf,KAAK,MAAM,CAAC,CAAC,SAAS,WAAW,IAAI;IACpC,EAAE,CAAC,EAAE,CAAC,CAAC;CACP,CAAC;AAEF,KAAK,WAAW,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAEnE,KAAK,wBAAwB,CAC5B,CAAC,SAAS,WAAW,EACrB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAC5D,iBAAiB,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,GACvC,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;AAE1D,MAAM,MAAM,yBAAyB,CACpC,CAAC,SAAS,WAAW,EACrB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IACxD,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ComponentRef, HTMLAttributes } from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
import type { ExtendThemeKeys, ThemeValue } from '../../../types/theme';
|
|
2
|
+
import type { ExtendThemeKeys } from '../../../types/theme';
|
|
4
3
|
import type { CSSVariables } from '../../../types/theme';
|
|
5
4
|
export type ConsentButtonElement = ComponentRef<'button'>;
|
|
6
5
|
/**
|
|
@@ -26,10 +25,4 @@ export interface ConsentButtonProps extends Omit<HTMLAttributes<HTMLButtonElemen
|
|
|
26
25
|
*/
|
|
27
26
|
onClick?: () => void;
|
|
28
27
|
}
|
|
29
|
-
export interface ConsentButtonStyles {
|
|
30
|
-
/** @remarks Styles for the root container element */
|
|
31
|
-
acceptButton?: ThemeValue & ButtonSharedProps;
|
|
32
|
-
rejectButton?: ThemeValue & ButtonSharedProps;
|
|
33
|
-
customizeButton?: ThemeValue & ButtonSharedProps;
|
|
34
|
-
}
|
|
35
28
|
//# sourceMappingURL=button.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.types.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/primitives/button.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"button.types.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/primitives/button.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;AAE1D;;;;GAIG;AACH,MAAM,WAAW,kBAChB,SAAQ,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,EACvD,eAAe,CAAC,YAAY,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB"}
|
|
@@ -49,16 +49,6 @@ export type AccordionIconCSSVariables = {
|
|
|
49
49
|
'--accordion-icon-size': string;
|
|
50
50
|
'--accordion-icon-color': string;
|
|
51
51
|
};
|
|
52
|
-
/**
|
|
53
|
-
* CSS variables for the accordion arrow component
|
|
54
|
-
*/
|
|
55
|
-
export type AccordionArrowCSSVariables = {
|
|
56
|
-
'--accordion-icon-size': string;
|
|
57
|
-
'--accordion-arrow-color': string;
|
|
58
|
-
'--accordion-icon-color': string;
|
|
59
|
-
'--accordion-duration': string;
|
|
60
|
-
'--accordion-ease': string;
|
|
61
|
-
};
|
|
62
52
|
/**
|
|
63
53
|
* CSS variables for the accordion content component
|
|
64
54
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/ui/accordion/accordion.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACzC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,uBAAuB,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACxC,8BAA8B,EAAE,MAAM,CAAC;IACvC,8BAA8B,EAAE,MAAM,CAAC;IACvC,0BAA0B,EAAE,MAAM,CAAC;IACnC,wBAAwB,EAAE,MAAM,CAAC;IACjC,wBAAwB,EAAE,MAAM,CAAC;IACjC,yBAAyB,EAAE,MAAM,CAAC;IAClC,2BAA2B,EAAE,MAAM,CAAC;IACpC,wBAAwB,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,2BAA2B,GAClE,0BAA0B,CAAC;AAE5B;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACvC,8BAA8B,EAAE,MAAM,CAAC;IACvC,0BAA0B,EAAE,MAAM,CAAC;IACnC,oBAAoB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG;IAC1C,wBAAwB,EAAE,MAAM,CAAC;IACjC,wBAAwB,EAAE,MAAM,CAAC;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACvC,uBAAuB,EAAE,MAAM,CAAC;IAChC,wBAAwB,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"accordion.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/ui/accordion/accordion.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACzC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,uBAAuB,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACxC,8BAA8B,EAAE,MAAM,CAAC;IACvC,8BAA8B,EAAE,MAAM,CAAC;IACvC,0BAA0B,EAAE,MAAM,CAAC;IACnC,wBAAwB,EAAE,MAAM,CAAC;IACjC,wBAAwB,EAAE,MAAM,CAAC;IACjC,yBAAyB,EAAE,MAAM,CAAC;IAClC,2BAA2B,EAAE,MAAM,CAAC;IACpC,wBAAwB,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,2BAA2B,GAClE,0BAA0B,CAAC;AAE5B;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACvC,8BAA8B,EAAE,MAAM,CAAC;IACvC,0BAA0B,EAAE,MAAM,CAAC;IACnC,oBAAoB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG;IAC1C,wBAAwB,EAAE,MAAM,CAAC;IACjC,wBAAwB,EAAE,MAAM,CAAC;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACvC,uBAAuB,EAAE,MAAM,CAAC;IAChC,wBAAwB,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG;IAC1C,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2BAA2B,EAAE,MAAM,CAAC;CACpC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,yBAAyB,CAAC"}
|
|
@@ -38,11 +38,10 @@ const ConsentManagementIcon = ({ title = 'c15t', titleId = 'c15t', ...props })=>
|
|
|
38
38
|
children: title
|
|
39
39
|
}),
|
|
40
40
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
d: "M74.133 40.987c9.301 0 16.84-7.54 16.84-16.84 0-9.302-7.539-16.842-16.84-16.842s-16.841 7.54-16.841 16.841c0 9.301 7.54 16.841 16.84 16.841ZM62.008 36.272 35.736 62.544M61.078 114.226 34.806 87.954M23.61 91.51c9.301 0 16.841-7.54 16.841-16.84 0-9.302-7.54-16.842-16.84-16.842-9.302 0-16.841 7.54-16.841 16.841 0 9.301 7.54 16.841 16.84 16.841ZM40.452 74.67h67.363M124.656 91.51c9.301 0 16.841-7.54 16.841-16.84 0-9.302-7.54-16.842-16.841-16.842-9.301 0-16.841 7.54-16.841 16.841 0 9.301 7.54 16.841 16.841 16.841ZM74.133 142.033c9.301 0 16.84-7.54 16.84-16.841 0-9.301-7.539-16.841-16.84-16.841s-16.841 7.54-16.841 16.841c0 9.301 7.54 16.841 16.84 16.841Z"
|
|
41
|
+
fill: "currentColor",
|
|
42
|
+
fillRule: "evenodd",
|
|
43
|
+
d: "M74.133 14.042c-5.58 0-10.105 4.524-10.105 10.104 0 5.581 4.524 10.105 10.105 10.105 5.58 0 10.105-4.524 10.105-10.105 0-5.58-4.524-10.104-10.105-10.104ZM50.556 24.146C50.556 11.125 61.112.57 74.133.57 87.154.57 97.71 11.125 97.71 24.146c0 13.022-10.556 23.578-23.577 23.578-4.06 0-7.88-1.027-11.216-2.834L44.354 63.453a23.424 23.424 0 0 1 1.858 4.48h55.843c2.899-9.74 11.921-16.841 22.601-16.841 13.022 0 23.578 10.556 23.578 23.577 0 13.022-10.556 23.578-23.578 23.578-10.68 0-19.702-7.102-22.601-16.841H46.211a23.455 23.455 0 0 1-2.628 5.798l18.015 18.015a23.473 23.473 0 0 1 12.535-3.604c13.021 0 23.577 10.556 23.577 23.577 0 13.022-10.556 23.577-23.577 23.577-13.021 0-23.577-10.555-23.577-23.577 0-3.506.765-6.833 2.138-9.824l-19.26-19.26a23.49 23.49 0 0 1-9.823 2.139C10.588 98.247.032 87.69.032 74.669c0-13.021 10.556-23.577 23.577-23.577 4.061 0 7.882 1.026 11.217 2.834L53.39 35.364a23.473 23.473 0 0 1-2.834-11.218Zm63.996 50.523v.023c.012 5.57 4.531 10.082 10.104 10.082 5.581 0 10.105-4.524 10.105-10.105 0-5.58-4.524-10.104-10.105-10.104-5.573 0-10.092 4.511-10.104 10.082v.022ZM23.61 64.565c-5.58 0-10.104 4.524-10.104 10.104 0 5.58 4.524 10.105 10.104 10.105 5.581 0 10.105-4.524 10.105-10.105 0-5.58-4.524-10.104-10.105-10.104Zm40.418 60.627c0-5.581 4.524-10.104 10.105-10.104 5.58 0 10.105 4.523 10.105 10.104 0 5.581-4.524 10.105-10.105 10.105-5.58 0-10.105-4.524-10.105-10.105Z",
|
|
44
|
+
clipRule: "evenodd"
|
|
46
45
|
}),
|
|
47
46
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
|
|
48
47
|
fill: "currentColor",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/ui/logo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,UAAU,0BAA0B;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,qBAAqB,GAAI,8BAInC,QAAQ,CAAC,aAAa,CAAC,GAAG,0BAA0B,
|
|
1
|
+
{"version":3,"file":"logo.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/ui/logo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,UAAU,0BAA0B;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,qBAAqB,GAAI,8BAInC,QAAQ,CAAC,aAAa,CAAC,GAAG,0BAA0B,4CAmBtD,CAAC"}
|
|
@@ -10,11 +10,10 @@ const ConsentManagementIcon = ({ title = 'c15t', titleId = 'c15t', ...props })=>
|
|
|
10
10
|
children: title
|
|
11
11
|
}),
|
|
12
12
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
d: "M74.133 40.987c9.301 0 16.84-7.54 16.84-16.84 0-9.302-7.539-16.842-16.84-16.842s-16.841 7.54-16.841 16.841c0 9.301 7.54 16.841 16.84 16.841ZM62.008 36.272 35.736 62.544M61.078 114.226 34.806 87.954M23.61 91.51c9.301 0 16.841-7.54 16.841-16.84 0-9.302-7.54-16.842-16.84-16.842-9.302 0-16.841 7.54-16.841 16.841 0 9.301 7.54 16.841 16.84 16.841ZM40.452 74.67h67.363M124.656 91.51c9.301 0 16.841-7.54 16.841-16.84 0-9.302-7.54-16.842-16.841-16.842-9.301 0-16.841 7.54-16.841 16.841 0 9.301 7.54 16.841 16.841 16.841ZM74.133 142.033c9.301 0 16.84-7.54 16.84-16.841 0-9.301-7.539-16.841-16.84-16.841s-16.841 7.54-16.841 16.841c0 9.301 7.54 16.841 16.84 16.841Z"
|
|
13
|
+
fill: "currentColor",
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
d: "M74.133 14.042c-5.58 0-10.105 4.524-10.105 10.104 0 5.581 4.524 10.105 10.105 10.105 5.58 0 10.105-4.524 10.105-10.105 0-5.58-4.524-10.104-10.105-10.104ZM50.556 24.146C50.556 11.125 61.112.57 74.133.57 87.154.57 97.71 11.125 97.71 24.146c0 13.022-10.556 23.578-23.577 23.578-4.06 0-7.88-1.027-11.216-2.834L44.354 63.453a23.424 23.424 0 0 1 1.858 4.48h55.843c2.899-9.74 11.921-16.841 22.601-16.841 13.022 0 23.578 10.556 23.578 23.577 0 13.022-10.556 23.578-23.578 23.578-10.68 0-19.702-7.102-22.601-16.841H46.211a23.455 23.455 0 0 1-2.628 5.798l18.015 18.015a23.473 23.473 0 0 1 12.535-3.604c13.021 0 23.577 10.556 23.577 23.577 0 13.022-10.556 23.577-23.577 23.577-13.021 0-23.577-10.555-23.577-23.577 0-3.506.765-6.833 2.138-9.824l-19.26-19.26a23.49 23.49 0 0 1-9.823 2.139C10.588 98.247.032 87.69.032 74.669c0-13.021 10.556-23.577 23.577-23.577 4.061 0 7.882 1.026 11.217 2.834L53.39 35.364a23.473 23.473 0 0 1-2.834-11.218Zm63.996 50.523v.023c.012 5.57 4.531 10.082 10.104 10.082 5.581 0 10.105-4.524 10.105-10.105 0-5.58-4.524-10.104-10.105-10.104-5.573 0-10.092 4.511-10.104 10.082v.022ZM23.61 64.565c-5.58 0-10.104 4.524-10.104 10.104 0 5.58 4.524 10.105 10.104 10.105 5.581 0 10.105-4.524 10.105-10.105 0-5.58-4.524-10.104-10.105-10.104Zm40.418 60.627c0-5.581 4.524-10.104 10.105-10.104 5.58 0 10.105 4.523 10.105 10.104 0 5.581-4.524 10.105-10.105 10.105-5.58 0-10.105-4.524-10.105-10.105Z",
|
|
16
|
+
clipRule: "evenodd"
|
|
18
17
|
}),
|
|
19
18
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
|
|
20
19
|
fill: "currentColor",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @packageDocumentation
|
|
3
3
|
* Provides the context for sharing consent management state across components.
|
|
4
4
|
*/
|
|
5
|
-
import type {
|
|
5
|
+
import type { ConsentManagerInterface, PrivacyConsentState } from 'c15t';
|
|
6
6
|
/**
|
|
7
7
|
* The context value provided by ConsentManagerProvider.
|
|
8
8
|
*/
|
|
@@ -23,7 +23,7 @@ export interface ConsentStateContextValue {
|
|
|
23
23
|
/**
|
|
24
24
|
* Optional API client instance
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
manager: ConsentManagerInterface | null;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* Context for sharing consent management state across components.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-manager-context.d.ts","sourceRoot":"","sources":["../../src/context/consent-manager-context.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"consent-manager-context.d.ts","sourceRoot":"","sources":["../../src/context/consent-manager-context.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAGzE;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC;;OAEG;IACH,KAAK,EAAE,mBAAmB,CAAC;IAE3B;;;OAGG;IACH,KAAK,EAAE;QACN,QAAQ,EAAE,MAAM,mBAAmB,CAAC;QACpC,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;QAC1E,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;KACxD,CAAC;IAEF;;OAEG;IACH,OAAO,EAAE,uBAAuB,GAAG,IAAI,CAAC;CACxC;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,+DAEpB,CAAC"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* - Methods to update consents
|
|
12
12
|
* - Compliance settings and region detection
|
|
13
13
|
* - State persistence and retrieval
|
|
14
|
-
* - The
|
|
14
|
+
* - The consent manager (if configured)
|
|
15
15
|
*
|
|
16
16
|
* The hook must be used within a ConsentManagerProvider component.
|
|
17
17
|
*
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* @public
|
|
23
23
|
*/
|
|
24
24
|
export declare function useConsentManager(): {
|
|
25
|
-
|
|
25
|
+
manager?: import("c15t").ConsentManagerInterface | undefined;
|
|
26
26
|
consents: import("c15t").ConsentState;
|
|
27
27
|
consentInfo: {
|
|
28
28
|
time: number;
|
|
@@ -53,15 +53,10 @@ export declare function useConsentManager(): {
|
|
|
53
53
|
setCallback: (name: keyof import("c15t").Callbacks, callback: import("c15t").CallbackFunction | undefined) => void;
|
|
54
54
|
setDetectedCountry: (country: string) => void;
|
|
55
55
|
setLocationInfo: (location: import("c15t").LocationInfo | null) => void;
|
|
56
|
-
setJurisdictionInfo: (jurisdiction: import("c15t").JurisdictionInfo | null) => void;
|
|
57
56
|
fetchConsentBannerInfo: () => Promise<import("c15t").ConsentBannerResponse | undefined>;
|
|
58
57
|
getDisplayedConsents: () => typeof import("c15t").consentTypes;
|
|
59
58
|
hasConsented: () => boolean;
|
|
60
|
-
clearAllData: () => void;
|
|
61
|
-
updateConsentMode: () => void;
|
|
62
|
-
setPrivacySettings: (settings: Partial<import("c15t").PrivacySettings>) => void;
|
|
63
59
|
getEffectiveConsents: () => import("c15t").ConsentState;
|
|
64
60
|
hasConsentFor: (consentType: import("c15t").AllConsentNames) => boolean;
|
|
65
|
-
setIncludeNonDisplayedConsents: (include: boolean) => void;
|
|
66
61
|
};
|
|
67
62
|
//# sourceMappingURL=use-consent-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-consent-manager.d.ts","sourceRoot":"","sources":["../../src/hooks/use-consent-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"use-consent-manager.d.ts","sourceRoot":"","sources":["../../src/hooks/use-consent-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;uCAmB4hE,CAAC;;;;;;;;;;;;;;;EAD7jE"}
|
|
@@ -38,7 +38,7 @@ function useFocusTrap(shouldTrap, containerRef) {
|
|
|
38
38
|
}, 0);
|
|
39
39
|
else if (-1 !== containerRef.current.tabIndex) try {
|
|
40
40
|
containerRef.current.focus();
|
|
41
|
-
} catch
|
|
41
|
+
} catch {}
|
|
42
42
|
const handleKeyDown = (e)=>{
|
|
43
43
|
if ('Tab' !== e.key || !containerRef.current) return;
|
|
44
44
|
const focusableElements = getFocusableElements(containerRef.current);
|
|
@@ -10,7 +10,7 @@ function useFocusTrap(shouldTrap, containerRef) {
|
|
|
10
10
|
}, 0);
|
|
11
11
|
else if (-1 !== containerRef.current.tabIndex) try {
|
|
12
12
|
containerRef.current.focus();
|
|
13
|
-
} catch
|
|
13
|
+
} catch {}
|
|
14
14
|
const handleKeyDown = (e)=>{
|
|
15
15
|
if ('Tab' !== e.key || !containerRef.current) return;
|
|
16
16
|
const focusableElements = getFocusableElements(containerRef.current);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-theme.d.ts","sourceRoot":"","sources":["../../src/hooks/use-theme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-theme.d.ts","sourceRoot":"","sources":["../../src/hooks/use-theme.ts"],"names":[],"mappings":"AAmEA,eAAO,MAAM,QAAQ,oEAYpB,CAAC"}
|