@siemens/ix 2.0.0 → 2.0.1
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/components/a11y.js +79 -0
- 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 +95 -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 +92 -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 +346 -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 +151 -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 +130 -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 +156 -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/package.json +1 -1
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { a as anime } from './anime.es.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './icon-button.js';
|
|
4
|
+
import { d as defineCustomElement$1 } from './spinner.js';
|
|
5
|
+
|
|
6
|
+
const mapNavigationOverlayCss = ".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)}.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)}.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)}.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)}.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)}.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)}.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)}.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)}.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)}.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)}.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)}.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)}.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)}.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)}a{color:var(--theme-color-primary)}:host{position:absolute;width:100%;height:100%;z-index:2;top:0;left:0;background-color:var(--theme-overlay--background)}: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 .overlay-header{display:flex;position:relative;justify-content:flex-start;align-items:center;height:3.5rem;background-color:var(--theme-overlay-header--background)}:host .overlay-header-content{display:flex;align-items:center;min-width:0}:host .overlay-header-content ix-icon{-webkit-margin-start:1rem;margin-inline-start:1rem;color:var(--theme-overlay-header--color)}:host .overlay-header-content .overlay-header-title{-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);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--theme-overlay-header--color);-webkit-margin-start:1rem;margin-inline-start:1rem}:host .color-indicator{display:inline-block;position:relative;width:0.5rem;height:100%;background-color:var(--theme-color-neutral)}:host .overlay-close{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:1rem;margin-inline-end:1rem}:host .d-none{display:none}:host(.d-none){display:none}";
|
|
7
|
+
|
|
8
|
+
const MapNavigationOverlay = /*@__PURE__*/ proxyCustomElement(class MapNavigationOverlay extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.closeClick = createEvent(this, "closeClick", 7);
|
|
14
|
+
this.name = undefined;
|
|
15
|
+
this.icon = undefined;
|
|
16
|
+
this.color = undefined;
|
|
17
|
+
}
|
|
18
|
+
componentWillLoad() {
|
|
19
|
+
anime({
|
|
20
|
+
targets: this.hostElement,
|
|
21
|
+
duration: MapNavigationOverlay.slowTime,
|
|
22
|
+
backdropFilter: [0, 'blur(1rem)'],
|
|
23
|
+
translateX: ['-4rem', 0],
|
|
24
|
+
opacity: [0, 1],
|
|
25
|
+
easing: 'easeOutSine',
|
|
26
|
+
begin: () => {
|
|
27
|
+
this.hostElement.classList.remove('d-none');
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
closeOverlay() {
|
|
32
|
+
anime({
|
|
33
|
+
targets: this.hostElement,
|
|
34
|
+
duration: MapNavigationOverlay.slowTime,
|
|
35
|
+
backdropFilter: ['blur(1rem)', 0],
|
|
36
|
+
translateX: [0, '-4rem'],
|
|
37
|
+
opacity: [1, 0],
|
|
38
|
+
easing: 'easeInSine',
|
|
39
|
+
complete: () => {
|
|
40
|
+
this.closeClick.emit();
|
|
41
|
+
this.hostElement.classList.add('d-none');
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
return (h(Host, null, h("div", { class: "overlay-header" }, h("div", { class: {
|
|
47
|
+
'color-indicator': true,
|
|
48
|
+
'd-none': this.color === 'undefined' || this.color === undefined,
|
|
49
|
+
}, style: {
|
|
50
|
+
'background-color': this.color
|
|
51
|
+
? `var(--theme-${this.color})`
|
|
52
|
+
: '',
|
|
53
|
+
} }), h("div", { class: "overlay-header-content" }, h("ix-icon", { size: "32", name: this.icon }), h("span", { class: "overlay-header-title", title: this.name }, this.name)), h("ix-icon-button", { class: "overlay-close", ghost: true, icon: 'close', size: "24", onClick: () => this.closeOverlay() })), h("slot", null)));
|
|
54
|
+
}
|
|
55
|
+
get hostElement() { return this; }
|
|
56
|
+
static get style() { return mapNavigationOverlayCss; }
|
|
57
|
+
}, [1, "ix-map-navigation-overlay", {
|
|
58
|
+
"name": [1],
|
|
59
|
+
"icon": [1],
|
|
60
|
+
"color": [1]
|
|
61
|
+
}]);
|
|
62
|
+
MapNavigationOverlay.slowTime = 500;
|
|
63
|
+
function defineCustomElement() {
|
|
64
|
+
if (typeof customElements === "undefined") {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const components = ["ix-map-navigation-overlay", "ix-icon-button", "ix-spinner"];
|
|
68
|
+
components.forEach(tagName => { switch (tagName) {
|
|
69
|
+
case "ix-map-navigation-overlay":
|
|
70
|
+
if (!customElements.get(tagName)) {
|
|
71
|
+
customElements.define(tagName, MapNavigationOverlay);
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
case "ix-icon-button":
|
|
75
|
+
if (!customElements.get(tagName)) {
|
|
76
|
+
defineCustomElement$2();
|
|
77
|
+
}
|
|
78
|
+
break;
|
|
79
|
+
case "ix-spinner":
|
|
80
|
+
if (!customElements.get(tagName)) {
|
|
81
|
+
defineCustomElement$1();
|
|
82
|
+
}
|
|
83
|
+
break;
|
|
84
|
+
} });
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { MapNavigationOverlay as M, defineCustomElement as d };
|
|
88
|
+
|
|
89
|
+
//# sourceMappingURL=map-navigation-overlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"map-navigation-overlay.js","mappings":";;;;;AAAA,MAAM,uBAAuB,GAAG,unJAAunJ;;MCyB1oJ,oBAAoB;;;;;;;;;;EAyB/B,iBAAiB;IACf,KAAK,CAAC;MACJ,OAAO,EAAE,IAAI,CAAC,WAAW;MACzB,QAAQ,EAAE,oBAAoB,CAAC,QAAQ;MACvC,cAAc,EAAE,CAAC,CAAC,EAAE,YAAY,CAAC;MACjC,UAAU,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;MACxB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;MACf,MAAM,EAAE,aAAa;MACrB,KAAK,EAAE;QACL,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;OAC7C;KACF,CAAC,CAAC;GACJ;EAEO,YAAY;IAClB,KAAK,CAAC;MACJ,OAAO,EAAE,IAAI,CAAC,WAAW;MACzB,QAAQ,EAAE,oBAAoB,CAAC,QAAQ;MACvC,cAAc,EAAE,CAAC,YAAY,EAAE,CAAC,CAAC;MACjC,UAAU,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC;MACxB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;MACf,MAAM,EAAE,YAAY;MACpB,QAAQ,EAAE;QACR,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QACvB,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;OAC1C;KACF,CAAC,CAAC;GACJ;EAED,MAAM;IACJ,QACE,EAAC,IAAI,QACH,WAAK,KAAK,EAAC,gBAAgB,IACzB,WACE,KAAK,EAAE;QACL,iBAAiB,EAAE,IAAI;QACvB,QAAQ,EAAE,IAAI,CAAC,KAAK,KAAK,WAAW,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;OACjE,EACD,KAAK,EAAE;QACL,kBAAkB,EAAE,IAAI,CAAC,KAAK;YAC1B,eAAe,IAAI,CAAC,KAAK,GAAG;YAC5B,EAAE;OACP,GACI,EACP,WAAK,KAAK,EAAC,wBAAwB,IACjC,eAAS,IAAI,EAAC,IAAI,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAY,EAC9C,YAAM,KAAK,EAAC,sBAAsB,EAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAChD,IAAI,CAAC,IAAI,CACL,CACH,EACN,sBACE,KAAK,EAAC,eAAe,EACrB,KAAK,QACL,IAAI,EAAE,OAAO,EACb,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,GAClB,CACd,EAEN,eAAa,CACR,EACP;GACH;;;;;;;;AAtFuB,6BAAQ,GAAG,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/map-navigation-overlay/map-navigation-overlay.scss?tag=ix-map-navigation-overlay&encapsulation=shadow","./src/components/map-navigation-overlay/map-navigation-overlay.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@import 'mixins/shadow-dom/component';\n@import 'common-variables';\n@import 'legacy/fonts';\n@import 'mixins/text-truncation';\n\n:host {\n @include ix-component;\n\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n top: 0;\n left: 0;\n\n background-color: var(--theme-overlay--background);\n\n .overlay-header {\n display: flex;\n position: relative;\n justify-content: flex-start;\n align-items: center;\n height: 3.5rem;\n\n background-color: var(--theme-overlay-header--background);\n }\n\n .overlay-header-content {\n display: flex;\n align-items: center;\n min-width: 0;\n\n ix-icon {\n margin-inline-start: $default-space;\n color: var(--theme-overlay-header--color);\n }\n\n .overlay-header-title {\n @include text-h2;\n @include ellipsis;\n color: var(--theme-overlay-header--color);\n margin-inline-start: $default-space;\n }\n }\n\n .color-indicator {\n display: inline-block;\n position: relative;\n width: $small-space;\n height: 100%;\n background-color: var(--theme-color-neutral);\n }\n\n .overlay-close {\n margin-inline-start: auto;\n margin-inline-end: $default-space;\n }\n\n .d-none {\n display: none;\n }\n}\n\n:host(.d-none) {\n display: none;\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 {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n} from '@stencil/core';\nimport anime from 'animejs';\n\n@Component({\n tag: 'ix-map-navigation-overlay',\n styleUrl: 'map-navigation-overlay.scss',\n shadow: true,\n})\nexport class MapNavigationOverlay {\n private static readonly slowTime = 500;\n\n @Element() hostElement: HTMLIxMapNavigationOverlayElement;\n\n /**\n * Title of overlay\n */\n @Prop() name: string;\n\n /**\n * Icon of overlay\n */\n @Prop() icon: string;\n\n /**\n * Color of icon\n */\n @Prop() color: string;\n\n /**\n * Event closed\n */\n @Event() closeClick: EventEmitter;\n\n componentWillLoad() {\n anime({\n targets: this.hostElement,\n duration: MapNavigationOverlay.slowTime,\n backdropFilter: [0, 'blur(1rem)'],\n translateX: ['-4rem', 0],\n opacity: [0, 1],\n easing: 'easeOutSine',\n begin: () => {\n this.hostElement.classList.remove('d-none');\n },\n });\n }\n\n private closeOverlay() {\n anime({\n targets: this.hostElement,\n duration: MapNavigationOverlay.slowTime,\n backdropFilter: ['blur(1rem)', 0],\n translateX: [0, '-4rem'],\n opacity: [1, 0],\n easing: 'easeInSine',\n complete: () => {\n this.closeClick.emit();\n this.hostElement.classList.add('d-none');\n },\n });\n }\n\n render() {\n return (\n <Host>\n <div class=\"overlay-header\">\n <div\n class={{\n 'color-indicator': true,\n 'd-none': this.color === 'undefined' || this.color === undefined,\n }}\n style={{\n 'background-color': this.color\n ? `var(--theme-${this.color})`\n : '',\n }}\n ></div>\n <div class=\"overlay-header-content\">\n <ix-icon size=\"32\" name={this.icon}></ix-icon>\n <span class=\"overlay-header-title\" title={this.name}>\n {this.name}\n </span>\n </div>\n <ix-icon-button\n class=\"overlay-close\"\n ghost\n icon={'close'}\n size=\"24\"\n onClick={() => this.closeOverlay()}\n ></ix-icon-button>\n </div>\n\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$1 } from './dropdown-item.js';
|
|
3
|
+
|
|
4
|
+
const menuAvatarItemCss = ":host{display:block}: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}";
|
|
5
|
+
|
|
6
|
+
const MenuAvatarItem = /*@__PURE__*/ proxyCustomElement(class MenuAvatarItem extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
this.itemClick = createEvent(this, "itemClick", 7);
|
|
12
|
+
this.icon = undefined;
|
|
13
|
+
this.label = undefined;
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h("ix-dropdown-item", { icon: this.icon, label: this.label, onClick: (e) => this.itemClick.emit(e) }));
|
|
17
|
+
}
|
|
18
|
+
get hostElement() { return this; }
|
|
19
|
+
static get style() { return menuAvatarItemCss; }
|
|
20
|
+
}, [1, "ix-menu-avatar-item", {
|
|
21
|
+
"icon": [1],
|
|
22
|
+
"label": [1]
|
|
23
|
+
}]);
|
|
24
|
+
function defineCustomElement() {
|
|
25
|
+
if (typeof customElements === "undefined") {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const components = ["ix-menu-avatar-item", "ix-dropdown-item"];
|
|
29
|
+
components.forEach(tagName => { switch (tagName) {
|
|
30
|
+
case "ix-menu-avatar-item":
|
|
31
|
+
if (!customElements.get(tagName)) {
|
|
32
|
+
customElements.define(tagName, MenuAvatarItem);
|
|
33
|
+
}
|
|
34
|
+
break;
|
|
35
|
+
case "ix-dropdown-item":
|
|
36
|
+
if (!customElements.get(tagName)) {
|
|
37
|
+
defineCustomElement$1();
|
|
38
|
+
}
|
|
39
|
+
break;
|
|
40
|
+
} });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { MenuAvatarItem as M, defineCustomElement as d };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=menu-avatar-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"menu-avatar-item.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,knBAAknB;;MCuB/nB,cAAc;;;;;;;;;EAkBzB,MAAM;IACJ,QACE,wBACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,GACpB,EACpB;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/menu-avatar-item/menu-avatar-item.scss?tag=ix-menu-avatar-item&encapsulation=shadow","./src/components/menu-avatar-item/menu-avatar-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@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n display: block;\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 {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n} from '@stencil/core';\n\n@Component({\n tag: 'ix-menu-avatar-item',\n styleUrl: 'menu-avatar-item.scss',\n shadow: true,\n})\nexport class MenuAvatarItem {\n /**\n * Avatar dropdown icon\n */\n @Prop() icon: string;\n\n /**\n * Avatar dropdown label\n */\n @Prop() label: string;\n\n /**\n * Avatar dropdown item clicked\n */\n @Event() itemClick: EventEmitter<MouseEvent>;\n\n @Element() hostElement: HTMLIxMenuAvatarItemElement;\n\n render() {\n return (\n <ix-dropdown-item\n icon={this.icon}\n label={this.label}\n onClick={(e) => this.itemClick.emit(e)}\n ></ix-dropdown-item>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { c as createMutationObserver } from './mutation-observer.js';
|
|
3
|
+
|
|
4
|
+
const menuItemCss = ":host{position:relative;display:block;cursor:pointer;height:var(--ix-menu-item-height, 3rem);min-height:var(--ix-menu-item-height, 3rem);max-height:var(--ix-menu-item-height, 3rem)}:host .tab{all:unset;box-sizing:border-box;display:flex;position:relative;align-items:center;height:var(--ix-menu-item-height, 3rem);width:100%;z-index:500;padding-left:0.875rem}:host .tab:not(.disabled):not(:disabled).hover,:host .tab:not(.disabled):not(:disabled):hover{background-color:var(--theme-ghost--background--hover)}:host .tab:not(.disabled):not(:disabled).active,:host .tab:not(.disabled):not(:disabled):active{background-color:var(--theme-ghost--background--active)}:host .tab-icon{color:var(--theme-nav-item-primary-icon--color);position:relative}:host .tab:focus-visible{outline:1px solid var(--theme-color-focus-bdr);outline-offset:-1px}:host .tab:not(:last-child){margin-bottom:0.5rem}:host .notification{display:inline-flex;position:absolute;top:0.25rem;left:1.75rem}:host .notification .pill{display:inline-flex;justify-content:center;align-items:center;height:0.5rem;min-width:1rem;position:relative;border-radius:6.25rem;background-color:var(--theme-color-primary);border-radius:6.25rem;font-size:0.75rem;font-weight:bold;line-height:1;font-family:Siemens Sans, Arial, sans-serif;color:var(--theme-color-primary--contrast);padding:0.25rem}:host .tab-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--theme-nav-item-primary--color);margin:0 1.25rem;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}:host(.active) .tab,:host(.selected) .tab{background-color:var(--theme-nav-item-primary--background--selected)}:host(.active) .tab::before,:host(.selected) .tab::before{content:\"\";background-color:var(--theme-nav-item-primary--border-color--selected);height:var(--ix-menu-item-height, 3rem);width:0.25rem;left:0;position:absolute}:host(.active) .tab>.glyph,:host(.selected) .tab>.glyph{color:var(--theme-nav-item-primary-icon--color--selected)}:host(.disabled){color:var(--theme-color-weak-text);pointer-events:none;cursor:default}:host(.disabled) .tab>.tab-icon{color:var(--theme-color-weak-text)}:host(.disabled) .tab-text{color:var(--theme-color-weak-text)}:host(.bottom-tab),:host([slot=bottom]){min-height:2.25rem;height:2.25rem;max-height:2.25rem}:host(.bottom-tab) .tab,:host([slot=bottom]) .tab{height:2.25rem}:host(.bottom-tab) .tab::before,:host([slot=bottom]) .tab::before{height:2.25rem;background-color:transparent}:host(.bottom-tab).active:hover,:host(.bottom-tab).selected:hover,:host([slot=bottom]).active:hover,:host([slot=bottom]).selected:hover{background-color:var(--theme-nav-item-secondary--background--selected)}:host(.bottom-tab).active:active,:host(.bottom-tab).selected:active,:host([slot=bottom]).active:active,:host([slot=bottom]).selected:active{background-color:var(--theme-nav-item-secondary--background--selected)}:host(.bottom-tab.active) .tab,:host(.bottom-tab.selected) .tab,:host(.active[slot=bottom]) .tab,:host(.selected[slot=bottom]) .tab{background-color:var(--theme-nav-item-secondary--background--selected)}:host(.tab-nested) .tab::before{display:none}";
|
|
5
|
+
|
|
6
|
+
const MenuItem = /*@__PURE__*/ proxyCustomElement(class MenuItem extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
this.isHostedInsideCategory = false;
|
|
12
|
+
this.home = false;
|
|
13
|
+
this.bottom = false;
|
|
14
|
+
this.tabIcon = 'document';
|
|
15
|
+
this.icon = undefined;
|
|
16
|
+
this.notifications = undefined;
|
|
17
|
+
this.active = undefined;
|
|
18
|
+
this.disabled = undefined;
|
|
19
|
+
this.title = undefined;
|
|
20
|
+
}
|
|
21
|
+
componentWillLoad() {
|
|
22
|
+
this.isHostedInsideCategory =
|
|
23
|
+
!!this.hostElement.closest('ix-menu-category');
|
|
24
|
+
}
|
|
25
|
+
componentWillRender() {
|
|
26
|
+
this.title = this.hostElement.innerText;
|
|
27
|
+
}
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
this.observer = createMutationObserver(() => {
|
|
30
|
+
this.title = this.hostElement.innerText;
|
|
31
|
+
});
|
|
32
|
+
this.observer.observe(this.hostElement, {
|
|
33
|
+
subtree: true,
|
|
34
|
+
childList: true,
|
|
35
|
+
characterData: true,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
disconnectedCallback() {
|
|
39
|
+
if (this.observer) {
|
|
40
|
+
this.observer.disconnect();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
var _a;
|
|
45
|
+
let extendedAttributes = {};
|
|
46
|
+
if (this.home) {
|
|
47
|
+
extendedAttributes = {
|
|
48
|
+
slot: 'home',
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
if (this.bottom) {
|
|
52
|
+
extendedAttributes = {
|
|
53
|
+
slot: 'bottom',
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
return (h(Host, Object.assign({ class: {
|
|
57
|
+
disabled: this.disabled,
|
|
58
|
+
'home-tab': this.home,
|
|
59
|
+
'bottom-tab': this.bottom,
|
|
60
|
+
active: this.active,
|
|
61
|
+
'tab-nested': this.isHostedInsideCategory,
|
|
62
|
+
} }, extendedAttributes), h("button", { class: "tab", title: this.title, tabIndex: this.disabled ? -1 : 0, role: "listitem" }, h("ix-icon", { class: 'tab-icon', name: (_a = this.icon) !== null && _a !== void 0 ? _a : this.tabIcon }), h("div", { class: "notification" }, this.notifications ? (h("div", { class: "pill" }, this.notifications)) : null), h("span", { class: "tab-text text-default" }, h("slot", null)))));
|
|
63
|
+
}
|
|
64
|
+
get hostElement() { return this; }
|
|
65
|
+
static get style() { return menuItemCss; }
|
|
66
|
+
}, [1, "ix-menu-item", {
|
|
67
|
+
"home": [4],
|
|
68
|
+
"bottom": [4],
|
|
69
|
+
"tabIcon": [1, "tab-icon"],
|
|
70
|
+
"icon": [1],
|
|
71
|
+
"notifications": [2],
|
|
72
|
+
"active": [4],
|
|
73
|
+
"disabled": [4],
|
|
74
|
+
"title": [32]
|
|
75
|
+
}]);
|
|
76
|
+
function defineCustomElement() {
|
|
77
|
+
if (typeof customElements === "undefined") {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const components = ["ix-menu-item"];
|
|
81
|
+
components.forEach(tagName => { switch (tagName) {
|
|
82
|
+
case "ix-menu-item":
|
|
83
|
+
if (!customElements.get(tagName)) {
|
|
84
|
+
customElements.define(tagName, MenuItem);
|
|
85
|
+
}
|
|
86
|
+
break;
|
|
87
|
+
} });
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export { MenuItem as M, defineCustomElement as d };
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=menu-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"menu-item.js","mappings":";;;AAAA,MAAM,WAAW,GAAG,4kGAA4kG;;MCoBnlG,QAAQ;;;;;IA6CX,2BAAsB,GAAG,KAAK,CAAC;gBAzCxB,KAAK;kBAOH,KAAK;mBAOJ,UAAU;;;;;;;EA6B5B,iBAAiB;IACf,IAAI,CAAC,sBAAsB;MACzB,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;GAClD;EAED,mBAAmB;IACjB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC;GACzC;EAED,iBAAiB;IACf,IAAI,CAAC,QAAQ,GAAG,sBAAsB,CAAC;MACrC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC;KACzC,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE;MACtC,OAAO,EAAE,IAAI;MACb,SAAS,EAAE,IAAI;MACf,aAAa,EAAE,IAAI;KACpB,CAAC,CAAC;GACJ;EAED,oBAAoB;IAClB,IAAI,IAAI,CAAC,QAAQ,EAAE;MACjB,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;KAC5B;GACF;EAED,MAAM;;IACJ,IAAI,kBAAkB,GAAG,EAAE,CAAC;IAC5B,IAAI,IAAI,CAAC,IAAI,EAAE;MACb,kBAAkB,GAAG;QACnB,IAAI,EAAE,MAAM;OACb,CAAC;KACH;IAED,IAAI,IAAI,CAAC,MAAM,EAAE;MACf,kBAAkB,GAAG;QACnB,IAAI,EAAE,QAAQ;OACf,CAAC;KACH;IACD,QACE,EAAC,IAAI,kBACH,KAAK,EAAE;QACL,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,UAAU,EAAE,IAAI,CAAC,IAAI;QACrB,YAAY,EAAE,IAAI,CAAC,MAAM;QACzB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,YAAY,EAAE,IAAI,CAAC,sBAAsB;OAC1C,IACG,kBAAkB,GAEtB,cACE,KAAK,EAAC,KAAK,EACX,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,EAChC,IAAI,EAAC,UAAU,IAEf,eACE,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,MAAA,IAAI,CAAC,IAAI,mCAAI,IAAI,CAAC,OAAO,GACtB,EACX,WAAK,KAAK,EAAC,cAAc,IACtB,IAAI,CAAC,aAAa,IACjB,WAAK,KAAK,EAAC,MAAM,IAAE,IAAI,CAAC,aAAa,CAAO,IAC1C,IAAI,CACJ,EACN,YAAM,KAAK,EAAC,uBAAuB,IACjC,eAAa,CACR,CACA,CACJ,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/menu-item/menu-item.scss?tag=ix-menu-item&encapsulation=shadow","./src/components/menu-item/menu-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/hover';\n@import 'mixins/text-truncation';\n\n$menuItemHeight: 3rem;\n$menuItemPadding: 0.875rem;\n\n:host {\n position: relative;\n display: block;\n cursor: pointer;\n\n height: var(--ix-menu-item-height, $menuItemHeight);\n min-height: var(--ix-menu-item-height, $menuItemHeight);\n max-height: var(--ix-menu-item-height, $menuItemHeight);\n\n .tab {\n all: unset;\n box-sizing: border-box;\n display: flex;\n position: relative;\n align-items: center;\n height: var(--ix-menu-item-height, $menuItemHeight);\n width: calc(100%);\n z-index: 500;\n padding-left: $menuItemPadding;\n\n @include ghost-hover-pressed;\n }\n\n .tab-icon {\n color: var(--theme-nav-item-primary-icon--color);\n position: relative;\n }\n\n .tab:focus-visible {\n outline: 1px solid var(--theme-color-focus-bdr);\n outline-offset: -1px;\n }\n\n .tab:not(:last-child) {\n margin-bottom: $small-space;\n }\n\n .notification {\n display: inline-flex;\n position: absolute;\n top: 0.25rem;\n left: 1.75rem;\n\n .pill {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n height: 0.5rem;\n min-width: 1rem;\n position: relative;\n border-radius: 6.25rem;\n background-color: var(--theme-color-primary);\n border-radius: 6.25rem;\n font-size: 0.75rem;\n font-weight: bold;\n line-height: 1;\n font-family: Siemens Sans, Arial, sans-serif;\n color: var(--theme-color-primary--contrast);\n padding: $tiny-space;\n }\n }\n\n .tab-text {\n @include ellipsis;\n color: var(--theme-nav-item-primary--color);\n margin: 0 1.25rem;\n user-select: none;\n width: 100%;\n }\n}\n\n:host(.active),\n:host(.selected) {\n .tab {\n background-color: var(--theme-nav-item-primary--background--selected);\n }\n\n .tab::before {\n content: '';\n background-color: var(--theme-nav-item-primary--border-color--selected);\n height: var(--ix-menu-item-height, $menuItemHeight);\n width: 0.25rem;\n left: 0;\n position: absolute;\n }\n\n .tab > .glyph {\n color: var(--theme-nav-item-primary-icon--color--selected);\n }\n}\n\n:host(.disabled) {\n color: var(--theme-color-weak-text);\n pointer-events: none;\n cursor: default;\n\n .tab > .tab-icon {\n color: var(--theme-color-weak-text);\n }\n\n .tab-text {\n color: var(--theme-color-weak-text);\n }\n}\n\n:host(.bottom-tab),\n:host([slot='bottom']) {\n $bottom-height: 2.25rem;\n\n min-height: $bottom-height;\n height: $bottom-height;\n max-height: $bottom-height;\n\n .tab {\n height: $bottom-height;\n }\n\n .tab::before {\n height: $bottom-height;\n background-color: transparent;\n }\n\n &.active,\n &.selected {\n &:hover {\n background-color: var(--theme-nav-item-secondary--background--selected);\n }\n\n &:active {\n background-color: var(--theme-nav-item-secondary--background--selected);\n }\n }\n}\n\n:host(.bottom-tab.active),\n:host(.bottom-tab.selected),\n:host(.active[slot='bottom']),\n:host(.selected[slot='bottom']) {\n .tab {\n background-color: var(--theme-nav-item-secondary--background--selected);\n }\n}\n\n:host(.tab-nested) {\n .tab::before {\n display: none;\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 { createMutationObserver } from '../utils/mutation-observer';\n\n/**\n * @slot menu-item-label Custom label\n */\n@Component({\n tag: 'ix-menu-item',\n styleUrl: 'menu-item.scss',\n shadow: true,\n})\nexport class MenuItem {\n /**\n * Move the Tab to a top position.\n */\n @Prop() home = false;\n\n /**\n * Caution: this is no longer working. Please use slot=\"bottom\" instead.\n *\n * Place tab on bottom\n */\n @Prop() bottom = false;\n\n /**\n * Icon name from @siemens/ix-icons\n *\n * @deprecated since 2.0.0 use `icon` property. Will be removed in 3.0.0\n */\n @Prop() tabIcon = 'document';\n\n /**\n * Icon name from @siemens/ix-icons\n */\n @Prop() icon: string;\n\n /**\n * Show notification count on tab\n */\n @Prop() notifications: number;\n\n /**\n * State to display active\n */\n @Prop() active: boolean;\n\n /**\n * Disable tab and remove event handlers\n */\n @Prop() disabled: boolean;\n\n @Element() hostElement: HTMLIxMenuItemElement;\n\n @State() title: string;\n\n private observer: MutationObserver;\n private isHostedInsideCategory = false;\n\n componentWillLoad() {\n this.isHostedInsideCategory =\n !!this.hostElement.closest('ix-menu-category');\n }\n\n componentWillRender() {\n this.title = this.hostElement.innerText;\n }\n\n connectedCallback() {\n this.observer = createMutationObserver(() => {\n this.title = this.hostElement.innerText;\n });\n\n this.observer.observe(this.hostElement, {\n subtree: true,\n childList: true,\n characterData: true,\n });\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n let extendedAttributes = {};\n if (this.home) {\n extendedAttributes = {\n slot: 'home',\n };\n }\n\n if (this.bottom) {\n extendedAttributes = {\n slot: 'bottom',\n };\n }\n return (\n <Host\n class={{\n disabled: this.disabled,\n 'home-tab': this.home,\n 'bottom-tab': this.bottom,\n active: this.active,\n 'tab-nested': this.isHostedInsideCategory,\n }}\n {...extendedAttributes}\n >\n <button\n class=\"tab\"\n title={this.title}\n tabIndex={this.disabled ? -1 : 0}\n role=\"listitem\"\n >\n <ix-icon\n class={'tab-icon'}\n name={this.icon ?? this.tabIcon}\n ></ix-icon>\n <div class=\"notification\">\n {this.notifications ? (\n <div class=\"pill\">{this.notifications}</div>\n ) : null}\n </div>\n <span class=\"tab-text text-default\">\n <slot></slot>\n </span>\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { m as matchBreakpoint } from './breakpoints.js';
|
|
2
|
+
import { T as TypedEvent } from './typed-event.js';
|
|
3
|
+
|
|
4
|
+
var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
5
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
6
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
7
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
10
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
11
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
12
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
13
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
14
|
+
};
|
|
15
|
+
var _ApplicationLayoutService_supportedBreakpoints, _ApplicationLayoutService_breakpointChangeListener, _ApplicationLayoutService_breakpoint, _ApplicationLayoutService_isDetectionEnabled;
|
|
16
|
+
class ApplicationLayoutService {
|
|
17
|
+
constructor() {
|
|
18
|
+
// Keep order of breakpoints
|
|
19
|
+
_ApplicationLayoutService_supportedBreakpoints.set(this, ['sm', 'md', 'lg']);
|
|
20
|
+
_ApplicationLayoutService_breakpointChangeListener.set(this, new TypedEvent());
|
|
21
|
+
_ApplicationLayoutService_breakpoint.set(this, 'lg');
|
|
22
|
+
_ApplicationLayoutService_isDetectionEnabled.set(this, true);
|
|
23
|
+
if (typeof window !== 'undefined') {
|
|
24
|
+
window.addEventListener('resize', this.onResize.bind(this));
|
|
25
|
+
this.onResize();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
get breakpoint() {
|
|
29
|
+
return __classPrivateFieldGet$1(this, _ApplicationLayoutService_breakpoint, "f");
|
|
30
|
+
}
|
|
31
|
+
get onChange() {
|
|
32
|
+
return __classPrivateFieldGet$1(this, _ApplicationLayoutService_breakpointChangeListener, "f");
|
|
33
|
+
}
|
|
34
|
+
get isDetectionEnabled() {
|
|
35
|
+
return __classPrivateFieldGet$1(this, _ApplicationLayoutService_isDetectionEnabled, "f");
|
|
36
|
+
}
|
|
37
|
+
onResize() {
|
|
38
|
+
if (!__classPrivateFieldGet$1(this, _ApplicationLayoutService_isDetectionEnabled, "f")) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (!__classPrivateFieldGet$1(this, _ApplicationLayoutService_supportedBreakpoints, "f")) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const matchBreakpoints = [];
|
|
45
|
+
const breakpoints = __classPrivateFieldGet$1(this, _ApplicationLayoutService_supportedBreakpoints, "f");
|
|
46
|
+
breakpoints.forEach((breakpoint) => {
|
|
47
|
+
const match = matchBreakpoint(breakpoint);
|
|
48
|
+
matchBreakpoints.push([breakpoint, match]);
|
|
49
|
+
});
|
|
50
|
+
if (matchBreakpoints.every(([_, match]) => match === false)) {
|
|
51
|
+
__classPrivateFieldGet$1(this, _ApplicationLayoutService_breakpointChangeListener, "f").emit(breakpoints[0]);
|
|
52
|
+
__classPrivateFieldSet$1(this, _ApplicationLayoutService_breakpoint, breakpoints[0], "f");
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
for (const [breakpoint, match] of matchBreakpoints.reverse()) {
|
|
56
|
+
if (match) {
|
|
57
|
+
__classPrivateFieldGet$1(this, _ApplicationLayoutService_breakpointChangeListener, "f").emit(breakpoint);
|
|
58
|
+
__classPrivateFieldSet$1(this, _ApplicationLayoutService_breakpoint, breakpoint, "f");
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
disableBreakpointDetection() {
|
|
64
|
+
__classPrivateFieldSet$1(this, _ApplicationLayoutService_isDetectionEnabled, false, "f");
|
|
65
|
+
}
|
|
66
|
+
enableBreakpointDetection() {
|
|
67
|
+
__classPrivateFieldSet$1(this, _ApplicationLayoutService_isDetectionEnabled, true, "f");
|
|
68
|
+
}
|
|
69
|
+
setBreakpoint(breakpoint) {
|
|
70
|
+
__classPrivateFieldSet$1(this, _ApplicationLayoutService_breakpoint, breakpoint, "f");
|
|
71
|
+
__classPrivateFieldGet$1(this, _ApplicationLayoutService_breakpointChangeListener, "f").emit(breakpoint);
|
|
72
|
+
}
|
|
73
|
+
setBreakpoints(breakpoints) {
|
|
74
|
+
__classPrivateFieldSet$1(this, _ApplicationLayoutService_supportedBreakpoints, breakpoints, "f");
|
|
75
|
+
this.onResize();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
_ApplicationLayoutService_supportedBreakpoints = new WeakMap(), _ApplicationLayoutService_breakpointChangeListener = new WeakMap(), _ApplicationLayoutService_breakpoint = new WeakMap(), _ApplicationLayoutService_isDetectionEnabled = new WeakMap();
|
|
79
|
+
const applicationLayoutService = new ApplicationLayoutService();
|
|
80
|
+
|
|
81
|
+
/*
|
|
82
|
+
* SPDX-FileCopyrightText: 2023 Siemens AG
|
|
83
|
+
*
|
|
84
|
+
* SPDX-License-Identifier: MIT
|
|
85
|
+
*
|
|
86
|
+
* This source code is licensed under the MIT license found in the
|
|
87
|
+
* LICENSE file in the root directory of this source tree.
|
|
88
|
+
*/
|
|
89
|
+
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
90
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
91
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
92
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
93
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
94
|
+
};
|
|
95
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
96
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
97
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
98
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
99
|
+
};
|
|
100
|
+
var _MenuService_isPinned;
|
|
101
|
+
class MenuService {
|
|
102
|
+
constructor() {
|
|
103
|
+
this.menuElement = null;
|
|
104
|
+
this.menuExpandChange = new TypedEvent();
|
|
105
|
+
_MenuService_isPinned.set(this, false);
|
|
106
|
+
}
|
|
107
|
+
register(menuElement) {
|
|
108
|
+
if (this.menuElement) {
|
|
109
|
+
console.warn('Menu already defined');
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
this.menuElement = menuElement;
|
|
113
|
+
this.menuElement.addEventListener('expandChange', (event) => {
|
|
114
|
+
this.menuExpandChange.emit(event.detail);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
setIsPinned(pinned) {
|
|
118
|
+
__classPrivateFieldSet(this, _MenuService_isPinned, pinned, "f");
|
|
119
|
+
}
|
|
120
|
+
async open() {
|
|
121
|
+
if (this.menuElement) {
|
|
122
|
+
this.menuElement.toggleMenu(true);
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
async close() {
|
|
128
|
+
if (this.menuElement) {
|
|
129
|
+
this.menuElement.toggleMenu(false);
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
async toggle() {
|
|
135
|
+
if (this.menuElement) {
|
|
136
|
+
this.menuElement.toggleMenu();
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
get nativeElement() {
|
|
142
|
+
return this.menuElement;
|
|
143
|
+
}
|
|
144
|
+
get expandChange() {
|
|
145
|
+
return this.menuExpandChange;
|
|
146
|
+
}
|
|
147
|
+
get isPinned() {
|
|
148
|
+
return __classPrivateFieldGet(this, _MenuService_isPinned, "f");
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
_MenuService_isPinned = new WeakMap();
|
|
152
|
+
const menuController = new MenuService();
|
|
153
|
+
|
|
154
|
+
export { applicationLayoutService as a, menuController as m };
|
|
155
|
+
|
|
156
|
+
//# sourceMappingURL=menu-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"menu-service.js","mappings":"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","names":["__classPrivateFieldGet","__classPrivateFieldSet"],"sources":["./src/components/utils/application-layout/service.ts","./src/components/utils/menu-service/menu-service.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 */\nimport { Breakpoint, matchBreakpoint } from '../breakpoints';\nimport { TypedEvent } from '../typed-event';\n\nclass ApplicationLayoutService {\n // Keep order of breakpoints\n #supportedBreakpoints: Breakpoint[] = ['sm', 'md', 'lg'];\n #breakpointChangeListener = new TypedEvent<Breakpoint>();\n #breakpoint: Breakpoint = 'lg';\n\n #isDetectionEnabled = true;\n\n constructor() {\n if (typeof window !== 'undefined') {\n window.addEventListener('resize', this.onResize.bind(this));\n this.onResize();\n }\n }\n\n get breakpoint() {\n return this.#breakpoint;\n }\n\n get onChange() {\n return this.#breakpointChangeListener;\n }\n\n get isDetectionEnabled() {\n return this.#isDetectionEnabled;\n }\n\n private onResize() {\n if (!this.#isDetectionEnabled) {\n return;\n }\n if (!this.#supportedBreakpoints) {\n return;\n }\n const matchBreakpoints: [Breakpoint, boolean][] = [];\n\n const breakpoints = this.#supportedBreakpoints;\n\n breakpoints.forEach((breakpoint) => {\n const match = matchBreakpoint(breakpoint);\n matchBreakpoints.push([breakpoint, match]);\n });\n\n if (matchBreakpoints.every(([_, match]) => match === false)) {\n this.#breakpointChangeListener.emit(breakpoints[0]);\n this.#breakpoint = breakpoints[0];\n return;\n }\n\n for (const [breakpoint, match] of matchBreakpoints.reverse()) {\n if (match) {\n this.#breakpointChangeListener.emit(breakpoint);\n this.#breakpoint = breakpoint;\n break;\n }\n }\n }\n\n public disableBreakpointDetection() {\n this.#isDetectionEnabled = false;\n }\n\n public enableBreakpointDetection() {\n this.#isDetectionEnabled = true;\n }\n\n public setBreakpoint(breakpoint: Breakpoint) {\n this.#breakpoint = breakpoint;\n this.#breakpointChangeListener.emit(breakpoint);\n }\n\n public setBreakpoints(breakpoints: Breakpoint[]) {\n this.#supportedBreakpoints = breakpoints;\n this.onResize();\n }\n}\n\nexport const applicationLayoutService = new ApplicationLayoutService();\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 { TypedEvent } from '../typed-event';\n\nclass MenuService {\n menuElement: HTMLIxMenuElement | null = null;\n menuExpandChange = new TypedEvent<boolean>();\n #isPinned = false;\n\n register(menuElement: HTMLIxMenuElement) {\n if (this.menuElement) {\n console.warn('Menu already defined');\n return;\n }\n this.menuElement = menuElement;\n this.menuElement.addEventListener(\n 'expandChange',\n (event: CustomEvent<boolean>) => {\n this.menuExpandChange.emit(event.detail);\n }\n );\n }\n\n public setIsPinned(pinned: boolean) {\n this.#isPinned = pinned;\n }\n\n public async open() {\n if (this.menuElement) {\n this.menuElement.toggleMenu(true);\n return true;\n }\n\n return false;\n }\n\n public async close() {\n if (this.menuElement) {\n this.menuElement.toggleMenu(false);\n return true;\n }\n\n return false;\n }\n\n public async toggle() {\n if (this.menuElement) {\n this.menuElement.toggleMenu();\n return true;\n }\n\n return false;\n }\n\n get nativeElement() {\n return this.menuElement;\n }\n\n get expandChange() {\n return this.menuExpandChange;\n }\n\n get isPinned() {\n return this.#isPinned;\n }\n}\n\nexport const menuController = new MenuService();\n"],"version":3}
|