@siemens/ix 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/_commonjsHelpers.js +21 -0
- package/components/_commonjsHelpers.js.map +1 -0
- package/components/a11y.js +79 -0
- package/components/a11y.js.map +1 -0
- package/components/animation.js +19 -0
- package/components/animation.js.map +1 -0
- package/components/anime.es.js +1311 -0
- package/components/anime.es.js.map +1 -0
- package/components/application-header.js +95 -0
- package/components/application-header.js.map +1 -0
- package/components/avatar.js +53 -0
- package/components/avatar.js.map +1 -0
- package/components/base-button.js +47 -0
- package/components/base-button.js.map +1 -0
- package/components/base-icon-button.js +18 -0
- package/components/base-icon-button.js.map +1 -0
- package/components/breadcrumb-item.js +92 -0
- package/components/breadcrumb-item.js.map +1 -0
- package/components/breakpoints.js +25 -0
- package/components/breakpoints.js.map +1 -0
- package/components/burger-menu.js +55 -0
- package/components/burger-menu.js.map +1 -0
- package/components/button.js +91 -0
- package/components/button.js.map +1 -0
- package/components/card-accordion.js +72 -0
- package/components/card-accordion.js.map +1 -0
- package/components/card-content.js +32 -0
- package/components/card-content.js.map +1 -0
- package/components/card-title.js +32 -0
- package/components/card-title.js.map +1 -0
- package/components/card.js +36 -0
- package/components/card.js.map +1 -0
- package/components/context.js +101 -0
- package/components/context.js.map +1 -0
- package/components/custom-elements.d.ts +10 -0
- package/components/date-picker.js +372 -0
- package/components/date-picker.js.map +1 -0
- package/components/date-time-card.js +45 -0
- package/components/date-time-card.js.map +1 -0
- package/components/default-tree-item.js +22 -0
- package/components/default-tree-item.js.map +1 -0
- package/components/divider.js +32 -0
- package/components/divider.js.map +1 -0
- package/components/dropdown-item.js +69 -0
- package/components/dropdown-item.js.map +1 -0
- package/components/dropdown.js +346 -0
- package/components/dropdown.js.map +1 -0
- package/components/filter-chip.js +56 -0
- package/components/filter-chip.js.map +1 -0
- package/components/flip-tile-state.js +20 -0
- package/components/flip-tile-state.js.map +1 -0
- package/components/floating-ui.dom.esm.js +1512 -0
- package/components/floating-ui.dom.esm.js.map +1 -0
- package/components/group-context-menu.js +73 -0
- package/components/group-context-menu.js.map +1 -0
- package/components/group-item.js +58 -0
- package/components/group-item.js.map +1 -0
- package/components/icon-button.js +99 -0
- package/components/icon-button.js.map +1 -0
- package/components/index.d.ts +27 -0
- package/components/index.js +101 -0
- package/components/index.js.map +1 -0
- package/components/ix-action-card.d.ts +11 -0
- package/components/ix-action-card.js +66 -0
- package/components/ix-action-card.js.map +1 -0
- package/components/ix-application-header.d.ts +11 -0
- package/components/ix-application-header.js +8 -0
- package/components/ix-application-header.js.map +1 -0
- package/components/ix-application-sidebar.d.ts +11 -0
- package/components/ix-application-sidebar.js +63 -0
- package/components/ix-application-sidebar.js.map +1 -0
- package/components/ix-application.d.ts +11 -0
- package/components/ix-application.js +128 -0
- package/components/ix-application.js.map +1 -0
- package/components/ix-avatar.d.ts +11 -0
- package/components/ix-avatar.js +8 -0
- package/components/ix-avatar.js.map +1 -0
- package/components/ix-basic-navigation.d.ts +11 -0
- package/components/ix-basic-navigation.js +132 -0
- package/components/ix-basic-navigation.js.map +1 -0
- package/components/ix-blind.d.ts +11 -0
- package/components/ix-blind.js +128 -0
- package/components/ix-blind.js.map +1 -0
- package/components/ix-breadcrumb-item.d.ts +11 -0
- package/components/ix-breadcrumb-item.js +8 -0
- package/components/ix-breadcrumb-item.js.map +1 -0
- package/components/ix-breadcrumb.d.ts +11 -0
- package/components/ix-breadcrumb.js +151 -0
- package/components/ix-breadcrumb.js.map +1 -0
- package/components/ix-burger-menu.d.ts +11 -0
- package/components/ix-burger-menu.js +8 -0
- package/components/ix-burger-menu.js.map +1 -0
- package/components/ix-button.d.ts +11 -0
- package/components/ix-button.js +8 -0
- package/components/ix-button.js.map +1 -0
- package/components/ix-card-accordion.d.ts +11 -0
- package/components/ix-card-accordion.js +8 -0
- package/components/ix-card-accordion.js.map +1 -0
- package/components/ix-card-content.d.ts +11 -0
- package/components/ix-card-content.js +8 -0
- package/components/ix-card-content.js.map +1 -0
- package/components/ix-card-list.d.ts +11 -0
- package/components/ix-card-list.js +228 -0
- package/components/ix-card-list.js.map +1 -0
- package/components/ix-card-title.d.ts +11 -0
- package/components/ix-card-title.js +8 -0
- package/components/ix-card-title.js.map +1 -0
- package/components/ix-card.d.ts +11 -0
- package/components/ix-card.js +8 -0
- package/components/ix-card.js.map +1 -0
- package/components/ix-category-filter.d.ts +11 -0
- package/components/ix-category-filter.js +464 -0
- package/components/ix-category-filter.js.map +1 -0
- package/components/ix-chip.d.ts +11 -0
- package/components/ix-chip.js +98 -0
- package/components/ix-chip.js.map +1 -0
- package/components/ix-col.d.ts +11 -0
- package/components/ix-col.js +96 -0
- package/components/ix-col.js.map +1 -0
- package/components/ix-content-header.d.ts +11 -0
- package/components/ix-content-header.js +63 -0
- package/components/ix-content-header.js.map +1 -0
- package/components/ix-content.d.ts +11 -0
- package/components/ix-content.js +48 -0
- package/components/ix-content.js.map +1 -0
- package/components/ix-css-grid-item.d.ts +11 -0
- package/components/ix-css-grid-item.js +40 -0
- package/components/ix-css-grid-item.js.map +1 -0
- package/components/ix-css-grid.d.ts +11 -0
- package/components/ix-css-grid.js +113 -0
- package/components/ix-css-grid.js.map +1 -0
- package/components/ix-date-picker.d.ts +11 -0
- package/components/ix-date-picker.js +8 -0
- package/components/ix-date-picker.js.map +1 -0
- package/components/ix-date-time-card.d.ts +11 -0
- package/components/ix-date-time-card.js +8 -0
- package/components/ix-date-time-card.js.map +1 -0
- package/components/ix-datetime-picker.d.ts +11 -0
- package/components/ix-datetime-picker.js +149 -0
- package/components/ix-datetime-picker.js.map +1 -0
- package/components/ix-divider.d.ts +11 -0
- package/components/ix-divider.js +8 -0
- package/components/ix-divider.js.map +1 -0
- package/components/ix-drawer.d.ts +11 -0
- package/components/ix-drawer.js +145 -0
- package/components/ix-drawer.js.map +1 -0
- package/components/ix-dropdown-button.d.ts +11 -0
- package/components/ix-dropdown-button.js +92 -0
- package/components/ix-dropdown-button.js.map +1 -0
- package/components/ix-dropdown-header.d.ts +11 -0
- package/components/ix-dropdown-header.js +44 -0
- package/components/ix-dropdown-header.js.map +1 -0
- package/components/ix-dropdown-item.d.ts +11 -0
- package/components/ix-dropdown-item.js +8 -0
- package/components/ix-dropdown-item.js.map +1 -0
- package/components/ix-dropdown-quick-actions.d.ts +11 -0
- package/components/ix-dropdown-quick-actions.js +35 -0
- package/components/ix-dropdown-quick-actions.js.map +1 -0
- package/components/ix-dropdown.d.ts +11 -0
- package/components/ix-dropdown.js +8 -0
- package/components/ix-dropdown.js.map +1 -0
- package/components/ix-empty-state.d.ts +11 -0
- package/components/ix-empty-state.js +65 -0
- package/components/ix-empty-state.js.map +1 -0
- package/components/ix-event-list-item.d.ts +11 -0
- package/components/ix-event-list-item.js +61 -0
- package/components/ix-event-list-item.js.map +1 -0
- package/components/ix-event-list.d.ts +11 -0
- package/components/ix-event-list.js +143 -0
- package/components/ix-event-list.js.map +1 -0
- package/components/ix-expanding-search.d.ts +11 -0
- package/components/ix-expanding-search.js +119 -0
- package/components/ix-expanding-search.js.map +1 -0
- package/components/ix-filter-chip.d.ts +11 -0
- package/components/ix-filter-chip.js +8 -0
- package/components/ix-filter-chip.js.map +1 -0
- package/components/ix-flip-tile-content.d.ts +11 -0
- package/components/ix-flip-tile-content.js +38 -0
- package/components/ix-flip-tile-content.js.map +1 -0
- package/components/ix-flip-tile.d.ts +11 -0
- package/components/ix-flip-tile.js +121 -0
- package/components/ix-flip-tile.js.map +1 -0
- package/components/ix-form-field.d.ts +11 -0
- package/components/ix-form-field.js +43 -0
- package/components/ix-form-field.js.map +1 -0
- package/components/ix-group-context-menu.d.ts +11 -0
- package/components/ix-group-context-menu.js +8 -0
- package/components/ix-group-context-menu.js.map +1 -0
- package/components/ix-group-item.d.ts +11 -0
- package/components/ix-group-item.js +8 -0
- package/components/ix-group-item.js.map +1 -0
- package/components/ix-group.d.ts +11 -0
- package/components/ix-group.js +178 -0
- package/components/ix-group.js.map +1 -0
- package/components/ix-icon-button.d.ts +11 -0
- package/components/ix-icon-button.js +8 -0
- package/components/ix-icon-button.js.map +1 -0
- package/components/ix-icon-toggle-button.d.ts +11 -0
- package/components/ix-icon-toggle-button.js +116 -0
- package/components/ix-icon-toggle-button.js.map +1 -0
- package/components/ix-input-group.d.ts +11 -0
- package/components/ix-input-group.js +130 -0
- package/components/ix-input-group.js.map +1 -0
- package/components/ix-key-value-list.d.ts +11 -0
- package/components/ix-key-value-list.js +38 -0
- package/components/ix-key-value-list.js.map +1 -0
- package/components/ix-key-value.d.ts +11 -0
- package/components/ix-key-value.js +47 -0
- package/components/ix-key-value.js.map +1 -0
- package/components/ix-kpi.d.ts +11 -0
- package/components/ix-kpi.js +69 -0
- package/components/ix-kpi.js.map +1 -0
- package/components/ix-layout-grid.d.ts +11 -0
- package/components/ix-layout-grid.js +47 -0
- package/components/ix-layout-grid.js.map +1 -0
- package/components/ix-link-button.d.ts +11 -0
- package/components/ix-link-button.js +48 -0
- package/components/ix-link-button.js.map +1 -0
- package/components/ix-map-navigation-overlay.d.ts +11 -0
- package/components/ix-map-navigation-overlay.js +8 -0
- package/components/ix-map-navigation-overlay.js.map +1 -0
- package/components/ix-map-navigation.d.ts +11 -0
- package/components/ix-map-navigation.js +226 -0
- package/components/ix-map-navigation.js.map +1 -0
- package/components/ix-menu-about-item.d.ts +11 -0
- package/components/ix-menu-about-item.js +38 -0
- package/components/ix-menu-about-item.js.map +1 -0
- package/components/ix-menu-about-news.d.ts +11 -0
- package/components/ix-menu-about-news.js +83 -0
- package/components/ix-menu-about-news.js.map +1 -0
- package/components/ix-menu-about.d.ts +11 -0
- package/components/ix-menu-about.js +119 -0
- package/components/ix-menu-about.js.map +1 -0
- package/components/ix-menu-avatar-item.d.ts +11 -0
- package/components/ix-menu-avatar-item.js +8 -0
- package/components/ix-menu-avatar-item.js.map +1 -0
- package/components/ix-menu-avatar.d.ts +11 -0
- package/components/ix-menu-avatar.js +77 -0
- package/components/ix-menu-avatar.js.map +1 -0
- package/components/ix-menu-category.d.ts +11 -0
- package/components/ix-menu-category.js +190 -0
- package/components/ix-menu-category.js.map +1 -0
- package/components/ix-menu-item.d.ts +11 -0
- package/components/ix-menu-item.js +8 -0
- package/components/ix-menu-item.js.map +1 -0
- package/components/ix-menu-settings-item.d.ts +11 -0
- package/components/ix-menu-settings-item.js +38 -0
- package/components/ix-menu-settings-item.js.map +1 -0
- package/components/ix-menu-settings.d.ts +11 -0
- package/components/ix-menu-settings.js +106 -0
- package/components/ix-menu-settings.js.map +1 -0
- package/components/ix-menu.d.ts +11 -0
- package/components/ix-menu.js +508 -0
- package/components/ix-menu.js.map +1 -0
- package/components/ix-message-bar.d.ts +11 -0
- package/components/ix-message-bar.js +87 -0
- package/components/ix-message-bar.js.map +1 -0
- package/components/ix-modal-content.d.ts +11 -0
- package/components/ix-modal-content.js +35 -0
- package/components/ix-modal-content.js.map +1 -0
- package/components/ix-modal-example.d.ts +11 -0
- package/components/ix-modal-example.js +58 -0
- package/components/ix-modal-example.js.map +1 -0
- package/components/ix-modal-footer.d.ts +11 -0
- package/components/ix-modal-footer.js +35 -0
- package/components/ix-modal-footer.js.map +1 -0
- package/components/ix-modal-header.d.ts +11 -0
- package/components/ix-modal-header.js +84 -0
- package/components/ix-modal-header.js.map +1 -0
- package/components/ix-modal-loading.d.ts +11 -0
- package/components/ix-modal-loading.js +41 -0
- package/components/ix-modal-loading.js.map +1 -0
- package/components/ix-modal.d.ts +11 -0
- package/components/ix-modal.js +156 -0
- package/components/ix-modal.js.map +1 -0
- package/components/ix-pagination.d.ts +11 -0
- package/components/ix-pagination.js +211 -0
- package/components/ix-pagination.js.map +1 -0
- package/components/ix-pill.d.ts +11 -0
- package/components/ix-pill.js +78 -0
- package/components/ix-pill.js.map +1 -0
- package/components/ix-push-card.d.ts +11 -0
- package/components/ix-push-card.js +80 -0
- package/components/ix-push-card.js.map +1 -0
- package/components/ix-row.d.ts +11 -0
- package/components/ix-row.js +35 -0
- package/components/ix-row.js.map +1 -0
- package/components/ix-select-item.d.ts +11 -0
- package/components/ix-select-item.js +8 -0
- package/components/ix-select-item.js.map +1 -0
- package/components/ix-select.d.ts +11 -0
- package/components/ix-select.js +8 -0
- package/components/ix-select.js.map +1 -0
- package/components/ix-slider.d.ts +11 -0
- package/components/ix-slider.js +192 -0
- package/components/ix-slider.js.map +1 -0
- package/components/ix-spinner.d.ts +11 -0
- package/components/ix-spinner.js +8 -0
- package/components/ix-spinner.js.map +1 -0
- package/components/ix-split-button-item.d.ts +11 -0
- package/components/ix-split-button-item.js +51 -0
- package/components/ix-split-button-item.js.map +1 -0
- package/components/ix-split-button.d.ts +11 -0
- package/components/ix-split-button.js +97 -0
- package/components/ix-split-button.js.map +1 -0
- package/components/ix-tab-item.d.ts +11 -0
- package/components/ix-tab-item.js +8 -0
- package/components/ix-tab-item.js.map +1 -0
- package/components/ix-tabs.d.ts +11 -0
- package/components/ix-tabs.js +8 -0
- package/components/ix-tabs.js.map +1 -0
- package/components/ix-tile.d.ts +11 -0
- package/components/ix-tile.js +59 -0
- package/components/ix-tile.js.map +1 -0
- package/components/ix-time-picker.d.ts +11 -0
- package/components/ix-time-picker.js +8 -0
- package/components/ix-time-picker.js.map +1 -0
- package/components/ix-toast-container.d.ts +11 -0
- package/components/ix-toast-container.js +124 -0
- package/components/ix-toast-container.js.map +1 -0
- package/components/ix-toast.d.ts +11 -0
- package/components/ix-toast.js +8 -0
- package/components/ix-toast.js.map +1 -0
- package/components/ix-toggle-button.d.ts +11 -0
- package/components/ix-toggle-button.js +105 -0
- package/components/ix-toggle-button.js.map +1 -0
- package/components/ix-toggle.d.ts +11 -0
- package/components/ix-toggle.js +62 -0
- package/components/ix-toggle.js.map +1 -0
- package/components/ix-tooltip.d.ts +11 -0
- package/components/ix-tooltip.js +8 -0
- package/components/ix-tooltip.js.map +1 -0
- package/components/ix-tree-item.d.ts +11 -0
- package/components/ix-tree-item.js +8 -0
- package/components/ix-tree-item.js.map +1 -0
- package/components/ix-tree.d.ts +11 -0
- package/components/ix-tree.js +727 -0
- package/components/ix-tree.js.map +1 -0
- package/components/ix-typography.d.ts +11 -0
- package/components/ix-typography.js +8 -0
- package/components/ix-typography.js.map +1 -0
- package/components/ix-upload.d.ts +11 -0
- package/components/ix-upload.js +147 -0
- package/components/ix-upload.js.map +1 -0
- package/components/ix-validation-tooltip.d.ts +11 -0
- package/components/ix-validation-tooltip.js +170 -0
- package/components/ix-validation-tooltip.js.map +1 -0
- package/components/ix-workflow-step.d.ts +11 -0
- package/components/ix-workflow-step.js +120 -0
- package/components/ix-workflow-step.js.map +1 -0
- package/components/ix-workflow-steps.d.ts +11 -0
- package/components/ix-workflow-steps.js +99 -0
- package/components/ix-workflow-steps.js.map +1 -0
- package/components/logical-filter-operator.js +35 -0
- package/components/logical-filter-operator.js.map +1 -0
- package/components/luxon.js +7828 -0
- package/components/luxon.js.map +1 -0
- package/components/map-navigation-overlay.js +89 -0
- package/components/map-navigation-overlay.js.map +1 -0
- package/components/menu-avatar-item.js +45 -0
- package/components/menu-avatar-item.js.map +1 -0
- package/components/menu-item.js +92 -0
- package/components/menu-item.js.map +1 -0
- package/components/menu-service.js +156 -0
- package/components/menu-service.js.map +1 -0
- package/components/modal.js +245 -0
- package/components/modal.js.map +1 -0
- package/components/mutation-observer.js +13 -0
- package/components/mutation-observer.js.map +1 -0
- package/components/my-component.d.ts +11 -0
- package/components/my-component.js +34 -0
- package/components/my-component.js.map +1 -0
- package/components/package.json +8 -0
- package/components/rwd.util.js +41 -0
- package/components/rwd.util.js.map +1 -0
- package/components/select-item.js +92 -0
- package/components/select-item.js.map +1 -0
- package/components/select.js +410 -0
- package/components/select.js.map +1 -0
- package/components/shadow-dom.js +21 -0
- package/components/shadow-dom.js.map +1 -0
- package/components/spinner.js +48 -0
- package/components/spinner.js.map +1 -0
- package/components/tab-item.js +87 -0
- package/components/tab-item.js.map +1 -0
- package/components/tabs.js +227 -0
- package/components/tabs.js.map +1 -0
- package/components/theme-switcher.js +123 -0
- package/components/theme-switcher.js.map +1 -0
- package/components/time-picker.js +252 -0
- package/components/time-picker.js.map +1 -0
- package/components/toast.js +105 -0
- package/components/toast.js.map +1 -0
- package/components/tooltip.js +197 -0
- package/components/tooltip.js.map +1 -0
- package/components/tree-item.js +51 -0
- package/components/tree-item.js.map +1 -0
- package/components/typed-event.js +46 -0
- package/components/typed-event.js.map +1 -0
- package/components/typography.js +76 -0
- package/components/typography.js.map +1 -0
- package/components/upload-file-state.js +19 -0
- package/components/upload-file-state.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$6 } from './dropdown.js';
|
|
3
|
+
import { d as defineCustomElement$5 } from './dropdown-item.js';
|
|
4
|
+
import { d as defineCustomElement$4 } from './filter-chip.js';
|
|
5
|
+
import { d as defineCustomElement$3 } from './icon-button.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './select-item.js';
|
|
7
|
+
import { d as defineCustomElement$1 } from './spinner.js';
|
|
8
|
+
|
|
9
|
+
const selectCss = ":host{display:inline-block;position:relative;min-height:2rem;height:auto;border-radius:var(--theme-input--border-radius)}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .d-none{display:none}:host .select{position:relative;display:flex;align-items:center;background-color:var(--theme-input--background);border:var(--theme-input--border-thickness) solid var(--theme-input--border-color);border-radius:var(--theme-input--border-radius);padding:0 0 0 0.5rem;box-shadow:var(--theme-inset-shadow-1) !important}:host .select:not(.disabled):not(:disabled){cursor:pointer}:host .select:not(.disabled):not(:disabled):hover{background-color:var(--theme-input--background--hover);border-color:var(--theme-input--border-color--hover)}:host .select:focus-within{background-color:var(--theme-input--background--focus);border-color:var(--theme-input--border-color--focus);outline:1px solid #119fff;outline-offset:var(--theme-input--focus--outline-offset)}:host .select.readonly{box-shadow:none !important;border:none;border-radius:0px;border-bottom:var(--theme-input--border-thickness) solid var(--theme-color-weak-bdr)}:host .select.readonly,:host .select.readonly:hover,:host .select.readonly:active{background-color:transparent !important}:host .select.readonly:focus,:host .select.readonly:focus-within,:host .select.readonly:focus-visible{outline:none}:host .select.readonly input{color:var(--theme-color-weak-text)}:host .select.readonly input:focus,:host .select.readonly input:focus-visible{outline:none}:host .hidden{display:none !important}:host .trigger{display:flex;align-items:center;flex-grow:1;height:100%}:host .input-container{display:flex;position:relative;align-items:flex-start;width:100%;height:100%}:host .input-container .chips{position:relative;display:flex;align-items:center;flex-wrap:wrap;height:100%;max-height:3.5rem;flex-grow:1;overflow-y:auto}:host .input-container .chips>ix-filter-chip{margin:0.1rem}:host .input-container input{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:400;line-height:1.429em;color:var(--theme-color-std-text);background:transparent;height:1.75rem;width:100%}:host .input-container input,:host .input-container input:hover,:host .input-container input:focus-visible{border:none;outline:none}:host .input-container input::-moz-placeholder{color:var(--theme-input-select-icon--color)}:host .input-container input::placeholder{color:var(--theme-input-select-icon--color)}:host .input-container input.hide-placeholder::-moz-placeholder{opacity:0}:host .input-container input.hide-placeholder::placeholder{opacity:0}:host .dropdown-visible{--ix-icon-button-color:var(--theme-color-dynamic--hover)}:host .add-item{display:flex;justify-content:flex-start;align-items:center;position:relative;width:100%}:host .select-list-header{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;height:2rem;color:var(--theme-select-list-item-hint--color);margin:0 0.5rem 0 1rem}";
|
|
10
|
+
|
|
11
|
+
const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
this.__registerHost();
|
|
15
|
+
this.__attachShadow();
|
|
16
|
+
this.valueChange = createEvent(this, "valueChange", 7);
|
|
17
|
+
this.itemSelectionChange = createEvent(this, "itemSelectionChange", 7);
|
|
18
|
+
this.inputChange = createEvent(this, "inputChange", 7);
|
|
19
|
+
this.addItem = createEvent(this, "addItem", 7);
|
|
20
|
+
this.selectedIndices = undefined;
|
|
21
|
+
this.value = undefined;
|
|
22
|
+
this.allowClear = false;
|
|
23
|
+
this.mode = 'single';
|
|
24
|
+
this.editable = false;
|
|
25
|
+
this.disabled = false;
|
|
26
|
+
this.readonly = false;
|
|
27
|
+
this.i18nPlaceholder = 'Select an option';
|
|
28
|
+
this.i18nPlaceholderEditable = 'Type of select option';
|
|
29
|
+
this.i18nSelectListHeader = 'Please select an option';
|
|
30
|
+
this.i18nNoMatches = 'No matches';
|
|
31
|
+
this.hideListHeader = false;
|
|
32
|
+
this.dropdownShow = false;
|
|
33
|
+
this.selectedLabels = undefined;
|
|
34
|
+
this.dropdownWrapperRef = undefined;
|
|
35
|
+
this.dropdownAnchor = undefined;
|
|
36
|
+
this.isDropdownEmpty = false;
|
|
37
|
+
this.hasFocus = false;
|
|
38
|
+
this.navigationItem = undefined;
|
|
39
|
+
this.inputFilterText = undefined;
|
|
40
|
+
this.inputValue = undefined;
|
|
41
|
+
}
|
|
42
|
+
get items() {
|
|
43
|
+
return [
|
|
44
|
+
...Array.from(this.hostElement.querySelectorAll('ix-select-item')),
|
|
45
|
+
...Array.from(this.hostElement.shadowRoot.querySelectorAll('ix-select-item')),
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
get selectedItems() {
|
|
49
|
+
return this.items.filter((item) => item.selected);
|
|
50
|
+
}
|
|
51
|
+
get addItemButton() {
|
|
52
|
+
return this.hostElement.shadowRoot.querySelector('.add-item');
|
|
53
|
+
}
|
|
54
|
+
get isSingleMode() {
|
|
55
|
+
return this.mode === 'single';
|
|
56
|
+
}
|
|
57
|
+
get isMultipleMode() {
|
|
58
|
+
return this.mode === 'multiple';
|
|
59
|
+
}
|
|
60
|
+
get isEveryDropdownItemHidden() {
|
|
61
|
+
return this.items.every((item) => item.classList.contains('d-none'));
|
|
62
|
+
}
|
|
63
|
+
watchSelectedIndices(value) {
|
|
64
|
+
this.value = value;
|
|
65
|
+
this.updateSelection();
|
|
66
|
+
}
|
|
67
|
+
watchValue(value) {
|
|
68
|
+
this.selectedIndices = value;
|
|
69
|
+
this.updateSelection();
|
|
70
|
+
}
|
|
71
|
+
onItemClicked(event) {
|
|
72
|
+
const newId = event.detail;
|
|
73
|
+
this.itemClick(newId);
|
|
74
|
+
}
|
|
75
|
+
itemClick(newId) {
|
|
76
|
+
this.value = this.toggleValue(newId);
|
|
77
|
+
this.updateSelection();
|
|
78
|
+
this.emitValueChange();
|
|
79
|
+
}
|
|
80
|
+
emitAddItem(value) {
|
|
81
|
+
if (value.trim() === '') {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const newItem = document.createElement('ix-select-item');
|
|
85
|
+
newItem.value = value;
|
|
86
|
+
newItem.label = value;
|
|
87
|
+
this.addItemRef.appendChild(newItem);
|
|
88
|
+
this.clearInput();
|
|
89
|
+
this.itemClick(value);
|
|
90
|
+
this.addItem.emit(value);
|
|
91
|
+
}
|
|
92
|
+
toggleValue(itemValue) {
|
|
93
|
+
if (!this.isMultipleMode) {
|
|
94
|
+
return itemValue;
|
|
95
|
+
}
|
|
96
|
+
if (!this.value) {
|
|
97
|
+
return [itemValue];
|
|
98
|
+
}
|
|
99
|
+
let value = this.value;
|
|
100
|
+
if (!Array.isArray(value)) {
|
|
101
|
+
value = [value];
|
|
102
|
+
}
|
|
103
|
+
if (value.includes(itemValue)) {
|
|
104
|
+
return value.filter((value) => value !== itemValue);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
return [...value, itemValue];
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
updateSelection() {
|
|
111
|
+
var _a;
|
|
112
|
+
let ids = [];
|
|
113
|
+
if (this.value) {
|
|
114
|
+
ids = Array.isArray(this.value) ? [...this.value] : [this.value];
|
|
115
|
+
}
|
|
116
|
+
this.items.forEach((item) => {
|
|
117
|
+
item.selected = ids.some((i) => i === item.value);
|
|
118
|
+
});
|
|
119
|
+
this.selectedLabels = this.selectedItems.map((item) => item.label);
|
|
120
|
+
if (this.isSingleMode) {
|
|
121
|
+
this.inputValue = ((_a = this.selectedLabels) === null || _a === void 0 ? void 0 : _a.length)
|
|
122
|
+
? this.selectedLabels[0]
|
|
123
|
+
: null;
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
this.inputValue = null;
|
|
127
|
+
}
|
|
128
|
+
emitValueChange() {
|
|
129
|
+
this.valueChange.emit(this.value);
|
|
130
|
+
if (!this.value) {
|
|
131
|
+
this.itemSelectionChange.emit(null);
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
this.itemSelectionChange.emit(Array.isArray(this.value) ? this.value : [this.value]);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
componentDidLoad() {
|
|
138
|
+
this.inputRef.addEventListener('input', () => {
|
|
139
|
+
this.inputChange.emit(this.inputRef.value);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
componentWillLoad() {
|
|
143
|
+
if (this.selectedIndices && !this.value) {
|
|
144
|
+
this.value = this.selectedIndices;
|
|
145
|
+
}
|
|
146
|
+
this.updateSelection();
|
|
147
|
+
}
|
|
148
|
+
onLabelChange(event) {
|
|
149
|
+
event.preventDefault();
|
|
150
|
+
event.stopImmediatePropagation();
|
|
151
|
+
this.updateSelection();
|
|
152
|
+
}
|
|
153
|
+
disconnectedCallback() {
|
|
154
|
+
if (this.labelMutationObserver) {
|
|
155
|
+
this.labelMutationObserver.disconnect();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
itemExists(item) {
|
|
159
|
+
return this.items.find((i) => i.label === item);
|
|
160
|
+
}
|
|
161
|
+
dropdownVisibilityChanged(event) {
|
|
162
|
+
this.dropdownShow = event.detail;
|
|
163
|
+
this.hasFocus = event.detail;
|
|
164
|
+
if (event.detail) {
|
|
165
|
+
this.inputRef.focus();
|
|
166
|
+
this.inputRef.select();
|
|
167
|
+
this.removeHiddenFromItems();
|
|
168
|
+
this.isDropdownEmpty = this.isEveryDropdownItemHidden;
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
this.navigationItem = undefined;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
async onKeyDown(event) {
|
|
175
|
+
if (event.code === 'ArrowDown' || event.code === 'ArrowUp') {
|
|
176
|
+
this.onArrowNavigation(event, event.code);
|
|
177
|
+
}
|
|
178
|
+
if (!this.dropdownShow) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
if (event.code === 'Enter' || event.code === 'NumpadEnter') {
|
|
182
|
+
await this.onEnterNavigation();
|
|
183
|
+
}
|
|
184
|
+
if (event.code === 'Escape') {
|
|
185
|
+
this.dropdownShow = false;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
async onEnterNavigation() {
|
|
189
|
+
var _a, _b;
|
|
190
|
+
if (this.isMultipleMode) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (this.editable && !this.itemExists(this.inputFilterText)) {
|
|
194
|
+
this.emitAddItem(this.inputFilterText);
|
|
195
|
+
this.navigationItem = this.items[this.items.length - 1];
|
|
196
|
+
}
|
|
197
|
+
(_a = this.navigationItem) === null || _a === void 0 ? void 0 : _a.onItemClick();
|
|
198
|
+
await ((_b = this.dropdownRef) === null || _b === void 0 ? void 0 : _b.updatePosition());
|
|
199
|
+
if (this.isSingleMode && !this.editable) {
|
|
200
|
+
this.dropdownShow = false;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
onArrowNavigation(event, key) {
|
|
204
|
+
event.preventDefault();
|
|
205
|
+
event.stopPropagation();
|
|
206
|
+
this.dropdownShow = true;
|
|
207
|
+
const items = this.items.filter((i) => !i.classList.contains('d-none'));
|
|
208
|
+
if (this.navigationItem === undefined) {
|
|
209
|
+
this.applyFocusTo(items[0]);
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
let indexOfNavigationItem = items.findIndex((item) => item === this.navigationItem);
|
|
213
|
+
if (key === 'ArrowDown') {
|
|
214
|
+
indexOfNavigationItem++;
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
indexOfNavigationItem--;
|
|
218
|
+
}
|
|
219
|
+
const newFocusItem = items[indexOfNavigationItem];
|
|
220
|
+
this.applyFocusTo(newFocusItem);
|
|
221
|
+
}
|
|
222
|
+
applyFocusTo(element) {
|
|
223
|
+
if (!element) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
this.navigationItem = element;
|
|
227
|
+
setTimeout(() => {
|
|
228
|
+
element.shadowRoot
|
|
229
|
+
.querySelector('ix-dropdown-item')
|
|
230
|
+
.shadowRoot.querySelector('button')
|
|
231
|
+
.focus();
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
filterItemsWithTypeahead() {
|
|
235
|
+
this.inputFilterText = this.inputRef.value;
|
|
236
|
+
if (this.inputFilterText) {
|
|
237
|
+
this.items.forEach((item) => {
|
|
238
|
+
item.classList.remove('d-none');
|
|
239
|
+
if (!item.label.toLowerCase().includes(this.inputFilterText.toLowerCase())) {
|
|
240
|
+
item.classList.add('d-none');
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
this.removeHiddenFromItems();
|
|
246
|
+
}
|
|
247
|
+
this.isDropdownEmpty = this.isEveryDropdownItemHidden;
|
|
248
|
+
}
|
|
249
|
+
removeHiddenFromItems() {
|
|
250
|
+
this.items.forEach((item) => {
|
|
251
|
+
item.classList.remove('d-none');
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
clearInput() {
|
|
255
|
+
this.inputRef.value = '';
|
|
256
|
+
this.inputFilterText = '';
|
|
257
|
+
}
|
|
258
|
+
clear() {
|
|
259
|
+
this.clearInput();
|
|
260
|
+
this.selectedLabels = [];
|
|
261
|
+
this.value = [];
|
|
262
|
+
this.valueChange.emit(null);
|
|
263
|
+
this.dropdownShow = false;
|
|
264
|
+
}
|
|
265
|
+
onInputBlur(e) {
|
|
266
|
+
if (this.editable) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
if (this.isSingleMode) {
|
|
270
|
+
if (this.dropdownShow && this.isDropdownEmpty) {
|
|
271
|
+
this.dropdownShow = false;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
if (!this.dropdownShow && this.mode !== 'multiple') {
|
|
275
|
+
e.target['value'] = this.selectedLabels;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
placeholderValue() {
|
|
279
|
+
if (this.editable) {
|
|
280
|
+
return this.i18nPlaceholderEditable;
|
|
281
|
+
}
|
|
282
|
+
if (this.readonly) {
|
|
283
|
+
return '';
|
|
284
|
+
}
|
|
285
|
+
return this.i18nPlaceholder;
|
|
286
|
+
}
|
|
287
|
+
isAddItemVisible() {
|
|
288
|
+
return (!this.itemExists(this.inputFilterText) &&
|
|
289
|
+
this.editable &&
|
|
290
|
+
this.inputFilterText);
|
|
291
|
+
}
|
|
292
|
+
render() {
|
|
293
|
+
var _a, _b, _c;
|
|
294
|
+
return (h(Host, null, h("div", { class: {
|
|
295
|
+
select: true,
|
|
296
|
+
disabled: this.disabled,
|
|
297
|
+
readonly: this.readonly,
|
|
298
|
+
}, ref: (ref) => {
|
|
299
|
+
this.dropdownAnchor = ref;
|
|
300
|
+
if (!this.editable)
|
|
301
|
+
this.dropdownWrapperRef = ref;
|
|
302
|
+
} }, h("div", { class: "input-container" }, h("div", { class: "chips" }, this.isMultipleMode
|
|
303
|
+
? (_a = this.selectedItems) === null || _a === void 0 ? void 0 : _a.map((item) => (h("ix-filter-chip", { disabled: this.disabled || this.readonly, key: item.value, onCloseClick: (e) => {
|
|
304
|
+
e.preventDefault();
|
|
305
|
+
e.stopPropagation();
|
|
306
|
+
this.itemClick(item.value);
|
|
307
|
+
} }, item.label)))
|
|
308
|
+
: '', h("div", { class: "trigger" }, h("input", { "data-testid": "input", disabled: this.disabled, readOnly: this.readonly, type: "text", class: {
|
|
309
|
+
'allow-clear': this.allowClear && !!((_b = this.selectedLabels) === null || _b === void 0 ? void 0 : _b.length),
|
|
310
|
+
}, placeholder: this.placeholderValue(), value: this.inputValue, ref: (ref) => (this.inputRef = ref), onBlur: (e) => this.onInputBlur(e), onInput: () => this.filterItemsWithTypeahead() }), this.allowClear &&
|
|
311
|
+
(((_c = this.selectedLabels) === null || _c === void 0 ? void 0 : _c.length) || this.inputFilterText) ? (h("ix-icon-button", { class: "clear", icon: 'clear', ghost: true, oval: true, size: "16", onClick: (e) => {
|
|
312
|
+
e.preventDefault();
|
|
313
|
+
e.stopPropagation();
|
|
314
|
+
this.clear();
|
|
315
|
+
} })) : null, this.disabled || this.readonly ? null : (h("ix-icon-button", { "data-select-dropdown": true, class: { 'dropdown-visible': this.dropdownShow }, icon: "chevron-down-small", ghost: true, ref: (ref) => {
|
|
316
|
+
if (this.editable)
|
|
317
|
+
this.dropdownWrapperRef = ref;
|
|
318
|
+
} })))))), h("ix-dropdown", { ref: (ref) => (this.dropdownRef = ref), show: this.dropdownShow, closeBehavior: this.isMultipleMode ? 'outside' : 'both', class: {
|
|
319
|
+
'd-none': this.disabled || this.readonly,
|
|
320
|
+
}, anchor: this.dropdownAnchor, trigger: this.dropdownWrapperRef, onShowChanged: (e) => this.dropdownVisibilityChanged(e), placement: "bottom-start", overwriteDropdownStyle: async () => {
|
|
321
|
+
return {
|
|
322
|
+
minWidth: `${this.hostElement.clientWidth}px`,
|
|
323
|
+
};
|
|
324
|
+
} }, h("div", { class: {
|
|
325
|
+
'select-list-header': true,
|
|
326
|
+
hidden: this.hideListHeader || this.isDropdownEmpty,
|
|
327
|
+
}, title: this.i18nSelectListHeader }, this.i18nSelectListHeader), h("slot", null), h("div", { ref: (ref) => (this.addItemRef = ref), class: "d-contents" }), this.isAddItemVisible() ? (h("ix-dropdown-item", { "data-testid": "add-item", icon: 'plus', class: {
|
|
328
|
+
'add-item': true,
|
|
329
|
+
}, label: this.inputFilterText, onItemClick: (e) => {
|
|
330
|
+
e.preventDefault();
|
|
331
|
+
e.stopPropagation();
|
|
332
|
+
this.emitAddItem(this.inputFilterText);
|
|
333
|
+
} })) : null, this.isDropdownEmpty && !this.editable ? (h("div", { class: "select-list-header" }, this.i18nNoMatches)) : (''))));
|
|
334
|
+
}
|
|
335
|
+
get hostElement() { return this; }
|
|
336
|
+
static get watchers() { return {
|
|
337
|
+
"selectedIndices": ["watchSelectedIndices"],
|
|
338
|
+
"value": ["watchValue"]
|
|
339
|
+
}; }
|
|
340
|
+
static get style() { return selectCss; }
|
|
341
|
+
}, [1, "ix-select", {
|
|
342
|
+
"selectedIndices": [1025, "selected-indices"],
|
|
343
|
+
"value": [1025],
|
|
344
|
+
"allowClear": [4, "allow-clear"],
|
|
345
|
+
"mode": [1],
|
|
346
|
+
"editable": [4],
|
|
347
|
+
"disabled": [4],
|
|
348
|
+
"readonly": [4],
|
|
349
|
+
"i18nPlaceholder": [1, "i-1-8n-placeholder"],
|
|
350
|
+
"i18nPlaceholderEditable": [1, "i-1-8n-placeholder-editable"],
|
|
351
|
+
"i18nSelectListHeader": [1, "i-1-8n-select-list-header"],
|
|
352
|
+
"i18nNoMatches": [1, "i-1-8n-no-matches"],
|
|
353
|
+
"hideListHeader": [4, "hide-list-header"],
|
|
354
|
+
"dropdownShow": [32],
|
|
355
|
+
"selectedLabels": [32],
|
|
356
|
+
"dropdownWrapperRef": [32],
|
|
357
|
+
"dropdownAnchor": [32],
|
|
358
|
+
"isDropdownEmpty": [32],
|
|
359
|
+
"hasFocus": [32],
|
|
360
|
+
"navigationItem": [32],
|
|
361
|
+
"inputFilterText": [32],
|
|
362
|
+
"inputValue": [32]
|
|
363
|
+
}, [[0, "itemClick", "onItemClicked"], [0, "ix-select-item:labelChange", "onLabelChange"], [8, "keydown", "onKeyDown"]]]);
|
|
364
|
+
function defineCustomElement() {
|
|
365
|
+
if (typeof customElements === "undefined") {
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
const components = ["ix-select", "ix-dropdown", "ix-dropdown-item", "ix-filter-chip", "ix-icon-button", "ix-select-item", "ix-spinner"];
|
|
369
|
+
components.forEach(tagName => { switch (tagName) {
|
|
370
|
+
case "ix-select":
|
|
371
|
+
if (!customElements.get(tagName)) {
|
|
372
|
+
customElements.define(tagName, Select);
|
|
373
|
+
}
|
|
374
|
+
break;
|
|
375
|
+
case "ix-dropdown":
|
|
376
|
+
if (!customElements.get(tagName)) {
|
|
377
|
+
defineCustomElement$6();
|
|
378
|
+
}
|
|
379
|
+
break;
|
|
380
|
+
case "ix-dropdown-item":
|
|
381
|
+
if (!customElements.get(tagName)) {
|
|
382
|
+
defineCustomElement$5();
|
|
383
|
+
}
|
|
384
|
+
break;
|
|
385
|
+
case "ix-filter-chip":
|
|
386
|
+
if (!customElements.get(tagName)) {
|
|
387
|
+
defineCustomElement$4();
|
|
388
|
+
}
|
|
389
|
+
break;
|
|
390
|
+
case "ix-icon-button":
|
|
391
|
+
if (!customElements.get(tagName)) {
|
|
392
|
+
defineCustomElement$3();
|
|
393
|
+
}
|
|
394
|
+
break;
|
|
395
|
+
case "ix-select-item":
|
|
396
|
+
if (!customElements.get(tagName)) {
|
|
397
|
+
defineCustomElement$2();
|
|
398
|
+
}
|
|
399
|
+
break;
|
|
400
|
+
case "ix-spinner":
|
|
401
|
+
if (!customElements.get(tagName)) {
|
|
402
|
+
defineCustomElement$1();
|
|
403
|
+
}
|
|
404
|
+
break;
|
|
405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CAAO,KAE1D,EAAE,CACH,CACW,CACT,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/select/select.scss?tag=ix-select&encapsulation=shadow","./src/components/select/select.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'legacy/mixins/fonts';\n@import 'mixins/hover';\n@import 'mixins/text-truncation';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n\n display: inline-block;\n position: relative;\n min-height: 2rem;\n height: auto;\n border-radius: var(--theme-input--border-radius);\n\n .d-none {\n display: none;\n }\n\n .select {\n position: relative;\n display: flex;\n align-items: center;\n background-color: var(--theme-input--background);\n border: var(--theme-input--border-thickness) solid\n var(--theme-input--border-color);\n border-radius: var(--theme-input--border-radius);\n padding: 0 0 0 $small-space;\n box-shadow: var(--theme-inset-shadow-1) !important;\n\n @include hover {\n background-color: var(--theme-input--background--hover);\n border-color: var(--theme-input--border-color--hover);\n }\n\n &:focus-within {\n background-color: var(--theme-input--background--focus);\n border-color: var(--theme-input--border-color--focus);\n outline: 1px solid #119fff;\n outline-offset: var(--theme-input--focus--outline-offset);\n }\n }\n\n .select.readonly {\n box-shadow: none !important;\n border: none;\n border-radius: 0px;\n border-bottom: var(--theme-input--border-thickness) solid\n var(--theme-color-weak-bdr);\n\n &,\n &:hover,\n &:active {\n background-color: transparent !important;\n }\n\n &:focus,\n &:focus-within,\n &:focus-visible {\n outline: none;\n }\n\n input {\n color: var(--theme-color-weak-text);\n }\n\n input:focus,\n input:focus-visible {\n outline: none;\n }\n }\n\n .hidden {\n display: none !important;\n }\n\n .trigger {\n display: flex;\n align-items: center;\n flex-grow: 1;\n height: 100%;\n }\n\n .input-container {\n display: flex;\n position: relative;\n align-items: flex-start;\n width: 100%;\n height: 100%;\n\n .chips {\n position: relative;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n height: 100%;\n max-height: 3.5rem;\n flex-grow: 1;\n overflow-y: auto;\n\n > ix-filter-chip {\n margin: 0.1rem;\n }\n }\n\n input {\n @include ellipsis;\n @include text-default;\n background: transparent;\n height: 1.75rem;\n width: 100%;\n\n &,\n &:hover,\n &:focus-visible {\n border: none;\n outline: none;\n }\n\n &::placeholder {\n color: var(--theme-input-select-icon--color);\n }\n\n &.hide-placeholder::placeholder {\n opacity: 0;\n }\n }\n }\n\n .dropdown-visible {\n --ix-icon-button-color: var(--theme-color-dynamic--hover);\n }\n\n .add-item {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n position: relative;\n width: 100%;\n }\n\n .select-list-header {\n @include ellipsis;\n display: flex;\n align-items: center;\n height: $default-control-height;\n color: var(--theme-select-list-item-hint--color);\n margin: 0 $small-space 0 1rem;\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 Watch,\n} from '@stencil/core';\nimport { IxSelectItemLabelChangeEvent } from '../select-item/events';\n\n@Component({\n tag: 'ix-select',\n styleUrl: 'select.scss',\n shadow: true,\n})\nexport class Select {\n @Element() hostElement!: HTMLIxSelectElement;\n\n /**\n * Indices of selected items.\n * This corresponds to the value property of ix-select-items and therefor not necessarily the indices of the items in the list.\n * @deprecated since 2.0.0. Use the `value` property instead.\n */\n @Prop({ mutable: true }) selectedIndices?: string | string[];\n\n /**\n * Current selected value.\n * This corresponds to the value property of ix-select-items\n * @since 2.0.0\n */\n @Prop({ mutable: true }) value?: string | string[];\n\n /**\n * Show clear button\n */\n @Prop() allowClear = false;\n\n /**\n * Selection mode\n */\n @Prop() mode: 'single' | 'multiple' = 'single';\n\n /**\n * Select is extendable\n */\n @Prop() editable = false;\n\n /**\n * If true the select will be in disabled state\n */\n @Prop() disabled = false;\n\n /**\n * If true the select will be in readonly mode\n */\n @Prop() readonly = false;\n\n /**\n * Input field placeholder\n */\n @Prop() i18nPlaceholder = 'Select an option';\n\n /**\n * Input field placeholder for editable select\n */\n @Prop() i18nPlaceholderEditable = 'Type of select option';\n\n /**\n * Select list header\n */\n @Prop() i18nSelectListHeader = 'Please select an option';\n\n /**\n * Hint inside of dropdown if no items where found with current filter text\n *\n * @since 1.5.0\n */\n @Prop() i18nNoMatches = 'No matches';\n\n /**\n * Hide list header\n *\n * @since 1.5.0\n @\n */\n @Prop() hideListHeader = false;\n\n /**\n * Value changed\n * @since 2.0.0\n */\n @Event() valueChange: EventEmitter<string | string[]>;\n\n /**\n * Item selection changed\n * @deprecated since 2.0.0. Use `valueChange` instead.\n */\n @Event() itemSelectionChange: EventEmitter<string[]>;\n\n /**\n * Event dispatched whenever the text input changes.\n *\n * @since 2.0.0\n */\n @Event() inputChange: EventEmitter<string>;\n\n /**\n * Item added to selection\n */\n @Event() addItem: EventEmitter<string>;\n\n @State() dropdownShow = false;\n @State() selectedLabels: string[];\n @State() dropdownWrapperRef!: HTMLElement;\n @State() dropdownAnchor!: HTMLElement;\n @State() isDropdownEmpty = false;\n @State() hasFocus = false;\n @State() navigationItem: HTMLIxSelectItemElement;\n @State() inputFilterText: string;\n @State() inputValue: string;\n\n private inputRef!: HTMLInputElement;\n private dropdownRef!: HTMLIxDropdownElement;\n private addItemRef!: HTMLDivElement;\n\n private labelMutationObserver: MutationObserver;\n\n get items() {\n return [\n ...Array.from(this.hostElement.querySelectorAll('ix-select-item')),\n ...Array.from(\n this.hostElement.shadowRoot.querySelectorAll('ix-select-item')\n ),\n ];\n }\n\n get selectedItems() {\n return this.items.filter((item) => item.selected);\n }\n\n get addItemButton() {\n return this.hostElement.shadowRoot.querySelector('.add-item');\n }\n\n get isSingleMode() {\n return this.mode === 'single';\n }\n\n get isMultipleMode() {\n return this.mode === 'multiple';\n }\n\n get isEveryDropdownItemHidden() {\n return this.items.every((item) => item.classList.contains('d-none'));\n }\n\n @Watch('selectedIndices')\n watchSelectedIndices(value: string | string[]) {\n this.value = value;\n this.updateSelection();\n }\n\n @Watch('value')\n watchValue(value: string | string[]) {\n this.selectedIndices = value;\n this.updateSelection();\n }\n\n @Listen('itemClick')\n onItemClicked(event: CustomEvent<string>) {\n const newId = event.detail;\n this.itemClick(newId);\n }\n\n private itemClick(newId: string) {\n this.value = this.toggleValue(newId);\n this.updateSelection();\n this.emitValueChange();\n }\n\n private emitAddItem(value: string) {\n if (value.trim() === '') {\n return;\n }\n\n const newItem = document.createElement('ix-select-item');\n newItem.value = value;\n newItem.label = value;\n\n this.addItemRef.appendChild(newItem);\n\n this.clearInput();\n this.itemClick(value);\n this.addItem.emit(value);\n }\n\n private toggleValue(itemValue: string) {\n if (!this.isMultipleMode) {\n return itemValue;\n }\n\n if (!this.value) {\n return [itemValue];\n }\n\n let value = this.value;\n\n if (!Array.isArray(value)) {\n value = [value];\n }\n\n if (value.includes(itemValue)) {\n return value.filter((value) => value !== itemValue);\n } else {\n return [...value, itemValue];\n }\n }\n\n private updateSelection() {\n let ids = [];\n\n if (this.value) {\n ids = Array.isArray(this.value) ? [...this.value] : [this.value];\n }\n\n this.items.forEach((item) => {\n item.selected = ids.some((i) => i === item.value);\n });\n\n this.selectedLabels = this.selectedItems.map((item) => item.label);\n\n if (this.isSingleMode) {\n this.inputValue = this.selectedLabels?.length\n ? this.selectedLabels[0]\n : null;\n return;\n }\n\n this.inputValue = null;\n }\n\n private emitValueChange() {\n this.valueChange.emit(this.value);\n\n if (!this.value) {\n this.itemSelectionChange.emit(null);\n } else {\n this.itemSelectionChange.emit(\n Array.isArray(this.value) ? this.value : [this.value]\n );\n }\n }\n\n componentDidLoad() {\n this.inputRef.addEventListener('input', () => {\n this.inputChange.emit(this.inputRef.value);\n });\n }\n\n componentWillLoad() {\n if (this.selectedIndices && !this.value) {\n this.value = this.selectedIndices;\n }\n\n this.updateSelection();\n }\n\n @Listen('ix-select-item:labelChange')\n onLabelChange(event: IxSelectItemLabelChangeEvent) {\n event.preventDefault();\n event.stopImmediatePropagation();\n this.updateSelection();\n }\n\n disconnectedCallback() {\n if (this.labelMutationObserver) {\n this.labelMutationObserver.disconnect();\n }\n }\n\n private itemExists(item: string) {\n return this.items.find((i) => i.label === item);\n }\n\n private dropdownVisibilityChanged(event: CustomEvent<boolean>) {\n this.dropdownShow = event.detail;\n this.hasFocus = event.detail;\n\n if (event.detail) {\n this.inputRef.focus();\n this.inputRef.select();\n\n this.removeHiddenFromItems();\n this.isDropdownEmpty = this.isEveryDropdownItemHidden;\n } else {\n this.navigationItem = undefined;\n }\n }\n\n @Listen('keydown', {\n target: 'window',\n })\n async onKeyDown(event: KeyboardEvent) {\n if (event.code === 'ArrowDown' || event.code === 'ArrowUp') {\n this.onArrowNavigation(event, event.code);\n }\n\n if (!this.dropdownShow) {\n return;\n }\n\n if (event.code === 'Enter' || event.code === 'NumpadEnter') {\n await this.onEnterNavigation();\n }\n\n if (event.code === 'Escape') {\n this.dropdownShow = false;\n }\n }\n\n private async onEnterNavigation() {\n if (this.isMultipleMode) {\n return;\n }\n\n if (this.editable && !this.itemExists(this.inputFilterText)) {\n this.emitAddItem(this.inputFilterText);\n this.navigationItem = this.items[this.items.length - 1];\n }\n\n this.navigationItem?.onItemClick();\n await this.dropdownRef?.updatePosition();\n\n if (this.isSingleMode && !this.editable) {\n this.dropdownShow = false;\n }\n }\n\n private onArrowNavigation(\n event: KeyboardEvent,\n key: 'ArrowDown' | 'ArrowUp'\n ) {\n event.preventDefault();\n event.stopPropagation();\n\n this.dropdownShow = true;\n\n const items = this.items.filter((i) => !i.classList.contains('d-none'));\n if (this.navigationItem === undefined) {\n this.applyFocusTo(items[0]);\n return;\n }\n\n let indexOfNavigationItem = items.findIndex(\n (item) => item === this.navigationItem\n );\n\n if (key === 'ArrowDown') {\n indexOfNavigationItem++;\n } else {\n indexOfNavigationItem--;\n }\n\n const newFocusItem = items[indexOfNavigationItem];\n this.applyFocusTo(newFocusItem);\n }\n\n private applyFocusTo(element: HTMLIxSelectItemElement) {\n if (!element) {\n return;\n }\n this.navigationItem = element;\n\n setTimeout(() => {\n element.shadowRoot\n .querySelector('ix-dropdown-item')\n .shadowRoot.querySelector('button')\n .focus();\n });\n }\n\n private filterItemsWithTypeahead() {\n this.inputFilterText = this.inputRef.value;\n\n if (this.inputFilterText) {\n this.items.forEach((item) => {\n item.classList.remove('d-none');\n if (\n !item.label.toLowerCase().includes(this.inputFilterText.toLowerCase())\n ) {\n item.classList.add('d-none');\n }\n });\n } else {\n this.removeHiddenFromItems();\n }\n\n this.isDropdownEmpty = this.isEveryDropdownItemHidden;\n }\n\n private removeHiddenFromItems() {\n this.items.forEach((item) => {\n item.classList.remove('d-none');\n });\n }\n\n private clearInput() {\n this.inputRef.value = '';\n this.inputFilterText = '';\n }\n\n private clear() {\n this.clearInput();\n this.selectedLabels = [];\n this.value = [];\n this.valueChange.emit(null);\n this.dropdownShow = false;\n }\n\n private onInputBlur(e) {\n if (this.editable) {\n return;\n }\n\n if (this.isSingleMode) {\n if (this.dropdownShow && this.isDropdownEmpty) {\n this.dropdownShow = false;\n }\n }\n\n if (!this.dropdownShow && this.mode !== 'multiple') {\n e.target['value'] = this.selectedLabels;\n }\n }\n\n private placeholderValue() {\n if (this.editable) {\n return this.i18nPlaceholderEditable;\n }\n\n if (this.readonly) {\n return '';\n }\n\n return this.i18nPlaceholder;\n }\n\n private isAddItemVisible() {\n return (\n !this.itemExists(this.inputFilterText) &&\n this.editable &&\n this.inputFilterText\n );\n }\n\n render() {\n return (\n <Host>\n <div\n class={{\n select: true,\n disabled: this.disabled,\n readonly: this.readonly,\n }}\n ref={(ref) => {\n this.dropdownAnchor = ref;\n if (!this.editable) this.dropdownWrapperRef = ref;\n }}\n >\n <div class=\"input-container\">\n <div class=\"chips\">\n {this.isMultipleMode\n ? this.selectedItems?.map((item) => (\n <ix-filter-chip\n disabled={this.disabled || this.readonly}\n key={item.value}\n onCloseClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n this.itemClick(item.value);\n }}\n >\n {item.label}\n </ix-filter-chip>\n ))\n : ''}\n <div class=\"trigger\">\n <input\n data-testid=\"input\"\n disabled={this.disabled}\n readOnly={this.readonly}\n type=\"text\"\n class={{\n 'allow-clear':\n this.allowClear && !!this.selectedLabels?.length,\n }}\n placeholder={this.placeholderValue()}\n value={this.inputValue}\n ref={(ref) => (this.inputRef = ref)}\n onBlur={(e) => this.onInputBlur(e)}\n onInput={() => this.filterItemsWithTypeahead()}\n />\n {this.allowClear &&\n (this.selectedLabels?.length || this.inputFilterText) ? (\n <ix-icon-button\n class=\"clear\"\n icon={'clear'}\n ghost\n oval\n size=\"16\"\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n this.clear();\n }}\n />\n ) : null}\n {this.disabled || this.readonly ? null : (\n <ix-icon-button\n data-select-dropdown\n class={{ 'dropdown-visible': this.dropdownShow }}\n icon=\"chevron-down-small\"\n ghost\n ref={(ref) => {\n if (this.editable) this.dropdownWrapperRef = ref;\n }}\n ></ix-icon-button>\n )}\n </div>\n </div>\n </div>\n </div>\n <ix-dropdown\n ref={(ref) => (this.dropdownRef = ref)}\n show={this.dropdownShow}\n closeBehavior={this.isMultipleMode ? 'outside' : 'both'}\n class={{\n 'd-none': this.disabled || this.readonly,\n }}\n anchor={this.dropdownAnchor}\n trigger={this.dropdownWrapperRef}\n onShowChanged={(e) => this.dropdownVisibilityChanged(e)}\n placement=\"bottom-start\"\n overwriteDropdownStyle={async () => {\n return {\n minWidth: `${this.hostElement.clientWidth}px`,\n };\n }}\n >\n <div\n class={{\n 'select-list-header': true,\n hidden: this.hideListHeader || this.isDropdownEmpty,\n }}\n title={this.i18nSelectListHeader}\n >\n {this.i18nSelectListHeader}\n </div>\n <slot></slot>\n <div ref={(ref) => (this.addItemRef = ref)} class=\"d-contents\"></div>\n {this.isAddItemVisible() ? (\n <ix-dropdown-item\n data-testid=\"add-item\"\n icon={'plus'}\n class={{\n 'add-item': true,\n }}\n label={this.inputFilterText}\n onItemClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n this.emitAddItem(this.inputFilterText);\n }}\n ></ix-dropdown-item>\n ) : null}\n {this.isDropdownEmpty && !this.editable ? (\n <div class=\"select-list-header\">{this.i18nNoMatches}</div>\n ) : (\n ''\n )}\n </ix-dropdown>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SPDX-FileCopyrightText: 2023 Siemens AG
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
function getSlottedElements(slot) {
|
|
10
|
+
return slot.assignedElements({ flatten: true });
|
|
11
|
+
}
|
|
12
|
+
function hasSlottedElements(slot) {
|
|
13
|
+
if (!slot) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
return slot.assignedElements({ flatten: true }).length !== 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { getSlottedElements as g, hasSlottedElements as h };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=shadow-dom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"shadow-dom.js","mappings":"AAAA;;;;;;;;SAkBgB,kBAAkB,CAAU,IAAS;EACnD,OAAO,IAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAClD,CAAC;SAEe,kBAAkB,CAAC,IAAS;EAC1C,IAAI,CAAC,IAAI,EAAE;IACT,OAAO,KAAK,CAAC;GACd;EACD,OAAO,IAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AAC/D;;;;","names":[],"sources":["./src/components/utils/shadow-dom.ts"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nexport 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"],"version":3}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const spinnerCss = ":host(.xx-small){display:block;position:relative;width:0.75rem;height:0.75rem;min-width:0.75rem;min-height:0.75rem;max-width:0.75rem;max-height:0.75rem;border-radius:100%;position:relative;animation:rotate 2s linear infinite}:host(.xx-small) *,:host(.xx-small) *::after,:host(.xx-small) *::before{box-sizing:border-box}:host(.xx-small) ::-webkit-scrollbar-button{display:none}:host(.xx-small) ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host(.xx-small) ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host(.xx-small) ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host(.xx-small) ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host(.xx-small) ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host(.xx-small) ::-webkit-scrollbar-corner{display:none}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes clipMask{0%{-webkit-clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}12.5%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)}25%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%)}37.5%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%)}50%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0)}62.5%{-webkit-clip-path:polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0)}75%{-webkit-clip-path:polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 0 100%, 0 0)}87.5%{-webkit-clip-path:polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0)}100%{-webkit-clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}}:host(.xx-small)::after{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:1px solid var(--ix-button-color, var(--theme-color-soft-text));animation:clipMask 3s linear infinite}:host(:not(.hide-track)):host(.xx-small)::before{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:1px solid var(--theme-color-ghost--hover)}:host(.primary)::after{border-color:var(--theme-color-dynamic)}:host(.primary)::before{border-color:var(--theme-color-ghost--hover)}:host(.x-small){display:block;position:relative;width:1.25rem;height:1.25rem;min-width:1.25rem;min-height:1.25rem;max-width:1.25rem;max-height:1.25rem;border-radius:100%;position:relative;animation:rotate 2s linear infinite}:host(.x-small) *,:host(.x-small) *::after,:host(.x-small) *::before{box-sizing:border-box}:host(.x-small) ::-webkit-scrollbar-button{display:none}:host(.x-small) ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host(.x-small) ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host(.x-small) ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host(.x-small) ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host(.x-small) ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host(.x-small) ::-webkit-scrollbar-corner{display:none}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes clipMask{0%{-webkit-clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}12.5%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)}25%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%)}37.5%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%)}50%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0)}62.5%{-webkit-clip-path:polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0)}75%{-webkit-clip-path:polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 0 100%, 0 0)}87.5%{-webkit-clip-path:polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0)}100%{-webkit-clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}}:host(.x-small)::after{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:2px solid var(--ix-button-color, var(--theme-color-soft-text));animation:clipMask 3s linear infinite}:host(:not(.hide-track)):host(.x-small)::before{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:2px solid var(--theme-color-ghost--hover)}:host(.primary)::after{border-color:var(--theme-color-dynamic)}:host(.primary)::before{border-color:var(--theme-color-ghost--hover)}:host(.small){display:block;position:relative;width:1.5rem;height:1.5rem;min-width:1.5rem;min-height:1.5rem;max-width:1.5rem;max-height:1.5rem;border-radius:100%;position:relative;animation:rotate 2s linear infinite}:host(.small) *,:host(.small) *::after,:host(.small) *::before{box-sizing:border-box}:host(.small) ::-webkit-scrollbar-button{display:none}:host(.small) ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host(.small) ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host(.small) ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host(.small) ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host(.small) ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host(.small) ::-webkit-scrollbar-corner{display:none}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes clipMask{0%{-webkit-clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}12.5%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)}25%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%)}37.5%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%)}50%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0)}62.5%{-webkit-clip-path:polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0)}75%{-webkit-clip-path:polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 0 100%, 0 0)}87.5%{-webkit-clip-path:polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0)}100%{-webkit-clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}}:host(.small)::after{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:2px solid var(--ix-button-color, var(--theme-color-soft-text));animation:clipMask 3s linear infinite}:host(:not(.hide-track)):host(.small)::before{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:2px solid var(--theme-color-ghost--hover)}:host(.primary)::after{border-color:var(--theme-color-dynamic)}:host(.primary)::before{border-color:var(--theme-color-ghost--hover)}:host(.medium){display:block;position:relative;width:2rem;height:2rem;min-width:2rem;min-height:2rem;max-width:2rem;max-height:2rem;border-radius:100%;position:relative;animation:rotate 2s linear infinite}:host(.medium) *,:host(.medium) *::after,:host(.medium) *::before{box-sizing:border-box}:host(.medium) ::-webkit-scrollbar-button{display:none}:host(.medium) ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host(.medium) ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host(.medium) ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host(.medium) ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host(.medium) ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host(.medium) ::-webkit-scrollbar-corner{display:none}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes clipMask{0%{-webkit-clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}12.5%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)}25%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%)}37.5%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%)}50%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0)}62.5%{-webkit-clip-path:polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0)}75%{-webkit-clip-path:polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 0 100%, 0 0)}87.5%{-webkit-clip-path:polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0)}100%{-webkit-clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}}:host(.medium)::after{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:2px solid var(--ix-button-color, var(--theme-color-soft-text));animation:clipMask 3s linear infinite}:host(:not(.hide-track)):host(.medium)::before{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:2px solid var(--theme-color-ghost--hover)}:host(.primary)::after{border-color:var(--theme-color-dynamic)}:host(.primary)::before{border-color:var(--theme-color-ghost--hover)}:host(.large){display:block;position:relative;width:6rem;height:6rem;min-width:6rem;min-height:6rem;max-width:6rem;max-height:6rem;border-radius:100%;position:relative;animation:rotate 2s linear infinite}:host(.large) *,:host(.large) *::after,:host(.large) *::before{box-sizing:border-box}:host(.large) ::-webkit-scrollbar-button{display:none}:host(.large) ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host(.large) ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host(.large) ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host(.large) ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host(.large) ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host(.large) ::-webkit-scrollbar-corner{display:none}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes clipMask{0%{-webkit-clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}12.5%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)}25%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%)}37.5%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%)}50%{-webkit-clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0)}62.5%{-webkit-clip-path:polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0)}75%{-webkit-clip-path:polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 0 100%, 0 0)}87.5%{-webkit-clip-path:polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0);clip-path:polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0)}100%{-webkit-clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}}:host(.large)::after{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:4px solid var(--ix-button-color, var(--theme-color-soft-text));animation:clipMask 3s linear infinite}:host(:not(.hide-track)):host(.large)::before{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:4px solid var(--theme-color-ghost--hover)}:host(.primary)::after{border-color:var(--theme-color-dynamic)}:host(.primary)::before{border-color:var(--theme-color-ghost--hover)}";
|
|
4
|
+
|
|
5
|
+
const Spinner = /*@__PURE__*/ proxyCustomElement(class Spinner extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.variant = 'secondary';
|
|
11
|
+
this.size = 'medium';
|
|
12
|
+
this.hideTrack = false;
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return (h(Host, { class: {
|
|
16
|
+
primary: this.variant === 'primary',
|
|
17
|
+
'xx-small': this.size === 'xx-small',
|
|
18
|
+
'x-small': this.size === 'x-small',
|
|
19
|
+
small: this.size === 'small',
|
|
20
|
+
medium: this.size === 'medium',
|
|
21
|
+
large: this.size === 'large',
|
|
22
|
+
'hide-track': this.hideTrack,
|
|
23
|
+
} }));
|
|
24
|
+
}
|
|
25
|
+
get hostElement() { return this; }
|
|
26
|
+
static get style() { return spinnerCss; }
|
|
27
|
+
}, [1, "ix-spinner", {
|
|
28
|
+
"variant": [1],
|
|
29
|
+
"size": [1],
|
|
30
|
+
"hideTrack": [4, "hide-track"]
|
|
31
|
+
}]);
|
|
32
|
+
function defineCustomElement() {
|
|
33
|
+
if (typeof customElements === "undefined") {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const components = ["ix-spinner"];
|
|
37
|
+
components.forEach(tagName => { switch (tagName) {
|
|
38
|
+
case "ix-spinner":
|
|
39
|
+
if (!customElements.get(tagName)) {
|
|
40
|
+
customElements.define(tagName, Spinner);
|
|
41
|
+
}
|
|
42
|
+
break;
|
|
43
|
+
} });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { Spinner as S, defineCustomElement as d };
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"spinner.js","mappings":";;AAAA,MAAM,UAAU,GAAG,sjbAAsjb;;MCgB5jb,OAAO;;;;;mBAMyB,WAAW;gBAMpD,QAAQ;qBAKU,KAAK;;EAEzB,MAAM;IACJ,QACE,EAAC,IAAI,IACH,KAAK,EAAE;QACL,OAAO,EAAE,IAAI,CAAC,OAAO,KAAK,SAAS;QACnC,UAAU,EAAE,IAAI,CAAC,IAAI,KAAK,UAAU;QACpC,SAAS,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;QAClC,KAAK,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;QAC5B,MAAM,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;QAC9B,KAAK,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;QAC5B,YAAY,EAAE,IAAI,CAAC,SAAS;OAC7B,GACK,EACR;GACH;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/spinner/spinner.scss?tag=ix-spinner&encapsulation=shadow","./src/components/spinner/spinner.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'mixins/shadow-dom/component';\n\n@mixin ix-spinner($host-class: 'medium', $size: 2rem, $track-size: 4px) {\n :host(.#{$host-class}) {\n @include ix-component;\n display: block;\n position: relative;\n\n width: $size;\n height: $size;\n min-width: $size;\n min-height: $size;\n max-width: $size;\n max-height: $size;\n border-radius: 100%;\n position: relative;\n animation: rotate 2s linear infinite;\n\n @keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n }\n\n @keyframes clipMask {\n 0% {\n clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);\n }\n 12.5% {\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);\n }\n 25% {\n clip-path: polygon(\n 50% 50%,\n 0 0,\n 100% 0,\n 100% 100%,\n 100% 100%,\n 100% 100%\n );\n }\n 37.5% {\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);\n }\n 50% {\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);\n }\n 62.5% {\n clip-path: polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0);\n }\n 75% {\n clip-path: polygon(\n 50% 50%,\n 100% 100%,\n 100% 100%,\n 100% 100%,\n 0 100%,\n 0 0\n );\n }\n 87.5% {\n clip-path: polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0);\n }\n 100% {\n clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);\n }\n }\n }\n\n :host(.#{$host-class})::after {\n content: '';\n box-sizing: border-box;\n position: absolute;\n inset: 8.33%;\n border-radius: 100%;\n border: $track-size solid\n var(--ix-button-color, var(--theme-color-soft-text));\n animation: clipMask 3s linear infinite;\n }\n\n :host(:not(.hide-track)):host(.#{$host-class})::before {\n content: '';\n box-sizing: border-box;\n position: absolute;\n inset: 8.33%;\n border-radius: 100%;\n border: $track-size solid var(--theme-color-ghost--hover);\n }\n\n :host(.primary)::after {\n border-color: var(--theme-color-dynamic);\n }\n\n :host(.primary)::before {\n border-color: var(--theme-color-ghost--hover);\n }\n}\n\n@include ix-spinner($host-class: 'xx-small', $size: 0.75rem, $track-size: 1px);\n@include ix-spinner($host-class: 'x-small', $size: 1.25rem, $track-size: 2px);\n@include ix-spinner($host-class: 'small', $size: 1.5rem, $track-size: 2px);\n@include ix-spinner($host-class: 'medium', $size: 2rem, $track-size: 2px);\n@include ix-spinner($host-class: 'large', $size: 6rem, $track-size: 4px);\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, Element, h, Host, Prop } from '@stencil/core';\n\n@Component({\n tag: 'ix-spinner',\n styleUrl: 'spinner.scss',\n shadow: true,\n})\nexport class Spinner {\n @Element() hostElement!: HTMLIxSpinnerElement;\n\n /**\n * Variant of spinner\n */\n @Prop() variant: 'primary' | 'secondary' = 'secondary';\n\n /**\n * Size of spinner\n */\n @Prop() size: 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' =\n 'medium';\n\n /**\n * @internal\n */\n @Prop() hideTrack = false;\n\n render() {\n return (\n <Host\n class={{\n primary: this.variant === 'primary',\n 'xx-small': this.size === 'xx-small',\n 'x-small': this.size === 'x-small',\n small: this.size === 'small',\n medium: this.size === 'medium',\n large: this.size === 'large',\n 'hide-track': this.hideTrack,\n }}\n ></Host>\n );\n }\n}\n"],"version":3}
|