Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
6dd5277f9e | |||
4cbbf941c0 | |||
61de38cb4d | |||
a3ab19e5db | |||
a7e1a02b52 | |||
9f974a97f5 | |||
d80f94db29 | |||
a32b6b425b |
50
package-lock.json
generated
50
package-lock.json
generated
@ -1,25 +1,25 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-element",
|
"name": "@designestate/dees-element",
|
||||||
"version": "2.0.6",
|
"version": "2.0.10",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@designestate/dees-element",
|
"name": "@designestate/dees-element",
|
||||||
"version": "2.0.6",
|
"version": "2.0.10",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@designestate/dees-domtools": "^2.0.5",
|
"@designestate/dees-domtools": "^2.0.8",
|
||||||
"@pushrocks/isounique": "^1.0.5",
|
"@pushrocks/isounique": "^1.0.5",
|
||||||
"@pushrocks/smartrx": "^2.0.25",
|
"@pushrocks/smartrx": "^2.0.25",
|
||||||
"lit": "^2.2.1"
|
"lit": "^2.2.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.61",
|
"@gitzone/tsbuild": "^2.1.61",
|
||||||
"@gitzone/tsbundle": "^1.0.102",
|
"@gitzone/tsbundle": "^1.0.102",
|
||||||
"@gitzone/tstest": "^1.0.70",
|
"@gitzone/tstest": "^1.0.70",
|
||||||
"@pushrocks/tapbundle": "^5.0.3",
|
"@pushrocks/tapbundle": "^5.0.3",
|
||||||
"@types/node": "^17.0.23",
|
"@types/node": "^17.0.25",
|
||||||
"tslint": "^6.1.3",
|
"tslint": "^6.1.3",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
}
|
}
|
||||||
@ -1819,9 +1819,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@designestate/dees-domtools": {
|
"node_modules/@designestate/dees-domtools": {
|
||||||
"version": "2.0.5",
|
"version": "2.0.8",
|
||||||
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-domtools/-/dees-domtools-2.0.5.tgz",
|
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-domtools/-/dees-domtools-2.0.8.tgz",
|
||||||
"integrity": "sha512-WNFEchoTNXrPuOzWUoM4GTPDaaJPPPYALRUlqKfynFe7/EcJKbthTAx3xoK03/d7FKptKDH02kRu30B44wpu9A==",
|
"integrity": "sha512-FASCGhuZcdTxJ3rQO4SWChHv/6PI6Ye6OamNDEwUq4oHZf4nbOA+zseBMLrN1JAcyeUqNUVGSprf7l8r7FP/Dg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apiglobal/typedrequest": "^2.0.3",
|
"@apiglobal/typedrequest": "^2.0.3",
|
||||||
@ -1835,7 +1835,7 @@
|
|||||||
"@pushrocks/webrequest": "^3.0.3",
|
"@pushrocks/webrequest": "^3.0.3",
|
||||||
"@pushrocks/websetup": "^3.0.16",
|
"@pushrocks/websetup": "^3.0.16",
|
||||||
"@pushrocks/webstore": "^1.0.18",
|
"@pushrocks/webstore": "^1.0.18",
|
||||||
"lit": "^2.2.1",
|
"lit": "^2.2.2",
|
||||||
"sweet-scroll": "^4.0.0"
|
"sweet-scroll": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -4574,9 +4574,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "17.0.23",
|
"version": "17.0.25",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-17.0.23.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-17.0.25.tgz",
|
||||||
"integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==",
|
"integrity": "sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/parse-json": {
|
"node_modules/@types/parse-json": {
|
||||||
@ -7947,9 +7947,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/lit": {
|
"node_modules/lit": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/lit/-/lit-2.2.1.tgz",
|
"resolved": "https://verdaccio.lossless.one/lit/-/lit-2.2.2.tgz",
|
||||||
"integrity": "sha512-dSe++R50JqrvNGXmI9OE13de1z5U/Y3J2dTm/9GC86vedI8ILoR8ZGnxfThFpvQ9m0lR0qRnIR4IiKj/jDCfYw==",
|
"integrity": "sha512-eN3+2QRHn/erxYB88AXiiRgQA6RltE9MhzySCwX+ACOxA/MLWN3VdXvcbZD9PN09zmUwlgzDvW3T84YWj2Sa0A==",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lit/reactive-element": "^1.3.0",
|
"@lit/reactive-element": "^1.3.0",
|
||||||
@ -12632,9 +12632,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@designestate/dees-domtools": {
|
"@designestate/dees-domtools": {
|
||||||
"version": "2.0.5",
|
"version": "2.0.8",
|
||||||
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-domtools/-/dees-domtools-2.0.5.tgz",
|
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-domtools/-/dees-domtools-2.0.8.tgz",
|
||||||
"integrity": "sha512-WNFEchoTNXrPuOzWUoM4GTPDaaJPPPYALRUlqKfynFe7/EcJKbthTAx3xoK03/d7FKptKDH02kRu30B44wpu9A==",
|
"integrity": "sha512-FASCGhuZcdTxJ3rQO4SWChHv/6PI6Ye6OamNDEwUq4oHZf4nbOA+zseBMLrN1JAcyeUqNUVGSprf7l8r7FP/Dg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@apiglobal/typedrequest": "^2.0.3",
|
"@apiglobal/typedrequest": "^2.0.3",
|
||||||
"@designestate/dees-comms": "^1.0.22",
|
"@designestate/dees-comms": "^1.0.22",
|
||||||
@ -12647,7 +12647,7 @@
|
|||||||
"@pushrocks/webrequest": "^3.0.3",
|
"@pushrocks/webrequest": "^3.0.3",
|
||||||
"@pushrocks/websetup": "^3.0.16",
|
"@pushrocks/websetup": "^3.0.16",
|
||||||
"@pushrocks/webstore": "^1.0.18",
|
"@pushrocks/webstore": "^1.0.18",
|
||||||
"lit": "^2.2.1",
|
"lit": "^2.2.2",
|
||||||
"sweet-scroll": "^4.0.0"
|
"sweet-scroll": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -14696,9 +14696,9 @@
|
|||||||
"integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ=="
|
"integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ=="
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "17.0.23",
|
"version": "17.0.25",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-17.0.23.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-17.0.25.tgz",
|
||||||
"integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw=="
|
"integrity": "sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w=="
|
||||||
},
|
},
|
||||||
"@types/parse-json": {
|
"@types/parse-json": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
@ -16943,9 +16943,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"lit": {
|
"lit": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/lit/-/lit-2.2.1.tgz",
|
"resolved": "https://verdaccio.lossless.one/lit/-/lit-2.2.2.tgz",
|
||||||
"integrity": "sha512-dSe++R50JqrvNGXmI9OE13de1z5U/Y3J2dTm/9GC86vedI8ILoR8ZGnxfThFpvQ9m0lR0qRnIR4IiKj/jDCfYw==",
|
"integrity": "sha512-eN3+2QRHn/erxYB88AXiiRgQA6RltE9MhzySCwX+ACOxA/MLWN3VdXvcbZD9PN09zmUwlgzDvW3T84YWj2Sa0A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@lit/reactive-element": "^1.3.0",
|
"@lit/reactive-element": "^1.3.0",
|
||||||
"lit-element": "^3.2.0",
|
"lit-element": "^3.2.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-element",
|
"name": "@designestate/dees-element",
|
||||||
"version": "2.0.6",
|
"version": "2.0.10",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "a custom element class extending lit element class",
|
"description": "a custom element class extending lit element class",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
@ -17,15 +17,15 @@
|
|||||||
"@gitzone/tsbundle": "^1.0.102",
|
"@gitzone/tsbundle": "^1.0.102",
|
||||||
"@gitzone/tstest": "^1.0.70",
|
"@gitzone/tstest": "^1.0.70",
|
||||||
"@pushrocks/tapbundle": "^5.0.3",
|
"@pushrocks/tapbundle": "^5.0.3",
|
||||||
"@types/node": "^17.0.23",
|
"@types/node": "^17.0.25",
|
||||||
"tslint": "^6.1.3",
|
"tslint": "^6.1.3",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@designestate/dees-domtools": "^2.0.5",
|
"@designestate/dees-domtools": "^2.0.8",
|
||||||
"@pushrocks/isounique": "^1.0.5",
|
"@pushrocks/isounique": "^1.0.5",
|
||||||
"@pushrocks/smartrx": "^2.0.25",
|
"@pushrocks/smartrx": "^2.0.25",
|
||||||
"lit": "^2.2.1"
|
"lit": "^2.2.2"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 1 chrome versions"
|
"last 1 chrome versions"
|
||||||
|
@ -32,6 +32,14 @@ export class CssManager {
|
|||||||
return domtools.elementBasic.staticStyles;
|
return domtools.elementBasic.staticStyles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public cssForDesktop(contentArg: CSSResult) {
|
||||||
|
return unsafeCSS(domtools.breakpoints.cssForDesktop(contentArg));
|
||||||
|
}
|
||||||
|
|
||||||
|
public cssForNotebook(contentArg: CSSResult) {
|
||||||
|
return unsafeCSS(domtools.breakpoints.cssForNotebook(contentArg));
|
||||||
|
}
|
||||||
|
|
||||||
public cssForTablet(contentArg: CSSResult) {
|
public cssForTablet(contentArg: CSSResult) {
|
||||||
return unsafeCSS(domtools.breakpoints.cssForTablet(contentArg));
|
return unsafeCSS(domtools.breakpoints.cssForTablet(contentArg));
|
||||||
}
|
}
|
||||||
@ -46,6 +54,16 @@ export class CssManager {
|
|||||||
|
|
||||||
public bdTheme(brightValueArg: string, darkValueArg: string): CSSResult {
|
public bdTheme(brightValueArg: string, darkValueArg: string): CSSResult {
|
||||||
let returnCssVar: string;
|
let returnCssVar: string;
|
||||||
|
|
||||||
|
// lets determine the default value for quick page rendering.
|
||||||
|
let defaultValue: string;
|
||||||
|
if (domtools.DomTools.getGlobalDomToolsSync()) {
|
||||||
|
defaultValue = domtools.DomTools.getGlobalDomToolsSync().themeManager.goBrightBoolean ? brightValueArg : darkValueArg;
|
||||||
|
} else {
|
||||||
|
defaultValue = darkValueArg
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const existingTriplet = this.bdVarTripletStore.find(
|
const existingTriplet = this.bdVarTripletStore.find(
|
||||||
(tripletArg) =>
|
(tripletArg) =>
|
||||||
tripletArg.darkValue === darkValueArg && tripletArg.brightValue === brightValueArg
|
tripletArg.darkValue === darkValueArg && tripletArg.brightValue === brightValueArg
|
||||||
@ -59,16 +77,17 @@ export class CssManager {
|
|||||||
darkValue: darkValueArg,
|
darkValue: darkValueArg,
|
||||||
};
|
};
|
||||||
this.bdVarTripletStore.push(newTriplet);
|
this.bdVarTripletStore.push(newTriplet);
|
||||||
|
|
||||||
this.domtoolsPromise.then(async (domtoolsArg) => {
|
this.domtoolsPromise.then(async (domtoolsArg) => {
|
||||||
await domtoolsArg.domReady.promise;
|
await domtoolsArg.domReady.promise;
|
||||||
document.body.style.setProperty(
|
document.body.style.setProperty(
|
||||||
newTriplet.cssVarName,
|
newTriplet.cssVarName,
|
||||||
this.goBright ? newTriplet.brightValue : newTriplet.darkValue
|
defaultValue
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
returnCssVar = newTriplet.cssVarName;
|
returnCssVar = newTriplet.cssVarName;
|
||||||
}
|
}
|
||||||
return plugins.lit.unsafeCSS(`var(${returnCssVar}, ${darkValueArg})`);
|
return plugins.lit.unsafeCSS(`var(${returnCssVar}, ${defaultValue})`);
|
||||||
}
|
}
|
||||||
|
|
||||||
public cssGridColumns = (amountOfColumnsArg: number, gapSizeArg: number): CSSResult => {
|
public cssGridColumns = (amountOfColumnsArg: number, gapSizeArg: number): CSSResult => {
|
||||||
|
Reference in New Issue
Block a user