@aquera/nile-elements 0.0.1-beta.1 → 0.0.1-beta.2
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/.rollup.cache/Users/ravisankar/repos/design-system/packages/nile-elements/dist/src/nile-icon/index.js +14 -14
- package/.rollup.cache/Users/ravisankar/repos/design-system/packages/nile-elements/dist/src/nile-icon/index.js.map +1 -1
- package/.rollup.cache/Users/ravisankar/repos/design-system/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/nile-icon/index.cjs.js +1 -1
- package/dist/nile-icon/index.cjs.js.map +1 -1
- package/dist/nile-icon/index.esm.js +13 -14
- package/dist/src/nile-icon/index.js +14 -14
- package/dist/src/nile-icon/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-icon/index.ts +18 -18
package/package.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
"description": "Webcomponent nile-elements following open-wc recommendations",
|
4
4
|
"license": "MIT",
|
5
5
|
"author": "nile-elements",
|
6
|
-
"version": "0.0.1-beta.
|
6
|
+
"version": "0.0.1-beta.2",
|
7
7
|
"main": "dist/src/index.js",
|
8
8
|
"type": "module",
|
9
9
|
"module": "dist/src/index.js",
|
package/src/nile-icon/index.ts
CHANGED
@@ -85,11 +85,6 @@ export class NileIcon extends LitElement {
|
|
85
85
|
align-items: center;
|
86
86
|
justify-content: center;
|
87
87
|
contain: content;
|
88
|
-
|
89
|
-
--nile-svg-stroke: #7F7F7F;
|
90
|
-
--nile-svg-stroke-width: 1px;
|
91
|
-
--nile-svg-height: 16px;
|
92
|
-
--nile-svg-width: 16px;
|
93
88
|
}
|
94
89
|
|
95
90
|
.nds-icon {
|
@@ -98,15 +93,19 @@ export class NileIcon extends LitElement {
|
|
98
93
|
justify-content: center;
|
99
94
|
}
|
100
95
|
|
101
|
-
.nds-icon
|
102
|
-
margin-right: 12px;
|
103
|
-
}
|
104
|
-
|
105
|
-
svg {
|
106
|
-
stroke: var(--nile-svg-stroke);
|
107
|
-
stroke-width: var(--nile-svg-stroke-width);
|
96
|
+
.nds-icon svg {
|
108
97
|
height: var(--nile-svg-height);
|
109
98
|
width: var(--nile-svg-width);
|
99
|
+
stroke: var(--nile-svg-stroke);
|
100
|
+
stroke-width: var(--nile-svg-stroke-width);
|
101
|
+
}
|
102
|
+
|
103
|
+
.nds-icon svg path {
|
104
|
+
fill: var(--nile-svg-fill);
|
105
|
+
}
|
106
|
+
|
107
|
+
.nds-icon--push {
|
108
|
+
margin-right: 12px;
|
110
109
|
}
|
111
110
|
`;
|
112
111
|
|
@@ -122,9 +121,12 @@ export class NileIcon extends LitElement {
|
|
122
121
|
this.style.setProperty('--nile-svg-width', `${this.size}px`);
|
123
122
|
}
|
124
123
|
if (changedProperties.has('color')) {
|
125
|
-
this.style.setProperty('--nile-svg-
|
124
|
+
this.style.setProperty('--nile-svg-fill', `${this.color}`);
|
126
125
|
}
|
127
|
-
if (
|
126
|
+
if (
|
127
|
+
changedProperties.has('name') ||
|
128
|
+
changedProperties.has('customSvgPath')
|
129
|
+
) {
|
128
130
|
let iconName = this.name ? this.removeHyphens(this.name) : undefined;
|
129
131
|
if (iconName && iconPaths[iconName]) {
|
130
132
|
this._svg = atob(iconPaths[iconName]);
|
@@ -150,7 +152,6 @@ export class NileIcon extends LitElement {
|
|
150
152
|
return iconName.replace(/-/g, '');
|
151
153
|
}
|
152
154
|
|
153
|
-
|
154
155
|
get buttonClassMap() {
|
155
156
|
return {
|
156
157
|
'nds-icon--push': this.push,
|
@@ -168,7 +169,7 @@ export class NileIcon extends LitElement {
|
|
168
169
|
? `0 0 ${this.frame} ${this.frame}`
|
169
170
|
: '0 0 16 16';
|
170
171
|
|
171
|
-
|
172
|
+
return html`
|
172
173
|
<span class="nds-icon ${classMap(this.buttonClassMap)}">
|
173
174
|
${this.customSvgPath
|
174
175
|
? html`${unsafeHTML(this._svg)}`
|
@@ -186,8 +187,7 @@ export class NileIcon extends LitElement {
|
|
186
187
|
fill="${color}"
|
187
188
|
>
|
188
189
|
${unsafeSVG(this._svg)}
|
189
|
-
</svg>`
|
190
|
-
}
|
190
|
+
</svg>`}
|
191
191
|
</span>
|
192
192
|
`;
|
193
193
|
}
|