@siemens/ix-icons 0.0.0-pr-69-20250130132918 → 0.0.0-pr-69-20250205111227
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +46 -17
- package/components/index.js +1 -2
- package/components/index.js.map +1 -1
- package/components/ix-icon.js +1 -1
- package/components/p-da232b5d.js +1353 -0
- package/components/p-da232b5d.js.map +1 -0
- package/dist/cjs/{icon-2c9dc943.js → icon-88309350.js} +2 -6
- package/dist/cjs/icon-88309350.js.map +1 -0
- package/dist/cjs/{index-ea94711c.js → index-f6043fa9.js} +178 -70
- package/dist/cjs/index-f6043fa9.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/ix-icon.cjs.entry.js +2 -2
- package/dist/cjs/ix-icons.cjs.js +2 -2
- package/dist/cjs/ix-icons.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/icon/icon.js +8 -4
- package/dist/collection/components/icon/icon.js.map +1 -1
- package/dist/esm/{icon-e3f6595d.js → icon-4feff534.js} +2 -6
- package/dist/esm/icon-4feff534.js.map +1 -0
- package/dist/esm/{index-050dd9d6.js → index-051cb4f1.js} +178 -70
- package/dist/esm/index-051cb4f1.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/ix-icon.entry.js +2 -2
- package/dist/esm/ix-icons.js +3 -3
- package/dist/esm/ix-icons.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/ix-icons/index.esm.js +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-08f117ce.entry.js +2 -0
- package/dist/ix-icons/p-48b5ebf2.js +3 -0
- package/dist/ix-icons/p-48b5ebf2.js.map +1 -0
- package/dist/ix-icons/{p-196f504a.js → p-588f84dc.js} +2 -2
- package/dist/ix-icons/p-588f84dc.js.map +1 -0
- package/dist/sample.json +1259 -0
- package/dist/types/stencil-public-runtime.d.ts +6 -0
- package/icons/package.json +1 -1
- package/package.json +2 -2
- package/components/icon.js +0 -252
- package/components/icon.js.map +0 -1
- package/dist/cjs/icon-2c9dc943.js.map +0 -1
- package/dist/cjs/index-ea94711c.js.map +0 -1
- package/dist/esm/icon-e3f6595d.js.map +0 -1
- package/dist/esm/index-050dd9d6.js.map +0 -1
- package/dist/ix-icons/p-0194ffaa.js +0 -3
- package/dist/ix-icons/p-0194ffaa.js.map +0 -1
- package/dist/ix-icons/p-196f504a.js.map +0 -1
- package/dist/ix-icons/p-45457b43.entry.js +0 -2
- /package/dist/ix-icons/{p-45457b43.entry.js.map → p-08f117ce.entry.js.map} +0 -0
package/README.md
CHANGED
@@ -12,38 +12,67 @@ SPDX-License-Identifier: MIT
|
|
12
12
|
|
13
13
|
## Usage
|
14
14
|
|
15
|
-
###
|
15
|
+
### With Siemens Industrial Experience design system
|
16
16
|
|
17
|
-
|
17
|
+
If you are also using the library [Siemens Industrial Experience](https://github.com/siemens/ix/), no additional project setup will be neccessary. The packages `@siemens/ix-angular`, `@siemens/ix-react` or `@siemens/ix-vue` will take care of setting up the icon library for you.
|
18
18
|
|
19
|
-
|
19
|
+
### Without Siemens Industrial Experience design system
|
20
20
|
|
21
|
-
|
22
|
-
|
21
|
+
If you want to use `@siemens/ix-icons` without `@siemens/ix` you need to follow these steps:
|
22
|
+
|
23
|
+
#### Using CDN
|
23
24
|
|
24
|
-
|
25
|
-
|
26
|
-
|
25
|
+
Place the following `<script>` near the end of your page, right before the closing </body> tag.
|
26
|
+
|
27
|
+
```html
|
28
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@siemens/ix-icons@%5E3.0.0/dist/ix-icons/ix-icons.esm.js"></script>
|
29
|
+
<script nomodule src="https://cdn.jsdelivr.net/npm/@siemens/ix-icons@%5E3.0.0/dist/ix-icons/ix-icons.js"></script>
|
27
30
|
```
|
28
31
|
|
29
|
-
|
32
|
+
Now you can render icons in you applicaton:
|
30
33
|
|
31
34
|
```html
|
32
|
-
<ix-icon name="
|
35
|
+
<ix-icon name="star"></ix-icon>
|
33
36
|
```
|
34
37
|
|
35
|
-
###
|
38
|
+
### Using a package manager like `npm`/`pnpm`/`yarn`
|
36
39
|
|
37
|
-
|
38
|
-
|
40
|
+
First install the package `@siemens/ix-icons@latest` in your project (e.g. `npm install --save @siemens/ix-icons`).
|
41
|
+
|
42
|
+
Then load the icon component:
|
39
43
|
|
40
|
-
|
44
|
+
```javascript
|
45
|
+
import { defineCustomElements } from '@siemens/ix-icons/loader';
|
46
|
+
|
47
|
+
// Register Web Component <ix-icon></ix-icon>
|
48
|
+
defineCustomElements();
|
41
49
|
```
|
42
50
|
|
43
|
-
###
|
51
|
+
### Prepare your project
|
52
|
+
|
53
|
+
1. **Copy SVG Files:**
|
54
|
+
Copy all SVG files located under `node_modules/@siemens/ix-icons/svg` to an asset folder in your project. This allows the `ix-icon` component to fetch the images.
|
55
|
+
|
56
|
+
2. **Alternative Method:**
|
57
|
+
Alternatively, you can use the `addIcons` function to load specific icons directly in your code. For example:
|
58
|
+
|
59
|
+
```javascript
|
60
|
+
import { addIcons } from '@siemens/ix-icons';
|
61
|
+
import { iconStar } from '@siemens/ix-icons/icons';
|
62
|
+
|
63
|
+
addIcons({ iconStar });
|
64
|
+
```
|
65
|
+
|
66
|
+
```html
|
67
|
+
<ix-icon name="star"></ix-icon>
|
68
|
+
```
|
69
|
+
|
70
|
+
You only need to add the same icon once. Additional calls to `addIcons` will not add redundant copies of the same icons to the collection.
|
71
|
+
|
72
|
+
### Use the `ix-icon` component with custom SVG's
|
44
73
|
|
45
74
|
```tsx
|
46
|
-
<ix-icon name="/your/asset/path/my-icon.svg"></ix-icon
|
75
|
+
<ix-icon name="/your/asset/path/my-icon.svg"></ix-icon>
|
47
76
|
```
|
48
77
|
|
49
78
|
## Development
|
@@ -66,6 +95,6 @@ Contributions, issues and feature requests are welcome!
|
|
66
95
|
|
67
96
|
## 📝 License
|
68
97
|
|
69
|
-
Copyright © 2019–
|
98
|
+
Copyright © 2019–2025 [Siemens AG](https://www.siemens.com/).
|
70
99
|
|
71
100
|
This project is MIT licensed.
|
package/components/index.js
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '
|
2
|
-
export { I as Icon, b as addIconToCache, a as addIcons, d as defineCustomElement } from './icon.js';
|
1
|
+
export { I as Icon, d as addIconToCache, c as addIcons, e as defineCustomElement, g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-da232b5d.js';
|
3
2
|
|
4
3
|
//# sourceMappingURL=index.js.map
|
package/components/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"file":"index.js","mappings":"
|
1
|
+
{"file":"index.js","mappings":"","names":[],"sources":[],"sourcesContent":[],"version":3}
|
package/components/ix-icon.js
CHANGED