q2-tecton-elements 1.53.2 → 1.53.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 (162) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +19 -14
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-76f63767.js → index-7aecfed8.js} +33 -1
  4. package/dist/cjs/index-7aecfed8.js.map +1 -0
  5. package/dist/cjs/q2-action-group.cjs.entry.js +1 -1
  6. package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
  7. package/dist/cjs/q2-badge_7.cjs.entry.js +1 -1
  8. package/dist/cjs/q2-calendar.cjs.entry.js +1 -1
  9. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  10. package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
  11. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  12. package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
  14. package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
  15. package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
  16. package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
  17. package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
  18. package/dist/cjs/q2-detail.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  20. package/dist/cjs/q2-dropdown.cjs.entry.js +4 -2
  21. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  22. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  23. package/dist/cjs/q2-file-picker.cjs.entry.js +1 -1
  24. package/dist/cjs/q2-item_3.cjs.entry.js +1 -1
  25. package/dist/cjs/q2-loc.cjs.entry.js +1 -1
  26. package/dist/cjs/q2-message.cjs.entry.js +1 -1
  27. package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-option-list.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  31. package/dist/cjs/q2-pagination.cjs.entry.js +1 -1
  32. package/dist/cjs/q2-pill.cjs.entry.js +1 -1
  33. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  34. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  35. package/dist/cjs/q2-relative-time.cjs.entry.js +1 -1
  36. package/dist/cjs/q2-section.cjs.entry.js +1 -1
  37. package/dist/cjs/q2-select.cjs.entry.js +43 -3
  38. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  39. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  40. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +1 -1
  41. package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
  42. package/dist/cjs/q2-tag.cjs.entry.js +1 -1
  43. package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
  44. package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
  45. package/dist/collection/components/q2-dropdown/q2-dropdown.js +3 -1
  46. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  47. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +1 -1
  48. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
  49. package/dist/collection/components/q2-popover/q2-popover.js +19 -14
  50. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  51. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js +230 -147
  52. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
  53. package/dist/collection/components/q2-select/q2-select.js +42 -2
  54. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  55. package/dist/collection/components/q2-select/test/q2-select-test.spec.js +146 -6
  56. package/dist/collection/components/q2-select/test/q2-select-test.spec.js.map +1 -1
  57. package/dist/collection/utils/index.js +37 -0
  58. package/dist/collection/utils/index.js.map +1 -1
  59. package/dist/components/index2.js +32 -1
  60. package/dist/components/index2.js.map +1 -1
  61. package/dist/components/q2-dropdown.js +3 -1
  62. package/dist/components/q2-dropdown.js.map +1 -1
  63. package/dist/components/q2-popover2.js +19 -14
  64. package/dist/components/q2-popover2.js.map +1 -1
  65. package/dist/components/q2-select2.js +43 -3
  66. package/dist/components/q2-select2.js.map +1 -1
  67. package/dist/esm/click-elsewhere_2.entry.js +19 -14
  68. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  69. package/dist/esm/{index-504f1a9e.js → index-99c46474.js} +33 -2
  70. package/dist/{cjs/index-76f63767.js.map → esm/index-99c46474.js.map} +1 -1
  71. package/dist/esm/q2-action-group.entry.js +1 -1
  72. package/dist/esm/q2-action-sheet.entry.js +1 -1
  73. package/dist/esm/q2-badge_7.entry.js +1 -1
  74. package/dist/esm/q2-calendar.entry.js +1 -1
  75. package/dist/esm/q2-card.entry.js +1 -1
  76. package/dist/esm/q2-carousel-pane.entry.js +1 -1
  77. package/dist/esm/q2-carousel.entry.js +1 -1
  78. package/dist/esm/q2-chart-area.entry.js +1 -1
  79. package/dist/esm/q2-chart-bar.entry.js +1 -1
  80. package/dist/esm/q2-chart-donut.entry.js +1 -1
  81. package/dist/esm/q2-checkbox-group.entry.js +1 -1
  82. package/dist/esm/q2-checkbox.entry.js +1 -1
  83. package/dist/esm/q2-data-table.entry.js +1 -1
  84. package/dist/esm/q2-detail.entry.js +1 -1
  85. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  86. package/dist/esm/q2-dropdown.entry.js +4 -2
  87. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  88. package/dist/esm/q2-editable-field.entry.js +1 -1
  89. package/dist/esm/q2-file-picker.entry.js +1 -1
  90. package/dist/esm/q2-item_3.entry.js +1 -1
  91. package/dist/esm/q2-loc.entry.js +1 -1
  92. package/dist/esm/q2-message.entry.js +1 -1
  93. package/dist/esm/q2-month-picker.entry.js +1 -1
  94. package/dist/esm/q2-optgroup.entry.js +1 -1
  95. package/dist/esm/q2-option-list.entry.js +1 -1
  96. package/dist/esm/q2-option.entry.js +1 -1
  97. package/dist/esm/q2-pagination.entry.js +1 -1
  98. package/dist/esm/q2-pill.entry.js +1 -1
  99. package/dist/esm/q2-radio-group.entry.js +1 -1
  100. package/dist/esm/q2-radio.entry.js +1 -1
  101. package/dist/esm/q2-relative-time.entry.js +1 -1
  102. package/dist/esm/q2-section.entry.js +1 -1
  103. package/dist/esm/q2-select.entry.js +43 -3
  104. package/dist/esm/q2-select.entry.js.map +1 -1
  105. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  106. package/dist/esm/q2-stepper-vertical.entry.js +1 -1
  107. package/dist/esm/q2-stepper.entry.js +1 -1
  108. package/dist/esm/q2-tag.entry.js +1 -1
  109. package/dist/esm/q2-textarea.entry.js +1 -1
  110. package/dist/esm/q2-tooltip.entry.js +1 -1
  111. package/dist/jest.setup.js +11 -0
  112. package/dist/jest.setup.js.map +1 -1
  113. package/dist/q2-tecton-elements/click-elsewhere_2.entry.js +139 -134
  114. package/dist/q2-tecton-elements/click-elsewhere_2.entry.js.map +1 -1
  115. package/dist/q2-tecton-elements/{index-504f1a9e.js → index-99c46474.js} +76 -51
  116. package/dist/q2-tecton-elements/index-99c46474.js.map +1 -0
  117. package/dist/q2-tecton-elements/q2-action-group.entry.js +1 -1
  118. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +1 -1
  119. package/dist/q2-tecton-elements/q2-badge_7.entry.js +1 -1
  120. package/dist/q2-tecton-elements/q2-calendar.entry.js +1 -1
  121. package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
  122. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +1 -1
  123. package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
  124. package/dist/q2-tecton-elements/q2-chart-area.entry.js +1 -1
  125. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +78 -78
  126. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +1 -1
  127. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +1 -1
  128. package/dist/q2-tecton-elements/q2-checkbox.entry.js +1 -1
  129. package/dist/q2-tecton-elements/q2-data-table.entry.js +1 -1
  130. package/dist/q2-tecton-elements/q2-detail.entry.js +1 -1
  131. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +1 -1
  132. package/dist/q2-tecton-elements/q2-dropdown.entry.js +13 -11
  133. package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -1
  134. package/dist/q2-tecton-elements/q2-editable-field.entry.js +1 -1
  135. package/dist/q2-tecton-elements/q2-file-picker.entry.js +1 -1
  136. package/dist/q2-tecton-elements/q2-item_3.entry.js +1 -1
  137. package/dist/q2-tecton-elements/q2-loc.entry.js +4 -4
  138. package/dist/q2-tecton-elements/q2-message.entry.js +1 -1
  139. package/dist/q2-tecton-elements/q2-month-picker.entry.js +1 -1
  140. package/dist/q2-tecton-elements/q2-optgroup.entry.js +1 -1
  141. package/dist/q2-tecton-elements/q2-option-list.entry.js +1 -1
  142. package/dist/q2-tecton-elements/q2-option.entry.js +1 -1
  143. package/dist/q2-tecton-elements/q2-pagination.entry.js +1 -1
  144. package/dist/q2-tecton-elements/q2-pill.entry.js +1 -1
  145. package/dist/q2-tecton-elements/q2-radio-group.entry.js +5 -5
  146. package/dist/q2-tecton-elements/q2-radio.entry.js +1 -1
  147. package/dist/q2-tecton-elements/q2-relative-time.entry.js +1 -1
  148. package/dist/q2-tecton-elements/q2-section.entry.js +1 -1
  149. package/dist/q2-tecton-elements/q2-select.entry.js +44 -5
  150. package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
  151. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
  152. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +1 -1
  153. package/dist/q2-tecton-elements/q2-stepper.entry.js +1 -1
  154. package/dist/q2-tecton-elements/q2-tag.entry.js +1 -1
  155. package/dist/q2-tecton-elements/q2-textarea.entry.js +1 -1
  156. package/dist/q2-tecton-elements/q2-tooltip.entry.js +1 -1
  157. package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +9 -0
  158. package/dist/types/components/q2-select/q2-select.d.ts +4 -0
  159. package/dist/types/utils/index.d.ts +3 -0
  160. package/package.json +3 -3
  161. package/dist/esm/index-504f1a9e.js.map +0 -1
  162. package/dist/q2-tecton-elements/index-504f1a9e.js.map +0 -1
@@ -1,25 +1,25 @@
1
- import { r as o, c as t, g as i, h as e } from "./index-7a5365e2.js";
1
+ import { r as t, c as o, g as i, h as e } from "./index-7a5365e2.js";
2
2
 
3
- import { h as s, w as r } from "./index-504f1a9e.js";
3
+ import { h as s, w as r, x as n, d as p } from "./index-99c46474.js";
4
4
 
5
- const n = class {
5
+ const a = class {
6
6
  constructor(i) {
7
- o(this, i);
8
- this.change = t(this, "change", 7);
7
+ t(this, i);
8
+ this.change = o(this, "change", 7);
9
9
  // #region Own Properties
10
10
  this.isCurrentlyFocused = false;
11
11
  /**
12
12
  * Listens for mouse and window events that happen outside this click-elsewhere element so we can close popovers when users click outside them
13
13
  */ this.mouseEventList = [ "mousedown", "dragstart", "touchstart" ];
14
- this.mouseHandler = o => {
15
- const t = this.shadowContains(this.findActiveElement());
16
- const i = this.shadowContains(this.shadowEventTarget(o)) || this.originatesInSlots(o.target);
17
- if (!i && (this.isCurrentlyFocused || t)) {
14
+ this.mouseHandler = t => {
15
+ const o = this.shadowContains(this.findActiveElement());
16
+ const i = this.shadowContains(this.shadowEventTarget(t)) || this.originatesInSlots(t.target);
17
+ if (!i && (this.isCurrentlyFocused || o)) {
18
18
  this.isCurrentlyFocused = false;
19
19
  this.change.emit();
20
20
  return;
21
21
  }
22
- this.isCurrentlyFocused = i || t;
22
+ this.isCurrentlyFocused = i || o;
23
23
  };
24
24
  this.windowBlurHandler = () => {
25
25
  this.isCurrentlyFocused = false;
@@ -30,14 +30,14 @@ const n = class {
30
30
  // #region Component Lifecycle Events
31
31
  /* tslint:enable:no-empty */
32
32
  connectedCallback() {
33
- this.mouseEventList.forEach((o => {
34
- document.addEventListener(o, this.mouseHandler);
33
+ this.mouseEventList.forEach((t => {
34
+ document.addEventListener(t, this.mouseHandler);
35
35
  }));
36
36
  window.addEventListener("blur", this.windowBlurHandler);
37
37
  }
38
38
  disconnectedCallback() {
39
- this.mouseEventList.forEach((o => {
40
- document.removeEventListener(o, this.mouseHandler);
39
+ this.mouseEventList.forEach((t => {
40
+ document.removeEventListener(t, this.mouseHandler);
41
41
  }));
42
42
  window.removeEventListener("blur", this.windowBlurHandler);
43
43
  }
@@ -46,56 +46,56 @@ const n = class {
46
46
  // #endregion
47
47
  // #region Local Methods
48
48
  findActiveElement() {
49
- let o = document.activeElement;
49
+ let t = document.activeElement;
50
50
  while (true) {
51
- if (!o || !o.shadowRoot) {
52
- return o;
51
+ if (!t || !t.shadowRoot) {
52
+ return t;
53
53
  }
54
- o = o.shadowRoot.activeElement;
54
+ t = t.shadowRoot.activeElement;
55
55
  }
56
56
  }
57
- originatesInSlots(o) {
58
- const t = this.hostElement.querySelectorAll("slot");
59
- for (const i of Array.from(t)) {
60
- const t = i && i.assignedNodes && i.assignedNodes() || this.hostElement.childNodes;
61
- for (const i of Array.from(t)) {
62
- if (i.contains(o)) {
57
+ originatesInSlots(t) {
58
+ const o = this.hostElement.querySelectorAll("slot");
59
+ for (const i of Array.from(o)) {
60
+ const o = i && i.assignedNodes && i.assignedNodes() || this.hostElement.childNodes;
61
+ for (const i of Array.from(o)) {
62
+ if (i.contains(t)) {
63
63
  return true;
64
64
  }
65
65
  }
66
66
  }
67
67
  return false;
68
68
  }
69
- shadowContains(o) {
69
+ shadowContains(t) {
70
70
  /**
71
71
  * shadow-dom enabled version of Node.contains()
72
72
  */
73
73
  while (true) {
74
- if (o === this.hostElement) {
74
+ if (t === this.hostElement) {
75
75
  return true;
76
76
  }
77
- if (!o) {
77
+ if (!t) {
78
78
  return false;
79
79
  }
80
- o = o.parentNode || o.host;
80
+ t = t.parentNode || t.host;
81
81
  }
82
82
  }
83
- shadowEventTarget(o) {
84
- return o.composedPath()[0] || o.target;
83
+ shadowEventTarget(t) {
84
+ return t.composedPath()[0] || t.target;
85
85
  }
86
86
  get hostElement() {
87
87
  return i(this);
88
88
  }
89
89
  };
90
90
 
91
- const p = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.legacy.container{display:none}.legacy.show{display:block;z-index:var(--tct-popover-z-index, 50)}:popover-open,.show{position:absolute;margin:0;padding:0;overflow:auto;background:var(--tct-popover-background, var(--app-white, #ffffff));color:var(--tct-popover-font-color, var(--t-text, #4d4d4d));min-width:var(--tct-popover-min-width, 135px);margin-block:var(--tct-popover-margin-block, 0);box-shadow:var(--tct-popover-box-shadow, var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)));border-width:var(--tct-popover-border-width, 0);border-style:solid;border-color:var(--tct-popover-border-color, transparent);border-radius:var(--tct-popover-border-radius, 0);max-height:var(--comp-pop-max-height);left:var(--comp-pop-left);opacity:var(--comp-pop-opacity, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 4px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}:popover-open.block,.show.block{right:unset;width:var(--comp-pop-width);min-width:var(--tct-popover-min-width, unset)}:popover-open.left,.show.left{left:var(--comp-pop-left);right:unset}:popover-open.right,.show.right{right:var(--comp-pop-right);left:unset}:popover-open.down,.show.down{top:var(--tct-popover-top, var(--comp-pop-top));bottom:unset}:popover-open.up,.show.up{top:unset;bottom:var(--comp-pop-bottom)}:popover-open::-webkit-scrollbar,.show::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}:popover-open::-webkit-scrollbar-thumb,.show::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}:popover-open::-webkit-scrollbar-track,.show::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}click-elsewhere{position:relative;display:block}";
91
+ const c = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.legacy.container{display:none}.legacy.show{display:block;z-index:var(--tct-popover-z-index, 50)}:popover-open,.show{position:absolute;margin:0;padding:0;overflow:auto;background:var(--tct-popover-background, var(--app-white, #ffffff));color:var(--tct-popover-font-color, var(--t-text, #4d4d4d));min-width:var(--tct-popover-min-width, 135px);margin-block:var(--tct-popover-margin-block, 0);box-shadow:var(--tct-popover-box-shadow, var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)));border-width:var(--tct-popover-border-width, 0);border-style:solid;border-color:var(--tct-popover-border-color, transparent);border-radius:var(--tct-popover-border-radius, 0);max-height:var(--comp-pop-max-height);left:var(--comp-pop-left);opacity:var(--comp-pop-opacity, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 4px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}:popover-open.block,.show.block{right:unset;width:var(--comp-pop-width);min-width:var(--tct-popover-min-width, unset)}:popover-open.left,.show.left{left:var(--comp-pop-left);right:unset}:popover-open.right,.show.right{right:var(--comp-pop-right);left:unset}:popover-open.down,.show.down{top:var(--tct-popover-top, var(--comp-pop-top));bottom:unset}:popover-open.up,.show.up{top:unset;bottom:var(--comp-pop-bottom)}:popover-open::-webkit-scrollbar,.show::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}:popover-open::-webkit-scrollbar-thumb,.show::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}:popover-open::-webkit-scrollbar-track,.show::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}click-elsewhere{position:relative;display:block}";
92
92
 
93
- const a = p;
93
+ const h = c;
94
94
 
95
- const c = class {
95
+ const l = class {
96
96
  constructor(i) {
97
- o(this, i);
98
- this.popoverStateChanged = t(this, "popoverStateChanged", 7);
97
+ t(this, i);
98
+ this.popoverStateChanged = o(this, "popoverStateChanged", 7);
99
99
  /**
100
100
  * The number of pixels to leave between the popover and the edge of the viewport
101
101
  */ this.displayBuffer = 10;
@@ -105,68 +105,68 @@ const c = class {
105
105
  s(this, "minHeight", "prop");
106
106
  }
107
107
  };
108
- this.handlePopoverToggleEvent = o => {
108
+ this.handlePopoverToggleEvent = t => {
109
109
  this.popoverStateChanged.emit({
110
- open: o.newState === "open"
110
+ open: t.newState === "open"
111
111
  });
112
112
  };
113
113
  this.setAbsoluteCSSProperties = async () => {
114
- const {controlElement: o, containerElement: t, currentDirection: i, align: e} = this;
114
+ const {controlElement: t, containerElement: o, currentDirection: i, align: e} = this;
115
115
  if (e === "right") {
116
- t.style.setProperty("--comp-pop-right", "0");
117
- t.style.setProperty("--comp-pop-left", "unset");
116
+ o.style.setProperty("--comp-pop-right", "0");
117
+ o.style.setProperty("--comp-pop-left", "unset");
118
118
  } else {
119
- t.style.setProperty("--comp-pop-left", "0");
120
- t.style.setProperty("--comp-pop-right", "unset");
119
+ o.style.setProperty("--comp-pop-left", "0");
120
+ o.style.setProperty("--comp-pop-right", "unset");
121
121
  }
122
122
  if (this.block) {
123
- t.style.setProperty("--comp-pop-width", "100%");
123
+ o.style.setProperty("--comp-pop-width", "100%");
124
124
  }
125
125
  if (i === "up") {
126
- const i = getComputedStyle(o);
126
+ const i = getComputedStyle(t);
127
127
  const e = parseInt(i.height || "0") + parseInt(i.borderTopWidth || "0") + parseInt(i.borderBottomWidth || "0");
128
- t.style.setProperty("--comp-pop-bottom", `${e}px`);
128
+ o.style.setProperty("--comp-pop-bottom", `${e}px`);
129
129
  }
130
130
  // Wait for one paint to prevent layout thrashing
131
131
  await r();
132
- t.style.setProperty("--comp-pop-opacity", "1");
132
+ o.style.setProperty("--comp-pop-opacity", "1");
133
133
  };
134
134
  this.setPopoverAPICSSProperties = async () => {
135
- var o, t, i, e, s, n;
136
- const {controlElement: p, containerElement: a, currentDirection: c, isModule: l, align: h} = this;
137
- const {top: d, bottom: u, left: w, right: v} = (t = (o = p === null || p === void 0 ? void 0 : p.getBoundingClientRect) === null || o === void 0 ? void 0 : o.call(p)) !== null && t !== void 0 ? t : {
135
+ var t, o, i;
136
+ const {controlElement: e, containerElement: s, currentDirection: n, isModule: p, align: a} = this;
137
+ const {top: c, bottom: h, left: l, right: d} = (o = (t = e === null || e === void 0 ? void 0 : e.getBoundingClientRect) === null || t === void 0 ? void 0 : t.call(e)) !== null && o !== void 0 ? o : {
138
138
  top: 0,
139
139
  bottom: 0,
140
140
  left: 0,
141
141
  right: 0
142
142
  };
143
- const b = w;
144
- const f = ((i = window === null || window === void 0 ? void 0 : window.visualViewport) === null || i === void 0 ? void 0 : i.width) - v;
145
- if (h === "right") {
146
- a.style.setProperty("--comp-pop-right", `${f - window.scrollX}px`);
147
- a.style.setProperty("--comp-pop-left", "unset");
143
+ const u = l;
144
+ const v = ((i = window === null || window === void 0 ? void 0 : window.visualViewport) === null || i === void 0 ? void 0 : i.width) - d;
145
+ if (a === "right") {
146
+ s.style.setProperty("--comp-pop-right", `${v - window.scrollX}px`);
147
+ s.style.setProperty("--comp-pop-left", "unset");
148
148
  } else {
149
- a.style.setProperty("--comp-pop-left", `${b + window.scrollX}px`);
150
- a.style.setProperty("--comp-pop-right", "unset");
149
+ s.style.setProperty("--comp-pop-left", `${u + window.scrollX}px`);
150
+ s.style.setProperty("--comp-pop-right", "unset");
151
151
  }
152
- if (this.block) a.style.setProperty("--comp-pop-width", `${(p === null || p === void 0 ? void 0 : p.offsetWidth) || 0}px`);
153
- if (c === "up") {
154
- if (l) {
155
- a.style.setProperty("--comp-pop-bottom", `${window.innerHeight - d}px`);
152
+ if (this.block) s.style.setProperty("--comp-pop-width", `${(e === null || e === void 0 ? void 0 : e.offsetWidth) || 0}px`);
153
+ if (n === "up") {
154
+ if (p) {
155
+ s.style.setProperty("--comp-pop-bottom", `${window.innerHeight - c}px`);
156
156
  } else {
157
- a.style.setProperty("--comp-pop-bottom", `${window.innerHeight - d - ((e = window === null || window === void 0 ? void 0 : window.visualViewport) === null || e === void 0 ? void 0 : e.offsetTop) - window.scrollY}px`);
157
+ s.style.setProperty("--comp-pop-bottom", `${window.innerHeight - c - window.scrollY}px`);
158
158
  }
159
159
  }
160
- if (c === "down") {
161
- if (l) {
162
- a.style.setProperty("--comp-pop-top", `${u}px`);
160
+ if (n === "down") {
161
+ if (p) {
162
+ s.style.setProperty("--comp-pop-top", `${h}px`);
163
163
  } else {
164
- a.style.setProperty("--comp-pop-top", `${u + ((n = (s = window === null || window === void 0 ? void 0 : window.visualViewport) === null || s === void 0 ? void 0 : s.offsetTop) !== null && n !== void 0 ? n : 0) + window.scrollY}px`);
164
+ s.style.setProperty("--comp-pop-top", `${h + window.scrollY}px`);
165
165
  }
166
166
  }
167
167
  // Wait for one paint to prevent layout thrashing
168
168
  await r();
169
- a.style.setProperty("--comp-pop-opacity", "1");
169
+ s.style.setProperty("--comp-pop-opacity", "1");
170
170
  };
171
171
  this.viewPortChanged = () => {
172
172
  if (!this.open) return;
@@ -209,16 +209,16 @@ const c = class {
209
209
  }
210
210
  // #endregion
211
211
  // #region Listeners
212
- popoverStateHandler(o) {
213
- const {detail: {open: t}} = o;
214
- if (t === this.open) return;
215
- this.open = t;
216
- o.stopPropagation();
212
+ popoverStateHandler(t) {
213
+ const {detail: {open: o}} = t;
214
+ if (o === this.open) return;
215
+ this.open = o;
216
+ t.stopPropagation();
217
217
  }
218
218
  // #endregion
219
219
  // #region Public Methods API
220
- async scrollContainerTo(o) {
221
- this.containerElement.scrollTo(o);
220
+ async scrollContainerTo(t) {
221
+ this.containerElement.scrollTo(t);
222
222
  }
223
223
  async toggle() {
224
224
  this.open = !this.open;
@@ -228,11 +228,11 @@ const c = class {
228
228
  minHeightProvided() {
229
229
  this.handleMinHeight();
230
230
  }
231
- async openChanged(o) {
231
+ async openChanged(t) {
232
232
  this.popoverStateChanged.emit({
233
- open: o
233
+ open: t
234
234
  });
235
- if (o) {
235
+ if (t) {
236
236
  this.addViewportListeners();
237
237
  this.determinePopDirection();
238
238
  } else {
@@ -250,17 +250,17 @@ const c = class {
250
250
  // #endregion
251
251
  // #region Local Methods
252
252
  get isModule() {
253
- var o, t;
253
+ var t, o;
254
254
  const i = window !== window.top;
255
- const e = Object.keys((t = (o = window.Tecton) === null || o === void 0 ? void 0 : o.platformDimensions) !== null && t !== void 0 ? t : {}).length > 0;
255
+ const e = Object.keys((o = (t = window.Tecton) === null || t === void 0 ? void 0 : t.platformDimensions) !== null && o !== void 0 ? o : {}).length > 0;
256
256
  return i && e;
257
257
  }
258
258
  get providedDirection() {
259
- const {direction: o} = this;
260
- switch (o) {
259
+ const {direction: t} = this;
260
+ switch (t) {
261
261
  case "up":
262
262
  case "down":
263
- return o;
263
+ return t;
264
264
 
265
265
  default:
266
266
  return undefined;
@@ -270,18 +270,20 @@ const c = class {
270
270
  return Object.hasOwn(HTMLElement.prototype, "popover");
271
271
  }
272
272
  get validatedMaxHeight() {
273
- const {maxHeight: o} = this;
274
- return isNaN(o) ? undefined : o;
273
+ const {maxHeight: t} = this;
274
+ return isNaN(t) ? undefined : t;
275
275
  }
276
276
  addViewportListeners() {
277
- var o;
277
+ var t;
278
278
  window.addEventListener("resize", this.viewPortOrientationChanged);
279
279
  visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.addEventListener("resize", this.viewPortChanged);
280
- window.addEventListener("scroll", this.viewPortChanged, {
281
- passive: true,
282
- capture: true
283
- });
284
- (o = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || o === void 0 ? void 0 : o.addEventListener("orientationchange", this.viewPortOrientationChanged);
280
+ if (n(this.hostElement) && !p()) {
281
+ window.addEventListener("scroll", this.viewPortChanged, {
282
+ passive: true,
283
+ capture: true
284
+ });
285
+ }
286
+ (t = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || t === void 0 ? void 0 : t.addEventListener("orientationchange", this.viewPortOrientationChanged);
285
287
  window.addEventListener("orientationchange", this.viewPortOrientationChanged);
286
288
  }
287
289
  clearCSSProperties() {
@@ -294,75 +296,78 @@ const c = class {
294
296
  this.containerElement.style.removeProperty("--comp-pop-opacity");
295
297
  }
296
298
  async determinePopDirection() {
297
- var o, t, i;
299
+ var t, o, i;
298
300
  const {containerElement: e, controlElement: s, providedDirection: n, displayBuffer: p} = this;
299
301
  if (e) e.style.maxHeight = null;
300
302
  await r();
301
303
  const {isModule: a} = this;
302
- const {top: c, bottom: l} = (t = (o = s === null || s === void 0 ? void 0 : s.getBoundingClientRect) === null || o === void 0 ? void 0 : o.call(s)) !== null && t !== void 0 ? t : {
304
+ const {top: c, bottom: h} = (o = (t = s === null || s === void 0 ? void 0 : s.getBoundingClientRect) === null || t === void 0 ? void 0 : t.call(s)) !== null && o !== void 0 ? o : {
303
305
  top: 0,
304
306
  bottom: 0
305
307
  };
306
- let h;
308
+ let l;
307
309
  let d;
308
310
  let u;
309
311
  if (a) {
310
- const {outletOffset: o = 0, innerHeight: t = window.innerHeight} = ((i = window.Tecton) === null || i === void 0 ? void 0 : i.platformDimensions) || {};
311
- const e = window.visualViewport.height - l;
312
- const s = t - (o + l);
313
- const r = e < s;
314
- h = t;
315
- // If the top of the module is below the top of the window we just use the controlTop
316
- // Otherwise we need to add the outletOffset to the controlTop
317
- d = (o > 0 ? c : c + o) - p;
318
- u = r ? e - p : s - p;
312
+ const {outletOffset: t = 0, innerHeight: o = window.innerHeight, top: e = 0, bottom: s = 0} = ((i = window.Tecton) === null || i === void 0 ? void 0 : i.platformDimensions) || {};
313
+ const r = window.innerHeight - h;
314
+ // controlElement position visually on the page
315
+ const n = t > 0 ? c : c + t - e;
316
+ const a = t + h - e;
317
+ // visual space around the controlElement
318
+ const l = n;
319
+ const v = o - s - a;
320
+ // calculate space above and below controlElement
321
+ const w = r < v;
322
+ d = l - p;
323
+ u = w ? r - p : v - p;
319
324
  } else {
320
- h = window.visualViewport.height;
325
+ l = window.innerHeight;
321
326
  d = c - p;
322
- u = h - l - p;
327
+ u = l - h - p;
323
328
  }
324
- const w = d > u ? "up" : "down";
329
+ const v = d > u ? "up" : "down";
325
330
  // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)
326
- const v = !e.style.getPropertyValue("--comp-pop-max-height") || this.orientationChanged;
331
+ const w = !e.style.getPropertyValue("--comp-pop-max-height") || this.orientationChanged;
327
332
  // we do not want to constantly update the max-height after an orientation change, so we switch this back to false
328
333
  this.orientationChanged = false;
329
- const b = this.currentDirection || n || w;
330
- switch (b) {
334
+ const f = this.currentDirection || n || v;
335
+ switch (f) {
331
336
  case "up":
332
- if (v) {
333
- const o = this.validatedMaxHeight || d;
334
- const t = Math.min(d, o);
335
- e.style.setProperty("--comp-pop-max-height", `${t}px`);
337
+ if (w) {
338
+ const t = this.validatedMaxHeight || d;
339
+ const o = Math.min(d, t);
340
+ e.style.setProperty("--comp-pop-max-height", `${o}px`);
336
341
  }
337
342
  this.setDirectionAndShow("up");
338
343
  break;
339
344
 
340
345
  case "down":
341
- if (v) {
342
- const o = this.validatedMaxHeight || u;
343
- const t = Math.min(u, o);
344
- e.style.setProperty("--comp-pop-max-height", `${t}px`);
346
+ if (w) {
347
+ const t = this.validatedMaxHeight || u;
348
+ const o = Math.min(u, t);
349
+ e.style.setProperty("--comp-pop-max-height", `${o}px`);
345
350
  }
346
351
  this.setDirectionAndShow("down");
347
352
  break;
348
353
  }
349
354
  }
350
355
  removeViewportListeners() {
351
- var o;
356
+ var t;
352
357
  window.removeEventListener("resize", this.viewPortOrientationChanged);
353
358
  visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.removeEventListener("resize", this.viewPortChanged);
354
359
  window.removeEventListener("scroll", this.viewPortChanged, {
355
360
  capture: true
356
361
  });
357
- (o = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || o === void 0 ? void 0 : o.removeEventListener("orientationchange", this.viewPortOrientationChanged);
362
+ (t = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || t === void 0 ? void 0 : t.removeEventListener("orientationchange", this.viewPortOrientationChanged);
358
363
  window.removeEventListener("orientationchange", this.viewPortOrientationChanged);
359
364
  }
360
- setDirectionAndShow(o) {
365
+ setDirectionAndShow(t) {
361
366
  // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the
362
367
  // popover can be closed between the time the popover is opened and the time the direction is determined
363
- const t = this.open;
364
- if (!t) return;
365
- this.currentDirection = o;
368
+ const o = this.open;
369
+ if (!o) return;
370
+ this.currentDirection = t;
366
371
  if (this.mode === "legacy" || !this.supportsPopoverAPI) {
367
372
  this.show = true;
368
373
  this.setAbsoluteCSSProperties();
@@ -374,23 +379,23 @@ const c = class {
374
379
  // #endregion
375
380
  // #region Render Methods
376
381
  render() {
377
- const o = [ "container", this.currentDirection, this.align ];
378
- if (this.show) o.push("show");
379
- if (this.block) o.push("block");
380
- if (this.mode === "legacy") o.push("legacy");
382
+ const t = [ "container", this.currentDirection, this.align ];
383
+ if (this.show) t.push("show");
384
+ if (this.block) t.push("block");
385
+ if (this.mode === "legacy") t.push("legacy");
381
386
  return e("div", {
382
- key: "acaaed8fe34bb4ee949c4032be9a08b61a28b238",
383
- ref: o => this.containerElement = o,
384
- class: o.join(" "),
387
+ key: "4cd26a6c090a6fb5b56d2fa6464143f74998c215",
388
+ ref: t => this.containerElement = t,
389
+ class: t.join(" "),
385
390
  "test-id": "outerContainer",
386
391
  tabIndex: -1,
387
- popover: "auto"
392
+ popover: "manual"
388
393
  }, e("div", {
389
- key: "b8e93864b158caa9e9e2cde64a84d9ea9288b761",
390
- ref: o => this.contentElement = o,
394
+ key: "545c376ca96c14e129a8f60fadac3a3264b916cf",
395
+ ref: t => this.contentElement = t,
391
396
  class: "content"
392
397
  }, e("slot", {
393
- key: "e43fee80ed07626f26aba98271c8408f9d69a37e"
398
+ key: "9a2824ab9023f34a2b3a56a76ace4df6a91b5ec6"
394
399
  })));
395
400
  }
396
401
  get hostElement() {
@@ -404,7 +409,7 @@ const c = class {
404
409
  }
405
410
  };
406
411
 
407
- c.style = a;
412
+ l.style = h;
408
413
 
409
- export { n as click_elsewhere, c as q2_popover };
414
+ export { a as click_elsewhere, l as q2_popover };
410
415
  //# sourceMappingURL=click-elsewhere_2.entry.js.map