Compare commits
68 Commits
Author | SHA1 | Date | |
---|---|---|---|
d08a92814e | |||
a6f277250e | |||
09cb82d587 | |||
316e2a0b27 | |||
e0d2679801 | |||
107800a057 | |||
4ee8512ee4 | |||
f75a3714ae | |||
d6047f2e78 | |||
03769c8412 | |||
1a782eb4ee | |||
a27adf25cb | |||
96e237b9af | |||
710e06b2f1 | |||
a3bc25c4ac | |||
ee5b712a37 | |||
879ae5ad91 | |||
2bbda416b2 | |||
de88957857 | |||
aa0c63d569 | |||
d843f27fd3 | |||
a26755b7d3 | |||
345a562a21 | |||
3fae99554d | |||
ed30ed3f8f | |||
beef47959b | |||
aec2cf18fd | |||
0f45633666 | |||
8588888ce7 | |||
2a62a635cd | |||
0eb2557956 | |||
9960bf7018 | |||
f26f0d0450 | |||
53fadfcbd5 | |||
497d3a3ac5 | |||
37524765ae | |||
ab0219d3e4 | |||
7cefd9cba5 | |||
4cf5ca2d7f | |||
a9791220fb | |||
4aed14c7a2 | |||
49d1cba3fd | |||
9bacca3070 | |||
42e7ae6d6b | |||
a8b244520c | |||
9879a2cb6a | |||
e2a54c6f18 | |||
dfd13e641a | |||
2284159b72 | |||
1de86c6bfa | |||
62087a686a | |||
572deb990e | |||
719c63a092 | |||
9d9700214f | |||
bc82e110ef | |||
fe15ebe82d | |||
1b8577d300 | |||
ef4cfb81d8 | |||
abea5942b7 | |||
a6274e9a2d | |||
8b3752f586 | |||
c8e1d24224 | |||
dbd7748ac0 | |||
68984d5702 | |||
5237439f88 | |||
c3df73616f | |||
a03b095d14 | |||
9a18658e09 |
66
.gitea/workflows/default_nottags.yaml
Normal file
66
.gitea/workflows/default_nottags.yaml
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
name: Default (not tags)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags-ignore:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||||
|
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||||
|
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||||
|
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||||
|
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
security:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install pnpm and npmci
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
|
||||||
|
- name: Run npm prepare
|
||||||
|
run: npmci npm prepare
|
||||||
|
|
||||||
|
- name: Audit production dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --prod
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Audit development dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --dev
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
test:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs: security
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Test stable
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm test
|
||||||
|
|
||||||
|
- name: Test build
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm build
|
124
.gitea/workflows/default_tags.yaml
Normal file
124
.gitea/workflows/default_tags.yaml
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
name: Default (tags)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||||
|
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||||
|
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||||
|
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||||
|
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
security:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Audit production dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --prod
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Audit development dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --dev
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
test:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs: security
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Test stable
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm test
|
||||||
|
|
||||||
|
- name: Test build
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm build
|
||||||
|
|
||||||
|
release:
|
||||||
|
needs: test
|
||||||
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm publish
|
||||||
|
|
||||||
|
metadata:
|
||||||
|
needs: test
|
||||||
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Code quality
|
||||||
|
run: |
|
||||||
|
npmci command npm install -g typescript
|
||||||
|
npmci npm install
|
||||||
|
|
||||||
|
- name: Trigger
|
||||||
|
run: npmci trigger
|
||||||
|
|
||||||
|
- name: Build docs and upload artifacts
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
pnpm install -g @gitzone/tsdoc
|
||||||
|
npmci command tsdoc
|
||||||
|
continue-on-error: true
|
@ -10,11 +10,9 @@
|
|||||||
/>
|
/>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
|
||||||
<link rel="preconnect" href="https://rsms.me/">
|
<!--Lets load standard fonts-->
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://assetbroker.lossless.one/" crossorigin>
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="stylesheet" href="https://assetbroker.lossless.one/fonts/fonts.css">
|
||||||
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
"projectType": "wcc",
|
"projectType": "wcc",
|
||||||
"module": {
|
"module": {
|
||||||
"githost": "gitlab.com",
|
"githost": "gitlab.com",
|
||||||
"gitscope": "designestate",
|
"gitscope": "design.estate",
|
||||||
"gitrepo": "dees-catalog",
|
"gitrepo": "dees-catalog",
|
||||||
"description": "a webcomponents catalog for handling daily stuff on the web",
|
"description": "a webcomponents catalog for handling daily stuff on the web",
|
||||||
"npmPackagename": "@designestate/dees-catalog",
|
"npmPackagename": "@design.estate/dees-catalog",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"projectDomain": "design.estate"
|
"projectDomain": "design.estate"
|
||||||
}
|
}
|
||||||
|
38
package.json
38
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-catalog",
|
"name": "@design.estate/dees-catalog",
|
||||||
"version": "1.0.139",
|
"version": "1.0.173",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "website for lossless.com",
|
"description": "website for lossless.com",
|
||||||
"main": "dist_ts_web/index.js",
|
"main": "dist_ts_web/index.js",
|
||||||
@ -15,25 +15,27 @@
|
|||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@designestate/dees-domtools": "^2.0.28",
|
"@design.estate/dees-domtools": "^2.0.37",
|
||||||
"@designestate/dees-element": "^2.0.18",
|
"@design.estate/dees-element": "^2.0.25",
|
||||||
"@designestate/dees-wcctools": "^1.0.76",
|
"@design.estate/dees-wcctools": "^1.0.78",
|
||||||
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
"@fortawesome/fontawesome-svg-core": "^6.4.2",
|
||||||
"@fortawesome/free-brands-svg-icons": "^6.2.1",
|
"@fortawesome/free-brands-svg-icons": "^6.4.2",
|
||||||
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
"@fortawesome/free-regular-svg-icons": "^6.4.2",
|
||||||
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
"@fortawesome/free-solid-svg-icons": "^6.4.2",
|
||||||
"@pushrocks/smartpromise": "^3.1.7",
|
"@push.rocks/smartpromise": "^4.0.0",
|
||||||
"@tsclass/tsclass": "^4.0.29",
|
"@push.rocks/smartstring": "^4.0.5",
|
||||||
|
"@tsclass/tsclass": "^4.0.42",
|
||||||
|
"highlight.js": "11.8.0",
|
||||||
"pdfjs-dist": "^2.15.349"
|
"pdfjs-dist": "^2.15.349"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.65",
|
"@gitzone/tsbuild": "^2.1.66",
|
||||||
"@gitzone/tsbundle": "^2.0.7",
|
"@gitzone/tsbundle": "^2.0.8",
|
||||||
"@gitzone/tstest": "^1.0.74",
|
"@gitzone/tstest": "^1.0.77",
|
||||||
"@gitzone/tswatch": "^2.0.5",
|
"@gitzone/tswatch": "^2.0.7",
|
||||||
"@pushrocks/projectinfo": "^5.0.1",
|
"@push.rocks/projectinfo": "^5.0.1",
|
||||||
"@pushrocks/tapbundle": "^5.0.4",
|
"@push.rocks/tapbundle": "^5.0.12",
|
||||||
"@types/node": "^18.11.18"
|
"@types/node": "^20.4.8"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/**/*",
|
"ts/**/*",
|
||||||
|
3562
pnpm-lock.yaml
generated
3562
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
24
readme.md
24
readme.md
@ -1,26 +1,26 @@
|
|||||||
# @designestate/dees-catalog
|
# @design.estate/dees-catalog
|
||||||
a webcomponents catalog for handling daily stuff on the web
|
a webcomponents catalog for handling daily stuff on the web
|
||||||
|
|
||||||
## Availabililty and Links
|
## Availabililty and Links
|
||||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@designestate/dees-catalog)
|
* [npmjs.org (npm package)](https://www.npmjs.com/package/@design.estate/dees-catalog)
|
||||||
* [gitlab.com (source)](https://gitlab.com/designestate/dees-catalog)
|
* [gitlab.com (source)](https://gitlab.com/design.estate/dees-catalog)
|
||||||
* [github.com (source mirror)](https://github.com/designestate/dees-catalog)
|
* [github.com (source mirror)](https://github.com/design.estate/dees-catalog)
|
||||||
* [docs (typedoc)](https://designestate.gitlab.io/dees-catalog/)
|
* [docs (typedoc)](https://design.estate.gitlab.io/dees-catalog/)
|
||||||
|
|
||||||
## Status for master
|
## Status for master
|
||||||
|
|
||||||
Status Category | Status Badge
|
Status Category | Status Badge
|
||||||
-- | --
|
-- | --
|
||||||
GitLab Pipelines | [](https://lossless.cloud)
|
GitLab Pipelines | [](https://lossless.cloud)
|
||||||
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||||
npm | [](https://lossless.cloud)
|
npm | [](https://lossless.cloud)
|
||||||
Snyk | [](https://lossless.cloud)
|
Snyk | [](https://lossless.cloud)
|
||||||
TypeScript Support | [](https://lossless.cloud)
|
TypeScript Support | [](https://lossless.cloud)
|
||||||
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
Code Style | [](https://lossless.cloud)
|
Code Style | [](https://lossless.cloud)
|
||||||
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||||
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||||
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { tap, expect, webhelpers } from '@pushrocks/tapbundle';
|
import { tap, expect, webhelpers } from '@push.rocks/tapbundle';
|
||||||
|
|
||||||
import * as deesCatalog from '../ts_web';
|
import * as deesCatalog from '../ts_web';
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* autocreated commitinfo by @pushrocks/commitinfo
|
* autocreated commitinfo by @pushrocks/commitinfo
|
||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@designestate/dees-catalog',
|
name: '@design.estate/dees-catalog',
|
||||||
version: '1.0.139',
|
version: '1.0.173',
|
||||||
description: 'website for lossless.com'
|
description: 'website for lossless.com'
|
||||||
}
|
}
|
||||||
|
@ -3,11 +3,12 @@ import {
|
|||||||
customElement,
|
customElement,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
html,
|
html,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
css,
|
css,
|
||||||
|
type CSSResult,
|
||||||
state,
|
state,
|
||||||
property
|
property
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
@customElement('dees-button-exit')
|
@customElement('dees-button-exit')
|
||||||
export class DeesButtonExit extends DeesElement {
|
export class DeesButtonExit extends DeesElement {
|
||||||
|
@ -3,13 +3,14 @@ import {
|
|||||||
html,
|
html,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
|
type CSSResult,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -31,7 +32,12 @@ export class DeesButton extends DeesElement {
|
|||||||
<p><dees-button disabled status="error">Error Status</dees-button></p>
|
<p><dees-button disabled status="error">Error Status</dees-button></p>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@property()
|
@property({
|
||||||
|
reflect: true,
|
||||||
|
hasChanged() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
})
|
||||||
public text: string;
|
public text: string;
|
||||||
|
|
||||||
@property()
|
@property()
|
||||||
@ -81,8 +87,8 @@ export class DeesButton extends DeesElement {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: ${cssManager.bdTheme('#eee', '#333')};
|
background: ${cssManager.bdTheme('#fff', '#333')};
|
||||||
box-shadow: ${cssManager.bdTheme('0px 0px 5px rgba(0,0,0,0.1)', 'none')};
|
box-shadow: ${cssManager.bdTheme('0px 1px 3px rgba(0,0,0,0.3)', 'none')};
|
||||||
border: 1px solid ${cssManager.bdTheme('#eee', '#333')};
|
border: 1px solid ${cssManager.bdTheme('#eee', '#333')};
|
||||||
border-top: ${cssManager.bdTheme('1px solid #eee', '1px solid #444')};
|
border-top: ${cssManager.bdTheme('1px solid #eee', '1px solid #444')};
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
@ -3,13 +3,14 @@ import {
|
|||||||
html,
|
html,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
|
type CSSResult,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
|
@ -4,13 +4,14 @@ import {
|
|||||||
html,
|
html,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
|
type CSSResult,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
import { DeesWindowLayer } from './dees-windowlayer.js';
|
import { DeesWindowLayer } from './dees-windowlayer.js';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
@ -29,8 +30,29 @@ export class DeesContextmenu extends DeesElement {
|
|||||||
margin: 20px;
|
margin: 20px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<dees-button @click=${() => {
|
<dees-button @contextmenu=${(eventArg) => {
|
||||||
DeesContextmenu.openContextMenuWithOptions();
|
DeesContextmenu.openContextMenuWithOptions(eventArg, [
|
||||||
|
{
|
||||||
|
name: 'copy',
|
||||||
|
iconName: 'copySolid',
|
||||||
|
action: async () => {
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
iconName: 'penToSquare',
|
||||||
|
action: async () => {
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
},{
|
||||||
|
name: 'paste',
|
||||||
|
iconName: 'pasteSolid',
|
||||||
|
action: async () => {
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]);
|
||||||
}}>Hello</dees-button>
|
}}>Hello</dees-button>
|
||||||
<dees-contextmenu class="withMargin"></dees-contextmenu>
|
<dees-contextmenu class="withMargin"></dees-contextmenu>
|
||||||
<dees-contextmenu
|
<dees-contextmenu
|
||||||
@ -55,13 +77,20 @@ export class DeesContextmenu extends DeesElement {
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
// STATIC
|
// STATIC
|
||||||
public static openContextMenuWithOptions(eventArg, contextOptions: plugins.tsclass.website.IMenuItem[]) {
|
public static async openContextMenuWithOptions(eventArg: MouseEvent, menuItemsArg: plugins.tsclass.website.IMenuItem[]) {
|
||||||
|
eventArg.preventDefault();
|
||||||
const contextMenu = new DeesContextmenu();
|
const contextMenu = new DeesContextmenu();
|
||||||
contextMenu.style.position = 'absolute';
|
contextMenu.style.position = 'absolute';
|
||||||
contextMenu;
|
contextMenu.style.top = `${eventArg.clientY.toString()}px`;
|
||||||
const windowLayer = new DeesWindowLayer();
|
contextMenu.style.left = `${eventArg.clientX.toString()}px`;
|
||||||
windowLayer.append(contextMenu);
|
contextMenu.style.opacity = '0';
|
||||||
document.body.append(windowLayer);
|
contextMenu.style.transform = 'scale(0.95,0.95)';
|
||||||
|
contextMenu.style.transformOrigin = 'top left';
|
||||||
|
contextMenu.menuItems = menuItemsArg;
|
||||||
|
document.body.append(contextMenu);
|
||||||
|
await domtools.plugins.smartdelay.delayFor(0);
|
||||||
|
contextMenu.style.opacity = '1';
|
||||||
|
contextMenu.style.transform = 'scale(1,1)';
|
||||||
}
|
}
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
@ -78,6 +107,7 @@ export class DeesContextmenu extends DeesElement {
|
|||||||
css`
|
css`
|
||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
|
transition: all 0.1s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainbox {
|
.mainbox {
|
||||||
@ -120,7 +150,7 @@ export class DeesContextmenu extends DeesElement {
|
|||||||
<div class="mainbox">
|
<div class="mainbox">
|
||||||
${this.menuItems.map((menuItemArg) => {
|
${this.menuItems.map((menuItemArg) => {
|
||||||
return html`
|
return html`
|
||||||
<div class="menuitem">
|
<div class="menuitem" @click=${() => this.handleClick(menuItemArg)}>
|
||||||
<dees-icon .iconFA=${(menuItemArg.iconName as any) || 'minus'}></dees-icon
|
<dees-icon .iconFA=${(menuItemArg.iconName as any) || 'minus'}></dees-icon
|
||||||
>${menuItemArg.name}
|
>${menuItemArg.name}
|
||||||
</div>
|
</div>
|
||||||
@ -136,4 +166,16 @@ export class DeesContextmenu extends DeesElement {
|
|||||||
mainbox.textContent = 'no menu items present';
|
mainbox.textContent = 'no menu items present';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async handleClick(menuItem: plugins.tsclass.website.IMenuItem) {
|
||||||
|
menuItem.action();
|
||||||
|
await this.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async destroy() {
|
||||||
|
this.style.opacity = '0';
|
||||||
|
this.style.transform = 'scale(0.95,0,95)';
|
||||||
|
await domtools.plugins.smartdelay.delayFor(100);
|
||||||
|
this.parentElement.removeChild(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
178
ts_web/elements/dees-dataview-codebox.ts
Normal file
178
ts_web/elements/dees-dataview-codebox.ts
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
import {
|
||||||
|
DeesElement,
|
||||||
|
html,
|
||||||
|
customElement,
|
||||||
|
type TemplateResult,
|
||||||
|
property,
|
||||||
|
state,
|
||||||
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
|
import hlight from 'highlight.js';
|
||||||
|
|
||||||
|
import * as smartstring from '@push.rocks/smartstring';
|
||||||
|
|
||||||
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface HTMLElementTagNameMap {
|
||||||
|
'dees-dataview-codebox': DeesDataviewCodebox;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@customElement('dees-dataview-codebox')
|
||||||
|
export class DeesDataviewCodebox extends DeesElement {
|
||||||
|
public static demo = () => html`<dees-dataview-codebox proglang="typescript">
|
||||||
|
import * as text from './hello'; const hiThere = 'nice'; const myFunction = async () => {
|
||||||
|
console.log('nice one'); }
|
||||||
|
</dees-dataview-codebox>`;
|
||||||
|
|
||||||
|
@property()
|
||||||
|
public progLang: string = 'typescript';
|
||||||
|
|
||||||
|
@property({
|
||||||
|
type: String,
|
||||||
|
reflect: true,
|
||||||
|
})
|
||||||
|
public codeToDisplay: string = '';
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
render(): TemplateResult {
|
||||||
|
return html`
|
||||||
|
${domtools.elementBasic.styles}
|
||||||
|
<style>
|
||||||
|
:host {
|
||||||
|
position: relative;
|
||||||
|
display: block;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.mainbox {
|
||||||
|
position: relative;
|
||||||
|
color: ${this.goBright ? '#333333' : '#ffffff'};
|
||||||
|
}
|
||||||
|
|
||||||
|
.languageLabel {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 12px;
|
||||||
|
z-index: 10;
|
||||||
|
background: #6596ff;
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
right: 32px;
|
||||||
|
padding: 4px;
|
||||||
|
border-bottom-left-radius: 3px;
|
||||||
|
border-bottom-right-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-keyword {
|
||||||
|
color: #ff65ec;
|
||||||
|
}
|
||||||
|
|
||||||
|
.codegrid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 50px auto;
|
||||||
|
background: ${this.goBright ? '#ffffff' : '#191919'};
|
||||||
|
border-top: 1px solid ${this.goBright ? '#ffffff' : '#333333'};
|
||||||
|
box-shadow: 0px 0px 5px ${this.goBright ? 'rgba(0,0,0,0.1)' : 'rgba(0,0,0,0.5)'};
|
||||||
|
border-radius: 3px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lineNumbers {
|
||||||
|
background: ${this.goBright ? '#fafafa' : '#151515'};
|
||||||
|
color: ${this.goBright ? '#acacac' : '#666666'};
|
||||||
|
padding: 30px 16px 0px 0px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lineCounter:last-child {
|
||||||
|
opacity: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
overflow-x: auto;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 30px 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-weight: ${this.goBright ? '400' : '300'};
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
code,
|
||||||
|
code *,
|
||||||
|
.lineNumbers {
|
||||||
|
line-height: 1.4em;
|
||||||
|
font-weight: 200;
|
||||||
|
font-family: 'Intel One Mono', 'monospace';
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-string {
|
||||||
|
color: #ffa465;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-built_in {
|
||||||
|
color: #65ff6a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-function {
|
||||||
|
color: ${this.goBright ? '#2765DF': '#6596ff' };
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-params {
|
||||||
|
color: ${this.goBright ? '#3DB420' : '#65d5ff' };
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-comment {
|
||||||
|
color: ${this.goBright ? '#EF9300' : '#ffd765' };
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="mainbox">
|
||||||
|
<div class="languageLabel">${this.progLang}</div>
|
||||||
|
<div class="codegrid">
|
||||||
|
<div class="lineNumbers">
|
||||||
|
${(() => {
|
||||||
|
let lineCounter = 0;
|
||||||
|
return this.codeToDisplay.split('\n').map(lineArg => {
|
||||||
|
lineCounter++;
|
||||||
|
return html`<div class="lineCounter">${lineCounter}</div>`;
|
||||||
|
})
|
||||||
|
})()}
|
||||||
|
</div>
|
||||||
|
<pre><code></code></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
@state()
|
||||||
|
private codeToDisplayStore = '';
|
||||||
|
|
||||||
|
public async updated(_changedProperties) {
|
||||||
|
super.updated(_changedProperties);
|
||||||
|
console.log('highlighting now');
|
||||||
|
console.log(this.childNodes);
|
||||||
|
const slottedCodeNodes: Text[] = [];
|
||||||
|
this.childNodes.forEach((childNode) => {
|
||||||
|
if (childNode.nodeName === '#text') {
|
||||||
|
slottedCodeNodes.push(childNode as Text);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (this.codeToDisplay && this.codeToDisplay !== this.codeToDisplayStore) {
|
||||||
|
this.codeToDisplayStore = smartstring.indent.normalize(this.codeToDisplay).trimStart();
|
||||||
|
}
|
||||||
|
if (slottedCodeNodes[0] && slottedCodeNodes[0].wholeText && !this.codeToDisplay) {
|
||||||
|
this.codeToDisplayStore = smartstring.indent.normalize(slottedCodeNodes[0].wholeText).trimStart();
|
||||||
|
this.codeToDisplay = this.codeToDisplayStore;
|
||||||
|
}
|
||||||
|
await domtools.plugins.smartdelay.delayFor(0);
|
||||||
|
const localCodeNode = this.shadowRoot.querySelector('code');
|
||||||
|
const html = hlight.highlight(this.codeToDisplayStore, {language: this.progLang, ignoreIllegals: true});
|
||||||
|
localCodeNode.innerHTML = html.value;
|
||||||
|
}
|
||||||
|
}
|
170
ts_web/elements/dees-dataview-statusobject.ts
Normal file
170
ts_web/elements/dees-dataview-statusobject.ts
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
import {
|
||||||
|
DeesElement,
|
||||||
|
html,
|
||||||
|
customElement,
|
||||||
|
type TemplateResult,
|
||||||
|
property,
|
||||||
|
state,
|
||||||
|
cssManager,
|
||||||
|
css,
|
||||||
|
type CSSResult,
|
||||||
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
|
import * as tsclass from '@tsclass/tsclass';
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface HTMLElementTagNameMap {
|
||||||
|
'dees-dataview-statusobject': DeesDataviewStatusobject;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@customElement('dees-dataview-statusobject')
|
||||||
|
export class DeesDataviewStatusobject extends DeesElement {
|
||||||
|
public static demo = () => html`<dees-dataview-statusobject
|
||||||
|
.statusObject=${{
|
||||||
|
id: '1',
|
||||||
|
name: 'Demo Item',
|
||||||
|
combinedStatus: 'partly_ok',
|
||||||
|
combinedStatusText: 'partly_ok',
|
||||||
|
details: [
|
||||||
|
{
|
||||||
|
name: 'Detail 1',
|
||||||
|
value: 'Value 1',
|
||||||
|
status: 'ok',
|
||||||
|
statusText: 'OK',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Detail 2',
|
||||||
|
value: 'Value 2',
|
||||||
|
status: 'partly_ok',
|
||||||
|
statusText: 'partly_ok',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Detail 3',
|
||||||
|
value: 'Value 3',
|
||||||
|
status: 'not_ok',
|
||||||
|
statusText: 'not_ok',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Detail 4',
|
||||||
|
value: 'Value 4 jhdkfjhalskdfjhfdjskalsdkfjhfdjskalskdjfhjdkslaksjdhfjdkslaskdfjhfjdkslaskdjfhjdskalskdjhfdjskalskdjfhdjskl',
|
||||||
|
status: 'ok',
|
||||||
|
statusText: 'OK',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
</dees-dataview-statusobject>`;
|
||||||
|
|
||||||
|
@property({ type: Object }) statusObject: tsclass.code.IStatusObject;
|
||||||
|
|
||||||
|
public static styles = [
|
||||||
|
cssManager.defaultStyles,
|
||||||
|
css`
|
||||||
|
.mainbox {
|
||||||
|
border-radius: 3px;
|
||||||
|
background: ${cssManager.bdTheme('#fff', '#1b1b1b')};
|
||||||
|
box-shadow: 0px 1px 3px #00000030;
|
||||||
|
min-height: 48px;
|
||||||
|
color: ${cssManager.bdTheme('#000', '#fff')};
|
||||||
|
}
|
||||||
|
|
||||||
|
.heading {
|
||||||
|
display: grid;
|
||||||
|
align-items: center;
|
||||||
|
grid-template-columns: 40px auto 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
display: block;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
height: 48px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statusdot {
|
||||||
|
height: 8px;
|
||||||
|
width: 8px;
|
||||||
|
border-radius: 6px;
|
||||||
|
background: grey;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.copyMain {
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 8px;
|
||||||
|
font-weight: 600;
|
||||||
|
text-transform: uppercase;
|
||||||
|
border: 1px solid ${cssManager.bdTheme('#999', '#444')};
|
||||||
|
text-align: center;
|
||||||
|
padding: 4px;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statusdot.ok {
|
||||||
|
background: green;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statusdot.not_ok{
|
||||||
|
background: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statusdot.partly_ok {
|
||||||
|
background: orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail {
|
||||||
|
minheight: 60px;
|
||||||
|
align-items: center;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 40px auto;
|
||||||
|
border-top: 1px dotted ${cssManager.bdTheme('#999', '#444')};
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail .detailsText {
|
||||||
|
padding-top: 8px;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
padding-right: 8px;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail .detailsText .label {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail .detailsText .value {
|
||||||
|
font-size: 16px;
|
||||||
|
font-family: 'Intel One Mono';
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
];
|
||||||
|
|
||||||
|
render(): TemplateResult {
|
||||||
|
return html`
|
||||||
|
<div class="mainbox">
|
||||||
|
<div class="heading">
|
||||||
|
<div class="statusdot ${this.statusObject?.combinedStatus}"></div>
|
||||||
|
<h1>${this.statusObject?.name || 'no status object assigned'}</h1>
|
||||||
|
<div class="copyMain">Copy as JSON</div>
|
||||||
|
</div>
|
||||||
|
${this.statusObject?.details?.map((detailArg) => {
|
||||||
|
return html`
|
||||||
|
<div class="detail">
|
||||||
|
<div class="statusdot ${detailArg.status}"></div>
|
||||||
|
<div class="detailsText">
|
||||||
|
<div class="label">${detailArg.name}</div>
|
||||||
|
<div class="value">${detailArg.value}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
async firstUpdated() {}
|
||||||
|
}
|
@ -5,7 +5,8 @@ import {
|
|||||||
css,
|
css,
|
||||||
cssManager,
|
cssManager,
|
||||||
property,
|
property,
|
||||||
} from '@designestate/dees-element';
|
type CSSResult,
|
||||||
|
} from '@design.estate/dees-element';
|
||||||
import { DeesForm } from './dees-form.js';
|
import { DeesForm } from './dees-form.js';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
@ -29,7 +30,7 @@ export class DeesFormSubmit extends DeesElement {
|
|||||||
public text: string;
|
public text: string;
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: String
|
type: String,
|
||||||
})
|
})
|
||||||
public status: 'normal' | 'pending' | 'success' | 'error' = 'normal';
|
public status: 'normal' | 'pending' | 'success' | 'error' = 'normal';
|
||||||
|
|
||||||
@ -41,8 +42,12 @@ export class DeesFormSubmit extends DeesElement {
|
|||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
return html`
|
return html`
|
||||||
<dees-button status=${this.status} @click=${this.submit} .disabled=${this.disabled}>
|
<dees-button
|
||||||
${this.text ? this.text : html`<slot></slot>`}
|
status=${this.status}
|
||||||
|
@click=${this.submit}
|
||||||
|
.disabled=${this.disabled}
|
||||||
|
.text=${this.text ? this.text : this.textContent}
|
||||||
|
>
|
||||||
</dees-button>
|
</dees-button>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -54,4 +59,12 @@ export class DeesFormSubmit extends DeesElement {
|
|||||||
const parentElement: DeesForm = this.parentElement as DeesForm;
|
const parentElement: DeesForm = this.parentElement as DeesForm;
|
||||||
parentElement.gatherAndDispatch();
|
parentElement.gatherAndDispatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async focus() {
|
||||||
|
const domtools = await this.domtoolsPromise;
|
||||||
|
if (!this.disabled) {
|
||||||
|
domtools.convenience.smartdelay.delayFor(0);
|
||||||
|
this.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { customElement, html, TemplateResult, DeesElement } from '@designestate/dees-element';
|
import { customElement, html, type TemplateResult, DeesElement, type CSSResult, } from '@design.estate/dees-element';
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
import { DeesInputCheckbox } from './dees-input-checkbox.js';
|
import { DeesInputCheckbox } from './dees-input-checkbox.js';
|
||||||
import { DeesInputText } from './dees-input-text.js';
|
import { DeesInputText } from './dees-input-text.js';
|
||||||
@ -54,7 +54,7 @@ export class DeesForm extends DeesElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
public firstUpdated() {
|
public async firstUpdated() {
|
||||||
const formChildren = this.getFormChildren();
|
const formChildren = this.getFormChildren();
|
||||||
this.checkRequiredStatus();
|
this.checkRequiredStatus();
|
||||||
for (const child of formChildren) {
|
for (const child of formChildren) {
|
||||||
@ -65,6 +65,7 @@ export class DeesForm extends DeesElement {
|
|||||||
this.checkRequiredStatus();
|
this.checkRequiredStatus();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
await this.instrumentBehaviours();
|
||||||
}
|
}
|
||||||
|
|
||||||
public getFormChildren() {
|
public getFormChildren() {
|
||||||
@ -170,4 +171,21 @@ export class DeesForm extends DeesElement {
|
|||||||
|
|
||||||
submitButton.text = textStateArg;
|
submitButton.text = textStateArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async instrumentBehaviours() {
|
||||||
|
const children = this.getFormChildren();
|
||||||
|
for (const child of children) {
|
||||||
|
child.addEventListener('keydown', (eventArg) => {
|
||||||
|
if (eventArg.key === 'Enter') {
|
||||||
|
const currentIndex = children.indexOf(child);
|
||||||
|
if (currentIndex < children.length - 1) {
|
||||||
|
children[currentIndex + 1].focus();
|
||||||
|
} else {
|
||||||
|
children[currentIndex].blur();
|
||||||
|
this.getSubmitButton().focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,12 @@ import {
|
|||||||
customElement,
|
customElement,
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
} from '@designestate/dees-element';
|
type CSSResult,
|
||||||
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
import { icon, IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
import { icon, type IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
||||||
import {
|
import {
|
||||||
faFacebook,
|
faFacebook,
|
||||||
faGoogle,
|
faGoogle,
|
||||||
@ -43,8 +44,11 @@ import {
|
|||||||
faCircleXmark as faCircleXmarkSolid,
|
faCircleXmark as faCircleXmarkSolid,
|
||||||
faCopy as faCopySolid,
|
faCopy as faCopySolid,
|
||||||
faDesktop as faDesktopSolid,
|
faDesktop as faDesktopSolid,
|
||||||
|
faEye as faEyeSolid,
|
||||||
|
faEyeSlash as faEyeSlashSolid,
|
||||||
faGrip as faGripSolid,
|
faGrip as faGripSolid,
|
||||||
faMessage as faMessageSolid,
|
faMessage as faMessageSolid,
|
||||||
|
faMugHot as faMugHotSolid,
|
||||||
faMinus as faMinusSolid,
|
faMinus as faMinusSolid,
|
||||||
faPaste as faPasteSolid,
|
faPaste as faPasteSolid,
|
||||||
faPenToSquare as faPenToSquareSolid,
|
faPenToSquare as faPenToSquareSolid,
|
||||||
@ -82,10 +86,16 @@ export const faIcons = {
|
|||||||
copySolid: faCopySolid,
|
copySolid: faCopySolid,
|
||||||
desktop: faDesktopSolid,
|
desktop: faDesktopSolid,
|
||||||
desktopSolid: faDesktopSolid,
|
desktopSolid: faDesktopSolid,
|
||||||
|
eye: faEyeSolid,
|
||||||
|
eyeSolid: faEyeSolid,
|
||||||
|
eyeSlash: faEyeSlashSolid,
|
||||||
|
eyeSlashSolid: faEyeSlashSolid,
|
||||||
grip: faGripSolid,
|
grip: faGripSolid,
|
||||||
gripSolid: faGripSolid,
|
gripSolid: faGripSolid,
|
||||||
message: faMessageRegular,
|
message: faMessageRegular,
|
||||||
messageSolid: faMessageSolid,
|
messageSolid: faMessageSolid,
|
||||||
|
mugHot: faMugHotSolid,
|
||||||
|
faMugHotSolid: faMugHotSolid,
|
||||||
minus: faMinusSolid,
|
minus: faMinusSolid,
|
||||||
minusSolid: faMinusSolid,
|
minusSolid: faMinusSolid,
|
||||||
paste: faPasteRegular,
|
paste: faPasteRegular,
|
||||||
@ -181,7 +191,7 @@ export class DeesIcon extends DeesElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async firstUpdated() {
|
public async updated() {
|
||||||
if (!this.iconSize) {
|
if (!this.iconSize) {
|
||||||
this.iconSize = parseInt(globalThis.getComputedStyle(this).fontSize.replace(/\D/g,''));
|
this.iconSize = parseInt(globalThis.getComputedStyle(this).fontSize.replace(/\D/g,''));
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import {
|
import {
|
||||||
customElement,
|
customElement,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
property,
|
property,
|
||||||
html,
|
html,
|
||||||
css,
|
css,
|
||||||
cssManager
|
cssManager,
|
||||||
} from '@designestate/dees-element';
|
type CSSResult,
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
} from '@design.estate/dees-element';
|
||||||
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { customElement, DeesElement, TemplateResult, property, html } from '@designestate/dees-element';
|
import { customElement, DeesElement, type TemplateResult, property, html, css, cssManager, type CSSResult, } from '@design.estate/dees-element';
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -9,7 +9,15 @@ declare global {
|
|||||||
|
|
||||||
@customElement('dees-input-dropdown')
|
@customElement('dees-input-dropdown')
|
||||||
export class DeesInputDropdown extends DeesElement {
|
export class DeesInputDropdown extends DeesElement {
|
||||||
public static demo = () => html`<dees-input-dropdown></dees-input-dropdown>`
|
public static demo = () => html`
|
||||||
|
<dees-input-dropdown
|
||||||
|
.options=${[
|
||||||
|
{option: 'option 1', key: 'option1'},
|
||||||
|
{option: 'option 2', key: 'option2'},
|
||||||
|
{option: 'option 3', key: 'option3'}
|
||||||
|
]}
|
||||||
|
></dees-input-dropdown>
|
||||||
|
`
|
||||||
|
|
||||||
// INSTANCE
|
// INSTANCE
|
||||||
public changeSubject = new domtools.rxjs.Subject();
|
public changeSubject = new domtools.rxjs.Subject();
|
||||||
@ -40,11 +48,10 @@ export class DeesInputDropdown extends DeesElement {
|
|||||||
})
|
})
|
||||||
public disabled: boolean = false;
|
public disabled: boolean = false;
|
||||||
|
|
||||||
public render(): TemplateResult {
|
public static styles = [
|
||||||
return html`
|
cssManager.defaultStyles,
|
||||||
${domtools.elementBasic.styles}
|
css`
|
||||||
<style>
|
* {
|
||||||
* {
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,6 +59,7 @@ export class DeesInputDropdown extends DeesElement {
|
|||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
color: ${cssManager.bdTheme('#222', '#fff')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.maincontainer {
|
.maincontainer {
|
||||||
@ -68,41 +76,68 @@ export class DeesInputDropdown extends DeesElement {
|
|||||||
position: relative;
|
position: relative;
|
||||||
max-width: 420px;
|
max-width: 420px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border: 1px solid #CCC;
|
line-height: 40px;
|
||||||
padding: 12px;
|
padding: 0px 8px;
|
||||||
z-index: 0px;
|
z-index: 0px;
|
||||||
|
background: ${cssManager.bdTheme('#ffffff', '#333333')};
|
||||||
|
box-shadow: ${cssManager.bdTheme('0px 1px 4px rgba(0,0,0,0.3)', 'none')};
|
||||||
|
border-radius: 3px;
|
||||||
|
border-top: 1px solid #CCCCCC00;
|
||||||
|
border-bottom: 1px solid #66666600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectedBox.show {
|
||||||
|
border-top: 1px solid ${cssManager.bdTheme('#ffffff', '#666666')};
|
||||||
|
border-bottom: 1px solid ${cssManager.bdTheme('#fafafa', '#222222')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.selectionBox {
|
.selectionBox {
|
||||||
|
will-change:transform;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
background: #ffffff;
|
background: ${cssManager.bdTheme('#ffffff', '#222222')};
|
||||||
max-width: 420px;
|
max-width: 420px;
|
||||||
box-shadow: 0px 0px 5px rgba(0,0,0,0.2);
|
box-shadow: 0px 0px 5px rgba(0,0,0,0.2);
|
||||||
height: 40px;
|
min-height: 40px;
|
||||||
margin-top: -40px;
|
margin-top: -40px;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 4px;
|
||||||
|
transform: scale(0.99,0.99);
|
||||||
}
|
}
|
||||||
|
|
||||||
.selectionBox.show {
|
.selectionBox.show {
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
min-height: 160px;
|
transform: scale(1,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.option {
|
.option {
|
||||||
padding: 12px;
|
transition: all 0.1s;
|
||||||
|
line-height: 40px;
|
||||||
|
padding: 0px 4px;
|
||||||
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.option:hover {
|
.option:hover {
|
||||||
background: #fafafa;
|
color: #fff;
|
||||||
|
padding-left: 8px;
|
||||||
|
background: #0277bd;
|
||||||
}
|
}
|
||||||
|
`
|
||||||
|
]
|
||||||
|
|
||||||
|
public render(): TemplateResult {
|
||||||
|
return html`
|
||||||
|
${domtools.elementBasic.styles}
|
||||||
|
<style>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<div class="maincontainer">
|
<div class="maincontainer">
|
||||||
<div class="selectedBox" @click="${event => {this.toggleSelectionBox();}}">
|
<div class="selectedBox show" @click="${event => {this.toggleSelectionBox();}}">
|
||||||
${this.selectedOption?.option}
|
${this.selectedOption?.option}
|
||||||
</div>
|
</div>
|
||||||
<div class="selectionBox">
|
<div class="selectionBox">
|
||||||
@ -132,6 +167,7 @@ export class DeesInputDropdown extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public toggleSelectionBox() {
|
public toggleSelectionBox() {
|
||||||
|
this.shadowRoot.querySelector('.selectedBox').classList.toggle('show');
|
||||||
this.shadowRoot.querySelector('.selectionBox').classList.toggle('show');
|
this.shadowRoot.querySelector('.selectionBox').classList.toggle('show');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import {
|
import {
|
||||||
customElement,
|
customElement,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
property,
|
property,
|
||||||
html,
|
html,
|
||||||
css,
|
css,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
cssManager,
|
cssManager,
|
||||||
} from '@designestate/dees-element';
|
type CSSResult,
|
||||||
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -122,7 +123,7 @@ export class DeesInputFileupload extends DeesElement {
|
|||||||
border-bottom: 1px dashed #444;
|
border-bottom: 1px dashed #444;
|
||||||
color: ${cssManager.bdTheme('#666', '#ccc')};
|
color: ${cssManager.bdTheme('#666', '#ccc')};
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
font-family: 'Inter';
|
font-family: 'Mona Sans', 'Inter', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uploadButton:hover .uploadCandidate {
|
.uploadButton:hover .uploadCandidate {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { customElement, property, html, TemplateResult, DeesElement } from '@designestate/dees-element';
|
import { customElement, property, html, type TemplateResult, DeesElement, type CSSResult, } from '@design.estate/dees-element';
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {customElement, DeesElement, TemplateResult, property, html} from '@designestate/dees-element';
|
import {customElement, DeesElement, type TemplateResult, property, html, type CSSResult,} from '@design.estate/dees-element';
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {customElement, DeesElement, TemplateResult, property, html, cssManager} from '@designestate/dees-element';
|
import {customElement, DeesElement, type TemplateResult, property, html, cssManager, type CSSResult,} from '@design.estate/dees-element';
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -9,15 +9,19 @@ declare global {
|
|||||||
|
|
||||||
@customElement('dees-input-text')
|
@customElement('dees-input-text')
|
||||||
export class DeesInputText extends DeesElement {
|
export class DeesInputText extends DeesElement {
|
||||||
public static demo = () => html`<dees-input-text></dees-input-text>`;
|
public static demo = () => html`
|
||||||
|
<dees-input-text .label=${'this is a label'} .value=${'test'}></dees-input-text>
|
||||||
|
<dees-input-text .isPasswordBool=${true}></dees-input-text>
|
||||||
|
`;
|
||||||
|
|
||||||
// INSTANCE
|
// INSTANCE
|
||||||
public changeSubject = new domtools.rxjs.Subject();
|
public changeSubject = new domtools.rxjs.Subject<DeesInputText>();
|
||||||
|
public valueChangeSubject = new domtools.rxjs.Subject<string>();
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: String
|
type: String
|
||||||
})
|
})
|
||||||
public label: string = 'Label';
|
public label: string;
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: String
|
type: String
|
||||||
@ -25,7 +29,8 @@ export class DeesInputText extends DeesElement {
|
|||||||
public key: string;
|
public key: string;
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: String
|
type: String,
|
||||||
|
reflect: true,
|
||||||
})
|
})
|
||||||
public value: string = '';
|
public value: string = '';
|
||||||
|
|
||||||
@ -39,6 +44,18 @@ export class DeesInputText extends DeesElement {
|
|||||||
})
|
})
|
||||||
public disabled: boolean = false;
|
public disabled: boolean = false;
|
||||||
|
|
||||||
|
@property({
|
||||||
|
type: Boolean,
|
||||||
|
reflect: true,
|
||||||
|
})
|
||||||
|
public isPasswordBool = false;
|
||||||
|
|
||||||
|
@property({
|
||||||
|
type: Boolean,
|
||||||
|
reflect: true,
|
||||||
|
})
|
||||||
|
public showPasswordBool = false;
|
||||||
|
|
||||||
public render(): TemplateResult {
|
public render(): TemplateResult {
|
||||||
return html `
|
return html `
|
||||||
<style>
|
<style>
|
||||||
@ -77,7 +94,8 @@ export class DeesInputText extends DeesElement {
|
|||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
outline: none;
|
outline: none;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-family: Inter;
|
font-family: ${this.isPasswordBool ? 'monospace': 'Inter'};
|
||||||
|
letter-spacing: ${this.isPasswordBool ? '1px': 'normal'};
|
||||||
color: ${this.goBright ? '#333' : '#ccc'};
|
color: ${this.goBright ? '#333' : '#ccc'};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,10 +110,30 @@ export class DeesInputText extends DeesElement {
|
|||||||
outline: none;
|
outline: none;
|
||||||
border-bottom: 1px solid #e4002b;
|
border-bottom: 1px solid #e4002b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.showPassword {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 8px;
|
||||||
|
right: 10px;
|
||||||
|
border: 1px dashed #444;
|
||||||
|
border-radius: 7px;
|
||||||
|
padding: 8px 0px;
|
||||||
|
width: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.showPassword:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
background: #333;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="maincontainer">
|
<div class="maincontainer">
|
||||||
<div class="label">${this.label}</div>
|
${this.label ? html`<div class="label">${this.label}</div>` : html``}
|
||||||
<input type="text" value=${this.value} @input="${this.updateValue}" .disabled=${this.disabled} />
|
<input type="${this.isPasswordBool && !this.showPasswordBool ? 'password' : 'text'}" value=${this.value} @input="${this.updateValue}" .disabled=${this.disabled} />
|
||||||
|
${this.isPasswordBool ? html`
|
||||||
|
<div class="showPassword" @click=${this.togglePasswordView}>
|
||||||
|
<dees-icon .iconFA=${this.showPasswordBool ? 'eye' : 'eyeSlash'}></dees-icon>
|
||||||
|
</div>
|
||||||
|
` : html``}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -104,6 +142,7 @@ export class DeesInputText extends DeesElement {
|
|||||||
const target: any = eventArg.target;
|
const target: any = eventArg.target;
|
||||||
this.value = target.value;
|
this.value = target.value;
|
||||||
this.changeSubject.next(this);
|
this.changeSubject.next(this);
|
||||||
|
this.valueChangeSubject.next(this.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async freeze() {
|
public async freeze() {
|
||||||
@ -113,4 +152,20 @@ export class DeesInputText extends DeesElement {
|
|||||||
public async unfreeze() {
|
public async unfreeze() {
|
||||||
this.disabled = false;
|
this.disabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async togglePasswordView () {
|
||||||
|
const domtools = await this.domtoolsPromise;
|
||||||
|
this.showPasswordBool = !this.showPasswordBool;
|
||||||
|
console.log(`this.showPasswordBool is: ${this.showPasswordBool}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
public async focus() {
|
||||||
|
const textInput = this.shadowRoot.querySelector('input');
|
||||||
|
textInput.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async blur() {
|
||||||
|
const textInput = this.shadowRoot.querySelector('input');
|
||||||
|
textInput.blur();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,13 @@ import * as plugins from './plugins.js';
|
|||||||
import {
|
import {
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
|
type CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
domtools,
|
domtools,
|
||||||
html,
|
html,
|
||||||
property,
|
property,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
import { DeesWindowLayer } from './dees-windowlayer.js';
|
import { DeesWindowLayer } from './dees-windowlayer.js';
|
||||||
|
|
||||||
@customElement('dees-mobilenavigation')
|
@customElement('dees-mobilenavigation')
|
||||||
@ -56,7 +57,7 @@ export class DeesMobilenavigation extends DeesElement {
|
|||||||
})
|
})
|
||||||
public menuItems: plugins.tsclass.website.IMenuItem[] = [];
|
public menuItems: plugins.tsclass.website.IMenuItem[] = [];
|
||||||
|
|
||||||
readyDeferred = domtools.plugins.smartpromise.defer();
|
readyDeferred: plugins.smartpromise.Deferred<any> = domtools.plugins.smartpromise.defer();
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@ -120,7 +121,7 @@ export class DeesMobilenavigation extends DeesElement {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
padding: 8px 0px;
|
padding: 8px 0px;
|
||||||
font-family: Inter;
|
font-family: 'Mona Sans', 'Inter', sans-serif;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
border-bottom: 1px dashed #444;
|
border-bottom: 1px dashed #444;
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { DeesElement, property, html, customElement, domtools, TemplateResult } from '@designestate/dees-element';
|
import { DeesElement, property, html, customElement, domtools, type TemplateResult, type CSSResult, } from '@design.estate/dees-element';
|
||||||
|
|
||||||
import { Deferred } from '@pushrocks/smartpromise';
|
import { Deferred } from '@push.rocks/smartpromise';
|
||||||
|
|
||||||
import type pdfjsTypes from 'pdfjs-dist';
|
import type pdfjsTypes from 'pdfjs-dist';
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ export class DeesPdf extends DeesElement {
|
|||||||
return html`
|
return html`
|
||||||
<style>
|
<style>
|
||||||
:host {
|
:host {
|
||||||
font-family: 'Inter', sans-serif;
|
font-family: 'Mona Sans', 'Inter', sans-serif;
|
||||||
display: block;
|
display: block;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
|
@ -3,13 +3,14 @@ import {
|
|||||||
html,
|
html,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
|
type CSSResult,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -134,7 +135,7 @@ export class DeesSpeechbubble extends DeesElement {
|
|||||||
return html`
|
return html`
|
||||||
<div class="maincontainer" @click=${this.handleClick}>
|
<div class="maincontainer" @click=${this.handleClick}>
|
||||||
<div class="arrow"></div>
|
<div class="arrow"></div>
|
||||||
<div class="speechbubble"><span class="wave">👋</span> Hey! We are API-driven.</div>
|
<div class="speechbubble"><span class="wave">👋</span> We build with launch.sh, and you can too.</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -144,7 +145,7 @@ export class DeesSpeechbubble extends DeesElement {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
globalThis.location.href = "https://api.global"
|
globalThis.location.href = "https://launch.sh"
|
||||||
}
|
}
|
||||||
|
|
||||||
public async firstUpdated() {
|
public async firstUpdated() {
|
||||||
|
@ -3,13 +3,14 @@ import {
|
|||||||
html,
|
html,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
|
type CSSResult,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
|
@ -4,12 +4,13 @@ import {
|
|||||||
html,
|
html,
|
||||||
css,
|
css,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
|
type CSSResult,
|
||||||
cssManager,
|
cssManager,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
export interface IStep {
|
export interface IStep {
|
||||||
title: string;
|
title: string;
|
||||||
@ -48,15 +49,15 @@ export class DeesStepper extends DeesElement {
|
|||||||
`,
|
`,
|
||||||
validationFunc: async (stepperArg, elementArg) => {
|
validationFunc: async (stepperArg, elementArg) => {
|
||||||
const deesForm = elementArg.querySelector('dees-form');
|
const deesForm = elementArg.querySelector('dees-form');
|
||||||
deesForm.addEventListener('formData', eventArg => {
|
deesForm.addEventListener('formData', (eventArg) => {
|
||||||
stepperArg.goNext();
|
stepperArg.goNext();
|
||||||
})
|
});
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Whats your mobile number?',
|
title: 'Whats your mobile number?',
|
||||||
content: html``,
|
content: html``,
|
||||||
}
|
},
|
||||||
] as IStep[]}
|
] as IStep[]}
|
||||||
></dees-stepper>
|
></dees-stepper>
|
||||||
`;
|
`;
|
||||||
@ -153,7 +154,7 @@ export class DeesStepper extends DeesElement {
|
|||||||
.step .title {
|
.step .title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 50px;
|
padding-top: 50px;
|
||||||
font-family: Inter;
|
font-family: 'Mona Sans', 'Inter', sans-serif;
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
}
|
}
|
||||||
@ -195,22 +196,26 @@ export class DeesStepper extends DeesElement {
|
|||||||
return this.steps.findIndex((stepArg2) => stepArg === stepArg2);
|
return this.steps.findIndex((stepArg2) => stepArg === stepArg2);
|
||||||
};
|
};
|
||||||
|
|
||||||
public firstUpdated() {
|
public async firstUpdated() {
|
||||||
|
await this.domtoolsPromise;
|
||||||
|
await this.domtools.convenience.smartdelay.delayFor(0);
|
||||||
this.selectedStep = this.steps[0];
|
this.selectedStep = this.steps[0];
|
||||||
this.setScrollStatus();
|
this.setScrollStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
public updated() {
|
public async updated() {
|
||||||
this.setScrollStatus();
|
this.setScrollStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroller: typeof domtools.plugins.SweetScroll.prototype;
|
public scroller: typeof domtools.plugins.SweetScroll.prototype;
|
||||||
|
|
||||||
public async setScrollStatus() {
|
public async setScrollStatus() {
|
||||||
await domtools.plugins.smartdelay.delayFor(50);
|
|
||||||
const stepperContainer: HTMLElement = this.shadowRoot.querySelector('.stepperContainer');
|
const stepperContainer: HTMLElement = this.shadowRoot.querySelector('.stepperContainer');
|
||||||
const firstStepElement: HTMLElement = this.shadowRoot.querySelector('.step');
|
const firstStepElement: HTMLElement = this.shadowRoot.querySelector('.step');
|
||||||
const selectedStepElement: HTMLElement = this.shadowRoot.querySelector('.selected');
|
const selectedStepElement: HTMLElement = this.shadowRoot.querySelector('.selected');
|
||||||
|
if (!selectedStepElement) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!stepperContainer.style.paddingTop) {
|
if (!stepperContainer.style.paddingTop) {
|
||||||
stepperContainer.style.paddingTop = `${
|
stepperContainer.style.paddingTop = `${
|
||||||
stepperContainer.offsetHeight / 2 - selectedStepElement.offsetHeight / 2
|
stepperContainer.offsetHeight / 2 - selectedStepElement.offsetHeight / 2
|
||||||
|
@ -3,14 +3,15 @@ import {
|
|||||||
html,
|
html,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
|
type CSSResult,
|
||||||
state,
|
state,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -136,17 +137,18 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
css`
|
css`
|
||||||
.mainbox {
|
.mainbox {
|
||||||
color: ${cssManager.bdTheme('#333', '#fff')};
|
color: ${cssManager.bdTheme('#333', '#fff')};
|
||||||
font-family: 'Inter';
|
font-family: 'Mona Sans', 'Inter', sans-serif;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 50px;
|
min-height: 50px;
|
||||||
background: ${cssManager.bdTheme('#fafafa', '#333333')};
|
background: ${cssManager.bdTheme('#ffffff', '#333333')};
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
border-top: 1px solid ${cssManager.bdTheme('#fff', '#444')};
|
border-top: 1px solid ${cssManager.bdTheme('#fff', '#444')};
|
||||||
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
|
box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.3);
|
||||||
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
.headingSeparation {
|
.headingSeparation {
|
||||||
margin-top: 7px;
|
margin-top: 7px;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { customElement, DeesElement, TemplateResult, html } from '@designestate/dees-element';
|
import { customElement, DeesElement, type TemplateResult, html, type CSSResult, } from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
|
@ -1 +1 @@
|
|||||||
import {} from '@designestate/dees-element';
|
import {} from '@design.estate/dees-element';
|
@ -1,10 +1,10 @@
|
|||||||
import { customElement, DeesElement, TemplateResult, html, property } from '@designestate/dees-element';
|
import { customElement, DeesElement, type TemplateResult, html, property, type CSSResult, } from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
|
|
||||||
import './dees-windowlayer';
|
import './dees-windowlayer';
|
||||||
import { css, cssManager } from '@designestate/dees-element';
|
import { css, cssManager } from '@design.estate/dees-element';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { customElement, DeesElement, TemplateResult, html, property } from '@designestate/dees-element';
|
import { customElement, DeesElement, type TemplateResult, html, property, type CSSResult, } from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
|
@ -2,6 +2,8 @@ export * from './dees-button-exit.js';
|
|||||||
export * from './dees-button.js';
|
export * from './dees-button.js';
|
||||||
export * from './dees-chips.js';
|
export * from './dees-chips.js';
|
||||||
export * from './dees-contextmenu.js';
|
export * from './dees-contextmenu.js';
|
||||||
|
export * from './dees-dataview-codebox.js';
|
||||||
|
export * from './dees-dataview-statusobject.js';
|
||||||
export * from './dees-form.js';
|
export * from './dees-form.js';
|
||||||
export * from './dees-form-submit.js';
|
export * from './dees-form-submit.js';
|
||||||
export * from './dees-icon.js';
|
export * from './dees-icon.js';
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
// @push.rocks scope
|
||||||
|
import * as smartpromise from '@push.rocks/smartpromise';
|
||||||
|
|
||||||
|
export {
|
||||||
|
smartpromise,
|
||||||
|
}
|
||||||
|
|
||||||
|
// @tsclass scope
|
||||||
import * as tsclass from '@tsclass/tsclass';
|
import * as tsclass from '@tsclass/tsclass';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
Reference in New Issue
Block a user