@siemens/ix 1.4.0-beta.1 → 1.4.0-beta.3

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 (95) hide show
  1. package/dist/cjs/{floating-ui.dom.esm-9a5d67b2.js → floating-ui.dom.esm-01fe5abe.js} +137 -0
  2. package/dist/cjs/ix-burger-menu.cjs.entry.js +2 -2
  3. package/dist/cjs/ix-divider.cjs.entry.js +2 -2
  4. package/dist/cjs/ix-dropdown-button.cjs.entry.js +3 -3
  5. package/dist/cjs/ix-dropdown_2.cjs.entry.js +79 -42
  6. package/dist/cjs/ix-event-list_2.cjs.entry.js +1 -1
  7. package/dist/cjs/ix-group_3.cjs.entry.js +1 -1
  8. package/dist/cjs/ix-select_2.cjs.entry.js +6 -4
  9. package/dist/cjs/ix-tooltip.cjs.entry.js +1 -1
  10. package/dist/cjs/ix-tree_2.cjs.entry.js +3 -1
  11. package/dist/cjs/ix-validation-tooltip.cjs.entry.js +12 -3
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/cjs/my-component.cjs.entry.js +1 -1
  14. package/dist/cjs/siemens-ix.cjs.js +1 -1
  15. package/dist/collection/components/date-picker/date-picker.js +1 -1
  16. package/dist/collection/components/divider/divider.css +3 -4
  17. package/dist/collection/components/divider/divider.js +1 -1
  18. package/dist/collection/components/dropdown/dropdown.css +8 -2
  19. package/dist/collection/components/dropdown/dropdown.js +106 -40
  20. package/dist/collection/components/dropdown-button/dropdown-button.css +3 -0
  21. package/dist/collection/components/dropdown-button/dropdown-button.js +4 -5
  22. package/dist/collection/components/dropdown-item/dropdown-item.css +7 -0
  23. package/dist/collection/components/dropdown-item/dropdown-item.js +2 -0
  24. package/dist/collection/components/event-list-item/event-list-item.css +17 -20
  25. package/dist/collection/components/group/group.css +7 -8
  26. package/dist/collection/components/menu/burger-menu.css +16 -29
  27. package/dist/collection/components/menu/burger-menu.js +1 -1
  28. package/dist/collection/components/my-component/my-component.css +1 -1
  29. package/dist/collection/components/select/select.js +6 -4
  30. package/dist/collection/components/tooltip/tooltip.js +1 -1
  31. package/dist/collection/components/tree/tree.js +3 -1
  32. package/dist/components/burger-menu.js +2 -2
  33. package/dist/components/dropdown-item.js +3 -1
  34. package/dist/components/dropdown.js +77 -41
  35. package/dist/components/floating-ui.dom.esm.js +137 -1
  36. package/dist/components/ix-divider.js +2 -2
  37. package/dist/components/ix-dropdown-button.js +3 -3
  38. package/dist/components/ix-event-list-item.js +1 -1
  39. package/dist/components/ix-group.js +1 -1
  40. package/dist/components/ix-select.js +6 -4
  41. package/dist/components/ix-tree.js +3 -1
  42. package/dist/components/ix-validation-tooltip.js +10 -1
  43. package/dist/components/my-component.js +1 -1
  44. package/dist/esm/{floating-ui.dom.esm-e13c649f.js → floating-ui.dom.esm-3130eda0.js} +137 -1
  45. package/dist/esm/ix-burger-menu.entry.js +2 -2
  46. package/dist/esm/ix-divider.entry.js +2 -2
  47. package/dist/esm/ix-dropdown-button.entry.js +3 -3
  48. package/dist/esm/ix-dropdown_2.entry.js +79 -42
  49. package/dist/esm/ix-event-list_2.entry.js +1 -1
  50. package/dist/esm/ix-group_3.entry.js +1 -1
  51. package/dist/esm/ix-select_2.entry.js +6 -4
  52. package/dist/esm/ix-tooltip.entry.js +1 -1
  53. package/dist/esm/ix-tree_2.entry.js +3 -1
  54. package/dist/esm/ix-validation-tooltip.entry.js +11 -2
  55. package/dist/esm/loader.js +1 -1
  56. package/dist/esm/my-component.entry.js +1 -1
  57. package/dist/esm/siemens-ix.js +1 -1
  58. package/dist/siemens-ix/{p-2e55e255.entry.js → p-122c7f57.entry.js} +1 -1
  59. package/dist/siemens-ix/p-128cde2b.entry.js +1 -0
  60. package/dist/siemens-ix/p-20f75208.entry.js +1 -0
  61. package/dist/siemens-ix/p-4da15801.entry.js +1 -0
  62. package/dist/siemens-ix/{p-e48e659d.entry.js → p-519b13aa.entry.js} +1 -1
  63. package/dist/siemens-ix/p-622fb593.entry.js +1 -0
  64. package/dist/siemens-ix/p-68ec0b51.entry.js +1 -0
  65. package/dist/siemens-ix/p-6b463b40.entry.js +1 -0
  66. package/dist/siemens-ix/p-80fe33d1.entry.js +1 -0
  67. package/dist/siemens-ix/p-d1a8d791.entry.js +1 -0
  68. package/dist/siemens-ix/{p-404e81d2.entry.js → p-f0289f67.entry.js} +1 -1
  69. package/dist/siemens-ix/p-f34a16c6.js +1 -0
  70. package/dist/siemens-ix/siemens-ix.css +7 -7
  71. package/dist/siemens-ix/siemens-ix.esm.js +1 -1
  72. package/dist/types/components/date-picker/date-picker.d.ts +1 -1
  73. package/dist/types/components/dropdown/dropdown.d.ts +9 -0
  74. package/dist/types/components/dropdown-button/dropdown-button.d.ts +1 -1
  75. package/dist/types/components/tooltip/tooltip.d.ts +1 -1
  76. package/dist/types/components/tree/tree.d.ts +1 -0
  77. package/dist/types/components.d.ts +7 -3
  78. package/package.json +1 -1
  79. package/scss/components/_dropdown.scss +4 -3
  80. package/scss/components/_forms.scss +1 -1
  81. package/scss/theme/classic-dark/_boxShadow.scss +1 -1
  82. package/scss/theme/classic-light/_boxShadow.scss +1 -1
  83. package/dist/cjs/alignment-51e20690.js +0 -13
  84. package/dist/components/alignment.js +0 -11
  85. package/dist/esm/alignment-6490c552.js +0 -11
  86. package/dist/siemens-ix/p-0bd6554e.entry.js +0 -1
  87. package/dist/siemens-ix/p-0bf4a256.entry.js +0 -1
  88. package/dist/siemens-ix/p-4251a6dd.entry.js +0 -1
  89. package/dist/siemens-ix/p-6637ae65.entry.js +0 -1
  90. package/dist/siemens-ix/p-70be8cb8.entry.js +0 -1
  91. package/dist/siemens-ix/p-9269d0e8.entry.js +0 -1
  92. package/dist/siemens-ix/p-b5599b0b.entry.js +0 -1
  93. package/dist/siemens-ix/p-cb4269bf.js +0 -1
  94. package/dist/siemens-ix/p-e4bda8e7.entry.js +0 -1
  95. package/dist/siemens-ix/p-f7b5b66f.js +0 -1
@@ -57,7 +57,6 @@
57
57
  min-height: 4rem;
58
58
  max-height: 4rem;
59
59
  border-radius: 0.25rem;
60
- border: var(--theme-std-bdr-1);
61
60
  display: flex;
62
61
  background-color: var(--theme-group-item--background);
63
62
  border: 1px solid var(--theme-group-item--border-color);
@@ -83,6 +82,13 @@
83
82
  border-radius: var(--theme-group--border-radius--focus);
84
83
  outline: none;
85
84
  }
85
+ :host .group-header.selected {
86
+ border: var(--theme-primary-bdr-2);
87
+ background-color: var(--theme-group-item--background--selected);
88
+ }
89
+ :host .group-header .group-header-selection-indicator {
90
+ background-color: var(--theme-color-input--focus);
91
+ }
86
92
  :host .group-header-clickable {
87
93
  overflow: hidden;
88
94
  text-overflow: ellipsis;
@@ -147,13 +153,6 @@
147
153
  display: flex;
148
154
  flex-direction: column;
149
155
  }
150
- :host .group-header.selected {
151
- border: var(--theme-primary-bdr-2);
152
- background-color: var(--theme-group-item--background--selected);
153
- }
154
- :host .group-header.selected .group-header-selection-indicator {
155
- background-color: var(--theme-color-input--focus);
156
- }
157
156
  :host .footer {
158
157
  height: auto;
159
158
  min-height: 0;
@@ -36,26 +36,14 @@
36
36
  }
37
37
  :host svg {
38
38
  display: inline-block;
39
- fill: var(--theme-menu-btn--color);
40
39
  position: relative;
41
40
  }
42
41
  :host .line {
43
- fill: none;
44
- stroke: var(--theme-menu-btn--color);
45
- stroke-width: 6;
46
- transition: stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1), stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
47
- }
48
- :host .line1 {
49
- stroke-dasharray: 60 207;
50
- stroke-width: 6;
51
- }
52
- :host .line2 {
53
- stroke-dasharray: 60 60;
54
- stroke-width: 6;
55
- }
56
- :host .line3 {
57
- stroke-dasharray: 60 207;
58
- stroke-width: 6;
42
+ fill: var(--theme-menu-btn--color);
43
+ opacity: 1;
44
+ x: 2px;
45
+ transition: x 0.075s ease-in 0.15s, transform 0.075s ease-in-out 0.075s, y 0.075s ease-in-out, opacity 0.075s linear 0.075s;
46
+ transform-origin: center;
59
47
  }
60
48
 
61
49
  :host(:hover) {
@@ -68,18 +56,17 @@
68
56
  border-radius: var(--theme-btn--border-radius);
69
57
  }
70
58
 
71
- :host(.expanded) .line1 {
72
- stroke-dasharray: 90 207;
73
- stroke-dashoffset: -134;
74
- stroke-width: 6;
59
+ :host(.expanded) svg .line-1 {
60
+ opacity: 1;
61
+ transform: rotate(-45deg);
62
+ y: 11px;
75
63
  }
76
- :host(.expanded) .line2 {
77
- stroke-dasharray: 1 60;
78
- stroke-dashoffset: -30;
79
- stroke-width: 6;
64
+ :host(.expanded) svg .line-2 {
65
+ opacity: 0;
66
+ x: 9;
80
67
  }
81
- :host(.expanded) .line3 {
82
- stroke-dasharray: 90 207;
83
- stroke-dashoffset: -134;
84
- stroke-width: 6;
68
+ :host(.expanded) svg .line-3 {
69
+ opacity: 1;
70
+ transform: rotate(45deg);
71
+ y: 11px;
85
72
  }
@@ -25,7 +25,7 @@ export class BurgerMenu {
25
25
  render() {
26
26
  return (h(Host, { class: {
27
27
  expanded: this.expanded,
28
- } }, h("svg", { width: "32", height: "32", viewBox: "0 0 100 100" }, h("path", { class: "line line1", d: "M 20,29.000046 H 80.000231 C 80.000231,29.000046 94.498839,28.817352 94.532987,66.711331 94.543142,77.980673 90.966081,81.670246 85.259173,81.668997 79.552261,81.667751 75.000211,74.999942 75.000211,74.999942 L 25.000021,25.000058" }), h("path", { class: "line line2", d: "M 20,50 H 60" }), h("path", { class: "line line3", d: "M 20,70.999954 H 80.000231 C 80.000231,70.999954 94.498839,71.182648 94.532987,33.288669 94.543142,22.019327 90.966081,18.329754 85.259173,18.331003 79.552261,18.332249 75.000211,25.000058 75.000211,25.000058 L 25.000021,74.999942" }))));
28
+ } }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24", height: "24" }, h("rect", { class: "line line-1", x: "2", y: "5", width: "20", height: "2" }), h("rect", { class: "line line-2", x: "2", y: "11", width: "13", height: "2" }), h("rect", { class: "line line-3", x: "2", y: "17", width: "20", height: "2" }))));
29
29
  }
30
30
  static get is() { return "ix-burger-menu"; }
31
31
  static get encapsulation() { return "shadow"; }
@@ -19,7 +19,7 @@
19
19
  /* Line heights */
20
20
  /* Animation timings */
21
21
  :host {
22
- display: flex;
22
+ display: block;
23
23
  position: relative;
24
24
  width: 100vw;
25
25
  height: 100vh;
@@ -248,13 +248,15 @@ export class Select {
248
248
  } })) : null, this.disabled || this.readonly ? null : (h("div", { class: "chevron-down-container", ref: (ref) => {
249
249
  if (this.editable)
250
250
  this.dropdownWrapperRef = ref;
251
- } }, h("ix-icon", { class: "chevron", name: "chevron-down-small" }))))))), h("ix-dropdown", { ref: (ref) => (this.dropdownRef = ref), show: this.dropdownShow, style: {
252
- width: '100%',
253
- }, class: {
251
+ } }, h("ix-icon", { class: "chevron", name: "chevron-down-small" }))))))), h("ix-dropdown", { ref: (ref) => (this.dropdownRef = ref), show: this.dropdownShow, class: {
254
252
  'd-none': this.disabled ||
255
253
  this.readonly ||
256
254
  (this.isDropdownEmpty && !this.editable),
257
- }, anchor: this.dropdownAnchor, trigger: this.dropdownWrapperRef, onShowChanged: (e) => this.dropdownVisibilityChanged(e), placement: "bottom-start", positioningStrategy: 'absolute' }, h("div", { class: "select-list-header", title: this.i18nSelectListHeader }, this.i18nSelectListHeader), h("slot", null), h("div", { ref: (ref) => (this.addItemRef = ref), class: "d-contents" }), this.itemExists(this.inputFilterText) ? ('') : (h("ix-dropdown-item", { "data-testid": "add-item", icon: "plus", class: {
255
+ }, anchor: this.dropdownAnchor, trigger: this.dropdownWrapperRef, onShowChanged: (e) => this.dropdownVisibilityChanged(e), placement: "auto-start", overwriteDropdownStyle: async (delegateConfig) => {
256
+ return {
257
+ width: `${delegateConfig.triggerRef.clientWidth}px`,
258
+ };
259
+ } }, h("div", { class: "select-list-header", title: this.i18nSelectListHeader }, this.i18nSelectListHeader), h("slot", null), h("div", { ref: (ref) => (this.addItemRef = ref), class: "d-contents" }), this.itemExists(this.inputFilterText) ? ('') : (h("ix-dropdown-item", { "data-testid": "add-item", icon: "plus", class: {
258
260
  'add-item': true,
259
261
  'd-none': !(this.editable && this.inputFilterText),
260
262
  }, label: this.inputFilterText, onItemClick: (e) => {
@@ -12,7 +12,7 @@ import { h, Host } from '@stencil/core';
12
12
  * @slot title-icon - Icon of tooltip title
13
13
  * @slot title-content - Content of tooltip title
14
14
  *
15
- * @since 1.3.0
15
+ * @since 1.4.0
16
16
  */
17
17
  export class Tooltip {
18
18
  constructor() {
@@ -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;
@@ -132,6 +133,7 @@ export class Tree {
132
133
  });
133
134
  }
134
135
  componentWillRender() {
136
+ this.hasFirstRender = true;
135
137
  if (this.isListInitialized()) {
136
138
  this.refreshList();
137
139
  }
@@ -144,7 +146,7 @@ export class Tree {
144
146
  this.observer.disconnect();
145
147
  }
146
148
  modelChange() {
147
- if (!this.isListInitialized()) {
149
+ if (this.hasFirstRender && !this.isListInitialized()) {
148
150
  this.initList();
149
151
  }
150
152
  }
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
 
3
- const burgerMenuCss = ":host{display:flex;justify-content:center;align-items:center;height:2rem;width:2.5rem;border-radius:var(--theme-btn--border-radius)}:host svg{display:inline-block;fill:var(--theme-menu-btn--color);position:relative}:host .line{fill:none;stroke:var(--theme-menu-btn--color);stroke-width:6;transition:stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1), stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1)}:host .line1{stroke-dasharray:60 207;stroke-width:6}:host .line2{stroke-dasharray:60 60;stroke-width:6}:host .line3{stroke-dasharray:60 207;stroke-width:6}:host(:hover){background-color:var(--theme-menu-btn--background--hover);border-radius:var(--theme-btn--border-radius)}:host(:active){background-color:var(--theme-menu-btn--background--active);border-radius:var(--theme-btn--border-radius)}:host(.expanded) .line1{stroke-dasharray:90 207;stroke-dashoffset:-134;stroke-width:6}:host(.expanded) .line2{stroke-dasharray:1 60;stroke-dashoffset:-30;stroke-width:6}:host(.expanded) .line3{stroke-dasharray:90 207;stroke-dashoffset:-134;stroke-width:6}";
3
+ const burgerMenuCss = ":host{display:flex;justify-content:center;align-items:center;height:2rem;width:2.5rem;border-radius:var(--theme-btn--border-radius)}:host svg{display:inline-block;position:relative}:host .line{fill:var(--theme-menu-btn--color);opacity:1;x:2px;transition:x 0.075s ease-in 0.15s, transform 0.075s ease-in-out 0.075s, y 0.075s ease-in-out, opacity 0.075s linear 0.075s;transform-origin:center}:host(:hover){background-color:var(--theme-menu-btn--background--hover);border-radius:var(--theme-btn--border-radius)}:host(:active){background-color:var(--theme-menu-btn--background--active);border-radius:var(--theme-btn--border-radius)}:host(.expanded) svg .line-1{opacity:1;transform:rotate(-45deg);y:11px}:host(.expanded) svg .line-2{opacity:0;x:9}:host(.expanded) svg .line-3{opacity:1;transform:rotate(45deg);y:11px}";
4
4
 
5
5
  const BurgerMenu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
6
  constructor() {
@@ -12,7 +12,7 @@ const BurgerMenu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
12
12
  render() {
13
13
  return (h(Host, { class: {
14
14
  expanded: this.expanded,
15
- } }, h("svg", { width: "32", height: "32", viewBox: "0 0 100 100" }, h("path", { class: "line line1", d: "M 20,29.000046 H 80.000231 C 80.000231,29.000046 94.498839,28.817352 94.532987,66.711331 94.543142,77.980673 90.966081,81.670246 85.259173,81.668997 79.552261,81.667751 75.000211,74.999942 75.000211,74.999942 L 25.000021,25.000058" }), h("path", { class: "line line2", d: "M 20,50 H 60" }), h("path", { class: "line line3", d: "M 20,70.999954 H 80.000231 C 80.000231,70.999954 94.498839,71.182648 94.532987,33.288669 94.543142,22.019327 90.966081,18.329754 85.259173,18.331003 79.552261,18.332249 75.000211,25.000058 75.000211,25.000058 L 25.000021,74.999942" }))));
15
+ } }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24", height: "24" }, h("rect", { class: "line line-1", x: "2", y: "5", width: "20", height: "2" }), h("rect", { class: "line line-2", x: "2", y: "11", width: "13", height: "2" }), h("rect", { class: "line line-3", x: "2", y: "17", width: "20", height: "2" }))));
16
16
  }
17
17
  static get style() { return burgerMenuCss; }
18
18
  }, [1, "ix-burger-menu", {
@@ -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}.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() {
@@ -25,6 +25,7 @@ const DropdownItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
25
25
  checked: this.checked,
26
26
  'icon-text': this.label !== undefined && this.icon !== undefined,
27
27
  'icon-only': this.label === undefined && this.icon !== undefined,
28
+ disabled: this.disabled,
28
29
  } }, h("button", { class: {
29
30
  'dropdown-item': true,
30
31
  hover: this.hover,
@@ -32,6 +33,7 @@ const DropdownItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
32
33
  }, onClick: () => this.emitItemClick() }, this.checked ? (h("ix-icon", { class: "checkmark", name: "single-check", size: "16" })) : null, this.icon ? (h("span", { class: {
33
34
  glyph: true,
34
35
  [`glyph-${this.icon}`]: true,
36
+ disabled: this.disabled,
35
37
  } })) : null, this.label ? h("span", { class: "label" }, this.label) : null, h("slot", null))));
36
38
  }
37
39
  get hostElement() { return this; }
@@ -1,8 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { d as autoPlacement, i as inline, s as shift, o as offset, a as autoUpdate, c as computePosition } from './floating-ui.dom.esm.js';
3
- import { g as getAlignment } from './alignment.js';
2
+ import { f as flip, i as inline, s as shift, o as offset, a as autoUpdate, c as computePosition } from './floating-ui.dom.esm.js';
4
3
 
5
- 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.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}";
4
+ 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;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}";
6
5
 
7
6
  const Dropdown = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
8
7
  constructor() {
@@ -22,6 +21,7 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
22
21
  this.header = undefined;
23
22
  this.offset = undefined;
24
23
  this.triggerEvent = 'click';
24
+ this.overwriteDropdownStyle = undefined;
25
25
  this.toggleBind = this.toggle.bind(this);
26
26
  this.openBind = this.open.bind(this);
27
27
  }
@@ -143,21 +143,42 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
143
143
  }
144
144
  break;
145
145
  case 'inside':
146
- if (this.dropdownRef.contains(target)) {
146
+ if (this.dropdownRef.contains(target) && this.hostElement !== target) {
147
147
  this.close();
148
148
  }
149
149
  break;
150
+ case 'both':
151
+ if (this.hostElement !== target)
152
+ this.close();
153
+ break;
150
154
  default:
151
155
  this.close();
152
156
  }
153
157
  }
158
+ isNestedDropdown(element) {
159
+ return element.closest('ix-dropdown');
160
+ }
161
+ isAnchorSubmenu() {
162
+ var _a;
163
+ const anchor = (_a = this.anchorElement) === null || _a === void 0 ? void 0 : _a.closest('ix-dropdown-item');
164
+ if (!anchor) {
165
+ return false;
166
+ }
167
+ return true;
168
+ }
154
169
  toggle(event) {
155
170
  event === null || event === void 0 ? void 0 : event.preventDefault();
171
+ if (this.isNestedDropdown(event.target)) {
172
+ event === null || event === void 0 ? void 0 : event.stopPropagation();
173
+ }
156
174
  this.show = !this.show;
157
175
  this.showChanged.emit(this.show);
158
176
  }
159
177
  open(event) {
160
178
  event === null || event === void 0 ? void 0 : event.preventDefault();
179
+ if (this.isNestedDropdown(event.target)) {
180
+ event === null || event === void 0 ? void 0 : event.stopPropagation();
181
+ }
161
182
  this.show = true;
162
183
  this.showChanged.emit(true);
163
184
  }
@@ -169,44 +190,57 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
169
190
  this.showChanged.emit(false);
170
191
  }
171
192
  async applyDropdownPosition() {
172
- if (this.anchorElement && this.dropdownRef) {
173
- let positionConfig = {
174
- strategy: this.positioningStrategy,
175
- middleware: [],
176
- };
177
- if (this.placement.includes('auto')) {
178
- positionConfig.middleware.push(autoPlacement({
179
- alignment: getAlignment(this.placement),
180
- }));
181
- }
182
- else {
183
- positionConfig.placement = this.placement;
184
- }
185
- positionConfig.middleware = [
186
- ...positionConfig.middleware,
187
- inline(),
188
- shift(),
189
- ];
190
- if (this.offset) {
191
- positionConfig.middleware.push(offset(this.offset));
192
- }
193
- if (this.autoUpdateCleanup) {
194
- this.autoUpdateCleanup();
195
- this.autoUpdateCleanup = null;
196
- }
197
- this.autoUpdateCleanup = autoUpdate(this.anchorElement, this.dropdownRef, async () => {
198
- const computeResponse = await computePosition(this.anchorElement, this.dropdownRef, positionConfig);
199
- Object.assign(this.dropdownRef.style, {
200
- top: '0',
201
- left: '0',
202
- transform: `translate(${Math.round(computeResponse.x)}px,${Math.round(computeResponse.y)}px)`,
203
- });
204
- }, {
205
- ancestorResize: true,
206
- ancestorScroll: true,
207
- elementResize: true,
208
- });
193
+ if (!this.anchorElement) {
194
+ return;
209
195
  }
196
+ if (!this.dropdownRef) {
197
+ return;
198
+ }
199
+ const isSubmenu = this.isAnchorSubmenu();
200
+ let positionConfig = {
201
+ strategy: this.positioningStrategy,
202
+ middleware: [],
203
+ };
204
+ if (isSubmenu) {
205
+ positionConfig.placement = 'right-start';
206
+ }
207
+ if (this.placement.includes('auto') || isSubmenu) {
208
+ positionConfig.middleware.push(flip());
209
+ }
210
+ else {
211
+ positionConfig.placement = this.placement;
212
+ }
213
+ positionConfig.middleware = [
214
+ ...positionConfig.middleware,
215
+ inline(),
216
+ shift(),
217
+ ];
218
+ if (this.offset) {
219
+ positionConfig.middleware.push(offset(this.offset));
220
+ }
221
+ if (this.autoUpdateCleanup) {
222
+ this.autoUpdateCleanup();
223
+ this.autoUpdateCleanup = null;
224
+ }
225
+ this.autoUpdateCleanup = autoUpdate(this.anchorElement, this.dropdownRef, async () => {
226
+ const computeResponse = await computePosition(this.anchorElement, this.dropdownRef, positionConfig);
227
+ Object.assign(this.dropdownRef.style, {
228
+ top: '0',
229
+ left: '0',
230
+ transform: `translate(${Math.round(computeResponse.x)}px,${Math.round(computeResponse.y)}px)`,
231
+ });
232
+ if (this.overwriteDropdownStyle) {
233
+ const overwriteStyle = await this.overwriteDropdownStyle({
234
+ dropdownRef: this.dropdownRef,
235
+ triggerRef: this.triggerElement,
236
+ });
237
+ Object.assign(this.dropdownRef.style, overwriteStyle);
238
+ }
239
+ }, {
240
+ ancestorResize: true,
241
+ ancestorScroll: true,
242
+ elementResize: true,
243
+ });
210
244
  }
211
245
  async componentDidLoad() {
212
246
  if (this.trigger) {
@@ -231,6 +265,7 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
231
265
  return (h(Host, { ref: (ref) => (this.dropdownRef = ref), class: {
232
266
  'dropdown-menu': true,
233
267
  show: this.show,
268
+ overflow: true,
234
269
  }, style: {
235
270
  margin: '0',
236
271
  minWidth: '0px',
@@ -255,6 +290,7 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
255
290
  "header": [1],
256
291
  "offset": [16],
257
292
  "triggerEvent": [1, "trigger-event"],
293
+ "overwriteDropdownStyle": [16],
258
294
  "updatePosition": [64]
259
295
  }, [[8, "click", "clickOutside"]]]);
260
296
  function defineCustomElement() {
@@ -462,6 +462,142 @@ const autoPlacement = function (options) {
462
462
  };
463
463
  };
464
464
 
465
+ function getExpandedPlacements(placement) {
466
+ const oppositePlacement = getOppositePlacement(placement);
467
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
468
+ }
469
+
470
+ function getSideList(side, isStart, rtl) {
471
+ const lr = ['left', 'right'];
472
+ const rl = ['right', 'left'];
473
+ const tb = ['top', 'bottom'];
474
+ const bt = ['bottom', 'top'];
475
+ switch (side) {
476
+ case 'top':
477
+ case 'bottom':
478
+ if (rtl) return isStart ? rl : lr;
479
+ return isStart ? lr : rl;
480
+ case 'left':
481
+ case 'right':
482
+ return isStart ? tb : bt;
483
+ default:
484
+ return [];
485
+ }
486
+ }
487
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
488
+ const alignment = getAlignment(placement);
489
+ let list = getSideList(getSide(placement), direction === 'start', rtl);
490
+ if (alignment) {
491
+ list = list.map(side => side + "-" + alignment);
492
+ if (flipAlignment) {
493
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
494
+ }
495
+ }
496
+ return list;
497
+ }
498
+
499
+ /**
500
+ * Changes the placement of the floating element to one that will fit if the
501
+ * initially specified `placement` does not.
502
+ * @see https://floating-ui.com/docs/flip
503
+ */
504
+ const flip = function (options) {
505
+ if (options === void 0) {
506
+ options = {};
507
+ }
508
+ return {
509
+ name: 'flip',
510
+ options,
511
+ async fn(middlewareArguments) {
512
+ var _middlewareData$flip;
513
+ const {
514
+ placement,
515
+ middlewareData,
516
+ rects,
517
+ initialPlacement,
518
+ platform,
519
+ elements
520
+ } = middlewareArguments;
521
+ const {
522
+ mainAxis: checkMainAxis = true,
523
+ crossAxis: checkCrossAxis = true,
524
+ fallbackPlacements: specifiedFallbackPlacements,
525
+ fallbackStrategy = 'bestFit',
526
+ fallbackAxisSideDirection = 'none',
527
+ flipAlignment = true,
528
+ ...detectOverflowOptions
529
+ } = options;
530
+ const side = getSide(placement);
531
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
532
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
533
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
534
+ if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
535
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
536
+ }
537
+ const placements = [initialPlacement, ...fallbackPlacements];
538
+ const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
539
+ const overflows = [];
540
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
541
+ if (checkMainAxis) {
542
+ overflows.push(overflow[side]);
543
+ }
544
+ if (checkCrossAxis) {
545
+ const {
546
+ main,
547
+ cross
548
+ } = getAlignmentSides(placement, rects, rtl);
549
+ overflows.push(overflow[main], overflow[cross]);
550
+ }
551
+ overflowsData = [...overflowsData, {
552
+ placement,
553
+ overflows
554
+ }];
555
+
556
+ // One or more sides is overflowing.
557
+ if (!overflows.every(side => side <= 0)) {
558
+ var _middlewareData$flip2;
559
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
560
+ const nextPlacement = placements[nextIndex];
561
+ if (nextPlacement) {
562
+ // Try next placement and re-run the lifecycle.
563
+ return {
564
+ data: {
565
+ index: nextIndex,
566
+ overflows: overflowsData
567
+ },
568
+ reset: {
569
+ placement: nextPlacement
570
+ }
571
+ };
572
+ }
573
+ let resetPlacement = 'bottom';
574
+ switch (fallbackStrategy) {
575
+ case 'bestFit':
576
+ {
577
+ var _overflowsData$map$so;
578
+ const placement = (_overflowsData$map$so = overflowsData.map(d => [d, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0].placement;
579
+ if (placement) {
580
+ resetPlacement = placement;
581
+ }
582
+ break;
583
+ }
584
+ case 'initialPlacement':
585
+ resetPlacement = initialPlacement;
586
+ break;
587
+ }
588
+ if (placement !== resetPlacement) {
589
+ return {
590
+ reset: {
591
+ placement: resetPlacement
592
+ }
593
+ };
594
+ }
595
+ }
596
+ return {};
597
+ }
598
+ };
599
+ };
600
+
465
601
  /**
466
602
  * Provides improved positioning for inline reference elements that can span
467
603
  * over multiple lines, such as hyperlinks or range selections.
@@ -1352,4 +1488,4 @@ const computePosition = (reference, floating, options) => {
1352
1488
  });
1353
1489
  };
1354
1490
 
1355
- export { autoUpdate as a, arrow as b, computePosition as c, autoPlacement as d, inline as i, offset as o, shift as s };
1491
+ export { autoUpdate as a, arrow as b, computePosition as c, autoPlacement as d, flip as f, inline as i, offset as o, shift as s };
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
 
3
- const dividerCss = ":host{display:block;position:initial}:host .line{width:auto;border:0.0625rem solid var(--theme-color-x-weak-bdr)}";
3
+ const dividerCss = ":host{display:block;position:relative;width:100%;border:0.0625rem solid var(--theme-color-x-weak-bdr);margin:0.25rem 0px}";
4
4
 
5
5
  const Divider = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
6
  constructor() {
@@ -9,7 +9,7 @@ const Divider = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
9
9
  this.__attachShadow();
10
10
  }
11
11
  render() {
12
- return (h(Host, null, h("div", { class: "line" })));
12
+ return h(Host, null);
13
13
  }
14
14
  static get style() { return dividerCss; }
15
15
  }, [1, "ix-divider"]);
@@ -4,7 +4,7 @@ import { d as defineCustomElement$4 } from './dropdown.js';
4
4
  import { d as defineCustomElement$3 } from './icon.js';
5
5
  import { d as defineCustomElement$2 } from './icon-button.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 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
10
10
  constructor() {
@@ -15,7 +15,7 @@ const DropdownButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
15
15
  this.ghost = false;
16
16
  this.active = false;
17
17
  this.disabled = false;
18
- this.label = '';
18
+ this.label = undefined;
19
19
  this.icon = undefined;
20
20
  this.dropdownAnchor = undefined;
21
21
  }
@@ -35,7 +35,7 @@ const DropdownButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
35
35
  disabled: this.disabled,
36
36
  } }, h("div", { class: "dropdown-button", ref: (ref) => {
37
37
  this.dropdownAnchor = ref;
38
- } }, 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))));
38
+ } }, 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))));
39
39
  }
40
40
  static get style() { return dropdownButtonCss; }
41
41
  }, [6, "ix-dropdown-button", {