@openremote/or-icon 1.6.0 → 1.6.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/custom-elements.json +20 -190
- package/package.json +2 -2
package/custom-elements.json
CHANGED
|
@@ -2,167 +2,6 @@
|
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"readme": "",
|
|
4
4
|
"modules": [
|
|
5
|
-
{
|
|
6
|
-
"kind": "javascript-module",
|
|
7
|
-
"path": "mdi-font-copy.js",
|
|
8
|
-
"declarations": [],
|
|
9
|
-
"exports": []
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"kind": "javascript-module",
|
|
13
|
-
"path": "mdi-iconset-generator.js",
|
|
14
|
-
"declarations": [],
|
|
15
|
-
"exports": []
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"kind": "javascript-module",
|
|
19
|
-
"path": "lib/index.js",
|
|
20
|
-
"declarations": [
|
|
21
|
-
{
|
|
22
|
-
"kind": "class",
|
|
23
|
-
"description": "",
|
|
24
|
-
"name": "IconSetAddedEvent",
|
|
25
|
-
"superclass": {
|
|
26
|
-
"name": "CustomEvent",
|
|
27
|
-
"module": "lib/index.js"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"kind": "function",
|
|
32
|
-
"name": "createSvgIconSet",
|
|
33
|
-
"parameters": [
|
|
34
|
-
{
|
|
35
|
-
"name": "t"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"name": "e"
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"kind": "function",
|
|
44
|
-
"name": "createMdiIconSet",
|
|
45
|
-
"parameters": [
|
|
46
|
-
{
|
|
47
|
-
"name": "t"
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"kind": "variable",
|
|
53
|
-
"name": "IconSets",
|
|
54
|
-
"default": "new ORIconSets"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"kind": "function",
|
|
58
|
-
"name": "getAssetDescriptorIconTemplate",
|
|
59
|
-
"parameters": [
|
|
60
|
-
{
|
|
61
|
-
"name": "t"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"name": "e"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"name": "o"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"name": "n"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"name": "r"
|
|
74
|
-
}
|
|
75
|
-
]
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"kind": "variable",
|
|
79
|
-
"name": "OrIcon",
|
|
80
|
-
"default": "class extends LitElement{constructor(){super(...arguments),this._handler=t=>{this._updateIcon()}}static get styles(){return[css` :host { --internal-or-icon-width: var(--or-icon-width, 24px); --internal-or-icon-height: var(--or-icon-height, 24px); --internal-or-icon-fill: var(--or-icon-fill, currentColor); --internal-or-icon-stroke: var(--or-icon-fill, none); --internal-or-icon-stroke-width: var(--or-icon-stroke-width, 0); display: inline-block; color: var(--internal-or-icon-fill); fill: var(--internal-or-icon-fill); stroke: var(--internal-or-icon-stroke); stroke-width: var(--internal-or-icon-stroke-width); vertical-align: text-bottom; font-weight: normal; font-style: normal; font-size: var(--internal-or-icon-width); line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; word-wrap: normal; direction: ltr; /* Support for all WebKit browsers. */ -webkit-font-smoothing: antialiased; /* Support for Safari and Chrome. */ text-rendering: optimizeLegibility; /* Support for Firefox. */ -moz-osx-font-smoothing: grayscale; /* Support for IE. */ font-feature-settings: 'liga'; } :host([hidden]) { display: none; } svg { pointer-events: none; display: block; width: var(--internal-or-icon-width); height: var(--internal-or-icon-height); } `,css`${unsafeCSS(mdiFontStyle)}`]}render(){return this._iconTemplate||html``}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener(IconSetAddedEvent.NAME,this._handler)}shouldUpdate(t){return t.has(\"icon\")&&this._updateIcon(),!0}_updateIcon(){this._iconTemplate=void 0,window.removeEventListener(IconSetAddedEvent.NAME,this._handler),this._iconTemplate=IconSets.getIconTemplate(this.icon),this.icon&&!this._iconTemplate&&window.addEventListener(IconSetAddedEvent.NAME,this._handler)}}"
|
|
81
|
-
}
|
|
82
|
-
],
|
|
83
|
-
"exports": [
|
|
84
|
-
{
|
|
85
|
-
"kind": "js",
|
|
86
|
-
"name": "OrIconSet",
|
|
87
|
-
"declaration": {
|
|
88
|
-
"name": "OrIconSet",
|
|
89
|
-
"module": "lib/index.js"
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"kind": "js",
|
|
94
|
-
"name": "IconSetAddedEvent",
|
|
95
|
-
"declaration": {
|
|
96
|
-
"name": "IconSetAddedEvent",
|
|
97
|
-
"module": "lib/index.js"
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"kind": "js",
|
|
102
|
-
"name": "createSvgIconSet",
|
|
103
|
-
"declaration": {
|
|
104
|
-
"name": "createSvgIconSet",
|
|
105
|
-
"module": "lib/index.js"
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"kind": "js",
|
|
110
|
-
"name": "createMdiIconSet",
|
|
111
|
-
"declaration": {
|
|
112
|
-
"name": "createMdiIconSet",
|
|
113
|
-
"module": "lib/index.js"
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"kind": "js",
|
|
118
|
-
"name": "IconSets",
|
|
119
|
-
"declaration": {
|
|
120
|
-
"name": "IconSets",
|
|
121
|
-
"module": "lib/index.js"
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"kind": "js",
|
|
126
|
-
"name": "getAssetDescriptorIconTemplate",
|
|
127
|
-
"declaration": {
|
|
128
|
-
"name": "getAssetDescriptorIconTemplate",
|
|
129
|
-
"module": "lib/index.js"
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"kind": "js",
|
|
134
|
-
"name": "OrIcon",
|
|
135
|
-
"declaration": {
|
|
136
|
-
"name": "OrIcon",
|
|
137
|
-
"module": "lib/index.js"
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
]
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"kind": "javascript-module",
|
|
144
|
-
"path": "lib/or-icon-set.js",
|
|
145
|
-
"declarations": [
|
|
146
|
-
{
|
|
147
|
-
"kind": "variable",
|
|
148
|
-
"name": "orIconSet",
|
|
149
|
-
"type": {
|
|
150
|
-
"text": "object"
|
|
151
|
-
},
|
|
152
|
-
"default": "{size:24,icons:{logo:'<path style=\\'pointer-events: var(--or-icon-pointer-events, none);\\' fill=\"#C4D600\" d=\"m11.96125,23.85096c-6.56773,0 -11.90971,-5.34202 -11.90971,-11.90862l2.49411,0c0,5.19176 4.22389,9.41568 9.41561,9.41568c5.19053,0 9.41561,-4.22392 9.41561,-9.41568c0,-5.19176 -4.22389,-9.41568 -9.41561,-9.41568l0,-2.49413c6.56655,0 11.90971,5.34439 11.90971,11.9098c0,6.5666 -5.34316,11.90862 -11.90971,11.90862l0,0z\" /><path fill=\"#4E9D2D\" d=\"m10.25094,20.38647c-2.26848,-0.47231 -4.21822,-1.80199 -5.48741,-3.74009s-1.70892,-4.25777 -1.23545,-6.52625c0.47347,-2.26965 1.80315,-4.21822 3.74242,-5.48857c1.93926,-1.27035 4.25661,-1.70892 6.52625,-1.23545c4.68471,0.97719 7.70121,5.5828 6.72286,10.26635l-2.39994,-0.49907c0.70149,-3.36085 -1.4623,-6.66585 -4.82431,-7.36734c-1.62866,-0.33969 -3.29105,-0.02559 -4.68238,0.88645c-1.39134,0.91088 -2.34526,2.3092 -2.68495,3.93786c-0.33853,1.62633 -0.02443,3.28988 0.88645,4.68122c0.91088,1.39134 2.3092,2.34526 3.93786,2.68379l-0.50139,2.4011l0,0z\"/><path fill=\"#1D5632\"d=\"m12.03064,17.49616c-0.09524,0 -0.19048,-0.00116 -0.28457,-0.00465c-1.49833,-0.0755 -2.87818,-0.72942 -3.88636,-1.84097c-1.00818,-1.11271 -1.52156,-2.54948 -1.44722,-4.05013l2.44378,0.12196c-0.04181,0.84557 0.24856,1.65745 0.81769,2.28466c0.56681,0.62721 1.34733,0.99656 2.1929,1.03838c0.84208,0.03833 1.65629,-0.2474 2.2835,-0.81653c0.62837,-0.56797 0.99656,-1.34617 1.03954,-2.19174c0.08711,-1.74573 -1.26371,-3.23708 -3.00943,-3.3242l0.12196,-2.44378c3.09422,0.15332 5.4869,2.79455 5.33358,5.88877c-0.07434,1.49949 -0.72942,2.87818 -1.84097,3.8852c-1.04186,0.94313 -2.36945,1.45303 -3.7644,1.45303l0,0z\"/>',\"logo-plain\":\"m11.9925,23.91349c-6.58498,0 -11.94099,-5.35605 -11.94099,-11.9399l2.50066,0c0,5.20539 4.23498,9.44041 9.44033,9.44041c5.20416,0 9.44033,-4.23502 9.44033,-9.44041c0,-5.20539 -4.23498,-9.44041 -9.44033,-9.44041l0,-2.50068c6.5838,0 11.94099,5.35842 11.94099,11.94108c0,6.58385 -5.35719,11.9399 -11.94099,11.9399l0,0zm-1.80787,-3.27769c-2.31323,-0.48163 -4.30141,-1.83755 -5.59563,-3.81389s-1.74263,-4.34178 -1.25982,-6.65502c0.48281,-2.31443 1.83872,-4.30145 3.81623,-5.59686c1.97751,-1.29542 4.34056,-1.74264 6.65497,-1.25983c4.77711,0.99647 7.8531,5.69295 6.85545,10.46891l-2.44727,-0.50891c0.71532,-3.42716 -1.49114,-6.79738 -4.91946,-7.5127c-1.66078,-0.34639 -3.35596,-0.0261 -4.77474,0.90394c-1.41878,0.92886 -2.39152,2.35476 -2.73791,4.01555c-0.3452,1.65842 -0.02491,3.3548 0.90394,4.77359c0.92885,1.41879 2.35475,2.39154 4.01552,2.73675l-0.51128,2.44848l0,0zm1.81499,-2.92536c-0.09727,0 -0.19455,-0.00119 -0.29064,-0.00475c-1.53029,-0.07711 -2.93958,-0.74498 -3.96926,-1.88025c-1.02968,-1.13646 -1.55401,-2.60388 -1.47809,-4.13655l2.49591,0.12456c-0.04271,0.86361 0.25386,1.69282 0.83513,2.33341c0.5789,0.64059 1.37607,1.01783 2.23968,1.06053c0.86005,0.03915 1.69162,-0.25268 2.33221,-0.83395c0.64177,-0.58009 1.01782,-1.3749 1.06171,-2.23851c0.08897,-1.78298 -1.29066,-3.30616 -3.07362,-3.39513l0.12456,-2.49593c3.16022,0.15659 5.60394,2.85419 5.44735,6.01443c-0.07592,1.53149 -0.74498,2.9396 -1.88024,3.9681c-1.06408,0.96326 -2.41999,1.48403 -3.8447,1.48403l0,0z\",marker:'<ellipse fill=\"#000\" opacity=\"0.2\" ry=\"1.5\" rx=\"4\" cy=\"22.5\" cx=\"12\" /><path style=\\'pointer-events: var(--or-icon-pointer-events, none);\\' d=\"m11.999999,0a8.437501,8.344057 0 0 1 8.437501,8.344057c0,6.500779 -5.798864,6.280799 -8.437501,14.412461c-2.638637,-8.131662 -8.437501,-7.911683 -8.437501,-14.412461a8.437501,8.344057 0 0 1 8.437501,-8.344057z\" />'}}"
|
|
153
|
-
}
|
|
154
|
-
],
|
|
155
|
-
"exports": [
|
|
156
|
-
{
|
|
157
|
-
"kind": "js",
|
|
158
|
-
"name": "default",
|
|
159
|
-
"declaration": {
|
|
160
|
-
"name": "orIconSet",
|
|
161
|
-
"module": "lib/or-icon-set.js"
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
]
|
|
165
|
-
},
|
|
166
5
|
{
|
|
167
6
|
"kind": "javascript-module",
|
|
168
7
|
"path": "src/index.ts",
|
|
@@ -284,18 +123,14 @@
|
|
|
284
123
|
"description": "",
|
|
285
124
|
"name": "OrIcon",
|
|
286
125
|
"members": [
|
|
287
|
-
{
|
|
288
|
-
"kind": "field",
|
|
289
|
-
"name": "styles",
|
|
290
|
-
"static": true,
|
|
291
|
-
"readonly": true
|
|
292
|
-
},
|
|
293
126
|
{
|
|
294
127
|
"kind": "field",
|
|
295
128
|
"name": "icon",
|
|
296
129
|
"type": {
|
|
297
130
|
"text": "string | undefined"
|
|
298
|
-
}
|
|
131
|
+
},
|
|
132
|
+
"attribute": "icon",
|
|
133
|
+
"reflects": true
|
|
299
134
|
},
|
|
300
135
|
{
|
|
301
136
|
"kind": "field",
|
|
@@ -312,37 +147,24 @@
|
|
|
312
147
|
},
|
|
313
148
|
{
|
|
314
149
|
"kind": "method",
|
|
315
|
-
"name": "
|
|
150
|
+
"name": "_updateIcon",
|
|
316
151
|
"privacy": "protected"
|
|
317
|
-
}
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"attributes": [
|
|
318
155
|
{
|
|
319
|
-
"
|
|
320
|
-
"
|
|
321
|
-
|
|
322
|
-
"return": {
|
|
323
|
-
"type": {
|
|
324
|
-
"text": "boolean"
|
|
325
|
-
}
|
|
156
|
+
"name": "icon",
|
|
157
|
+
"type": {
|
|
158
|
+
"text": "string | undefined"
|
|
326
159
|
},
|
|
327
|
-
"
|
|
328
|
-
{
|
|
329
|
-
"name": "changedProperties",
|
|
330
|
-
"type": {
|
|
331
|
-
"text": "PropertyValues"
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
]
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
"kind": "method",
|
|
338
|
-
"name": "_updateIcon",
|
|
339
|
-
"privacy": "protected"
|
|
160
|
+
"fieldName": "icon"
|
|
340
161
|
}
|
|
341
162
|
],
|
|
342
163
|
"superclass": {
|
|
343
164
|
"name": "LitElement",
|
|
344
165
|
"package": "lit"
|
|
345
166
|
},
|
|
167
|
+
"tagName": "or-icon",
|
|
346
168
|
"customElement": true
|
|
347
169
|
}
|
|
348
170
|
],
|
|
@@ -402,6 +224,14 @@
|
|
|
402
224
|
"name": "OrIcon",
|
|
403
225
|
"module": "src/index.ts"
|
|
404
226
|
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"kind": "custom-element-definition",
|
|
230
|
+
"name": "or-icon",
|
|
231
|
+
"declaration": {
|
|
232
|
+
"name": "OrIcon",
|
|
233
|
+
"module": "src/index.ts"
|
|
234
|
+
}
|
|
405
235
|
}
|
|
406
236
|
]
|
|
407
237
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openremote/or-icon",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "Icon component for displaying an icon from an icon set",
|
|
5
5
|
"customElements": "custom-elements.json",
|
|
6
6
|
"main": "dist/umd/index.bundle.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"types": "lib/index.d.ts",
|
|
13
13
|
"scripts": {
|
|
14
|
-
"analyze": "npx cem analyze --config ../custom-elements-manifest.config.
|
|
14
|
+
"analyze": "npx cem analyze --config ../custom-elements-manifest.config.mjs",
|
|
15
15
|
"copyMdiFont": "node mdi-font-copy.js",
|
|
16
16
|
"build": "npx tsc -b",
|
|
17
17
|
"test": "echo \"No tests\" && exit 0",
|