Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ee8512ee4 | |||
| f75a3714ae | |||
| d6047f2e78 | |||
| 03769c8412 | |||
| 1a782eb4ee | |||
| a27adf25cb | |||
| 96e237b9af | |||
| 710e06b2f1 | |||
| a3bc25c4ac | |||
| ee5b712a37 | |||
| 879ae5ad91 | |||
| 2bbda416b2 |
@@ -10,11 +10,9 @@
|
||||
/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<link rel="preconnect" href="https://rsms.me/">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
|
||||
<!--Lets load standard fonts-->
|
||||
<link rel="preconnect" href="https://assetbroker.lossless.one/" crossorigin>
|
||||
<link rel="stylesheet" href="https://assetbroker.lossless.one/fonts/fonts.css">
|
||||
|
||||
<style>
|
||||
body {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@designestate/dees-catalog",
|
||||
"version": "1.0.164",
|
||||
"version": "1.0.170",
|
||||
"private": false,
|
||||
"description": "website for lossless.com",
|
||||
"main": "dist_ts_web/index.js",
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@designestate/dees-catalog',
|
||||
version: '1.0.164',
|
||||
version: '1.0.170',
|
||||
description: 'website for lossless.com'
|
||||
}
|
||||
|
||||
@@ -164,10 +164,10 @@ export class DeesDataviewCodebox extends DeesElement {
|
||||
}
|
||||
});
|
||||
if (this.codeToDisplay && this.codeToDisplay !== this.codeToDisplayStore) {
|
||||
this.codeToDisplayStore = smartstring.indent.normalize(this.codeToDisplay);
|
||||
this.codeToDisplayStore = smartstring.indent.normalize(this.codeToDisplay).trimStart();
|
||||
}
|
||||
if (slottedCodeNodes[0] && slottedCodeNodes[0].wholeText && !this.codeToDisplay) {
|
||||
this.codeToDisplayStore = smartstring.indent.normalize(slottedCodeNodes[0].wholeText);
|
||||
this.codeToDisplayStore = smartstring.indent.normalize(slottedCodeNodes[0].wholeText).trimStart();
|
||||
this.codeToDisplay = this.codeToDisplayStore;
|
||||
}
|
||||
await domtools.plugins.smartdelay.delayFor(0);
|
||||
|
||||
@@ -46,7 +46,7 @@ export class DeesDataviewStatusobject extends DeesElement {
|
||||
},
|
||||
{
|
||||
name: 'Detail 4',
|
||||
value: 'Value 4',
|
||||
value: 'Value 4 jhdkfjhalskdfjhfdjskalsdkfjhfdjskalskdjfhjdkslaksjdhfjdkslaskdfjhfjdkslaskdjfhjdskalskdjhfdjskalskdjfhdjskl',
|
||||
status: 'ok',
|
||||
statusText: 'OK',
|
||||
},
|
||||
@@ -61,7 +61,6 @@ export class DeesDataviewStatusobject extends DeesElement {
|
||||
cssManager.defaultStyles,
|
||||
css`
|
||||
.mainbox {
|
||||
overflow: auto;
|
||||
border-radius: 3px;
|
||||
background: ${cssManager.bdTheme('#fff', '#1b1b1b')};
|
||||
box-shadow: 0px 1px 3px #00000030;
|
||||
@@ -118,13 +117,20 @@ export class DeesDataviewStatusobject extends DeesElement {
|
||||
}
|
||||
|
||||
.detail {
|
||||
height: 60px;
|
||||
minheight: 60px;
|
||||
align-items: center;
|
||||
display: grid;
|
||||
grid-template-columns: 40px auto;
|
||||
border-top: 1px dotted ${cssManager.bdTheme('#999', '#444')};
|
||||
}
|
||||
|
||||
.detail .detailsText {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
padding-right: 8px;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.detail .detailsText .label {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ export class DeesFormSubmit extends DeesElement {
|
||||
public text: string;
|
||||
|
||||
@property({
|
||||
type: String
|
||||
type: String,
|
||||
})
|
||||
public status: 'normal' | 'pending' | 'success' | 'error' = 'normal';
|
||||
|
||||
@@ -41,7 +41,12 @@ export class DeesFormSubmit extends DeesElement {
|
||||
|
||||
public render() {
|
||||
return html`
|
||||
<dees-button status=${this.status} @click=${this.submit} .disabled=${this.disabled} .text=${this.text ? this.text : this.textContent}>
|
||||
<dees-button
|
||||
status=${this.status}
|
||||
@click=${this.submit}
|
||||
.disabled=${this.disabled}
|
||||
.text=${this.text ? this.text : this.textContent}
|
||||
>
|
||||
</dees-button>
|
||||
`;
|
||||
}
|
||||
@@ -53,4 +58,12 @@ export class DeesFormSubmit extends DeesElement {
|
||||
const parentElement: DeesForm = this.parentElement as DeesForm;
|
||||
parentElement.gatherAndDispatch();
|
||||
}
|
||||
|
||||
public async focus() {
|
||||
const domtools = await this.domtoolsPromise;
|
||||
if (!this.disabled) {
|
||||
domtools.convenience.smartdelay.delayFor(0);
|
||||
this.submit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ export class DeesForm extends DeesElement {
|
||||
`;
|
||||
}
|
||||
|
||||
public firstUpdated() {
|
||||
public async firstUpdated() {
|
||||
const formChildren = this.getFormChildren();
|
||||
this.checkRequiredStatus();
|
||||
for (const child of formChildren) {
|
||||
@@ -65,6 +65,7 @@ export class DeesForm extends DeesElement {
|
||||
this.checkRequiredStatus();
|
||||
});
|
||||
}
|
||||
await this.instrumentBehaviours();
|
||||
}
|
||||
|
||||
public getFormChildren() {
|
||||
@@ -170,4 +171,21 @@ export class DeesForm extends DeesElement {
|
||||
|
||||
submitButton.text = textStateArg;
|
||||
}
|
||||
|
||||
public async instrumentBehaviours() {
|
||||
const children = this.getFormChildren();
|
||||
for (const child of children) {
|
||||
child.addEventListener('keydown', (eventArg) => {
|
||||
if (eventArg.key === 'Enter') {
|
||||
const currentIndex = children.indexOf(child);
|
||||
if (currentIndex < children.length - 1) {
|
||||
children[currentIndex + 1].focus();
|
||||
} else {
|
||||
children[currentIndex].blur();
|
||||
this.getSubmitButton().focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,4 +163,9 @@ export class DeesInputText extends DeesElement {
|
||||
const textInput = this.shadowRoot.querySelector('input');
|
||||
textInput.focus();
|
||||
}
|
||||
|
||||
public async blur() {
|
||||
const textInput = this.shadowRoot.querySelector('input');
|
||||
textInput.blur();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,15 +48,15 @@ export class DeesStepper extends DeesElement {
|
||||
`,
|
||||
validationFunc: async (stepperArg, elementArg) => {
|
||||
const deesForm = elementArg.querySelector('dees-form');
|
||||
deesForm.addEventListener('formData', eventArg => {
|
||||
deesForm.addEventListener('formData', (eventArg) => {
|
||||
stepperArg.goNext();
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Whats your mobile number?',
|
||||
content: html``,
|
||||
}
|
||||
},
|
||||
] as IStep[]}
|
||||
></dees-stepper>
|
||||
`;
|
||||
@@ -195,22 +195,26 @@ export class DeesStepper extends DeesElement {
|
||||
return this.steps.findIndex((stepArg2) => stepArg === stepArg2);
|
||||
};
|
||||
|
||||
public firstUpdated() {
|
||||
public async firstUpdated() {
|
||||
await this.domtoolsPromise;
|
||||
await this.domtools.convenience.smartdelay.delayFor(0);
|
||||
this.selectedStep = this.steps[0];
|
||||
this.setScrollStatus();
|
||||
}
|
||||
|
||||
public updated() {
|
||||
public async updated() {
|
||||
this.setScrollStatus();
|
||||
}
|
||||
|
||||
public scroller: typeof domtools.plugins.SweetScroll.prototype;
|
||||
|
||||
public async setScrollStatus() {
|
||||
await domtools.plugins.smartdelay.delayFor(50);
|
||||
const stepperContainer: HTMLElement = this.shadowRoot.querySelector('.stepperContainer');
|
||||
const firstStepElement: HTMLElement = this.shadowRoot.querySelector('.step');
|
||||
const selectedStepElement: HTMLElement = this.shadowRoot.querySelector('.selected');
|
||||
if (!selectedStepElement) {
|
||||
return;
|
||||
}
|
||||
if (!stepperContainer.style.paddingTop) {
|
||||
stepperContainer.style.paddingTop = `${
|
||||
stepperContainer.offsetHeight / 2 - selectedStepElement.offsetHeight / 2
|
||||
|
||||
Reference in New Issue
Block a user