@consent.software/catalog 1.6.0 → 1.6.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.
- package/dist_bundle/bundle.js +40 -106
- package/dist_bundle/bundle.js.map +4 -4
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/consentsoftware-cookieconsent.d.ts +1 -1
- package/dist_ts_web/elements/consentsoftware-cookieconsent.js +173 -130
- package/dist_ts_web/elements/consentsoftware-header.js +62 -23
- package/dist_ts_web/elements/consentsoftware-mainselection.d.ts +2 -2
- package/dist_ts_web/elements/consentsoftware-mainselection.js +80 -34
- package/dist_ts_web/elements/consentsoftware-tabs.js +71 -32
- package/dist_ts_web/elements/consentsoftware-toggle.js +193 -154
- package/dist_watch/bundle.js +9846 -3848
- package/dist_watch/bundle.js.map +4 -4
- package/package.json +8 -8
- package/readme.md +149 -80
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/consentsoftware-cookieconsent.ts +1 -1
- package/ts_web/elements/consentsoftware-mainselection.ts +2 -2
- package/ts_web/tsconfig.json +4 -4
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@consent.software/catalog",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A library of web components designed to integrate robust consent management capabilities into web applications, ensuring compliance with privacy regulations.",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./dist_ts_web/index.js"
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
|
-
"author": "
|
|
10
|
+
"author": "Task Venture Capital GmbH",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@consent.software/interfaces": "^1.0.14",
|
|
14
14
|
"@consent.software/webclient": "^1.1.0",
|
|
15
15
|
"@push.rocks/smartdelay": "^3.0.5",
|
|
16
|
-
"lit": "^3.
|
|
16
|
+
"lit": "^3.3.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@design.estate/dees-wcctools": "^1.
|
|
20
|
-
"@git.zone/tsbuild": "^
|
|
21
|
-
"@git.zone/tsbundle": "^2.
|
|
22
|
-
"@git.zone/tswatch": "^2.
|
|
19
|
+
"@design.estate/dees-wcctools": "^1.2.1",
|
|
20
|
+
"@git.zone/tsbuild": "^3.1.2",
|
|
21
|
+
"@git.zone/tsbundle": "^2.6.2",
|
|
22
|
+
"@git.zone/tswatch": "^2.2.1",
|
|
23
23
|
"@push.rocks/projectinfo": "^5.0.2"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"modern web"
|
|
51
51
|
],
|
|
52
52
|
"scripts": {
|
|
53
|
-
"test": "
|
|
53
|
+
"test": "pnpm run build",
|
|
54
54
|
"build": "tsbuild tsfolders --allowimplicitany && tsbundle element --production",
|
|
55
55
|
"watch": "tswatch element"
|
|
56
56
|
}
|
package/readme.md
CHANGED
|
@@ -1,138 +1,207 @@
|
|
|
1
|
-
# @consent.
|
|
1
|
+
# @consent.software/catalog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A sleek, modern library of web components for seamless consent management integration. Built with Lit and designed for GDPR/CCPA compliance out of the box.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Issue Reporting and Security
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
For reporting bugs, issues, or security vulnerabilities, please visit [community.foss.global/](https://community.foss.global/). This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a [code.foss.global/](https://code.foss.global/) account to submit Pull Requests directly.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
npm install @consent.software_private/catalog
|
|
11
|
-
```
|
|
9
|
+
## Features
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
🍪 **Cookie Consent Modal** - Beautiful, responsive consent dialog with light/dark theme support
|
|
12
|
+
🎛️ **Interactive Toggles** - Draggable toggle switches with smooth animations
|
|
13
|
+
📱 **Mobile-First Design** - Fully responsive across all device sizes
|
|
14
|
+
🎨 **Theme-Aware** - Automatically detects system light/dark mode preference
|
|
15
|
+
🔒 **Privacy-First** - Integrates with consent.software backend for compliant consent tracking
|
|
16
|
+
⚡ **Zero Config** - Drop-in components that just work
|
|
14
17
|
|
|
15
|
-
##
|
|
18
|
+
## Installation
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
```bash
|
|
21
|
+
npm install @consent.software/catalog
|
|
22
|
+
# or
|
|
23
|
+
pnpm add @consent.software/catalog
|
|
24
|
+
```
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
## Quick Start
|
|
20
27
|
|
|
21
|
-
|
|
28
|
+
Import the components and add the consent banner to your page:
|
|
22
29
|
|
|
23
30
|
```typescript
|
|
24
|
-
import '@consent.
|
|
31
|
+
import '@consent.software/catalog';
|
|
32
|
+
|
|
33
|
+
// That's it! Add the component to your HTML
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<consentsoftware-cookieconsent></consentsoftware-cookieconsent>
|
|
25
38
|
```
|
|
26
39
|
|
|
27
|
-
|
|
40
|
+
The consent banner automatically:
|
|
41
|
+
- Shows on first visit when no consent preferences are stored
|
|
42
|
+
- Hides after user makes a selection
|
|
43
|
+
- Respects system dark/light mode
|
|
44
|
+
- Stores preferences via the consent.software backend
|
|
45
|
+
|
|
46
|
+
## Components
|
|
28
47
|
|
|
29
|
-
###
|
|
48
|
+
### `<consentsoftware-cookieconsent>`
|
|
30
49
|
|
|
31
|
-
|
|
50
|
+
The main consent modal component. Provides a full-screen overlay with cookie preference options.
|
|
32
51
|
|
|
33
|
-
|
|
52
|
+
```html
|
|
53
|
+
<consentsoftware-cookieconsent></consentsoftware-cookieconsent>
|
|
54
|
+
```
|
|
34
55
|
|
|
35
|
-
|
|
56
|
+
**Features:**
|
|
57
|
+
- Three-button interface: Deny, Accept Selection, Accept All
|
|
58
|
+
- Four cookie categories: Required, Preferences, Statistics, Marketing
|
|
59
|
+
- Animated modal with backdrop blur
|
|
60
|
+
- Shake feedback when clicking outside the modal
|
|
61
|
+
- Automatic theme detection (light/dark)
|
|
36
62
|
|
|
37
|
-
|
|
38
|
-
import { domtools } from '@design.estate/dees-domtools';
|
|
63
|
+
### `<consentsoftware-toggle>`
|
|
39
64
|
|
|
40
|
-
|
|
65
|
+
A draggable toggle switch component with touch support.
|
|
66
|
+
|
|
67
|
+
```html
|
|
68
|
+
<consentsoftware-toggle>Label Text</consentsoftware-toggle>
|
|
69
|
+
<consentsoftware-toggle required>Required</consentsoftware-toggle>
|
|
41
70
|
```
|
|
42
71
|
|
|
43
|
-
|
|
72
|
+
**Properties:**
|
|
73
|
+
- `required` (boolean) - When true, toggle is locked in the "on" position
|
|
74
|
+
- `selected` (boolean) - Current toggle state
|
|
44
75
|
|
|
45
|
-
|
|
76
|
+
**Events:**
|
|
77
|
+
- `toggle` - Fired when state changes, includes `{ selected: boolean }` in detail
|
|
46
78
|
|
|
47
|
-
|
|
48
|
-
import { html, render } from 'lit-html';
|
|
79
|
+
### `<consentsoftware-tabs>`
|
|
49
80
|
|
|
50
|
-
|
|
51
|
-
<consentsoftware-cookieconsent></consentsoftware-cookieconsent>
|
|
52
|
-
`;
|
|
81
|
+
Tab navigation component with animated indicator.
|
|
53
82
|
|
|
54
|
-
|
|
83
|
+
```html
|
|
84
|
+
<consentsoftware-tabs></consentsoftware-tabs>
|
|
55
85
|
```
|
|
56
86
|
|
|
57
|
-
|
|
87
|
+
Displays three tabs: Consent, Details, and Cookie Policy.
|
|
58
88
|
|
|
59
|
-
|
|
89
|
+
### `<consentsoftware-header>`
|
|
60
90
|
|
|
61
|
-
|
|
91
|
+
Simple header component for the consent modal.
|
|
62
92
|
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
:host {
|
|
66
|
-
--cookieconsent-height: 70px;
|
|
67
|
-
--cookieconsent-background: #222;
|
|
68
|
-
--cookieconsent-text-color: #fff;
|
|
69
|
-
}
|
|
70
|
-
`;
|
|
93
|
+
```html
|
|
94
|
+
<consentsoftware-header></consentsoftware-header>
|
|
71
95
|
```
|
|
72
96
|
|
|
73
|
-
|
|
97
|
+
### `<consentsoftware-mainselection>`
|
|
74
98
|
|
|
75
|
-
|
|
99
|
+
Grid layout containing toggle switches for each cookie category.
|
|
76
100
|
|
|
77
|
-
|
|
101
|
+
```html
|
|
102
|
+
<consentsoftware-mainselection></consentsoftware-mainselection>
|
|
103
|
+
```
|
|
78
104
|
|
|
79
|
-
|
|
80
|
-
|
|
105
|
+
## Backend Integration
|
|
106
|
+
|
|
107
|
+
This catalog integrates with the `@consent.software/webclient` package for backend communication:
|
|
81
108
|
|
|
82
109
|
```typescript
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
110
|
+
import { CsWebclient } from '@consent.software/webclient';
|
|
111
|
+
|
|
112
|
+
const client = new CsWebclient();
|
|
113
|
+
|
|
114
|
+
// Check current consent levels
|
|
115
|
+
const levels = await client.getCookieLevels();
|
|
116
|
+
if (!levels) {
|
|
117
|
+
// Show consent dialog
|
|
90
118
|
}
|
|
119
|
+
|
|
120
|
+
// Set consent levels programmatically
|
|
121
|
+
await client.setCookieLevels(['functional', 'analytics']);
|
|
122
|
+
|
|
123
|
+
// Run consent-dependent scripts
|
|
124
|
+
await client.getAndRunConsentTuples();
|
|
91
125
|
```
|
|
92
126
|
|
|
93
|
-
|
|
127
|
+
## Styling & Theming
|
|
94
128
|
|
|
95
|
-
|
|
129
|
+
The components use CSS custom properties for easy theming:
|
|
96
130
|
|
|
97
|
-
|
|
131
|
+
```css
|
|
132
|
+
consentsoftware-cookieconsent {
|
|
133
|
+
/* Text and colors */
|
|
134
|
+
--text-color: #333;
|
|
135
|
+
--background-color: #eeeeee;
|
|
136
|
+
--accent-color: #333333;
|
|
98
137
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
138
|
+
/* Buttons */
|
|
139
|
+
--button-bg: #ffffff;
|
|
140
|
+
--button-hover-bg: #f2f2f2;
|
|
141
|
+
|
|
142
|
+
/* Links */
|
|
143
|
+
--link-color: #333;
|
|
144
|
+
--icon-color: #4496f5;
|
|
145
|
+
|
|
146
|
+
/* Modal */
|
|
147
|
+
--modal-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2);
|
|
148
|
+
--info-bg: rgba(0, 0, 0, 0.1);
|
|
149
|
+
--info-text: rgba(0, 0, 0, 0.5);
|
|
109
150
|
}
|
|
110
151
|
```
|
|
111
152
|
|
|
112
|
-
|
|
153
|
+
The component automatically switches to dark theme variables when `theme="dark"` is set or when the system prefers dark mode.
|
|
154
|
+
|
|
155
|
+
## Cookie Levels
|
|
156
|
+
|
|
157
|
+
The consent system uses three user-selectable levels plus a required baseline:
|
|
113
158
|
|
|
114
|
-
|
|
159
|
+
| Level | Description |
|
|
160
|
+
|-------|-------------|
|
|
161
|
+
| `functional` | Required cookies for site operation (always enabled) |
|
|
162
|
+
| `preferences` | User preference cookies |
|
|
163
|
+
| `analytics` | Statistics and analytics tracking |
|
|
164
|
+
| `marketing` | Marketing and advertising cookies |
|
|
115
165
|
|
|
116
|
-
|
|
166
|
+
## Browser Support
|
|
167
|
+
|
|
168
|
+
- Chrome (last 2 versions)
|
|
169
|
+
- Firefox (last 2 versions)
|
|
170
|
+
- Safari (last 2 versions)
|
|
171
|
+
- Edge (last 2 versions)
|
|
172
|
+
|
|
173
|
+
Built with modern ES modules and requires browsers with native Custom Elements v1 support.
|
|
174
|
+
|
|
175
|
+
## Development
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# Install dependencies
|
|
179
|
+
pnpm install
|
|
180
|
+
|
|
181
|
+
# Build the project
|
|
182
|
+
pnpm run build
|
|
183
|
+
|
|
184
|
+
# Watch mode for development
|
|
185
|
+
pnpm run watch
|
|
186
|
+
```
|
|
117
187
|
|
|
118
|
-
|
|
188
|
+
## License and Legal Information
|
|
119
189
|
|
|
120
|
-
|
|
190
|
+
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [LICENSE](./LICENSE) file.
|
|
121
191
|
|
|
122
|
-
|
|
192
|
+
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
|
123
193
|
|
|
124
|
-
|
|
194
|
+
### Trademarks
|
|
125
195
|
|
|
126
|
-
|
|
196
|
+
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.
|
|
127
197
|
|
|
128
|
-
|
|
198
|
+
Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.
|
|
129
199
|
|
|
130
|
-
|
|
200
|
+
### Company Information
|
|
131
201
|
|
|
132
|
-
|
|
133
|
-
|
|
202
|
+
Task Venture Capital GmbH
|
|
203
|
+
Registered at District Court Bremen HRB 35230 HB, Germany
|
|
134
204
|
|
|
135
|
-
|
|
205
|
+
For any legal inquiries or further information, please contact us via email at hello@task.vc.
|
|
136
206
|
|
|
137
|
-
|
|
138
|
-
undefined
|
|
207
|
+
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@consent.software/catalog',
|
|
6
|
-
version: '1.6.
|
|
6
|
+
version: '1.6.1',
|
|
7
7
|
description: 'A library of web components designed to integrate robust consent management capabilities into web applications, ensuring compliance with privacy regulations.'
|
|
8
8
|
}
|
|
@@ -23,7 +23,7 @@ export class ConsentsoftwareCookieconsent extends LitElement {
|
|
|
23
23
|
|
|
24
24
|
// Reflects the current theme ('light' or 'dark')
|
|
25
25
|
@property({ type: String, reflect: true })
|
|
26
|
-
public theme: 'light' | 'dark' = 'light';
|
|
26
|
+
public accessor theme: 'light' | 'dark' = 'light';
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Define component styles with CSS variables that adjust based on theme.
|
|
@@ -7,10 +7,10 @@ export class ConsentsoftwareMainSelection extends LitElement {
|
|
|
7
7
|
public static demo = () => html`<consentsoftware-mainselection></consentsoftware-mainselection>`;
|
|
8
8
|
|
|
9
9
|
@property({ type: Boolean })
|
|
10
|
-
public required = false;
|
|
10
|
+
public accessor required = false;
|
|
11
11
|
|
|
12
12
|
@property({ type: Boolean })
|
|
13
|
-
public selected = false;
|
|
13
|
+
public accessor selected = false;
|
|
14
14
|
|
|
15
15
|
public static styles = css`
|
|
16
16
|
:host {
|
package/ts_web/tsconfig.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
4
|
-
"module": "
|
|
5
|
-
"moduleResolution": "
|
|
6
|
-
"lib": ["
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ES2022",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
7
|
"declaration": true,
|
|
8
8
|
"inlineSources": true,
|
|
9
9
|
"inlineSourceMap": true,
|