Compare commits

...

14 Commits

Author SHA1 Message Date
310910e8ee 1.0.135 2023-01-12 19:19:32 +01:00
3301ad1556 fix(core): update 2023-01-12 19:19:31 +01:00
0f8a7a5a7b 1.0.134 2023-01-12 18:15:00 +01:00
f1a0c5741c fix(core): update 2023-01-12 18:14:59 +01:00
cbf60db9fa 1.0.133 2023-01-12 00:07:39 +01:00
34d5bda579 fix(core): update 2023-01-12 00:07:39 +01:00
916ba68c94 1.0.132 2023-01-11 20:55:07 +01:00
46fc396772 fix(core): update 2023-01-11 20:55:06 +01:00
0e77baf600 1.0.131 2023-01-11 20:52:38 +01:00
89fd8b5080 fix(core): update 2023-01-11 20:52:37 +01:00
884f9725b5 1.0.130 2023-01-11 18:32:05 +01:00
48e093b1ba fix(core): update 2023-01-11 18:32:05 +01:00
2b3875d738 1.0.129 2023-01-11 18:15:32 +01:00
279d1c2f3f fix(core): update 2023-01-11 18:15:31 +01:00
6 changed files with 157 additions and 15 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@designestate/dees-catalog", "name": "@designestate/dees-catalog",
"version": "1.0.128", "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",

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@designestate/dees-catalog', name: '@designestate/dees-catalog',
version: '1.0.128', version: '1.0.135',
description: 'website for lossless.com' description: 'website for lossless.com'
} }

View 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);
}
}

View File

@ -1,4 +1,11 @@
import { DeesElement, html, property, customElement } from '@designestate/dees-element'; import {
DeesElement,
html,
property,
customElement,
cssManager,
css,
} from '@designestate/dees-element';
import * as domtools from '@designestate/dees-domtools'; import * as domtools from '@designestate/dees-domtools';
@ -19,8 +26,11 @@ 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,
faCircleInfo as faCircleInfoSolid, faCircleInfo as faCircleInfoSolid,
faDesktop as faDesktopSolid, faDesktop as faDesktopSolid,
faGrip as faGripSolid, faGrip as faGripSolid,
@ -29,14 +39,21 @@ import {
faUsers as faUsersSolid, faUsers as faUsersSolid,
faShare as faShareSolid, faShare as faShareSolid,
faSun as faSunSolid, faSun as faSunSolid,
faXmark as faXmarkSolid,
} from '@fortawesome/free-solid-svg-icons'; } from '@fortawesome/free-solid-svg-icons';
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,
caretLeftSolid: faCaretLeftSolid,
circleinfo: faCircleInfoSolid, circleinfo: faCircleInfoSolid,
circleinfoSolid: faCircleInfoSolid, circleinfoSolid: faCircleInfoSolid,
desktop: faDesktopSolid, desktop: faDesktopSolid,
@ -51,6 +68,8 @@ export const faIcons = {
shareSolid: faShareSolid, shareSolid: faShareSolid,
sun: faSunRegular, sun: faSunRegular,
sunSolid: faSunSolid, sunSolid: faSunSolid,
xmark: faXmarkSolid,
xmarkSolid: faXmarkSolid,
// brands // brands
facebook: faFacebook, facebook: faFacebook,
google: faGoogle, google: faGoogle,
@ -73,35 +92,58 @@ declare global {
export class DeesIcon extends DeesElement { 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: 24px"> <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()
public iconSize: number = 20; public iconSize: number;
constructor() { constructor() {
super(); super();
domtools.elementBasic.setup(); domtools.elementBasic.setup();
} }
public static styles = [
cssManager.defaultStyles,
css`
:host {
display: block;
white-space: nowrap;
display: flex;
align-items: center;
justify-content: center;
}
* {
transition: inherit !important;
}
`,
];
public render() { public render() {
return html` return html`
${domtools.elementBasic.styles} ${domtools.elementBasic.styles}
<style> <style>
:host {
display: block;
white-space: nowrap;
}
#iconContainer svg { #iconContainer svg {
display: inline-block; display: block;
height: ${this.iconSize}px; height: ${this.iconSize}px;
} }
</style> </style>
@ -110,6 +152,9 @@ export class DeesIcon extends DeesElement {
} }
public async firstUpdated() { public async firstUpdated() {
if (!this.iconSize) {
this.iconSize = parseInt(globalThis.getComputedStyle(this).fontSize.replace(/\D/g,''));
}
if (this.iconFA) { if (this.iconFA) {
this.shadowRoot.querySelector('#iconContainer').innerHTML = this.iconFA this.shadowRoot.querySelector('#iconContainer').innerHTML = this.iconFA
? icon(faIcons[this.iconFA]).html[0] ? icon(faIcons[this.iconFA]).html[0]

View File

@ -0,0 +1 @@
import {} from '@designestate/dees-element';

View File

@ -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';