@siemens/ix 2.4.0 → 2.5.0
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/a11y.js +1 -1
- package/components/a11y.js.map +1 -1
- package/components/application-header.js +51 -15
- package/components/application-header.js.map +1 -1
- package/components/avatar.js +1 -1
- package/components/avatar.js.map +1 -1
- package/components/card-accordion.js +1 -1
- package/components/card-accordion.js.map +1 -1
- package/components/card-content.js +1 -1
- package/components/card-title.js +1 -1
- package/components/card.js +3 -3
- package/components/card.js.map +1 -1
- package/components/col.js.map +1 -1
- package/components/context.js +1 -1
- package/components/context.js.map +1 -1
- package/components/divider.js +1 -1
- package/components/dropdown-controller.js +140 -0
- package/components/dropdown-controller.js.map +1 -0
- package/components/dropdown-item.js +4 -4
- package/components/dropdown-item.js.map +1 -1
- package/components/dropdown.js +13 -145
- package/components/dropdown.js.map +1 -1
- package/components/filter-chip.js +1 -1
- package/components/floating-ui.dom.esm.js +533 -60
- package/components/floating-ui.dom.esm.js.map +1 -1
- package/components/group-context-menu.js +1 -1
- package/components/group-context-menu.js.map +1 -1
- package/components/group-item.js +4 -8
- package/components/group-item.js.map +1 -1
- package/components/index.js +1 -0
- package/components/index.js.map +1 -1
- package/components/ix-action-card.js +1 -1
- package/components/ix-action-card.js.map +1 -1
- package/components/ix-application-sidebar.js +1 -1
- package/components/ix-application-switch-modal.js +1 -1
- package/components/ix-application.js +2 -2
- package/components/ix-application.js.map +1 -1
- package/components/ix-basic-navigation.js +18 -12
- package/components/ix-basic-navigation.js.map +1 -1
- package/components/ix-blind.js.map +1 -1
- package/components/ix-breadcrumb.js +2 -2
- package/components/ix-card-list.js +6 -6
- package/components/ix-card-list.js.map +1 -1
- package/components/ix-category-filter.js +8 -4
- package/components/ix-category-filter.js.map +1 -1
- package/components/ix-chip.js +4 -4
- package/components/ix-chip.js.map +1 -1
- package/components/ix-content.js +3 -3
- package/components/ix-css-grid-item.js +1 -1
- package/components/ix-drawer.js +2 -2
- package/components/ix-dropdown-header.js +1 -1
- package/components/ix-dropdown-quick-actions.js +1 -1
- package/components/ix-event-list-item.js +4 -4
- package/components/ix-event-list.js +2 -2
- package/components/ix-expanding-search.js +4 -4
- package/components/ix-flip-tile-content.js +1 -1
- package/components/ix-flip-tile.js +4 -4
- package/components/ix-form-field.js +1 -1
- package/components/ix-group.js +69 -44
- package/components/ix-group.js.map +1 -1
- package/components/ix-icon-toggle-button.js +1 -1
- package/components/ix-input-group.js +1 -1
- package/components/ix-key-value-list.js +1 -1
- package/components/ix-kpi.js +3 -3
- package/components/ix-kpi.js.map +1 -1
- package/components/ix-link-button.js +3 -3
- package/components/ix-map-navigation.js +21 -15
- package/components/ix-map-navigation.js.map +1 -1
- package/components/ix-menu-about-item.js +1 -1
- package/components/ix-menu-about-news.js +4 -4
- package/components/ix-menu-avatar.js +2 -2
- package/components/ix-menu-category.js +5 -5
- package/components/ix-menu-settings-item.js +1 -1
- package/components/ix-menu.js +12 -12
- package/components/ix-menu.js.map +1 -1
- package/components/ix-message-bar.js +1 -1
- package/components/ix-modal-example.js +1 -1
- package/components/ix-modal-footer.js +2 -2
- package/components/ix-modal-footer.js.map +1 -1
- package/components/ix-modal-loading.js +1 -1
- package/components/ix-modal.js +1 -1
- package/components/ix-modal.js.map +1 -1
- package/components/ix-pagination.js +3 -3
- package/components/ix-pagination.js.map +1 -1
- package/components/ix-pane-layout.js +1 -1
- package/components/ix-pane.js.map +1 -1
- package/components/ix-pill.js +4 -4
- package/components/ix-pill.js.map +1 -1
- package/components/ix-playground-internal.js +1 -1
- package/components/ix-playground-internal.js.map +1 -1
- package/components/ix-push-card.js +1 -1
- package/components/ix-push-card.js.map +1 -1
- package/components/ix-slider.js +20 -13
- package/components/ix-slider.js.map +1 -1
- package/components/ix-split-button-item.js +1 -1
- package/components/ix-tile.js +4 -4
- package/components/ix-tile.js.map +1 -1
- package/components/ix-toast-container.js.map +1 -1
- package/components/ix-toggle-button.js +2 -2
- package/components/ix-toggle.js +2 -2
- package/components/ix-tree.js +21 -7
- package/components/ix-tree.js.map +1 -1
- package/components/ix-upload.js +3 -3
- package/components/ix-upload.js.map +1 -1
- package/components/ix-validation-tooltip.js +2 -2
- package/components/ix-workflow-step.js +3 -3
- package/components/ix-workflow-step.js.map +1 -1
- package/components/ix-workflow-steps.js +1 -1
- package/components/ix-workflow-steps.js.map +1 -1
- package/components/layout-grid.js +2 -2
- package/components/layout-grid.js.map +1 -1
- package/components/listener.js +1 -1
- package/components/listener.js.map +1 -1
- package/components/logical-filter-operator.js +1 -1
- package/components/logical-filter-operator.js.map +1 -1
- package/components/map-navigation-overlay.js +2 -2
- package/components/menu-avatar-item.js +1 -1
- package/components/menu-expand-icon.js +1 -1
- package/components/menu-expand-icon.js.map +1 -1
- package/components/menu-item.js +14 -14
- package/components/menu-item.js.map +1 -1
- package/components/modal-content.js +1 -1
- package/components/modal-content.js.map +1 -1
- package/components/modal-header.js +1 -1
- package/components/modal-header.js.map +1 -1
- package/components/row.js +1 -1
- package/components/row.js.map +1 -1
- package/components/select-item.js +1 -1
- package/components/select.js +27 -30
- package/components/select.js.map +1 -1
- package/components/service.js +2 -2
- package/components/service.js.map +1 -1
- package/components/shadow-dom.js +1 -1
- package/components/shadow-dom.js.map +1 -1
- package/components/spinner.js +1 -1
- package/components/tab-item.js +3 -3
- package/components/tab-item.js.map +1 -1
- package/components/tabs.js +77 -43
- package/components/tabs.js.map +1 -1
- package/components/toast.js +2 -2
- package/components/toast.js.map +1 -1
- package/components/tooltip.js +24 -22
- package/components/tooltip.js.map +1 -1
- package/components/tree-item.js +8 -8
- package/components/tree-item.js.map +1 -1
- package/dist/cjs/{a11y-d3ce56d1.js → a11y-eba397e8.js} +2 -2
- package/dist/cjs/{a11y-d3ce56d1.js.map → a11y-eba397e8.js.map} +1 -1
- package/dist/cjs/{context-98f4a0b3.js → context-938f7470.js} +2 -2
- package/dist/cjs/{context-98f4a0b3.js.map → context-938f7470.js.map} +1 -1
- package/dist/cjs/dropdown-controller-5ef3d018.js +144 -0
- package/dist/cjs/dropdown-controller-5ef3d018.js.map +1 -0
- package/dist/cjs/{floating-ui.dom.esm-94b4d17c.js → floating-ui.dom.esm-9dde6cd6.js} +534 -60
- package/dist/cjs/floating-ui.dom.esm-9dde6cd6.js.map +1 -0
- package/dist/cjs/index.cjs.js +3 -2
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/ix-action-card.cjs.entry.js +1 -1
- package/dist/cjs/ix-action-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-application-header.cjs.entry.js +35 -9
- package/dist/cjs/ix-application-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-application-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/ix-application-switch-modal.cjs.entry.js +1 -1
- package/dist/cjs/ix-application.cjs.entry.js +5 -5
- package/dist/cjs/ix-application.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-avatar_2.cjs.entry.js +3 -3
- package/dist/cjs/ix-avatar_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-basic-navigation.cjs.entry.js +4 -4
- package/dist/cjs/ix-basic-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-blind.cjs.entry.js +1 -1
- package/dist/cjs/ix-blind.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/ix-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/ix-card-accordion_2.cjs.entry.js +2 -2
- package/dist/cjs/ix-card-accordion_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-card-list.cjs.entry.js +6 -6
- package/dist/cjs/ix-card-list.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-card_2.cjs.entry.js +4 -4
- package/dist/cjs/ix-card_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-category-filter.cjs.entry.js +9 -5
- package/dist/cjs/ix-category-filter.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-chip.cjs.entry.js +4 -4
- package/dist/cjs/ix-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-col_4.cjs.entry.js +4 -4
- package/dist/cjs/ix-col_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-content.cjs.entry.js +4 -4
- package/dist/cjs/ix-css-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/ix-divider.cjs.entry.js +1 -1
- package/dist/cjs/ix-drawer.cjs.entry.js +2 -2
- package/dist/cjs/ix-dropdown-header.cjs.entry.js +1 -1
- package/dist/cjs/ix-dropdown-item.cjs.entry.js +4 -4
- package/dist/cjs/ix-dropdown-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-dropdown-quick-actions.cjs.entry.js +1 -1
- package/dist/cjs/ix-dropdown.cjs.entry.js +26 -158
- package/dist/cjs/ix-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-event-list-item.cjs.entry.js +5 -5
- package/dist/cjs/ix-event-list.cjs.entry.js +2 -2
- package/dist/cjs/ix-expanding-search.cjs.entry.js +4 -4
- package/dist/cjs/ix-filter-chip_2.cjs.entry.js +2 -2
- package/dist/cjs/ix-flip-tile-content.cjs.entry.js +1 -1
- package/dist/cjs/ix-flip-tile.cjs.entry.js +4 -4
- package/dist/cjs/ix-form-field.cjs.entry.js +1 -1
- package/dist/cjs/ix-group-context-menu_2.cjs.entry.js +6 -10
- package/dist/cjs/ix-group-context-menu_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-group.cjs.entry.js +68 -44
- package/dist/cjs/ix-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-icon-button_2.cjs.entry.js +2 -2
- package/dist/cjs/ix-icon-toggle-button.cjs.entry.js +2 -2
- package/dist/cjs/ix-input-group.cjs.entry.js +2 -2
- package/dist/cjs/ix-key-value-list.cjs.entry.js +1 -1
- package/dist/cjs/ix-kpi.cjs.entry.js +3 -3
- package/dist/cjs/ix-kpi.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-link-button.cjs.entry.js +3 -3
- package/dist/cjs/ix-map-navigation-overlay.cjs.entry.js +2 -2
- package/dist/cjs/ix-map-navigation.cjs.entry.js +4 -4
- package/dist/cjs/ix-map-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-menu-about-item.cjs.entry.js +1 -1
- package/dist/cjs/ix-menu-about-news.cjs.entry.js +4 -4
- package/dist/cjs/ix-menu-avatar.cjs.entry.js +3 -3
- package/dist/cjs/ix-menu-category.cjs.entry.js +6 -6
- package/dist/cjs/ix-menu-expand-icon.cjs.entry.js +2 -2
- package/dist/cjs/ix-menu-expand-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-menu-item.cjs.entry.js +13 -13
- package/dist/cjs/ix-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-menu-settings-item.cjs.entry.js +1 -1
- package/dist/cjs/ix-menu.cjs.entry.js +14 -14
- package/dist/cjs/ix-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-message-bar.cjs.entry.js +1 -1
- package/dist/cjs/ix-modal-content_2.cjs.entry.js +3 -3
- package/dist/cjs/ix-modal-content_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-modal-example.cjs.entry.js +1 -1
- package/dist/cjs/ix-modal-footer.cjs.entry.js +2 -2
- package/dist/cjs/ix-modal-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-modal-loading.cjs.entry.js +1 -1
- package/dist/cjs/ix-modal.cjs.entry.js +3 -3
- package/dist/cjs/ix-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-pagination.cjs.entry.js +4 -4
- package/dist/cjs/ix-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-pane-layout.cjs.entry.js +2 -2
- package/dist/cjs/ix-pane.cjs.entry.js +1 -1
- package/dist/cjs/ix-pane.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-pill.cjs.entry.js +4 -4
- package/dist/cjs/ix-pill.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-playground-internal.cjs.entry.js +1 -1
- package/dist/cjs/ix-playground-internal.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-push-card.cjs.entry.js +1 -1
- package/dist/cjs/ix-push-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-select.cjs.entry.js +28 -31
- package/dist/cjs/ix-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-slider.cjs.entry.js +22 -15
- package/dist/cjs/ix-slider.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-split-button-item.cjs.entry.js +1 -1
- package/dist/cjs/ix-tab-item_2.cjs.entry.js +74 -44
- package/dist/cjs/ix-tab-item_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-tile.cjs.entry.js +4 -4
- package/dist/cjs/ix-tile.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-toast-container.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-toast.cjs.entry.js +2 -2
- package/dist/cjs/ix-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-toggle-button.cjs.entry.js +3 -3
- package/dist/cjs/ix-toggle.cjs.entry.js +3 -3
- package/dist/cjs/ix-tooltip.cjs.entry.js +25 -23
- package/dist/cjs/ix-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-tree-item.cjs.entry.js +8 -8
- package/dist/cjs/ix-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-tree.cjs.entry.js +21 -7
- package/dist/cjs/ix-tree.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-upload.cjs.entry.js +3 -3
- package/dist/cjs/ix-upload.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-validation-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/ix-workflow-step.cjs.entry.js +3 -3
- package/dist/cjs/ix-workflow-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-workflow-steps.cjs.entry.js +1 -1
- package/dist/cjs/ix-workflow-steps.cjs.entry.js.map +1 -1
- package/dist/cjs/{listener-bc3e7c0c.js → listener-a124ed49.js} +2 -2
- package/dist/cjs/{listener-bc3e7c0c.js.map → listener-a124ed49.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{logical-filter-operator-5564322e.js → logical-filter-operator-4917393f.js} +2 -2
- package/dist/cjs/{logical-filter-operator-5564322e.js.map → logical-filter-operator-4917393f.js.map} +1 -1
- package/dist/cjs/{service-a42add5f.js → service-39a8e5fe.js} +3 -3
- package/dist/cjs/service-39a8e5fe.js.map +1 -0
- package/dist/cjs/{shadow-dom-73f9d553.js → shadow-dom-454acc38.js} +2 -2
- package/dist/cjs/{shadow-dom-73f9d553.js.map → shadow-dom-454acc38.js.map} +1 -1
- package/dist/cjs/siemens-ix.cjs.js +1 -1
- package/dist/collection/components/action-card/action-card.js +6 -3
- package/dist/collection/components/action-card/action-card.js.map +1 -1
- package/dist/collection/components/application/application.css +26 -6
- package/dist/collection/components/application/application.js +1 -1
- package/dist/collection/components/application/application.js.map +1 -1
- package/dist/collection/components/application-header/application-header.css +9 -7
- package/dist/collection/components/application-header/application-header.js +78 -6
- package/dist/collection/components/application-header/application-header.js.map +1 -1
- package/dist/collection/components/application-header/application-switch-modal/application-switch-modal.js +1 -1
- package/dist/collection/components/application-sidebar/application-sidebar.js +1 -1
- package/dist/collection/components/avatar/avatar.css +42 -0
- package/dist/collection/components/basic-navigation/basic-navigation.js +7 -4
- package/dist/collection/components/basic-navigation/basic-navigation.js.map +1 -1
- package/dist/collection/components/blind/blind.css +1 -1
- package/dist/collection/components/blind/blind.js +2 -2
- package/dist/collection/components/blind/blind.js.map +1 -1
- package/dist/collection/components/blind/test/blind.ct.js +1 -1
- package/dist/collection/components/blind/test/blind.ct.js.map +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.js +2 -2
- package/dist/collection/components/card/card.css +3 -3
- package/dist/collection/components/card/card.js +7 -4
- package/dist/collection/components/card/card.js.map +1 -1
- package/dist/collection/components/card-accordion/card-accordion.css +4 -4
- package/dist/collection/components/card-content/card-content.js +1 -1
- package/dist/collection/components/card-list/card-list.css +6 -0
- package/dist/collection/components/card-list/card-list.js +5 -5
- package/dist/collection/components/card-list/card-list.js.map +1 -1
- package/dist/collection/components/card-title/card-title.js +1 -1
- package/dist/collection/components/category-filter/category-filter.js +18 -13
- package/dist/collection/components/category-filter/category-filter.js.map +1 -1
- package/dist/collection/components/category-filter/logical-filter-operator.js +1 -1
- package/dist/collection/components/category-filter/logical-filter-operator.js.map +1 -1
- package/dist/collection/components/category-filter/test/category-filter.ct.js +52 -0
- package/dist/collection/components/category-filter/test/category-filter.ct.js.map +1 -0
- package/dist/collection/components/chip/chip.css +2 -2
- package/dist/collection/components/chip/chip.js +5 -5
- package/dist/collection/components/chip/chip.js.map +1 -1
- package/dist/collection/components/col/col.css +1 -1
- package/dist/collection/components/col/col.js +1 -1
- package/dist/collection/components/col/col.js.map +1 -1
- package/dist/collection/components/content/content.js +3 -3
- package/dist/collection/components/css-grid/css-grid-item.js +1 -1
- package/dist/collection/components/divider/divider.js +1 -1
- package/dist/collection/components/drawer/drawer.js +2 -2
- package/dist/collection/components/dropdown/dropdown.js +10 -6
- package/dist/collection/components/dropdown/dropdown.js.map +1 -1
- package/dist/collection/components/dropdown-header/dropdown-header.js +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.css +3 -3
- package/dist/collection/components/dropdown-item/dropdown-item.js +5 -5
- package/dist/collection/components/dropdown-item/dropdown-item.js.map +1 -1
- package/dist/collection/components/dropdown-quick-actions/dropdown-quick-actions.js +1 -1
- package/dist/collection/components/event-list/event-list.js +2 -2
- package/dist/collection/components/event-list-item/event-list-item.js +4 -4
- package/dist/collection/components/expanding-search/expanding-search.js +4 -4
- package/dist/collection/components/filter-chip/filter-chip.js +1 -1
- package/dist/collection/components/flip-tile/flip-tile.js +4 -4
- package/dist/collection/components/flip-tile-content/flip-tile-content.js +1 -1
- package/dist/collection/components/form-field/form-field.js +1 -1
- package/dist/collection/components/grid/layout-grid.css +1 -1
- package/dist/collection/components/grid/layout-grid.js +3 -3
- package/dist/collection/components/grid/layout-grid.js.map +1 -1
- package/dist/collection/components/group/group-context-menu.css +1 -1
- package/dist/collection/components/group/group-context-menu.js +2 -2
- package/dist/collection/components/group/group-context-menu.js.map +1 -1
- package/dist/collection/components/group/group.css +3 -2
- package/dist/collection/components/group/group.js +84 -48
- package/dist/collection/components/group/group.js.map +1 -1
- package/dist/collection/components/group/test/group.ct.js +70 -2
- package/dist/collection/components/group/test/group.ct.js.map +1 -1
- package/dist/collection/components/group-item/group-item.css +0 -4
- package/dist/collection/components/group-item/group-item.js +9 -12
- package/dist/collection/components/group-item/group-item.js.map +1 -1
- package/dist/collection/components/icon-toggle-button/icon-toggle-button.js +1 -1
- package/dist/collection/components/input-group/input-group.js +1 -1
- package/dist/collection/components/key-value-list/key-value-list.js +1 -1
- package/dist/collection/components/kpi/kpi.css +1 -1
- package/dist/collection/components/kpi/kpi.js +4 -4
- package/dist/collection/components/kpi/kpi.js.map +1 -1
- package/dist/collection/components/link-button/link-button.js +3 -3
- package/dist/collection/components/map-navigation/map-navigation.css +3 -3
- package/dist/collection/components/map-navigation/map-navigation.js +2 -2
- package/dist/collection/components/map-navigation-overlay/map-navigation-overlay.js +2 -2
- package/dist/collection/components/menu/menu-expand-icon.css +1 -1
- package/dist/collection/components/menu/menu-expand-icon.js +3 -3
- package/dist/collection/components/menu/menu-expand-icon.js.map +1 -1
- package/dist/collection/components/menu/menu.css +4 -3
- package/dist/collection/components/menu/menu.js +12 -12
- package/dist/collection/components/menu/menu.js.map +1 -1
- package/dist/collection/components/menu/test/menu.ct.js +1 -1
- package/dist/collection/components/menu/test/menu.ct.js.map +1 -1
- package/dist/collection/components/menu-about-item/menu-about-item.js +1 -1
- package/dist/collection/components/menu-about-news/menu-about-news.js +4 -4
- package/dist/collection/components/menu-avatar/menu-avatar.js +2 -2
- package/dist/collection/components/menu-avatar-item/menu-avatar-item.js +1 -1
- package/dist/collection/components/menu-category/menu-category.js +5 -5
- package/dist/collection/components/menu-item/menu-item.js +24 -21
- package/dist/collection/components/menu-item/menu-item.js.map +1 -1
- package/dist/collection/components/menu-settings-item/menu-settings-item.js +1 -1
- package/dist/collection/components/message-bar/message-bar.js +1 -1
- package/dist/collection/components/modal/modal.css +18 -8
- package/dist/collection/components/modal/modal.js +1 -1
- package/dist/collection/components/modal/modal.js.map +1 -1
- package/dist/collection/components/modal/test/modal.ct.js +1 -1
- package/dist/collection/components/modal/test/modal.ct.js.map +1 -1
- package/dist/collection/components/modal-content/modal-content.css +1 -1
- package/dist/collection/components/modal-content/modal-content.js +1 -1
- package/dist/collection/components/modal-footer/modal-footer.css +1 -0
- package/dist/collection/components/modal-footer/modal-footer.js +1 -1
- package/dist/collection/components/modal-header/modal-header.js +2 -2
- package/dist/collection/components/modal-header/modal-header.js.map +1 -1
- package/dist/collection/components/modal-loading/modal-loading.js +1 -1
- package/dist/collection/components/pagination/pagination.js +5 -4
- package/dist/collection/components/pagination/pagination.js.map +1 -1
- package/dist/collection/components/pane/pane.css +1 -1
- package/dist/collection/components/pane/pane.js +1 -1
- package/dist/collection/components/pane/pane.js.map +1 -1
- package/dist/collection/components/pane/test/panes.ct.js +1 -1
- package/dist/collection/components/pane/test/panes.ct.js.map +1 -1
- package/dist/collection/components/pane-layout/pane-layout.js +1 -1
- package/dist/collection/components/pill/pill.css +2 -2
- package/dist/collection/components/pill/pill.js +5 -5
- package/dist/collection/components/pill/pill.js.map +1 -1
- package/dist/collection/components/playground/example-modal.js +1 -1
- package/dist/collection/components/playground/playground.js +2 -2
- package/dist/collection/components/playground/playground.js.map +1 -1
- package/dist/collection/components/push-card/push-card.js +9 -6
- package/dist/collection/components/push-card/push-card.js.map +1 -1
- package/dist/collection/components/row/row.css +1 -1
- package/dist/collection/components/row/row.js +2 -2
- package/dist/collection/components/row/row.js.map +1 -1
- package/dist/collection/components/select/select.js +27 -30
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/select/test/select.ct.js +45 -1
- package/dist/collection/components/select/test/select.ct.js.map +1 -1
- package/dist/collection/components/select-item/select-item.js +1 -1
- package/dist/collection/components/slider/slider.css +1 -1
- package/dist/collection/components/slider/slider.js +23 -15
- package/dist/collection/components/slider/slider.js.map +1 -1
- package/dist/collection/components/slider/test/slider.ct.js +15 -6
- package/dist/collection/components/slider/test/slider.ct.js.map +1 -1
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-button-item/split-button-item.js +1 -1
- package/dist/collection/components/tab-item/tab-item.js +4 -4
- package/dist/collection/components/tab-item/tab-item.js.map +1 -1
- package/dist/collection/components/tabs/tabs.css +1 -1
- package/dist/collection/components/tabs/tabs.js +78 -43
- package/dist/collection/components/tabs/tabs.js.map +1 -1
- package/dist/collection/components/tabs/test/tabs.ct.js +35 -9
- package/dist/collection/components/tabs/test/tabs.ct.js.map +1 -1
- package/dist/collection/components/tile/tile.css +1 -1
- package/dist/collection/components/tile/tile.js +5 -5
- package/dist/collection/components/tile/tile.js.map +1 -1
- package/dist/collection/components/toast/styles/toast-container.css +1 -1
- package/dist/collection/components/toast/toast-container.js +1 -1
- package/dist/collection/components/toast/toast-container.js.map +1 -1
- package/dist/collection/components/toast/toast-utils.js.map +1 -1
- package/dist/collection/components/toast/toast.css +1 -1
- package/dist/collection/components/toast/toast.js +3 -3
- package/dist/collection/components/toast/toast.js.map +1 -1
- package/dist/collection/components/toggle/toggle.js +2 -2
- package/dist/collection/components/toggle-button/toggle-button.js +2 -2
- package/dist/collection/components/tooltip/tooltip.css +15 -5
- package/dist/collection/components/tooltip/tooltip.js +33 -26
- package/dist/collection/components/tooltip/tooltip.js.map +1 -1
- package/dist/collection/components/tree/test/tree.ct.js +37 -1
- package/dist/collection/components/tree/test/tree.ct.js.map +1 -1
- package/dist/collection/components/tree/tree-model.js.map +1 -1
- package/dist/collection/components/tree/tree.css +1 -1
- package/dist/collection/components/tree/tree.js +26 -11
- package/dist/collection/components/tree/tree.js.map +1 -1
- package/dist/collection/components/tree-item/tree-item.css +9 -0
- package/dist/collection/components/tree-item/tree-item.js +13 -12
- package/dist/collection/components/tree-item/tree-item.js.map +1 -1
- package/dist/collection/components/upload/upload.js +4 -4
- package/dist/collection/components/upload/upload.js.map +1 -1
- package/dist/collection/components/utils/application-layout/service.js +2 -2
- package/dist/collection/components/utils/application-layout/service.js.map +1 -1
- package/dist/collection/components/utils/condition-checks.js +1 -1
- package/dist/collection/components/utils/condition-checks.js.map +1 -1
- package/dist/collection/components/utils/context.js +1 -1
- package/dist/collection/components/utils/context.js.map +1 -1
- package/dist/collection/components/utils/listener.js +1 -1
- package/dist/collection/components/utils/listener.js.map +1 -1
- package/dist/collection/components/utils/notification-color.js.map +1 -1
- package/dist/collection/components/utils/shadow-dom.js +1 -1
- package/dist/collection/components/utils/shadow-dom.js.map +1 -1
- package/dist/collection/components/validation-tooltip/validation-tooltip.js +2 -2
- package/dist/collection/components/workflow-step/workflow-step.css +1 -1
- package/dist/collection/components/workflow-step/workflow-step.js +4 -4
- package/dist/collection/components/workflow-step/workflow-step.js.map +1 -1
- package/dist/collection/components/workflow-steps/test/workflow-steps.ct.js +2 -2
- package/dist/collection/components/workflow-steps/test/workflow-steps.ct.js.map +1 -1
- package/dist/collection/components/workflow-steps/workflow-steps.css +1 -1
- package/dist/collection/components/workflow-steps/workflow-steps.js +2 -2
- package/dist/collection/components/workflow-steps/workflow-steps.js.map +1 -1
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/tests/application-header/application-header.e2e.js +9 -0
- package/dist/collection/tests/application-header/application-header.e2e.js.map +1 -1
- package/dist/collection/tests/avatar/avatar.e2e.js +6 -0
- package/dist/collection/tests/avatar/avatar.e2e.js.map +1 -1
- package/dist/collection/tests/card-list/card-list.e2e.js +7 -1
- package/dist/collection/tests/card-list/card-list.e2e.js.map +1 -1
- package/dist/collection/tests/dropdown/dropdown.e2e.js +6 -0
- package/dist/collection/tests/dropdown/dropdown.e2e.js.map +1 -1
- package/dist/collection/tests/group/group.e2e.js +12 -3
- package/dist/collection/tests/group/group.e2e.js.map +1 -1
- package/dist/collection/tests/slider/slider.e2e.js +14 -0
- package/dist/collection/tests/slider/slider.e2e.js.map +1 -1
- package/dist/collection/tests/tabs/tabs.e2e.js +1 -1
- package/dist/collection/tests/tabs/tabs.e2e.js.map +1 -1
- package/dist/collection/tests/tooltip/tooltip.e2e.js +22 -0
- package/dist/collection/tests/tooltip/tooltip.e2e.js.map +1 -1
- package/dist/collection/tests/tree/tree.e2e.js +12 -0
- package/dist/collection/tests/tree/tree.e2e.js.map +1 -1
- package/dist/esm/{a11y-d5444a76.js → a11y-2e34777f.js} +2 -2
- package/dist/esm/{a11y-d5444a76.js.map → a11y-2e34777f.js.map} +1 -1
- package/dist/esm/{context-c9078420.js → context-82a1ccf8.js} +2 -2
- package/dist/esm/{context-c9078420.js.map → context-82a1ccf8.js.map} +1 -1
- package/dist/esm/dropdown-controller-95bd6750.js +140 -0
- package/dist/esm/dropdown-controller-95bd6750.js.map +1 -0
- package/dist/esm/{floating-ui.dom.esm-6e7c098f.js → floating-ui.dom.esm-d4ad786a.js} +534 -61
- package/dist/esm/floating-ui.dom.esm-d4ad786a.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/ix-action-card.entry.js +1 -1
- package/dist/esm/ix-action-card.entry.js.map +1 -1
- package/dist/esm/ix-application-header.entry.js +36 -10
- package/dist/esm/ix-application-header.entry.js.map +1 -1
- package/dist/esm/ix-application-sidebar.entry.js +1 -1
- package/dist/esm/ix-application-switch-modal.entry.js +1 -1
- package/dist/esm/ix-application.entry.js +5 -5
- package/dist/esm/ix-application.entry.js.map +1 -1
- package/dist/esm/ix-avatar_2.entry.js +3 -3
- package/dist/esm/ix-avatar_2.entry.js.map +1 -1
- package/dist/esm/ix-basic-navigation.entry.js +4 -4
- package/dist/esm/ix-basic-navigation.entry.js.map +1 -1
- package/dist/esm/ix-blind.entry.js +1 -1
- package/dist/esm/ix-blind.entry.js.map +1 -1
- package/dist/esm/ix-breadcrumb-item.entry.js +1 -1
- package/dist/esm/ix-breadcrumb.entry.js +3 -3
- package/dist/esm/ix-card-accordion_2.entry.js +2 -2
- package/dist/esm/ix-card-accordion_2.entry.js.map +1 -1
- package/dist/esm/ix-card-list.entry.js +6 -6
- package/dist/esm/ix-card-list.entry.js.map +1 -1
- package/dist/esm/ix-card_2.entry.js +4 -4
- package/dist/esm/ix-card_2.entry.js.map +1 -1
- package/dist/esm/ix-category-filter.entry.js +9 -5
- package/dist/esm/ix-category-filter.entry.js.map +1 -1
- package/dist/esm/ix-chip.entry.js +4 -4
- package/dist/esm/ix-chip.entry.js.map +1 -1
- package/dist/esm/ix-col_4.entry.js +4 -4
- package/dist/esm/ix-col_4.entry.js.map +1 -1
- package/dist/esm/ix-content.entry.js +4 -4
- package/dist/esm/ix-css-grid-item.entry.js +1 -1
- package/dist/esm/ix-divider.entry.js +1 -1
- package/dist/esm/ix-drawer.entry.js +2 -2
- package/dist/esm/ix-dropdown-header.entry.js +1 -1
- package/dist/esm/ix-dropdown-item.entry.js +4 -4
- package/dist/esm/ix-dropdown-item.entry.js.map +1 -1
- package/dist/esm/ix-dropdown-quick-actions.entry.js +1 -1
- package/dist/esm/ix-dropdown.entry.js +12 -144
- package/dist/esm/ix-dropdown.entry.js.map +1 -1
- package/dist/esm/ix-event-list-item.entry.js +5 -5
- package/dist/esm/ix-event-list.entry.js +2 -2
- package/dist/esm/ix-expanding-search.entry.js +4 -4
- package/dist/esm/ix-filter-chip_2.entry.js +2 -2
- package/dist/esm/ix-flip-tile-content.entry.js +1 -1
- package/dist/esm/ix-flip-tile.entry.js +4 -4
- package/dist/esm/ix-form-field.entry.js +1 -1
- package/dist/esm/ix-group-context-menu_2.entry.js +6 -10
- package/dist/esm/ix-group-context-menu_2.entry.js.map +1 -1
- package/dist/esm/ix-group.entry.js +68 -44
- package/dist/esm/ix-group.entry.js.map +1 -1
- package/dist/esm/ix-icon-button_2.entry.js +2 -2
- package/dist/esm/ix-icon-toggle-button.entry.js +2 -2
- package/dist/esm/ix-input-group.entry.js +2 -2
- package/dist/esm/ix-key-value-list.entry.js +1 -1
- package/dist/esm/ix-kpi.entry.js +3 -3
- package/dist/esm/ix-kpi.entry.js.map +1 -1
- package/dist/esm/ix-link-button.entry.js +3 -3
- package/dist/esm/ix-map-navigation-overlay.entry.js +2 -2
- package/dist/esm/ix-map-navigation.entry.js +4 -4
- package/dist/esm/ix-map-navigation.entry.js.map +1 -1
- package/dist/esm/ix-menu-about-item.entry.js +1 -1
- package/dist/esm/ix-menu-about-news.entry.js +4 -4
- package/dist/esm/ix-menu-avatar.entry.js +3 -3
- package/dist/esm/ix-menu-category.entry.js +6 -6
- package/dist/esm/ix-menu-expand-icon.entry.js +2 -2
- package/dist/esm/ix-menu-expand-icon.entry.js.map +1 -1
- package/dist/esm/ix-menu-item.entry.js +14 -14
- package/dist/esm/ix-menu-item.entry.js.map +1 -1
- package/dist/esm/ix-menu-settings-item.entry.js +1 -1
- package/dist/esm/ix-menu.entry.js +14 -14
- package/dist/esm/ix-menu.entry.js.map +1 -1
- package/dist/esm/ix-message-bar.entry.js +1 -1
- package/dist/esm/ix-modal-content_2.entry.js +3 -3
- package/dist/esm/ix-modal-content_2.entry.js.map +1 -1
- package/dist/esm/ix-modal-example.entry.js +1 -1
- package/dist/esm/ix-modal-footer.entry.js +2 -2
- package/dist/esm/ix-modal-footer.entry.js.map +1 -1
- package/dist/esm/ix-modal-loading.entry.js +1 -1
- package/dist/esm/ix-modal.entry.js +3 -3
- package/dist/esm/ix-modal.entry.js.map +1 -1
- package/dist/esm/ix-pagination.entry.js +4 -4
- package/dist/esm/ix-pagination.entry.js.map +1 -1
- package/dist/esm/ix-pane-layout.entry.js +2 -2
- package/dist/esm/ix-pane.entry.js +1 -1
- package/dist/esm/ix-pane.entry.js.map +1 -1
- package/dist/esm/ix-pill.entry.js +4 -4
- package/dist/esm/ix-pill.entry.js.map +1 -1
- package/dist/esm/ix-playground-internal.entry.js +1 -1
- package/dist/esm/ix-playground-internal.entry.js.map +1 -1
- package/dist/esm/ix-push-card.entry.js +1 -1
- package/dist/esm/ix-push-card.entry.js.map +1 -1
- package/dist/esm/ix-select.entry.js +28 -31
- package/dist/esm/ix-select.entry.js.map +1 -1
- package/dist/esm/ix-slider.entry.js +22 -15
- package/dist/esm/ix-slider.entry.js.map +1 -1
- package/dist/esm/ix-split-button-item.entry.js +1 -1
- package/dist/esm/ix-tab-item_2.entry.js +74 -44
- package/dist/esm/ix-tab-item_2.entry.js.map +1 -1
- package/dist/esm/ix-tile.entry.js +4 -4
- package/dist/esm/ix-tile.entry.js.map +1 -1
- package/dist/esm/ix-toast-container.entry.js.map +1 -1
- package/dist/esm/ix-toast.entry.js +2 -2
- package/dist/esm/ix-toast.entry.js.map +1 -1
- package/dist/esm/ix-toggle-button.entry.js +3 -3
- package/dist/esm/ix-toggle.entry.js +3 -3
- package/dist/esm/ix-tooltip.entry.js +25 -23
- package/dist/esm/ix-tooltip.entry.js.map +1 -1
- package/dist/esm/ix-tree-item.entry.js +8 -8
- package/dist/esm/ix-tree-item.entry.js.map +1 -1
- package/dist/esm/ix-tree.entry.js +21 -7
- package/dist/esm/ix-tree.entry.js.map +1 -1
- package/dist/esm/ix-upload.entry.js +3 -3
- package/dist/esm/ix-upload.entry.js.map +1 -1
- package/dist/esm/ix-validation-tooltip.entry.js +3 -3
- package/dist/esm/ix-workflow-step.entry.js +3 -3
- package/dist/esm/ix-workflow-step.entry.js.map +1 -1
- package/dist/esm/ix-workflow-steps.entry.js +1 -1
- package/dist/esm/ix-workflow-steps.entry.js.map +1 -1
- package/dist/esm/{listener-4f3baab5.js → listener-2c562054.js} +2 -2
- package/dist/esm/{listener-4f3baab5.js.map → listener-2c562054.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{logical-filter-operator-f6701df5.js → logical-filter-operator-d793d1c3.js} +2 -2
- package/dist/esm/{logical-filter-operator-f6701df5.js.map → logical-filter-operator-d793d1c3.js.map} +1 -1
- package/dist/esm/{service-02cc9011.js → service-c7fc628b.js} +3 -3
- package/dist/esm/service-c7fc628b.js.map +1 -0
- package/dist/esm/{shadow-dom-60e9243d.js → shadow-dom-cc0bc152.js} +2 -2
- package/dist/esm/{shadow-dom-60e9243d.js.map → shadow-dom-cc0bc152.js.map} +1 -1
- package/dist/esm/siemens-ix.js +1 -1
- package/dist/siemens-ix/index.esm.js +1 -1
- package/dist/siemens-ix/index.esm.js.map +1 -1
- package/dist/siemens-ix/p-04af3853.entry.js +2 -0
- package/dist/siemens-ix/p-04ec538b.entry.js +2 -0
- package/dist/siemens-ix/p-04ec538b.entry.js.map +1 -0
- package/dist/siemens-ix/{p-68644ee1.entry.js → p-05dc6b2d.entry.js} +2 -2
- package/dist/siemens-ix/{p-68644ee1.entry.js.map → p-05dc6b2d.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-af099ca4.entry.js → p-0632731e.entry.js} +2 -2
- package/dist/siemens-ix/{p-6af4415c.entry.js → p-085d5ec2.entry.js} +2 -2
- package/dist/siemens-ix/{p-6af4415c.entry.js.map → p-085d5ec2.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-0d2a6886.entry.js → p-091b036d.entry.js} +2 -2
- package/dist/siemens-ix/{p-453fa360.entry.js → p-0ef97555.entry.js} +2 -2
- package/dist/siemens-ix/{p-453fa360.entry.js.map → p-0ef97555.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-2946fd70.entry.js → p-0fafba48.entry.js} +2 -2
- package/dist/siemens-ix/{p-7076210b.entry.js → p-1483f65d.entry.js} +2 -2
- package/dist/siemens-ix/{p-4f8ac3bf.js → p-157b1b28.js} +1 -1
- package/dist/siemens-ix/{p-4f8ac3bf.js.map → p-157b1b28.js.map} +1 -1
- package/dist/siemens-ix/p-15f44099.entry.js +2 -0
- package/dist/siemens-ix/{p-87e692d9.entry.js.map → p-15f44099.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-2908cacd.entry.js → p-17a8aab2.entry.js} +2 -2
- package/dist/siemens-ix/{p-2908cacd.entry.js.map → p-17a8aab2.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-c1968b80.entry.js → p-1bd98772.entry.js} +2 -2
- package/dist/siemens-ix/p-1c3a0b1f.js +2 -0
- package/dist/siemens-ix/p-1c3a0b1f.js.map +1 -0
- package/dist/siemens-ix/{p-8629db91.entry.js → p-25f1749c.entry.js} +2 -2
- package/dist/siemens-ix/{p-5696bb62.entry.js → p-306269ae.entry.js} +2 -2
- package/dist/siemens-ix/{p-ae7a7af4.entry.js → p-33a7a26d.entry.js} +2 -2
- package/dist/siemens-ix/{p-ae7a7af4.entry.js.map → p-33a7a26d.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-712e0ee0.js → p-345e1c73.js} +1 -1
- package/dist/siemens-ix/{p-712e0ee0.js.map → p-345e1c73.js.map} +1 -1
- package/dist/siemens-ix/p-35fff1e6.entry.js +2 -0
- package/dist/siemens-ix/{p-9ebc4fc3.entry.js → p-37229f30.entry.js} +2 -2
- package/dist/siemens-ix/{p-9ebc4fc3.entry.js.map → p-37229f30.entry.js.map} +1 -1
- package/dist/siemens-ix/p-3dc1294b.entry.js +2 -0
- package/dist/siemens-ix/{p-e9a3f58a.entry.js.map → p-3dc1294b.entry.js.map} +1 -1
- package/dist/siemens-ix/p-3f59a3c3.entry.js +2 -0
- package/dist/siemens-ix/p-3f59a3c3.entry.js.map +1 -0
- package/dist/siemens-ix/p-411f51c5.entry.js +2 -0
- package/dist/siemens-ix/{p-f78246bd.entry.js → p-44a27b29.entry.js} +2 -2
- package/dist/siemens-ix/{p-d03df401.entry.js → p-49d3fc15.entry.js} +2 -2
- package/dist/siemens-ix/{p-25ee1b62.js → p-4ac31849.js} +1 -1
- package/dist/siemens-ix/{p-25ee1b62.js.map → p-4ac31849.js.map} +1 -1
- package/dist/siemens-ix/{p-112069ca.entry.js → p-4e547dd3.entry.js} +2 -2
- package/dist/siemens-ix/p-4e547dd3.entry.js.map +1 -0
- package/dist/siemens-ix/p-5099c070.entry.js +2 -0
- package/dist/siemens-ix/p-5099c070.entry.js.map +1 -0
- package/dist/siemens-ix/{p-6b928634.entry.js → p-5351225b.entry.js} +2 -2
- package/dist/siemens-ix/p-5351225b.entry.js.map +1 -0
- package/dist/siemens-ix/p-5aa0b93c.entry.js.map +1 -1
- package/dist/siemens-ix/{p-113cc793.entry.js → p-5af99eaa.entry.js} +2 -2
- package/dist/siemens-ix/{p-e30ed20a.entry.js → p-62b089b6.entry.js} +2 -2
- package/dist/siemens-ix/{p-e30ed20a.entry.js.map → p-62b089b6.entry.js.map} +1 -1
- package/dist/siemens-ix/p-63f0755e.entry.js +2 -0
- package/dist/siemens-ix/{p-14a41c8c.entry.js → p-6618b2db.entry.js} +2 -2
- package/dist/siemens-ix/{p-0653a145.entry.js → p-67f44540.entry.js} +2 -2
- package/dist/siemens-ix/{p-15b3c17e.entry.js → p-6e4c9e3d.entry.js} +2 -2
- package/dist/siemens-ix/{p-15b3c17e.entry.js.map → p-6e4c9e3d.entry.js.map} +1 -1
- package/dist/siemens-ix/p-7402f42a.entry.js +2 -0
- package/dist/siemens-ix/p-7402f42a.entry.js.map +1 -0
- package/dist/siemens-ix/{p-53352bfb.entry.js → p-77273517.entry.js} +2 -2
- package/dist/siemens-ix/{p-882a0233.entry.js → p-78ac2ff1.entry.js} +2 -2
- package/dist/siemens-ix/p-7947ef3d.entry.js +2 -0
- package/dist/siemens-ix/{p-fb47546b.entry.js → p-7c2f34f0.entry.js} +2 -2
- package/dist/siemens-ix/p-82d33168.entry.js +2 -0
- package/dist/siemens-ix/p-82f9d976.entry.js +2 -0
- package/dist/siemens-ix/p-82f9d976.entry.js.map +1 -0
- package/dist/siemens-ix/{p-85423643.entry.js → p-86bbc005.entry.js} +2 -2
- package/dist/siemens-ix/p-86bbc005.entry.js.map +1 -0
- package/dist/siemens-ix/p-86fd5922.entry.js +2 -0
- package/dist/siemens-ix/p-86fd5922.entry.js.map +1 -0
- package/dist/siemens-ix/p-89e48bea.entry.js +2 -0
- package/dist/siemens-ix/p-89e48bea.entry.js.map +1 -0
- package/dist/siemens-ix/{p-052340f9.entry.js → p-8acc09aa.entry.js} +2 -2
- package/dist/siemens-ix/{p-6fd7ecd0.entry.js → p-9079f6c8.entry.js} +2 -2
- package/dist/siemens-ix/p-928209e1.entry.js +2 -0
- package/dist/siemens-ix/p-928209e1.entry.js.map +1 -0
- package/dist/siemens-ix/{p-e8d3cf35.entry.js → p-958c5970.entry.js} +2 -2
- package/dist/siemens-ix/{p-e8d3cf35.entry.js.map → p-958c5970.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-16b923e9.entry.js → p-9bdda7ff.entry.js} +2 -2
- package/dist/siemens-ix/p-a08efce0.entry.js +2 -0
- package/dist/siemens-ix/p-a08efce0.entry.js.map +1 -0
- package/dist/siemens-ix/p-a4755205.entry.js +2 -0
- package/dist/siemens-ix/p-a4755205.entry.js.map +1 -0
- package/dist/siemens-ix/{p-2c4c03d4.entry.js → p-aa814811.entry.js} +2 -2
- package/dist/siemens-ix/{p-7c36d3fa.js → p-accec846.js} +1 -1
- package/dist/siemens-ix/{p-7c36d3fa.js.map → p-accec846.js.map} +1 -1
- package/dist/siemens-ix/{p-8d599677.entry.js → p-adee6045.entry.js} +2 -2
- package/dist/siemens-ix/{p-8d599677.entry.js.map → p-adee6045.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-d95cbd1f.entry.js → p-ae31be0d.entry.js} +2 -2
- package/dist/siemens-ix/{p-d95cbd1f.entry.js.map → p-ae31be0d.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-feac09bc.entry.js → p-ba24e694.entry.js} +2 -2
- package/dist/siemens-ix/p-ba6e955a.js +2 -0
- package/dist/siemens-ix/p-ba6e955a.js.map +1 -0
- package/dist/siemens-ix/p-c022d6cc.entry.js +2 -0
- package/dist/siemens-ix/{p-eb6268a6.entry.js.map → p-c022d6cc.entry.js.map} +1 -1
- package/dist/siemens-ix/p-c05a98c8.entry.js +2 -0
- package/dist/siemens-ix/{p-29df2e29.entry.js → p-c072ddb5.entry.js} +2 -2
- package/dist/siemens-ix/p-c072ddb5.entry.js.map +1 -0
- package/dist/siemens-ix/p-c1fe9f3d.entry.js +2 -0
- package/dist/siemens-ix/p-c1fe9f3d.entry.js.map +1 -0
- package/dist/siemens-ix/{p-c389de85.entry.js → p-c33cee36.entry.js} +2 -2
- package/dist/siemens-ix/{p-c389de85.entry.js.map → p-c33cee36.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-0b4e398e.entry.js → p-c62966f8.entry.js} +2 -2
- package/dist/siemens-ix/{p-0b4e398e.entry.js.map → p-c62966f8.entry.js.map} +1 -1
- package/dist/siemens-ix/p-c7280736.entry.js +2 -0
- package/dist/siemens-ix/{p-0f7ef743.entry.js.map → p-c7280736.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-8d0758c1.entry.js → p-c7e58e9e.entry.js} +2 -2
- package/dist/siemens-ix/{p-4430117a.entry.js → p-c81c4b9d.entry.js} +2 -2
- package/dist/siemens-ix/p-cc65617d.entry.js +2 -0
- package/dist/siemens-ix/p-cc65617d.entry.js.map +1 -0
- package/dist/siemens-ix/{p-1a122c76.entry.js → p-d300b332.entry.js} +2 -2
- package/dist/siemens-ix/p-d6fc0727.entry.js +2 -0
- package/dist/siemens-ix/p-d6fc0727.entry.js.map +1 -0
- package/dist/siemens-ix/p-df370362.entry.js +2 -0
- package/dist/siemens-ix/p-df370362.entry.js.map +1 -0
- package/dist/siemens-ix/{p-5f25e7fd.entry.js → p-e0d03d67.entry.js} +2 -2
- package/dist/siemens-ix/{p-5f25e7fd.entry.js.map → p-e0d03d67.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-ff1ac5b3.entry.js → p-e14384df.entry.js} +2 -2
- package/dist/siemens-ix/{p-fb2b78f7.entry.js → p-e35805d0.entry.js} +2 -2
- package/dist/siemens-ix/p-e35805d0.entry.js.map +1 -0
- package/dist/siemens-ix/{p-0c8a98cd.js → p-e948bcb0.js} +1 -1
- package/dist/siemens-ix/{p-0c8a98cd.js.map → p-e948bcb0.js.map} +1 -1
- package/dist/siemens-ix/{p-96a3a750.entry.js → p-e95a5a97.entry.js} +2 -2
- package/dist/siemens-ix/p-e95a5a97.entry.js.map +1 -0
- package/dist/siemens-ix/p-ed7e76a3.entry.js +2 -0
- package/dist/siemens-ix/p-ed7e76a3.entry.js.map +1 -0
- package/dist/siemens-ix/{p-bea7c748.entry.js → p-ee96d1eb.entry.js} +2 -2
- package/dist/siemens-ix/p-f001ecc1.entry.js +2 -0
- package/dist/siemens-ix/p-f001ecc1.entry.js.map +1 -0
- package/dist/siemens-ix/p-f06b21f9.entry.js +2 -0
- package/dist/siemens-ix/p-f06b21f9.entry.js.map +1 -0
- package/dist/siemens-ix/{p-702f9349.js → p-fbe017b7.js} +2 -2
- package/dist/siemens-ix/p-fbe017b7.js.map +1 -0
- package/dist/siemens-ix/{p-7750e187.entry.js → p-fd5bee44.entry.js} +2 -2
- package/dist/siemens-ix/p-fefd5743.entry.js +2 -0
- package/dist/siemens-ix/p-fefd5743.entry.js.map +1 -0
- package/dist/siemens-ix/{p-dcb3e5be.entry.js → p-ffa856df.entry.js} +2 -2
- package/dist/siemens-ix/siemens-ix-core.css +1 -1
- package/dist/siemens-ix/siemens-ix.css +5 -1
- package/dist/siemens-ix/siemens-ix.esm.js +1 -1
- package/dist/siemens-ix/siemens-ix.esm.js.map +1 -1
- package/dist/types/components/action-card/action-card.d.ts +1 -0
- package/dist/types/components/application-header/application-header.d.ts +19 -1
- package/dist/types/components/basic-navigation/basic-navigation.d.ts +2 -1
- package/dist/types/components/card/card.d.ts +2 -1
- package/dist/types/components/category-filter/category-filter.d.ts +9 -9
- package/dist/types/components/category-filter/test/category-filter.ct.d.ts +1 -0
- package/dist/types/components/dropdown/dropdown.d.ts +1 -0
- package/dist/types/components/dropdown-item/dropdown-item.d.ts +2 -2
- package/dist/types/components/group/group.d.ts +7 -6
- package/dist/types/components/group-item/group-item.d.ts +4 -4
- package/dist/types/components/menu-item/menu-item.d.ts +6 -5
- package/dist/types/components/push-card/push-card.d.ts +4 -3
- package/dist/types/components/slider/slider.d.ts +3 -3
- package/dist/types/components/tab-item/tab-item.d.ts +1 -1
- package/dist/types/components/tabs/tabs.d.ts +7 -4
- package/dist/types/components/tooltip/tooltip.d.ts +9 -10
- package/dist/types/components/tree/tree.d.ts +1 -1
- package/dist/types/components/tree-item/tree-item.d.ts +3 -3
- package/dist/types/components.d.ts +83 -43
- package/dist/types/index.d.ts +1 -0
- package/hydrate/index.js +994 -416
- package/package.json +3 -2
- package/scss/_core.scss +5 -0
- package/dist/cjs/floating-ui.dom.esm-94b4d17c.js.map +0 -1
- package/dist/cjs/service-a42add5f.js.map +0 -1
- package/dist/esm/floating-ui.dom.esm-6e7c098f.js.map +0 -1
- package/dist/esm/service-02cc9011.js.map +0 -1
- package/dist/siemens-ix/p-0f7ef743.entry.js +0 -2
- package/dist/siemens-ix/p-112069ca.entry.js.map +0 -1
- package/dist/siemens-ix/p-1cff59db.entry.js +0 -2
- package/dist/siemens-ix/p-1cff59db.entry.js.map +0 -1
- package/dist/siemens-ix/p-1f4b8463.entry.js +0 -2
- package/dist/siemens-ix/p-1f4b8463.entry.js.map +0 -1
- package/dist/siemens-ix/p-29df2e29.entry.js.map +0 -1
- package/dist/siemens-ix/p-2ec7f841.entry.js +0 -2
- package/dist/siemens-ix/p-2ec7f841.entry.js.map +0 -1
- package/dist/siemens-ix/p-309ac3ad.entry.js +0 -2
- package/dist/siemens-ix/p-309ac3ad.entry.js.map +0 -1
- package/dist/siemens-ix/p-315f070d.entry.js +0 -2
- package/dist/siemens-ix/p-315f070d.entry.js.map +0 -1
- package/dist/siemens-ix/p-32375ddb.entry.js +0 -2
- package/dist/siemens-ix/p-427676f4.entry.js +0 -2
- package/dist/siemens-ix/p-427676f4.entry.js.map +0 -1
- package/dist/siemens-ix/p-4344ba99.entry.js +0 -2
- package/dist/siemens-ix/p-4344ba99.entry.js.map +0 -1
- package/dist/siemens-ix/p-44db3646.entry.js +0 -2
- package/dist/siemens-ix/p-4b3facea.entry.js +0 -2
- package/dist/siemens-ix/p-4b3facea.entry.js.map +0 -1
- package/dist/siemens-ix/p-52857629.entry.js +0 -2
- package/dist/siemens-ix/p-52857629.entry.js.map +0 -1
- package/dist/siemens-ix/p-60c16878.entry.js +0 -2
- package/dist/siemens-ix/p-60c16878.entry.js.map +0 -1
- package/dist/siemens-ix/p-6227e62b.entry.js +0 -2
- package/dist/siemens-ix/p-6227e62b.entry.js.map +0 -1
- package/dist/siemens-ix/p-6b928634.entry.js.map +0 -1
- package/dist/siemens-ix/p-702f9349.js.map +0 -1
- package/dist/siemens-ix/p-7bfd6cd2.entry.js +0 -2
- package/dist/siemens-ix/p-7bfd6cd2.entry.js.map +0 -1
- package/dist/siemens-ix/p-7faa148f.entry.js +0 -2
- package/dist/siemens-ix/p-85423643.entry.js.map +0 -1
- package/dist/siemens-ix/p-87e692d9.entry.js +0 -2
- package/dist/siemens-ix/p-92a18c10.entry.js +0 -2
- package/dist/siemens-ix/p-96a3a750.entry.js.map +0 -1
- package/dist/siemens-ix/p-a536adcb.entry.js +0 -2
- package/dist/siemens-ix/p-a536adcb.entry.js.map +0 -1
- package/dist/siemens-ix/p-b3b23af7.entry.js +0 -2
- package/dist/siemens-ix/p-b3f35666.js +0 -2
- package/dist/siemens-ix/p-b3f35666.js.map +0 -1
- package/dist/siemens-ix/p-c1222581.entry.js +0 -2
- package/dist/siemens-ix/p-c55db6c7.entry.js +0 -2
- package/dist/siemens-ix/p-c55db6c7.entry.js.map +0 -1
- package/dist/siemens-ix/p-d998415f.entry.js +0 -2
- package/dist/siemens-ix/p-d998415f.entry.js.map +0 -1
- package/dist/siemens-ix/p-e9a3f58a.entry.js +0 -2
- package/dist/siemens-ix/p-eb6268a6.entry.js +0 -2
- package/dist/siemens-ix/p-ebb277f0.entry.js +0 -2
- package/dist/siemens-ix/p-ebb277f0.entry.js.map +0 -1
- package/dist/siemens-ix/p-f07110c6.entry.js +0 -2
- package/dist/siemens-ix/p-f07110c6.entry.js.map +0 -1
- package/dist/siemens-ix/p-fa53933d.entry.js +0 -2
- package/dist/siemens-ix/p-fa53933d.entry.js.map +0 -1
- package/dist/siemens-ix/p-fb2b78f7.entry.js.map +0 -1
- package/dist/siemens-ix/p-fb4c79c6.entry.js +0 -2
- /package/dist/siemens-ix/{p-fb4c79c6.entry.js.map → p-04af3853.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-af099ca4.entry.js.map → p-0632731e.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-0d2a6886.entry.js.map → p-091b036d.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-2946fd70.entry.js.map → p-0fafba48.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-7076210b.entry.js.map → p-1483f65d.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-c1968b80.entry.js.map → p-1bd98772.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-8629db91.entry.js.map → p-25f1749c.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-5696bb62.entry.js.map → p-306269ae.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-b3b23af7.entry.js.map → p-35fff1e6.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-92a18c10.entry.js.map → p-411f51c5.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-f78246bd.entry.js.map → p-44a27b29.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-d03df401.entry.js.map → p-49d3fc15.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-113cc793.entry.js.map → p-5af99eaa.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-c1222581.entry.js.map → p-63f0755e.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-14a41c8c.entry.js.map → p-6618b2db.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-0653a145.entry.js.map → p-67f44540.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-53352bfb.entry.js.map → p-77273517.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-882a0233.entry.js.map → p-78ac2ff1.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-32375ddb.entry.js.map → p-7947ef3d.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-fb47546b.entry.js.map → p-7c2f34f0.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-7faa148f.entry.js.map → p-82d33168.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-052340f9.entry.js.map → p-8acc09aa.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-6fd7ecd0.entry.js.map → p-9079f6c8.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-16b923e9.entry.js.map → p-9bdda7ff.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-2c4c03d4.entry.js.map → p-aa814811.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-feac09bc.entry.js.map → p-ba24e694.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-44db3646.entry.js.map → p-c05a98c8.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-8d0758c1.entry.js.map → p-c7e58e9e.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-4430117a.entry.js.map → p-c81c4b9d.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-1a122c76.entry.js.map → p-d300b332.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-ff1ac5b3.entry.js.map → p-e14384df.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-bea7c748.entry.js.map → p-ee96d1eb.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-7750e187.entry.js.map → p-fd5bee44.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-dcb3e5be.entry.js.map → p-ffa856df.entry.js.map} +0 -0
package/components/service.js
CHANGED
|
@@ -64,13 +64,13 @@ class ApplicationLayoutService {
|
|
|
64
64
|
breakPointIndex = matchBreakpoints.length - 1;
|
|
65
65
|
}
|
|
66
66
|
const [breakpoint, _] = matchBreakpoints[breakPointIndex];
|
|
67
|
-
__classPrivateFieldGet(this, _ApplicationLayoutService_breakpointChangeListener, "f").emit(breakpoint);
|
|
67
|
+
requestAnimationFrame(() => __classPrivateFieldGet(this, _ApplicationLayoutService_breakpointChangeListener, "f").emit(breakpoint));
|
|
68
68
|
__classPrivateFieldSet(this, _ApplicationLayoutService_breakpoint, breakpoint, "f");
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
71
|
for (const [breakpoint, match] of matchBreakpoints.reverse()) {
|
|
72
72
|
if (match) {
|
|
73
|
-
__classPrivateFieldGet(this, _ApplicationLayoutService_breakpointChangeListener, "f").emit(breakpoint);
|
|
73
|
+
requestAnimationFrame(() => __classPrivateFieldGet(this, _ApplicationLayoutService_breakpointChangeListener, "f").emit(breakpoint));
|
|
74
74
|
__classPrivateFieldSet(this, _ApplicationLayoutService_breakpoint, breakpoint, "f");
|
|
75
75
|
break;
|
|
76
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"service.js","mappings":";;;SAUgB,QAAQ,CACtB,IAAO,EACP,KAAa;IAEb,IAAI,SAAwC,CAAC;IAE7C,OAAO,SAAS,SAAS,CAAC,GAAG,IAAmB;QAC9C,YAAY,CAAC,SAAS,CAAC,CAAC;QAExB,SAAS,GAAG,UAAU,CAAC;YACrB,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;SACf,EAAE,KAAK,CAAC,CAAC;KACX,CAAC;AACJ;;;;;;;;;;;;;;ACXA,MAAM,wBAAwB;IAS5B;;QAPA,yDAAsC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAC;QACzD,6DAA4B,IAAI,UAAU,EAAc,EAAC;QACzD,+CAA0B,IAAI,EAAC;QAE/B,uDAAsB,IAAI,EAAC;QAC3B,sBAAiB,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAGzD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACj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,cAAc,CAAC,WAAyB;QAC7C,uBAAA,IAAI,kDAAyB,WAAW,MAAA,CAAC;QACzC,IAAI,CAAC,QAAQ,EAAE,CAAC;KACjB;CACF;;MAEY,wBAAwB,GAAG,IAAI,wBAAwB;;;;","names":[],"sources":["src/components/utils/debounce.ts","src/components/utils/application-layout/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 */\ntype AnyFunction = (...args: any[]) => any;\n\nexport function debounce<T extends AnyFunction>(\n func: T,\n delay: number\n): (...args: Parameters<T>) => void {\n let timeoutId: ReturnType<typeof setTimeout>;\n\n return function debounced(...args: Parameters<T>): void {\n clearTimeout(timeoutId);\n\n timeoutId = setTimeout(() => {\n func(...args);\n }, delay);\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 { Breakpoint, matchBreakpoint } from '../breakpoints';\nimport { debounce } from '../debounce';\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 debouncedOnResize = debounce(this.onResize.bind(this), 50);\n\n constructor() {\n if (typeof window !== 'undefined') {\n window.addEventListener('resize', this.debouncedOnResize.bind(this));\n this.debouncedOnResize();\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 let breakPointIndex = 0;\n if (!this.#supportedBreakpoints.includes('lg')) {\n breakPointIndex = matchBreakpoints.length - 1;\n }\n\n const [breakpoint, _] = matchBreakpoints[breakPointIndex];\n requestAnimationFrame(() =>\n this.#breakpointChangeListener.emit(breakpoint)\n );\n this.#breakpoint = breakpoint;\n return;\n }\n\n for (const [breakpoint, match] of matchBreakpoints.reverse()) {\n if (match) {\n requestAnimationFrame(() =>\n this.#breakpointChangeListener.emit(breakpoint)\n );\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"],"version":3}
|
package/components/shadow-dom.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"shadow-dom.js","mappings":"AAAA;;;;;;;;SAQgB,cAAc,CAAC,QAAgB,EAAE,EAAO;IACtD,IAAI,CAAC,EAAE,EAAE;QACP,OAAO,IAAI,CAAC;KACb;IACD,QACE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;QACpB,cAAc,CAAC,QAAQ,EAAG,EAAE,CAAC,WAAW,EAAU,CAAC,IAAI,CAAC,EACxD;AACJ,CAAC;SAEe,kBAAkB,CAAU,IAAS;IACnD,OAAO,IAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAClD,CAAC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T,OAAO,KAAK,CAAC;KACd;IACD,OAAO,IAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AAC/D,CAAC;SAYe,iBAAiB,CAAC,IAAU,EAAE,QAAgB;IAC5D,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,IAAI,CAAC;KACb;IAED,IAAI,IAAI,YAAY,UAAU,EAAE;QAC9B,OAAO,iBAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;KAC/C;IAED,IAAI,IAAI,YAAY,WAAW,EAAE;QAC/B,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC;SACb;aAAM;YACL,OAAO,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;SACrD;KACF;IAED,OAAO,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AACtD;;;;","names":[],"sources":["src/components/utils/shadow-dom.ts"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nexport function closestElement(selector: string, el: any) {\n if (!el) {\n return null;\n }\n return (\n el.closest(selector) ||\n closestElement(selector, (el.getRootNode() as any).host)\n );\n}\n\nexport function getSlottedElements<R = any>(slot: any): R[] {\n return slot.assignedElements({ flatten: true });\n}\n\nexport function hasSlottedElements(slot: any) {\n if (!slot) {\n return false;\n }\n return slot.assignedElements({ flatten: true }).length !== 0;\n}\n\nexport function containsElement(target: Element, element: Element) {\n const hasShadowDom = target.shadowRoot;\n\n if (hasShadowDom) {\n target.contains(element) || target.shadowRoot.contains(element);\n }\n\n return target.contains(element);\n}\n\nexport function closestPassShadow(node: Node, selector: string) {\n if (!node) {\n return null;\n }\n\n if (node instanceof ShadowRoot) {\n return closestPassShadow(node.host, selector);\n }\n\n if (node instanceof HTMLElement) {\n if (node.matches(selector)) {\n return node;\n } else {\n return closestPassShadow(node.parentNode, selector);\n }\n }\n\n return closestPassShadow(node.parentNode, selector);\n}\n"],"version":3}
|
package/components/spinner.js
CHANGED
|
@@ -13,7 +13,7 @@ const Spinner = /*@__PURE__*/ proxyCustomElement(class Spinner extends HTMLEleme
|
|
|
13
13
|
this.hideTrack = false;
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: '0146dd2225f65f26b9e2853cbb13072e4df5206c', class: {
|
|
17
17
|
primary: this.variant === 'primary',
|
|
18
18
|
'xx-small': this.size === 'xx-small',
|
|
19
19
|
'x-small': this.size === 'x-small',
|
package/components/tab-item.js
CHANGED
|
@@ -31,7 +31,7 @@ const TabItem = /*@__PURE__*/ proxyCustomElement(class TabItem extends HTMLEleme
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: 'd066fe09ebb7ac33ef162eafed96189de7215022', class: this.tabItemClasses({
|
|
35
35
|
selected: this.selected,
|
|
36
36
|
disabled: this.disabled,
|
|
37
37
|
small: this.small,
|
|
@@ -46,12 +46,12 @@ const TabItem = /*@__PURE__*/ proxyCustomElement(class TabItem extends HTMLEleme
|
|
|
46
46
|
if (clientEvent.defaultPrevented) {
|
|
47
47
|
event.stopPropagation();
|
|
48
48
|
}
|
|
49
|
-
} }, h("div", { key: '
|
|
49
|
+
} }, h("div", { key: '944c3beb003abae7f64ed18c3d77fa8d3a576be3', class: {
|
|
50
50
|
circle: this.rounded,
|
|
51
51
|
text: !this.rounded,
|
|
52
52
|
selected: this.selected,
|
|
53
53
|
disabled: this.disabled,
|
|
54
|
-
} }, h("slot", { key: '
|
|
54
|
+
} }, h("slot", { key: 'ff6b883c8b1ec2e53fe9faa705bbcdb0345ef27b' })), h("div", { key: '292419b01ae7e18db509ad09a83ffa5bbc6480a5', class: {
|
|
55
55
|
counter: true,
|
|
56
56
|
selected: this.selected,
|
|
57
57
|
hidden: !(this.rounded && this.counter !== undefined),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"tab-item.js","mappings":";;AAAA,MAAM,UAAU,GAAG,szIAAszI,CAAC;AAC10I,wBAAe,UAAU;;MCmBZ,OAAO;;;;;;wBAIC,KAAK;wBAKL,KAAK;qBAKR,KAAK;oBAKN,KAAK;uBAKF,KAAK;;sBAUgB,MAAM;yBAKP,QAAQ;;IAStC,cAAc,CAAC,KAQtB;QACC,OAAO;YACL,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,WAAW,EAAE,KAAK,CAAC,KAAK;YACxB,IAAI,EAAE,KAAK,CAAC,KAAK;YACjB,SAAS,EAAE,KAAK,CAAC,MAAM,KAAK,WAAW;YACvC,MAAM,EAAE,KAAK,CAAC,SAAS,KAAK,QAAQ;YACpC,GAAG,EAAE,KAAK,CAAC,SAAS,KAAK,KAAK;YAC9B,MAAM,EAAE,KAAK,CAAC,MAAM;SACrB,CAAC;KACH;IAED,MAAM;QACJ,QACE,EAAC,IAAI,qDACH,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC;gBACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,MAAM,EAAE,IAAI,CAAC,OAAO;aACrB,CAAC,EACF,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,CAAC,KAAiB;gBACzB,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;oBACrC,WAAW,EAAE,KAAK;iBACnB,CAAC,CAAC;gBAEH,IAAI,WAAW,CAAC,gBAAgB,EAAE;oBAChC,KAAK,CAAC,eAAe,EAAE,CAAC;iBACzB;aACF,IAED,4DACE,KAAK,EAAE;gBACL,MAAM,EAAE,IAAI,CAAC,OAAO;gBACpB,IAAI,EAAE,CAAC,IAAI,CAAC,OAAO;gBACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB,IAED,8DAAa,CACT,EACN,4DACE,KAAK,EAAE;gBACL,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,MAAM,EAAE,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC;gBACrD,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB,IAEA,IAAI,CAAC,OAAO,CACT,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/tab-item/tab-item.scss?tag=ix-tab-item&encapsulation=shadow","src/components/tab-item/tab-item.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/text-truncation';\n@import 'mixins/hover';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 10px $large-space;\n line-height: 20px;\n font-size: 14px;\n font-weight: bold;\n background-color: var(--theme-tab--background);\n color: var(--theme-tab--color);\n\n &::after {\n content: '';\n position: absolute;\n background-color: var(--theme-tab-indicator--background);\n width: 100%;\n height: var(--theme-tab-indicator--height);\n left: 0;\n }\n\n .text {\n @include ellipsis;\n\n span,\n span::before {\n pointer-events: none;\n }\n\n vertical-align: middle;\n }\n\n .circle {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 3rem;\n width: 3rem;\n background-color: var(--theme-animated-tab-indicator--background);\n border-radius: 50%;\n border: 2px solid var(--theme-animated-tab-circle--border-color);\n color: var(--theme-an…icon--color);\n cursor: pointer;\n\n &.selected:not(.disabled) {\n background-color: var(--theme-animated-tab-circle--background--selected);\n color: var(--theme-animated-tab-icon--color--selected);\n border-color: var(--theme-animated-tab-circle--border-color--selected);\n\n &:hover {\n background-color: var(\n --theme-animated-tab-circle--background--selected\n );\n }\n }\n\n &:hover {\n background-color: var(--theme-animated-tab-circle--background--hover);\n }\n\n &:active {\n background-color: var(--theme-animated-tab-circle--background--active);\n }\n\n &:active {\n background-color: var(--theme-animated-tab-circle--background--active);\n }\n\n &.disabled {\n background-color: var(--theme-animated-tab-circle--background--disabled);\n border-color: var(--theme-animated-tab-circle--border-color--disabled);\n }\n }\n\n .counter {\n position: absolute;\n z-index: 1;\n height: 16px;\n width: auto;\n background-color: var(--theme-pill-outline--background);\n border: 1px solid var(--theme-tab-pill--border-color);\n border-radius: 100px;\n bottom: 6px;\n display: flex;\n justify-content: center;\n align-items: center;\n padding-left: $tiny-space;\n padding-right: $tiny-space;\n font-size: 12px;\n line-height: 14px;\n color: var(--theme-pill-outline--color);\n cursor: pointer;\n\n &.selected {\n border-color: var(--theme-tab-pill--border-color--selected);\n }\n\n &.disabled {\n border-color: var(--theme-tab-pill--border-color--disabled);\n }\n }\n\n .hidden {\n display: none;\n }\n}\n\n:host(.circle) {\n height: 72px;\n}\n\n:host(.top) {\n &::after {\n top: 0;\n }\n}\n\n:host(.bottom) {\n &::after {\n bottom: 0;\n }\n}\n\n:host(.stretched) {\n flex-basis: 100%;\n width: 100%;\n @include ellipsis;\n}\n\n:host(:hover:not(.circle)) {\n background-color: var(--theme-tab--background--hover);\n color: var(--theme-tab-color-hover);\n cursor: pointer;\n\n &::after {\n background-color: var(--theme-tab-indicator--background--hover);\n }\n}\n\n:host(:active:not(.circle)) {\n background-color: var(--theme-tab--background--active);\n color: var(--theme-tab-color--active);\n\n &::after {\n background-color: var(--theme-tab-indicator--background--active);\n }\n}\n\n:host(:focus-visible) {\n outline: 0px solid var(--focus--border-color);\n\n .circle {\n outline: 1px solid var(--focus--border-color);\n }\n}\n\n:host(:focus-visible:not(.circle)) {\n outline: 1px solid var(--focus--border-color);\n}\n\n:host(.disabled) {\n pointer-events: none;\n color: var(--theme-tab--color--disabled);\n background-color: var(--theme-tab--background--disabled);\n\n &::after {\n background-color: var(--theme-tab-indicator--background--disabled);\n }\n}\n\n:host(.selected:not(.disabled)) {\n background-color: var(--theme-tab--background--selected);\n color: var(--theme-tab--color--selected);\n\n &::after {\n background-color: var(--theme-tab-indicator--background--selected);\n }\n}\n\n:host(.icon) {\n padding: $large-space $small-space;\n}\n\n:host(.small-tab) {\n height: 32px;\n padding: $default-space;\n}\n\n:host(.small-tab.icon) {\n padding: $default-space $tiny-space;\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\n\nexport type TabClickDetail = {\n nativeEvent: MouseEvent;\n};\n\n@Component({\n tag: 'ix-tab-item',\n styleUrl: 'tab-item.scss',\n shadow: true,\n})\nexport class TabItem {\n /**\n * Set selected tab\n */\n @Prop() selected = false;\n\n /**\n * Set disabled tab\n */\n @Prop() disabled = false;\n\n /**\n * Set small size tab\n */\n @Prop() small = false;\n\n /**\n * Set icon only tab\n */\n @Prop() icon = false;\n\n /**\n * Set rounded tab\n */\n @Prop() rounded = false;\n\n /**\n * Set counter value\n */\n @Prop() counter
|
|
1
|
+
{"file":"tab-item.js","mappings":";;AAAA,MAAM,UAAU,GAAG,szIAAszI,CAAC;AAC10I,wBAAe,UAAU;;MCmBZ,OAAO;;;;;;wBAIC,KAAK;wBAKL,KAAK;qBAKR,KAAK;oBAKN,KAAK;uBAKF,KAAK;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,KAAK,EAAE;gBACL,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,MAAM,EAAE,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC;gBACrD,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB,IAEA,IAAI,CAAC,OAAO,CACT,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/tab-item/tab-item.scss?tag=ix-tab-item&encapsulation=shadow","src/components/tab-item/tab-item.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/text-truncation';\n@import 'mixins/hover';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 10px $large-space;\n line-height: 20px;\n font-size: 14px;\n font-weight: bold;\n background-color: var(--theme-tab--background);\n color: var(--theme-tab--color);\n\n &::after {\n content: '';\n position: absolute;\n background-color: var(--theme-tab-indicator--background);\n width: 100%;\n height: var(--theme-tab-indicator--height);\n left: 0;\n }\n\n .text {\n @include ellipsis;\n\n span,\n span::before {\n pointer-events: none;\n }\n\n vertical-align: middle;\n }\n\n .circle {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 3rem;\n width: 3rem;\n background-color: var(--theme-animated-tab-indicator--background);\n border-radius: 50%;\n border: 2px solid var(--theme-animated-tab-circle--border-color);\n color: var(--theme-an…icon--color);\n cursor: pointer;\n\n &.selected:not(.disabled) {\n background-color: var(--theme-animated-tab-circle--background--selected);\n color: var(--theme-animated-tab-icon--color--selected);\n border-color: var(--theme-animated-tab-circle--border-color--selected);\n\n &:hover {\n background-color: var(\n --theme-animated-tab-circle--background--selected\n );\n }\n }\n\n &:hover {\n background-color: var(--theme-animated-tab-circle--background--hover);\n }\n\n &:active {\n background-color: var(--theme-animated-tab-circle--background--active);\n }\n\n &:active {\n background-color: var(--theme-animated-tab-circle--background--active);\n }\n\n &.disabled {\n background-color: var(--theme-animated-tab-circle--background--disabled);\n border-color: var(--theme-animated-tab-circle--border-color--disabled);\n }\n }\n\n .counter {\n position: absolute;\n z-index: 1;\n height: 16px;\n width: auto;\n background-color: var(--theme-pill-outline--background);\n border: 1px solid var(--theme-tab-pill--border-color);\n border-radius: 100px;\n bottom: 6px;\n display: flex;\n justify-content: center;\n align-items: center;\n padding-left: $tiny-space;\n padding-right: $tiny-space;\n font-size: 12px;\n line-height: 14px;\n color: var(--theme-pill-outline--color);\n cursor: pointer;\n\n &.selected {\n border-color: var(--theme-tab-pill--border-color--selected);\n }\n\n &.disabled {\n border-color: var(--theme-tab-pill--border-color--disabled);\n }\n }\n\n .hidden {\n display: none;\n }\n}\n\n:host(.circle) {\n height: 72px;\n}\n\n:host(.top) {\n &::after {\n top: 0;\n }\n}\n\n:host(.bottom) {\n &::after {\n bottom: 0;\n }\n}\n\n:host(.stretched) {\n flex-basis: 100%;\n width: 100%;\n @include ellipsis;\n}\n\n:host(:hover:not(.circle)) {\n background-color: var(--theme-tab--background--hover);\n color: var(--theme-tab-color-hover);\n cursor: pointer;\n\n &::after {\n background-color: var(--theme-tab-indicator--background--hover);\n }\n}\n\n:host(:active:not(.circle)) {\n background-color: var(--theme-tab--background--active);\n color: var(--theme-tab-color--active);\n\n &::after {\n background-color: var(--theme-tab-indicator--background--active);\n }\n}\n\n:host(:focus-visible) {\n outline: 0px solid var(--focus--border-color);\n\n .circle {\n outline: 1px solid var(--focus--border-color);\n }\n}\n\n:host(:focus-visible:not(.circle)) {\n outline: 1px solid var(--focus--border-color);\n}\n\n:host(.disabled) {\n pointer-events: none;\n color: var(--theme-tab--color--disabled);\n background-color: var(--theme-tab--background--disabled);\n\n &::after {\n background-color: var(--theme-tab-indicator--background--disabled);\n }\n}\n\n:host(.selected:not(.disabled)) {\n background-color: var(--theme-tab--background--selected);\n color: var(--theme-tab--color--selected);\n\n &::after {\n background-color: var(--theme-tab-indicator--background--selected);\n }\n}\n\n:host(.icon) {\n padding: $large-space $small-space;\n}\n\n:host(.small-tab) {\n height: 32px;\n padding: $default-space;\n}\n\n:host(.small-tab.icon) {\n padding: $default-space $tiny-space;\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\n\nexport type TabClickDetail = {\n nativeEvent: MouseEvent;\n};\n\n@Component({\n tag: 'ix-tab-item',\n styleUrl: 'tab-item.scss',\n shadow: true,\n})\nexport class TabItem {\n /**\n * Set selected tab\n */\n @Prop() selected = false;\n\n /**\n * Set disabled tab\n */\n @Prop() disabled = false;\n\n /**\n * Set small size tab\n */\n @Prop() small = false;\n\n /**\n * Set icon only tab\n */\n @Prop() icon = false;\n\n /**\n * Set rounded tab\n */\n @Prop() rounded = false;\n\n /**\n * Set counter value\n */\n @Prop() counter?: number;\n\n /**\n * Set layout width style\n */\n @Prop() layout: 'auto' | 'stretched' = 'auto';\n\n /**\n * Set selected placement\n */\n @Prop() placement: 'bottom' | 'top' = 'bottom';\n\n /**\n * Emitted when the tab is clicked.\n *\n * @since 2.0.0\n */\n @Event() tabClick!: EventEmitter<TabClickDetail>;\n\n private tabItemClasses(props: {\n selected: boolean;\n disabled: boolean;\n small: boolean;\n icon: boolean;\n circle: boolean;\n layout: 'auto' | 'stretched';\n placement: 'bottom' | 'top';\n }) {\n return {\n selected: props.selected,\n disabled: props.disabled,\n 'small-tab': props.small,\n icon: props.small,\n stretched: props.layout === 'stretched',\n bottom: props.placement === 'bottom',\n top: props.placement === 'top',\n circle: props.circle,\n };\n }\n\n render() {\n return (\n <Host\n class={this.tabItemClasses({\n selected: this.selected,\n disabled: this.disabled,\n small: this.small,\n icon: this.icon,\n layout: this.layout,\n placement: this.placement,\n circle: this.rounded,\n })}\n tabIndex={0}\n onClick={(event: MouseEvent) => {\n const clientEvent = this.tabClick.emit({\n nativeEvent: event,\n });\n\n if (clientEvent.defaultPrevented) {\n event.stopPropagation();\n }\n }}\n >\n <div\n class={{\n circle: this.rounded,\n text: !this.rounded,\n selected: this.selected,\n disabled: this.disabled,\n }}\n >\n <slot></slot>\n </div>\n <div\n class={{\n counter: true,\n selected: this.selected,\n hidden: !(this.rounded && this.counter !== undefined),\n disabled: this.disabled,\n }}\n >\n {this.counter}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
package/components/tabs.js
CHANGED
|
@@ -47,12 +47,8 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
47
47
|
this.currentScrollAmount = 0;
|
|
48
48
|
this.scrollAmount = 100;
|
|
49
49
|
this.scrollActionAmount = 0;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return this.hostElement.shadowRoot.querySelector('[data-arrow-left]');
|
|
53
|
-
}
|
|
54
|
-
get arrowRightElement() {
|
|
55
|
-
return this.hostElement.shadowRoot.querySelector('[data-arrow-right]');
|
|
50
|
+
this.showArrowPrevious = false;
|
|
51
|
+
this.showArrowNext = false;
|
|
56
52
|
}
|
|
57
53
|
onWindowResize() {
|
|
58
54
|
this.totalItems = 0;
|
|
@@ -69,13 +65,24 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
69
65
|
return this.getTabs()[tabIndex];
|
|
70
66
|
}
|
|
71
67
|
getTabsWrapper() {
|
|
72
|
-
|
|
68
|
+
var _a;
|
|
69
|
+
return (_a = this.hostElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.items-content');
|
|
70
|
+
}
|
|
71
|
+
initResizeObserver() {
|
|
72
|
+
const parentElement = this.hostElement.parentElement;
|
|
73
|
+
if (!parentElement)
|
|
74
|
+
return;
|
|
75
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
76
|
+
this.renderArrows();
|
|
77
|
+
});
|
|
78
|
+
this.resizeObserver.observe(parentElement);
|
|
73
79
|
}
|
|
74
80
|
showArrows() {
|
|
75
81
|
try {
|
|
76
82
|
const tabWrapper = this.getTabsWrapper();
|
|
77
|
-
return (tabWrapper
|
|
78
|
-
|
|
83
|
+
return (tabWrapper &&
|
|
84
|
+
tabWrapper.scrollWidth >
|
|
85
|
+
Math.ceil(tabWrapper.getBoundingClientRect().width) &&
|
|
79
86
|
this.layout === 'auto');
|
|
80
87
|
}
|
|
81
88
|
catch (error) {
|
|
@@ -84,7 +91,7 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
84
91
|
}
|
|
85
92
|
showPreviousArrow() {
|
|
86
93
|
try {
|
|
87
|
-
return this.showArrows() && this.scrollActionAmount < 0;
|
|
94
|
+
return this.showArrows() === true && this.scrollActionAmount < 0;
|
|
88
95
|
}
|
|
89
96
|
catch (error) {
|
|
90
97
|
return false;
|
|
@@ -93,8 +100,11 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
93
100
|
showNextArrow() {
|
|
94
101
|
try {
|
|
95
102
|
const tabWrapper = this.getTabsWrapper();
|
|
103
|
+
if (!tabWrapper) {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
96
106
|
const tabWrapperRect = tabWrapper.getBoundingClientRect();
|
|
97
|
-
return (this.showArrows() &&
|
|
107
|
+
return (this.showArrows() === true &&
|
|
98
108
|
this.scrollActionAmount >
|
|
99
109
|
(tabWrapper.scrollWidth - tabWrapperRect.width) * -1);
|
|
100
110
|
}
|
|
@@ -102,39 +112,47 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
102
112
|
return false;
|
|
103
113
|
}
|
|
104
114
|
}
|
|
105
|
-
getArrowStyle(condition) {
|
|
106
|
-
return {
|
|
107
|
-
opacity: condition ? '1' : '0',
|
|
108
|
-
zIndex: condition ? '1' : '-1',
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
115
|
move(amount, click = false) {
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
+
const tabsWrapper = this.getTabsWrapper();
|
|
117
|
+
if (!tabsWrapper) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const tabsWrapperVisibleWidth = tabsWrapper.getBoundingClientRect().width;
|
|
121
|
+
const maxScrollWidth = -this.currentScrollAmount +
|
|
122
|
+
tabsWrapperVisibleWidth -
|
|
123
|
+
tabsWrapper.scrollWidth;
|
|
124
|
+
amount = amount < maxScrollWidth ? maxScrollWidth : amount;
|
|
125
|
+
amount += this.currentScrollAmount;
|
|
126
|
+
amount = Math.min(amount, 0);
|
|
116
127
|
const styles = [
|
|
117
128
|
`transform: translateX(${amount}px);`,
|
|
118
129
|
click ? 'transition: all ease-in-out 400ms;' : '',
|
|
119
130
|
].join('');
|
|
120
|
-
|
|
131
|
+
tabsWrapper.setAttribute('style', styles);
|
|
121
132
|
if (click)
|
|
122
133
|
this.currentScrollAmount = this.scrollActionAmount = amount;
|
|
123
134
|
else
|
|
124
135
|
this.scrollActionAmount = amount;
|
|
125
136
|
}
|
|
126
|
-
|
|
137
|
+
onSelectedChange(newValue) {
|
|
138
|
+
var _a;
|
|
127
139
|
if (!this.showArrows())
|
|
128
140
|
return;
|
|
129
|
-
const
|
|
130
|
-
const
|
|
131
|
-
|
|
141
|
+
const tabRect = this.getTab(newValue).getBoundingClientRect();
|
|
142
|
+
const wrapperWidth = (_a = this.getTabsWrapper()) === null || _a === void 0 ? void 0 : _a.clientWidth;
|
|
143
|
+
const arrowWidth = 32;
|
|
144
|
+
if (tabRect.left < arrowWidth) {
|
|
145
|
+
this.move(-tabRect.left + arrowWidth, true);
|
|
146
|
+
}
|
|
147
|
+
else if (wrapperWidth && tabRect.right > wrapperWidth - arrowWidth) {
|
|
148
|
+
this.move(wrapperWidth - tabRect.right - arrowWidth, true);
|
|
149
|
+
}
|
|
132
150
|
}
|
|
133
151
|
setSelected(index) {
|
|
134
152
|
this.selected = index;
|
|
135
153
|
}
|
|
136
154
|
clickTab(index) {
|
|
137
|
-
if (this.dragStop()) {
|
|
155
|
+
if (!this.clickAction.isClick || this.dragStop()) {
|
|
138
156
|
return;
|
|
139
157
|
}
|
|
140
158
|
const { defaultPrevented } = this.selectedChange.emit(index);
|
|
@@ -142,7 +160,6 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
142
160
|
return;
|
|
143
161
|
}
|
|
144
162
|
this.setSelected(index);
|
|
145
|
-
this.moveTabToView(index);
|
|
146
163
|
}
|
|
147
164
|
dragStart(element, event) {
|
|
148
165
|
if (!this.showArrows())
|
|
@@ -156,18 +173,22 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
156
173
|
const tabPositionX = parseFloat(window.getComputedStyle(element).left);
|
|
157
174
|
const mousedownPositionX = event.clientX;
|
|
158
175
|
const move = (event) => this.dragMove(event, tabPositionX, mousedownPositionX);
|
|
159
|
-
|
|
176
|
+
const windowClick = () => {
|
|
160
177
|
window.removeEventListener('mousemove', move, false);
|
|
178
|
+
window.removeEventListener('click', windowClick, false);
|
|
161
179
|
this.dragStop();
|
|
162
|
-
}
|
|
180
|
+
};
|
|
181
|
+
window.addEventListener('click', windowClick);
|
|
163
182
|
window.addEventListener('mousemove', move, false);
|
|
164
183
|
}
|
|
165
184
|
dragMove(event, tabX, mousedownX) {
|
|
166
185
|
this.move(event.clientX + tabX - mousedownX);
|
|
167
186
|
}
|
|
168
187
|
dragStop() {
|
|
169
|
-
|
|
170
|
-
|
|
188
|
+
if (this.clickAction.timeout) {
|
|
189
|
+
clearTimeout(this.clickAction.timeout);
|
|
190
|
+
this.clickAction.timeout = null;
|
|
191
|
+
}
|
|
171
192
|
if (this.clickAction.isClick)
|
|
172
193
|
return false;
|
|
173
194
|
this.currentScrollAmount = this.scrollActionAmount;
|
|
@@ -185,6 +206,7 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
185
206
|
element.setAttribute('selected', index === this.selected ? 'true' : 'false');
|
|
186
207
|
element.setAttribute('placement', this.placement);
|
|
187
208
|
});
|
|
209
|
+
this.initResizeObserver();
|
|
188
210
|
}
|
|
189
211
|
componentDidRender() {
|
|
190
212
|
const tabs = this.getTabs();
|
|
@@ -194,11 +216,12 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
194
216
|
});
|
|
195
217
|
}
|
|
196
218
|
componentWillRender() {
|
|
219
|
+
this.renderArrows();
|
|
220
|
+
}
|
|
221
|
+
renderArrows() {
|
|
197
222
|
requestAnimationFrameNoNgZone(() => {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
Object.assign(this.arrowLeftElement.style, this.getArrowStyle(previousArrow));
|
|
201
|
-
Object.assign(this.arrowRightElement.style, this.getArrowStyle(showNextArrow));
|
|
223
|
+
this.showArrowNext = this.showNextArrow();
|
|
224
|
+
this.showArrowPrevious = this.showPreviousArrow();
|
|
202
225
|
});
|
|
203
226
|
}
|
|
204
227
|
componentDidLoad() {
|
|
@@ -207,6 +230,10 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
207
230
|
element.addEventListener('mousedown', (event) => this.dragStart(element, event));
|
|
208
231
|
});
|
|
209
232
|
}
|
|
233
|
+
disconnectedCallback() {
|
|
234
|
+
var _a;
|
|
235
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
236
|
+
}
|
|
210
237
|
onTabClick(event) {
|
|
211
238
|
if (event.defaultPrevented) {
|
|
212
239
|
return;
|
|
@@ -220,15 +247,18 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
220
247
|
});
|
|
221
248
|
}
|
|
222
249
|
render() {
|
|
223
|
-
return (h(Host, { key: '
|
|
250
|
+
return (h(Host, { key: 'e10ac5f7e421ca20215339ef7e72c309da7132cd' }, this.showArrowPrevious && (h("div", { key: 'e800708e789600cc2784b8c1515e3dc03b002ee9', class: "arrow", onClick: () => this.move(this.scrollAmount, true) }, h("ix-icon", { key: 'd4c5fbc8e63d595c8fb92bf04d3462ea19446229', name: 'chevron-left-small' }))), h("div", { key: '908f08797515f007fb3320e157fa03a67cadcb25', class: {
|
|
224
251
|
'tab-items': true,
|
|
225
252
|
'overflow-shadow': true,
|
|
226
|
-
'shadow-left': this.
|
|
227
|
-
'shadow-right': this.
|
|
228
|
-
'shadow-both': this.
|
|
229
|
-
} }, h("div", { key: '
|
|
253
|
+
'shadow-left': this.showArrowPrevious,
|
|
254
|
+
'shadow-right': this.showArrowNext,
|
|
255
|
+
'shadow-both': this.showArrowNext && this.showArrowPrevious,
|
|
256
|
+
} }, h("div", { key: 'd63da9e8e146f3f7dc4376cb476a1ccfbe674e6a', class: "items-content" }, h("slot", { key: '781307adc791f851938edafb44a3be14a56e5eb8' }))), this.showArrowNext && (h("div", { key: '5ec04a7c0a53b73fdd1de1fdf89e4f48aa105c11', class: "arrow right", onClick: () => this.move(-this.scrollAmount, true) }, h("ix-icon", { key: 'cc7249abe9bfc978461dea999922251a743bdf84', name: 'chevron-right-small' })))));
|
|
230
257
|
}
|
|
231
258
|
get hostElement() { return this; }
|
|
259
|
+
static get watchers() { return {
|
|
260
|
+
"selected": ["onSelectedChange"]
|
|
261
|
+
}; }
|
|
232
262
|
static get style() { return IxTabsStyle0; }
|
|
233
263
|
}, [1, "ix-tabs", {
|
|
234
264
|
"small": [4],
|
|
@@ -239,8 +269,12 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
239
269
|
"totalItems": [32],
|
|
240
270
|
"currentScrollAmount": [32],
|
|
241
271
|
"scrollAmount": [32],
|
|
242
|
-
"scrollActionAmount": [32]
|
|
243
|
-
|
|
272
|
+
"scrollActionAmount": [32],
|
|
273
|
+
"showArrowPrevious": [32],
|
|
274
|
+
"showArrowNext": [32]
|
|
275
|
+
}, [[9, "resize", "onWindowResize"], [0, "tabClick", "onTabClick"]], {
|
|
276
|
+
"selected": ["onSelectedChange"]
|
|
277
|
+
}]);
|
|
244
278
|
function defineCustomElement() {
|
|
245
279
|
if (typeof customElements === "undefined") {
|
|
246
280
|
return;
|
package/components/tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"tabs.js","mappings":";;AAAA;;;;;;;;AAWA;;;;;;AAMO,MAAM,6BAA6B,GAAG,CAC3C,QAAkC;IAElC,IAAI,OAAO,oCAAoC,KAAK,UAAU,EAAE;QAC9D,OAAO,oCAAoC,CAAC,QAAQ,CAAC,CAAC;KACvD;IACD,IAAI,OAAO,qBAAqB,KAAK,UAAU,EAAE;QAC/C,OAAO,qBAAqB,CAAC,QAAQ,CAAC,CAAC;KACxC;IACD,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC;;AC3BD,MAAM,OAAO,GAAG,svEAAsvE,CAAC;AACvwE,qBAAe,OAAO;;MC0BT,IAAI;;;;;;QAyCP,oBAAe,GAAG,MAAM,CAAC,UAAU,CAAC;QAcpC,gBAAW,GAGf;YACF,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,IAAI;SACd,CAAC;qBAvDc,KAAK;uBAKH,KAAK;wBAKa,CAAC;sBAKE,MAAM;yBAKP,QAAQ;0BASxB,CAAC;mCACQ,CAAC;4BACR,GAAG;kCAEG,CAAC;;IAI/B,IAAY,gBAAgB;QAC1B,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,aAAa,CAC9C,mBAAmB,CACL,CAAC;KAClB;IAED,IAAY,iBAAiB;QAC3B,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,aAAa,CAC9C,oBAAoB,CACN,CAAC;KAClB;IAWD,cAAc;QACZ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EAAE,KAAK;YACtB,IAAI,CAAC,GAAG,CAAC,QAAQ,IAAI,GAAG,KAAK,MAAM,EAAE;gBACnC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;aACtB;SACF,CAAC,CAAC;KACJ;IAED,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,4DACE,KAAK,EAAC,OAAO,2BAEb,OAAO,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,IAEjD,gEAAS,IAAI,EAAE,oBAAoB,GAAY,CAC3C,EACN,4DACE,KAAK,EAAE;gBACL,WAAW,EAAE,IAAI;gBACjB,iBAAiB,EAAE,IAAI;gBACvB,aAAa,EAAE,IAAI,CAAC,iBAAiB,EAAE;gBACvC,cAAc,EAAE,IAAI,CAAC,aAAa,EAAE;gBACpC,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,IAAI,CAAC,iBAAiB,EAAE;aAChE,IAED,4DAAK,KAAK,EAAC,eAAe,IACxB,8DAAa,CACT,CACF,EACN,4DACE,KAAK,EAAC,aAAa,4BAEnB,OAAO,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,IAElD,gEAAS,IAAI,EAAE,qBAAqB,GAAY,CAC5C,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/utils/requestAnimationFrame.ts","src/components/tabs/tabs.scss?tag=ix-tabs&encapsulation=shadow","src/components/tabs/tabs.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\ndeclare const __zone_symbol__requestAnimationFrame: any;\n\n/**\n * Prevents angular from change detection when requesting an animation frame\n *\n * Credits goes to:\n * https://github.com/ionic-team/ionic-framework/blob/main/core/src/utils/helpers.ts\n */\nexport const requestAnimationFrameNoNgZone = (\n callback: (...args: any[]) => void\n) => {\n if (typeof __zone_symbol__requestAnimationFrame === 'function') {\n return __zone_symbol__requestAnimationFrame(callback);\n }\n if (typeof requestAnimationFrame === 'function') {\n return requestAnimationFrame(callback);\n }\n return setTimeout(callback);\n};\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/text-truncation';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n width: auto;\n display: flex;\n align-items: center;\n position: relative;\n\n .tab-items {\n overflow: hidden;\n scroll-behavior: smooth;\n width: 100%;\n\n .items-content {\n display: flex;\n align-items: center;\n }\n }\n\n .arrow {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n top: 0;\n bottom: 0;\n left: 0;\n margin: auto 0;\n border-radius: 4px;\n color: var(--theme-btn-invisible-primary--color);\n background-color: var(--theme-btn-invisible-primary--background);\n z-index: 2;\n\n &:hover {\n color: var(--theme-btn-invisible-primary--color--hover);\n background-color: var(--theme-btn-invisible-primary--background--hover);\n }\n\n &:active {\n color: var(--theme-btn-invisible-primary--color--active);\n background-color: var(--theme-btn-invisible-primary--background--active);\n }\n\n &.right {\n left: auto;\n right: 0;\n }\n }\n\n .overflow-shadow {\n display: block;\n position: relative;\n height: 100%;\n width: 100%;\n pointer-events: all;\n\n &.shadow-left {\n mask-image: linear-gradient(90deg, transparent 0px, black 45px);\n }\n\n &.shadow-right {\n mask-image: linear-gradient(\n 90deg,\n black calc(100% - 45px),\n transparent 100%\n );\n }\n\n &.shadow-both {\n mask-image: linear-gradient(\n 90deg,\n transparent 0px,\n black 45px,\n black calc(100% - 45px),\n transparent 100%\n );\n }\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 h,\n Host,\n Listen,\n Prop,\n State,\n} from '@stencil/core';\nimport { requestAnimationFrameNoNgZone } from '../utils/requestAnimationFrame';\n\n@Component({\n tag: 'ix-tabs',\n styleUrl: 'tabs.scss',\n shadow: true,\n})\nexport class Tabs {\n @Element() hostElement!: HTMLIxTabsElement;\n\n /**\n * Set tab items to small size\n */\n @Prop() small = false;\n\n /**\n * Set rounded tabs\n */\n @Prop() rounded = false;\n\n /**\n * Set default selected tab by index\n */\n @Prop({ mutable: true }) selected = 0;\n\n /**\n * Set layout width style\n */\n @Prop() layout: 'auto' | 'stretched' = 'auto';\n\n /**\n * Set placement style\n */\n @Prop() placement: 'bottom' | 'top' = 'bottom';\n\n /**\n * `selected` property changed\n *\n * @since 2.0.0\n */\n @Event() selectedChange: EventEmitter<number>;\n\n @State() totalItems = 0;\n @State() currentScrollAmount = 0;\n @State() scrollAmount = 100;\n\n @State() scrollActionAmount = 0;\n\n private windowStartSize = window.innerWidth;\n\n private get arrowLeftElement() {\n return this.hostElement.shadowRoot.querySelector(\n '[data-arrow-left]'\n ) as HTMLElement;\n }\n\n private get arrowRightElement() {\n return this.hostElement.shadowRoot.querySelector(\n '[data-arrow-right]'\n ) as HTMLElement;\n }\n\n private clickAction: {\n timeout: NodeJS.Timeout;\n isClick: boolean;\n } = {\n timeout: null,\n isClick: true,\n };\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.totalItems = 0;\n this.totalItems = this.getTabs().length;\n\n if (this.windowStartSize === 0)\n return (this.windowStartSize = window.innerWidth);\n this.move(this.windowStartSize - window.innerWidth);\n this.windowStartSize = window.innerWidth;\n }\n\n private getTabs() {\n return Array.from(this.hostElement.querySelectorAll('ix-tab-item'));\n }\n\n private getTab(tabIndex: number) {\n return this.getTabs()[tabIndex];\n }\n\n private getTabsWrapper() {\n return this.hostElement.shadowRoot.querySelector('.items-content');\n }\n\n private showArrows() {\n try {\n const tabWrapper = this.getTabsWrapper();\n return (\n tabWrapper.scrollWidth >\n Math.ceil(tabWrapper.getBoundingClientRect().width) &&\n this.layout === 'auto'\n );\n } catch (error) {\n return false;\n }\n }\n\n private showPreviousArrow() {\n try {\n return this.showArrows() && this.scrollActionAmount < 0;\n } catch (error) {\n return false;\n }\n }\n\n private showNextArrow() {\n try {\n const tabWrapper = this.getTabsWrapper();\n const tabWrapperRect = tabWrapper.getBoundingClientRect();\n\n return (\n this.showArrows() &&\n this.scrollActionAmount >\n (tabWrapper.scrollWidth - tabWrapperRect.width) * -1\n );\n } catch (error) {\n return false;\n }\n }\n\n private getArrowStyle(condition: boolean) {\n return {\n opacity: condition ? '1' : '0',\n zIndex: condition ? '1' : '-1',\n };\n }\n\n private move(amount: number, click = false) {\n const tabWrapper = this.getTabsWrapper();\n const maxScrollWidth =\n (tabWrapper.scrollWidth - tabWrapper.getBoundingClientRect().width) * -1;\n\n amount = this.currentScrollAmount + amount;\n amount = amount > 0 ? 0 : amount < maxScrollWidth ? maxScrollWidth : amount;\n\n const styles = [\n `transform: translateX(${amount}px);`,\n click ? 'transition: all ease-in-out 400ms;' : '',\n ].join('');\n\n tabWrapper.setAttribute('style', styles);\n\n if (click) this.currentScrollAmount = this.scrollActionAmount = amount;\n else this.scrollActionAmount = amount;\n }\n\n private moveTabToView(tabIndex: number) {\n if (!this.showArrows()) return;\n\n const tab = this.getTab(tabIndex).getBoundingClientRect();\n const amount = tab.x * -1;\n this.move(amount, true);\n }\n\n private setSelected(index: number) {\n this.selected = index;\n }\n\n private clickTab(index: number) {\n if (this.dragStop()) {\n return;\n }\n\n const { defaultPrevented } = this.selectedChange.emit(index);\n if (defaultPrevented) {\n return;\n }\n\n this.setSelected(index);\n this.moveTabToView(index);\n }\n\n private dragStart(element: HTMLIxTabItemElement, event: MouseEvent) {\n if (!this.showArrows()) return;\n if (event.button > 0) return;\n\n this.clickAction.timeout =\n this.clickAction.timeout === null\n ? setTimeout(() => (this.clickAction.isClick = false), 300)\n : null;\n\n const tabPositionX = parseFloat(window.getComputedStyle(element).left);\n const mousedownPositionX = event.clientX;\n const move = (event: MouseEvent) =>\n this.dragMove(event, tabPositionX, mousedownPositionX);\n\n window.addEventListener('mouseup', () => {\n window.removeEventListener('mousemove', move, false);\n this.dragStop();\n });\n window.addEventListener('mousemove', move, false);\n }\n\n private dragMove(event: MouseEvent, tabX: number, mousedownX: number) {\n this.move(event.clientX + tabX - mousedownX);\n }\n\n private dragStop() {\n clearTimeout(this.clickAction.timeout);\n this.clickAction.timeout = null;\n\n if (this.clickAction.isClick) return false;\n\n this.currentScrollAmount = this.scrollActionAmount;\n this.clickAction.isClick = true;\n\n return true;\n }\n\n componentWillLoad() {\n const tabs = this.getTabs();\n\n tabs.map((element, index) => {\n if (this.small) element.setAttribute('small', 'true');\n\n if (this.rounded) element.setAttribute('rounded', 'true');\n\n element.setAttribute('layout', this.layout);\n element.setAttribute(\n 'selected',\n index === this.selected ? 'true' : 'false'\n );\n\n element.setAttribute('placement', this.placement);\n });\n }\n\n componentDidRender() {\n const tabs = this.getTabs();\n this.totalItems = tabs.length;\n\n tabs.map((element, index) => {\n element.setAttribute(\n 'selected',\n index === this.selected ? 'true' : 'false'\n );\n });\n }\n\n componentWillRender() {\n requestAnimationFrameNoNgZone(() => {\n const showNextArrow = this.showNextArrow();\n const previousArrow = this.showPreviousArrow();\n\n Object.assign(\n this.arrowLeftElement.style,\n this.getArrowStyle(previousArrow)\n );\n Object.assign(\n this.arrowRightElement.style,\n this.getArrowStyle(showNextArrow)\n );\n });\n }\n\n componentDidLoad() {\n const tabs = this.getTabs();\n tabs.forEach((element) => {\n element.addEventListener('mousedown', (event) =>\n this.dragStart(element, event)\n );\n });\n }\n\n @Listen('tabClick')\n onTabClick(event: CustomEvent) {\n if (event.defaultPrevented) {\n return;\n }\n\n const target = event.target;\n const tabs = this.getTabs();\n\n tabs.forEach((tab, index) => {\n if (!tab.disabled && tab === target) {\n this.clickTab(index);\n }\n });\n }\n\n render() {\n return (\n <Host>\n <div\n class=\"arrow\"\n data-arrow-left\n onClick={() => this.move(this.scrollAmount, true)}\n >\n <ix-icon name={'chevron-left-small'}></ix-icon>\n </div>\n <div\n class={{\n 'tab-items': true,\n 'overflow-shadow': true,\n 'shadow-left': this.showPreviousArrow(),\n 'shadow-right': this.showNextArrow(),\n 'shadow-both': this.showNextArrow() && this.showPreviousArrow(),\n }}\n >\n <div class=\"items-content\">\n <slot></slot>\n </div>\n </div>\n <div\n class=\"arrow right\"\n data-arrow-right\n onClick={() => this.move(-this.scrollAmount, true)}\n >\n <ix-icon name={'chevron-right-small'}></ix-icon>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"tabs.js","mappings":";;AAAA;;;;;;;;AAWA;;;;;;AAMO,MAAM,6BAA6B,GAAG,CAC3C,QAAkC;IAElC,IAAI,OAAO,oCAAoC,KAAK,UAAU,EAAE;QAC9D,OAAO,oCAAoC,CAAC,QAAQ,CAAC,CAAC;KACvD;IACD,IAAI,OAAO,qBAAqB,KAAK,UAAU,EAAE;QAC/C,OAAO,qBAAqB,CAAC,QAAQ,CAAC,CAAC;KACxC;IACD,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC;;AC3BD,MAAM,OAAO,GAAG,svEAAsvE,CAAC;AACvwE,qBAAe,OAAO;;MC2BT,IAAI;;;;;;QA0CP,oBAAe,GAAG,MAAM,CAAC,UAAU,CAAC;QAGpC,gBAAW,GAGf;YACF,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,IAAI;SACd,CAAC;qBA7Cc,KAAK;uBAKH,KAAK;wBAKa,CAAC;sBAKE,MAAM;yBAKP,QAAQ;0BASxB,CAAC;mCACQ,CAAC;4BACR,GAAG;kCACG,CAAC;iCACF,KAAK;6BACT,KAAK;;IAc9B,cAAc;QACZ,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,UAA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,IAAI,CAAC,aAAa;gBAClC,aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,iBAAiB;aAC5D,IAED,4DAAK,KAAK,EAAC,eAAe,IACxB,8DAAa,CACT,CACF,EACL,IAAI,CAAC,aAAa,KACjB,4DACE,KAAK,EAAC,aAAa,EACnB,OAAO,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,IAElD,gEAAS,IAAI,EAAE,qBAAqB,GAAY,CAC5C,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/utils/requestAnimationFrame.ts","src/components/tabs/tabs.scss?tag=ix-tabs&encapsulation=shadow","src/components/tabs/tabs.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\ndeclare const __zone_symbol__requestAnimationFrame: any;\n\n/**\n * Prevents angular from change detection when requesting an animation frame\n *\n * Credits goes to:\n * https://github.com/ionic-team/ionic-framework/blob/main/core/src/utils/helpers.ts\n */\nexport const requestAnimationFrameNoNgZone = (\n callback: (...args: any[]) => void\n) => {\n if (typeof __zone_symbol__requestAnimationFrame === 'function') {\n return __zone_symbol__requestAnimationFrame(callback);\n }\n if (typeof requestAnimationFrame === 'function') {\n return requestAnimationFrame(callback);\n }\n return setTimeout(callback);\n};\n","/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/text-truncation';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n width: auto;\n display: flex;\n align-items: center;\n position: relative;\n\n .tab-items {\n overflow: hidden;\n scroll-behavior: smooth;\n width: 100%;\n\n .items-content {\n display: flex;\n align-items: center;\n }\n }\n\n .arrow {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n top: 0;\n bottom: 0;\n left: 0;\n margin: auto 0;\n border-radius: 4px;\n color: var(--theme-btn-invisible-primary--color);\n background-color: var(--theme-btn-invisible-primary--background);\n z-index: 2;\n\n &:hover {\n color: var(--theme-btn-invisible-primary--color--hover);\n background-color: var(--theme-btn-invisible-primary--background--hover);\n }\n\n &:active {\n color: var(--theme-btn-invisible-primary--color--active);\n background-color: var(--theme-btn-invisible-primary--background--active);\n }\n\n &.right {\n left: auto;\n right: 0;\n }\n }\n\n .overflow-shadow {\n display: block;\n position: relative;\n height: 100%;\n width: 100%;\n pointer-events: all;\n\n &.shadow-left {\n mask-image: linear-gradient(90deg, transparent 0px, black 45px);\n }\n\n &.shadow-right {\n mask-image: linear-gradient(\n 90deg,\n black calc(100% - 45px),\n transparent 100%\n );\n }\n\n &.shadow-both {\n mask-image: linear-gradient(\n 90deg,\n transparent 0px,\n black 45px,\n black calc(100% - 45px),\n transparent 100%\n );\n }\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2024 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 Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { requestAnimationFrameNoNgZone } from '../utils/requestAnimationFrame';\n\n@Component({\n tag: 'ix-tabs',\n styleUrl: 'tabs.scss',\n shadow: true,\n})\nexport class Tabs {\n @Element() hostElement!: HTMLIxTabsElement;\n\n /**\n * Set tab items to small size\n */\n @Prop() small = false;\n\n /**\n * Set rounded tabs\n */\n @Prop() rounded = false;\n\n /**\n * Set default selected tab by index\n */\n @Prop({ mutable: true }) selected = 0;\n\n /**\n * Set layout width style\n */\n @Prop() layout: 'auto' | 'stretched' = 'auto';\n\n /**\n * Set placement style\n */\n @Prop() placement: 'bottom' | 'top' = 'bottom';\n\n /**\n * `selected` property changed\n *\n * @since 2.0.0\n */\n @Event() selectedChange!: EventEmitter<number>;\n\n @State() totalItems = 0;\n @State() currentScrollAmount = 0;\n @State() scrollAmount = 100;\n @State() scrollActionAmount = 0;\n @State() showArrowPrevious = false;\n @State() showArrowNext = false;\n\n private windowStartSize = window.innerWidth;\n private resizeObserver?: ResizeObserver;\n\n private clickAction: {\n timeout: NodeJS.Timeout | null;\n isClick: boolean;\n } = {\n timeout: null,\n isClick: true,\n };\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.totalItems = 0;\n this.totalItems = this.getTabs().length;\n\n if (this.windowStartSize === 0)\n return (this.windowStartSize = window.innerWidth);\n this.move(this.windowStartSize - window.innerWidth);\n this.windowStartSize = window.innerWidth;\n }\n\n private getTabs() {\n return Array.from(this.hostElement.querySelectorAll('ix-tab-item'));\n }\n\n private getTab(tabIndex: number) {\n return this.getTabs()[tabIndex];\n }\n\n private getTabsWrapper() {\n return this.hostElement.shadowRoot?.querySelector('.items-content');\n }\n\n private initResizeObserver() {\n const parentElement = this.hostElement.parentElement;\n if (!parentElement) return;\n this.resizeObserver = new ResizeObserver(() => {\n this.renderArrows();\n });\n this.resizeObserver.observe(parentElement);\n }\n\n private showArrows() {\n try {\n const tabWrapper = this.getTabsWrapper();\n return (\n tabWrapper &&\n tabWrapper.scrollWidth >\n Math.ceil(tabWrapper.getBoundingClientRect().width) &&\n this.layout === 'auto'\n );\n } catch (error) {\n return false;\n }\n }\n\n private showPreviousArrow() {\n try {\n return this.showArrows() === true && this.scrollActionAmount < 0;\n } catch (error) {\n return false;\n }\n }\n\n private showNextArrow() {\n try {\n const tabWrapper = this.getTabsWrapper();\n\n if (!tabWrapper) {\n return false;\n }\n\n const tabWrapperRect = tabWrapper.getBoundingClientRect();\n\n return (\n this.showArrows() === true &&\n this.scrollActionAmount >\n (tabWrapper.scrollWidth - tabWrapperRect.width) * -1\n );\n } catch (error) {\n return false;\n }\n }\n\n private move(amount: number, click = false) {\n const tabsWrapper = this.getTabsWrapper();\n\n if (!tabsWrapper) {\n return;\n }\n\n const tabsWrapperVisibleWidth = tabsWrapper.getBoundingClientRect().width;\n const maxScrollWidth =\n -this.currentScrollAmount +\n tabsWrapperVisibleWidth -\n tabsWrapper.scrollWidth;\n\n amount = amount < maxScrollWidth ? maxScrollWidth : amount;\n amount += this.currentScrollAmount;\n amount = Math.min(amount, 0);\n\n const styles = [\n `transform: translateX(${amount}px);`,\n click ? 'transition: all ease-in-out 400ms;' : '',\n ].join('');\n\n tabsWrapper.setAttribute('style', styles);\n\n if (click) this.currentScrollAmount = this.scrollActionAmount = amount;\n else this.scrollActionAmount = amount;\n }\n\n @Watch('selected')\n onSelectedChange(newValue: number) {\n if (!this.showArrows()) return;\n\n const tabRect = this.getTab(newValue).getBoundingClientRect();\n const wrapperWidth = this.getTabsWrapper()?.clientWidth;\n const arrowWidth = 32;\n\n if (tabRect.left < arrowWidth) {\n this.move(-tabRect.left + arrowWidth, true);\n } else if (wrapperWidth && tabRect.right > wrapperWidth - arrowWidth) {\n this.move(wrapperWidth - tabRect.right - arrowWidth, true);\n }\n }\n\n private setSelected(index: number) {\n this.selected = index;\n }\n\n private clickTab(index: number) {\n if (!this.clickAction.isClick || this.dragStop()) {\n return;\n }\n\n const { defaultPrevented } = this.selectedChange.emit(index);\n if (defaultPrevented) {\n return;\n }\n\n this.setSelected(index);\n }\n\n private dragStart(element: HTMLIxTabItemElement, event: MouseEvent) {\n if (!this.showArrows()) return;\n if (event.button > 0) return;\n\n this.clickAction.timeout =\n this.clickAction.timeout === null\n ? setTimeout(() => (this.clickAction.isClick = false), 300)\n : null;\n\n const tabPositionX = parseFloat(window.getComputedStyle(element).left);\n const mousedownPositionX = event.clientX;\n const move = (event: MouseEvent) =>\n this.dragMove(event, tabPositionX, mousedownPositionX);\n const windowClick = () => {\n window.removeEventListener('mousemove', move, false);\n window.removeEventListener('click', windowClick, false);\n this.dragStop();\n };\n window.addEventListener('click', windowClick);\n window.addEventListener('mousemove', move, false);\n }\n\n private dragMove(event: MouseEvent, tabX: number, mousedownX: number) {\n this.move(event.clientX + tabX - mousedownX);\n }\n\n private dragStop() {\n if (this.clickAction.timeout) {\n clearTimeout(this.clickAction.timeout);\n this.clickAction.timeout = null;\n }\n\n if (this.clickAction.isClick) return false;\n\n this.currentScrollAmount = this.scrollActionAmount;\n this.clickAction.isClick = true;\n\n return true;\n }\n\n componentWillLoad() {\n const tabs = this.getTabs();\n\n tabs.map((element, index) => {\n if (this.small) element.setAttribute('small', 'true');\n\n if (this.rounded) element.setAttribute('rounded', 'true');\n\n element.setAttribute('layout', this.layout);\n element.setAttribute(\n 'selected',\n index === this.selected ? 'true' : 'false'\n );\n\n element.setAttribute('placement', this.placement);\n });\n\n this.initResizeObserver();\n }\n\n componentDidRender() {\n const tabs = this.getTabs();\n this.totalItems = tabs.length;\n\n tabs.map((element, index) => {\n element.setAttribute(\n 'selected',\n index === this.selected ? 'true' : 'false'\n );\n });\n }\n\n componentWillRender() {\n this.renderArrows();\n }\n\n private renderArrows() {\n requestAnimationFrameNoNgZone(() => {\n this.showArrowNext = this.showNextArrow();\n this.showArrowPrevious = this.showPreviousArrow();\n });\n }\n\n componentDidLoad() {\n const tabs = this.getTabs();\n tabs.forEach((element) => {\n element.addEventListener('mousedown', (event) =>\n this.dragStart(element, event)\n );\n });\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n }\n\n @Listen('tabClick')\n onTabClick(event: CustomEvent) {\n if (event.defaultPrevented) {\n return;\n }\n\n const target = event.target;\n const tabs = this.getTabs();\n\n tabs.forEach((tab, index) => {\n if (!tab.disabled && tab === target) {\n this.clickTab(index);\n }\n });\n }\n\n render() {\n return (\n <Host>\n {this.showArrowPrevious && (\n <div class=\"arrow\" onClick={() => this.move(this.scrollAmount, true)}>\n <ix-icon name={'chevron-left-small'}></ix-icon>\n </div>\n )}\n <div\n class={{\n 'tab-items': true,\n 'overflow-shadow': true,\n 'shadow-left': this.showArrowPrevious,\n 'shadow-right': this.showArrowNext,\n 'shadow-both': this.showArrowNext && this.showArrowPrevious,\n }}\n >\n <div class=\"items-content\">\n <slot></slot>\n </div>\n </div>\n {this.showArrowNext && (\n <div\n class=\"arrow right\"\n onClick={() => this.move(-this.scrollAmount, true)}\n >\n <ix-icon name={'chevron-right-small'}></ix-icon>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
package/components/toast.js
CHANGED
|
@@ -53,11 +53,11 @@ const Toast = /*@__PURE__*/ proxyCustomElement(class Toast extends HTMLElement {
|
|
|
53
53
|
animationPlayState: this.touched ? 'paused' : 'running',
|
|
54
54
|
};
|
|
55
55
|
progressBarClass.push('toast-progress-bar--animated');
|
|
56
|
-
return (h(Host, { key: '
|
|
56
|
+
return (h(Host, { key: 'd52b6e9699ad54687af42f99642eb0c297f97a2e', class: "animate__animated animate__fadeIn" }, h("div", { key: '93a7346e3b7a6ecd2e32f7114f93db78513cb181', class: "toast-body", onPointerLeave: () => {
|
|
57
57
|
this.touched = false;
|
|
58
58
|
}, onPointerEnter: () => {
|
|
59
59
|
this.touched = true;
|
|
60
|
-
} }, this.type || this.icon ? (h("div", { class: "toast-icon" }, this.getIcon())) : null, h("div", { key: '
|
|
60
|
+
} }, this.type || this.icon ? (h("div", { class: "toast-icon" }, this.getIcon())) : null, h("div", { key: '372fd16d6b94d8f2df0eb875d99c8c5199e80572', class: "toast-content" }, this.toastTitle ? (h("div", { class: "toast-title" }, this.toastTitle)) : null, h("div", { key: '1d43ec353af91250b6788b0ee2e44352f581543c', class: "toast-message" }, h("slot", { key: '5ed42d9699d34b6948cfda2b7ed4b1e68f2bac8e' }))), h("div", { key: '40e8ad3252a34ef2cebd6c388fa13e255a1d9f03', class: "toast-close" }, h("ix-icon-button", { key: 'ad4ed057761f4e76126ba68cd012e900ad3899a0', icon: 'close', size: "24", ghost: true, onClick: () => this.closeToast.emit() }))), this.autoClose ? (h("div", { class: progressBarClass.join(' '), style: progressBarStyle, onAnimationEnd: () => {
|
|
61
61
|
this.close();
|
|
62
62
|
}, onTransitionEnd: () => {
|
|
63
63
|
if (this.progress === 0) {
|
package/components/toast.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"toast.js","mappings":";;;;AAAA,MAAM,QAAQ,GAAG,k3EAAk3E,CAAC;AACp4E,sBAAe,QAAQ;;MCyBV,KAAK;;;;;;oBAIU,MAAM;;8BAUP,IAAI;yBAKT,IAAI;;;wBAiBJ,CAAC;uBACF,KAAK;;IAIhB,OAAO;QACb,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,QACE,8BACc,YAAY,EACxB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,SAAS,EACrB,IAAI,EAAC,IAAI,GACT,EACF;SACH;QAED,QAAQ,IAAI,CAAC,IAAI;YACf,KAAK,MAAM;gBACT,QACE,8BACc,YAAY,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,gBAAgB,GACtB,EACF;YAEJ,KAAK,OAAO;gBACV,QACE,8BACc,YAAY,EACxB,IAAI,EAAE,OAAO,EACb,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,aAAa,GACnB,EACF;YAEJ,KAAK,SAAS;gBACZ,QACE,8BACc,YAAY,EACxB,IAAI,EAAE,SAAS,EACf,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,eAAe,GACrB,EACF;YAEJ,KAAK,SAAS;gBACZ,QACE,8BACc,YAAY,EACxB,IAAI,EAAE,SAAS,EACf,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,eAAe,GACrB,EACF;YAEJ;gBACE,OAAO,EAAE,CAAC;SACb;KACF;IAEO,KAAK;QACX,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;SACpD;QACD,UAAU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AK,EAAE,CAAC;aACd,EACD,eAAe,EAAE;gBACf,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,EAAE;oBACvB,IAAI,CAAC,KAAK,EAAE,CAAC;iBACd;aACF,GACI,IACL,IAAI,CACH,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/toast/toast.scss?tag=ix-toast&encapsulation=shadow","src/components/toast/toast.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText:
|
|
1
|
+
{"file":"toast.js","mappings":";;;;AAAA,MAAM,QAAQ,GAAG,k3EAAk3E,CAAC;AACp4E,sBAAe,QAAQ;;MCyBV,KAAK;;;;;;oBAIU,MAAM;;8BAUP,IAAI;yBAKT,IAAI;;;wBAiBJ,CAAC;uBACF,KAAK;;IAIhB,OAAO;QACb,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,QACE,8BACc,YAAY,EACxB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,SAAS,EACrB,IAAI,EAAC,IAAI,GACT,EACF;SACH;QAED,QAAQ,IAAI,CAAC,IAAI;YACf,KAAK,MAAM;gBACT,QACE,8BACc,YAAY,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,gBAAgB,GACtB,EACF;YAEJ,KAAK,OAAO;gBACV,QACE,8BACc,YAAY,EACxB,IAAI,EAAE,OAAO,EACb,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,aAAa,GACnB,EACF;YAEJ,KAAK,SAAS;gBACZ,QACE,8BACc,YAAY,EACxB,IAAI,EAAE,SAAS,EACf,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,eAAe,GACrB,EACF;YAEJ,KAAK,SAAS;gBACZ,QACE,8BACc,YAAY,EACxB,IAAI,EAAE,SAAS,EACf,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,eAAe,GACrB,EACF;YAEJ;gBACE,OAAO,EAAE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,CACF,EACL,IAAI,CAAC,SAAS,IACb,WACE,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,EACjC,KAAK,EAAE,gBAAgB,EACvB,cAAc,EAAE;gBACd,IAAI,CAAC,KAAK,EAAE,CAAC;aACd,EACD,eAAe,EAAE;gBACf,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,EAAE;oBACvB,IAAI,CAAC,KAAK,EAAE,CAAC;iBACd;aACF,GACI,IACL,IAAI,CACH,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/toast/toast.scss?tag=ix-toast&encapsulation=shadow","src/components/toast/toast.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 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@import 'mixins/shadow-dom/component';\n@import 'legacy/mixins/fonts';\n\n:host {\n @include ix-component;\n\n display: flex;\n flex-direction: column;\n position: relative;\n min-width: 17.5rem;\n max-width: 17.5rem;\n min-height: 3.5rem;\n\n pointer-events: all;\n\n background-color: var(--theme-toast--background);\n border: var(--theme-toast--border-thickness) solid\n var(--theme-toast--border-color);\n border-radius: var(--theme-toast--border-radius);\n box-shadow: var(--theme-toast--box-shadow);\n\n --animate-duration: #{$medium-time};\n\n .toast-body {\n display: flex;\n position: relative;\n min-height: 3.5rem;\n width: 100%;\n flex-grow: 1;\n padding: 0.75rem;\n\n .toast-icon {\n display: flex;\n align-items: flex-start;\n margin-right: $default-space;\n }\n\n .toast-content {\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n width: 100%;\n\n .toast-title {\n @include text-default-title-single;\n margin: 0.25rem 0px;\n }\n\n .toast-message {\n min-width: 0;\n\n @include text-default;\n }\n }\n\n .toast-icon + .toast-content {\n max-width: 10.25rem;\n }\n }\n\n .toast-close {\n display: flex;\n position: relative;\n pointer-events: all;\n margin-left: auto;\n margin-right: 0px;\n }\n\n .toast-progress-bar {\n position: absolute;\n bottom: 0;\n height: $tiny-space;\n width: 100%;\n background-color: var(--theme-toast-timer-value--background);\n transform-origin: left;\n\n &--animated {\n animation: trackProgress linear 1 forwards;\n }\n }\n\n @keyframes trackProgress {\n 0% {\n transform: scaleX(1);\n }\n 100% {\n transform: scaleX(0);\n }\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2024 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 State,\n} from '@stencil/core';\nimport { ToastType } from './toast-utils';\n\n@Component({\n tag: 'ix-toast',\n styleUrl: 'toast.scss',\n shadow: true,\n})\nexport class Toast {\n /**\n * Toast type\n */\n @Prop() type: ToastType = 'info';\n\n /**\n * Toast title\n */\n @Prop() toastTitle: string;\n\n /**\n * Autoclose title after delay\n */\n @Prop() autoCloseDelay = 5000;\n\n /**\n * Autoclose behavior\n */\n @Prop() autoClose = true;\n\n /**\n * Icon of toast\n */\n @Prop() icon: string;\n\n /**\n * Icon color of toast\n */\n @Prop() iconColor: string;\n\n /**\n * Toast closed\n */\n @Event() closeToast: EventEmitter;\n\n @State() progress = 0;\n @State() touched = false;\n\n @Element() hostElement!: HTMLIxToastElement;\n\n private getIcon() {\n if (this.icon) {\n return (\n <ix-icon\n data-testid=\"toast-icon\"\n name={this.icon}\n color={this.iconColor}\n size=\"24\"\n />\n );\n }\n\n switch (this.type) {\n case 'info':\n return (\n <ix-icon\n data-testid=\"toast-icon\"\n name={'info'}\n size=\"24\"\n color=\"color-std-text\"\n />\n );\n\n case 'error':\n return (\n <ix-icon\n data-testid=\"toast-icon\"\n name={'error'}\n size=\"24\"\n color=\"color-alarm\"\n />\n );\n\n case 'success':\n return (\n <ix-icon\n data-testid=\"toast-icon\"\n name={'success'}\n size=\"24\"\n color=\"color-success\"\n />\n );\n\n case 'warning':\n return (\n <ix-icon\n data-testid=\"toast-icon\"\n name={'warning'}\n size=\"24\"\n color=\"color-warning\"\n />\n );\n\n default:\n return '';\n }\n }\n\n private close() {\n if (this.hostElement) {\n this.hostElement.classList.add('animate__fadeOut');\n }\n setTimeout(() => {\n this.closeToast.emit();\n }, 250);\n }\n\n render() {\n let progressBarStyle: Record<string, string> = {};\n\n const progressBarClass = ['toast-progress-bar'];\n\n progressBarStyle = {\n animationDuration: `${this.autoCloseDelay}ms`,\n animationPlayState: this.touched ? 'paused' : 'running',\n };\n\n progressBarClass.push('toast-progress-bar--animated');\n\n return (\n <Host class=\"animate__animated animate__fadeIn\">\n <div\n class=\"toast-body\"\n onPointerLeave={() => {\n this.touched = false;\n }}\n onPointerEnter={() => {\n this.touched = true;\n }}\n >\n {this.type || this.icon ? (\n <div class=\"toast-icon\">{this.getIcon()}</div>\n ) : null}\n <div class=\"toast-content\">\n {this.toastTitle ? (\n <div class=\"toast-title\">{this.toastTitle}</div>\n ) : null}\n <div class=\"toast-message\">\n <slot></slot>\n </div>\n </div>\n <div class=\"toast-close\">\n <ix-icon-button\n icon={'close'}\n size=\"24\"\n ghost\n onClick={() => this.closeToast.emit()}\n />\n </div>\n </div>\n {this.autoClose ? (\n <div\n class={progressBarClass.join(' ')}\n style={progressBarStyle}\n onAnimationEnd={() => {\n this.close();\n }}\n onTransitionEnd={() => {\n if (this.progress === 0) {\n this.close();\n }\n }}\n ></div>\n ) : null}\n </Host>\n );\n }\n}\n"],"version":3}
|