Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
9ca286697c | |||
07dcfbe531 | |||
ac919e2cce | |||
30e1822b5b | |||
b6c67a55e5 | |||
f20977e936 | |||
8ad5906e06 | |||
4008de283c | |||
1177ec6158 | |||
b8ced9a991 | |||
9b30853a56 | |||
acc1d7eea7 |
@ -12,6 +12,9 @@ stages:
|
|||||||
- release
|
- release
|
||||||
- metadata
|
- metadata
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- npm install -g @shipzone/npmci
|
||||||
|
|
||||||
# ====================
|
# ====================
|
||||||
# security stage
|
# security stage
|
||||||
# ====================
|
# ====================
|
||||||
@ -36,6 +39,7 @@ auditProductionDependencies:
|
|||||||
- npmci command npm audit --audit-level=high --only=prod --production
|
- npmci command npm audit --audit-level=high --only=prod --production
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
auditDevDependencies:
|
auditDevDependencies:
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
24
.vscode/launch.json
vendored
24
.vscode/launch.json
vendored
@ -2,28 +2,10 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "current file",
|
"command": "npm test",
|
||||||
"type": "node",
|
"name": "Run npm test",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"args": [
|
"type": "node-terminal"
|
||||||
"${relativeFile}"
|
|
||||||
],
|
|
||||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
|
||||||
"cwd": "${workspaceRoot}",
|
|
||||||
"protocol": "inspector",
|
|
||||||
"internalConsoleOptions": "openOnSessionStart"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "test.ts",
|
|
||||||
"type": "node",
|
|
||||||
"request": "launch",
|
|
||||||
"args": [
|
|
||||||
"test/test.ts"
|
|
||||||
],
|
|
||||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
|
||||||
"cwd": "${workspaceRoot}",
|
|
||||||
"protocol": "inspector",
|
|
||||||
"internalConsoleOptions": "openOnSessionStart"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -22,5 +22,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"typescript.tsdk": "node_modules/typescript/lib"
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"githost": "gitlab.com",
|
"githost": "gitlab.com",
|
||||||
"gitscope": "designestate",
|
"gitscope": "designestate",
|
||||||
"gitrepo": "dees-element",
|
"gitrepo": "dees-element",
|
||||||
"shortDescription": "a custom element class extending lit element class",
|
"description": "a custom element class extending lit element class",
|
||||||
"npmPackagename": "@designestate/dees-element",
|
"npmPackagename": "@designestate/dees-element",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"projectDomain": "design.estate"
|
"projectDomain": "design.estate"
|
||||||
|
2676
package-lock.json
generated
2676
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-element",
|
"name": "@designestate/dees-element",
|
||||||
"version": "2.0.0",
|
"version": "2.0.6",
|
||||||
"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",
|
||||||
@ -13,16 +13,16 @@
|
|||||||
"build": "(tsbuild --web --allowimplicitany --skiplibcheck && tsbundle npm)"
|
"build": "(tsbuild --web --allowimplicitany --skiplibcheck && tsbundle npm)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.56",
|
"@gitzone/tsbuild": "^2.1.61",
|
||||||
"@gitzone/tsbundle": "^1.0.98",
|
"@gitzone/tsbundle": "^1.0.102",
|
||||||
"@gitzone/tstest": "^1.0.68",
|
"@gitzone/tstest": "^1.0.70",
|
||||||
"@pushrocks/tapbundle": "^5.0.2",
|
"@pushrocks/tapbundle": "^5.0.3",
|
||||||
"@types/node": "^17.0.21",
|
"@types/node": "^17.0.23",
|
||||||
"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.0",
|
"@designestate/dees-domtools": "^2.0.5",
|
||||||
"@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.1"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { expect, tap } from '@pushrocks/tapbundle';
|
import { expect, tap } from '@pushrocks/tapbundle';
|
||||||
import * as deesElement from '../ts/index';
|
import * as deesElement from '../ts/index.js';
|
||||||
|
|
||||||
tap.test('should create a static element', async () => {
|
tap.test('should create a static element', async () => {
|
||||||
@deesElement.customElement('my-button')
|
@deesElement.customElement('my-button')
|
||||||
@ -11,12 +11,12 @@ tap.test('should create a static element', async () => {
|
|||||||
.buttonClass {
|
.buttonClass {
|
||||||
background: ${deesElement.cssManager.bdTheme('blue', 'black')};
|
background: ${deesElement.cssManager.bdTheme('blue', 'black')};
|
||||||
}
|
}
|
||||||
`
|
`,
|
||||||
];
|
];
|
||||||
|
|
||||||
// INSTANCE
|
// INSTANCE
|
||||||
render() {
|
render() {
|
||||||
return deesElement.html`<div class="buttonClass">My Button</div>`
|
return deesElement.html`<div class="buttonClass">My Button</div>`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -28,13 +28,13 @@ export class CssManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public get defaultStyles () {
|
public get defaultStyles() {
|
||||||
return domtools.elementBasic.staticStyles;
|
return domtools.elementBasic.staticStyles;
|
||||||
}
|
}
|
||||||
|
|
||||||
public cssForTablet(contentArg: CSSResult) {
|
public cssForTablet(contentArg: CSSResult) {
|
||||||
return unsafeCSS(domtools.breakpoints.cssForTablet(contentArg));
|
return unsafeCSS(domtools.breakpoints.cssForTablet(contentArg));
|
||||||
};
|
}
|
||||||
|
|
||||||
public cssForPhablet(contentArg: CSSResult) {
|
public cssForPhablet(contentArg: CSSResult) {
|
||||||
return unsafeCSS(domtools.breakpoints.cssForPhablet(contentArg));
|
return unsafeCSS(domtools.breakpoints.cssForPhablet(contentArg));
|
||||||
@ -42,7 +42,7 @@ export class CssManager {
|
|||||||
|
|
||||||
public cssForPhone(contentArg: CSSResult) {
|
public cssForPhone(contentArg: CSSResult) {
|
||||||
return unsafeCSS(domtools.breakpoints.cssForPhone(contentArg));
|
return unsafeCSS(domtools.breakpoints.cssForPhone(contentArg));
|
||||||
};
|
}
|
||||||
|
|
||||||
public bdTheme(brightValueArg: string, darkValueArg: string): CSSResult {
|
public bdTheme(brightValueArg: string, darkValueArg: string): CSSResult {
|
||||||
let returnCssVar: string;
|
let returnCssVar: string;
|
||||||
@ -61,11 +61,14 @@ export class CssManager {
|
|||||||
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(newTriplet.cssVarName, this.goBright ? newTriplet.brightValue : newTriplet.darkValue);
|
document.body.style.setProperty(
|
||||||
|
newTriplet.cssVarName,
|
||||||
|
this.goBright ? newTriplet.brightValue : newTriplet.darkValue
|
||||||
|
);
|
||||||
});
|
});
|
||||||
returnCssVar = newTriplet.cssVarName;
|
returnCssVar = newTriplet.cssVarName;
|
||||||
}
|
}
|
||||||
return plugins.lit.unsafeCSS(`var(${returnCssVar})`);
|
return plugins.lit.unsafeCSS(`var(${returnCssVar}, ${darkValueArg})`);
|
||||||
}
|
}
|
||||||
|
|
||||||
public cssGridColumns = (amountOfColumnsArg: number, gapSizeArg: number): CSSResult => {
|
public cssGridColumns = (amountOfColumnsArg: number, gapSizeArg: number): CSSResult => {
|
||||||
|
@ -2,10 +2,7 @@
|
|||||||
import * as isounique from '@pushrocks/isounique';
|
import * as isounique from '@pushrocks/isounique';
|
||||||
import * as smartrx from '@pushrocks/smartrx';
|
import * as smartrx from '@pushrocks/smartrx';
|
||||||
|
|
||||||
export {
|
export { isounique, smartrx };
|
||||||
isounique,
|
|
||||||
smartrx
|
|
||||||
};
|
|
||||||
|
|
||||||
// third party scope
|
// third party scope
|
||||||
import { css, unsafeCSS, LitElement } from 'lit';
|
import { css, unsafeCSS, LitElement } from 'lit';
|
||||||
@ -19,7 +16,4 @@ const lit = {
|
|||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@designestate/dees-domtools';
|
||||||
|
|
||||||
export {
|
export { lit, domtools };
|
||||||
lit,
|
|
||||||
domtools
|
|
||||||
};
|
|
||||||
|
@ -5,9 +5,7 @@ export { html, TemplateResult, css, unsafeCSS, render } from 'lit';
|
|||||||
|
|
||||||
export { customElement } from 'lit/decorators/custom-element.js';
|
export { customElement } from 'lit/decorators/custom-element.js';
|
||||||
|
|
||||||
export { property } from 'lit/decorators/property.js';
|
export { property, state, query, queryAll, queryAsync } from 'lit/decorators.js';
|
||||||
|
|
||||||
export { state } from 'lit/decorators/state.js';
|
|
||||||
|
|
||||||
// domtools exports
|
// domtools exports
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@designestate/dees-domtools';
|
||||||
|
Reference in New Issue
Block a user