fix(core): update

This commit is contained in:
Philipp Kunz 2024-01-21 01:12:57 +01:00
parent 8fa01fbaad
commit 5817068cb5
16 changed files with 1209 additions and 240 deletions

View File

@ -15,7 +15,7 @@
"author": "Lossless GmbH", "author": "Lossless GmbH",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@design.estate/dees-domtools": "^2.0.55", "@design.estate/dees-domtools": "^2.0.57",
"@design.estate/dees-element": "^2.0.33", "@design.estate/dees-element": "^2.0.33",
"@design.estate/dees-wcctools": "^1.0.87", "@design.estate/dees-wcctools": "^1.0.87",
"@fortawesome/fontawesome-svg-core": "^6.5.1", "@fortawesome/fontawesome-svg-core": "^6.5.1",
@ -33,7 +33,7 @@
"devDependencies": { "devDependencies": {
"@git.zone/tsbuild": "^2.1.72", "@git.zone/tsbuild": "^2.1.72",
"@git.zone/tsbundle": "^2.0.15", "@git.zone/tsbundle": "^2.0.15",
"@git.zone/tstest": "^1.0.77", "@git.zone/tstest": "^1.0.86",
"@git.zone/tswatch": "^2.0.21", "@git.zone/tswatch": "^2.0.21",
"@push.rocks/projectinfo": "^5.0.2", "@push.rocks/projectinfo": "^5.0.2",
"@push.rocks/tapbundle": "^5.0.15", "@push.rocks/tapbundle": "^5.0.15",

1050
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@design.estate/dees-catalog', name: '@design.estate/dees-catalog',
version: '1.0.246', version: '1.0.247',
description: 'website for lossless.com' description: 'website for lossless.com'
} }

View File

@ -159,7 +159,7 @@ export class DeesContextmenu extends DeesElement {
this.destroy(); this.destroy();
}}> }}>
<dees-icon .iconFA=${'xmark'}></dees-icon <dees-icon .iconFA=${'xmark'}></dees-icon
>Deactivate Contextmenu globally. >allow native context
</div> </div>
` : html``} ` : html``}
</div> </div>

View File

@ -1,39 +1,49 @@
import { html } from '@design.estate/dees-element'; import { html, cssManager } from '@design.estate/dees-element';
import * as tsclass from '@tsclass/tsclass'; import * as tsclass from '@tsclass/tsclass';
export const demoFunc = () => html`<dees-dataview-statusobject export const demoFunc = () => html` <style>
.statusObject=${{ .demo {
id: '1', background: ${cssManager.bdTheme('#eeeeeb', '#000000')};
name: 'Demo Item', display: block;
combinedStatus: 'partly_ok', content: '';
combinedStatusText: 'partly_ok', padding: 40px;
details: [ }
{ </style>
name: 'Detail 1', <div class="demo">
value: 'Value 1', <dees-dataview-statusobject
status: 'ok', .statusObject=${{
statusText: 'OK', id: '1',
}, name: 'Demo Item',
{ combinedStatus: 'partly_ok',
name: 'Detail 2', combinedStatusText: 'partly_ok',
value: 'Value 2', details: [
status: 'partly_ok', {
statusText: 'partly_ok', name: 'Detail 1',
}, value: 'Value 1',
{ status: 'ok',
name: 'Detail 3', statusText: 'OK',
value: 'Value 3', },
status: 'not_ok', {
statusText: 'not_ok', name: 'Detail 2',
}, value: 'Value 2',
{ status: 'partly_ok',
name: 'Detail 4', statusText: 'partly_ok',
value: },
'Value 4 jhdkfjhalskdfjhfdjskalsdkfjhfdjskalskdjfhjdkslaksjdhfjdkslaskdfjhfjdkslaskdjfhjdskalskdjhfdjskalskdjfhdjskl', {
status: 'ok', name: 'Detail 3',
statusText: 'OK', value: 'Value 3',
}, status: 'not_ok',
], statusText: 'not_ok',
} as tsclass.code.IStatusObject} },
> {
</dees-dataview-statusobject>`; name: 'Detail 4',
value:
'Value 4 jhdkfjhalskdfjhfdjskalsdkfjhfdjskalskdjfhjdkslaksjdhfjdkslaskdfjhfjdkslaskdjfhjdskalskdjhfdjskalskdjfhdjskl',
status: 'ok',
statusText: 'OK',
},
],
} as tsclass.code.IStatusObject}
>
</dees-dataview-statusobject>
</div>`;

View File

@ -37,6 +37,7 @@ export class DeesDataviewStatusobject extends DeesElement {
box-shadow: 0px 1px 3px #00000030; box-shadow: 0px 1px 3px #00000030;
min-height: 48px; min-height: 48px;
color: ${cssManager.bdTheme('#000', '#fff')}; color: ${cssManager.bdTheme('#000', '#fff')};
border-top: ${cssManager.bdTheme('none', '1px solid #ffffff10')};
cursor: default; cursor: default;
} }
@ -68,12 +69,12 @@ export class DeesDataviewStatusobject extends DeesElement {
font-size: 10px; font-size: 10px;
font-weight: 600; font-weight: 600;
text-transform: uppercase; text-transform: uppercase;
border: 1px solid ${cssManager.bdTheme('#999', '#444')}; border: 1px solid ${cssManager.bdTheme('#e0e0e0', '#444')};
text-align: center; text-align: center;
padding: 4px; padding: 4px;
border-radius: 3px; border-radius: 3px;
margin-right: 16px; margin-right: 16px;
color: #ffffff80; color: ${cssManager.bdTheme('#333', '#ffffff80')};
user-select: none; user-select: none;
} }
@ -106,7 +107,7 @@ export class DeesDataviewStatusobject extends DeesElement {
align-items: center; align-items: center;
display: grid; display: grid;
grid-template-columns: 40px auto; grid-template-columns: 40px auto;
border-top: 1px dotted ${cssManager.bdTheme('#999', '#282828')}; border-top: 1px dotted ${cssManager.bdTheme('#e0e0e0', '#282828')};
transition: all 0.2s; transition: all 0.2s;
} }
@ -114,6 +115,10 @@ export class DeesDataviewStatusobject extends DeesElement {
background: #ffffff05; background: #ffffff05;
} }
.detail:active {
background: #ffffff10;
}
.detail .detailsText { .detail .detailsText {
padding-top: 8px; padding-top: 8px;
padding-bottom: 8px; padding-bottom: 8px;

View File

@ -1,13 +1,14 @@
import { html, domtools } from '@design.estate/dees-element'; import { html, domtools, cssManager } from '@design.estate/dees-element';
import type { DeesForm } from './dees-form.js'; import type { DeesForm } from './dees-form.js';
export const demoFunc = () => html` export const demoFunc = () => html`
<style> <style>
.demoContainer { .demoContainer {
max-width: 400px; max-width: 400px;
margin: auto; margin: 24px auto;
padding: 16px; padding: 16px;
background: #111; background: ${cssManager.bdTheme('#eeeeeb', '#111')};
box-shadow: 0px 1px 3px #00000030;
} }
</style> </style>
<div class="demoContainer"> <div class="demoContainer">
@ -38,7 +39,9 @@ export const demoFunc = () => html`
<dees-input-typelist <dees-input-typelist
.label=${'a type list'} .label=${'a type list'}
></dees-input-typelist> ></dees-input-typelist>
<dees-input-text .required="${true}" key="hello1" label="a text"></dees-input-text> <dees-input-text .required="${true}" key="hello1" label="a text" .description=${`
This is an awesome description.
`}></dees-input-text>
<dees-input-text .required="${true}" key="hello2" label="also a text"></dees-input-text> <dees-input-text .required="${true}" key="hello2" label="also a text"></dees-input-text>
<dees-input-text <dees-input-text
.required="${true}" .required="${true}"

View File

@ -89,7 +89,7 @@ export class DeesInputDropdown extends DeesElement {
.label { .label {
font-size: 14px; font-size: 14px;
margin-bottom: 4px; margin-bottom: 8px;
} }
.selectedBox { .selectedBox {
@ -102,9 +102,11 @@ export class DeesInputDropdown extends DeesElement {
background: ${cssManager.bdTheme('#fafafa', '#222222')}; background: ${cssManager.bdTheme('#fafafa', '#222222')};
box-shadow: ${cssManager.bdTheme('0px 1px 4px rgba(0,0,0,0.3)', 'none')}; box-shadow: ${cssManager.bdTheme('0px 1px 4px rgba(0,0,0,0.3)', 'none')};
border-radius: 3px; border-radius: 3px;
border-top: ${cssManager.bdTheme('1px solid #CCC', '1px solid #444')}; border-top: ${cssManager.bdTheme('1px solid #CCC', '1px solid #ffffff10')};
border-bottom: ${cssManager.bdTheme('1px solid #CCC', '1px solid #333')}; border-bottom: ${cssManager.bdTheme('1px solid #CCC', '1px solid #222')};
transition: all 0.2s ease; transition: all 0.2s ease;
font-size: 16px;
color: ${cssManager.bdTheme('#222', '#ccc')};
} }
.selectedBox:hover { .selectedBox:hover {
@ -132,6 +134,8 @@ export class DeesInputDropdown extends DeesElement {
padding: 4px 8px; padding: 4px 8px;
position: absolute; position: absolute;
user-select: none; user-select: none;
margin: 3px 0px 0px 0px;
border-top: ${cssManager.bdTheme('1px solid #CCC', '1px solid #ffffff10')};
} }
.selectionBox.top { .selectionBox.top {
transform: translate(0px, 4px); transform: translate(0px, 4px);

View File

@ -61,7 +61,7 @@ export class DeesInputMultitoggle extends DeesElement {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: nowrap; flex-wrap: nowrap;
background: #333; background: ${cssManager.bdTheme('#fff', '#222')};
width: min-content; width: min-content;
border-radius: 20px; border-radius: 20px;
height: 32px; height: 32px;

View File

@ -1,3 +1,5 @@
import * as colors from './00colors.js';
import { import {
customElement, customElement,
DeesElement, DeesElement,
@ -31,6 +33,11 @@ export class DeesInputText extends DeesElement {
}) })
public label: string; public label: string;
@property({
type: String,
})
public description: string;
@property({ @property({
type: String, type: String,
reflect: true, reflect: true,
@ -98,11 +105,6 @@ export class DeesInputText extends DeesElement {
color: ${cssManager.bdTheme('#333', '#ccc')}; color: ${cssManager.bdTheme('#333', '#ccc')};
} }
.label {
font-size: 14px;
margin-bottom: 8px;
}
input { input {
margin-top: 0px; margin-top: 0px;
background: ${cssManager.bdTheme('#fafafa', '#222')}; background: ${cssManager.bdTheme('#fafafa', '#222')};
@ -132,7 +134,7 @@ export class DeesInputText extends DeesElement {
input:focus { input:focus {
outline: none; outline: none;
border-bottom: 1px solid #e4002b; border-bottom: 1px solid ${cssManager.bdTheme( colors.bright.blueActive, colors.dark.blueActive)};
cursor: text; cursor: text;
} }
@ -192,7 +194,7 @@ export class DeesInputText extends DeesElement {
`} `}
</style> </style>
<div class="maincontainer"> <div class="maincontainer">
${this.label ? html`<div class="label">${this.label}</div>` : html``} <dees-label .label=${this.label} .description=${this.description}></dees-label>
<input <input
type="${this.isPasswordBool && !this.showPasswordBool ? 'password' : 'text'}" type="${this.isPasswordBool && !this.showPasswordBool ? 'password' : 'text'}"
.value=${this.value} .value=${this.value}

View File

@ -0,0 +1,7 @@
import { html, cssManager } from '@design.estate/dees-element';
export const demoFunc = () => {
return html`
<dees-label .label=${'a label'}></dees-label>
`;
}

View File

@ -0,0 +1,70 @@
import * as plugins from './00plugins.js';
import * as colors from './00colors.js';
import {
customElement,
html,
css,
cssManager,
DeesElement,
property,
unsafeCSS,
query,
} from '@design.estate/dees-element';
import { demoFunc } from './dees-label.demo.js';
@customElement('dees-label')
export class DeesLabel extends DeesElement {
public static demo = demoFunc;
// INSTANCE
@property({
type: String,
reflect: true,
})
public label = '';
@property({
type: String,
reflect: true,
})
public description: string;
public static styles = [
cssManager.defaultStyles,
css`
.label {
color: ${cssManager.bdTheme('#333', '#ccc')};
font-size: 14px;
margin-bottom: 8px;
cursor: default;
user-select: none;
}
dees-icon {
display: inline-block;
font-size: 14px;
transform: translateY(1.5px);
}
`,
];
public render() {
return html`
${this.label
? html`
<div class="label">
${this.label}
${this.description
? html`
<dees-icon .iconFA=${'circleInfo'}></dees-icon>
<dees-speechbubble .text=${this.description}></dees-speechbubble>
`
: html``}
</div>
`
: html``}
`;
}
}

View File

@ -0,0 +1,23 @@
import { html, cssManager } from '@design.estate/dees-element';
export const demoFunc = () => {
return html`
<style>
.ref1 {
margin: 20px;
width: 10px;
height: 10px;
background-color: red;
}
</style>
<div class="ref1"></div>
<dees-speechbubble .text=${`
**This is a longer markdown text that can be used the write**
a longer description about whats going on the app
**This is a subheader**
and another text
`}></dees-speechbubble>
`;
};

View File

@ -1,3 +1,7 @@
import * as colors from './00colors.js';
import * as plugins from './00plugins.js';
import { demoFunc } from './dees-speechbubble.demo.js';
import { import {
customElement, customElement,
html, html,
@ -8,9 +12,11 @@ import {
css, css,
type CSSResult, type CSSResult,
unsafeCSS, unsafeCSS,
domtools,
directives,
unsafeHTML,
} from '@design.estate/dees-element'; } from '@design.estate/dees-element';
import { DeesWindowLayer } from './dees-windowlayer.js';
import * as domtools from '@design.estate/dees-domtools';
declare global { declare global {
interface HTMLElementTagNameMap { interface HTMLElementTagNameMap {
@ -20,26 +26,53 @@ declare global {
@customElement('dees-speechbubble') @customElement('dees-speechbubble')
export class DeesSpeechbubble extends DeesElement { export class DeesSpeechbubble extends DeesElement {
public static demo = () => html` <dees-speechbubble></dees-speechbubble> `; public static demo = demoFunc;
@property() // STATIC
public static async createAndShow(refElement: HTMLElement, textArg: string) {
const windowLayer = await DeesWindowLayer.createAndShow({
blur: false,
});
const speechbubble = document.createElement('dees-speechbubble');
speechbubble.windowLayer = windowLayer;
speechbubble.reffedElement = refElement;
speechbubble.text = textArg;
speechbubble.manifested = true;
windowLayer.appendChild(speechbubble);
windowLayer.style.pointerEvents = 'none';
(windowLayer.shadowRoot.querySelector('.windowOverlay') as HTMLElement).style.pointerEvents = 'none';
return speechbubble;
}
// INSTANCE
@property({
type: Object,
})
reffedElement: HTMLElement;
@property({
type: String,
reflect: true,
})
public text: string; public text: string;
@property({ @property({
type: Boolean, type: Boolean,
}) })
public disabled = false; public wave: boolean = false;
@property({ @property({
type: Boolean, type: Boolean,
}) })
public isHidden = false; public manifested = false;
@property({ @property({
type: String, type: String,
}) })
public status: 'normal' | 'pending' | 'success' | 'error' = 'normal'; public status: 'normal' | 'pending' | 'success' | 'error' = 'normal';
public windowLayer: DeesWindowLayer;
constructor() { constructor() {
super(); super();
} }
@ -48,27 +81,22 @@ export class DeesSpeechbubble extends DeesElement {
cssManager.defaultStyles, cssManager.defaultStyles,
css` css`
:host { :host {
position: relative;
display: block;
box-sizing: border-box; box-sizing: border-box;
color: ${cssManager.bdTheme('#333', '#fff')}; color: ${cssManager.bdTheme('#333', '#fff')};
user-select: none; user-select: none;
} }
:host([hidden]) {
display: none;
}
.maincontainer { .maincontainer {
position: relative;
will-change: transform; will-change: transform;
transition: transform 0.2s; transition: transform 0.2s;
transform: translateX(0px); transform: translateX(0px);
position: relative;
transition: all 0.2s; transition: all 0.2s;
margin-left: 0px; margin-left: 0px;
} filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.2));
pointer-events: none;
.maincontainer:hover { opacity: 0;
transform: translateX(3px); transition: all 0.2s;
} }
.arrow { .arrow {
@ -77,17 +105,17 @@ export class DeesSpeechbubble extends DeesElement {
background: ${cssManager.bdTheme('#fff', '#333')}; background: ${cssManager.bdTheme('#fff', '#333')};
height: 15px; height: 15px;
width: 15px; width: 15px;
left: 4px; left: 2px;
top: 5px; top: 12px;
border-radius: 2px; border-radius: 3px;
} }
.speechbubble { .speechbubble {
background: ${cssManager.bdTheme('#fff', '#333')}; background: ${cssManager.bdTheme('#fff', '#333')};
padding: 0px 10px; padding: 0px 16px;
border-radius: 3px; border-radius: 3px;
position: absolute; position: absolute;
line-height: 25px; min-width: 240px;
font-size: 12px; font-size: 12px;
top: 0px; top: 0px;
left: 8px; left: 8px;
@ -132,25 +160,70 @@ export class DeesSpeechbubble extends DeesElement {
public render(): TemplateResult { public render(): TemplateResult {
return html` return html`
<div class="maincontainer" @click=${this.handleClick}> ${this.manifested
<div class="arrow"></div> ? html`
<div class="speechbubble"><span class="wave">👋</span> We build with launch.sh, and you can too.</div> <div class="maincontainer" @click=${this.handleClick}>
</div> <div class="arrow"></div>
<div class="speechbubble">
${this.wave ? html`<span class="wave">👋</span>` : html``}
${directives.resolve(this.getHtml())}
</div>
</div>
`
: html``}
`; `;
} }
public async handleClick() { public async handleClick() {
if (this.disabled) { console.log('speechbubble got clicked.');
return;
}
globalThis.location.href = "https://launch.sh"
} }
public async firstUpdated() { public async firstUpdated() {
if (!this.textContent) { // lets make sure we have a ref
this.textContent = 'Button'; if (!this.reffedElement) {
this.performUpdate(); this.reffedElement = this.previousElementSibling as HTMLElement;
}
if (this.manifested) {
await this.updatePosition();
(this.shadowRoot.querySelector('.maincontainer') as HTMLElement).style.opacity = '1';
} else {
// lets make sure we instrument it
let speechbubble: DeesSpeechbubble;
this.reffedElement.addEventListener('mouseenter', async () => {
speechbubble = await DeesSpeechbubble.createAndShow(this.reffedElement, this.text);
});
this.reffedElement.addEventListener('mouseleave', () => {
speechbubble.destroy();
});
} }
} }
public async updatePosition() {
const refElement = this.reffedElement;
const boundingClientRect = refElement.getBoundingClientRect();
this.style.position = 'fixed';
this.style.top = `${boundingClientRect.top - 13}px`;
this.style.left = `${boundingClientRect.left + refElement.clientWidth + 4}px`;
if (boundingClientRect.right > 250) {
this.style.width = `250px`;
}
}
public async getHtml(): Promise<any> {
if (!this.text) {
return '';
}
const normalized = domtools.plugins.smartstring.normalize.standard(this.text);
const result = await domtools.plugins.smartmarkdown.SmartMarkdown.easyMarkdownToHtml(
normalized
);
return unsafeHTML(result);
}
public async show() {}
public async destroy() {
(this.shadowRoot.querySelector('.maincontainer') as HTMLElement).style.opacity = '0';
this.windowLayer.destroy();
}
} }

View File

@ -218,6 +218,12 @@ export class DeesTable<T> extends DeesElement {
margin-right: 8px; margin-right: 8px;
} }
.searchGrid {
display: grid;
grid-gap: 16px;
grid-template-columns: 1fr 200px;
}
table, table,
.noDataSet { .noDataSet {
margin-top: 16px; margin-top: 16px;
@ -237,7 +243,6 @@ export class DeesTable<T> extends DeesElement {
text-align: left; text-align: left;
} }
tr:hover { tr:hover {
} }
tr:hover td { tr:hover td {
background: ${cssManager.bdTheme('#22222210', '#ffffff10')}; background: ${cssManager.bdTheme('#22222210', '#ffffff10')};
@ -369,7 +374,6 @@ export class DeesTable<T> extends DeesElement {
} }
.footerActions .footerAction:hover dees-icon { .footerActions .footerAction:hover dees-icon {
} }
`, `,
]; ];
@ -410,8 +414,13 @@ export class DeesTable<T> extends DeesElement {
</div> </div>
</div> </div>
<div class="headingSeparation"></div> <div class="headingSeparation"></div>
<div class="searchGrid">
<dees-input-text></dees-input-text> <dees-input-text .label=${'lucene syntax search'}></dees-input-text>
<dees-input-multitoggle
.label=${'search mode'}
.options=${['table', 'data', 'server']}
></dees-input-multitoggle>
</div>
<!-- the actual table --> <!-- the actual table -->
<style></style> <style></style>

View File

@ -18,6 +18,7 @@ export * from './dees-progressbar.js';
export * from './dees-input-quantityselector.js'; export * from './dees-input-quantityselector.js';
export * from './dees-input-radio.js'; export * from './dees-input-radio.js';
export * from './dees-input-text.js'; export * from './dees-input-text.js';
export * from './dees-label.js';
export * from './dees-mobilenavigation.js'; export * from './dees-mobilenavigation.js';
export * from './dees-modal.js'; export * from './dees-modal.js';
export * from './dees-input-multitoggle.js'; export * from './dees-input-multitoggle.js';