From fe15ebe82da87b973f7b023db102ac2c3b216c44 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Mon, 16 Jan 2023 11:51:21 +0100 Subject: [PATCH] fix(core): update --- ts_web/00_commitinfo_data.ts | 2 +- ts_web/elements/dees-icon.ts | 8 ++++- ts_web/elements/dees-input-text.ts | 49 +++++++++++++++++++++++++++--- 3 files changed, 53 insertions(+), 6 deletions(-) diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index 0688650..78eb123 100644 --- a/ts_web/00_commitinfo_data.ts +++ b/ts_web/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@designestate/dees-catalog', - version: '1.0.145', + version: '1.0.146', description: 'website for lossless.com' } diff --git a/ts_web/elements/dees-icon.ts b/ts_web/elements/dees-icon.ts index ca64378..d88488e 100644 --- a/ts_web/elements/dees-icon.ts +++ b/ts_web/elements/dees-icon.ts @@ -43,6 +43,8 @@ import { faCircleXmark as faCircleXmarkSolid, faCopy as faCopySolid, faDesktop as faDesktopSolid, + faEye as faEyeSolid, + faEyeSlash as faEyeSlashSolid, faGrip as faGripSolid, faMessage as faMessageSolid, faMinus as faMinusSolid, @@ -82,6 +84,10 @@ export const faIcons = { copySolid: faCopySolid, desktop: faDesktopSolid, desktopSolid: faDesktopSolid, + eye: faEyeSolid, + eyeSolid: faEyeSolid, + eyeSlash: faEyeSlashSolid, + eyeSlashSolid: faEyeSlashSolid, grip: faGripSolid, gripSolid: faGripSolid, message: faMessageRegular, @@ -181,7 +187,7 @@ export class DeesIcon extends DeesElement { `; } - public async firstUpdated() { + public async updated() { if (!this.iconSize) { this.iconSize = parseInt(globalThis.getComputedStyle(this).fontSize.replace(/\D/g,'')); } diff --git a/ts_web/elements/dees-input-text.ts b/ts_web/elements/dees-input-text.ts index 4e0c181..9f19c80 100644 --- a/ts_web/elements/dees-input-text.ts +++ b/ts_web/elements/dees-input-text.ts @@ -9,7 +9,10 @@ declare global { @customElement('dees-input-text') export class DeesInputText extends DeesElement { - public static demo = () => html``; + public static demo = () => html` + + + `; // INSTANCE public changeSubject = new domtools.rxjs.Subject(); @@ -17,7 +20,7 @@ export class DeesInputText extends DeesElement { @property({ type: String }) - public label: string = 'Label'; + public label: string; @property({ type: String @@ -39,6 +42,18 @@ export class DeesInputText extends DeesElement { }) public disabled: boolean = false; + @property({ + type: Boolean, + reflect: true, + }) + public isPasswordBool = false; + + @property({ + type: Boolean, + reflect: true, + }) + public showPasswordBool = false; + public render(): TemplateResult { return html `
-
${this.label}
- + ${this.label ? html`
${this.label}
` : html``} + + ${this.isPasswordBool ? html` +
+ +
+ ` : html``}
`; } @@ -113,4 +148,10 @@ export class DeesInputText extends DeesElement { public async unfreeze() { this.disabled = false; } + + public async togglePasswordView () { + const domtools = await this.domtoolsPromise; + this.showPasswordBool = !this.showPasswordBool; + console.log(`this.showPasswordBool is: ${this.showPasswordBool}`) + } }