@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.
Files changed (50) hide show
  1. package/README.md +46 -17
  2. package/components/index.js +1 -2
  3. package/components/index.js.map +1 -1
  4. package/components/ix-icon.js +1 -1
  5. package/components/p-da232b5d.js +1353 -0
  6. package/components/p-da232b5d.js.map +1 -0
  7. package/dist/cjs/{icon-2c9dc943.js → icon-88309350.js} +2 -6
  8. package/dist/cjs/icon-88309350.js.map +1 -0
  9. package/dist/cjs/{index-ea94711c.js → index-f6043fa9.js} +178 -70
  10. package/dist/cjs/index-f6043fa9.js.map +1 -0
  11. package/dist/cjs/index.cjs.js +2 -2
  12. package/dist/cjs/ix-icon.cjs.entry.js +2 -2
  13. package/dist/cjs/ix-icons.cjs.js +2 -2
  14. package/dist/cjs/ix-icons.cjs.js.map +1 -1
  15. package/dist/cjs/loader.cjs.js +1 -1
  16. package/dist/collection/collection-manifest.json +2 -2
  17. package/dist/collection/components/icon/icon.js +8 -4
  18. package/dist/collection/components/icon/icon.js.map +1 -1
  19. package/dist/esm/{icon-e3f6595d.js → icon-4feff534.js} +2 -6
  20. package/dist/esm/icon-4feff534.js.map +1 -0
  21. package/dist/esm/{index-050dd9d6.js → index-051cb4f1.js} +178 -70
  22. package/dist/esm/index-051cb4f1.js.map +1 -0
  23. package/dist/esm/index.js +2 -2
  24. package/dist/esm/ix-icon.entry.js +2 -2
  25. package/dist/esm/ix-icons.js +3 -3
  26. package/dist/esm/ix-icons.js.map +1 -1
  27. package/dist/esm/loader.js +2 -2
  28. package/dist/ix-icons/index.esm.js +1 -1
  29. package/dist/ix-icons/ix-icons.esm.js +1 -1
  30. package/dist/ix-icons/ix-icons.esm.js.map +1 -1
  31. package/dist/ix-icons/p-08f117ce.entry.js +2 -0
  32. package/dist/ix-icons/p-48b5ebf2.js +3 -0
  33. package/dist/ix-icons/p-48b5ebf2.js.map +1 -0
  34. package/dist/ix-icons/{p-196f504a.js → p-588f84dc.js} +2 -2
  35. package/dist/ix-icons/p-588f84dc.js.map +1 -0
  36. package/dist/sample.json +1259 -0
  37. package/dist/types/stencil-public-runtime.d.ts +6 -0
  38. package/icons/package.json +1 -1
  39. package/package.json +2 -2
  40. package/components/icon.js +0 -252
  41. package/components/icon.js.map +0 -1
  42. package/dist/cjs/icon-2c9dc943.js.map +0 -1
  43. package/dist/cjs/index-ea94711c.js.map +0 -1
  44. package/dist/esm/icon-e3f6595d.js.map +0 -1
  45. package/dist/esm/index-050dd9d6.js.map +0 -1
  46. package/dist/ix-icons/p-0194ffaa.js +0 -3
  47. package/dist/ix-icons/p-0194ffaa.js.map +0 -1
  48. package/dist/ix-icons/p-196f504a.js.map +0 -1
  49. package/dist/ix-icons/p-45457b43.entry.js +0 -2
  50. /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
- ### Installation
15
+ ### With Siemens Industrial Experience design system
16
16
 
17
- First install the package `@siemens/ix-icons` in your project (e.g. `npm install --save @siemens/ix-icons`).
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
- Then load the icon component:
19
+ ### Without Siemens Industrial Experience design system
20
20
 
21
- ```javascript
22
- import { defineCustomElements } from '@siemens/ix-icons/loader';
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
- (async () => {
25
- await defineCustomElements();
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
- ### Angular / Web Components
32
+ Now you can render icons in you applicaton:
30
33
 
31
34
  ```html
32
- <ix-icon name="rocket"></ix-icon>
35
+ <ix-icon name="star"></ix-icon>
33
36
  ```
34
37
 
35
- ### React and Vue
38
+ ### Using a package manager like `npm`/`pnpm`/`yarn`
36
39
 
37
- ```tsx
38
- import { rocket } from '@siemens/ix-icons/icons';
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
- <ix-icon name={rocket}></ix-icon>;
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
- ### Use `ix-icon` component with custom svg's
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–2023 [Siemens AG](https://www.siemens.com/).
98
+ Copyright © 2019–2025 [Siemens AG](https://www.siemens.com/).
70
99
 
71
100
  This project is MIT licensed.
@@ -1,4 +1,3 @@
1
- export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
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
@@ -1 +1 @@
1
- {"file":"index.js","mappings":";","names":[],"sources":[],"sourcesContent":[],"version":3}
1
+ {"file":"index.js","mappings":"","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,4 +1,4 @@
1
- import { I as Icon, d as defineCustomElement$1 } from './icon.js';
1
+ import { I as Icon, e as defineCustomElement$1 } from './p-da232b5d.js';
2
2
 
3
3
  const IxIcon = Icon;
4
4
  const defineCustomElement = defineCustomElement$1;