Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
9407295866 | |||
472fa6b684 | |||
bdf9aa7e54 | |||
72c318a793 | |||
71ee96307e | |||
e0ed973b3a | |||
1ab6e09c95 | |||
26fd75b8ae |
22
changelog.md
22
changelog.md
@ -1,5 +1,27 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-01-17 - 1.4.4 - fix(core)
|
||||||
|
Update LitElement properties to use accessors
|
||||||
|
|
||||||
|
- Changes made in ts_web/elements/consentsoftware-toggle.ts
|
||||||
|
- Updated properties 'required' and 'selected' to use accessors
|
||||||
|
|
||||||
|
## 2025-01-17 - 1.4.3 - fix(consentsoftware-cookieconsent)
|
||||||
|
Fix transition property in consent button styles and add HTMLElementTagNameMap declaration for global interface.
|
||||||
|
|
||||||
|
- Updated the transition property for consent buttons to transition all properties instead of just the background.
|
||||||
|
- Added global interface HTMLElementTagNameMap for custom element type support.
|
||||||
|
|
||||||
|
## 2025-01-16 - 1.4.2 - fix(cookieconsent)
|
||||||
|
Fix user-select property in consentsoftware-cookieconsent component for consistency in interaction.
|
||||||
|
|
||||||
|
|
||||||
|
## 2025-01-16 - 1.4.1 - fix(consentsoftware-toggle)
|
||||||
|
Fix issue in drag event handling logic for the toggle component.
|
||||||
|
|
||||||
|
- Corrected dragging functionality to accurately track dragging state.
|
||||||
|
- Included logic to delay the reset of the dragging state after toggling.
|
||||||
|
|
||||||
## 2025-01-16 - 1.4.0 - feat(toggle component)
|
## 2025-01-16 - 1.4.0 - feat(toggle component)
|
||||||
Enhanced consent toggle component with drag functionality
|
Enhanced consent toggle component with drag functionality
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@consent.software/catalog",
|
"name": "@consent.software/catalog",
|
||||||
"version": "1.4.0",
|
"version": "1.4.4",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A library of web components designed to integrate robust consent management capabilities into web applications, ensuring compliance with privacy regulations.",
|
"description": "A library of web components designed to integrate robust consent management capabilities into web applications, ensuring compliance with privacy regulations.",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@consent.software/catalog',
|
name: '@consent.software/catalog',
|
||||||
version: '1.4.0',
|
version: '1.4.4',
|
||||||
description: 'A library of web components designed to integrate robust consent management capabilities into web applications, ensuring compliance with privacy regulations.'
|
description: 'A library of web components designed to integrate robust consent management capabilities into web applications, ensuring compliance with privacy regulations.'
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,12 @@ import * as csInterfaces from '@consent.software/interfaces';
|
|||||||
import * as csWebclient from '@consent.software/webclient';
|
import * as csWebclient from '@consent.software/webclient';
|
||||||
import { delayFor } from '@push.rocks/smartdelay';
|
import { delayFor } from '@push.rocks/smartdelay';
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface HTMLElementTagNameMap {
|
||||||
|
'consentsoftware-cookieconsent': ConsentsoftwareCookieconsent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@customElement('consentsoftware-cookieconsent')
|
@customElement('consentsoftware-cookieconsent')
|
||||||
export class ConsentsoftwareCookieconsent extends LitElement {
|
export class ConsentsoftwareCookieconsent extends LitElement {
|
||||||
public static demo = () => html`<consentsoftware-cookieconsent></consentsoftware-cookieconsent>`;
|
public static demo = () => html`<consentsoftware-cookieconsent></consentsoftware-cookieconsent>`;
|
||||||
@ -25,6 +31,7 @@ export class ConsentsoftwareCookieconsent extends LitElement {
|
|||||||
public static styles = css`
|
public static styles = css`
|
||||||
:host {
|
:host {
|
||||||
font-family: ${shared.fontStack};
|
font-family: ${shared.fontStack};
|
||||||
|
user-select: none;
|
||||||
/* Default theme variables */
|
/* Default theme variables */
|
||||||
--text-color: #333;
|
--text-color: #333;
|
||||||
--background-color: #eeeeee;
|
--background-color: #eeeeee;
|
||||||
@ -167,7 +174,7 @@ export class ConsentsoftwareCookieconsent extends LitElement {
|
|||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.2s;
|
transition: all 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.consent-button:hover {
|
.consent-button:hover {
|
||||||
|
@ -6,10 +6,10 @@ import { delayFor } from '@push.rocks/smartdelay';
|
|||||||
@customElement('consentsoftware-toggle')
|
@customElement('consentsoftware-toggle')
|
||||||
export class ConsentsoftwareToggle extends LitElement {
|
export class ConsentsoftwareToggle extends LitElement {
|
||||||
@property({ type: Boolean })
|
@property({ type: Boolean })
|
||||||
public required = false;
|
public accessor required = false;
|
||||||
|
|
||||||
@property({ type: Boolean, reflect: true })
|
@property({ type: Boolean, reflect: true })
|
||||||
public selected = false;
|
public accessor selected = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We always track the knob’s left offset in `currentX`.
|
* We always track the knob’s left offset in `currentX`.
|
||||||
@ -189,7 +189,6 @@ export class ConsentsoftwareToggle extends LitElement {
|
|||||||
|
|
||||||
// Start dragging
|
// Start dragging
|
||||||
this.isDragging = true;
|
this.isDragging = true;
|
||||||
this.hasDragged = false;
|
|
||||||
// The difference between the pointer’s X and the knob’s current position
|
// The difference between the pointer’s X and the knob’s current position
|
||||||
this.startX = event.clientX - this.currentX;
|
this.startX = event.clientX - this.currentX;
|
||||||
|
|
||||||
@ -229,6 +228,9 @@ export class ConsentsoftwareToggle extends LitElement {
|
|||||||
|
|
||||||
// Dispatch toggle event
|
// Dispatch toggle event
|
||||||
this.dispatchEvent(new CustomEvent('toggle', { detail: { selected: this.selected } }));
|
this.dispatchEvent(new CustomEvent('toggle', { detail: { selected: this.selected } }));
|
||||||
|
delayFor(0).then(() => {
|
||||||
|
this.hasDragged = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user