@consent.software/catalog 1.4.1 → 1.4.3

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.
@@ -84,6 +84,7 @@ ${n}
84
84
  `}async connectedCallback(){super.connectedCallback(),this.updateTheme(),await this.csWebclientInstance.getCookieLevels()?(this.setAttribute("show","false"),this.setAttribute("gotIt","true")):(this.setAttribute("show","true"),this.setAttribute("gotIt","false"),requestAnimationFrame(async()=>{await this.updated();let o=this.shadowRoot?.querySelector(".pageOverlay");o&&(o.style.background="rgba(0, 0, 0, 0.1)",o.style.backdropFilter="blur(2px)");let n=this.shadowRoot?.querySelector(".modalBox");n&&(n.style.transform="scale(1)",n.style.opacity="1")}))}async firstUpdated(){}async updated(){console.log(`The height of the cookie banner is ${this.shadowRoot?.host?.clientHeight}px`);let r=await this.csWebclientInstance.getCookieLevels();!this.csWebclientRan&&r&&(this.csWebclientRan=!0,await this.csWebclientInstance.getAndRunConsentTuples())}async setLevel(r,o){console.log(`Set level to ${o}`),await this.csWebclientInstance.setCookieLevels(o),this.setAttribute("gotIt","true"),await Pt(300),this.setAttribute("show","false"),this.updated()}updateTheme(){let r=window.matchMedia("(prefers-color-scheme: dark)").matches;this.theme=r?"dark":"light",window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",o=>{this.theme=o.matches?"dark":"light"})}};Or.demo=()=>Re`<consentsoftware-cookieconsent></consentsoftware-cookieconsent>`,Or.styles=Ze`
85
85
  :host {
86
86
  font-family: ${$n};
87
+ user-select: none;
87
88
  /* Default theme variables */
88
89
  --text-color: #333;
89
90
  --background-color: #eeeeee;
@@ -226,7 +227,7 @@ ${n}
226
227
  line-height: 30px;
227
228
  text-align: center;
228
229
  cursor: pointer;
229
- transition: background 0.2s;
230
+ transition: all 0.2s;
230
231
  }
231
232
 
232
233
  .consent-button:hover {