@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,119 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$5 } from './icon-button.js';
|
|
3
|
+
import { d as defineCustomElement$4 } from './spinner.js';
|
|
4
|
+
import { d as defineCustomElement$3 } from './tab-item.js';
|
|
5
|
+
import { d as defineCustomElement$2 } from './tabs.js';
|
|
6
|
+
|
|
7
|
+
const menuAboutCss = ".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{display:block;background-color:var(--theme-nav-overlay--background);padding:0.75rem 1rem 1rem 2rem;flex-grow:1;position:absolute;width:100%;height:100%}:host .about-header{display:flex;justify-content:space-between;flex-direction:row;align-items:center;height:2rem;margin-bottom:0.5rem}:host .about-header h2{color:var(--theme-nav-overlay-header--color);margin-bottom:1rem}:host ix-tabs{margin-bottom:1.5rem}:host ix-menu-about-item{display:none}";
|
|
8
|
+
|
|
9
|
+
const MenuAbout = /*@__PURE__*/ proxyCustomElement(class MenuAbout extends HTMLElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
this.__attachShadow();
|
|
14
|
+
this.close = createEvent(this, "close", 7);
|
|
15
|
+
this.activeTabLabel = undefined;
|
|
16
|
+
this.label = 'About & legal information';
|
|
17
|
+
this.show = false;
|
|
18
|
+
this.labels = [];
|
|
19
|
+
}
|
|
20
|
+
get aboutItems() {
|
|
21
|
+
return Array.from(this.el.querySelectorAll('ix-menu-about-item'));
|
|
22
|
+
}
|
|
23
|
+
setTab(label) {
|
|
24
|
+
this.activeTabLabel = label;
|
|
25
|
+
this.aboutItems.forEach((i) => {
|
|
26
|
+
i.style.display = 'none';
|
|
27
|
+
if (i.label === this.activeTabLabel) {
|
|
28
|
+
i.style.display = 'block';
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
componentWillLoad() {
|
|
33
|
+
if (this.aboutItems.length) {
|
|
34
|
+
this.setTab(this.activeTabLabel || this.aboutItems[0].label);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
componentDidLoad() {
|
|
38
|
+
forceUpdate(this.el);
|
|
39
|
+
}
|
|
40
|
+
componentWillRender() {
|
|
41
|
+
this.updateLabels();
|
|
42
|
+
}
|
|
43
|
+
updateLabels() {
|
|
44
|
+
this.labels = this.aboutItems.map((i) => i.label);
|
|
45
|
+
}
|
|
46
|
+
watchActiveTabLabel(value) {
|
|
47
|
+
// Wait a DOM render cycle to get changed labels
|
|
48
|
+
setTimeout(() => this.setTab(value));
|
|
49
|
+
}
|
|
50
|
+
getSelectedTabIndex(label) {
|
|
51
|
+
const selectedItem = this.aboutItems.find((item) => item.label === label);
|
|
52
|
+
return this.aboutItems.indexOf(selectedItem);
|
|
53
|
+
}
|
|
54
|
+
getTabItems() {
|
|
55
|
+
return this.aboutItems.map(({ label }) => {
|
|
56
|
+
return (h("ix-tab-item", { class: {
|
|
57
|
+
active: label === this.activeTabLabel,
|
|
58
|
+
}, onClick: () => this.setTab(label) }, label));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
return (h(Host, { slot: "ix-menu-about", class: {
|
|
63
|
+
show: this.show,
|
|
64
|
+
} }, h("div", { class: "about-header" }, h("h2", { class: "text-h2" }, this.label), h("ix-icon-button", { ghost: true, size: "24", icon: 'close', onClick: (e) => this.close.emit({
|
|
65
|
+
name: 'ix-menu-about',
|
|
66
|
+
nativeEvent: e,
|
|
67
|
+
}) })), h("ix-tabs", { selected: this.getSelectedTabIndex(this.activeTabLabel) }, this.getTabItems()), h("div", { class: "about-items" }, h("slot", null))));
|
|
68
|
+
}
|
|
69
|
+
get el() { return this; }
|
|
70
|
+
static get watchers() { return {
|
|
71
|
+
"activeTabLabel": ["watchActiveTabLabel"]
|
|
72
|
+
}; }
|
|
73
|
+
static get style() { return menuAboutCss; }
|
|
74
|
+
}, [1, "ix-menu-about", {
|
|
75
|
+
"activeTabLabel": [1025, "active-tab-label"],
|
|
76
|
+
"label": [1],
|
|
77
|
+
"show": [4],
|
|
78
|
+
"labels": [32]
|
|
79
|
+
}]);
|
|
80
|
+
function defineCustomElement$1() {
|
|
81
|
+
if (typeof customElements === "undefined") {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const components = ["ix-menu-about", "ix-icon-button", "ix-spinner", "ix-tab-item", "ix-tabs"];
|
|
85
|
+
components.forEach(tagName => { switch (tagName) {
|
|
86
|
+
case "ix-menu-about":
|
|
87
|
+
if (!customElements.get(tagName)) {
|
|
88
|
+
customElements.define(tagName, MenuAbout);
|
|
89
|
+
}
|
|
90
|
+
break;
|
|
91
|
+
case "ix-icon-button":
|
|
92
|
+
if (!customElements.get(tagName)) {
|
|
93
|
+
defineCustomElement$5();
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
case "ix-spinner":
|
|
97
|
+
if (!customElements.get(tagName)) {
|
|
98
|
+
defineCustomElement$4();
|
|
99
|
+
}
|
|
100
|
+
break;
|
|
101
|
+
case "ix-tab-item":
|
|
102
|
+
if (!customElements.get(tagName)) {
|
|
103
|
+
defineCustomElement$3();
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
case "ix-tabs":
|
|
107
|
+
if (!customElements.get(tagName)) {
|
|
108
|
+
defineCustomElement$2();
|
|
109
|
+
}
|
|
110
|
+
break;
|
|
111
|
+
} });
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const IxMenuAbout = MenuAbout;
|
|
115
|
+
const defineCustomElement = defineCustomElement$1;
|
|
116
|
+
|
|
117
|
+
export { IxMenuAbout, defineCustomElement };
|
|
118
|
+
|
|
119
|
+
//# sourceMappingURL=ix-menu-about.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-menu-about.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,ozGAAozG;;MC2B5zG,SAAS;;;;;;;iBASJ,2BAA2B;gBAK5B,KAAK;kBAYQ,EAAE;;EAE9B,IAAI,UAAU;IACZ,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC,CAAC;GACnE;EAEO,MAAM,CAAC,KAAa;IAC1B,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;IAC5B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;MACxB,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;MACzB,IAAI,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,cAAc,EAAE;QACnC,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;OAC3B;KACF,CAAC,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,IAAI,CAAC,KAAK,CAAM,EACrC,sBACE,KAAK,QACL,IAAI,EAAC,IAAI,EACT,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,CAAC,CAAC,KACT,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QACd,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,CAAC;OACf,CAAC,GAEY,CACd,EACN,eAAS,QAAQ,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,cAAc,CAAC,IAC7D,IAAI,CAAC,WAAW,EAAE,CACX,EACV,WAAK,KAAK,EAAC,aAAa,IACtB,eAAa,CACT,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/menu-about/menu-about.scss?tag=ix-menu-about&encapsulation=shadow","./src/components/menu-about/menu-about.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 'legacy/fonts';\n\n:host {\n display: block;\n background-color: var(--theme-nav-overlay--background);\n padding: $medium-space $default-space $default-space $x-large-space;\n flex-grow: 1;\n position: absolute;\n width: 100%;\n height: 100%;\n\n .about-header {\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n height: $x-large-space;\n margin-bottom: $small-space;\n\n h2 {\n color: var(--theme-nav-overlay-header--color);\n margin-bottom: 1rem;\n }\n }\n\n ix-tabs {\n margin-bottom: 1.5rem;\n }\n\n ix-menu-about-item {\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 {\n Component,\n Element,\n Event,\n EventEmitter,\n forceUpdate,\n h,\n Host,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\n\n@Component({\n tag: 'ix-menu-about',\n styleUrl: 'menu-about.scss',\n shadow: true,\n})\nexport class MenuAbout {\n /**\n * Active tab\n */\n @Prop({ mutable: true }) activeTabLabel: string;\n\n /**\n * Label of first tab\n */\n @Prop() label = 'About & legal information';\n\n /**\n * Internal\n */\n @Prop() show = false;\n\n @Element() el!: HTMLIxMenuAboutElement;\n\n /**\n * About and Legal closed\n */\n @Event() close: EventEmitter<{\n nativeEvent: MouseEvent;\n name: string;\n }>;\n\n @State() labels: string[] = [];\n\n get aboutItems(): HTMLIxMenuAboutItemElement[] {\n return Array.from(this.el.querySelectorAll('ix-menu-about-item'));\n }\n\n private setTab(label: string) {\n this.activeTabLabel = label;\n this.aboutItems.forEach((i) => {\n i.style.display = 'none';\n if (i.label === this.activeTabLabel) {\n i.style.display = 'block';\n }\n });\n }\n\n componentWillLoad() {\n if (this.aboutItems.length) {\n this.setTab(this.activeTabLabel || this.aboutItems[0].label);\n }\n }\n\n componentDidLoad() {\n forceUpdate(this.el);\n }\n\n componentWillRender() {\n this.updateLabels();\n }\n\n private updateLabels() {\n this.labels = this.aboutItems.map((i) => i.label);\n }\n\n @Watch('activeTabLabel')\n watchActiveTabLabel(value: string) {\n // Wait a DOM render cycle to get changed labels\n setTimeout(() => this.setTab(value));\n }\n\n private getSelectedTabIndex(label: string) {\n const selectedItem = this.aboutItems.find((item) => item.label === label);\n return this.aboutItems.indexOf(selectedItem);\n }\n\n private getTabItems() {\n return this.aboutItems.map(({ label }) => {\n return (\n <ix-tab-item\n class={{\n active: label === this.activeTabLabel,\n }}\n onClick={() => this.setTab(label)}\n >\n {label}\n </ix-tab-item>\n );\n });\n }\n\n render() {\n return (\n <Host\n slot=\"ix-menu-about\"\n class={{\n show: this.show,\n }}\n >\n <div class=\"about-header\">\n <h2 class=\"text-h2\">{this.label}</h2>\n <ix-icon-button\n ghost\n size=\"24\"\n icon={'close'}\n onClick={(e) =>\n this.close.emit({\n name: 'ix-menu-about',\n nativeEvent: e,\n })\n }\n ></ix-icon-button>\n </div>\n <ix-tabs selected={this.getSelectedTabIndex(this.activeTabLabel)}>\n {this.getTabItems()}\n </ix-tabs>\n <div class=\"about-items\">\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxMenuAvatarItem extends Components.IxMenuAvatarItem, HTMLElement {}
|
|
4
|
+
export const IxMenuAvatarItem: {
|
|
5
|
+
prototype: IxMenuAvatarItem;
|
|
6
|
+
new (): IxMenuAvatarItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { M as MenuAvatarItem, d as defineCustomElement$1 } from './menu-avatar-item.js';
|
|
2
|
+
|
|
3
|
+
const IxMenuAvatarItem = MenuAvatarItem;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { IxMenuAvatarItem, defineCustomElement };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=ix-menu-avatar-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-menu-avatar-item.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxMenuAvatar extends Components.IxMenuAvatar, HTMLElement {}
|
|
4
|
+
export const IxMenuAvatar: {
|
|
5
|
+
prototype: IxMenuAvatar;
|
|
6
|
+
new (): IxMenuAvatar;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$5 } from './avatar.js';
|
|
3
|
+
import { d as defineCustomElement$4 } from './dropdown.js';
|
|
4
|
+
import { d as defineCustomElement$3 } from './dropdown-item.js';
|
|
5
|
+
import { d as defineCustomElement$2 } from './menu-avatar-item.js';
|
|
6
|
+
|
|
7
|
+
const menuAvatarCss = ":host{display:block;position:relative;margin-bottom:0.5rem;margin-right:0.75rem}: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 .avatar{all:unset;box-sizing:border-box;display:flex;align-items:center;height:2.5rem;width:100%;max-height:2.5rem;padding-left:0.25rem;margin-left:0.41rem;margin-right:0.35rem;transition:0.15s;border-radius:1.25rem}:host .avatar>.avatar-image{height:2rem;width:2rem;min-height:2rem;min-width:2rem;border-radius:100px}:host .avatar>.avatar-initials{display:flex;align-items:center;justify-content:center;height:2rem;width:2rem;min-height:2rem;min-width:2rem;border-radius:100px;background-color:var(--theme-color-component-3)}:host .avatar #avatar-path-background{fill:var(--theme-avatar--background)}:host .avatar #avatar-path-person{fill:var(--theme-color-4)}:host .avatar .avatar-name{display:flex;flex-direction:column;overflow:hidden;white-space:nowrap;margin-left:1rem;line-height:1.14}:host .avatar .avatar-name .text-default-single{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .avatar:not(.disabled):not(:disabled){cursor:pointer}:host .avatar:not(.disabled):not(:disabled):hover{background-color:var(--theme-avatar-btn--background--hover);color:var(--theme-avatar-btn--color--hover)}:host .avatar:not(.disabled):not(:disabled){cursor:pointer}:host .avatar:not(.disabled):not(:disabled):active,:host .avatar:not(.disabled):not(:disabled).active{background-color:var(--theme-avatar-btn--background--active);color:var(--theme-avatar-btn--color--active)}:host .avatar:focus-visible{outline:1px solid var(--theme-color-focus-bdr)}";
|
|
8
|
+
|
|
9
|
+
const MenuAvatar = /*@__PURE__*/ proxyCustomElement(class MenuAvatar extends HTMLElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
this.__attachShadow();
|
|
14
|
+
this.logoutClick = createEvent(this, "logoutClick", 7);
|
|
15
|
+
this.avatarElementId = 'ix-menu-avatar-id';
|
|
16
|
+
this.top = undefined;
|
|
17
|
+
this.bottom = undefined;
|
|
18
|
+
this.image = undefined;
|
|
19
|
+
this.initials = undefined;
|
|
20
|
+
this.i18nLogout = 'Logout';
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
return (h(Host, { slot: "ix-menu-avatar" }, h("button", { class: "nav-item top-item avatar no-hover", title: this.top, id: this.avatarElementId, tabIndex: 0 }, h("ix-avatar", { image: this.image, initials: this.initials }), h("div", { class: "avatar-name" }, h("span", { class: "text-default-single", title: this.top }, this.top), h("span", { class: "text-default-single", title: this.bottom }, this.bottom))), h("ix-dropdown", { trigger: this.hostElement, placement: 'right-start', offset: {
|
|
24
|
+
mainAxis: 16,
|
|
25
|
+
} }, h("slot", null), h("ix-menu-avatar-item", { label: this.i18nLogout, icon: 'log-out', onClick: (e) => {
|
|
26
|
+
this.logoutClick.emit(e);
|
|
27
|
+
} }))));
|
|
28
|
+
}
|
|
29
|
+
get hostElement() { return this; }
|
|
30
|
+
static get style() { return menuAvatarCss; }
|
|
31
|
+
}, [1, "ix-menu-avatar", {
|
|
32
|
+
"top": [1],
|
|
33
|
+
"bottom": [1],
|
|
34
|
+
"image": [1],
|
|
35
|
+
"initials": [1],
|
|
36
|
+
"i18nLogout": [1, "i-1-8n-logout"]
|
|
37
|
+
}]);
|
|
38
|
+
function defineCustomElement$1() {
|
|
39
|
+
if (typeof customElements === "undefined") {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const components = ["ix-menu-avatar", "ix-avatar", "ix-dropdown", "ix-dropdown-item", "ix-menu-avatar-item"];
|
|
43
|
+
components.forEach(tagName => { switch (tagName) {
|
|
44
|
+
case "ix-menu-avatar":
|
|
45
|
+
if (!customElements.get(tagName)) {
|
|
46
|
+
customElements.define(tagName, MenuAvatar);
|
|
47
|
+
}
|
|
48
|
+
break;
|
|
49
|
+
case "ix-avatar":
|
|
50
|
+
if (!customElements.get(tagName)) {
|
|
51
|
+
defineCustomElement$5();
|
|
52
|
+
}
|
|
53
|
+
break;
|
|
54
|
+
case "ix-dropdown":
|
|
55
|
+
if (!customElements.get(tagName)) {
|
|
56
|
+
defineCustomElement$4();
|
|
57
|
+
}
|
|
58
|
+
break;
|
|
59
|
+
case "ix-dropdown-item":
|
|
60
|
+
if (!customElements.get(tagName)) {
|
|
61
|
+
defineCustomElement$3();
|
|
62
|
+
}
|
|
63
|
+
break;
|
|
64
|
+
case "ix-menu-avatar-item":
|
|
65
|
+
if (!customElements.get(tagName)) {
|
|
66
|
+
defineCustomElement$2();
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
} });
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const IxMenuAvatar = MenuAvatar;
|
|
73
|
+
const defineCustomElement = defineCustomElement$1;
|
|
74
|
+
|
|
75
|
+
export { IxMenuAvatar, defineCustomElement };
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=ix-menu-avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-menu-avatar.js","mappings":";;;;;;AAAA,MAAM,aAAa,GAAG,imEAAimE;;MCuB1mE,UAAU;;;;;;IAqCb,oBAAe,GAAG,mBAAmB,CAAC;;;;;sBAPzB,QAAQ;;EAS7B,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,IAAI,EAAC,gBAAgB,IACzB,cACE,KAAK,EAAC,mCAAmC,EACzC,KAAK,EAAE,IAAI,CAAC,GAAG,EACf,EAAE,EAAE,IAAI,CAAC,eAAe,EACxB,QAAQ,EAAE,CAAC,IAEX,iBAAW,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAc,EAEnE,WAAK,KAAK,EAAC,aAAa,IACtB,YAAM,KAAK,EAAC,qBAAqB,EAAC,KAAK,EAAE,IAAI,CAAC,GAAG,IAC9C,IAAI,CAAC,GAAG,CACJ,EACP,YAAM,KAAK,EAAC,qBAAqB,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,IACjD,IAAI,CAAC,MAAM,CACP,CACH,CACC,EACT,mBACE,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,SAAS,EAAE,aAAa,EACxB,MAAM,EAAE;QACN,QAAQ,EAAE,EAAE;OACb,IAED,eAAa,EACb,2BACE,KAAK,EAAE,IAAI,CAAC,UAAU,EACtB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,CAAC,CAAC;QACT,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;OAC1B,GACoB,CACX,CACT,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/menu-avatar/menu-avatar.scss?tag=ix-menu-avatar&encapsulation=shadow","./src/components/menu-avatar/menu-avatar.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/hover';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n display: block;\n position: relative;\n margin-bottom: 0.5rem;\n margin-right: 0.75rem;\n\n .avatar {\n all: unset;\n box-sizing: border-box;\n\n display: flex;\n align-items: center;\n height: 2.5rem;\n width: 100%;\n max-height: 2.5rem;\n padding-left: 0.25rem;\n margin-left: 0.41rem;\n margin-right: 0.35rem;\n transition: 0.15s;\n\n > .avatar-image {\n height: 2rem;\n width: 2rem;\n min-height: 2rem;\n min-width: 2rem;\n border-radius: 100px;\n }\n\n > .avatar-initials {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 2rem;\n width: 2rem;\n min-height: 2rem;\n min-width: 2rem;\n border-radius: 100px;\n background-color: var(--theme-color-component-3);\n }\n\n #avatar-path-background {\n fill: var(--theme-avatar--background);\n }\n\n #avatar-path-person {\n fill: var(--theme-color-4);\n }\n\n .avatar-name {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n margin-left: $default-space;\n line-height: 1.14;\n\n .text-default-single {\n @include ellipsis;\n }\n }\n\n border-radius: 1.25rem;\n\n @include hover {\n background-color: var(--theme-avatar-btn--background--hover);\n color: var(--theme-avatar-btn--color--hover);\n }\n\n @include active {\n background-color: var(--theme-avatar-btn--background--active);\n color: var(--theme-avatar-btn--color--active);\n }\n }\n\n .avatar:focus-visible {\n outline: 1px solid var(--theme-color-focus-bdr);\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 Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n} from '@stencil/core';\n\n@Component({\n tag: 'ix-menu-avatar',\n styleUrl: 'menu-avatar.scss',\n shadow: true,\n})\nexport class MenuAvatar {\n @Element() hostElement!: HTMLIxMenuAvatarElement;\n\n /**\n * First line of text\n */\n @Prop() top: string;\n\n /**\n * Second line of text\n */\n @Prop() bottom: string;\n\n /**\n * Display a avatar image\n *\n * @since 1.4.0\n */\n @Prop() image: string;\n\n /**\n * Display the initials of the user. Will be overwritten by image\n *\n * @since 1.4.0\n */\n @Prop() initials: string;\n\n /**\n * Use for translation\n */\n @Prop() i18nLogout = 'Logout';\n\n /**\n * Logout click\n */\n @Event() logoutClick: EventEmitter;\n\n private avatarElementId = 'ix-menu-avatar-id';\n\n render() {\n return (\n <Host slot=\"ix-menu-avatar\">\n <button\n class=\"nav-item top-item avatar no-hover\"\n title={this.top}\n id={this.avatarElementId}\n tabIndex={0}\n >\n <ix-avatar image={this.image} initials={this.initials}></ix-avatar>\n\n <div class=\"avatar-name\">\n <span class=\"text-default-single\" title={this.top}>\n {this.top}\n </span>\n <span class=\"text-default-single\" title={this.bottom}>\n {this.bottom}\n </span>\n </div>\n </button>\n <ix-dropdown\n trigger={this.hostElement}\n placement={'right-start'}\n offset={{\n mainAxis: 16,\n }}\n >\n <slot></slot>\n <ix-menu-avatar-item\n label={this.i18nLogout}\n icon={'log-out'}\n onClick={(e) => {\n this.logoutClick.emit(e);\n }}\n ></ix-menu-avatar-item>\n </ix-dropdown>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxMenuCategory extends Components.IxMenuCategory, HTMLElement {}
|
|
4
|
+
export const IxMenuCategory: {
|
|
5
|
+
prototype: IxMenuCategory;
|
|
6
|
+
new (): IxMenuCategory;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { a as anime } from './anime.es.js';
|
|
3
|
+
import { c as closestIxMenu } from './context.js';
|
|
4
|
+
import { c as createMutationObserver } from './mutation-observer.js';
|
|
5
|
+
import { d as defineCustomElement$6 } from './divider.js';
|
|
6
|
+
import { d as defineCustomElement$5 } from './dropdown.js';
|
|
7
|
+
import { d as defineCustomElement$4 } from './dropdown-item.js';
|
|
8
|
+
import { d as defineCustomElement$3 } from './menu-item.js';
|
|
9
|
+
import { d as defineCustomElement$2 } from './typography.js';
|
|
10
|
+
|
|
11
|
+
const menuCategoryCss = ":host{display:flex;flex-direction:column;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 .category{display:flex;position:relative;align-items:center;width:100%;height:100%}:host .category-chevron{margin-left:auto;margin-right:0px;transition:var(--theme-default-time) transform ease-in-out}:host .category-chevron--open{transform:rotate(-180deg)}:host .menu-items{overflow:hidden;max-height:0px;transition:var(--theme-default-time) max-height ease-in-out;padding:0.25rem 0 0.25rem 1.625rem}:host .menu-items--expanded{max-height:999999999px}:host .category-dropdown ::slotted(ix-menu-item){--ix-menu-item-height:2.5rem}:host .category-dropdown-header{pointer-events:none;min-width:256px}:host ::slotted(ix-menu-item){--ix-menu-item-height:2.5rem}:host(.expanded){background-color:var(--theme-color-ghost--active)}:host ::slotted(a[href]){text-decoration:none !important}";
|
|
12
|
+
|
|
13
|
+
const DefaultIxMenuItemHeight = 40;
|
|
14
|
+
const DefaultAnimationTimeout = 150;
|
|
15
|
+
const MenuCategory = /*@__PURE__*/ proxyCustomElement(class MenuCategory extends HTMLElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super();
|
|
18
|
+
this.__registerHost();
|
|
19
|
+
this.__attachShadow();
|
|
20
|
+
this.label = undefined;
|
|
21
|
+
this.icon = undefined;
|
|
22
|
+
this.notifications = undefined;
|
|
23
|
+
this.menuExpand = false;
|
|
24
|
+
this.showItems = false;
|
|
25
|
+
this.showDropdown = false;
|
|
26
|
+
this.nestedItems = [];
|
|
27
|
+
}
|
|
28
|
+
isNestedItemActive() {
|
|
29
|
+
return this.getNestedItems().some((item) => item.active);
|
|
30
|
+
}
|
|
31
|
+
getNestedItems() {
|
|
32
|
+
return Array.from(this.hostElement.querySelectorAll(':scope ix-menu-item'));
|
|
33
|
+
}
|
|
34
|
+
getNestedItemsHeight() {
|
|
35
|
+
const items = this.getNestedItems();
|
|
36
|
+
return items.length * DefaultIxMenuItemHeight;
|
|
37
|
+
}
|
|
38
|
+
onExpandCategory(showItems) {
|
|
39
|
+
if (showItems) {
|
|
40
|
+
this.animateFadeIn();
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.animateFadeOut();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
animateFadeOut() {
|
|
47
|
+
const slotHideThresholdMs = 25;
|
|
48
|
+
anime({
|
|
49
|
+
targets: this.menuItemsContainer,
|
|
50
|
+
duration: DefaultAnimationTimeout,
|
|
51
|
+
easing: 'easeInSine',
|
|
52
|
+
opacity: [1, 0],
|
|
53
|
+
maxHeight: [this.getNestedItemsHeight() + DefaultIxMenuItemHeight, 0],
|
|
54
|
+
complete: () => {
|
|
55
|
+
setTimeout(() => {
|
|
56
|
+
this.showItems = false;
|
|
57
|
+
this.showDropdown = false;
|
|
58
|
+
}, DefaultAnimationTimeout + slotHideThresholdMs);
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
animateFadeIn() {
|
|
63
|
+
anime({
|
|
64
|
+
targets: this.menuItemsContainer,
|
|
65
|
+
duration: DefaultAnimationTimeout,
|
|
66
|
+
easing: 'easeInSine',
|
|
67
|
+
opacity: [0, 1],
|
|
68
|
+
maxHeight: [0, this.getNestedItemsHeight() + DefaultIxMenuItemHeight],
|
|
69
|
+
begin: () => {
|
|
70
|
+
this.showItems = true;
|
|
71
|
+
this.showDropdown = false;
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
onCategoryClicked(e) {
|
|
76
|
+
if (this.ixMenu.expand) {
|
|
77
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
78
|
+
this.onExpandCategory(!this.showItems);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
this.showDropdown = !this.showDropdown;
|
|
82
|
+
}
|
|
83
|
+
onNestedItemsChanged() {
|
|
84
|
+
this.nestedItems = this.getNestedItems();
|
|
85
|
+
}
|
|
86
|
+
isCategoryItemListVisible() {
|
|
87
|
+
return this.menuExpand && (this.showItems || this.isNestedItemActive());
|
|
88
|
+
}
|
|
89
|
+
componentDidLoad() {
|
|
90
|
+
const closestMenu = closestIxMenu(this.hostElement);
|
|
91
|
+
if (!closestMenu) {
|
|
92
|
+
throw Error('ix-menu-category can only be used as a child of ix-menu');
|
|
93
|
+
}
|
|
94
|
+
this.ixMenu = closestMenu;
|
|
95
|
+
this.observer = createMutationObserver(() => this.onNestedItemsChanged());
|
|
96
|
+
this.observer.observe(this.hostElement, {
|
|
97
|
+
attributes: true,
|
|
98
|
+
childList: true,
|
|
99
|
+
subtree: true,
|
|
100
|
+
});
|
|
101
|
+
requestAnimationFrame(() => {
|
|
102
|
+
this.onNestedItemsChanged();
|
|
103
|
+
});
|
|
104
|
+
this.ixMenu.addEventListener('expandChange', ({ detail: menuExpand }) => {
|
|
105
|
+
this.menuExpand = menuExpand;
|
|
106
|
+
this.showItems = this.isCategoryItemListVisible();
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
disconnectedCallback() {
|
|
110
|
+
if (this.observer) {
|
|
111
|
+
this.observer.disconnect();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
render() {
|
|
115
|
+
return (h(Host, { class: {
|
|
116
|
+
expanded: this.showItems,
|
|
117
|
+
} }, h("ix-menu-item", { class: 'category-parent', active: this.isNestedItemActive(), notifications: this.notifications, icon: this.icon, onClick: (e) => this.onCategoryClicked(e) }, h("div", { class: "category" }, this.label, h("ix-icon", { name: 'chevron-down-small', class: {
|
|
118
|
+
'category-chevron': true,
|
|
119
|
+
'category-chevron--open': this.showItems,
|
|
120
|
+
} }))), h("div", { ref: (ref) => (this.menuItemsContainer = ref), class: {
|
|
121
|
+
'menu-items': true,
|
|
122
|
+
'menu-items--expanded': this.showItems,
|
|
123
|
+
} }, this.showItems ? h("slot", null) : null), h("ix-dropdown", { closeBehavior: 'both', show: this.showDropdown, onShowChanged: ({ detail: dropdownShown }) => {
|
|
124
|
+
this.showDropdown = dropdownShown;
|
|
125
|
+
}, class: 'category-dropdown', anchor: this.hostElement, placement: "right-start", offset: {
|
|
126
|
+
mainAxis: 3,
|
|
127
|
+
}, onClick: (e) => {
|
|
128
|
+
if (e.target instanceof HTMLElement) {
|
|
129
|
+
if (e.target.tagName === 'IX-MENU-ITEM') {
|
|
130
|
+
this.showDropdown = false;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
} }, h("ix-dropdown-item", { class: 'category-dropdown-header' }, h("ix-typography", { variant: "default-title-single", color: "std" }, this.label)), h("ix-divider", null), h("slot", null))));
|
|
134
|
+
}
|
|
135
|
+
get hostElement() { return this; }
|
|
136
|
+
static get style() { return menuCategoryCss; }
|
|
137
|
+
}, [1, "ix-menu-category", {
|
|
138
|
+
"label": [1],
|
|
139
|
+
"icon": [1],
|
|
140
|
+
"notifications": [2],
|
|
141
|
+
"menuExpand": [32],
|
|
142
|
+
"showItems": [32],
|
|
143
|
+
"showDropdown": [32],
|
|
144
|
+
"nestedItems": [32]
|
|
145
|
+
}]);
|
|
146
|
+
function defineCustomElement$1() {
|
|
147
|
+
if (typeof customElements === "undefined") {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const components = ["ix-menu-category", "ix-divider", "ix-dropdown", "ix-dropdown-item", "ix-menu-item", "ix-typography"];
|
|
151
|
+
components.forEach(tagName => { switch (tagName) {
|
|
152
|
+
case "ix-menu-category":
|
|
153
|
+
if (!customElements.get(tagName)) {
|
|
154
|
+
customElements.define(tagName, MenuCategory);
|
|
155
|
+
}
|
|
156
|
+
break;
|
|
157
|
+
case "ix-divider":
|
|
158
|
+
if (!customElements.get(tagName)) {
|
|
159
|
+
defineCustomElement$6();
|
|
160
|
+
}
|
|
161
|
+
break;
|
|
162
|
+
case "ix-dropdown":
|
|
163
|
+
if (!customElements.get(tagName)) {
|
|
164
|
+
defineCustomElement$5();
|
|
165
|
+
}
|
|
166
|
+
break;
|
|
167
|
+
case "ix-dropdown-item":
|
|
168
|
+
if (!customElements.get(tagName)) {
|
|
169
|
+
defineCustomElement$4();
|
|
170
|
+
}
|
|
171
|
+
break;
|
|
172
|
+
case "ix-menu-item":
|
|
173
|
+
if (!customElements.get(tagName)) {
|
|
174
|
+
defineCustomElement$3();
|
|
175
|
+
}
|
|
176
|
+
break;
|
|
177
|
+
case "ix-typography":
|
|
178
|
+
if (!customElements.get(tagName)) {
|
|
179
|
+
defineCustomElement$2();
|
|
180
|
+
}
|
|
181
|
+
break;
|
|
182
|
+
} });
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const IxMenuCategory = MenuCategory;
|
|
186
|
+
const defineCustomElement = defineCustomElement$1;
|
|
187
|
+
|
|
188
|
+
export { IxMenuCategory, defineCustomElement };
|
|
189
|
+
|
|
190
|
+
//# sourceMappingURL=ix-menu-category.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-menu-category.js","mappings":";;;;;;;;;;AAAA,MAAM,eAAe,GAAG,26CAA26C;;ACan8C,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,uBAAuB,GAAG,GAAG,CAAC;MAUvB,YAAY;;;;;;;;sBAkBD,KAAK;qBACN,KAAK;wBACF,KAAK;uBACmB,EAAE;;EAM1C,kBAAkB;IACxB,OAAO,IAAI,CAAC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ACN,QAAQ,EAAE,CAAC;OACZ,EACD,OAAO,EAAE,CAAC,CAAC;QACT,IAAI,CAAC,CAAC,MAAM,YAAY,WAAW,EAAE;UACnC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,KAAK,cAAc,EAAE;YACvC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;WAC3B;SACF;OACF,IAED,wBAAkB,KAAK,EAAE,0BAA0B,IACjD,qBAAe,OAAO,EAAC,sBAAsB,EAAC,KAAK,EAAC,KAAK,IACtD,IAAI,CAAC,KAAK,CACG,CACC,EACnB,qBAAyB,EACzB,eAAa,CACD,CACT,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/menu-category/menu-category.scss?tag=ix-menu-category&encapsulation=shadow","./src/components/menu-category/menu-category.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 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n display: flex;\n flex-direction: column;\n position: relative;\n\n .category {\n display: flex;\n position: relative;\n align-items: center;\n width: 100%;\n height: 100%;\n }\n\n .category-chevron {\n margin-left: auto;\n margin-right: 0px;\n transition: var(--theme-default-time) transform ease-in-out;\n }\n\n .category-chevron--open {\n transform: rotate(-180deg);\n }\n\n .menu-items {\n overflow: hidden;\n max-height: 0px;\n transition: var(--theme-default-time) max-height ease-in-out;\n padding: 0.25rem 0 0.25rem 1.625rem;\n }\n\n .menu-items--expanded {\n max-height: 999999999px;\n }\n\n .category-dropdown {\n ::slotted(ix-menu-item) {\n --ix-menu-item-height: 2.5rem;\n }\n }\n\n .category-dropdown-header {\n pointer-events: none;\n min-width: 256px;\n }\n\n ::slotted(ix-menu-item) {\n --ix-menu-item-height: 2.5rem;\n }\n}\n\n:host(.expanded) {\n background-color: var(--theme-color-ghost--active);\n}\n\n:host {\n ::slotted(a[href]) {\n text-decoration: none !important;\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 { Component, Element, h, Host, Prop, State } from '@stencil/core';\nimport anime from 'animejs';\nimport { closestIxMenu } from '../utils/application-layout/context';\nimport { createMutationObserver } from '../utils/mutation-observer';\n\nconst DefaultIxMenuItemHeight = 40;\nconst DefaultAnimationTimeout = 150;\n\n/**\n * @since 2.0.0\n */\n@Component({\n tag: 'ix-menu-category',\n styleUrl: 'menu-category.scss',\n shadow: true,\n})\nexport class MenuCategory {\n @Element() hostElement: HTMLIxMenuCategoryElement;\n\n /**\n * Display name of the category\n */\n @Prop() label: string;\n\n /**\n * Icon of the category\n */\n @Prop() icon: string;\n\n /**\n * Show notification count on the category\n */\n @Prop() notifications: number;\n\n @State() menuExpand = false;\n @State() showItems = false;\n @State() showDropdown = false;\n @State() nestedItems: HTMLIxMenuItemElement[] = [];\n\n private observer: MutationObserver;\n private menuItemsContainer: HTMLDivElement;\n private ixMenu: HTMLIxMenuElement;\n\n private isNestedItemActive() {\n return this.getNestedItems().some((item) => item.active);\n }\n\n private getNestedItems() {\n return Array.from(\n this.hostElement.querySelectorAll(':scope ix-menu-item')\n ) as HTMLIxMenuItemElement[];\n }\n\n private getNestedItemsHeight() {\n const items = this.getNestedItems();\n\n return items.length * DefaultIxMenuItemHeight;\n }\n\n private onExpandCategory(showItems: boolean) {\n if (showItems) {\n this.animateFadeIn();\n } else {\n this.animateFadeOut();\n }\n }\n\n private animateFadeOut() {\n const slotHideThresholdMs = 25;\n anime({\n targets: this.menuItemsContainer,\n duration: DefaultAnimationTimeout,\n easing: 'easeInSine',\n opacity: [1, 0],\n maxHeight: [this.getNestedItemsHeight() + DefaultIxMenuItemHeight, 0],\n complete: () => {\n setTimeout(() => {\n this.showItems = false;\n this.showDropdown = false;\n }, DefaultAnimationTimeout + slotHideThresholdMs);\n },\n });\n }\n\n private animateFadeIn() {\n anime({\n targets: this.menuItemsContainer,\n duration: DefaultAnimationTimeout,\n easing: 'easeInSine',\n opacity: [0, 1],\n maxHeight: [0, this.getNestedItemsHeight() + DefaultIxMenuItemHeight],\n begin: () => {\n this.showItems = true;\n this.showDropdown = false;\n },\n });\n }\n\n private onCategoryClicked(e?: MouseEvent) {\n if (this.ixMenu.expand) {\n e?.stopPropagation();\n this.onExpandCategory(!this.showItems);\n return;\n }\n\n this.showDropdown = !this.showDropdown;\n }\n\n private onNestedItemsChanged() {\n this.nestedItems = this.getNestedItems();\n }\n\n private isCategoryItemListVisible() {\n return this.menuExpand && (this.showItems || this.isNestedItemActive());\n }\n\n componentDidLoad() {\n const closestMenu = closestIxMenu(this.hostElement);\n if (!closestMenu) {\n throw Error('ix-menu-category can only be used as a child of ix-menu');\n }\n this.ixMenu = closestMenu;\n\n this.observer = createMutationObserver(() => this.onNestedItemsChanged());\n this.observer.observe(this.hostElement, {\n attributes: true,\n childList: true,\n subtree: true,\n });\n\n requestAnimationFrame(() => {\n this.onNestedItemsChanged();\n });\n\n this.ixMenu.addEventListener(\n 'expandChange',\n ({ detail: menuExpand }: CustomEvent<boolean>) => {\n this.menuExpand = menuExpand;\n\n this.showItems = this.isCategoryItemListVisible();\n }\n );\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n return (\n <Host\n class={{\n expanded: this.showItems,\n }}\n >\n <ix-menu-item\n class={'category-parent'}\n active={this.isNestedItemActive()}\n notifications={this.notifications}\n icon={this.icon}\n onClick={(e) => this.onCategoryClicked(e)}\n >\n <div class=\"category\">\n {this.label}\n <ix-icon\n name={'chevron-down-small'}\n class={{\n 'category-chevron': true,\n 'category-chevron--open': this.showItems,\n }}\n ></ix-icon>\n </div>\n </ix-menu-item>\n <div\n ref={(ref) => (this.menuItemsContainer = ref!)}\n class={{\n 'menu-items': true,\n 'menu-items--expanded': this.showItems,\n }}\n >\n {this.showItems ? <slot></slot> : null}\n </div>\n <ix-dropdown\n closeBehavior={'both'}\n show={this.showDropdown}\n onShowChanged={({ detail: dropdownShown }: CustomEvent<boolean>) => {\n this.showDropdown = dropdownShown;\n }}\n class={'category-dropdown'}\n anchor={this.hostElement}\n placement=\"right-start\"\n offset={{\n mainAxis: 3,\n }}\n onClick={(e) => {\n if (e.target instanceof HTMLElement) {\n if (e.target.tagName === 'IX-MENU-ITEM') {\n this.showDropdown = false;\n }\n }\n }}\n >\n <ix-dropdown-item class={'category-dropdown-header'}>\n <ix-typography variant=\"default-title-single\" color=\"std\">\n {this.label}\n </ix-typography>\n </ix-dropdown-item>\n <ix-divider></ix-divider>\n <slot></slot>\n </ix-dropdown>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxMenuItem extends Components.IxMenuItem, HTMLElement {}
|
|
4
|
+
export const IxMenuItem: {
|
|
5
|
+
prototype: IxMenuItem;
|
|
6
|
+
new (): IxMenuItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-menu-item.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxMenuSettingsItem extends Components.IxMenuSettingsItem, HTMLElement {}
|
|
4
|
+
export const IxMenuSettingsItem: {
|
|
5
|
+
prototype: IxMenuSettingsItem;
|
|
6
|
+
new (): IxMenuSettingsItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const menuSettingsItemCss = ":host{display:block}";
|
|
4
|
+
|
|
5
|
+
const MenuSettingsItem = /*@__PURE__*/ proxyCustomElement(class MenuSettingsItem extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.label = undefined;
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return (h(Host, null, h("slot", null)));
|
|
14
|
+
}
|
|
15
|
+
static get style() { return menuSettingsItemCss; }
|
|
16
|
+
}, [1, "ix-menu-settings-item", {
|
|
17
|
+
"label": [1]
|
|
18
|
+
}]);
|
|
19
|
+
function defineCustomElement$1() {
|
|
20
|
+
if (typeof customElements === "undefined") {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const components = ["ix-menu-settings-item"];
|
|
24
|
+
components.forEach(tagName => { switch (tagName) {
|
|
25
|
+
case "ix-menu-settings-item":
|
|
26
|
+
if (!customElements.get(tagName)) {
|
|
27
|
+
customElements.define(tagName, MenuSettingsItem);
|
|
28
|
+
}
|
|
29
|
+
break;
|
|
30
|
+
} });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const IxMenuSettingsItem = MenuSettingsItem;
|
|
34
|
+
const defineCustomElement = defineCustomElement$1;
|
|
35
|
+
|
|
36
|
+
export { IxMenuSettingsItem, defineCustomElement };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=ix-menu-settings-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-menu-settings-item.js","mappings":";;AAAA,MAAM,mBAAmB,GAAG,sBAAsB;;MCgBrC,gBAAgB;;;;;;;EAM3B,MAAM;IACJ,QACE,EAAC,IAAI,QACH,eAAa,CACR,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/menu-settings-item/menu-settings-item.css?tag=ix-menu-settings-item&encapsulation=shadow","./src/components/menu-settings-item/menu-settings-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:host {\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 { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n tag: 'ix-menu-settings-item',\n styleUrl: 'menu-settings-item.css',\n shadow: true,\n})\nexport class MenuSettingsItem {\n /**\n * Label\n */\n @Prop() label: string;\n\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxMenuSettings extends Components.IxMenuSettings, HTMLElement {}
|
|
4
|
+
export const IxMenuSettings: {
|
|
5
|
+
prototype: IxMenuSettings;
|
|
6
|
+
new (): IxMenuSettings;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|