@siemens/ix 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/_commonjsHelpers.js +21 -0
- package/components/_commonjsHelpers.js.map +1 -0
- package/{dist/esm/a11y-d5dd20ad.js → components/a11y.js} +2 -2
- package/components/a11y.js.map +1 -0
- package/components/animation.js +19 -0
- package/components/animation.js.map +1 -0
- package/components/anime.es.js +1311 -0
- package/components/anime.es.js.map +1 -0
- package/components/application-header.js +109 -0
- package/components/application-header.js.map +1 -0
- package/components/avatar.js +53 -0
- package/components/avatar.js.map +1 -0
- package/components/base-button.js +47 -0
- package/components/base-button.js.map +1 -0
- package/components/base-icon-button.js +18 -0
- package/components/base-icon-button.js.map +1 -0
- package/components/breadcrumb-item.js +100 -0
- package/components/breadcrumb-item.js.map +1 -0
- package/components/breakpoints.js +25 -0
- package/components/breakpoints.js.map +1 -0
- package/components/burger-menu.js +55 -0
- package/components/burger-menu.js.map +1 -0
- package/components/button.js +91 -0
- package/components/button.js.map +1 -0
- package/components/card-accordion.js +72 -0
- package/components/card-accordion.js.map +1 -0
- package/components/card-content.js +32 -0
- package/components/card-content.js.map +1 -0
- package/components/card-title.js +32 -0
- package/components/card-title.js.map +1 -0
- package/components/card.js +36 -0
- package/components/card.js.map +1 -0
- package/components/context.js +101 -0
- package/components/context.js.map +1 -0
- package/components/custom-elements.d.ts +10 -0
- package/components/date-picker.js +372 -0
- package/components/date-picker.js.map +1 -0
- package/components/date-time-card.js +45 -0
- package/components/date-time-card.js.map +1 -0
- package/components/default-tree-item.js +22 -0
- package/components/default-tree-item.js.map +1 -0
- package/components/divider.js +32 -0
- package/components/divider.js.map +1 -0
- package/components/dropdown-item.js +69 -0
- package/components/dropdown-item.js.map +1 -0
- package/components/dropdown.js +351 -0
- package/components/dropdown.js.map +1 -0
- package/components/filter-chip.js +56 -0
- package/components/filter-chip.js.map +1 -0
- package/components/flip-tile-state.js +20 -0
- package/components/flip-tile-state.js.map +1 -0
- package/components/floating-ui.dom.esm.js +1512 -0
- package/components/floating-ui.dom.esm.js.map +1 -0
- package/components/group-context-menu.js +73 -0
- package/components/group-context-menu.js.map +1 -0
- package/components/group-item.js +58 -0
- package/components/group-item.js.map +1 -0
- package/components/icon-button.js +99 -0
- package/components/icon-button.js.map +1 -0
- package/components/index.d.ts +27 -0
- package/components/index.js +101 -0
- package/components/index.js.map +1 -0
- package/components/ix-action-card.d.ts +11 -0
- package/components/ix-action-card.js +66 -0
- package/components/ix-action-card.js.map +1 -0
- package/components/ix-application-header.d.ts +11 -0
- package/components/ix-application-header.js +8 -0
- package/components/ix-application-header.js.map +1 -0
- package/components/ix-application-sidebar.d.ts +11 -0
- package/components/ix-application-sidebar.js +63 -0
- package/components/ix-application-sidebar.js.map +1 -0
- package/components/ix-application.d.ts +11 -0
- package/components/ix-application.js +128 -0
- package/components/ix-application.js.map +1 -0
- package/components/ix-avatar.d.ts +11 -0
- package/components/ix-avatar.js +8 -0
- package/components/ix-avatar.js.map +1 -0
- package/components/ix-basic-navigation.d.ts +11 -0
- package/components/ix-basic-navigation.js +132 -0
- package/components/ix-basic-navigation.js.map +1 -0
- package/components/ix-blind.d.ts +11 -0
- package/components/ix-blind.js +128 -0
- package/components/ix-blind.js.map +1 -0
- package/components/ix-breadcrumb-item.d.ts +11 -0
- package/components/ix-breadcrumb-item.js +8 -0
- package/components/ix-breadcrumb-item.js.map +1 -0
- package/components/ix-breadcrumb.d.ts +11 -0
- package/components/ix-breadcrumb.js +154 -0
- package/components/ix-breadcrumb.js.map +1 -0
- package/components/ix-burger-menu.d.ts +11 -0
- package/components/ix-burger-menu.js +8 -0
- package/components/ix-burger-menu.js.map +1 -0
- package/components/ix-button.d.ts +11 -0
- package/components/ix-button.js +8 -0
- package/components/ix-button.js.map +1 -0
- package/components/ix-card-accordion.d.ts +11 -0
- package/components/ix-card-accordion.js +8 -0
- package/components/ix-card-accordion.js.map +1 -0
- package/components/ix-card-content.d.ts +11 -0
- package/components/ix-card-content.js +8 -0
- package/components/ix-card-content.js.map +1 -0
- package/components/ix-card-list.d.ts +11 -0
- package/components/ix-card-list.js +228 -0
- package/components/ix-card-list.js.map +1 -0
- package/components/ix-card-title.d.ts +11 -0
- package/components/ix-card-title.js +8 -0
- package/components/ix-card-title.js.map +1 -0
- package/components/ix-card.d.ts +11 -0
- package/components/ix-card.js +8 -0
- package/components/ix-card.js.map +1 -0
- package/components/ix-category-filter.d.ts +11 -0
- package/components/ix-category-filter.js +464 -0
- package/components/ix-category-filter.js.map +1 -0
- package/components/ix-chip.d.ts +11 -0
- package/components/ix-chip.js +98 -0
- package/components/ix-chip.js.map +1 -0
- package/components/ix-col.d.ts +11 -0
- package/components/ix-col.js +96 -0
- package/components/ix-col.js.map +1 -0
- package/components/ix-content-header.d.ts +11 -0
- package/components/ix-content-header.js +63 -0
- package/components/ix-content-header.js.map +1 -0
- package/components/ix-content.d.ts +11 -0
- package/components/ix-content.js +48 -0
- package/components/ix-content.js.map +1 -0
- package/components/ix-css-grid-item.d.ts +11 -0
- package/components/ix-css-grid-item.js +40 -0
- package/components/ix-css-grid-item.js.map +1 -0
- package/components/ix-css-grid.d.ts +11 -0
- package/components/ix-css-grid.js +113 -0
- package/components/ix-css-grid.js.map +1 -0
- package/components/ix-date-picker.d.ts +11 -0
- package/components/ix-date-picker.js +8 -0
- package/components/ix-date-picker.js.map +1 -0
- package/components/ix-date-time-card.d.ts +11 -0
- package/components/ix-date-time-card.js +8 -0
- package/components/ix-date-time-card.js.map +1 -0
- package/components/ix-datetime-picker.d.ts +11 -0
- package/components/ix-datetime-picker.js +149 -0
- package/components/ix-datetime-picker.js.map +1 -0
- package/components/ix-divider.d.ts +11 -0
- package/components/ix-divider.js +8 -0
- package/components/ix-divider.js.map +1 -0
- package/components/ix-drawer.d.ts +11 -0
- package/components/ix-drawer.js +145 -0
- package/components/ix-drawer.js.map +1 -0
- package/components/ix-dropdown-button.d.ts +11 -0
- package/components/ix-dropdown-button.js +92 -0
- package/components/ix-dropdown-button.js.map +1 -0
- package/components/ix-dropdown-header.d.ts +11 -0
- package/components/ix-dropdown-header.js +44 -0
- package/components/ix-dropdown-header.js.map +1 -0
- package/components/ix-dropdown-item.d.ts +11 -0
- package/components/ix-dropdown-item.js +8 -0
- package/components/ix-dropdown-item.js.map +1 -0
- package/components/ix-dropdown-quick-actions.d.ts +11 -0
- package/components/ix-dropdown-quick-actions.js +35 -0
- package/components/ix-dropdown-quick-actions.js.map +1 -0
- package/components/ix-dropdown.d.ts +11 -0
- package/components/ix-dropdown.js +8 -0
- package/components/ix-dropdown.js.map +1 -0
- package/components/ix-empty-state.d.ts +11 -0
- package/components/ix-empty-state.js +65 -0
- package/components/ix-empty-state.js.map +1 -0
- package/components/ix-event-list-item.d.ts +11 -0
- package/components/ix-event-list-item.js +61 -0
- package/components/ix-event-list-item.js.map +1 -0
- package/components/ix-event-list.d.ts +11 -0
- package/components/ix-event-list.js +143 -0
- package/components/ix-event-list.js.map +1 -0
- package/components/ix-expanding-search.d.ts +11 -0
- package/components/ix-expanding-search.js +119 -0
- package/components/ix-expanding-search.js.map +1 -0
- package/components/ix-filter-chip.d.ts +11 -0
- package/components/ix-filter-chip.js +8 -0
- package/components/ix-filter-chip.js.map +1 -0
- package/components/ix-flip-tile-content.d.ts +11 -0
- package/components/ix-flip-tile-content.js +38 -0
- package/components/ix-flip-tile-content.js.map +1 -0
- package/components/ix-flip-tile.d.ts +11 -0
- package/components/ix-flip-tile.js +121 -0
- package/components/ix-flip-tile.js.map +1 -0
- package/components/ix-form-field.d.ts +11 -0
- package/components/ix-form-field.js +43 -0
- package/components/ix-form-field.js.map +1 -0
- package/components/ix-group-context-menu.d.ts +11 -0
- package/components/ix-group-context-menu.js +8 -0
- package/components/ix-group-context-menu.js.map +1 -0
- package/components/ix-group-item.d.ts +11 -0
- package/components/ix-group-item.js +8 -0
- package/components/ix-group-item.js.map +1 -0
- package/components/ix-group.d.ts +11 -0
- package/components/ix-group.js +178 -0
- package/components/ix-group.js.map +1 -0
- package/components/ix-icon-button.d.ts +11 -0
- package/components/ix-icon-button.js +8 -0
- package/components/ix-icon-button.js.map +1 -0
- package/components/ix-icon-toggle-button.d.ts +11 -0
- package/components/ix-icon-toggle-button.js +116 -0
- package/components/ix-icon-toggle-button.js.map +1 -0
- package/components/ix-input-group.d.ts +11 -0
- package/components/ix-input-group.js +143 -0
- package/components/ix-input-group.js.map +1 -0
- package/components/ix-key-value-list.d.ts +11 -0
- package/components/ix-key-value-list.js +38 -0
- package/components/ix-key-value-list.js.map +1 -0
- package/components/ix-key-value.d.ts +11 -0
- package/components/ix-key-value.js +47 -0
- package/components/ix-key-value.js.map +1 -0
- package/components/ix-kpi.d.ts +11 -0
- package/components/ix-kpi.js +69 -0
- package/components/ix-kpi.js.map +1 -0
- package/components/ix-layout-grid.d.ts +11 -0
- package/components/ix-layout-grid.js +47 -0
- package/components/ix-layout-grid.js.map +1 -0
- package/components/ix-link-button.d.ts +11 -0
- package/components/ix-link-button.js +48 -0
- package/components/ix-link-button.js.map +1 -0
- package/components/ix-map-navigation-overlay.d.ts +11 -0
- package/components/ix-map-navigation-overlay.js +8 -0
- package/components/ix-map-navigation-overlay.js.map +1 -0
- package/components/ix-map-navigation.d.ts +11 -0
- package/components/ix-map-navigation.js +226 -0
- package/components/ix-map-navigation.js.map +1 -0
- package/components/ix-menu-about-item.d.ts +11 -0
- package/components/ix-menu-about-item.js +38 -0
- package/components/ix-menu-about-item.js.map +1 -0
- package/components/ix-menu-about-news.d.ts +11 -0
- package/components/ix-menu-about-news.js +83 -0
- package/components/ix-menu-about-news.js.map +1 -0
- package/components/ix-menu-about.d.ts +11 -0
- package/components/ix-menu-about.js +119 -0
- package/components/ix-menu-about.js.map +1 -0
- package/components/ix-menu-avatar-item.d.ts +11 -0
- package/components/ix-menu-avatar-item.js +8 -0
- package/components/ix-menu-avatar-item.js.map +1 -0
- package/components/ix-menu-avatar.d.ts +11 -0
- package/components/ix-menu-avatar.js +77 -0
- package/components/ix-menu-avatar.js.map +1 -0
- package/components/ix-menu-category.d.ts +11 -0
- package/components/ix-menu-category.js +190 -0
- package/components/ix-menu-category.js.map +1 -0
- package/components/ix-menu-item.d.ts +11 -0
- package/components/ix-menu-item.js +8 -0
- package/components/ix-menu-item.js.map +1 -0
- package/components/ix-menu-settings-item.d.ts +11 -0
- package/components/ix-menu-settings-item.js +38 -0
- package/components/ix-menu-settings-item.js.map +1 -0
- package/components/ix-menu-settings.d.ts +11 -0
- package/components/ix-menu-settings.js +106 -0
- package/components/ix-menu-settings.js.map +1 -0
- package/components/ix-menu.d.ts +11 -0
- package/components/ix-menu.js +508 -0
- package/components/ix-menu.js.map +1 -0
- package/components/ix-message-bar.d.ts +11 -0
- package/components/ix-message-bar.js +87 -0
- package/components/ix-message-bar.js.map +1 -0
- package/components/ix-modal-content.d.ts +11 -0
- package/components/ix-modal-content.js +35 -0
- package/components/ix-modal-content.js.map +1 -0
- package/components/ix-modal-example.d.ts +11 -0
- package/components/ix-modal-example.js +58 -0
- package/components/ix-modal-example.js.map +1 -0
- package/components/ix-modal-footer.d.ts +11 -0
- package/components/ix-modal-footer.js +35 -0
- package/components/ix-modal-footer.js.map +1 -0
- package/components/ix-modal-header.d.ts +11 -0
- package/components/ix-modal-header.js +84 -0
- package/components/ix-modal-header.js.map +1 -0
- package/components/ix-modal-loading.d.ts +11 -0
- package/components/ix-modal-loading.js +41 -0
- package/components/ix-modal-loading.js.map +1 -0
- package/components/ix-modal.d.ts +11 -0
- package/components/ix-modal.js +155 -0
- package/components/ix-modal.js.map +1 -0
- package/components/ix-pagination.d.ts +11 -0
- package/components/ix-pagination.js +211 -0
- package/components/ix-pagination.js.map +1 -0
- package/components/ix-pill.d.ts +11 -0
- package/components/ix-pill.js +78 -0
- package/components/ix-pill.js.map +1 -0
- package/components/ix-push-card.d.ts +11 -0
- package/components/ix-push-card.js +80 -0
- package/components/ix-push-card.js.map +1 -0
- package/components/ix-row.d.ts +11 -0
- package/components/ix-row.js +35 -0
- package/components/ix-row.js.map +1 -0
- package/components/ix-select-item.d.ts +11 -0
- package/components/ix-select-item.js +8 -0
- package/components/ix-select-item.js.map +1 -0
- package/components/ix-select.d.ts +11 -0
- package/components/ix-select.js +8 -0
- package/components/ix-select.js.map +1 -0
- package/components/ix-slider.d.ts +11 -0
- package/components/ix-slider.js +192 -0
- package/components/ix-slider.js.map +1 -0
- package/components/ix-spinner.d.ts +11 -0
- package/components/ix-spinner.js +8 -0
- package/components/ix-spinner.js.map +1 -0
- package/components/ix-split-button-item.d.ts +11 -0
- package/components/ix-split-button-item.js +51 -0
- package/components/ix-split-button-item.js.map +1 -0
- package/components/ix-split-button.d.ts +11 -0
- package/components/ix-split-button.js +97 -0
- package/components/ix-split-button.js.map +1 -0
- package/components/ix-tab-item.d.ts +11 -0
- package/components/ix-tab-item.js +8 -0
- package/components/ix-tab-item.js.map +1 -0
- package/components/ix-tabs.d.ts +11 -0
- package/components/ix-tabs.js +8 -0
- package/components/ix-tabs.js.map +1 -0
- package/components/ix-tile.d.ts +11 -0
- package/components/ix-tile.js +59 -0
- package/components/ix-tile.js.map +1 -0
- package/components/ix-time-picker.d.ts +11 -0
- package/components/ix-time-picker.js +8 -0
- package/components/ix-time-picker.js.map +1 -0
- package/components/ix-toast-container.d.ts +11 -0
- package/components/ix-toast-container.js +124 -0
- package/components/ix-toast-container.js.map +1 -0
- package/components/ix-toast.d.ts +11 -0
- package/components/ix-toast.js +8 -0
- package/components/ix-toast.js.map +1 -0
- package/components/ix-toggle-button.d.ts +11 -0
- package/components/ix-toggle-button.js +105 -0
- package/components/ix-toggle-button.js.map +1 -0
- package/components/ix-toggle.d.ts +11 -0
- package/components/ix-toggle.js +62 -0
- package/components/ix-toggle.js.map +1 -0
- package/components/ix-tooltip.d.ts +11 -0
- package/components/ix-tooltip.js +8 -0
- package/components/ix-tooltip.js.map +1 -0
- package/components/ix-tree-item.d.ts +11 -0
- package/components/ix-tree-item.js +8 -0
- package/components/ix-tree-item.js.map +1 -0
- package/components/ix-tree.d.ts +11 -0
- package/components/ix-tree.js +727 -0
- package/components/ix-tree.js.map +1 -0
- package/components/ix-typography.d.ts +11 -0
- package/components/ix-typography.js +8 -0
- package/components/ix-typography.js.map +1 -0
- package/components/ix-upload.d.ts +11 -0
- package/components/ix-upload.js +147 -0
- package/components/ix-upload.js.map +1 -0
- package/components/ix-validation-tooltip.d.ts +11 -0
- package/components/ix-validation-tooltip.js +170 -0
- package/components/ix-validation-tooltip.js.map +1 -0
- package/components/ix-workflow-step.d.ts +11 -0
- package/components/ix-workflow-step.js +120 -0
- package/components/ix-workflow-step.js.map +1 -0
- package/components/ix-workflow-steps.d.ts +11 -0
- package/components/ix-workflow-steps.js +99 -0
- package/components/ix-workflow-steps.js.map +1 -0
- package/components/logical-filter-operator.js +35 -0
- package/components/logical-filter-operator.js.map +1 -0
- package/components/luxon.js +7828 -0
- package/components/luxon.js.map +1 -0
- package/components/map-navigation-overlay.js +89 -0
- package/components/map-navigation-overlay.js.map +1 -0
- package/components/menu-avatar-item.js +45 -0
- package/components/menu-avatar-item.js.map +1 -0
- package/components/menu-item.js +92 -0
- package/components/menu-item.js.map +1 -0
- package/components/menu-service.js +156 -0
- package/components/menu-service.js.map +1 -0
- package/components/modal.js +245 -0
- package/components/modal.js.map +1 -0
- package/components/mutation-observer.js +13 -0
- package/components/mutation-observer.js.map +1 -0
- package/components/my-component.d.ts +11 -0
- package/components/my-component.js +34 -0
- package/components/my-component.js.map +1 -0
- package/components/package.json +8 -0
- package/components/rwd.util.js +41 -0
- package/components/rwd.util.js.map +1 -0
- package/components/select-item.js +92 -0
- package/components/select-item.js.map +1 -0
- package/components/select.js +410 -0
- package/components/select.js.map +1 -0
- package/components/shadow-dom.js +21 -0
- package/components/shadow-dom.js.map +1 -0
- package/components/spinner.js +48 -0
- package/components/spinner.js.map +1 -0
- package/components/tab-item.js +87 -0
- package/components/tab-item.js.map +1 -0
- package/components/tabs.js +227 -0
- package/components/tabs.js.map +1 -0
- package/components/theme-switcher.js +123 -0
- package/components/theme-switcher.js.map +1 -0
- package/components/time-picker.js +252 -0
- package/components/time-picker.js.map +1 -0
- package/components/toast.js +105 -0
- package/components/toast.js.map +1 -0
- package/components/tooltip.js +197 -0
- package/components/tooltip.js.map +1 -0
- package/components/tree-item.js +51 -0
- package/components/tree-item.js.map +1 -0
- package/components/typed-event.js +46 -0
- package/components/typed-event.js.map +1 -0
- package/components/typography.js +76 -0
- package/components/typography.js.map +1 -0
- package/components/upload-file-state.js +19 -0
- package/components/upload-file-state.js.map +1 -0
- package/dist/cjs/{a11y-4fdcefb4.js → a11y-7e1c1b86.js} +2 -2
- package/dist/cjs/a11y-7e1c1b86.js.map +1 -0
- package/dist/cjs/ix-application-header.cjs.entry.js +15 -2
- package/dist/cjs/ix-application-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-blind.cjs.entry.js +1 -1
- package/dist/cjs/ix-breadcrumb-item.cjs.entry.js +11 -4
- package/dist/cjs/ix-breadcrumb-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-breadcrumb.cjs.entry.js +5 -2
- package/dist/cjs/ix-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-burger-menu.cjs.entry.js +1 -1
- package/dist/cjs/ix-button.cjs.entry.js +1 -1
- package/dist/cjs/ix-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-category-filter.cjs.entry.js +1 -1
- package/dist/cjs/ix-category-filter.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-drawer.cjs.entry.js +1 -1
- package/dist/cjs/ix-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-dropdown.cjs.entry.js +9 -4
- package/dist/cjs/ix-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-icon-button_2.cjs.entry.js +1 -1
- package/dist/cjs/ix-icon-button_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-icon-toggle-button.cjs.entry.js +2 -2
- package/dist/cjs/ix-icon-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-input-group.cjs.entry.js +16 -3
- package/dist/cjs/ix-input-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-modal.cjs.entry.js +2 -3
- package/dist/cjs/ix-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-pagination.cjs.entry.js +3 -3
- package/dist/cjs/ix-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-slider.cjs.entry.js +1 -1
- package/dist/cjs/ix-toggle-button.cjs.entry.js +1 -1
- package/dist/cjs/ix-toggle.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/siemens-ix.cjs.js +1 -1
- package/dist/collection/components/application-header/application-header.js +18 -3
- package/dist/collection/components/application-header/application-header.js.map +1 -1
- package/dist/collection/components/application-header/test/application-headet.ct.js +16 -1
- package/dist/collection/components/application-header/test/application-headet.ct.js.map +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.js +4 -1
- package/dist/collection/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/collection/components/breadcrumb-item/breadcrumb-item.css +36 -0
- package/dist/collection/components/breadcrumb-item/breadcrumb-item.js +14 -2
- package/dist/collection/components/breadcrumb-item/breadcrumb-item.js.map +1 -1
- package/dist/collection/components/button/button.css +18 -0
- package/dist/collection/components/button/test/button.ct.js +6 -0
- package/dist/collection/components/button/test/button.ct.js.map +1 -1
- package/dist/collection/components/category-filter/category-filter.css +18 -0
- package/dist/collection/components/drawer/drawer.css +4 -0
- package/dist/collection/components/dropdown/dropdown.js +9 -4
- package/dist/collection/components/dropdown/dropdown.js.map +1 -1
- package/dist/collection/components/dropdown/test/dropdown.ct.js +21 -0
- package/dist/collection/components/dropdown/test/dropdown.ct.js.map +1 -1
- package/dist/collection/components/icon-button/icon-button.css +18 -0
- package/dist/collection/components/icon-toggle-button/icon-toggle-button.css +18 -0
- package/dist/collection/components/input-group/input-group.js +16 -3
- package/dist/collection/components/input-group/input-group.js.map +1 -1
- package/dist/collection/components/input-group/tests/input-group.ct.js +86 -0
- package/dist/collection/components/input-group/tests/input-group.ct.js.map +1 -0
- package/dist/collection/components/menu/menu.js +4 -1
- package/dist/collection/components/menu/menu.js.map +1 -1
- package/dist/collection/components/modal/modal.js +1 -2
- package/dist/collection/components/modal/modal.js.map +1 -1
- package/dist/collection/components/pagination/pagination.css +18 -0
- package/dist/collection/components/pagination/pagination.js +1 -1
- package/dist/collection/components/pagination/pagination.js.map +1 -1
- package/dist/collection/components/pagination/test/pagination.ct.js +20 -0
- package/dist/collection/components/pagination/test/pagination.ct.js.map +1 -1
- package/dist/collection/components/utils/a11y.js +1 -1
- package/dist/collection/components/utils/a11y.js.map +1 -1
- package/dist/esm/a11y-115b6a36.js +79 -0
- package/dist/esm/a11y-115b6a36.js.map +1 -0
- package/dist/esm/ix-application-header.entry.js +15 -2
- package/dist/esm/ix-application-header.entry.js.map +1 -1
- package/dist/esm/ix-blind.entry.js +1 -1
- package/dist/esm/ix-breadcrumb-item.entry.js +11 -4
- package/dist/esm/ix-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/ix-breadcrumb.entry.js +5 -2
- package/dist/esm/ix-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ix-burger-menu.entry.js +1 -1
- package/dist/esm/ix-button.entry.js +1 -1
- package/dist/esm/ix-button.entry.js.map +1 -1
- package/dist/esm/ix-category-filter.entry.js +1 -1
- package/dist/esm/ix-category-filter.entry.js.map +1 -1
- package/dist/esm/ix-drawer.entry.js +1 -1
- package/dist/esm/ix-drawer.entry.js.map +1 -1
- package/dist/esm/ix-dropdown.entry.js +9 -4
- package/dist/esm/ix-dropdown.entry.js.map +1 -1
- package/dist/esm/ix-icon-button_2.entry.js +1 -1
- package/dist/esm/ix-icon-button_2.entry.js.map +1 -1
- package/dist/esm/ix-icon-toggle-button.entry.js +2 -2
- package/dist/esm/ix-icon-toggle-button.entry.js.map +1 -1
- package/dist/esm/ix-input-group.entry.js +16 -3
- package/dist/esm/ix-input-group.entry.js.map +1 -1
- package/dist/esm/ix-menu.entry.js.map +1 -1
- package/dist/esm/ix-modal.entry.js +2 -3
- package/dist/esm/ix-modal.entry.js.map +1 -1
- package/dist/esm/ix-pagination.entry.js +3 -3
- package/dist/esm/ix-pagination.entry.js.map +1 -1
- package/dist/esm/ix-slider.entry.js +1 -1
- package/dist/esm/ix-toggle-button.entry.js +1 -1
- package/dist/esm/ix-toggle.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/siemens-ix.js +1 -1
- package/dist/siemens-ix/{p-4796a3ae.entry.js → p-042b8889.entry.js} +2 -2
- package/dist/siemens-ix/{p-b53bed3a.entry.js → p-228c5657.entry.js} +2 -2
- package/dist/siemens-ix/{p-fa0d5f4e.entry.js → p-28d29e36.entry.js} +2 -2
- package/dist/siemens-ix/p-2fd30d79.js +2 -0
- package/dist/siemens-ix/p-2fd30d79.js.map +1 -0
- package/dist/siemens-ix/p-302cd093.entry.js +2 -0
- package/dist/siemens-ix/{p-eb29049a.entry.js.map → p-302cd093.entry.js.map} +1 -1
- package/dist/siemens-ix/p-32265ee2.entry.js +2 -0
- package/dist/siemens-ix/p-32265ee2.entry.js.map +1 -0
- package/dist/siemens-ix/p-355f9085.entry.js +2 -0
- package/dist/siemens-ix/{p-74a7d191.entry.js.map → p-355f9085.entry.js.map} +1 -1
- package/dist/siemens-ix/p-574e3cd1.entry.js +2 -0
- package/dist/siemens-ix/p-574e3cd1.entry.js.map +1 -0
- package/dist/siemens-ix/p-59dc0873.entry.js +2 -0
- package/dist/siemens-ix/{p-90efad65.entry.js.map → p-59dc0873.entry.js.map} +1 -1
- package/dist/siemens-ix/p-7cc23245.entry.js +2 -0
- package/dist/siemens-ix/p-7cc23245.entry.js.map +1 -0
- package/dist/siemens-ix/p-9249df8d.entry.js +2 -0
- package/dist/siemens-ix/{p-d78cd3f4.entry.js.map → p-9249df8d.entry.js.map} +1 -1
- package/dist/siemens-ix/p-ad94f795.entry.js +2 -0
- package/dist/siemens-ix/p-ad94f795.entry.js.map +1 -0
- package/dist/siemens-ix/{p-0ebc6c4d.entry.js → p-b2042a15.entry.js} +2 -2
- package/dist/siemens-ix/p-b2042a15.entry.js.map +1 -0
- package/dist/siemens-ix/p-bd873b87.entry.js +2 -0
- package/dist/siemens-ix/p-bd873b87.entry.js.map +1 -0
- package/dist/siemens-ix/{p-6ae65cac.entry.js → p-c1318e16.entry.js} +2 -2
- package/dist/siemens-ix/p-c7e502d7.entry.js +2 -0
- package/dist/siemens-ix/p-c7e502d7.entry.js.map +1 -0
- package/dist/siemens-ix/p-dcb957d8.entry.js.map +1 -1
- package/dist/siemens-ix/{p-77b14ca1.entry.js → p-f304f7ce.entry.js} +2 -2
- package/dist/siemens-ix/p-fa7f3eef.entry.js +2 -0
- package/dist/siemens-ix/p-fa7f3eef.entry.js.map +1 -0
- package/dist/siemens-ix/siemens-ix-core.css +1 -1
- package/dist/siemens-ix/siemens-ix.css +12 -0
- package/dist/siemens-ix/siemens-ix.esm.js +1 -1
- package/dist/siemens-ix/siemens-ix.esm.js.map +1 -1
- package/dist/types/components/application-header/application-header.d.ts +1 -0
- package/dist/types/components/breadcrumb-item/breadcrumb-item.d.ts +2 -0
- package/dist/types/components/input-group/input-group.d.ts +1 -0
- package/dist/types/components/input-group/tests/input-group.ct.d.ts +1 -0
- package/dist/types/components/menu/menu.d.ts +2 -0
- package/dist/types/components.d.ts +2 -0
- package/package.json +1 -1
- package/scss/components/_checkboxes.scss +3 -0
- package/scss/components/_radiobuttons.scss +5 -0
- package/dist/cjs/a11y-4fdcefb4.js.map +0 -1
- package/dist/esm/a11y-d5dd20ad.js.map +0 -1
- package/dist/siemens-ix/p-0ebc6c4d.entry.js.map +0 -1
- package/dist/siemens-ix/p-2e75f0e4.entry.js +0 -2
- package/dist/siemens-ix/p-2e75f0e4.entry.js.map +0 -1
- package/dist/siemens-ix/p-66d7fbd9.entry.js +0 -2
- package/dist/siemens-ix/p-66d7fbd9.entry.js.map +0 -1
- package/dist/siemens-ix/p-74a7d191.entry.js +0 -2
- package/dist/siemens-ix/p-774eca79.entry.js +0 -2
- package/dist/siemens-ix/p-774eca79.entry.js.map +0 -1
- package/dist/siemens-ix/p-78c9489b.js +0 -2
- package/dist/siemens-ix/p-78c9489b.js.map +0 -1
- package/dist/siemens-ix/p-7a884056.entry.js +0 -2
- package/dist/siemens-ix/p-7a884056.entry.js.map +0 -1
- package/dist/siemens-ix/p-7b362f58.entry.js +0 -2
- package/dist/siemens-ix/p-7b362f58.entry.js.map +0 -1
- package/dist/siemens-ix/p-90efad65.entry.js +0 -2
- package/dist/siemens-ix/p-d78cd3f4.entry.js +0 -2
- package/dist/siemens-ix/p-d9c99b88.entry.js +0 -2
- package/dist/siemens-ix/p-d9c99b88.entry.js.map +0 -1
- package/dist/siemens-ix/p-eb29049a.entry.js +0 -2
- package/dist/siemens-ix/p-f7b95fd7.entry.js +0 -2
- package/dist/siemens-ix/p-f7b95fd7.entry.js.map +0 -1
- /package/dist/siemens-ix/{p-4796a3ae.entry.js.map → p-042b8889.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-b53bed3a.entry.js.map → p-228c5657.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-fa0d5f4e.entry.js.map → p-28d29e36.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-6ae65cac.entry.js.map → p-c1318e16.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-77b14ca1.entry.js.map → p-f304f7ce.entry.js.map} +0 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { T as TypedEvent } from './typed-event.js';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* SPDX-FileCopyrightText: 2023 Siemens AG
|
|
5
|
+
*
|
|
6
|
+
* SPDX-License-Identifier: MIT
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/
|
|
11
|
+
class DefaultFrameworkDelegate {
|
|
12
|
+
async attachView(view, config) {
|
|
13
|
+
var _a;
|
|
14
|
+
const attachToElement = (_a = config === null || config === void 0 ? void 0 : config.parentElement) !== null && _a !== void 0 ? _a : document.body;
|
|
15
|
+
attachToElement.appendChild(view);
|
|
16
|
+
return view;
|
|
17
|
+
}
|
|
18
|
+
async removeView(view) {
|
|
19
|
+
view.remove();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const coreDelegate = new DefaultFrameworkDelegate();
|
|
23
|
+
let currentDelegate = coreDelegate;
|
|
24
|
+
function registerFrameworkDelegate(delegate) {
|
|
25
|
+
currentDelegate = delegate;
|
|
26
|
+
}
|
|
27
|
+
const resolveDelegate = () => {
|
|
28
|
+
return currentDelegate;
|
|
29
|
+
};
|
|
30
|
+
const getCoreDelegate = () => coreDelegate;
|
|
31
|
+
|
|
32
|
+
/*
|
|
33
|
+
* SPDX-FileCopyrightText: 2023 Siemens AG
|
|
34
|
+
*
|
|
35
|
+
* SPDX-License-Identifier: MIT
|
|
36
|
+
*
|
|
37
|
+
* This source code is licensed under the MIT license found in the
|
|
38
|
+
* LICENSE file in the root directory of this source tree.
|
|
39
|
+
*/
|
|
40
|
+
function setA11yAttributes$1(element, config) {
|
|
41
|
+
const ariaDescribedby = config.ariaDescribedby;
|
|
42
|
+
const ariaLabelledby = config.ariaLabelledby;
|
|
43
|
+
delete config['ariaDescribedby'];
|
|
44
|
+
delete config['ariaLabelledby'];
|
|
45
|
+
if (ariaDescribedby) {
|
|
46
|
+
element.setAttribute('aria-describedby', ariaDescribedby);
|
|
47
|
+
}
|
|
48
|
+
if (ariaLabelledby) {
|
|
49
|
+
element.setAttribute('aria-labelledby', ariaLabelledby);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function createConfirmButtons(textOkay, textCancel, payloadOkay, payloadCancel) {
|
|
53
|
+
let actions = [];
|
|
54
|
+
if (textCancel !== undefined) {
|
|
55
|
+
actions = [
|
|
56
|
+
...actions,
|
|
57
|
+
{
|
|
58
|
+
id: 'cancel',
|
|
59
|
+
text: textCancel,
|
|
60
|
+
type: 'cancel',
|
|
61
|
+
payload: payloadCancel,
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
return [
|
|
66
|
+
...actions,
|
|
67
|
+
{
|
|
68
|
+
id: 'okay',
|
|
69
|
+
text: textOkay,
|
|
70
|
+
type: 'okay',
|
|
71
|
+
payload: payloadOkay,
|
|
72
|
+
},
|
|
73
|
+
];
|
|
74
|
+
}
|
|
75
|
+
async function showMessage(config) {
|
|
76
|
+
const onMessageAction = new TypedEvent();
|
|
77
|
+
const dialog = document.createElement('ix-modal');
|
|
78
|
+
const header = document.createElement('ix-modal-header');
|
|
79
|
+
const content = document.createElement('ix-modal-content');
|
|
80
|
+
const footer = document.createElement('ix-modal-footer');
|
|
81
|
+
setA11yAttributes$1(dialog, config);
|
|
82
|
+
Object.assign(header, config);
|
|
83
|
+
Object.assign(content, config);
|
|
84
|
+
Object.assign(footer, config);
|
|
85
|
+
header.innerText = config.messageTitle;
|
|
86
|
+
content.innerText = config.message;
|
|
87
|
+
config.actions.forEach(({ id, text, type, payload }) => {
|
|
88
|
+
const button = document.createElement('ix-button');
|
|
89
|
+
button.innerText = text;
|
|
90
|
+
footer.appendChild(button);
|
|
91
|
+
if (type === 'okay') {
|
|
92
|
+
button.variant = 'primary';
|
|
93
|
+
button.addEventListener('click', () => dialog.closeModal({
|
|
94
|
+
actionId: id,
|
|
95
|
+
payload,
|
|
96
|
+
}));
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if (type === 'cancel') {
|
|
100
|
+
button.variant = 'primary';
|
|
101
|
+
button.outline = true;
|
|
102
|
+
button.addEventListener('click', () => dialog.dismissModal({
|
|
103
|
+
actionId: id,
|
|
104
|
+
payload,
|
|
105
|
+
}));
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
dialog.appendChild(header);
|
|
110
|
+
dialog.appendChild(content);
|
|
111
|
+
dialog.appendChild(footer);
|
|
112
|
+
const dialogRef = await getCoreDelegate().attachView(dialog);
|
|
113
|
+
dialogRef.addEventListener('dialogClose', (event) => {
|
|
114
|
+
onMessageAction.emit(event.detail);
|
|
115
|
+
dialogRef.remove();
|
|
116
|
+
});
|
|
117
|
+
dialogRef.addEventListener('dialogDismiss', (event) => {
|
|
118
|
+
onMessageAction.emit(event.detail);
|
|
119
|
+
dialogRef.remove();
|
|
120
|
+
});
|
|
121
|
+
dialogRef.showModal();
|
|
122
|
+
return onMessageAction;
|
|
123
|
+
}
|
|
124
|
+
showMessage.info = (title, message, textOkay, textCancel, payloadOkay, payloadCancel) => {
|
|
125
|
+
return showMessage({
|
|
126
|
+
message,
|
|
127
|
+
messageTitle: title,
|
|
128
|
+
icon: 'info',
|
|
129
|
+
actions: createConfirmButtons(textOkay, textCancel, payloadOkay, payloadCancel),
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
showMessage.warning = (title, message, textOkay, textCancel, payloadOkay, payloadCancel) => {
|
|
133
|
+
return showMessage({
|
|
134
|
+
message,
|
|
135
|
+
messageTitle: title,
|
|
136
|
+
icon: 'warning',
|
|
137
|
+
iconColor: 'color-warning',
|
|
138
|
+
actions: createConfirmButtons(textOkay, textCancel, payloadOkay, payloadCancel),
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
showMessage.error = (title, message, textOkay, textCancel, payloadOkay, payloadCancel) => {
|
|
142
|
+
return showMessage({
|
|
143
|
+
message,
|
|
144
|
+
messageTitle: title,
|
|
145
|
+
icon: 'error',
|
|
146
|
+
iconColor: 'color-alarm',
|
|
147
|
+
actions: createConfirmButtons(textOkay, textCancel, payloadOkay, payloadCancel),
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
showMessage.success = (title, message, textOkay, textCancel, payloadOkay, payloadCancel) => {
|
|
151
|
+
return showMessage({
|
|
152
|
+
message,
|
|
153
|
+
messageTitle: title,
|
|
154
|
+
icon: 'success',
|
|
155
|
+
iconColor: 'color-success',
|
|
156
|
+
actions: createConfirmButtons(textOkay, textCancel, payloadOkay, payloadCancel),
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
showMessage.question = (title, message, textOkay, textCancel, payloadOkay, payloadCancel) => {
|
|
160
|
+
return showMessage({
|
|
161
|
+
message,
|
|
162
|
+
messageTitle: title,
|
|
163
|
+
icon: 'question',
|
|
164
|
+
actions: createConfirmButtons(textOkay, textCancel, payloadOkay, payloadCancel),
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
/*
|
|
169
|
+
* SPDX-FileCopyrightText: 2023 Siemens AG
|
|
170
|
+
*
|
|
171
|
+
* SPDX-License-Identifier: MIT
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the MIT license found in the
|
|
174
|
+
* LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/
|
|
176
|
+
function setA11yAttributes(element, config) {
|
|
177
|
+
const ariaDescribedby = config.ariaDescribedby;
|
|
178
|
+
const ariaLabelledby = config.ariaLabelledby;
|
|
179
|
+
delete config['ariaDescribedby'];
|
|
180
|
+
delete config['ariaLabelledby'];
|
|
181
|
+
if (ariaDescribedby) {
|
|
182
|
+
element.setAttribute('aria-describedby', ariaDescribedby);
|
|
183
|
+
}
|
|
184
|
+
if (ariaLabelledby) {
|
|
185
|
+
element.setAttribute('aria-labelledby', ariaLabelledby);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function getIxModal(element) {
|
|
189
|
+
return element.closest('ix-modal');
|
|
190
|
+
}
|
|
191
|
+
function closeModal(element, closeResult) {
|
|
192
|
+
const dialog = getIxModal(element);
|
|
193
|
+
if (dialog) {
|
|
194
|
+
dialog.closeModal(closeResult);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
function dismissModal(element, dismissResult) {
|
|
199
|
+
const dialog = getIxModal(element);
|
|
200
|
+
if (dialog) {
|
|
201
|
+
dialog.dismissModal(dismissResult);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
async function showModal(config) {
|
|
206
|
+
const delegate = resolveDelegate();
|
|
207
|
+
let dialogRef;
|
|
208
|
+
const onClose = new TypedEvent();
|
|
209
|
+
const onDismiss = new TypedEvent();
|
|
210
|
+
if (typeof config.content === 'string') {
|
|
211
|
+
const dialog = document.createElement('ix-modal');
|
|
212
|
+
dialog.innerText = config.content;
|
|
213
|
+
dialogRef = await getCoreDelegate().attachView(dialog);
|
|
214
|
+
}
|
|
215
|
+
if (config.content instanceof HTMLElement &&
|
|
216
|
+
config.content.tagName !== 'IX-MODAL') {
|
|
217
|
+
const dialog = document.createElement('ix-modal');
|
|
218
|
+
dialog.appendChild(config.content);
|
|
219
|
+
dialogRef = await getCoreDelegate().attachView(dialog);
|
|
220
|
+
}
|
|
221
|
+
if (!dialogRef) {
|
|
222
|
+
dialogRef = await delegate.attachView(config.content);
|
|
223
|
+
}
|
|
224
|
+
setA11yAttributes(dialogRef, config);
|
|
225
|
+
Object.assign(dialogRef, config);
|
|
226
|
+
dialogRef.setAttribute('ariaDescribedby', 'Test');
|
|
227
|
+
dialogRef.showModal();
|
|
228
|
+
dialogRef.addEventListener('dialogClose', async ({ detail }) => {
|
|
229
|
+
onClose.emit(detail);
|
|
230
|
+
await delegate.removeView(dialogRef);
|
|
231
|
+
});
|
|
232
|
+
dialogRef.addEventListener('dialogDismiss', async ({ detail }) => {
|
|
233
|
+
onDismiss.emit(detail);
|
|
234
|
+
await delegate.removeView(dialogRef);
|
|
235
|
+
});
|
|
236
|
+
return {
|
|
237
|
+
htmlElement: dialogRef,
|
|
238
|
+
onClose,
|
|
239
|
+
onDismiss,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export { resolveDelegate as a, showModal as b, closeModal as c, dismissModal as d, getCoreDelegate as g, registerFrameworkDelegate as r, showMessage as s };
|
|
244
|
+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MAAM,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;GACtC,CAAC,CAAC;EAEH,SAAS,CAAC,gBAAgB,CACxB,eAAe,EACf,OAAO,EAAE,MAAM,EAAe;IAC5B,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,MAAM,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;GACtC,CACF,CAAC;EAEF,OAAO;IACL,WAAW,EAAE,SAAS;IACtB,OAAO;IACP,SAAS;GACV,CAAC;AACJ;;;;","names":["setA11yAttributes"],"sources":["./src/components/utils/delegate.ts","./src/components/utils/modal/message.ts","./src/components/utils/modal/modal.ts"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport type DelegateConfig = {\n parentElement?: Element;\n};\n\nexport interface FrameworkDelegate {\n attachView<R = HTMLElement>(view: any, config?: DelegateConfig): Promise<R>;\n removeView(view: any): Promise<void>;\n}\n\nclass DefaultFrameworkDelegate implements FrameworkDelegate {\n async attachView<R = HTMLElement>(\n view: any,\n config?: DelegateConfig\n ): Promise<R> {\n const attachToElement = config?.parentElement ?? document.body;\n attachToElement.appendChild(view);\n return view;\n }\n\n async removeView(view: any) {\n view.remove();\n }\n}\n\nconst coreDelegate = new DefaultFrameworkDelegate();\nlet currentDelegate: FrameworkDelegate = coreDelegate;\n\nexport function registerFrameworkDelegate(delegate: FrameworkDelegate) {\n currentDelegate = delegate;\n}\n\nexport const resolveDelegate = () => {\n return currentDelegate;\n};\n\nexport const getCoreDelegate = () => coreDelegate;\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 { getCoreDelegate } from '../delegate';\nimport { TypedEvent } from '../typed-event';\n\nfunction setA11yAttributes(element: HTMLElement, config: MessageContent) {\n const ariaDescribedby = config.ariaDescribedby;\n const ariaLabelledby = config.ariaLabelledby;\n\n delete config['ariaDescribedby'];\n delete config['ariaLabelledby'];\n\n if (ariaDescribedby) {\n element.setAttribute('aria-describedby', ariaDescribedby);\n }\n\n if (ariaLabelledby) {\n element.setAttribute('aria-labelledby', ariaLabelledby);\n }\n}\n\nfunction createConfirmButtons(\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) {\n let actions = [];\n if (textCancel !== undefined) {\n actions = [\n ...actions,\n {\n id: 'cancel',\n text: textCancel,\n type: 'cancel',\n payload: payloadCancel,\n },\n ];\n }\n return [\n ...actions,\n {\n id: 'okay',\n text: textOkay,\n type: 'okay',\n payload: payloadOkay,\n },\n ];\n}\n\nexport type MessageContent = {\n icon: string;\n iconColor?: string;\n messageTitle: string;\n message: string;\n actions: {\n id: string;\n type: 'button-primary' | 'button-secondary' | 'okay' | 'cancel';\n text: string;\n payload?: any;\n }[];\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n};\n\nexport async function showMessage<T>(config: MessageContent) {\n const onMessageAction = new TypedEvent<{\n actionId: string;\n payload: T;\n }>();\n const dialog = document.createElement('ix-modal');\n const header = document.createElement('ix-modal-header');\n const content = document.createElement('ix-modal-content');\n const footer = document.createElement('ix-modal-footer');\n\n setA11yAttributes(dialog, config);\n\n Object.assign(header, config);\n Object.assign(content, config);\n Object.assign(footer, config);\n\n header.innerText = config.messageTitle;\n content.innerText = config.message;\n\n config.actions.forEach(({ id, text, type, payload }) => {\n const button = document.createElement('ix-button');\n button.innerText = text;\n footer.appendChild(button);\n\n if (type === 'okay') {\n button.variant = 'primary';\n button.addEventListener('click', () =>\n dialog.closeModal({\n actionId: id,\n payload,\n })\n );\n return;\n }\n if (type === 'cancel') {\n button.variant = 'primary';\n button.outline = true;\n button.addEventListener('click', () =>\n dialog.dismissModal({\n actionId: id,\n payload,\n })\n );\n return;\n }\n });\n\n dialog.appendChild(header);\n dialog.appendChild(content);\n dialog.appendChild(footer);\n\n const dialogRef = await getCoreDelegate().attachView<HTMLIxModalElement>(\n dialog\n );\n\n dialogRef.addEventListener(\n 'dialogClose',\n (\n event: CustomEvent<{\n actionId: string;\n payload: T;\n }>\n ) => {\n onMessageAction.emit(event.detail);\n dialogRef.remove();\n }\n );\n\n dialogRef.addEventListener(\n 'dialogDismiss',\n (\n event: CustomEvent<{\n actionId: string;\n payload: T;\n }>\n ) => {\n onMessageAction.emit(event.detail);\n dialogRef.remove();\n }\n );\n\n dialogRef.showModal();\n return onMessageAction;\n}\n\nshowMessage.info = (\n title: string,\n message: string,\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) => {\n return showMessage({\n message,\n messageTitle: title,\n icon: 'info',\n actions: createConfirmButtons(\n textOkay,\n textCancel,\n payloadOkay,\n payloadCancel\n ),\n });\n};\n\nshowMessage.warning = (\n title: string,\n message: string,\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) => {\n return showMessage({\n message,\n messageTitle: title,\n icon: 'warning',\n iconColor: 'color-warning',\n actions: createConfirmButtons(\n textOkay,\n textCancel,\n payloadOkay,\n payloadCancel\n ),\n });\n};\n\nshowMessage.error = (\n title: string,\n message: string,\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) => {\n return showMessage({\n message,\n messageTitle: title,\n icon: 'error',\n iconColor: 'color-alarm',\n actions: createConfirmButtons(\n textOkay,\n textCancel,\n payloadOkay,\n payloadCancel\n ),\n });\n};\n\nshowMessage.success = (\n title: string,\n message: string,\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) => {\n return showMessage({\n message,\n messageTitle: title,\n icon: 'success',\n iconColor: 'color-success',\n actions: createConfirmButtons(\n textOkay,\n textCancel,\n payloadOkay,\n payloadCancel\n ),\n });\n};\n\nshowMessage.question = (\n title: string,\n message: string,\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) => {\n return showMessage({\n message,\n messageTitle: title,\n icon: 'question',\n actions: createConfirmButtons(\n textOkay,\n textCancel,\n payloadOkay,\n payloadCancel\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 { IxModalSize } from '../../modal/modal';\nimport { getCoreDelegate, resolveDelegate } from '../delegate';\nimport { TypedEvent } from '../typed-event';\n\nexport function setA11yAttributes(element: HTMLElement, config: ModalConfig) {\n const ariaDescribedby = config.ariaDescribedby;\n const ariaLabelledby = config.ariaLabelledby;\n\n delete config['ariaDescribedby'];\n delete config['ariaLabelledby'];\n\n if (ariaDescribedby) {\n element.setAttribute('aria-describedby', ariaDescribedby);\n }\n\n if (ariaLabelledby) {\n element.setAttribute('aria-labelledby', ariaLabelledby);\n }\n}\n\nexport interface ModalConfig<TReason = any, CONTENT = any> {\n animation?: boolean;\n ariaDescribedby?: string;\n ariaLabelledby?: string;\n backdrop?: boolean;\n closeOnBackdropClick?: boolean;\n beforeDismiss?: (reason?: TReason) => boolean | Promise<boolean>;\n centered?: boolean;\n container?: string | HTMLElement;\n content: CONTENT | string;\n keyboard?: boolean;\n size?: IxModalSize;\n title?: string;\n}\n\nexport interface ModalInstance<TReason = any> {\n htmlElement: HTMLIxModalElement;\n onClose: TypedEvent<TReason>;\n onDismiss: TypedEvent<TReason>;\n}\n\nfunction getIxModal(element: Element) {\n return element.closest('ix-modal');\n}\n\nexport function closeModal<TClose = any>(\n element: Element,\n closeResult: TClose\n) {\n const dialog = getIxModal(element);\n if (dialog) {\n dialog.closeModal(closeResult);\n return;\n }\n}\n\nexport function dismissModal(element: Element, dismissResult?: any) {\n const dialog = getIxModal(element);\n if (dialog) {\n dialog.dismissModal(dismissResult);\n return;\n }\n}\n\nexport async function showModal<T>(\n config: ModalConfig<T>\n): Promise<ModalInstance<T>> {\n const delegate = resolveDelegate();\n let dialogRef: HTMLIxModalElement;\n const onClose = new TypedEvent<T>();\n const onDismiss = new TypedEvent<T>();\n\n if (typeof config.content === 'string') {\n const dialog = document.createElement('ix-modal');\n dialog.innerText = config.content;\n dialogRef = await getCoreDelegate().attachView(dialog);\n }\n\n if (\n config.content instanceof HTMLElement &&\n config.content.tagName !== 'IX-MODAL'\n ) {\n const dialog = document.createElement('ix-modal');\n dialog.appendChild(config.content);\n dialogRef = await getCoreDelegate().attachView(dialog);\n }\n\n if (!dialogRef) {\n dialogRef = await delegate.attachView<HTMLIxModalElement>(config.content);\n }\n\n setA11yAttributes(dialogRef, config);\n Object.assign(dialogRef, config);\n\n dialogRef.setAttribute('ariaDescribedby', 'Test');\n\n dialogRef.showModal();\n dialogRef.addEventListener('dialogClose', async ({ detail }: CustomEvent) => {\n onClose.emit(detail);\n await delegate.removeView(dialogRef);\n });\n\n dialogRef.addEventListener(\n 'dialogDismiss',\n async ({ detail }: CustomEvent) => {\n onDismiss.emit(detail);\n await delegate.removeView(dialogRef);\n }\n );\n\n return {\n htmlElement: dialogRef,\n onClose,\n onDismiss,\n };\n}\n"],"version":3}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
const createMutationObserver = (callback) => new MutationObserver(callback);
|
|
10
|
+
|
|
11
|
+
export { createMutationObserver as c };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=mutation-observer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"mutation-observer.js","mappings":"AAAA;;;;;;;;MASa,sBAAsB,GAAG,CAAC,QAA0B,KAC/D,IAAI,gBAAgB,CAAC,QAAQ;;;;","names":[],"sources":["./src/components/utils/mutation-observer.ts"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport const createMutationObserver = (callback: MutationCallback) =>\n new MutationObserver(callback);\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface MyComponent extends Components.MyComponent, HTMLElement {}
|
|
4
|
+
export const MyComponent: {
|
|
5
|
+
prototype: MyComponent;
|
|
6
|
+
new (): MyComponent;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const myComponentCss = ".sc-my-component-h{display:block;position:relative;width:100vw;height:100vh;padding:0rem 0rem 0rem 0rem}";
|
|
4
|
+
|
|
5
|
+
const MyComponent$1 = /*@__PURE__*/ proxyCustomElement(class MyComponent extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
return h(Host, null);
|
|
12
|
+
}
|
|
13
|
+
static get style() { return myComponentCss; }
|
|
14
|
+
}, [2, "my-component"]);
|
|
15
|
+
function defineCustomElement$1() {
|
|
16
|
+
if (typeof customElements === "undefined") {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const components = ["my-component"];
|
|
20
|
+
components.forEach(tagName => { switch (tagName) {
|
|
21
|
+
case "my-component":
|
|
22
|
+
if (!customElements.get(tagName)) {
|
|
23
|
+
customElements.define(tagName, MyComponent$1);
|
|
24
|
+
}
|
|
25
|
+
break;
|
|
26
|
+
} });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const MyComponent = MyComponent$1;
|
|
30
|
+
const defineCustomElement = defineCustomElement$1;
|
|
31
|
+
|
|
32
|
+
export { MyComponent, defineCustomElement };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=my-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"my-component.js","mappings":";;AAAA,MAAM,cAAc,GAAG,0GAA0G;;MCepHA,aAAW;;;;;EACtB,MAAM;IACJ,OAAO,EAAC,IAAI,OAAQ,CAAC;GACtB;;;;;;;;;;;;;;;;;;;;;;","names":["MyComponent"],"sources":["./src/components/my-component/my-component.scss?tag=my-component&encapsulation=scoped","./src/components/my-component/my-component.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\n:host {\n display: block;\n position: relative;\n width: 100vw;\n height: 100vh;\n padding: 0rem 0rem 0rem 0rem;\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 * LICENxSE file in the root directory of this source tree.\n */\nimport { Component, h, Host } from '@stencil/core';\n\n@Component({\n tag: 'my-component',\n styleUrl: 'my-component.scss',\n scoped: true,\n})\nexport class MyComponent {\n render() {\n return <Host></Host>;\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
const convertToRemString = (value) => {
|
|
10
|
+
const valueRem = value / 16;
|
|
11
|
+
return `${valueRem}rem`;
|
|
12
|
+
};
|
|
13
|
+
const convertToAbbreviationString = (num) => {
|
|
14
|
+
if (isNaN(num) || num === null || num === undefined) {
|
|
15
|
+
return '';
|
|
16
|
+
}
|
|
17
|
+
let unit = '';
|
|
18
|
+
// Metric Units
|
|
19
|
+
const units = [
|
|
20
|
+
{ unit: 'q', value: Math.pow(10, 15) },
|
|
21
|
+
{ unit: 't', value: Math.pow(10, 12) },
|
|
22
|
+
{ unit: 'B', value: Math.pow(10, 9) },
|
|
23
|
+
{ unit: 'M', value: Math.pow(10, 6) },
|
|
24
|
+
{ unit: 'K', value: Math.pow(10, 3) },
|
|
25
|
+
];
|
|
26
|
+
units.some((pow) => {
|
|
27
|
+
let formattedNum = Math.abs(num);
|
|
28
|
+
if (formattedNum >= pow.value) {
|
|
29
|
+
formattedNum /= pow.value;
|
|
30
|
+
num = Math.round(formattedNum * 10) / 10;
|
|
31
|
+
unit = pow.unit;
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
});
|
|
36
|
+
return num + unit;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export { convertToRemString as a, convertToAbbreviationString as c };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=rwd.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"rwd.util.js","mappings":"AAAA;;;;;;;;MASa,kBAAkB,GAAG,CAAC,KAAa;EAC9C,MAAM,QAAQ,GAAG,KAAK,GAAG,EAAE,CAAC;EAC5B,OAAO,GAAG,QAAQ,KAAK,CAAC;AAC1B,EAAE;MAEW,2BAA2B,GAAG,CAAC,GAAW;EACrD,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,EAAE;IACnD,OAAO,EAAE,CAAC;GACX;EAED,IAAI,IAAI,GAAG,EAAE,CAAC;;EAGd,MAAM,KAAK,GAAG;IACZ,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE;IACtC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE;IACtC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE;IACrC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE;IACrC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE;GACtC,CAAC;EAEF,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG;IACb,IAAI,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,YAAY,IAAI,GAAG,CAAC,KAAK,EAAE;MAC7B,YAAY,IAAI,GAAG,CAAC,KAAK,CAAC;MAC1B,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC;MACzC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;MAChB,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;GACd,CAAC,CAAC;EAEH,OAAO,GAAG,GAAG,IAAI,CAAC;AACpB;;;;","names":[],"sources":["./src/components/utils/rwd.util.ts"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport const convertToRemString = (value: number) => {\n const valueRem = value / 16;\n return `${valueRem}rem`;\n};\n\nexport const convertToAbbreviationString = (num: number) => {\n if (isNaN(num) || num === null || num === undefined) {\n return '';\n }\n\n let unit = '';\n\n // Metric Units\n const units = [\n { unit: 'q', value: Math.pow(10, 15) },\n { unit: 't', value: Math.pow(10, 12) },\n { unit: 'B', value: Math.pow(10, 9) },\n { unit: 'M', value: Math.pow(10, 6) },\n { unit: 'K', value: Math.pow(10, 3) },\n ];\n\n units.some((pow) => {\n let formattedNum = Math.abs(num);\n if (formattedNum >= pow.value) {\n formattedNum /= pow.value;\n num = Math.round(formattedNum * 10) / 10;\n unit = pow.unit;\n return true;\n }\n\n return false;\n });\n\n return num + unit;\n};\n"],"version":3}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$1 } from './dropdown-item.js';
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
* SPDX-FileCopyrightText: 2023 Siemens AG
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
class IxSelectItemLabelChangeEvent extends CustomEvent {
|
|
13
|
+
constructor(detail) {
|
|
14
|
+
super('ix-select-item:labelChange', {
|
|
15
|
+
bubbles: true,
|
|
16
|
+
detail,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const selectItemCss = ":host{display:block;position:relative}:host>ix-dropdown-item{width:100%}:host .select-item-checked{background-color:var(--theme-select-list-item--background--selected);--ix-dropdown-item-checked-color:var(--theme-color-std-text)}:host(.d-none){display:none}";
|
|
22
|
+
|
|
23
|
+
const SelectItem = /*@__PURE__*/ proxyCustomElement(class SelectItem extends HTMLElement {
|
|
24
|
+
constructor() {
|
|
25
|
+
super();
|
|
26
|
+
this.__registerHost();
|
|
27
|
+
this.__attachShadow();
|
|
28
|
+
this.itemClick = createEvent(this, "itemClick", 7);
|
|
29
|
+
this.label = undefined;
|
|
30
|
+
this.value = undefined;
|
|
31
|
+
this.selected = false;
|
|
32
|
+
this.hover = false;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
* @param event
|
|
37
|
+
*/
|
|
38
|
+
async onItemClick(event) {
|
|
39
|
+
event === null || event === void 0 ? void 0 : event.preventDefault();
|
|
40
|
+
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
41
|
+
this.itemClick.emit(this.value);
|
|
42
|
+
}
|
|
43
|
+
componentDidRender() {
|
|
44
|
+
if (!this.value) {
|
|
45
|
+
throw Error('ix-select-item must have a `value` property');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
labelChange(newValue, oldValue) {
|
|
49
|
+
this.hostElement.dispatchEvent(new IxSelectItemLabelChangeEvent({
|
|
50
|
+
newValue: newValue,
|
|
51
|
+
oldValue: oldValue,
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
render() {
|
|
55
|
+
return (h(Host, null, h("ix-dropdown-item", { class: {
|
|
56
|
+
'select-item-checked': this.selected,
|
|
57
|
+
}, checked: this.selected, label: this.label ? this.label : this.value, onItemClick: (e) => this.onItemClick(e) })));
|
|
58
|
+
}
|
|
59
|
+
get hostElement() { return this; }
|
|
60
|
+
static get watchers() { return {
|
|
61
|
+
"label": ["labelChange"]
|
|
62
|
+
}; }
|
|
63
|
+
static get style() { return selectItemCss; }
|
|
64
|
+
}, [1, "ix-select-item", {
|
|
65
|
+
"label": [513],
|
|
66
|
+
"value": [520],
|
|
67
|
+
"selected": [4],
|
|
68
|
+
"hover": [4],
|
|
69
|
+
"onItemClick": [64]
|
|
70
|
+
}]);
|
|
71
|
+
function defineCustomElement() {
|
|
72
|
+
if (typeof customElements === "undefined") {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const components = ["ix-select-item", "ix-dropdown-item"];
|
|
76
|
+
components.forEach(tagName => { switch (tagName) {
|
|
77
|
+
case "ix-select-item":
|
|
78
|
+
if (!customElements.get(tagName)) {
|
|
79
|
+
customElements.define(tagName, SelectItem);
|
|
80
|
+
}
|
|
81
|
+
break;
|
|
82
|
+
case "ix-dropdown-item":
|
|
83
|
+
if (!customElements.get(tagName)) {
|
|
84
|
+
defineCustomElement$1();
|
|
85
|
+
}
|
|
86
|
+
break;
|
|
87
|
+
} });
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export { SelectItem as S, defineCustomElement as d };
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=select-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"select-item.js","mappings":";;;AAAA;;;;;;;;MAQa,4BAA6B,SAAQ,WAGhD;EACA,YAAY,MAA8C;IACxD,KAAK,CAAC,4BAA4B,EAAE;MAClC,OAAO,EAAE,IAAI;MACb,MAAM;KACP,CAAC,CAAC;GACJ;;;ACjBH,MAAM,aAAa,GAAG,mQAAmQ;;MC2B5Q,UAAU;;;;;;;;oBAgBF,KAAK;iBAKR,KAAK;;;;;;EAYrB,MAAM,WAAW,CAAC,KAA8C;IAC9D,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,EAAE,CAAC;IACxB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,eAAe,EAAE,CAAC;IAEzB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GACjC;EAED,kBAAkB;IAChB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;MACf,MAAM,KAAK,CAAC,6CAA6C,CAAC,CAAC;KAC5D;GACF;EAGD,WAAW,CAAC,QAAgB,EAAE,QAAgB;IAC5C,IAAI,CAAC,WAAW,CAAC,aAAa,CAC5B,IAAI,4BAA4B,CAAC;MAC/B,QAAQ,EAAE,QAAQ;MAClB,QAAQ,EAAE,QAAQ;KACnB,CAAC,CACH,CAAC;GACH;EAED,MAAM;IACJ,QACE,EAAC,IAAI,QACH,wBACE,KAAK,EAAE;QACL,qBAAqB,EAAE,IAAI,CAAC,QAAQ;OACrC,EACD,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,EAC3C,WAAW,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GACrB,CACf,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/select-item/events.ts","./src/components/select-item/select-item.scss?tag=ix-select-item&encapsulation=shadow","./src/components/select-item/select-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 */\nexport class IxSelectItemLabelChangeEvent extends CustomEvent<{\n oldValue: string;\n newValue: string;\n}> {\n constructor(detail: { oldValue: string; newValue: string }) {\n super('ix-select-item:labelChange', {\n bubbles: true,\n detail,\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\n:host {\n display: block;\n position: relative;\n\n > ix-dropdown-item {\n width: 100%;\n }\n\n .select-item-checked {\n background-color: var(--theme-select-list-item--background--selected);\n --ix-dropdown-item-checked-color: var(--theme-color-std-text);\n }\n}\n\n:host(.d-none) {\n display: none;\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n Watch,\n} from '@stencil/core';\nimport { IxSelectItemLabelChangeEvent } from './events';\n\n@Component({\n tag: 'ix-select-item',\n styleUrl: 'select-item.scss',\n shadow: true,\n})\nexport class SelectItem {\n @Element() hostElement: HTMLIxSelectItemElement;\n\n /**\n * Displayed name of the item\n */\n @Prop({ reflect: true }) label: string;\n\n /**\n * Item value\n */\n @Prop({ reflect: true }) value!: any;\n\n /**\n * Whether the item is selected.\n */\n @Prop() selected = false;\n\n /**\n * @internal\n */\n @Prop() hover = false;\n\n /**\n * Item clicked\n */\n @Event() itemClick: EventEmitter<string>;\n\n /**\n * @internal\n * @param event\n */\n @Method()\n async onItemClick(event?: CustomEvent<HTMLIxDropdownItemElement>) {\n event?.preventDefault();\n event?.stopPropagation();\n\n this.itemClick.emit(this.value);\n }\n\n componentDidRender() {\n if (!this.value) {\n throw Error('ix-select-item must have a `value` property');\n }\n }\n\n @Watch('label')\n labelChange(newValue: string, oldValue: string) {\n this.hostElement.dispatchEvent(\n new IxSelectItemLabelChangeEvent({\n newValue: newValue,\n oldValue: oldValue,\n })\n );\n }\n\n render() {\n return (\n <Host>\n <ix-dropdown-item\n class={{\n 'select-item-checked': this.selected,\n }}\n checked={this.selected}\n label={this.label ? this.label : this.value}\n onItemClick={(e) => this.onItemClick(e)}\n ></ix-dropdown-item>\n </Host>\n );\n }\n}\n"],"version":3}
|