Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
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.135",
|
||||||
"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",
|
||||||
|
@ -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.135',
|
||||||
description: 'website for lossless.com'
|
description: 'website for lossless.com'
|
||||||
}
|
}
|
||||||
|
95
ts_web/elements/dees-contextmenu.ts
Normal file
95
ts_web/elements/dees-contextmenu.ts
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
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';
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface HTMLElementTagNameMap {
|
||||||
|
'dees-contextmenu': DeesContextmenu;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@customElement('dees-contextmenu')
|
||||||
|
export class DeesContextmenu extends DeesElement {
|
||||||
|
public static demo = () => html`
|
||||||
|
<dees-button>Hello</dees-button>
|
||||||
|
<dees-contextmenu .menuItems=${[
|
||||||
|
{
|
||||||
|
name: 'copy',
|
||||||
|
action: async () => {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
action: async () => {}
|
||||||
|
}
|
||||||
|
] as plugins.tsclass.website.IMenuItem[]}></dees-contextmenu>
|
||||||
|
`;
|
||||||
|
|
||||||
|
@property({
|
||||||
|
type: Array,
|
||||||
|
})
|
||||||
|
public menuItems: plugins.tsclass.website.IMenuItem[] = [];
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static styles = [
|
||||||
|
cssManager.defaultStyles,
|
||||||
|
css`
|
||||||
|
:host {
|
||||||
|
display: block;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mainbox {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
`,
|
||||||
|
];
|
||||||
|
|
||||||
|
public render(): TemplateResult {
|
||||||
|
return html`
|
||||||
|
<div class="mainbox">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async firstUpdated() {
|
||||||
|
if (!this.textContent) {
|
||||||
|
this.textContent = 'Button';
|
||||||
|
this.performUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async selectChip(chipArg: string) {
|
||||||
|
if (this.selectionMode === 'single') {
|
||||||
|
if (this.selectedChip === chipArg) {
|
||||||
|
this.selectedChip = null;
|
||||||
|
this.selectedChips = [];
|
||||||
|
} else {
|
||||||
|
this.selectedChip = chipArg;
|
||||||
|
this.selectedChips = [chipArg];
|
||||||
|
}
|
||||||
|
} else if (this.selectionMode === 'multiple') {
|
||||||
|
if (this.selectedChips.includes(chipArg)) {
|
||||||
|
this.selectedChips = this.selectedChips.filter((chipArg2) => chipArg !== chipArg2);
|
||||||
|
} else {
|
||||||
|
this.selectedChips.push(chipArg);
|
||||||
|
}
|
||||||
|
this.requestUpdate();
|
||||||
|
}
|
||||||
|
console.log(this.selectedChips);
|
||||||
|
}
|
||||||
|
}
|
@ -26,8 +26,10 @@ import {
|
|||||||
faSun as faSunRegular,
|
faSun as faSunRegular,
|
||||||
} from '@fortawesome/free-regular-svg-icons';
|
} from '@fortawesome/free-regular-svg-icons';
|
||||||
import {
|
import {
|
||||||
|
faArrowUpRightFromSquare as faArrowUpRightFromSquareSolid,
|
||||||
faBell as faBellSolid,
|
faBell as faBellSolid,
|
||||||
faBug as faBugSolid,
|
faBug as faBugSolid,
|
||||||
|
faBuilding as faBuildingSolid,
|
||||||
faCaretLeft as faCaretLeftSolid,
|
faCaretLeft as faCaretLeftSolid,
|
||||||
faCircleInfo as faCircleInfoSolid,
|
faCircleInfo as faCircleInfoSolid,
|
||||||
faDesktop as faDesktopSolid,
|
faDesktop as faDesktopSolid,
|
||||||
@ -42,10 +44,14 @@ import {
|
|||||||
|
|
||||||
export const faIcons = {
|
export const faIcons = {
|
||||||
// normal
|
// normal
|
||||||
|
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,
|
circleinfo: faCircleInfoSolid,
|
||||||
@ -87,14 +93,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 +132,9 @@ export class DeesIcon extends DeesElement {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
* {
|
||||||
|
transition: inherit !important;
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
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