@siemens/ix-icons 0.0.0-20240422125504
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/LICENSE.md +9 -0
- package/README.md +69 -0
- package/dist/cjs/app-globals-3a1e7e63.js +7 -0
- package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
- package/dist/cjs/icon-58cf66e3.js +244 -0
- package/dist/cjs/icon-58cf66e3.js.map +1 -0
- package/dist/cjs/icons-0dd6f96e.js +1405 -0
- package/dist/cjs/icons-0dd6f96e.js.map +1 -0
- package/dist/cjs/index-af0541e0.js +1808 -0
- package/dist/cjs/index-af0541e0.js.map +1 -0
- package/dist/cjs/index.cjs.js +12 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/ix-icon.cjs.entry.js +12 -0
- package/dist/cjs/ix-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/ix-icons.cjs.js +27 -0
- package/dist/cjs/ix-icons.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +17 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/icon/icon.css +54 -0
- package/dist/collection/components/icon/icon.js +165 -0
- package/dist/collection/components/icon/icon.js.map +1 -0
- package/dist/collection/components/icon/icons.js +702 -0
- package/dist/collection/components/icon/icons.js.map +1 -0
- package/dist/collection/components/icon/meta-tag.js +42 -0
- package/dist/collection/components/icon/meta-tag.js.map +1 -0
- package/dist/collection/components/icon/resolveIcon.js +131 -0
- package/dist/collection/components/icon/resolveIcon.js.map +1 -0
- package/dist/collection/components/icon/test/ix-icon.spec.js +61 -0
- package/dist/collection/components/icon/test/ix-icon.spec.js.map +1 -0
- package/dist/collection/components/icon/test/resolveIcon.spec.js +72 -0
- package/dist/collection/components/icon/test/resolveIcon.spec.js.map +1 -0
- package/dist/collection/components/icon/test/rocker-example.js +5 -0
- package/dist/collection/components/icon/test/rocker-example.js.map +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/components/icon.js +266 -0
- package/dist/components/icon.js.map +1 -0
- package/dist/components/icons.js +705 -0
- package/dist/components/icons.js.map +1 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +4 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/ix-icon.d.ts +11 -0
- package/dist/components/ix-icon.js +8 -0
- package/dist/components/ix-icon.js.map +1 -0
- package/dist/esm/app-globals-0f993ce5.js +5 -0
- package/dist/esm/app-globals-0f993ce5.js.map +1 -0
- package/dist/esm/icon-022f3b5e.js +242 -0
- package/dist/esm/icon-022f3b5e.js.map +1 -0
- package/dist/esm/icons-84dc9236.js +705 -0
- package/dist/esm/icons-84dc9236.js.map +1 -0
- package/dist/esm/index-8088fea1.js +1779 -0
- package/dist/esm/index-8088fea1.js.map +1 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/ix-icon.entry.js +4 -0
- package/dist/esm/ix-icon.entry.js.map +1 -0
- package/dist/esm/ix-icons.js +22 -0
- package/dist/esm/ix-icons.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/ix-icons/index.esm.js +2 -0
- package/dist/ix-icons/index.esm.js.map +1 -0
- package/dist/ix-icons/ix-icons.esm.js +2 -0
- package/dist/ix-icons/ix-icons.esm.js.map +1 -0
- package/dist/ix-icons/p-51684ec4.js +2 -0
- package/dist/ix-icons/p-51684ec4.js.map +1 -0
- package/dist/ix-icons/p-7d7f048e.js +2 -0
- package/dist/ix-icons/p-7d7f048e.js.map +1 -0
- package/dist/ix-icons/p-99baafb2.entry.js +2 -0
- package/dist/ix-icons/p-99baafb2.entry.js.map +1 -0
- package/dist/ix-icons/p-e1255160.js +2 -0
- package/dist/ix-icons/p-e1255160.js.map +1 -0
- package/dist/ix-icons/p-efdd4090.js +3 -0
- package/dist/ix-icons/p-efdd4090.js.map +1 -0
- package/dist/sample.json +703 -0
- package/dist/types/components/icon/icon.d.ts +32 -0
- package/dist/types/components/icon/icons.d.ts +700 -0
- package/dist/types/components/icon/meta-tag.d.ts +12 -0
- package/dist/types/components/icon/resolveIcon.d.ts +9 -0
- package/dist/types/components/icon/test/rocker-example.d.ts +1 -0
- package/dist/types/components.d.ts +63 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +1681 -0
- package/icons/index.d.ts +702 -0
- package/icons/index.js +702 -0
- package/icons/index.mjs +702 -0
- package/icons/package.json +8 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +70 -0
- package/svg/about-filled.svg +1 -0
- package/svg/about.svg +1 -0
- package/svg/add-application.svg +1 -0
- package/svg/add-circle-filled.svg +1 -0
- package/svg/add-circle.svg +1 -0
- package/svg/add-document-note.svg +1 -0
- package/svg/add-eye-filled.svg +1 -0
- package/svg/add-eye.svg +1 -0
- package/svg/add-task-list.svg +1 -0
- package/svg/add-task.svg +1 -0
- package/svg/add-user-filled.svg +1 -0
- package/svg/add-user.svg +1 -0
- package/svg/add.svg +1 -0
- package/svg/ai.svg +1 -0
- package/svg/alarm-bell-cancelled-filled.svg +1 -0
- package/svg/alarm-bell-cancelled.svg +1 -0
- package/svg/alarm-bell-filled.svg +1 -0
- package/svg/alarm-bell.svg +1 -0
- package/svg/alarm-clock-filled.svg +1 -0
- package/svg/alarm-clock.svg +1 -0
- package/svg/alarm-filled.svg +1 -0
- package/svg/alarm.svg +1 -0
- package/svg/analyze.svg +1 -0
- package/svg/anomaly-found.svg +1 -0
- package/svg/anomaly.svg +1 -0
- package/svg/app-menu.svg +1 -0
- package/svg/application-screen.svg +1 -0
- package/svg/applications.svg +1 -0
- package/svg/apps.svg +1 -0
- package/svg/arrow-diagonal-bottom-left.svg +1 -0
- package/svg/arrow-diagonal-bottom-right.svg +1 -0
- package/svg/arrow-diagonal-top-left.svg +1 -0
- package/svg/arrow-diagonal-top-right.svg +1 -0
- package/svg/arrow-down-right.svg +1 -0
- package/svg/arrow-down.svg +1 -0
- package/svg/arrow-left.svg +1 -0
- package/svg/arrow-right-down.svg +1 -0
- package/svg/arrow-right.svg +1 -0
- package/svg/arrow-up.svg +1 -0
- package/svg/attach.svg +1 -0
- package/svg/attachment-upload.svg +1 -0
- package/svg/audio-description1.svg +1 -0
- package/svg/audio-description2.svg +1 -0
- package/svg/audit-report.svg +1 -0
- package/svg/average.svg +1 -0
- package/svg/backup-filled.svg +1 -0
- package/svg/backup.svg +1 -0
- package/svg/bar-code.svg +1 -0
- package/svg/barchart.svg +1 -0
- package/svg/battery-check.svg +1 -0
- package/svg/battery-empty-question.svg +1 -0
- package/svg/battery-empty.svg +1 -0
- package/svg/battery-exclamation.svg +1 -0
- package/svg/battery-full-check.svg +1 -0
- package/svg/battery-full.svg +1 -0
- package/svg/battery-half.svg +1 -0
- package/svg/battery-low.svg +1 -0
- package/svg/battery-quarter.svg +1 -0
- package/svg/battery-slash.svg +1 -0
- package/svg/battery-three-quarter.svg +1 -0
- package/svg/battery-xmark.svg +1 -0
- package/svg/bezier-curve.svg +1 -0
- package/svg/binoculars-filled.svg +1 -0
- package/svg/binoculars.svg +1 -0
- package/svg/blazor.svg +1 -0
- package/svg/book.svg +1 -0
- package/svg/bookmark-filled.svg +1 -0
- package/svg/bookmark.svg +1 -0
- package/svg/boundary-signals.svg +1 -0
- package/svg/building1-filled.svg +1 -0
- package/svg/building1.svg +1 -0
- package/svg/building2-filled.svg +1 -0
- package/svg/building2.svg +1 -0
- package/svg/bulb-filled.svg +1 -0
- package/svg/bulb.svg +1 -0
- package/svg/calendar-filled.svg +1 -0
- package/svg/calendar-settings.svg +1 -0
- package/svg/calendar.svg +1 -0
- package/svg/cancel.svg +1 -0
- package/svg/cancelled.svg +1 -0
- package/svg/capacity-filled.svg +1 -0
- package/svg/capacity.svg +1 -0
- package/svg/capture.svg +1 -0
- package/svg/car-filled.svg +1 -0
- package/svg/car.svg +1 -0
- package/svg/card-layout-filled.svg +1 -0
- package/svg/card-layout.svg +1 -0
- package/svg/certificate-error-filled.svg +1 -0
- package/svg/certificate-error.svg +1 -0
- package/svg/certificate-exclamation-filled.svg +1 -0
- package/svg/certificate-exclamation.svg +1 -0
- package/svg/certificate-success-filled.svg +1 -0
- package/svg/certificate-success.svg +1 -0
- package/svg/chart-cursor.svg +1 -0
- package/svg/chart-curve-linear.svg +1 -0
- package/svg/chart-curve-spline.svg +1 -0
- package/svg/chart-curve-stepped.svg +1 -0
- package/svg/chart-diagram-add.svg +1 -0
- package/svg/chart-diagram.svg +1 -0
- package/svg/chart-diagrams.svg +1 -0
- package/svg/chart-labels-filled.svg +1 -0
- package/svg/chart-labels.svg +1 -0
- package/svg/check-in.svg +1 -0
- package/svg/check-out.svg +1 -0
- package/svg/check.svg +1 -0
- package/svg/checkbox-component-checked.svg +1 -0
- package/svg/checkbox-component-mixed.svg +1 -0
- package/svg/checkbox-component-unchecked.svg +1 -0
- package/svg/checkbox-filled.svg +1 -0
- package/svg/checkbox.svg +1 -0
- package/svg/checkboxes-filled.svg +1 -0
- package/svg/checkboxes.svg +1 -0
- package/svg/chevron-down-small.svg +1 -0
- package/svg/chevron-down.svg +1 -0
- package/svg/chevron-left-small.svg +1 -0
- package/svg/chevron-left.svg +1 -0
- package/svg/chevron-right-small.svg +1 -0
- package/svg/chevron-right.svg +1 -0
- package/svg/chevron-up-small.svg +1 -0
- package/svg/chevron-up.svg +1 -0
- package/svg/circle-dot-filled.svg +1 -0
- package/svg/circle-dot.svg +1 -0
- package/svg/circle-filled.svg +1 -0
- package/svg/circle-pause-filled.svg +1 -0
- package/svg/circle-pause.svg +1 -0
- package/svg/circle-play-filled.svg +1 -0
- package/svg/circle-play.svg +1 -0
- package/svg/circle-stop-filled.svg +1 -0
- package/svg/circle-stop.svg +1 -0
- package/svg/circle.svg +1 -0
- package/svg/clear-filter-filled.svg +1 -0
- package/svg/clear-filter.svg +1 -0
- package/svg/clear.svg +1 -0
- package/svg/clock-filled.svg +1 -0
- package/svg/clock.svg +1 -0
- package/svg/close-small.svg +1 -0
- package/svg/close.svg +1 -0
- package/svg/cloud-download-add-filled.svg +1 -0
- package/svg/cloud-download-add.svg +1 -0
- package/svg/cloud-download-filled.svg +1 -0
- package/svg/cloud-download-list-filled.svg +1 -0
- package/svg/cloud-download-list.svg +1 -0
- package/svg/cloud-download.svg +1 -0
- package/svg/cloud-fail-filled.svg +1 -0
- package/svg/cloud-fail.svg +1 -0
- package/svg/cloud-filled.svg +1 -0
- package/svg/cloud-new-filled.svg +1 -0
- package/svg/cloud-new.svg +1 -0
- package/svg/cloud-success-filled.svg +1 -0
- package/svg/cloud-success.svg +1 -0
- package/svg/cloud-upload-filled.svg +1 -0
- package/svg/cloud-upload.svg +1 -0
- package/svg/cloud.svg +1 -0
- package/svg/code.svg +1 -0
- package/svg/coffee-empty-filled.svg +1 -0
- package/svg/coffee-empty.svg +1 -0
- package/svg/coffee-filled.svg +1 -0
- package/svg/coffee.svg +1 -0
- package/svg/cogwheel-filled.svg +1 -0
- package/svg/cogwheel.svg +1 -0
- package/svg/combine.svg +1 -0
- package/svg/compact-disc-filled.svg +1 -0
- package/svg/compact-disc.svg +1 -0
- package/svg/compound-block.svg +1 -0
- package/svg/configuration.svg +1 -0
- package/svg/configure-filled.svg +1 -0
- package/svg/configure.svg +1 -0
- package/svg/connected.svg +1 -0
- package/svg/connector-chart-filled.svg +1 -0
- package/svg/connector-chart.svg +1 -0
- package/svg/connector-filled.svg +1 -0
- package/svg/connector-hex-filled.svg +1 -0
- package/svg/connector-hex.svg +1 -0
- package/svg/connector-rect-filled.svg +1 -0
- package/svg/connector-rect.svg +1 -0
- package/svg/connector-rhomb-filled.svg +1 -0
- package/svg/connector-rhomb.svg +1 -0
- package/svg/connector.svg +1 -0
- package/svg/consistency-check.svg +1 -0
- package/svg/contact-details-filled.svg +1 -0
- package/svg/contact-details.svg +1 -0
- package/svg/context-menu.svg +1 -0
- package/svg/controlled-device.svg +1 -0
- package/svg/controller-device.svg +1 -0
- package/svg/copy.svg +1 -0
- package/svg/corner-arrow-up-left.svg +1 -0
- package/svg/couch-filled.svg +1 -0
- package/svg/couch.svg +1 -0
- package/svg/create-plant-filled.svg +1 -0
- package/svg/create-plant.svg +1 -0
- package/svg/cut.svg +1 -0
- package/svg/cycle.svg +1 -0
- package/svg/data-egress.svg +1 -0
- package/svg/data-ingress-egress.svg +1 -0
- package/svg/data-ingress.svg +1 -0
- package/svg/database-filled.svg +1 -0
- package/svg/database.svg +1 -0
- package/svg/details.svg +1 -0
- package/svg/diagram-module-library.svg +1 -0
- package/svg/diagram-module-new.svg +1 -0
- package/svg/diagram-module.svg +1 -0
- package/svg/diamond.svg +1 -0
- package/svg/disconnected.svg +1 -0
- package/svg/disk-filled.svg +1 -0
- package/svg/disk-pen.svg +1 -0
- package/svg/disk.svg +1 -0
- package/svg/distribution.svg +1 -0
- package/svg/doc-document.svg +1 -0
- package/svg/document-bulk.svg +1 -0
- package/svg/document-fail.svg +1 -0
- package/svg/document-info.svg +1 -0
- package/svg/document-link.svg +1 -0
- package/svg/document-management.svg +1 -0
- package/svg/document-reference.svg +1 -0
- package/svg/document-settings.svg +1 -0
- package/svg/document-success.svg +1 -0
- package/svg/document.svg +1 -0
- package/svg/double-check.svg +1 -0
- package/svg/double-chevron-down.svg +1 -0
- package/svg/double-chevron-left.svg +1 -0
- package/svg/double-chevron-right.svg +1 -0
- package/svg/double-chevron-up.svg +1 -0
- package/svg/doublet-filled.svg +1 -0
- package/svg/doublet.svg +1 -0
- package/svg/download-add.svg +1 -0
- package/svg/download-list.svg +1 -0
- package/svg/download.svg +1 -0
- package/svg/drop.svg +1 -0
- package/svg/duplicate-document.svg +1 -0
- package/svg/duplicate.svg +1 -0
- package/svg/e-mail-filled.svg +1 -0
- package/svg/e-mail.svg +1 -0
- package/svg/earth-filled.svg +1 -0
- package/svg/earth.svg +1 -0
- package/svg/edit-plant.svg +1 -0
- package/svg/electrical-energy-filled.svg +1 -0
- package/svg/electrical-energy.svg +1 -0
- package/svg/ellipse-arc.svg +1 -0
- package/svg/ellipse-filled.svg +1 -0
- package/svg/ellipse.svg +1 -0
- package/svg/error-filled.svg +1 -0
- package/svg/error.svg +1 -0
- package/svg/explore-filled.svg +1 -0
- package/svg/explore.svg +1 -0
- package/svg/export.svg +1 -0
- package/svg/eye-cancelled-filled.svg +1 -0
- package/svg/eye-cancelled.svg +1 -0
- package/svg/eye-filled.svg +1 -0
- package/svg/eye.svg +1 -0
- package/svg/factory-reset-filled.svg +1 -0
- package/svg/factory-reset.svg +1 -0
- package/svg/filter-filled.svg +1 -0
- package/svg/filter-outline.svg +1 -0
- package/svg/filter.svg +1 -0
- package/svg/fit-to-screen.svg +1 -0
- package/svg/flag-filled.svg +1 -0
- package/svg/flag.svg +1 -0
- package/svg/folder-down-filled.svg +1 -0
- package/svg/folder-down.svg +1 -0
- package/svg/folder-filled.svg +1 -0
- package/svg/folder-new-filled.svg +1 -0
- package/svg/folder-new-outline.svg +1 -0
- package/svg/folder-new.svg +1 -0
- package/svg/folder-open-filled.svg +1 -0
- package/svg/folder-open-outline.svg +1 -0
- package/svg/folder-open.svg +1 -0
- package/svg/folder-outline.svg +1 -0
- package/svg/folder-up-filled.svg +1 -0
- package/svg/folder-up.svg +1 -0
- package/svg/folder.svg +1 -0
- package/svg/full-screeen-exit.svg +1 -0
- package/svg/full-screeen.svg +1 -0
- package/svg/full-screen-exit.svg +1 -0
- package/svg/full-screen.svg +1 -0
- package/svg/function-block-library.svg +1 -0
- package/svg/function-block-new.svg +1 -0
- package/svg/function-block.svg +1 -0
- package/svg/function-diagram-new.svg +1 -0
- package/svg/function-diagram.svg +1 -0
- package/svg/gauge-filled.svg +1 -0
- package/svg/gauge.svg +1 -0
- package/svg/gaugechart.svg +1 -0
- package/svg/global-plant-filled.svg +1 -0
- package/svg/global-plant.svg +1 -0
- package/svg/globe-filled.svg +1 -0
- package/svg/globe.svg +1 -0
- package/svg/goto.svg +1 -0
- package/svg/group.svg +1 -0
- package/svg/hard-reset.svg +1 -0
- package/svg/hardware-cabinet.svg +1 -0
- package/svg/health-filled.svg +1 -0
- package/svg/health.svg +1 -0
- package/svg/heart-filled.svg +1 -0
- package/svg/heart.svg +1 -0
- package/svg/hexagon-vertical-bars-database-filled.svg +1 -0
- package/svg/hexagon-vertical-bars-database.svg +1 -0
- package/svg/hexagon-vertical-bars-filled.svg +1 -0
- package/svg/hexagon-vertical-bars.svg +1 -0
- package/svg/hierarchy.svg +1 -0
- package/svg/highlight-filled.svg +1 -0
- package/svg/highlight.svg +1 -0
- package/svg/history-list.svg +1 -0
- package/svg/history.svg +1 -0
- package/svg/home-filled.svg +1 -0
- package/svg/home.svg +1 -0
- package/svg/hourglass.svg +1 -0
- package/svg/image-filled.svg +1 -0
- package/svg/image.svg +1 -0
- package/svg/import.svg +1 -0
- package/svg/info-feed.svg +1 -0
- package/svg/info-filled.svg +1 -0
- package/svg/info.svg +1 -0
- package/svg/ingestion-report.svg +1 -0
- package/svg/ingestion.svg +1 -0
- package/svg/ink-pen.svg +1 -0
- package/svg/inquiry-filled.svg +1 -0
- package/svg/inquiry-mail.svg +1 -0
- package/svg/inquiry.svg +1 -0
- package/svg/item-details-filled.svg +1 -0
- package/svg/item-details.svg +1 -0
- package/svg/label-filled.svg +1 -0
- package/svg/label.svg +1 -0
- package/svg/landing-page-logo.svg +1 -0
- package/svg/language-filled.svg +1 -0
- package/svg/language.svg +1 -0
- package/svg/layers-filled.svg +1 -0
- package/svg/layers.svg +1 -0
- package/svg/leaf.svg +1 -0
- package/svg/legal.svg +1 -0
- package/svg/library-new.svg +1 -0
- package/svg/library.svg +1 -0
- package/svg/license.svg +1 -0
- package/svg/light-dark.svg +1 -0
- package/svg/line-diagonal.svg +1 -0
- package/svg/link.svg +1 -0
- package/svg/list.svg +1 -0
- package/svg/live-schedule.svg +1 -0
- package/svg/location-filled.svg +1 -0
- package/svg/location-outline.svg +1 -0
- package/svg/location.svg +1 -0
- package/svg/lock-filled.svg +1 -0
- package/svg/lock-key-filled.svg +1 -0
- package/svg/lock-key.svg +1 -0
- package/svg/lock.svg +1 -0
- package/svg/log-in.svg +1 -0
- package/svg/log-out.svg +1 -0
- package/svg/log.svg +1 -0
- package/svg/logic-diagram.svg +1 -0
- package/svg/lower-limit.svg +1 -0
- package/svg/mail-filled.svg +1 -0
- package/svg/mail.svg +1 -0
- package/svg/maintenance-documents.svg +1 -0
- package/svg/maintenance-info.svg +1 -0
- package/svg/maintenance-warning-filled.svg +1 -0
- package/svg/maintenance-warning.svg +1 -0
- package/svg/maintenance.svg +1 -0
- package/svg/mandatory-done.svg +1 -0
- package/svg/mandatory.svg +1 -0
- package/svg/map.svg +1 -0
- package/svg/maximize.svg +1 -0
- package/svg/microphone-filled.svg +1 -0
- package/svg/microphone.svg +1 -0
- package/svg/minimize.svg +1 -0
- package/svg/minus.svg +1 -0
- package/svg/missing-symbol.svg +1 -0
- package/svg/mix.svg +1 -0
- package/svg/monitor-filled.svg +1 -0
- package/svg/monitor-trend.svg +1 -0
- package/svg/monitor.svg +1 -0
- package/svg/monitoring-add.svg +1 -0
- package/svg/monitoring.svg +1 -0
- package/svg/monitorings.svg +1 -0
- package/svg/moon-filled.svg +1 -0
- package/svg/moon.svg +1 -0
- package/svg/more-menu.svg +1 -0
- package/svg/mouse-click-filled.svg +1 -0
- package/svg/mouse-click.svg +1 -0
- package/svg/mouse-select-filled.svg +1 -0
- package/svg/mouse-select.svg +1 -0
- package/svg/mp4-document.svg +1 -0
- package/svg/namur-check-function-filled.svg +1 -0
- package/svg/namur-check-function.svg +1 -0
- package/svg/namur-failure-filled.svg +1 -0
- package/svg/namur-failure.svg +1 -0
- package/svg/namur-maintenance-required-filled.svg +1 -0
- package/svg/namur-maintenance-required.svg +1 -0
- package/svg/namur-ok-filled.svg +1 -0
- package/svg/namur-ok.svg +1 -0
- package/svg/namur-out-of-spec-filled.svg +1 -0
- package/svg/namur-out-of-spec.svg +1 -0
- package/svg/navigation-filled.svg +1 -0
- package/svg/navigation-left.svg +1 -0
- package/svg/navigation-right.svg +1 -0
- package/svg/navigation.svg +1 -0
- package/svg/new-indicator-filled.svg +1 -0
- package/svg/new-indicator.svg +1 -0
- package/svg/no-filter-filled.svg +1 -0
- package/svg/no-filter.svg +1 -0
- package/svg/no-image.svg +1 -0
- package/svg/note-filled.svg +1 -0
- package/svg/note.svg +1 -0
- package/svg/notification-filled.svg +1 -0
- package/svg/notification.svg +1 -0
- package/svg/notifications-filled.svg +1 -0
- package/svg/notifications.svg +1 -0
- package/svg/ontology-filled.svg +1 -0
- package/svg/ontology.svg +1 -0
- package/svg/open-external.svg +1 -0
- package/svg/open-file-filled.svg +1 -0
- package/svg/open-file.svg +1 -0
- package/svg/operate-plant-filled.svg +1 -0
- package/svg/operate-plant.svg +1 -0
- package/svg/optimize.svg +1 -0
- package/svg/p-and-i-symbols.svg +1 -0
- package/svg/p-i-diagram.svg +1 -0
- package/svg/pan.svg +1 -0
- package/svg/paste.svg +1 -0
- package/svg/pause.svg +1 -0
- package/svg/pc-tower-filled.svg +1 -0
- package/svg/pc-tower.svg +1 -0
- package/svg/pdf-document.svg +1 -0
- package/svg/pen-filled.svg +1 -0
- package/svg/pen.svg +1 -0
- package/svg/phone-filled.svg +1 -0
- package/svg/phone.svg +1 -0
- package/svg/photo-camera-add.svg +1 -0
- package/svg/photo-camera-cancelled-filled.svg +1 -0
- package/svg/photo-camera-cancelled.svg +1 -0
- package/svg/photo-camera-filled.svg +1 -0
- package/svg/photo-camera.svg +1 -0
- package/svg/photo-cameras.svg +1 -0
- package/svg/piechart-filled.svg +1 -0
- package/svg/piechart.svg +1 -0
- package/svg/pin-filled.svg +1 -0
- package/svg/pin.svg +1 -0
- package/svg/plant-filled.svg +1 -0
- package/svg/plant-handbook-filled.svg +1 -0
- package/svg/plant-handbook.svg +1 -0
- package/svg/plant-outline.svg +1 -0
- package/svg/plant-security.svg +1 -0
- package/svg/plant-settings-filled.svg +1 -0
- package/svg/plant-settings.svg +1 -0
- package/svg/plant-user-filled.svg +1 -0
- package/svg/plant-user.svg +1 -0
- package/svg/plant.svg +1 -0
- package/svg/plants-filled.svg +1 -0
- package/svg/plants.svg +1 -0
- package/svg/play-filled.svg +1 -0
- package/svg/play-pause-filled.svg +1 -0
- package/svg/play-pause.svg +1 -0
- package/svg/play-stepwise-filled.svg +1 -0
- package/svg/play-stepwise.svg +1 -0
- package/svg/play.svg +1 -0
- package/svg/plus-minus-times-divide.svg +1 -0
- package/svg/plus.svg +1 -0
- package/svg/point-up-filled.svg +1 -0
- package/svg/point-up.svg +1 -0
- package/svg/polar-plot.svg +1 -0
- package/svg/polygon-filled.svg +1 -0
- package/svg/polygon-line.svg +1 -0
- package/svg/polygon.svg +1 -0
- package/svg/ppt-document.svg +1 -0
- package/svg/print-filled.svg +1 -0
- package/svg/print.svg +1 -0
- package/svg/prio-high.svg +1 -0
- package/svg/prio-low.svg +1 -0
- package/svg/prio-middle.svg +1 -0
- package/svg/product-catalog.svg +1 -0
- package/svg/product-management.svg +1 -0
- package/svg/product.svg +1 -0
- package/svg/project-configuration.svg +1 -0
- package/svg/project-new.svg +1 -0
- package/svg/project-scenarios.svg +1 -0
- package/svg/project-server-filled.svg +1 -0
- package/svg/project-server.svg +1 -0
- package/svg/project.svg +1 -0
- package/svg/protocol.svg +1 -0
- package/svg/publish-document.svg +1 -0
- package/svg/publish.svg +1 -0
- package/svg/qr-code.svg +1 -0
- package/svg/quality-report.svg +1 -0
- package/svg/question-filled.svg +1 -0
- package/svg/question.svg +1 -0
- package/svg/radarchart.svg +1 -0
- package/svg/radio-waves-off.svg +1 -0
- package/svg/radio-waves-warning.svg +1 -0
- package/svg/radio-waves.svg +1 -0
- package/svg/random-filled.svg +1 -0
- package/svg/random.svg +1 -0
- package/svg/reboot.svg +1 -0
- package/svg/rectangle-filled.svg +1 -0
- package/svg/rectangle.svg +1 -0
- package/svg/redo.svg +1 -0
- package/svg/reference.svg +1 -0
- package/svg/refresh-cancelled.svg +1 -0
- package/svg/refresh.svg +1 -0
- package/svg/reload.svg +1 -0
- package/svg/remove-application.svg +1 -0
- package/svg/remove-eye-filled.svg +1 -0
- package/svg/remove-eye.svg +1 -0
- package/svg/rename.svg +1 -0
- package/svg/replace.svg +1 -0
- package/svg/report-barchart.svg +1 -0
- package/svg/report-linechart.svg +1 -0
- package/svg/report-text.svg +1 -0
- package/svg/reset.svg +1 -0
- package/svg/restore-backup-filled.svg +1 -0
- package/svg/restore-backup-pc.svg +1 -0
- package/svg/restore-backup.svg +1 -0
- package/svg/rhomb-filled.svg +1 -0
- package/svg/rhomb.svg +1 -0
- package/svg/road-filled.svg +1 -0
- package/svg/road.svg +1 -0
- package/svg/rocket-filled.svg +1 -0
- package/svg/rocket.svg +1 -0
- package/svg/route-target.svg +1 -0
- package/svg/route.svg +1 -0
- package/svg/scatterplot.svg +1 -0
- package/svg/scheduler-filled.svg +1 -0
- package/svg/scheduler.svg +1 -0
- package/svg/screen-filled.svg +1 -0
- package/svg/screen.svg +1 -0
- package/svg/screenshot-filled.svg +1 -0
- package/svg/screenshot.svg +1 -0
- package/svg/script-add.svg +1 -0
- package/svg/script.svg +1 -0
- package/svg/scripts.svg +1 -0
- package/svg/search.svg +1 -0
- package/svg/share-filled.svg +1 -0
- package/svg/share.svg +1 -0
- package/svg/shopping-cart-filled.svg +1 -0
- package/svg/shopping-cart.svg +1 -0
- package/svg/shout-filled.svg +1 -0
- package/svg/shout.svg +1 -0
- package/svg/sign-language.svg +1 -0
- package/svg/signal-strength-0.svg +1 -0
- package/svg/signal-strength-1.svg +1 -0
- package/svg/signal-strength-2.svg +1 -0
- package/svg/signal-strength-3.svg +1 -0
- package/svg/signal-strength-4.svg +1 -0
- package/svg/signal-strength-5.svg +1 -0
- package/svg/signal-strength-6.svg +1 -0
- package/svg/signal-strength-7.svg +1 -0
- package/svg/signal-strength-8.svg +1 -0
- package/svg/simit-component.svg +1 -0
- package/svg/simit-macro-component-editor.svg +1 -0
- package/svg/simit-macro.svg +1 -0
- package/svg/single-check.svg +1 -0
- package/svg/skip-back-filled.svg +1 -0
- package/svg/skip-back.svg +1 -0
- package/svg/skip-filled.svg +1 -0
- package/svg/skip.svg +1 -0
- package/svg/snowflake.svg +1 -0
- package/svg/sort-ascending.svg +1 -0
- package/svg/sort-descending.svg +1 -0
- package/svg/sort.svg +1 -0
- package/svg/sound-loud-filled.svg +1 -0
- package/svg/sound-loud.svg +1 -0
- package/svg/sound-mute-filled.svg +1 -0
- package/svg/sound-mute.svg +1 -0
- package/svg/sound-off-filled.svg +1 -0
- package/svg/sound-off.svg +1 -0
- package/svg/sound-quiet-filled.svg +1 -0
- package/svg/sound-quiet.svg +1 -0
- package/svg/spatial.svg +1 -0
- package/svg/split-horizontally.svg +1 -0
- package/svg/split-vertically.svg +1 -0
- package/svg/stamp-filled.svg +1 -0
- package/svg/stamp.svg +1 -0
- package/svg/standby.svg +1 -0
- package/svg/star-add-filled.svg +1 -0
- package/svg/star-add.svg +1 -0
- package/svg/star-cancelled-filled.svg +1 -0
- package/svg/star-cancelled.svg +1 -0
- package/svg/star-filled.svg +1 -0
- package/svg/star-list-filled.svg +1 -0
- package/svg/star-list.svg +1 -0
- package/svg/star.svg +1 -0
- package/svg/start-data-analysis.svg +1 -0
- package/svg/steering-user-filled.svg +1 -0
- package/svg/steering-user.svg +1 -0
- package/svg/steering.svg +1 -0
- package/svg/stethoscope.svg +1 -0
- package/svg/stop-filled.svg +1 -0
- package/svg/stop.svg +1 -0
- package/svg/success-filled.svg +1 -0
- package/svg/success.svg +1 -0
- package/svg/sun-filled.svg +1 -0
- package/svg/sun.svg +1 -0
- package/svg/support.svg +1 -0
- package/svg/surveillance-cancelled-filled.svg +1 -0
- package/svg/surveillance-cancelled.svg +1 -0
- package/svg/surveillance-filled.svg +1 -0
- package/svg/surveillance.svg +1 -0
- package/svg/svg-document.svg +1 -0
- package/svg/swap-left-right.svg +1 -0
- package/svg/switch-slider.svg +1 -0
- package/svg/table-columns.svg +1 -0
- package/svg/table-rows.svg +1 -0
- package/svg/table-settings.svg +1 -0
- package/svg/table.svg +1 -0
- package/svg/tag-filled.svg +1 -0
- package/svg/tag-plus-filled.svg +1 -0
- package/svg/tag-plus.svg +1 -0
- package/svg/tag.svg +1 -0
- package/svg/tasks-all.svg +1 -0
- package/svg/tasks-done.svg +1 -0
- package/svg/tasks-open.svg +1 -0
- package/svg/text-circle-rectangle-filled.svg +1 -0
- package/svg/text-circle-rectangle.svg +1 -0
- package/svg/text-document.svg +1 -0
- package/svg/text.svg +1 -0
- package/svg/threshold-cancelled.svg +1 -0
- package/svg/threshold-off.svg +1 -0
- package/svg/threshold-on.svg +1 -0
- package/svg/to-be-published.svg +1 -0
- package/svg/to-search.svg +1 -0
- package/svg/topic-filled.svg +1 -0
- package/svg/topic.svg +1 -0
- package/svg/touch-filled.svg +1 -0
- package/svg/touch.svg +1 -0
- package/svg/trashcan-filled.svg +1 -0
- package/svg/trashcan.svg +1 -0
- package/svg/tree.svg +1 -0
- package/svg/trend-downward-filled.svg +1 -0
- package/svg/trend-downward.svg +1 -0
- package/svg/trend-sideways-filled.svg +1 -0
- package/svg/trend-sideways.svg +1 -0
- package/svg/trend-upward-filled.svg +1 -0
- package/svg/trend-upward.svg +1 -0
- package/svg/trend.svg +1 -0
- package/svg/triangle-filled.svg +1 -0
- package/svg/triangle.svg +1 -0
- package/svg/truck-filled.svg +1 -0
- package/svg/truck.svg +1 -0
- package/svg/tulip-filled.svg +1 -0
- package/svg/tulip.svg +1 -0
- package/svg/txt-document.svg +1 -0
- package/svg/undo.svg +1 -0
- package/svg/ungroup.svg +1 -0
- package/svg/unlock-filled.svg +1 -0
- package/svg/unlock-plant-filled.svg +1 -0
- package/svg/unlock-plant.svg +1 -0
- package/svg/unlock.svg +1 -0
- package/svg/upload-document-note.svg +1 -0
- package/svg/upload-fail.svg +1 -0
- package/svg/upload-success.svg +1 -0
- package/svg/upload.svg +1 -0
- package/svg/upper-limit.svg +1 -0
- package/svg/user-check-filled.svg +1 -0
- package/svg/user-check.svg +1 -0
- package/svg/user-fail-filled.svg +1 -0
- package/svg/user-fail.svg +1 -0
- package/svg/user-filled.svg +1 -0
- package/svg/user-management-filled.svg +1 -0
- package/svg/user-management.svg +1 -0
- package/svg/user-profile-filled.svg +1 -0
- package/svg/user-profile.svg +1 -0
- package/svg/user-reading-reading.svg +1 -0
- package/svg/user-reading.svg +1 -0
- package/svg/user-settings-filled.svg +1 -0
- package/svg/user-settings.svg +1 -0
- package/svg/user.svg +1 -0
- package/svg/validate.svg +1 -0
- package/svg/vdi-folder.svg +1 -0
- package/svg/version-history.svg +1 -0
- package/svg/video-file-filled.svg +1 -0
- package/svg/video-file.svg +1 -0
- package/svg/warning-filled.svg +1 -0
- package/svg/warning-rhomb-filled.svg +1 -0
- package/svg/warning-rhomb.svg +1 -0
- package/svg/warning.svg +1 -0
- package/svg/water-bathing.svg +1 -0
- package/svg/water-fish.svg +1 -0
- package/svg/water-plant.svg +1 -0
- package/svg/water-sunbathing.svg +1 -0
- package/svg/waveform.svg +1 -0
- package/svg/webcam-cancelled-filled.svg +1 -0
- package/svg/webcam-cancelled.svg +1 -0
- package/svg/webcam-filled.svg +1 -0
- package/svg/webcam.svg +1 -0
- package/svg/wlan-off.svg +1 -0
- package/svg/wlan-strength-0.svg +1 -0
- package/svg/wlan-strength-1.svg +1 -0
- package/svg/wlan-strength-2.svg +1 -0
- package/svg/wlan-strength-3.svg +1 -0
- package/svg/work-case-filled.svg +1 -0
- package/svg/work-case.svg +1 -0
- package/svg/workspace.svg +1 -0
- package/svg/workspaces.svg +1 -0
- package/svg/x-axis-settings.svg +1 -0
- package/svg/xls-document.svg +1 -0
- package/svg/xml-document.svg +1 -0
- package/svg/y-axis-settings.svg +1 -0
- package/svg/youtube-filled.svg +1 -0
- package/svg/youtube.svg +1 -0
- package/svg/zoom-in.svg +1 -0
- package/svg/zoom-out.svg +1 -0
- package/svg/zoom-selection.svg +1 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the base path to where the assets can be found. Use "setAssetPath(path)"
|
|
3
|
+
* if the path needs to be customized.
|
|
4
|
+
*/
|
|
5
|
+
export declare const getAssetPath: (path: string) => string;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Used to manually set the base path where assets can be found.
|
|
9
|
+
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
10
|
+
* such as "setAssetPath(import.meta.url)". Other options include
|
|
11
|
+
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
12
|
+
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
|
13
|
+
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
14
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
15
|
+
* will have to ensure the static assets are copied to its build directory.
|
|
16
|
+
*/
|
|
17
|
+
export declare const setAssetPath: (path: string) => void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
21
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
22
|
+
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
23
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
24
|
+
* will result in the same behavior.
|
|
25
|
+
*/
|
|
26
|
+
export declare const setNonce: (nonce: string) => void
|
|
27
|
+
|
|
28
|
+
export interface SetPlatformOptions {
|
|
29
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
30
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
31
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
@@ -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 @@
|
|
|
1
|
+
{"file":"ix-icon.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"app-globals-0f993ce5.js","mappings":"AAAY,MAAC,aAAa,GAAG,MAAM;;;;","names":[],"sources":["@stencil/core/internal/app-globals"],"sourcesContent":["export const globalScripts = () => {};\n"],"version":3}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { g as getAssetPath, r as registerInstance, h, H as Host, a as getElement } from './index-8088fea1.js';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* COPYRIGHT (c) Siemens AG 2018-2024 ALL RIGHTS RESERVED.
|
|
5
|
+
*/
|
|
6
|
+
function getV3PreviewMetaElement() {
|
|
7
|
+
return document.querySelector("meta[name='ix-icons:v3-preview']");
|
|
8
|
+
}
|
|
9
|
+
function getV3PreviewMetaContent() {
|
|
10
|
+
const v3PreviewMetaElement = getV3PreviewMetaElement();
|
|
11
|
+
if (v3PreviewMetaElement) {
|
|
12
|
+
return v3PreviewMetaElement.getAttribute('content').split(';');
|
|
13
|
+
}
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Provide custom svg path for icons
|
|
18
|
+
*
|
|
19
|
+
* <meta name="ix-icons:path" content="/build/svg" />
|
|
20
|
+
*/
|
|
21
|
+
function getCustomAssetUrl() {
|
|
22
|
+
const assetPath = document.querySelector("meta[name='ix-icons:path']");
|
|
23
|
+
if (assetPath) {
|
|
24
|
+
const path = assetPath.getAttribute('content');
|
|
25
|
+
return path;
|
|
26
|
+
}
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Enable v3 preview features
|
|
31
|
+
*
|
|
32
|
+
* <meta name="ix-icons:v3-preview" content="svg-path-loading;" />
|
|
33
|
+
*/
|
|
34
|
+
function isV3PreviewEnabled() {
|
|
35
|
+
const features = getV3PreviewMetaContent();
|
|
36
|
+
if (!features) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
if (features.includes('svg-path-loading')) {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/*
|
|
46
|
+
* SPDX-FileCopyrightText: 2023 Siemens AG
|
|
47
|
+
*
|
|
48
|
+
* SPDX-License-Identifier: MIT
|
|
49
|
+
*
|
|
50
|
+
* This source code is licensed under the MIT license found in the
|
|
51
|
+
* LICENSE file in the root directory of this source tree.
|
|
52
|
+
*/
|
|
53
|
+
let fetchCatch;
|
|
54
|
+
const requests = new Map();
|
|
55
|
+
let parser = null;
|
|
56
|
+
function toCamelCase(value) {
|
|
57
|
+
value = value.replace(/[\(\)\[\]\{\}\=\?\!\.\:,\-_\+\\\"#~\/]/g, ' ');
|
|
58
|
+
let returnValue = '';
|
|
59
|
+
let makeNextUppercase = true;
|
|
60
|
+
value = value.toLowerCase();
|
|
61
|
+
for (let i = 0; value.length > i; i++) {
|
|
62
|
+
let c = value.charAt(i);
|
|
63
|
+
if (c.match(/^\s+$/g) || c.match(/[\(\)\[\]\{\}\\\/]/g)) {
|
|
64
|
+
makeNextUppercase = true;
|
|
65
|
+
}
|
|
66
|
+
else if (makeNextUppercase) {
|
|
67
|
+
c = c.toUpperCase();
|
|
68
|
+
makeNextUppercase = false;
|
|
69
|
+
}
|
|
70
|
+
returnValue += c;
|
|
71
|
+
}
|
|
72
|
+
const normalized = returnValue.replace(/\s+/g, '');
|
|
73
|
+
return normalized.charAt(0).toUpperCase() + normalized.slice(1);
|
|
74
|
+
}
|
|
75
|
+
const getIconCacheMap = () => {
|
|
76
|
+
if (typeof window === 'undefined') {
|
|
77
|
+
return new Map();
|
|
78
|
+
}
|
|
79
|
+
if (!fetchCatch) {
|
|
80
|
+
window.IxIcons = window.IxIcons || {};
|
|
81
|
+
fetchCatch = window.IxIcons.map = window.IxIcons.map || new Map();
|
|
82
|
+
}
|
|
83
|
+
return fetchCatch;
|
|
84
|
+
};
|
|
85
|
+
const isSvgDataUrl = (url) => {
|
|
86
|
+
if (!url) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
if (typeof url !== 'string') {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
return url.startsWith('data:image/svg+xml');
|
|
93
|
+
};
|
|
94
|
+
function parseSVGDataContent(content) {
|
|
95
|
+
if (typeof window['DOMParser'] === 'undefined') {
|
|
96
|
+
console.warn('DOMParser not supported by your browser.');
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if (parser === null) {
|
|
100
|
+
parser = new window['DOMParser']();
|
|
101
|
+
}
|
|
102
|
+
const svgDocument = parser.parseFromString(content, 'text/html');
|
|
103
|
+
const svgElement = svgDocument.querySelector('svg');
|
|
104
|
+
if (!svgElement) {
|
|
105
|
+
throw Error('No valid svg data provided');
|
|
106
|
+
}
|
|
107
|
+
return svgElement.outerHTML;
|
|
108
|
+
}
|
|
109
|
+
async function fetchSVG(url) {
|
|
110
|
+
const cache = getIconCacheMap();
|
|
111
|
+
if (cache.has(url)) {
|
|
112
|
+
return cache.get(url);
|
|
113
|
+
}
|
|
114
|
+
const response = await fetch(url);
|
|
115
|
+
const responseText = await response.text();
|
|
116
|
+
if (!response.ok) {
|
|
117
|
+
console.error(responseText);
|
|
118
|
+
throw Error(responseText);
|
|
119
|
+
}
|
|
120
|
+
const svgContent = parseSVGDataContent(responseText);
|
|
121
|
+
cache.set(url, svgContent);
|
|
122
|
+
return svgContent;
|
|
123
|
+
}
|
|
124
|
+
const urlRegex = /^(?:(?:https?|ftp):\/\/)?(?:\S+(?::\S*)?@)?(?:www\.)?(?:\S+\.\S+)(?:\S*)$/i;
|
|
125
|
+
function isValidUrl(url) {
|
|
126
|
+
return urlRegex.test(url);
|
|
127
|
+
}
|
|
128
|
+
function getAssetUrl(name) {
|
|
129
|
+
const customAssetUrl = getCustomAssetUrl();
|
|
130
|
+
if (customAssetUrl) {
|
|
131
|
+
return `${customAssetUrl}/${name}.svg`;
|
|
132
|
+
}
|
|
133
|
+
return getAssetPath(`svg/${name}.svg`);
|
|
134
|
+
}
|
|
135
|
+
async function getESMIcon(name) {
|
|
136
|
+
const esmIcon = await import('./icons-84dc9236.js');
|
|
137
|
+
let iconName = toCamelCase(name);
|
|
138
|
+
iconName = `icon${iconName}`;
|
|
139
|
+
return parseSVGDataContent(esmIcon[iconName]);
|
|
140
|
+
}
|
|
141
|
+
async function resolveIcon(iconName) {
|
|
142
|
+
if (!iconName) {
|
|
143
|
+
throw Error('No icon name provided');
|
|
144
|
+
}
|
|
145
|
+
if (isSvgDataUrl(iconName)) {
|
|
146
|
+
return parseSVGDataContent(iconName);
|
|
147
|
+
}
|
|
148
|
+
if (isValidUrl(iconName)) {
|
|
149
|
+
try {
|
|
150
|
+
return fetchSVG(iconName);
|
|
151
|
+
}
|
|
152
|
+
catch (error) {
|
|
153
|
+
throw error;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (isV3PreviewEnabled()) {
|
|
157
|
+
console.warn('Using V3 preview feature for loading icons.');
|
|
158
|
+
try {
|
|
159
|
+
const request = requests.get(iconName);
|
|
160
|
+
if (!request) {
|
|
161
|
+
const fetching = fetchSVG(getAssetUrl(iconName));
|
|
162
|
+
requests.set(iconName, fetching);
|
|
163
|
+
return fetching;
|
|
164
|
+
}
|
|
165
|
+
return request;
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
throw Error('Cannot resolve any icon');
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return getESMIcon(iconName);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const iconCss = ":host{display:inline-flex;height:1.5rem;width:1.5rem;min-height:1.5rem;min-width:1.5rem;color:inherit}:host .svg-container{display:block;position:relative;width:100%;height:100%}:host .svg-container svg{display:block;position:relative;height:100%;width:100%}:host .svg-container svg,:host .svg-container svg[fill],:host .svg-container svg [fill]{fill:currentColor !important}:host(.size-12){height:0.75rem;width:0.75rem;min-height:0.75rem;min-width:0.75rem}:host(.size-16){height:1rem;width:1rem;min-height:1rem;min-width:1rem}:host(.size-32){height:2rem;width:2rem;min-height:2rem;min-width:2rem}";
|
|
175
|
+
const IxIconStyle0 = iconCss;
|
|
176
|
+
|
|
177
|
+
const iconMissingSymbol = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='512' height='512' viewBox='0 0 512 512'><path fill-rule='evenodd' d='M384,0 L384,384 L0,384 L0,0 L384,0 Z M192,207.085 L57.751,341.333 L326.248,341.333 L192,207.085 Z M42.666,57.751 L42.666,326.248 L176.915,192 L42.666,57.751 Z M341.333,57.751 L207.085,192 L341.333,326.248 L341.333,57.751 Z M326.248,42.666 L57.751,42.666 L192,176.915 L326.248,42.666 Z' transform='translate(64 64)'/></svg>";
|
|
178
|
+
const Icon = class {
|
|
179
|
+
constructor(hostRef) {
|
|
180
|
+
registerInstance(this, hostRef);
|
|
181
|
+
this.size = undefined;
|
|
182
|
+
this.color = undefined;
|
|
183
|
+
this.name = undefined;
|
|
184
|
+
this.lazyLoading = false;
|
|
185
|
+
this.svgContent = undefined;
|
|
186
|
+
this.isVisible = false;
|
|
187
|
+
}
|
|
188
|
+
connectedCallback() {
|
|
189
|
+
this.waitForRendering(() => {
|
|
190
|
+
this.isVisible = true;
|
|
191
|
+
this.loadIconContent();
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
async loadIconContent() {
|
|
195
|
+
try {
|
|
196
|
+
this.svgContent = await resolveIcon(this.name);
|
|
197
|
+
}
|
|
198
|
+
catch (error) {
|
|
199
|
+
this.svgContent = parseSVGDataContent(iconMissingSymbol);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
waitForRendering(onRender) {
|
|
203
|
+
if (this.lazyLoading && typeof window !== 'undefined' && window.IntersectionObserver) {
|
|
204
|
+
const observer = new IntersectionObserver(entries => {
|
|
205
|
+
entries.forEach(entry => {
|
|
206
|
+
if (entry.isIntersecting) {
|
|
207
|
+
onRender();
|
|
208
|
+
observer.disconnect();
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
}, {
|
|
212
|
+
rootMargin: '25px',
|
|
213
|
+
});
|
|
214
|
+
observer.observe(this.hostElement);
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
onRender();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
render() {
|
|
221
|
+
const style = {};
|
|
222
|
+
if (this.color) {
|
|
223
|
+
style['color'] = `var(--theme-${this.color})`;
|
|
224
|
+
}
|
|
225
|
+
return (h(Host, { key: '8dc18bf3b1ab1e2a521bd0fee33fa91b856dc52b', style: style, class: {
|
|
226
|
+
['size-12']: this.size === '12',
|
|
227
|
+
['size-16']: this.size === '16',
|
|
228
|
+
['size-24']: this.size === '24',
|
|
229
|
+
['size-32']: this.size === '32',
|
|
230
|
+
} }, h("div", { key: '48c3e8ae8e0d36be5fa112dbd408756f56c19535', class: 'svg-container', innerHTML: this.svgContent })));
|
|
231
|
+
}
|
|
232
|
+
static get assetsDirs() { return ["svg"]; }
|
|
233
|
+
get hostElement() { return getElement(this); }
|
|
234
|
+
static get watchers() { return {
|
|
235
|
+
"name": ["loadIconContent"]
|
|
236
|
+
}; }
|
|
237
|
+
};
|
|
238
|
+
Icon.style = IxIconStyle0;
|
|
239
|
+
|
|
240
|
+
export { Icon as I };
|
|
241
|
+
|
|
242
|
+
//# sourceMappingURL=icon-022f3b5e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"icon-022f3b5e.js","mappings":";;AAAA;;;AAIA,SAAS,uBAAuB;IAC9B,OAAO,QAAQ,CAAC,aAAa,CAAC,kCAAkC,CAAC,CAAC;AACpE,CAAC;AAED,SAAS,uBAAuB;IAC9B,MAAM,oBAAoB,GAAG,uBAAuB,EAAE,CAAC;IACvD,IAAI,oBAAoB,EAAE;QACxB,OAAO,oBAAoB,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;KAChE;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;SAKgB,iBAAiB;IAC/B,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC;IACvE,IAAI,SAAS,EAAE;QACb,MAAM,IAAI,GAAG,SAAS,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;SAKgB,kBAAkB;IAChC,MAAM,QAAQ,GAAG,uBAAuB,EAAE,CAAC;IAE3C,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,KAAK,CAAC;KACd;IAED,IAAI,QAAQ,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE;QACzC,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf;;ACjDA;;;;;;;;AAiBA,IAAI,UAA+B,CAAC;AACpC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAA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AK,CAAC,cAAc,EAAE;wBACxB,QAAQ,EAAE,CAAC;wBACX,QAAQ,CAAC,UAAU,EAAE,CAAC;qBACvB;iBACF,CAAC,CAAC;aACJ,EACD;gBACE,UAAU,EAAE,MAAM;aACnB,CACF,CAAC;YAEF,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SACpC;aAAM;YACL,QAAQ,EAAE,CAAC;SACZ;KACF;IAED,MAAM;QACJ,MAAM,KAAK,GAEP,EAAE,CAAC;QAEP,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,KAAK,CAAC,OAAO,CAAC,GAAG,eAAe,IAAI,CAAC,KAAK,GAAG,CAAC;SAC/C;QAED,QACE,EAAC,IAAI,qDACH,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE;gBACL,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI;gBAC/B,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI;gBAC/B,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI;gBAC/B,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI;aAChC,IAED,4DAAK,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,GAAQ,CAC1D,EACP;KACH;;;;;;;;;;;","names":[],"sources":["src/components/icon/meta-tag.ts","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-2024 ALL RIGHTS RESERVED.\n */\n\nfunction getV3PreviewMetaElement() {\n return document.querySelector(\"meta[name='ix-icons:v3-preview']\");\n}\n\nfunction getV3PreviewMetaContent() {\n const v3PreviewMetaElement = getV3PreviewMetaElement();\n if (v3PreviewMetaElement) {\n return v3PreviewMetaElement.getAttribute('content').split(';');\n }\n\n return null;\n}\n\n/**\n * Provide custom svg path for icons\n *\n * <meta name=\"ix-icons:path\" content=\"/build/svg\" />\n */\nexport function getCustomAssetUrl() {\n const assetPath = document.querySelector(\"meta[name='ix-icons:path']\");\n if (assetPath) {\n const path = assetPath.getAttribute('content');\n return path;\n }\n\n return false;\n}\n\n/**\n * Enable v3 preview features\n *\n * <meta name=\"ix-icons:v3-preview\" content=\"svg-path-loading;\" />\n */\nexport function isV3PreviewEnabled() {\n const features = getV3PreviewMetaContent();\n\n if (!features) {\n return false;\n }\n\n if (features.includes('svg-path-loading')) {\n return true;\n }\n\n return false;\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 */\nimport { getAssetPath } from '@stencil/core';\nimport { getCustomAssetUrl, isV3PreviewEnabled } from './meta-tag';\n\ndeclare global {\n interface Window {\n IxIcons: any;\n }\n}\n\nlet fetchCatch: Map<string, string>;\nconst requests = new Map<string, Promise<string>>();\nlet parser = null;\n\nfunction toCamelCase(value: string) {\n value = value.replace(/[\\(\\)\\[\\]\\{\\}\\=\\?\\!\\.\\:,\\-_\\+\\\\\\\"#~\\/]/g, ' ');\n let returnValue = '';\n let makeNextUppercase = true;\n value = value.toLowerCase();\n for (let i = 0; value.length > i; i++) {\n let c = value.charAt(i);\n if (c.match(/^\\s+$/g) || c.match(/[\\(\\)\\[\\]\\{\\}\\\\\\/]/g)) {\n makeNextUppercase = true;\n } else if (makeNextUppercase) {\n c = c.toUpperCase();\n makeNextUppercase = false;\n }\n returnValue += c;\n }\n const normalized = returnValue.replace(/\\s+/g, '');\n return normalized.charAt(0).toUpperCase() + normalized.slice(1);\n}\n\nexport const getIconCacheMap = (): Map<string, string> => {\n if (typeof window === 'undefined') {\n return new Map();\n }\n\n if (!fetchCatch) {\n window.IxIcons = window.IxIcons || {};\n fetchCatch = window.IxIcons.map = window.IxIcons.map || new Map();\n }\n return fetchCatch;\n};\n\nexport const isSvgDataUrl = (url: string) => {\n if (!url) {\n return false;\n }\n\n if (typeof url !== 'string') {\n return false;\n }\n\n return url.startsWith('data:image/svg+xml');\n};\n\nexport function 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') as HTMLElement;\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 cache = getIconCacheMap();\n\n if (cache.has(url)) {\n return cache.get(url);\n }\n\n const response = await fetch(url);\n const responseText = await response.text();\n\n if (!response.ok) {\n console.error(responseText);\n throw Error(responseText);\n }\n\n const svgContent = parseSVGDataContent(responseText);\n cache.set(url, svgContent);\n return svgContent;\n}\nconst urlRegex = /^(?:(?:https?|ftp):\\/\\/)?(?:\\S+(?::\\S*)?@)?(?:www\\.)?(?:\\S+\\.\\S+)(?:\\S*)$/i;\n\nfunction isValidUrl(url: string) {\n return urlRegex.test(url);\n}\n\nfunction getAssetUrl(name: string) {\n const customAssetUrl = getCustomAssetUrl();\n if (customAssetUrl) {\n return `${customAssetUrl}/${name}.svg`;\n }\n\n return getAssetPath(`svg/${name}.svg`);\n}\n\nasync function getESMIcon(name: string) {\n const esmIcon = await import('./icons');\n let iconName = toCamelCase(name);\n iconName = `icon${iconName}`;\n\n return parseSVGDataContent(esmIcon[iconName]);\n}\n\nexport async function resolveIcon(iconName: string) {\n if (!iconName) {\n throw Error('No icon name provided');\n }\n\n if (isSvgDataUrl(iconName)) {\n return parseSVGDataContent(iconName);\n }\n\n if (isValidUrl(iconName)) {\n try {\n return fetchSVG(iconName);\n } catch (error) {\n throw error;\n }\n }\n\n if (isV3PreviewEnabled()) {\n console.warn('Using V3 preview feature for loading icons.');\n try {\n const request = requests.get(iconName);\n\n if (!request) {\n const fetching = fetchSVG(getAssetUrl(iconName));\n requests.set(iconName, fetching);\n return fetching;\n }\n\n return request;\n } catch (error) {\n throw Error('Cannot resolve any icon');\n }\n }\n\n return getESMIcon(iconName);\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@mixin size($size) {\n height: $size;\n width: $size;\n min-height: $size;\n min-width: $size;\n}\n\n:host {\n display: inline-flex;\n @include size(1.5rem);\n color: inherit;\n\n .svg-container {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n\n svg {\n display: block;\n position: relative;\n height: 100%;\n width: 100%;\n }\n\n svg,\n svg[fill],\n svg [fill] {\n fill: currentColor !important;\n }\n }\n}\n\n:host(.size-12) {\n @include size(0.75rem);\n}\n\n:host(.size-16) {\n @include size(1rem);\n}\n\n:host(.size-32) {\n @include size(2rem);\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 */\nimport { Component, h, Host, Prop, State, Watch, Element, Build } from '@stencil/core';\nimport { parseSVGDataContent, resolveIcon } from './resolveIcon';\n\nconst iconMissingSymbol =\n \"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='512' height='512' viewBox='0 0 512 512'><path fill-rule='evenodd' d='M384,0 L384,384 L0,384 L0,0 L384,0 Z M192,207.085 L57.751,341.333 L326.248,341.333 L192,207.085 Z M42.666,57.751 L42.666,326.248 L176.915,192 L42.666,57.751 Z M341.333,57.751 L207.085,192 L341.333,326.248 L341.333,57.751 Z M326.248,42.666 L57.751,42.666 L192,176.915 L326.248,42.666 Z' transform='translate(64 64)'/></svg>\";\n\n@Component({\n tag: 'ix-icon',\n styleUrl: 'icon.scss',\n shadow: true,\n assetsDirs: ['svg'],\n})\nexport class Icon {\n @Element() hostElement: HTMLIxIconElement;\n\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 * https://ix.siemens.io/docs/icon-library/icons\n *\n * or the import variant\n *\n * ```\n * import { rocket } from '@siemens/ix-icons/icons';\n *\n * <ix-icon name={rocket}></ix-icon>\n * ```\n */\n @Prop() name: string;\n\n @Prop() lazyLoading = false;\n\n @State() svgContent?: string;\n @State() isVisible = false;\n\n connectedCallback() {\n this.waitForRendering(() => {\n this.isVisible = true;\n this.loadIconContent();\n });\n }\n\n @Watch('name')\n async loadIconContent() {\n try {\n this.svgContent = await resolveIcon(this.name);\n } catch (error) {\n this.svgContent = parseSVGDataContent(iconMissingSymbol);\n }\n }\n\n private waitForRendering(onRender: () => void) {\n if (Build.isBrowser && this.lazyLoading && typeof window !== 'undefined' && (window as any).IntersectionObserver) {\n const observer = new IntersectionObserver(\n entries => {\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n onRender();\n observer.disconnect();\n }\n });\n },\n {\n rootMargin: '25px',\n },\n );\n\n observer.observe(this.hostElement);\n } else {\n onRender();\n }\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 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 <div class={'svg-container'} innerHTML={this.svgContent}></div>\n </Host>\n );\n }\n}\n"],"version":3}
|