@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.
Files changed (30) hide show
  1. package/dist_bundle/bundle.js +632 -401
  2. package/dist_bundle/bundle.js.map +4 -4
  3. package/dist_ts_web/00_commitinfo_data.js +1 -1
  4. package/dist_ts_web/elements/consentsoftware-cookieconsent.d.ts +4 -20
  5. package/dist_ts_web/elements/consentsoftware-cookieconsent.js +267 -303
  6. package/dist_ts_web/elements/consentsoftware-header.d.ts +3 -4
  7. package/dist_ts_web/elements/consentsoftware-header.js +89 -38
  8. package/dist_ts_web/elements/consentsoftware-mainselection.d.ts +6 -7
  9. package/dist_ts_web/elements/consentsoftware-mainselection.js +126 -54
  10. package/dist_ts_web/elements/consentsoftware-tabs.d.ts +4 -5
  11. package/dist_ts_web/elements/consentsoftware-tabs.js +109 -62
  12. package/dist_ts_web/elements/consentsoftware-toggle.d.ts +11 -9
  13. package/dist_ts_web/elements/consentsoftware-toggle.js +262 -214
  14. package/dist_ts_web/elements/shared.d.ts +35 -1
  15. package/dist_ts_web/elements/shared.js +36 -2
  16. package/dist_ts_web/pages/page1.d.ts +1 -1
  17. package/dist_ts_web/pages/page1.js +2 -2
  18. package/dist_watch/bundle.js +10228 -4196
  19. package/dist_watch/bundle.js.map +4 -4
  20. package/package.json +9 -9
  21. package/readme.md +149 -80
  22. package/ts_web/00_commitinfo_data.ts +1 -1
  23. package/ts_web/elements/consentsoftware-cookieconsent.ts +150 -218
  24. package/ts_web/elements/consentsoftware-header.ts +40 -23
  25. package/ts_web/elements/consentsoftware-mainselection.ts +63 -33
  26. package/ts_web/elements/consentsoftware-tabs.ts +51 -37
  27. package/ts_web/elements/consentsoftware-toggle.ts +123 -107
  28. package/ts_web/elements/shared.ts +38 -2
  29. package/ts_web/pages/page1.ts +1 -1
  30. package/ts_web/tsconfig.json +4 -4
@@ -1,8 +1,13 @@
1
- import * as shared from './shared.js';
1
+ import { cssManager, colors } from './shared.js';
2
2
 
3
- import { LitElement, html, css, type TemplateResult } from 'lit';
4
- import { customElement } from 'lit/decorators.js';
5
- import { property } from 'lit/decorators/property.js';
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 LitElement {
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
- // Reflects the current theme ('light' or 'dark')
25
- @property({ type: String, reflect: true })
26
- public theme: 'light' | 'dark' = 'light';
27
-
28
- /**
29
- * Define component styles with CSS variables that adjust based on theme.
30
- * The default variables serve as baseline for the light theme.
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
- /* Dark Theme Overrides:
53
- When theme attribute is 'dark', override variables accordingly. */
54
- :host([theme='dark']) {
55
- --text-color: #fff;
56
- --background-color: #111;
57
- --accent-color: #333333;
58
- --button-bg: #252525;
59
- --button-hover-bg: #222222;
60
- --icon-color: #4496f5;
61
- --link-color: #fff;
62
- --info-bg: rgba(0, 0, 0, 0.1);
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
- /* Light Theme Overrides:
68
- Explicit light theme settings, currently matching defaults.
69
- Can be customized independently if desired. */
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
- /* Overlay covering the page behind the modal */
84
- .pageOverlay {
85
- position: fixed;
86
- top: 0;
87
- bottom: 0;
88
- right: 0;
89
- left: 0;
90
- display: grid;
91
- align-items: center;
92
- justify-content: center;
93
- z-index: 1000; /* Ensures the overlay is on top of other elements */
94
- background: rgba(255, 255, 255, 0);
95
- backdrop-filter: blur(0px);
96
- transition: all 0.2s;
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
- /* Shake animation for overlay when clicked */
100
- .pageOverlay.shake {
101
- background: rgba(0, 0, 0, 0.5) !important;
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
- /* Modal box styling using theme variables for colors and shadows */
105
- .modalBox {
106
- display: block;
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
- /* Media query for mobile devices: stack buttons vertically */
125
- @media (max-width: 600px) {
126
- .modalBox {
127
- height: 100vh;
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
- /* Shake animation for modal box */
134
- .modalBox.shake {
135
- animation: shake 150ms 2 linear;
136
- }
91
+ :host([show='false']) { display: none; }
92
+ :host([show='true']) { display: block; }
137
93
 
138
- @keyframes shake {
139
- 0% {
140
- transform: translate(3px, 0);
94
+ .content {
95
+ margin: auto;
141
96
  }
142
- 50% {
143
- transform: translate(-3px, 0);
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
- 100% {
146
- transform: translate(0, 0);
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
- /* Toggle display based on [show] attribute */
151
- :host([show='false']) {
152
- display: none;
153
- }
154
- :host([show='true']) {
155
- display: block;
156
- }
111
+ .text-container a:hover {
112
+ opacity: 0.8;
113
+ }
157
114
 
158
- .content {
159
- margin: auto;
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
- .text-container {
163
- padding-left: var(--padding-sides);
164
- padding-right: var(--padding-sides);
165
- display: grid;
166
- grid-template-columns: auto;
167
- }
122
+ @media (max-width: 560px) {
123
+ .button-container {
124
+ grid-template-columns: 1fr;
125
+ }
126
+ }
168
127
 
169
- .text-container a {
170
- color: var(--link-color);
171
- text-decoration: none;
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
- .button-container {
175
- padding: var(--padding-sides);
176
- display: grid;
177
- grid-template-columns: repeat(3, 1fr);
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
- /* Media query for mobile devices: stack buttons vertically */
182
- @media (max-width: 600px) {
183
- .button-container {
184
- grid-template-columns: 1fr;
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
- /* Consent button styling using theme variables */
189
- .consent-button {
190
- border-radius: 3px;
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
- .consent-button:hover {
201
- background: var(--button-hover-bg);
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
- /* Use theme variables for info container background and text */
205
- .info-container {
206
- text-align: center;
207
- line-height: 3em;
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
- .info-container a {
215
- text-decoration: underline;
216
- color: var(--link-color);
217
- transition: color 0.2s;
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" style="padding: 16px;">
189
+ <div class="text-container">
238
190
  <div class="toptext">
239
- This page uses cookies. Please review our
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 choose which cookie level you are willing to accept.
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
- * It sets up the theme and displays the consent banner if no cookie levels are set.
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.updated();
242
+ await this.updateComplete;
292
243
  const pageOverlay: HTMLDivElement = this.shadowRoot?.querySelector('.pageOverlay');
293
244
  if (pageOverlay) {
294
- // Apply dark overlay styling when modal appears
295
- pageOverlay.style.background = 'rgba(0,0,0, 0.5)';
296
- pageOverlay.style.backdropFilter = 'blur(20px)';
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
- // Placeholder for any logic needed after first render
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
- // Fade out overlay effect using inline styles for transition
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
- this.updated(); // Trigger any post-consent actions
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 * as shared from './shared.js';
1
+ import { cssManager, colors } from './shared.js';
2
2
 
3
- import { LitElement, html, css, type TemplateResult } from 'lit';
4
- import { customElement } from 'lit/decorators.js';
5
- import { property } from 'lit/decorators/property.js';
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 LitElement {
9
- public static demo = () => html`<consentsoftware-tabs></consentsoftware-tabs>`;
12
+ export class ConsentsoftwareHeader extends DeesElement {
13
+ public static demo = () => html`<consentsoftware-header></consentsoftware-header>`;
10
14
 
11
- public static styles = css`
12
- :host {
13
- display: block;
14
- line-height: 3em;
15
- text-align: center;
16
- font-family: ${shared.fontStack};
17
- border-bottom: 1px dotted rgba(255, 255, 255, 0.1);
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
- .heading {
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
- constructor() {
26
- super();
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
- What about cookies?
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 { LitElement, html, css, type TemplateResult } from 'lit';
2
- import { customElement } from 'lit/decorators.js';
3
- import { property } from 'lit/decorators/property.js';
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 LitElement {
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 = css`
16
- :host {
17
- display: block;
18
- position: relative;
19
- }
20
-
21
- .maincontainer {
22
- display: grid;
23
- grid-template-columns: repeat(4, 1fr);
24
- }
25
-
26
- .itemBox {
27
- padding: 16px;
28
- text-align: center;
29
- border-right: 1px solid;
30
- border-image: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%) 1;
31
- }
32
- .itemBox:last-child {
33
- border-right: none;
34
- }
35
- `;
36
-
37
- constructor() {
38
- super();
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(mouseEvent) {}
90
+ public async getResults() {}
61
91
  }