@siemens/ix-icons 1.0.4 → 1.1.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. package/README.md +39 -0
  2. package/dist/cjs/icon-25b04fc4.js +106 -0
  3. package/dist/cjs/icon-25b04fc4.js.map +1 -0
  4. package/dist/cjs/index-22d7f5a7.js +1481 -0
  5. package/dist/cjs/index-22d7f5a7.js.map +1 -0
  6. package/dist/cjs/index.cjs.js +12 -0
  7. package/dist/cjs/index.cjs.js.map +1 -0
  8. package/dist/cjs/ix-icon.cjs.entry.js +12 -0
  9. package/dist/cjs/ix-icon.cjs.entry.js.map +1 -0
  10. package/dist/cjs/ix-icons.cjs.js +28 -0
  11. package/dist/cjs/ix-icons.cjs.js.map +1 -0
  12. package/dist/cjs/loader.cjs.js +24 -0
  13. package/dist/cjs/loader.cjs.js.map +1 -0
  14. package/dist/collection/collection-manifest.json +12 -0
  15. package/dist/collection/components/icon/icon.css +2519 -0
  16. package/dist/collection/components/icon/icon.js +158 -0
  17. package/dist/collection/components/icon/icon.js.map +1 -0
  18. package/dist/collection/components/icon/resolveIcon.js +44 -0
  19. package/dist/collection/components/icon/resolveIcon.js.map +1 -0
  20. package/dist/collection/components/icon/test/rocker-example.js +5 -0
  21. package/dist/collection/components/icon/test/rocker-example.js.map +1 -0
  22. package/dist/collection/index.js +2 -0
  23. package/dist/collection/index.js.map +1 -0
  24. package/dist/components/icon.js +125 -0
  25. package/dist/components/icon.js.map +1 -0
  26. package/dist/components/index.d.ts +27 -0
  27. package/dist/components/index.js +4 -0
  28. package/dist/components/index.js.map +1 -0
  29. package/dist/components/ix-icon.d.ts +11 -0
  30. package/dist/components/ix-icon.js +8 -0
  31. package/dist/components/ix-icon.js.map +1 -0
  32. package/dist/esm/icon-7cefbfaa.js +104 -0
  33. package/dist/esm/icon-7cefbfaa.js.map +1 -0
  34. package/dist/esm/index-460e19e2.js +1454 -0
  35. package/dist/esm/index-460e19e2.js.map +1 -0
  36. package/dist/esm/index.js +4 -0
  37. package/dist/esm/index.js.map +1 -0
  38. package/dist/esm/ix-icon.entry.js +4 -0
  39. package/dist/esm/ix-icon.entry.js.map +1 -0
  40. package/dist/esm/ix-icons.js +23 -0
  41. package/dist/esm/ix-icons.js.map +1 -0
  42. package/dist/esm/loader.js +20 -0
  43. package/dist/esm/loader.js.map +1 -0
  44. package/dist/esm/polyfills/core-js.js +11 -0
  45. package/dist/esm/polyfills/css-shim.js +1 -0
  46. package/dist/esm/polyfills/dom.js +79 -0
  47. package/dist/esm/polyfills/es5-html-element.js +1 -0
  48. package/dist/esm/polyfills/index.js +34 -0
  49. package/dist/esm/polyfills/system.js +6 -0
  50. package/dist/fonts/ix-icons.eot +0 -0
  51. package/dist/fonts/ix-icons.ttf +0 -0
  52. package/dist/fonts/ix-icons.woff +0 -0
  53. package/dist/fonts/ix-icons.woff2 +0 -0
  54. package/dist/index.cjs.js +1 -0
  55. package/dist/index.js +1 -0
  56. package/dist/ix-icons/index.esm.js +2 -0
  57. package/dist/ix-icons/index.esm.js.map +1 -0
  58. package/dist/ix-icons/ix-icons.esm.js +2 -0
  59. package/dist/ix-icons/ix-icons.esm.js.map +1 -0
  60. package/dist/ix-icons/p-625c25c8.js +3 -0
  61. package/dist/ix-icons/p-625c25c8.js.map +1 -0
  62. package/dist/ix-icons/p-e325c6c2.js +2 -0
  63. package/dist/ix-icons/p-e325c6c2.js.map +1 -0
  64. package/dist/ix-icons/p-e40de2d7.entry.js +2 -0
  65. package/dist/ix-icons/p-e40de2d7.entry.js.map +1 -0
  66. package/dist/types/components/icon/icon.d.ts +24 -0
  67. package/dist/types/components/icon/resolveIcon.d.ts +3 -0
  68. package/dist/types/components/icon/test/rocker-example.d.ts +1 -0
  69. package/dist/types/components.d.ts +65 -0
  70. package/dist/types/index.d.ts +2 -0
  71. package/dist/types/stencil-public-runtime.d.ts +1638 -0
  72. package/icons/index.d.ts +595 -0
  73. package/icons/index.js +595 -0
  74. package/icons/index.mjs +595 -0
  75. package/icons/package.json +8 -0
  76. package/loader/cdn.js +3 -0
  77. package/loader/index.cjs.js +3 -0
  78. package/loader/index.d.ts +21 -0
  79. package/loader/index.es2017.js +3 -0
  80. package/loader/index.js +4 -0
  81. package/loader/package.json +11 -0
  82. package/package.json +37 -15
  83. package/dist/scss/ix-icons.scss +0 -639
@@ -0,0 +1,158 @@
1
+ /*
2
+ * SPDX-FileCopyrightText: 2023 Siemens AG
3
+ *
4
+ * SPDX-License-Identifier: MIT
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import { h, Host } from '@stencil/core';
10
+ import { resolveIcon } from './resolveIcon';
11
+ export class Icon {
12
+ constructor() {
13
+ this.size = undefined;
14
+ this.color = undefined;
15
+ this.name = undefined;
16
+ this.src = undefined;
17
+ this.svgContent = undefined;
18
+ }
19
+ connectedCallback() {
20
+ this.loadIconContent();
21
+ }
22
+ async loadIconContent() {
23
+ this.svgContent = await resolveIcon(this);
24
+ }
25
+ render() {
26
+ const style = {};
27
+ if (this.color) {
28
+ style['color'] = `var(--theme-${this.color})`;
29
+ }
30
+ if (this.name && !this.svgContent) {
31
+ const iconName = this.name;
32
+ return (h(Host, { style: style, class: {
33
+ ['size-12']: this.size === '12',
34
+ ['size-16']: this.size === '16',
35
+ ['size-24']: this.size === '24',
36
+ ['size-32']: this.size === '32',
37
+ } }, h("i", { class: {
38
+ 'glyph': true,
39
+ [`glyph-${iconName}`]: true,
40
+ 'glyph-12': this.size === '12',
41
+ 'glyph-16': this.size === '16',
42
+ 'glyph-24': this.size === '24',
43
+ 'glyph-32': this.size === '32',
44
+ } })));
45
+ }
46
+ return (h(Host, { style: style, class: {
47
+ ['size-12']: this.size === '12',
48
+ ['size-16']: this.size === '16',
49
+ ['size-24']: this.size === '24',
50
+ ['size-32']: this.size === '32',
51
+ } }, this.svgContent ? (h("div", { class: 'svg-container', innerHTML: this.svgContent })) : (h("span", { class: "skeleton-box", style: {
52
+ width: '100%',
53
+ height: '100%',
54
+ } }))));
55
+ }
56
+ static get is() { return "ix-icon"; }
57
+ static get encapsulation() { return "shadow"; }
58
+ static get originalStyleUrls() {
59
+ return {
60
+ "$": ["icon.scss"]
61
+ };
62
+ }
63
+ static get styleUrls() {
64
+ return {
65
+ "$": ["icon.css"]
66
+ };
67
+ }
68
+ static get properties() {
69
+ return {
70
+ "size": {
71
+ "type": "string",
72
+ "mutable": false,
73
+ "complexType": {
74
+ "original": "'12' | '16' | '24' | '32'",
75
+ "resolved": "\"12\" | \"16\" | \"24\" | \"32\"",
76
+ "references": {}
77
+ },
78
+ "required": false,
79
+ "optional": false,
80
+ "docs": {
81
+ "tags": [],
82
+ "text": "Size of the icon"
83
+ },
84
+ "attribute": "size",
85
+ "reflect": false
86
+ },
87
+ "color": {
88
+ "type": "string",
89
+ "mutable": false,
90
+ "complexType": {
91
+ "original": "string",
92
+ "resolved": "string",
93
+ "references": {}
94
+ },
95
+ "required": false,
96
+ "optional": false,
97
+ "docs": {
98
+ "tags": [],
99
+ "text": "Color of the icon"
100
+ },
101
+ "attribute": "color",
102
+ "reflect": false
103
+ },
104
+ "name": {
105
+ "type": "string",
106
+ "mutable": false,
107
+ "complexType": {
108
+ "original": "string",
109
+ "resolved": "string",
110
+ "references": {}
111
+ },
112
+ "required": false,
113
+ "optional": false,
114
+ "docs": {
115
+ "tags": [],
116
+ "text": "Use one of our defined icon names e.g. `copy`."
117
+ },
118
+ "attribute": "name",
119
+ "reflect": true
120
+ },
121
+ "src": {
122
+ "type": "string",
123
+ "mutable": false,
124
+ "complexType": {
125
+ "original": "string",
126
+ "resolved": "string",
127
+ "references": {}
128
+ },
129
+ "required": false,
130
+ "optional": true,
131
+ "docs": {
132
+ "tags": [{
133
+ "name": "internal",
134
+ "text": undefined
135
+ }],
136
+ "text": "Path to the svg"
137
+ },
138
+ "attribute": "src",
139
+ "reflect": false
140
+ }
141
+ };
142
+ }
143
+ static get states() {
144
+ return {
145
+ "svgContent": {}
146
+ };
147
+ }
148
+ static get watchers() {
149
+ return [{
150
+ "propName": "src",
151
+ "methodName": "loadIconContent"
152
+ }, {
153
+ "propName": "name",
154
+ "methodName": "loadIconContent"
155
+ }];
156
+ }
157
+ }
158
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../src/components/icon/icon.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAO5C,MAAM,OAAO,IAAI;;;;;;;;EAyBf,iBAAiB;IACf,IAAI,CAAC,eAAe,EAAE,CAAC;EACzB,CAAC;EAID,KAAK,CAAC,eAAe;IACnB,IAAI,CAAC,UAAU,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;EAC5C,CAAC;EAED,MAAM;IACJ,MAAM,KAAK,GAEP,EAAE,CAAC;IAEP,IAAI,IAAI,CAAC,KAAK,EAAE;MACd,KAAK,CAAC,OAAO,CAAC,GAAG,eAAe,IAAI,CAAC,KAAK,GAAG,CAAC;KAC/C;IAED,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;MACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;MAC3B,OAAO,CACL,EAAC,IAAI,IACH,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE;UACL,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;UAC/B,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;UAC/B,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;UAC/B,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;SAChC;QAED,SACE,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;YACb,CAAC,SAAS,QAAQ,EAAE,CAAC,EAAE,IAAI;YAC3B,UAAU,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;YAC9B,UAAU,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;YAC9B,UAAU,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;YAC9B,UAAU,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;WAC/B,GACE,CACA,CACR,CAAC;KACH;IAED,OAAO,CACL,EAAC,IAAI,IACH,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE;QACL,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;QAC/B,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;QAC/B,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;QAC/B,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;OAChC,IAEA,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CACjB,WAAK,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,GAAQ,CAChE,CAAC,CAAC,CAAC,CACF,YACE,KAAK,EAAC,cAAc,EACpB,KAAK,EAAE;QACL,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;OACf,GACK,CACT,CACI,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { resolveIcon } from './resolveIcon';\n\n@Component({\n tag: 'ix-icon',\n styleUrl: 'icon.scss',\n shadow: true,\n})\nexport class Icon {\n /**\n * Size of the icon\n */\n @Prop() size: '12' | '16' | '24' | '32';\n\n /**\n * Color of the icon\n */\n @Prop() color: string;\n\n /**\n * Use one of our defined icon names e.g. `copy`.\n */\n @Prop({ reflect: true }) name: string;\n\n /**\n * Path to the svg\n *\n * @internal\n */\n @Prop() src?: string;\n\n @State() svgContent?: string;\n\n connectedCallback() {\n this.loadIconContent();\n }\n\n @Watch('src')\n @Watch('name')\n async loadIconContent() {\n this.svgContent = await resolveIcon(this);\n }\n\n render() {\n const style: {\n [key: string]: string;\n } = {};\n\n if (this.color) {\n style['color'] = `var(--theme-${this.color})`;\n }\n\n if (this.name && !this.svgContent) {\n const iconName = this.name;\n return (\n <Host\n style={style}\n class={{\n ['size-12']: this.size === '12',\n ['size-16']: this.size === '16',\n ['size-24']: this.size === '24',\n ['size-32']: this.size === '32',\n }}\n >\n <i\n class={{\n 'glyph': true,\n [`glyph-${iconName}`]: true,\n 'glyph-12': this.size === '12',\n 'glyph-16': this.size === '16',\n 'glyph-24': this.size === '24',\n 'glyph-32': this.size === '32',\n }}\n ></i>\n </Host>\n );\n }\n\n return (\n <Host\n style={style}\n class={{\n ['size-12']: this.size === '12',\n ['size-16']: this.size === '16',\n ['size-24']: this.size === '24',\n ['size-32']: this.size === '32',\n }}\n >\n {this.svgContent ? (\n <div class={'svg-container'} innerHTML={this.svgContent}></div>\n ) : (\n <span\n class=\"skeleton-box\"\n style={{\n width: '100%',\n height: '100%',\n }}\n ></span>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,44 @@
1
+ /*
2
+ * COPYRIGHT (c) Siemens AG 2018-2023 ALL RIGHTS RESERVED.
3
+ */
4
+ export const isSvgDataUrl = (url) => url.startsWith('data:image/svg+xml');
5
+ let parser = null;
6
+ function parseSVGDataContent(content) {
7
+ if (typeof window['DOMParser'] === 'undefined') {
8
+ console.warn('DOMParser not supported by your browser.');
9
+ return;
10
+ }
11
+ if (parser === null) {
12
+ parser = new window['DOMParser']();
13
+ }
14
+ const svgDocument = parser.parseFromString(content, 'text/html');
15
+ const svgElement = svgDocument.querySelector('svg');
16
+ if (!svgElement) {
17
+ throw Error('No valid svg data provided');
18
+ }
19
+ return svgElement.outerHTML;
20
+ }
21
+ async function fetchSVG(url) {
22
+ const response = await fetch(url);
23
+ const responseText = await response.text();
24
+ if (!response.ok) {
25
+ console.error(responseText);
26
+ return '';
27
+ }
28
+ return responseText;
29
+ }
30
+ export async function resolveIcon(icon) {
31
+ const { src, name } = icon;
32
+ if (name) {
33
+ if (isSvgDataUrl(name)) {
34
+ return parseSVGDataContent(name);
35
+ }
36
+ //Fallback return undefined to render web font icon
37
+ return;
38
+ }
39
+ if (isSvgDataUrl(src)) {
40
+ return parseSVGDataContent(src);
41
+ }
42
+ return fetchSVG(src);
43
+ }
44
+ //# sourceMappingURL=resolveIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveIcon.js","sourceRoot":"","sources":["../../../src/components/icon/resolveIcon.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAElF,IAAI,MAAM,GAAG,IAAI,CAAC;AAElB,SAAS,mBAAmB,CAAC,OAAe;EAC1C,IAAI,OAAO,MAAM,CAAC,WAAW,CAAC,KAAK,WAAW,EAAE;IAC9C,OAAO,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;IACzD,OAAO;GACR;EAED,IAAI,MAAM,KAAK,IAAI,EAAE;IACnB,MAAM,GAAG,IAAI,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;GACpC;EAED,MAAM,WAAW,GAAG,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;EACjE,MAAM,UAAU,GAAG,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;EAEpD,IAAI,CAAC,UAAU,EAAE;IACf,MAAM,KAAK,CAAC,4BAA4B,CAAC,CAAC;GAC3C;EAED,OAAO,UAAU,CAAC,SAAS,CAAC;AAC9B,CAAC;AAED,KAAK,UAAU,QAAQ,CAAC,GAAW;EACjC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;EAClC,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;EAE3C,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;IAChB,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAC5B,OAAO,EAAE,CAAC;GACX;EAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAU;EAC1C,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;EAE3B,IAAI,IAAI,EAAE;IACR,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE;MACtB,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;KAClC;IAED,mDAAmD;IACnD,OAAO;GACR;EAED,IAAI,YAAY,CAAC,GAAG,CAAC,EAAE;IACrB,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAC;GACjC;EAED,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC;AACvB,CAAC","sourcesContent":["/*\n * COPYRIGHT (c) Siemens AG 2018-2023 ALL RIGHTS RESERVED.\n */\n\nimport { Icon } from './icon';\n\nexport const isSvgDataUrl = (url: string) => url.startsWith('data:image/svg+xml');\n\nlet parser = null;\n\nfunction parseSVGDataContent(content: string) {\n if (typeof window['DOMParser'] === 'undefined') {\n console.warn('DOMParser not supported by your browser.');\n return;\n }\n\n if (parser === null) {\n parser = new window['DOMParser']();\n }\n\n const svgDocument = parser.parseFromString(content, 'text/html');\n const svgElement = svgDocument.querySelector('svg');\n\n if (!svgElement) {\n throw Error('No valid svg data provided');\n }\n\n return svgElement.outerHTML;\n}\n\nasync function fetchSVG(url: string) {\n const response = await fetch(url);\n const responseText = await response.text();\n\n if (!response.ok) {\n console.error(responseText);\n return '';\n }\n\n return responseText;\n}\n\nexport async function resolveIcon(icon: Icon) {\n const { src, name } = icon;\n\n if (name) {\n if (isSvgDataUrl(name)) {\n return parseSVGDataContent(name);\n }\n\n //Fallback return undefined to render web font icon\n return;\n }\n\n if (isSvgDataUrl(src)) {\n return parseSVGDataContent(src);\n }\n\n return fetchSVG(src);\n}\n"]}
@@ -0,0 +1,5 @@
1
+ /*
2
+ * COPYRIGHT (c) Siemens AG 2018-2023 ALL RIGHTS RESERVED.
3
+ */
4
+ export const rocket = "data:image/svg+xml;utf8,<?xml version='1.0' encoding='UTF-8'?><svg width='512px' height='512px' viewBox='0 0 512 512' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><title>rocket</title><g id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'><g id='icon' transform='translate(42.666667, 64.000000)'><path d='M405.333333,1.42108547e-14 C396.316305,122.794806 364.316305,211.683695 309.333333,266.666667 C299.582265,276.417735 288.905446,285.33185 277.302879,293.409011 L277.302464,341.234872 L213.302464,405.234872 L174.248,336.891 L68.525,231.157 L7.10542736e-15,192 L64,128 L112.079613,128.000404 C120.083859,116.387258 128.94621,105.720457 138.666667,96 C193.649638,41.0170286 282.538527,9.01702859 405.333333,1.42108547e-14 Z M357.333333,47.9786667 L348.203556,49.3631108 C266.32942,62.2476147 206.763982,88.2424635 168.836556,126.169889 C146.004433,149.002012 128.637057,178.732412 116.876114,215.881246 L116.096,218.389333 L187.584,289.877333 L191.120585,288.76541 C224.531258,277.548675 251.975141,261.807487 273.818948,241.632769 L279.163444,236.496777 C317.09087,198.569351 343.085719,139.003914 355.970222,57.1297769 L357.333333,47.9786667 Z M75.9901363,269.368015 L30.7353023,314.622849 L0.565412939,284.452959 L45.8202469,239.198125 L75.9901363,269.368015 Z M121.24497,314.622849 L45.8202469,390.047572 L15.6503576,359.877683 L91.0750809,284.452959 L121.24497,314.622849 Z M136.329915,329.707793 L166.499804,359.877683 L121.24497,405.132517 L91.0750809,374.962627 L136.329915,329.707793 Z M245.333333,128 C263.006445,128 277.333333,142.326888 277.333333,160 C277.333333,177.673112 263.006445,192 245.333333,192 C227.660221,192 213.333333,177.673112 213.333333,160 C213.333333,142.326888 227.660221,128 245.333333,128 Z' id='Combined-Shape'/></g></g></svg>";
5
+ //# sourceMappingURL=rocker-example.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rocker-example.js","sourceRoot":"","sources":["../../../../src/components/icon/test/rocker-example.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GACjB,2yDAA2yD,CAAC","sourcesContent":["/*\n * COPYRIGHT (c) Siemens AG 2018-2023 ALL RIGHTS RESERVED.\n */\nexport const rocket =\n \"data:image/svg+xml;utf8,<?xml version='1.0' encoding='UTF-8'?><svg width='512px' height='512px' viewBox='0 0 512 512' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><title>rocket</title><g id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'><g id='icon' transform='translate(42.666667, 64.000000)'><path d='M405.333333,1.42108547e-14 C396.316305,122.794806 364.316305,211.683695 309.333333,266.666667 C299.582265,276.417735 288.905446,285.33185 277.302879,293.409011 L277.302464,341.234872 L213.302464,405.234872 L174.248,336.891 L68.525,231.157 L7.10542736e-15,192 L64,128 L112.079613,128.000404 C120.083859,116.387258 128.94621,105.720457 138.666667,96 C193.649638,41.0170286 282.538527,9.01702859 405.333333,1.42108547e-14 Z M357.333333,47.9786667 L348.203556,49.3631108 C266.32942,62.2476147 206.763982,88.2424635 168.836556,126.169889 C146.004433,149.002012 128.637057,178.732412 116.876114,215.881246 L116.096,218.389333 L187.584,289.877333 L191.120585,288.76541 C224.531258,277.548675 251.975141,261.807487 273.818948,241.632769 L279.163444,236.496777 C317.09087,198.569351 343.085719,139.003914 355.970222,57.1297769 L357.333333,47.9786667 Z M75.9901363,269.368015 L30.7353023,314.622849 L0.565412939,284.452959 L45.8202469,239.198125 L75.9901363,269.368015 Z M121.24497,314.622849 L45.8202469,390.047572 L15.6503576,359.877683 L91.0750809,284.452959 L121.24497,314.622849 Z M136.329915,329.707793 L166.499804,359.877683 L121.24497,405.132517 L91.0750809,374.962627 L136.329915,329.707793 Z M245.333333,128 C263.006445,128 277.333333,142.326888 277.333333,160 C277.333333,177.673112 263.006445,192 245.333333,192 C227.660221,192 213.333333,177.673112 213.333333,160 C213.333333,142.326888 227.660221,128 245.333333,128 Z' id='Combined-Shape'/></g></g></svg>\";\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './components/icon/icon';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,wBAAwB,CAAC","sourcesContent":["export type { Components, JSX } from './components';\nexport * from './components/icon/icon';\n"]}
@@ -0,0 +1,125 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+
3
+ /*
4
+ * COPYRIGHT (c) Siemens AG 2018-2023 ALL RIGHTS RESERVED.
5
+ */
6
+ const isSvgDataUrl = (url) => url.startsWith('data:image/svg+xml');
7
+ let parser = null;
8
+ function parseSVGDataContent(content) {
9
+ if (typeof window['DOMParser'] === 'undefined') {
10
+ console.warn('DOMParser not supported by your browser.');
11
+ return;
12
+ }
13
+ if (parser === null) {
14
+ parser = new window['DOMParser']();
15
+ }
16
+ const svgDocument = parser.parseFromString(content, 'text/html');
17
+ const svgElement = svgDocument.querySelector('svg');
18
+ if (!svgElement) {
19
+ throw Error('No valid svg data provided');
20
+ }
21
+ return svgElement.outerHTML;
22
+ }
23
+ async function fetchSVG(url) {
24
+ const response = await fetch(url);
25
+ const responseText = await response.text();
26
+ if (!response.ok) {
27
+ console.error(responseText);
28
+ return '';
29
+ }
30
+ return responseText;
31
+ }
32
+ async function resolveIcon(icon) {
33
+ const { src, name } = icon;
34
+ if (name) {
35
+ if (isSvgDataUrl(name)) {
36
+ return parseSVGDataContent(name);
37
+ }
38
+ //Fallback return undefined to render web font icon
39
+ return;
40
+ }
41
+ if (isSvgDataUrl(src)) {
42
+ return parseSVGDataContent(src);
43
+ }
44
+ return fetchSVG(src);
45
+ }
46
+
47
+ const iconCss = ".glyph{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1;font-family:\"ix-icons\";font-size:1.5rem;font-weight:500}.glyph-lg{font-size:1.3333333333em;line-height:0.75em;vertical-align:-15%}.glyph-2x{font-size:2em}.glyph-3x{font-size:3em}.glyph-4x{font-size:4em}.glyph-5x{font-size:5em}.glyph-fw{width:1.2857142857em;text-align:center}.glyph-12{font-size:0.75rem}.glyph-16{font-size:1rem}.glyph-24{font-size:1.5rem}.glyph-32{font-size:2rem}.glyph-about-filled:before{content:\"\\ea01\"}.glyph-about:before{content:\"\\ea02\"}.glyph-add-circle-filled:before{content:\"\\ea03\"}.glyph-add-circle:before{content:\"\\ea04\"}.glyph-add-document-note:before{content:\"\\ea05\"}.glyph-add-eye-filled:before{content:\"\\ea06\"}.glyph-add-eye:before{content:\"\\ea07\"}.glyph-add-task-list:before{content:\"\\ea08\"}.glyph-add-task:before{content:\"\\ea09\"}.glyph-add:before{content:\"\\ea0a\"}.glyph-ai:before{content:\"\\ea0b\"}.glyph-alarm-bell-cancelled-filled:before{content:\"\\ea0c\"}.glyph-alarm-bell-cancelled:before{content:\"\\ea0d\"}.glyph-alarm-bell-filled:before{content:\"\\ea0e\"}.glyph-alarm-bell:before{content:\"\\ea0f\"}.glyph-alarm-clock-filled:before{content:\"\\ea10\"}.glyph-alarm-clock:before{content:\"\\ea11\"}.glyph-alarm-filled:before{content:\"\\ea12\"}.glyph-alarm:before{content:\"\\ea13\"}.glyph-analyze:before{content:\"\\ea14\"}.glyph-anomaly-found:before{content:\"\\ea15\"}.glyph-anomaly:before{content:\"\\ea16\"}.glyph-app-menu:before{content:\"\\ea17\"}.glyph-apps:before{content:\"\\ea18\"}.glyph-arrow-down-right:before{content:\"\\ea19\"}.glyph-arrow-down:before{content:\"\\ea1a\"}.glyph-arrow-left:before{content:\"\\ea1b\"}.glyph-arrow-right:before{content:\"\\ea1c\"}.glyph-arrow-up:before{content:\"\\ea1d\"}.glyph-attach:before{content:\"\\ea1e\"}.glyph-attachment-upload:before{content:\"\\ea1f\"}.glyph-audio-description1:before{content:\"\\ea20\"}.glyph-audio-description2:before{content:\"\\ea21\"}.glyph-audit-report:before{content:\"\\ea22\"}.glyph-average:before{content:\"\\ea23\"}.glyph-bar-code:before{content:\"\\ea24\"}.glyph-barchart:before{content:\"\\ea25\"}.glyph-battery-check:before{content:\"\\ea26\"}.glyph-battery-empty-question:before{content:\"\\ea27\"}.glyph-battery-empty:before{content:\"\\ea28\"}.glyph-battery-exclamation:before{content:\"\\ea29\"}.glyph-battery-full-check:before{content:\"\\ea2a\"}.glyph-battery-full:before{content:\"\\ea2b\"}.glyph-battery-half:before{content:\"\\ea2c\"}.glyph-battery-low:before{content:\"\\ea2d\"}.glyph-battery-quarter:before{content:\"\\ea2e\"}.glyph-battery-slash:before{content:\"\\ea2f\"}.glyph-battery-three-quarter:before{content:\"\\ea30\"}.glyph-battery-xmark:before{content:\"\\ea31\"}.glyph-bezier-curve:before{content:\"\\ea32\"}.glyph-binoculars-filled:before{content:\"\\ea33\"}.glyph-binoculars:before{content:\"\\ea34\"}.glyph-book:before{content:\"\\ea35\"}.glyph-bookmark-filled:before{content:\"\\ea36\"}.glyph-bookmark:before{content:\"\\ea37\"}.glyph-building1-filled:before{content:\"\\ea38\"}.glyph-building1:before{content:\"\\ea39\"}.glyph-building2-filled:before{content:\"\\ea3a\"}.glyph-building2:before{content:\"\\ea3b\"}.glyph-bulb-filled:before{content:\"\\ea3c\"}.glyph-bulb:before{content:\"\\ea3d\"}.glyph-calendar-filled:before{content:\"\\ea3e\"}.glyph-calendar-settings:before{content:\"\\ea3f\"}.glyph-calendar:before{content:\"\\ea40\"}.glyph-cancel:before{content:\"\\ea41\"}.glyph-cancelled:before{content:\"\\ea42\"}.glyph-capacity-filled:before{content:\"\\ea43\"}.glyph-capacity:before{content:\"\\ea44\"}.glyph-capture:before{content:\"\\ea45\"}.glyph-card-layout-filled:before{content:\"\\ea46\"}.glyph-card-layout:before{content:\"\\ea47\"}.glyph-chart-cursor:before{content:\"\\ea48\"}.glyph-chart-curve-linear:before{content:\"\\ea49\"}.glyph-chart-curve-spline:before{content:\"\\ea4a\"}.glyph-chart-curve-stepped:before{content:\"\\ea4b\"}.glyph-chart-labels-filled:before{content:\"\\ea4c\"}.glyph-chart-labels:before{content:\"\\ea4d\"}.glyph-checkbox-component-checked:before{content:\"\\ea4e\"}.glyph-checkbox-component-mixed:before{content:\"\\ea4f\"}.glyph-checkbox-component-unchecked:before{content:\"\\ea50\"}.glyph-checkbox-filled:before{content:\"\\ea51\"}.glyph-checkbox:before{content:\"\\ea52\"}.glyph-checkboxes-filled:before{content:\"\\ea53\"}.glyph-checkboxes:before{content:\"\\ea54\"}.glyph-chevron-down-small:before{content:\"\\ea55\"}.glyph-chevron-down:before{content:\"\\ea56\"}.glyph-chevron-left-small:before{content:\"\\ea57\"}.glyph-chevron-left:before{content:\"\\ea58\"}.glyph-chevron-right-small:before{content:\"\\ea59\"}.glyph-chevron-right:before{content:\"\\ea5a\"}.glyph-chevron-up-small:before{content:\"\\ea5b\"}.glyph-chevron-up:before{content:\"\\ea5c\"}.glyph-circle-dot-filled:before{content:\"\\ea5d\"}.glyph-circle-dot:before{content:\"\\ea5e\"}.glyph-circle-filled:before{content:\"\\ea5f\"}.glyph-circle-pause-filled:before{content:\"\\ea60\"}.glyph-circle-pause:before{content:\"\\ea61\"}.glyph-circle-play-filled:before{content:\"\\ea62\"}.glyph-circle-play:before{content:\"\\ea63\"}.glyph-circle-stop-filled:before{content:\"\\ea64\"}.glyph-circle-stop:before{content:\"\\ea65\"}.glyph-circle:before{content:\"\\ea66\"}.glyph-clear-filter-filled:before{content:\"\\ea67\"}.glyph-clear-filter:before{content:\"\\ea68\"}.glyph-clear:before{content:\"\\ea69\"}.glyph-clock-filled:before{content:\"\\ea6a\"}.glyph-clock:before{content:\"\\ea6b\"}.glyph-close-small:before{content:\"\\ea6c\"}.glyph-close:before{content:\"\\ea6d\"}.glyph-cloud-download-add-filled:before{content:\"\\ea6e\"}.glyph-cloud-download-add:before{content:\"\\ea6f\"}.glyph-cloud-download-filled:before{content:\"\\ea70\"}.glyph-cloud-download-list-filled:before{content:\"\\ea71\"}.glyph-cloud-download-list:before{content:\"\\ea72\"}.glyph-cloud-download:before{content:\"\\ea73\"}.glyph-cloud-filled:before{content:\"\\ea74\"}.glyph-cloud-new-filled:before{content:\"\\ea75\"}.glyph-cloud-new:before{content:\"\\ea76\"}.glyph-cloud-success-filled:before{content:\"\\ea77\"}.glyph-cloud-success:before{content:\"\\ea78\"}.glyph-cloud-upload-filled:before{content:\"\\ea79\"}.glyph-cloud-upload:before{content:\"\\ea7a\"}.glyph-cloud:before{content:\"\\ea7b\"}.glyph-code:before{content:\"\\ea7c\"}.glyph-cogwheel-filled:before{content:\"\\ea7d\"}.glyph-cogwheel:before{content:\"\\ea7e\"}.glyph-combine:before{content:\"\\ea7f\"}.glyph-compact-disc-filled:before{content:\"\\ea80\"}.glyph-compact-disc:before{content:\"\\ea81\"}.glyph-compound-block:before{content:\"\\ea82\"}.glyph-configuration:before{content:\"\\ea83\"}.glyph-configure-filled:before{content:\"\\ea84\"}.glyph-configure:before{content:\"\\ea85\"}.glyph-connected:before{content:\"\\ea86\"}.glyph-connector-chart-filled:before{content:\"\\ea87\"}.glyph-connector-chart:before{content:\"\\ea88\"}.glyph-connector-filled:before{content:\"\\ea89\"}.glyph-connector-hex-filled:before{content:\"\\ea8a\"}.glyph-connector-hex:before{content:\"\\ea8b\"}.glyph-connector-rect-filled:before{content:\"\\ea8c\"}.glyph-connector-rect:before{content:\"\\ea8d\"}.glyph-connector-rhomb-filled:before{content:\"\\ea8e\"}.glyph-connector-rhomb:before{content:\"\\ea8f\"}.glyph-connector:before{content:\"\\ea90\"}.glyph-contact-details-filled:before{content:\"\\ea91\"}.glyph-contact-details:before{content:\"\\ea92\"}.glyph-context-menu:before{content:\"\\ea93\"}.glyph-controlled-device:before{content:\"\\ea94\"}.glyph-controller-device:before{content:\"\\ea95\"}.glyph-copy:before{content:\"\\ea96\"}.glyph-corner-arrow-up-left:before{content:\"\\ea97\"}.glyph-couch-filled:before{content:\"\\ea98\"}.glyph-couch:before{content:\"\\ea99\"}.glyph-create-plant-filled:before{content:\"\\ea9a\"}.glyph-create-plant:before{content:\"\\ea9b\"}.glyph-cut:before{content:\"\\ea9c\"}.glyph-cycle:before{content:\"\\ea9d\"}.glyph-data-egress:before{content:\"\\ea9e\"}.glyph-data-ingress-egress:before{content:\"\\ea9f\"}.glyph-data-ingress:before{content:\"\\eaa0\"}.glyph-database-filled:before{content:\"\\eaa1\"}.glyph-database:before{content:\"\\eaa2\"}.glyph-details:before{content:\"\\eaa3\"}.glyph-diagram-module-library:before{content:\"\\eaa4\"}.glyph-diagram-module-new:before{content:\"\\eaa5\"}.glyph-diagram-module:before{content:\"\\eaa6\"}.glyph-diamond:before{content:\"\\eaa7\"}.glyph-disconnected:before{content:\"\\eaa8\"}.glyph-disk-filled:before{content:\"\\eaa9\"}.glyph-disk-pen:before{content:\"\\eaaa\"}.glyph-disk:before{content:\"\\eaab\"}.glyph-doc-document:before{content:\"\\eaac\"}.glyph-document-bulk:before{content:\"\\eaad\"}.glyph-document-info:before{content:\"\\eaae\"}.glyph-document-link:before{content:\"\\eaaf\"}.glyph-document-management:before{content:\"\\eab0\"}.glyph-document-reference:before{content:\"\\eab1\"}.glyph-document-settings:before{content:\"\\eab2\"}.glyph-document-success:before{content:\"\\eab3\"}.glyph-document:before{content:\"\\eab4\"}.glyph-double-check:before{content:\"\\eab5\"}.glyph-double-chevron-down:before{content:\"\\eab6\"}.glyph-double-chevron-left:before{content:\"\\eab7\"}.glyph-double-chevron-right:before{content:\"\\eab8\"}.glyph-double-chevron-up:before{content:\"\\eab9\"}.glyph-doublet-filled:before{content:\"\\eaba\"}.glyph-doublet:before{content:\"\\eabb\"}.glyph-download-add:before{content:\"\\eabc\"}.glyph-download-list:before{content:\"\\eabd\"}.glyph-download:before{content:\"\\eabe\"}.glyph-drop:before{content:\"\\eabf\"}.glyph-duplicate-document:before{content:\"\\eac0\"}.glyph-duplicate:before{content:\"\\eac1\"}.glyph-e-mail-filled:before{content:\"\\eac2\"}.glyph-e-mail:before{content:\"\\eac3\"}.glyph-earth-filled:before{content:\"\\eac4\"}.glyph-earth:before{content:\"\\eac5\"}.glyph-edit-plant:before{content:\"\\eac6\"}.glyph-ellipse-arc:before{content:\"\\eac7\"}.glyph-ellipse-filled:before{content:\"\\eac8\"}.glyph-ellipse:before{content:\"\\eac9\"}.glyph-error-filled:before{content:\"\\eaca\"}.glyph-error:before{content:\"\\eacb\"}.glyph-explore-filled:before{content:\"\\eacc\"}.glyph-explore:before{content:\"\\eacd\"}.glyph-export:before{content:\"\\eace\"}.glyph-eye-cancelled-filled:before{content:\"\\eacf\"}.glyph-eye-cancelled:before{content:\"\\ead0\"}.glyph-eye-filled:before{content:\"\\ead1\"}.glyph-eye:before{content:\"\\ead2\"}.glyph-filter-filled:before{content:\"\\ead3\"}.glyph-filter-outline:before{content:\"\\ead4\"}.glyph-filter:before{content:\"\\ead5\"}.glyph-flag-filled:before{content:\"\\ead6\"}.glyph-flag:before{content:\"\\ead7\"}.glyph-folder-down-filled:before{content:\"\\ead8\"}.glyph-folder-down:before{content:\"\\ead9\"}.glyph-folder-filled:before{content:\"\\eada\"}.glyph-folder-new-filled:before{content:\"\\eadb\"}.glyph-folder-new-outline:before{content:\"\\eadc\"}.glyph-folder-new:before{content:\"\\eadd\"}.glyph-folder-open-filled:before{content:\"\\eade\"}.glyph-folder-open-outline:before{content:\"\\eadf\"}.glyph-folder-open:before{content:\"\\eae0\"}.glyph-folder-outline:before{content:\"\\eae1\"}.glyph-folder-up-filled:before{content:\"\\eae2\"}.glyph-folder-up:before{content:\"\\eae3\"}.glyph-folder:before{content:\"\\eae4\"}.glyph-full-screeen-exit:before{content:\"\\eae5\"}.glyph-full-screeen:before{content:\"\\eae6\"}.glyph-function-block-library:before{content:\"\\eae7\"}.glyph-function-block-new:before{content:\"\\eae8\"}.glyph-function-block:before{content:\"\\eae9\"}.glyph-function-diagram-new:before{content:\"\\eaea\"}.glyph-function-diagram:before{content:\"\\eaeb\"}.glyph-gauge-filled:before{content:\"\\eaec\"}.glyph-gauge:before{content:\"\\eaed\"}.glyph-gaugechart:before{content:\"\\eaee\"}.glyph-global-plant-filled:before{content:\"\\eaef\"}.glyph-global-plant:before{content:\"\\eaf0\"}.glyph-globe-filled:before{content:\"\\eaf1\"}.glyph-globe:before{content:\"\\eaf2\"}.glyph-goto:before{content:\"\\eaf3\"}.glyph-group:before{content:\"\\eaf4\"}.glyph-hardware-cabinet:before{content:\"\\eaf5\"}.glyph-health-filled:before{content:\"\\eaf6\"}.glyph-health:before{content:\"\\eaf7\"}.glyph-heart-filled:before{content:\"\\eaf8\"}.glyph-heart:before{content:\"\\eaf9\"}.glyph-hexagon-vertical-bars-database-filled:before{content:\"\\eafa\"}.glyph-hexagon-vertical-bars-database:before{content:\"\\eafb\"}.glyph-hexagon-vertical-bars-filled:before{content:\"\\eafc\"}.glyph-hexagon-vertical-bars:before{content:\"\\eafd\"}.glyph-hierarchy:before{content:\"\\eafe\"}.glyph-highlight-filled:before{content:\"\\eaff\"}.glyph-highlight:before{content:\"\\eb00\"}.glyph-history-list:before{content:\"\\eb01\"}.glyph-history:before{content:\"\\eb02\"}.glyph-home-filled:before{content:\"\\eb03\"}.glyph-home:before{content:\"\\eb04\"}.glyph-hourglass:before{content:\"\\eb05\"}.glyph-image-filled:before{content:\"\\eb06\"}.glyph-image:before{content:\"\\eb07\"}.glyph-import:before{content:\"\\eb08\"}.glyph-info-feed:before{content:\"\\eb09\"}.glyph-info-filled:before{content:\"\\eb0a\"}.glyph-info:before{content:\"\\eb0b\"}.glyph-ingestion-report:before{content:\"\\eb0c\"}.glyph-ingestion:before{content:\"\\eb0d\"}.glyph-ink-pen:before{content:\"\\eb0e\"}.glyph-inquiry-filled:before{content:\"\\eb0f\"}.glyph-inquiry-mail:before{content:\"\\eb10\"}.glyph-inquiry:before{content:\"\\eb11\"}.glyph-item-details-filled:before{content:\"\\eb12\"}.glyph-item-details:before{content:\"\\eb13\"}.glyph-label-filled:before{content:\"\\eb14\"}.glyph-label:before{content:\"\\eb15\"}.glyph-language-filled:before{content:\"\\eb16\"}.glyph-language:before{content:\"\\eb17\"}.glyph-layers-filled:before{content:\"\\eb18\"}.glyph-layers:before{content:\"\\eb19\"}.glyph-leaf:before{content:\"\\eb1a\"}.glyph-legal:before{content:\"\\eb1b\"}.glyph-library-new:before{content:\"\\eb1c\"}.glyph-library:before{content:\"\\eb1d\"}.glyph-license:before{content:\"\\eb1e\"}.glyph-line-diagonal:before{content:\"\\eb1f\"}.glyph-link:before{content:\"\\eb20\"}.glyph-list:before{content:\"\\eb21\"}.glyph-live-schedule:before{content:\"\\eb22\"}.glyph-location-filled:before{content:\"\\eb23\"}.glyph-location-outline:before{content:\"\\eb24\"}.glyph-location:before{content:\"\\eb25\"}.glyph-lock-filled:before{content:\"\\eb26\"}.glyph-lock-key-filled:before{content:\"\\eb27\"}.glyph-lock-key:before{content:\"\\eb28\"}.glyph-lock:before{content:\"\\eb29\"}.glyph-log-in:before{content:\"\\eb2a\"}.glyph-log-out:before{content:\"\\eb2b\"}.glyph-log:before{content:\"\\eb2c\"}.glyph-logic-diagram:before{content:\"\\eb2d\"}.glyph-lower-limit:before{content:\"\\eb2e\"}.glyph-mail-filled:before{content:\"\\eb2f\"}.glyph-mail:before{content:\"\\eb30\"}.glyph-maintenance-documents:before{content:\"\\eb31\"}.glyph-maintenance-info:before{content:\"\\eb32\"}.glyph-maintenance-warning-filled:before{content:\"\\eb33\"}.glyph-maintenance-warning:before{content:\"\\eb34\"}.glyph-maintenance:before{content:\"\\eb35\"}.glyph-mandatory-done:before{content:\"\\eb36\"}.glyph-mandatory:before{content:\"\\eb37\"}.glyph-map:before{content:\"\\eb38\"}.glyph-maximize:before{content:\"\\eb39\"}.glyph-microphone-filled:before{content:\"\\eb3a\"}.glyph-microphone:before{content:\"\\eb3b\"}.glyph-minimize:before{content:\"\\eb3c\"}.glyph-minus:before{content:\"\\eb3d\"}.glyph-mix:before{content:\"\\eb3e\"}.glyph-monitor-filled:before{content:\"\\eb3f\"}.glyph-monitor-trend:before{content:\"\\eb40\"}.glyph-monitor:before{content:\"\\eb41\"}.glyph-moon-filled:before{content:\"\\eb42\"}.glyph-moon:before{content:\"\\eb43\"}.glyph-more-menu:before{content:\"\\eb44\"}.glyph-mouse-click-filled:before{content:\"\\eb45\"}.glyph-mouse-click:before{content:\"\\eb46\"}.glyph-mouse-select-filled:before{content:\"\\eb47\"}.glyph-mouse-select:before{content:\"\\eb48\"}.glyph-mp4-document:before{content:\"\\eb49\"}.glyph-namur-check-function-filled:before{content:\"\\eb4a\"}.glyph-namur-check-function:before{content:\"\\eb4b\"}.glyph-namur-failure-filled:before{content:\"\\eb4c\"}.glyph-namur-failure:before{content:\"\\eb4d\"}.glyph-namur-maintenance-required-filled:before{content:\"\\eb4e\"}.glyph-namur-maintenance-required:before{content:\"\\eb4f\"}.glyph-namur-ok-filled:before{content:\"\\eb50\"}.glyph-namur-ok:before{content:\"\\eb51\"}.glyph-namur-out-of-spec-filled:before{content:\"\\eb52\"}.glyph-namur-out-of-spec:before{content:\"\\eb53\"}.glyph-navigation-filled:before{content:\"\\eb54\"}.glyph-navigation-left:before{content:\"\\eb55\"}.glyph-navigation-right:before{content:\"\\eb56\"}.glyph-navigation:before{content:\"\\eb57\"}.glyph-new-indicator-filled:before{content:\"\\eb58\"}.glyph-new-indicator:before{content:\"\\eb59\"}.glyph-no-filter-filled:before{content:\"\\eb5a\"}.glyph-no-filter:before{content:\"\\eb5b\"}.glyph-note-filled:before{content:\"\\eb5c\"}.glyph-note:before{content:\"\\eb5d\"}.glyph-notification-filled:before{content:\"\\eb5e\"}.glyph-notification:before{content:\"\\eb5f\"}.glyph-notifications-filled:before{content:\"\\eb60\"}.glyph-notifications:before{content:\"\\eb61\"}.glyph-ontology-filled:before{content:\"\\eb62\"}.glyph-ontology:before{content:\"\\eb63\"}.glyph-open-external:before{content:\"\\eb64\"}.glyph-open-file-filled:before{content:\"\\eb65\"}.glyph-open-file:before{content:\"\\eb66\"}.glyph-operate-plant-filled:before{content:\"\\eb67\"}.glyph-operate-plant:before{content:\"\\eb68\"}.glyph-optimize:before{content:\"\\eb69\"}.glyph-p-and-i-symbols:before{content:\"\\eb6a\"}.glyph-p-i-diagram:before{content:\"\\eb6b\"}.glyph-pan:before{content:\"\\eb6c\"}.glyph-paste:before{content:\"\\eb6d\"}.glyph-pause:before{content:\"\\eb6e\"}.glyph-pc-tower-filled:before{content:\"\\eb6f\"}.glyph-pc-tower:before{content:\"\\eb70\"}.glyph-pdf-document:before{content:\"\\eb71\"}.glyph-pen-filled:before{content:\"\\eb72\"}.glyph-pen:before{content:\"\\eb73\"}.glyph-phone-filled:before{content:\"\\eb74\"}.glyph-phone:before{content:\"\\eb75\"}.glyph-photo-camera-filled:before{content:\"\\eb76\"}.glyph-photo-camera:before{content:\"\\eb77\"}.glyph-piechart-filled:before{content:\"\\eb78\"}.glyph-piechart:before{content:\"\\eb79\"}.glyph-pin-filled:before{content:\"\\eb7a\"}.glyph-pin:before{content:\"\\eb7b\"}.glyph-plant-filled:before{content:\"\\eb7c\"}.glyph-plant-handbook-filled:before{content:\"\\eb7d\"}.glyph-plant-handbook:before{content:\"\\eb7e\"}.glyph-plant-outline:before{content:\"\\eb7f\"}.glyph-plant-security:before{content:\"\\eb80\"}.glyph-plant-settings-filled:before{content:\"\\eb81\"}.glyph-plant-settings:before{content:\"\\eb82\"}.glyph-plant-user-filled:before{content:\"\\eb83\"}.glyph-plant-user:before{content:\"\\eb84\"}.glyph-plant:before{content:\"\\eb85\"}.glyph-plants-filled:before{content:\"\\eb86\"}.glyph-plants:before{content:\"\\eb87\"}.glyph-play-filled:before{content:\"\\eb88\"}.glyph-play:before{content:\"\\eb89\"}.glyph-plus-minus-times-divide:before{content:\"\\eb8a\"}.glyph-plus:before{content:\"\\eb8b\"}.glyph-point-up-filled:before{content:\"\\eb8c\"}.glyph-point-up:before{content:\"\\eb8d\"}.glyph-polar-plot:before{content:\"\\eb8e\"}.glyph-polygon-filled:before{content:\"\\eb8f\"}.glyph-polygon-line:before{content:\"\\eb90\"}.glyph-polygon:before{content:\"\\eb91\"}.glyph-ppt-document:before{content:\"\\eb92\"}.glyph-print-filled:before{content:\"\\eb93\"}.glyph-print:before{content:\"\\eb94\"}.glyph-prio-high:before{content:\"\\eb95\"}.glyph-prio-low:before{content:\"\\eb96\"}.glyph-prio-middle:before{content:\"\\eb97\"}.glyph-product-catalog:before{content:\"\\eb98\"}.glyph-product-management:before{content:\"\\eb99\"}.glyph-product:before{content:\"\\eb9a\"}.glyph-project-configuration:before{content:\"\\eb9b\"}.glyph-project-new:before{content:\"\\eb9c\"}.glyph-project:before{content:\"\\eb9d\"}.glyph-protocol:before{content:\"\\eb9e\"}.glyph-publish-document:before{content:\"\\eb9f\"}.glyph-publish:before{content:\"\\eba0\"}.glyph-qr-code:before{content:\"\\eba1\"}.glyph-quality-report:before{content:\"\\eba2\"}.glyph-question-filled:before{content:\"\\eba3\"}.glyph-question:before{content:\"\\eba4\"}.glyph-radarchart:before{content:\"\\eba5\"}.glyph-radio-waves-off:before{content:\"\\eba6\"}.glyph-radio-waves:before{content:\"\\eba7\"}.glyph-random-filled:before{content:\"\\eba8\"}.glyph-random:before{content:\"\\eba9\"}.glyph-rectangle-filled:before{content:\"\\ebaa\"}.glyph-rectangle:before{content:\"\\ebab\"}.glyph-redo:before{content:\"\\ebac\"}.glyph-reference:before{content:\"\\ebad\"}.glyph-refresh-cancelled:before{content:\"\\ebae\"}.glyph-refresh:before{content:\"\\ebaf\"}.glyph-reload:before{content:\"\\ebb0\"}.glyph-remove-eye-filled:before{content:\"\\ebb1\"}.glyph-remove-eye:before{content:\"\\ebb2\"}.glyph-rename:before{content:\"\\ebb3\"}.glyph-report-barchart:before{content:\"\\ebb4\"}.glyph-report-linechart:before{content:\"\\ebb5\"}.glyph-report-text:before{content:\"\\ebb6\"}.glyph-reset:before{content:\"\\ebb7\"}.glyph-rhomb-filled:before{content:\"\\ebb8\"}.glyph-rhomb:before{content:\"\\ebb9\"}.glyph-rocket-filled:before{content:\"\\ebba\"}.glyph-rocket:before{content:\"\\ebbb\"}.glyph-scatterplot:before{content:\"\\ebbc\"}.glyph-scheduler-filled:before{content:\"\\ebbd\"}.glyph-scheduler:before{content:\"\\ebbe\"}.glyph-screen-filled:before{content:\"\\ebbf\"}.glyph-screen:before{content:\"\\ebc0\"}.glyph-screenshot-filled:before{content:\"\\ebc1\"}.glyph-screenshot:before{content:\"\\ebc2\"}.glyph-search:before{content:\"\\ebc3\"}.glyph-share-filled:before{content:\"\\ebc4\"}.glyph-share:before{content:\"\\ebc5\"}.glyph-shopping-cart-filled:before{content:\"\\ebc6\"}.glyph-shopping-cart:before{content:\"\\ebc7\"}.glyph-shout-filled:before{content:\"\\ebc8\"}.glyph-shout:before{content:\"\\ebc9\"}.glyph-sign-language:before{content:\"\\ebca\"}.glyph-signal-strength-0:before{content:\"\\ebcb\"}.glyph-signal-strength-1:before{content:\"\\ebcc\"}.glyph-signal-strength-2:before{content:\"\\ebcd\"}.glyph-signal-strength-3:before{content:\"\\ebce\"}.glyph-signal-strength-4:before{content:\"\\ebcf\"}.glyph-signal-strength-5:before{content:\"\\ebd0\"}.glyph-signal-strength-6:before{content:\"\\ebd1\"}.glyph-signal-strength-7:before{content:\"\\ebd2\"}.glyph-signal-strength-8:before{content:\"\\ebd3\"}.glyph-simit-component:before{content:\"\\ebd4\"}.glyph-simit-macro-component-editor:before{content:\"\\ebd5\"}.glyph-simit-macro:before{content:\"\\ebd6\"}.glyph-single-check:before{content:\"\\ebd7\"}.glyph-skip-back-filled:before{content:\"\\ebd8\"}.glyph-skip-back:before{content:\"\\ebd9\"}.glyph-skip-filled:before{content:\"\\ebda\"}.glyph-skip:before{content:\"\\ebdb\"}.glyph-snowflake:before{content:\"\\ebdc\"}.glyph-sort-ascending:before{content:\"\\ebdd\"}.glyph-sort-descending:before{content:\"\\ebde\"}.glyph-sort:before{content:\"\\ebdf\"}.glyph-sound-loud-filled:before{content:\"\\ebe0\"}.glyph-sound-loud:before{content:\"\\ebe1\"}.glyph-sound-mute-filled:before{content:\"\\ebe2\"}.glyph-sound-mute:before{content:\"\\ebe3\"}.glyph-sound-off-filled:before{content:\"\\ebe4\"}.glyph-sound-off:before{content:\"\\ebe5\"}.glyph-sound-quiet-filled:before{content:\"\\ebe6\"}.glyph-sound-quiet:before{content:\"\\ebe7\"}.glyph-spatial:before{content:\"\\ebe8\"}.glyph-split-horizontally:before{content:\"\\ebe9\"}.glyph-split-vertically:before{content:\"\\ebea\"}.glyph-star-add-filled:before{content:\"\\ebeb\"}.glyph-star-add:before{content:\"\\ebec\"}.glyph-star-cancelled-filled:before{content:\"\\ebed\"}.glyph-star-cancelled:before{content:\"\\ebee\"}.glyph-star-filled:before{content:\"\\ebef\"}.glyph-star-list-filled:before{content:\"\\ebf0\"}.glyph-star-list:before{content:\"\\ebf1\"}.glyph-star:before{content:\"\\ebf2\"}.glyph-start-data-analysis:before{content:\"\\ebf3\"}.glyph-stop-filled:before{content:\"\\ebf4\"}.glyph-stop:before{content:\"\\ebf5\"}.glyph-success-filled:before{content:\"\\ebf6\"}.glyph-success:before{content:\"\\ebf7\"}.glyph-sun-filled:before{content:\"\\ebf8\"}.glyph-sun:before{content:\"\\ebf9\"}.glyph-support:before{content:\"\\ebfa\"}.glyph-surveillance-filled:before{content:\"\\ebfb\"}.glyph-surveillance:before{content:\"\\ebfc\"}.glyph-svg-document:before{content:\"\\ebfd\"}.glyph-swap-left-right:before{content:\"\\ebfe\"}.glyph-switch-slider:before{content:\"\\ebff\"}.glyph-table-columns:before{content:\"\\ec00\"}.glyph-table-rows:before{content:\"\\ec01\"}.glyph-table-settings:before{content:\"\\ec02\"}.glyph-table:before{content:\"\\ec03\"}.glyph-tag-filled:before{content:\"\\ec04\"}.glyph-tag-plus-filled:before{content:\"\\ec05\"}.glyph-tag-plus:before{content:\"\\ec06\"}.glyph-tag:before{content:\"\\ec07\"}.glyph-tasks-all:before{content:\"\\ec08\"}.glyph-tasks-done:before{content:\"\\ec09\"}.glyph-tasks-open:before{content:\"\\ec0a\"}.glyph-text-circle-rectangle-filled:before{content:\"\\ec0b\"}.glyph-text-circle-rectangle:before{content:\"\\ec0c\"}.glyph-text-document:before{content:\"\\ec0d\"}.glyph-text:before{content:\"\\ec0e\"}.glyph-threshold-cancelled:before{content:\"\\ec0f\"}.glyph-threshold-off:before{content:\"\\ec10\"}.glyph-threshold-on:before{content:\"\\ec11\"}.glyph-to-be-published:before{content:\"\\ec12\"}.glyph-to-search:before{content:\"\\ec13\"}.glyph-topic-filled:before{content:\"\\ec14\"}.glyph-topic:before{content:\"\\ec15\"}.glyph-touch-filled:before{content:\"\\ec16\"}.glyph-touch:before{content:\"\\ec17\"}.glyph-trashcan-filled:before{content:\"\\ec18\"}.glyph-trashcan:before{content:\"\\ec19\"}.glyph-tree:before{content:\"\\ec1a\"}.glyph-trend:before{content:\"\\ec1b\"}.glyph-triangle-filled:before{content:\"\\ec1c\"}.glyph-triangle:before{content:\"\\ec1d\"}.glyph-tulip-filled:before{content:\"\\ec1e\"}.glyph-tulip:before{content:\"\\ec1f\"}.glyph-txt-document:before{content:\"\\ec20\"}.glyph-undo:before{content:\"\\ec21\"}.glyph-ungroup:before{content:\"\\ec22\"}.glyph-unlock-filled:before{content:\"\\ec23\"}.glyph-unlock-plant-filled:before{content:\"\\ec24\"}.glyph-unlock-plant:before{content:\"\\ec25\"}.glyph-unlock:before{content:\"\\ec26\"}.glyph-upload-document-note:before{content:\"\\ec27\"}.glyph-upload-success:before{content:\"\\ec28\"}.glyph-upload:before{content:\"\\ec29\"}.glyph-upper-limit:before{content:\"\\ec2a\"}.glyph-user-check-filled:before{content:\"\\ec2b\"}.glyph-user-check:before{content:\"\\ec2c\"}.glyph-user-filled:before{content:\"\\ec2d\"}.glyph-user-management-filled:before{content:\"\\ec2e\"}.glyph-user-management:before{content:\"\\ec2f\"}.glyph-user-profile-filled:before{content:\"\\ec30\"}.glyph-user-profile:before{content:\"\\ec31\"}.glyph-user-settings-filled:before{content:\"\\ec32\"}.glyph-user-settings:before{content:\"\\ec33\"}.glyph-user:before{content:\"\\ec34\"}.glyph-validate:before{content:\"\\ec35\"}.glyph-vdi-folder:before{content:\"\\ec36\"}.glyph-version-history:before{content:\"\\ec37\"}.glyph-video-file-filled:before{content:\"\\ec38\"}.glyph-video-file:before{content:\"\\ec39\"}.glyph-warning-filled:before{content:\"\\ec3a\"}.glyph-warning-rhomb-filled:before{content:\"\\ec3b\"}.glyph-warning-rhomb:before{content:\"\\ec3c\"}.glyph-warning:before{content:\"\\ec3d\"}.glyph-water-bathing:before{content:\"\\ec3e\"}.glyph-water-fish:before{content:\"\\ec3f\"}.glyph-water-sunbathing:before{content:\"\\ec40\"}.glyph-waveform:before{content:\"\\ec41\"}.glyph-webcam-filled:before{content:\"\\ec42\"}.glyph-webcam:before{content:\"\\ec43\"}.glyph-wlan-off:before{content:\"\\ec44\"}.glyph-wlan-strength-0:before{content:\"\\ec45\"}.glyph-wlan-strength-1:before{content:\"\\ec46\"}.glyph-wlan-strength-2:before{content:\"\\ec47\"}.glyph-wlan-strength-3:before{content:\"\\ec48\"}.glyph-work-case-filled:before{content:\"\\ec49\"}.glyph-work-case:before{content:\"\\ec4a\"}.glyph-x-axis-settings:before{content:\"\\ec4b\"}.glyph-xls-document:before{content:\"\\ec4c\"}.glyph-xml-document:before{content:\"\\ec4d\"}.glyph-y-axis-settings:before{content:\"\\ec4e\"}.glyph-youtube-filled:before{content:\"\\ec4f\"}.glyph-youtube:before{content:\"\\ec50\"}.glyph-zoom-in:before{content:\"\\ec51\"}.glyph-zoom-out:before{content:\"\\ec52\"}.glyph-zoom-selection:before{content:\"\\ec53\"}:host{display:inline-flex;height:1.5rem;width:1.5rem}:host i{color:inherit;transition:color 150ms}:host .svg-container{display:block;position:relative;width:100%;height:100%}:host .svg-container>svg{height:1.5rem;width:1.5rem}:host .svg-container>svg [fill]{fill:var(--theme-color-std-text)}:host .skeleton-box{display:inline-block;height:1em;position:relative;overflow:hidden;background-color:#dddbdd}:host .skeleton-box::after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translateX(-100%);background-image:linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.5) 60%, rgba(255, 255, 255, 0));animation:shimmer 2s infinite;content:\"\"}@keyframes shimmer{100%{transform:translateX(100%)}}:host(.size-12){height:0.75rem;width:0.75rem}:host(.size-12) .svg-container>svg{height:0.75rem;width:0.75rem}:host(.size-16){height:1rem;width:1rem}:host(.size-16) .svg-container>svg{height:1rem;width:1rem}:host(.size-32){height:2rem;width:2rem}:host(.size-32) .svg-container>svg{height:2rem;width:2rem}";
48
+
49
+ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends HTMLElement {
50
+ constructor() {
51
+ super();
52
+ this.__registerHost();
53
+ this.__attachShadow();
54
+ this.size = undefined;
55
+ this.color = undefined;
56
+ this.name = undefined;
57
+ this.src = undefined;
58
+ this.svgContent = undefined;
59
+ }
60
+ connectedCallback() {
61
+ this.loadIconContent();
62
+ }
63
+ async loadIconContent() {
64
+ this.svgContent = await resolveIcon(this);
65
+ }
66
+ render() {
67
+ const style = {};
68
+ if (this.color) {
69
+ style['color'] = `var(--theme-${this.color})`;
70
+ }
71
+ if (this.name && !this.svgContent) {
72
+ const iconName = this.name;
73
+ return (h(Host, { style: style, class: {
74
+ ['size-12']: this.size === '12',
75
+ ['size-16']: this.size === '16',
76
+ ['size-24']: this.size === '24',
77
+ ['size-32']: this.size === '32',
78
+ } }, h("i", { class: {
79
+ 'glyph': true,
80
+ [`glyph-${iconName}`]: true,
81
+ 'glyph-12': this.size === '12',
82
+ 'glyph-16': this.size === '16',
83
+ 'glyph-24': this.size === '24',
84
+ 'glyph-32': this.size === '32',
85
+ } })));
86
+ }
87
+ return (h(Host, { style: style, class: {
88
+ ['size-12']: this.size === '12',
89
+ ['size-16']: this.size === '16',
90
+ ['size-24']: this.size === '24',
91
+ ['size-32']: this.size === '32',
92
+ } }, this.svgContent ? (h("div", { class: 'svg-container', innerHTML: this.svgContent })) : (h("span", { class: "skeleton-box", style: {
93
+ width: '100%',
94
+ height: '100%',
95
+ } }))));
96
+ }
97
+ static get watchers() { return {
98
+ "src": ["loadIconContent"],
99
+ "name": ["loadIconContent"]
100
+ }; }
101
+ static get style() { return iconCss; }
102
+ }, [1, "ix-icon", {
103
+ "size": [1],
104
+ "color": [1],
105
+ "name": [513],
106
+ "src": [1],
107
+ "svgContent": [32]
108
+ }]);
109
+ function defineCustomElement() {
110
+ if (typeof customElements === "undefined") {
111
+ return;
112
+ }
113
+ const components = ["ix-icon"];
114
+ components.forEach(tagName => { switch (tagName) {
115
+ case "ix-icon":
116
+ if (!customElements.get(tagName)) {
117
+ customElements.define(tagName, Icon);
118
+ }
119
+ break;
120
+ } });
121
+ }
122
+
123
+ export { Icon as I, defineCustomElement as d };
124
+
125
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"file":"icon.js","mappings":";;AAAA;;;AAMO,MAAM,YAAY,GAAG,CAAC,GAAW,KAAK,GAAG,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAElF,IAAI,MAAM,GAAG,IAAI,CAAC;AAElB,SAAS,mBAAmB,CAAC,OAAe;EAC1C,IAAI,OAAO,MAAM,CAAC,WAAW,CAAC,KAAK,WAAW,EAAE;IAC9C,OAAO,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;IACzD,OAAO;GACR;EAED,IAAI,MAAM,KAAK,IAAI,EAAE;IACnB,MAAM,GAAG,IAAI,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;GACpC;EAED,MAAM,WAAW,GAAG,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;EACjE,MAAM,UAAU,GAAG,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;EAEpD,IAAI,CAAC,UAAU,EAAE;IACf,MAAM,KAAK,CAAC,4BAA4B,CAAC,CAAC;GAC3C;EAED,OAAO,UAAU,CAAC,SAAS,CAAC;AAC9B,CAAC;AAED,eAAe,QAAQ,CAAC,GAAW;EACjC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;EAClC,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;EAE3C,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;IAChB,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAC5B,OAAO,EAAE,CAAC;GACX;EAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAEM,eAAe,WAAW,CAAC,IAAU;EAC1C,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;EAE3B,IAAI,IAAI,EAAE;IACR,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE;MACtB,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;KAClC;;IAGD,OAAO;GACR;EAED,IAAI,YAAY,CAAC,GAAG,CAAC,EAAE;IACrB,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAC;GACjC;EAED,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC;AACvB;;AC3DA,MAAM,OAAO,GAAG,i/4BAAi/4B;;MCiBp/4B,IAAI;;;;;;;;;;;EAyBf,iBAAiB;IACf,IAAI,CAAC,eAAe,EAAE,CAAC;GACxB;EAID,MAAM,eAAe;IACnB,IAAI,CAAC,UAAU,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;GAC3C;EAED,MAAM;IACJ,MAAM,KAAK,GAEP,EAAE,CAAC;IAEP,IAAI,IAAI,CAAC,KAAK,EAAE;MACd,KAAK,CAAC,OAAO,CAAC,GAAG,eAAe,IAAI,CAAC,KAAK,GAAG,CAAC;KAC/C;IAED,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;MACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;MAC3B,QACE,EAAC,IAAI,IACH,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE;UACL,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI;UAC/B,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI;UAC/B,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI;UAC/B,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI;SAChC,IAED,SACE,KAAK,EAAE;UACL,OAAO,EAAE,IAAI;UACb,CAAC,SAAS,QAAQ,EAAE,GAAG,IAAI;UAC3B,UAAU,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;UAC9B,UAAU,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;UAC9B,UAAU,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;UAC9B,UAAU,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;SAC/B,GACE,CACA,EACP;KACH;IAED,QACE,EAAC,IAAI,IACH,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE;QACL,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI;QAC/B,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI;QAC/B,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI;QAC/B,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI;OAChC,IAEA,IAAI,CAAC,UAAU,IACd,WAAK,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,GAAQ,KAE/D,YACE,KAAK,EAAC,cAAc,EACpB,KAAK,EAAE;QACL,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;OACf,GACK,CACT,CACI,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/icon/resolveIcon.ts","./src/components/icon/icon.scss?tag=ix-icon&encapsulation=shadow","./src/components/icon/icon.tsx"],"sourcesContent":["/*\n * COPYRIGHT (c) Siemens AG 2018-2023 ALL RIGHTS RESERVED.\n */\n\nimport { Icon } from './icon';\n\nexport const isSvgDataUrl = (url: string) => url.startsWith('data:image/svg+xml');\n\nlet parser = null;\n\nfunction parseSVGDataContent(content: string) {\n if (typeof window['DOMParser'] === 'undefined') {\n console.warn('DOMParser not supported by your browser.');\n return;\n }\n\n if (parser === null) {\n parser = new window['DOMParser']();\n }\n\n const svgDocument = parser.parseFromString(content, 'text/html');\n const svgElement = svgDocument.querySelector('svg');\n\n if (!svgElement) {\n throw Error('No valid svg data provided');\n }\n\n return svgElement.outerHTML;\n}\n\nasync function fetchSVG(url: string) {\n const response = await fetch(url);\n const responseText = await response.text();\n\n if (!response.ok) {\n console.error(responseText);\n return '';\n }\n\n return responseText;\n}\n\nexport async function resolveIcon(icon: Icon) {\n const { src, name } = icon;\n\n if (name) {\n if (isSvgDataUrl(name)) {\n return parseSVGDataContent(name);\n }\n\n //Fallback return undefined to render web font icon\n return;\n }\n\n if (isSvgDataUrl(src)) {\n return parseSVGDataContent(src);\n }\n\n return fetchSVG(src);\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import './generated/ix-icons';\n\n:host {\n display: inline-flex;\n height: 1.5rem;\n width: 1.5rem;\n\n i {\n color: inherit;\n transition: color 150ms;\n }\n\n .svg-container {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n .svg-container > svg {\n height: 1.5rem;\n width: 1.5rem;\n }\n\n .svg-container > svg [fill] {\n fill: var(--theme-color-std-text);\n }\n\n .skeleton-box {\n display: inline-block;\n height: 1em;\n position: relative;\n overflow: hidden;\n background-color: #dddbdd;\n\n &::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n transform: translateX(-100%);\n background-image: linear-gradient(90deg, rgba(#fff, 0) 0, rgba(#fff, 0.2) 20%, rgba(#fff, 0.5) 60%, rgba(#fff, 0));\n animation: shimmer 2s infinite;\n content: '';\n }\n\n @keyframes shimmer {\n 100% {\n transform: translateX(100%);\n }\n }\n }\n}\n\n:host(.size-12) {\n height: 0.75rem;\n width: 0.75rem;\n\n .svg-container > svg {\n height: 0.75rem;\n width: 0.75rem;\n }\n}\n\n:host(.size-16) {\n height: 1rem;\n width: 1rem;\n\n .svg-container > svg {\n height: 1rem;\n width: 1rem;\n }\n}\n\n:host(.size-32) {\n height: 2rem;\n width: 2rem;\n\n .svg-container > svg {\n height: 2rem;\n width: 2rem;\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { resolveIcon } from './resolveIcon';\n\n@Component({\n tag: 'ix-icon',\n styleUrl: 'icon.scss',\n shadow: true,\n})\nexport class Icon {\n /**\n * Size of the icon\n */\n @Prop() size: '12' | '16' | '24' | '32';\n\n /**\n * Color of the icon\n */\n @Prop() color: string;\n\n /**\n * Use one of our defined icon names e.g. `copy`.\n */\n @Prop({ reflect: true }) name: string;\n\n /**\n * Path to the svg\n *\n * @internal\n */\n @Prop() src?: string;\n\n @State() svgContent?: string;\n\n connectedCallback() {\n this.loadIconContent();\n }\n\n @Watch('src')\n @Watch('name')\n async loadIconContent() {\n this.svgContent = await resolveIcon(this);\n }\n\n render() {\n const style: {\n [key: string]: string;\n } = {};\n\n if (this.color) {\n style['color'] = `var(--theme-${this.color})`;\n }\n\n if (this.name && !this.svgContent) {\n const iconName = this.name;\n return (\n <Host\n style={style}\n class={{\n ['size-12']: this.size === '12',\n ['size-16']: this.size === '16',\n ['size-24']: this.size === '24',\n ['size-32']: this.size === '32',\n }}\n >\n <i\n class={{\n 'glyph': true,\n [`glyph-${iconName}`]: true,\n 'glyph-12': this.size === '12',\n 'glyph-16': this.size === '16',\n 'glyph-24': this.size === '24',\n 'glyph-32': this.size === '32',\n }}\n ></i>\n </Host>\n );\n }\n\n return (\n <Host\n style={style}\n class={{\n ['size-12']: this.size === '12',\n ['size-16']: this.size === '16',\n ['size-24']: this.size === '24',\n ['size-32']: this.size === '32',\n }}\n >\n {this.svgContent ? (\n <div class={'svg-container'} innerHTML={this.svgContent}></div>\n ) : (\n <span\n class=\"skeleton-box\"\n style={{\n width: '100%',\n height: '100%',\n }}\n ></span>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Used to manually set the base path where assets can be found.
3
+ * If the script is used as "module", it's recommended to use "import.meta.url",
4
+ * such as "setAssetPath(import.meta.url)". Other options include
5
+ * "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
6
+ * dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
7
+ * But do note that this configuration depends on how your script is bundled, or lack of
8
+ * bundling, and where your assets can be loaded from. Additionally custom bundling
9
+ * will have to ensure the static assets are copied to its build directory.
10
+ */
11
+ export declare const setAssetPath: (path: string) => void;
12
+
13
+ /**
14
+ * Used to specify a nonce value that corresponds with an application's CSP.
15
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
16
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
17
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
18
+ * will result in the same behavior.
19
+ */
20
+ export declare const setNonce: (nonce: string) => void
21
+
22
+ export interface SetPlatformOptions {
23
+ raf?: (c: FrameRequestCallback) => number;
24
+ ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
25
+ rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
26
+ }
27
+ export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
@@ -0,0 +1,4 @@
1
+ export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
2
+ export { I as Icon, d as defineCustomElement } from './icon.js';
3
+
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"file":"index.js","mappings":";","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface IxIcon extends Components.IxIcon, HTMLElement {}
4
+ export const IxIcon: {
5
+ prototype: IxIcon;
6
+ new (): IxIcon;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,8 @@
1
+ import { I as Icon, d as defineCustomElement$1 } from './icon.js';
2
+
3
+ const IxIcon = Icon;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { IxIcon, defineCustomElement };
7
+
8
+ //# sourceMappingURL=ix-icon.js.map
@@ -0,0 +1 @@
1
+ {"file":"ix-icon.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}