@umbraco-ui/uui-icon-registry 1.0.0-alpha.0 → 1.0.0-rc.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/README.md +1 -1
- package/lib/index.js +11 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# uui-icon-registry
|
|
2
2
|
|
|
3
|
-

|
|
3
|
+
[](https://www.npmjs.com/package/@umbraco-ui/uui-icon-registry)
|
|
4
4
|
|
|
5
5
|
Umbraco style icon-registry component.
|
|
6
6
|
|
package/lib/index.js
CHANGED
|
@@ -29,10 +29,16 @@ class UUIIconRegistry {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
attach(element) {
|
|
32
|
-
element.addEventListener(
|
|
32
|
+
element.addEventListener(
|
|
33
|
+
UUIIconRequestEvent.ICON_REQUEST,
|
|
34
|
+
this._onIconRequest
|
|
35
|
+
);
|
|
33
36
|
}
|
|
34
37
|
detach(element) {
|
|
35
|
-
element.removeEventListener(
|
|
38
|
+
element.removeEventListener(
|
|
39
|
+
UUIIconRequestEvent.ICON_REQUEST,
|
|
40
|
+
this._onIconRequest
|
|
41
|
+
);
|
|
36
42
|
}
|
|
37
43
|
defineIcon(iconName, svgString) {
|
|
38
44
|
if (this.icons[iconName]) {
|
|
@@ -82,7 +88,9 @@ let UUIIconRegistryElement = class extends LitElement {
|
|
|
82
88
|
set icons(icons) {
|
|
83
89
|
this._icons = icons;
|
|
84
90
|
if (this._registry) {
|
|
85
|
-
Object.entries(this._icons).forEach(
|
|
91
|
+
Object.entries(this._icons).forEach(
|
|
92
|
+
([key, value]) => this._registry.defineIcon(key, value)
|
|
93
|
+
);
|
|
86
94
|
}
|
|
87
95
|
}
|
|
88
96
|
get registry() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-icon-registry",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-rc.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Umbraco",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"custom-elements.json"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@umbraco-ui/uui-base": "1.0.0-
|
|
34
|
-
"@umbraco-ui/uui-icon": "1.0.0-
|
|
33
|
+
"@umbraco-ui/uui-base": "1.0.0-rc.2",
|
|
34
|
+
"@umbraco-ui/uui-icon": "1.0.0-rc.2"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"homepage": "https://uui.umbraco.com/?path=/story/uui-icon-registry",
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "436dd8d9fff81481feb88f06b461167c98dac91a"
|
|
46
46
|
}
|