@siemens/ix 0.0.0-pr-1974-20250627114851 → 0.0.0-pr-1974-20250627142646
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/custom-elements.d.ts +11 -0
- package/components/index.d.ts +33 -0
- package/components/index.js +122 -0
- package/components/index.js.map +1 -0
- package/components/ix-action-card.d.ts +11 -0
- package/components/ix-action-card.js +72 -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 +9 -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 +64 -0
- package/components/ix-application-sidebar.js.map +1 -0
- package/components/ix-application-switch-modal.d.ts +11 -0
- package/components/ix-application-switch-modal.js +106 -0
- package/components/ix-application-switch-modal.js.map +1 -0
- package/components/ix-application.d.ts +11 -0
- package/components/ix-application.js +148 -0
- package/components/ix-application.js.map +1 -0
- package/components/ix-avatar.d.ts +11 -0
- package/components/ix-avatar.js +9 -0
- package/components/ix-avatar.js.map +1 -0
- package/components/ix-basic-navigation.d.ts +11 -0
- package/components/ix-basic-navigation.js +154 -0
- package/components/ix-basic-navigation.js.map +1 -0
- package/components/ix-blind.d.ts +11 -0
- package/components/ix-blind.js +130 -0
- package/components/ix-blind.js.map +1 -0
- package/components/ix-breadcrumb-item.d.ts +11 -0
- package/components/ix-breadcrumb-item.js +9 -0
- package/components/ix-breadcrumb-item.js.map +1 -0
- package/components/ix-breadcrumb.d.ts +11 -0
- package/components/ix-breadcrumb.js +169 -0
- package/components/ix-breadcrumb.js.map +1 -0
- package/components/ix-button.d.ts +11 -0
- package/components/ix-button.js +9 -0
- package/components/ix-button.js.map +1 -0
- package/components/ix-card-accordion.d.ts +11 -0
- package/components/ix-card-accordion.js +9 -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 +9 -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 +256 -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 +9 -0
- package/components/ix-card-title.js.map +1 -0
- package/components/ix-card.d.ts +11 -0
- package/components/ix-card.js +9 -0
- package/components/ix-card.js.map +1 -0
- package/components/ix-category-filter.d.ts +11 -0
- package/components/ix-category-filter.js +600 -0
- package/components/ix-category-filter.js.map +1 -0
- package/components/ix-checkbox-group.d.ts +11 -0
- package/components/ix-checkbox-group.js +158 -0
- package/components/ix-checkbox-group.js.map +1 -0
- package/components/ix-checkbox.d.ts +11 -0
- package/components/ix-checkbox.js +163 -0
- package/components/ix-checkbox.js.map +1 -0
- package/components/ix-chip.d.ts +11 -0
- package/components/ix-chip.js +154 -0
- package/components/ix-chip.js.map +1 -0
- package/components/ix-col.d.ts +11 -0
- package/components/ix-col.js +9 -0
- package/components/ix-col.js.map +1 -0
- package/components/ix-content-header.d.ts +11 -0
- package/components/ix-content-header.js +73 -0
- package/components/ix-content-header.js.map +1 -0
- package/components/ix-content.d.ts +11 -0
- package/components/ix-content.js +49 -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 +117 -0
- package/components/ix-css-grid.js.map +1 -0
- package/components/ix-custom-field.d.ts +11 -0
- package/components/ix-custom-field.js +112 -0
- package/components/ix-custom-field.js.map +1 -0
- package/components/ix-date-dropdown.d.ts +11 -0
- package/components/ix-date-dropdown.js +368 -0
- package/components/ix-date-dropdown.js.map +1 -0
- package/components/ix-date-input.d.ts +11 -0
- package/components/ix-date-input.js +393 -0
- package/components/ix-date-input.js.map +1 -0
- package/components/ix-date-picker.d.ts +11 -0
- package/components/ix-date-picker.js +9 -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 +9 -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 +204 -0
- package/components/ix-datetime-picker.js.map +1 -0
- package/components/ix-divider.d.ts +11 -0
- package/components/ix-divider.js +9 -0
- package/components/ix-divider.js.map +1 -0
- package/components/ix-drawer.d.ts +11 -0
- package/components/ix-drawer.js +200 -0
- package/components/ix-drawer.js.map +1 -0
- package/components/ix-dropdown-button.d.ts +11 -0
- package/components/ix-dropdown-button.js +106 -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 +9 -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 +36 -0
- package/components/ix-dropdown-quick-actions.js.map +1 -0
- package/components/ix-dropdown.d.ts +11 -0
- package/components/ix-dropdown.js +9 -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 +72 -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 +173 -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 +145 -0
- package/components/ix-expanding-search.js.map +1 -0
- package/components/ix-field-label.d.ts +11 -0
- package/components/ix-field-label.js +9 -0
- package/components/ix-field-label.js.map +1 -0
- package/components/ix-field-wrapper.d.ts +11 -0
- package/components/ix-field-wrapper.js +9 -0
- package/components/ix-field-wrapper.js.map +1 -0
- package/components/ix-filter-chip.d.ts +11 -0
- package/components/ix-filter-chip.js +9 -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 +44 -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 +153 -0
- package/components/ix-flip-tile.js.map +1 -0
- package/components/ix-group-context-menu.d.ts +11 -0
- package/components/ix-group-context-menu.js +9 -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 +9 -0
- package/components/ix-group-item.js.map +1 -0
- package/components/ix-group.d.ts +11 -0
- package/components/ix-group.js +221 -0
- package/components/ix-group.js.map +1 -0
- package/components/ix-helper-text.d.ts +11 -0
- package/components/ix-helper-text.js +95 -0
- package/components/ix-helper-text.js.map +1 -0
- package/components/ix-icon-button.d.ts +11 -0
- package/components/ix-icon-button.js +9 -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 +149 -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 +152 -0
- package/components/ix-input-group.js.map +1 -0
- package/components/ix-input.d.ts +11 -0
- package/components/ix-input.js +248 -0
- package/components/ix-input.js.map +1 -0
- package/components/ix-key-value-list.d.ts +11 -0
- package/components/ix-key-value-list.js +42 -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 +48 -0
- package/components/ix-key-value.js.map +1 -0
- package/components/ix-kpi.d.ts +11 -0
- package/components/ix-kpi.js +74 -0
- package/components/ix-kpi.js.map +1 -0
- package/components/ix-layout-auto.d.ts +11 -0
- package/components/ix-layout-auto.js +113 -0
- package/components/ix-layout-auto.js.map +1 -0
- package/components/ix-layout-grid.d.ts +11 -0
- package/components/ix-layout-grid.js +9 -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 +57 -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 +9 -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 +240 -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 +51 -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 +93 -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 +89 -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 +9 -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 +115 -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 +284 -0
- package/components/ix-menu-category.js.map +1 -0
- package/components/ix-menu-expand-icon.d.ts +11 -0
- package/components/ix-menu-expand-icon.js +9 -0
- package/components/ix-menu-expand-icon.js.map +1 -0
- package/components/ix-menu-item.d.ts +11 -0
- package/components/ix-menu-item.js +9 -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 +51 -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 +9 -0
- package/components/ix-menu-settings.js.map +1 -0
- package/components/ix-menu.d.ts +11 -0
- package/components/ix-menu.js +590 -0
- package/components/ix-menu.js.map +1 -0
- package/components/ix-message-bar.d.ts +11 -0
- package/components/ix-message-bar.js +103 -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 +9 -0
- package/components/ix-modal-content.js.map +1 -0
- package/components/ix-modal-footer.d.ts +11 -0
- package/components/ix-modal-footer.js +36 -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 +9 -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 +42 -0
- package/components/ix-modal-loading.js.map +1 -0
- package/components/ix-modal.d.ts +11 -0
- package/components/ix-modal.js +241 -0
- package/components/ix-modal.js.map +1 -0
- package/components/ix-number-input.d.ts +11 -0
- package/components/ix-number-input.js +241 -0
- package/components/ix-number-input.js.map +1 -0
- package/components/ix-pagination.d.ts +11 -0
- package/components/ix-pagination.js +261 -0
- package/components/ix-pagination.js.map +1 -0
- package/components/ix-pane-layout.d.ts +11 -0
- package/components/ix-pane-layout.js +311 -0
- package/components/ix-pane-layout.js.map +1 -0
- package/components/ix-pane.d.ts +11 -0
- package/components/ix-pane.js +568 -0
- package/components/ix-pane.js.map +1 -0
- package/components/ix-pill.d.ts +11 -0
- package/components/ix-pill.js +127 -0
- package/components/ix-pill.js.map +1 -0
- package/components/ix-progress-indicator.d.ts +11 -0
- package/components/ix-progress-indicator.js +193 -0
- package/components/ix-progress-indicator.js.map +1 -0
- package/components/ix-push-card.d.ts +11 -0
- package/components/ix-push-card.js +82 -0
- package/components/ix-push-card.js.map +1 -0
- package/components/ix-radio-group.d.ts +11 -0
- package/components/ix-radio-group.js +195 -0
- package/components/ix-radio-group.js.map +1 -0
- package/components/ix-radio.d.ts +11 -0
- package/components/ix-radio.js +145 -0
- package/components/ix-radio.js.map +1 -0
- package/components/ix-row.d.ts +11 -0
- package/components/ix-row.js +9 -0
- package/components/ix-row.js.map +1 -0
- package/components/ix-select-item.d.ts +11 -0
- package/components/ix-select-item.js +9 -0
- package/components/ix-select-item.js.map +1 -0
- package/components/ix-select.d.ts +11 -0
- package/components/ix-select.js +9 -0
- package/components/ix-select.js.map +1 -0
- package/components/ix-slider.d.ts +11 -0
- package/components/ix-slider.js +255 -0
- package/components/ix-slider.js.map +1 -0
- package/components/ix-spinner.d.ts +11 -0
- package/components/ix-spinner.js +9 -0
- package/components/ix-spinner.js.map +1 -0
- package/components/ix-split-button.d.ts +11 -0
- package/components/ix-split-button.js +117 -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 +9 -0
- package/components/ix-tab-item.js.map +1 -0
- package/components/ix-tabs.d.ts +11 -0
- package/components/ix-tabs.js +9 -0
- package/components/ix-tabs.js.map +1 -0
- package/components/ix-textarea.d.ts +11 -0
- package/components/ix-textarea.js +192 -0
- package/components/ix-textarea.js.map +1 -0
- package/components/ix-tile.d.ts +11 -0
- package/components/ix-tile.js +63 -0
- package/components/ix-tile.js.map +1 -0
- package/components/ix-time-input.d.ts +11 -0
- package/components/ix-time-input.js +442 -0
- package/components/ix-time-input.js.map +1 -0
- package/components/ix-time-picker.d.ts +11 -0
- package/components/ix-time-picker.js +9 -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 +143 -0
- package/components/ix-toast-container.js.map +1 -0
- package/components/ix-toast.d.ts +11 -0
- package/components/ix-toast.js +9 -0
- package/components/ix-toast.js.map +1 -0
- package/components/ix-toggle-button.d.ts +11 -0
- package/components/ix-toggle-button.js +128 -0
- package/components/ix-toggle-button.js.map +1 -0
- package/components/ix-toggle.d.ts +11 -0
- package/components/ix-toggle.js +188 -0
- package/components/ix-toggle.js.map +1 -0
- package/components/ix-tooltip.d.ts +11 -0
- package/components/ix-tooltip.js +9 -0
- package/components/ix-tooltip.js.map +1 -0
- package/components/ix-tree-item.d.ts +11 -0
- package/components/ix-tree-item.js +9 -0
- package/components/ix-tree-item.js.map +1 -0
- package/components/ix-tree.d.ts +11 -0
- package/components/ix-tree.js +610 -0
- package/components/ix-tree.js.map +1 -0
- package/components/ix-typography.d.ts +11 -0
- package/components/ix-typography.js +9 -0
- package/components/ix-typography.js.map +1 -0
- package/components/ix-upload.d.ts +11 -0
- package/components/ix-upload.js +234 -0
- package/components/ix-upload.js.map +1 -0
- package/components/ix-validation-tooltip.d.ts +11 -0
- package/components/ix-validation-tooltip.js +182 -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 +147 -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 +112 -0
- package/components/ix-workflow-steps.js.map +1 -0
- package/components/p--2LOMK-5.js +105 -0
- package/components/p--2LOMK-5.js.map +1 -0
- package/components/p-5uA5ifmT.js +72 -0
- package/components/p-5uA5ifmT.js.map +1 -0
- package/components/p-9dLpp1OQ.js +71 -0
- package/components/p-9dLpp1OQ.js.map +1 -0
- package/components/p-B1Gzt08S.js +51 -0
- package/components/p-B1Gzt08S.js.map +1 -0
- package/components/p-B3duqvjW.js +33 -0
- package/components/p-B3duqvjW.js.map +1 -0
- package/components/p-B6e7P4xT.js +42 -0
- package/components/p-B6e7P4xT.js.map +1 -0
- package/components/p-BGzrnl_l.js +21 -0
- package/components/p-BGzrnl_l.js.map +1 -0
- package/components/p-BH3f5fa3.js +37 -0
- package/components/p-BH3f5fa3.js.map +1 -0
- package/components/p-BJcX2_-N.js +110 -0
- package/components/p-BJcX2_-N.js.map +1 -0
- package/components/p-BMU8AlMD.js +107 -0
- package/components/p-BMU8AlMD.js.map +1 -0
- package/components/p-BNu7ac9R.js +79 -0
- package/components/p-BNu7ac9R.js.map +1 -0
- package/components/p-BP-8cvOJ.js +90 -0
- package/components/p-BP-8cvOJ.js.map +1 -0
- package/components/p-BQ6999e5.js +22 -0
- package/components/p-BQ6999e5.js.map +1 -0
- package/components/p-BXjBChze.js +130 -0
- package/components/p-BXjBChze.js.map +1 -0
- package/components/p-Bb7pDeaQ.js +144 -0
- package/components/p-Bb7pDeaQ.js.map +1 -0
- package/components/p-BcGAKMQ_.js +76 -0
- package/components/p-BcGAKMQ_.js.map +1 -0
- package/components/p-BdCnOrqW.js +47 -0
- package/components/p-BdCnOrqW.js.map +1 -0
- package/components/p-BedSAVZh.js +90 -0
- package/components/p-BedSAVZh.js.map +1 -0
- package/components/p-BhLbU_vK.js +129 -0
- package/components/p-BhLbU_vK.js.map +1 -0
- package/components/p-Bi1VyG64.js +46 -0
- package/components/p-Bi1VyG64.js.map +1 -0
- package/components/p-BkWbk29R.js +75 -0
- package/components/p-BkWbk29R.js.map +1 -0
- package/components/p-BmmgJGNd.js +64 -0
- package/components/p-BmmgJGNd.js.map +1 -0
- package/components/p-Bu-j8wxy.js +162 -0
- package/components/p-Bu-j8wxy.js.map +1 -0
- package/components/p-BuJ6BWIi.js +2042 -0
- package/components/p-BuJ6BWIi.js.map +1 -0
- package/components/p-Bvsx56zn.js +203 -0
- package/components/p-Bvsx56zn.js.map +1 -0
- package/components/p-BygLxZIM.js +54 -0
- package/components/p-BygLxZIM.js.map +1 -0
- package/components/p-Bzyt4nTL.js +110 -0
- package/components/p-Bzyt4nTL.js.map +1 -0
- package/components/p-C6o-AByw.js +33 -0
- package/components/p-C6o-AByw.js.map +1 -0
- package/components/p-CAqtPJ4-.js +1786 -0
- package/components/p-CAqtPJ4-.js.map +1 -0
- package/components/p-CGwHQeMX.js +54 -0
- package/components/p-CGwHQeMX.js.map +1 -0
- package/components/p-CKkTXQiw.js +164 -0
- package/components/p-CKkTXQiw.js.map +1 -0
- package/components/p-CX81WQtk.js +14 -0
- package/components/p-CX81WQtk.js.map +1 -0
- package/components/p-Cb-eBcUF.js +61 -0
- package/components/p-Cb-eBcUF.js.map +1 -0
- package/components/p-Cp5J1RZq.js +765 -0
- package/components/p-Cp5J1RZq.js.map +1 -0
- package/components/p-Cpxz1Kcs.js +19 -0
- package/components/p-Cpxz1Kcs.js.map +1 -0
- package/components/p-Cs8DEpjh.js +611 -0
- package/components/p-Cs8DEpjh.js.map +1 -0
- package/components/p-Cut5OrRw.js +461 -0
- package/components/p-Cut5OrRw.js.map +1 -0
- package/components/p-CvvOe8xV.js +151 -0
- package/components/p-CvvOe8xV.js.map +1 -0
- package/components/p-CyFFBc_G.js +100 -0
- package/components/p-CyFFBc_G.js.map +1 -0
- package/components/p-D3Aowo70.js +113 -0
- package/components/p-D3Aowo70.js.map +1 -0
- package/components/p-D3K9vmFp.js +157 -0
- package/components/p-D3K9vmFp.js.map +1 -0
- package/components/p-D6vSVaHq.js +26 -0
- package/components/p-D6vSVaHq.js.map +1 -0
- package/components/p-D9LaIICQ.js +118 -0
- package/components/p-D9LaIICQ.js.map +1 -0
- package/components/p-DCx3-1oU.js +310 -0
- package/components/p-DCx3-1oU.js.map +1 -0
- package/components/p-DDHkNPby.js +79 -0
- package/components/p-DDHkNPby.js.map +1 -0
- package/components/p-DJ7U7oUq.js +89 -0
- package/components/p-DJ7U7oUq.js.map +1 -0
- package/components/p-DMlmNp-B.js +33 -0
- package/components/p-DMlmNp-B.js.map +1 -0
- package/components/p-DWO4uklL.js +146 -0
- package/components/p-DWO4uklL.js.map +1 -0
- package/components/p-DaztMgDr.js +757 -0
- package/components/p-DaztMgDr.js.map +1 -0
- package/components/p-DbR-LZrk.js +33 -0
- package/components/p-DbR-LZrk.js.map +1 -0
- package/components/p-DfbCO042.js +207 -0
- package/components/p-DfbCO042.js.map +1 -0
- package/components/p-DkGdSI6e.js +103 -0
- package/components/p-DkGdSI6e.js.map +1 -0
- package/components/p-DojBQCbP.js +55 -0
- package/components/p-DojBQCbP.js.map +1 -0
- package/components/p-Dp15M30K.js +20 -0
- package/components/p-Dp15M30K.js.map +1 -0
- package/components/p-Dp4RJcgZ.js +125 -0
- package/components/p-Dp4RJcgZ.js.map +1 -0
- package/components/p-DyHdZRT0.js +359 -0
- package/components/p-DyHdZRT0.js.map +1 -0
- package/components/p-DyMgW0fR.js +65 -0
- package/components/p-DyMgW0fR.js.map +1 -0
- package/components/p-G0biE2Kx.js +33 -0
- package/components/p-G0biE2Kx.js.map +1 -0
- package/components/p-JJddxCCh.js +42 -0
- package/components/p-JJddxCCh.js.map +1 -0
- package/components/p-Ooq8eqJM.js +33 -0
- package/components/p-Ooq8eqJM.js.map +1 -0
- package/components/p-Ou74PMQs.js +1313 -0
- package/components/p-Ou74PMQs.js.map +1 -0
- package/components/p-PxA_udyJ.js +254 -0
- package/components/p-PxA_udyJ.js.map +1 -0
- package/components/p-TNoCM8Wi.js +83 -0
- package/components/p-TNoCM8Wi.js.map +1 -0
- package/components/p-UQa1aROL.js +23 -0
- package/components/p-UQa1aROL.js.map +1 -0
- package/components/p-bDicGJUN.js +7697 -0
- package/components/p-bDicGJUN.js.map +1 -0
- package/components/p-bcj7UEIC.js +24 -0
- package/components/p-bcj7UEIC.js.map +1 -0
- package/components/p-kY0vP3rC.js +122 -0
- package/components/p-kY0vP3rC.js.map +1 -0
- package/components/p-qauH9Ci4.js +54 -0
- package/components/p-qauH9Ci4.js.map +1 -0
- package/components/p-r63hglsv.js +90 -0
- package/components/p-r63hglsv.js.map +1 -0
- package/components/p-tH4n038Z.js +48 -0
- package/components/p-tH4n038Z.js.map +1 -0
- package/components/package.json +9 -0
- package/package.json +3 -2
- package/dist/collection/components/application-header/test/application-header.ct.js +0 -389
- package/dist/collection/components/application-header/test/application-header.ct.js.map +0 -1
- package/dist/collection/components/avatar/test/avatar.ct.js +0 -85
- package/dist/collection/components/avatar/test/avatar.ct.js.map +0 -1
- package/dist/collection/components/blind/test/blind.ct.js +0 -16
- package/dist/collection/components/blind/test/blind.ct.js.map +0 -1
- package/dist/collection/components/breadcrumb/test/breadcrumb.ct.js +0 -98
- package/dist/collection/components/breadcrumb/test/breadcrumb.ct.js.map +0 -1
- package/dist/collection/components/button/test/button.ct.js +0 -153
- package/dist/collection/components/button/test/button.ct.js.map +0 -1
- package/dist/collection/components/category-filter/test/category-filter.ct.js +0 -62
- package/dist/collection/components/category-filter/test/category-filter.ct.js.map +0 -1
- package/dist/collection/components/checkbox/tests/checkbox.ct.js +0 -86
- package/dist/collection/components/checkbox/tests/checkbox.ct.js.map +0 -1
- package/dist/collection/components/checkbox-group/test/checkbox-group.ct.js +0 -48
- package/dist/collection/components/checkbox-group/test/checkbox-group.ct.js.map +0 -1
- package/dist/collection/components/chip/test/chip.ct.js +0 -76
- package/dist/collection/components/chip/test/chip.ct.js.map +0 -1
- package/dist/collection/components/custom-field/tests/custom-field.ct.js +0 -68
- package/dist/collection/components/custom-field/tests/custom-field.ct.js.map +0 -1
- package/dist/collection/components/date-dropdown/test/date-dropdown.ct.js +0 -215
- package/dist/collection/components/date-dropdown/test/date-dropdown.ct.js.map +0 -1
- package/dist/collection/components/date-input/tests/date-input.ct.js +0 -117
- package/dist/collection/components/date-input/tests/date-input.ct.js.map +0 -1
- package/dist/collection/components/date-picker/test/date-picker.ct.js +0 -221
- package/dist/collection/components/date-picker/test/date-picker.ct.js.map +0 -1
- package/dist/collection/components/datetime-picker/test/datetime-picker.ct.js +0 -55
- package/dist/collection/components/datetime-picker/test/datetime-picker.ct.js.map +0 -1
- package/dist/collection/components/drawer/test/drawer.ct.js +0 -67
- package/dist/collection/components/drawer/test/drawer.ct.js.map +0 -1
- package/dist/collection/components/dropdown/test/dropdown.ct.js +0 -624
- package/dist/collection/components/dropdown/test/dropdown.ct.js.map +0 -1
- package/dist/collection/components/dropdown-button/dropdown-button.ct.js +0 -51
- package/dist/collection/components/dropdown-button/dropdown-button.ct.js.map +0 -1
- package/dist/collection/components/event-list/test/event-list.ct.js +0 -88
- package/dist/collection/components/event-list/test/event-list.ct.js.map +0 -1
- package/dist/collection/components/expanding-search/test/expanding-search.ct.js +0 -56
- package/dist/collection/components/expanding-search/test/expanding-search.ct.js.map +0 -1
- package/dist/collection/components/field-label/tests/field-label.ct.js +0 -121
- package/dist/collection/components/field-label/tests/field-label.ct.js.map +0 -1
- package/dist/collection/components/field-wrapper/tests/field-wrapper.ct.js +0 -63
- package/dist/collection/components/field-wrapper/tests/field-wrapper.ct.js.map +0 -1
- package/dist/collection/components/flip-tile/test/flip-tile.ct.js +0 -89
- package/dist/collection/components/flip-tile/test/flip-tile.ct.js.map +0 -1
- package/dist/collection/components/group/test/group.ct.js +0 -115
- package/dist/collection/components/group/test/group.ct.js.map +0 -1
- package/dist/collection/components/icon-button/test/icon-button.ct.js +0 -30
- package/dist/collection/components/icon-button/test/icon-button.ct.js.map +0 -1
- package/dist/collection/components/input/tests/form-ready.ct.js +0 -73
- package/dist/collection/components/input/tests/form-ready.ct.js.map +0 -1
- package/dist/collection/components/input/tests/validation.ct.js +0 -84
- package/dist/collection/components/input/tests/validation.ct.js.map +0 -1
- package/dist/collection/components/input-group/tests/input-group.ct.js +0 -161
- package/dist/collection/components/input-group/tests/input-group.ct.js.map +0 -1
- package/dist/collection/components/menu/test/menu.ct.js +0 -256
- package/dist/collection/components/menu/test/menu.ct.js.map +0 -1
- package/dist/collection/components/menu-about/test/menu-about.ct.js +0 -65
- package/dist/collection/components/menu-about/test/menu-about.ct.js.map +0 -1
- package/dist/collection/components/menu-avatar-item/test/menu-avatar-item.ct.js +0 -47
- package/dist/collection/components/menu-avatar-item/test/menu-avatar-item.ct.js.map +0 -1
- package/dist/collection/components/menu-category/test/menu-category.ct.js +0 -274
- package/dist/collection/components/menu-category/test/menu-category.ct.js.map +0 -1
- package/dist/collection/components/menu-item/test/menu-item.ct.js +0 -67
- package/dist/collection/components/menu-item/test/menu-item.ct.js.map +0 -1
- package/dist/collection/components/menu-settings/test/menu-settings.ct.js +0 -32
- package/dist/collection/components/menu-settings/test/menu-settings.ct.js.map +0 -1
- package/dist/collection/components/message-bar/test/message-bar.ct.js +0 -28
- package/dist/collection/components/message-bar/test/message-bar.ct.js.map +0 -1
- package/dist/collection/components/modal/test/modal.ct.js +0 -204
- package/dist/collection/components/modal/test/modal.ct.js.map +0 -1
- package/dist/collection/components/pagination/test/pagination.ct.js +0 -68
- package/dist/collection/components/pagination/test/pagination.ct.js.map +0 -1
- package/dist/collection/components/pane/test/panes.ct.js +0 -59
- package/dist/collection/components/pane/test/panes.ct.js.map +0 -1
- package/dist/collection/components/pane-layout/test/pane-layout.ct.js +0 -60
- package/dist/collection/components/pane-layout/test/pane-layout.ct.js.map +0 -1
- package/dist/collection/components/pill/test/pill.ct.js +0 -63
- package/dist/collection/components/pill/test/pill.ct.js.map +0 -1
- package/dist/collection/components/radio/test/radio.ct.js +0 -77
- package/dist/collection/components/radio/test/radio.ct.js.map +0 -1
- package/dist/collection/components/radio-group/test/radio-group.ct.js +0 -117
- package/dist/collection/components/radio-group/test/radio-group.ct.js.map +0 -1
- package/dist/collection/components/select/test/select-keyboard.ct.js +0 -380
- package/dist/collection/components/select/test/select-keyboard.ct.js.map +0 -1
- package/dist/collection/components/select/test/select.ct.js +0 -594
- package/dist/collection/components/select/test/select.ct.js.map +0 -1
- package/dist/collection/components/slider/test/slider.ct.js +0 -65
- package/dist/collection/components/slider/test/slider.ct.js.map +0 -1
- package/dist/collection/components/tabs/test/tabs.ct.js +0 -134
- package/dist/collection/components/tabs/test/tabs.ct.js.map +0 -1
- package/dist/collection/components/time-input/test/time-input.ct.js +0 -62
- package/dist/collection/components/time-input/test/time-input.ct.js.map +0 -1
- package/dist/collection/components/time-picker/test/time-picker.ct.js +0 -172
- package/dist/collection/components/time-picker/test/time-picker.ct.js.map +0 -1
- package/dist/collection/components/toggle/test/toggle.ct.js +0 -84
- package/dist/collection/components/toggle/test/toggle.ct.js.map +0 -1
- package/dist/collection/components/tooltip/test/tooltip.ct.js +0 -243
- package/dist/collection/components/tooltip/test/tooltip.ct.js.map +0 -1
- package/dist/collection/components/tree/test/tree.ct.js +0 -355
- package/dist/collection/components/tree/test/tree.ct.js.map +0 -1
- package/dist/collection/components/upload/test/upload.ct.js +0 -17
- package/dist/collection/components/upload/test/upload.ct.js.map +0 -1
- package/dist/collection/components/workflow-steps/test/workflow-steps.ct.js +0 -74
- package/dist/collection/components/workflow-steps/test/workflow-steps.ct.js.map +0 -1
- package/dist/collection/tests/utils/test/matchMedia.mock.js +0 -22
- package/dist/types/components/application-header/test/application-header.ct.d.ts +0 -1
- package/dist/types/components/avatar/test/avatar.ct.d.ts +0 -1
- package/dist/types/components/blind/test/blind.ct.d.ts +0 -1
- package/dist/types/components/breadcrumb/test/breadcrumb.ct.d.ts +0 -1
- package/dist/types/components/button/test/button.ct.d.ts +0 -7
- package/dist/types/components/category-filter/test/category-filter.ct.d.ts +0 -1
- package/dist/types/components/checkbox/tests/checkbox.ct.d.ts +0 -1
- package/dist/types/components/checkbox-group/test/checkbox-group.ct.d.ts +0 -1
- package/dist/types/components/chip/test/chip.ct.d.ts +0 -1
- package/dist/types/components/custom-field/tests/custom-field.ct.d.ts +0 -1
- package/dist/types/components/date-dropdown/test/date-dropdown.ct.d.ts +0 -1
- package/dist/types/components/date-input/tests/date-input.ct.d.ts +0 -1
- package/dist/types/components/date-picker/test/date-picker.ct.d.ts +0 -1
- package/dist/types/components/datetime-picker/test/datetime-picker.ct.d.ts +0 -1
- package/dist/types/components/drawer/test/drawer.ct.d.ts +0 -1
- package/dist/types/components/dropdown/test/dropdown.ct.d.ts +0 -1
- package/dist/types/components/dropdown-button/dropdown-button.ct.d.ts +0 -1
- package/dist/types/components/event-list/test/event-list.ct.d.ts +0 -1
- package/dist/types/components/expanding-search/test/expanding-search.ct.d.ts +0 -1
- package/dist/types/components/field-label/tests/field-label.ct.d.ts +0 -1
- package/dist/types/components/field-wrapper/tests/field-wrapper.ct.d.ts +0 -1
- package/dist/types/components/flip-tile/test/flip-tile.ct.d.ts +0 -1
- package/dist/types/components/group/test/group.ct.d.ts +0 -1
- package/dist/types/components/icon-button/test/icon-button.ct.d.ts +0 -1
- package/dist/types/components/input/tests/form-ready.ct.d.ts +0 -1
- package/dist/types/components/input/tests/validation.ct.d.ts +0 -1
- package/dist/types/components/input-group/tests/input-group.ct.d.ts +0 -1
- package/dist/types/components/menu/test/menu.ct.d.ts +0 -1
- package/dist/types/components/menu-about/test/menu-about.ct.d.ts +0 -1
- package/dist/types/components/menu-avatar-item/test/menu-avatar-item.ct.d.ts +0 -1
- package/dist/types/components/menu-category/test/menu-category.ct.d.ts +0 -1
- package/dist/types/components/menu-item/test/menu-item.ct.d.ts +0 -1
- package/dist/types/components/menu-settings/test/menu-settings.ct.d.ts +0 -1
- package/dist/types/components/message-bar/test/message-bar.ct.d.ts +0 -1
- package/dist/types/components/modal/test/modal.ct.d.ts +0 -8
- package/dist/types/components/pagination/test/pagination.ct.d.ts +0 -1
- package/dist/types/components/pane/test/panes.ct.d.ts +0 -1
- package/dist/types/components/pane-layout/test/pane-layout.ct.d.ts +0 -1
- package/dist/types/components/pill/test/pill.ct.d.ts +0 -1
- package/dist/types/components/radio/test/radio.ct.d.ts +0 -1
- package/dist/types/components/radio-group/test/radio-group.ct.d.ts +0 -1
- package/dist/types/components/select/test/select-keyboard.ct.d.ts +0 -1
- package/dist/types/components/select/test/select.ct.d.ts +0 -1
- package/dist/types/components/slider/test/slider.ct.d.ts +0 -1
- package/dist/types/components/tabs/test/tabs.ct.d.ts +0 -1
- package/dist/types/components/time-input/test/time-input.ct.d.ts +0 -1
- package/dist/types/components/time-picker/test/time-picker.ct.d.ts +0 -1
- package/dist/types/components/toggle/test/toggle.ct.d.ts +0 -1
- package/dist/types/components/tooltip/test/tooltip.ct.d.ts +0 -1
- package/dist/types/components/tree/test/tree.ct.d.ts +0 -1
- package/dist/types/components/upload/test/upload.ct.d.ts +0 -1
- package/dist/types/components/workflow-steps/test/workflow-steps.ct.d.ts +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxWorkflowStep extends Components.IxWorkflowStep, HTMLElement {}
|
|
4
|
+
export const IxWorkflowStep: {
|
|
5
|
+
prototype: IxWorkflowStep;
|
|
6
|
+
new (): IxWorkflowStep;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, e as createEvent, h, F as Fragment, d as Host } from './p-BuJ6BWIi.js';
|
|
2
|
+
import { Q as iconCircleDot, R as iconCircle, p as iconError, o as iconWarning, S as iconCircleFilled, q as iconSuccess, T as iconTriangleFilled } from './p-CGwHQeMX.js';
|
|
3
|
+
|
|
4
|
+
const workflowStepCss = ":host(:not(.host-vertical)){width:12rem;height:4rem;min-width:2rem;min-height:4rem;max-width:12rem}:host(.host-vertical){width:100%;height:4rem;min-width:4rem;min-height:2rem;max-height:12rem}:host{display:inline-block;position:relative}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}@-moz-document url-prefix(){:host *{scrollbar-color:var(--theme-scrollbar-thumb--background) var(--theme-scrollbar-track--background);scrollbar-width:thin}}: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 .step{display:flex;flex-direction:column;align-items:center;background-color:var(--theme-workflow-step--background);border-radius:var(--theme-workflow--border-radius);padding:1.125rem 0 0.5rem 0}:host .step .wrapper{display:flex;width:100%;align-items:center;justify-content:center;position:relative}:host .step .wrapper .line{width:100%;height:0.125rem;background-color:var(--theme-workflow-step-icon-default--color)}:host .step .wrapper .line.first,:host .step .wrapper .line.last{width:50%;margin:0 0 0 auto}:host .step .wrapper .line.last{margin:0 auto 0 0}:host .step .wrapper .line.single{width:0}:host .step .wrapper .line.selected{background-color:var(--theme-workflow-step-icon-default--color--selected)}:host .step .wrapper .line.done{background-color:var(--theme-workflow-step-icon-done--color)}:host .step .wrapper .line.done.selected{background-color:var(--theme-workflow-step-icon-done--color--selected)}:host .step .wrapper .line.warning{background-color:var(--theme-color-warning)}:host .step .wrapper .line.success{background-color:var(--theme-color-success)}:host .step .wrapper .line.error{background-color:var(--theme-color-alarm)}:host .step .wrapper .iconWrapper{display:flex;align-items:center;justify-content:center;position:absolute}:host .step .wrapper .iconWrapper .absolute{position:absolute}:host .step .text{margin-top:1rem;width:100%;padding:0 0.5rem;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:center}:host .step.vertical{flex-direction:row;padding:0;height:100%}:host .step.vertical .wrapper{width:auto;padding-left:1.125rem;height:100%}:host .step.vertical .wrapper .line{width:0.125rem;height:100%}:host .step.vertical .wrapper .line.first,:host .step.vertical .wrapper .line.last{height:50%;margin:auto 0 0 0}:host .step.vertical .wrapper .line.last{margin:0 0 auto 0}:host .step.vertical .wrapper .line.single{width:0}:host .step.vertical .text{margin:0 1rem;padding:0;width:auto}:host .step.clickable:hover{background-color:var(--theme-workflow-step--background--hover)}:host .step.clickable:active{background-color:var(--theme-workflow-step--background--active)}:host .step:focus-visible{outline:1px solid var(--focus--border-color);border-radius:0}:host .step.selected{background-color:var(--theme-workflow-step--background--selected)}:host .step.disabled{background-color:var(--theme-workflow-step--background--disabled)}:host .step.disabled .line{background-color:var(--theme-workflow-step-icon-default--color--disabled) !important}:host .step.disabled .text{color:var(--theme-workflow-step--color--disabled)}";
|
|
5
|
+
|
|
6
|
+
const WorkflowStep = /*@__PURE__*/ proxyCustomElement(class WorkflowStep extends H {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
this.selectedChanged = createEvent(this, "selectedChanged", 7);
|
|
12
|
+
/**
|
|
13
|
+
* Select orientation
|
|
14
|
+
*/
|
|
15
|
+
this.vertical = false;
|
|
16
|
+
/**
|
|
17
|
+
* Set disabled
|
|
18
|
+
*/
|
|
19
|
+
this.disabled = false;
|
|
20
|
+
/**
|
|
21
|
+
* Set status
|
|
22
|
+
*/
|
|
23
|
+
this.status = 'open';
|
|
24
|
+
/**
|
|
25
|
+
* Activate navigation click
|
|
26
|
+
*/
|
|
27
|
+
this.clickable = false;
|
|
28
|
+
/**
|
|
29
|
+
* Set selected
|
|
30
|
+
*/
|
|
31
|
+
this.selected = false;
|
|
32
|
+
/**
|
|
33
|
+
* Activate navigation click
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
this.position = 'undefined';
|
|
38
|
+
this.iconColor = 'workflow-step-icon-default--color';
|
|
39
|
+
this.customIconSlot = false;
|
|
40
|
+
}
|
|
41
|
+
selectedHandler() {
|
|
42
|
+
const selectedStyle = this.selected ? '--selected' : '';
|
|
43
|
+
if (this.status === 'open') {
|
|
44
|
+
this.iconName = this.selected ? iconCircleDot : iconCircle;
|
|
45
|
+
this.iconColor = `workflow-step-icon-default--color${selectedStyle}`;
|
|
46
|
+
}
|
|
47
|
+
if (this.status === 'done' && !this.disabled) {
|
|
48
|
+
this.iconColor = `workflow-step-icon-done--color${selectedStyle}`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
watchPropHandler() {
|
|
52
|
+
switch (this.status) {
|
|
53
|
+
case 'open':
|
|
54
|
+
this.iconName = iconCircle;
|
|
55
|
+
this.iconColor = 'workflow-step-icon-default--color';
|
|
56
|
+
break;
|
|
57
|
+
case 'success':
|
|
58
|
+
this.iconName = iconSuccess;
|
|
59
|
+
this.iconColor = 'color-success';
|
|
60
|
+
break;
|
|
61
|
+
case 'done':
|
|
62
|
+
this.iconName = iconCircleFilled;
|
|
63
|
+
this.iconColor = 'workflow-step-icon-done--color';
|
|
64
|
+
break;
|
|
65
|
+
case 'warning':
|
|
66
|
+
this.iconName = iconWarning;
|
|
67
|
+
this.iconColor = 'color-warning';
|
|
68
|
+
break;
|
|
69
|
+
case 'error':
|
|
70
|
+
this.iconName = iconError;
|
|
71
|
+
this.iconColor = 'color-alarm';
|
|
72
|
+
break;
|
|
73
|
+
default:
|
|
74
|
+
this.iconName = iconCircle;
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
if (this.disabled) {
|
|
78
|
+
this.iconColor = 'workflow-step-icon-success--color--disabled';
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
componentWillLoad() {
|
|
82
|
+
this.watchPropHandler();
|
|
83
|
+
this.selectedHandler();
|
|
84
|
+
this.customIconSlot = !!this.hostElement.querySelector('[slot="custom-icon"]');
|
|
85
|
+
}
|
|
86
|
+
onStepClick() {
|
|
87
|
+
if (!this.disabled && this.clickable) {
|
|
88
|
+
this.selectedChanged.emit(this.hostElement);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
render() {
|
|
92
|
+
const icons = !this.customIconSlot ? (h(Fragment, null, h("ix-icon", { color: "color-1", name: this.status === 'warning' ? iconTriangleFilled : iconCircleFilled, class: "absolute", size: "24" }), h("ix-icon", { color: this.iconColor, name: this.iconName, class: "absolute", size: "24" }))) : null;
|
|
93
|
+
return (h(Host, { key: 'da87aa8ee423349ce9a4f67cf18d672cc0c699ad', class: { 'host-vertical': this.vertical }, onClick: () => this.onStepClick() }, h("div", { key: 'd8527bf05a70d059750fb1942e25a552f6512e9c', tabIndex: 0, class: {
|
|
94
|
+
step: true,
|
|
95
|
+
selected: this.selected,
|
|
96
|
+
vertical: this.vertical,
|
|
97
|
+
disabled: this.disabled,
|
|
98
|
+
clickable: this.clickable && !this.disabled,
|
|
99
|
+
} }, h("div", { key: '6210f0dda1a3c28b0452511bbcb192b077fd2430', class: "wrapper" }, h("div", { key: 'ac115d567dd7d8e9cd2c8a5be0fad3b5138e1eb0', class: {
|
|
100
|
+
line: true,
|
|
101
|
+
selected: this.selected,
|
|
102
|
+
[this.status]: true,
|
|
103
|
+
[this.position]: true,
|
|
104
|
+
} }), h("div", { key: '56a9abb29057882d199deb15a1ff563b277301be', class: "iconWrapper" }, icons, h("slot", { key: 'cebe111aadb1cae69717679e4175a8d2ed848183', name: "custom-icon" }))), h("div", { key: '08a0bc27cfa1604e105f5533ca17c1e6432e3f7c', class: "text" }, h("slot", { key: '034dbb9fc7256e363df377e784e27f01a18bd88d' })))));
|
|
105
|
+
}
|
|
106
|
+
get hostElement() { return this; }
|
|
107
|
+
static get watchers() { return {
|
|
108
|
+
"selected": ["selectedHandler"],
|
|
109
|
+
"disabled": ["watchPropHandler"],
|
|
110
|
+
"status": ["watchPropHandler"]
|
|
111
|
+
}; }
|
|
112
|
+
static get style() { return workflowStepCss; }
|
|
113
|
+
}, [1, "ix-workflow-step", {
|
|
114
|
+
"vertical": [4],
|
|
115
|
+
"disabled": [4],
|
|
116
|
+
"status": [1],
|
|
117
|
+
"clickable": [4],
|
|
118
|
+
"selected": [4],
|
|
119
|
+
"position": [1],
|
|
120
|
+
"iconName": [32],
|
|
121
|
+
"iconColor": [32]
|
|
122
|
+
}, undefined, {
|
|
123
|
+
"selected": ["selectedHandler"],
|
|
124
|
+
"disabled": ["watchPropHandler"],
|
|
125
|
+
"status": ["watchPropHandler"]
|
|
126
|
+
}]);
|
|
127
|
+
function defineCustomElement$1() {
|
|
128
|
+
if (typeof customElements === "undefined") {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
const components = ["ix-workflow-step"];
|
|
132
|
+
components.forEach(tagName => { switch (tagName) {
|
|
133
|
+
case "ix-workflow-step":
|
|
134
|
+
if (!customElements.get(tagName)) {
|
|
135
|
+
customElements.define(tagName, WorkflowStep);
|
|
136
|
+
}
|
|
137
|
+
break;
|
|
138
|
+
} });
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const IxWorkflowStep = WorkflowStep;
|
|
142
|
+
const defineCustomElement = defineCustomElement$1;
|
|
143
|
+
|
|
144
|
+
export { IxWorkflowStep, defineCustomElement };
|
|
145
|
+
//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K,EAAC,aAAa,EAAA,EACrB,KAAK,EACN,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,aAAa,EAAA,CAAQ,CAC5B,CACF,EACN,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,MAAM,EAAA,EACf,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACT,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/workflow-step/workflow-step.scss?tag=ix-workflow-step&encapsulation=shadow","src/components/workflow-step/workflow-step.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/shadow-dom/component';\n\n:host(:not(.host-vertical)) {\n width: 12rem;\n height: 4rem;\n min-width: 2rem;\n min-height: 4rem;\n max-width: 12rem;\n}\n\n:host(.host-vertical) {\n width: 100%;\n height: 4rem;\n min-width: 4rem;\n min-height: 2rem;\n max-height: 12rem;\n}\n\n:host {\n @include ix-component;\n display: inline-block;\n position: relative;\n\n .step {\n display: flex;\n flex-direction: column;\n align-items: center;\n background-color: var(--theme-workflow-step--background);\n border-radius: var(--theme-workflow--border-radius);\n padding: 1.125rem 0 $small-space 0;\n\n .wrapper {\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n position: relative;\n\n .line {\n width: 100%;\n height: 0.125rem;\n background-color: var(--theme-workflow-step-icon-default--color);\n\n &.first,\n &.last {\n width: 50%;\n margin: 0 0 0 auto;\n }\n\n &.last {\n margin: 0 auto 0 0;\n }\n\n &.single {\n width: 0;\n }\n\n &.selected {\n background-color: var(\n --theme-workflow-step-icon-default--color--selected\n );\n }\n\n &.done {\n background-color: var(--theme-workflow-step-icon-done--color);\n\n &.selected {\n background-color: var(\n --theme-workflow-step-icon-done--color--selected\n );\n }\n }\n\n &.warning {\n background-color: var(--theme-color-warning);\n }\n\n &.success {\n background-color: var(--theme-color-success);\n }\n\n &.error {\n background-color: var(--theme-color-alarm);\n }\n }\n\n .iconWrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n\n .absolute {\n position: absolute;\n }\n }\n }\n\n .text {\n margin-top: $default-space;\n width: 100%;\n padding: 0 $small-space;\n\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n text-align: center;\n }\n\n &.vertical {\n flex-direction: row;\n padding: 0;\n height: 100%;\n\n .wrapper {\n width: auto;\n padding-left: 1.125rem;\n height: 100%;\n\n .line {\n width: 0.125rem;\n height: 100%;\n\n &.first,\n &.last {\n height: 50%;\n margin: auto 0 0 0;\n }\n\n &.last {\n margin: 0 0 auto 0;\n }\n\n &.single {\n width: 0;\n }\n }\n }\n\n .text {\n margin: 0 $default-space;\n padding: 0;\n width: auto;\n }\n }\n\n &.clickable {\n &:hover {\n background-color: var(--theme-workflow-step--background--hover);\n }\n\n &:active {\n background-color: var(--theme-workflow-step--background--active);\n }\n }\n\n &:focus-visible {\n outline: 1px solid var(--focus--border-color);\n border-radius: 0;\n }\n\n &.selected {\n background-color: var(--theme-workflow-step--background--selected);\n }\n\n &.disabled {\n background-color: var(--theme-workflow-step--background--disabled);\n\n .line {\n background-color: var(\n --theme-workflow-step-icon-default--color--disabled\n ) !important;\n }\n\n .text {\n color: var(--theme-workflow-step--color--disabled);\n }\n }\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n iconCircle,\n iconCircleDot,\n iconCircleFilled,\n iconError,\n iconSuccess,\n iconTriangleFilled,\n iconWarning,\n} from '@siemens/ix-icons/icons';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n Fragment,\n h,\n Host,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\n\n@Component({\n tag: 'ix-workflow-step',\n styleUrl: 'workflow-step.scss',\n shadow: true,\n})\nexport class WorkflowStep {\n @Element() hostElement!: HTMLIxWorkflowStepElement;\n\n /**\n * Select orientation\n */\n @Prop() vertical: boolean = false;\n\n /**\n * Set disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Set status\n */\n @Prop() status: 'open' | 'success' | 'done' | 'warning' | 'error' = 'open';\n\n /**\n * Activate navigation click\n */\n @Prop() clickable: boolean = false;\n\n /**\n * Set selected\n */\n @Prop() selected: boolean = false;\n\n /**\n * Activate navigation click\n *\n * @internal\n */\n @Prop() position: 'first' | 'last' | 'single' | 'undefined' = 'undefined';\n\n @State() iconName?: string;\n\n @State() iconColor: string = 'workflow-step-icon-default--color';\n\n /**\n * @internal\n */\n @Event() selectedChanged!: EventEmitter<HTMLIxWorkflowStepElement>;\n\n private customIconSlot: boolean = false;\n\n @Watch('selected')\n selectedHandler() {\n const selectedStyle = this.selected ? '--selected' : '';\n\n if (this.status === 'open') {\n this.iconName = this.selected ? iconCircleDot : iconCircle;\n this.iconColor = `workflow-step-icon-default--color${selectedStyle}`;\n }\n\n if (this.status === 'done' && !this.disabled) {\n this.iconColor = `workflow-step-icon-done--color${selectedStyle}`;\n }\n }\n\n @Watch('disabled')\n @Watch('status')\n watchPropHandler() {\n switch (this.status) {\n case 'open':\n this.iconName = iconCircle;\n this.iconColor = 'workflow-step-icon-default--color';\n break;\n case 'success':\n this.iconName = iconSuccess;\n this.iconColor = 'color-success';\n break;\n case 'done':\n this.iconName = iconCircleFilled;\n this.iconColor = 'workflow-step-icon-done--color';\n break;\n case 'warning':\n this.iconName = iconWarning;\n this.iconColor = 'color-warning';\n break;\n case 'error':\n this.iconName = iconError;\n this.iconColor = 'color-alarm';\n break;\n\n default:\n this.iconName = iconCircle;\n break;\n }\n\n if (this.disabled) {\n this.iconColor = 'workflow-step-icon-success--color--disabled';\n }\n }\n\n componentWillLoad() {\n this.watchPropHandler();\n this.selectedHandler();\n\n this.customIconSlot = !!this.hostElement.querySelector(\n '[slot=\"custom-icon\"]'\n );\n }\n\n onStepClick() {\n if (!this.disabled && this.clickable) {\n this.selectedChanged.emit(this.hostElement);\n }\n }\n\n render() {\n const icons = !this.customIconSlot ? (\n <Fragment>\n <ix-icon\n color=\"color-1\"\n name={\n this.status === 'warning' ? iconTriangleFilled : iconCircleFilled\n }\n class=\"absolute\"\n size=\"24\"\n ></ix-icon>\n <ix-icon\n color={this.iconColor}\n name={this.iconName}\n class=\"absolute\"\n size=\"24\"\n ></ix-icon>\n </Fragment>\n ) : null;\n\n return (\n <Host\n class={{ 'host-vertical': this.vertical }}\n onClick={() => this.onStepClick()}\n >\n <div\n tabIndex={0}\n class={{\n step: true,\n selected: this.selected,\n vertical: this.vertical,\n disabled: this.disabled,\n clickable: this.clickable && !this.disabled,\n }}\n >\n <div class=\"wrapper\">\n <div\n class={{\n line: true,\n selected: this.selected,\n [this.status]: true,\n [this.position]: true,\n }}\n ></div>\n <div class=\"iconWrapper\">\n {icons}\n <slot name=\"custom-icon\"></slot>\n </div>\n </div>\n <div class=\"text\">\n <slot></slot>\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 IxWorkflowSteps extends Components.IxWorkflowSteps, HTMLElement {}
|
|
4
|
+
export const IxWorkflowSteps: {
|
|
5
|
+
prototype: IxWorkflowSteps;
|
|
6
|
+
new (): IxWorkflowSteps;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, e as createEvent, h, d as Host } from './p-BuJ6BWIi.js';
|
|
2
|
+
import { c as createMutationObserver } from './p-CX81WQtk.js';
|
|
3
|
+
|
|
4
|
+
const workflowStepsCss = ":host{display:block;position:relative;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content;min-width:2rem}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}@-moz-document url-prefix(){:host *{scrollbar-color:var(--theme-scrollbar-thumb--background) var(--theme-scrollbar-track--background);scrollbar-width:thin}}: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 .steps{display:flex;height:100%}:host .steps.vertical{flex-direction:column}";
|
|
5
|
+
|
|
6
|
+
const WorkflowSteps = /*@__PURE__*/ proxyCustomElement(class WorkflowSteps extends H {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
this.stepSelected = createEvent(this, "stepSelected", 7);
|
|
12
|
+
/**
|
|
13
|
+
* Select orientation
|
|
14
|
+
*/
|
|
15
|
+
this.vertical = false;
|
|
16
|
+
/**
|
|
17
|
+
* Activate navigation click
|
|
18
|
+
*/
|
|
19
|
+
this.clickable = false;
|
|
20
|
+
/**
|
|
21
|
+
* Activate navigation click
|
|
22
|
+
*/
|
|
23
|
+
this.selectedIndex = 0;
|
|
24
|
+
}
|
|
25
|
+
getSteps() {
|
|
26
|
+
return Array.from(this.hostElement.querySelectorAll('ix-workflow-step'));
|
|
27
|
+
}
|
|
28
|
+
updateSteps() {
|
|
29
|
+
let steps = this.getSteps();
|
|
30
|
+
steps.forEach((element, index) => {
|
|
31
|
+
element.vertical = this.vertical;
|
|
32
|
+
element.clickable = this.clickable;
|
|
33
|
+
element.selected = this.selectedIndex === index;
|
|
34
|
+
if (steps.length === 1) {
|
|
35
|
+
element.position = 'single';
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (index === 0) {
|
|
39
|
+
element.position = 'first';
|
|
40
|
+
}
|
|
41
|
+
else if (index === steps.length - 1) {
|
|
42
|
+
element.position = 'last';
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
element.position = 'undefined';
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
onStepSelectionChanged(event) {
|
|
50
|
+
const eventTarget = event.detail;
|
|
51
|
+
const steps = this.getSteps();
|
|
52
|
+
const clickIndex = steps.findIndex((step) => step === eventTarget);
|
|
53
|
+
const clientEvent = this.stepSelected.emit(clickIndex);
|
|
54
|
+
if (clientEvent.defaultPrevented) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
steps.forEach((step, index) => {
|
|
58
|
+
step.selected = index === clickIndex;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
componentWillLoad() {
|
|
62
|
+
this.updateSteps();
|
|
63
|
+
}
|
|
64
|
+
componentDidLoad() {
|
|
65
|
+
this.observer = createMutationObserver((mutations) => {
|
|
66
|
+
for (let mutation of mutations) {
|
|
67
|
+
if (mutation.type === 'childList') {
|
|
68
|
+
this.updateSteps();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
this.observer.observe(this.hostElement, { childList: true });
|
|
73
|
+
}
|
|
74
|
+
disconnectedCallback() {
|
|
75
|
+
if (this.observer) {
|
|
76
|
+
this.observer.disconnect();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
componentDidRender() {
|
|
80
|
+
this.updateSteps();
|
|
81
|
+
}
|
|
82
|
+
render() {
|
|
83
|
+
return (h(Host, { key: 'f8b17414e0483043ca19ea615424edd9d1186d65' }, h("div", { key: '7e5e437796034eec9fca0f49d066649314e00ed6', class: { steps: true, vertical: this.vertical } }, h("slot", { key: '80c3e814489566858fdd37d254ecb04a6be50846' }))));
|
|
84
|
+
}
|
|
85
|
+
get hostElement() { return this; }
|
|
86
|
+
static get style() { return workflowStepsCss; }
|
|
87
|
+
}, [1, "ix-workflow-steps", {
|
|
88
|
+
"vertical": [4],
|
|
89
|
+
"clickable": [4],
|
|
90
|
+
"selectedIndex": [2, "selected-index"]
|
|
91
|
+
}, [[0, "selectedChanged", "onStepSelectionChanged"]]]);
|
|
92
|
+
function defineCustomElement$1() {
|
|
93
|
+
if (typeof customElements === "undefined") {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const components = ["ix-workflow-steps"];
|
|
97
|
+
components.forEach(tagName => { switch (tagName) {
|
|
98
|
+
case "ix-workflow-steps":
|
|
99
|
+
if (!customElements.get(tagName)) {
|
|
100
|
+
customElements.define(tagName, WorkflowSteps);
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
} });
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const IxWorkflowSteps = WorkflowSteps;
|
|
107
|
+
const defineCustomElement = defineCustomElement$1;
|
|
108
|
+
|
|
109
|
+
export { IxWorkflowSteps, defineCustomElement };
|
|
110
|
+
//# sourceMappingURL=ix-workflow-steps.js.map
|
|
111
|
+
|
|
112
|
+
//# sourceMappingURL=ix-workflow-steps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-workflow-steps.js","mappings":";;;AAAA,MAAM,gBAAgB,GAAG,q9BAAq9B;;MC0Bj+B,aAAa,iBAAAA,kBAAA,CAAA,MAAA,aAAA,SAAAC,CAAA,CAAA;AAL1B,IAAA,WAAA,GAAA;;;;;AAQE;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAEjC;;AAEG;AACK,QAAA,IAAS,CAAA,SAAA,GAAY,KAAK;AAElC;;AAE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AAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,KAAI;AAC5B,YAAA,IAAI,CAAC,QAAQ,GAAG,KAAK,KAAK,UAAU;AACtC,SAAC,CAAC;;IAGJ,iBAAiB,GAAA;QACf,IAAI,CAAC,WAAW,EAAE;;IAGpB,gBAAgB,GAAA;QACd,IAAI,CAAC,QAAQ,GAAG,sBAAsB,CAAC,CAAC,SAAS,KAAI;AACnD,YAAA,KAAK,IAAI,QAAQ,IAAI,SAAS,EAAE;AAC9B,gBAAA,IAAI,QAAQ,CAAC,IAAI,KAAK,WAAW,EAAE;oBACjC,IAAI,CAAC,WAAW,EAAE;;;AAGxB,SAAC,CAAC;AAEF,QAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;IAG9D,oBAAoB,GAAA;AAClB,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,YAAA,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;;;IAI9B,kBAAkB,GAAA;QAChB,IAAI,CAAC,WAAW,EAAE;;IAGpB,MAAM,GAAA;QACJ,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACH,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAA,EAClD,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/workflow-steps/workflow-steps.scss?tag=ix-workflow-steps&encapsulation=shadow","src/components/workflow-steps/workflow-steps.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n display: block;\n position: relative;\n width: fit-content;\n height: fit-content;\n min-width: 2rem;\n\n .steps {\n display: flex;\n height: 100%;\n\n &.vertical {\n flex-direction: column;\n }\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n} from '@stencil/core';\nimport { createMutationObserver } from '../utils/mutation-observer';\n\n@Component({\n tag: 'ix-workflow-steps',\n styleUrl: 'workflow-steps.scss',\n shadow: true,\n})\nexport class WorkflowSteps {\n @Element() hostElement!: HTMLIxWorkflowStepsElement;\n\n /**\n * Select orientation\n */\n @Prop() vertical: boolean = false;\n\n /**\n * Activate navigation click\n */\n @Prop() clickable: boolean = false;\n\n /**\n * Activate navigation click\n */\n @Prop() selectedIndex: number = 0;\n\n /**\n * On step selected event\n */\n @Event() stepSelected!: EventEmitter<number>;\n\n private getSteps() {\n return Array.from(this.hostElement.querySelectorAll('ix-workflow-step'));\n }\n\n updateSteps() {\n let steps = this.getSteps();\n steps.forEach((element, index) => {\n element.vertical = this.vertical;\n element.clickable = this.clickable;\n element.selected = this.selectedIndex === index;\n\n if (steps.length === 1) {\n element.position = 'single';\n return;\n }\n\n if (index === 0) {\n element.position = 'first';\n } else if (index === steps.length - 1) {\n element.position = 'last';\n } else {\n element.position = 'undefined';\n }\n });\n }\n\n private observer?: MutationObserver;\n\n @Listen('selectedChanged')\n onStepSelectionChanged(event: CustomEvent<HTMLIxWorkflowStepElement>) {\n const eventTarget = event.detail;\n\n const steps = this.getSteps();\n const clickIndex = steps.findIndex((step) => step === eventTarget);\n const clientEvent = this.stepSelected.emit(clickIndex);\n\n if (clientEvent.defaultPrevented) {\n return;\n }\n\n steps.forEach((step, index) => {\n step.selected = index === clickIndex;\n });\n }\n\n componentWillLoad() {\n this.updateSteps();\n }\n\n componentDidLoad() {\n this.observer = createMutationObserver((mutations) => {\n for (let mutation of mutations) {\n if (mutation.type === 'childList') {\n this.updateSteps();\n }\n }\n });\n\n this.observer.observe(this.hostElement, { childList: true });\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n componentDidRender() {\n this.updateSteps();\n }\n\n render() {\n return (\n <Host>\n <div class={{ steps: true, vertical: this.vertical }}>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { T as TypedEvent } from './p-BdCnOrqW.js';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* SPDX-FileCopyrightText: 2024 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
|
+
/**
|
|
12
|
+
* A function which creates a Context value object
|
|
13
|
+
*/
|
|
14
|
+
function createContext(name, initialValue) {
|
|
15
|
+
return {
|
|
16
|
+
name,
|
|
17
|
+
initialValue,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* An event fired by a context requester to signal it desires a named context.
|
|
22
|
+
*
|
|
23
|
+
* A provider should inspect the `context` property of the event to determine if it has a value that can
|
|
24
|
+
* satisfy the request, calling the `callback` with the requested value if so.
|
|
25
|
+
*
|
|
26
|
+
* If the requested context event contains a truthy `subscribe` value, then a provider can call the callback
|
|
27
|
+
* multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`
|
|
28
|
+
* function to the callback which requesters can invoke to indicate they no longer wish to receive these updates.
|
|
29
|
+
*/
|
|
30
|
+
class ContextEvent extends Event {
|
|
31
|
+
constructor(context, callback, subscribe) {
|
|
32
|
+
super('context-request', { bubbles: true, composed: true });
|
|
33
|
+
this.context = context;
|
|
34
|
+
this.callback = callback;
|
|
35
|
+
this.subscribe = subscribe;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function useContextConsumer(hostElement, context, onContextReceived, subscribe) {
|
|
39
|
+
let _unsubscribe;
|
|
40
|
+
hostElement.dispatchEvent(new ContextEvent(context, (ctx, unSub) => {
|
|
41
|
+
onContextReceived(ctx, unSub);
|
|
42
|
+
_unsubscribe = unSub;
|
|
43
|
+
}, subscribe));
|
|
44
|
+
return {
|
|
45
|
+
unsubscribe: () => {
|
|
46
|
+
if (_unsubscribe) {
|
|
47
|
+
_unsubscribe();
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function useContextProvider(hostElement, context, contextPayload) {
|
|
53
|
+
const requestContext = new TypedEvent();
|
|
54
|
+
const updateContext = new TypedEvent();
|
|
55
|
+
const requests = new Set();
|
|
56
|
+
hostElement.addEventListener('context-request', (event) => {
|
|
57
|
+
const requestContextEvent = event;
|
|
58
|
+
if ((requestContextEvent === null || requestContextEvent === void 0 ? void 0 : requestContextEvent.context.name) !== context.name) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
requestContextEvent.stopPropagation();
|
|
62
|
+
if (requestContextEvent.subscribe) {
|
|
63
|
+
requests.add(requestContextEvent);
|
|
64
|
+
}
|
|
65
|
+
requestContext.emit(requestContextEvent);
|
|
66
|
+
if (contextPayload) {
|
|
67
|
+
requestContextEvent.callback(contextPayload, () => {
|
|
68
|
+
requests.delete(requestContextEvent);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
updateContext.on((context) => {
|
|
73
|
+
requests.forEach((r) => r.callback(context, () => {
|
|
74
|
+
requests.delete(r);
|
|
75
|
+
}));
|
|
76
|
+
});
|
|
77
|
+
return {
|
|
78
|
+
emit: (context) => {
|
|
79
|
+
updateContext.emit(context);
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/*
|
|
85
|
+
* SPDX-FileCopyrightText: 2023 Siemens AG
|
|
86
|
+
*
|
|
87
|
+
* SPDX-License-Identifier: MIT
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the MIT license found in the
|
|
90
|
+
* LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/
|
|
92
|
+
const closestIxMenu = (element) => {
|
|
93
|
+
const menuElement = element.closest('ix-menu');
|
|
94
|
+
return menuElement;
|
|
95
|
+
};
|
|
96
|
+
const ApplicationLayoutContext = createContext('application-layout-context', {
|
|
97
|
+
hideHeader: false,
|
|
98
|
+
host: null,
|
|
99
|
+
sidebar: false,
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export { ApplicationLayoutContext as A, useContextConsumer as a, closestIxMenu as c, useContextProvider as u };
|
|
103
|
+
//# sourceMappingURL=p--2LOMK-5.js.map
|
|
104
|
+
|
|
105
|
+
//# sourceMappingURL=p--2LOMK-5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p--2LOMK-5.js","mappings":";;AAAA;;;;;;;AAOG;AAuBH;;AAEG;AACa,SAAA,aAAa,CAC3B,IAAY,EACZ,YAAgB,EAAA;IAEhB,OAAO;QACL,IAAI;QACJ,YAAY;KACb;AACH;AAWA;;;;;;;;;AASG;AACG,MAAO,YAAuC,SAAQ,KAAK,CAAA;AAC/D,IAAA,WAAA,CACkB,OAAU,EACV,QAAyC,EACzC,SAAmB,EAAA;AAEnC,QAAA,KAAK,CAAC,iBAAiB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAJ3C,IAAO,CAAA,OAAA,GAAP,OAAO;QACP,IAAQ,CAAA,QAAA,GAAR,QAAQ;QACR,IAAS,CAAA,SAAA,GAAT,SAAS;;AAI5B;AAgBK,SAAU,k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C,OAAuB,KAAI;AAC3C,QAAA,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,KACjB,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAK;AACvB,YAAA,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;SACnB,CAAC,CACH;AACH,KAAC,CAAC;IAEF,OAAO;AACL,QAAA,IAAI,EAAE,CAAC,OAAuB,KAAI;AAChC,YAAA,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC;SAC5B;KACF;AACH;;ACzKA;;;;;;;AAOG;AAKU,MAAA,aAAa,GAAG,CAAC,OAAgB,KAAI;IAChD,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC;AAC9C,IAAA,OAAO,WAAW;AACpB;AAoBa,MAAA,wBAAwB,GAAG,aAAa,CAKlD,4BAA4B,EAAE;AAC/B,IAAA,UAAU,EAAE,KAAK;AACjB,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,OAAO,EAAE,KAAK;AACf,CAAA;;;;","names":[],"sources":["src/components/utils/context.ts","src/components/utils/application-layout/context.ts"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { TypedEvent } from './typed-event';\n\n/**\n * A Context object defines an optional initial value for a Context, as well as a name identifier for debugging purposes.\n */\nexport type Context<T> = {\n name: string;\n initialValue?: T;\n};\n\n/**\n * An unknown context type\n */\nexport type UnknownContext = Context<unknown>;\n\n/**\n * A helper type which can extract a Context value type from a Context type\n */\nexport type ContextType<T extends UnknownContext> =\n T extends Context<infer Y> ? Y : never;\n\n/**\n * A function which creates a Context value object\n */\nexport function createContext<T>(\n name: string,\n initialValue?: T\n): Readonly<Context<T>> {\n return {\n name,\n initialValue,\n };\n}\n\n/**\n * A callback which is provided by a context requester and is called with the value satisfying the request.\n * This callback can be called multiple times by context providers as the requested value is changed.\n */\nexport type ContextCallback<ValueType> = (\n value: ValueType,\n unsubscribe?: () => void\n) => void;\n\n/**\n * An event fired by a context requester to signal it desires a named context.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * function to the callback which requesters can invoke to indicate they no longer wish to receive these updates.\n */\nexport class ContextEvent<T extends UnknownContext> extends Event {\n public constructor(\n public readonly context: T,\n public readonly callback: ContextCallback<ContextType<T>>,\n public readonly subscribe?: boolean\n ) {\n super('context-request', { bubbles: true, composed: true });\n }\n}\n\ndeclare global {\n interface HTMLElementEventMap {\n /**\n * A 'context-request' event can be emitted by any element which desires\n * a context value to be injected by an external provider.\n */\n 'context-request': ContextEvent<UnknownContext>;\n }\n}\n\nexport type ContextConsumerSubscription = {\n unsubscribe: () => void;\n};\n\nexport function useContextConsumer<\n T extends HTMLElement,\n C extends UnknownContext,\n>(\n hostElement: T,\n context: C,\n onContextReceived: (\n context: ContextType<C>,\n unsubscribe?: () => void\n ) => void,\n subscribe?: boolean\n): ContextConsumerSubscription {\n let _unsubscribe: (() => void) | undefined;\n hostElement.dispatchEvent(\n new ContextEvent(\n context,\n (ctx, unSub) => {\n onContextReceived(ctx, unSub);\n _unsubscribe = unSub;\n },\n subscribe\n )\n );\n\n return {\n unsubscribe: () => {\n if (_unsubscribe) {\n _unsubscribe();\n }\n },\n };\n}\nexport type ContextProvider<C extends Context<{}> = Context<any>> = {\n emit: (context: ContextType<C>) => void;\n};\n\nexport function useContextProvider<\n X extends {},\n C extends Context<X>,\n T extends HTMLElement = HTMLElement,\n>(\n hostElement: T,\n context: C,\n contextPayload?: ContextType<C>\n): ContextProvider<C> {\n const requestContext = new TypedEvent<ContextEvent<C>>();\n const updateContext = new TypedEvent<ContextType<C>>();\n\n const requests = new Set<ContextEvent<UnknownContext>>();\n\n hostElement.addEventListener('context-request', (event: Event) => {\n const requestContextEvent = event as ContextEvent<C>;\n if (requestContextEvent?.context.name !== context.name) {\n return;\n }\n\n requestContextEvent.stopPropagation();\n\n if (requestContextEvent.subscribe) {\n requests.add(requestContextEvent);\n }\n requestContext.emit(requestContextEvent);\n\n if (contextPayload) {\n requestContextEvent.callback(contextPayload, () => {\n requests.delete(requestContextEvent);\n });\n }\n });\n\n updateContext.on((context: ContextType<C>) => {\n requests.forEach((r) =>\n r.callback(context, () => {\n requests.delete(r);\n })\n );\n });\n\n return {\n emit: (context: ContextType<C>) => {\n updateContext.emit(context);\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 { createContext } from '../context';\nimport { type LiteralStringUnion } from '../type-helper';\n\nexport const closestIxMenu = (element: Element) => {\n const menuElement = element.closest('ix-menu');\n return menuElement;\n};\n\nexport type AppSwitchConfigurationTarget = LiteralStringUnion<\n '_self' | '_blank' | '_parent' | '_top'\n>;\n\nexport type AppSwitchConfiguration = {\n currentAppId: string;\n apps: {\n id: string;\n name: string;\n description: string;\n url: string;\n target: AppSwitchConfigurationTarget;\n iconSrc: string;\n }[];\n i18nAppSwitch?: string;\n i18nLoadingApps?: string;\n};\n\nexport const ApplicationLayoutContext = createContext<{\n hideHeader: boolean;\n host: 'basic-navigation' | 'map-navigation' | null;\n appSwitchConfig?: AppSwitchConfiguration;\n sidebar?: boolean;\n}>('application-layout-context', {\n hideHeader: false,\n host: null,\n sidebar: false,\n});\n"],"version":3}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h, d as Host } from './p-BuJ6BWIi.js';
|
|
2
|
+
|
|
3
|
+
const dateTimeCardCss = ":host{}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}@-moz-document url-prefix(){:host *{scrollbar-color:var(--theme-scrollbar-thumb--background) var(--theme-scrollbar-track--background);scrollbar-width:thin}}: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 .card{background-color:var(--theme-menu--background);width:100%;box-shadow:none;border:none;border-radius:unset;display:flex;flex-direction:column}:host .card.standaloneAppearance{box-shadow:var(--theme-shadow-4);border-radius:0.25rem}:host .card.rounded{border-radius:4px}:host .card.left{border-radius:4px 0 0 4px;height:100%}:host .card.right{border-radius:0 4px 4px 0;height:100%}:host .card.straight{border-radius:0}:host .card .header-container{width:100%}:host .card .header-container .header{padding:1rem;flex:0 1 auto}:host .card .separator{border:1px solid var(--theme-datepicker-separator--background);width:100%;flex:0 1 auto}:host .card .content{padding:0 1rem 1rem 1rem;flex:1 1 auto;display:flex;flex-direction:column;justify-content:center}:host .card .content--time-picker{padding:0 1rem}:host .card .footer-container{width:100%}:host .card .footer-container .footer{padding:1rem}";
|
|
4
|
+
|
|
5
|
+
const DateTimeCard = /*@__PURE__*/ proxyCustomElement(class DateTimeCard extends H {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
/** Timepicker specific styling */
|
|
11
|
+
this.timePickerAppearance = false;
|
|
12
|
+
/**
|
|
13
|
+
* Hide header
|
|
14
|
+
*/
|
|
15
|
+
this.hideHeader = false;
|
|
16
|
+
/**
|
|
17
|
+
* Display footer
|
|
18
|
+
*/
|
|
19
|
+
this.hasFooter = false;
|
|
20
|
+
/**
|
|
21
|
+
* set styles
|
|
22
|
+
*/
|
|
23
|
+
this.individual = true;
|
|
24
|
+
/**
|
|
25
|
+
* Set corners style
|
|
26
|
+
*/
|
|
27
|
+
this.corners = 'rounded';
|
|
28
|
+
}
|
|
29
|
+
cardClasses() {
|
|
30
|
+
var _a;
|
|
31
|
+
return {
|
|
32
|
+
card: true,
|
|
33
|
+
standaloneAppearance: (_a = this.standaloneAppearance) !== null && _a !== void 0 ? _a : this.individual,
|
|
34
|
+
rounded: this.corners === 'rounded',
|
|
35
|
+
left: this.corners === 'left',
|
|
36
|
+
right: this.corners === 'right',
|
|
37
|
+
straight: this.corners === 'straight',
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
return (h(Host, { key: '31c1aa02530819d8bd9896ca625c3c8930ea8268' }, h("div", { key: '31432252f1ce901e76a92423719d24bc621e3e83', class: this.cardClasses() }, !this.hideHeader && (h("div", { key: 'dd4b7346375f87a43b2969dba7c5b4a9cc10f0ac', class: "header-container" }, h("div", { key: '8dc14769929ce6e0d2f2095ca4904ee8beb2018b', class: "header" }, h("slot", { key: '9f5357cb413d5ccf9f6a15ecb10040034ad5e1b0', name: "header" })), h("div", { key: 'b7c55ccf1c1f655240d817ed838de53a67a8d4f0', class: "separator" }))), h("div", { key: '6ddf415abf2a5174a796e3e9a15441aef0f9c14a', class: {
|
|
42
|
+
content: true,
|
|
43
|
+
'content--time-picker': this.timePickerAppearance,
|
|
44
|
+
} }, h("slot", { key: '953b62d7631d68c1061798d6259836110c368095' })), this.hasFooter && (h("div", { key: 'd39e55a300835320ef737cd28bce660a846500de', class: "footer-container" }, h("div", { key: 'e44823acab4d5a87bcb77ab812e1a31ff6a2b2c7', class: "separator" }), h("div", { key: 'e8118c065ed36b219e04a91ec2fe4455585ea2e0', class: "footer" }, h("slot", { key: 'f49f852f5b7c6d5bc2052d37593a69e13f78ce0f', name: "footer" })))))));
|
|
45
|
+
}
|
|
46
|
+
static get style() { return dateTimeCardCss; }
|
|
47
|
+
}, [1, "ix-date-time-card", {
|
|
48
|
+
"standaloneAppearance": [4, "standalone-appearance"],
|
|
49
|
+
"timePickerAppearance": [4, "time-picker-appearance"],
|
|
50
|
+
"hideHeader": [4, "hide-header"],
|
|
51
|
+
"hasFooter": [4, "has-footer"],
|
|
52
|
+
"individual": [4],
|
|
53
|
+
"corners": [1]
|
|
54
|
+
}]);
|
|
55
|
+
function defineCustomElement() {
|
|
56
|
+
if (typeof customElements === "undefined") {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const components = ["ix-date-time-card"];
|
|
60
|
+
components.forEach(tagName => { switch (tagName) {
|
|
61
|
+
case "ix-date-time-card":
|
|
62
|
+
if (!customElements.get(tagName)) {
|
|
63
|
+
customElements.define(tagName, DateTimeCard);
|
|
64
|
+
}
|
|
65
|
+
break;
|
|
66
|
+
} });
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export { DateTimeCard as D, defineCustomElement as d };
|
|
70
|
+
//# sourceMappingURL=p-5uA5ifmT.js.map
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=p-5uA5ifmT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-5uA5ifmT.js","mappings":";;AAAA,MAAM,eAAe,GAAG,woDAAwoD;;MCoBnpD,YAAY,iBAAAA,kBAAA,CAAA,MAAA,YAAA,SAAAC,CAAA,CAAA;AALzB,IAAA,WAAA,GAAA;;;;;AAUU,QAAA,IAAoB,CAAA,oBAAA,GAAY,KAAK;AAE7C;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;AAEnC;;AAEG;AACK,QAAA,IAAS,CAAA,SAAA,GAAY,KAAK;AAElC;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAY,IAAI;AAElC;;AAEG;AACK,QAAA,IAAO,CAAA,OAAA,GAAwB,SAAS;AA+CjD;IA7CS,WAAW,GAAA;;QACjB,OAAO;AACL,YAAA,IAAI,EAAE,IAAI;YACV,oBAAoB,EAAE,MAAA,IAAI,CAAC,oBAAoB,MAAI,IAAA,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AA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,WAAW,EAAO,CAAA,EAC7B,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,QAAQ,EAAA,EACjB,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,EAAQ,CAAA,CACvB,CACF,CACP,CACG,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/date-time-card/date-time-card.scss?tag=ix-date-time-card&encapsulation=shadow","src/components/date-time-card/date-time-card.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/shadow-dom/component';\n\n:host {\n @include ix-component;\n\n .card {\n background-color: var(--theme-menu--background);\n width: 100%;\n box-shadow: none;\n border: none;\n border-radius: unset;\n display: flex;\n flex-direction: column;\n\n &.standaloneAppearance {\n box-shadow: var(--theme-shadow-4);\n border-radius: 0.25rem;\n }\n\n &.rounded {\n border-radius: 4px;\n }\n\n &.left {\n border-radius: 4px 0 0 4px;\n height: 100%;\n }\n\n &.right {\n border-radius: 0 4px 4px 0;\n height: 100%;\n }\n\n &.straight {\n border-radius: 0;\n }\n\n .header-container {\n width: 100%;\n\n .header {\n padding: $default-space;\n flex: 0 1 auto;\n }\n }\n\n .separator {\n border: 1px solid var(--theme-datepicker-separator--background);\n width: 100%;\n flex: 0 1 auto;\n }\n\n .content {\n &--time-picker {\n padding: 0 $default-space;\n }\n\n padding: 0 $default-space $default-space $default-space;\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n\n .footer-container {\n width: 100%;\n\n .footer {\n padding: $default-space;\n }\n }\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, h, Host, Prop } from '@stencil/core';\nimport type { DateTimeCardCorners } from './date-time-card.types';\n\n/**\n * @internal\n */\n@Component({\n tag: 'ix-date-time-card',\n styleUrl: 'date-time-card.scss',\n shadow: true,\n})\nexport class DateTimeCard {\n /** @internal */\n @Prop() standaloneAppearance?: boolean;\n\n /** Timepicker specific styling */\n @Prop() timePickerAppearance: boolean = false;\n\n /**\n * Hide header\n */\n @Prop() hideHeader: boolean = false;\n\n /**\n * Display footer\n */\n @Prop() hasFooter: boolean = false;\n\n /**\n * set styles\n */\n @Prop() individual: boolean = true;\n\n /**\n * Set corners style\n */\n @Prop() corners: DateTimeCardCorners = 'rounded';\n\n private cardClasses() {\n return {\n card: true,\n standaloneAppearance: this.standaloneAppearance ?? this.individual,\n rounded: this.corners === 'rounded',\n left: this.corners === 'left',\n right: this.corners === 'right',\n straight: this.corners === 'straight',\n };\n }\n\n render() {\n return (\n <Host>\n <div class={this.cardClasses()}>\n {!this.hideHeader && (\n <div class=\"header-container\">\n <div class=\"header\">\n <slot name=\"header\"></slot>\n </div>\n <div class=\"separator\"></div>\n </div>\n )}\n\n <div\n class={{\n content: true,\n 'content--time-picker': this.timePickerAppearance,\n }}\n >\n <slot></slot>\n </div>\n\n {this.hasFooter && (\n <div class=\"footer-container\">\n <div class=\"separator\"></div>\n <div class=\"footer\">\n <slot name=\"footer\"></slot>\n </div>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { h } from './p-BuJ6BWIi.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
|
+
const isDanger = (variant) => {
|
|
12
|
+
return variant.toUpperCase() === 'Danger'.toUpperCase();
|
|
13
|
+
};
|
|
14
|
+
const isPrimary = (variant) => {
|
|
15
|
+
return variant.toUpperCase() === 'Primary'.toUpperCase();
|
|
16
|
+
};
|
|
17
|
+
const isSecondary = (variant) => {
|
|
18
|
+
return variant.toUpperCase() === 'Secondary'.toUpperCase();
|
|
19
|
+
};
|
|
20
|
+
const getButtonClasses = (variant, outline, ghost, iconOnly = false, iconOval = false, selected, disabled) => {
|
|
21
|
+
return {
|
|
22
|
+
btn: true,
|
|
23
|
+
'btn-danger': isDanger(variant) && !outline && !ghost,
|
|
24
|
+
'btn-outline-danger': isDanger(variant) && outline && !ghost,
|
|
25
|
+
'btn-invisible-danger': isDanger(variant) && !outline && ghost,
|
|
26
|
+
'btn-primary': isPrimary(variant) && !outline && !ghost,
|
|
27
|
+
'btn-outline-primary': isPrimary(variant) && outline && !ghost,
|
|
28
|
+
'btn-invisible-primary': isPrimary(variant) && !outline && ghost,
|
|
29
|
+
'btn-secondary': isSecondary(variant) && !outline && !ghost,
|
|
30
|
+
'btn-outline-secondary': isSecondary(variant) && outline && !ghost,
|
|
31
|
+
'btn-invisible-secondary': isSecondary(variant) && !outline && ghost,
|
|
32
|
+
'btn-icon': iconOnly,
|
|
33
|
+
'btn-oval': iconOval,
|
|
34
|
+
selected: selected,
|
|
35
|
+
disabled: disabled,
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
const getSpinnerSize = (btnProps) => {
|
|
39
|
+
if (!btnProps.icon) {
|
|
40
|
+
return 'small';
|
|
41
|
+
}
|
|
42
|
+
switch (btnProps.iconSize) {
|
|
43
|
+
case '12':
|
|
44
|
+
return 'xx-small';
|
|
45
|
+
case '16':
|
|
46
|
+
return 'x-small';
|
|
47
|
+
default:
|
|
48
|
+
return 'small';
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const BaseButton = (props, children) => {
|
|
52
|
+
var _a, _b, _c;
|
|
53
|
+
const extraClasses = (_a = props.extraClasses) !== null && _a !== void 0 ? _a : {};
|
|
54
|
+
const ariaAttributes = (_b = props.ariaAttributes) !== null && _b !== void 0 ? _b : {};
|
|
55
|
+
if (!ariaAttributes['aria-disabled'] && props.disabled) {
|
|
56
|
+
ariaAttributes['aria-disabled'] = 'true';
|
|
57
|
+
}
|
|
58
|
+
return (h("button", Object.assign({}, ariaAttributes, { onClick: (e) => (props.onClick ? props.onClick(e) : undefined), tabindex: props.disabled ? -1 : ((_c = props.tabIndex) !== null && _c !== void 0 ? _c : 0), type: props.type, class: Object.assign(Object.assign({}, getButtonClasses(props.variant, props.outline, props.ghost, props.iconOnly, props.iconOval, props.selected, props.disabled || props.loading)), extraClasses) }),
|
|
59
|
+
props.loading ? (h("ix-spinner", { size: getSpinnerSize(props), hideTrack: true })) : null,
|
|
60
|
+
props.icon && !props.loading ? (h("ix-icon", { class: "icon", name: props.icon, size: props.iconSize, color: props.iconColor })) : null,
|
|
61
|
+
h("div", { class: {
|
|
62
|
+
content: true,
|
|
63
|
+
[`content-${props.alignment}`]: !!props.alignment,
|
|
64
|
+
} }, children),
|
|
65
|
+
props.afterContent ? props.afterContent : null));
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export { BaseButton as B, getButtonClasses as g };
|
|
69
|
+
//# sourceMappingURL=p-9dLpp1OQ.js.map
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=p-9dLpp1OQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-9dLpp1OQ.js","mappings":";;AAAA;;;;;;;AAOG;AAOH,MAAM,QAAQ,GAAG,CAAC,OAAe,KAAI;IACnC,OAAO,OAAO,CAAC,WAAW,EAAE,KAAK,QAAQ,CAAC,WAAW,EAAE;AACzD,CAAC;AAED,MAAM,SAAS,GAAG,CAAC,OAAe,KAAI;IACpC,OAAO,OAAO,C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O,CAChC,CAAA,EACE,YAAY,CAAA,EAAA,CAAA;QAGhB,KAAK,CAAC,OAAO,IACZ,CAAA,CAAA,YAAA,EAAA,EAAY,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC,EAAE,SAAS,EAAA,IAAA,EAAA,CAAc,IAC9D,IAAI;AACP,QAAA,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,IAC3B,CACE,CAAA,SAAA,EAAA,EAAA,KAAK,EAAC,MAAM,EACZ,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,IAAI,EAAE,KAAK,CAAC,QAAe,EAC3B,KAAK,EAAE,KAAK,CAAC,SAAS,EAAA,CACb,IACT,IAAI;AACR,QAAA,CAAA,CAAA,KAAA,EAAA,EACE,KAAK,EAAE;AACL,gBAAA,OAAO,EAAE,IAAI;gBACb,CAAC,CAAA,QAAA,EAAW,KAAK,CAAC,SAAS,CAAA,CAAE,GAAG,CAAC,CAAC,KAAK,CAAC,SAAS;AAClD,aAAA,EAAA,EAEA,QAAQ,CACL;AACL,QAAA,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CACxC;AAEb;;;;","names":[],"sources":["src/components/button/base-button.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 */\nimport { FunctionalComponent, h } from '@stencil/core';\nimport { A11yAttributes } from '../utils/a11y';\nimport { ButtonVariant } from './button';\n\nexport type ButtonAlignment = 'center' | 'start';\n\nconst isDanger = (variant: string) => {\n return variant.toUpperCase() === 'Danger'.toUpperCase();\n};\n\nconst isPrimary = (variant: string) => {\n return variant.toUpperCase() === 'Primary'.toUpperCase();\n};\n\nconst isSecondary = (variant: string) => {\n return variant.toUpperCase() === 'Secondary'.toUpperCase();\n};\n\nexport const getButtonClasses = (\n variant: ButtonVariant,\n outline: boolean,\n ghost: boolean,\n iconOnly = false,\n iconOval = false,\n selected: boolean,\n disabled: boolean\n) => {\n return {\n btn: true,\n 'btn-danger': isDanger(variant) && !outline && !ghost,\n 'btn-outline-danger': isDanger(variant) && outline && !ghost,\n 'btn-invisible-danger': isDanger(variant) && !outline && ghost,\n 'btn-primary': isPrimary(variant) && !outline && !ghost,\n 'btn-outline-primary': isPrimary(variant) && outline && !ghost,\n 'btn-invisible-primary': isPrimary(variant) && !outline && ghost,\n 'btn-secondary': isSecondary(variant) && !outline && !ghost,\n 'btn-outline-secondary': isSecondary(variant) && outline && !ghost,\n 'btn-invisible-secondary': isSecondary(variant) && !outline && ghost,\n 'btn-icon': iconOnly,\n 'btn-oval': iconOval,\n selected: selected,\n disabled: disabled,\n };\n};\n\nexport type BaseButtonProps = {\n type: string;\n variant: ButtonVariant;\n outline: boolean;\n ghost: boolean;\n iconOnly: boolean;\n iconOval: boolean;\n selected: boolean;\n disabled: boolean;\n loading: boolean;\n icon?: string;\n onClick?: Function;\n ariaAttributes?: A11yAttributes;\n extraClasses?: { [key: string]: boolean };\n iconSize?: string;\n iconColor?: string;\n alignment?: ButtonAlignment;\n tabIndex?: number;\n afterContent?: any;\n};\n\nconst getSpinnerSize = (btnProps: BaseButtonProps) => {\n if (!btnProps.icon) {\n return 'small';\n }\n\n switch (btnProps.iconSize) {\n case '12':\n return 'xx-small';\n case '16':\n return 'x-small';\n default:\n return 'small';\n }\n};\n\nexport const BaseButton: FunctionalComponent<BaseButtonProps> = (\n props: BaseButtonProps,\n children\n) => {\n const extraClasses = props.extraClasses ?? {};\n\n const ariaAttributes = props.ariaAttributes ?? {};\n if (!ariaAttributes['aria-disabled'] && props.disabled) {\n ariaAttributes['aria-disabled'] = 'true';\n }\n\n return (\n <button\n {...ariaAttributes}\n onClick={(e: Event) => (props.onClick ? props.onClick(e) : undefined)}\n tabindex={props.disabled ? -1 : (props.tabIndex ?? 0)}\n type={props.type}\n class={{\n ...getButtonClasses(\n props.variant,\n props.outline,\n props.ghost,\n props.iconOnly,\n props.iconOval,\n props.selected,\n props.disabled || props.loading\n ),\n ...extraClasses,\n }}\n >\n {props.loading ? (\n <ix-spinner size={getSpinnerSize(props)} hideTrack></ix-spinner>\n ) : null}\n {props.icon && !props.loading ? (\n <ix-icon\n class=\"icon\"\n name={props.icon}\n size={props.iconSize as any}\n color={props.iconColor}\n ></ix-icon>\n ) : null}\n <div\n class={{\n content: true,\n [`content-${props.alignment}`]: !!props.alignment,\n }}\n >\n {children}\n </div>\n {props.afterContent ? props.afterContent : null}\n </button>\n );\n};\n"],"version":3}
|