@consent.software/catalog 1.6.0 → 2.0.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_bundle/bundle.js +632 -401
- 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 +4 -20
- package/dist_ts_web/elements/consentsoftware-cookieconsent.js +267 -303
- package/dist_ts_web/elements/consentsoftware-header.d.ts +3 -4
- package/dist_ts_web/elements/consentsoftware-header.js +89 -38
- package/dist_ts_web/elements/consentsoftware-mainselection.d.ts +6 -7
- package/dist_ts_web/elements/consentsoftware-mainselection.js +126 -54
- package/dist_ts_web/elements/consentsoftware-tabs.d.ts +4 -5
- package/dist_ts_web/elements/consentsoftware-tabs.js +109 -62
- package/dist_ts_web/elements/consentsoftware-toggle.d.ts +11 -9
- package/dist_ts_web/elements/consentsoftware-toggle.js +262 -214
- package/dist_ts_web/elements/shared.d.ts +35 -1
- package/dist_ts_web/elements/shared.js +36 -2
- package/dist_ts_web/pages/page1.d.ts +1 -1
- package/dist_ts_web/pages/page1.js +2 -2
- package/dist_watch/bundle.js +10228 -4196
- package/dist_watch/bundle.js.map +4 -4
- package/package.json +9 -9
- package/readme.md +149 -80
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/consentsoftware-cookieconsent.ts +150 -218
- package/ts_web/elements/consentsoftware-header.ts +40 -23
- package/ts_web/elements/consentsoftware-mainselection.ts +63 -33
- package/ts_web/elements/consentsoftware-tabs.ts +51 -37
- package/ts_web/elements/consentsoftware-toggle.ts +123 -107
- package/ts_web/elements/shared.ts +38 -2
- package/ts_web/pages/page1.ts +1 -1
- package/ts_web/tsconfig.json +4 -4
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { cssManager, colors } from './shared.js';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import {
|
|
4
|
+
DeesElement,
|
|
5
|
+
customElement,
|
|
6
|
+
html,
|
|
7
|
+
css,
|
|
8
|
+
type TemplateResult,
|
|
9
|
+
property,
|
|
10
|
+
} from '@design.estate/dees-element';
|
|
6
11
|
|
|
7
12
|
import * as csInterfaces from '@consent.software/interfaces';
|
|
8
13
|
import * as csWebclient from '@consent.software/webclient';
|
|
@@ -15,211 +20,158 @@ declare global {
|
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
@customElement('consentsoftware-cookieconsent')
|
|
18
|
-
export class ConsentsoftwareCookieconsent extends
|
|
23
|
+
export class ConsentsoftwareCookieconsent extends DeesElement {
|
|
19
24
|
public static demo = () => html`<consentsoftware-cookieconsent></consentsoftware-cookieconsent>`;
|
|
20
25
|
|
|
21
26
|
public csWebclientInstance = new csWebclient.CsWebclient();
|
|
22
27
|
public csWebclientRan = false;
|
|
23
28
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
* Theme-specific overrides modify these for dark mode.
|
|
32
|
-
*/
|
|
33
|
-
public static styles = css`
|
|
34
|
-
:host {
|
|
35
|
-
font-family: ${shared.fontStack};
|
|
36
|
-
user-select: none;
|
|
37
|
-
/* Default variables for Light Theme */
|
|
38
|
-
--text-color: #333;
|
|
39
|
-
--background-color: #eeeeee;
|
|
40
|
-
--accent-color: #333333;
|
|
41
|
-
--button-bg: #ffffff;
|
|
42
|
-
--button-hover-bg: #f2f2f2;
|
|
43
|
-
--icon-color: #4496f5;
|
|
44
|
-
--link-color: #333;
|
|
45
|
-
--padding-sides: 16px;
|
|
46
|
-
/* Additional variables for modal and info container styling */
|
|
47
|
-
--info-bg: rgba(0, 0, 0, 0.1);
|
|
48
|
-
--info-text: rgba(255, 255, 255, 0.5);
|
|
49
|
-
--modal-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2);
|
|
50
|
-
}
|
|
29
|
+
public static styles = [
|
|
30
|
+
cssManager.defaultStyles,
|
|
31
|
+
css`
|
|
32
|
+
:host {
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
user-select: none;
|
|
35
|
+
}
|
|
51
36
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
--info-text: rgba(255, 255, 255, 0.5);
|
|
64
|
-
--modal-box-shadow: 0px 0px 8px rgba(255, 255, 255, 0.6);
|
|
65
|
-
}
|
|
37
|
+
.pageOverlay {
|
|
38
|
+
position: fixed;
|
|
39
|
+
inset: 0;
|
|
40
|
+
display: grid;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
z-index: 1000;
|
|
44
|
+
background: rgba(0, 0, 0, 0);
|
|
45
|
+
backdrop-filter: blur(0px);
|
|
46
|
+
transition: all 0.2s ease-out;
|
|
47
|
+
}
|
|
66
48
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
:host([theme='light']) {
|
|
71
|
-
--text-color: #333;
|
|
72
|
-
--background-color: #eeeeee;
|
|
73
|
-
--accent-color: #333333;
|
|
74
|
-
--button-bg: #ffffff;
|
|
75
|
-
--button-hover-bg: #f2f2f2;
|
|
76
|
-
--icon-color: #4496f5;
|
|
77
|
-
--link-color: #333;
|
|
78
|
-
--info-bg: rgba(0, 0, 0, 0.1);
|
|
79
|
-
--info-text: rgba(0, 0, 0, 0.5);
|
|
80
|
-
--modal-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2);
|
|
81
|
-
}
|
|
49
|
+
.pageOverlay.shake {
|
|
50
|
+
background: rgba(0, 0, 0, 0.6) !important;
|
|
51
|
+
}
|
|
82
52
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
53
|
+
.modalBox {
|
|
54
|
+
display: block;
|
|
55
|
+
color: ${cssManager.bdTheme(colors.light.foreground, colors.dark.foreground)};
|
|
56
|
+
background: ${cssManager.bdTheme(colors.light.background, colors.dark.background)};
|
|
57
|
+
box-shadow:
|
|
58
|
+
0 0 0 1px ${cssManager.bdTheme(colors.light.border, colors.dark.border)},
|
|
59
|
+
0 16px 70px ${cssManager.bdTheme('rgba(0, 0, 0, 0.15)', 'rgba(0, 0, 0, 0.35)')};
|
|
60
|
+
position: relative;
|
|
61
|
+
border-radius: 8px;
|
|
62
|
+
max-width: 520px;
|
|
63
|
+
min-width: 320px;
|
|
64
|
+
box-sizing: border-box;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
will-change: transform;
|
|
67
|
+
transition: all 0.2s ease-out;
|
|
68
|
+
transform: scale(0.96);
|
|
69
|
+
opacity: 0;
|
|
70
|
+
}
|
|
98
71
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
72
|
+
@media (max-width: 560px) {
|
|
73
|
+
.modalBox {
|
|
74
|
+
max-width: 100%;
|
|
75
|
+
min-width: 100%;
|
|
76
|
+
height: 100vh;
|
|
77
|
+
border-radius: 0;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
103
80
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
color: var(--text-color);
|
|
108
|
-
background: var(--background-color);
|
|
109
|
-
box-shadow: var(--modal-box-shadow);
|
|
110
|
-
position: relative;
|
|
111
|
-
border: 1px dotted rgba(255, 255, 255, 0.1);
|
|
112
|
-
border-top: 1px solid var(--accent-color);
|
|
113
|
-
border-radius: 16px;
|
|
114
|
-
max-width: 1100px;
|
|
115
|
-
min-width: calc(100vw / 3);
|
|
116
|
-
box-sizing: border-box;
|
|
117
|
-
overflow: hidden;
|
|
118
|
-
will-change: transform;
|
|
119
|
-
transition: all 0.3s;
|
|
120
|
-
transform: scale(0.95);
|
|
121
|
-
opacity: 0;
|
|
122
|
-
}
|
|
81
|
+
.modalBox.shake {
|
|
82
|
+
animation: shake 120ms 2 linear;
|
|
83
|
+
}
|
|
123
84
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
box-shadow: none;
|
|
129
|
-
border-radius: 0px;
|
|
85
|
+
@keyframes shake {
|
|
86
|
+
0% { transform: translateX(3px); }
|
|
87
|
+
50% { transform: translateX(-3px); }
|
|
88
|
+
100% { transform: translateX(0); }
|
|
130
89
|
}
|
|
131
|
-
}
|
|
132
90
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
animation: shake 150ms 2 linear;
|
|
136
|
-
}
|
|
91
|
+
:host([show='false']) { display: none; }
|
|
92
|
+
:host([show='true']) { display: block; }
|
|
137
93
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
transform: translate(3px, 0);
|
|
94
|
+
.content {
|
|
95
|
+
margin: auto;
|
|
141
96
|
}
|
|
142
|
-
|
|
143
|
-
|
|
97
|
+
|
|
98
|
+
.text-container {
|
|
99
|
+
padding: 12px 16px;
|
|
100
|
+
font-size: 0.9em;
|
|
101
|
+
line-height: 1.5;
|
|
102
|
+
color: ${cssManager.bdTheme(colors.light.mutedForeground, colors.dark.mutedForeground)};
|
|
144
103
|
}
|
|
145
|
-
|
|
146
|
-
|
|
104
|
+
|
|
105
|
+
.text-container a {
|
|
106
|
+
color: ${cssManager.bdTheme(colors.light.foreground, colors.dark.foreground)};
|
|
107
|
+
text-decoration: underline;
|
|
108
|
+
text-underline-offset: 2px;
|
|
147
109
|
}
|
|
148
|
-
}
|
|
149
110
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
:host([show='true']) {
|
|
155
|
-
display: block;
|
|
156
|
-
}
|
|
111
|
+
.text-container a:hover {
|
|
112
|
+
opacity: 0.8;
|
|
113
|
+
}
|
|
157
114
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
115
|
+
.button-container {
|
|
116
|
+
padding: 12px 16px 16px;
|
|
117
|
+
display: grid;
|
|
118
|
+
grid-template-columns: repeat(3, 1fr);
|
|
119
|
+
gap: 8px;
|
|
120
|
+
}
|
|
161
121
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
122
|
+
@media (max-width: 560px) {
|
|
123
|
+
.button-container {
|
|
124
|
+
grid-template-columns: 1fr;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
168
127
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
128
|
+
.consent-button {
|
|
129
|
+
border-radius: 6px;
|
|
130
|
+
background: ${cssManager.bdTheme(colors.light.secondary, colors.dark.secondary)};
|
|
131
|
+
border: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
|
|
132
|
+
padding: 8px 16px;
|
|
133
|
+
font-size: 0.85em;
|
|
134
|
+
font-weight: 500;
|
|
135
|
+
text-align: center;
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
transition: all 0.15s ease;
|
|
138
|
+
color: ${cssManager.bdTheme(colors.light.secondaryForeground, colors.dark.secondaryForeground)};
|
|
139
|
+
}
|
|
173
140
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
gap: 16px;
|
|
179
|
-
}
|
|
141
|
+
.consent-button:hover {
|
|
142
|
+
background: ${cssManager.bdTheme(colors.light.accent, colors.dark.accent)};
|
|
143
|
+
border-color: ${cssManager.bdTheme(colors.light.ring, colors.dark.ring)};
|
|
144
|
+
}
|
|
180
145
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
146
|
+
.consent-button:last-child {
|
|
147
|
+
background: ${cssManager.bdTheme(colors.light.primary, colors.dark.primary)};
|
|
148
|
+
color: ${cssManager.bdTheme(colors.light.primaryForeground, colors.dark.primaryForeground)};
|
|
149
|
+
border-color: ${cssManager.bdTheme(colors.light.primary, colors.dark.primary)};
|
|
185
150
|
}
|
|
186
|
-
}
|
|
187
151
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
background: var(--button-bg);
|
|
192
|
-
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
|
|
193
|
-
padding: 10px;
|
|
194
|
-
line-height: 30px;
|
|
195
|
-
text-align: center;
|
|
196
|
-
cursor: pointer;
|
|
197
|
-
transition: all 0.2s;
|
|
198
|
-
}
|
|
152
|
+
.consent-button:last-child:hover {
|
|
153
|
+
opacity: 0.9;
|
|
154
|
+
}
|
|
199
155
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
156
|
+
.info-container {
|
|
157
|
+
text-align: center;
|
|
158
|
+
padding: 10px 16px;
|
|
159
|
+
background: ${cssManager.bdTheme(colors.light.muted, colors.dark.muted)};
|
|
160
|
+
border-top: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
|
|
161
|
+
font-size: 0.75em;
|
|
162
|
+
color: ${cssManager.bdTheme(colors.light.mutedForeground, colors.dark.mutedForeground)};
|
|
163
|
+
}
|
|
203
164
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
background: var(--info-bg);
|
|
209
|
-
border-top: 1px dotted rgba(255, 255, 255, 0.1);
|
|
210
|
-
font-size: 0.8em;
|
|
211
|
-
color: var(--info-text);
|
|
212
|
-
}
|
|
165
|
+
.info-container a {
|
|
166
|
+
color: ${cssManager.bdTheme(colors.light.foreground, colors.dark.foreground)};
|
|
167
|
+
text-decoration: none;
|
|
168
|
+
}
|
|
213
169
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
.info-container a:hover {
|
|
220
|
-
color: #ffffff;
|
|
221
|
-
}
|
|
222
|
-
`;
|
|
170
|
+
.info-container a:hover {
|
|
171
|
+
text-decoration: underline;
|
|
172
|
+
}
|
|
173
|
+
`,
|
|
174
|
+
];
|
|
223
175
|
|
|
224
176
|
constructor() {
|
|
225
177
|
super();
|
|
@@ -234,11 +186,11 @@ export class ConsentsoftwareCookieconsent extends LitElement {
|
|
|
234
186
|
<div class="content">
|
|
235
187
|
<consentsoftware-header></consentsoftware-header>
|
|
236
188
|
<consentsoftware-tabs></consentsoftware-tabs>
|
|
237
|
-
<div class="text-container"
|
|
189
|
+
<div class="text-container">
|
|
238
190
|
<div class="toptext">
|
|
239
|
-
|
|
191
|
+
We use cookies to enhance your experience. Review our
|
|
240
192
|
<a href="https://lossless.gmbh/cookie" target="_blank">cookie policy</a>
|
|
241
|
-
and
|
|
193
|
+
and select your preferences.
|
|
242
194
|
</div>
|
|
243
195
|
</div>
|
|
244
196
|
<consentsoftware-mainselection></consentsoftware-mainselection>
|
|
@@ -277,23 +229,22 @@ export class ConsentsoftwareCookieconsent extends LitElement {
|
|
|
277
229
|
|
|
278
230
|
/**
|
|
279
231
|
* Lifecycle method called when the element is connected to the DOM.
|
|
280
|
-
*
|
|
232
|
+
* Displays the consent banner if no cookie levels are set.
|
|
281
233
|
*/
|
|
282
234
|
public async connectedCallback() {
|
|
283
|
-
super.connectedCallback();
|
|
284
|
-
this.updateTheme(); // Initialize theme based on system preference
|
|
235
|
+
await super.connectedCallback();
|
|
285
236
|
|
|
286
237
|
const cookieLevel = await this.csWebclientInstance.getCookieLevels();
|
|
287
238
|
if (!cookieLevel) {
|
|
288
239
|
// Show consent banner if cookie levels haven't been set yet
|
|
289
240
|
this.setAttribute('show', 'true');
|
|
290
241
|
requestAnimationFrame(async () => {
|
|
291
|
-
await this.
|
|
242
|
+
await this.updateComplete;
|
|
292
243
|
const pageOverlay: HTMLDivElement = this.shadowRoot?.querySelector('.pageOverlay');
|
|
293
244
|
if (pageOverlay) {
|
|
294
|
-
// Apply
|
|
295
|
-
pageOverlay.style.background = 'rgba(0,0,0, 0.
|
|
296
|
-
pageOverlay.style.backdropFilter = 'blur(
|
|
245
|
+
// Apply subtle backdrop blur when modal appears
|
|
246
|
+
pageOverlay.style.background = 'rgba(0,0,0, 0.6)';
|
|
247
|
+
pageOverlay.style.backdropFilter = 'blur(4px)';
|
|
297
248
|
}
|
|
298
249
|
const modalBox: HTMLDivElement = this.shadowRoot?.querySelector('.modalBox');
|
|
299
250
|
if (modalBox) {
|
|
@@ -309,14 +260,7 @@ export class ConsentsoftwareCookieconsent extends LitElement {
|
|
|
309
260
|
}
|
|
310
261
|
|
|
311
262
|
public async firstUpdated() {
|
|
312
|
-
//
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Called after updates. Logs banner height and runs consent scripts if necessary.
|
|
317
|
-
*/
|
|
318
|
-
public async updated() {
|
|
319
|
-
console.log(`The height of the cookie banner is ${this.shadowRoot?.host?.clientHeight}px`);
|
|
263
|
+
// Run consent scripts if levels are already set
|
|
320
264
|
const acceptedCookieLevels = await this.csWebclientInstance.getCookieLevels();
|
|
321
265
|
if (!this.csWebclientRan && acceptedCookieLevels) {
|
|
322
266
|
this.csWebclientRan = true;
|
|
@@ -326,7 +270,6 @@ export class ConsentsoftwareCookieconsent extends LitElement {
|
|
|
326
270
|
|
|
327
271
|
/**
|
|
328
272
|
* Handles consent button clicks, sets cookie levels, and hides the banner.
|
|
329
|
-
* Uses theme variables for styling transitions.
|
|
330
273
|
*/
|
|
331
274
|
private async handleConsentButtonClick(
|
|
332
275
|
event: MouseEvent,
|
|
@@ -335,8 +278,7 @@ export class ConsentsoftwareCookieconsent extends LitElement {
|
|
|
335
278
|
console.log(`Set level to ${levelsArg}`);
|
|
336
279
|
const pageOverlay: HTMLDivElement = this.shadowRoot?.querySelector('.pageOverlay');
|
|
337
280
|
if (pageOverlay) {
|
|
338
|
-
|
|
339
|
-
pageOverlay.style.background = 'rgba(255,255,255, 0)';
|
|
281
|
+
pageOverlay.style.background = 'rgba(0,0,0, 0)';
|
|
340
282
|
pageOverlay.style.backdropFilter = 'blur(0px)';
|
|
341
283
|
}
|
|
342
284
|
const modalBox: HTMLDivElement = this.shadowRoot?.querySelector('.modalBox');
|
|
@@ -349,7 +291,12 @@ export class ConsentsoftwareCookieconsent extends LitElement {
|
|
|
349
291
|
await this.csWebclientInstance.setCookieLevels(levelsArg);
|
|
350
292
|
await delayFor(300);
|
|
351
293
|
this.setAttribute('show', 'false'); // Hide the consent banner
|
|
352
|
-
|
|
294
|
+
|
|
295
|
+
// Run consent scripts
|
|
296
|
+
if (!this.csWebclientRan) {
|
|
297
|
+
this.csWebclientRan = true;
|
|
298
|
+
await this.csWebclientInstance.getAndRunConsentTuples();
|
|
299
|
+
}
|
|
353
300
|
}
|
|
354
301
|
|
|
355
302
|
/**
|
|
@@ -369,19 +316,4 @@ export class ConsentsoftwareCookieconsent extends LitElement {
|
|
|
369
316
|
}
|
|
370
317
|
}
|
|
371
318
|
}
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* Dynamically switches the theme between light and dark.
|
|
375
|
-
* Listens for system theme changes to update the component's theme.
|
|
376
|
-
*/
|
|
377
|
-
private updateTheme() {
|
|
378
|
-
// Check the initial system preference for dark mode
|
|
379
|
-
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
380
|
-
this.theme = prefersDark ? 'dark' : 'light';
|
|
381
|
-
|
|
382
|
-
// Listen for changes in the system color scheme preference
|
|
383
|
-
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {
|
|
384
|
-
this.theme = e.matches ? 'dark' : 'light';
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
319
|
}
|
|
@@ -1,36 +1,53 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { cssManager, colors } from './shared.js';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import {
|
|
4
|
+
DeesElement,
|
|
5
|
+
customElement,
|
|
6
|
+
html,
|
|
7
|
+
css,
|
|
8
|
+
type TemplateResult,
|
|
9
|
+
} from '@design.estate/dees-element';
|
|
6
10
|
|
|
7
11
|
@customElement('consentsoftware-header')
|
|
8
|
-
export class ConsentsoftwareHeader extends
|
|
9
|
-
public static demo = () => html`<consentsoftware-
|
|
12
|
+
export class ConsentsoftwareHeader extends DeesElement {
|
|
13
|
+
public static demo = () => html`<consentsoftware-header></consentsoftware-header>`;
|
|
10
14
|
|
|
11
|
-
public static styles =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
public static styles = [
|
|
16
|
+
cssManager.defaultStyles,
|
|
17
|
+
css`
|
|
18
|
+
:host {
|
|
19
|
+
display: block;
|
|
20
|
+
padding: 14px 16px;
|
|
21
|
+
border-bottom: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
|
|
22
|
+
}
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
.heading {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 8px;
|
|
28
|
+
font-size: 0.95em;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
color: ${cssManager.bdTheme(colors.light.foreground, colors.dark.foreground)};
|
|
31
|
+
}
|
|
24
32
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
.icon {
|
|
34
|
+
width: 18px;
|
|
35
|
+
height: 18px;
|
|
36
|
+
opacity: 0.7;
|
|
37
|
+
}
|
|
38
|
+
`,
|
|
39
|
+
];
|
|
28
40
|
|
|
29
41
|
public render(): TemplateResult {
|
|
30
42
|
return html`
|
|
31
43
|
<div class="heading">
|
|
32
|
-
|
|
44
|
+
<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
45
|
+
<circle cx="12" cy="12" r="10"/>
|
|
46
|
+
<path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/>
|
|
47
|
+
<path d="M12 17h.01"/>
|
|
48
|
+
</svg>
|
|
49
|
+
Cookie Preferences
|
|
33
50
|
</div>
|
|
34
51
|
`;
|
|
35
52
|
}
|
|
36
|
-
}
|
|
53
|
+
}
|
|
@@ -1,42 +1,72 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import {
|
|
1
|
+
import { cssManager, colors } from './shared.js';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
DeesElement,
|
|
5
|
+
customElement,
|
|
6
|
+
html,
|
|
7
|
+
css,
|
|
8
|
+
type TemplateResult,
|
|
9
|
+
property,
|
|
10
|
+
} from '@design.estate/dees-element';
|
|
4
11
|
|
|
5
12
|
@customElement('consentsoftware-mainselection')
|
|
6
|
-
export class ConsentsoftwareMainSelection extends
|
|
13
|
+
export class ConsentsoftwareMainSelection extends DeesElement {
|
|
7
14
|
public static demo = () => html`<consentsoftware-mainselection></consentsoftware-mainselection>`;
|
|
8
15
|
|
|
9
16
|
@property({ type: Boolean })
|
|
10
|
-
public required = false;
|
|
17
|
+
public accessor required = false;
|
|
11
18
|
|
|
12
19
|
@property({ type: Boolean })
|
|
13
|
-
public selected = false;
|
|
14
|
-
|
|
15
|
-
public static styles =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
20
|
+
public accessor selected = false;
|
|
21
|
+
|
|
22
|
+
public static styles = [
|
|
23
|
+
cssManager.defaultStyles,
|
|
24
|
+
css`
|
|
25
|
+
:host {
|
|
26
|
+
display: block;
|
|
27
|
+
position: relative;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.maincontainer {
|
|
31
|
+
display: grid;
|
|
32
|
+
grid-template-columns: repeat(4, 1fr);
|
|
33
|
+
padding: 8px 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@media (max-width: 560px) {
|
|
37
|
+
.maincontainer {
|
|
38
|
+
grid-template-columns: repeat(2, 1fr);
|
|
39
|
+
gap: 4px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.itemBox {
|
|
44
|
+
padding: 12px 8px;
|
|
45
|
+
text-align: center;
|
|
46
|
+
border-right: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.itemBox:last-child {
|
|
50
|
+
border-right: none;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (max-width: 560px) {
|
|
54
|
+
.itemBox {
|
|
55
|
+
padding: 10px 8px;
|
|
56
|
+
border-right: none;
|
|
57
|
+
border-bottom: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.itemBox:nth-child(odd) {
|
|
61
|
+
border-right: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.itemBox:nth-last-child(-n+2) {
|
|
65
|
+
border-bottom: none;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
`,
|
|
69
|
+
];
|
|
40
70
|
|
|
41
71
|
public render(): TemplateResult {
|
|
42
72
|
return html`
|
|
@@ -57,5 +87,5 @@ export class ConsentsoftwareMainSelection extends LitElement {
|
|
|
57
87
|
`;
|
|
58
88
|
}
|
|
59
89
|
|
|
60
|
-
public async getResults(
|
|
90
|
+
public async getResults() {}
|
|
61
91
|
}
|