Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
a03b095d14 | |||
9a18658e09 | |||
2910757e8c | |||
a00bacd4ff | |||
01963447dd | |||
5d1d1ba4ba | |||
7885422033 | |||
fb48425c13 | |||
3792c5edf5 | |||
2abd91ab4a | |||
310910e8ee | |||
3301ad1556 | |||
0f8a7a5a7b | |||
f1a0c5741c | |||
cbf60db9fa | |||
34d5bda579 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-catalog",
|
"name": "@designestate/dees-catalog",
|
||||||
"version": "1.0.132",
|
"version": "1.0.140",
|
||||||
"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",
|
||||||
@ -23,7 +23,7 @@
|
|||||||
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
||||||
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
||||||
"@pushrocks/smartpromise": "^3.1.7",
|
"@pushrocks/smartpromise": "^3.1.7",
|
||||||
"@tsclass/tsclass": "^4.0.28",
|
"@tsclass/tsclass": "^4.0.29",
|
||||||
"pdfjs-dist": "^2.15.349"
|
"pdfjs-dist": "^2.15.349"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
579
pnpm-lock.yaml
generated
579
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@designestate/dees-catalog',
|
name: '@designestate/dees-catalog',
|
||||||
version: '1.0.132',
|
version: '1.0.140',
|
||||||
description: 'website for lossless.com'
|
description: 'website for lossless.com'
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ export class DeesButton extends DeesElement {
|
|||||||
@click="${this.dispatchClick}"
|
@click="${this.dispatchClick}"
|
||||||
>
|
>
|
||||||
${this.status === 'normal' ? html``: html`
|
${this.status === 'normal' ? html``: html`
|
||||||
<dees-spinner status="${this.status}"></dees-spinner>
|
<dees-spinner .bnw=${true} status="${this.status}"></dees-spinner>
|
||||||
`}
|
`}
|
||||||
<div class="textbox">${this.text ? this.text : this.textContent}</div>
|
<div class="textbox">${this.text ? this.text : this.textContent}</div>
|
||||||
</div>
|
</div>
|
||||||
|
139
ts_web/elements/dees-contextmenu.ts
Normal file
139
ts_web/elements/dees-contextmenu.ts
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
import * as plugins from './plugins.js';
|
||||||
|
import {
|
||||||
|
customElement,
|
||||||
|
html,
|
||||||
|
DeesElement,
|
||||||
|
property,
|
||||||
|
TemplateResult,
|
||||||
|
cssManager,
|
||||||
|
css,
|
||||||
|
unsafeCSS,
|
||||||
|
} from '@designestate/dees-element';
|
||||||
|
|
||||||
|
import * as domtools from '@designestate/dees-domtools';
|
||||||
|
import { DeesWindowLayer } from './dees-windowlayer.js';
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface HTMLElementTagNameMap {
|
||||||
|
'dees-contextmenu': DeesContextmenu;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@customElement('dees-contextmenu')
|
||||||
|
export class DeesContextmenu extends DeesElement {
|
||||||
|
// DEMO
|
||||||
|
public static demo = () => html`
|
||||||
|
<style>
|
||||||
|
.withMargin {
|
||||||
|
display: block;
|
||||||
|
margin: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<dees-button @click=${(eventArg) => {
|
||||||
|
DeesContextmenu.openContextMenuWithOptions(eventArg, []);
|
||||||
|
}}>Hello</dees-button>
|
||||||
|
<dees-contextmenu class="withMargin"></dees-contextmenu>
|
||||||
|
<dees-contextmenu
|
||||||
|
class="withMargin"
|
||||||
|
.menuItems=${[
|
||||||
|
{
|
||||||
|
name: 'copy',
|
||||||
|
iconName: 'copySolid',
|
||||||
|
action: async () => {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
iconName: 'penToSquare',
|
||||||
|
action: async () => {},
|
||||||
|
},{
|
||||||
|
name: 'paste',
|
||||||
|
iconName: 'pasteSolid',
|
||||||
|
action: async () => {},
|
||||||
|
},
|
||||||
|
] as plugins.tsclass.website.IMenuItem[]}
|
||||||
|
></dees-contextmenu>
|
||||||
|
`;
|
||||||
|
|
||||||
|
// STATIC
|
||||||
|
public static openContextMenuWithOptions(eventArg, contextOptions: plugins.tsclass.website.IMenuItem[]) {
|
||||||
|
const contextMenu = new DeesContextmenu();
|
||||||
|
contextMenu.style.position = 'absolute';
|
||||||
|
contextMenu;
|
||||||
|
const windowLayer = new DeesWindowLayer();
|
||||||
|
windowLayer.append(contextMenu);
|
||||||
|
document.body.append(windowLayer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@property({
|
||||||
|
type: Array,
|
||||||
|
})
|
||||||
|
public menuItems: plugins.tsclass.website.IMenuItem[] = [];
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static styles = [
|
||||||
|
cssManager.defaultStyles,
|
||||||
|
css`
|
||||||
|
:host {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mainbox {
|
||||||
|
color: ${cssManager.bdTheme('#222', '#ccc')};
|
||||||
|
font-size: 14px;
|
||||||
|
width: 200px;
|
||||||
|
border: 1px solid #444;
|
||||||
|
min-height: 40px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: #222;
|
||||||
|
box-shadow: 0px 1px 4px #000;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mainbox .menuitem {
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mainbox .menuitem dees-icon {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 8px;
|
||||||
|
width: 14px;
|
||||||
|
transform: translateY(2px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mainbox .menuitem:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
background: #ffffff10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mainbox .menuitem:active {
|
||||||
|
cursor: pointer;
|
||||||
|
background: #ffffff05;
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
];
|
||||||
|
|
||||||
|
public render(): TemplateResult {
|
||||||
|
return html`
|
||||||
|
<div class="mainbox">
|
||||||
|
${this.menuItems.map((menuItemArg) => {
|
||||||
|
return html`
|
||||||
|
<div class="menuitem">
|
||||||
|
<dees-icon .iconFA=${(menuItemArg.iconName as any) || 'minus'}></dees-icon
|
||||||
|
>${menuItemArg.name}
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async firstUpdated() {
|
||||||
|
if (!this.menuItems || this.menuItems.length === 0) {
|
||||||
|
const mainbox = this.shadowRoot.querySelector('.mainbox');
|
||||||
|
mainbox.textContent = 'no menu items present';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -22,17 +22,32 @@ import {
|
|||||||
} from '@fortawesome/free-brands-svg-icons';
|
} from '@fortawesome/free-brands-svg-icons';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
faCopy as faCopyRegular,
|
||||||
|
faCircleCheck as faCircleCheckRegular,
|
||||||
|
faCircleXmark as faCircleXmarkRegular,
|
||||||
faMessage as faMessageRegular,
|
faMessage as faMessageRegular,
|
||||||
|
faPaste as faPasteRegular,
|
||||||
faSun as faSunRegular,
|
faSun as faSunRegular,
|
||||||
} from '@fortawesome/free-regular-svg-icons';
|
} from '@fortawesome/free-regular-svg-icons';
|
||||||
import {
|
import {
|
||||||
|
faArrowRight as faArrowRightSolid,
|
||||||
|
faArrowUpRightFromSquare as faArrowUpRightFromSquareSolid,
|
||||||
faBell as faBellSolid,
|
faBell as faBellSolid,
|
||||||
faBug as faBugSolid,
|
faBug as faBugSolid,
|
||||||
|
faBuilding as faBuildingSolid,
|
||||||
faCaretLeft as faCaretLeftSolid,
|
faCaretLeft as faCaretLeftSolid,
|
||||||
|
faCaretRight as faCaretRightSolid,
|
||||||
|
faCheck as faCheckSolid,
|
||||||
faCircleInfo as faCircleInfoSolid,
|
faCircleInfo as faCircleInfoSolid,
|
||||||
|
faCircleCheck as faCircleCheckSolid,
|
||||||
|
faCircleXmark as faCircleXmarkSolid,
|
||||||
|
faCopy as faCopySolid,
|
||||||
faDesktop as faDesktopSolid,
|
faDesktop as faDesktopSolid,
|
||||||
faGrip as faGripSolid,
|
faGrip as faGripSolid,
|
||||||
faMessage as faMessageSolid,
|
faMessage as faMessageSolid,
|
||||||
|
faMinus as faMinusSolid,
|
||||||
|
faPaste as faPasteSolid,
|
||||||
|
faPenToSquare as faPenToSquareSolid,
|
||||||
faRss as faRssSolid,
|
faRss as faRssSolid,
|
||||||
faUsers as faUsersSolid,
|
faUsers as faUsersSolid,
|
||||||
faShare as faShareSolid,
|
faShare as faShareSolid,
|
||||||
@ -42,20 +57,41 @@ import {
|
|||||||
|
|
||||||
export const faIcons = {
|
export const faIcons = {
|
||||||
// normal
|
// normal
|
||||||
|
arrowRight: faArrowRightSolid,
|
||||||
|
arrowUpRightFromSquare: faArrowUpRightFromSquareSolid,
|
||||||
|
arrowUpRightFromSquareSolid: faArrowUpRightFromSquareSolid,
|
||||||
bell: faBellSolid,
|
bell: faBellSolid,
|
||||||
bellSolid: faBellSolid,
|
bellSolid: faBellSolid,
|
||||||
bug: faBugSolid,
|
bug: faBugSolid,
|
||||||
bugSolid: faBugSolid,
|
bugSolid: faBugSolid,
|
||||||
|
building: faBuildingSolid,
|
||||||
|
buildingSolid: faBuildingSolid,
|
||||||
caretLeft: faCaretLeftSolid,
|
caretLeft: faCaretLeftSolid,
|
||||||
caretLeftSolid: faCaretLeftSolid,
|
caretLeftSolid: faCaretLeftSolid,
|
||||||
circleinfo: faCircleInfoSolid,
|
caretRight: faCaretRightSolid,
|
||||||
circleinfoSolid: faCircleInfoSolid,
|
caretRightSolid: faCaretRightSolid,
|
||||||
|
check: faCheckSolid,
|
||||||
|
checkSolid: faCheckSolid,
|
||||||
|
circleInfo: faCircleInfoSolid,
|
||||||
|
circleInfoSolid: faCircleInfoSolid,
|
||||||
|
circleCheck: faCircleCheckRegular,
|
||||||
|
circleCheckSolid: faCircleCheckSolid,
|
||||||
|
circleXmark: faCircleXmarkRegular,
|
||||||
|
circleXmarkSolid: faCircleXmarkSolid,
|
||||||
|
copy: faCopyRegular,
|
||||||
|
copySolid: faCopySolid,
|
||||||
desktop: faDesktopSolid,
|
desktop: faDesktopSolid,
|
||||||
desktopSolid: faDesktopSolid,
|
desktopSolid: faDesktopSolid,
|
||||||
grip: faGripSolid,
|
grip: faGripSolid,
|
||||||
gripSolid: faGripSolid,
|
gripSolid: faGripSolid,
|
||||||
message: faMessageRegular,
|
message: faMessageRegular,
|
||||||
messageSolid: faMessageSolid,
|
messageSolid: faMessageSolid,
|
||||||
|
minus: faMinusSolid,
|
||||||
|
minusSolid: faMinusSolid,
|
||||||
|
paste: faPasteRegular,
|
||||||
|
pasteSolid: faPasteSolid,
|
||||||
|
penToSquare: faPenToSquareSolid,
|
||||||
|
penToSquareSolid: faPenToSquareSolid,
|
||||||
rss: faRssSolid,
|
rss: faRssSolid,
|
||||||
rssSolid: faRssSolid,
|
rssSolid: faRssSolid,
|
||||||
share: faShareSolid,
|
share: faShareSolid,
|
||||||
@ -87,14 +123,25 @@ export class DeesIcon extends DeesElement {
|
|||||||
public static demo = () => html`
|
public static demo = () => html`
|
||||||
<dees-icon iconName="visibility"></dees-icon>
|
<dees-icon iconName="visibility"></dees-icon>
|
||||||
<div style="background: #fff; padding: 10px; font-size: 30px">
|
<div style="background: #fff; padding: 10px; font-size: 30px">
|
||||||
<dees-icon iconFA="messageSolid"></dees-icon>
|
<style>
|
||||||
<dees-icon iconFA="sun"></dees-icon>
|
dees-icon {
|
||||||
<dees-icon iconFA="sunSolid"></dees-icon>
|
transition: color 0.05s;
|
||||||
<dees-icon iconFA="facebook"></dees-icon>
|
}
|
||||||
|
dees-icon:hover {
|
||||||
|
color: #e4002b;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<dees-icon .iconFA=${'messageSolid'}></dees-icon>
|
||||||
|
<dees-icon .iconFA=${'sun'}></dees-icon>
|
||||||
|
<dees-icon .iconFA=${'sunSolid'}></dees-icon>
|
||||||
|
<dees-icon .iconFA=${'facebook'}></dees-icon>
|
||||||
|
<dees-icon .iconFA=${'arrowUpRightFromSquare'}></dees-icon>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@property()
|
@property({
|
||||||
|
type: String
|
||||||
|
})
|
||||||
public iconFA: keyof typeof faIcons;
|
public iconFA: keyof typeof faIcons;
|
||||||
|
|
||||||
@property()
|
@property()
|
||||||
@ -115,6 +162,9 @@ export class DeesIcon extends DeesElement {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
* {
|
||||||
|
transition: inherit !important;
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -23,6 +23,8 @@ export class DeesSpinner extends DeesElement {
|
|||||||
<dees-spinner></dees-spinner>
|
<dees-spinner></dees-spinner>
|
||||||
<dees-spinner status="success"></dees-spinner>
|
<dees-spinner status="success"></dees-spinner>
|
||||||
<dees-spinner status="error"></dees-spinner>
|
<dees-spinner status="error"></dees-spinner>
|
||||||
|
<dees-spinner size=${64} status="success"></dees-spinner>
|
||||||
|
<dees-spinner .size=${64} status="error"></dees-spinner>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
@ -30,6 +32,11 @@ export class DeesSpinner extends DeesElement {
|
|||||||
})
|
})
|
||||||
public size = 20;
|
public size = 20;
|
||||||
|
|
||||||
|
@property({
|
||||||
|
type: String,
|
||||||
|
})
|
||||||
|
public bnw: boolean = false;
|
||||||
|
|
||||||
@property()
|
@property()
|
||||||
public status: 'normal' | 'pending' | 'success' | 'error' = 'normal';
|
public status: 'normal' | 'pending' | 'success' | 'error' = 'normal';
|
||||||
|
|
||||||
@ -45,6 +52,7 @@ export class DeesSpinner extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#loading {
|
#loading {
|
||||||
|
position: relative;
|
||||||
transition: none;
|
transition: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@ -58,16 +66,14 @@ export class DeesSpinner extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#loading.success {
|
#loading.success {
|
||||||
border: 0px solid rgba(255, 255, 255, 0);
|
border: none;
|
||||||
background: #8bc34a;
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
animation: none;
|
animation: none;
|
||||||
-webkit-animation: none;
|
-webkit-animation: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#loading.error {
|
#loading.error {
|
||||||
border: 0px solid rgba(255, 255, 255, 0);
|
border: none;
|
||||||
background: #e64a19;
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
animation: none;
|
animation: none;
|
||||||
-webkit-animation: none;
|
-webkit-animation: none;
|
||||||
@ -84,36 +90,10 @@ export class DeesSpinner extends DeesElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#loading .checkmark {
|
dees-icon {
|
||||||
display: inline-block;
|
|
||||||
width: 22px;
|
|
||||||
height: 22px;
|
|
||||||
-ms-transform: rotate(45deg); /* IE 9 */
|
|
||||||
-webkit-transform: rotate(45deg); /* Chrome, Safari, Opera */
|
|
||||||
transform: rotate(45deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
#loading .checkmark_stem {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 3px;
|
height: 100%;
|
||||||
height: 9px;
|
width: 100%;
|
||||||
background-color: #fff;
|
|
||||||
left: 9px;
|
|
||||||
top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#loading .checkmark_kick {
|
|
||||||
position: absolute;
|
|
||||||
width: 3px;
|
|
||||||
height: 3px;
|
|
||||||
background-color: #fff;
|
|
||||||
left: 6px;
|
|
||||||
top: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#loading.disabled .checkmark_stem,
|
|
||||||
#loading.disabled .checkmark_kick {
|
|
||||||
background-color: ${cssManager.bdTheme('#333', '#fff')};
|
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
@ -125,16 +105,25 @@ export class DeesSpinner extends DeesElement {
|
|||||||
width: ${this.size}px;
|
width: ${this.size}px;
|
||||||
height: ${this.size}px;
|
height: ${this.size}px;
|
||||||
}
|
}
|
||||||
|
#loading.success {
|
||||||
|
color: ${cssManager.bdTheme(this.bnw ? '#333': `#8bc34a`, this.bnw ? '#fff' : `#8bc34a`)};
|
||||||
|
|
||||||
|
}
|
||||||
|
#loading.error {
|
||||||
|
color: ${cssManager.bdTheme(this.bnw ? '#333': `#e64a19`, this.bnw ? '#fff' : `#e64a19`)};
|
||||||
|
}
|
||||||
|
dees-icon {
|
||||||
|
font-size: ${this.size}px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="${this.status}" id="loading">
|
<div class="${this.status}" id="loading">
|
||||||
${this.status === 'success' || this.status === 'error'
|
${(() => {
|
||||||
? html`
|
if (this.status === 'success') {
|
||||||
<span class="checkmark">
|
return html`<dees-icon style="transform: translateX(1%) translateY(3%);" .iconFA=${'circleCheck' as any}></dees-icon>`;
|
||||||
<div class="checkmark_stem"></div>
|
} else if (this.status === 'error') {
|
||||||
<div class="checkmark_kick"></div>
|
return html`<dees-icon .iconFA=${'circleXmark' as any}></dees-icon>`;
|
||||||
</span>
|
}
|
||||||
`
|
})()}
|
||||||
: null}
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
1
ts_web/elements/dees-tooltip.ts
Normal file
1
ts_web/elements/dees-tooltip.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
import {} from '@designestate/dees-element';
|
@ -1,6 +1,7 @@
|
|||||||
export * from './dees-button-exit.js';
|
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-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';
|
||||||
|
Reference in New Issue
Block a user