Compare commits

...

4 Commits

Author SHA1 Message Date
d713756034 1.0.195 2023-09-13 16:46:01 +02:00
17d224332d fix(core): update 2023-09-13 16:46:00 +02:00
32dd5e769b 1.0.194 2023-09-13 16:25:55 +02:00
12ace00a90 fix(core): update 2023-09-13 16:25:54 +02:00
4 changed files with 24 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@design.estate/dees-catalog",
"version": "1.0.193",
"version": "1.0.195",
"private": false,
"description": "website for lossless.com",
"main": "dist_ts_web/index.js",

View File

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

View File

@ -38,7 +38,9 @@ export class DeesModal extends DeesElement {
modal.heading = optionsArg.heading;
modal.content = optionsArg.content;
modal.menuOptions = optionsArg.menuOptions;
modal.windowLayer = await DeesWindowLayer.createAndShow();
modal.windowLayer = await DeesWindowLayer.createAndShow({
blur: true,
});
modal.windowLayer.addEventListener('click', async () => {
await modal.destroy();
});
@ -73,6 +75,8 @@ export class DeesModal extends DeesElement {
.modalContainer {
display: flex;
position: fixed;
top: 0px;
left: 0px;
width: 100vw;
height: 100vh;
box-sizing: border-box;

View File

@ -1,4 +1,4 @@
import { customElement, DeesElement, type TemplateResult, html, property, type CSSResult, } from '@design.estate/dees-element';
import { customElement, DeesElement, type TemplateResult, html, property, type CSSResult, state, } from '@design.estate/dees-element';
import * as domtools from '@design.estate/dees-domtools';
@ -8,20 +8,33 @@ declare global {
}
}
export interface IOptions_DeesWindowLayer {
blur: boolean;
}
@customElement('dees-windowlayer')
export class DeesWindowLayer extends DeesElement {
// STATIC
public static demo = () => html`<dees-windowlayer></dees-windowlayer>`;
public static async createAndShow() {
public static async createAndShow(optionsArg?: IOptions_DeesWindowLayer) {
const domtoolsInstance = domtools.DomTools.getGlobalDomToolsSync();
const windowLayer = new DeesWindowLayer();
windowLayer.options = {
...windowLayer.options,
...optionsArg,
}
document.body.append(windowLayer);
await domtoolsInstance.convenience.smartdelay.delayFor(0);
windowLayer.show();
return windowLayer;
}
@state()
public options: IOptions_DeesWindowLayer = {
blur: false
};
// INSTANCE
@property({
type: Boolean
@ -49,14 +62,14 @@ export class DeesWindowLayer extends DeesElement {
justify-content: center;
align-items: center;
background: rgba(0, 0, 0, 0.0);
backdrop-filter: brightness(1);
backdrop-filter: brightness(1) ${this.options.blur ? 'blur(0px)' : ''};
pointer-events: none;
z-index: 200;
}
.visible {
background: rgba(0, 0, 0, 0.2);
backdrop-filter: brightness(0.3);
backdrop-filter: brightness(0.9) ${this.options.blur ? 'blur(2px)' : ''};
pointer-events: all;
}
</style>