@siemens/ix 1.4.0-beta.2 → 1.4.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.
Files changed (37) hide show
  1. package/dist/cjs/ix-divider.cjs.entry.js +2 -2
  2. package/dist/cjs/ix-dropdown-button.cjs.entry.js +3 -3
  3. package/dist/cjs/ix-dropdown_2.cjs.entry.js +70 -44
  4. package/dist/cjs/ix-tree_2.cjs.entry.js +18 -12
  5. package/dist/collection/components/divider/divider.css +3 -4
  6. package/dist/collection/components/divider/divider.js +1 -1
  7. package/dist/collection/components/dropdown/dropdown.css +5 -14
  8. package/dist/collection/components/dropdown/dropdown.js +68 -42
  9. package/dist/collection/components/dropdown-button/dropdown-button.css +3 -0
  10. package/dist/collection/components/dropdown-button/dropdown-button.js +4 -5
  11. package/dist/collection/components/dropdown-item/dropdown-item.css +4 -0
  12. package/dist/collection/components/tree/tree.js +18 -12
  13. package/dist/components/dropdown-item.js +1 -1
  14. package/dist/components/dropdown.js +69 -43
  15. package/dist/components/ix-divider.js +2 -2
  16. package/dist/components/ix-dropdown-button.js +3 -3
  17. package/dist/components/ix-tree.js +18 -12
  18. package/dist/esm/ix-divider.entry.js +2 -2
  19. package/dist/esm/ix-dropdown-button.entry.js +3 -3
  20. package/dist/esm/ix-dropdown_2.entry.js +70 -44
  21. package/dist/esm/ix-tree_2.entry.js +18 -12
  22. package/dist/siemens-ix/p-2531a5d0.entry.js +1 -0
  23. package/dist/siemens-ix/p-4da15801.entry.js +1 -0
  24. package/dist/siemens-ix/p-80fe33d1.entry.js +1 -0
  25. package/dist/siemens-ix/p-8778ba75.entry.js +1 -0
  26. package/dist/siemens-ix/siemens-ix.css +0 -14
  27. package/dist/siemens-ix/siemens-ix.esm.js +1 -1
  28. package/dist/types/components/dropdown/dropdown.d.ts +2 -0
  29. package/dist/types/components/dropdown-button/dropdown-button.d.ts +1 -1
  30. package/dist/types/components/tree/tree.d.ts +1 -0
  31. package/dist/types/components.d.ts +2 -2
  32. package/package.json +1 -1
  33. package/scss/components/_dropdown.scss +0 -15
  34. package/dist/siemens-ix/p-0bf4a256.entry.js +0 -1
  35. package/dist/siemens-ix/p-8d2e0fb5.entry.js +0 -1
  36. package/dist/siemens-ix/p-b5599b0b.entry.js +0 -1
  37. package/dist/siemens-ix/p-e4bda8e7.entry.js +0 -1
@@ -4,14 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f4b8e6ee.js');
6
6
 
7
- const dividerCss = ":host{display:block;position:initial}:host .line{width:auto;border:0.0625rem solid var(--theme-color-x-weak-bdr)}";
7
+ const dividerCss = ":host{display:block;position:relative;width:100%;border:0.0625rem solid var(--theme-color-x-weak-bdr);margin:0.25rem 0px}";
8
8
 
9
9
  const Divider = class {
10
10
  constructor(hostRef) {
11
11
  index.registerInstance(this, hostRef);
12
12
  }
13
13
  render() {
14
- return (index.h(index.Host, null, index.h("div", { class: "line" })));
14
+ return index.h(index.Host, null);
15
15
  }
16
16
  };
17
17
  Divider.style = dividerCss;
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f4b8e6ee.js');
6
6
 
7
- const dropdownButtonCss = ".sc-ix-dropdown-button-h{display:inline-block;position:relative;height:2rem;width:auto}.disabled.sc-ix-dropdown-button-h{pointer-events:none}.sc-ix-dropdown-button-h .dropdown-button.sc-ix-dropdown-button{display:block;position:relative;width:100%;height:100%}.sc-ix-dropdown-button-h .dropdown-button.sc-ix-dropdown-button>ix-button.sc-ix-dropdown-button{width:100%;height:100%}.sc-ix-dropdown-button-h .dropdown-button.sc-ix-dropdown-button .button-label.sc-ix-dropdown-button{margin-right:auto}.sc-ix-dropdown-button-h .triangle.sc-ix-dropdown-button{position:absolute;-webkit-margin-start:1.5625rem;margin-inline-start:1.5625rem;-webkit-margin-before:-0.4375rem;margin-block-start:-0.4375rem;border-right:0 solid transparent;border-left:4px solid transparent;border-top:0 solid transparent;border-bottom:4px solid;color:var(--theme-btn-primary--color)}.sc-ix-dropdown-button-h .triangle.primary.ghost.sc-ix-dropdown-button{color:var(--theme-btn-invisible-primary--color)}.sc-ix-dropdown-button-h .triangle.primary.outline.sc-ix-dropdown-button{color:var(--theme-btn-outline-primary--color)}.sc-ix-dropdown-button-h .triangle.primary.ghost.disabled.sc-ix-dropdown-button{color:var(--theme-btn-invisible-primary--color--disabled)}.sc-ix-dropdown-button-h .triangle.primary.outline.disabled.sc-ix-dropdown-button{color:var(--theme-btn-outline-primary--color--disabled)}.sc-ix-dropdown-button-h .triangle.primary.disabled.sc-ix-dropdown-button{color:var(--theme-btn-primary--color--disabled)}.sc-ix-dropdown-button-h .triangle.secondary.ghost.sc-ix-dropdown-button{color:var(--theme-btn-invisible-secondary--color)}.sc-ix-dropdown-button-h .triangle.secondary.outline.sc-ix-dropdown-button{color:var(--theme-btn-outline-secondary--color)}.sc-ix-dropdown-button-h .triangle.secondary.ghost.disabled.sc-ix-dropdown-button{color:var(--theme-btn-invisible-secondary--color--disabled)}.sc-ix-dropdown-button-h .triangle.secondary.outline.disabled.sc-ix-dropdown-button{color:var(--theme-btn-outline-secondary--color--disabled)}.sc-ix-dropdown-button-h .triangle.secondary.disabled.sc-ix-dropdown-button{color:var(--theme-btn-secondary--color--disabled)}.sc-ix-dropdown-button-h .dropdown.sc-ix-dropdown-button{width:auto !important;inset:auto !important;transform:unset !important}";
7
+ const dropdownButtonCss = ".sc-ix-dropdown-button-h{display:inline-block;position:relative;height:2rem;width:auto}.disabled.sc-ix-dropdown-button-h{pointer-events:none}.sc-ix-dropdown-button-h .hide.sc-ix-dropdown-button{display:none}.sc-ix-dropdown-button-h .dropdown-button.sc-ix-dropdown-button{display:block;position:relative;width:100%;height:100%}.sc-ix-dropdown-button-h .dropdown-button.sc-ix-dropdown-button>ix-button.sc-ix-dropdown-button{width:100%;height:100%}.sc-ix-dropdown-button-h .dropdown-button.sc-ix-dropdown-button .button-label.sc-ix-dropdown-button{margin-right:auto}.sc-ix-dropdown-button-h .triangle.sc-ix-dropdown-button{position:absolute;-webkit-margin-start:1.5625rem;margin-inline-start:1.5625rem;-webkit-margin-before:-0.4375rem;margin-block-start:-0.4375rem;border-right:0 solid transparent;border-left:4px solid transparent;border-top:0 solid transparent;border-bottom:4px solid;color:var(--theme-btn-primary--color)}.sc-ix-dropdown-button-h .triangle.primary.ghost.sc-ix-dropdown-button{color:var(--theme-btn-invisible-primary--color)}.sc-ix-dropdown-button-h .triangle.primary.outline.sc-ix-dropdown-button{color:var(--theme-btn-outline-primary--color)}.sc-ix-dropdown-button-h .triangle.primary.ghost.disabled.sc-ix-dropdown-button{color:var(--theme-btn-invisible-primary--color--disabled)}.sc-ix-dropdown-button-h .triangle.primary.outline.disabled.sc-ix-dropdown-button{color:var(--theme-btn-outline-primary--color--disabled)}.sc-ix-dropdown-button-h .triangle.primary.disabled.sc-ix-dropdown-button{color:var(--theme-btn-primary--color--disabled)}.sc-ix-dropdown-button-h .triangle.secondary.ghost.sc-ix-dropdown-button{color:var(--theme-btn-invisible-secondary--color)}.sc-ix-dropdown-button-h .triangle.secondary.outline.sc-ix-dropdown-button{color:var(--theme-btn-outline-secondary--color)}.sc-ix-dropdown-button-h .triangle.secondary.ghost.disabled.sc-ix-dropdown-button{color:var(--theme-btn-invisible-secondary--color--disabled)}.sc-ix-dropdown-button-h .triangle.secondary.outline.disabled.sc-ix-dropdown-button{color:var(--theme-btn-outline-secondary--color--disabled)}.sc-ix-dropdown-button-h .triangle.secondary.disabled.sc-ix-dropdown-button{color:var(--theme-btn-secondary--color--disabled)}.sc-ix-dropdown-button-h .dropdown.sc-ix-dropdown-button{width:auto !important;inset:auto !important;transform:unset !important}";
8
8
 
9
9
  const DropdownButton = class {
10
10
  constructor(hostRef) {
@@ -14,7 +14,7 @@ const DropdownButton = class {
14
14
  this.ghost = false;
15
15
  this.active = false;
16
16
  this.disabled = false;
17
- this.label = '';
17
+ this.label = undefined;
18
18
  this.icon = undefined;
19
19
  this.dropdownAnchor = undefined;
20
20
  }
@@ -34,7 +34,7 @@ const DropdownButton = class {
34
34
  disabled: this.disabled,
35
35
  } }, index.h("div", { class: "dropdown-button", ref: (ref) => {
36
36
  this.dropdownAnchor = ref;
37
- } }, this.label !== '' ? (index.h("ix-button", { variant: this.variant, outline: this.outline, ghost: this.ghost, disabled: this.disabled }, index.h("ix-icon", { name: this.icon, size: "24", class: { hide: this.icon === '' || this.icon === undefined } }), index.h("div", { class: 'button-label' }, this.label), index.h("ix-icon", { name: "chevron-down-small", size: "24" }))) : (index.h("div", null, index.h("ix-icon-button", { icon: this.icon, variant: this.variant, outline: this.outline, ghost: this.ghost, disabled: this.disabled }), this.getTriangle()))), index.h("ix-dropdown", { class: "dropdown", trigger: this.dropdownAnchor, placement: "bottom", positioningStrategy: 'fixed', adjustDropdownWidthToReferenceWidth: true }, index.h("slot", null))));
37
+ } }, this.label ? (index.h("ix-button", { variant: this.variant, outline: this.outline, ghost: this.ghost, disabled: this.disabled }, index.h("ix-icon", { name: this.icon, size: "24", class: { hide: this.icon === '' || this.icon === undefined } }), index.h("div", { class: 'button-label' }, this.label), index.h("ix-icon", { name: "chevron-down-small", size: "24" }))) : (index.h("div", null, index.h("ix-icon-button", { icon: this.icon, variant: this.variant, outline: this.outline, ghost: this.ghost, disabled: this.disabled }), this.getTriangle()))), index.h("ix-dropdown", { class: "dropdown", trigger: this.dropdownAnchor, placement: "bottom", positioningStrategy: 'fixed', adjustDropdownWidthToReferenceWidth: true }, index.h("slot", null))));
38
38
  }
39
39
  };
40
40
  DropdownButton.style = dropdownButtonCss;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-f4b8e6ee.js');
6
6
  const floatingUi_dom_esm = require('./floating-ui.dom.esm-01fe5abe.js');
7
7
 
8
- const dropdownCss = ".dropup,.dropend,.dropdown,.dropstart,.dropup-center,.dropdown-center{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:0.255em;vertical-align:0.255em;content:\"\";border-top:0.3em solid;border-right:0.3em solid transparent;border-bottom:0;border-left:0.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{--bs-dropdown-zindex:1000;--bs-dropdown-min-width:10rem;--bs-dropdown-padding-x:0;--bs-dropdown-padding-y:0.5rem;--bs-dropdown-spacer:0.125rem;--bs-dropdown-font-size:1rem;--bs-dropdown-color:#212529;--bs-dropdown-bg:#fff;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-border-radius:0.375rem;--bs-dropdown-border-width:1px;--bs-dropdown-inner-border-radius:calc(0.375rem - 1px);--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-divider-margin-y:0.5rem;--bs-dropdown-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-dropdown-link-color:#212529;--bs-dropdown-link-hover-color:#1e2125;--bs-dropdown-link-hover-bg:#e9ecef;--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-item-padding-x:1rem;--bs-dropdown-item-padding-y:0.25rem;--bs-dropdown-header-color:#6c757d;--bs-dropdown-header-padding-x:1rem;--bs-dropdown-header-padding-y:0.5rem;position:absolute;z-index:var(--bs-dropdown-zindex);display:none;min-width:var(--bs-dropdown-min-width);padding:var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);margin:0;font-size:var(--bs-dropdown-font-size);color:var(--bs-dropdown-color);text-align:left;list-style:none;background-color:var(--bs-dropdown-bg);background-clip:padding-box;border:var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);border-radius:var(--bs-dropdown-border-radius)}.dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:var(--bs-dropdown-spacer)}.dropdown-menu-start{--bs-position:start}.dropdown-menu-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-end{--bs-position:end}.dropdown-menu-end[data-bs-popper]{right:0;left:auto}@media (min-width: 576px){.dropdown-menu-sm-start{--bs-position:start}.dropdown-menu-sm-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-sm-end{--bs-position:end}.dropdown-menu-sm-end[data-bs-popper]{right:0;left:auto}}@media (min-width: 768px){.dropdown-menu-md-start{--bs-position:start}.dropdown-menu-md-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-md-end{--bs-position:end}.dropdown-menu-md-end[data-bs-popper]{right:0;left:auto}}@media (min-width: 992px){.dropdown-menu-lg-start{--bs-position:start}.dropdown-menu-lg-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-lg-end{--bs-position:end}.dropdown-menu-lg-end[data-bs-popper]{right:0;left:auto}}@media (min-width: 1200px){.dropdown-menu-xl-start{--bs-position:start}.dropdown-menu-xl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xl-end{--bs-position:end}.dropdown-menu-xl-end[data-bs-popper]{right:0;left:auto}}@media (min-width: 1400px){.dropdown-menu-xxl-start{--bs-position:start}.dropdown-menu-xxl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xxl-end{--bs-position:end}.dropdown-menu-xxl-end[data-bs-popper]{right:0;left:auto}}.dropup .dropdown-menu[data-bs-popper]{top:auto;bottom:100%;margin-top:0;margin-bottom:var(--bs-dropdown-spacer)}.dropup .dropdown-toggle::after{display:inline-block;margin-left:0.255em;vertical-align:0.255em;content:\"\";border-top:0;border-right:0.3em solid transparent;border-bottom:0.3em solid;border-left:0.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-menu[data-bs-popper]{top:0;right:auto;left:100%;margin-top:0;margin-left:var(--bs-dropdown-spacer)}.dropend .dropdown-toggle::after{display:inline-block;margin-left:0.255em;vertical-align:0.255em;content:\"\";border-top:0.3em solid transparent;border-right:0;border-bottom:0.3em solid transparent;border-left:0.3em solid}.dropend .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-toggle::after{vertical-align:0}.dropstart .dropdown-menu[data-bs-popper]{top:0;right:100%;left:auto;margin-top:0;margin-right:var(--bs-dropdown-spacer)}.dropstart .dropdown-toggle::after{display:inline-block;margin-left:0.255em;vertical-align:0.255em;content:\"\"}.dropstart .dropdown-toggle::after{display:none}.dropstart .dropdown-toggle::before{display:inline-block;margin-right:0.255em;vertical-align:0.255em;content:\"\";border-top:0.3em solid transparent;border-right:0.3em solid;border-bottom:0.3em solid transparent}.dropstart .dropdown-toggle:empty::after{margin-left:0}.dropstart .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:var(--bs-dropdown-divider-margin-y) 0;overflow:hidden;border-top:1px solid var(--bs-dropdown-divider-bg);opacity:1}.dropdown-item{display:block;width:100%;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);clear:both;font-weight:400;color:var(--bs-dropdown-link-color);text-align:inherit;text-decoration:none;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:hover,.dropdown-item:focus{color:var(--bs-dropdown-link-hover-color);background-color:var(--bs-dropdown-link-hover-bg)}.dropdown-item.active,.dropdown-item:active{color:var(--bs-dropdown-link-active-color);text-decoration:none;background-color:var(--bs-dropdown-link-active-bg)}.dropdown-item.disabled,.dropdown-item:disabled{color:var(--bs-dropdown-link-disabled-color);pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x);margin-bottom:0;font-size:0.875rem;color:var(--bs-dropdown-header-color);white-space:nowrap}.dropdown-item-text{display:block;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);color:var(--bs-dropdown-link-color)}.dropdown-menu-dark{--bs-dropdown-color:#dee2e6;--bs-dropdown-bg:#343a40;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-link-color:#dee2e6;--bs-dropdown-link-hover-color:#fff;--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-link-hover-bg:rgba(255, 255, 255, 0.15);--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-header-color:#adb5bd}.dropup .btn,.dropright .btn,.dropdown .btn,.dropleft .btn{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;text-align:left;width:100%}.dropdown-group{margin:0.687rem;display:block;position:relative;width:21.562rem;border-radius:0.25rem;background-color:#f8f9fa;border:solid 0.062rem rgba(0, 0, 0, 0.25)}.dropdown-group .dropdown-group-title{display:block;position:relative;font-size:0.875rem;text-align:left;margin:0.937rem 0 1.25rem 0.937rem}.dropdown-group .dropdown-group-content{position:relative;display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;height:11.562rem;margin:0.937rem 0 0.937rem 0.937rem}.dropdown-group .dropdown-group-content>*{margin-bottom:1rem}.dropdown-group-submit{display:flex;justify-content:space-between;margin:0 0.687rem 0 0.687rem}.dropdown-menu{position:absolute;max-height:50vh;overflow-y:auto;background-color:var(--theme-menu--background);-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);border:var(--theme-menu--border-thickness) solid var(--theme-menu--border--color);border-radius:var(--theme-menu--border-radius);max-width:100vw;padding:0.25rem 0;transition:background-color 150ms;box-shadow:var(--theme-menu--box-shadow)}.dropdown-menu.xl>.dropdown-item{height:2.5rem;line-height:2.187rem}.dropdown-header{display:flex;align-items:center;height:2.5rem;color:var(--theme-menu-header--color);padding:0 1rem}.dropdown-buttons{display:flex;padding:0.25rem 0.5rem}.dropdown-buttons ix-icon-button+ix-icon-button{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.dropdown-item{display:flex;height:2.5rem;position:relative;align-items:center;cursor:pointer;padding:0 2rem;border:1px solid transparent;color:var(--theme-menu-item--color)}.dropdown-item:focus-visible{background-color:var(--theme-menu-item--background);color:var(--theme-menu-item--color)}.dropdown-item:focus-visible{outline:none;background-color:var(--theme-menu-item--background);border-color:#119fff;color:var(--theme-menu-item--color--focus)}.dropdown-item:not(.disabled):not(:disabled){cursor:pointer}.dropdown-item:not(.disabled):not(:disabled):hover{color:var(--theme-menu-item--color--hover);background-color:var(--theme-menu-item--background--hover)}.dropdown-item:not(.disabled):not(:disabled){cursor:pointer}.dropdown-item:not(.disabled):not(:disabled):active{color:var(--theme-menu-item--color--active);background-color:var(--theme-menu-item--background--active)}.dropdown-item.disabled,.dropdown-item:disabled{color:var(--theme-menu-item--color--disabled);background-color:var(--theme-menu-item--background--disabled)}.dropdown-item>a,.dropdown-item a:hover,.dropdown-item a:active{color:var(--theme-color-std-text)}.dropdown-item>.glyph{color:var(--theme-menu-item-icon--color);-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}.dropdown-item>.glyph.disabled{color:var(--color-weak-text)}.dropdown-item>.glyph.glyph-single-check{color:var(--theme-menu-item-icon-check--color)}.dropdown-item>input[type=checkbox]+label{margin-bottom:0px}.dropdown-item>input[type=checkbox]+label::before{margin-right:1rem}.dropdown-divider{border-top:1px solid var(--theme-menu-separator--background);margin:0.25rem 0}button.dropdown-toggle{position:relative;padding-right:1.5rem}button.dropdown-toggle::after{position:absolute;top:45%;right:0.5rem}:host{min-width:0px}";
8
+ const dropdownCss = ".dropup,.dropend,.dropdown,.dropstart,.dropup-center,.dropdown-center{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:0.255em;vertical-align:0.255em;content:\"\";border-top:0.3em solid;border-right:0.3em solid transparent;border-bottom:0;border-left:0.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{--bs-dropdown-zindex:1000;--bs-dropdown-min-width:10rem;--bs-dropdown-padding-x:0;--bs-dropdown-padding-y:0.5rem;--bs-dropdown-spacer:0.125rem;--bs-dropdown-font-size:1rem;--bs-dropdown-color:#212529;--bs-dropdown-bg:#fff;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-border-radius:0.375rem;--bs-dropdown-border-width:1px;--bs-dropdown-inner-border-radius:calc(0.375rem - 1px);--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-divider-margin-y:0.5rem;--bs-dropdown-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-dropdown-link-color:#212529;--bs-dropdown-link-hover-color:#1e2125;--bs-dropdown-link-hover-bg:#e9ecef;--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-item-padding-x:1rem;--bs-dropdown-item-padding-y:0.25rem;--bs-dropdown-header-color:#6c757d;--bs-dropdown-header-padding-x:1rem;--bs-dropdown-header-padding-y:0.5rem;position:absolute;z-index:var(--bs-dropdown-zindex);display:none;min-width:var(--bs-dropdown-min-width);padding:var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);margin:0;font-size:var(--bs-dropdown-font-size);color:var(--bs-dropdown-color);text-align:left;list-style:none;background-color:var(--bs-dropdown-bg);background-clip:padding-box;border:var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);border-radius:var(--bs-dropdown-border-radius)}.dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:var(--bs-dropdown-spacer)}.dropdown-menu-start{--bs-position:start}.dropdown-menu-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-end{--bs-position:end}.dropdown-menu-end[data-bs-popper]{right:0;left:auto}@media (min-width: 576px){.dropdown-menu-sm-start{--bs-position:start}.dropdown-menu-sm-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-sm-end{--bs-position:end}.dropdown-menu-sm-end[data-bs-popper]{right:0;left:auto}}@media (min-width: 768px){.dropdown-menu-md-start{--bs-position:start}.dropdown-menu-md-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-md-end{--bs-position:end}.dropdown-menu-md-end[data-bs-popper]{right:0;left:auto}}@media (min-width: 992px){.dropdown-menu-lg-start{--bs-position:start}.dropdown-menu-lg-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-lg-end{--bs-position:end}.dropdown-menu-lg-end[data-bs-popper]{right:0;left:auto}}@media (min-width: 1200px){.dropdown-menu-xl-start{--bs-position:start}.dropdown-menu-xl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xl-end{--bs-position:end}.dropdown-menu-xl-end[data-bs-popper]{right:0;left:auto}}@media (min-width: 1400px){.dropdown-menu-xxl-start{--bs-position:start}.dropdown-menu-xxl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xxl-end{--bs-position:end}.dropdown-menu-xxl-end[data-bs-popper]{right:0;left:auto}}.dropup .dropdown-menu[data-bs-popper]{top:auto;bottom:100%;margin-top:0;margin-bottom:var(--bs-dropdown-spacer)}.dropup .dropdown-toggle::after{display:inline-block;margin-left:0.255em;vertical-align:0.255em;content:\"\";border-top:0;border-right:0.3em solid transparent;border-bottom:0.3em solid;border-left:0.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-menu[data-bs-popper]{top:0;right:auto;left:100%;margin-top:0;margin-left:var(--bs-dropdown-spacer)}.dropend .dropdown-toggle::after{display:inline-block;margin-left:0.255em;vertical-align:0.255em;content:\"\";border-top:0.3em solid transparent;border-right:0;border-bottom:0.3em solid transparent;border-left:0.3em solid}.dropend .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-toggle::after{vertical-align:0}.dropstart .dropdown-menu[data-bs-popper]{top:0;right:100%;left:auto;margin-top:0;margin-right:var(--bs-dropdown-spacer)}.dropstart .dropdown-toggle::after{display:inline-block;margin-left:0.255em;vertical-align:0.255em;content:\"\"}.dropstart .dropdown-toggle::after{display:none}.dropstart .dropdown-toggle::before{display:inline-block;margin-right:0.255em;vertical-align:0.255em;content:\"\";border-top:0.3em solid transparent;border-right:0.3em solid;border-bottom:0.3em solid transparent}.dropstart .dropdown-toggle:empty::after{margin-left:0}.dropstart .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:var(--bs-dropdown-divider-margin-y) 0;overflow:hidden;border-top:1px solid var(--bs-dropdown-divider-bg);opacity:1}.dropdown-item{display:block;width:100%;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);clear:both;font-weight:400;color:var(--bs-dropdown-link-color);text-align:inherit;text-decoration:none;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:hover,.dropdown-item:focus{color:var(--bs-dropdown-link-hover-color);background-color:var(--bs-dropdown-link-hover-bg)}.dropdown-item.active,.dropdown-item:active{color:var(--bs-dropdown-link-active-color);text-decoration:none;background-color:var(--bs-dropdown-link-active-bg)}.dropdown-item.disabled,.dropdown-item:disabled{color:var(--bs-dropdown-link-disabled-color);pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x);margin-bottom:0;font-size:0.875rem;color:var(--bs-dropdown-header-color);white-space:nowrap}.dropdown-item-text{display:block;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);color:var(--bs-dropdown-link-color)}.dropdown-menu-dark{--bs-dropdown-color:#dee2e6;--bs-dropdown-bg:#343a40;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-link-color:#dee2e6;--bs-dropdown-link-hover-color:#fff;--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-link-hover-bg:rgba(255, 255, 255, 0.15);--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-header-color:#adb5bd}.dropdown-group{margin:0.687rem;display:block;position:relative;width:21.562rem;border-radius:0.25rem;background-color:#f8f9fa;border:solid 0.062rem rgba(0, 0, 0, 0.25)}.dropdown-group .dropdown-group-title{display:block;position:relative;font-size:0.875rem;text-align:left;margin:0.937rem 0 1.25rem 0.937rem}.dropdown-group .dropdown-group-content{position:relative;display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;height:11.562rem;margin:0.937rem 0 0.937rem 0.937rem}.dropdown-group .dropdown-group-content>*{margin-bottom:1rem}.dropdown-group-submit{display:flex;justify-content:space-between;margin:0 0.687rem 0 0.687rem}.dropdown-menu{position:absolute;background-color:var(--theme-menu--background);-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);border:var(--theme-menu--border-thickness) solid var(--theme-menu--border--color);border-radius:var(--theme-menu--border-radius);max-width:100vw;padding:0.25rem 0;transition:background-color 150ms;box-shadow:var(--theme-menu--box-shadow)}.dropdown-menu.xl>.dropdown-item{height:2.5rem;line-height:2.187rem}.dropdown-header{display:flex;align-items:center;height:2.5rem;color:var(--theme-menu-header--color);padding:0 1rem}.dropdown-buttons{display:flex;padding:0.25rem 0.5rem}.dropdown-buttons ix-icon-button+ix-icon-button{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.dropdown-item{display:flex;height:2.5rem;position:relative;align-items:center;cursor:pointer;padding:0 2rem;border:1px solid transparent;color:var(--theme-menu-item--color)}.dropdown-item:focus-visible{background-color:var(--theme-menu-item--background);color:var(--theme-menu-item--color)}.dropdown-item:focus-visible{outline:none;background-color:var(--theme-menu-item--background);border-color:#119fff;color:var(--theme-menu-item--color--focus)}.dropdown-item:not(.disabled):not(:disabled){cursor:pointer}.dropdown-item:not(.disabled):not(:disabled):hover{color:var(--theme-menu-item--color--hover);background-color:var(--theme-menu-item--background--hover)}.dropdown-item:not(.disabled):not(:disabled){cursor:pointer}.dropdown-item:not(.disabled):not(:disabled):active{color:var(--theme-menu-item--color--active);background-color:var(--theme-menu-item--background--active)}.dropdown-item.disabled,.dropdown-item:disabled{color:var(--theme-menu-item--color--disabled);background-color:var(--theme-menu-item--background--disabled)}.dropdown-item>a,.dropdown-item a:hover,.dropdown-item a:active{color:var(--theme-color-std-text)}.dropdown-item>.glyph{color:var(--theme-menu-item-icon--color);-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}.dropdown-item>.glyph.disabled{color:var(--color-weak-text)}.dropdown-item>.glyph.glyph-single-check{color:var(--theme-menu-item-icon-check--color)}.dropdown-item>input[type=checkbox]+label{margin-bottom:0px}.dropdown-item>input[type=checkbox]+label::before{margin-right:1rem}.dropdown-divider{border-top:1px solid var(--theme-menu-separator--background);margin:0.25rem 0}button.dropdown-toggle{position:relative;padding-right:1.5rem}button.dropdown-toggle::after{position:absolute;top:45%;right:0.5rem}:host{min-width:0px}:host(.overflow){max-height:50vh;overflow-y:auto}";
9
9
 
10
10
  const Dropdown = class {
11
11
  constructor(hostRef) {
@@ -157,13 +157,30 @@ const Dropdown = class {
157
157
  this.close();
158
158
  }
159
159
  }
160
+ isNestedDropdown(element) {
161
+ return element.closest('ix-dropdown');
162
+ }
163
+ isAnchorSubmenu() {
164
+ var _a;
165
+ const anchor = (_a = this.anchorElement) === null || _a === void 0 ? void 0 : _a.closest('ix-dropdown-item');
166
+ if (!anchor) {
167
+ return false;
168
+ }
169
+ return true;
170
+ }
160
171
  toggle(event) {
161
172
  event === null || event === void 0 ? void 0 : event.preventDefault();
173
+ if (this.isNestedDropdown(event.target)) {
174
+ event === null || event === void 0 ? void 0 : event.stopPropagation();
175
+ }
162
176
  this.show = !this.show;
163
177
  this.showChanged.emit(this.show);
164
178
  }
165
179
  open(event) {
166
180
  event === null || event === void 0 ? void 0 : event.preventDefault();
181
+ if (this.isNestedDropdown(event.target)) {
182
+ event === null || event === void 0 ? void 0 : event.stopPropagation();
183
+ }
167
184
  this.show = true;
168
185
  this.showChanged.emit(true);
169
186
  }
@@ -175,49 +192,57 @@ const Dropdown = class {
175
192
  this.showChanged.emit(false);
176
193
  }
177
194
  async applyDropdownPosition() {
178
- if (this.anchorElement && this.dropdownRef) {
179
- let positionConfig = {
180
- strategy: this.positioningStrategy,
181
- middleware: [],
182
- };
183
- if (this.placement.includes('auto')) {
184
- positionConfig.middleware.push(floatingUi_dom_esm.flip());
185
- }
186
- else {
187
- positionConfig.placement = this.placement;
188
- }
189
- positionConfig.middleware = [
190
- ...positionConfig.middleware,
191
- floatingUi_dom_esm.inline(),
192
- floatingUi_dom_esm.shift(),
193
- ];
194
- if (this.offset) {
195
- positionConfig.middleware.push(floatingUi_dom_esm.offset(this.offset));
196
- }
197
- if (this.autoUpdateCleanup) {
198
- this.autoUpdateCleanup();
199
- this.autoUpdateCleanup = null;
200
- }
201
- this.autoUpdateCleanup = floatingUi_dom_esm.autoUpdate(this.anchorElement, this.dropdownRef, async () => {
202
- const computeResponse = await floatingUi_dom_esm.computePosition(this.anchorElement, this.dropdownRef, positionConfig);
203
- Object.assign(this.dropdownRef.style, {
204
- top: '0',
205
- left: '0',
206
- transform: `translate(${Math.round(computeResponse.x)}px,${Math.round(computeResponse.y)}px)`,
207
- });
208
- if (this.overwriteDropdownStyle) {
209
- const overwriteStyle = await this.overwriteDropdownStyle({
210
- dropdownRef: this.dropdownRef,
211
- triggerRef: this.triggerElement,
212
- });
213
- Object.assign(this.dropdownRef.style, overwriteStyle);
214
- }
215
- }, {
216
- ancestorResize: true,
217
- ancestorScroll: true,
218
- elementResize: true,
219
- });
195
+ if (!this.anchorElement) {
196
+ return;
220
197
  }
198
+ if (!this.dropdownRef) {
199
+ return;
200
+ }
201
+ const isSubmenu = this.isAnchorSubmenu();
202
+ let positionConfig = {
203
+ strategy: this.positioningStrategy,
204
+ middleware: [],
205
+ };
206
+ if (isSubmenu) {
207
+ positionConfig.placement = 'right-start';
208
+ }
209
+ if (this.placement.includes('auto') || isSubmenu) {
210
+ positionConfig.middleware.push(floatingUi_dom_esm.flip());
211
+ }
212
+ else {
213
+ positionConfig.placement = this.placement;
214
+ }
215
+ positionConfig.middleware = [
216
+ ...positionConfig.middleware,
217
+ floatingUi_dom_esm.inline(),
218
+ floatingUi_dom_esm.shift(),
219
+ ];
220
+ if (this.offset) {
221
+ positionConfig.middleware.push(floatingUi_dom_esm.offset(this.offset));
222
+ }
223
+ if (this.autoUpdateCleanup) {
224
+ this.autoUpdateCleanup();
225
+ this.autoUpdateCleanup = null;
226
+ }
227
+ this.autoUpdateCleanup = floatingUi_dom_esm.autoUpdate(this.anchorElement, this.dropdownRef, async () => {
228
+ const computeResponse = await floatingUi_dom_esm.computePosition(this.anchorElement, this.dropdownRef, positionConfig);
229
+ Object.assign(this.dropdownRef.style, {
230
+ top: '0',
231
+ left: '0',
232
+ transform: `translate(${Math.round(computeResponse.x)}px,${Math.round(computeResponse.y)}px)`,
233
+ });
234
+ if (this.overwriteDropdownStyle) {
235
+ const overwriteStyle = await this.overwriteDropdownStyle({
236
+ dropdownRef: this.dropdownRef,
237
+ triggerRef: this.triggerElement,
238
+ });
239
+ Object.assign(this.dropdownRef.style, overwriteStyle);
240
+ }
241
+ }, {
242
+ ancestorResize: true,
243
+ ancestorScroll: true,
244
+ elementResize: true,
245
+ });
221
246
  }
222
247
  async componentDidLoad() {
223
248
  if (this.trigger) {
@@ -242,6 +267,7 @@ const Dropdown = class {
242
267
  return (index.h(index.Host, { ref: (ref) => (this.dropdownRef = ref), class: {
243
268
  'dropdown-menu': true,
244
269
  show: this.show,
270
+ overflow: true,
245
271
  }, style: {
246
272
  margin: '0',
247
273
  minWidth: '0px',
@@ -256,7 +282,7 @@ const Dropdown = class {
256
282
  };
257
283
  Dropdown.style = dropdownCss;
258
284
 
259
- const dropdownItemCss = ".sc-ix-dropdown-item-h{display:block;min-width:10rem}.icon-only.sc-ix-dropdown-item-h{min-width:0}.icon-only.sc-ix-dropdown-item-h .dropdown-item.sc-ix-dropdown-item>.glyph.sc-ix-dropdown-item{-webkit-margin-end:0;margin-inline-end:0}.icon-only.sc-ix-dropdown-item-h .dropdown-item.sc-ix-dropdown-item{padding:0.25rem 0.5rem}.icon-only.sc-ix-dropdown-item-h .dropdown-item.sc-ix-dropdown-item:not(.disabled):not(:disabled):focus-visible{border-color:#199fff}.sc-ix-dropdown-item-h .checkmark.sc-ix-dropdown-item{position:absolute;left:0.5rem}.checked.sc-ix-dropdown-item-h{background-color:var(--theme-select-list-item--background--selected)}.sc-ix-dropdown-item-h .label.sc-ix-dropdown-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.disabled.sc-ix-dropdown-item-h{pointer-events:none}.sc-ix-dropdown-item-s>ix-icon{-webkit-margin-start:auto;margin-inline-start:auto}";
285
+ const dropdownItemCss = ".sc-ix-dropdown-item-h{display:block;min-width:10rem}.icon-only.sc-ix-dropdown-item-h{min-width:0}.icon-only.sc-ix-dropdown-item-h .dropdown-item.sc-ix-dropdown-item>.glyph.sc-ix-dropdown-item{-webkit-margin-end:0;margin-inline-end:0}.icon-only.sc-ix-dropdown-item-h .dropdown-item.sc-ix-dropdown-item{padding:0.25rem 0.5rem}.icon-only.sc-ix-dropdown-item-h .dropdown-item.sc-ix-dropdown-item:not(.disabled):not(:disabled):focus-visible{border-color:#199fff}.sc-ix-dropdown-item-h .sc-ix-dropdown-item:focus{background-color:transparent;color:var(--theme-menu-item--color)}.sc-ix-dropdown-item-h .checkmark.sc-ix-dropdown-item{position:absolute;left:0.5rem}.checked.sc-ix-dropdown-item-h{background-color:var(--theme-select-list-item--background--selected)}.sc-ix-dropdown-item-h .label.sc-ix-dropdown-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.disabled.sc-ix-dropdown-item-h{pointer-events:none}.sc-ix-dropdown-item-s>ix-icon{-webkit-margin-start:auto;margin-inline-start:auto}";
260
286
 
261
287
  const DropdownItem = class {
262
288
  constructor(hostRef) {
@@ -518,6 +518,7 @@ const Tree = class {
518
518
  this.toggleListener = new Map();
519
519
  this.itemClickListener = new Map();
520
520
  this.updates = new Map();
521
+ this.hasFirstRender = false;
521
522
  this.root = undefined;
522
523
  this.model = undefined;
523
524
  this.renderItem = undefined;
@@ -525,6 +526,19 @@ const Tree = class {
525
526
  }
526
527
  getVirtualizerOptions() {
527
528
  const list = this.buildTreeList(this.model[this.root]);
529
+ let setToggleListener = (item, el, index) => {
530
+ if (item.hasChildren && !this.toggleListener.has(el)) {
531
+ const toggleCallback = (e) => {
532
+ e.preventDefault();
533
+ e.stopPropagation();
534
+ const context = this.getContext(list[index].id);
535
+ context.isExpanded = !context.isExpanded;
536
+ this.setContext(item.id, context);
537
+ };
538
+ el.addEventListener('toggle', toggleCallback);
539
+ this.toggleListener.set(el, toggleCallback);
540
+ }
541
+ };
528
542
  return {
529
543
  itemHeight: 32,
530
544
  total: list.length,
@@ -535,6 +549,7 @@ const Tree = class {
535
549
  if (renderedTreeItem) {
536
550
  renderedTreeItem.hasChildren = item.hasChildren;
537
551
  renderedTreeItem.context = Object.assign({}, context);
552
+ setToggleListener(item, renderedTreeItem, index);
538
553
  if (this.updates.has(item.id)) {
539
554
  const doUpdate = this.updates.get(item.id);
540
555
  doUpdate(item, Object.assign({}, this.context));
@@ -567,17 +582,7 @@ const Tree = class {
567
582
  el.addEventListener('itemClick', itemClickCallback);
568
583
  this.itemClickListener.set(el, itemClickCallback);
569
584
  }
570
- if (item.hasChildren && !this.toggleListener.has(el)) {
571
- const toggleCallback = (e) => {
572
- e.preventDefault();
573
- e.stopPropagation();
574
- const context = this.getContext(list[index].id);
575
- context.isExpanded = !context.isExpanded;
576
- this.setContext(item.id, context);
577
- };
578
- el.addEventListener('toggle', toggleCallback);
579
- this.toggleListener.set(el, toggleCallback);
580
- }
585
+ setToggleListener(item, el, index);
581
586
  return el;
582
587
  },
583
588
  };
@@ -636,6 +641,7 @@ const Tree = class {
636
641
  });
637
642
  }
638
643
  componentWillRender() {
644
+ this.hasFirstRender = true;
639
645
  if (this.isListInitialized()) {
640
646
  this.refreshList();
641
647
  }
@@ -648,7 +654,7 @@ const Tree = class {
648
654
  this.observer.disconnect();
649
655
  }
650
656
  modelChange() {
651
- if (!this.isListInitialized()) {
657
+ if (this.hasFirstRender && !this.isListInitialized()) {
652
658
  this.initList();
653
659
  }
654
660
  }
@@ -8,9 +8,8 @@
8
8
  */
9
9
  :host {
10
10
  display: block;
11
- position: initial;
12
- }
13
- :host .line {
14
- width: auto;
11
+ position: relative;
12
+ width: 100%;
15
13
  border: 0.0625rem solid var(--theme-color-x-weak-bdr);
14
+ margin: 0.25rem 0px;
16
15
  }
@@ -12,7 +12,7 @@ import { h, Host } from '@stencil/core';
12
12
  */
13
13
  export class Divider {
14
14
  render() {
15
- return (h(Host, null, h("div", { class: "line" })));
15
+ return h(Host, null);
16
16
  }
17
17
  static get is() { return "ix-divider"; }
18
18
  static get encapsulation() { return "shadow"; }
@@ -371,18 +371,6 @@
371
371
  * This source code is licensed under the MIT license found in the
372
372
  * LICENSE file in the root directory of this source tree.
373
373
  */
374
- .dropup .btn,
375
- .dropright .btn,
376
- .dropdown .btn,
377
- .dropleft .btn {
378
- overflow: hidden;
379
- text-overflow: ellipsis;
380
- white-space: nowrap;
381
- display: inline-block;
382
- text-align: left;
383
- width: 100%;
384
- }
385
-
386
374
  .dropdown-group {
387
375
  margin: 0.687rem;
388
376
  display: block;
@@ -420,8 +408,6 @@
420
408
 
421
409
  .dropdown-menu {
422
410
  position: absolute;
423
- max-height: 50vh;
424
- overflow-y: auto;
425
411
  background-color: var(--theme-menu--background);
426
412
  -webkit-font-smoothing: antialiased;
427
413
  -moz-osx-font-smooting: grayscale;
@@ -539,4 +525,9 @@ button.dropdown-toggle::after {
539
525
 
540
526
  :host {
541
527
  min-width: 0px;
528
+ }
529
+
530
+ :host(.overflow) {
531
+ max-height: 50vh;
532
+ overflow-y: auto;
542
533
  }
@@ -156,13 +156,30 @@ export class Dropdown {
156
156
  this.close();
157
157
  }
158
158
  }
159
+ isNestedDropdown(element) {
160
+ return element.closest('ix-dropdown');
161
+ }
162
+ isAnchorSubmenu() {
163
+ var _a;
164
+ const anchor = (_a = this.anchorElement) === null || _a === void 0 ? void 0 : _a.closest('ix-dropdown-item');
165
+ if (!anchor) {
166
+ return false;
167
+ }
168
+ return true;
169
+ }
159
170
  toggle(event) {
160
171
  event === null || event === void 0 ? void 0 : event.preventDefault();
172
+ if (this.isNestedDropdown(event.target)) {
173
+ event === null || event === void 0 ? void 0 : event.stopPropagation();
174
+ }
161
175
  this.show = !this.show;
162
176
  this.showChanged.emit(this.show);
163
177
  }
164
178
  open(event) {
165
179
  event === null || event === void 0 ? void 0 : event.preventDefault();
180
+ if (this.isNestedDropdown(event.target)) {
181
+ event === null || event === void 0 ? void 0 : event.stopPropagation();
182
+ }
166
183
  this.show = true;
167
184
  this.showChanged.emit(true);
168
185
  }
@@ -174,49 +191,57 @@ export class Dropdown {
174
191
  this.showChanged.emit(false);
175
192
  }
176
193
  async applyDropdownPosition() {
177
- if (this.anchorElement && this.dropdownRef) {
178
- let positionConfig = {
179
- strategy: this.positioningStrategy,
180
- middleware: [],
181
- };
182
- if (this.placement.includes('auto')) {
183
- positionConfig.middleware.push(flip());
184
- }
185
- else {
186
- positionConfig.placement = this.placement;
187
- }
188
- positionConfig.middleware = [
189
- ...positionConfig.middleware,
190
- inline(),
191
- shift(),
192
- ];
193
- if (this.offset) {
194
- positionConfig.middleware.push(offset(this.offset));
195
- }
196
- if (this.autoUpdateCleanup) {
197
- this.autoUpdateCleanup();
198
- this.autoUpdateCleanup = null;
199
- }
200
- this.autoUpdateCleanup = autoUpdate(this.anchorElement, this.dropdownRef, async () => {
201
- const computeResponse = await computePosition(this.anchorElement, this.dropdownRef, positionConfig);
202
- Object.assign(this.dropdownRef.style, {
203
- top: '0',
204
- left: '0',
205
- transform: `translate(${Math.round(computeResponse.x)}px,${Math.round(computeResponse.y)}px)`,
206
- });
207
- if (this.overwriteDropdownStyle) {
208
- const overwriteStyle = await this.overwriteDropdownStyle({
209
- dropdownRef: this.dropdownRef,
210
- triggerRef: this.triggerElement,
211
- });
212
- Object.assign(this.dropdownRef.style, overwriteStyle);
213
- }
214
- }, {
215
- ancestorResize: true,
216
- ancestorScroll: true,
217
- elementResize: true,
218
- });
194
+ if (!this.anchorElement) {
195
+ return;
219
196
  }
197
+ if (!this.dropdownRef) {
198
+ return;
199
+ }
200
+ const isSubmenu = this.isAnchorSubmenu();
201
+ let positionConfig = {
202
+ strategy: this.positioningStrategy,
203
+ middleware: [],
204
+ };
205
+ if (isSubmenu) {
206
+ positionConfig.placement = 'right-start';
207
+ }
208
+ if (this.placement.includes('auto') || isSubmenu) {
209
+ positionConfig.middleware.push(flip());
210
+ }
211
+ else {
212
+ positionConfig.placement = this.placement;
213
+ }
214
+ positionConfig.middleware = [
215
+ ...positionConfig.middleware,
216
+ inline(),
217
+ shift(),
218
+ ];
219
+ if (this.offset) {
220
+ positionConfig.middleware.push(offset(this.offset));
221
+ }
222
+ if (this.autoUpdateCleanup) {
223
+ this.autoUpdateCleanup();
224
+ this.autoUpdateCleanup = null;
225
+ }
226
+ this.autoUpdateCleanup = autoUpdate(this.anchorElement, this.dropdownRef, async () => {
227
+ const computeResponse = await computePosition(this.anchorElement, this.dropdownRef, positionConfig);
228
+ Object.assign(this.dropdownRef.style, {
229
+ top: '0',
230
+ left: '0',
231
+ transform: `translate(${Math.round(computeResponse.x)}px,${Math.round(computeResponse.y)}px)`,
232
+ });
233
+ if (this.overwriteDropdownStyle) {
234
+ const overwriteStyle = await this.overwriteDropdownStyle({
235
+ dropdownRef: this.dropdownRef,
236
+ triggerRef: this.triggerElement,
237
+ });
238
+ Object.assign(this.dropdownRef.style, overwriteStyle);
239
+ }
240
+ }, {
241
+ ancestorResize: true,
242
+ ancestorScroll: true,
243
+ elementResize: true,
244
+ });
220
245
  }
221
246
  async componentDidLoad() {
222
247
  if (this.trigger) {
@@ -241,6 +266,7 @@ export class Dropdown {
241
266
  return (h(Host, { ref: (ref) => (this.dropdownRef = ref), class: {
242
267
  'dropdown-menu': true,
243
268
  show: this.show,
269
+ overflow: true,
244
270
  }, style: {
245
271
  margin: '0',
246
272
  minWidth: '0px',
@@ -27,6 +27,9 @@
27
27
  :host.disabled {
28
28
  pointer-events: none;
29
29
  }
30
+ :host .hide {
31
+ display: none;
32
+ }
30
33
  :host .dropdown-button {
31
34
  display: block;
32
35
  position: relative;
@@ -17,7 +17,7 @@ export class DropdownButton {
17
17
  this.ghost = false;
18
18
  this.active = false;
19
19
  this.disabled = false;
20
- this.label = '';
20
+ this.label = undefined;
21
21
  this.icon = undefined;
22
22
  this.dropdownAnchor = undefined;
23
23
  }
@@ -37,7 +37,7 @@ export class DropdownButton {
37
37
  disabled: this.disabled,
38
38
  } }, h("div", { class: "dropdown-button", ref: (ref) => {
39
39
  this.dropdownAnchor = ref;
40
- } }, this.label !== '' ? (h("ix-button", { variant: this.variant, outline: this.outline, ghost: this.ghost, disabled: this.disabled }, h("ix-icon", { name: this.icon, size: "24", class: { hide: this.icon === '' || this.icon === undefined } }), h("div", { class: 'button-label' }, this.label), h("ix-icon", { name: "chevron-down-small", size: "24" }))) : (h("div", null, h("ix-icon-button", { icon: this.icon, variant: this.variant, outline: this.outline, ghost: this.ghost, disabled: this.disabled }), this.getTriangle()))), h("ix-dropdown", { class: "dropdown", trigger: this.dropdownAnchor, placement: "bottom", positioningStrategy: 'fixed', adjustDropdownWidthToReferenceWidth: true }, h("slot", null))));
40
+ } }, this.label ? (h("ix-button", { variant: this.variant, outline: this.outline, ghost: this.ghost, disabled: this.disabled }, h("ix-icon", { name: this.icon, size: "24", class: { hide: this.icon === '' || this.icon === undefined } }), h("div", { class: 'button-label' }, this.label), h("ix-icon", { name: "chevron-down-small", size: "24" }))) : (h("div", null, h("ix-icon-button", { icon: this.icon, variant: this.variant, outline: this.outline, ghost: this.ghost, disabled: this.disabled }), this.getTriangle()))), h("ix-dropdown", { class: "dropdown", trigger: this.dropdownAnchor, placement: "bottom", positioningStrategy: 'fixed', adjustDropdownWidthToReferenceWidth: true }, h("slot", null))));
41
41
  }
42
42
  static get is() { return "ix-dropdown-button"; }
43
43
  static get encapsulation() { return "scoped"; }
@@ -70,7 +70,7 @@ export class DropdownButton {
70
70
  "optional": false,
71
71
  "docs": {
72
72
  "tags": [],
73
- "text": "Button varaint"
73
+ "text": "Button variant"
74
74
  },
75
75
  "attribute": "variant",
76
76
  "reflect": false,
@@ -163,8 +163,7 @@ export class DropdownButton {
163
163
  "text": "Set label"
164
164
  },
165
165
  "attribute": "label",
166
- "reflect": false,
167
- "defaultValue": "''"
166
+ "reflect": false
168
167
  },
169
168
  "icon": {
170
169
  "type": "string",
@@ -51,6 +51,10 @@
51
51
  :host.icon-only .dropdown-item:not(.disabled):not(:disabled):focus-visible {
52
52
  border-color: #199fff;
53
53
  }
54
+ :host :focus {
55
+ background-color: transparent;
56
+ color: var(--theme-menu-item--color);
57
+ }
54
58
  :host .checkmark {
55
59
  position: absolute;
56
60
  left: 0.5rem;
@@ -14,6 +14,7 @@ export class Tree {
14
14
  this.toggleListener = new Map();
15
15
  this.itemClickListener = new Map();
16
16
  this.updates = new Map();
17
+ this.hasFirstRender = false;
17
18
  this.root = undefined;
18
19
  this.model = undefined;
19
20
  this.renderItem = undefined;
@@ -21,6 +22,19 @@ export class Tree {
21
22
  }
22
23
  getVirtualizerOptions() {
23
24
  const list = this.buildTreeList(this.model[this.root]);
25
+ let setToggleListener = (item, el, index) => {
26
+ if (item.hasChildren && !this.toggleListener.has(el)) {
27
+ const toggleCallback = (e) => {
28
+ e.preventDefault();
29
+ e.stopPropagation();
30
+ const context = this.getContext(list[index].id);
31
+ context.isExpanded = !context.isExpanded;
32
+ this.setContext(item.id, context);
33
+ };
34
+ el.addEventListener('toggle', toggleCallback);
35
+ this.toggleListener.set(el, toggleCallback);
36
+ }
37
+ };
24
38
  return {
25
39
  itemHeight: 32,
26
40
  total: list.length,
@@ -31,6 +45,7 @@ export class Tree {
31
45
  if (renderedTreeItem) {
32
46
  renderedTreeItem.hasChildren = item.hasChildren;
33
47
  renderedTreeItem.context = Object.assign({}, context);
48
+ setToggleListener(item, renderedTreeItem, index);
34
49
  if (this.updates.has(item.id)) {
35
50
  const doUpdate = this.updates.get(item.id);
36
51
  doUpdate(item, Object.assign({}, this.context));
@@ -63,17 +78,7 @@ export class Tree {
63
78
  el.addEventListener('itemClick', itemClickCallback);
64
79
  this.itemClickListener.set(el, itemClickCallback);
65
80
  }
66
- if (item.hasChildren && !this.toggleListener.has(el)) {
67
- const toggleCallback = (e) => {
68
- e.preventDefault();
69
- e.stopPropagation();
70
- const context = this.getContext(list[index].id);
71
- context.isExpanded = !context.isExpanded;
72
- this.setContext(item.id, context);
73
- };
74
- el.addEventListener('toggle', toggleCallback);
75
- this.toggleListener.set(el, toggleCallback);
76
- }
81
+ setToggleListener(item, el, index);
77
82
  return el;
78
83
  },
79
84
  };
@@ -132,6 +137,7 @@ export class Tree {
132
137
  });
133
138
  }
134
139
  componentWillRender() {
140
+ this.hasFirstRender = true;
135
141
  if (this.isListInitialized()) {
136
142
  this.refreshList();
137
143
  }
@@ -144,7 +150,7 @@ export class Tree {
144
150
  this.observer.disconnect();
145
151
  }
146
152
  modelChange() {
147
- if (!this.isListInitialized()) {
153
+ if (this.hasFirstRender && !this.isListInitialized()) {
148
154
  this.initList();
149
155
  }
150
156
  }
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { d as defineCustomElement$1 } from './icon.js';
3
3
 
4
- const dropdownItemCss = ".sc-ix-dropdown-item-h{display:block;min-width:10rem}.icon-only.sc-ix-dropdown-item-h{min-width:0}.icon-only.sc-ix-dropdown-item-h .dropdown-item.sc-ix-dropdown-item>.glyph.sc-ix-dropdown-item{-webkit-margin-end:0;margin-inline-end:0}.icon-only.sc-ix-dropdown-item-h .dropdown-item.sc-ix-dropdown-item{padding:0.25rem 0.5rem}.icon-only.sc-ix-dropdown-item-h .dropdown-item.sc-ix-dropdown-item:not(.disabled):not(:disabled):focus-visible{border-color:#199fff}.sc-ix-dropdown-item-h .checkmark.sc-ix-dropdown-item{position:absolute;left:0.5rem}.checked.sc-ix-dropdown-item-h{background-color:var(--theme-select-list-item--background--selected)}.sc-ix-dropdown-item-h .label.sc-ix-dropdown-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.disabled.sc-ix-dropdown-item-h{pointer-events:none}.sc-ix-dropdown-item-s>ix-icon{-webkit-margin-start:auto;margin-inline-start:auto}";
4
+ const dropdownItemCss = ".sc-ix-dropdown-item-h{display:block;min-width:10rem}.icon-only.sc-ix-dropdown-item-h{min-width:0}.icon-only.sc-ix-dropdown-item-h .dropdown-item.sc-ix-dropdown-item>.glyph.sc-ix-dropdown-item{-webkit-margin-end:0;margin-inline-end:0}.icon-only.sc-ix-dropdown-item-h .dropdown-item.sc-ix-dropdown-item{padding:0.25rem 0.5rem}.icon-only.sc-ix-dropdown-item-h .dropdown-item.sc-ix-dropdown-item:not(.disabled):not(:disabled):focus-visible{border-color:#199fff}.sc-ix-dropdown-item-h .sc-ix-dropdown-item:focus{background-color:transparent;color:var(--theme-menu-item--color)}.sc-ix-dropdown-item-h .checkmark.sc-ix-dropdown-item{position:absolute;left:0.5rem}.checked.sc-ix-dropdown-item-h{background-color:var(--theme-select-list-item--background--selected)}.sc-ix-dropdown-item-h .label.sc-ix-dropdown-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.disabled.sc-ix-dropdown-item-h{pointer-events:none}.sc-ix-dropdown-item-s>ix-icon{-webkit-margin-start:auto;margin-inline-start:auto}";
5
5
 
6
6
  const DropdownItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
7
  constructor() {