@redacto.io/consent-sdk-react 0.0.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.
@@ -0,0 +1,8 @@
1
+ # Changesets
2
+
3
+ Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4
+ with multi-package repos, or single-package repos to help you version and publish your code. You can
5
+ find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6
+
7
+ We have a quick list of common questions to get you started engaging with this project in
8
+ [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3
+ "changelog": "@changesets/cli/changelog",
4
+ "commit": false,
5
+ "fixed": [],
6
+ "linked": [],
7
+ "access": "public",
8
+ "baseBranch": "main",
9
+ "updateInternalDependencies": "patch",
10
+ "ignore": []
11
+ }
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # @redacto.io/consent-sdk-react
2
+
3
+ A React component library for managing consent notices and user preferences in your applications.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @redacto.io/consent-sdk-react
9
+ # or
10
+ yarn add @redacto.io/consent-sdk-react
11
+ # or
12
+ pnpm add @redacto.io/consent-sdk-react
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```tsx
18
+ import { RedactoNoticeConsent } from "@redacto.io/consent-sdk-react";
19
+
20
+ function App() {
21
+ return (
22
+ <div>
23
+ <RedactoNoticeConsent />
24
+ </div>
25
+ );
26
+ }
27
+ ```
28
+
29
+ ## Features
30
+
31
+ - React components for consent management
32
+ - TypeScript support
33
+ - ESM and CommonJS module formats
34
+
35
+ ## Requirements
36
+
37
+ - React 19.1.0 or higher
38
+ - React DOM 19.1.0 or higher
39
+
40
+ ## Development
41
+
42
+ This package is built using:
43
+
44
+ - TypeScript
45
+ - tsup for bundling
46
+ - React 19.1.0
47
+
48
+ ## License
49
+
50
+ ISC
@@ -0,0 +1,44 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type Settings = {
4
+ button: {
5
+ accept: {
6
+ backgroundColor: string;
7
+ textColor: string;
8
+ };
9
+ decline: {
10
+ backgroundColor: string;
11
+ textColor: string;
12
+ };
13
+ language: {
14
+ backgroundColor: string;
15
+ textColor: string;
16
+ selectedBackgroundColor?: string;
17
+ selectedTextColor?: string;
18
+ };
19
+ };
20
+ link: {
21
+ color: string;
22
+ };
23
+ borderRadius?: string;
24
+ backgroundColor?: string;
25
+ headingColor?: string;
26
+ textColor?: string;
27
+ borderColor?: string;
28
+ };
29
+
30
+ type Props = Readonly<{
31
+ noticeId: string;
32
+ accessToken: string;
33
+ refreshToken: string;
34
+ settings?: Partial<Settings>;
35
+ language?: string;
36
+ blockUI?: boolean;
37
+ onAccept: () => void;
38
+ onDecline: () => void;
39
+ onError?: (error: Error) => void;
40
+ }>;
41
+
42
+ declare const RedactoNoticeConsent: ({ noticeId, accessToken, refreshToken, language, blockUI, onAccept, onDecline, onError, settings, }: Props) => react_jsx_runtime.JSX.Element;
43
+
44
+ export { RedactoNoticeConsent };
@@ -0,0 +1,44 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type Settings = {
4
+ button: {
5
+ accept: {
6
+ backgroundColor: string;
7
+ textColor: string;
8
+ };
9
+ decline: {
10
+ backgroundColor: string;
11
+ textColor: string;
12
+ };
13
+ language: {
14
+ backgroundColor: string;
15
+ textColor: string;
16
+ selectedBackgroundColor?: string;
17
+ selectedTextColor?: string;
18
+ };
19
+ };
20
+ link: {
21
+ color: string;
22
+ };
23
+ borderRadius?: string;
24
+ backgroundColor?: string;
25
+ headingColor?: string;
26
+ textColor?: string;
27
+ borderColor?: string;
28
+ };
29
+
30
+ type Props = Readonly<{
31
+ noticeId: string;
32
+ accessToken: string;
33
+ refreshToken: string;
34
+ settings?: Partial<Settings>;
35
+ language?: string;
36
+ blockUI?: boolean;
37
+ onAccept: () => void;
38
+ onDecline: () => void;
39
+ onError?: (error: Error) => void;
40
+ }>;
41
+
42
+ declare const RedactoNoticeConsent: ({ noticeId, accessToken, refreshToken, language, blockUI, onAccept, onDecline, onError, settings, }: Props) => react_jsx_runtime.JSX.Element;
43
+
44
+ export { RedactoNoticeConsent };