@consent.software/catalog 1.4.5 → 1.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consent.software/catalog",
3
- "version": "1.4.5",
3
+ "version": "1.5.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": {
@@ -10,7 +10,7 @@
10
10
  "author": "Lossless GmbH",
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
- "@consent.software/interfaces": "^1.0.11",
13
+ "@consent.software/interfaces": "^1.0.14",
14
14
  "@consent.software/webclient": "^1.1.0",
15
15
  "@push.rocks/smartdelay": "^3.0.5",
16
16
  "lit": "^3.2.1"
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@consent.software/catalog',
6
- version: '1.4.5',
6
+ version: '1.5.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
  }
@@ -78,6 +78,11 @@ export class ConsentsoftwareCookieconsent extends LitElement {
78
78
  transition: all 0.2s;
79
79
  }
80
80
 
81
+ .pageOverlay.shake {
82
+ background: rgba(0, 0, 0, 0.5) !important;
83
+ backdrop-filter: blur(20px) !important;
84
+ }
85
+
81
86
  .modalBox {
82
87
  display: block;
83
88
  color: var(--text-color);
@@ -97,6 +102,23 @@ export class ConsentsoftwareCookieconsent extends LitElement {
97
102
  opacity: 0;
98
103
  }
99
104
 
105
+ .modalBox.shake {
106
+ animation: shake 150ms 2 linear;
107
+ box-shadow: 0px 0px 8px rgba(255, 255, 255, 0.6);
108
+ }
109
+
110
+ @keyframes shake {
111
+ 0% {
112
+ transform: translate(3px, 0);
113
+ }
114
+ 50% {
115
+ transform: translate(-3px, 0);
116
+ }
117
+ 100% {
118
+ transform: translate(0, 0);
119
+ }
120
+ }
121
+
100
122
  /*
101
123
  * Toggle display based on [show] attribute
102
124
  * (so if show=false, the banner doesn't show at all).
@@ -173,7 +195,7 @@ export class ConsentsoftwareCookieconsent extends LitElement {
173
195
 
174
196
  public render(): TemplateResult {
175
197
  return html`
176
- <div class="pageOverlay">
198
+ <div class="pageOverlay" @click=${this.pageOverlayClick}>
177
199
  <div class="modalBox">
178
200
  <div class="content">
179
201
  <consentsoftware-header></consentsoftware-header>
@@ -265,7 +287,7 @@ export class ConsentsoftwareCookieconsent extends LitElement {
265
287
  const pageOverlay: HTMLDivElement = this.shadowRoot?.querySelector('.pageOverlay');
266
288
  if (pageOverlay) {
267
289
  pageOverlay.style.background = 'rgba(255,255,255, 0.1)';
268
- pageOverlay.style.backdropFilter = 'blur(1px)';
290
+ pageOverlay.style.backdropFilter = 'blur(0px)';
269
291
  }
270
292
  const modalBox: HTMLDivElement = this.shadowRoot?.querySelector('.modalBox');
271
293
  if (modalBox) {
@@ -321,6 +343,20 @@ export class ConsentsoftwareCookieconsent extends LitElement {
321
343
  this.updated();
322
344
  }
323
345
 
346
+ private async pageOverlayClick(e: MouseEvent) {
347
+ if (e.target === e.currentTarget) {
348
+ const pageOverlay: HTMLDivElement = this.shadowRoot?.querySelector('.pageOverlay');
349
+ const modalBox: HTMLDivElement = this.shadowRoot?.querySelector('.modalBox');
350
+ if (pageOverlay && modalBox) {
351
+ pageOverlay.classList.add('shake');
352
+ modalBox.classList.add('shake');
353
+ await delayFor(2000);
354
+ pageOverlay.classList.remove('shake');
355
+ modalBox.classList.remove('shake');
356
+ }
357
+ }
358
+ }
359
+
324
360
  /**
325
361
  * Dynamically switches the theme between light/dark,
326
362
  * respecting `prefers-color-scheme` by default.