@siemens/ix 0.0.0-pr-1974-20250627114851 → 0.0.0-pr-1974-20250627115746
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 +2 -1
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { h } from './p-BuJ6BWIi.js';
|
|
2
|
+
import { a as a11yBoolean } from './p-Bb7pDeaQ.js';
|
|
3
|
+
import { s as shouldSuppressInternalValidation } from './p-D9LaIICQ.js';
|
|
4
|
+
import { c as createMutationObserver } from './p-CX81WQtk.js';
|
|
5
|
+
import { a as convertToRemString } from './p-JJddxCCh.js';
|
|
6
|
+
import { a as anime } from './p-Ou74PMQs.js';
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* SPDX-FileCopyrightText: 2024 Siemens AG
|
|
10
|
+
*
|
|
11
|
+
* SPDX-License-Identifier: MIT
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the MIT license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
function TextareaElement(props) {
|
|
17
|
+
return (h("textarea", Object.assign({ readOnly: props.readonly, disabled: props.disabled, maxLength: props.maxLength, minLength: props.minLength, cols: props.textareaCols, rows: props.textareaRows, ref: props.textAreaRef, class: {
|
|
18
|
+
'is-invalid': props.isInvalid,
|
|
19
|
+
}, required: props.required, value: props.value, placeholder: props.placeholder, onInput: (inputEvent) => {
|
|
20
|
+
const target = inputEvent.target;
|
|
21
|
+
props.updateFormInternalValue(target.value);
|
|
22
|
+
props.valueChange(target.value);
|
|
23
|
+
}, onBlur: () => props.onBlur(), style: {
|
|
24
|
+
resize: props.resizeBehavior,
|
|
25
|
+
height: props.textareaHeight,
|
|
26
|
+
width: props.textareaWidth,
|
|
27
|
+
} }, props.ariaAttributes)));
|
|
28
|
+
}
|
|
29
|
+
function InputElement(props) {
|
|
30
|
+
return (h("input", Object.assign({ id: props.id, autoComplete: "off", readOnly: props.readonly, disabled: props.disabled, step: props.step, min: props.min, max: props.max, maxLength: props.maxLength ? Number(props.maxLength) : undefined, minLength: props.minLength ? Number(props.minLength) : undefined, ref: props.inputRef, pattern: props.pattern, type: props.type, class: {
|
|
31
|
+
'is-invalid': props.isInvalid,
|
|
32
|
+
}, required: props.required, value: props.value, placeholder: props.placeholder, onKeyPress: (event) => props.onKeyPress(event), onInput: (inputEvent) => {
|
|
33
|
+
const target = inputEvent.target;
|
|
34
|
+
props.updateFormInternalValue(target.value);
|
|
35
|
+
props.valueChange(target.value);
|
|
36
|
+
}, onBlur: () => props.onBlur() }, props.ariaAttributes)));
|
|
37
|
+
}
|
|
38
|
+
const SlotEnd = (props, children) => {
|
|
39
|
+
return (h("div", { class: "end-container", ref: props.slotEndRef },
|
|
40
|
+
h("slot", { name: "end", onSlotchange: props.onSlotChange }),
|
|
41
|
+
children));
|
|
42
|
+
};
|
|
43
|
+
const SlotStart = (props) => {
|
|
44
|
+
return (h("div", { class: "start-container", ref: props.slotStartRef },
|
|
45
|
+
h("slot", { name: "start", onSlotchange: props.onSlotChange })));
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/*
|
|
49
|
+
* SPDX-FileCopyrightText: 2024 Siemens AG
|
|
50
|
+
*
|
|
51
|
+
* SPDX-License-Identifier: MIT
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the MIT license found in the
|
|
54
|
+
* LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/
|
|
56
|
+
function shakeInput(input) {
|
|
57
|
+
const xMax = 5;
|
|
58
|
+
anime({
|
|
59
|
+
targets: input,
|
|
60
|
+
duration: 200,
|
|
61
|
+
easing: 'easeInOutSine',
|
|
62
|
+
loop: 2,
|
|
63
|
+
translateX: [
|
|
64
|
+
{
|
|
65
|
+
value: xMax * -1,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
value: xMax,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
value: xMax / -2,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
value: xMax / 2,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
value: 0,
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/*
|
|
84
|
+
* SPDX-FileCopyrightText: 2024 Siemens AG
|
|
85
|
+
*
|
|
86
|
+
* SPDX-License-Identifier: MIT
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the MIT license found in the
|
|
89
|
+
* LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/
|
|
91
|
+
function mapValidationResult(ref, result) {
|
|
92
|
+
ref.isInvalid = result.isInvalid || result.isInvalidByRequired;
|
|
93
|
+
ref.isValid = result.isValid;
|
|
94
|
+
ref.isInfo = result.isInfo;
|
|
95
|
+
ref.isWarning = result.isWarning;
|
|
96
|
+
}
|
|
97
|
+
function checkAllowedKeys(comp, event) {
|
|
98
|
+
if (comp.allowedCharactersPattern) {
|
|
99
|
+
const regex = new RegExp(comp.allowedCharactersPattern);
|
|
100
|
+
if (!regex.test(event.key)) {
|
|
101
|
+
event.preventDefault();
|
|
102
|
+
shakeInput(comp.inputRef.current);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
async function checkInternalValidity(comp, input) {
|
|
107
|
+
const validityState = input.validity;
|
|
108
|
+
const eventResult = comp.validityStateChange.emit(validityState);
|
|
109
|
+
if (eventResult.defaultPrevented) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (!comp.value) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const skipValidation = await shouldSuppressInternalValidation(comp);
|
|
116
|
+
if (skipValidation) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const { valid } = validityState;
|
|
120
|
+
comp.hostElement.classList.toggle('ix-invalid--validity-invalid', !valid);
|
|
121
|
+
}
|
|
122
|
+
function onInputBlur(comp, input) {
|
|
123
|
+
comp.ixBlur.emit();
|
|
124
|
+
if (!input) {
|
|
125
|
+
throw new Error('Input element is not available');
|
|
126
|
+
}
|
|
127
|
+
input.setAttribute('data-ix-touched', 'true');
|
|
128
|
+
checkInternalValidity(comp, input);
|
|
129
|
+
}
|
|
130
|
+
function applyPaddingEnd(inputElement, width, options) {
|
|
131
|
+
var _a;
|
|
132
|
+
if (!inputElement) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const remInPixels = 16;
|
|
136
|
+
const padding = convertToRemString(width + remInPixels / 2);
|
|
137
|
+
if (options.slotEnd) {
|
|
138
|
+
inputElement.style.paddingRight = `calc(${padding} + ${(_a = options.additionalPaddingRight) !== null && _a !== void 0 ? _a : '0rem'})`;
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
inputElement.style.paddingLeft = padding;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
function adjustPaddingForStartAndEnd(startElement, endElement, inputElement) {
|
|
145
|
+
requestAnimationFrame(() => {
|
|
146
|
+
requestAnimationFrame(() => {
|
|
147
|
+
if (startElement) {
|
|
148
|
+
const startBoundingRect = startElement.getBoundingClientRect();
|
|
149
|
+
if (startBoundingRect) {
|
|
150
|
+
applyPaddingEnd(inputElement, startBoundingRect.width, {
|
|
151
|
+
slotEnd: false,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
if (endElement) {
|
|
156
|
+
const endBoundingRect = endElement.getBoundingClientRect();
|
|
157
|
+
if (endBoundingRect) {
|
|
158
|
+
applyPaddingEnd(inputElement, endBoundingRect.width, {
|
|
159
|
+
slotEnd: true,
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function getAriaAttributesForInput(component) {
|
|
167
|
+
const inputAria = {
|
|
168
|
+
'aria-invalid': `${a11yBoolean(component.isInvalid)}`,
|
|
169
|
+
'aria-required': `${a11yBoolean(component.required)}`,
|
|
170
|
+
};
|
|
171
|
+
if (component.isInvalid && component.invalidText) {
|
|
172
|
+
inputAria['aria-errormessage'] = component.invalidText;
|
|
173
|
+
}
|
|
174
|
+
return inputAria;
|
|
175
|
+
}
|
|
176
|
+
const addDisposableChangesAndVisibilityObservers = (element, callback) => {
|
|
177
|
+
const intersectionObserver = observeElementUntilVisible(element, callback);
|
|
178
|
+
const mutationObserver = createMutationObserver(callback);
|
|
179
|
+
mutationObserver.observe(element, {
|
|
180
|
+
subtree: true,
|
|
181
|
+
attributes: true,
|
|
182
|
+
});
|
|
183
|
+
return () => {
|
|
184
|
+
intersectionObserver.disconnect();
|
|
185
|
+
mutationObserver.disconnect();
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
function observeElementUntilVisible(hostElement, updateCallback) {
|
|
189
|
+
const intersectionObserver = new IntersectionObserver((entries) => {
|
|
190
|
+
entries.forEach((entry) => {
|
|
191
|
+
if (entry.isIntersecting) {
|
|
192
|
+
updateCallback();
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
intersectionObserver.observe(hostElement);
|
|
197
|
+
return intersectionObserver;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export { InputElement as I, SlotEnd as S, TextareaElement as T, addDisposableChangesAndVisibilityObservers as a, adjustPaddingForStartAndEnd as b, SlotStart as c, checkAllowedKeys as d, checkInternalValidity as e, getAriaAttributesForInput as g, mapValidationResult as m, onInputBlur as o };
|
|
201
|
+
//# sourceMappingURL=p-Bvsx56zn.js.map
|
|
202
|
+
|
|
203
|
+
//# sourceMappingURL=p-Bvsx56zn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-Bvsx56zn.js","mappings":";;;;;;;AAAA;;;;;;;AAOG;AAKG,SAAU,eAAe,CAC7B,KAmBE,EAAA;IAEF,QACE,8BACE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,IAAI,EAAE,KAAK,CAAC,YAAY,EACxB,IAAI,EAAE,KAAK,CAAC,YAAY,EACxB,GAAG,EAAE,KAAK,CAAC,WAAW,EACtB,KAAK,EAAE;YACL,YAAY,EAAE,KAAK,CAAC,SAAS;SAC9B,EACD,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,OAAO,EAAE,CAAC,UAAU,KAAI;AACtB,YAAA,MAAM,MAAM,GAAG,UAAU,CAAC,MAA0B;AACpD,YAAA,KAAK,CAAC,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC;AAC3C,YAAA,KAAK,CAAC,WAAW,CAAC,MAAM,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xB,gBAAA,cAAc,EAAE;;AAEpB,SAAC,CAAC;AACJ,KAAC,CAAC;AAEF,IAAA,oBAAoB,CAAC,OAAO,CAAC,WAAW,CAAC;AACzC,IAAA,OAAO,oBAAoB;AAC7B;;;;","names":[],"sources":["src/components/input/input.fc.tsx","src/components/input/input.animation.ts","src/components/input/input.util.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 */\nimport { h, FunctionalComponent } from '@stencil/core';\nimport { MakeRef } from '../utils/make-ref';\nimport { A11yAttributes } from '../utils/a11y';\n\nexport function TextareaElement(\n props: Readonly<{\n resizeBehavior: 'both' | 'horizontal' | 'vertical' | 'none';\n textareaHeight?: string;\n textareaWidth?: string;\n textareaRows?: number;\n textareaCols?: number;\n disabled: boolean;\n readonly: boolean;\n maxLength?: number;\n minLength?: number;\n isInvalid: boolean;\n required: boolean;\n value: string;\n placeholder?: string;\n textAreaRef: (el: HTMLTextAreaElement | undefined) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n }>\n) {\n return (\n <textarea\n readOnly={props.readonly}\n disabled={props.disabled}\n maxLength={props.maxLength}\n minLength={props.minLength}\n cols={props.textareaCols}\n rows={props.textareaRows}\n ref={props.textAreaRef}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n style={{\n resize: props.resizeBehavior,\n height: props.textareaHeight,\n width: props.textareaWidth,\n }}\n {...props.ariaAttributes}\n ></textarea>\n );\n}\n\nexport function InputElement(\n props: Readonly<{\n id: string;\n disabled: boolean;\n readonly: boolean;\n maxLength?: string | number;\n minLength?: string | number;\n max?: string | number;\n min?: string | number;\n step?: string | number;\n pattern?: string;\n type: string;\n isInvalid: boolean;\n required: boolean;\n value: string | number;\n placeholder?: string;\n inputRef: (el: HTMLInputElement | undefined) => void;\n onKeyPress: (event: KeyboardEvent) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n }>\n) {\n return (\n <input\n id={props.id}\n autoComplete=\"off\"\n readOnly={props.readonly}\n disabled={props.disabled}\n step={props.step}\n min={props.min}\n max={props.max}\n maxLength={props.maxLength ? Number(props.maxLength) : undefined}\n minLength={props.minLength ? Number(props.minLength) : undefined}\n ref={props.inputRef}\n pattern={props.pattern}\n type={props.type}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onKeyPress={(event) => props.onKeyPress(event)}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n {...props.ariaAttributes}\n ></input>\n );\n}\n\nexport const SlotEnd: FunctionalComponent<{\n slotEndRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props, children) => {\n return (\n <div class=\"end-container\" ref={props.slotEndRef}>\n <slot name=\"end\" onSlotchange={props.onSlotChange}></slot>\n {children}\n </div>\n );\n};\n\nexport const SlotStart: FunctionalComponent<{\n slotStartRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props) => {\n return (\n <div class=\"start-container\" ref={props.slotStartRef}>\n <slot name=\"start\" onSlotchange={props.onSlotChange}></slot>\n </div>\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 */\nimport anime from 'animejs';\n\nexport function shakeInput(input: HTMLInputElement) {\n const xMax = 5;\n anime({\n targets: input,\n duration: 200,\n easing: 'easeInOutSine',\n loop: 2,\n translateX: [\n {\n value: xMax * -1,\n },\n {\n value: xMax,\n },\n {\n value: xMax / -2,\n },\n {\n value: xMax / 2,\n },\n {\n value: 0,\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 { A11yAttributes, a11yBoolean } from '../utils/a11y';\nimport {\n IxFormComponent,\n IxInputFieldComponent,\n ValidationResults,\n shouldSuppressInternalValidation,\n} from '../utils/input';\nimport { createMutationObserver } from '../utils/mutation-observer';\nimport { convertToRemString } from '../utils/rwd.util';\nimport { generateUUID } from '../utils/uuid';\nimport { shakeInput } from './input.animation';\n\nexport function createIdIfNotExists(\n element: IxFormComponent,\n idPrefix: string = 'input'\n) {\n return element.hasAttribute('id')\n ? element.getAttribute('id')\n : `${idPrefix}-${generateUUID()}`;\n}\n\nexport function mapValidationResult<T>(\n ref: IxInputFieldComponent<T>,\n result: ValidationResults\n) {\n ref.isInvalid = result.isInvalid || result.isInvalidByRequired;\n ref.isValid = result.isValid;\n ref.isInfo = result.isInfo;\n ref.isWarning = result.isWarning;\n}\n\nexport function checkAllowedKeys<T>(\n comp: IxInputFieldComponent<T>,\n event: KeyboardEvent\n) {\n if (comp.allowedCharactersPattern) {\n const regex = new RegExp(comp.allowedCharactersPattern);\n if (!regex.test(event.key)) {\n event.preventDefault();\n shakeInput(comp.inputRef.current);\n }\n }\n}\n\nexport async function checkInternalValidity<T>(\n comp: IxFormComponent<T>,\n input: HTMLInputElement | HTMLTextAreaElement\n) {\n const validityState = input.validity;\n\n const eventResult = comp.validityStateChange.emit(validityState);\n\n if (eventResult.defaultPrevented) {\n return;\n }\n\n if (!comp.value) {\n return;\n }\n\n const skipValidation = await shouldSuppressInternalValidation(comp);\n if (skipValidation) {\n return;\n }\n\n const { valid } = validityState;\n comp.hostElement.classList.toggle('ix-invalid--validity-invalid', !valid);\n}\n\nexport function onInputBlur<T>(\n comp: IxFormComponent<T>,\n input?: HTMLInputElement | HTMLTextAreaElement | null\n) {\n comp.ixBlur.emit();\n\n if (!input) {\n throw new Error('Input element is not available');\n }\n\n input.setAttribute('data-ix-touched', 'true');\n checkInternalValidity(comp, input);\n}\n\nexport function applyPaddingEnd(\n inputElement: HTMLElement | null,\n width: number,\n options: {\n slotEnd: boolean;\n additionalPaddingRight?: string;\n }\n) {\n if (!inputElement) {\n return;\n }\n\n const remInPixels = 16;\n const padding = convertToRemString(width + remInPixels / 2);\n\n if (options.slotEnd) {\n inputElement.style.paddingRight = `calc(${padding} + ${\n options.additionalPaddingRight ?? '0rem'\n })`;\n } else {\n inputElement.style.paddingLeft = padding;\n }\n}\n\nexport function adjustPaddingForStartAndEnd(\n startElement: HTMLElement | null,\n endElement: HTMLElement | null,\n inputElement: HTMLElement | null\n) {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (startElement) {\n const startBoundingRect = startElement.getBoundingClientRect();\n if (startBoundingRect) {\n applyPaddingEnd(inputElement, startBoundingRect.width, {\n slotEnd: false,\n });\n }\n }\n\n if (endElement) {\n const endBoundingRect = endElement.getBoundingClientRect();\n if (endBoundingRect) {\n applyPaddingEnd(inputElement, endBoundingRect.width, {\n slotEnd: true,\n });\n }\n }\n });\n });\n}\n\nexport function getAriaAttributesForInput(\n component: IxInputFieldComponent\n): A11yAttributes {\n const inputAria: A11yAttributes = {\n 'aria-invalid': `${a11yBoolean(component.isInvalid)}`,\n 'aria-required': `${a11yBoolean(component.required)}`,\n };\n\n if (component.isInvalid && component.invalidText) {\n inputAria['aria-errormessage'] = component.invalidText;\n }\n return inputAria;\n}\n\nexport type DisposableChangesAndVisibilityObservers = () => void;\n\nexport const addDisposableChangesAndVisibilityObservers = (\n element: HTMLElement,\n callback: () => void\n): DisposableChangesAndVisibilityObservers => {\n const intersectionObserver = observeElementUntilVisible(element, callback);\n const mutationObserver = createMutationObserver(callback);\n\n mutationObserver.observe(element, {\n subtree: true,\n attributes: true,\n });\n\n return () => {\n intersectionObserver.disconnect();\n mutationObserver.disconnect();\n };\n};\n\nfunction observeElementUntilVisible(\n hostElement: HTMLElement,\n updateCallback: () => void\n): IntersectionObserver {\n const intersectionObserver = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n updateCallback();\n }\n });\n });\n\n intersectionObserver.observe(hostElement);\n return intersectionObserver;\n}\n"],"version":3}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h, d as Host } from './p-BuJ6BWIi.js';
|
|
2
|
+
|
|
3
|
+
const spinnerCss = ":host{display: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}.xx-small{width:0.75rem;height:0.75rem;min-width:0.75rem;min-height:0.75rem;max-width:0.75rem;max-height:0.75rem;border-radius:100%;position:relative;animation:rotate 2s linear infinite}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes clipMask{0%{clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}12.5%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)}25%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%)}37.5%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%)}50%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0)}62.5%{clip-path:polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0)}75%{clip-path:polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 0 100%, 0 0)}87.5%{clip-path:polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0)}100%{clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}}.xx-small::after{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:1px solid var(--ix-button-color, var(--theme-color-soft-text));animation:clipMask 3s linear infinite}.xx-small:not(.hide-track)::before{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:1px solid var(--theme-color-ghost--hover)}.primary::after{border-color:var(--theme-color-dynamic)}.primary::before{border-color:var(--theme-color-ghost--hover)}:host{display: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}.x-small{width:1.25rem;height:1.25rem;min-width:1.25rem;min-height:1.25rem;max-width:1.25rem;max-height:1.25rem;border-radius:100%;position:relative;animation:rotate 2s linear infinite}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes clipMask{0%{clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}12.5%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)}25%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%)}37.5%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%)}50%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0)}62.5%{clip-path:polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0)}75%{clip-path:polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 0 100%, 0 0)}87.5%{clip-path:polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0)}100%{clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}}.x-small::after{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:2px solid var(--ix-button-color, var(--theme-color-soft-text));animation:clipMask 3s linear infinite}.x-small:not(.hide-track)::before{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:2px solid var(--theme-color-ghost--hover)}.primary::after{border-color:var(--theme-color-dynamic)}.primary::before{border-color:var(--theme-color-ghost--hover)}:host{display: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}.small{width:1.5rem;height:1.5rem;min-width:1.5rem;min-height:1.5rem;max-width:1.5rem;max-height:1.5rem;border-radius:100%;position:relative;animation:rotate 2s linear infinite}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes clipMask{0%{clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}12.5%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)}25%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%)}37.5%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%)}50%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0)}62.5%{clip-path:polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0)}75%{clip-path:polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 0 100%, 0 0)}87.5%{clip-path:polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0)}100%{clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}}.small::after{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:2px solid var(--ix-button-color, var(--theme-color-soft-text));animation:clipMask 3s linear infinite}.small:not(.hide-track)::before{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:2px solid var(--theme-color-ghost--hover)}.primary::after{border-color:var(--theme-color-dynamic)}.primary::before{border-color:var(--theme-color-ghost--hover)}:host{display: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}.medium{width:2rem;height:2rem;min-width:2rem;min-height:2rem;max-width:2rem;max-height:2rem;border-radius:100%;position:relative;animation:rotate 2s linear infinite}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes clipMask{0%{clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}12.5%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)}25%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%)}37.5%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%)}50%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0)}62.5%{clip-path:polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0)}75%{clip-path:polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 0 100%, 0 0)}87.5%{clip-path:polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0)}100%{clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}}.medium::after{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:2px solid var(--ix-button-color, var(--theme-color-soft-text));animation:clipMask 3s linear infinite}.medium:not(.hide-track)::before{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:2px solid var(--theme-color-ghost--hover)}.primary::after{border-color:var(--theme-color-dynamic)}.primary::before{border-color:var(--theme-color-ghost--hover)}:host{display: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}.large{width:6rem;height:6rem;min-width:6rem;min-height:6rem;max-width:6rem;max-height:6rem;border-radius:100%;position:relative;animation:rotate 2s linear infinite}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes clipMask{0%{clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}12.5%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)}25%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%)}37.5%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%)}50%{clip-path:polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0)}62.5%{clip-path:polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0)}75%{clip-path:polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 0 100%, 0 0)}87.5%{clip-path:polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0)}100%{clip-path:polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)}}.large::after{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:4px solid var(--ix-button-color, var(--theme-color-soft-text));animation:clipMask 3s linear infinite}.large:not(.hide-track)::before{content:\"\";box-sizing:border-box;position:absolute;inset:8.33%;border-radius:100%;border:4px solid var(--theme-color-ghost--hover)}.primary::after{border-color:var(--theme-color-dynamic)}.primary::before{border-color:var(--theme-color-ghost--hover)}";
|
|
4
|
+
|
|
5
|
+
const Spinner = /*@__PURE__*/ proxyCustomElement(class Spinner extends H {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
/**
|
|
11
|
+
* Variant of spinner
|
|
12
|
+
*/
|
|
13
|
+
this.variant = 'secondary';
|
|
14
|
+
/**
|
|
15
|
+
* Size of spinner
|
|
16
|
+
*/
|
|
17
|
+
this.size = 'medium';
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
this.hideTrack = false;
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
return (h(Host, { key: '60f00971cbb88210fdb31f2ca873110e09abe681' }, h("div", { key: '25625ef5ff443bb582e8ab023d12f0575e6ee27f', class: {
|
|
25
|
+
primary: this.variant === 'primary',
|
|
26
|
+
[this.size]: true,
|
|
27
|
+
'hide-track': this.hideTrack,
|
|
28
|
+
} })));
|
|
29
|
+
}
|
|
30
|
+
get hostElement() { return this; }
|
|
31
|
+
static get style() { return spinnerCss; }
|
|
32
|
+
}, [1, "ix-spinner", {
|
|
33
|
+
"variant": [1],
|
|
34
|
+
"size": [1],
|
|
35
|
+
"hideTrack": [4, "hide-track"]
|
|
36
|
+
}]);
|
|
37
|
+
function defineCustomElement() {
|
|
38
|
+
if (typeof customElements === "undefined") {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const components = ["ix-spinner"];
|
|
42
|
+
components.forEach(tagName => { switch (tagName) {
|
|
43
|
+
case "ix-spinner":
|
|
44
|
+
if (!customElements.get(tagName)) {
|
|
45
|
+
customElements.define(tagName, Spinner);
|
|
46
|
+
}
|
|
47
|
+
break;
|
|
48
|
+
} });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { Spinner as S, defineCustomElement as d };
|
|
52
|
+
//# sourceMappingURL=p-BygLxZIM.js.map
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=p-BygLxZIM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-BygLxZIM.js","mappings":";;AAAA,MAAM,UAAU,GAAG,0hVAA0hV;;MCgBhiV,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA;AALpB,IAAA,WAAA,GAAA;;;;AAQE;;AAEG;AACK,QAAA,IAAO,CAAA,OAAA,GAA4B,WAAW;AAEtD;;AAEG;AACK,QAAA,IAAI,CAAA,IAAA,GACV,QAAQ;AAEV;;AAEG;AACK,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;AAe1B;IAbC,MAAM,GAAA;QACJ,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACH,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,OAAO,EAAE,IAAI,CAAC,OAAO,KAAK,SAAS;AACnC,gBAAA,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI;gBACjB,YAAY,EAAE,IAAI,CAAC,SAAS;aAC7B,EACI,CAAA,CACF;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/spinner/spinner.scss?tag=ix-spinner&encapsulation=shadow","src/components/spinner/spinner.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'mixins/shadow-dom/component';\n\n@mixin ix-spinner($size-name: 'medium', $size: 2rem, $track-size: 4px) {\n :host {\n @include ix-component;\n display: block;\n position: relative;\n }\n\n .#{$size-name} {\n width: $size;\n height: $size;\n min-width: $size;\n min-height: $size;\n max-width: $size;\n max-height: $size;\n border-radius: 100%;\n position: relative;\n animation: rotate 2s linear infinite;\n\n @keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n }\n\n @keyframes clipMask {\n 0% {\n clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);\n }\n 12.5% {\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);\n }\n 25% {\n clip-path: polygon(\n 50% 50%,\n 0 0,\n 100% 0,\n 100% 100%,\n 100% 100%,\n 100% 100%\n );\n }\n 37.5% {\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);\n }\n 50% {\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);\n }\n 62.5% {\n clip-path: polygon(50% 50%, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0);\n }\n 75% {\n clip-path: polygon(\n 50% 50%,\n 100% 100%,\n 100% 100%,\n 100% 100%,\n 0 100%,\n 0 0\n );\n }\n 87.5% {\n clip-path: polygon(50% 50%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0);\n }\n 100% {\n clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);\n }\n }\n }\n\n .#{$size-name}::after {\n content: '';\n box-sizing: border-box;\n position: absolute;\n inset: 8.33%;\n border-radius: 100%;\n border: $track-size solid\n var(--ix-button-color, var(--theme-color-soft-text));\n animation: clipMask 3s linear infinite;\n }\n\n .#{$size-name}:not(.hide-track)::before {\n content: '';\n box-sizing: border-box;\n position: absolute;\n inset: 8.33%;\n border-radius: 100%;\n border: $track-size solid var(--theme-color-ghost--hover);\n }\n\n .primary::after {\n border-color: var(--theme-color-dynamic);\n }\n\n .primary::before {\n border-color: var(--theme-color-ghost--hover);\n }\n}\n\n@include ix-spinner($size-name: 'xx-small', $size: 0.75rem, $track-size: 1px);\n@include ix-spinner($size-name: 'x-small', $size: 1.25rem, $track-size: 2px);\n@include ix-spinner($size-name: 'small', $size: 1.5rem, $track-size: 2px);\n@include ix-spinner($size-name: 'medium', $size: 2rem, $track-size: 2px);\n@include ix-spinner($size-name: 'large', $size: 6rem, $track-size: 4px);\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, Element, h, Host, Prop } from '@stencil/core';\n\n@Component({\n tag: 'ix-spinner',\n styleUrl: 'spinner.scss',\n shadow: true,\n})\nexport class Spinner {\n @Element() hostElement!: HTMLIxSpinnerElement;\n\n /**\n * Variant of spinner\n */\n @Prop() variant: 'primary' | 'secondary' = 'secondary';\n\n /**\n * Size of spinner\n */\n @Prop() size: 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' =\n 'medium';\n\n /**\n * @internal\n */\n @Prop() hideTrack = false;\n\n render() {\n return (\n <Host>\n <div\n class={{\n primary: this.variant === 'primary',\n [this.size]: true,\n 'hide-track': this.hideTrack,\n }}\n ></div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, i as readTask, h, F as Fragment, d as Host } from './p-BuJ6BWIi.js';
|
|
2
|
+
import { B as BaseButton } from './p-9dLpp1OQ.js';
|
|
3
|
+
import { a as closestElement, h as hasSlottedElements } from './p-Bi1VyG64.js';
|
|
4
|
+
import { d as defineCustomElement$4 } from './p-C6o-AByw.js';
|
|
5
|
+
import { d as defineCustomElement$3 } from './p-Cut5OrRw.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './p-BygLxZIM.js';
|
|
7
|
+
import { d as defineCustomElement$1 } from './p-DyMgW0fR.js';
|
|
8
|
+
|
|
9
|
+
const avatarCss = ":host{display:flex;position:relative;width:-moz-fit-content;width:fit-content}: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 .avatar{display:flex;align-items:center}:host .avatar>.avatar-image{height:2rem;width:2rem;min-height:2rem;min-width:2rem;border-radius:100px}:host .avatar>.avatar-initials{display:flex;align-items:center;justify-content:center;height:2rem;width:2rem;min-height:2rem;min-width:2rem;border-radius:100px;background-color:var(--theme-avatar--background);color:var(--theme-avatar--color)}:host .avatar #avatar-path-background{fill:var(--theme-avatar--background)}:host .avatar #avatar-path-person{fill:var(--theme-avatar--color)}:host .user-info{display:flex;flex-direction:row;position:relative;height:2.5rem;padding:1rem;width:12.75rem;min-width:12.75rem;max-width:12.75rem;gap:1rem}:host .user-info .avatar{width:2rem;pointer-events:none}:host .user-info .user{display:flex;position:relative;flex-direction:column;justify-content:center;max-width:10rem;width:100%;overflow:hidden}:host .user-info .username{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .user-info .extra{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host(.avatar-button) button{all:unset;box-sizing:border-box;display:inline-flex;flex-direction:row;flex-wrap:nowrap;overflow:hidden;align-items:center;justify-content:center;width:100%;height:100%;padding:0 0.5rem;padding:0px;border-radius:100px !important}:host(.avatar-button) .btn-invisible-primary{border-radius:var(--theme-btn--border-radius)}:host(.avatar-button) .btn-invisible-primary,:host(.avatar-button) .btn-invisible-primary.focus,:host(.avatar-button) .btn-invisible-primary:focus-visible{background-color:var(--theme-btn-invisible-primary--background);color:var(--theme-btn-invisible-primary--color);--ix-button-color:var(--theme-btn-invisible-primary--color);border-color:transparent}:host(.avatar-button) .btn-invisible-primary:not(.disabled):not(:disabled):focus-visible{outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-btn--focus--outline-offset)}:host(.avatar-button) .btn-invisible-primary.selected{background-color:var(--theme-color-ghost--selected);color:var(--theme-color-dynamic)}:host(.avatar-button) .btn-invisible-primary.selected:not(.disabled):not(:disabled){cursor:pointer}:host(.avatar-button) .btn-invisible-primary.selected:not(.disabled):not(:disabled):hover,:host(.avatar-button) .btn-invisible-primary.selected:not(.disabled):not(:disabled).hover{background-color:var(--theme-color-ghost--selected-hover);color:var(--theme-color-dynamic)}:host(.avatar-button) .btn-invisible-primary.selected:not(.disabled):not(:disabled){cursor:pointer}:host(.avatar-button) .btn-invisible-primary.selected:not(.disabled):not(:disabled):active,:host(.avatar-button) .btn-invisible-primary.selected:not(.disabled):not(:disabled).active{background-color:var(--theme-color-ghost--selected-active);color:var(--theme-color-dynamic)}:host(.avatar-button) .btn-invisible-primary:not(.disabled):not(:disabled){cursor:pointer}:host(.avatar-button) .btn-invisible-primary:not(.disabled):not(:disabled):hover,:host(.avatar-button) .btn-invisible-primary:not(.disabled):not(:disabled).hover{background-color:var(--theme-btn-invisible-primary--background--hover);color:var(--theme-btn-invisible-primary--color--hover)}:host(.avatar-button) .btn-invisible-primary:not(.disabled):not(:disabled){cursor:pointer}:host(.avatar-button) .btn-invisible-primary:not(.disabled):not(:disabled):active,:host(.avatar-button) .btn-invisible-primary:not(.disabled):not(:disabled).active{background-color:var(--theme-btn-invisible-primary--background--active);color:var(--theme-btn-invisible-primary--color--active)}:host(.avatar-button) .avatar{transform:scale(0.8)}";
|
|
10
|
+
|
|
11
|
+
function DefaultAvatar(props) {
|
|
12
|
+
const { initials } = props;
|
|
13
|
+
if (initials) {
|
|
14
|
+
return h("div", { class: 'avatar-initials' }, initials);
|
|
15
|
+
}
|
|
16
|
+
return (h("svg", { class: 'avatar-image', xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 32 32" }, h("g", { fill: "none", "fill-rule": "evenodd" }, h("path", { id: "avatar-path-background", d: "M16 0C7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163\n 16-16c0-4.243-1.686-8.313-4.686-11.314C24.314 1.686 20.244 0 16 0z" }), h("path", { id: "avatar-path-person", d: "M17.897 17.91c3.8-.018 7.358 1.875 9.485 5.046-2.417 3.999-6.734 6.434-11.382\n 6.42-4.648.014-8.965-2.421-11.382-6.42 2.127-3.171 5.685-5.064\n 9.485-5.045h3.794zM15.821 2.129c3.682 0 6.667 2.984 6.667 6.666 0 3.682-2.985\n 6.667-6.667 6.667s-6.667-2.985-6.667-6.667 2.985-6.666 6.667-6.666z" }))));
|
|
17
|
+
}
|
|
18
|
+
function AvatarImage(props) {
|
|
19
|
+
return (h("div", { class: "avatar" }, props.image ? (h("img", { src: props.image, class: "avatar-image" })) : (h(DefaultAvatar, { initials: props.initials }))));
|
|
20
|
+
}
|
|
21
|
+
function UserInfo(props) {
|
|
22
|
+
return (h(Fragment, null, h("div", { class: "user-info", onClick: (event) => event.preventDefault() }, h(AvatarImage, { image: props.image, initials: props.initials }), h("div", { class: "user" }, h("div", { class: "username" }, props.userName), props.extra && (h("ix-typography", { class: "extra", "text-color": 'soft' }, props.extra))))));
|
|
23
|
+
}
|
|
24
|
+
const Avatar = /*@__PURE__*/ proxyCustomElement(class Avatar extends H {
|
|
25
|
+
constructor() {
|
|
26
|
+
super();
|
|
27
|
+
this.__registerHost();
|
|
28
|
+
this.__attachShadow();
|
|
29
|
+
this.isClosestApplicationHeader = false;
|
|
30
|
+
this.hasSlottedElements = false;
|
|
31
|
+
}
|
|
32
|
+
componentWillLoad() {
|
|
33
|
+
const closest = closestElement('ix-application-header', this.hostElement);
|
|
34
|
+
this.isClosestApplicationHeader = closest !== null;
|
|
35
|
+
}
|
|
36
|
+
async slottedChanged() {
|
|
37
|
+
this.hasSlottedElements = hasSlottedElements(this.slotElement);
|
|
38
|
+
}
|
|
39
|
+
resolveAvatarTrigger() {
|
|
40
|
+
return new Promise((resolve, reject) => {
|
|
41
|
+
readTask(() => {
|
|
42
|
+
const button = this.hostElement.shadowRoot.querySelector('button');
|
|
43
|
+
if (button) {
|
|
44
|
+
resolve(button);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
reject(new Error('ix-avatar - trigger element not found'));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
onDropdownClick(event) {
|
|
53
|
+
if (event.target === this.dropdownElement) {
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
render() {
|
|
58
|
+
if (this.isClosestApplicationHeader) {
|
|
59
|
+
return (h(Host, { slot: "ix-application-header-avatar", class: 'avatar-button' }, h(BaseButton, { disabled: false, ghost: true, iconOval: false, icon: undefined, iconOnly: false, loading: false, outline: false, selected: false, type: "button", variant: "primary" }, h(AvatarImage, { image: this.image, initials: this.initials })), h("ix-dropdown", { ref: (ref) => (this.dropdownElement = ref), trigger: this.resolveAvatarTrigger(), class: "avatar-dropdown", onClick: (e) => this.onDropdownClick(e) }, this.username && (h(Fragment, null, h(UserInfo, { extra: this.extra, image: this.image, initials: this.initials, userName: this.username }), this.hasSlottedElements && (h("ix-divider", { onClick: (e) => e.preventDefault() })))), h("slot", { onSlotchange: () => this.slottedChanged(), ref: (ref) => (this.slotElement = ref) }))));
|
|
60
|
+
}
|
|
61
|
+
return (h(Host, null, h(AvatarImage, { image: this.image, initials: this.initials })));
|
|
62
|
+
}
|
|
63
|
+
get hostElement() { return this; }
|
|
64
|
+
static get style() { return avatarCss; }
|
|
65
|
+
}, [1, "ix-avatar", {
|
|
66
|
+
"image": [1],
|
|
67
|
+
"initials": [1],
|
|
68
|
+
"username": [1],
|
|
69
|
+
"extra": [1],
|
|
70
|
+
"isClosestApplicationHeader": [32],
|
|
71
|
+
"hasSlottedElements": [32]
|
|
72
|
+
}]);
|
|
73
|
+
function defineCustomElement() {
|
|
74
|
+
if (typeof customElements === "undefined") {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const components = ["ix-avatar", "ix-divider", "ix-dropdown", "ix-spinner", "ix-typography"];
|
|
78
|
+
components.forEach(tagName => { switch (tagName) {
|
|
79
|
+
case "ix-avatar":
|
|
80
|
+
if (!customElements.get(tagName)) {
|
|
81
|
+
customElements.define(tagName, Avatar);
|
|
82
|
+
}
|
|
83
|
+
break;
|
|
84
|
+
case "ix-divider":
|
|
85
|
+
if (!customElements.get(tagName)) {
|
|
86
|
+
defineCustomElement$4();
|
|
87
|
+
}
|
|
88
|
+
break;
|
|
89
|
+
case "ix-dropdown":
|
|
90
|
+
if (!customElements.get(tagName)) {
|
|
91
|
+
defineCustomElement$3();
|
|
92
|
+
}
|
|
93
|
+
break;
|
|
94
|
+
case "ix-spinner":
|
|
95
|
+
if (!customElements.get(tagName)) {
|
|
96
|
+
defineCustomElement$2();
|
|
97
|
+
}
|
|
98
|
+
break;
|
|
99
|
+
case "ix-typography":
|
|
100
|
+
if (!customElements.get(tagName)) {
|
|
101
|
+
defineCustomElement$1();
|
|
102
|
+
}
|
|
103
|
+
break;
|
|
104
|
+
} });
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export { Avatar as A, defineCustomElement as d };
|
|
108
|
+
//# sourceMappingURL=p-Bzyt4nTL.js.map
|
|
109
|
+
|
|
110
|
+
//# sourceMappingURL=p-Bzyt4nTL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-Bzyt4nTL.js","mappings":";;;;;;;;AAAA,MAAM,SAAS,GAAG,g0IAAg0I;;ACsBl1I,SAAS,aAAa,CAAC,KAA4B,EAAA;AACjD,IAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK;IAE1B,IAAI,QAAQ,EAAE;AACZ,QAAA,OAAO,WAAK,KAAK,EAAE,iBAAiB,EAAG,EAAA,QAAQ,CAAO;;AAGxD,IAAA,QACE,WACE,KAAK,EAAE,cAAc,EACrB,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EAAA,EAEnB,CAAA,CAAA,GAAA,EAAA,EAAG,IAAI,EAAC,MAAM,EAAA,WAAA,EAAW,SAAS,EAAA,EAChC,CAAA,CAAA,MAAA,EAAA,EACE,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C,WAAW,EAAA,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAI,CAChD,EACb,CAAA,CAAA,aAAA,EAAA,EACE,GAAG,EAAE,CAAC,GAAG,MAAM,IAAI,CAAC,eAAe,GAAG,GAA4B,CAAC,EACnE,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,EACpC,KAAK,EAAC,iBAAiB,EACvB,OAAO,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAA,EAEtC,IAAI,CAAC,QAAQ,KACZ,EAAC,QAAQ,EAAA,IAAA,EACP,CAAC,CAAA,QAAQ,EACP,EAAA,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,CAAA,EACD,IAAI,CAAC,kBAAkB,KACtB,CAAY,CAAA,YAAA,EAAA,EAAA,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,EAAE,EAAe,CAAA,CAC9D,CACQ,CACZ,EACD,CAAA,CAAA,MAAA,EAAA,EACE,YAAY,EAAE,MAAM,IAAI,CAAC,cAAc,EAAE,EACzC,GAAG,EAAE,CAAC,GAAG,MAAM,IAAI,CAAC,WAAW,GAAG,GAAsB,CAAC,EACnD,CAAA,CACI,CACT;;QAIX,QACE,EAAC,IAAI,EAAA,IAAA,EACH,CAAA,CAAC,WAAW,EAAC,EAAA,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAI,CAAA,CACtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/avatar/avatar.scss?tag=ix-avatar&encapsulation=shadow","src/components/avatar/avatar.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/text-truncation';\n@import 'mixins/hover';\n@import './../button/button-mixin';\n@import 'mixins/scrollbar';\n\n:host {\n @include scrollbar();\n display: flex;\n position: relative;\n width: fit-content;\n\n .avatar {\n display: flex;\n align-items: center;\n\n > .avatar-image {\n height: 2rem;\n width: 2rem;\n min-height: 2rem;\n min-width: 2rem;\n border-radius: 100px;\n }\n\n > .avatar-initials {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 2rem;\n width: 2rem;\n min-height: 2rem;\n min-width: 2rem;\n border-radius: 100px;\n background-color: var(--theme-avatar--background);\n color: var(--theme-avatar--color);\n }\n\n #avatar-path-background {\n fill: var(--theme-avatar--background);\n }\n\n #avatar-path-person {\n fill:var(--theme-avatar--color);\n }\n }\n}\n\n:host {\n .user-info {\n display: flex;\n flex-direction: row;\n position: relative;\n height: 2.5rem;\n padding: 1rem;\n width: 12.75rem;\n min-width: 12.75rem;\n max-width: 12.75rem;\n\n gap: 1rem;\n\n .avatar {\n width: 2rem;\n pointer-events: none;\n }\n\n .user {\n display: flex;\n position: relative;\n flex-direction: column;\n justify-content: center;\n max-width: 10rem;\n width: 100%;\n overflow: hidden;\n }\n\n .username {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .extra {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n}\n\n:host(.avatar-button) {\n button {\n @include btn-base;\n padding: 0px;\n\n border-radius: 100px !important;\n }\n\n @include btn-base-variant('invisible-primary', false);\n\n .avatar {\n transform: scale(0.8);\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 Fragment,\n h,\n Host,\n Prop,\n readTask,\n State,\n} from '@stencil/core';\nimport { BaseButton } from '../button/base-button';\nimport { closestElement, hasSlottedElements } from '../utils/shadow-dom';\n\nfunction DefaultAvatar(props: { initials?: string }) {\n const { initials } = props;\n\n if (initials) {\n return <div class={'avatar-initials'}>{initials}</div>;\n }\n\n return (\n <svg\n class={'avatar-image'}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 32 32\"\n >\n <g fill=\"none\" fill-rule=\"evenodd\">\n <path\n id=\"avatar-path-background\"\n d=\"M16 0C7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163\n 16-16c0-4.243-1.686-8.313-4.686-11.314C24.314 1.686 20.244 0 16 0z\"\n />\n <path\n id=\"avatar-path-person\"\n d=\"M17.897 17.91c3.8-.018 7.358 1.875 9.485 5.046-2.417 3.999-6.734 6.434-11.382\n 6.42-4.648.014-8.965-2.421-11.382-6.42 2.127-3.171 5.685-5.064\n 9.485-5.045h3.794zM15.821 2.129c3.682 0 6.667 2.984 6.667 6.666 0 3.682-2.985\n 6.667-6.667 6.667s-6.667-2.985-6.667-6.667 2.985-6.666 6.667-6.666z\"\n />\n </g>\n </svg>\n );\n}\n\nfunction AvatarImage(props: { image?: string; initials?: string }) {\n return (\n <div class=\"avatar\">\n {props.image ? (\n <img src={props.image} class=\"avatar-image\"></img>\n ) : (\n <DefaultAvatar initials={props.initials} />\n )}\n </div>\n );\n}\n\nfunction UserInfo(props: {\n image?: string;\n initials?: string;\n userName: string;\n extra?: string;\n}) {\n return (\n <Fragment>\n <div class=\"user-info\" onClick={(event) => event.preventDefault()}>\n <AvatarImage image={props.image} initials={props.initials} />\n <div class=\"user\">\n <div class=\"username\">{props.userName}</div>\n {props.extra && (\n <ix-typography class=\"extra\" text-color={'soft'}>\n {props.extra}\n </ix-typography>\n )}\n </div>\n </div>\n </Fragment>\n );\n}\n\n@Component({\n tag: 'ix-avatar',\n styleUrl: 'avatar.scss',\n shadow: true,\n})\nexport class Avatar {\n @Element() hostElement!: HTMLIxAvatarElement;\n\n /**\n * Display an avatar image\n *\n */\n @Prop() image?: string;\n\n /**\n * Display the initials of the user. Will be overwritten by image\n *\n */\n @Prop() initials?: string;\n\n /**\n * If set an info card displaying the username will be placed inside the dropdown.\n * Note: Only working if avatar is part of the ix-application-header\n */\n @Prop() username?: string;\n\n /**\n * Optional description text that will be displayed underneath the username.\n * Note: Only working if avatar is part of the ix-application-header\n */\n @Prop() extra?: string;\n\n @State() isClosestApplicationHeader = false;\n @State() hasSlottedElements = false;\n\n private slotElement?: HTMLSlotElement;\n private dropdownElement?: HTMLIxDropdownElement;\n\n componentWillLoad() {\n const closest = closestElement('ix-application-header', this.hostElement);\n this.isClosestApplicationHeader = closest !== null;\n }\n\n private async slottedChanged() {\n this.hasSlottedElements = hasSlottedElements(this.slotElement);\n }\n\n private resolveAvatarTrigger() {\n return new Promise<HTMLElement>((resolve, reject) => {\n readTask(() => {\n const button = this.hostElement.shadowRoot!.querySelector('button');\n if (button) {\n resolve(button);\n } else {\n reject(new Error('ix-avatar - trigger element not found'));\n }\n });\n });\n }\n\n private onDropdownClick(event: MouseEvent) {\n if (event.target === this.dropdownElement) {\n event.preventDefault();\n }\n }\n\n render() {\n if (this.isClosestApplicationHeader) {\n return (\n <Host slot=\"ix-application-header-avatar\" class={'avatar-button'}>\n <BaseButton\n disabled={false}\n ghost={true}\n iconOval={false}\n icon={undefined}\n iconOnly={false}\n loading={false}\n outline={false}\n selected={false}\n type=\"button\"\n variant=\"primary\"\n >\n <AvatarImage image={this.image} initials={this.initials} />\n </BaseButton>\n <ix-dropdown\n ref={(ref) => (this.dropdownElement = ref as HTMLIxDropdownElement)}\n trigger={this.resolveAvatarTrigger()}\n class=\"avatar-dropdown\"\n onClick={(e) => this.onDropdownClick(e)}\n >\n {this.username && (\n <Fragment>\n <UserInfo\n extra={this.extra}\n image={this.image}\n initials={this.initials}\n userName={this.username}\n />\n {this.hasSlottedElements && (\n <ix-divider onClick={(e) => e.preventDefault()}></ix-divider>\n )}\n </Fragment>\n )}\n <slot\n onSlotchange={() => this.slottedChanged()}\n ref={(ref) => (this.slotElement = ref as HTMLSlotElement)}\n ></slot>\n </ix-dropdown>\n </Host>\n );\n }\n\n return (\n <Host>\n <AvatarImage image={this.image} initials={this.initials} />\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h, d as Host } from './p-BuJ6BWIi.js';
|
|
2
|
+
|
|
3
|
+
const dividerCss = ":host{display:block;position:relative;width:100%;border-bottom:0.0625rem solid var(--theme-color-x-weak-bdr);margin:0.25rem 0px}";
|
|
4
|
+
|
|
5
|
+
const Divider = /*@__PURE__*/ proxyCustomElement(class Divider extends H {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return h(Host, { key: '0c6086308949d16f0ed1c1b88ccdfdbeac537294' });
|
|
13
|
+
}
|
|
14
|
+
static get style() { return dividerCss; }
|
|
15
|
+
}, [1, "ix-divider"]);
|
|
16
|
+
function defineCustomElement() {
|
|
17
|
+
if (typeof customElements === "undefined") {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const components = ["ix-divider"];
|
|
21
|
+
components.forEach(tagName => { switch (tagName) {
|
|
22
|
+
case "ix-divider":
|
|
23
|
+
if (!customElements.get(tagName)) {
|
|
24
|
+
customElements.define(tagName, Divider);
|
|
25
|
+
}
|
|
26
|
+
break;
|
|
27
|
+
} });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { Divider as D, defineCustomElement as d };
|
|
31
|
+
//# sourceMappingURL=p-C6o-AByw.js.map
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=p-C6o-AByw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-C6o-AByw.js","mappings":";;AAAA,MAAM,UAAU,GAAG,kIAAkI;;MCexI,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA;;;;;;IAClB,MAAM,GAAA;QACJ,OAAO,CAAA,CAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/divider/divider.scss?tag=ix-divider&encapsulation=shadow","src/components/divider/divider.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: block;\n position: relative;\n\n width: 100%;\n border-bottom: 0.0625rem solid var(--theme-color-x-weak-bdr);\n margin: 0.25rem 0px;\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Component, h, Host } from '@stencil/core';\n\n@Component({\n tag: 'ix-divider',\n styleUrl: 'divider.scss',\n shadow: true,\n})\nexport class Divider {\n render() {\n return <Host></Host>;\n }\n}\n"],"version":3}
|