@siemens/ix 1.5.0-beta.1 → 1.5.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index-478a4b66.js.map +1 -1
- package/dist/cjs/ix-blind.cjs.entry.js +24 -6
- package/dist/cjs/ix-blind.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-category-filter.cjs.entry.js +17 -3
- package/dist/cjs/ix-category-filter.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-date-picker_2.cjs.entry.js +62 -43
- package/dist/cjs/ix-date-picker_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-datetime-picker.cjs.entry.js +2 -2
- package/dist/cjs/ix-datetime-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-dropdown_2.cjs.entry.js +4 -3
- package/dist/cjs/ix-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-group_3.cjs.entry.js +33 -11
- package/dist/cjs/ix-group_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-modal_2.cjs.entry.js +17 -5
- package/dist/cjs/ix-modal_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-pagination.cjs.entry.js +17 -9
- package/dist/cjs/ix-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-select_2.cjs.entry.js +54 -35
- package/dist/cjs/ix-select_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-toggle.cjs.entry.js +1 -1
- package/dist/cjs/ix-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-tooltip.cjs.entry.js +34 -10
- package/dist/cjs/ix-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-workflow-step_2.cjs.entry.js +51 -36
- package/dist/cjs/ix-workflow-step_2.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/siemens-ix.cjs.js +2 -2
- package/dist/cjs/siemens-ix.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/blind/blind.css +10 -2
- package/dist/collection/components/blind/blind.js +12 -5
- package/dist/collection/components/blind/blind.js.map +1 -1
- package/dist/collection/components/category-filter/category-filter.js +17 -3
- package/dist/collection/components/category-filter/category-filter.js.map +1 -1
- package/dist/collection/components/date-picker/date-picker.css +3 -0
- package/dist/collection/components/date-picker/date-picker.js +64 -45
- package/dist/collection/components/date-picker/date-picker.js.map +1 -1
- package/dist/collection/components/datetime-picker/datetime-picker.css +6 -5
- package/dist/collection/components/datetime-picker/datetime-picker.js +1 -1
- package/dist/collection/components/datetime-picker/datetime-picker.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown.js +2 -1
- package/dist/collection/components/dropdown/dropdown.js.map +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.css +0 -1
- package/dist/collection/components/dropdown-item/dropdown-item.js +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.js.map +1 -1
- package/dist/collection/components/group/group.css +21 -12
- package/dist/collection/components/group/group.js +34 -10
- package/dist/collection/components/group/group.js.map +1 -1
- package/dist/collection/components/group-item/group-item.css +8 -4
- package/dist/collection/components/modal/modal.js +6 -1
- package/dist/collection/components/modal/modal.js.map +1 -1
- package/dist/collection/components/modal-container/modal-container.js +11 -4
- package/dist/collection/components/modal-container/modal-container.js.map +1 -1
- package/dist/collection/components/pagination/pagination.css +1 -1
- package/dist/collection/components/pagination/pagination.js +17 -9
- package/dist/collection/components/pagination/pagination.js.map +1 -1
- package/dist/collection/components/select/select.css +4 -1
- package/dist/collection/components/select/select.js +96 -34
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/select-item/select-item.css +0 -3
- package/dist/collection/components/select-item/select-item.js +1 -1
- package/dist/collection/components/select-item/select-item.js.map +1 -1
- package/dist/collection/components/toggle/toggle.css +7 -4
- package/dist/collection/components/tooltip/tooltip.js +55 -10
- package/dist/collection/components/tooltip/tooltip.js.map +1 -1
- package/dist/collection/components/utils/a11y.js +10 -0
- package/dist/collection/components/utils/a11y.js.map +1 -0
- package/dist/collection/components/workflow-step/workflow-step.css +6 -3
- package/dist/collection/components/workflow-step/workflow-step.js +45 -6
- package/dist/collection/components/workflow-step/workflow-step.js.map +1 -1
- package/dist/collection/components/workflow-steps/workflow-steps.css +0 -3
- package/dist/collection/components/workflow-steps/workflow-steps.js +48 -39
- package/dist/collection/components/workflow-steps/workflow-steps.js.map +1 -1
- package/dist/collection/tests/utils/test/page.js +29 -1
- package/dist/collection/tests/utils/test/page.js.map +1 -1
- package/dist/components/application-header.js +1 -1
- package/dist/components/burger-menu.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/date-picker.js +63 -44
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/date-time-card.js +1 -1
- package/dist/components/dropdown-item.js +3 -3
- package/dist/components/dropdown-item.js.map +1 -1
- package/dist/components/dropdown.js +3 -2
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/filter-chip.js +1 -1
- package/dist/components/group-context-menu.js +1 -1
- package/dist/components/group-item.js +2 -2
- package/dist/components/group-item.js.map +1 -1
- package/dist/components/icon-button.js +1 -1
- package/dist/components/icon.js +1 -1
- package/dist/components/index-button.js +1 -1
- package/dist/components/ix-animated-tab.js +1 -1
- package/dist/components/ix-animated-tabs.js +1 -1
- package/dist/components/ix-basic-navigation.js +1 -1
- package/dist/components/ix-blind.js +26 -7
- package/dist/components/ix-blind.js.map +1 -1
- package/dist/components/ix-breadcrumb-item.js +1 -1
- package/dist/components/ix-breadcrumb.js +1 -1
- package/dist/components/ix-category-filter.js +18 -4
- package/dist/components/ix-category-filter.js.map +1 -1
- package/dist/components/ix-chip.js +1 -1
- package/dist/components/ix-counter-pill.js +1 -1
- package/dist/components/ix-datetime-picker.js +3 -3
- package/dist/components/ix-datetime-picker.js.map +1 -1
- package/dist/components/ix-divider.js +1 -1
- package/dist/components/ix-drawer.js +1 -1
- package/dist/components/ix-dropdown-button.js +1 -1
- package/dist/components/ix-dropdown-quick-actions.js +1 -1
- package/dist/components/ix-event-list-item.js +1 -1
- package/dist/components/ix-event-list.js +1 -1
- package/dist/components/ix-expanding-search.js +1 -1
- package/dist/components/ix-flip-tile-content.js +1 -1
- package/dist/components/ix-flip-tile.js +1 -1
- package/dist/components/ix-group-dropdown-item.js +1 -1
- package/dist/components/ix-group.js +36 -12
- package/dist/components/ix-group.js.map +1 -1
- package/dist/components/ix-input-group.js +1 -1
- package/dist/components/ix-kpi.js +1 -1
- package/dist/components/ix-map-navigation.js +1 -1
- package/dist/components/ix-menu-about-item.js +1 -1
- package/dist/components/ix-menu-about-news.js +1 -1
- package/dist/components/ix-menu-about.js +1 -1
- package/dist/components/ix-menu-avatar.js +1 -1
- package/dist/components/ix-menu-settings-item.js +1 -1
- package/dist/components/ix-menu-settings.js +1 -1
- package/dist/components/ix-menu.js +1 -1
- package/dist/components/ix-message-bar.js +1 -1
- package/dist/components/ix-modal-example.js +1 -1
- package/dist/components/ix-pagination.js +18 -10
- package/dist/components/ix-pagination.js.map +1 -1
- package/dist/components/ix-pill.js +1 -1
- package/dist/components/ix-split-button-item.js +1 -1
- package/dist/components/ix-split-button.js +1 -1
- package/dist/components/ix-tile.js +1 -1
- package/dist/components/ix-toast-container.js +1 -1
- package/dist/components/ix-toggle.js +2 -2
- package/dist/components/ix-toggle.js.map +1 -1
- package/dist/components/ix-tooltip.js +36 -11
- package/dist/components/ix-tooltip.js.map +1 -1
- package/dist/components/ix-tree.js +1 -1
- package/dist/components/ix-upload.js +1 -1
- package/dist/components/ix-validation-tooltip.js +1 -1
- package/dist/components/ix-workflow-step.js +10 -4
- package/dist/components/ix-workflow-step.js.map +1 -1
- package/dist/components/ix-workflow-steps.js +45 -36
- package/dist/components/ix-workflow-steps.js.map +1 -1
- package/dist/components/map-navigation-overlay.js +1 -1
- package/dist/components/menu-avatar-item.js +1 -1
- package/dist/components/menu-item.js +1 -1
- package/dist/components/modal-container.js +12 -5
- package/dist/components/modal-container.js.map +1 -1
- package/dist/components/modal.js +7 -2
- package/dist/components/modal.js.map +1 -1
- package/dist/components/my-component.js +1 -1
- package/dist/components/select-item.js +3 -3
- package/dist/components/select-item.js.map +1 -1
- package/dist/components/select.js +55 -34
- package/dist/components/select.js.map +1 -1
- package/dist/components/spinner.js +1 -1
- package/dist/components/tab-item.js +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/tree-item.js +1 -1
- package/dist/components/typography.js +1 -1
- package/dist/esm/index-3d163acd.js.map +1 -1
- package/dist/esm/ix-blind.entry.js +24 -6
- package/dist/esm/ix-blind.entry.js.map +1 -1
- package/dist/esm/ix-category-filter.entry.js +17 -3
- package/dist/esm/ix-category-filter.entry.js.map +1 -1
- package/dist/esm/ix-date-picker_2.entry.js +62 -43
- package/dist/esm/ix-date-picker_2.entry.js.map +1 -1
- package/dist/esm/ix-datetime-picker.entry.js +2 -2
- package/dist/esm/ix-datetime-picker.entry.js.map +1 -1
- package/dist/esm/ix-dropdown_2.entry.js +4 -3
- package/dist/esm/ix-dropdown_2.entry.js.map +1 -1
- package/dist/esm/ix-group_3.entry.js +33 -11
- package/dist/esm/ix-group_3.entry.js.map +1 -1
- package/dist/esm/ix-modal_2.entry.js +17 -5
- package/dist/esm/ix-modal_2.entry.js.map +1 -1
- package/dist/esm/ix-pagination.entry.js +18 -10
- package/dist/esm/ix-pagination.entry.js.map +1 -1
- package/dist/esm/ix-select_2.entry.js +54 -35
- package/dist/esm/ix-select_2.entry.js.map +1 -1
- package/dist/esm/ix-toggle.entry.js +1 -1
- package/dist/esm/ix-toggle.entry.js.map +1 -1
- package/dist/esm/ix-tooltip.entry.js +34 -10
- package/dist/esm/ix-tooltip.entry.js.map +1 -1
- package/dist/esm/ix-workflow-step_2.entry.js +52 -37
- package/dist/esm/ix-workflow-step_2.entry.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/siemens-ix.js +2 -2
- package/dist/esm/siemens-ix.js.map +1 -1
- package/dist/siemens-ix/{p-41f0a2b2.entry.js → p-2ea2fc07.entry.js} +2 -2
- package/dist/siemens-ix/{p-41f0a2b2.entry.js.map → p-2ea2fc07.entry.js.map} +1 -1
- package/dist/siemens-ix/p-33160fe4.entry.js +2 -0
- package/dist/siemens-ix/p-33160fe4.entry.js.map +1 -0
- package/dist/siemens-ix/p-4c8d5207.entry.js +2 -0
- package/dist/siemens-ix/p-4c8d5207.entry.js.map +1 -0
- package/dist/siemens-ix/p-53c69375.entry.js +2 -0
- package/dist/siemens-ix/p-53c69375.entry.js.map +1 -0
- package/dist/siemens-ix/p-626b3af5.entry.js +2 -0
- package/dist/siemens-ix/p-626b3af5.entry.js.map +1 -0
- package/dist/siemens-ix/p-663724a8.entry.js +2 -0
- package/dist/siemens-ix/p-663724a8.entry.js.map +1 -0
- package/dist/siemens-ix/p-7fb5fa79.entry.js +2 -0
- package/dist/siemens-ix/p-7fb5fa79.entry.js.map +1 -0
- package/dist/siemens-ix/p-8fcd6f85.js.map +1 -1
- package/dist/siemens-ix/p-b998abe4.entry.js +2 -0
- package/dist/siemens-ix/p-b998abe4.entry.js.map +1 -0
- package/dist/siemens-ix/{p-24d2d95e.entry.js → p-c9c9f2b5.entry.js} +2 -2
- package/dist/siemens-ix/p-c9c9f2b5.entry.js.map +1 -0
- package/dist/siemens-ix/p-caae2fa5.entry.js +2 -0
- package/dist/siemens-ix/p-caae2fa5.entry.js.map +1 -0
- package/dist/siemens-ix/{p-01f9f803.entry.js → p-cdb54f7c.entry.js} +2 -2
- package/dist/siemens-ix/p-cdb54f7c.entry.js.map +1 -0
- package/dist/siemens-ix/{p-28f50519.entry.js → p-eb799bdd.entry.js} +2 -2
- package/dist/siemens-ix/p-eb799bdd.entry.js.map +1 -0
- package/dist/siemens-ix/siemens-ix.css +15 -0
- package/dist/siemens-ix/siemens-ix.esm.js +1 -1
- package/dist/siemens-ix/siemens-ix.esm.js.map +1 -1
- package/dist/types/components/blind/blind.d.ts +1 -0
- package/dist/types/components/category-filter/category-filter.d.ts +1 -0
- package/dist/types/components/date-picker/date-picker.d.ts +4 -3
- package/dist/types/components/group/group.d.ts +4 -0
- package/dist/types/components/modal/modal.d.ts +1 -0
- package/dist/types/components/modal-container/modal-container.d.ts +1 -0
- package/dist/types/components/pagination/pagination.d.ts +2 -0
- package/dist/types/components/select/select.d.ts +17 -1
- package/dist/types/components/tooltip/tooltip.d.ts +8 -0
- package/dist/types/components/utils/a11y.d.ts +1 -0
- package/dist/types/components/workflow-step/workflow-step.d.ts +9 -1
- package/dist/types/components/workflow-steps/workflow-steps.d.ts +6 -2
- package/dist/types/components.d.ts +49 -9
- package/dist/types/tests/utils/test/page.d.ts +5 -0
- package/loader/index.d.ts +1 -1
- package/package.json +5 -5
- package/scss/components/_forms.scss +6 -0
- package/dist/siemens-ix/p-01f9f803.entry.js.map +0 -1
- package/dist/siemens-ix/p-030078b4.entry.js +0 -2
- package/dist/siemens-ix/p-030078b4.entry.js.map +0 -1
- package/dist/siemens-ix/p-24d2d95e.entry.js.map +0 -1
- package/dist/siemens-ix/p-28f50519.entry.js.map +0 -1
- package/dist/siemens-ix/p-446a0a3f.entry.js +0 -2
- package/dist/siemens-ix/p-446a0a3f.entry.js.map +0 -1
- package/dist/siemens-ix/p-58ef1328.entry.js +0 -2
- package/dist/siemens-ix/p-58ef1328.entry.js.map +0 -1
- package/dist/siemens-ix/p-6facc3cc.entry.js +0 -2
- package/dist/siemens-ix/p-6facc3cc.entry.js.map +0 -1
- package/dist/siemens-ix/p-73f7ef87.entry.js +0 -2
- package/dist/siemens-ix/p-73f7ef87.entry.js.map +0 -1
- package/dist/siemens-ix/p-a4178e26.entry.js +0 -2
- package/dist/siemens-ix/p-a4178e26.entry.js.map +0 -1
- package/dist/siemens-ix/p-a92126b5.entry.js +0 -2
- package/dist/siemens-ix/p-a92126b5.entry.js.map +0 -1
- package/dist/siemens-ix/p-b64e82ce.entry.js +0 -2
- package/dist/siemens-ix/p-b64e82ce.entry.js.map +0 -1
|
@@ -4,7 +4,7 @@ import { d as defineCustomElement$4 } from './icon.js';
|
|
|
4
4
|
import { d as defineCustomElement$3 } from './icon-button.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './toast.js';
|
|
6
6
|
|
|
7
|
-
const ToastContainer = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
const ToastContainer = /*@__PURE__*/ proxyCustomElement(class ToastContainer extends HTMLElement {
|
|
8
8
|
constructor() {
|
|
9
9
|
super();
|
|
10
10
|
this.__registerHost();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const toggleCss = ".sc-ix-toggle-h{display:flex;align-items:center;outline:none}.sc-ix-toggle-h .switch.sc-ix-toggle{position:relative;display:inline-flex;align-items:center;min-width:3rem;height:2rem}.sc-ix-toggle-h .switch.sc-ix-toggle:not(.disabled):not(:disabled):focus-visible{outline-color:var(--focus--border-color);outline-style:solid;outline-width:1px}.sc-ix-toggle-h .switch.sc-ix-toggle input.sc-ix-toggle{opacity:0;width:0;height:0}.sc-ix-toggle-h .slider.sc-ix-toggle{display:flex;align-items:center;justify-content:center;position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0}.sc-ix-toggle-h .slider.sc-ix-toggle .slider-track.sc-ix-toggle{background-color:var(--theme-switch-off--background);border-radius:2.125rem;border:1px solid var(--theme-switch-off--border-color);width:2.5rem;height:1rem}.sc-ix-toggle-h .slider.sc-ix-toggle:before{position:absolute;content:\"\";height:1.5rem;width:1.5rem;left:0.125rem;background-color:var(--theme-switch-thumb-off--background);transition:transform 150ms;border-radius:50%;border:1px solid var(--theme-switch-thumb-off--border-color);box-shadow:var(--theme-switch-thumb--box-shadow)}.sc-ix-toggle-h input.sc-ix-toggle:checked+.slider.sc-ix-toggle:before{transform:translateX(1.125rem);left:0.25rem}.sc-ix-toggle-h .text.sc-ix-toggle{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--theme-switch--color);padding:0 0.5rem;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.sc-ix-toggle-h:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-off--background--hover);border-color:var(--theme-switch-thumb-off--border-color--hover)}.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .slider-track.sc-ix-toggle{background-color:var(--theme-switch-off--background--hover);border-color:var(--theme-switch-off--border-color--hover)}.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .text.sc-ix-toggle{color:var(--theme-switch--color--hover)}.sc-ix-toggle-h:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-toggle-h:not(.disabled):not(:disabled):active .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-off--background--active);border-color:var(--theme-switch-thumb-off--border-color--active)}.sc-ix-toggle-h:not(.disabled):not(:disabled):active .slider-track.sc-ix-toggle{background-color:var(--theme-switch-off--background--active);border-color:var(--theme-switch-off--border-color--active)}.sc-ix-toggle-h:not(.disabled):not(:disabled):active .text.sc-ix-toggle{color:var(--theme-switch--color--active)}.checked.sc-ix-toggle-h .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-on--background);border-color:var(--theme-switch-thumb-on--border-color)}.checked.sc-ix-toggle-h .slider.sc-ix-toggle .slider-track.sc-ix-toggle{background-color:var(--theme-switch-on--background);border-color:var(--theme-switch-on--border-color)}.checked.sc-ix-toggle-h .text.sc-ix-toggle{color:var(--theme-switch--color)}.checked.sc-ix-toggle-h:not(.disabled):not(:disabled){cursor:pointer}.checked.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-on--background--hover);border-color:var(--theme-switch-thumb-on--border-color--hover)}.checked.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .slider.sc-ix-toggle .slider-track.sc-ix-toggle{background-color:var(--theme-switch-on--background--hover);border-color:var(--theme-switch-on--border-color--hover)}.checked.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .text.sc-ix-toggle{color:var(--theme-switch--color--hover)}.checked.sc-ix-toggle-h:not(.disabled):not(:disabled){cursor:pointer}.checked.sc-ix-toggle-h:not(.disabled):not(:disabled):active .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-on--background--active);border-color:var(--theme-switch-thumb-on--border-color--active)}.checked.sc-ix-toggle-h:not(.disabled):not(:disabled):active .slider-track.sc-ix-toggle{background-color:var(--theme-switch-on--background--active);border-color:var(--theme-switch-on--border-color--active)}.checked.sc-ix-toggle-h:not(.disabled):not(:disabled):active .text.sc-ix-toggle{color:var(--theme-switch--color--active)}.indeterminate.sc-ix-toggle-h .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-mixed--background);border-color:var(--theme-switch-thumb-mixed--border-color)}.indeterminate.sc-ix-toggle-h .slider.sc-ix-toggle .slider-track.sc-ix-toggle{background-color:var(--theme-switch-mixed--background);border-color:var(--theme-switch-mixed--border-color)}.indeterminate.sc-ix-toggle-h .text.sc-ix-toggle{color:var(--theme-switch--color)}.indeterminate.sc-ix-toggle-h:not(.disabled):not(:disabled){cursor:pointer}.indeterminate.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-mixed--background--hover);border-color:var(--theme-switch-thumb-mixed--border-color--hover)}.indeterminate.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .slider.sc-ix-toggle .slider-track.sc-ix-toggle{background-color:var(--theme-switch-mixed--background--hover);border-color:var(--theme-switch-mixed--border-color--hover)}.indeterminate.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .text.sc-ix-toggle{color:var(--theme-switch--color--hover)}.indeterminate.sc-ix-toggle-h:not(.disabled):not(:disabled){cursor:pointer}.indeterminate.sc-ix-toggle-h:not(.disabled):not(:disabled):active .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-mixed--background--active);border-color:var(--theme-switch-thumb-mixed--border-color--active)}.indeterminate.sc-ix-toggle-h:not(.disabled):not(:disabled):active .slider-track.sc-ix-toggle{background-color:var(--theme-switch-mixed--background--active);border-color:var(--theme-switch-mixed--border-color--active)}.indeterminate.sc-ix-toggle-h:not(.disabled):not(:disabled):active .text.sc-ix-toggle{color:var(--theme-switch--color--active)}.indeterminate.sc-ix-toggle-h .slider.sc-ix-toggle:before{transform:translateX(0.625rem)}
|
|
3
|
+
const toggleCss = ".sc-ix-toggle-h{display:flex;align-items:center;outline:none}.sc-ix-toggle-h .switch.sc-ix-toggle{position:relative;display:inline-flex;align-items:center;min-width:3rem;height:2rem}.sc-ix-toggle-h .switch.sc-ix-toggle:not(.disabled):not(:disabled):focus-visible{outline-color:var(--focus--border-color);outline-style:solid;outline-width:1px}.sc-ix-toggle-h .switch.sc-ix-toggle input.sc-ix-toggle{opacity:0;width:0;height:0}.sc-ix-toggle-h .slider.sc-ix-toggle{display:flex;align-items:center;justify-content:center;position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0}.sc-ix-toggle-h .slider.sc-ix-toggle .slider-track.sc-ix-toggle{background-color:var(--theme-switch-off--background);border-radius:2.125rem;border:1px solid var(--theme-switch-off--border-color);width:2.5rem;height:1rem}.sc-ix-toggle-h .slider.sc-ix-toggle:before{position:absolute;content:\"\";height:1.5rem;width:1.5rem;left:0.125rem;background-color:var(--theme-switch-thumb-off--background);transition:transform 150ms;border-radius:50%;border:1px solid var(--theme-switch-thumb-off--border-color);box-shadow:var(--theme-switch-thumb--box-shadow)}.sc-ix-toggle-h input.sc-ix-toggle:checked+.slider.sc-ix-toggle:before{transform:translateX(1.125rem);left:0.25rem}.sc-ix-toggle-h .text.sc-ix-toggle{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--theme-switch--color);padding:0 0.5rem;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.sc-ix-toggle-h:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-off--background--hover);border-color:var(--theme-switch-thumb-off--border-color--hover)}.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .slider-track.sc-ix-toggle{background-color:var(--theme-switch-off--background--hover);border-color:var(--theme-switch-off--border-color--hover)}.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .text.sc-ix-toggle{color:var(--theme-switch--color--hover)}.sc-ix-toggle-h:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-toggle-h:not(.disabled):not(:disabled):active .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-off--background--active);border-color:var(--theme-switch-thumb-off--border-color--active)}.sc-ix-toggle-h:not(.disabled):not(:disabled):active .slider-track.sc-ix-toggle{background-color:var(--theme-switch-off--background--active);border-color:var(--theme-switch-off--border-color--active)}.sc-ix-toggle-h:not(.disabled):not(:disabled):active .text.sc-ix-toggle{color:var(--theme-switch--color--active)}.checked.sc-ix-toggle-h .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-on--background);border-color:var(--theme-switch-thumb-on--border-color)}.checked.sc-ix-toggle-h .slider.sc-ix-toggle .slider-track.sc-ix-toggle{background-color:var(--theme-switch-on--background);border-color:var(--theme-switch-on--border-color)}.checked.sc-ix-toggle-h .text.sc-ix-toggle{color:var(--theme-switch--color)}.checked.sc-ix-toggle-h:not(.disabled):not(:disabled){cursor:pointer}.checked.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-on--background--hover);border-color:var(--theme-switch-thumb-on--border-color--hover)}.checked.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .slider.sc-ix-toggle .slider-track.sc-ix-toggle{background-color:var(--theme-switch-on--background--hover);border-color:var(--theme-switch-on--border-color--hover)}.checked.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .text.sc-ix-toggle{color:var(--theme-switch--color--hover)}.checked.sc-ix-toggle-h:not(.disabled):not(:disabled){cursor:pointer}.checked.sc-ix-toggle-h:not(.disabled):not(:disabled):active .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-on--background--active);border-color:var(--theme-switch-thumb-on--border-color--active)}.checked.sc-ix-toggle-h:not(.disabled):not(:disabled):active .slider-track.sc-ix-toggle{background-color:var(--theme-switch-on--background--active);border-color:var(--theme-switch-on--border-color--active)}.checked.sc-ix-toggle-h:not(.disabled):not(:disabled):active .text.sc-ix-toggle{color:var(--theme-switch--color--active)}.indeterminate.sc-ix-toggle-h .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-mixed--background);border-color:var(--theme-switch-thumb-mixed--border-color)}.indeterminate.sc-ix-toggle-h .slider.sc-ix-toggle .slider-track.sc-ix-toggle{background-color:var(--theme-switch-mixed--background);border-color:var(--theme-switch-mixed--border-color)}.indeterminate.sc-ix-toggle-h .text.sc-ix-toggle{color:var(--theme-switch--color)}.indeterminate.sc-ix-toggle-h:not(.disabled):not(:disabled){cursor:pointer}.indeterminate.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-mixed--background--hover);border-color:var(--theme-switch-thumb-mixed--border-color--hover)}.indeterminate.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .slider.sc-ix-toggle .slider-track.sc-ix-toggle{background-color:var(--theme-switch-mixed--background--hover);border-color:var(--theme-switch-mixed--border-color--hover)}.indeterminate.sc-ix-toggle-h:not(.disabled):not(:disabled):hover .text.sc-ix-toggle{color:var(--theme-switch--color--hover)}.indeterminate.sc-ix-toggle-h:not(.disabled):not(:disabled){cursor:pointer}.indeterminate.sc-ix-toggle-h:not(.disabled):not(:disabled):active .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-mixed--background--active);border-color:var(--theme-switch-thumb-mixed--border-color--active)}.indeterminate.sc-ix-toggle-h:not(.disabled):not(:disabled):active .slider-track.sc-ix-toggle{background-color:var(--theme-switch-mixed--background--active);border-color:var(--theme-switch-mixed--border-color--active)}.indeterminate.sc-ix-toggle-h:not(.disabled):not(:disabled):active .text.sc-ix-toggle{color:var(--theme-switch--color--active)}.indeterminate.sc-ix-toggle-h .slider.sc-ix-toggle:before{transform:translateX(0.625rem)}.disabled.sc-ix-toggle-h{pointer-events:none}.disabled.sc-ix-toggle-h .slider.sc-ix-toggle{cursor:initial;opacity:0.5}.disabled.sc-ix-toggle-h .slider.sc-ix-toggle:before{background-color:var(--theme-switch-thumb-off--background--disabled);border-color:var(--theme-switch-thumb-off--border-color--disabled)}.disabled.sc-ix-toggle-h .slider.sc-ix-toggle .slider-track.sc-ix-toggle{background-color:var(--theme-switch-off--background--disabled);border-color:var(--theme-switch-off--border-color--disabled)}.disabled.sc-ix-toggle-h .text.sc-ix-toggle{color:var(--theme-switch--color--disabled)}";
|
|
4
4
|
|
|
5
|
-
const CuiToggle = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
5
|
+
const CuiToggle = /*@__PURE__*/ proxyCustomElement(class CuiToggle extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
8
8
|
this.__registerHost();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"ix-toggle.js","mappings":";;AAAA,MAAM,SAAS,GAAG,iwNAAiwN;;MCyBtwN,SAAS;;;;;mBAI8B,KAAK;oBAKpC,KAAK;yBAKA,KAAK;iBAMb,QAAQ;kBAKP,IAAI;mBAKH,KAAK;6BAKK,OAAO;oBAKhB,KAAK;;EAUxB,MAAM,SAAS,CAAC,KAAoB;IAClC,MAAM,aAAa,GAAG,KAAK,CAAC,MAAqB,CAAC;IAElD,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;MAC7C,OAAO;KACR;IAED,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,K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GACnC,EACF,YAAM,KAAK,EAAC,QAAQ,IAClB,YAAM,KAAK,EAAC,cAAc,GAAQ,CAC7B,CACD,EACP,CAAC,IAAI,CAAC,QAAQ,IACb,YACE,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,EACrB,KAAK,EAAC,MAAM,EACZ,OAAO,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAEjC,IAAI,CAAC,OAAO,EAAE,CACV,IACL,IAAI,CACH,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/toggle/toggle.scss?tag=ix-toggle&encapsulation=scoped","./src/components/toggle/toggle.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/hover';\n@import 'mixins/text-truncation';\n\n@mixin toggle($state, $suffix: '') {\n .slider {\n &:before {\n background-color: var(\n --theme-switch-thumb-#{$state}--background#{$suffix}\n );\n border-color: var(--theme-switch-thumb-#{$state}--border-color#{$suffix});\n }\n\n .slider-track {\n background-color: var(--theme-switch-#{$state}--background#{$suffix});\n border-color: var(--theme-switch-#{$state}--border-color#{$suffix});\n }\n }\n\n .text {\n color: var(--theme-switch--color);\n }\n\n @include hover {\n .slider {\n &:before {\n background-color: var(\n --theme-switch-thumb-#{$state}--background--hover#{$suffix}\n );\n border-color: var(\n --theme-switch-thumb-#{$state}--border-color--hover#{$suffix}\n );\n }\n\n .slider-track {\n background-color: var(\n --theme-switch-#{$state}--background--hover#{$suffix}\n );\n border-color: var(\n --theme-switch-#{$state}--border-color--hover#{$suffix}\n );\n }\n }\n\n .text {\n color: var(--theme-switch--color--hover);\n }\n }\n\n @include active {\n .slider:before {\n background-color: var(\n --theme-switch-thumb-#{$state}--background--active#{$suffix}\n );\n border-color: var(\n --theme-switch-thumb-#{$state}--border-color--active#{$suffix}\n );\n }\n\n .slider-track {\n background-color: var(\n --theme-switch-#{$state}--background--active#{$suffix}\n );\n border-color: var(\n --theme-switch-#{$state}--border-color--active#{$suffix}\n );\n }\n\n .text {\n color: var(--theme-switch--color--active);\n }\n }\n}\n\n:host {\n $slide-toggle-width: 3rem;\n display: flex;\n align-items: center;\n outline: none;\n\n .switch {\n position: relative;\n display: inline-flex;\n align-items: center;\n min-width: $slide-toggle-width;\n height: $default-control-height;\n\n @include focus-visible {\n outline-color: var(--focus--border-color);\n outline-style: solid;\n outline-width: 1px;\n }\n }\n\n .switch input {\n opacity: 0;\n width: 0;\n height: 0;\n }\n\n .slider {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n .slider-track {\n background-color: var(--theme-switch-off--background);\n border-radius: 2.125rem;\n border: 1px solid var(--theme-switch-off--border-color);\n width: 2.5rem;\n height: $default-space;\n }\n }\n\n .slider:before {\n position: absolute;\n content: '';\n height: 1.5rem;\n width: 1.5rem;\n left: 0.125rem;\n background-color: var(--theme-switch-thumb-off--background);\n -webkit-transition: transform $default-time;\n transition: transform $default-time;\n border-radius: 50%;\n border: 1px solid var(--theme-switch-thumb-off--border-color);\n box-shadow: var(--theme-switch-thumb--box-shadow);\n }\n\n input:checked + .slider:before {\n -webkit-transform: translateX(1.125rem);\n -ms-transform: translateX(1.125rem);\n transform: translateX(1.125rem);\n left: $tiny-space;\n }\n\n .text {\n @include ellipsis;\n\n color: var(--theme-switch--color);\n padding: 0 $small-space;\n position: relative;\n user-select: none;\n }\n\n @include hover {\n .slider:before {\n background-color: var(--theme-switch-thumb-off--background--hover);\n border-color: var(--theme-switch-thumb-off--border-color--hover);\n }\n\n .slider-track {\n background-color: var(--theme-switch-off--background--hover);\n border-color: var(--theme-switch-off--border-color--hover);\n }\n\n .text {\n color: var(--theme-switch--color--hover);\n }\n }\n\n @include active {\n .slider:before {\n background-color: var(--theme-switch-thumb-off--background--active);\n border-color: var(--theme-switch-thumb-off--border-color--active);\n }\n\n .slider-track {\n background-color: var(--theme-switch-off--background--active);\n border-color: var(--theme-switch-off--border-color--active);\n }\n\n .text {\n color: var(--theme-switch--color--active);\n }\n }\n\n &.checked {\n @include toggle('on');\n }\n\n &.indeterminate {\n @include toggle('mixed');\n\n .slider:before {\n transform: translateX(0.625rem);\n }\n }\n\n &[disabled],\n &.disabled {\n .slider {\n cursor: initial;\n opacity: 0.5;\n\n &:before {\n background-color: var(--theme-switch-thumb-off--background--disabled);\n border-color: var(--theme-switch-thumb-off--border-color--disabled);\n }\n\n .slider-track {\n background-color: var(--theme-switch-off--background--disabled);\n border-color: var(--theme-switch-off--border-color--disabled);\n }\n }\n\n .text {\n color: var(--theme-switch--color--disabled);\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 {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n} from '@stencil/core';\n\n@Component({\n tag: 'ix-toggle',\n styleUrl: 'toggle.scss',\n scoped: true,\n})\nexport class CuiToggle {\n /**\n * Whether the slide-toggle element is checked or not.\n */\n @Prop({ mutable: true, reflect: true }) checked = false;\n\n /**\n * Whether the slide-toggle element is disabled or not.\n */\n @Prop() disabled = false;\n\n /**\n * If true the control is in indeterminate state\n */\n @Prop() indeterminate = false;\n\n /**\n * Basic and status colors from color palette\n * @deprecated Will be removed in 2.0.0\n */\n @Prop() color = 'accent';\n\n /**\n * Text for on state\n */\n @Prop() textOn = 'On';\n\n /**\n * Text for off state\n */\n @Prop() textOff = 'Off';\n\n /**\n * Text for indeterminate state\n */\n @Prop() textIndeterminate = 'Mixed';\n\n /**\n * Hide `on` and `off` text\n */\n @Prop() hideText = false;\n\n /**\n * An event will be dispatched each time the slide-toggle changes its value.\n */\n @Event() checkedChange: EventEmitter<boolean>;\n\n @Element() hostElement!: HTMLIxToggleElement;\n\n @Listen('keydown', { target: 'window' })\n async onKeyDown(event: KeyboardEvent) {\n const targetElement = event.target as HTMLElement;\n\n if (!this.hostElement.contains(targetElement)) {\n return;\n }\n\n if (event.code === 'Enter' || event.code === 'NumpadEnter') {\n this.emitChange(event);\n }\n }\n\n private emitChange(event: Event) {\n if (this.disabled || this.indeterminate) {\n return;\n }\n\n event.stopPropagation();\n event.preventDefault();\n\n this.checked = !this.checked;\n this.checkedChange.emit(this.checked);\n }\n\n private getText() {\n if (this.indeterminate || this.checked === undefined) {\n return this.textIndeterminate;\n }\n\n return this.checked ? this.textOn : this.textOff;\n }\n\n render() {\n return (\n <Host\n class={{\n disabled: this.disabled,\n checked: this.checked,\n indeterminate: this.indeterminate || this.checked === undefined,\n }}\n >\n <label class=\"switch\" tabindex={this.disabled ? -1 : 0}>\n <input\n tabindex=\"-1\"\n type=\"checkbox\"\n checked={this.checked}\n disabled={this.disabled}\n indeterminate={this.indeterminate || this.checked === undefined}\n id={this.hostElement.id}\n onChange={(e) => this.emitChange(e)}\n />\n <span class=\"slider\">\n <span class=\"slider-track\"></span>\n </span>\n </label>\n {!this.hideText ? (\n <span\n title={this.getText()}\n class=\"text\"\n onClick={(e) => this.emitChange(e)}\n >\n {this.getText()}\n </span>\n ) : null}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"ix-toggle.js","mappings":";;AAAA,MAAM,SAAS,GAAG,klNAAklN;;MCyBvlN,SAAS;;;;;mBAI8B,KAAK;oBAKpC,KAAK;yBAKA,KAAK;iBAMb,QAAQ;kBAKP,IAAI;mBAKH,KAAK;6BAKK,OAAO;oBAKhB,KAAK;;EAUxB,MAAM,SAAS,CAAC,KAAoB;IAClC,MAAM,aAAa,GAAG,KAAK,CAAC,MAAqB,CAAC;IAElD,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;MAC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,EAAE,EACvB,QAAQ,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GACnC,EACF,YAAM,KAAK,EAAC,QAAQ,IAClB,YAAM,KAAK,EAAC,cAAc,GAAQ,CAC7B,CACD,EACP,CAAC,IAAI,CAAC,QAAQ,IACb,YACE,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,EACrB,KAAK,EAAC,MAAM,EACZ,OAAO,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAEjC,IAAI,CAAC,OAAO,EAAE,CACV,IACL,IAAI,CACH,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/toggle/toggle.scss?tag=ix-toggle&encapsulation=scoped","./src/components/toggle/toggle.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/hover';\n@import 'mixins/text-truncation';\n\n@mixin toggle($state, $suffix: '') {\n .slider {\n &:before {\n background-color: var(\n --theme-switch-thumb-#{$state}--background#{$suffix}\n );\n border-color: var(--theme-switch-thumb-#{$state}--border-color#{$suffix});\n }\n\n .slider-track {\n background-color: var(--theme-switch-#{$state}--background#{$suffix});\n border-color: var(--theme-switch-#{$state}--border-color#{$suffix});\n }\n }\n\n .text {\n color: var(--theme-switch--color);\n }\n\n @include hover {\n .slider {\n &:before {\n background-color: var(\n --theme-switch-thumb-#{$state}--background--hover#{$suffix}\n );\n border-color: var(\n --theme-switch-thumb-#{$state}--border-color--hover#{$suffix}\n );\n }\n\n .slider-track {\n background-color: var(\n --theme-switch-#{$state}--background--hover#{$suffix}\n );\n border-color: var(\n --theme-switch-#{$state}--border-color--hover#{$suffix}\n );\n }\n }\n\n .text {\n color: var(--theme-switch--color--hover);\n }\n }\n\n @include active {\n .slider:before {\n background-color: var(\n --theme-switch-thumb-#{$state}--background--active#{$suffix}\n );\n border-color: var(\n --theme-switch-thumb-#{$state}--border-color--active#{$suffix}\n );\n }\n\n .slider-track {\n background-color: var(\n --theme-switch-#{$state}--background--active#{$suffix}\n );\n border-color: var(\n --theme-switch-#{$state}--border-color--active#{$suffix}\n );\n }\n\n .text {\n color: var(--theme-switch--color--active);\n }\n }\n}\n\n:host {\n $slide-toggle-width: 3rem;\n display: flex;\n align-items: center;\n outline: none;\n\n .switch {\n position: relative;\n display: inline-flex;\n align-items: center;\n min-width: $slide-toggle-width;\n height: $default-control-height;\n\n @include focus-visible {\n outline-color: var(--focus--border-color);\n outline-style: solid;\n outline-width: 1px;\n }\n }\n\n .switch input {\n opacity: 0;\n width: 0;\n height: 0;\n }\n\n .slider {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n .slider-track {\n background-color: var(--theme-switch-off--background);\n border-radius: 2.125rem;\n border: 1px solid var(--theme-switch-off--border-color);\n width: 2.5rem;\n height: $default-space;\n }\n }\n\n .slider:before {\n position: absolute;\n content: '';\n height: 1.5rem;\n width: 1.5rem;\n left: 0.125rem;\n background-color: var(--theme-switch-thumb-off--background);\n -webkit-transition: transform $default-time;\n transition: transform $default-time;\n border-radius: 50%;\n border: 1px solid var(--theme-switch-thumb-off--border-color);\n box-shadow: var(--theme-switch-thumb--box-shadow);\n }\n\n input:checked + .slider:before {\n -webkit-transform: translateX(1.125rem);\n -ms-transform: translateX(1.125rem);\n transform: translateX(1.125rem);\n left: $tiny-space;\n }\n\n .text {\n @include ellipsis;\n\n color: var(--theme-switch--color);\n padding: 0 $small-space;\n position: relative;\n user-select: none;\n }\n\n @include hover {\n .slider:before {\n background-color: var(--theme-switch-thumb-off--background--hover);\n border-color: var(--theme-switch-thumb-off--border-color--hover);\n }\n\n .slider-track {\n background-color: var(--theme-switch-off--background--hover);\n border-color: var(--theme-switch-off--border-color--hover);\n }\n\n .text {\n color: var(--theme-switch--color--hover);\n }\n }\n\n @include active {\n .slider:before {\n background-color: var(--theme-switch-thumb-off--background--active);\n border-color: var(--theme-switch-thumb-off--border-color--active);\n }\n\n .slider-track {\n background-color: var(--theme-switch-off--background--active);\n border-color: var(--theme-switch-off--border-color--active);\n }\n\n .text {\n color: var(--theme-switch--color--active);\n }\n }\n\n &.checked {\n @include toggle('on');\n }\n\n &.indeterminate {\n @include toggle('mixed');\n\n .slider:before {\n transform: translateX(0.625rem);\n }\n }\n\n &.disabled {\n pointer-events: none;\n .slider {\n cursor: initial;\n opacity: 0.5;\n\n &:before {\n background-color: var(--theme-switch-thumb-off--background--disabled);\n border-color: var(--theme-switch-thumb-off--border-color--disabled);\n }\n\n .slider-track {\n background-color: var(--theme-switch-off--background--disabled);\n border-color: var(--theme-switch-off--border-color--disabled);\n }\n }\n\n .text {\n color: var(--theme-switch--color--disabled);\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 {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n} from '@stencil/core';\n\n@Component({\n tag: 'ix-toggle',\n styleUrl: 'toggle.scss',\n scoped: true,\n})\nexport class CuiToggle {\n /**\n * Whether the slide-toggle element is checked or not.\n */\n @Prop({ mutable: true, reflect: true }) checked = false;\n\n /**\n * Whether the slide-toggle element is disabled or not.\n */\n @Prop() disabled = false;\n\n /**\n * If true the control is in indeterminate state\n */\n @Prop() indeterminate = false;\n\n /**\n * Basic and status colors from color palette\n * @deprecated Will be removed in 2.0.0\n */\n @Prop() color = 'accent';\n\n /**\n * Text for on state\n */\n @Prop() textOn = 'On';\n\n /**\n * Text for off state\n */\n @Prop() textOff = 'Off';\n\n /**\n * Text for indeterminate state\n */\n @Prop() textIndeterminate = 'Mixed';\n\n /**\n * Hide `on` and `off` text\n */\n @Prop() hideText = false;\n\n /**\n * An event will be dispatched each time the slide-toggle changes its value.\n */\n @Event() checkedChange: EventEmitter<boolean>;\n\n @Element() hostElement!: HTMLIxToggleElement;\n\n @Listen('keydown', { target: 'window' })\n async onKeyDown(event: KeyboardEvent) {\n const targetElement = event.target as HTMLElement;\n\n if (!this.hostElement.contains(targetElement)) {\n return;\n }\n\n if (event.code === 'Enter' || event.code === 'NumpadEnter') {\n this.emitChange(event);\n }\n }\n\n private emitChange(event: Event) {\n if (this.disabled || this.indeterminate) {\n return;\n }\n\n event.stopPropagation();\n event.preventDefault();\n\n this.checked = !this.checked;\n this.checkedChange.emit(this.checked);\n }\n\n private getText() {\n if (this.indeterminate || this.checked === undefined) {\n return this.textIndeterminate;\n }\n\n return this.checked ? this.textOn : this.textOff;\n }\n\n render() {\n return (\n <Host\n class={{\n disabled: this.disabled,\n checked: this.checked,\n indeterminate: this.indeterminate || this.checked === undefined,\n }}\n >\n <label class=\"switch\" tabindex={this.disabled ? -1 : 0}>\n <input\n tabindex=\"-1\"\n type=\"checkbox\"\n checked={this.checked}\n disabled={this.disabled}\n indeterminate={this.indeterminate || this.checked === undefined}\n id={this.hostElement.id}\n onChange={(e) => this.emitChange(e)}\n />\n <span class=\"slider\">\n <span class=\"slider-track\"></span>\n </span>\n </label>\n {!this.hideText ? (\n <span\n title={this.getText()}\n class=\"text\"\n onClick={(e) => this.emitChange(e)}\n >\n {this.getText()}\n </span>\n ) : null}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -4,7 +4,8 @@ import { d as defineCustomElement$2 } from './typography.js';
|
|
|
4
4
|
|
|
5
5
|
const tooltipCss = ":host{display:inline-block;position:fixed;left:0px;top:0px;z-index:var(--theme-z-index-tooltip);max-width:18.25rem;opacity:0;visibility:collapse !important;overflow-wrap:break-word;border-radius:0.25rem;background-color:var(--theme-tootlip--background);padding:0.375rem 0.75rem 0.375rem 0.875rem;box-shadow:var(--theme-shadow-4)}:host .tooltip-title{display:flex;align-items:center}:host .tooltip-title ::slotted(ix-icon){margin-right:0.35rem}:host(.visible){opacity:1;visibility:visible !important}:host(.visible) .arrow,:host(.visible) .arrow::before{position:absolute;width:8px;height:8px;background:inherit}:host(.visible) .arrow{visibility:hidden}:host(.visible) .arrow::before{visibility:visible;content:\"\";transform:rotate(45deg);background-color:var(--theme-tootlip--background)}";
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const numberToPixel = (value) => (value != null ? `${value}px` : '');
|
|
8
|
+
const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends HTMLElement {
|
|
8
9
|
constructor() {
|
|
9
10
|
super();
|
|
10
11
|
this.__registerHost();
|
|
@@ -15,6 +16,7 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
15
16
|
this.for = undefined;
|
|
16
17
|
this.titleContent = undefined;
|
|
17
18
|
this.interactive = false;
|
|
19
|
+
this.placement = 'top';
|
|
18
20
|
this.visible = false;
|
|
19
21
|
}
|
|
20
22
|
get arrowElement() {
|
|
@@ -36,12 +38,39 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
36
38
|
}, this.tooltipCloseTimeInMS);
|
|
37
39
|
this.destroyAutoUpdate();
|
|
38
40
|
}
|
|
41
|
+
computeArrowPosition({ placement, middlewareData, }) {
|
|
42
|
+
let { x, y } = middlewareData.arrow;
|
|
43
|
+
if (placement.startsWith('top')) {
|
|
44
|
+
return {
|
|
45
|
+
left: numberToPixel(x),
|
|
46
|
+
top: numberToPixel(y),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
if (placement.startsWith('right')) {
|
|
50
|
+
return {
|
|
51
|
+
left: numberToPixel(-4),
|
|
52
|
+
top: numberToPixel(y),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
if (placement.startsWith('bottom')) {
|
|
56
|
+
return {
|
|
57
|
+
left: numberToPixel(x),
|
|
58
|
+
top: numberToPixel(-4),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
if (placement.startsWith('left')) {
|
|
62
|
+
return {
|
|
63
|
+
right: numberToPixel(-4),
|
|
64
|
+
top: numberToPixel(y),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
39
68
|
async computeTooltipPosition(target) {
|
|
40
69
|
this.disposeAutoUpdate = autoUpdate(target, this.hostElement, async () => {
|
|
41
|
-
|
|
70
|
+
setTimeout(async () => {
|
|
42
71
|
const computeResponse = await computePosition(target, this.hostElement, {
|
|
43
72
|
strategy: 'fixed',
|
|
44
|
-
placement:
|
|
73
|
+
placement: this.placement,
|
|
45
74
|
middleware: [
|
|
46
75
|
shift(),
|
|
47
76
|
offset(8),
|
|
@@ -50,18 +79,13 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
50
79
|
}),
|
|
51
80
|
flip({
|
|
52
81
|
fallbackStrategy: 'initialPlacement',
|
|
82
|
+
padding: 10,
|
|
53
83
|
}),
|
|
54
84
|
],
|
|
55
85
|
});
|
|
56
86
|
if (computeResponse.middlewareData.arrow) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
y = -4;
|
|
60
|
-
}
|
|
61
|
-
Object.assign(this.arrowElement.style, {
|
|
62
|
-
left: x != null ? `${x}px` : '',
|
|
63
|
-
top: y != null ? `${y}px` : '',
|
|
64
|
-
});
|
|
87
|
+
const arrowPosition = this.computeArrowPosition(computeResponse);
|
|
88
|
+
Object.assign(this.arrowElement.style, arrowPosition);
|
|
65
89
|
}
|
|
66
90
|
const { x, y } = computeResponse;
|
|
67
91
|
Object.assign(this.hostElement.style, {
|
|
@@ -129,6 +153,7 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
129
153
|
"for": [1],
|
|
130
154
|
"titleContent": [1, "title-content"],
|
|
131
155
|
"interactive": [4],
|
|
156
|
+
"placement": [1],
|
|
132
157
|
"visible": [32]
|
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IAEF,QACE,EAAC,IAAI,IACH,KAAK,EAAE;QACL,OAAO,EAAE,IAAI,CAAC,OAAO;OACtB,IAED,WAAK,KAAK,EAAE,eAAe,IACzB,YAAM,IAAI,EAAC,YAAY,GAAQ,EAC/B,qBAAe,OAAO,EAAC,eAAe,IACnC,IAAI,CAAC,YAAY,EAClB,YAAM,IAAI,EAAC,eAAe,GAAQ,CACpB,CACZ,EACN,WAAK,KAAK,EAAE,mBAAmB,IAC7B,eAAa,CACT,EACN,WAAK,KAAK,EAAC,OAAO,GAAO,CACpB,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/tooltip/tooltip.scss?tag=ix-tooltip&encapsulation=shadow","./src/components/tooltip/tooltip.tsx"],"sourcesContent":[":host {\n display: inline-block;\n position: fixed;\n left: 0px;\n top: 0px;\n z-index: var(--theme-z-index-tooltip);\n\n max-width: 18.25rem;\n\n opacity: 0;\n visibility: collapse !important;\n overflow-wrap: break-word;\n\n border-radius: 0.25rem;\n background-color: var(--theme-tootlip--background);\n padding: 0.375rem 0.75rem 0.375rem 0.875rem;\n\n box-shadow: var(--theme-shadow-4);\n\n .tooltip-title {\n display: flex;\n align-items: center;\n\n ::slotted(ix-icon) {\n margin-right: 0.35rem;\n }\n }\n}\n\n:host(.visible) {\n opacity: 1;\n visibility: visible !important;\n}\n\n:host(.visible) {\n .arrow,\n .arrow::before {\n position: absolute;\n width: 8px;\n height: 8px;\n background: inherit;\n }\n\n .arrow {\n visibility: hidden;\n }\n\n .arrow::before {\n visibility: visible;\n content: '';\n transform: rotate(45deg);\n background-color: var(--theme-tootlip--background);\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 */\nimport {\n arrow,\n autoUpdate,\n computePosition,\n flip,\n offset,\n shift,\n} from '@floating-ui/dom';\nimport { Component, Element, h, Host, Prop, State } from '@stencil/core';\n\n/**\n * @slot title-icon - Icon of tooltip title\n * @slot title-content - Content of tooltip title\n *\n * @since 1.4.0\n */\n@Component({\n tag: 'ix-tooltip',\n styleUrl: 'tooltip.scss',\n shadow: true,\n})\nexport class Tooltip {\n /**\n * CSS selector for hover trigger element e.g. `for=\"[data-my-custom-select]\"`\n */\n @Prop() for: string;\n\n /**\n * Title of the tooltip\n */\n @Prop() titleContent: string;\n\n /**\n * Define if the user can access the tooltip via mouse.\n */\n @Prop() interactive = false;\n\n @State() visible = false;\n\n @Element() hostElement: HTMLIxTooltipElement;\n\n private observer: MutationObserver;\n private hideTooltipTimeout: NodeJS.Timeout;\n private onMouseEnterBind = this.showTooltip.bind(this);\n private onMouseLeaveBind = this.hideTooltip.bind(this);\n private disposeAutoUpdate?: () => void;\n private tooltipCloseTimeInMS = 50;\n\n private get arrowElement() {\n return this.hostElement.shadowRoot.querySelector('.arrow') as HTMLElement;\n }\n\n private destroyAutoUpdate() {\n if (this.disposeAutoUpdate !== undefined) {\n this.disposeAutoUpdate();\n }\n }\n\n private showTooltip(e: any) {\n clearTimeout(this.hideTooltipTimeout);\n this.visible = true;\n this.computeTooltipPosition(e.target);\n }\n\n private hideTooltip() {\n this.hideTooltipTimeout = setTimeout(() => {\n this.visible = false;\n }, this.tooltipCloseTimeInMS);\n this.destroyAutoUpdate();\n }\n\n private async computeTooltipPosition(target: HTMLElement) {\n this.disposeAutoUpdate = autoUpdate(\n target,\n this.hostElement,\n async () => {\n requestAnimationFrame(async () => {\n const computeResponse = await computePosition(\n target,\n this.hostElement,\n {\n strategy: 'fixed',\n placement: 'top',\n middleware: [\n shift(),\n offset(8),\n arrow({\n element: this.arrowElement,\n }),\n flip({\n fallbackStrategy: 'initialPlacement',\n }),\n ],\n }\n );\n\n if (computeResponse.middlewareData.arrow) {\n let { x, y } = computeResponse.middlewareData.arrow;\n\n if (computeResponse.placement === 'bottom') {\n y = -4;\n }\n\n Object.assign(this.arrowElement.style, {\n left: x != null ? `${x}px` : '',\n top: y != null ? `${y}px` : '',\n });\n }\n\n const { x, y } = computeResponse;\n Object.assign(this.hostElement.style, {\n left: x !== null ? `${x}px` : '',\n top: y !== null ? `${y}px` : '',\n });\n });\n },\n {\n ancestorResize: true,\n ancestorScroll: true,\n elementResize: true,\n }\n );\n }\n\n private queryAnchorElements() {\n return Array.from(document.querySelectorAll(this.for));\n }\n\n private registerTriggerListener() {\n const elements = this.queryAnchorElements();\n elements.forEach((e) => {\n e.addEventListener('mouseenter', this.onMouseEnterBind);\n e.addEventListener('mouseleave', this.onMouseLeaveBind);\n });\n }\n\n private registerTooltipListener() {\n this.hostElement.addEventListener('mouseenter', () => {\n if (this.interactive) {\n clearTimeout(this.hideTooltipTimeout);\n }\n });\n this.hostElement.addEventListener('mouseleave', () => {\n this.hideTooltip();\n });\n }\n\n componentDidLoad() {\n if (this.interactive) {\n this.tooltipCloseTimeInMS = 150;\n }\n\n this.observer = new MutationObserver(() => {\n this.registerTriggerListener();\n });\n\n this.observer.observe(document.body, {\n attributes: true,\n attributeFilter: ['data-ix-tooltip'],\n childList: true,\n subtree: true,\n });\n\n this.registerTriggerListener();\n this.registerTooltipListener();\n }\n\n disconnectedCallback() {\n this.observer.disconnect();\n this.destroyAutoUpdate();\n }\n\n render() {\n const tooltipContentClass = {\n 'tooltip-content': true,\n };\n\n return (\n <Host\n class={{\n visible: this.visible,\n }}\n >\n <div class={'tooltip-title'}>\n <slot name=\"title-icon\"></slot>\n <ix-typography variant=\"default-title\">\n {this.titleContent}\n <slot name=\"title-content\"></slot>\n </ix-typography>\n </div>\n <div class={tooltipContentClass}>\n <slot></slot>\n </div>\n <div class=\"arrow\"></div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"ix-tooltip.js","mappings":";;;;AAAA,MAAM,UAAU,GAAG,uxBAAuxB;;ACyB1yB,MAAM,aAAa,GAAG,CAAC,KAAa,MAAM,KAAK,IAAI,IAAI,GAAG,GAAG,KAAK,IAAI,G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AC;KAChC,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE;MACnC,UAAU,EAAE,IAAI;MAChB,eAAe,EAAE,CAAC,iBAAiB,CAAC;MACpC,SAAS,EAAE,IAAI;MACf,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;IAEH,IAAI,CAAC,uBAAuB,EAAE,CAAC;IAC/B,IAAI,CAAC,uBAAuB,EAAE,CAAC;GAChC;EAED,oBAAoB;IAClB,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IAC3B,IAAI,CAAC,iBAAiB,EAAE,CAAC;GAC1B;EAED,MAAM;IACJ,MAAM,mBAAmB,GAAG;MAC1B,iBAAiB,EAAE,IAAI;KACxB,CAAC;IAEF,QACE,EAAC,IAAI,IACH,KAAK,EAAE;QACL,OAAO,EAAE,IAAI,CAAC,OAAO;OACtB,IAED,WAAK,KAAK,EAAE,eAAe,IACzB,YAAM,IAAI,EAAC,YAAY,GAAQ,EAC/B,qBAAe,OAAO,EAAC,eAAe,IACnC,IAAI,CAAC,YAAY,EAClB,YAAM,IAAI,EAAC,eAAe,GAAQ,CACpB,CACZ,EACN,WAAK,KAAK,EAAE,mBAAmB,IAC7B,eAAa,CACT,EACN,WAAK,KAAK,EAAC,OAAO,GAAO,CACpB,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/tooltip/tooltip.scss?tag=ix-tooltip&encapsulation=shadow","./src/components/tooltip/tooltip.tsx"],"sourcesContent":[":host {\n display: inline-block;\n position: fixed;\n left: 0px;\n top: 0px;\n z-index: var(--theme-z-index-tooltip);\n\n max-width: 18.25rem;\n\n opacity: 0;\n visibility: collapse !important;\n overflow-wrap: break-word;\n\n border-radius: 0.25rem;\n background-color: var(--theme-tootlip--background);\n padding: 0.375rem 0.75rem 0.375rem 0.875rem;\n\n box-shadow: var(--theme-shadow-4);\n\n .tooltip-title {\n display: flex;\n align-items: center;\n\n ::slotted(ix-icon) {\n margin-right: 0.35rem;\n }\n }\n}\n\n:host(.visible) {\n opacity: 1;\n visibility: visible !important;\n}\n\n:host(.visible) {\n .arrow,\n .arrow::before {\n position: absolute;\n width: 8px;\n height: 8px;\n background: inherit;\n }\n\n .arrow {\n visibility: hidden;\n }\n\n .arrow::before {\n visibility: visible;\n content: '';\n transform: rotate(45deg);\n background-color: var(--theme-tootlip--background);\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 */\nimport {\n arrow,\n autoUpdate,\n computePosition,\n ComputePositionReturn,\n flip,\n offset,\n shift,\n} from '@floating-ui/dom';\nimport { Component, Element, h, Host, Prop, State } from '@stencil/core';\n\ntype ArrowPosition = {\n top?: string;\n left?: string;\n right?: string;\n};\n\nconst numberToPixel = (value: number) => (value != null ? `${value}px` : '');\n\n/**\n * @slot title-icon - Icon of tooltip title\n * @slot title-content - Content of tooltip title\n *\n * @since 1.4.0\n */\n@Component({\n tag: 'ix-tooltip',\n styleUrl: 'tooltip.scss',\n shadow: true,\n})\nexport class Tooltip {\n /**\n * CSS selector for hover trigger element e.g. `for=\"[data-my-custom-select]\"`\n */\n @Prop() for: string;\n\n /**\n * Title of the tooltip\n */\n @Prop() titleContent: string;\n\n /**\n * Define if the user can access the tooltip via mouse.\n */\n @Prop() interactive = false;\n\n /**\n * Initial placement of the tooltip. If the placement don\"t have enough space,\n * the tooltip will placed on another location.\n *\n * @since 1.5.0\n */\n @Prop() placement: 'top' | 'right' | 'bottom' | 'left' = 'top';\n\n @State() visible = false;\n\n @Element() hostElement: HTMLIxTooltipElement;\n\n private observer: MutationObserver;\n private hideTooltipTimeout: NodeJS.Timeout;\n private onMouseEnterBind = this.showTooltip.bind(this);\n private onMouseLeaveBind = this.hideTooltip.bind(this);\n private disposeAutoUpdate?: () => void;\n private tooltipCloseTimeInMS = 50;\n\n private get arrowElement() {\n return this.hostElement.shadowRoot.querySelector('.arrow') as HTMLElement;\n }\n\n private destroyAutoUpdate() {\n if (this.disposeAutoUpdate !== undefined) {\n this.disposeAutoUpdate();\n }\n }\n\n private showTooltip(e: any) {\n clearTimeout(this.hideTooltipTimeout);\n this.visible = true;\n this.computeTooltipPosition(e.target);\n }\n\n private hideTooltip() {\n this.hideTooltipTimeout = setTimeout(() => {\n this.visible = false;\n }, this.tooltipCloseTimeInMS);\n this.destroyAutoUpdate();\n }\n\n private computeArrowPosition({\n placement,\n middlewareData,\n }: ComputePositionReturn): ArrowPosition {\n let { x, y } = middlewareData.arrow;\n\n if (placement.startsWith('top')) {\n return {\n left: numberToPixel(x),\n top: numberToPixel(y),\n };\n }\n\n if (placement.startsWith('right')) {\n return {\n left: numberToPixel(-4),\n top: numberToPixel(y),\n };\n }\n\n if (placement.startsWith('bottom')) {\n return {\n left: numberToPixel(x),\n top: numberToPixel(-4),\n };\n }\n\n if (placement.startsWith('left')) {\n return {\n right: numberToPixel(-4),\n top: numberToPixel(y),\n };\n }\n }\n\n private async computeTooltipPosition(target: HTMLElement) {\n this.disposeAutoUpdate = autoUpdate(\n target,\n this.hostElement,\n async () => {\n setTimeout(async () => {\n const computeResponse = await computePosition(\n target,\n this.hostElement,\n {\n strategy: 'fixed',\n placement: this.placement,\n middleware: [\n shift(),\n offset(8),\n arrow({\n element: this.arrowElement,\n }),\n flip({\n fallbackStrategy: 'initialPlacement',\n padding: 10,\n }),\n ],\n }\n );\n\n if (computeResponse.middlewareData.arrow) {\n const arrowPosition = this.computeArrowPosition(computeResponse);\n Object.assign(this.arrowElement.style, arrowPosition);\n }\n\n const { x, y } = computeResponse;\n Object.assign(this.hostElement.style, {\n left: x !== null ? `${x}px` : '',\n top: y !== null ? `${y}px` : '',\n });\n });\n },\n {\n ancestorResize: true,\n ancestorScroll: true,\n elementResize: true,\n }\n );\n }\n\n private queryAnchorElements() {\n return Array.from(document.querySelectorAll(this.for));\n }\n\n private registerTriggerListener() {\n const elements = this.queryAnchorElements();\n elements.forEach((e) => {\n e.addEventListener('mouseenter', this.onMouseEnterBind);\n e.addEventListener('mouseleave', this.onMouseLeaveBind);\n });\n }\n\n private registerTooltipListener() {\n this.hostElement.addEventListener('mouseenter', () => {\n if (this.interactive) {\n clearTimeout(this.hideTooltipTimeout);\n }\n });\n this.hostElement.addEventListener('mouseleave', () => {\n this.hideTooltip();\n });\n }\n\n componentDidLoad() {\n if (this.interactive) {\n this.tooltipCloseTimeInMS = 150;\n }\n\n this.observer = new MutationObserver(() => {\n this.registerTriggerListener();\n });\n\n this.observer.observe(document.body, {\n attributes: true,\n attributeFilter: ['data-ix-tooltip'],\n childList: true,\n subtree: true,\n });\n\n this.registerTriggerListener();\n this.registerTooltipListener();\n }\n\n disconnectedCallback() {\n this.observer.disconnect();\n this.destroyAutoUpdate();\n }\n\n render() {\n const tooltipContentClass = {\n 'tooltip-content': true,\n };\n\n return (\n <Host\n class={{\n visible: this.visible,\n }}\n >\n <div class={'tooltip-title'}>\n <slot name=\"title-icon\"></slot>\n <ix-typography variant=\"default-title\">\n {this.titleContent}\n <slot name=\"title-content\"></slot>\n </ix-typography>\n </div>\n <div class={tooltipContentClass}>\n <slot></slot>\n </div>\n <div class=\"arrow\"></div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -508,7 +508,7 @@ const Hyperlist = /*@__PURE__*/getDefaultExportFromCjs(hyperlist);
|
|
|
508
508
|
|
|
509
509
|
const treeCss = ".sc-ix-tree-h{display:block}";
|
|
510
510
|
|
|
511
|
-
const Tree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
511
|
+
const Tree = /*@__PURE__*/ proxyCustomElement(class Tree extends HTMLElement {
|
|
512
512
|
constructor() {
|
|
513
513
|
super();
|
|
514
514
|
this.__registerHost();
|
|
@@ -5,7 +5,7 @@ import { d as defineCustomElement$2 } from './spinner.js';
|
|
|
5
5
|
|
|
6
6
|
const uploadCss = ".sc-ix-upload-h{display:block;min-height:4rem;height:4rem}.sc-ix-upload-h .file-upload-area.sc-ix-upload{display:flex;flex-direction:row;align-items:center;justify-content:space-between;overflow:hidden;height:100%;width:100%;padding:1rem;border:1px dashed var(--theme-upload--border-color);border-radius:var(--theme-upload--border-radius);color:var(--theme-upload-text--color)}.sc-ix-upload-h .file-upload-area.multiline.sc-ix-upload{max-height:unset;height:auto}.sc-ix-upload-h .file-upload-area.multiline.sc-ix-upload .glyph.sc-ix-upload{align-self:flex-start;-webkit-margin-before:3px;margin-block-start:3px}.sc-ix-upload-h .file-upload-area.multiline.sc-ix-upload>div.sc-ix-upload{align-self:flex-start}.sc-ix-upload-h .file-upload-area.sc-ix-upload:not(.multiline) .state.sc-ix-upload,.sc-ix-upload-h .file-upload-area.sc-ix-upload:not(.multiline) .upload-text.sc-ix-upload{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sc-ix-upload-h .file-upload-area.file-over.sc-ix-upload{border-color:var(--theme-upload--border-color--dragover);border-style:solid}.sc-ix-upload-h .file-upload-area.checking.sc-ix-upload{color:var(--theme-upload-text--color--checking);border-style:solid}.sc-ix-upload-h .file-upload-area.disabled.sc-ix-upload{border-style:solid;color:var(--theme-upload-text--color--disabled)}.sc-ix-upload-h .file-upload-area.sc-ix-upload ix-button.sc-ix-upload{-webkit-margin-start:1rem;margin-inline-start:1rem}.sc-ix-upload-h .file-upload-area.sc-ix-upload .upload-browser.sc-ix-upload{opacity:0;overflow:hidden;position:absolute;z-index:-1}.sc-ix-upload-h .file-upload-area.sc-ix-upload .loader.sc-ix-upload{margin:2.187rem auto;font-size:0.937rem;width:1rem;height:1rem;border-radius:50%;position:relative;text-indent:-9999em;animation:optimise-loading 1.1s infinite ease;transform:translateZ(0)}.sc-ix-upload-h .file-upload-area.sc-ix-upload .upload-filename.sc-ix-upload{margin-bottom:1rem}.sc-ix-upload-h .file-upload-area.sc-ix-upload .state.sc-ix-upload{display:flex;align-items:center}.sc-ix-upload-h .file-upload-area.sc-ix-upload .state.sc-ix-upload>ix-spinner.sc-ix-upload{-webkit-margin-end:0.5rem;margin-inline-end:0.5rem;height:1.5rem;width:1.5rem}.sc-ix-upload-h .file-upload-area.sc-ix-upload .state.sc-ix-upload>i.sc-ix-upload{-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}.sc-ix-upload-h .file-upload-area.sc-ix-upload .state.sc-ix-upload>i.glyph-error.sc-ix-upload{color:var(--theme-color-alarm)}.sc-ix-upload-h .file-upload-area.sc-ix-upload .state.sc-ix-upload>i.glyph-success.sc-ix-upload{color:var(--theme-color-success)}";
|
|
7
7
|
|
|
8
|
-
const Upload = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
+
const Upload = /*@__PURE__*/ proxyCustomElement(class Upload extends HTMLElement {
|
|
9
9
|
get inputElement() {
|
|
10
10
|
return this.hostElement.querySelector('#upload-browser');
|
|
11
11
|
}
|
|
@@ -13,7 +13,7 @@ function getAlignment(placement) {
|
|
|
13
13
|
|
|
14
14
|
const validationTooltipCss = ".text-xs.sc-ix-validation-tooltip{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.625rem;font-weight:400;line-height:1.4em;color:var(--theme-color-std-text)}.text-s.sc-ix-validation-tooltip{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.75rem;font-weight:400;line-height:1.5em;color:var(--theme-color-std-text)}.text-caption.sc-ix-validation-tooltip{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.75rem;font-weight:700;line-height:1.5em;color:var(--theme-color-std-text)}.text-caption-single.sc-ix-validation-tooltip{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.75rem;font-weight:700;line-height:1em;color:var(--theme-color-std-text)}.text-default.sc-ix-validation-tooltip{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:400;line-height:1.429em;color:var(--theme-color-std-text)}.text-default-single.sc-ix-validation-tooltip{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:400;line-height:1.143em;color:var(--theme-color-std-text)}.text-default-title.sc-ix-validation-tooltip{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:700;line-height:1.429em;color:var(--theme-color-std-text)}.text-default-title-single.sc-ix-validation-tooltip{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:700;line-height:1.143em;color:var(--theme-color-std-text)}.text-l.sc-ix-validation-tooltip{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:400;line-height:1.5em;color:var(--theme-color-std-text)}.text-l-single.sc-ix-validation-tooltip{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:400;line-height:1.25em;color:var(--theme-color-std-text)}.text-l-title.sc-ix-validation-tooltip{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:700;line-height:1.5em;color:var(--theme-color-std-text)}.text-l-title-single.sc-ix-validation-tooltip{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:700;line-height:1.25em;color:var(--theme-color-std-text)}.text-h2.sc-ix-validation-tooltip{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1.375rem;font-weight:700;line-height:1.455em;color:var(--theme-color-std-text)}.text-xl.sc-ix-validation-tooltip{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1.375rem;font-weight:400;line-height:1.091em;color:var(--theme-color-std-text)}a.sc-ix-validation-tooltip{color:var(--theme-color-primary)}.sc-ix-validation-tooltip-h{display:inline-block;position:relative}.sc-ix-validation-tooltip-h .validation-tooltip.sc-ix-validation-tooltip{background-color:var(--theme-tootlip--background);color:var(--theme-tooltip--color);padding:5px 10px;border-radius:4px;font-size:13px;border:1px solid var(--theme-tooltip--border-color);box-shadow:0 0 2px 0 rgba(0, 0, 40, 0.1), 0 4px 8px 0 rgba(0, 0, 40, 0.1), 0 12px 18px 0 rgba(0, 0, 40, 0.1)}.sc-ix-validation-tooltip-h .validation-tooltip.sc-ix-validation-tooltip #arrow.sc-ix-validation-tooltip,.sc-ix-validation-tooltip-h .validation-tooltip.sc-ix-validation-tooltip #arrow.sc-ix-validation-tooltip::before{position:absolute;width:8px;height:8px;background:inherit}.sc-ix-validation-tooltip-h .validation-tooltip.sc-ix-validation-tooltip #arrow.sc-ix-validation-tooltip{visibility:hidden}.sc-ix-validation-tooltip-h .validation-tooltip.sc-ix-validation-tooltip #arrow.sc-ix-validation-tooltip::before{visibility:visible;content:\"\";transform:rotate(45deg);background-color:var(--theme-tootlip--background)}.sc-ix-validation-tooltip-h .validation-tooltip.sc-ix-validation-tooltip>#arrow.sc-ix-validation-tooltip{bottom:-5px}.sc-ix-validation-tooltip-h .validation-tooltip.sc-ix-validation-tooltip>#arrow.sc-ix-validation-tooltip::before{border-right:1px solid var(--theme-tooltip--border-color);border-bottom:1px solid var(--theme-tooltip--border-color)}";
|
|
15
15
|
|
|
16
|
-
const ValidationTooltip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
16
|
+
const ValidationTooltip = /*@__PURE__*/ proxyCustomElement(class ValidationTooltip extends HTMLElement {
|
|
17
17
|
constructor() {
|
|
18
18
|
super();
|
|
19
19
|
this.__registerHost();
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Fragment, Host } from '@stencil/core/internal/client';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { d as defineCustomElement$2 } from './icon.js';
|
|
3
3
|
|
|
4
|
-
const workflowStepCss = ".sc-ix-workflow-step-h .step.sc-ix-workflow-step{display:flex;flex-direction:column;align-items:center;background-color:var(--theme-workflow-step--background);border-radius:var(--theme-workflow--border-radius);width:auto;padding:1.125rem 0 0.5rem 0;height:4rem;width:12.75rem}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step{display:flex;width:100%;align-items:center;justify-content:center;position:relative}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.sc-ix-workflow-step{width:100%;height:0.125rem;background-color:var(--theme-workflow-step-icon-default--color)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.first.sc-ix-workflow-step,.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.last.sc-ix-workflow-step{width:50%;margin:0 0 0 auto}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.last.sc-ix-workflow-step{margin:0 auto 0 0}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.selected.sc-ix-workflow-step{background-color:var(--theme-workflow-step-icon-default--color--selected)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.done.sc-ix-workflow-step{background-color:var(--theme-workflow-step-icon-done--color)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.done.selected.sc-ix-workflow-step{background-color:var(--theme-workflow-step-icon-done--color--selected)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.warning.sc-ix-workflow-step{background-color:var(--theme-color-warning)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.success.sc-ix-workflow-step{background-color:var(--theme-color-success)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.error.sc-ix-workflow-step{background-color:var(--theme-color-alarm)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .iconWrapper.sc-ix-workflow-step{display:flex;align-items:center;justify-content:center;position:absolute}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .iconWrapper.sc-ix-workflow-step .absolute.sc-ix-workflow-step{position:absolute}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .text.sc-ix-workflow-step{margin-top:1rem;width:auto;padding:0 0.5rem}.sc-ix-workflow-step-h .step.vertical.sc-ix-workflow-step{flex-direction:row;padding:0}.sc-ix-workflow-step-h .step.vertical.sc-ix-workflow-step .wrapper.sc-ix-workflow-step{width:auto;padding-left:1.125rem;height:4rem}.sc-ix-workflow-step-h .step.vertical.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.sc-ix-workflow-step{width:0.125rem;height:100%}.sc-ix-workflow-step-h .step.vertical.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.first.sc-ix-workflow-step,.sc-ix-workflow-step-h .step.vertical.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.last.sc-ix-workflow-step{height:50%;margin:auto 0 0 0}.sc-ix-workflow-step-h .step.vertical.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.last.sc-ix-workflow-step{margin:0 0 auto 0}.sc-ix-workflow-step-h .step.vertical.sc-ix-workflow-step .text.sc-ix-workflow-step{margin-top:0;margin-left:1rem;padding:0}.sc-ix-workflow-step-h .step.sc-ix-workflow-step:hover{background-color:var(--theme-workflow-step--background--hover)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step:active{background-color:var(--theme-workflow-step--background--active)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step:focus-visible{outline:1px solid var(--focus--border-color);border-radius:0}.sc-ix-workflow-step-h .step.selected.sc-ix-workflow-step{background-color:var(--theme-workflow-step--background--selected)}.sc-ix-workflow-step-h .step.disabled.sc-ix-workflow-step{background-color:var(--theme-workflow-step--background--disabled)}.sc-ix-workflow-step-h .step.disabled.sc-ix-workflow-step .line.sc-ix-workflow-step{background-color:var(--theme-workflow-step-icon-default--color--disabled) !important}.sc-ix-workflow-step-h .step.disabled.sc-ix-workflow-step .text.sc-ix-workflow-step{color:var(--theme-workflow-step--color--disabled)}";
|
|
4
|
+
const workflowStepCss = ".sc-ix-workflow-step-h .step.sc-ix-workflow-step{display:flex;flex-direction:column;align-items:center;background-color:var(--theme-workflow-step--background);border-radius:var(--theme-workflow--border-radius);width:auto;padding:1.125rem 0 0.5rem 0;height:4rem;width:12.75rem}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step{display:flex;width:100%;align-items:center;justify-content:center;position:relative}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.sc-ix-workflow-step{width:100%;height:0.125rem;background-color:var(--theme-workflow-step-icon-default--color)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.first.sc-ix-workflow-step,.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.last.sc-ix-workflow-step{width:50%;margin:0 0 0 auto}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.last.sc-ix-workflow-step{margin:0 auto 0 0}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.single.sc-ix-workflow-step{width:0}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.selected.sc-ix-workflow-step{background-color:var(--theme-workflow-step-icon-default--color--selected)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.done.sc-ix-workflow-step{background-color:var(--theme-workflow-step-icon-done--color)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.done.selected.sc-ix-workflow-step{background-color:var(--theme-workflow-step-icon-done--color--selected)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.warning.sc-ix-workflow-step{background-color:var(--theme-color-warning)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.success.sc-ix-workflow-step{background-color:var(--theme-color-success)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.error.sc-ix-workflow-step{background-color:var(--theme-color-alarm)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .iconWrapper.sc-ix-workflow-step{display:flex;align-items:center;justify-content:center;position:absolute}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .iconWrapper.sc-ix-workflow-step .absolute.sc-ix-workflow-step{position:absolute}.sc-ix-workflow-step-h .step.sc-ix-workflow-step .text.sc-ix-workflow-step{margin-top:1rem;width:auto;padding:0 0.5rem}.sc-ix-workflow-step-h .step.vertical.sc-ix-workflow-step{flex-direction:row;padding:0}.sc-ix-workflow-step-h .step.vertical.sc-ix-workflow-step .wrapper.sc-ix-workflow-step{width:auto;padding-left:1.125rem;height:4rem}.sc-ix-workflow-step-h .step.vertical.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.sc-ix-workflow-step{width:0.125rem;height:100%}.sc-ix-workflow-step-h .step.vertical.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.first.sc-ix-workflow-step,.sc-ix-workflow-step-h .step.vertical.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.last.sc-ix-workflow-step{height:50%;margin:auto 0 0 0}.sc-ix-workflow-step-h .step.vertical.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.last.sc-ix-workflow-step{margin:0 0 auto 0}.sc-ix-workflow-step-h .step.vertical.sc-ix-workflow-step .wrapper.sc-ix-workflow-step .line.single.sc-ix-workflow-step{width:0}.sc-ix-workflow-step-h .step.vertical.sc-ix-workflow-step .text.sc-ix-workflow-step{margin-top:0;margin-left:1rem;padding:0}.sc-ix-workflow-step-h .step.sc-ix-workflow-step:hover{background-color:var(--theme-workflow-step--background--hover)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step:active{background-color:var(--theme-workflow-step--background--active)}.sc-ix-workflow-step-h .step.sc-ix-workflow-step:focus-visible{outline:1px solid var(--focus--border-color);border-radius:0}.sc-ix-workflow-step-h .step.selected.sc-ix-workflow-step{background-color:var(--theme-workflow-step--background--selected)}.sc-ix-workflow-step-h .step.disabled.sc-ix-workflow-step{background-color:var(--theme-workflow-step--background--disabled)}.sc-ix-workflow-step-h .step.disabled.sc-ix-workflow-step .line.sc-ix-workflow-step{background-color:var(--theme-workflow-step-icon-default--color--disabled) !important}.sc-ix-workflow-step-h .step.disabled.sc-ix-workflow-step .text.sc-ix-workflow-step{color:var(--theme-workflow-step--color--disabled)}";
|
|
5
5
|
|
|
6
|
-
const WorkflowStep = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
const WorkflowStep = /*@__PURE__*/ proxyCustomElement(class WorkflowStep extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
9
9
|
this.__registerHost();
|
|
10
|
+
this.selectedChanged = createEvent(this, "selectedChanged", 7);
|
|
10
11
|
this.vertical = false;
|
|
11
12
|
this.disabled = false;
|
|
12
13
|
this.status = 'open';
|
|
@@ -69,6 +70,11 @@ const WorkflowStep = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
69
70
|
this.selectedHandler();
|
|
70
71
|
this.customIconSlot = !!this.hostElement.querySelector('[slot="custom-icon"]');
|
|
71
72
|
}
|
|
73
|
+
clickFunction() {
|
|
74
|
+
if (!this.disabled && this.clickable) {
|
|
75
|
+
this.selectedChanged.emit(this.hostElement);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
72
78
|
render() {
|
|
73
79
|
const icons = !this.customIconSlot ? (h(Fragment, null, h("ix-icon", { color: "color-1", name: this.iconName === 'warning' ? 'triangle-filled' : 'circle-filled', class: "absolute", size: "24" }), h("ix-icon", { color: this.iconColor, name: this.iconName, class: "absolute", size: "24" }))) : ('');
|
|
74
80
|
return (h(Host, null, h("div", { tabIndex: 0, onClick: () => this.select(), class: {
|
|
@@ -98,7 +104,7 @@ const WorkflowStep = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
98
104
|
"position": [1],
|
|
99
105
|
"iconName": [32],
|
|
100
106
|
"iconColor": [32]
|
|
101
|
-
}]);
|
|
107
|
+
}, [[1, "click", "clickFunction"]]]);
|
|
102
108
|
function defineCustomElement$1() {
|
|
103
109
|
if (typeof customElements === "undefined") {
|
|
104
110
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"ix-workflow-step.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,urIAAurI;;MC6BlsI,YAAY;;;;oBAMK,KAAK;oBAKL,KAAK;kBAKmC,MAAM;qBAK7C,KAAK;oBAKW,KAAK;oBAKC,WAAW;oBAG5D,QAAQ;qBACmB,mCAAmC;;EAIxD,MAAM;IACZ,IAAI,CAAC,IAAI,CAAC,SAAS;MAAE,OAAO;IAC5B,IAAI,IAAI,CAAC,QAAQ;MAAE,OAAO;IAE1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,eAAe,EAAE,CAAC;GACxB;EAGD,eAAe;IACb,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,GAAG,YAAY,GAAG,EAAE,CAAC;IAExD,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM,EAAE;MAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,GAAG,YAAY,GAAG,QAAQ,CAAC;MACxD,IAAI,CAAC,SAAS,GAAG,oC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eACE,KAAK,EAAC,SAAS,EACf,IAAI,EACF,IAAI,CAAC,QAAQ,KAAK,SAAS,GAAG,iBAAiB,GAAG,eAAe,EAEnE,KAAK,EAAC,UAAU,EAChB,IAAI,EAAC,IAAI,GACA,EACX,eACE,KAAK,EAAE,IAAI,CAAC,SAAS,EACrB,IAAI,EAAE,IAAI,CAAC,QAAQ,EACnB,KAAK,EAAC,UAAU,EAChB,IAAI,EAAC,IAAI,GACA,CACF,KAEX,EAAE,CACH,CAAC;IAEF,QACE,EAAC,IAAI,QACH,WACE,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,EAC5B,KAAK,EAAE;QACL,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;OACxB,IAED,WAAK,KAAK,EAAC,SAAS,IAClB,WACE,KAAK,EAAE;QACL,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI;QACnB,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI;OACtB,GACI,EACP,WAAK,KAAK,EAAC,aAAa,IACrB,KAAK,EACN,YAAM,IAAI,EAAC,aAAa,GAAQ,CAC5B,CACF,EACN,WAAK,KAAK,EAAC,MAAM,IACf,eAAa,CACT,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/workflow-step/workflow-step.scss?tag=ix-workflow-step&encapsulation=scoped","./src/components/workflow-step/workflow-step.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/*\n * COPYRIGHT (c) Siemens AG 2018-2022 ALL RIGHTS RESERVED.\n */\n\n@import 'common-variables';\n\n:host {\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 width: auto;\n padding: 1.125rem 0 $small-space 0;\n height: 4rem;\n width: 12.75rem;\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 &.selected {\n background-color: var(--theme-workflow-step-icon-default--color--selected);\n }\n\n &.done {\n background-color: var(--theme-workflow-step-icon-done--color);\n\n &.selected {\n background-color: var(--theme-workflow-step-icon-done--color--selected);\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: auto;\n padding: 0 $small-space;\n }\n\n &.vertical {\n flex-direction: row;\n padding: 0;\n\n .wrapper {\n width: auto;\n padding-left: 1.125rem;\n height: 4rem;\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 }\n\n .text {\n margin-top: 0;\n margin-left: $default-space;\n padding: 0;\n }\n }\n\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 &: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(--theme-workflow-step-icon-default--color--disabled) !important;\n }\n\n .text {\n color: var(--theme-workflow-step--color--disabled);\n }\n }\n }\n}","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/*\n * COPYRIGHT (c) Siemens AG 2018-2022 ALL RIGHTS RESERVED.\n */\n\nimport {\n Component,\n Element,\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 scoped: 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({ mutable: true }) selected: boolean = false;\n\n /**\n * Activate navigation click\n */\n @Prop() position: 'first' | 'last' | 'undefined' = 'undefined';\n\n @State() iconName: 'circle' | 'circle-dot' | 'success' | 'warning' | 'error' =\n 'circle';\n @State() iconColor: string = 'workflow-step-icon-default--color';\n\n private customIconSlot: boolean;\n\n private select() {\n if (!this.clickable) return;\n if (this.disabled) return;\n\n this.selected = true;\n this.selectedHandler();\n }\n\n @Watch('selected')\n selectedHandler() {\n const selectedStyle = this.selected ? '--selected' : '';\n\n if (this.status === 'open') {\n this.iconName = this.selected ? 'circle-dot' : 'circle';\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('status')\n watchPropHandler() {\n switch (this.status) {\n case 'open':\n this.iconName = 'circle';\n this.iconColor = 'workflow-step-icon-default--color';\n break;\n case 'success':\n this.iconName = 'success';\n this.iconColor = 'color-success';\n break;\n case 'done':\n this.iconName = 'success';\n this.iconColor = 'workflow-step-icon-done--color';\n break;\n case 'warning':\n this.iconName = 'warning';\n this.iconColor = 'color-warning';\n break;\n case 'error':\n this.iconName = 'error';\n this.iconColor = 'color-alarm';\n break;\n\n default:\n this.iconName = 'circle';\n break;\n }\n\n if (this.disabled) {\n this.iconColor = 'workflow-step-icon-success--color--disabled';\n }\n }\n\n componentDidLoad() {\n this.watchPropHandler();\n this.selectedHandler();\n\n this.customIconSlot = !!this.hostElement.querySelector(\n '[slot=\"custom-icon\"]'\n );\n }\n\n render() {\n const icons = !this.customIconSlot ? (\n <Fragment>\n <ix-icon\n color=\"color-1\"\n name={\n this.iconName === 'warning' ? 'triangle-filled' : 'circle-filled'\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 ) : (\n ''\n );\n\n return (\n <Host>\n <div\n tabIndex={0}\n onClick={() => this.select()}\n class={{\n step: true,\n selected: this.selected,\n vertical: this.vertical,\n disabled: 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}
|
|
1
|
+
{"file":"ix-workflow-step.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,86IAA86I;;MC4Bz7I,YAAY;;;;;oBAMK,KAAK;oBAKL,KAAK;kBAKmC,MAAM;qBAK7C,KAAK;oBAKW,KAAK;oBAOY,WAAW;oBAGvE,QAAQ;qBACmB,mCAAmC;;EASxD,MAAM;IACZ,IAAI,CAAC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E,IAAI,CAAC,QAAQ;QACvB,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI;QACnB,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI;OACtB,GACI,EACP,WAAK,KAAK,EAAC,aAAa,IACrB,KAAK,EACN,YAAM,IAAI,EAAC,aAAa,GAAQ,CAC5B,CACF,EACN,WAAK,KAAK,EAAC,MAAM,IACf,eAAa,CACT,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/workflow-step/workflow-step.scss?tag=ix-workflow-step&encapsulation=scoped","./src/components/workflow-step/workflow-step.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n\n:host {\n .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 width: auto;\n padding: 1.125rem 0 $small-space 0;\n height: 4rem;\n width: 12.75rem;\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: auto;\n padding: 0 $small-space;\n }\n\n &.vertical {\n flex-direction: row;\n padding: 0;\n\n .wrapper {\n width: auto;\n padding-left: 1.125rem;\n height: 4rem;\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-top: 0;\n margin-left: $default-space;\n padding: 0;\n }\n }\n\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 &: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: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n Fragment,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\n\n@Component({\n tag: 'ix-workflow-step',\n styleUrl: 'workflow-step.scss',\n scoped: 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({ mutable: true }) selected: boolean = false;\n\n /**\n * Activate navigation click\n *\n * @deprecated Will be changed to '@internal' in 2.0.0\n */\n @Prop() position: 'first' | 'last' | 'single' | 'undefined' = 'undefined';\n\n @State() iconName: 'circle' | 'circle-dot' | 'success' | 'warning' | 'error' =\n 'circle';\n @State() iconColor: string = 'workflow-step-icon-default--color';\n\n /**\n * @internal\n */\n @Event() selectedChanged: EventEmitter<HTMLIxWorkflowStepElement>;\n\n private customIconSlot: boolean;\n\n private select() {\n if (!this.clickable) return;\n if (this.disabled) return;\n\n this.selected = true;\n this.selectedHandler();\n }\n\n @Watch('selected')\n selectedHandler() {\n const selectedStyle = this.selected ? '--selected' : '';\n\n if (this.status === 'open') {\n this.iconName = this.selected ? 'circle-dot' : 'circle';\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('status')\n watchPropHandler() {\n switch (this.status) {\n case 'open':\n this.iconName = 'circle';\n this.iconColor = 'workflow-step-icon-default--color';\n break;\n case 'success':\n this.iconName = 'success';\n this.iconColor = 'color-success';\n break;\n case 'done':\n this.iconName = 'success';\n this.iconColor = 'workflow-step-icon-done--color';\n break;\n case 'warning':\n this.iconName = 'warning';\n this.iconColor = 'color-warning';\n break;\n case 'error':\n this.iconName = 'error';\n this.iconColor = 'color-alarm';\n break;\n\n default:\n this.iconName = 'circle';\n break;\n }\n\n if (this.disabled) {\n this.iconColor = 'workflow-step-icon-success--color--disabled';\n }\n }\n\n componentDidLoad() {\n this.watchPropHandler();\n this.selectedHandler();\n\n this.customIconSlot = !!this.hostElement.querySelector(\n '[slot=\"custom-icon\"]'\n );\n }\n\n @Listen('click', { passive: true })\n clickFunction() {\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.iconName === 'warning' ? 'triangle-filled' : 'circle-filled'\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 ) : (\n ''\n );\n\n return (\n <Host>\n <div\n tabIndex={0}\n onClick={() => this.select()}\n class={{\n step: true,\n selected: this.selected,\n vertical: this.vertical,\n disabled: 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}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { c as createMutationObserver } from './mutation-observer.js';
|
|
2
3
|
|
|
3
4
|
const workflowStepsCss = ".sc-ix-workflow-steps-h .steps.sc-ix-workflow-steps{display:flex}.sc-ix-workflow-steps-h .steps.vertical.sc-ix-workflow-steps{display:block}";
|
|
4
5
|
|
|
5
|
-
const WorkflowSteps = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
const WorkflowSteps = /*@__PURE__*/ proxyCustomElement(class WorkflowSteps extends HTMLElement {
|
|
6
7
|
constructor() {
|
|
7
8
|
super();
|
|
8
9
|
this.__registerHost();
|
|
@@ -15,48 +16,56 @@ const WorkflowSteps = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
15
16
|
getSteps() {
|
|
16
17
|
return Array.from(this.hostElement.querySelectorAll('ix-workflow-step'));
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
steps.forEach((element) => {
|
|
21
|
-
element.setAttribute('selected', 'false');
|
|
22
|
-
});
|
|
19
|
+
get stepsContent() {
|
|
20
|
+
return this.hostElement.querySelector('.steps');
|
|
23
21
|
}
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
updateSteps() {
|
|
23
|
+
let steps = this.getSteps();
|
|
26
24
|
steps.forEach((element, index) => {
|
|
27
|
-
element.
|
|
28
|
-
element.
|
|
29
|
-
element.
|
|
30
|
-
if (
|
|
31
|
-
element.
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
element.vertical = this.vertical;
|
|
26
|
+
element.clickable = this.clickable;
|
|
27
|
+
element.selected = this.selectedIndex === index;
|
|
28
|
+
if (steps.length === 1) {
|
|
29
|
+
element.position = 'single';
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (index === 0) {
|
|
33
|
+
element.position = 'first';
|
|
34
|
+
}
|
|
35
|
+
else if (index === steps.length - 1) {
|
|
36
|
+
element.position = 'last';
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
element.position = 'undefined';
|
|
40
|
+
}
|
|
34
41
|
});
|
|
35
42
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
const previousElement = steps[index - 1];
|
|
43
|
-
if (this.linear &&
|
|
44
|
-
previousElement &&
|
|
45
|
-
!['done', 'success'].includes(previousElement === null || previousElement === void 0 ? void 0 : previousElement.status)) {
|
|
46
|
-
return element.setAttribute('selected', 'false');
|
|
43
|
+
componentDidLoad() {
|
|
44
|
+
this.stepsContent.addEventListener('selectedChanged', (event) => {
|
|
45
|
+
const steps = this.getSteps();
|
|
46
|
+
steps.forEach((element) => {
|
|
47
|
+
if (element !== event.target) {
|
|
48
|
+
element.selected = false;
|
|
47
49
|
}
|
|
48
|
-
this.deselectAll();
|
|
49
|
-
element.setAttribute('selected', 'true');
|
|
50
|
-
this.stepSelected.emit(index);
|
|
51
50
|
});
|
|
52
|
-
// const isEnabled = element.getAttribute('first');
|
|
53
|
-
// if(isEnabled){
|
|
54
|
-
// }
|
|
55
|
-
// console.log(isEnabled)
|
|
56
|
-
// const isDisabled = element.getAttribute('disabled') !== null;
|
|
57
|
-
// if (!isDisabled) element.addEventListener('click', () => '');
|
|
58
|
-
//element.addEventListener('mousedown', event => this.clicked(element, index));
|
|
59
51
|
});
|
|
52
|
+
const slotDiv = this.hostElement.querySelector('.steps');
|
|
53
|
+
this.observer = createMutationObserver((mutations) => {
|
|
54
|
+
for (let mutation of mutations) {
|
|
55
|
+
if (mutation.type === 'childList') {
|
|
56
|
+
this.updateSteps();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
this.observer.observe(slotDiv, { childList: true });
|
|
61
|
+
}
|
|
62
|
+
disconnectedCallback() {
|
|
63
|
+
if (this.observer) {
|
|
64
|
+
this.observer.disconnect();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
componentDidRender() {
|
|
68
|
+
this.updateSteps();
|
|
60
69
|
}
|
|
61
70
|
render() {
|
|
62
71
|
return (h(Host, null, h("div", { class: { steps: true, vertical: this.vertical } }, h("slot", null))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"ix-workflow-steps.js","mappings":"
|
|
1
|
+
{"file":"ix-workflow-steps.js","mappings":";;;AAAA,MAAM,gBAAgB,GAAG,8IAA8I;;MCyB1J,aAAa;;;;;oBAMI,KAAK;kBAMP,KAAK;qBAKF,KAAK;yBAKF,CAAC;;EAOzB,QAAQ;IACd,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC,CAAC;GAC1E;EAED,IAAI,YAAY;IACd,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;GACjD;EAED,WAAW;IACT,IAAI,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC5B,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK;MAC3B,OAAO,CAAC,QAAQ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,EAAE,CAAC,CAAC;GACrD;EAED,oBAAoB;IAClB,IAAI,IAAI,CAAC,QAAQ,EAAE;MACjB,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;KAC5B;GACF;EAED,kBAAkB;IAChB,IAAI,CAAC,WAAW,EAAE,CAAC;GACpB;EAED,MAAM;IACJ,QACE,EAAC,IAAI,QACH,WAAK,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAClD,eAAa,CACT,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/workflow-steps/workflow-steps.scss?tag=ix-workflow-steps&encapsulation=scoped","./src/components/workflow-steps/workflow-steps.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n\n:host {\n .steps {\n display: flex;\n\n &.vertical {\n display: block;\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 {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\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 scoped: true,\n})\nexport class WorkflowSteps {\n @Element() hostElement!: HTMLIxWorkflowStepsElement;\n\n /**\n * Select orientation\n */\n @Prop() vertical: boolean = false;\n\n /**\n * Select linear mode\n * @deprecated Has no effect on component. Will get removed in 2.0.0\n */\n @Prop() linear: 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 get stepsContent() {\n return this.hostElement.querySelector('.steps');\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 componentDidLoad() {\n this.stepsContent.addEventListener(\n 'selectedChanged',\n (event: CustomEvent<HTMLIxWorkflowStepElement>) => {\n const steps = this.getSteps();\n steps.forEach((element) => {\n if (element !== event.target) {\n element.selected = false;\n }\n });\n }\n );\n\n const slotDiv = this.hostElement.querySelector('.steps');\n\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(slotDiv, { 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}
|
|
@@ -5,7 +5,7 @@ import { d as defineCustomElement$1 } from './icon-button.js';
|
|
|
5
5
|
|
|
6
6
|
const mapNavigationOverlayCss = ".text-xs.sc-ix-map-navigation-overlay{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.625rem;font-weight:400;line-height:1.4em;color:var(--theme-color-std-text)}.text-s.sc-ix-map-navigation-overlay{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.75rem;font-weight:400;line-height:1.5em;color:var(--theme-color-std-text)}.text-caption.sc-ix-map-navigation-overlay{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.75rem;font-weight:700;line-height:1.5em;color:var(--theme-color-std-text)}.text-caption-single.sc-ix-map-navigation-overlay{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.75rem;font-weight:700;line-height:1em;color:var(--theme-color-std-text)}.text-default.sc-ix-map-navigation-overlay{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:400;line-height:1.429em;color:var(--theme-color-std-text)}.text-default-single.sc-ix-map-navigation-overlay{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:400;line-height:1.143em;color:var(--theme-color-std-text)}.text-default-title.sc-ix-map-navigation-overlay{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:700;line-height:1.429em;color:var(--theme-color-std-text)}.text-default-title-single.sc-ix-map-navigation-overlay{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:700;line-height:1.143em;color:var(--theme-color-std-text)}.text-l.sc-ix-map-navigation-overlay{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:400;line-height:1.5em;color:var(--theme-color-std-text)}.text-l-single.sc-ix-map-navigation-overlay{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:400;line-height:1.25em;color:var(--theme-color-std-text)}.text-l-title.sc-ix-map-navigation-overlay{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:700;line-height:1.5em;color:var(--theme-color-std-text)}.text-l-title-single.sc-ix-map-navigation-overlay{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:700;line-height:1.25em;color:var(--theme-color-std-text)}.text-h2.sc-ix-map-navigation-overlay{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1.375rem;font-weight:700;line-height:1.455em;color:var(--theme-color-std-text)}.text-xl.sc-ix-map-navigation-overlay{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1.375rem;font-weight:400;line-height:1.091em;color:var(--theme-color-std-text)}a.sc-ix-map-navigation-overlay{color:var(--theme-color-primary)}.sc-ix-map-navigation-overlay-h{position:absolute;width:100%;height:100%;z-index:2;top:0;left:0;background-color:var(--theme-overlay--background)}.sc-ix-map-navigation-overlay-h .overlay-header.sc-ix-map-navigation-overlay{display:flex;position:relative;justify-content:flex-start;align-items:center;height:3.5rem;background-color:var(--theme-overlay-header--background)}.sc-ix-map-navigation-overlay-h .overlay-header-content.sc-ix-map-navigation-overlay{display:flex;align-items:center;min-width:0}.sc-ix-map-navigation-overlay-h .overlay-header-content.sc-ix-map-navigation-overlay ix-icon.sc-ix-map-navigation-overlay{-webkit-margin-start:1rem;margin-inline-start:1rem;color:var(--theme-overlay-header--color)}.sc-ix-map-navigation-overlay-h .overlay-header-content.sc-ix-map-navigation-overlay .overlay-header-title.sc-ix-map-navigation-overlay{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1.375rem;font-weight:700;line-height:1.455em;color:var(--theme-color-std-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--theme-overlay-header--color);-webkit-margin-start:1rem;margin-inline-start:1rem}.sc-ix-map-navigation-overlay-h .color-indicator.sc-ix-map-navigation-overlay{display:inline-block;position:relative;width:0.5rem;height:100%;background-color:var(--theme-color-neutral)}.sc-ix-map-navigation-overlay-h .overlay-close.sc-ix-map-navigation-overlay{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:1rem;margin-inline-end:1rem}";
|
|
7
7
|
|
|
8
|
-
const MapNavigationOverlay = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
+
const MapNavigationOverlay = /*@__PURE__*/ proxyCustomElement(class MapNavigationOverlay extends HTMLElement {
|
|
9
9
|
constructor() {
|
|
10
10
|
super();
|
|
11
11
|
this.__registerHost();
|
|
@@ -4,7 +4,7 @@ import { d as defineCustomElement$1 } from './icon.js';
|
|
|
4
4
|
|
|
5
5
|
const menuAvatarItemCss = ".sc-ix-menu-avatar-item-h{display:block}";
|
|
6
6
|
|
|
7
|
-
const MenuAvatarItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
const MenuAvatarItem = /*@__PURE__*/ proxyCustomElement(class MenuAvatarItem extends HTMLElement {
|
|
8
8
|
constructor() {
|
|
9
9
|
super();
|
|
10
10
|
this.__registerHost();
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
2
2
|
|
|
3
3
|
const menuItemCss = ".sc-ix-menu-item-h{position:relative;display:block;cursor:pointer}.sc-ix-menu-item-h:not(.disabled):not(:disabled).hover,.sc-ix-menu-item-h:not(.disabled):not(:disabled):hover{background-color:var(--theme-ghost--background--hover)}.sc-ix-menu-item-h:not(.disabled):not(:disabled).active,.sc-ix-menu-item-h:not(.disabled):not(:disabled):active{background-color:var(--theme-ghost--background--active)}.sc-ix-menu-item-h .tab.sc-ix-menu-item{display:flex;position:relative;align-items:center;height:3rem;z-index:500;padding-left:1.25rem}.sc-ix-menu-item-h i.glyph.sc-ix-menu-item{color:var(--theme-nav-item-primary-icon--color);position:relative}.sc-ix-menu-item-h .tab.sc-ix-menu-item:focus-visible{outline:none}.sc-ix-menu-item-h:focus-visible{outline:none}.sc-ix-menu-item-h .tab.sc-ix-menu-item:not(:last-child){margin-bottom:0.5rem}.sc-ix-menu-item-h .notification.sc-ix-menu-item{display:inline-flex;position:absolute;top:-0.5rem;right:-50%}.sc-ix-menu-item-h .notification.sc-ix-menu-item .pill.sc-ix-menu-item{display:inline-flex;justify-content:center;align-items:center;height:1rem;min-width:1rem;position:relative;border-radius:6.25rem;background-color:var(--theme-color-primary);border-radius:6.25rem;font-size:0.75rem;font-weight:bold;line-height:1;font-family:Siemens Sans, Arial, sans-serif;color:var(--theme-color-primary--contrast);padding:0.25rem}.sc-ix-menu-item-h .tab-text.sc-ix-menu-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--theme-nav-item-primary--color);margin:0 1.25rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.active.sc-ix-menu-item-h .tab.sc-ix-menu-item,.selected.sc-ix-menu-item-h .tab.sc-ix-menu-item{background-color:var(--theme-nav-item-primary--background--selected)}.active.sc-ix-menu-item-h .tab.sc-ix-menu-item::before,.selected.sc-ix-menu-item-h .tab.sc-ix-menu-item::before{content:\"\";background-color:var(--theme-nav-item-primary--border-color--selected);height:3rem;width:0.25rem;left:0;position:absolute}.active.sc-ix-menu-item-h .tab.sc-ix-menu-item>.glyph.sc-ix-menu-item,.selected.sc-ix-menu-item-h .tab.sc-ix-menu-item>.glyph.sc-ix-menu-item{color:var(--theme-nav-item-primary-icon--color--selected)}.disabled.sc-ix-menu-item-h{color:var(--theme-color-weak-text);pointer-events:none;cursor:default}.disabled.sc-ix-menu-item-h .tab.sc-ix-menu-item>.glyph.sc-ix-menu-item{color:var(--theme-color-weak-text)}.disabled.sc-ix-menu-item-h .tab-text.sc-ix-menu-item{color:var(--theme-color-weak-text)}.home-tab.sc-ix-menu-item-h,[slot=home].sc-ix-menu-item-h{margin-bottom:1.5rem}.bottom-tab.sc-ix-menu-item-h,[slot=bottom].sc-ix-menu-item-h{height:2.25rem}.bottom-tab.sc-ix-menu-item-h .tab.sc-ix-menu-item,[slot=bottom].sc-ix-menu-item-h .tab.sc-ix-menu-item{height:2.25rem}.bottom-tab.sc-ix-menu-item-h .tab.sc-ix-menu-item::before,[slot=bottom].sc-ix-menu-item-h .tab.sc-ix-menu-item::before{height:2.25rem;background-color:transparent}.bottom-tab.active.sc-ix-menu-item-h .tab.sc-ix-menu-item,.bottom-tab.selected.sc-ix-menu-item-h .tab.sc-ix-menu-item,[slot=bottom].active.sc-ix-menu-item-h .tab.sc-ix-menu-item,[slot=bottom].selected.sc-ix-menu-item-h .tab.sc-ix-menu-item{background-color:var(--theme-nav-item-secondary--background--selected)}.bottom-tab.active.sc-ix-menu-item-h:hover,.bottom-tab.selected.sc-ix-menu-item-h:hover,[slot=bottom].active.sc-ix-menu-item-h:hover,[slot=bottom].selected.sc-ix-menu-item-h:hover{background-color:var(--theme-nav-item-secondary--background--selected)}.bottom-tab.active.sc-ix-menu-item-h:active,.bottom-tab.selected.sc-ix-menu-item-h:active,[slot=bottom].active.sc-ix-menu-item-h:active,[slot=bottom].selected.sc-ix-menu-item-h:active{background-color:var(--theme-nav-item-secondary--background--selected)}";
|
|
4
4
|
|
|
5
|
-
const MenuItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
5
|
+
const MenuItem = /*@__PURE__*/ proxyCustomElement(class MenuItem extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
8
8
|
this.__registerHost();
|