Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0e77baf600 | |||
| 89fd8b5080 | |||
| 884f9725b5 | |||
| 48e093b1ba | |||
| 2b3875d738 | |||
| 279d1c2f3f | |||
| 29f2839d5b | |||
| 96683b4380 | |||
| 36fbf7f29e | |||
| 67d4c216ed |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-catalog",
|
"name": "@designestate/dees-catalog",
|
||||||
"version": "1.0.126",
|
"version": "1.0.131",
|
||||||
"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.126',
|
version: '1.0.131',
|
||||||
description: 'website for lossless.com'
|
description: 'website for lossless.com'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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';
|
||||||
|
|
||||||
@@ -21,12 +28,14 @@ import {
|
|||||||
import {
|
import {
|
||||||
faBell as faBellSolid,
|
faBell as faBellSolid,
|
||||||
faBug as faBugSolid,
|
faBug as faBugSolid,
|
||||||
|
faCaretLeft as faCaretLeftSolid,
|
||||||
faCircleInfo as faCircleInfoSolid,
|
faCircleInfo as faCircleInfoSolid,
|
||||||
faDesktop as faDesktopSolid,
|
faDesktop as faDesktopSolid,
|
||||||
faGrip as faGripSolid,
|
faGrip as faGripSolid,
|
||||||
faMessage as faMessageSolid,
|
faMessage as faMessageSolid,
|
||||||
faRss as faRssSolid,
|
faRss as faRssSolid,
|
||||||
faUsers as faUsersSolid,
|
faUsers as faUsersSolid,
|
||||||
|
faShare as faShareSolid,
|
||||||
faSun as faSunSolid,
|
faSun as faSunSolid,
|
||||||
} from '@fortawesome/free-solid-svg-icons';
|
} from '@fortawesome/free-solid-svg-icons';
|
||||||
|
|
||||||
@@ -36,6 +45,8 @@ export const faIcons = {
|
|||||||
bellSolid: faBellSolid,
|
bellSolid: faBellSolid,
|
||||||
bug: faBugSolid,
|
bug: faBugSolid,
|
||||||
bugSolid: faBugSolid,
|
bugSolid: faBugSolid,
|
||||||
|
caretLeft: faCaretLeftSolid,
|
||||||
|
caretLeftSolid: faCaretLeftSolid,
|
||||||
circleinfo: faCircleInfoSolid,
|
circleinfo: faCircleInfoSolid,
|
||||||
circleinfoSolid: faCircleInfoSolid,
|
circleinfoSolid: faCircleInfoSolid,
|
||||||
desktop: faDesktopSolid,
|
desktop: faDesktopSolid,
|
||||||
@@ -46,6 +57,8 @@ export const faIcons = {
|
|||||||
messageSolid: faMessageSolid,
|
messageSolid: faMessageSolid,
|
||||||
rss: faRssSolid,
|
rss: faRssSolid,
|
||||||
rssSolid: faRssSolid,
|
rssSolid: faRssSolid,
|
||||||
|
share: faShareSolid,
|
||||||
|
shareSolid: faShareSolid,
|
||||||
sun: faSunRegular,
|
sun: faSunRegular,
|
||||||
sunSolid: faSunSolid,
|
sunSolid: faSunSolid,
|
||||||
// brands
|
// brands
|
||||||
@@ -70,7 +83,7 @@ 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>
|
<dees-icon iconFA="messageSolid"></dees-icon>
|
||||||
<dees-icon iconFA="sun"></dees-icon>
|
<dees-icon iconFA="sun"></dees-icon>
|
||||||
<dees-icon iconFA="sunSolid"></dees-icon>
|
<dees-icon iconFA="sunSolid"></dees-icon>
|
||||||
@@ -82,25 +95,32 @@ export class DeesIcon extends DeesElement {
|
|||||||
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;
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
];
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
return html`
|
return html`
|
||||||
${domtools.elementBasic.styles}
|
${domtools.elementBasic.styles}
|
||||||
<style>
|
<style>
|
||||||
:host {
|
|
||||||
display: block;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
#iconContainer svg {
|
#iconContainer svg {
|
||||||
display: inline-block;
|
display: block;
|
||||||
height: ${this.iconSize}px;
|
height: ${this.iconSize}px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -109,6 +129,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]
|
||||||
|
|||||||
Reference in New Issue
Block a user