@nuralyui/icon 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/icon.component.d.ts.map +1 -1
- package/icon.component.js.map +1 -1
- package/icon.style.js +1 -1
- package/icon.style.js.map +1 -1
- package/icon.variables.js +1 -1
- package/icon.variables.js.map +1 -1
- package/package.json +1 -1
package/icon.component.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.component.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icon.component.ts"],"names":[],"mappings":"AACA;;;;GAIG;;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"icon.component.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icon.component.ts"],"names":[],"mappings":"AACA;;;;GAIG;;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AASvC,OAAO,EAAE,SAAS,EAAkC,MAAM,iBAAiB,CAAC;AAE5E,qBACa,aAAc,SAAQ,UAAU;IAE3C,IAAI,EAAG,MAAM,CAAC;IAEd,IAAI,YAAmB;IAEvB,gBAAyB,MAAM,4BAAU;IAChC,MAAM;IAOf,WAAW;CAKZ;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,aAAa,CAAC;KAC1B;IAED,UAAU,GAAG,CAAC;QACZ,UAAU,iBAAiB;YACzB,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;SACjH;KACF;CACF"}
|
package/icon.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.component.js","sourceRoot":"","sources":["../../../src/components/icon/icon.component.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD;;;;GAIG;;;;;;;AAEH,OAAO,
|
|
1
|
+
{"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AAQ,EAAE;2CACY;AAJZ,aAAa;IADzB,aAAa,CAAC,SAAS,CAAC;GACZ,aAAa,CAmBzB;SAnBY,aAAa","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * @license\n * Copyright 2023 Nuraly Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\nimport { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { library, dom } from '@fortawesome/fontawesome-svg-core';\nimport { far } from '@fortawesome/free-regular-svg-icons';\nimport { fas } from '@fortawesome/free-solid-svg-icons';\nlibrary.add(fas, far);\ndom.watch();\n\nimport { styles } from './icon.style.js';\nimport { IconTypes, regularIconPack, solidIconPack } from './icon.types.js';\n\n@customElement('hy-icon')\nexport class HyIconElement extends LitElement {\n @property({type: String})\n name!: string;\n @property()\n type = IconTypes.Solid;\n\n static override readonly styles = styles;\n override render() {\n return html`\n <svg class=\"svg-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 550 550\">\n <path d=\"${this.getIconPath()}\" />\n </svg>\n `;\n }\n getIconPath() {\n const iconPack = this.type == IconTypes.Solid ? solidIconPack : regularIconPack;\n const iconDefinition = (library as any).definitions[iconPack][this.name];\n return iconDefinition ? iconDefinition[4] : '';\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hy-icon': HyIconElement;\n }\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n 'hy-icon': React.DetailedHTMLProps<React.HTMLAttributes<HyIconElement>, HyIconElement> | Partial<HyIconElement>;\n }\n }\n}\n"]}
|
package/icon.style.js
CHANGED
|
@@ -2,7 +2,7 @@ import { css } from 'lit';
|
|
|
2
2
|
import { styleVariables } from './icon.variables.js';
|
|
3
3
|
const iconStyles = css `
|
|
4
4
|
.svg-icon {
|
|
5
|
-
fill: var(--hybrid-icon-color);
|
|
5
|
+
fill: var(--hybrid-icon-color, #000000);
|
|
6
6
|
width: var(--hybrid-icon-width);
|
|
7
7
|
height: var(--hybrid-icon-height);
|
|
8
8
|
}
|
package/icon.style.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.style.js","sourceRoot":"","sources":["../../../src/components/icon/icon.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAEnD,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;CAMrB,CAAC;AACF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import {css} from 'lit';\nimport {styleVariables} from './icon.variables.js';\n\nconst iconStyles = css`\n .svg-icon {\n fill: var(--hybrid-icon-color);\n width: var(--hybrid-icon-width);\n height: var(--hybrid-icon-height);\n }\n`;\nexport const styles = [iconStyles, styleVariables];\n"]}
|
|
1
|
+
{"version":3,"file":"icon.style.js","sourceRoot":"","sources":["../../../src/components/icon/icon.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAEnD,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;CAMrB,CAAC;AACF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import {css} from 'lit';\nimport {styleVariables} from './icon.variables.js';\n\nconst iconStyles = css`\n .svg-icon {\n fill: var(--hybrid-icon-color, #000000);\n width: var(--hybrid-icon-width);\n height: var(--hybrid-icon-height);\n }\n`;\nexport const styles = [iconStyles, styleVariables];\n"]}
|
package/icon.variables.js
CHANGED
package/icon.variables.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.variables.js","sourceRoot":"","sources":["../../../src/components/icon/icon.variables.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"icon.variables.js","sourceRoot":"","sources":["../../../src/components/icon/icon.variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;CAWhC,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styleVariables = css`\n :host {\n /* --hybrid-icon-color: #000000; */\n --hybrid-icon-width: 18px;\n --hybrid-icon-height: 18px;\n }\n @media (prefers-color-scheme: dark) {\n :host {\n --hybrid-icon-color: #ffffff;\n }\n }\n`;\n"]}
|