@siemens/ix 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/_commonjsHelpers.js +21 -0
- package/components/_commonjsHelpers.js.map +1 -0
- package/{dist/esm/a11y-d5dd20ad.js → components/a11y.js} +2 -2
- package/components/a11y.js.map +1 -0
- package/components/animation.js +19 -0
- package/components/animation.js.map +1 -0
- package/components/anime.es.js +1311 -0
- package/components/anime.es.js.map +1 -0
- package/components/application-header.js +109 -0
- package/components/application-header.js.map +1 -0
- package/components/avatar.js +53 -0
- package/components/avatar.js.map +1 -0
- package/components/base-button.js +47 -0
- package/components/base-button.js.map +1 -0
- package/components/base-icon-button.js +18 -0
- package/components/base-icon-button.js.map +1 -0
- package/components/breadcrumb-item.js +100 -0
- package/components/breadcrumb-item.js.map +1 -0
- package/components/breakpoints.js +25 -0
- package/components/breakpoints.js.map +1 -0
- package/components/burger-menu.js +55 -0
- package/components/burger-menu.js.map +1 -0
- package/components/button.js +91 -0
- package/components/button.js.map +1 -0
- package/components/card-accordion.js +72 -0
- package/components/card-accordion.js.map +1 -0
- package/components/card-content.js +32 -0
- package/components/card-content.js.map +1 -0
- package/components/card-title.js +32 -0
- package/components/card-title.js.map +1 -0
- package/components/card.js +36 -0
- package/components/card.js.map +1 -0
- package/components/context.js +101 -0
- package/components/context.js.map +1 -0
- package/components/custom-elements.d.ts +10 -0
- package/components/date-picker.js +372 -0
- package/components/date-picker.js.map +1 -0
- package/components/date-time-card.js +45 -0
- package/components/date-time-card.js.map +1 -0
- package/components/default-tree-item.js +22 -0
- package/components/default-tree-item.js.map +1 -0
- package/components/divider.js +32 -0
- package/components/divider.js.map +1 -0
- package/components/dropdown-item.js +69 -0
- package/components/dropdown-item.js.map +1 -0
- package/components/dropdown.js +351 -0
- package/components/dropdown.js.map +1 -0
- package/components/filter-chip.js +56 -0
- package/components/filter-chip.js.map +1 -0
- package/components/flip-tile-state.js +20 -0
- package/components/flip-tile-state.js.map +1 -0
- package/components/floating-ui.dom.esm.js +1512 -0
- package/components/floating-ui.dom.esm.js.map +1 -0
- package/components/group-context-menu.js +73 -0
- package/components/group-context-menu.js.map +1 -0
- package/components/group-item.js +58 -0
- package/components/group-item.js.map +1 -0
- package/components/icon-button.js +99 -0
- package/components/icon-button.js.map +1 -0
- package/components/index.d.ts +27 -0
- package/components/index.js +101 -0
- package/components/index.js.map +1 -0
- package/components/ix-action-card.d.ts +11 -0
- package/components/ix-action-card.js +66 -0
- package/components/ix-action-card.js.map +1 -0
- package/components/ix-application-header.d.ts +11 -0
- package/components/ix-application-header.js +8 -0
- package/components/ix-application-header.js.map +1 -0
- package/components/ix-application-sidebar.d.ts +11 -0
- package/components/ix-application-sidebar.js +63 -0
- package/components/ix-application-sidebar.js.map +1 -0
- package/components/ix-application.d.ts +11 -0
- package/components/ix-application.js +128 -0
- package/components/ix-application.js.map +1 -0
- package/components/ix-avatar.d.ts +11 -0
- package/components/ix-avatar.js +8 -0
- package/components/ix-avatar.js.map +1 -0
- package/components/ix-basic-navigation.d.ts +11 -0
- package/components/ix-basic-navigation.js +132 -0
- package/components/ix-basic-navigation.js.map +1 -0
- package/components/ix-blind.d.ts +11 -0
- package/components/ix-blind.js +128 -0
- package/components/ix-blind.js.map +1 -0
- package/components/ix-breadcrumb-item.d.ts +11 -0
- package/components/ix-breadcrumb-item.js +8 -0
- package/components/ix-breadcrumb-item.js.map +1 -0
- package/components/ix-breadcrumb.d.ts +11 -0
- package/components/ix-breadcrumb.js +154 -0
- package/components/ix-breadcrumb.js.map +1 -0
- package/components/ix-burger-menu.d.ts +11 -0
- package/components/ix-burger-menu.js +8 -0
- package/components/ix-burger-menu.js.map +1 -0
- package/components/ix-button.d.ts +11 -0
- package/components/ix-button.js +8 -0
- package/components/ix-button.js.map +1 -0
- package/components/ix-card-accordion.d.ts +11 -0
- package/components/ix-card-accordion.js +8 -0
- package/components/ix-card-accordion.js.map +1 -0
- package/components/ix-card-content.d.ts +11 -0
- package/components/ix-card-content.js +8 -0
- package/components/ix-card-content.js.map +1 -0
- package/components/ix-card-list.d.ts +11 -0
- package/components/ix-card-list.js +228 -0
- package/components/ix-card-list.js.map +1 -0
- package/components/ix-card-title.d.ts +11 -0
- package/components/ix-card-title.js +8 -0
- package/components/ix-card-title.js.map +1 -0
- package/components/ix-card.d.ts +11 -0
- package/components/ix-card.js +8 -0
- package/components/ix-card.js.map +1 -0
- package/components/ix-category-filter.d.ts +11 -0
- package/components/ix-category-filter.js +464 -0
- package/components/ix-category-filter.js.map +1 -0
- package/components/ix-chip.d.ts +11 -0
- package/components/ix-chip.js +98 -0
- package/components/ix-chip.js.map +1 -0
- package/components/ix-col.d.ts +11 -0
- package/components/ix-col.js +96 -0
- package/components/ix-col.js.map +1 -0
- package/components/ix-content-header.d.ts +11 -0
- package/components/ix-content-header.js +63 -0
- package/components/ix-content-header.js.map +1 -0
- package/components/ix-content.d.ts +11 -0
- package/components/ix-content.js +48 -0
- package/components/ix-content.js.map +1 -0
- package/components/ix-css-grid-item.d.ts +11 -0
- package/components/ix-css-grid-item.js +40 -0
- package/components/ix-css-grid-item.js.map +1 -0
- package/components/ix-css-grid.d.ts +11 -0
- package/components/ix-css-grid.js +113 -0
- package/components/ix-css-grid.js.map +1 -0
- package/components/ix-date-picker.d.ts +11 -0
- package/components/ix-date-picker.js +8 -0
- package/components/ix-date-picker.js.map +1 -0
- package/components/ix-date-time-card.d.ts +11 -0
- package/components/ix-date-time-card.js +8 -0
- package/components/ix-date-time-card.js.map +1 -0
- package/components/ix-datetime-picker.d.ts +11 -0
- package/components/ix-datetime-picker.js +149 -0
- package/components/ix-datetime-picker.js.map +1 -0
- package/components/ix-divider.d.ts +11 -0
- package/components/ix-divider.js +8 -0
- package/components/ix-divider.js.map +1 -0
- package/components/ix-drawer.d.ts +11 -0
- package/components/ix-drawer.js +145 -0
- package/components/ix-drawer.js.map +1 -0
- package/components/ix-dropdown-button.d.ts +11 -0
- package/components/ix-dropdown-button.js +92 -0
- package/components/ix-dropdown-button.js.map +1 -0
- package/components/ix-dropdown-header.d.ts +11 -0
- package/components/ix-dropdown-header.js +44 -0
- package/components/ix-dropdown-header.js.map +1 -0
- package/components/ix-dropdown-item.d.ts +11 -0
- package/components/ix-dropdown-item.js +8 -0
- package/components/ix-dropdown-item.js.map +1 -0
- package/components/ix-dropdown-quick-actions.d.ts +11 -0
- package/components/ix-dropdown-quick-actions.js +35 -0
- package/components/ix-dropdown-quick-actions.js.map +1 -0
- package/components/ix-dropdown.d.ts +11 -0
- package/components/ix-dropdown.js +8 -0
- package/components/ix-dropdown.js.map +1 -0
- package/components/ix-empty-state.d.ts +11 -0
- package/components/ix-empty-state.js +65 -0
- package/components/ix-empty-state.js.map +1 -0
- package/components/ix-event-list-item.d.ts +11 -0
- package/components/ix-event-list-item.js +61 -0
- package/components/ix-event-list-item.js.map +1 -0
- package/components/ix-event-list.d.ts +11 -0
- package/components/ix-event-list.js +143 -0
- package/components/ix-event-list.js.map +1 -0
- package/components/ix-expanding-search.d.ts +11 -0
- package/components/ix-expanding-search.js +119 -0
- package/components/ix-expanding-search.js.map +1 -0
- package/components/ix-filter-chip.d.ts +11 -0
- package/components/ix-filter-chip.js +8 -0
- package/components/ix-filter-chip.js.map +1 -0
- package/components/ix-flip-tile-content.d.ts +11 -0
- package/components/ix-flip-tile-content.js +38 -0
- package/components/ix-flip-tile-content.js.map +1 -0
- package/components/ix-flip-tile.d.ts +11 -0
- package/components/ix-flip-tile.js +121 -0
- package/components/ix-flip-tile.js.map +1 -0
- package/components/ix-form-field.d.ts +11 -0
- package/components/ix-form-field.js +43 -0
- package/components/ix-form-field.js.map +1 -0
- package/components/ix-group-context-menu.d.ts +11 -0
- package/components/ix-group-context-menu.js +8 -0
- package/components/ix-group-context-menu.js.map +1 -0
- package/components/ix-group-item.d.ts +11 -0
- package/components/ix-group-item.js +8 -0
- package/components/ix-group-item.js.map +1 -0
- package/components/ix-group.d.ts +11 -0
- package/components/ix-group.js +178 -0
- package/components/ix-group.js.map +1 -0
- package/components/ix-icon-button.d.ts +11 -0
- package/components/ix-icon-button.js +8 -0
- package/components/ix-icon-button.js.map +1 -0
- package/components/ix-icon-toggle-button.d.ts +11 -0
- package/components/ix-icon-toggle-button.js +116 -0
- package/components/ix-icon-toggle-button.js.map +1 -0
- package/components/ix-input-group.d.ts +11 -0
- package/components/ix-input-group.js +143 -0
- package/components/ix-input-group.js.map +1 -0
- package/components/ix-key-value-list.d.ts +11 -0
- package/components/ix-key-value-list.js +38 -0
- package/components/ix-key-value-list.js.map +1 -0
- package/components/ix-key-value.d.ts +11 -0
- package/components/ix-key-value.js +47 -0
- package/components/ix-key-value.js.map +1 -0
- package/components/ix-kpi.d.ts +11 -0
- package/components/ix-kpi.js +69 -0
- package/components/ix-kpi.js.map +1 -0
- package/components/ix-layout-grid.d.ts +11 -0
- package/components/ix-layout-grid.js +47 -0
- package/components/ix-layout-grid.js.map +1 -0
- package/components/ix-link-button.d.ts +11 -0
- package/components/ix-link-button.js +48 -0
- package/components/ix-link-button.js.map +1 -0
- package/components/ix-map-navigation-overlay.d.ts +11 -0
- package/components/ix-map-navigation-overlay.js +8 -0
- package/components/ix-map-navigation-overlay.js.map +1 -0
- package/components/ix-map-navigation.d.ts +11 -0
- package/components/ix-map-navigation.js +226 -0
- package/components/ix-map-navigation.js.map +1 -0
- package/components/ix-menu-about-item.d.ts +11 -0
- package/components/ix-menu-about-item.js +38 -0
- package/components/ix-menu-about-item.js.map +1 -0
- package/components/ix-menu-about-news.d.ts +11 -0
- package/components/ix-menu-about-news.js +83 -0
- package/components/ix-menu-about-news.js.map +1 -0
- package/components/ix-menu-about.d.ts +11 -0
- package/components/ix-menu-about.js +119 -0
- package/components/ix-menu-about.js.map +1 -0
- package/components/ix-menu-avatar-item.d.ts +11 -0
- package/components/ix-menu-avatar-item.js +8 -0
- package/components/ix-menu-avatar-item.js.map +1 -0
- package/components/ix-menu-avatar.d.ts +11 -0
- package/components/ix-menu-avatar.js +77 -0
- package/components/ix-menu-avatar.js.map +1 -0
- package/components/ix-menu-category.d.ts +11 -0
- package/components/ix-menu-category.js +190 -0
- package/components/ix-menu-category.js.map +1 -0
- package/components/ix-menu-item.d.ts +11 -0
- package/components/ix-menu-item.js +8 -0
- package/components/ix-menu-item.js.map +1 -0
- package/components/ix-menu-settings-item.d.ts +11 -0
- package/components/ix-menu-settings-item.js +38 -0
- package/components/ix-menu-settings-item.js.map +1 -0
- package/components/ix-menu-settings.d.ts +11 -0
- package/components/ix-menu-settings.js +106 -0
- package/components/ix-menu-settings.js.map +1 -0
- package/components/ix-menu.d.ts +11 -0
- package/components/ix-menu.js +508 -0
- package/components/ix-menu.js.map +1 -0
- package/components/ix-message-bar.d.ts +11 -0
- package/components/ix-message-bar.js +87 -0
- package/components/ix-message-bar.js.map +1 -0
- package/components/ix-modal-content.d.ts +11 -0
- package/components/ix-modal-content.js +35 -0
- package/components/ix-modal-content.js.map +1 -0
- package/components/ix-modal-example.d.ts +11 -0
- package/components/ix-modal-example.js +58 -0
- package/components/ix-modal-example.js.map +1 -0
- package/components/ix-modal-footer.d.ts +11 -0
- package/components/ix-modal-footer.js +35 -0
- package/components/ix-modal-footer.js.map +1 -0
- package/components/ix-modal-header.d.ts +11 -0
- package/components/ix-modal-header.js +84 -0
- package/components/ix-modal-header.js.map +1 -0
- package/components/ix-modal-loading.d.ts +11 -0
- package/components/ix-modal-loading.js +41 -0
- package/components/ix-modal-loading.js.map +1 -0
- package/components/ix-modal.d.ts +11 -0
- package/components/ix-modal.js +155 -0
- package/components/ix-modal.js.map +1 -0
- package/components/ix-pagination.d.ts +11 -0
- package/components/ix-pagination.js +211 -0
- package/components/ix-pagination.js.map +1 -0
- package/components/ix-pill.d.ts +11 -0
- package/components/ix-pill.js +78 -0
- package/components/ix-pill.js.map +1 -0
- package/components/ix-push-card.d.ts +11 -0
- package/components/ix-push-card.js +80 -0
- package/components/ix-push-card.js.map +1 -0
- package/components/ix-row.d.ts +11 -0
- package/components/ix-row.js +35 -0
- package/components/ix-row.js.map +1 -0
- package/components/ix-select-item.d.ts +11 -0
- package/components/ix-select-item.js +8 -0
- package/components/ix-select-item.js.map +1 -0
- package/components/ix-select.d.ts +11 -0
- package/components/ix-select.js +8 -0
- package/components/ix-select.js.map +1 -0
- package/components/ix-slider.d.ts +11 -0
- package/components/ix-slider.js +192 -0
- package/components/ix-slider.js.map +1 -0
- package/components/ix-spinner.d.ts +11 -0
- package/components/ix-spinner.js +8 -0
- package/components/ix-spinner.js.map +1 -0
- package/components/ix-split-button-item.d.ts +11 -0
- package/components/ix-split-button-item.js +51 -0
- package/components/ix-split-button-item.js.map +1 -0
- package/components/ix-split-button.d.ts +11 -0
- package/components/ix-split-button.js +97 -0
- package/components/ix-split-button.js.map +1 -0
- package/components/ix-tab-item.d.ts +11 -0
- package/components/ix-tab-item.js +8 -0
- package/components/ix-tab-item.js.map +1 -0
- package/components/ix-tabs.d.ts +11 -0
- package/components/ix-tabs.js +8 -0
- package/components/ix-tabs.js.map +1 -0
- package/components/ix-tile.d.ts +11 -0
- package/components/ix-tile.js +59 -0
- package/components/ix-tile.js.map +1 -0
- package/components/ix-time-picker.d.ts +11 -0
- package/components/ix-time-picker.js +8 -0
- package/components/ix-time-picker.js.map +1 -0
- package/components/ix-toast-container.d.ts +11 -0
- package/components/ix-toast-container.js +124 -0
- package/components/ix-toast-container.js.map +1 -0
- package/components/ix-toast.d.ts +11 -0
- package/components/ix-toast.js +8 -0
- package/components/ix-toast.js.map +1 -0
- package/components/ix-toggle-button.d.ts +11 -0
- package/components/ix-toggle-button.js +105 -0
- package/components/ix-toggle-button.js.map +1 -0
- package/components/ix-toggle.d.ts +11 -0
- package/components/ix-toggle.js +62 -0
- package/components/ix-toggle.js.map +1 -0
- package/components/ix-tooltip.d.ts +11 -0
- package/components/ix-tooltip.js +8 -0
- package/components/ix-tooltip.js.map +1 -0
- package/components/ix-tree-item.d.ts +11 -0
- package/components/ix-tree-item.js +8 -0
- package/components/ix-tree-item.js.map +1 -0
- package/components/ix-tree.d.ts +11 -0
- package/components/ix-tree.js +727 -0
- package/components/ix-tree.js.map +1 -0
- package/components/ix-typography.d.ts +11 -0
- package/components/ix-typography.js +8 -0
- package/components/ix-typography.js.map +1 -0
- package/components/ix-upload.d.ts +11 -0
- package/components/ix-upload.js +147 -0
- package/components/ix-upload.js.map +1 -0
- package/components/ix-validation-tooltip.d.ts +11 -0
- package/components/ix-validation-tooltip.js +170 -0
- package/components/ix-validation-tooltip.js.map +1 -0
- package/components/ix-workflow-step.d.ts +11 -0
- package/components/ix-workflow-step.js +120 -0
- package/components/ix-workflow-step.js.map +1 -0
- package/components/ix-workflow-steps.d.ts +11 -0
- package/components/ix-workflow-steps.js +99 -0
- package/components/ix-workflow-steps.js.map +1 -0
- package/components/logical-filter-operator.js +35 -0
- package/components/logical-filter-operator.js.map +1 -0
- package/components/luxon.js +7828 -0
- package/components/luxon.js.map +1 -0
- package/components/map-navigation-overlay.js +89 -0
- package/components/map-navigation-overlay.js.map +1 -0
- package/components/menu-avatar-item.js +45 -0
- package/components/menu-avatar-item.js.map +1 -0
- package/components/menu-item.js +92 -0
- package/components/menu-item.js.map +1 -0
- package/components/menu-service.js +156 -0
- package/components/menu-service.js.map +1 -0
- package/components/modal.js +245 -0
- package/components/modal.js.map +1 -0
- package/components/mutation-observer.js +13 -0
- package/components/mutation-observer.js.map +1 -0
- package/components/my-component.d.ts +11 -0
- package/components/my-component.js +34 -0
- package/components/my-component.js.map +1 -0
- package/components/package.json +8 -0
- package/components/rwd.util.js +41 -0
- package/components/rwd.util.js.map +1 -0
- package/components/select-item.js +92 -0
- package/components/select-item.js.map +1 -0
- package/components/select.js +410 -0
- package/components/select.js.map +1 -0
- package/components/shadow-dom.js +21 -0
- package/components/shadow-dom.js.map +1 -0
- package/components/spinner.js +48 -0
- package/components/spinner.js.map +1 -0
- package/components/tab-item.js +87 -0
- package/components/tab-item.js.map +1 -0
- package/components/tabs.js +227 -0
- package/components/tabs.js.map +1 -0
- package/components/theme-switcher.js +123 -0
- package/components/theme-switcher.js.map +1 -0
- package/components/time-picker.js +252 -0
- package/components/time-picker.js.map +1 -0
- package/components/toast.js +105 -0
- package/components/toast.js.map +1 -0
- package/components/tooltip.js +197 -0
- package/components/tooltip.js.map +1 -0
- package/components/tree-item.js +51 -0
- package/components/tree-item.js.map +1 -0
- package/components/typed-event.js +46 -0
- package/components/typed-event.js.map +1 -0
- package/components/typography.js +76 -0
- package/components/typography.js.map +1 -0
- package/components/upload-file-state.js +19 -0
- package/components/upload-file-state.js.map +1 -0
- package/dist/cjs/{a11y-4fdcefb4.js → a11y-7e1c1b86.js} +2 -2
- package/dist/cjs/a11y-7e1c1b86.js.map +1 -0
- package/dist/cjs/ix-application-header.cjs.entry.js +15 -2
- package/dist/cjs/ix-application-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-blind.cjs.entry.js +1 -1
- package/dist/cjs/ix-breadcrumb-item.cjs.entry.js +11 -4
- package/dist/cjs/ix-breadcrumb-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-breadcrumb.cjs.entry.js +5 -2
- package/dist/cjs/ix-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-burger-menu.cjs.entry.js +1 -1
- package/dist/cjs/ix-button.cjs.entry.js +1 -1
- package/dist/cjs/ix-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-category-filter.cjs.entry.js +1 -1
- package/dist/cjs/ix-category-filter.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-drawer.cjs.entry.js +1 -1
- package/dist/cjs/ix-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-dropdown.cjs.entry.js +9 -4
- package/dist/cjs/ix-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-icon-button_2.cjs.entry.js +1 -1
- package/dist/cjs/ix-icon-button_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-icon-toggle-button.cjs.entry.js +2 -2
- package/dist/cjs/ix-icon-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-input-group.cjs.entry.js +16 -3
- package/dist/cjs/ix-input-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-modal.cjs.entry.js +2 -3
- package/dist/cjs/ix-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-pagination.cjs.entry.js +3 -3
- package/dist/cjs/ix-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-slider.cjs.entry.js +1 -1
- package/dist/cjs/ix-toggle-button.cjs.entry.js +1 -1
- package/dist/cjs/ix-toggle.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/siemens-ix.cjs.js +1 -1
- package/dist/collection/components/application-header/application-header.js +18 -3
- package/dist/collection/components/application-header/application-header.js.map +1 -1
- package/dist/collection/components/application-header/test/application-headet.ct.js +16 -1
- package/dist/collection/components/application-header/test/application-headet.ct.js.map +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.js +4 -1
- package/dist/collection/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/collection/components/breadcrumb-item/breadcrumb-item.css +36 -0
- package/dist/collection/components/breadcrumb-item/breadcrumb-item.js +14 -2
- package/dist/collection/components/breadcrumb-item/breadcrumb-item.js.map +1 -1
- package/dist/collection/components/button/button.css +18 -0
- package/dist/collection/components/button/test/button.ct.js +6 -0
- package/dist/collection/components/button/test/button.ct.js.map +1 -1
- package/dist/collection/components/category-filter/category-filter.css +18 -0
- package/dist/collection/components/drawer/drawer.css +4 -0
- package/dist/collection/components/dropdown/dropdown.js +9 -4
- package/dist/collection/components/dropdown/dropdown.js.map +1 -1
- package/dist/collection/components/dropdown/test/dropdown.ct.js +21 -0
- package/dist/collection/components/dropdown/test/dropdown.ct.js.map +1 -1
- package/dist/collection/components/icon-button/icon-button.css +18 -0
- package/dist/collection/components/icon-toggle-button/icon-toggle-button.css +18 -0
- package/dist/collection/components/input-group/input-group.js +16 -3
- package/dist/collection/components/input-group/input-group.js.map +1 -1
- package/dist/collection/components/input-group/tests/input-group.ct.js +86 -0
- package/dist/collection/components/input-group/tests/input-group.ct.js.map +1 -0
- package/dist/collection/components/menu/menu.js +4 -1
- package/dist/collection/components/menu/menu.js.map +1 -1
- package/dist/collection/components/modal/modal.js +1 -2
- package/dist/collection/components/modal/modal.js.map +1 -1
- package/dist/collection/components/pagination/pagination.css +18 -0
- package/dist/collection/components/pagination/pagination.js +1 -1
- package/dist/collection/components/pagination/pagination.js.map +1 -1
- package/dist/collection/components/pagination/test/pagination.ct.js +20 -0
- package/dist/collection/components/pagination/test/pagination.ct.js.map +1 -1
- package/dist/collection/components/utils/a11y.js +1 -1
- package/dist/collection/components/utils/a11y.js.map +1 -1
- package/dist/esm/a11y-115b6a36.js +79 -0
- package/dist/esm/a11y-115b6a36.js.map +1 -0
- package/dist/esm/ix-application-header.entry.js +15 -2
- package/dist/esm/ix-application-header.entry.js.map +1 -1
- package/dist/esm/ix-blind.entry.js +1 -1
- package/dist/esm/ix-breadcrumb-item.entry.js +11 -4
- package/dist/esm/ix-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/ix-breadcrumb.entry.js +5 -2
- package/dist/esm/ix-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ix-burger-menu.entry.js +1 -1
- package/dist/esm/ix-button.entry.js +1 -1
- package/dist/esm/ix-button.entry.js.map +1 -1
- package/dist/esm/ix-category-filter.entry.js +1 -1
- package/dist/esm/ix-category-filter.entry.js.map +1 -1
- package/dist/esm/ix-drawer.entry.js +1 -1
- package/dist/esm/ix-drawer.entry.js.map +1 -1
- package/dist/esm/ix-dropdown.entry.js +9 -4
- package/dist/esm/ix-dropdown.entry.js.map +1 -1
- package/dist/esm/ix-icon-button_2.entry.js +1 -1
- package/dist/esm/ix-icon-button_2.entry.js.map +1 -1
- package/dist/esm/ix-icon-toggle-button.entry.js +2 -2
- package/dist/esm/ix-icon-toggle-button.entry.js.map +1 -1
- package/dist/esm/ix-input-group.entry.js +16 -3
- package/dist/esm/ix-input-group.entry.js.map +1 -1
- package/dist/esm/ix-menu.entry.js.map +1 -1
- package/dist/esm/ix-modal.entry.js +2 -3
- package/dist/esm/ix-modal.entry.js.map +1 -1
- package/dist/esm/ix-pagination.entry.js +3 -3
- package/dist/esm/ix-pagination.entry.js.map +1 -1
- package/dist/esm/ix-slider.entry.js +1 -1
- package/dist/esm/ix-toggle-button.entry.js +1 -1
- package/dist/esm/ix-toggle.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/siemens-ix.js +1 -1
- package/dist/siemens-ix/{p-4796a3ae.entry.js → p-042b8889.entry.js} +2 -2
- package/dist/siemens-ix/{p-b53bed3a.entry.js → p-228c5657.entry.js} +2 -2
- package/dist/siemens-ix/{p-fa0d5f4e.entry.js → p-28d29e36.entry.js} +2 -2
- package/dist/siemens-ix/p-2fd30d79.js +2 -0
- package/dist/siemens-ix/p-2fd30d79.js.map +1 -0
- package/dist/siemens-ix/p-302cd093.entry.js +2 -0
- package/dist/siemens-ix/{p-eb29049a.entry.js.map → p-302cd093.entry.js.map} +1 -1
- package/dist/siemens-ix/p-32265ee2.entry.js +2 -0
- package/dist/siemens-ix/p-32265ee2.entry.js.map +1 -0
- package/dist/siemens-ix/p-355f9085.entry.js +2 -0
- package/dist/siemens-ix/{p-74a7d191.entry.js.map → p-355f9085.entry.js.map} +1 -1
- package/dist/siemens-ix/p-574e3cd1.entry.js +2 -0
- package/dist/siemens-ix/p-574e3cd1.entry.js.map +1 -0
- package/dist/siemens-ix/p-59dc0873.entry.js +2 -0
- package/dist/siemens-ix/{p-90efad65.entry.js.map → p-59dc0873.entry.js.map} +1 -1
- package/dist/siemens-ix/p-7cc23245.entry.js +2 -0
- package/dist/siemens-ix/p-7cc23245.entry.js.map +1 -0
- package/dist/siemens-ix/p-9249df8d.entry.js +2 -0
- package/dist/siemens-ix/{p-d78cd3f4.entry.js.map → p-9249df8d.entry.js.map} +1 -1
- package/dist/siemens-ix/p-ad94f795.entry.js +2 -0
- package/dist/siemens-ix/p-ad94f795.entry.js.map +1 -0
- package/dist/siemens-ix/{p-0ebc6c4d.entry.js → p-b2042a15.entry.js} +2 -2
- package/dist/siemens-ix/p-b2042a15.entry.js.map +1 -0
- package/dist/siemens-ix/p-bd873b87.entry.js +2 -0
- package/dist/siemens-ix/p-bd873b87.entry.js.map +1 -0
- package/dist/siemens-ix/{p-6ae65cac.entry.js → p-c1318e16.entry.js} +2 -2
- package/dist/siemens-ix/p-c7e502d7.entry.js +2 -0
- package/dist/siemens-ix/p-c7e502d7.entry.js.map +1 -0
- package/dist/siemens-ix/p-dcb957d8.entry.js.map +1 -1
- package/dist/siemens-ix/{p-77b14ca1.entry.js → p-f304f7ce.entry.js} +2 -2
- package/dist/siemens-ix/p-fa7f3eef.entry.js +2 -0
- package/dist/siemens-ix/p-fa7f3eef.entry.js.map +1 -0
- package/dist/siemens-ix/siemens-ix-core.css +1 -1
- package/dist/siemens-ix/siemens-ix.css +12 -0
- package/dist/siemens-ix/siemens-ix.esm.js +1 -1
- package/dist/siemens-ix/siemens-ix.esm.js.map +1 -1
- package/dist/types/components/application-header/application-header.d.ts +1 -0
- package/dist/types/components/breadcrumb-item/breadcrumb-item.d.ts +2 -0
- package/dist/types/components/input-group/input-group.d.ts +1 -0
- package/dist/types/components/input-group/tests/input-group.ct.d.ts +1 -0
- package/dist/types/components/menu/menu.d.ts +2 -0
- package/dist/types/components.d.ts +2 -0
- package/package.json +1 -1
- package/scss/components/_checkboxes.scss +3 -0
- package/scss/components/_radiobuttons.scss +5 -0
- package/dist/cjs/a11y-4fdcefb4.js.map +0 -1
- package/dist/esm/a11y-d5dd20ad.js.map +0 -1
- package/dist/siemens-ix/p-0ebc6c4d.entry.js.map +0 -1
- package/dist/siemens-ix/p-2e75f0e4.entry.js +0 -2
- package/dist/siemens-ix/p-2e75f0e4.entry.js.map +0 -1
- package/dist/siemens-ix/p-66d7fbd9.entry.js +0 -2
- package/dist/siemens-ix/p-66d7fbd9.entry.js.map +0 -1
- package/dist/siemens-ix/p-74a7d191.entry.js +0 -2
- package/dist/siemens-ix/p-774eca79.entry.js +0 -2
- package/dist/siemens-ix/p-774eca79.entry.js.map +0 -1
- package/dist/siemens-ix/p-78c9489b.js +0 -2
- package/dist/siemens-ix/p-78c9489b.js.map +0 -1
- package/dist/siemens-ix/p-7a884056.entry.js +0 -2
- package/dist/siemens-ix/p-7a884056.entry.js.map +0 -1
- package/dist/siemens-ix/p-7b362f58.entry.js +0 -2
- package/dist/siemens-ix/p-7b362f58.entry.js.map +0 -1
- package/dist/siemens-ix/p-90efad65.entry.js +0 -2
- package/dist/siemens-ix/p-d78cd3f4.entry.js +0 -2
- package/dist/siemens-ix/p-d9c99b88.entry.js +0 -2
- package/dist/siemens-ix/p-d9c99b88.entry.js.map +0 -1
- package/dist/siemens-ix/p-eb29049a.entry.js +0 -2
- package/dist/siemens-ix/p-f7b95fd7.entry.js +0 -2
- package/dist/siemens-ix/p-f7b95fd7.entry.js.map +0 -1
- /package/dist/siemens-ix/{p-4796a3ae.entry.js.map → p-042b8889.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-b53bed3a.entry.js.map → p-228c5657.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-fa0d5f4e.entry.js.map → p-28d29e36.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-6ae65cac.entry.js.map → p-c1318e16.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-77b14ca1.entry.js.map → p-f304f7ce.entry.js.map} +0 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { a as autoUpdate, c as computePosition, s as shift, o as offset, b as arrow, f as flip } from './floating-ui.dom.esm.js';
|
|
3
|
+
import { d as defineCustomElement$1 } from './typography.js';
|
|
4
|
+
|
|
5
|
+
const tooltipCss = ":host{display:inline-block;position:fixed;left:0px;top:0px;z-index:var(--theme-z-index-tooltip);max-width:18.25rem;opacity:0;visibility:collapse !important;overflow-wrap:break-word;border-radius:0.25rem;background-color:var(--theme-tootlip--background);padding:0.375rem 0.75rem 0.375rem 0.875rem;box-shadow:var(--theme-shadow-4)}:host .tooltip-title{display:flex;align-items:center}:host .tooltip-title ::slotted(ix-icon){margin-right:0.35rem}:host(.visible){opacity:1;visibility:visible !important}:host(.visible) .arrow,:host(.visible) .arrow::before{position:absolute;width:8px;height:8px;background:inherit}:host(.visible) .arrow{visibility:hidden}:host(.visible) .arrow::before{visibility:visible;content:\"\";transform:rotate(45deg);background-color:var(--theme-tootlip--background)}";
|
|
6
|
+
|
|
7
|
+
const numberToPixel = (value) => (value != null ? `${value}px` : '');
|
|
8
|
+
const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.onMouseEnterBind = this.onTooltipShow.bind(this);
|
|
14
|
+
this.onMouseLeaveBind = this.onTooltipHide.bind(this);
|
|
15
|
+
this.tooltipCloseTimeInMS = 50;
|
|
16
|
+
this.for = undefined;
|
|
17
|
+
this.titleContent = undefined;
|
|
18
|
+
this.interactive = false;
|
|
19
|
+
this.placement = 'top';
|
|
20
|
+
this.animationFrame = false;
|
|
21
|
+
this.visible = false;
|
|
22
|
+
}
|
|
23
|
+
get arrowElement() {
|
|
24
|
+
return this.hostElement.shadowRoot.querySelector('.arrow');
|
|
25
|
+
}
|
|
26
|
+
destroyAutoUpdate() {
|
|
27
|
+
if (this.disposeAutoUpdate !== undefined) {
|
|
28
|
+
this.disposeAutoUpdate();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
onTooltipShow(e) {
|
|
32
|
+
this.showTooltip(e.target);
|
|
33
|
+
}
|
|
34
|
+
onTooltipHide() {
|
|
35
|
+
this.hideTooltip();
|
|
36
|
+
}
|
|
37
|
+
/** @internal */
|
|
38
|
+
async showTooltip(anchorElement) {
|
|
39
|
+
clearTimeout(this.hideTooltipTimeout);
|
|
40
|
+
this.visible = true;
|
|
41
|
+
this.computeTooltipPosition(anchorElement);
|
|
42
|
+
}
|
|
43
|
+
/** @internal */
|
|
44
|
+
async hideTooltip() {
|
|
45
|
+
this.hideTooltipTimeout = setTimeout(() => {
|
|
46
|
+
this.visible = false;
|
|
47
|
+
}, this.tooltipCloseTimeInMS);
|
|
48
|
+
this.destroyAutoUpdate();
|
|
49
|
+
}
|
|
50
|
+
computeArrowPosition({ placement, middlewareData, }) {
|
|
51
|
+
let { x, y } = middlewareData.arrow;
|
|
52
|
+
if (placement.startsWith('top')) {
|
|
53
|
+
return {
|
|
54
|
+
left: numberToPixel(x),
|
|
55
|
+
top: numberToPixel(y),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
if (placement.startsWith('right')) {
|
|
59
|
+
return {
|
|
60
|
+
left: numberToPixel(-4),
|
|
61
|
+
top: numberToPixel(y),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
if (placement.startsWith('bottom')) {
|
|
65
|
+
return {
|
|
66
|
+
left: numberToPixel(x),
|
|
67
|
+
top: numberToPixel(-4),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
if (placement.startsWith('left')) {
|
|
71
|
+
return {
|
|
72
|
+
right: numberToPixel(-4),
|
|
73
|
+
top: numberToPixel(y),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async computeTooltipPosition(target) {
|
|
78
|
+
if (!target) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
this.disposeAutoUpdate = autoUpdate(target, this.hostElement, async () => {
|
|
82
|
+
setTimeout(async () => {
|
|
83
|
+
const computeResponse = await computePosition(target, this.hostElement, {
|
|
84
|
+
strategy: 'fixed',
|
|
85
|
+
placement: this.placement,
|
|
86
|
+
middleware: [
|
|
87
|
+
shift(),
|
|
88
|
+
offset(8),
|
|
89
|
+
arrow({
|
|
90
|
+
element: this.arrowElement,
|
|
91
|
+
}),
|
|
92
|
+
flip({
|
|
93
|
+
fallbackStrategy: 'initialPlacement',
|
|
94
|
+
padding: 10,
|
|
95
|
+
}),
|
|
96
|
+
],
|
|
97
|
+
});
|
|
98
|
+
if (computeResponse.middlewareData.arrow) {
|
|
99
|
+
const arrowPosition = this.computeArrowPosition(computeResponse);
|
|
100
|
+
Object.assign(this.arrowElement.style, arrowPosition);
|
|
101
|
+
}
|
|
102
|
+
const { x, y } = computeResponse;
|
|
103
|
+
Object.assign(this.hostElement.style, {
|
|
104
|
+
left: x !== null ? `${x}px` : '',
|
|
105
|
+
top: y !== null ? `${y}px` : '',
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
}, {
|
|
109
|
+
ancestorResize: true,
|
|
110
|
+
ancestorScroll: true,
|
|
111
|
+
elementResize: true,
|
|
112
|
+
animationFrame: this.animationFrame,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
queryAnchorElements() {
|
|
116
|
+
return Array.from(document.querySelectorAll(this.for));
|
|
117
|
+
}
|
|
118
|
+
registerTriggerListener() {
|
|
119
|
+
const elements = this.queryAnchorElements();
|
|
120
|
+
elements.forEach((e) => {
|
|
121
|
+
e.addEventListener('mouseenter', this.onMouseEnterBind);
|
|
122
|
+
e.addEventListener('mouseleave', this.onMouseLeaveBind);
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
registerTooltipListener() {
|
|
126
|
+
this.hostElement.addEventListener('mouseenter', () => {
|
|
127
|
+
if (this.interactive) {
|
|
128
|
+
clearTimeout(this.hideTooltipTimeout);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
this.hostElement.addEventListener('mouseleave', () => {
|
|
132
|
+
this.onTooltipHide();
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
componentDidLoad() {
|
|
136
|
+
if (this.interactive) {
|
|
137
|
+
this.tooltipCloseTimeInMS = 150;
|
|
138
|
+
}
|
|
139
|
+
this.observer = new MutationObserver(() => {
|
|
140
|
+
this.registerTriggerListener();
|
|
141
|
+
});
|
|
142
|
+
this.observer.observe(document.body, {
|
|
143
|
+
attributes: true,
|
|
144
|
+
attributeFilter: ['data-ix-tooltip'],
|
|
145
|
+
childList: true,
|
|
146
|
+
subtree: true,
|
|
147
|
+
});
|
|
148
|
+
this.registerTriggerListener();
|
|
149
|
+
this.registerTooltipListener();
|
|
150
|
+
}
|
|
151
|
+
disconnectedCallback() {
|
|
152
|
+
var _a;
|
|
153
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
154
|
+
this.destroyAutoUpdate();
|
|
155
|
+
}
|
|
156
|
+
render() {
|
|
157
|
+
const tooltipContentClass = {
|
|
158
|
+
'tooltip-content': true,
|
|
159
|
+
};
|
|
160
|
+
return (h(Host, { class: {
|
|
161
|
+
visible: this.visible,
|
|
162
|
+
} }, h("div", { class: 'tooltip-title' }, h("slot", { name: "title-icon" }), h("ix-typography", { variant: "default-title" }, this.titleContent, h("slot", { name: "title-content" }))), h("div", { class: tooltipContentClass }, h("slot", null)), h("div", { class: "arrow" })));
|
|
163
|
+
}
|
|
164
|
+
get hostElement() { return this; }
|
|
165
|
+
static get style() { return tooltipCss; }
|
|
166
|
+
}, [1, "ix-tooltip", {
|
|
167
|
+
"for": [1],
|
|
168
|
+
"titleContent": [1, "title-content"],
|
|
169
|
+
"interactive": [4],
|
|
170
|
+
"placement": [1],
|
|
171
|
+
"animationFrame": [4, "animation-frame"],
|
|
172
|
+
"visible": [32],
|
|
173
|
+
"showTooltip": [64],
|
|
174
|
+
"hideTooltip": [64]
|
|
175
|
+
}]);
|
|
176
|
+
function defineCustomElement() {
|
|
177
|
+
if (typeof customElements === "undefined") {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
const components = ["ix-tooltip", "ix-typography"];
|
|
181
|
+
components.forEach(tagName => { switch (tagName) {
|
|
182
|
+
case "ix-tooltip":
|
|
183
|
+
if (!customElements.get(tagName)) {
|
|
184
|
+
customElements.define(tagName, Tooltip);
|
|
185
|
+
}
|
|
186
|
+
break;
|
|
187
|
+
case "ix-typography":
|
|
188
|
+
if (!customElements.get(tagName)) {
|
|
189
|
+
defineCustomElement$1();
|
|
190
|
+
}
|
|
191
|
+
break;
|
|
192
|
+
} });
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export { Tooltip as T, defineCustomElement as d };
|
|
196
|
+
|
|
197
|
+
//# sourceMappingURL=tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"tooltip.js","mappings":";;;;AAAA,MAAM,UAAU,GAAG,uxBAAuxB;;ACiC1yB,MAAM,aAAa,GAAG,CAAC,KAAa,MAAM,KAAK,IAAI,IAAI,GAAG,GAAG,KAAK,IAAI,GAAG,EAAE,CAAC,CAAC;MAahE,OAAO;;;;;IAiCV,qBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,qBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEjD,yBAAoB,GAAG,EAAE,CAAC;;;uBAtBZ,KAAK;qBAQ8B,KAAK;0BAGrC,KAAK;mBAEX,KAAK;;EAWxB,IAAY,YAAY;IACtB,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAgB,CAAC;GAC3E;EAEO,iBAAiB;IACvB,IAAI,IAAI,CAAC,iBAAiB,KAAK,SAAS,EAAE;MACxC,IAAI,CAAC,iBAAiB,EAAE,CAAC;KAC1B;GACF;EAEO,aAAa,CAAC,CAAQ;IAC5B,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,MAAiB,CAAC,CAAC;GACvC;EAEO,aAAa;IACnB,IAAI,CAAC,WAAW,EAAE,CAAC;GACpB;;EAID,MAAM,WAAW,CAAC,aAAkB;IAClC,YAAY,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACtC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACpB,IAAI,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC;GAC5C;;EAID,MAAM,WAAW;IACf,IAAI,CAAC,kBAAkB,GAAG,UAAU,CAAC;MACnC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;KACtB,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC;IAC9B,IAAI,CAAC,iBAAiB,EAAE,CAAC;GAC1B;EAEO,oBAAoB,CAAC,EAC3B,SAAS,EACT,cAAc,GACQ;IACtB,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,cAAc,CAAC,KAAK,CAAC;IAEpC,IAAI,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;MAC/B,OAAO;QACL,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;QACtB,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC;OACtB,CAAC;KACH;IAED,IAAI,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;MACjC,OAAO;QACL,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACvB,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC;OACtB,CAAC;KACH;IAED,IAAI,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;MAClC,OAAO;QACL,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;QACtB,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;OACvB,CAAC;KACH;IAED,IAAI,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;MAChC,OAAO;QACL,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC;OACtB,CAAC;KACH;GACF;EAEO,MAAM,sBAAsB,CAAC,MAAe;IAClD,IAAI,CAAC,MAAM,EAAE;MACX,OAAO;KACR;IACD,IAAI,CAAC,iBAAiB,GAAG,UAAU,CACjC,MAAM,EACN,IAAI,CAAC,WAAW,EAChB;MACE,UAAU,CAAC;QACT,MAAM,eAAe,GAAG,MAAM,eAAe,CAC3C,MAAM,EACN,IAAI,CAAC,WAAW,EAChB;UACE,QAAQ,EAAE,OAAO;UACjB,SAAS,EAAE,IAAI,CAAC,SAAS;UACzB,UAAU,EAAE;YACV,KAAK,EAAE;YACP,MAAM,CAAC,CAAC,CAAC;YACT,KAAK,CAAC;cACJ,OAAO,EAAE,IAAI,CAAC,YAAY;aAC3B,CAAC;YACF,IAAI,CAAC;cACH,gBAAgB,EAAE,kBAAkB;cACpC,OAAO,EAAE,EAAE;aACZ,CAAC;WACH;SACF,CACF,CAAC;QAEF,IAAI,eAAe,CAAC,cAAc,CAAC,KAAK,EAAE;UACxC,MAAM,aAAa,GAAG,IAAI,CAAC,oBAAoB,CAAC,eAAe,CAAC,CAAC;UACjE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;SACvD;QAED,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,eAAe,CAAC;QACjC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;UACpC,IAAI,EAAE,CAAC,KAAK,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,EAAE;UAChC,GAAG,EAAE,CAAC,KAAK,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,EAAE;SAChC,CAAC,CAAC;OACJ,CAAC,CAAC;KACJ,EACD;MACE,cAAc,EAAE,IAAI;MACpB,cAAc,EAAE,IAAI;MACpB,aAAa,EAAE,IAAI;MACnB,cAAc,EAAE,IAAI,CAAC,cAAc;KACpC,CACF,CAAC;GACH;EAEO,mBAAmB;IACzB,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;GACxD;EAEO,uBAAuB;IAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC5C,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;MACjB,CAAC,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;MACxD,CAAC,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;KACzD,CAAC,CAAC;GACJ;EAEO,uBAAuB;IAC7B,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,YAAY,EAAE;MAC9C,IAAI,IAAI,CAAC,WAAW,EAAE;QACpB,YAAY,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;OACvC;KACF,CAAC,CAAC;IACH,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,YAAY,EAAE;MAC9C,IAAI,CAAC,aAAa,EAAE,CAAC;KACtB,CAAC,CAAC;GACJ;EAED,gBAAgB;IACd,IAAI,IAAI,CAAC,WAAW,EAAE;MACpB,IAAI,CAAC,oBAAoB,GAAG,GAAG,CAAC;KACjC;IAED,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,CAAC;MACnC,IAAI,CAAC,uBAAuB,EAAE,CAAC;KAChC,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE;MACnC,UAAU,EAAE,IAAI;MAChB,eAAe,EAAE,CAAC,iBAAiB,CAAC;MACpC,SAAS,EAAE,IAAI;MACf,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;IAEH,IAAI,CAAC,uBAAuB,EAAE,CAAC;IAC/B,IAAI,CAAC,uBAAuB,EAAE,CAAC;GAChC;EAED,oBAAoB;;IAClB,MAAA,IAAI,CAAC,QAAQ,0CAAE,UAAU,EAAE,CAAC;IAC5B,IAAI,CAAC,iBAAiB,EAAE,CAAC;GAC1B;EAED,MAAM;IACJ,MAAM,mBAAmB,GAAG;MAC1B,iBAAiB,EAAE,IAAI;KACxB,CAAC;IAEF,QACE,EAAC,IAAI,IACH,KAAK,EAAE;QACL,OAAO,EAAE,IAAI,CAAC,OAAO;OACtB,IAED,WAAK,KAAK,EAAE,eAAe,IACzB,YAAM,IAAI,EAAC,YAAY,GAAQ,EAC/B,qBAAe,OAAO,EAAC,eAAe,IACnC,IAAI,CAAC,YAAY,EAClB,YAAM,IAAI,EAAC,eAAe,GAAQ,CACpB,CACZ,EACN,WAAK,KAAK,EAAE,mBAAmB,IAC7B,eAAa,CACT,EACN,WAAK,KAAK,EAAC,OAAO,GAAO,CACpB,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/tooltip/tooltip.scss?tag=ix-tooltip&encapsulation=shadow","./src/components/tooltip/tooltip.tsx"],"sourcesContent":[":host {\n display: inline-block;\n position: fixed;\n left: 0px;\n top: 0px;\n z-index: var(--theme-z-index-tooltip);\n\n max-width: 18.25rem;\n\n opacity: 0;\n visibility: collapse !important;\n overflow-wrap: break-word;\n\n border-radius: 0.25rem;\n background-color: var(--theme-tootlip--background);\n padding: 0.375rem 0.75rem 0.375rem 0.875rem;\n\n box-shadow: var(--theme-shadow-4);\n\n .tooltip-title {\n display: flex;\n align-items: center;\n\n ::slotted(ix-icon) {\n margin-right: 0.35rem;\n }\n }\n}\n\n:host(.visible) {\n opacity: 1;\n visibility: visible !important;\n}\n\n:host(.visible) {\n .arrow,\n .arrow::before {\n position: absolute;\n width: 8px;\n height: 8px;\n background: inherit;\n }\n\n .arrow {\n visibility: hidden;\n }\n\n .arrow::before {\n visibility: visible;\n content: '';\n transform: rotate(45deg);\n background-color: var(--theme-tootlip--background);\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 */\nimport {\n arrow,\n autoUpdate,\n computePosition,\n ComputePositionReturn,\n flip,\n offset,\n shift,\n} from '@floating-ui/dom';\nimport {\n Component,\n Element,\n h,\n Host,\n Method,\n Prop,\n State,\n} from '@stencil/core';\n\ntype ArrowPosition = {\n top?: string;\n left?: string;\n right?: string;\n};\n\nconst numberToPixel = (value: number) => (value != null ? `${value}px` : '');\n\n/**\n * @slot title-icon - Icon of tooltip title\n * @slot title-content - Content of tooltip title\n *\n * @since 1.4.0\n */\n@Component({\n tag: 'ix-tooltip',\n styleUrl: 'tooltip.scss',\n shadow: true,\n})\nexport class Tooltip {\n /**\n * CSS selector for hover trigger element e.g. `for=\"[data-my-custom-select]\"`\n */\n @Prop() for: string;\n\n /**\n * Title of the tooltip\n */\n @Prop() titleContent: string;\n\n /**\n * Define if the user can access the tooltip via mouse.\n */\n @Prop() interactive = false;\n\n /**\n * Initial placement of the tooltip. If the placement don\"t have enough space,\n * the tooltip will placed on another location.\n *\n * @since 1.5.0\n */\n @Prop() placement: 'top' | 'right' | 'bottom' | 'left' = 'top';\n\n /** @internal */\n @Prop() animationFrame = false;\n\n @State() visible = false;\n\n @Element() hostElement: HTMLIxTooltipElement;\n\n private observer: MutationObserver;\n private hideTooltipTimeout: NodeJS.Timeout;\n private onMouseEnterBind = this.onTooltipShow.bind(this);\n private onMouseLeaveBind = this.onTooltipHide.bind(this);\n private disposeAutoUpdate?: () => void;\n private tooltipCloseTimeInMS = 50;\n\n private get arrowElement() {\n return this.hostElement.shadowRoot.querySelector('.arrow') as HTMLElement;\n }\n\n private destroyAutoUpdate() {\n if (this.disposeAutoUpdate !== undefined) {\n this.disposeAutoUpdate();\n }\n }\n\n private onTooltipShow(e: Event) {\n this.showTooltip(e.target as Element);\n }\n\n private onTooltipHide() {\n this.hideTooltip();\n }\n\n /** @internal */\n @Method()\n async showTooltip(anchorElement: any) {\n clearTimeout(this.hideTooltipTimeout);\n this.visible = true;\n this.computeTooltipPosition(anchorElement);\n }\n\n /** @internal */\n @Method()\n async hideTooltip() {\n this.hideTooltipTimeout = setTimeout(() => {\n this.visible = false;\n }, this.tooltipCloseTimeInMS);\n this.destroyAutoUpdate();\n }\n\n private computeArrowPosition({\n placement,\n middlewareData,\n }: ComputePositionReturn): ArrowPosition {\n let { x, y } = middlewareData.arrow;\n\n if (placement.startsWith('top')) {\n return {\n left: numberToPixel(x),\n top: numberToPixel(y),\n };\n }\n\n if (placement.startsWith('right')) {\n return {\n left: numberToPixel(-4),\n top: numberToPixel(y),\n };\n }\n\n if (placement.startsWith('bottom')) {\n return {\n left: numberToPixel(x),\n top: numberToPixel(-4),\n };\n }\n\n if (placement.startsWith('left')) {\n return {\n right: numberToPixel(-4),\n top: numberToPixel(y),\n };\n }\n }\n\n private async computeTooltipPosition(target: Element) {\n if (!target) {\n return;\n }\n this.disposeAutoUpdate = autoUpdate(\n target,\n this.hostElement,\n async () => {\n setTimeout(async () => {\n const computeResponse = await computePosition(\n target,\n this.hostElement,\n {\n strategy: 'fixed',\n placement: this.placement,\n middleware: [\n shift(),\n offset(8),\n arrow({\n element: this.arrowElement,\n }),\n flip({\n fallbackStrategy: 'initialPlacement',\n padding: 10,\n }),\n ],\n }\n );\n\n if (computeResponse.middlewareData.arrow) {\n const arrowPosition = this.computeArrowPosition(computeResponse);\n Object.assign(this.arrowElement.style, arrowPosition);\n }\n\n const { x, y } = computeResponse;\n Object.assign(this.hostElement.style, {\n left: x !== null ? `${x}px` : '',\n top: y !== null ? `${y}px` : '',\n });\n });\n },\n {\n ancestorResize: true,\n ancestorScroll: true,\n elementResize: true,\n animationFrame: this.animationFrame,\n }\n );\n }\n\n private queryAnchorElements() {\n return Array.from(document.querySelectorAll(this.for));\n }\n\n private registerTriggerListener() {\n const elements = this.queryAnchorElements();\n elements.forEach((e) => {\n e.addEventListener('mouseenter', this.onMouseEnterBind);\n e.addEventListener('mouseleave', this.onMouseLeaveBind);\n });\n }\n\n private registerTooltipListener() {\n this.hostElement.addEventListener('mouseenter', () => {\n if (this.interactive) {\n clearTimeout(this.hideTooltipTimeout);\n }\n });\n this.hostElement.addEventListener('mouseleave', () => {\n this.onTooltipHide();\n });\n }\n\n componentDidLoad() {\n if (this.interactive) {\n this.tooltipCloseTimeInMS = 150;\n }\n\n this.observer = new MutationObserver(() => {\n this.registerTriggerListener();\n });\n\n this.observer.observe(document.body, {\n attributes: true,\n attributeFilter: ['data-ix-tooltip'],\n childList: true,\n subtree: true,\n });\n\n this.registerTriggerListener();\n this.registerTooltipListener();\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n this.destroyAutoUpdate();\n }\n\n render() {\n const tooltipContentClass = {\n 'tooltip-content': true,\n };\n\n return (\n <Host\n class={{\n visible: this.visible,\n }}\n >\n <div class={'tooltip-title'}>\n <slot name=\"title-icon\"></slot>\n <ix-typography variant=\"default-title\">\n {this.titleContent}\n <slot name=\"title-content\"></slot>\n </ix-typography>\n </div>\n <div class={tooltipContentClass}>\n <slot></slot>\n </div>\n <div class=\"arrow\"></div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const treeItemCss = ":host{display:flex;align-items:center;height:32px;width:100%;cursor:pointer}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .tree-node-container{display:flex;align-items:center;height:2rem;flex-grow:1;align-items:center}:host .icon-toggle-container{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem}:host .icon-toggle-container ix-icon{transition:transform 150ms ease-in-out}:host .icon-toggle-container ix-icon.icon-toggle-down{transform:rotate(90deg)}:host(:not(.disabled):not(:disabled):not(.selected).hover),:host(:not(.disabled):not(:disabled):not(.selected):hover){background-color:var(--theme-tree-item--background--hover)}:host(:not(.disabled):not(:disabled):not(.selected).active),:host(:not(.disabled):not(:disabled):not(.selected):active){background-color:var(--theme-tree-item--background--active)}:host(.selected){background-color:var(--theme-tree-item--background--selected)}:host(.selected.hover),:host(.selected:hover){background-color:var(--theme-tree-item--background--selected-hover)}:host(.selected.active),:host(.selected:active){background-color:var(--theme-tree-item--background--selected-active)}";
|
|
4
|
+
|
|
5
|
+
const TreeItem = /*@__PURE__*/ proxyCustomElement(class TreeItem extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.toggle = createEvent(this, "toggle", 7);
|
|
11
|
+
this.itemClick = createEvent(this, "itemClick", 7);
|
|
12
|
+
this.text = undefined;
|
|
13
|
+
this.hasChildren = undefined;
|
|
14
|
+
this.context = undefined;
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
var _a, _b, _c;
|
|
18
|
+
return (h(Host, { class: {
|
|
19
|
+
selected: (_a = this.context) === null || _a === void 0 ? void 0 : _a.isSelected,
|
|
20
|
+
} }, h("div", { class: "icon-toggle-container", onClick: (e) => {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
this.toggle.emit();
|
|
23
|
+
} }, this.hasChildren ? (h("ix-icon", { name: 'chevron-right', size: "16", class: {
|
|
24
|
+
['icon-toggle-down']: (_b = this.context) === null || _b === void 0 ? void 0 : _b.isExpanded,
|
|
25
|
+
}, color: `color-${((_c = this.context) === null || _c === void 0 ? void 0 : _c.isExpanded) ? 'primary' : 'std-text'}` })) : null), h("div", { class: "tree-node-container", onClick: () => {
|
|
26
|
+
this.itemClick.emit();
|
|
27
|
+
} }, this.text, h("slot", null))));
|
|
28
|
+
}
|
|
29
|
+
static get style() { return treeItemCss; }
|
|
30
|
+
}, [1, "ix-tree-item", {
|
|
31
|
+
"text": [1],
|
|
32
|
+
"hasChildren": [4, "has-children"],
|
|
33
|
+
"context": [16]
|
|
34
|
+
}]);
|
|
35
|
+
function defineCustomElement() {
|
|
36
|
+
if (typeof customElements === "undefined") {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const components = ["ix-tree-item"];
|
|
40
|
+
components.forEach(tagName => { switch (tagName) {
|
|
41
|
+
case "ix-tree-item":
|
|
42
|
+
if (!customElements.get(tagName)) {
|
|
43
|
+
customElements.define(tagName, TreeItem);
|
|
44
|
+
}
|
|
45
|
+
break;
|
|
46
|
+
} });
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { TreeItem as T, defineCustomElement as d };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=tree-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"tree-item.js","mappings":";;AAAA,MAAM,WAAW,GAAG,grDAAgrD;;MCiBvrD,QAAQ;;;;;;;;;;;EA0BnB,MAAM;;IACJ,QACE,EAAC,IAAI,IACH,KAAK,EAAE;QACL,QAAQ,EAAE,MAAA,IAAI,CAAC,OAAO,0CAAE,UAAU;OACnC,IAED,WACE,KAAK,EAAC,uBAAuB,EAC7B,OAAO,EAAE,CAAC,CAAC;QACT,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;OACpB,IAEA,IAAI,CAAC,WAAW,IACf,eACE,IAAI,EAAE,eAAe,EACrB,IAAI,EAAC,IAAI,EACT,KAAK,EAAE;QACL,CAAC,kBAAkB,GAAG,MAAA,IAAI,CAAC,OAAO,0CAAE,UAAU;OAC/C,EACD,KAAK,EAAE,SACL,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,UAAU,IAAG,SAAS,GAAG,UACzC,EAAE,GACF,IACA,IAAI,CACJ,EACN,WACE,KAAK,EAAC,qBAAqB,EAC3B,OAAO,EAAE;QACP,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;OACvB,IAEA,IAAI,CAAC,IAAI,EACV,eAAa,CACT,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/tree-item/tree-item.scss?tag=ix-tree-item&encapsulation=shadow","./src/components/tree-item/tree-item.tsx"],"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\n@import 'common-variables';\n@import 'mixins/text-truncation';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n\n display: flex;\n align-items: center;\n\n height: 32px;\n width: 100%;\n\n cursor: pointer;\n\n .tree-node-container {\n display: flex;\n align-items: center;\n height: $x-large-space;\n flex-grow: 1;\n align-items: center;\n }\n\n .icon-toggle-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n\n ix-icon {\n transition: transform $default-time ease-in-out;\n\n &.icon-toggle-down {\n transform: rotate(90deg);\n }\n }\n }\n}\n\n:host(:not(.disabled):not(:disabled):not(.selected).hover),\n:host(:not(.disabled):not(:disabled):not(.selected):hover) {\n background-color: var(--theme-tree-item--background--hover);\n}\n\n:host(:not(.disabled):not(:disabled):not(.selected).active),\n:host(:not(.disabled):not(:disabled):not(.selected):active) {\n background-color: var(--theme-tree-item--background--active);\n}\n\n:host(.selected) {\n background-color: var(--theme-tree-item--background--selected);\n}\n\n:host(.selected.hover),\n:host(.selected:hover) {\n background-color: var(--theme-tree-item--background--selected-hover);\n}\n\n:host(.selected.active),\n:host(.selected:active) {\n background-color: var(--theme-tree-item--background--selected-active);\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, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\nimport { TreeItemContext } from '../tree/tree-model';\n\n@Component({\n tag: 'ix-tree-item',\n styleUrl: 'tree-item.scss',\n shadow: true,\n})\nexport class TreeItem {\n /**\n * Text\n */\n @Prop() text: string;\n\n /**\n * Has tree item children\n */\n @Prop() hasChildren: boolean;\n\n /**\n * Context\n */\n @Prop() context: TreeItemContext;\n\n /**\n * Expand/Collapsed toggled\n */\n @Event() toggle: EventEmitter<void>;\n\n /**\n * Clicked\n */\n @Event() itemClick: EventEmitter<void>;\n\n render() {\n return (\n <Host\n class={{\n selected: this.context?.isSelected,\n }}\n >\n <div\n class=\"icon-toggle-container\"\n onClick={(e) => {\n e.preventDefault();\n this.toggle.emit();\n }}\n >\n {this.hasChildren ? (\n <ix-icon\n name={'chevron-right'}\n size=\"16\"\n class={{\n ['icon-toggle-down']: this.context?.isExpanded,\n }}\n color={`color-${\n this.context?.isExpanded ? 'primary' : 'std-text'\n }`}\n />\n ) : null}\n </div>\n <div\n class=\"tree-node-container\"\n onClick={() => {\n this.itemClick.emit();\n }}\n >\n {this.text}\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
class TypedEvent {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.listeners = [];
|
|
12
|
+
this.listenersOncer = [];
|
|
13
|
+
this.on = (listener) => {
|
|
14
|
+
this.listeners.push(listener);
|
|
15
|
+
return {
|
|
16
|
+
dispose: () => this.off(listener),
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
this.once = (listener) => {
|
|
20
|
+
this.listenersOncer.push(listener);
|
|
21
|
+
};
|
|
22
|
+
this.off = (listener) => {
|
|
23
|
+
const callbackIndex = this.listeners.indexOf(listener);
|
|
24
|
+
if (callbackIndex > -1) {
|
|
25
|
+
this.listeners.splice(callbackIndex, 1);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
this.emit = (event) => {
|
|
29
|
+
/** Update any general listeners */
|
|
30
|
+
this.listeners.forEach((listener) => listener(event));
|
|
31
|
+
/** Clear the `once` queue */
|
|
32
|
+
if (this.listenersOncer.length > 0) {
|
|
33
|
+
const toCall = this.listenersOncer;
|
|
34
|
+
this.listenersOncer = [];
|
|
35
|
+
toCall.forEach((listener) => listener(event));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
this.pipe = (te) => {
|
|
39
|
+
return this.on((e) => te.emit(e));
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { TypedEvent as T };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=typed-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"typed-event.js","mappings":"AAAA;;;;;;;;MAiBa,UAAU;EAAvB;IACkB,cAAS,GAAkB,EAAE,CAAC;IACvC,mBAAc,GAAkB,EAAE,CAAC;IAE1C,OAAE,GAAG,CAAC,QAAqB;MACzB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;MAC9B,OAAO;QACL,OAAO,EAAE,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC;OAClC,CAAC;KACH,CAAC;IAEF,SAAI,GAAG,CAAC,QAAqB;MAC3B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACpC,CAAC;IAEF,QAAG,GAAG,CAAC,QAAqB;MAC1B,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;MACvD,IAAI,aAAa,GAAG,CAAC,CAAC,EAAE;QACtB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;OACzC;KACF,CAAC;IAEF,SAAI,GAAG,CAAC,KAAQ;;MAEd,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;;MAGtD,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC;QACnC,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;OAC/C;KACF,CAAC;IAEF,SAAI,GAAG,CAAC,EAAiB;MACvB,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;KACnC,CAAC;GACH;;;;;","names":[],"sources":["./src/components/utils/typed-event.ts"],"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\nexport interface Listener<T> {\n (event: T): any;\n}\n\nexport interface Disposable {\n dispose(): void;\n}\n\nexport class TypedEvent<T> {\n public readonly listeners: Listener<T>[] = [];\n public listenersOncer: Listener<T>[] = [];\n\n on = (listener: Listener<T>): Disposable => {\n this.listeners.push(listener);\n return {\n dispose: () => this.off(listener),\n };\n };\n\n once = (listener: Listener<T>): void => {\n this.listenersOncer.push(listener);\n };\n\n off = (listener: Listener<T>) => {\n const callbackIndex = this.listeners.indexOf(listener);\n if (callbackIndex > -1) {\n this.listeners.splice(callbackIndex, 1);\n }\n };\n\n emit = (event: T) => {\n /** Update any general listeners */\n this.listeners.forEach((listener) => listener(event));\n\n /** Clear the `once` queue */\n if (this.listenersOncer.length > 0) {\n const toCall = this.listenersOncer;\n this.listenersOncer = [];\n toCall.forEach((listener) => listener(event));\n }\n };\n\n pipe = (te: TypedEvent<T>): Disposable => {\n return this.on((e) => te.emit(e));\n };\n}\n"],"version":3}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const VariantsMapping = {
|
|
4
|
+
'x-small': 'text-xs',
|
|
5
|
+
small: 'text-s',
|
|
6
|
+
caption: 'text-caption',
|
|
7
|
+
'caption-single': 'text-caption-single',
|
|
8
|
+
default: 'text-default',
|
|
9
|
+
'default-single': 'text-default-single',
|
|
10
|
+
large: 'text-l',
|
|
11
|
+
'large-single': 'text-l-single',
|
|
12
|
+
h2: 'text-h2',
|
|
13
|
+
'display-large': 'text-xl',
|
|
14
|
+
'default-title': 'text-default-title',
|
|
15
|
+
'default-title-single': 'text-default-title-single',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const typographyCss = ".typography-label,:host(.typography-label){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-sm);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-label-xs,:host(.typography-label-xs){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms--2);line-height:var(--theme-line-height-sm);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xxl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-label-sm,:host(.typography-label-sm){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms--1);line-height:var(--theme-line-height-sm);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-label-lg,:host(.typography-label-lg){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-sm);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-lg);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-body,:host(.typography-body){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-body-xs,:host(.typography-body-xs){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms--2);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xxl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-body-sm,:host(.typography-body-sm){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms--1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-body-lg,:host(.typography-body-lg){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-lg);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display,:host(.typography-display){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-3);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display-xs,:host(.typography-display-xs){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-sm);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display-sm,:host(.typography-display-sm){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-2);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-lg);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display-lg,:host(.typography-display-lg){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-4);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display-xl,:host(.typography-display-xl){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-5);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-sm);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display-xxl,:host(.typography-display-xxl){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-6);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-sm);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h6,.typography-h6,:host(.typography-h6){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h5,.typography-h5,:host(.typography-h5){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h4,.typography-h4,:host(.typography-h4){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-lg);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h3,.typography-h3,:host(.typography-h3){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-2);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-lg);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h2,.typography-h2,:host(.typography-h2){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-3);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h1,.typography-h1,:host(.typography-h1){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-4);line-height:var(--theme-line-height-sm);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-code,:host(.typography-code){font-feature-settings:\"clig\" off, \"liga\" off;font-family:JetBrainsMono, Courier New, monospace, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-code-lg,:host(.typography-code-lg){font-feature-settings:\"clig\" off, \"liga\" off;font-family:JetBrainsMono, Courier New, monospace, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-code-sm,:host(.typography-code-sm){font-feature-settings:\"clig\" off, \"liga\" off;font-family:JetBrainsMono, Courier New, monospace, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms--1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-decoration-none,:host(.typography-decoration-none){text-decoration:none !important}.typography-decoration-underline,:host(.typography-decoration-underline){text-decoration:underline !important}.typography-decoration-line-through,:host(.typography-decoration-line-through){text-decoration:line-through !important}.typography-weight-bold,:host(.typography-weight-bold){font-weight:700 !important}a{color:var(--theme-color-primary)}:host{display:block;position:relative}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host(.text-xs){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.625rem;font-weight:400;line-height:1.4em;color:var(--theme-color-std-text)}:host(.text-s){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.75rem;font-weight:400;line-height:1.5em;color:var(--theme-color-std-text)}:host(.text-caption){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.75rem;font-weight:700;line-height:1.5em;color:var(--theme-color-std-text)}:host(.text-caption-single){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.75rem;font-weight:700;line-height:1em;color:var(--theme-color-std-text)}:host(.text-default){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:400;line-height:1.429em;color:var(--theme-color-std-text)}:host(.text-default-single){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:400;line-height:1.143em;color:var(--theme-color-std-text)}:host(.text-default-title){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:700;line-height:1.429em;color:var(--theme-color-std-text)}:host(.text-default-title-single){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:700;line-height:1.143em;color:var(--theme-color-std-text)}:host(.text-l){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:400;line-height:1.5em;color:var(--theme-color-std-text)}:host(.text-l-single){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:400;line-height:1.25em;color:var(--theme-color-std-text)}:host(.text-l-title){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:700;line-height:1.5em;color:var(--theme-color-std-text)}:host(.text-l-title-single){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:700;line-height:1.25em;color:var(--theme-color-std-text)}:host(.text-h2){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1.375rem;font-weight:700;line-height:1.455em;color:var(--theme-color-std-text)}:host(.text-xl){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1.375rem;font-weight:400;line-height:1.091em;color:var(--theme-color-std-text)}";
|
|
19
|
+
|
|
20
|
+
const IxTypography = /*@__PURE__*/ proxyCustomElement(class IxTypography extends HTMLElement {
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
this.__registerHost();
|
|
24
|
+
this.__attachShadow();
|
|
25
|
+
this.variant = undefined;
|
|
26
|
+
this.format = undefined;
|
|
27
|
+
this.color = undefined;
|
|
28
|
+
this.bold = false;
|
|
29
|
+
this.textDecoration = 'none';
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
let typographyClass = {};
|
|
34
|
+
if (this.variant) {
|
|
35
|
+
typographyClass[VariantsMapping[(_a = this.variant) !== null && _a !== void 0 ? _a : 'default']] = true;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
typographyClass[`typography-${(_b = this.format) !== null && _b !== void 0 ? _b : 'body'}`] = true;
|
|
39
|
+
}
|
|
40
|
+
if (this.textDecoration !== 'none') {
|
|
41
|
+
typographyClass[`typography-decoration-${this.textDecoration}`] = true;
|
|
42
|
+
}
|
|
43
|
+
typographyClass['typography-weight-bold'] = this.bold;
|
|
44
|
+
let style = {};
|
|
45
|
+
if (this.color) {
|
|
46
|
+
style = {
|
|
47
|
+
color: `var(--theme-color-${this.color}-text)`,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return (h(Host, { class: typographyClass, style: style }, h("slot", null)));
|
|
51
|
+
}
|
|
52
|
+
static get style() { return typographyCss; }
|
|
53
|
+
}, [1, "ix-typography", {
|
|
54
|
+
"variant": [1],
|
|
55
|
+
"format": [1],
|
|
56
|
+
"color": [1],
|
|
57
|
+
"bold": [4],
|
|
58
|
+
"textDecoration": [1, "text-decoration"]
|
|
59
|
+
}]);
|
|
60
|
+
function defineCustomElement() {
|
|
61
|
+
if (typeof customElements === "undefined") {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const components = ["ix-typography"];
|
|
65
|
+
components.forEach(tagName => { switch (tagName) {
|
|
66
|
+
case "ix-typography":
|
|
67
|
+
if (!customElements.get(tagName)) {
|
|
68
|
+
customElements.define(tagName, IxTypography);
|
|
69
|
+
}
|
|
70
|
+
break;
|
|
71
|
+
} });
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { IxTypography as I, defineCustomElement as d };
|
|
75
|
+
|
|
76
|
+
//# sourceMappingURL=typography.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"typography.js","mappings":";;AAsBO,MAAM,eAAe,GAAuC;EACjE,SAAS,EAAE,SAAS;EACpB,KAAK,EAAE,QAAQ;EACf,OAAO,EAAE,cAAc;EACvB,gBAAgB,EAAE,qBAAqB;EACvC,OAAO,EAAE,cAAc;EACvB,gBAAgB,EAAE,qBAAqB;EACvC,KAAK,EAAE,QAAQ;EACf,cAAc,EAAE,eAAe;EAC/B,EAAE,EAAE,SAAS;EACb,eAAe,EAAE,SAAS;EAC1B,eAAe,EAAE,oBAAoB;EACrC,sBAAsB,EAAE,2BAA2B;CACpD;;ACnCD,MAAM,aAAa,GAAG,0rbAA0rb;;MCoEnsb,YAAY;;;;;;;;gBAsBR,KAAK;0BAKqB,MAAM;;EAE/C,MAAM;;IACJ,IAAI,eAAe,GAAG,EAAE,CAAC;IAEzB,IAAI,IAAI,CAAC,OAAO,EAAE;MAChB,eAAe,CAAC,eAAe,CAAC,MAAA,IAAI,CAAC,OAAO,mCAAI,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC;KACpE;SAAM;MACL,eAAe,CAAC,cAAc,MAAA,IAAI,CAAC,MAAM,mCAAI,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC;KAC/D;IAED,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM,EAAE;MAClC,eAAe,CAAC,yBAAyB,IAAI,CAAC,cAAc,EAAE,CAAC,GAAG,IAAI,CAAC;KACxE;IAED,eAAe,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC;IAEtD,IAAI,KAAK,GAAG,EAAE,CAAC;IAEf,IAAI,IAAI,CAAC,KAAK,EAAE;MACd,KAAK,GAAG;QACN,KAAK,EAAE,qBAAqB,IAAI,CAAC,KAAK,QAAQ;OAC/C,CAAC;KACH;IAED,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,IACxC,eAAa,CACR,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/typography/type-mapping.ts","./src/components/typography/typography.scss?tag=ix-typography&encapsulation=shadow","./src/components/typography/typography.tsx"],"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 */\nexport type TypographyVariants =\n | 'x-small'\n | 'small'\n | 'caption'\n | 'caption-single'\n | 'default'\n | 'default-single'\n | 'default-title'\n | 'default-title-single'\n | 'large'\n | 'large-single'\n | 'h2'\n | 'display-large';\n\nexport const VariantsMapping: Record<TypographyVariants, string> = {\n 'x-small': 'text-xs',\n small: 'text-s',\n caption: 'text-caption',\n 'caption-single': 'text-caption-single',\n default: 'text-default',\n 'default-single': 'text-default-single',\n large: 'text-l',\n 'large-single': 'text-l-single',\n h2: 'text-h2',\n 'display-large': 'text-xl',\n 'default-title': 'text-default-title',\n 'default-title-single': 'text-default-title-single',\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 'common-variables';\n@import 'mixins/shadow-dom/component';\n@import 'legacy/mixins/fonts';\n@import 'components/fonts';\n@import 'mixins/fonts';\n\n:host {\n @include ix-component;\n\n display: block;\n position: relative;\n}\n\n:host(.text-xs) {\n @include text-xs;\n}\n\n:host(.text-s) {\n @include text-s;\n}\n\n:host(.text-caption) {\n @include text-caption;\n}\n\n:host(.text-caption-single) {\n @include text-caption-single;\n}\n\n:host(.text-default) {\n @include text-default;\n}\n\n:host(.text-default-single) {\n @include text-default-single;\n}\n\n:host(.text-default-title) {\n @include text-default-title;\n}\n\n:host(.text-default-title-single) {\n @include text-default-title-single;\n}\n\n:host(.text-l) {\n @include text-l;\n}\n\n:host(.text-l-single) {\n @include text-l-single;\n}\n\n:host(.text-l-title) {\n @include text-l-title;\n}\n\n:host(.text-l-title-single) {\n @include text-l-title-single;\n}\n\n:host(.text-h2) {\n @include text-h2;\n}\n\n:host(.text-xl) {\n @include text-xl;\n}\n\n$typography-formats: label, label-xs, label-sm, label-lg, body, body-xs, body-sm,\n body-lg, display, display-xs, display-sm, display-lg, display-xl, display-xxl,\n h6, h5, h4, h3, h2, h1, code, code-sm, code-lg;\n\n@each $format in $typography-formats {\n :host(.typography-#{$format}) {\n @extend .typography-#{$format};\n }\n}\n\n$typography-decoration: none, underline, line-through;\n@each $decoration in $typography-decoration {\n :host(.typography-decoration-#{$decoration}) {\n @extend .typography-decoration-#{$decoration};\n }\n}\n\n:host(.typography-weight-bold) {\n @extend .typography-weight-bold;\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 } from '@stencil/core';\nimport { VariantsMapping } from './type-mapping';\n\nexport type TypographyVariants =\n | 'x-small'\n | 'small'\n | 'caption'\n | 'caption-single'\n | 'default'\n | 'default-single'\n | 'default-title'\n | 'default-title-single'\n | 'large'\n | 'large-single'\n | 'large-title'\n | 'large-title-single'\n | 'h2'\n | 'display-large';\n\nexport type TypographyColors =\n | 'contrast'\n | 'std'\n | 'soft'\n | 'weak'\n | 'inv-contrast'\n | 'inv-std'\n | 'inv-soft'\n | 'inv-weak'\n | 'alarm';\n\ntype TypographyFormatLabel = 'label' | 'label-xs' | 'label-sm' | 'label-lg';\ntype TypographyFormatBody = 'body' | 'body-xs' | 'body-sm' | 'body-lg';\ntype TypographyFormatDisplay =\n | 'display'\n | 'display-xs'\n | 'display-sm'\n | 'display-lg'\n | 'display-xl'\n | 'display-xxl';\ntype TypographyFormatHeading = 'h6' | 'h5' | 'h4' | 'h3' | 'h2' | 'h1';\ntype TypographyFormatCode = 'code' | 'code-sm' | 'code-lg';\n\nexport type TypographyFormat =\n | TypographyFormatLabel\n | TypographyFormatBody\n | TypographyFormatDisplay\n | TypographyFormatHeading\n | TypographyFormatCode;\n\nexport type TextDecoration = 'none' | 'underline' | 'line-through';\n\n/**\n * @since 2.0.0\n */\n@Component({\n tag: 'ix-typography',\n styleUrl: 'typography.scss',\n shadow: true,\n})\nexport class IxTypography {\n /**\n * Font variant based on theme variables\n *\n * @deprecated Use `format` property\n * @internal\n */\n @Prop() variant: TypographyVariants;\n\n /**\n * Text format\n */\n @Prop() format: TypographyFormat;\n\n /**\n * Text color based on theme variables\n */\n @Prop() color: TypographyColors;\n\n /**\n * Display text bold\n */\n @Prop() bold = false;\n\n /**\n * Text decoration\n */\n @Prop() textDecoration: TextDecoration = 'none';\n\n render() {\n let typographyClass = {};\n\n if (this.variant) {\n typographyClass[VariantsMapping[this.variant ?? 'default']] = true;\n } else {\n typographyClass[`typography-${this.format ?? 'body'}`] = true;\n }\n\n if (this.textDecoration !== 'none') {\n typographyClass[`typography-decoration-${this.textDecoration}`] = true;\n }\n\n typographyClass['typography-weight-bold'] = this.bold;\n\n let style = {};\n\n if (this.color) {\n style = {\n color: `var(--theme-color-${this.color}-text)`,\n };\n }\n\n return (\n <Host class={typographyClass} style={style}>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
var UploadFileState;
|
|
10
|
+
(function (UploadFileState) {
|
|
11
|
+
UploadFileState["SELECT_FILE"] = "SELECT_FILE";
|
|
12
|
+
UploadFileState["LOADING"] = "LOADING";
|
|
13
|
+
UploadFileState["UPLOAD_FAILED"] = "UPLOAD_FAILED";
|
|
14
|
+
UploadFileState["UPLOAD_SUCCESSED"] = "UPLOAD_SUCCESSED";
|
|
15
|
+
})(UploadFileState || (UploadFileState = {}));
|
|
16
|
+
|
|
17
|
+
export { UploadFileState as U };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=upload-file-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"upload-file-state.js","mappings":"AAAA;;;;;;;;IASY;AAAZ,WAAY,eAAe;EACzB,8CAA2B,CAAA;EAC3B,sCAAmB,CAAA;EACnB,kDAA+B,CAAA;EAC/B,wDAAqC,CAAA;AACvC,CAAC,EALW,eAAe,KAAf,eAAe;;;;","names":[],"sources":["./src/components/upload/upload-file-state.ts"],"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\nexport enum UploadFileState {\n SELECT_FILE = 'SELECT_FILE',\n LOADING = 'LOADING',\n UPLOAD_FAILED = 'UPLOAD_FAILED',\n UPLOAD_SUCCESSED = 'UPLOAD_SUCCESSED',\n}\n"],"version":3}
|
|
@@ -16,8 +16,8 @@ const a11yHostAttributes = (hostElement, ignoreAttributes = []) => {
|
|
|
16
16
|
const value = hostElement.getAttribute(attr);
|
|
17
17
|
if (value !== null && !ignoreAttributes.includes(attr)) {
|
|
18
18
|
attributeObject[attr] = hostElement.getAttribute(attr);
|
|
19
|
+
hostElement.removeAttribute(attr);
|
|
19
20
|
}
|
|
20
|
-
hostElement.removeAttribute(attr);
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
return attributeObject;
|
|
@@ -79,4 +79,4 @@ const a11yAttributes = [
|
|
|
79
79
|
exports.a11yBoolean = a11yBoolean;
|
|
80
80
|
exports.a11yHostAttributes = a11yHostAttributes;
|
|
81
81
|
|
|
82
|
-
//# sourceMappingURL=a11y-
|
|
82
|
+
//# sourceMappingURL=a11y-7e1c1b86.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"a11y-7e1c1b86.js","mappings":";;AAAA;;;;;;;;MAQa,WAAW,GAAG,CAAC,KAAc,MAAM,KAAK,GAAG,MAAM,GAAG,OAAO,EAAE;MAE7D,kBAAkB,GAAG,CAChC,WAAwB,EACxB,mBAAwC,EAAE;EAE1C,MAAM,eAAe,GAAwB,EAAE,CAAC;EAChD,cAAc,CAAC,OAAO,CAAC,CAAC,IAAI;IAC1B,IAAI,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;MAClC,MAAM,KAAK,GAAG,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;MAC7C,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QACtD,eAAe,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACvD,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;OACnC;KACF;GACF,CAAC,CAAC;EAEH,OAAO,eAAe,CAAC;AACzB,EAAE;AA4DF,MAAM,cAAc,GAAwB;EAC1C,MAAM;EACN,uBAAuB;EACvB,aAAa;EACb,mBAAmB;EACnB,mBAAmB;EACnB,6BAA6B;EAC7B,WAAW;EACX,cAAc;EACd,eAAe;EACf,eAAe;EACf,mBAAmB;EACnB,cAAc;EACd,eAAe;EACf,cAAc;EACd,kBAAkB;EAClB,kBAAkB;EAClB,cAAc;EACd,eAAe;EACf,mBAAmB;EACnB,eAAe;EACf,aAAa;EACb,eAAe;EACf,aAAa;EACb,cAAc;EACd,mBAAmB;EACnB,YAAY;EACZ,iBAAiB;EACjB,YAAY;EACZ,WAAW;EACX,gBAAgB;EAChB,sBAAsB;EACtB,kBAAkB;EAClB,WAAW;EACX,kBAAkB;EAClB,eAAe;EACf,cAAc;EACd,eAAe;EACf,eAAe;EACf,eAAe;EACf,sBAAsB;EACtB,eAAe;EACf,eAAe;EACf,mBAAmB;EACnB,cAAc;EACd,eAAe;EACf,cAAc;EACd,WAAW;EACX,eAAe;EACf,eAAe;EACf,eAAe;EACf,gBAAgB;CACjB;;;;;","names":[],"sources":["./src/components/utils/a11y.ts"],"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 */\nexport const a11yBoolean = (value: boolean) => (value ? 'true' : 'false');\n\nexport const a11yHostAttributes = (\n hostElement: HTMLElement,\n ignoreAttributes: A11yAttributeName[] = []\n): Record<A11yAttributeName, any> => {\n const attributeObject: Record<string, any> = {};\n a11yAttributes.forEach((attr) => {\n if (hostElement.hasAttribute(attr)) {\n const value = hostElement.getAttribute(attr);\n if (value !== null && !ignoreAttributes.includes(attr)) {\n attributeObject[attr] = hostElement.getAttribute(attr);\n hostElement.removeAttribute(attr);\n }\n }\n });\n\n return attributeObject;\n};\n\ntype PartialRecord<K extends keyof any, T> = {\n [P in K]?: T;\n};\nexport type A11yAttributes = PartialRecord<A11yAttributeName, any>;\n\nexport type A11yAttributeName =\n | 'role'\n | 'aria-activedescendant'\n | 'aria-atomic'\n | 'aria-autocomplete'\n | 'aria-braillelabel'\n | 'aria-brailleroledescription'\n | 'aria-busy'\n | 'aria-checked'\n | 'aria-colcount'\n | 'aria-colindex'\n | 'aria-colindextext'\n | 'aria-colspan'\n | 'aria-controls'\n | 'aria-current'\n | 'aria-describedby'\n | 'aria-description'\n | 'aria-details'\n | 'aria-disabled'\n | 'aria-errormessage'\n | 'aria-expanded'\n | 'aria-flowto'\n | 'aria-haspopup'\n | 'aria-hidden'\n | 'aria-invalid'\n | 'aria-keyshortcuts'\n | 'aria-label'\n | 'aria-labelledby'\n | 'aria-level'\n | 'aria-live'\n | 'aria-multiline'\n | 'aria-multiselectable'\n | 'aria-orientation'\n | 'aria-owns'\n | 'aria-placeholder'\n | 'aria-posinset'\n | 'aria-pressed'\n | 'aria-readonly'\n | 'aria-relevant'\n | 'aria-required'\n | 'aria-roledescription'\n | 'aria-rowcount'\n | 'aria-rowindex'\n | 'aria-rowindextext'\n | 'aria-rowspan'\n | 'aria-selected'\n | 'aria-setsize'\n | 'aria-sort'\n | 'aria-valuemax'\n | 'aria-valuemin'\n | 'aria-valuenow'\n | 'aria-valuetext';\n\nconst a11yAttributes: A11yAttributeName[] = [\n 'role',\n 'aria-activedescendant',\n 'aria-atomic',\n 'aria-autocomplete',\n 'aria-braillelabel',\n 'aria-brailleroledescription',\n 'aria-busy',\n 'aria-checked',\n 'aria-colcount',\n 'aria-colindex',\n 'aria-colindextext',\n 'aria-colspan',\n 'aria-controls',\n 'aria-current',\n 'aria-describedby',\n 'aria-description',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-flowto',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-level',\n 'aria-live',\n 'aria-multiline',\n 'aria-multiselectable',\n 'aria-orientation',\n 'aria-owns',\n 'aria-placeholder',\n 'aria-posinset',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-relevant',\n 'aria-required',\n 'aria-roledescription',\n 'aria-rowcount',\n 'aria-rowindex',\n 'aria-rowindextext',\n 'aria-rowspan',\n 'aria-selected',\n 'aria-setsize',\n 'aria-sort',\n 'aria-valuemax',\n 'aria-valuemin',\n 'aria-valuenow',\n 'aria-valuetext',\n];\n"],"version":3}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-be499a74.js');
|
|
6
6
|
const menuService = require('./menu-service-000df68d.js');
|
|
7
|
+
const context = require('./context-0fdf2fa1.js');
|
|
7
8
|
require('./breakpoints-7ca69aa8.js');
|
|
8
9
|
require('./typed-event-f0f051da.js');
|
|
9
10
|
|
|
@@ -15,15 +16,27 @@ const ApplicationHeader = class {
|
|
|
15
16
|
this.name = undefined;
|
|
16
17
|
this.breakpoint = 'lg';
|
|
17
18
|
this.menuExpanded = false;
|
|
19
|
+
this.suppressResponsive = false;
|
|
18
20
|
}
|
|
19
21
|
componentWillLoad() {
|
|
22
|
+
context.useContextConsumer(this.hostElement, context.ApplicationLayoutContext, (ctx) => {
|
|
23
|
+
if ((ctx === null || ctx === void 0 ? void 0 : ctx.host) === 'map-navigation') {
|
|
24
|
+
this.suppressResponsive = true;
|
|
25
|
+
this.breakpoint = 'md';
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
this.breakpoint = menuService.applicationLayoutService.breakpoint;
|
|
29
|
+
});
|
|
20
30
|
this.menuDisposable = menuService.menuController.expandChange.on((show) => {
|
|
21
31
|
this.menuExpanded = show;
|
|
22
32
|
});
|
|
23
33
|
this.modeDisposable = menuService.applicationLayoutService.onChange.on((mode) => {
|
|
34
|
+
if (this.suppressResponsive) {
|
|
35
|
+
this.breakpoint = 'md';
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
24
38
|
this.breakpoint = mode;
|
|
25
39
|
});
|
|
26
|
-
this.breakpoint = menuService.applicationLayoutService.breakpoint;
|
|
27
40
|
}
|
|
28
41
|
componentDidLoad() {
|
|
29
42
|
this.attachSiemensLogoIfLoaded();
|
|
@@ -53,7 +66,7 @@ const ApplicationHeader = class {
|
|
|
53
66
|
menuService.menuController.toggle();
|
|
54
67
|
}
|
|
55
68
|
render() {
|
|
56
|
-
return (index.h(index.Host, { class: { [`breakpoint-${this.breakpoint}`]: true }, slot: "application-header" }, this.breakpoint === 'sm' ? (index.h("ix-burger-menu", { onClick: () => this.onMenuClick(), expanded: this.menuExpanded })) : null, index.h("div", { class: "logo" }, index.h("slot", { name: "logo" })), index.h("div", { class: "name" }, this.name), index.h("slot", null)));
|
|
69
|
+
return (index.h(index.Host, { class: { [`breakpoint-${this.breakpoint}`]: true }, slot: "application-header" }, this.breakpoint === 'sm' && this.suppressResponsive === false ? (index.h("ix-burger-menu", { onClick: () => this.onMenuClick(), expanded: this.menuExpanded })) : null, index.h("div", { class: "logo" }, index.h("slot", { name: "logo" })), index.h("div", { class: "name" }, this.name), index.h("slot", null)));
|
|
57
70
|
}
|
|
58
71
|
get hostElement() { return index.getElement(this); }
|
|
59
72
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"ix-application-header.entry.cjs.js","mappings":"
|
|
1
|
+
{"file":"ix-application-header.entry.cjs.js","mappings":";;;;;;;;;;AAAA,MAAM,oBAAoB,GAAG,mqBAAmqB;;MCsBnrB,iBAAiB;;;;sBAQM,IAAI;wBACd,KAAK;8BAEC,KAAK;;EAKnC,iBAAiB;IACfA,0BAAkB,CAAC,IAAI,CAAC,WAAW,EAAEC,gCAAwB,EAAE,CAAC,GAAG;MACjE,IAAI,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,MAAK,gBAAgB,EAAE;QAClC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;QAC/B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,OAAO;OACR;MAED,IAAI,CAAC,UAAU,GAAGC,oCAAwB,CAAC,UAAU,CAAC;KACvD,CAAC,CAAC;IAEH,IAAI,CAAC,cAAc,GAAGC,0BAAc,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,IAAI;MACxD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;KAC1B,CAAC,CAAC;IAEH,IAAI,CAAC,cAAc,GAAGD,oCAAwB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI;MAC9D,IAAI,IAAI,CAAC,kBAAkB,EAAE;QAC3B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,OAAO;OACR;MAED,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;KACxB,CAAC,CAAC;GACJ;EAED,gBAAgB;IACd,IAAI,CAAC,yBAAyB,EAAE,CAAC;GAClC;EAED,oBAAoB;;IAClB,MAAA,IAAI,CAAC,cAAc,0CAAE,OAAO,EAAE,CAAC;IAC/B,MAAA,IAAI,CAAC,cAAc,0CAAE,OAAO,EAAE,CAAC;GAChC;EAEO,aAAa;IACnB,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,aAAa,CAC3D,mBAAmB,CACD,CAAC;IACrB,MAAM,KAAK,GAAG,WAAW,CAAC,aAAa,CAAC;MACtC,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;GAC3B;EAEO,MAAM,yBAAyB;IACrC,MAAM,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAC3D,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC9D,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE;MACzB,IAAI,CAAC,WAAW,CAAC,UAAU;SACxB,aAAa,CAAC,OAAO,CAAC;SACtB,WAAW,CAAC,WAAW,CAAC,CAAC;KAC7B;GACF;EAEO,MAAM,WAAW;IACvBC,0BAAc,CAAC,MAAM,EAAE,CAAC;GACzB;EAED,MAAM;IACJ,QACEC,QAACC,UAAI,IACH,KAAK,EAAE,EAAE,CAAC,cAAc,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI,EAAE,EAClD,IAAI,EAAC,oBAAoB,IAExB,IAAI,CAAC,UAAU,KAAK,IAAI,IAAI,IAAI,CAAC,kBAAkB,KAAK,KAAK,IAC5DD,4BACE,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EACjC,QAAQ,EAAE,IAAI,CAAC,YAAY,GACX,IAChB,IAAI,EACRA,iBAAK,KAAK,EAAC,MAAM,IACfA,kBAAM,IAAI,EAAC,MAAM,GAAQ,CACrB,EACNA,iBAAK,KAAK,EAAC,MAAM,IAAE,IAAI,CAAC,IAAI,CAAO,EACnCA,qBAAa,CACR,EACP;GACH;;;;;;;","names":["useContextConsumer","ApplicationLayoutContext","applicationLayoutService","menuController","h","Host"],"sources":["./src/components/application-header/application-header.scss?tag=ix-application-header&encapsulation=shadow","./src/components/application-header/application-header.tsx"],"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\n:host {\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n height: 2.75rem;\n min-height: 2.75rem;\n padding-left: 1rem;\n\n color: var(--theme-app-header--color);\n background-color: var(--theme-app-header--background);\n\n border-bottom: var(--theme-app-header--border-width) solid\n var(--theme-app-header--border-color);\n\n z-index: var(--theme-z-index-fixed);\n\n .name {\n margin-left: 2.5rem;\n margin-right: 2.5rem;\n color: var(--theme-app-header--color);\n }\n\n .logo {\n display: inline-flex;\n align-items: center;\n position: relative;\n height: 32px;\n overflow: hidden;\n line-height: 0rem;\n color: var(--theme-app-header-logo--color);\n }\n}\n\n:host(.breakpoint-sm) {\n padding-left: 0.5rem;\n\n .logo {\n margin-left: 0.5rem;\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, Element, h, Host, Prop, State } from '@stencil/core';\nimport { applicationLayoutService } from '../utils/application-layout';\nimport { ApplicationLayoutContext } from '../utils/application-layout/context';\nimport { Breakpoint } from '../utils/breakpoints';\nimport { useContextConsumer } from '../utils/context';\nimport { menuController } from '../utils/menu-service/menu-service';\nimport { Disposable } from '../utils/typed-event';\n\n@Component({\n tag: 'ix-application-header',\n styleUrl: 'application-header.scss',\n shadow: true,\n})\nexport class ApplicationHeader {\n @Element() hostElement!: HTMLIxApplicationHeaderElement;\n\n /**\n * Application name\n */\n @Prop() name: string;\n\n @State() breakpoint: Breakpoint = 'lg';\n @State() menuExpanded = false;\n\n @State() suppressResponsive = false;\n\n private menuDisposable?: Disposable;\n private modeDisposable?: Disposable;\n\n componentWillLoad() {\n useContextConsumer(this.hostElement, ApplicationLayoutContext, (ctx) => {\n if (ctx?.host === 'map-navigation') {\n this.suppressResponsive = true;\n this.breakpoint = 'md';\n return;\n }\n\n this.breakpoint = applicationLayoutService.breakpoint;\n });\n\n this.menuDisposable = menuController.expandChange.on((show) => {\n this.menuExpanded = show;\n });\n\n this.modeDisposable = applicationLayoutService.onChange.on((mode) => {\n if (this.suppressResponsive) {\n this.breakpoint = 'md';\n return;\n }\n\n this.breakpoint = mode;\n });\n }\n\n componentDidLoad() {\n this.attachSiemensLogoIfLoaded();\n }\n\n disconnectedCallback() {\n this.menuDisposable?.dispose();\n this.modeDisposable?.dispose();\n }\n\n private isLogoSlotted() {\n const slotElement = this.hostElement.shadowRoot.querySelector(\n 'slot[name=\"logo\"]'\n ) as HTMLSlotElement;\n const nodes = slotElement.assignedNodes({\n flatten: true,\n });\n\n return nodes.length !== 0;\n }\n\n private async attachSiemensLogoIfLoaded() {\n await window.customElements.whenDefined('ix-siemens-logo');\n const logoElement = document.createElement('ix-siemens-logo');\n if (!this.isLogoSlotted()) {\n this.hostElement.shadowRoot\n .querySelector('.logo')\n .appendChild(logoElement);\n }\n }\n\n private async onMenuClick() {\n menuController.toggle();\n }\n\n render() {\n return (\n <Host\n class={{ [`breakpoint-${this.breakpoint}`]: true }}\n slot=\"application-header\"\n >\n {this.breakpoint === 'sm' && this.suppressResponsive === false ? (\n <ix-burger-menu\n onClick={() => this.onMenuClick()}\n expanded={this.menuExpanded}\n ></ix-burger-menu>\n ) : null}\n <div class=\"logo\">\n <slot name=\"logo\"></slot>\n </div>\n <div class=\"name\">{this.name}</div>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-be499a74.js');
|
|
6
6
|
const anime_es = require('./anime.es-8822f296.js');
|
|
7
|
-
const a11y = require('./a11y-
|
|
7
|
+
const a11y = require('./a11y-7e1c1b86.js');
|
|
8
8
|
|
|
9
9
|
const blindCss = ":host{display:flex;flex-direction:column;border-radius:var(--theme-blind--border-radius);overflow:hidden}:host .blind-header{all:unset;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;min-height:3rem;height:3rem;border:solid var(--theme-blind--border-thickness) transparent;border-radius:var(--theme-blind--border-radius) var(--theme-blind--border-radius) 0 0;padding-right:0.5rem;cursor:pointer;z-index:1}:host .blind-header .collapse-icon{padding:0.25rem 0.5rem}:host .blind-header .blind-header-title-col{flex-grow:1;flex-basis:0;display:inline-flex;align-items:center;min-width:0}:host .blind-header ix-typography{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .blind-header .blind-header-title-col:not(:first-of-type){justify-content:flex-end}:host .blind-header .blind-header-title-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-padding-end:0.5rem;padding-inline-end:0.5rem}:host .blind-header .blind-header-title-sublabel{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:0.5rem}:host .blind-header .blind-header-title,:host .blind-header .blind-header-title-basic{display:flex;align-items:center;flex-grow:1;height:100%;min-width:0}:host .blind-header .blind-header-title-basic ix-icon{-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}:host .blind-header:not(.disabled):not(:disabled):focus-visible{border-color:var(--theme-color-focus-bdr);outline:none}:host .blind-header .blind-header-labels{display:inline-flex;flex-grow:1;min-width:0}:host .blind-content{display:block;padding:1rem;transition-property:padding;transition-duration:150ms;transition-timing-function:ease-in}:host .blind-content.hide{max-height:0;padding-top:0px;padding-bottom:0px}:host(.blind-alarm){background-color:var(--theme-blind-base--background)}:host(.blind-alarm) .blind-header{background-color:var(--theme-color-alarm)}:host(.blind-alarm) .blind-header .blind-header-title-label,:host(.blind-alarm) .blind-header .blind-header-title-sublabel{color:var(--theme-color-alarm--contrast)}:host(.blind-alarm) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-alarm) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-alarm--hover)}:host(.blind-alarm) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-alarm) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-alarm) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-alarm--active)}:host(.blind-critical){background-color:var(--theme-blind-base--background)}:host(.blind-critical) .blind-header{background-color:var(--theme-color-critical)}:host(.blind-critical) .blind-header .blind-header-title-label,:host(.blind-critical) .blind-header .blind-header-title-sublabel{color:var(--theme-color-critical--contrast)}:host(.blind-critical) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-critical) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-critical--hover)}:host(.blind-critical) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-critical) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-critical) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-critical--active)}:host(.blind-info){background-color:var(--theme-blind-base--background)}:host(.blind-info) .blind-header{background-color:var(--theme-color-info)}:host(.blind-info) .blind-header .blind-header-title-label,:host(.blind-info) .blind-header .blind-header-title-sublabel{color:var(--theme-color-info--contrast)}:host(.blind-info) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-info) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-info--hover)}:host(.blind-info) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-info) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-info) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-info--active)}:host(.blind-insight){background-color:var(--theme-blind-base--background)}:host(.blind-insight) .blind-header{background-color:var(--theme-color-insight)}:host(.blind-insight) .blind-header .blind-header-title-label{color:var(--theme-color-std-text)}:host(.blind-insight) .blind-header .blind-header-title-sublabel{color:var(--theme-color-soft-text)}:host(.blind-insight) .blind-header:not(.disabled):not(:disabled).hover,:host(.blind-insight) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-ghost--background--hover)}:host(.blind-insight) .blind-header:not(.disabled):not(:disabled).active,:host(.blind-insight) .blind-header:not(.disabled):not(:disabled):active{background-color:var(--theme-ghost--background--active)}:host(.blind-neutral){background-color:var(--theme-blind-base--background)}:host(.blind-neutral) .blind-header{background-color:var(--theme-color-neutral)}:host(.blind-neutral) .blind-header .blind-header-title-label,:host(.blind-neutral) .blind-header .blind-header-title-sublabel{color:var(--theme-color-neutral--contrast)}:host(.blind-neutral) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-neutral) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-neutral--hover)}:host(.blind-neutral) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-neutral) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-neutral) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-neutral--active)}:host(.blind-notification){background-color:var(--theme-blind-base--background)}:host(.blind-notification) .blind-header{background-color:var(--theme-color-notification)}:host(.blind-notification) .blind-header .blind-header-title-label,:host(.blind-notification) .blind-header .blind-header-title-sublabel{color:var(--theme-color-notification--contrast)}:host(.blind-notification) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-notification) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-notification--hover)}:host(.blind-notification) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-notification) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-notification) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-notification--active)}:host(.blind-success){background-color:var(--theme-blind-base--background)}:host(.blind-success) .blind-header{background-color:var(--theme-color-success)}:host(.blind-success) .blind-header .blind-header-title-label,:host(.blind-success) .blind-header .blind-header-title-sublabel{color:var(--theme-color-success--contrast)}:host(.blind-success) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-success) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-success--hover)}:host(.blind-success) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-success) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-success) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-success--active)}:host(.blind-warning){background-color:var(--theme-blind-base--background)}:host(.blind-warning) .blind-header{background-color:var(--theme-color-warning)}:host(.blind-warning) .blind-header .blind-header-title-label,:host(.blind-warning) .blind-header .blind-header-title-sublabel{color:var(--theme-color-warning--contrast)}:host(.blind-warning) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-warning) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-warning--hover)}:host(.blind-warning) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-warning) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-warning) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-warning--active)}:host(.blind-primary){background-color:var(--theme-blind-base--background)}:host(.blind-primary) .blind-header{background-color:var(--theme-color-primary)}:host(.blind-primary) .blind-header .blind-header-title-label,:host(.blind-primary) .blind-header .blind-header-title-sublabel{color:var(--theme-color-primary--contrast)}:host(.blind-primary) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-primary) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-primary--hover)}:host(.blind-primary) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-primary) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-primary) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-primary--active)}:host(.blind-outline){border:solid var(--theme-blind--border-thickness) var(--theme-blind-base--border-color);border-color:var(--theme-color-soft-bdr)}:host(.blind-outline) .blind-header{background-color:var(--theme-color-ghost)}:host(.blind-outline) .blind-header .blind-header-title-label{color:var(--theme-color-std-text)}:host(.blind-outline) .blind-header .blind-header-title-sublabel{color:var(--theme-color-soft-text)}:host(.blind-outline) .blind-header:not(.disabled):not(:disabled).hover,:host(.blind-outline) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-ghost--background--hover)}:host(.blind-outline) .blind-header:not(.disabled):not(:disabled).active,:host(.blind-outline) .blind-header:not(.disabled):not(:disabled):active{background-color:var(--theme-ghost--background--active)}";
|
|
10
10
|
|