@siemens/ix 1.2.0 → 1.3.0-beta.0
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/alignment-24ae2e63.js +1372 -0
- package/dist/cjs/index-17eb8998.js +4 -0
- package/dist/cjs/index.cjs.js +4 -1
- package/dist/cjs/ix-button.cjs.entry.js +4 -2
- package/dist/cjs/ix-category-filter.cjs.entry.js +8 -8
- package/dist/cjs/ix-chip.cjs.entry.js +21 -8
- package/dist/cjs/ix-counter-pill.cjs.entry.js +1 -1
- package/dist/cjs/ix-dropdown-button.cjs.entry.js +40 -0
- package/dist/cjs/ix-dropdown_2.cjs.entry.js +87 -41
- package/dist/cjs/ix-expanding-search.cjs.entry.js +2 -2
- package/dist/cjs/ix-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/ix-map-navigation_2.cjs.entry.js +5 -4
- package/dist/cjs/ix-menu_9.cjs.entry.js +12 -93
- package/dist/cjs/ix-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/ix-pill.cjs.entry.js +5 -2
- package/dist/cjs/ix-select_2.cjs.entry.js +35 -14
- package/dist/cjs/ix-split-button_2.cjs.entry.js +6 -35
- package/dist/cjs/ix-validation-tooltip.cjs.entry.js +71 -26
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{modal-e4a6983d.js → modal-dda2f6be.js} +8 -2
- package/dist/cjs/siemens-ix.cjs.js +1 -1
- package/dist/cjs/theme-switcher-6b45e082.js +92 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/button/button.js +5 -3
- package/dist/collection/components/category-filter/category-filter.css +4 -4
- package/dist/collection/components/category-filter/category-filter.js +7 -7
- package/dist/collection/components/chip/chip.css +20 -0
- package/dist/collection/components/chip/chip.js +22 -9
- package/dist/collection/components/counter-pill/counter-pill.css +10 -0
- package/dist/collection/components/dropdown/alignment.js +9 -0
- package/dist/collection/components/dropdown/dropdown.css +1 -0
- package/dist/collection/components/dropdown/dropdown.js +113 -50
- package/dist/collection/components/dropdown/placement.js +1 -0
- package/dist/collection/components/dropdown-button/dropdown-button.css +81 -0
- package/dist/collection/components/dropdown-button/dropdown-button.js +191 -0
- package/dist/collection/components/expanding-search/expanding-search.css +1 -0
- package/dist/collection/components/expanding-search/expanding-search.js +1 -1
- package/dist/collection/components/icon-button/icon-button.css +3 -30
- package/dist/collection/components/icon-button/icon-button.js +2 -2
- package/dist/collection/components/map-navigation/map-navigation.js +3 -2
- package/dist/collection/components/map-navigation-overlay/map-navigation-overlay.css +9 -4
- package/dist/collection/components/map-navigation-overlay/map-navigation-overlay.js +1 -1
- package/dist/collection/components/menu/menu.css +1 -1
- package/dist/collection/components/menu/menu.js +6 -21
- package/dist/collection/components/menu-avatar/menu-avatar.js +4 -30
- package/dist/collection/components/modal/modal.css +1 -0
- package/dist/collection/components/modal/modal.js +7 -1
- package/dist/collection/components/pill/pill.css +10 -0
- package/dist/collection/components/pill/pill.js +4 -1
- package/dist/collection/components/select/select.css +0 -3
- package/dist/collection/components/select/select.js +13 -12
- package/dist/collection/components/select-item/events.js +16 -0
- package/dist/collection/components/select-item/select-item.js +23 -4
- package/dist/collection/components/split-button/split-button.js +7 -36
- package/dist/collection/components/tree/tree.js +1 -1
- package/dist/collection/components/utils/theme-switcher.js +86 -0
- package/dist/collection/components/validation-tooltip/validation-tooltip.css +4 -24
- package/dist/collection/components/validation-tooltip/validation-tooltip.js +75 -28
- package/dist/collection/exports.js +1 -0
- package/dist/components/alignment.js +1363 -0
- package/dist/components/button.js +5 -3
- package/dist/components/dropdown.js +88 -41
- package/dist/components/icon-button.js +3 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -1
- package/dist/components/ix-category-filter.js +18 -12
- package/dist/components/ix-chip.js +21 -8
- package/dist/components/ix-counter-pill.js +1 -1
- package/dist/components/ix-dropdown-button.d.ts +11 -0
- package/dist/components/ix-dropdown-button.js +86 -0
- package/dist/components/ix-expanding-search.js +2 -2
- package/dist/components/ix-map-navigation.js +3 -2
- package/dist/components/ix-menu-avatar.js +6 -19
- package/dist/components/ix-menu.js +93 -46
- package/dist/components/ix-pill.js +5 -2
- package/dist/components/ix-select.js +9 -14
- package/dist/components/ix-split-button.js +6 -35
- package/dist/components/ix-validation-tooltip.js +74 -27
- package/dist/components/map-navigation-overlay.js +2 -2
- package/dist/components/modal.js +8 -2
- package/dist/components/select-item.js +27 -1
- package/dist/esm/alignment-f63c1b89.js +1363 -0
- package/dist/esm/index-6f4f3582.js +4 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/ix-button.entry.js +5 -3
- package/dist/esm/ix-category-filter.entry.js +8 -8
- package/dist/esm/ix-chip.entry.js +21 -8
- package/dist/esm/ix-counter-pill.entry.js +1 -1
- package/dist/esm/ix-dropdown-button.entry.js +36 -0
- package/dist/esm/ix-dropdown_2.entry.js +87 -41
- package/dist/esm/ix-expanding-search.entry.js +2 -2
- package/dist/esm/ix-icon-button.entry.js +3 -3
- package/dist/esm/ix-map-navigation_2.entry.js +5 -4
- package/dist/esm/ix-menu_9.entry.js +12 -93
- package/dist/esm/ix-modal_2.entry.js +1 -1
- package/dist/esm/ix-pill.entry.js +5 -2
- package/dist/esm/ix-select_2.entry.js +35 -14
- package/dist/esm/ix-split-button_2.entry.js +6 -35
- package/dist/esm/ix-validation-tooltip.entry.js +71 -26
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{modal-e7343756.js → modal-df0a62f2.js} +8 -2
- package/dist/esm/siemens-ix.js +1 -1
- package/dist/esm/theme-switcher-dce1aaec.js +89 -0
- package/dist/siemens-ix/index.esm.js +1 -1
- package/dist/siemens-ix/p-03d38416.entry.js +1 -0
- package/dist/siemens-ix/p-0e357d27.entry.js +1 -0
- package/dist/siemens-ix/p-18d02e6f.entry.js +1 -0
- package/dist/siemens-ix/p-2bc72119.entry.js +1 -0
- package/dist/siemens-ix/p-2bd88760.entry.js +1 -0
- package/dist/siemens-ix/p-2c5abec1.js +1 -0
- package/dist/siemens-ix/p-35990ac7.js +1 -0
- package/dist/siemens-ix/p-43616759.entry.js +1 -0
- package/dist/siemens-ix/p-4fcb5f2b.entry.js +1 -0
- package/dist/siemens-ix/p-5631ae88.entry.js +1 -0
- package/dist/siemens-ix/p-5bbe9943.entry.js +1 -0
- package/dist/siemens-ix/p-6fe3bb9c.entry.js +1 -0
- package/dist/siemens-ix/{p-1cf3348f.entry.js → p-7f842cdc.entry.js} +1 -1
- package/dist/siemens-ix/p-ab7949ff.entry.js +1 -0
- package/dist/siemens-ix/p-b3d00feb.entry.js +1 -0
- package/dist/siemens-ix/p-d20119c1.entry.js +1 -0
- package/dist/siemens-ix/p-dec6114f.js +1 -0
- package/dist/siemens-ix/p-f35ce089.entry.js +1 -0
- package/dist/siemens-ix/siemens-ix.css +25 -3
- package/dist/siemens-ix/siemens-ix.esm.js +1 -1
- package/dist/types/components/button/button.d.ts +1 -1
- package/dist/types/components/category-filter/category-filter.d.ts +1 -0
- package/dist/types/components/chip/chip.d.ts +2 -1
- package/dist/types/components/dropdown/alignment.d.ts +2 -0
- package/dist/types/components/dropdown/dropdown.d.ts +19 -6
- package/dist/types/components/dropdown/placement.d.ts +8 -0
- package/dist/types/components/dropdown-button/dropdown-button.d.ts +37 -0
- package/dist/types/components/menu/menu.d.ts +0 -2
- package/dist/types/components/menu-avatar/menu-avatar.d.ts +1 -5
- package/dist/types/components/modal/modal.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +2 -1
- package/dist/types/components/select-item/events.d.ts +9 -0
- package/dist/types/components/select-item/select-item.d.ts +3 -2
- package/dist/types/components/split-button/split-button.d.ts +4 -6
- package/dist/types/components/tree/tree.d.ts +1 -1
- package/dist/types/components/utils/theme-switcher.d.ts +19 -0
- package/dist/types/components/validation-tooltip/validation-tooltip.d.ts +12 -4
- package/dist/types/components.d.ts +88 -17
- package/dist/types/exports.d.ts +1 -0
- package/package.json +5 -6
- package/scss/components/_buttons.scss +23 -0
- package/scss/components/_dropdown.scss +2 -0
- package/dist/cjs/popper-d7a0f999.js +0 -1801
- package/dist/collection/components/utils/popover.util.js +0 -33
- package/dist/collection/components/utils/toggle-theme.js +0 -24
- package/dist/components/popover.util.js +0 -36
- package/dist/components/popper.js +0 -1799
- package/dist/esm/popper-42db9fbd.js +0 -1799
- package/dist/siemens-ix/p-0a8cfa42.entry.js +0 -1
- package/dist/siemens-ix/p-16e95211.entry.js +0 -1
- package/dist/siemens-ix/p-1fe97752.entry.js +0 -1
- package/dist/siemens-ix/p-23d5469a.entry.js +0 -1
- package/dist/siemens-ix/p-47d55e3d.entry.js +0 -1
- package/dist/siemens-ix/p-537f0678.entry.js +0 -1
- package/dist/siemens-ix/p-5e222be2.entry.js +0 -1
- package/dist/siemens-ix/p-7adc0686.entry.js +0 -1
- package/dist/siemens-ix/p-94604cdf.js +0 -1
- package/dist/siemens-ix/p-9566c834.entry.js +0 -1
- package/dist/siemens-ix/p-9e90827e.entry.js +0 -1
- package/dist/siemens-ix/p-a12f6079.entry.js +0 -1
- package/dist/siemens-ix/p-c0fecc2b.entry.js +0 -1
- package/dist/siemens-ix/p-d8688602.entry.js +0 -1
- package/dist/siemens-ix/p-f86fcdf4.js +0 -1
- package/dist/types/components/utils/popover.util.d.ts +0 -9
- package/dist/types/components/utils/toggle-theme.d.ts +0 -1
- package/src/components/animated-tab/readme.md +0 -24
- package/src/components/animated-tabs/readme.md +0 -31
- package/src/components/application-header/readme.md +0 -21
- package/src/components/basic-navigation/readme.md +0 -22
- package/src/components/blind/readme.md +0 -29
- package/src/components/breadcrumb/readme.md +0 -33
- package/src/components/breadcrumb-item/readme.md +0 -22
- package/src/components/button/readme.md +0 -27
- package/src/components/category-filter/readme.md +0 -39
- package/src/components/chip/readme.md +0 -36
- package/src/components/counter-pill/readme.md +0 -25
- package/src/components/date-picker/readme.md +0 -53
- package/src/components/date-time-card/readme.md +0 -22
- package/src/components/datetime-picker/readme.md +0 -45
- package/src/components/drawer/readme.md +0 -47
- package/src/components/dropdown/readme.md +0 -49
- package/src/components/dropdown-item/readme.md +0 -45
- package/src/components/event-list/readme.md +0 -24
- package/src/components/event-list-item/readme.md +0 -32
- package/src/components/expanding-search/readme.md +0 -32
- package/src/components/filter-chip/readme.md +0 -30
- package/src/components/flip-tile/readme.md +0 -22
- package/src/components/flip-tile-content/readme.md +0 -14
- package/src/components/group/readme.md +0 -14
- package/src/components/group-dropdown-item/readme.md +0 -22
- package/src/components/group-item/readme.md +0 -34
- package/src/components/icon/readme.md +0 -23
- package/src/components/icon-button/readme.md +0 -31
- package/src/components/input-group/readme.md +0 -14
- package/src/components/kpi/readme.md +0 -27
- package/src/components/map-navigation/readme.md +0 -54
- package/src/components/map-navigation-overlay/readme.md +0 -30
- package/src/components/menu/readme.md +0 -86
- package/src/components/menu-about/readme.md +0 -30
- package/src/components/menu-about-item/readme.md +0 -21
- package/src/components/menu-about-news/readme.md +0 -34
- package/src/components/menu-avatar/readme.md +0 -30
- package/src/components/menu-avatar-item/readme.md +0 -29
- package/src/components/menu-item/readme.md +0 -26
- package/src/components/menu-settings/readme.md +0 -30
- package/src/components/menu-settings-item/readme.md +0 -21
- package/src/components/message-bar/readme.md +0 -31
- package/src/components/modal/readme.md +0 -67
- package/src/components/modal-container/readme.md +0 -29
- package/src/components/my-component/readme.md +0 -16
- package/src/components/pill/readme.md +0 -26
- package/src/components/select/readme.md +0 -37
- package/src/components/select-item/readme.md +0 -44
- package/src/components/spinner/readme.md +0 -22
- package/src/components/split-button/readme.md +0 -36
- package/src/components/split-button-item/readme.md +0 -29
- package/src/components/tab-item/readme.md +0 -28
- package/src/components/tabs/readme.md +0 -25
- package/src/components/tile/readme.md +0 -21
- package/src/components/time-picker/readme.md +0 -51
- package/src/components/toast/readme.md +0 -36
- package/src/components/toggle/readme.md +0 -35
- package/src/components/tree/readme.md +0 -32
- package/src/components/tree-item/readme.md +0 -31
- package/src/components/upload/readme.md +0 -51
- package/src/components/validation-tooltip/readme.md +0 -31
- package/src/components/workflow-step/readme.md +0 -28
- package/src/components/workflow-steps/readme.md +0 -33
|
@@ -105,9 +105,10 @@ const MapNavigation = class {
|
|
|
105
105
|
overlayInstance.setAttribute('color', color);
|
|
106
106
|
overlayInstance.setAttribute('name', name);
|
|
107
107
|
overlayInstance.setAttribute('icon', icon);
|
|
108
|
+
overlayInstance.setAttribute('slot', 'overlay');
|
|
108
109
|
overlayInstance.addEventListener('closeClick', () => this.closeOverlay());
|
|
109
110
|
overlayInstance.appendChild(component);
|
|
110
|
-
this.
|
|
111
|
+
this.hostElement.appendChild(overlayInstance);
|
|
111
112
|
}
|
|
112
113
|
/**
|
|
113
114
|
* Close current shown overlay
|
|
@@ -132,7 +133,7 @@ const MapNavigation = class {
|
|
|
132
133
|
});
|
|
133
134
|
}
|
|
134
135
|
render() {
|
|
135
|
-
return (h(Host, null, h("div", { id: "menu-placeholder" }), h("div", { class: "map-nav" }, h("div", { class: "map-nav-sidebar" }, h("div", { class: "map-nav-header" }, h("ix-application-header", { name: this.applicationName, class: "map-nav-header-brand" }, h("slot", { name: "logo" }))), h("div", { class: "map-nav-sidebar-content" }, h("div", { class: "map-nav-sidebar-static-content" }, h("div", { class: "map-nav-title" }, this.navigationTitle), this.hideContextMenu ? ('') : (h("ix-icon-button", { icon: "context-menu", ghost: true, size: "24", variant: "Secondary", onClick: (_) => this.contextMenuClick.emit() }))), h("div", { class: "map-nav-sidebar-user-content" }, h("slot", { name: "sidebar-content" })))), h("div", { class: "content" }, h("div", { class: "map-nav-header-content bg-2" }, h("slot", { name: "content-header" })), h("main", null, h("slot", null))))));
|
|
136
|
+
return (h(Host, null, h("div", { id: "menu-placeholder" }), h("div", { class: "map-nav" }, h("div", { class: "map-nav-sidebar" }, h("div", { class: "map-nav-header" }, h("ix-application-header", { name: this.applicationName, class: "map-nav-header-brand" }, h("slot", { name: "logo" }))), h("div", { class: "map-nav-sidebar-content" }, h("div", { class: "map-nav-sidebar-static-content" }, h("div", { class: "map-nav-title" }, this.navigationTitle), this.hideContextMenu ? ('') : (h("ix-icon-button", { icon: "context-menu", ghost: true, size: "24", variant: "Secondary", onClick: (_) => this.contextMenuClick.emit() }))), h("div", { class: "map-nav-sidebar-user-content" }, h("slot", { name: "sidebar-content" })))), h("div", { class: "content" }, h("div", { class: "map-nav-header-content bg-2" }, h("slot", { name: "content-header" })), h("main", null, h("slot", null), h("slot", { name: "overlay" }))))));
|
|
136
137
|
}
|
|
137
138
|
get hostElement() { return getElement(this); }
|
|
138
139
|
};
|
|
@@ -140,7 +141,7 @@ MapNavigation.defaultTime = 150;
|
|
|
140
141
|
MapNavigation.slowTime = 500;
|
|
141
142
|
MapNavigation.style = mapNavigationCss;
|
|
142
143
|
|
|
143
|
-
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;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{margin-
|
|
144
|
+
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}";
|
|
144
145
|
|
|
145
146
|
const MapNavigationOverlay = class {
|
|
146
147
|
constructor(hostRef) {
|
|
@@ -185,7 +186,7 @@ const MapNavigationOverlay = class {
|
|
|
185
186
|
'background-color': this.color
|
|
186
187
|
? `var(--theme-${this.color})`
|
|
187
188
|
: '',
|
|
188
|
-
} }), h("div", { class: "overlay-header-content" }, h("ix-icon", { size: "32", name: this.icon }), h("span", { class: "overlay-header-title", title: this.name }, this.name)), h("ix-icon-button", { class: "overlay-close",
|
|
189
|
+
} }), h("div", { class: "overlay-header-content" }, h("ix-icon", { size: "32", name: this.icon }), h("span", { class: "overlay-header-title", title: this.name }, this.name)), h("ix-icon-button", { class: "overlay-close", ghost: true, icon: "close", size: "24", onClick: () => this.closeOverlay() })), h("slot", null)));
|
|
189
190
|
}
|
|
190
191
|
get hostElement() { return getElement(this); }
|
|
191
192
|
};
|
|
@@ -1,65 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement, f as forceUpdate } from './index-6f4f3582.js';
|
|
2
2
|
import { a as convertToRemString } from './rwd.util-4a61a4b8.js';
|
|
3
|
+
import { t as themeSwitcher } from './theme-switcher-dce1aaec.js';
|
|
4
|
+
import './typed-event-ab58c27e.js';
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
* SPDX-FileCopyrightText: 2022 Siemens AG
|
|
6
|
-
*
|
|
7
|
-
* SPDX-License-Identifier: MIT
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/
|
|
12
|
-
class Popover {
|
|
13
|
-
constructor(hostElement, popoverElement, outsideCallback) {
|
|
14
|
-
this.hostElement = hostElement;
|
|
15
|
-
this.popoverElement = popoverElement;
|
|
16
|
-
this.outsideCallback = outsideCallback;
|
|
17
|
-
}
|
|
18
|
-
outside(e) {
|
|
19
|
-
var _a;
|
|
20
|
-
if (!((_a = this.hostElement) === null || _a === void 0 ? void 0 : _a.contains(e.target))) {
|
|
21
|
-
this.outsideCallback(e);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
open(maxWidth = 256) {
|
|
25
|
-
this.popoverElement.style.transform = `
|
|
26
|
-
translateX(${this.hostElement.offsetLeft + this.hostElement.offsetWidth}px)
|
|
27
|
-
translateY(-${this.hostElement.offsetHeight}px)
|
|
28
|
-
`;
|
|
29
|
-
this.popoverElement.style.maxWidth = convertToRemString(maxWidth);
|
|
30
|
-
document.body.addEventListener('click', this.outside.bind(this));
|
|
31
|
-
}
|
|
32
|
-
destroy() {
|
|
33
|
-
document.body.removeEventListener('click', this.outside.bind(this));
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/*
|
|
38
|
-
* SPDX-FileCopyrightText: 2022 Siemens AG
|
|
39
|
-
*
|
|
40
|
-
* SPDX-License-Identifier: MIT
|
|
41
|
-
*
|
|
42
|
-
* This source code is licensed under the MIT license found in the
|
|
43
|
-
* LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/
|
|
45
|
-
const toggleVariant = () => {
|
|
46
|
-
let currentTheme = Array.from(document.body.classList).find((className) => className.includes('theme-'));
|
|
47
|
-
if (!currentTheme) {
|
|
48
|
-
currentTheme = 'theme-classic-dark';
|
|
49
|
-
}
|
|
50
|
-
const isDark = currentTheme.endsWith('-dark');
|
|
51
|
-
let newTheme = currentTheme;
|
|
52
|
-
if (isDark) {
|
|
53
|
-
newTheme = currentTheme.replace(/-dark$/g, '-light');
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
newTheme = currentTheme.replace(/-light$/g, '-dark');
|
|
57
|
-
}
|
|
58
|
-
document.body.classList.remove(currentTheme);
|
|
59
|
-
document.body.classList.add(newTheme);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
const menuCss = "ix-menu{display:flex;flex-direction:row;position:absolute;height:100%;min-height:22.75rem;z-index:var(--theme-z-index-sticky);width:auto}ix-menu .menu{display:flex;flex-direction:column;position:relative;width:4rem;height:100%;-webkit-padding-after:1rem;padding-block-end:1rem;background-color:var(--theme-nav--background);transition:width var(--animate-duration)}ix-menu .menu.expanded{box-shadow:var(--theme-navigation--box-shadow)}ix-menu .menu .burger-menu-button{display:flex;justify-content:center;margin-top:0.75rem;margin-left:0.75rem;margin-bottom:1rem;height:2rem;width:2.5rem;border-radius:0.25rem}ix-menu .menu .burger-menu-button:not(.disabled):not(:disabled).hover,ix-menu .menu .burger-menu-button:not(.disabled):not(:disabled):hover{background-color:var(--theme-ghost--background--hover)}ix-menu .menu .burger-menu-button:not(.disabled):not(:disabled).active,ix-menu .menu .burger-menu-button:not(.disabled):not(:disabled):active{background-color:var(--theme-ghost--background--active)}ix-menu .menu .burger-menu-button svg{display:inline-block;fill:var(--theme-menu-btn--color);position:relative}ix-menu .menu .burger-menu-button svg .line{opacity:1;transform:rotate(0) translateY(0) translateX(0);transition:transform 0.3s ease-in-out, opacity 0.2s ease-in-out}ix-menu .menu .burger-menu-button.expanded svg .line-1{transform:translate(0.6875rem, -0.05rem) rotate(45deg)}ix-menu .menu .burger-menu-button.expanded svg .line-2{opacity:0}ix-menu .menu .burger-menu-button.expanded svg .line-3{transform:translate(-0.75625rem, 0.8125rem) rotate(-45deg)}ix-menu .menu-overlay{display:block;position:absolute;width:calc(100vw - 4rem);height:100%;left:4rem;z-index:-1;-webkit-backdrop-filter:blur(1rem);backdrop-filter:blur(1rem);background-color:var(--theme-sidebar-overlay-blur);transition:all 150ms ease-out}ix-menu .menu-overlay-invisible{display:none}ix-menu .menu.expanded{width:16rem}ix-menu .menu-overlay.expanded{width:calc(100vw - 16rem);left:16rem}ix-menu #avatar-tab-placeholder{max-height:3rem}ix-menu .avatar{margin-bottom:2rem}ix-menu #cui-imprint .cui-imprint-product-name{margin-bottom:1rem}ix-menu #cui-imprint .cui-imprint-product-description{margin-bottom:2rem}ix-menu #cui-imprint .cui-imprint-link-container{display:flex;align-items:center}ix-menu .bottom-tab-divider{margin-top:auto}";
|
|
6
|
+
const menuCss = "ix-menu{display:flex;flex-direction:row;position:absolute;height:100%;min-height:22.75rem;z-index:var(--theme-z-index-sticky);width:auto}ix-menu .menu{display:flex;flex-direction:column;position:relative;width:4rem;height:100%;-webkit-padding-after:1rem;padding-block-end:1rem;background-color:var(--theme-nav--background);transition:width var(--animate-duration)}ix-menu .menu.expanded{box-shadow:var(--theme-navigation--box-shadow)}ix-menu .menu .burger-menu-button{display:flex;justify-content:center;margin-top:0.75rem;margin-left:0.75rem;margin-bottom:1rem;height:2rem;width:2.5rem;border-radius:0.25rem}ix-menu .menu .burger-menu-button:not(.disabled):not(:disabled).hover,ix-menu .menu .burger-menu-button:not(.disabled):not(:disabled):hover{background-color:var(--theme-ghost--background--hover)}ix-menu .menu .burger-menu-button:not(.disabled):not(:disabled).active,ix-menu .menu .burger-menu-button:not(.disabled):not(:disabled):active{background-color:var(--theme-ghost--background--active)}ix-menu .menu .burger-menu-button svg{display:inline-block;fill:var(--theme-menu-btn--color);position:relative}ix-menu .menu .burger-menu-button svg .line{opacity:1;transform:rotate(0) translateY(0) translateX(0);transition:transform 0.3s ease-in-out, opacity 0.2s ease-in-out}ix-menu .menu .burger-menu-button.expanded svg .line-1{transform:translate(0.6875rem, -0.05rem) rotate(45deg)}ix-menu .menu .burger-menu-button.expanded svg .line-2{opacity:0}ix-menu .menu .burger-menu-button.expanded svg .line-3{transform:translate(-0.75625rem, 0.8125rem) rotate(-45deg)}ix-menu .menu-overlay{display:block;position:absolute;width:calc(100vw - 4rem);height:100%;left:4rem;z-index:-1;-webkit-backdrop-filter:blur(1rem);backdrop-filter:blur(1rem);background-color:var(--theme-sidebar-overlay-blur);transition:all 300ms ease-out}ix-menu .menu-overlay-invisible{display:none}ix-menu .menu.expanded{width:16rem}ix-menu .menu-overlay.expanded{width:calc(100vw - 16rem);left:16rem}ix-menu #avatar-tab-placeholder{max-height:3rem}ix-menu .avatar{margin-bottom:2rem}ix-menu #cui-imprint .cui-imprint-product-name{margin-bottom:1rem}ix-menu #cui-imprint .cui-imprint-product-description{margin-bottom:2rem}ix-menu #cui-imprint .cui-imprint-link-container{display:flex;align-items:center}ix-menu .bottom-tab-divider{margin-top:auto}";
|
|
63
7
|
|
|
64
8
|
const Menu = class {
|
|
65
9
|
constructor(hostRef) {
|
|
@@ -185,10 +129,6 @@ const Menu = class {
|
|
|
185
129
|
}
|
|
186
130
|
componentDidLoad() {
|
|
187
131
|
var _a, _b, _c, _d;
|
|
188
|
-
const anchor = this.hostElement.querySelector('#more-tab');
|
|
189
|
-
this.popoverListener = new Popover(anchor, this.moreItemsDropdown, () => {
|
|
190
|
-
this.showMoreItems = false;
|
|
191
|
-
});
|
|
192
132
|
(_a = this.settings) === null || _a === void 0 ? void 0 : _a.addEventListener('close', () => {
|
|
193
133
|
this.showSettings = false;
|
|
194
134
|
this.settings.show = this.showSettings;
|
|
@@ -217,10 +157,7 @@ const Menu = class {
|
|
|
217
157
|
subtree: true,
|
|
218
158
|
});
|
|
219
159
|
}
|
|
220
|
-
disconnectedCallback() {
|
|
221
|
-
var _a;
|
|
222
|
-
(_a = this.popoverListener) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
223
|
-
}
|
|
160
|
+
disconnectedCallback() { }
|
|
224
161
|
componentWillRender() {
|
|
225
162
|
this.appendTabs();
|
|
226
163
|
}
|
|
@@ -383,13 +320,6 @@ const Menu = class {
|
|
|
383
320
|
}
|
|
384
321
|
return Math.min(visibleCount - 2, this.maxVisibleMenuItems);
|
|
385
322
|
}
|
|
386
|
-
toggleShowMoreDropdown() {
|
|
387
|
-
if (this.moreItemsDropdown.querySelectorAll('.appended').length === 0) {
|
|
388
|
-
return;
|
|
389
|
-
}
|
|
390
|
-
this.popoverListener.open();
|
|
391
|
-
this.showMoreItems = !this.showMoreItems;
|
|
392
|
-
}
|
|
393
323
|
/**
|
|
394
324
|
* Toggle map sidebar expand
|
|
395
325
|
* @param show
|
|
@@ -505,7 +435,7 @@ const Menu = class {
|
|
|
505
435
|
isMenuItemClicked(event) {
|
|
506
436
|
const path = event.composedPath();
|
|
507
437
|
const menuItems = path
|
|
508
|
-
.filter((element) => element.id !== 'more-tab')
|
|
438
|
+
.filter((element) => element.id !== 'ix-menu-more-tab')
|
|
509
439
|
.filter((element) => {
|
|
510
440
|
return element.tagName === 'IX-MENU-ITEM';
|
|
511
441
|
});
|
|
@@ -528,11 +458,11 @@ const Menu = class {
|
|
|
528
458
|
if (this.isMenuItemClicked(event)) {
|
|
529
459
|
this.resetOverlay();
|
|
530
460
|
}
|
|
531
|
-
} }, h("div", { class: "tabs-top" }), h("slot", null), h("div", { class: "active-more-tab" }, this.activeTab ? (h("ix-menu-item", { class: "internal-tab", active: true, tabIcon: this.activeTab.tabIcon }, this.activeTab.innerText)) : null), h("ix-menu-item", { id: "more-tab", tabIcon: "more-menu", class: {
|
|
461
|
+
} }, h("div", { class: "tabs-top" }), h("slot", null), h("div", { class: "active-more-tab" }, this.activeTab ? (h("ix-menu-item", { class: "internal-tab", active: true, tabIcon: this.activeTab.tabIcon }, this.activeTab.innerText)) : null), h("ix-menu-item", { id: "ix-menu-more-tab", tabIcon: "more-menu", class: {
|
|
532
462
|
'internal-tab': true,
|
|
533
463
|
}, style: {
|
|
534
464
|
display: this.showMoreButton() ? 'block' : 'none',
|
|
535
|
-
}, title: "Show more", notifications: this.countMoreNotifications
|
|
465
|
+
}, title: "Show more", notifications: this.countMoreNotifications }, this.i18nMore, h("ix-dropdown", { trigger: 'ix-menu-more-tab', positioningStrategy: 'fixed', placement: 'right-start' }, this.menuItems
|
|
536
466
|
.filter((elm, index) => !this.showTab(index) &&
|
|
537
467
|
!this.isMenuItemActive(elm) &&
|
|
538
468
|
this.isVisible(elm))
|
|
@@ -546,7 +476,7 @@ const Menu = class {
|
|
|
546
476
|
'internal-tab': true,
|
|
547
477
|
'bottom-tab': true,
|
|
548
478
|
active: this.showAbout,
|
|
549
|
-
}, tabIcon: "info", onClick: async () => this.toggleAbout(!this.showAbout) }, this.i18nLegal)) : null, this.enableToggleTheme ? (h("ix-menu-item", { id: "toggleTheme", onClick: () =>
|
|
479
|
+
}, tabIcon: "info", onClick: async () => this.toggleAbout(!this.showAbout) }, this.i18nLegal)) : null, this.enableToggleTheme ? (h("ix-menu-item", { id: "toggleTheme", onClick: () => themeSwitcher.toggleMode(), class: "internal-tab bottom-tab", tabIcon: "bulb" }, this.i18nToggleTheme)) : null, this.enableMapExpand ? (h("ix-menu-item", { id: "menu-collapse", onClick: () => this.mapExpandChange.emit(this.mapExpand), class: "internal-tab bottom-tab", tabIcon: `${this.getCollapseIcon()}` }, this.getCollapseText())) : null), h("div", { class: {
|
|
550
480
|
'menu-overlay': true,
|
|
551
481
|
expanded: this.expand,
|
|
552
482
|
'd-block': this.showAbout || this.showSettings,
|
|
@@ -672,26 +602,15 @@ const MenuAvatar = class {
|
|
|
672
602
|
constructor(hostRef) {
|
|
673
603
|
registerInstance(this, hostRef);
|
|
674
604
|
this.logoutClick = createEvent(this, "logoutClick", 7);
|
|
675
|
-
this.
|
|
605
|
+
this.avatarElementId = 'ix-menu-avatar-id';
|
|
676
606
|
this.top = undefined;
|
|
677
607
|
this.bottom = undefined;
|
|
678
608
|
this.i18nLogout = 'Logout';
|
|
679
609
|
}
|
|
680
|
-
toggleMenu() {
|
|
681
|
-
this.outsideListener.open();
|
|
682
|
-
this.displayMenu = !this.displayMenu;
|
|
683
|
-
}
|
|
684
|
-
componentDidLoad() {
|
|
685
|
-
this.outsideListener = new Popover(this.hostElement, this.hostElement.querySelector('ix-dropdown'), () => {
|
|
686
|
-
this.displayMenu = false;
|
|
687
|
-
});
|
|
688
|
-
}
|
|
689
|
-
disconnectedCallback() {
|
|
690
|
-
var _a;
|
|
691
|
-
(_a = this.outsideListener) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
692
|
-
}
|
|
693
610
|
render() {
|
|
694
|
-
return (h(Host, null, h("li", { class: "nav-item top-item avatar no-hover", title: this.top }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 32 32" }, h("g", { fill: "none", "fill-rule": "evenodd" }, h("path", { id: "avatar-path-background", d: "M16 0C7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163\n 16-16c0-4.243-1.686-8.313-4.686-11.314C24.314 1.686 20.244 0 16 0z" }), h("path", { id: "avatar-path-person", d: "M17.897 17.91c3.8-.018 7.358 1.875 9.485 5.046-2.417 3.999-6.734 6.434-11.382\n 6.42-4.648.014-8.965-2.421-11.382-6.42 2.127-3.171 5.685-5.064\n 9.485-5.045h3.794zM15.821 2.129c3.682 0 6.667 2.984 6.667 6.666 0 3.682-2.985\n 6.667-6.667 6.667s-6.667-2.985-6.667-6.667 2.985-6.666 6.667-6.666z" }))), h("div", { class: "avatar-name" }, h("span", { class: "text-default-single", title: this.top }, this.top), h("span", { class: "text-default-single", title: this.bottom }, this.bottom))), h("ix-dropdown", {
|
|
611
|
+
return (h(Host, null, h("li", { class: "nav-item top-item avatar no-hover", title: this.top, id: this.avatarElementId }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 32 32" }, h("g", { fill: "none", "fill-rule": "evenodd" }, h("path", { id: "avatar-path-background", d: "M16 0C7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163\n 16-16c0-4.243-1.686-8.313-4.686-11.314C24.314 1.686 20.244 0 16 0z" }), h("path", { id: "avatar-path-person", d: "M17.897 17.91c3.8-.018 7.358 1.875 9.485 5.046-2.417 3.999-6.734 6.434-11.382\n 6.42-4.648.014-8.965-2.421-11.382-6.42 2.127-3.171 5.685-5.064\n 9.485-5.045h3.794zM15.821 2.129c3.682 0 6.667 2.984 6.667 6.666 0 3.682-2.985\n 6.667-6.667 6.667s-6.667-2.985-6.667-6.667 2.985-6.666 6.667-6.666z" }))), h("div", { class: "avatar-name" }, h("span", { class: "text-default-single", title: this.top }, this.top), h("span", { class: "text-default-single", title: this.bottom }, this.bottom))), h("ix-dropdown", { trigger: this.avatarElementId, placement: 'right-start', offset: {
|
|
612
|
+
mainAxis: 12,
|
|
613
|
+
} }, h("slot", null), h("ix-menu-avatar-item", { label: this.i18nLogout, icon: "log-out", onClick: (e) => {
|
|
695
614
|
this.logoutClick.emit(e);
|
|
696
615
|
} }))));
|
|
697
616
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-6f4f3582.js';
|
|
2
2
|
|
|
3
|
-
const pillCss = ".sc-ix-pill-h{display:inline-flex;position:relative;align-items:center;justify-content:center;border-radius:100px;padding:0px 6px;margin-left:0.25rem;min-width:1.5rem;height:1.25rem;min-height:1.25rem;max-height:1.25rem;cursor:auto}.sc-ix-pill-h .with-icon.sc-ix-pill{margin-right:0.25rem}.align-left.sc-ix-pill-h{justify-content:flex-start}[variant=primary].sc-ix-pill-h{background-color:var(--theme-color-primary);color:var(--theme-chip-primary--color)}[variant=primary].sc-ix-pill-h .close-button.sc-ix-pill{color:var(--theme-chip-primary--color);pointer-events:auto}[variant=primary].outline.sc-ix-pill-h{color:var(--theme-chip-primary-outline--color);background-color:transparent;border:solid 1px var(--theme-chip-primary-outline--border-color)}[variant=primary].outline.sc-ix-pill-h .close-button.sc-ix-pill{color:var(--theme-chip-primary-outline--color)}[variant=alarm].sc-ix-pill-h{color:var(--theme-color-alarm--contrast)}[variant=alarm].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-alarm)}[variant=alarm].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-alarm--contrast)}[variant=alarm].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=alarm].sc-ix-pill-h:not(.outline).active::after,[variant=alarm].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=alarm].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-alarm)}[variant=alarm].outline.sc-ix-pill-h:hover::after{display:none}[variant=alarm].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=alarm].outline.active.sc-ix-pill-h::after,[variant=alarm].outline.sc-ix-pill-h:active::after{display:none}[variant=alarm].outline.active.sc-ix-pill-h,[variant=alarm].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=critical].sc-ix-pill-h{color:var(--theme-color-critical--contrast)}[variant=critical].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-critical)}[variant=critical].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-critical--contrast)}[variant=critical].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=critical].sc-ix-pill-h:not(.outline).active::after,[variant=critical].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=critical].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-critical)}[variant=critical].outline.sc-ix-pill-h:hover::after{display:none}[variant=critical].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=critical].outline.active.sc-ix-pill-h::after,[variant=critical].outline.sc-ix-pill-h:active::after{display:none}[variant=critical].outline.active.sc-ix-pill-h,[variant=critical].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=warning].sc-ix-pill-h{color:var(--theme-color-warning--contrast)}[variant=warning].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-warning)}[variant=warning].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-warning--contrast)}[variant=warning].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=warning].sc-ix-pill-h:not(.outline).active::after,[variant=warning].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=warning].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-warning)}[variant=warning].outline.sc-ix-pill-h:hover::after{display:none}[variant=warning].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=warning].outline.active.sc-ix-pill-h::after,[variant=warning].outline.sc-ix-pill-h:active::after{display:none}[variant=warning].outline.active.sc-ix-pill-h,[variant=warning].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=info].sc-ix-pill-h{color:var(--theme-color-info--contrast)}[variant=info].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-info)}[variant=info].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-info--contrast)}[variant=info].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=info].sc-ix-pill-h:not(.outline).active::after,[variant=info].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=info].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-info)}[variant=info].outline.sc-ix-pill-h:hover::after{display:none}[variant=info].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=info].outline.active.sc-ix-pill-h::after,[variant=info].outline.sc-ix-pill-h:active::after{display:none}[variant=info].outline.active.sc-ix-pill-h,[variant=info].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=neutral].sc-ix-pill-h{color:var(--theme-color-neutral--contrast)}[variant=neutral].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-neutral)}[variant=neutral].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-neutral--contrast)}[variant=neutral].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=neutral].sc-ix-pill-h:not(.outline).active::after,[variant=neutral].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=neutral].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-neutral)}[variant=neutral].outline.sc-ix-pill-h:hover::after{display:none}[variant=neutral].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=neutral].outline.active.sc-ix-pill-h::after,[variant=neutral].outline.sc-ix-pill-h:active::after{display:none}[variant=neutral].outline.active.sc-ix-pill-h,[variant=neutral].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=success].sc-ix-pill-h{color:var(--theme-color-success--contrast)}[variant=success].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-success)}[variant=success].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-success--contrast)}[variant=success].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=success].sc-ix-pill-h:not(.outline).active::after,[variant=success].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=success].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-success)}[variant=success].outline.sc-ix-pill-h:hover::after{display:none}[variant=success].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=success].outline.active.sc-ix-pill-h::after,[variant=success].outline.sc-ix-pill-h:active::after{display:none}[variant=success].outline.active.sc-ix-pill-h,[variant=success].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}.sc-ix-pill-h .slot.sc-ix-pill{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";
|
|
3
|
+
const pillCss = ".sc-ix-pill-h{display:inline-flex;width:-moz-fit-content;width:fit-content;position:relative;align-items:center;justify-content:center;border-radius:100px;padding:0px 6px;margin-left:0.25rem;min-width:1.5rem;height:1.25rem;min-height:1.25rem;max-height:1.25rem;cursor:auto}.sc-ix-pill-h .with-icon.sc-ix-pill{margin-right:0.25rem}.align-left.sc-ix-pill-h{justify-content:flex-start}[variant=primary].sc-ix-pill-h{background-color:var(--theme-color-primary);color:var(--theme-chip-primary--color)}[variant=primary].sc-ix-pill-h .close-button.sc-ix-pill{color:var(--theme-chip-primary--color);pointer-events:auto}[variant=primary].outline.sc-ix-pill-h{color:var(--theme-chip-primary-outline--color);background-color:transparent;border:solid 1px var(--theme-chip-primary-outline--border-color)}[variant=primary].outline.sc-ix-pill-h .close-button.sc-ix-pill{color:var(--theme-chip-primary-outline--color)}[variant=alarm].sc-ix-pill-h{color:var(--theme-color-alarm--contrast)}[variant=alarm].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-alarm)}[variant=alarm].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-alarm--contrast)}[variant=alarm].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=alarm].sc-ix-pill-h:not(.outline).active::after,[variant=alarm].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=alarm].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-alarm)}[variant=alarm].outline.sc-ix-pill-h:hover::after{display:none}[variant=alarm].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=alarm].outline.active.sc-ix-pill-h::after,[variant=alarm].outline.sc-ix-pill-h:active::after{display:none}[variant=alarm].outline.active.sc-ix-pill-h,[variant=alarm].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=critical].sc-ix-pill-h{color:var(--theme-color-critical--contrast)}[variant=critical].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-critical)}[variant=critical].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-critical--contrast)}[variant=critical].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=critical].sc-ix-pill-h:not(.outline).active::after,[variant=critical].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=critical].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-critical)}[variant=critical].outline.sc-ix-pill-h:hover::after{display:none}[variant=critical].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=critical].outline.active.sc-ix-pill-h::after,[variant=critical].outline.sc-ix-pill-h:active::after{display:none}[variant=critical].outline.active.sc-ix-pill-h,[variant=critical].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=warning].sc-ix-pill-h{color:var(--theme-color-warning--contrast)}[variant=warning].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-warning)}[variant=warning].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-warning--contrast)}[variant=warning].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=warning].sc-ix-pill-h:not(.outline).active::after,[variant=warning].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=warning].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-warning)}[variant=warning].outline.sc-ix-pill-h:hover::after{display:none}[variant=warning].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=warning].outline.active.sc-ix-pill-h::after,[variant=warning].outline.sc-ix-pill-h:active::after{display:none}[variant=warning].outline.active.sc-ix-pill-h,[variant=warning].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=info].sc-ix-pill-h{color:var(--theme-color-info--contrast)}[variant=info].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-info)}[variant=info].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-info--contrast)}[variant=info].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=info].sc-ix-pill-h:not(.outline).active::after,[variant=info].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=info].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-info)}[variant=info].outline.sc-ix-pill-h:hover::after{display:none}[variant=info].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=info].outline.active.sc-ix-pill-h::after,[variant=info].outline.sc-ix-pill-h:active::after{display:none}[variant=info].outline.active.sc-ix-pill-h,[variant=info].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=neutral].sc-ix-pill-h{color:var(--theme-color-neutral--contrast)}[variant=neutral].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-neutral)}[variant=neutral].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-neutral--contrast)}[variant=neutral].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=neutral].sc-ix-pill-h:not(.outline).active::after,[variant=neutral].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=neutral].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-neutral)}[variant=neutral].outline.sc-ix-pill-h:hover::after{display:none}[variant=neutral].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=neutral].outline.active.sc-ix-pill-h::after,[variant=neutral].outline.sc-ix-pill-h:active::after{display:none}[variant=neutral].outline.active.sc-ix-pill-h,[variant=neutral].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=success].sc-ix-pill-h{color:var(--theme-color-success--contrast)}[variant=success].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-success)}[variant=success].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-success--contrast)}[variant=success].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=success].sc-ix-pill-h:not(.outline).active::after,[variant=success].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=success].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-success)}[variant=success].outline.sc-ix-pill-h:hover::after{display:none}[variant=success].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=success].outline.active.sc-ix-pill-h::after,[variant=success].outline.sc-ix-pill-h:active::after{display:none}[variant=success].outline.active.sc-ix-pill-h,[variant=success].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=custom].outline.sc-ix-pill-h{border:solid 1px transparent;background-color:transparent}.sc-ix-pill-h .slot.sc-ix-pill{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sc-ix-pill-h .hidden.sc-ix-pill{width:0px;margin-right:0px}";
|
|
4
4
|
|
|
5
5
|
const Pill = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -21,7 +21,10 @@ const Pill = class {
|
|
|
21
21
|
color: this.color,
|
|
22
22
|
backgroundColor: this.background,
|
|
23
23
|
}
|
|
24
|
-
: {}, title: this.el.textContent },
|
|
24
|
+
: {}, title: this.el.textContent }, h("ix-icon", { class: {
|
|
25
|
+
'with-icon': true,
|
|
26
|
+
hidden: this.icon === undefined || this.icon === '',
|
|
27
|
+
}, name: this.icon, size: '16' }), h("div", { class: "slot" }, h("slot", null))));
|
|
25
28
|
}
|
|
26
29
|
get el() { return getElement(this); }
|
|
27
30
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-6f4f3582.js';
|
|
2
2
|
|
|
3
|
-
const selectCss = ".sc-ix-select-h{display:inline-block;position:relative;height:auto;width:100%}.sc-ix-select-h .select.sc-ix-select{position:relative;display:flex;align-items:center;height:auto;background-color:var(--theme-input--background);border:var(--theme-input--border-thickness) solid var(--theme-input--border-color);border-radius:var(--theme-input--border-radius);padding:0 0 0 0.5rem}.sc-ix-select-h .select.sc-ix-select:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-select-h .select.sc-ix-select:not(.disabled):not(:disabled):hover{background-color:var(--theme-input--background--hover);border-color:var(--theme-input--border-color--hover)}.sc-ix-select-h .select.sc-ix-select:focus-within{background-color:var(--theme-input--background--focus);border-color:var(--theme-input--border-color--focus);outline:1px solid #119fff !important;outline-offset:var(--theme-input--focus--outline-offset)}.sc-ix-select-h .trigger.sc-ix-select{display:flex;align-items:center;flex-grow:1;height:100%}.sc-ix-select-h .input-container.sc-ix-select{display:flex;position:relative;align-items:flex-start;width:100%}.sc-ix-select-h .input-container.sc-ix-select .chips.sc-ix-select{position:relative;display:flex;align-items:center;flex-wrap:wrap;height:100%;max-height:3.5rem;flex-grow:1;overflow-y:auto}.sc-ix-select-h .input-container.sc-ix-select .chips.sc-ix-select>ix-filter-chip.sc-ix-select{margin:0 0.1rem}.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-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);background:transparent;height:1.75rem;width:100%}.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select,.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select:hover,.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select:focus-visible{border:none;outline:none}.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select::-moz-placeholder{color:var(--theme-input-select-icon--color)}.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select::placeholder{color:var(--theme-input-select-icon--color)}.sc-ix-select-h .input-container.sc-ix-select input.hide-placeholder.sc-ix-select::-moz-placeholder{opacity:0}.sc-ix-select-h .input-container.sc-ix-select input.hide-placeholder.sc-ix-select::placeholder{opacity:0}.sc-ix-select-h .chevron-down-container.sc-ix-select{display:flex;align-items:center;justify-content:center;width:2rem;min-width:2rem;height:100%}.sc-ix-select-h .editable.sc-ix-select .chevron-down-container.sc-ix-select:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-select-h .editable.sc-ix-select .chevron-down-container.sc-ix-select:not(.disabled):not(:disabled):hover{background-color:var(--theme-btn-invisible-secondary--background--hover)}.sc-ix-select-h .editable.sc-ix-select .chevron-down-container.sc-ix-select:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-select-h .editable.sc-ix-select .chevron-down-container.sc-ix-select:not(.disabled):not(:disabled):active{background-color:var(--theme-btn-invisible-secondary--background--active)}.sc-ix-select-h .add-item.sc-ix-select{display:flex;justify-content:flex-start;align-items:center;position:relative;width:100%}.sc-ix-select-h .select-list-header.sc-ix-select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;height:2rem;color:var(--theme-select-list-item-hint--color);margin:0 0.5rem 0 2rem}
|
|
3
|
+
const selectCss = ".sc-ix-select-h{display:inline-block;position:relative;height:auto;width:100%}.sc-ix-select-h .select.sc-ix-select{position:relative;display:flex;align-items:center;height:auto;background-color:var(--theme-input--background);border:var(--theme-input--border-thickness) solid var(--theme-input--border-color);border-radius:var(--theme-input--border-radius);padding:0 0 0 0.5rem}.sc-ix-select-h .select.sc-ix-select:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-select-h .select.sc-ix-select:not(.disabled):not(:disabled):hover{background-color:var(--theme-input--background--hover);border-color:var(--theme-input--border-color--hover)}.sc-ix-select-h .select.sc-ix-select:focus-within{background-color:var(--theme-input--background--focus);border-color:var(--theme-input--border-color--focus);outline:1px solid #119fff !important;outline-offset:var(--theme-input--focus--outline-offset)}.sc-ix-select-h .trigger.sc-ix-select{display:flex;align-items:center;flex-grow:1;height:100%}.sc-ix-select-h .input-container.sc-ix-select{display:flex;position:relative;align-items:flex-start;width:100%}.sc-ix-select-h .input-container.sc-ix-select .chips.sc-ix-select{position:relative;display:flex;align-items:center;flex-wrap:wrap;height:100%;max-height:3.5rem;flex-grow:1;overflow-y:auto}.sc-ix-select-h .input-container.sc-ix-select .chips.sc-ix-select>ix-filter-chip.sc-ix-select{margin:0 0.1rem}.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-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);background:transparent;height:1.75rem;width:100%}.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select,.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select:hover,.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select:focus-visible{border:none;outline:none}.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select::-moz-placeholder{color:var(--theme-input-select-icon--color)}.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select::placeholder{color:var(--theme-input-select-icon--color)}.sc-ix-select-h .input-container.sc-ix-select input.hide-placeholder.sc-ix-select::-moz-placeholder{opacity:0}.sc-ix-select-h .input-container.sc-ix-select input.hide-placeholder.sc-ix-select::placeholder{opacity:0}.sc-ix-select-h .chevron-down-container.sc-ix-select{display:flex;align-items:center;justify-content:center;width:2rem;min-width:2rem;height:100%}.sc-ix-select-h .editable.sc-ix-select .chevron-down-container.sc-ix-select:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-select-h .editable.sc-ix-select .chevron-down-container.sc-ix-select:not(.disabled):not(:disabled):hover{background-color:var(--theme-btn-invisible-secondary--background--hover)}.sc-ix-select-h .editable.sc-ix-select .chevron-down-container.sc-ix-select:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-select-h .editable.sc-ix-select .chevron-down-container.sc-ix-select:not(.disabled):not(:disabled):active{background-color:var(--theme-btn-invisible-secondary--background--active)}.sc-ix-select-h .add-item.sc-ix-select{display:flex;justify-content:flex-start;align-items:center;position:relative;width:100%}.sc-ix-select-h .select-list-header.sc-ix-select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;height:2rem;color:var(--theme-select-list-item-hint--color);margin:0 0.5rem 0 2rem}";
|
|
4
4
|
|
|
5
5
|
const Select = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -110,17 +110,12 @@ const Select = class {
|
|
|
110
110
|
: [this.selectedIndices]);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
this.labelMutationObserver.observe(this.hostElement, {
|
|
120
|
-
subtree: true,
|
|
121
|
-
attributes: true,
|
|
122
|
-
attributeFilter: ['label'],
|
|
123
|
-
});
|
|
113
|
+
onLabelChange(event) {
|
|
114
|
+
event.preventDefault();
|
|
115
|
+
event.stopImmediatePropagation();
|
|
116
|
+
this.selectValue(Array.isArray(this.selectedIndices)
|
|
117
|
+
? this.selectedIndices
|
|
118
|
+
: [this.selectedIndices]);
|
|
124
119
|
}
|
|
125
120
|
disconnectedCallback() {
|
|
126
121
|
if (this.labelMutationObserver) {
|
|
@@ -257,7 +252,7 @@ const Select = class {
|
|
|
257
252
|
'd-none': this.disabled ||
|
|
258
253
|
this.readonly ||
|
|
259
254
|
(this.isDropdownEmpty && !this.editable),
|
|
260
|
-
}, anchor: this.dropdownAnchor, trigger: this.dropdownWrapperRef, onShowChanged: (e) => this.dropdownVisibilityChanged(e), placement: "bottom", positioningStrategy: '
|
|
255
|
+
}, anchor: this.dropdownAnchor, trigger: this.dropdownWrapperRef, onShowChanged: (e) => this.dropdownVisibilityChanged(e), placement: "bottom-start", positioningStrategy: 'absolute' }, h("div", { class: "select-list-header", title: this.i18nSelectListHeader }, this.i18nSelectListHeader), h("slot", null), h("div", { ref: (ref) => (this.addItemRef = ref), class: "d-contents" }), this.itemExists(this.inputFilterText) ? ('') : (h("ix-dropdown-item", { "data-testid": "add-item", icon: "plus", class: {
|
|
261
256
|
'add-item': true,
|
|
262
257
|
'd-none': !(this.editable && this.inputFilterText),
|
|
263
258
|
}, label: this.inputFilterText, onItemClick: (e) => {
|
|
@@ -274,6 +269,23 @@ const Select = class {
|
|
|
274
269
|
};
|
|
275
270
|
Select.style = selectCss;
|
|
276
271
|
|
|
272
|
+
/*
|
|
273
|
+
* SPDX-FileCopyrightText: 2023 Siemens AG
|
|
274
|
+
*
|
|
275
|
+
* SPDX-License-Identifier: MIT
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the MIT license found in the
|
|
278
|
+
* LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/
|
|
280
|
+
class IxSelectItemLabelChangeEvent extends CustomEvent {
|
|
281
|
+
constructor(detail) {
|
|
282
|
+
super('ix-select-item:labelChange', {
|
|
283
|
+
bubbles: true,
|
|
284
|
+
detail,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
277
289
|
const selectItemCss = ".sc-ix-select-item-h{display:block}.sc-ix-select-item-h ix-dropdown-item.sc-ix-select-item button.sc-ix-select-item{margin-left:1rem}";
|
|
278
290
|
|
|
279
291
|
const SelectItem = class {
|
|
@@ -286,7 +298,7 @@ const SelectItem = class {
|
|
|
286
298
|
this.hover = false;
|
|
287
299
|
}
|
|
288
300
|
/**
|
|
289
|
-
*
|
|
301
|
+
* @internal
|
|
290
302
|
* @param event
|
|
291
303
|
*/
|
|
292
304
|
async onItemClick(event) {
|
|
@@ -299,10 +311,19 @@ const SelectItem = class {
|
|
|
299
311
|
throw Error('ix-select-item must have a `value` property');
|
|
300
312
|
}
|
|
301
313
|
}
|
|
314
|
+
labelChange(newValue, oldValue) {
|
|
315
|
+
this.hostElement.dispatchEvent(new IxSelectItemLabelChangeEvent({
|
|
316
|
+
newValue: newValue,
|
|
317
|
+
oldValue: oldValue,
|
|
318
|
+
}));
|
|
319
|
+
}
|
|
302
320
|
render() {
|
|
303
321
|
return (h(Host, null, h("ix-dropdown-item", { checked: this.selected, hover: this.hover, label: this.label ? this.label : this.value, onItemClick: (e) => this.onItemClick(e) })));
|
|
304
322
|
}
|
|
305
323
|
get hostElement() { return getElement(this); }
|
|
324
|
+
static get watchers() { return {
|
|
325
|
+
"label": ["labelChange"]
|
|
326
|
+
}; }
|
|
306
327
|
};
|
|
307
328
|
SelectItem.style = selectItemCss;
|
|
308
329
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-6f4f3582.js';
|
|
2
2
|
import { g as getButtonClasses } from './base-button-0b6635df.js';
|
|
3
|
-
import { c as createPopper } from './popper-42db9fbd.js';
|
|
4
3
|
|
|
5
4
|
const splitButtonCss = ".sc-ix-split-button-h{display:block}";
|
|
6
5
|
|
|
@@ -22,46 +21,18 @@ const SplitButton = class {
|
|
|
22
21
|
get splitItems() {
|
|
23
22
|
return Array.from(this.hostElement.querySelectorAll('ix-split-button-item'));
|
|
24
23
|
}
|
|
25
|
-
|
|
26
|
-
if (
|
|
27
|
-
this.
|
|
24
|
+
linkTriggerRef() {
|
|
25
|
+
if (this.triggerElement && this.dropdownElement) {
|
|
26
|
+
this.dropdownElement.trigger = this.triggerElement;
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
29
|
componentDidLoad() {
|
|
31
|
-
|
|
32
|
-
this.popover = this.hostElement.querySelector('ix-dropdown');
|
|
33
|
-
this.popperInstance = createPopper(element, this.popover, {
|
|
34
|
-
strategy: 'fixed',
|
|
35
|
-
placement: this.placement,
|
|
36
|
-
modifiers: [
|
|
37
|
-
{
|
|
38
|
-
name: 'offset',
|
|
39
|
-
options: {
|
|
40
|
-
offset: [0, 0],
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
name: 'flip',
|
|
45
|
-
options: {
|
|
46
|
-
padding: 8,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
});
|
|
51
|
-
window.addEventListener('click', this.clickOutside.bind(this));
|
|
52
|
-
}
|
|
53
|
-
disconnectedCallback() {
|
|
54
|
-
var _a;
|
|
55
|
-
(_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
56
|
-
window.removeEventListener('click', this.clickOutside.bind(this));
|
|
57
|
-
}
|
|
58
|
-
toggleDropdown() {
|
|
59
|
-
this.toggle = !this.toggle;
|
|
30
|
+
this.linkTriggerRef();
|
|
60
31
|
}
|
|
61
32
|
render() {
|
|
62
|
-
return (h(Host, { class: "btn-group" }, h("button", { class: getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, !this.label, false, false, this.disabled), onClick: (e) => this.buttonClick.emit(e) }, this.icon ? h("ix-icon", { name: this.icon }) : null, " ", this.label), h("button", { class: Object.assign(Object.assign({}, getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, true, false, false, this.disabled)), {
|
|
33
|
+
return (h(Host, { class: "btn-group" }, h("button", { class: getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, !this.label, false, false, this.disabled), onClick: (e) => this.buttonClick.emit(e) }, this.icon ? h("ix-icon", { name: this.icon }) : null, " ", this.label), h("button", { ref: (r) => (this.triggerElement = r), class: Object.assign(Object.assign({}, getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, true, false, false, this.disabled)), {
|
|
63
34
|
anchor: true,
|
|
64
|
-
})
|
|
35
|
+
}) }, h("ix-icon", { name: this.splitIcon }), h("ix-dropdown", { ref: (r) => (this.dropdownElement = r) }, h("slot", null)))));
|
|
65
36
|
}
|
|
66
37
|
get hostElement() { return getElement(this); }
|
|
67
38
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-6f4f3582.js';
|
|
2
|
-
import { c as
|
|
2
|
+
import { i as inline, s as shift, o as offset, a as autoPlacement, g as getAlignment, b as autoUpdate, d as arrow, c as computePosition } from './alignment-f63c1b89.js';
|
|
3
3
|
|
|
4
|
-
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:block}.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
|
|
4
|
+
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)}";
|
|
5
5
|
|
|
6
6
|
const ValidationTooltip = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -11,6 +11,8 @@ const ValidationTooltip = class {
|
|
|
11
11
|
this.message = undefined;
|
|
12
12
|
this.placement = 'top';
|
|
13
13
|
this.isInputValid = true;
|
|
14
|
+
this.tooltipPosition = undefined;
|
|
15
|
+
this.arrowPosition = undefined;
|
|
14
16
|
}
|
|
15
17
|
get arrow() {
|
|
16
18
|
return this.hostElement.querySelector('#arrow');
|
|
@@ -24,6 +26,61 @@ const ValidationTooltip = class {
|
|
|
24
26
|
get tooltipElement() {
|
|
25
27
|
return this.hostElement.querySelector('.validation-tooltip');
|
|
26
28
|
}
|
|
29
|
+
destoryAutoUpdate() {
|
|
30
|
+
this.tooltipElement.style.display = 'none';
|
|
31
|
+
if (this.autoUpdateCleanup) {
|
|
32
|
+
this.autoUpdateCleanup();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
applyTooltipPosition() {
|
|
36
|
+
this.tooltipElement.style.display = 'block';
|
|
37
|
+
let positionConfig = {
|
|
38
|
+
strategy: 'fixed',
|
|
39
|
+
middleware: [
|
|
40
|
+
inline(),
|
|
41
|
+
shift(),
|
|
42
|
+
offset({
|
|
43
|
+
mainAxis: 8,
|
|
44
|
+
}),
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
if (this.placement.includes('auto')) {
|
|
48
|
+
positionConfig.middleware.push(autoPlacement({
|
|
49
|
+
alignment: getAlignment(this.placement),
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
positionConfig.placement = this.placement;
|
|
54
|
+
}
|
|
55
|
+
this.autoUpdateCleanup = autoUpdate(this.inputElement, this.tooltipElement, async () => {
|
|
56
|
+
positionConfig.middleware = [
|
|
57
|
+
...positionConfig.middleware,
|
|
58
|
+
arrow({
|
|
59
|
+
element: this.arrow,
|
|
60
|
+
}),
|
|
61
|
+
];
|
|
62
|
+
const computeResponse = await computePosition(this.inputElement, this.tooltipElement, positionConfig);
|
|
63
|
+
if (computeResponse.middlewareData.arrow) {
|
|
64
|
+
const { x, y } = computeResponse.middlewareData.arrow;
|
|
65
|
+
this.arrowPosition = {
|
|
66
|
+
x,
|
|
67
|
+
y,
|
|
68
|
+
};
|
|
69
|
+
Object.assign(this.arrow.style, {
|
|
70
|
+
left: x != null ? `${x}px` : '',
|
|
71
|
+
top: y != null ? `${y}px` : '',
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
this.tooltipPosition = {
|
|
75
|
+
x: computeResponse.x,
|
|
76
|
+
y: computeResponse.y,
|
|
77
|
+
};
|
|
78
|
+
}, {
|
|
79
|
+
ancestorResize: true,
|
|
80
|
+
ancestorScroll: true,
|
|
81
|
+
elementResize: true,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
27
84
|
componentDidLoad() {
|
|
28
85
|
if (!this.inputElement) {
|
|
29
86
|
throw Error('Validation tooltip is only working with an direct input child.');
|
|
@@ -55,41 +112,29 @@ const ValidationTooltip = class {
|
|
|
55
112
|
}
|
|
56
113
|
}
|
|
57
114
|
disconnectedCallback() {
|
|
58
|
-
var _a
|
|
115
|
+
var _a;
|
|
59
116
|
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
60
|
-
|
|
117
|
+
this.destoryAutoUpdate();
|
|
61
118
|
this.formElement.removeEventListener('submit', this.onSubmitBind);
|
|
62
119
|
this.inputElement.removeEventListener('focus', this.onInputFocusBind);
|
|
63
120
|
}
|
|
64
121
|
validationChanged() {
|
|
65
122
|
if (!this.isInputValid) {
|
|
66
|
-
this.
|
|
67
|
-
this.popper = createPopper(this.inputElement, this.tooltipElement, {
|
|
68
|
-
placement: this.placement,
|
|
69
|
-
strategy: 'absolute',
|
|
70
|
-
modifiers: [
|
|
71
|
-
{
|
|
72
|
-
name: 'offset',
|
|
73
|
-
options: {
|
|
74
|
-
offset: [0, 8],
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
name: 'arrow',
|
|
79
|
-
options: {
|
|
80
|
-
element: this.arrow,
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
],
|
|
84
|
-
});
|
|
123
|
+
this.applyTooltipPosition();
|
|
85
124
|
}
|
|
86
125
|
else {
|
|
87
|
-
this.
|
|
88
|
-
this.popper.destroy();
|
|
126
|
+
this.destoryAutoUpdate();
|
|
89
127
|
}
|
|
90
128
|
}
|
|
91
129
|
render() {
|
|
92
|
-
|
|
130
|
+
var _a, _b;
|
|
131
|
+
return (h(Host, null, h("slot", null), h("div", { role: "tooltip", style: {
|
|
132
|
+
display: 'none',
|
|
133
|
+
position: 'fixed',
|
|
134
|
+
top: '0',
|
|
135
|
+
left: '0',
|
|
136
|
+
transform: `translate(${Math.round(((_a = this.tooltipPosition) === null || _a === void 0 ? void 0 : _a.x) || 0)}px,${Math.round(((_b = this.tooltipPosition) === null || _b === void 0 ? void 0 : _b.y) || 0)}px)`,
|
|
137
|
+
}, class: "validation-tooltip text-default" }, this.message, h("slot", { name: "tooltip-message" }), h("div", { id: "arrow" }))));
|
|
93
138
|
}
|
|
94
139
|
get hostElement() { return getElement(this); }
|
|
95
140
|
static get watchers() { return {
|