@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,87 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { a as anime } from './anime.es.js';
|
|
3
|
+
import { d as defineCustomElement$3 } from './icon-button.js';
|
|
4
|
+
import { d as defineCustomElement$2 } from './spinner.js';
|
|
5
|
+
|
|
6
|
+
const messageBarCss = ":host{}: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 .message-container{display:flex;flex-direction:row;align-items:flex-start;flex-wrap:nowrap;justify-content:space-between;min-height:3.375rem;margin:0.5rem 0.5rem 0rem 0.5rem;padding:calc(0.75rem - var(--theme-message-bar--border-thickness)) 0.75rem calc(0.75rem - var(--theme-message-bar--border-thickness)) 1rem;border-radius:var(--theme-message-bar--border-radius);background-color:var(--theme-messagebar--background)}:host .danger{border:solid var(--theme-message-bar--border-thickness) var(--theme-color-alarm)}:host .warning{border:solid var(--theme-message-bar--border-thickness) var(--theme-color-warning)}:host .info{border:solid var(--theme-message-bar--border-thickness) var(--theme-color-info)}:host .message-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1;align-self:center;min-height:1.25rem;padding:0 1rem;font-weight:bold;white-space:normal}:host ix-icon{margin-top:0.25rem}";
|
|
7
|
+
|
|
8
|
+
const MessageBar = /*@__PURE__*/ proxyCustomElement(class MessageBar extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.closedChange = createEvent(this, "closedChange", 7);
|
|
14
|
+
this.type = 'info';
|
|
15
|
+
this.dismissible = true;
|
|
16
|
+
this.icon = undefined;
|
|
17
|
+
this.color = undefined;
|
|
18
|
+
}
|
|
19
|
+
componentWillRender() {
|
|
20
|
+
if (this.type === 'danger') {
|
|
21
|
+
this.icon = 'error';
|
|
22
|
+
this.color = 'color-alarm';
|
|
23
|
+
}
|
|
24
|
+
if (this.type === 'info') {
|
|
25
|
+
this.icon = 'info';
|
|
26
|
+
this.color = 'color-info';
|
|
27
|
+
}
|
|
28
|
+
if (this.type === 'warning') {
|
|
29
|
+
this.icon = 'warning';
|
|
30
|
+
this.color = 'color-warning';
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
closeAlert(el) {
|
|
34
|
+
anime({
|
|
35
|
+
targets: el,
|
|
36
|
+
duration: MessageBar.duration,
|
|
37
|
+
opacity: [1, 0],
|
|
38
|
+
easing: 'easeOutSine',
|
|
39
|
+
complete: () => {
|
|
40
|
+
el.classList.add('d-none');
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
this.closedChange.emit();
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
return (h(Host, null, h("div", { class: { 'message-container': true, [this.type]: true }, role: "alert", ref: (el) => (this.divElement = el) }, h("ix-icon", { color: this.color, name: this.icon }), h("div", { class: "message-content" }, h("slot", null)), this.dismissible ? (h("ix-icon-button", { icon: 'close', size: "24", ghost: true, onClick: () => {
|
|
47
|
+
this.closeAlert(this.divElement);
|
|
48
|
+
}, "data-testid": "close-btn" })) : (''))));
|
|
49
|
+
}
|
|
50
|
+
static get style() { return messageBarCss; }
|
|
51
|
+
}, [1, "ix-message-bar", {
|
|
52
|
+
"type": [1],
|
|
53
|
+
"dismissible": [4],
|
|
54
|
+
"icon": [32],
|
|
55
|
+
"color": [32]
|
|
56
|
+
}]);
|
|
57
|
+
MessageBar.duration = 300;
|
|
58
|
+
function defineCustomElement$1() {
|
|
59
|
+
if (typeof customElements === "undefined") {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const components = ["ix-message-bar", "ix-icon-button", "ix-spinner"];
|
|
63
|
+
components.forEach(tagName => { switch (tagName) {
|
|
64
|
+
case "ix-message-bar":
|
|
65
|
+
if (!customElements.get(tagName)) {
|
|
66
|
+
customElements.define(tagName, MessageBar);
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
case "ix-icon-button":
|
|
70
|
+
if (!customElements.get(tagName)) {
|
|
71
|
+
defineCustomElement$3();
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
case "ix-spinner":
|
|
75
|
+
if (!customElements.get(tagName)) {
|
|
76
|
+
defineCustomElement$2();
|
|
77
|
+
}
|
|
78
|
+
break;
|
|
79
|
+
} });
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const IxMessageBar = MessageBar;
|
|
83
|
+
const defineCustomElement = defineCustomElement$1;
|
|
84
|
+
|
|
85
|
+
export { IxMessageBar, defineCustomElement };
|
|
86
|
+
|
|
87
|
+
//# sourceMappingURL=ix-message-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-message-bar.js","mappings":";;;;;AAAA,MAAM,aAAa,GAAG,kgDAAkgD;;MC0B3gD,UAAU;;;;;;gBAIyB,MAAM;uBAK9B,IAAI;;;;EAe1B,mBAAmB;IACjB,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;MAC1B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC;MACpB,IAAI,CAAC,KAAK,GAAG,aAAa,CAAC;KAC5B;IAED,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE;MACxB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;MACnB,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC;KAC3B;IAED,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE;MAC3B,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;MACtB,IAAI,CAAC,KAAK,GAAG,eAAe,CAAC;KAC9B;GACF;EAEO,UAAU,CAAC,EAAe;IAChC,KAAK,CAAC;MACJ,OAAO,EAAE,EAAE;MACX,QAAQ,EAAE,UAAU,CAAC,QAAQ;MAC7B,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;MACf,MAAM,EAAE,aAAa;MACrB,QAAQ,EAAE;QACR,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;OAC5B;KACF,CAAC,CAAC;IACH,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;GAC1B;EAED,MAAM;IACJ,QACE,EAAC,IAAI,QACH,WACE,KAAK,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,EACvD,IAAI,EAAC,OAAO,EACZ,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,UAAU,GAAG,EAAiB,CAAC,IAElD,eAAS,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAY,EACvD,WAAK,KAAK,EAAC,iBAAiB,IAC1B,eAAa,CACT,EACL,IAAI,CAAC,WAAW,IACf,sBACE,IAAI,EAAE,OAAO,EACb,IAAI,EAAC,IAAI,EACT,KAAK,EAAE,IAAI,EACX,OAAO,EAAE;QACP,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;OAClC,iBACW,WAAW,GACP,KAElB,EAAE,CACH,CACG,CACD,EACP;GACH;;;;;;;;AA9DuB,mBAAQ,GAAG,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/message-bar/message-bar.scss?tag=ix-message-bar&encapsulation=shadow","./src/components/message-bar/message-bar.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/text-truncation';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n\n .message-container {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n flex-wrap: nowrap;\n justify-content: space-between;\n min-height: 3.375rem;\n margin: $small-space $small-space 0rem $small-space;\n padding: calc(#{$medium-space} - var(--theme-message-bar--border-thickness))\n $medium-space\n calc(#{$medium-space} - var(--theme-message-bar--border-thickness))\n $default-space;\n border-radius: var(--theme-message-bar--border-radius);\n background-color: var(--theme-messagebar--background);\n }\n\n .danger {\n border: solid var(--theme-message-bar--border-thickness)\n var(--theme-color-alarm);\n }\n\n .warning {\n border: solid var(--theme-message-bar--border-thickness)\n var(--theme-color-warning);\n }\n\n .info {\n border: solid var(--theme-message-bar--border-thickness)\n var(--theme-color-info);\n }\n\n .message-content {\n @include ellipsis;\n flex-grow: 1;\n align-self: center;\n min-height: 1.25rem;\n padding: 0 $default-space;\n font-weight: bold;\n white-space: normal;\n }\n\n ix-icon {\n margin-top: $tiny-space;\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 Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\nimport anime from 'animejs';\nimport { NotificationColor } from '../utils/notification-color';\n\n@Component({\n tag: 'ix-message-bar',\n styleUrl: 'message-bar.scss',\n shadow: true,\n})\nexport class MessageBar {\n /**\n * Specifies the type of the alert.\n */\n @Prop() type: 'danger' | 'warning' | 'info' = 'info';\n\n /**\n * If true, close button is enabled and alert can be dismissed by the user\n */\n @Prop() dismissible = true;\n\n /**\n * An event emitted when the close button is clicked\n */\n @Event() closedChange: EventEmitter;\n\n @State() icon: 'error' | 'warning' | 'info';\n\n @State() color: NotificationColor;\n\n private static readonly duration = 300;\n\n private divElement?: HTMLElement;\n\n componentWillRender() {\n if (this.type === 'danger') {\n this.icon = 'error';\n this.color = 'color-alarm';\n }\n\n if (this.type === 'info') {\n this.icon = 'info';\n this.color = 'color-info';\n }\n\n if (this.type === 'warning') {\n this.icon = 'warning';\n this.color = 'color-warning';\n }\n }\n\n private closeAlert(el: HTMLElement) {\n anime({\n targets: el,\n duration: MessageBar.duration,\n opacity: [1, 0],\n easing: 'easeOutSine',\n complete: () => {\n el.classList.add('d-none');\n },\n });\n this.closedChange.emit();\n }\n\n render() {\n return (\n <Host>\n <div\n class={{ 'message-container': true, [this.type]: true }}\n role=\"alert\"\n ref={(el) => (this.divElement = el as HTMLElement)}\n >\n <ix-icon color={this.color} name={this.icon}></ix-icon>\n <div class=\"message-content\">\n <slot></slot>\n </div>\n {this.dismissible ? (\n <ix-icon-button\n icon={'close'}\n size=\"24\"\n ghost={true}\n onClick={() => {\n this.closeAlert(this.divElement);\n }}\n data-testid=\"close-btn\"\n ></ix-icon-button>\n ) : (\n ''\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxModalContent extends Components.IxModalContent, HTMLElement {}
|
|
4
|
+
export const IxModalContent: {
|
|
5
|
+
prototype: IxModalContent;
|
|
6
|
+
new (): IxModalContent;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const modalContentCss = ":host{display:block;position:relative;overflow:auto;padding:0.125rem 0.625rem 0.125rem 0.625rem}: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}";
|
|
4
|
+
|
|
5
|
+
const ModalContent = /*@__PURE__*/ proxyCustomElement(class ModalContent extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (h(Host, null, h("slot", null)));
|
|
13
|
+
}
|
|
14
|
+
static get style() { return modalContentCss; }
|
|
15
|
+
}, [1, "ix-modal-content"]);
|
|
16
|
+
function defineCustomElement$1() {
|
|
17
|
+
if (typeof customElements === "undefined") {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const components = ["ix-modal-content"];
|
|
21
|
+
components.forEach(tagName => { switch (tagName) {
|
|
22
|
+
case "ix-modal-content":
|
|
23
|
+
if (!customElements.get(tagName)) {
|
|
24
|
+
customElements.define(tagName, ModalContent);
|
|
25
|
+
}
|
|
26
|
+
break;
|
|
27
|
+
} });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const IxModalContent = ModalContent;
|
|
31
|
+
const defineCustomElement = defineCustomElement$1;
|
|
32
|
+
|
|
33
|
+
export { IxModalContent, defineCustomElement };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=ix-modal-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-modal-content.js","mappings":";;AAAA,MAAM,eAAe,GAAG,8rBAA8rB;;MCmBzsB,YAAY;;;;;;EACvB,MAAM;IACJ,QACE,EAAC,IAAI,QACH,eAAa,CACR,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/modal-content/modal-content.scss?tag=ix-modal-content&encapsulation=shadow","./src/components/modal-content/modal-content.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n\n display: block;\n position: relative;\n overflow: auto;\n padding: 0.125rem 0.625rem 0.125rem 0.625rem;\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, h, Host } from '@stencil/core';\n\n/**\n * @since 2.0.0\n */\n@Component({\n tag: 'ix-modal-content',\n styleUrl: 'modal-content.scss',\n shadow: true,\n})\nexport class ModalContent {\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxModalExample extends Components.IxModalExample, HTMLElement {}
|
|
4
|
+
export const IxModalExample: {
|
|
5
|
+
prototype: IxModalExample;
|
|
6
|
+
new (): IxModalExample;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import './animation.js';
|
|
3
|
+
import { d as dismissModal, c as closeModal } from './modal.js';
|
|
4
|
+
import { d as defineCustomElement$4 } from './button.js';
|
|
5
|
+
import { d as defineCustomElement$3 } from './icon-button.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './spinner.js';
|
|
7
|
+
|
|
8
|
+
const ModalExample = /*@__PURE__*/ proxyCustomElement(class ModalExample extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
}
|
|
13
|
+
dismiss() {
|
|
14
|
+
dismissModal(this.host);
|
|
15
|
+
}
|
|
16
|
+
close() {
|
|
17
|
+
closeModal(this.host, 'Done!');
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
return (h(Host, null, h("div", null, h("div", { class: "modal-header" }, "Message headline", h("ix-icon-button", { "data-close-button": true, ghost: true, icon: 'close', onClick: () => this.dismiss() })), h("div", { class: "modal-body" }, "Message text lorem ipsum"), h("div", { class: "modal-footer" }, h("ix-button", { outline: true, onClick: () => this.dismiss() }, "Cancel"), h("ix-button", { onClick: () => this.close() }, "OK")))));
|
|
21
|
+
}
|
|
22
|
+
get host() { return this; }
|
|
23
|
+
}, [0, "ix-modal-example"]);
|
|
24
|
+
function defineCustomElement$1() {
|
|
25
|
+
if (typeof customElements === "undefined") {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const components = ["ix-modal-example", "ix-button", "ix-icon-button", "ix-spinner"];
|
|
29
|
+
components.forEach(tagName => { switch (tagName) {
|
|
30
|
+
case "ix-modal-example":
|
|
31
|
+
if (!customElements.get(tagName)) {
|
|
32
|
+
customElements.define(tagName, ModalExample);
|
|
33
|
+
}
|
|
34
|
+
break;
|
|
35
|
+
case "ix-button":
|
|
36
|
+
if (!customElements.get(tagName)) {
|
|
37
|
+
defineCustomElement$4();
|
|
38
|
+
}
|
|
39
|
+
break;
|
|
40
|
+
case "ix-icon-button":
|
|
41
|
+
if (!customElements.get(tagName)) {
|
|
42
|
+
defineCustomElement$3();
|
|
43
|
+
}
|
|
44
|
+
break;
|
|
45
|
+
case "ix-spinner":
|
|
46
|
+
if (!customElements.get(tagName)) {
|
|
47
|
+
defineCustomElement$2();
|
|
48
|
+
}
|
|
49
|
+
break;
|
|
50
|
+
} });
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const IxModalExample = ModalExample;
|
|
54
|
+
const defineCustomElement = defineCustomElement$1;
|
|
55
|
+
|
|
56
|
+
export { IxModalExample, defineCustomElement };
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=ix-modal-example.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-modal-example.js","mappings":";;;;;;;MAea,YAAY;;;;;EAGf,OAAO;IACb,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;GACzB;EAEO,KAAK;IACX,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;GAChC;EAED,MAAM;IACJ,QACE,EAAC,IAAI,QACH,eACE,WAAK,KAAK,EAAC,cAAc,wBAEvB,iDAEE,KAAK,QACL,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,GACb,CACd,EACN,WAAK,KAAK,EAAC,YAAY,+BAA+B,EACtD,WAAK,KAAK,EAAC,cAAc,IACvB,iBAAW,OAAO,QAAC,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,aAEpC,EACZ,iBAAW,OAAO,EAAE,MAAM,IAAI,CAAC,KAAK,EAAE,SAAgB,CAClD,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/my-component/example-modal.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\nimport { Component, Element, h, Host } from '@stencil/core';\nimport { closeModal, dismissModal } from '../utils/modal';\n\n@Component({\n tag: 'ix-modal-example',\n})\nexport class ModalExample {\n @Element() host!: HTMLIxModalExampleElement;\n\n private dismiss() {\n dismissModal(this.host);\n }\n\n private close() {\n closeModal(this.host, 'Done!');\n }\n\n render() {\n return (\n <Host>\n <div>\n <div class=\"modal-header\">\n Message headline\n <ix-icon-button\n data-close-button\n ghost\n icon={'close'}\n onClick={() => this.dismiss()}\n ></ix-icon-button>\n </div>\n <div class=\"modal-body\">Message text lorem ipsum</div>\n <div class=\"modal-footer\">\n <ix-button outline onClick={() => this.dismiss()}>\n Cancel\n </ix-button>\n <ix-button onClick={() => this.close()}>OK</ix-button>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxModalFooter extends Components.IxModalFooter, HTMLElement {}
|
|
4
|
+
export const IxModalFooter: {
|
|
5
|
+
prototype: IxModalFooter;
|
|
6
|
+
new (): IxModalFooter;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const modalFooterCss = ":host{display:flex;padding:0.625rem;padding-top:1.5rem;justify-content:flex-end;align-items:center;gap:0.5rem;align-self:stretch}: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}";
|
|
4
|
+
|
|
5
|
+
const ModalFooter = /*@__PURE__*/ proxyCustomElement(class ModalFooter extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (h(Host, null, h("slot", null)));
|
|
13
|
+
}
|
|
14
|
+
static get style() { return modalFooterCss; }
|
|
15
|
+
}, [1, "ix-modal-footer"]);
|
|
16
|
+
function defineCustomElement$1() {
|
|
17
|
+
if (typeof customElements === "undefined") {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const components = ["ix-modal-footer"];
|
|
21
|
+
components.forEach(tagName => { switch (tagName) {
|
|
22
|
+
case "ix-modal-footer":
|
|
23
|
+
if (!customElements.get(tagName)) {
|
|
24
|
+
customElements.define(tagName, ModalFooter);
|
|
25
|
+
}
|
|
26
|
+
break;
|
|
27
|
+
} });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const IxModalFooter = ModalFooter;
|
|
31
|
+
const defineCustomElement = defineCustomElement$1;
|
|
32
|
+
|
|
33
|
+
export { IxModalFooter, defineCustomElement };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=ix-modal-footer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-modal-footer.js","mappings":";;AAAA,MAAM,cAAc,GAAG,+tBAA+tB;;MCmBzuB,WAAW;;;;;;EACtB,MAAM;IACJ,QACE,EAAC,IAAI,QACH,eAAa,CACR,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/modal-footer/modal-footer.scss?tag=ix-modal-footer&encapsulation=shadow","./src/components/modal-footer/modal-footer.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n display: flex;\n padding: 0.625rem;\n padding-top: 1.5rem;\n justify-content: flex-end;\n align-items: center;\n gap: 0.5rem;\n align-self: stretch;\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, h, Host } from '@stencil/core';\n\n/**\n * @since 2.0.0\n */\n@Component({\n tag: 'ix-modal-footer',\n styleUrl: 'modal-footer.scss',\n shadow: true,\n})\nexport class ModalFooter {\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxModalHeader extends Components.IxModalHeader, HTMLElement {}
|
|
4
|
+
export const IxModalHeader: {
|
|
5
|
+
prototype: IxModalHeader;
|
|
6
|
+
new (): IxModalHeader;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$4 } from './icon-button.js';
|
|
3
|
+
import { d as defineCustomElement$3 } from './spinner.js';
|
|
4
|
+
import { d as defineCustomElement$2 } from './typography.js';
|
|
5
|
+
|
|
6
|
+
const modalHeaderCss = ":host{display:flex;padding:2px 16px 16px 10px;align-items:center;align-self:stretch}: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 .modal-close{margin-left:auto;margin-right:-20px}:host .modal-icon{margin-right:1rem}";
|
|
7
|
+
|
|
8
|
+
const ModalHeader = /*@__PURE__*/ proxyCustomElement(class ModalHeader extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.closeClick = createEvent(this, "closeClick", 7);
|
|
14
|
+
this.hideClose = false;
|
|
15
|
+
this.icon = undefined;
|
|
16
|
+
this.iconColor = undefined;
|
|
17
|
+
}
|
|
18
|
+
onIconChange(icon) {
|
|
19
|
+
if (icon) {
|
|
20
|
+
this.parentDialog.classList.add('with-icon');
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
this.parentDialog.classList.remove('with-icon');
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
componentDidLoad() {
|
|
27
|
+
this.parentDialog = this.hostElement.closest('ix-modal');
|
|
28
|
+
this.onIconChange(this.icon);
|
|
29
|
+
}
|
|
30
|
+
onCloseClick(event) {
|
|
31
|
+
const ce = this.closeClick.emit(event);
|
|
32
|
+
if (ce.defaultPrevented || event.defaultPrevented) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
this.parentDialog.dismissModal();
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
return (h(Host, null, this.icon ? (h("ix-icon", { class: 'modal-icon', name: this.icon, color: this.iconColor })) : null, h("ix-typography", { variant: 'default-title' }, h("slot", null)), !this.hideClose ? (h("ix-icon-button", { onClick: (event) => this.onCloseClick(event), ghost: true, icon: "close", class: 'modal-close' })) : null));
|
|
39
|
+
}
|
|
40
|
+
get hostElement() { return this; }
|
|
41
|
+
static get watchers() { return {
|
|
42
|
+
"icon": ["onIconChange"]
|
|
43
|
+
}; }
|
|
44
|
+
static get style() { return modalHeaderCss; }
|
|
45
|
+
}, [1, "ix-modal-header", {
|
|
46
|
+
"hideClose": [4, "hide-close"],
|
|
47
|
+
"icon": [1],
|
|
48
|
+
"iconColor": [1, "icon-color"]
|
|
49
|
+
}]);
|
|
50
|
+
function defineCustomElement$1() {
|
|
51
|
+
if (typeof customElements === "undefined") {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const components = ["ix-modal-header", "ix-icon-button", "ix-spinner", "ix-typography"];
|
|
55
|
+
components.forEach(tagName => { switch (tagName) {
|
|
56
|
+
case "ix-modal-header":
|
|
57
|
+
if (!customElements.get(tagName)) {
|
|
58
|
+
customElements.define(tagName, ModalHeader);
|
|
59
|
+
}
|
|
60
|
+
break;
|
|
61
|
+
case "ix-icon-button":
|
|
62
|
+
if (!customElements.get(tagName)) {
|
|
63
|
+
defineCustomElement$4();
|
|
64
|
+
}
|
|
65
|
+
break;
|
|
66
|
+
case "ix-spinner":
|
|
67
|
+
if (!customElements.get(tagName)) {
|
|
68
|
+
defineCustomElement$3();
|
|
69
|
+
}
|
|
70
|
+
break;
|
|
71
|
+
case "ix-typography":
|
|
72
|
+
if (!customElements.get(tagName)) {
|
|
73
|
+
defineCustomElement$2();
|
|
74
|
+
}
|
|
75
|
+
break;
|
|
76
|
+
} });
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const IxModalHeader = ModalHeader;
|
|
80
|
+
const defineCustomElement = defineCustomElement$1;
|
|
81
|
+
|
|
82
|
+
export { IxModalHeader, defineCustomElement };
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=ix-modal-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-modal-header.js","mappings":";;;;;AAAA,MAAM,cAAc,GAAG,6wBAA6wB;;MC4BvxB,WAAW;;;;;;qBAMF,KAAK;;;;EAOzB,YAAY,CAAC,IAAY;IACvB,IAAI,IAAI,EAAE;MACR,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;KAC9C;SAAM;MACL,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;KACjD;GACF;EAcD,gBAAgB;IACd,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACzD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;GAC9B;EAEO,YAAY,CAAC,KAAiB;IACpC,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,IAAI,EAAE,CAAC,gBAAgB,IAAI,KAAK,CAAC,gBAAgB,EAAE;MACjD,OAAO;KACR;IAED,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;GAClC;EAED,MAAM;IACJ,QACE,EAAC,IAAI,QACF,IAAI,CAAC,IAAI,IACR,eACE,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,SAAS,GACZ,IACT,IAAI,EACR,qBAAe,OAAO,EAAE,eAAe,IACrC,eAAa,CACC,EACf,CAAC,IAAI,CAAC,SAAS,IACd,sBACE,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAC5C,KAAK,QACL,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,aAAa,GACJ,IAChB,IAAI,CACH,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/modal-header/modal-header.scss?tag=ix-modal-header&encapsulation=shadow","./src/components/modal-header/modal-header.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n display: flex;\n padding: 2px 16px 16px 10px;\n align-items: center;\n align-self: stretch;\n\n .modal-close {\n margin-left: auto;\n margin-right: -20px;\n }\n\n .modal-icon {\n margin-right: 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 Prop,\n Watch,\n} from '@stencil/core';\n\n/**\n * @since 2.0.0\n */\n@Component({\n tag: 'ix-modal-header',\n styleUrl: 'modal-header.scss',\n shadow: true,\n})\nexport class ModalHeader {\n @Element() hostElement!: HTMLIxModalHeaderElement;\n\n /**\n * Hide the close button\n */\n @Prop() hideClose = false;\n\n /**\n * Icon of the Header\n */\n @Prop() icon: string;\n @Watch('icon')\n onIconChange(icon: string) {\n if (icon) {\n this.parentDialog.classList.add('with-icon');\n } else {\n this.parentDialog.classList.remove('with-icon');\n }\n }\n\n /**\n * Icon color\n */\n @Prop() iconColor: string;\n\n /**\n * Close icon is clicked\n */\n @Event() closeClick: EventEmitter<MouseEvent>;\n\n private parentDialog: HTMLIxModalElement;\n\n componentDidLoad() {\n this.parentDialog = this.hostElement.closest('ix-modal');\n this.onIconChange(this.icon);\n }\n\n private onCloseClick(event: MouseEvent) {\n const ce = this.closeClick.emit(event);\n if (ce.defaultPrevented || event.defaultPrevented) {\n return;\n }\n\n this.parentDialog.dismissModal();\n }\n\n render() {\n return (\n <Host>\n {this.icon ? (\n <ix-icon\n class={'modal-icon'}\n name={this.icon}\n color={this.iconColor}\n ></ix-icon>\n ) : null}\n <ix-typography variant={'default-title'}>\n <slot></slot>\n </ix-typography>\n {!this.hideClose ? (\n <ix-icon-button\n onClick={(event) => this.onCloseClick(event)}\n ghost\n icon=\"close\"\n class={'modal-close'}\n ></ix-icon-button>\n ) : null}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxModalLoading extends Components.IxModalLoading, HTMLElement {}
|
|
4
|
+
export const IxModalLoading: {
|
|
5
|
+
prototype: IxModalLoading;
|
|
6
|
+
new (): IxModalLoading;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './spinner.js';
|
|
3
|
+
|
|
4
|
+
const modalLoadingCss = ":host{display:flex;justify-content:flex-start;align-items:center;gap:0.5rem;overflow:hidden}:host .loading-text{display:block;position:relative;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}";
|
|
5
|
+
|
|
6
|
+
const ModalLoading = /*@__PURE__*/ proxyCustomElement(class ModalLoading extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return (h(Host, null, h("ix-spinner", { variant: "primary" }), h("span", { class: 'loading-text' }, h("slot", null))));
|
|
14
|
+
}
|
|
15
|
+
static get style() { return modalLoadingCss; }
|
|
16
|
+
}, [1, "ix-modal-loading"]);
|
|
17
|
+
function defineCustomElement$1() {
|
|
18
|
+
if (typeof customElements === "undefined") {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const components = ["ix-modal-loading", "ix-spinner"];
|
|
22
|
+
components.forEach(tagName => { switch (tagName) {
|
|
23
|
+
case "ix-modal-loading":
|
|
24
|
+
if (!customElements.get(tagName)) {
|
|
25
|
+
customElements.define(tagName, ModalLoading);
|
|
26
|
+
}
|
|
27
|
+
break;
|
|
28
|
+
case "ix-spinner":
|
|
29
|
+
if (!customElements.get(tagName)) {
|
|
30
|
+
defineCustomElement$2();
|
|
31
|
+
}
|
|
32
|
+
break;
|
|
33
|
+
} });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const IxModalLoading = ModalLoading;
|
|
37
|
+
const defineCustomElement = defineCustomElement$1;
|
|
38
|
+
|
|
39
|
+
export { IxModalLoading, defineCustomElement };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=ix-modal-loading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-modal-loading.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,4MAA4M;;MCmBvN,YAAY;;;;;;EACvB,MAAM;IACJ,QACE,EAAC,IAAI,QACH,kBAAY,OAAO,EAAC,SAAS,GAAc,EAC3C,YAAM,KAAK,EAAE,cAAc,IACzB,eAAa,CACR,CACF,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/modal-loading/modal-loading.scss?tag=ix-modal-loading&encapsulation=shadow","./src/components/modal-loading/modal-loading.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n:host {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n gap: 0.5rem;\n overflow: hidden;\n\n .loading-text {\n display: block;\n position: relative;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, h, Host } from '@stencil/core';\n\n/**\n * @internal\n */\n@Component({\n tag: 'ix-modal-loading',\n styleUrl: 'modal-loading.scss',\n shadow: true,\n})\nexport class ModalLoading {\n render() {\n return (\n <Host>\n <ix-spinner variant=\"primary\"></ix-spinner>\n <span class={'loading-text'}>\n <slot></slot>\n </span>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxModal extends Components.IxModal, HTMLElement {}
|
|
4
|
+
export const IxModal: {
|
|
5
|
+
prototype: IxModal;
|
|
6
|
+
new (): IxModal;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { a as anime } from './anime.es.js';
|
|
3
|
+
import { b as a11yHostAttributes, a as a11yBoolean } from './a11y.js';
|
|
4
|
+
import { A as Animation } from './animation.js';
|
|
5
|
+
|
|
6
|
+
const modalCss = "::backdrop{--ix-dialog-backdrop:var(--theme-color-lightbox, #0000008c)}:focus-visible{outline:none !important}:host dialog{margin:0;left:50%}:host dialog::backdrop{-webkit-backdrop-filter:blur(2.7182817459px);backdrop-filter:blur(2.7182817459px)}:host .modal{display:flex;flex-direction:column;position:relative;border:none;border-radius:var(--theme-default-border-radius);background:var(--theme-modal--background);box-shadow:var(--theme-shadow-4);color:var(--theme-color-std-text);overflow:visible;max-height:80vh;pointer-events:all}:host .modal-size-360{width:22.5rem}:host .modal-size-480{width:30rem}:host .modal-size-600{width:37.5rem}:host .modal-size-720{width:45rem}:host .modal-size-840{width:52.5rem}:host .modal-size-full-width{width:95%}:host .modal-size-full-screen{left:0px !important;top:0px !important;transform:none !important;width:calc(100% - 28px);min-width:calc(100% - 28px);max-width:calc(100% - 28px);height:calc(100% - 28px);min-height:calc(100% - 28px);max-height:calc(100% - 28px)}:host .dialog-backdrop{display:block;position:fixed;width:100vw;height:100vh;top:0px;left:0px;pointer-events:none}:host ::slotted(ix-modal-footer){margin-top:auto}:host(.align-center) dialog{margin:0;left:50%;top:50%}:host(.no-backdrop) dialog::backdrop{background-color:transparent !important;-webkit-backdrop-filter:none !important;backdrop-filter:none !important}:host(.with-icon) ::slotted(ix-modal-footer),:host(.with-icon) ::slotted(ix-modal-content){margin-left:2.5rem}";
|
|
7
|
+
|
|
8
|
+
const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.dialogClose = createEvent(this, "dialogClose", 7);
|
|
14
|
+
this.dialogDismiss = createEvent(this, "dialogDismiss", 7);
|
|
15
|
+
this.ariaAttributes = {};
|
|
16
|
+
this.size = '360';
|
|
17
|
+
this.animation = true;
|
|
18
|
+
this.backdrop = true;
|
|
19
|
+
this.closeOnBackdropClick = false;
|
|
20
|
+
this.beforeDismiss = undefined;
|
|
21
|
+
this.centered = false;
|
|
22
|
+
this.keyboard = true;
|
|
23
|
+
}
|
|
24
|
+
get dialog() {
|
|
25
|
+
return this.hostElement.shadowRoot.querySelector('dialog');
|
|
26
|
+
}
|
|
27
|
+
slideInModal() {
|
|
28
|
+
const duration = this.animation ? Animation.mediumTime : 0;
|
|
29
|
+
let transformY = this.centered ? '-50' : 40;
|
|
30
|
+
anime({
|
|
31
|
+
targets: this.dialog,
|
|
32
|
+
duration,
|
|
33
|
+
opacity: [0, 1],
|
|
34
|
+
translateY: [0, transformY],
|
|
35
|
+
translateX: ['-50%', '-50%'],
|
|
36
|
+
easing: 'easeOutSine',
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
slideOutModal(completeCallback) {
|
|
40
|
+
const duration = this.animation ? Animation.mediumTime : 0;
|
|
41
|
+
let transformY = this.centered ? '-50' : 40;
|
|
42
|
+
anime({
|
|
43
|
+
targets: this.dialog,
|
|
44
|
+
duration,
|
|
45
|
+
opacity: [1, 0],
|
|
46
|
+
translateY: [transformY, 0],
|
|
47
|
+
translateX: ['-50%', '-50%'],
|
|
48
|
+
easing: 'easeInSine',
|
|
49
|
+
complete: () => {
|
|
50
|
+
if (completeCallback) {
|
|
51
|
+
completeCallback();
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
onModalClick(event) {
|
|
57
|
+
const rect = this.dialog.getBoundingClientRect();
|
|
58
|
+
const isClickOutside = rect.top <= event.clientY &&
|
|
59
|
+
event.clientY <= rect.top + rect.height &&
|
|
60
|
+
rect.left <= event.clientX &&
|
|
61
|
+
event.clientX <= rect.left + rect.width;
|
|
62
|
+
if (!isClickOutside && this.closeOnBackdropClick) {
|
|
63
|
+
this.dismissModal();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Show the dialog
|
|
68
|
+
*/
|
|
69
|
+
async showModal() {
|
|
70
|
+
var _a;
|
|
71
|
+
(_a = this.dialog) === null || _a === void 0 ? void 0 : _a.showModal();
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Dismiss the dialog
|
|
75
|
+
*/
|
|
76
|
+
async dismissModal(reason) {
|
|
77
|
+
let allowDismiss = true;
|
|
78
|
+
if (this.beforeDismiss !== undefined) {
|
|
79
|
+
allowDismiss = await this.beforeDismiss(reason);
|
|
80
|
+
}
|
|
81
|
+
if (!allowDismiss) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
this.slideOutModal(() => {
|
|
85
|
+
this.dialog.close(JSON.stringify({
|
|
86
|
+
type: 'dismiss',
|
|
87
|
+
reason,
|
|
88
|
+
}, null, 2));
|
|
89
|
+
this.dialogDismiss.emit(reason);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Close the dialog
|
|
94
|
+
*/
|
|
95
|
+
async closeModal(reason) {
|
|
96
|
+
this.slideOutModal(() => {
|
|
97
|
+
this.dialog.close(JSON.stringify({
|
|
98
|
+
type: 'close',
|
|
99
|
+
reason,
|
|
100
|
+
}, null, 2));
|
|
101
|
+
this.dialogClose.emit(reason);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
componentDidLoad() {
|
|
105
|
+
this.slideInModal();
|
|
106
|
+
}
|
|
107
|
+
componentWillLoad() {
|
|
108
|
+
this.ariaAttributes = a11yHostAttributes(this.hostElement);
|
|
109
|
+
}
|
|
110
|
+
render() {
|
|
111
|
+
return (h(Host, { class: {
|
|
112
|
+
'no-backdrop': this.backdrop === false,
|
|
113
|
+
'align-center': this.centered,
|
|
114
|
+
} }, h("div", { class: "dialog-backdrop" }, h("dialog", { "aria-modal": a11yBoolean(true), "aria-describedby": this.ariaAttributes['aria-describedby'], "aria-labelledby": this.ariaAttributes['aria-labelledby'], class: `modal modal-size-${this.size}`, onKeyDown: (e) => {
|
|
115
|
+
if (e.key === 'Escape' && this.keyboard === false) {
|
|
116
|
+
e.preventDefault();
|
|
117
|
+
}
|
|
118
|
+
}, onClick: (event) => this.onModalClick(event), onCancel: (e) => {
|
|
119
|
+
e.preventDefault();
|
|
120
|
+
this.dismissModal();
|
|
121
|
+
} }, h("slot", null)))));
|
|
122
|
+
}
|
|
123
|
+
get hostElement() { return this; }
|
|
124
|
+
static get style() { return modalCss; }
|
|
125
|
+
}, [1, "ix-modal", {
|
|
126
|
+
"size": [1],
|
|
127
|
+
"animation": [4],
|
|
128
|
+
"backdrop": [4],
|
|
129
|
+
"closeOnBackdropClick": [4, "close-on-backdrop-click"],
|
|
130
|
+
"beforeDismiss": [16],
|
|
131
|
+
"centered": [4],
|
|
132
|
+
"keyboard": [4],
|
|
133
|
+
"showModal": [64],
|
|
134
|
+
"dismissModal": [64],
|
|
135
|
+
"closeModal": [64]
|
|
136
|
+
}]);
|
|
137
|
+
function defineCustomElement$1() {
|
|
138
|
+
if (typeof customElements === "undefined") {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
const components = ["ix-modal"];
|
|
142
|
+
components.forEach(tagName => { switch (tagName) {
|
|
143
|
+
case "ix-modal":
|
|
144
|
+
if (!customElements.get(tagName)) {
|
|
145
|
+
customElements.define(tagName, Modal);
|
|
146
|
+
}
|
|
147
|
+
break;
|
|
148
|
+
} });
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const IxModal = Modal;
|
|
152
|
+
const defineCustomElement = defineCustomElement$1;
|
|
153
|
+
|
|
154
|
+
export { IxModal, defineCustomElement };
|
|
155
|
+
|
|
156
|
+
//# sourceMappingURL=ix-modal.js.map
|