@siemens/ix-icons 3.2.0 → 3.3.0
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/components/index.js +92 -25
- package/components/index.js.map +1 -1
- package/dist/cjs/{index-DUsbo4-K.js → index-HU55KNQP.js} +78 -18
- package/dist/cjs/index-HU55KNQP.js.map +1 -0
- package/dist/cjs/index.cjs.js +31 -12
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/ix-icon.cjs.entry.js +1 -1
- package/dist/cjs/ix-icons.cjs.js +3 -3
- package/dist/cjs/ix-icons.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/icon/icon.js +35 -17
- package/dist/collection/components/icon/icon.js.map +1 -1
- package/dist/collection/components/icon/parser.js +1 -1
- package/dist/collection/components/icon/parser.js.map +1 -1
- package/dist/esm/{index-BiqddxKp.js → index-CyicTMfq.js} +78 -18
- package/dist/esm/index-CyicTMfq.js.map +1 -0
- package/dist/esm/index.js +32 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/ix-icon.entry.js +1 -1
- package/dist/esm/ix-icons.js +4 -4
- package/dist/esm/ix-icons.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/ix-icons/index.esm.js +1 -1
- package/dist/ix-icons/index.esm.js.map +1 -1
- package/dist/ix-icons/ix-icons.esm.js +1 -1
- package/dist/ix-icons/ix-icons.esm.js.map +1 -1
- package/dist/ix-icons/p-9fcb498f.entry.js +2 -0
- package/dist/ix-icons/p-CyicTMfq.js +3 -0
- package/dist/ix-icons/p-CyicTMfq.js.map +1 -0
- package/dist/ix-icons/svg/command-line-filled.svg +1 -0
- package/dist/ix-icons/svg/command-line.svg +1 -0
- package/dist/ix-icons/svg/monitor-filled.svg +1 -1
- package/dist/ix-icons/svg/monitor.svg +1 -1
- package/dist/ix-icons/svg/operating-system-add.svg +1 -0
- package/dist/ix-icons/svg/operating-system-settings.svg +1 -0
- package/dist/ix-icons/svg/palette-filled.svg +1 -0
- package/dist/ix-icons/svg/palette.svg +1 -0
- package/dist/ix-icons/svg/screen-duplicate-filled.svg +1 -1
- package/dist/ix-icons/svg/screen-duplicate.svg +1 -1
- package/dist/ix-icons/svg/screen-filled.svg +1 -1
- package/dist/ix-icons/svg/screen-settings-filled.svg +1 -1
- package/dist/ix-icons/svg/screen-settings.svg +1 -1
- package/dist/ix-icons/svg/screen.svg +1 -1
- package/dist/ix-icons/svg/screens-filled.svg +1 -1
- package/dist/ix-icons/svg/theme-filled.svg +1 -0
- package/dist/ix-icons/svg/theme.svg +1 -0
- package/dist/sample.json +8 -0
- package/dist/types/stencil-public-runtime.d.ts +35 -11
- package/icons/index.d.ts +8 -0
- package/icons/index.js +17 -9
- package/icons/index.mjs +17 -9
- package/icons/package.json +1 -1
- package/package.json +4 -4
- package/svg/command-line-filled.svg +1 -0
- package/svg/command-line.svg +1 -0
- package/svg/monitor-filled.svg +1 -1
- package/svg/monitor.svg +1 -1
- package/svg/operating-system-add.svg +1 -0
- package/svg/operating-system-settings.svg +1 -0
- package/svg/palette-filled.svg +1 -0
- package/svg/palette.svg +1 -0
- package/svg/screen-duplicate-filled.svg +1 -1
- package/svg/screen-duplicate.svg +1 -1
- package/svg/screen-filled.svg +1 -1
- package/svg/screen-settings-filled.svg +1 -1
- package/svg/screen-settings.svg +1 -1
- package/svg/screen.svg +1 -1
- package/svg/screens-filled.svg +1 -1
- package/svg/theme-filled.svg +1 -0
- package/svg/theme.svg +1 -0
- package/dist/cjs/index-DUsbo4-K.js.map +0 -1
- package/dist/esm/index-BiqddxKp.js.map +0 -1
- package/dist/ix-icons/p-6b0af2cb.entry.js +0 -2
- package/dist/ix-icons/p-BiqddxKp.js +0 -3
- package/dist/ix-icons/p-BiqddxKp.js.map +0 -1
- /package/dist/ix-icons/{p-6b0af2cb.entry.js.map → p-9fcb498f.entry.js.map} +0 -0
package/components/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const NAMESPACE = 'ix-icons';
|
|
2
|
-
const BUILD = /* ix-icons */ { hydratedSelectorName: "hydrated", lazyLoad: false, updatable: true};
|
|
2
|
+
const BUILD = /* ix-icons */ { hydratedSelectorName: "hydrated", lazyLoad: false, state: true, updatable: true};
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.38.3 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
@@ -13,6 +13,38 @@ var __export = (target, all) => {
|
|
|
13
13
|
// src/utils/constants.ts
|
|
14
14
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
15
15
|
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
16
|
+
var reWireGetterSetter = (instance, hostRef) => {
|
|
17
|
+
var _a;
|
|
18
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
19
|
+
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
20
|
+
members.map(([memberName, [memberFlags]]) => {
|
|
21
|
+
if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
|
|
22
|
+
const ogValue = instance[memberName];
|
|
23
|
+
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
24
|
+
if (ogDescriptor) {
|
|
25
|
+
Object.defineProperty(instance, memberName, {
|
|
26
|
+
get() {
|
|
27
|
+
return ogDescriptor.get.call(this);
|
|
28
|
+
},
|
|
29
|
+
set(newValue) {
|
|
30
|
+
ogDescriptor.set.call(this, newValue);
|
|
31
|
+
},
|
|
32
|
+
configurable: true,
|
|
33
|
+
enumerable: true
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
function getPropertyDescriptor(obj, memberName) {
|
|
41
|
+
while (obj) {
|
|
42
|
+
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
43
|
+
if (desc == null ? void 0 : desc.get) return desc;
|
|
44
|
+
obj = Object.getPrototypeOf(obj);
|
|
45
|
+
}
|
|
46
|
+
return void 0;
|
|
47
|
+
}
|
|
16
48
|
|
|
17
49
|
// src/client/client-host-ref.ts
|
|
18
50
|
var getHostRef = (ref) => {
|
|
@@ -26,7 +58,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
26
58
|
$flags$: 0,
|
|
27
59
|
$hostElement$: hostElement,
|
|
28
60
|
$cmpMeta$: cmpMeta,
|
|
29
|
-
$instanceValues$: /* @__PURE__ */ new Map()
|
|
61
|
+
$instanceValues$: /* @__PURE__ */ new Map(),
|
|
62
|
+
$serializerValues$: /* @__PURE__ */ new Map()
|
|
30
63
|
};
|
|
31
64
|
{
|
|
32
65
|
hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
|
|
@@ -35,6 +68,9 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
35
68
|
}
|
|
36
69
|
const ref = hostRef;
|
|
37
70
|
hostElement.__stencil__getHostRef = () => ref;
|
|
71
|
+
if (cmpMeta.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state)) {
|
|
72
|
+
reWireGetterSetter(hostElement, hostRef);
|
|
73
|
+
}
|
|
38
74
|
return ref;
|
|
39
75
|
};
|
|
40
76
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
@@ -941,9 +977,17 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
941
977
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
942
978
|
var _a, _b;
|
|
943
979
|
const prototype = Cstr.prototype;
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
cmpMeta.$watchers$
|
|
980
|
+
{
|
|
981
|
+
{
|
|
982
|
+
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
983
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
984
|
+
}
|
|
985
|
+
if (Cstr.deserializers && !cmpMeta.$deserializers$) {
|
|
986
|
+
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
987
|
+
}
|
|
988
|
+
if (Cstr.serializers && !cmpMeta.$serializers$) {
|
|
989
|
+
cmpMeta.$serializers$ = Cstr.serializers;
|
|
990
|
+
}
|
|
947
991
|
}
|
|
948
992
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
949
993
|
members.map(([memberName, [memberFlags]]) => {
|
|
@@ -972,8 +1016,6 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
972
1016
|
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
973
1017
|
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
974
1018
|
newValue = ref.$instanceValues$.get(memberName);
|
|
975
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
976
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
977
1019
|
}
|
|
978
1020
|
origSetter.apply(this, [
|
|
979
1021
|
parsePropertyValue(
|
|
@@ -998,11 +1040,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
998
1040
|
plt.jmp(() => {
|
|
999
1041
|
var _a2;
|
|
1000
1042
|
const propName = attrNameToPropName.get(attrName);
|
|
1001
|
-
|
|
1043
|
+
const hostRef = getHostRef(this);
|
|
1044
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) ;
|
|
1045
|
+
if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
1002
1046
|
this[propName] == newValue) {
|
|
1003
1047
|
return;
|
|
1004
1048
|
} else if (propName == null) {
|
|
1005
|
-
const hostRef = getHostRef(this);
|
|
1006
1049
|
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
1007
1050
|
if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
1008
1051
|
const elm = this;
|
|
@@ -1016,9 +1059,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1016
1059
|
}
|
|
1017
1060
|
return;
|
|
1018
1061
|
}
|
|
1062
|
+
const propFlags = members.find(([m]) => m === propName);
|
|
1063
|
+
if (propFlags && propFlags[1][0] & 4 /* Boolean */) {
|
|
1064
|
+
newValue = newValue === null || newValue === "false" ? false : true;
|
|
1065
|
+
}
|
|
1019
1066
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1020
|
-
|
|
1021
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1067
|
+
if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1022
1068
|
this[propName] = newValue;
|
|
1023
1069
|
}
|
|
1024
1070
|
});
|
|
@@ -1094,7 +1140,7 @@ var connectedCallback = (elm) => {
|
|
|
1094
1140
|
}
|
|
1095
1141
|
if (cmpMeta.$members$) {
|
|
1096
1142
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1097
|
-
if (memberFlags & 31 /* Prop */ && elm.
|
|
1143
|
+
if (memberFlags & 31 /* Prop */ && memberName in elm && elm[memberName] !== Object.prototype[memberName]) {
|
|
1098
1144
|
const value = elm[memberName];
|
|
1099
1145
|
delete elm[memberName];
|
|
1100
1146
|
elm[memberName] = value;
|
|
@@ -1133,6 +1179,8 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
1133
1179
|
}
|
|
1134
1180
|
{
|
|
1135
1181
|
cmpMeta.$watchers$ = Cstr.$watchers$;
|
|
1182
|
+
cmpMeta.$deserializers$ = Cstr.$deserializers$;
|
|
1183
|
+
cmpMeta.$serializers$ = Cstr.$serializers$;
|
|
1136
1184
|
}
|
|
1137
1185
|
const originalConnectedCallback = Cstr.prototype.connectedCallback;
|
|
1138
1186
|
const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
|
|
@@ -1223,7 +1271,7 @@ function parseSVGDataContent(content, element) {
|
|
|
1223
1271
|
try {
|
|
1224
1272
|
content = decodeURI(content);
|
|
1225
1273
|
}
|
|
1226
|
-
catch
|
|
1274
|
+
catch {
|
|
1227
1275
|
// Content is not a valid URI component, which can happen if it's already decoded. Proceed with the original content.
|
|
1228
1276
|
}
|
|
1229
1277
|
const svgDocument = parser.parseFromString(content, 'text/html');
|
|
@@ -1382,16 +1430,36 @@ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends H {
|
|
|
1382
1430
|
this.__registerHost();
|
|
1383
1431
|
}
|
|
1384
1432
|
this.__attachShadow();
|
|
1385
|
-
/**
|
|
1386
|
-
* Size of the icon
|
|
1387
|
-
*/
|
|
1388
|
-
this.size = '24';
|
|
1389
|
-
/**
|
|
1390
|
-
* Only fetch and parse svg data when icon is visible
|
|
1391
|
-
*/
|
|
1392
|
-
this.lazyLoading = false;
|
|
1393
|
-
this.isVisible = false;
|
|
1394
1433
|
}
|
|
1434
|
+
get hostElement() { return this; }
|
|
1435
|
+
/**
|
|
1436
|
+
* Size of the icon
|
|
1437
|
+
*/
|
|
1438
|
+
size = '24';
|
|
1439
|
+
/**
|
|
1440
|
+
* Color of the icon
|
|
1441
|
+
*/
|
|
1442
|
+
color;
|
|
1443
|
+
/**
|
|
1444
|
+
* Use one of our defined icon names e.g. `copy`
|
|
1445
|
+
*
|
|
1446
|
+
* https://ix.siemens.io/docs/icon-library/icons
|
|
1447
|
+
*
|
|
1448
|
+
* or the import variant
|
|
1449
|
+
*
|
|
1450
|
+
* ```
|
|
1451
|
+
* import { rocket } from '@siemens/ix-icons/icons';
|
|
1452
|
+
*
|
|
1453
|
+
* <ix-icon name={rocket}></ix-icon>
|
|
1454
|
+
* ```
|
|
1455
|
+
*/
|
|
1456
|
+
name;
|
|
1457
|
+
/**
|
|
1458
|
+
* Only fetch and parse svg data when icon is visible
|
|
1459
|
+
*/
|
|
1460
|
+
lazyLoading = false;
|
|
1461
|
+
svgContent;
|
|
1462
|
+
isVisible = false;
|
|
1395
1463
|
componentWillLoad() {
|
|
1396
1464
|
this.waitForRendering(() => {
|
|
1397
1465
|
this.isVisible = true;
|
|
@@ -1437,12 +1505,11 @@ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends H {
|
|
|
1437
1505
|
} }, h("div", { key: '570efdb71fcdd0c61b7c854c6ab3662508aae804', class: 'svg-container', innerHTML: this.svgContent, "aria-hidden": "true" })));
|
|
1438
1506
|
}
|
|
1439
1507
|
static get assetsDirs() { return ["svg"]; }
|
|
1440
|
-
get hostElement() { return this; }
|
|
1441
1508
|
static get watchers() { return {
|
|
1442
1509
|
"name": ["loadIconContent"]
|
|
1443
1510
|
}; }
|
|
1444
1511
|
static get style() { return iconCss; }
|
|
1445
|
-
}, [
|
|
1512
|
+
}, [769, "ix-icon", {
|
|
1446
1513
|
"size": [1],
|
|
1447
1514
|
"color": [1],
|
|
1448
1515
|
"name": [1],
|