@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
|
@@ -109,9 +109,10 @@ const MapNavigation = class {
|
|
|
109
109
|
overlayInstance.setAttribute('color', color);
|
|
110
110
|
overlayInstance.setAttribute('name', name);
|
|
111
111
|
overlayInstance.setAttribute('icon', icon);
|
|
112
|
+
overlayInstance.setAttribute('slot', 'overlay');
|
|
112
113
|
overlayInstance.addEventListener('closeClick', () => this.closeOverlay());
|
|
113
114
|
overlayInstance.appendChild(component);
|
|
114
|
-
this.
|
|
115
|
+
this.hostElement.appendChild(overlayInstance);
|
|
115
116
|
}
|
|
116
117
|
/**
|
|
117
118
|
* Close current shown overlay
|
|
@@ -136,7 +137,7 @@ const MapNavigation = class {
|
|
|
136
137
|
});
|
|
137
138
|
}
|
|
138
139
|
render() {
|
|
139
|
-
return (index.h(index.Host, null, index.h("div", { id: "menu-placeholder" }), index.h("div", { class: "map-nav" }, index.h("div", { class: "map-nav-sidebar" }, index.h("div", { class: "map-nav-header" }, index.h("ix-application-header", { name: this.applicationName, class: "map-nav-header-brand" }, index.h("slot", { name: "logo" }))), index.h("div", { class: "map-nav-sidebar-content" }, index.h("div", { class: "map-nav-sidebar-static-content" }, index.h("div", { class: "map-nav-title" }, this.navigationTitle), this.hideContextMenu ? ('') : (index.h("ix-icon-button", { icon: "context-menu", ghost: true, size: "24", variant: "Secondary", onClick: (_) => this.contextMenuClick.emit() }))), index.h("div", { class: "map-nav-sidebar-user-content" }, index.h("slot", { name: "sidebar-content" })))), index.h("div", { class: "content" }, index.h("div", { class: "map-nav-header-content bg-2" }, index.h("slot", { name: "content-header" })), index.h("main", null, index.h("slot", null))))));
|
|
140
|
+
return (index.h(index.Host, null, index.h("div", { id: "menu-placeholder" }), index.h("div", { class: "map-nav" }, index.h("div", { class: "map-nav-sidebar" }, index.h("div", { class: "map-nav-header" }, index.h("ix-application-header", { name: this.applicationName, class: "map-nav-header-brand" }, index.h("slot", { name: "logo" }))), index.h("div", { class: "map-nav-sidebar-content" }, index.h("div", { class: "map-nav-sidebar-static-content" }, index.h("div", { class: "map-nav-title" }, this.navigationTitle), this.hideContextMenu ? ('') : (index.h("ix-icon-button", { icon: "context-menu", ghost: true, size: "24", variant: "Secondary", onClick: (_) => this.contextMenuClick.emit() }))), index.h("div", { class: "map-nav-sidebar-user-content" }, index.h("slot", { name: "sidebar-content" })))), index.h("div", { class: "content" }, index.h("div", { class: "map-nav-header-content bg-2" }, index.h("slot", { name: "content-header" })), index.h("main", null, index.h("slot", null), index.h("slot", { name: "overlay" }))))));
|
|
140
141
|
}
|
|
141
142
|
get hostElement() { return index.getElement(this); }
|
|
142
143
|
};
|
|
@@ -144,7 +145,7 @@ MapNavigation.defaultTime = 150;
|
|
|
144
145
|
MapNavigation.slowTime = 500;
|
|
145
146
|
MapNavigation.style = mapNavigationCss;
|
|
146
147
|
|
|
147
|
-
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-
|
|
148
|
+
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}";
|
|
148
149
|
|
|
149
150
|
const MapNavigationOverlay = class {
|
|
150
151
|
constructor(hostRef) {
|
|
@@ -189,7 +190,7 @@ const MapNavigationOverlay = class {
|
|
|
189
190
|
'background-color': this.color
|
|
190
191
|
? `var(--theme-${this.color})`
|
|
191
192
|
: '',
|
|
192
|
-
} }), index.h("div", { class: "overlay-header-content" }, index.h("ix-icon", { size: "32", name: this.icon }), index.h("span", { class: "overlay-header-title", title: this.name }, this.name)), index.h("ix-icon-button", { class: "overlay-close",
|
|
193
|
+
} }), index.h("div", { class: "overlay-header-content" }, index.h("ix-icon", { size: "32", name: this.icon }), index.h("span", { class: "overlay-header-title", title: this.name }, this.name)), index.h("ix-icon-button", { class: "overlay-close", ghost: true, icon: "close", size: "24", onClick: () => this.closeOverlay() })), index.h("slot", null)));
|
|
193
194
|
}
|
|
194
195
|
get hostElement() { return index.getElement(this); }
|
|
195
196
|
};
|
|
@@ -4,66 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-17eb8998.js');
|
|
6
6
|
const rwd_util = require('./rwd.util-2326824e.js');
|
|
7
|
+
const themeSwitcher = require('./theme-switcher-6b45e082.js');
|
|
8
|
+
require('./typed-event-5030cc6a.js');
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
* SPDX-FileCopyrightText: 2022 Siemens AG
|
|
10
|
-
*
|
|
11
|
-
* SPDX-License-Identifier: MIT
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the MIT license found in the
|
|
14
|
-
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/
|
|
16
|
-
class Popover {
|
|
17
|
-
constructor(hostElement, popoverElement, outsideCallback) {
|
|
18
|
-
this.hostElement = hostElement;
|
|
19
|
-
this.popoverElement = popoverElement;
|
|
20
|
-
this.outsideCallback = outsideCallback;
|
|
21
|
-
}
|
|
22
|
-
outside(e) {
|
|
23
|
-
var _a;
|
|
24
|
-
if (!((_a = this.hostElement) === null || _a === void 0 ? void 0 : _a.contains(e.target))) {
|
|
25
|
-
this.outsideCallback(e);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
open(maxWidth = 256) {
|
|
29
|
-
this.popoverElement.style.transform = `
|
|
30
|
-
translateX(${this.hostElement.offsetLeft + this.hostElement.offsetWidth}px)
|
|
31
|
-
translateY(-${this.hostElement.offsetHeight}px)
|
|
32
|
-
`;
|
|
33
|
-
this.popoverElement.style.maxWidth = rwd_util.convertToRemString(maxWidth);
|
|
34
|
-
document.body.addEventListener('click', this.outside.bind(this));
|
|
35
|
-
}
|
|
36
|
-
destroy() {
|
|
37
|
-
document.body.removeEventListener('click', this.outside.bind(this));
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/*
|
|
42
|
-
* SPDX-FileCopyrightText: 2022 Siemens AG
|
|
43
|
-
*
|
|
44
|
-
* SPDX-License-Identifier: MIT
|
|
45
|
-
*
|
|
46
|
-
* This source code is licensed under the MIT license found in the
|
|
47
|
-
* LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/
|
|
49
|
-
const toggleVariant = () => {
|
|
50
|
-
let currentTheme = Array.from(document.body.classList).find((className) => className.includes('theme-'));
|
|
51
|
-
if (!currentTheme) {
|
|
52
|
-
currentTheme = 'theme-classic-dark';
|
|
53
|
-
}
|
|
54
|
-
const isDark = currentTheme.endsWith('-dark');
|
|
55
|
-
let newTheme = currentTheme;
|
|
56
|
-
if (isDark) {
|
|
57
|
-
newTheme = currentTheme.replace(/-dark$/g, '-light');
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
newTheme = currentTheme.replace(/-light$/g, '-dark');
|
|
61
|
-
}
|
|
62
|
-
document.body.classList.remove(currentTheme);
|
|
63
|
-
document.body.classList.add(newTheme);
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
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}";
|
|
10
|
+
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}";
|
|
67
11
|
|
|
68
12
|
const Menu = class {
|
|
69
13
|
constructor(hostRef) {
|
|
@@ -189,10 +133,6 @@ const Menu = class {
|
|
|
189
133
|
}
|
|
190
134
|
componentDidLoad() {
|
|
191
135
|
var _a, _b, _c, _d;
|
|
192
|
-
const anchor = this.hostElement.querySelector('#more-tab');
|
|
193
|
-
this.popoverListener = new Popover(anchor, this.moreItemsDropdown, () => {
|
|
194
|
-
this.showMoreItems = false;
|
|
195
|
-
});
|
|
196
136
|
(_a = this.settings) === null || _a === void 0 ? void 0 : _a.addEventListener('close', () => {
|
|
197
137
|
this.showSettings = false;
|
|
198
138
|
this.settings.show = this.showSettings;
|
|
@@ -221,10 +161,7 @@ const Menu = class {
|
|
|
221
161
|
subtree: true,
|
|
222
162
|
});
|
|
223
163
|
}
|
|
224
|
-
disconnectedCallback() {
|
|
225
|
-
var _a;
|
|
226
|
-
(_a = this.popoverListener) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
227
|
-
}
|
|
164
|
+
disconnectedCallback() { }
|
|
228
165
|
componentWillRender() {
|
|
229
166
|
this.appendTabs();
|
|
230
167
|
}
|
|
@@ -387,13 +324,6 @@ const Menu = class {
|
|
|
387
324
|
}
|
|
388
325
|
return Math.min(visibleCount - 2, this.maxVisibleMenuItems);
|
|
389
326
|
}
|
|
390
|
-
toggleShowMoreDropdown() {
|
|
391
|
-
if (this.moreItemsDropdown.querySelectorAll('.appended').length === 0) {
|
|
392
|
-
return;
|
|
393
|
-
}
|
|
394
|
-
this.popoverListener.open();
|
|
395
|
-
this.showMoreItems = !this.showMoreItems;
|
|
396
|
-
}
|
|
397
327
|
/**
|
|
398
328
|
* Toggle map sidebar expand
|
|
399
329
|
* @param show
|
|
@@ -509,7 +439,7 @@ const Menu = class {
|
|
|
509
439
|
isMenuItemClicked(event) {
|
|
510
440
|
const path = event.composedPath();
|
|
511
441
|
const menuItems = path
|
|
512
|
-
.filter((element) => element.id !== 'more-tab')
|
|
442
|
+
.filter((element) => element.id !== 'ix-menu-more-tab')
|
|
513
443
|
.filter((element) => {
|
|
514
444
|
return element.tagName === 'IX-MENU-ITEM';
|
|
515
445
|
});
|
|
@@ -532,11 +462,11 @@ const Menu = class {
|
|
|
532
462
|
if (this.isMenuItemClicked(event)) {
|
|
533
463
|
this.resetOverlay();
|
|
534
464
|
}
|
|
535
|
-
} }, index.h("div", { class: "tabs-top" }), index.h("slot", null), index.h("div", { class: "active-more-tab" }, this.activeTab ? (index.h("ix-menu-item", { class: "internal-tab", active: true, tabIcon: this.activeTab.tabIcon }, this.activeTab.innerText)) : null), index.h("ix-menu-item", { id: "more-tab", tabIcon: "more-menu", class: {
|
|
465
|
+
} }, index.h("div", { class: "tabs-top" }), index.h("slot", null), index.h("div", { class: "active-more-tab" }, this.activeTab ? (index.h("ix-menu-item", { class: "internal-tab", active: true, tabIcon: this.activeTab.tabIcon }, this.activeTab.innerText)) : null), index.h("ix-menu-item", { id: "ix-menu-more-tab", tabIcon: "more-menu", class: {
|
|
536
466
|
'internal-tab': true,
|
|
537
467
|
}, style: {
|
|
538
468
|
display: this.showMoreButton() ? 'block' : 'none',
|
|
539
|
-
}, title: "Show more", notifications: this.countMoreNotifications
|
|
469
|
+
}, title: "Show more", notifications: this.countMoreNotifications }, this.i18nMore, index.h("ix-dropdown", { trigger: 'ix-menu-more-tab', positioningStrategy: 'fixed', placement: 'right-start' }, this.menuItems
|
|
540
470
|
.filter((elm, index) => !this.showTab(index) &&
|
|
541
471
|
!this.isMenuItemActive(elm) &&
|
|
542
472
|
this.isVisible(elm))
|
|
@@ -550,7 +480,7 @@ const Menu = class {
|
|
|
550
480
|
'internal-tab': true,
|
|
551
481
|
'bottom-tab': true,
|
|
552
482
|
active: this.showAbout,
|
|
553
|
-
}, tabIcon: "info", onClick: async () => this.toggleAbout(!this.showAbout) }, this.i18nLegal)) : null, this.enableToggleTheme ? (index.h("ix-menu-item", { id: "toggleTheme", onClick: () =>
|
|
483
|
+
}, tabIcon: "info", onClick: async () => this.toggleAbout(!this.showAbout) }, this.i18nLegal)) : null, this.enableToggleTheme ? (index.h("ix-menu-item", { id: "toggleTheme", onClick: () => themeSwitcher.themeSwitcher.toggleMode(), class: "internal-tab bottom-tab", tabIcon: "bulb" }, this.i18nToggleTheme)) : null, this.enableMapExpand ? (index.h("ix-menu-item", { id: "menu-collapse", onClick: () => this.mapExpandChange.emit(this.mapExpand), class: "internal-tab bottom-tab", tabIcon: `${this.getCollapseIcon()}` }, this.getCollapseText())) : null), index.h("div", { class: {
|
|
554
484
|
'menu-overlay': true,
|
|
555
485
|
expanded: this.expand,
|
|
556
486
|
'd-block': this.showAbout || this.showSettings,
|
|
@@ -676,26 +606,15 @@ const MenuAvatar = class {
|
|
|
676
606
|
constructor(hostRef) {
|
|
677
607
|
index.registerInstance(this, hostRef);
|
|
678
608
|
this.logoutClick = index.createEvent(this, "logoutClick", 7);
|
|
679
|
-
this.
|
|
609
|
+
this.avatarElementId = 'ix-menu-avatar-id';
|
|
680
610
|
this.top = undefined;
|
|
681
611
|
this.bottom = undefined;
|
|
682
612
|
this.i18nLogout = 'Logout';
|
|
683
613
|
}
|
|
684
|
-
toggleMenu() {
|
|
685
|
-
this.outsideListener.open();
|
|
686
|
-
this.displayMenu = !this.displayMenu;
|
|
687
|
-
}
|
|
688
|
-
componentDidLoad() {
|
|
689
|
-
this.outsideListener = new Popover(this.hostElement, this.hostElement.querySelector('ix-dropdown'), () => {
|
|
690
|
-
this.displayMenu = false;
|
|
691
|
-
});
|
|
692
|
-
}
|
|
693
|
-
disconnectedCallback() {
|
|
694
|
-
var _a;
|
|
695
|
-
(_a = this.outsideListener) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
696
|
-
}
|
|
697
614
|
render() {
|
|
698
|
-
return (index.h(index.Host, null, index.h("li", { class: "nav-item top-item avatar no-hover", title: this.top }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 32 32" }, index.h("g", { fill: "none", "fill-rule": "evenodd" }, index.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" }), index.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" }))), index.h("div", { class: "avatar-name" }, index.h("span", { class: "text-default-single", title: this.top }, this.top), index.h("span", { class: "text-default-single", title: this.bottom }, this.bottom))), index.h("ix-dropdown", {
|
|
615
|
+
return (index.h(index.Host, null, index.h("li", { class: "nav-item top-item avatar no-hover", title: this.top, id: this.avatarElementId }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 32 32" }, index.h("g", { fill: "none", "fill-rule": "evenodd" }, index.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" }), index.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" }))), index.h("div", { class: "avatar-name" }, index.h("span", { class: "text-default-single", title: this.top }, this.top), index.h("span", { class: "text-default-single", title: this.bottom }, this.bottom))), index.h("ix-dropdown", { trigger: this.avatarElementId, placement: 'right-start', offset: {
|
|
616
|
+
mainAxis: 12,
|
|
617
|
+
} }, index.h("slot", null), index.h("ix-menu-avatar-item", { label: this.i18nLogout, icon: "log-out", onClick: (e) => {
|
|
699
618
|
this.logoutClick.emit(e);
|
|
700
619
|
} }))));
|
|
701
620
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const modal = require('./modal-
|
|
5
|
+
const modal = require('./modal-dda2f6be.js');
|
|
6
6
|
require('./index-17eb8998.js');
|
|
7
7
|
require('./typed-event-5030cc6a.js');
|
|
8
8
|
require('./anime.es-8822f296.js');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-17eb8998.js');
|
|
6
6
|
|
|
7
|
-
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}";
|
|
7
|
+
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}";
|
|
8
8
|
|
|
9
9
|
const Pill = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -25,7 +25,10 @@ const Pill = class {
|
|
|
25
25
|
color: this.color,
|
|
26
26
|
backgroundColor: this.background,
|
|
27
27
|
}
|
|
28
|
-
: {}, title: this.el.textContent },
|
|
28
|
+
: {}, title: this.el.textContent }, index.h("ix-icon", { class: {
|
|
29
|
+
'with-icon': true,
|
|
30
|
+
hidden: this.icon === undefined || this.icon === '',
|
|
31
|
+
}, name: this.icon, size: '16' }), index.h("div", { class: "slot" }, index.h("slot", null))));
|
|
29
32
|
}
|
|
30
33
|
get el() { return index.getElement(this); }
|
|
31
34
|
};
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-17eb8998.js');
|
|
6
6
|
|
|
7
|
-
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}
|
|
7
|
+
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}";
|
|
8
8
|
|
|
9
9
|
const Select = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -114,17 +114,12 @@ const Select = class {
|
|
|
114
114
|
: [this.selectedIndices]);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
this.labelMutationObserver.observe(this.hostElement, {
|
|
124
|
-
subtree: true,
|
|
125
|
-
attributes: true,
|
|
126
|
-
attributeFilter: ['label'],
|
|
127
|
-
});
|
|
117
|
+
onLabelChange(event) {
|
|
118
|
+
event.preventDefault();
|
|
119
|
+
event.stopImmediatePropagation();
|
|
120
|
+
this.selectValue(Array.isArray(this.selectedIndices)
|
|
121
|
+
? this.selectedIndices
|
|
122
|
+
: [this.selectedIndices]);
|
|
128
123
|
}
|
|
129
124
|
disconnectedCallback() {
|
|
130
125
|
if (this.labelMutationObserver) {
|
|
@@ -261,7 +256,7 @@ const Select = class {
|
|
|
261
256
|
'd-none': this.disabled ||
|
|
262
257
|
this.readonly ||
|
|
263
258
|
(this.isDropdownEmpty && !this.editable),
|
|
264
|
-
}, anchor: this.dropdownAnchor, trigger: this.dropdownWrapperRef, onShowChanged: (e) => this.dropdownVisibilityChanged(e), placement: "bottom", positioningStrategy: '
|
|
259
|
+
}, anchor: this.dropdownAnchor, trigger: this.dropdownWrapperRef, onShowChanged: (e) => this.dropdownVisibilityChanged(e), placement: "bottom-start", positioningStrategy: 'absolute' }, index.h("div", { class: "select-list-header", title: this.i18nSelectListHeader }, this.i18nSelectListHeader), index.h("slot", null), index.h("div", { ref: (ref) => (this.addItemRef = ref), class: "d-contents" }), this.itemExists(this.inputFilterText) ? ('') : (index.h("ix-dropdown-item", { "data-testid": "add-item", icon: "plus", class: {
|
|
265
260
|
'add-item': true,
|
|
266
261
|
'd-none': !(this.editable && this.inputFilterText),
|
|
267
262
|
}, label: this.inputFilterText, onItemClick: (e) => {
|
|
@@ -278,6 +273,23 @@ const Select = class {
|
|
|
278
273
|
};
|
|
279
274
|
Select.style = selectCss;
|
|
280
275
|
|
|
276
|
+
/*
|
|
277
|
+
* SPDX-FileCopyrightText: 2023 Siemens AG
|
|
278
|
+
*
|
|
279
|
+
* SPDX-License-Identifier: MIT
|
|
280
|
+
*
|
|
281
|
+
* This source code is licensed under the MIT license found in the
|
|
282
|
+
* LICENSE file in the root directory of this source tree.
|
|
283
|
+
*/
|
|
284
|
+
class IxSelectItemLabelChangeEvent extends CustomEvent {
|
|
285
|
+
constructor(detail) {
|
|
286
|
+
super('ix-select-item:labelChange', {
|
|
287
|
+
bubbles: true,
|
|
288
|
+
detail,
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
281
293
|
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}";
|
|
282
294
|
|
|
283
295
|
const SelectItem = class {
|
|
@@ -290,7 +302,7 @@ const SelectItem = class {
|
|
|
290
302
|
this.hover = false;
|
|
291
303
|
}
|
|
292
304
|
/**
|
|
293
|
-
*
|
|
305
|
+
* @internal
|
|
294
306
|
* @param event
|
|
295
307
|
*/
|
|
296
308
|
async onItemClick(event) {
|
|
@@ -303,10 +315,19 @@ const SelectItem = class {
|
|
|
303
315
|
throw Error('ix-select-item must have a `value` property');
|
|
304
316
|
}
|
|
305
317
|
}
|
|
318
|
+
labelChange(newValue, oldValue) {
|
|
319
|
+
this.hostElement.dispatchEvent(new IxSelectItemLabelChangeEvent({
|
|
320
|
+
newValue: newValue,
|
|
321
|
+
oldValue: oldValue,
|
|
322
|
+
}));
|
|
323
|
+
}
|
|
306
324
|
render() {
|
|
307
325
|
return (index.h(index.Host, null, index.h("ix-dropdown-item", { checked: this.selected, hover: this.hover, label: this.label ? this.label : this.value, onItemClick: (e) => this.onItemClick(e) })));
|
|
308
326
|
}
|
|
309
327
|
get hostElement() { return index.getElement(this); }
|
|
328
|
+
static get watchers() { return {
|
|
329
|
+
"label": ["labelChange"]
|
|
330
|
+
}; }
|
|
310
331
|
};
|
|
311
332
|
SelectItem.style = selectItemCss;
|
|
312
333
|
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-17eb8998.js');
|
|
6
6
|
const baseButton = require('./base-button-6ef79cb6.js');
|
|
7
|
-
const popper = require('./popper-d7a0f999.js');
|
|
8
7
|
|
|
9
8
|
const splitButtonCss = ".sc-ix-split-button-h{display:block}";
|
|
10
9
|
|
|
@@ -26,46 +25,18 @@ const SplitButton = class {
|
|
|
26
25
|
get splitItems() {
|
|
27
26
|
return Array.from(this.hostElement.querySelectorAll('ix-split-button-item'));
|
|
28
27
|
}
|
|
29
|
-
|
|
30
|
-
if (
|
|
31
|
-
this.
|
|
28
|
+
linkTriggerRef() {
|
|
29
|
+
if (this.triggerElement && this.dropdownElement) {
|
|
30
|
+
this.dropdownElement.trigger = this.triggerElement;
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
33
|
componentDidLoad() {
|
|
35
|
-
|
|
36
|
-
this.popover = this.hostElement.querySelector('ix-dropdown');
|
|
37
|
-
this.popperInstance = popper.createPopper(element, this.popover, {
|
|
38
|
-
strategy: 'fixed',
|
|
39
|
-
placement: this.placement,
|
|
40
|
-
modifiers: [
|
|
41
|
-
{
|
|
42
|
-
name: 'offset',
|
|
43
|
-
options: {
|
|
44
|
-
offset: [0, 0],
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
name: 'flip',
|
|
49
|
-
options: {
|
|
50
|
-
padding: 8,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
});
|
|
55
|
-
window.addEventListener('click', this.clickOutside.bind(this));
|
|
56
|
-
}
|
|
57
|
-
disconnectedCallback() {
|
|
58
|
-
var _a;
|
|
59
|
-
(_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
60
|
-
window.removeEventListener('click', this.clickOutside.bind(this));
|
|
61
|
-
}
|
|
62
|
-
toggleDropdown() {
|
|
63
|
-
this.toggle = !this.toggle;
|
|
34
|
+
this.linkTriggerRef();
|
|
64
35
|
}
|
|
65
36
|
render() {
|
|
66
|
-
return (index.h(index.Host, { class: "btn-group" }, index.h("button", { class: baseButton.getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, !this.label, false, false, this.disabled), onClick: (e) => this.buttonClick.emit(e) }, this.icon ? index.h("ix-icon", { name: this.icon }) : null, " ", this.label), index.h("button", { class: Object.assign(Object.assign({}, baseButton.getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, true, false, false, this.disabled)), {
|
|
37
|
+
return (index.h(index.Host, { class: "btn-group" }, index.h("button", { class: baseButton.getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, !this.label, false, false, this.disabled), onClick: (e) => this.buttonClick.emit(e) }, this.icon ? index.h("ix-icon", { name: this.icon }) : null, " ", this.label), index.h("button", { ref: (r) => (this.triggerElement = r), class: Object.assign(Object.assign({}, baseButton.getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, true, false, false, this.disabled)), {
|
|
67
38
|
anchor: true,
|
|
68
|
-
})
|
|
39
|
+
}) }, index.h("ix-icon", { name: this.splitIcon }), index.h("ix-dropdown", { ref: (r) => (this.dropdownElement = r) }, index.h("slot", null)))));
|
|
69
40
|
}
|
|
70
41
|
get hostElement() { return index.getElement(this); }
|
|
71
42
|
};
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-17eb8998.js');
|
|
6
|
-
const
|
|
6
|
+
const alignment = require('./alignment-24ae2e63.js');
|
|
7
7
|
|
|
8
|
-
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
|
|
8
|
+
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)}";
|
|
9
9
|
|
|
10
10
|
const ValidationTooltip = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -15,6 +15,8 @@ const ValidationTooltip = class {
|
|
|
15
15
|
this.message = undefined;
|
|
16
16
|
this.placement = 'top';
|
|
17
17
|
this.isInputValid = true;
|
|
18
|
+
this.tooltipPosition = undefined;
|
|
19
|
+
this.arrowPosition = undefined;
|
|
18
20
|
}
|
|
19
21
|
get arrow() {
|
|
20
22
|
return this.hostElement.querySelector('#arrow');
|
|
@@ -28,6 +30,61 @@ const ValidationTooltip = class {
|
|
|
28
30
|
get tooltipElement() {
|
|
29
31
|
return this.hostElement.querySelector('.validation-tooltip');
|
|
30
32
|
}
|
|
33
|
+
destoryAutoUpdate() {
|
|
34
|
+
this.tooltipElement.style.display = 'none';
|
|
35
|
+
if (this.autoUpdateCleanup) {
|
|
36
|
+
this.autoUpdateCleanup();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
applyTooltipPosition() {
|
|
40
|
+
this.tooltipElement.style.display = 'block';
|
|
41
|
+
let positionConfig = {
|
|
42
|
+
strategy: 'fixed',
|
|
43
|
+
middleware: [
|
|
44
|
+
alignment.inline(),
|
|
45
|
+
alignment.shift(),
|
|
46
|
+
alignment.offset({
|
|
47
|
+
mainAxis: 8,
|
|
48
|
+
}),
|
|
49
|
+
],
|
|
50
|
+
};
|
|
51
|
+
if (this.placement.includes('auto')) {
|
|
52
|
+
positionConfig.middleware.push(alignment.autoPlacement({
|
|
53
|
+
alignment: alignment.getAlignment(this.placement),
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
positionConfig.placement = this.placement;
|
|
58
|
+
}
|
|
59
|
+
this.autoUpdateCleanup = alignment.autoUpdate(this.inputElement, this.tooltipElement, async () => {
|
|
60
|
+
positionConfig.middleware = [
|
|
61
|
+
...positionConfig.middleware,
|
|
62
|
+
alignment.arrow({
|
|
63
|
+
element: this.arrow,
|
|
64
|
+
}),
|
|
65
|
+
];
|
|
66
|
+
const computeResponse = await alignment.computePosition(this.inputElement, this.tooltipElement, positionConfig);
|
|
67
|
+
if (computeResponse.middlewareData.arrow) {
|
|
68
|
+
const { x, y } = computeResponse.middlewareData.arrow;
|
|
69
|
+
this.arrowPosition = {
|
|
70
|
+
x,
|
|
71
|
+
y,
|
|
72
|
+
};
|
|
73
|
+
Object.assign(this.arrow.style, {
|
|
74
|
+
left: x != null ? `${x}px` : '',
|
|
75
|
+
top: y != null ? `${y}px` : '',
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
this.tooltipPosition = {
|
|
79
|
+
x: computeResponse.x,
|
|
80
|
+
y: computeResponse.y,
|
|
81
|
+
};
|
|
82
|
+
}, {
|
|
83
|
+
ancestorResize: true,
|
|
84
|
+
ancestorScroll: true,
|
|
85
|
+
elementResize: true,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
31
88
|
componentDidLoad() {
|
|
32
89
|
if (!this.inputElement) {
|
|
33
90
|
throw Error('Validation tooltip is only working with an direct input child.');
|
|
@@ -59,41 +116,29 @@ const ValidationTooltip = class {
|
|
|
59
116
|
}
|
|
60
117
|
}
|
|
61
118
|
disconnectedCallback() {
|
|
62
|
-
var _a
|
|
119
|
+
var _a;
|
|
63
120
|
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
64
|
-
|
|
121
|
+
this.destoryAutoUpdate();
|
|
65
122
|
this.formElement.removeEventListener('submit', this.onSubmitBind);
|
|
66
123
|
this.inputElement.removeEventListener('focus', this.onInputFocusBind);
|
|
67
124
|
}
|
|
68
125
|
validationChanged() {
|
|
69
126
|
if (!this.isInputValid) {
|
|
70
|
-
this.
|
|
71
|
-
this.popper = popper.createPopper(this.inputElement, this.tooltipElement, {
|
|
72
|
-
placement: this.placement,
|
|
73
|
-
strategy: 'absolute',
|
|
74
|
-
modifiers: [
|
|
75
|
-
{
|
|
76
|
-
name: 'offset',
|
|
77
|
-
options: {
|
|
78
|
-
offset: [0, 8],
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
name: 'arrow',
|
|
83
|
-
options: {
|
|
84
|
-
element: this.arrow,
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
});
|
|
127
|
+
this.applyTooltipPosition();
|
|
89
128
|
}
|
|
90
129
|
else {
|
|
91
|
-
this.
|
|
92
|
-
this.popper.destroy();
|
|
130
|
+
this.destoryAutoUpdate();
|
|
93
131
|
}
|
|
94
132
|
}
|
|
95
133
|
render() {
|
|
96
|
-
|
|
134
|
+
var _a, _b;
|
|
135
|
+
return (index.h(index.Host, null, index.h("slot", null), index.h("div", { role: "tooltip", style: {
|
|
136
|
+
display: 'none',
|
|
137
|
+
position: 'fixed',
|
|
138
|
+
top: '0',
|
|
139
|
+
left: '0',
|
|
140
|
+
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)`,
|
|
141
|
+
}, class: "validation-tooltip text-default" }, this.message, index.h("slot", { name: "tooltip-message" }), index.h("div", { id: "arrow" }))));
|
|
97
142
|
}
|
|
98
143
|
get hostElement() { return index.getElement(this); }
|
|
99
144
|
static get watchers() { return {
|