Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
62087a686a | |||
572deb990e | |||
719c63a092 | |||
9d9700214f | |||
bc82e110ef | |||
fe15ebe82d | |||
1b8577d300 | |||
ef4cfb81d8 | |||
abea5942b7 | |||
a6274e9a2d | |||
8b3752f586 | |||
c8e1d24224 | |||
dbd7748ac0 | |||
68984d5702 | |||
5237439f88 | |||
c3df73616f | |||
a03b095d14 | |||
9a18658e09 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-catalog",
|
"name": "@designestate/dees-catalog",
|
||||||
"version": "1.0.139",
|
"version": "1.0.148",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "website for lossless.com",
|
"description": "website for lossless.com",
|
||||||
"main": "dist_ts_web/index.js",
|
"main": "dist_ts_web/index.js",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@designestate/dees-catalog',
|
name: '@designestate/dees-catalog',
|
||||||
version: '1.0.139',
|
version: '1.0.148',
|
||||||
description: 'website for lossless.com'
|
description: 'website for lossless.com'
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,12 @@ export class DeesButton extends DeesElement {
|
|||||||
<p><dees-button disabled status="error">Error Status</dees-button></p>
|
<p><dees-button disabled status="error">Error Status</dees-button></p>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@property()
|
@property({
|
||||||
|
reflect: true,
|
||||||
|
hasChanged() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
})
|
||||||
public text: string;
|
public text: string;
|
||||||
|
|
||||||
@property()
|
@property()
|
||||||
@ -81,8 +86,8 @@ export class DeesButton extends DeesElement {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: ${cssManager.bdTheme('#eee', '#333')};
|
background: ${cssManager.bdTheme('#fff', '#333')};
|
||||||
box-shadow: ${cssManager.bdTheme('0px 0px 5px rgba(0,0,0,0.1)', 'none')};
|
box-shadow: ${cssManager.bdTheme('0px 1px 4px rgba(0,0,0,0.3)', 'none')};
|
||||||
border: 1px solid ${cssManager.bdTheme('#eee', '#333')};
|
border: 1px solid ${cssManager.bdTheme('#eee', '#333')};
|
||||||
border-top: ${cssManager.bdTheme('1px solid #eee', '1px solid #444')};
|
border-top: ${cssManager.bdTheme('1px solid #eee', '1px solid #444')};
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
@ -29,8 +29,29 @@ export class DeesContextmenu extends DeesElement {
|
|||||||
margin: 20px;
|
margin: 20px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<dees-button @click=${() => {
|
<dees-button @contextmenu=${(eventArg) => {
|
||||||
DeesContextmenu.openContextMenuWithOptions();
|
DeesContextmenu.openContextMenuWithOptions(eventArg, [
|
||||||
|
{
|
||||||
|
name: 'copy',
|
||||||
|
iconName: 'copySolid',
|
||||||
|
action: async () => {
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
iconName: 'penToSquare',
|
||||||
|
action: async () => {
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
},{
|
||||||
|
name: 'paste',
|
||||||
|
iconName: 'pasteSolid',
|
||||||
|
action: async () => {
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]);
|
||||||
}}>Hello</dees-button>
|
}}>Hello</dees-button>
|
||||||
<dees-contextmenu class="withMargin"></dees-contextmenu>
|
<dees-contextmenu class="withMargin"></dees-contextmenu>
|
||||||
<dees-contextmenu
|
<dees-contextmenu
|
||||||
@ -55,13 +76,20 @@ export class DeesContextmenu extends DeesElement {
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
// STATIC
|
// STATIC
|
||||||
public static openContextMenuWithOptions(eventArg, contextOptions: plugins.tsclass.website.IMenuItem[]) {
|
public static async openContextMenuWithOptions(eventArg: MouseEvent, menuItemsArg: plugins.tsclass.website.IMenuItem[]) {
|
||||||
|
eventArg.preventDefault();
|
||||||
const contextMenu = new DeesContextmenu();
|
const contextMenu = new DeesContextmenu();
|
||||||
contextMenu.style.position = 'absolute';
|
contextMenu.style.position = 'absolute';
|
||||||
contextMenu;
|
contextMenu.style.top = `${eventArg.clientY.toString()}px`;
|
||||||
const windowLayer = new DeesWindowLayer();
|
contextMenu.style.left = `${eventArg.clientX.toString()}px`;
|
||||||
windowLayer.append(contextMenu);
|
contextMenu.style.opacity = '0';
|
||||||
document.body.append(windowLayer);
|
contextMenu.style.transform = 'scale(0.95,0.95)';
|
||||||
|
contextMenu.style.transformOrigin = 'top left';
|
||||||
|
contextMenu.menuItems = menuItemsArg;
|
||||||
|
document.body.append(contextMenu);
|
||||||
|
await domtools.plugins.smartdelay.delayFor(0);
|
||||||
|
contextMenu.style.opacity = '1';
|
||||||
|
contextMenu.style.transform = 'scale(1,1)';
|
||||||
}
|
}
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
@ -78,6 +106,7 @@ export class DeesContextmenu extends DeesElement {
|
|||||||
css`
|
css`
|
||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
|
transition: all 0.1s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainbox {
|
.mainbox {
|
||||||
@ -120,7 +149,7 @@ export class DeesContextmenu extends DeesElement {
|
|||||||
<div class="mainbox">
|
<div class="mainbox">
|
||||||
${this.menuItems.map((menuItemArg) => {
|
${this.menuItems.map((menuItemArg) => {
|
||||||
return html`
|
return html`
|
||||||
<div class="menuitem">
|
<div class="menuitem" @click=${() => this.handleClick(menuItemArg)}>
|
||||||
<dees-icon .iconFA=${(menuItemArg.iconName as any) || 'minus'}></dees-icon
|
<dees-icon .iconFA=${(menuItemArg.iconName as any) || 'minus'}></dees-icon
|
||||||
>${menuItemArg.name}
|
>${menuItemArg.name}
|
||||||
</div>
|
</div>
|
||||||
@ -136,4 +165,16 @@ export class DeesContextmenu extends DeesElement {
|
|||||||
mainbox.textContent = 'no menu items present';
|
mainbox.textContent = 'no menu items present';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async handleClick(menuItem: plugins.tsclass.website.IMenuItem) {
|
||||||
|
menuItem.action();
|
||||||
|
await this.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async destroy() {
|
||||||
|
this.style.opacity = '0';
|
||||||
|
this.style.transform = 'scale(0.95,0,95)';
|
||||||
|
await domtools.plugins.smartdelay.delayFor(100);
|
||||||
|
this.parentElement.removeChild(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ export class DeesFormSubmit extends DeesElement {
|
|||||||
public render() {
|
public render() {
|
||||||
return html`
|
return html`
|
||||||
<dees-button status=${this.status} @click=${this.submit} .disabled=${this.disabled}>
|
<dees-button status=${this.status} @click=${this.submit} .disabled=${this.disabled}>
|
||||||
${this.text ? this.text : html`<slot></slot>`}
|
${this.text ? this.text : this.textContent}
|
||||||
</dees-button>
|
</dees-button>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,8 @@ import {
|
|||||||
faCircleXmark as faCircleXmarkSolid,
|
faCircleXmark as faCircleXmarkSolid,
|
||||||
faCopy as faCopySolid,
|
faCopy as faCopySolid,
|
||||||
faDesktop as faDesktopSolid,
|
faDesktop as faDesktopSolid,
|
||||||
|
faEye as faEyeSolid,
|
||||||
|
faEyeSlash as faEyeSlashSolid,
|
||||||
faGrip as faGripSolid,
|
faGrip as faGripSolid,
|
||||||
faMessage as faMessageSolid,
|
faMessage as faMessageSolid,
|
||||||
faMinus as faMinusSolid,
|
faMinus as faMinusSolid,
|
||||||
@ -82,6 +84,10 @@ export const faIcons = {
|
|||||||
copySolid: faCopySolid,
|
copySolid: faCopySolid,
|
||||||
desktop: faDesktopSolid,
|
desktop: faDesktopSolid,
|
||||||
desktopSolid: faDesktopSolid,
|
desktopSolid: faDesktopSolid,
|
||||||
|
eye: faEyeSolid,
|
||||||
|
eyeSolid: faEyeSolid,
|
||||||
|
eyeSlash: faEyeSlashSolid,
|
||||||
|
eyeSlashSolid: faEyeSlashSolid,
|
||||||
grip: faGripSolid,
|
grip: faGripSolid,
|
||||||
gripSolid: faGripSolid,
|
gripSolid: faGripSolid,
|
||||||
message: faMessageRegular,
|
message: faMessageRegular,
|
||||||
@ -181,7 +187,7 @@ export class DeesIcon extends DeesElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async firstUpdated() {
|
public async updated() {
|
||||||
if (!this.iconSize) {
|
if (!this.iconSize) {
|
||||||
this.iconSize = parseInt(globalThis.getComputedStyle(this).fontSize.replace(/\D/g,''));
|
this.iconSize = parseInt(globalThis.getComputedStyle(this).fontSize.replace(/\D/g,''));
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,10 @@ declare global {
|
|||||||
|
|
||||||
@customElement('dees-input-text')
|
@customElement('dees-input-text')
|
||||||
export class DeesInputText extends DeesElement {
|
export class DeesInputText extends DeesElement {
|
||||||
public static demo = () => html`<dees-input-text></dees-input-text>`;
|
public static demo = () => html`
|
||||||
|
<dees-input-text .label=${'this is a label'}></dees-input-text>
|
||||||
|
<dees-input-text .isPasswordBool=${true}></dees-input-text>
|
||||||
|
`;
|
||||||
|
|
||||||
// INSTANCE
|
// INSTANCE
|
||||||
public changeSubject = new domtools.rxjs.Subject();
|
public changeSubject = new domtools.rxjs.Subject();
|
||||||
@ -17,7 +20,7 @@ export class DeesInputText extends DeesElement {
|
|||||||
@property({
|
@property({
|
||||||
type: String
|
type: String
|
||||||
})
|
})
|
||||||
public label: string = 'Label';
|
public label: string;
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: String
|
type: String
|
||||||
@ -39,6 +42,18 @@ export class DeesInputText extends DeesElement {
|
|||||||
})
|
})
|
||||||
public disabled: boolean = false;
|
public disabled: boolean = false;
|
||||||
|
|
||||||
|
@property({
|
||||||
|
type: Boolean,
|
||||||
|
reflect: true,
|
||||||
|
})
|
||||||
|
public isPasswordBool = false;
|
||||||
|
|
||||||
|
@property({
|
||||||
|
type: Boolean,
|
||||||
|
reflect: true,
|
||||||
|
})
|
||||||
|
public showPasswordBool = false;
|
||||||
|
|
||||||
public render(): TemplateResult {
|
public render(): TemplateResult {
|
||||||
return html `
|
return html `
|
||||||
<style>
|
<style>
|
||||||
@ -77,7 +92,8 @@ export class DeesInputText extends DeesElement {
|
|||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
outline: none;
|
outline: none;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-family: Inter;
|
font-family: ${this.isPasswordBool ? 'monospace': 'Inter'};
|
||||||
|
letter-spacing: ${this.isPasswordBool ? '1px': 'normal'};
|
||||||
color: ${this.goBright ? '#333' : '#ccc'};
|
color: ${this.goBright ? '#333' : '#ccc'};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,10 +108,30 @@ export class DeesInputText extends DeesElement {
|
|||||||
outline: none;
|
outline: none;
|
||||||
border-bottom: 1px solid #e4002b;
|
border-bottom: 1px solid #e4002b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.showPassword {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 8px;
|
||||||
|
right: 10px;
|
||||||
|
border: 1px dashed #444;
|
||||||
|
border-radius: 7px;
|
||||||
|
padding: 8px 0px;
|
||||||
|
width: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.showPassword:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
background: #333;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="maincontainer">
|
<div class="maincontainer">
|
||||||
<div class="label">${this.label}</div>
|
${this.label ? html`<div class="label">${this.label}</div>` : html``}
|
||||||
<input type="text" value=${this.value} @input="${this.updateValue}" .disabled=${this.disabled} />
|
<input type="${this.isPasswordBool && !this.showPasswordBool ? 'password' : 'text'}" value=${this.value} @input="${this.updateValue}" .disabled=${this.disabled} />
|
||||||
|
${this.isPasswordBool ? html`
|
||||||
|
<div class="showPassword" @click=${this.togglePasswordView}>
|
||||||
|
<dees-icon .iconFA=${this.showPasswordBool ? 'eye' : 'eyeSlash'}></dees-icon>
|
||||||
|
</div>
|
||||||
|
` : html``}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -113,4 +149,10 @@ export class DeesInputText extends DeesElement {
|
|||||||
public async unfreeze() {
|
public async unfreeze() {
|
||||||
this.disabled = false;
|
this.disabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async togglePasswordView () {
|
||||||
|
const domtools = await this.domtoolsPromise;
|
||||||
|
this.showPasswordBool = !this.showPasswordBool;
|
||||||
|
console.log(`this.showPasswordBool is: ${this.showPasswordBool}`)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ export class DeesSpeechbubble extends DeesElement {
|
|||||||
return html`
|
return html`
|
||||||
<div class="maincontainer" @click=${this.handleClick}>
|
<div class="maincontainer" @click=${this.handleClick}>
|
||||||
<div class="arrow"></div>
|
<div class="arrow"></div>
|
||||||
<div class="speechbubble"><span class="wave">👋</span> Hey! We are API-driven.</div>
|
<div class="speechbubble"><span class="wave">👋</span> We build with launch.sh, and you can too.</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -144,7 +144,7 @@ export class DeesSpeechbubble extends DeesElement {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
globalThis.location.href = "https://api.global"
|
globalThis.location.href = "https://launch.sh"
|
||||||
}
|
}
|
||||||
|
|
||||||
public async firstUpdated() {
|
public async firstUpdated() {
|
||||||
|
@ -143,10 +143,10 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 50px;
|
min-height: 50px;
|
||||||
background: ${cssManager.bdTheme('#fafafa', '#333333')};
|
background: ${cssManager.bdTheme('#ffffff', '#333333')};
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
border-top: 1px solid ${cssManager.bdTheme('#fff', '#444')};
|
border-top: 1px solid ${cssManager.bdTheme('#fff', '#444')};
|
||||||
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
|
box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
.headingSeparation {
|
.headingSeparation {
|
||||||
margin-top: 7px;
|
margin-top: 7px;
|
||||||
|
Reference in New Issue
Block a user