fix(core): update

This commit is contained in:
2022-03-16 15:00:10 +01:00
parent 9b30853a56
commit b8ced9a991
9 changed files with 25 additions and 41 deletions

View File

@ -28,21 +28,21 @@ export class CssManager {
});
}
public get defaultStyles () {
public get defaultStyles() {
return domtools.elementBasic.staticStyles;
}
public cssForTablet(contentArg: CSSResult) {
return unsafeCSS(domtools.breakpoints.cssForTablet(contentArg));
};
}
public cssForPhablet(contentArg: CSSResult) {
return unsafeCSS(domtools.breakpoints.cssForPhablet(contentArg));
}
public cssForPhone(contentArg: CSSResult) {
return unsafeCSS(domtools.breakpoints.cssForPhone(contentArg));
};
}
public bdTheme(brightValueArg: string, darkValueArg: string): CSSResult {
let returnCssVar: string;
@ -61,7 +61,10 @@ export class CssManager {
this.bdVarTripletStore.push(newTriplet);
this.domtoolsPromise.then(async (domtoolsArg) => {
await domtoolsArg.domReady.promise;
document.body.style.setProperty(newTriplet.cssVarName, this.goBright ? newTriplet.brightValue : newTriplet.darkValue);
document.body.style.setProperty(
newTriplet.cssVarName,
this.goBright ? newTriplet.brightValue : newTriplet.darkValue
);
});
returnCssVar = newTriplet.cssVarName;
}

View File

@ -28,7 +28,7 @@ export class DeesElement extends plugins.lit.LitElement {
const domtools = await this.domtoolsPromise;
this.themeSubscription = domtools.themeManager.themeObservable.subscribe((goBrightArg) => {
this.goBright = goBrightArg;
});
});
this.dispatchEvent(new CustomEvent('deesElementConnected'));
}

View File

@ -2,10 +2,7 @@
import * as isounique from '@pushrocks/isounique';
import * as smartrx from '@pushrocks/smartrx';
export {
isounique,
smartrx
};
export { isounique, smartrx };
// third party scope
import { css, unsafeCSS, LitElement } from 'lit';
@ -19,7 +16,4 @@ const lit = {
import * as domtools from '@designestate/dees-domtools';
export {
lit,
domtools
};
export { lit, domtools };