@watermarkinsights/ripple 5.14.0 → 5.15.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/dist/cjs/{app-globals-055b4db0.js → app-globals-d84804db.js} +1 -1
  2. package/dist/cjs/{chartFunctions-781589c1.js → chartFunctions-153f5288.js} +1 -1
  3. package/dist/cjs/{functions-c7404c42.js → functions-b6a2c8c1.js} +57 -7
  4. package/dist/cjs/{intl-88adb57d.js → intl-ae08308b.js} +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/priv-calendar.cjs.entry.js +1 -1
  7. package/dist/cjs/priv-chart-popover.cjs.entry.js +17 -12
  8. package/dist/cjs/priv-option-list.cjs.entry.js +2 -2
  9. package/dist/cjs/ripple.cjs.js +1 -1
  10. package/dist/cjs/wm-action-menu_2.cjs.entry.js +1 -1
  11. package/dist/cjs/wm-button.cjs.entry.js +1 -1
  12. package/dist/cjs/wm-chart.cjs.entry.js +3 -3
  13. package/dist/cjs/wm-date-range.cjs.entry.js +1 -1
  14. package/dist/cjs/wm-datepicker.cjs.entry.js +1 -1
  15. package/dist/cjs/wm-file.cjs.entry.js +1 -1
  16. package/dist/cjs/wm-flyout.cjs.entry.js +2 -2
  17. package/dist/cjs/wm-input.cjs.entry.js +2 -2
  18. package/dist/cjs/wm-line-chart.cjs.entry.js +3 -3
  19. package/dist/cjs/wm-modal-pss_3.cjs.entry.js +2 -2
  20. package/dist/cjs/wm-modal_3.cjs.entry.js +2 -2
  21. package/dist/cjs/wm-navigation_3.cjs.entry.js +2 -2
  22. package/dist/cjs/wm-navigator.cjs.entry.js +1 -1
  23. package/dist/cjs/wm-nested-select.cjs.entry.js +2 -2
  24. package/dist/cjs/wm-optgroup.cjs.entry.js +1 -1
  25. package/dist/cjs/wm-option_2.cjs.entry.js +2 -2
  26. package/dist/cjs/wm-pagination.cjs.entry.js +2 -2
  27. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +2 -2
  28. package/dist/cjs/wm-search.cjs.entry.js +9 -7
  29. package/dist/cjs/wm-snackbar.cjs.entry.js +2 -2
  30. package/dist/cjs/wm-tab-item_3.cjs.entry.js +1 -1
  31. package/dist/cjs/wm-tag-input.cjs.entry.js +2 -2
  32. package/dist/cjs/wm-tag-option.cjs.entry.js +1 -1
  33. package/dist/cjs/wm-textarea.cjs.entry.js +2 -2
  34. package/dist/cjs/wm-timepicker.cjs.entry.js +1 -1
  35. package/dist/cjs/wm-toggletip.cjs.entry.js +30 -23
  36. package/dist/cjs/wm-uploader.cjs.entry.js +2 -2
  37. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +17 -12
  38. package/dist/collection/components/wm-search/wm-search.js +7 -5
  39. package/dist/collection/components/wm-toggletip/wm-toggletip.js +30 -23
  40. package/dist/collection/dev/toggletip.js +3 -3
  41. package/dist/collection/global/functions.js +55 -6
  42. package/dist/esm/{app-globals-d3e3b925.js → app-globals-3753b41d.js} +1 -1
  43. package/dist/esm/{chartFunctions-246aabf9.js → chartFunctions-de9bcba9.js} +1 -1
  44. package/dist/esm/{functions-aad18286.js → functions-85bc4418.js} +56 -7
  45. package/dist/esm/{intl-c8686c73.js → intl-a0456c63.js} +1 -1
  46. package/dist/esm/loader.js +1 -1
  47. package/dist/esm/priv-calendar.entry.js +1 -1
  48. package/dist/esm/priv-chart-popover.entry.js +17 -12
  49. package/dist/esm/priv-option-list.entry.js +2 -2
  50. package/dist/esm/ripple.js +1 -1
  51. package/dist/esm/wm-action-menu_2.entry.js +1 -1
  52. package/dist/esm/wm-button.entry.js +1 -1
  53. package/dist/esm/wm-chart.entry.js +3 -3
  54. package/dist/esm/wm-date-range.entry.js +1 -1
  55. package/dist/esm/wm-datepicker.entry.js +1 -1
  56. package/dist/esm/wm-file.entry.js +1 -1
  57. package/dist/esm/wm-flyout.entry.js +2 -2
  58. package/dist/esm/wm-input.entry.js +2 -2
  59. package/dist/esm/wm-line-chart.entry.js +3 -3
  60. package/dist/esm/wm-modal-pss_3.entry.js +2 -2
  61. package/dist/esm/wm-modal_3.entry.js +2 -2
  62. package/dist/esm/wm-navigation_3.entry.js +2 -2
  63. package/dist/esm/wm-navigator.entry.js +1 -1
  64. package/dist/esm/wm-nested-select.entry.js +2 -2
  65. package/dist/esm/wm-optgroup.entry.js +1 -1
  66. package/dist/esm/wm-option_2.entry.js +2 -2
  67. package/dist/esm/wm-pagination.entry.js +2 -2
  68. package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
  69. package/dist/esm/wm-search.entry.js +9 -7
  70. package/dist/esm/wm-snackbar.entry.js +2 -2
  71. package/dist/esm/wm-tab-item_3.entry.js +1 -1
  72. package/dist/esm/wm-tag-input.entry.js +2 -2
  73. package/dist/esm/wm-tag-option.entry.js +1 -1
  74. package/dist/esm/wm-textarea.entry.js +2 -2
  75. package/dist/esm/wm-timepicker.entry.js +1 -1
  76. package/dist/esm/wm-toggletip.entry.js +30 -23
  77. package/dist/esm/wm-uploader.entry.js +2 -2
  78. package/dist/esm-es5/app-globals-3753b41d.js +1 -0
  79. package/dist/esm-es5/{chartFunctions-246aabf9.js → chartFunctions-de9bcba9.js} +1 -1
  80. package/dist/esm-es5/{functions-aad18286.js → functions-85bc4418.js} +1 -1
  81. package/dist/esm-es5/{intl-c8686c73.js → intl-a0456c63.js} +1 -1
  82. package/dist/esm-es5/loader.js +1 -1
  83. package/dist/esm-es5/priv-calendar.entry.js +1 -1
  84. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  85. package/dist/esm-es5/priv-option-list.entry.js +1 -1
  86. package/dist/esm-es5/ripple.js +1 -1
  87. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  88. package/dist/esm-es5/wm-button.entry.js +1 -1
  89. package/dist/esm-es5/wm-chart.entry.js +1 -1
  90. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  91. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  92. package/dist/esm-es5/wm-file.entry.js +1 -1
  93. package/dist/esm-es5/wm-flyout.entry.js +1 -1
  94. package/dist/esm-es5/wm-input.entry.js +1 -1
  95. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  96. package/dist/esm-es5/wm-modal-pss_3.entry.js +1 -1
  97. package/dist/esm-es5/wm-modal_3.entry.js +1 -1
  98. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  99. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  100. package/dist/esm-es5/wm-nested-select.entry.js +1 -1
  101. package/dist/esm-es5/wm-optgroup.entry.js +1 -1
  102. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  103. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  104. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  105. package/dist/esm-es5/wm-search.entry.js +1 -1
  106. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  107. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  108. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  109. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  110. package/dist/esm-es5/wm-textarea.entry.js +1 -1
  111. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  112. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  113. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  114. package/dist/ripple/{p-de13b15f.system.entry.js → p-021e46ae.system.entry.js} +1 -1
  115. package/dist/ripple/{p-b254cdce.entry.js → p-0c53ba0c.entry.js} +1 -1
  116. package/dist/ripple/{p-e455876c.system.entry.js → p-17498c9d.system.entry.js} +1 -1
  117. package/dist/ripple/{p-d837c7d4.entry.js → p-18c26666.entry.js} +1 -1
  118. package/dist/ripple/{p-86bd3990.system.entry.js → p-1c52ac0f.system.entry.js} +1 -1
  119. package/dist/ripple/{p-ed5dfa29.entry.js → p-22c205c0.entry.js} +1 -1
  120. package/dist/ripple/{p-6e7c833c.system.js → p-243c6b62.system.js} +1 -1
  121. package/dist/ripple/{p-723254b6.js → p-256e98c1.js} +1 -1
  122. package/dist/ripple/{p-07318072.system.entry.js → p-2aea4c9a.system.entry.js} +1 -1
  123. package/dist/ripple/{p-b26f4852.entry.js → p-2db5e316.entry.js} +1 -1
  124. package/dist/ripple/{p-fadea131.entry.js → p-2dd4af68.entry.js} +1 -1
  125. package/dist/ripple/{p-d4f082db.system.entry.js → p-315198e2.system.entry.js} +1 -1
  126. package/dist/ripple/{p-f912ce26.system.entry.js → p-35f260f9.system.entry.js} +1 -1
  127. package/dist/ripple/p-3a16d089.entry.js +1 -0
  128. package/dist/ripple/{p-f1b36057.entry.js → p-4f48dc05.entry.js} +1 -1
  129. package/dist/ripple/{p-c8ef0086.entry.js → p-50efe5f9.entry.js} +1 -1
  130. package/dist/ripple/{p-68b63f21.entry.js → p-51800e01.entry.js} +1 -1
  131. package/dist/ripple/{p-70c6d33e.system.entry.js → p-53f05aee.system.entry.js} +1 -1
  132. package/dist/ripple/{p-ee4026e0.system.entry.js → p-56517851.system.entry.js} +1 -1
  133. package/dist/ripple/{p-d332cc27.system.entry.js → p-56b2b902.system.entry.js} +1 -1
  134. package/dist/ripple/{p-94ef3015.entry.js → p-56ddcb43.entry.js} +1 -1
  135. package/dist/ripple/{p-1a0c51ee.system.entry.js → p-5b3f4f30.system.entry.js} +1 -1
  136. package/dist/ripple/{p-5acc08cd.system.entry.js → p-5d29ac58.system.entry.js} +1 -1
  137. package/dist/ripple/{p-02634e13.entry.js → p-5dff57fb.entry.js} +1 -1
  138. package/dist/ripple/{p-e156c0c2.entry.js → p-61af9bfc.entry.js} +1 -1
  139. package/dist/ripple/{p-d3adbf48.system.entry.js → p-66a90fbd.system.entry.js} +1 -1
  140. package/dist/ripple/{p-f37094fe.system.entry.js → p-74a2e246.system.entry.js} +1 -1
  141. package/dist/ripple/{p-35560f1c.system.js → p-7825cbab.system.js} +1 -1
  142. package/dist/ripple/{p-bf8e69a3.js → p-79c56ebe.js} +1 -1
  143. package/dist/ripple/p-7f2dd7a9.entry.js +1 -0
  144. package/dist/ripple/{p-1111367a.system.entry.js → p-8273a880.system.entry.js} +1 -1
  145. package/dist/ripple/{p-a81d3859.entry.js → p-857ed23b.entry.js} +1 -1
  146. package/dist/ripple/{p-a58ae308.system.entry.js → p-886b3dc1.system.entry.js} +1 -1
  147. package/dist/ripple/p-92d8c5bd.system.js +1 -0
  148. package/dist/ripple/{p-366193d0.system.entry.js → p-9772a990.system.entry.js} +1 -1
  149. package/dist/ripple/p-97b26258.entry.js +1 -0
  150. package/dist/ripple/{p-2c954741.system.entry.js → p-99ee6fbf.system.entry.js} +1 -1
  151. package/dist/ripple/{p-8cd81897.system.entry.js → p-9c4deec8.system.entry.js} +1 -1
  152. package/dist/ripple/p-9cfd9bd9.js +1 -0
  153. package/dist/ripple/{p-4eaab96c.system.entry.js → p-9e1c3aff.system.entry.js} +1 -1
  154. package/dist/ripple/{p-6d99517c.system.entry.js → p-9f29e5e4.system.entry.js} +1 -1
  155. package/dist/ripple/p-a2f5e287.system.entry.js +1 -0
  156. package/dist/ripple/{p-cbfb44b5.system.entry.js → p-a389ccd3.system.entry.js} +1 -1
  157. package/dist/ripple/{p-496564b3.entry.js → p-a5031dab.entry.js} +1 -1
  158. package/dist/ripple/{p-58361d0e.system.entry.js → p-ab9af951.system.entry.js} +1 -1
  159. package/dist/ripple/{p-0a4a2582.system.entry.js → p-ae5d9927.system.entry.js} +1 -1
  160. package/dist/ripple/{p-c94ce42f.js → p-af59f267.js} +1 -1
  161. package/dist/ripple/{p-6b41644b.entry.js → p-b02789de.entry.js} +1 -1
  162. package/dist/ripple/{p-73081234.entry.js → p-b94b321e.entry.js} +1 -1
  163. package/dist/ripple/{p-0be3f364.entry.js → p-bff9eb65.entry.js} +1 -1
  164. package/dist/ripple/{p-66e539e2.entry.js → p-c04b1220.entry.js} +1 -1
  165. package/dist/ripple/{p-2e8211ba.system.entry.js → p-c47e258d.system.entry.js} +1 -1
  166. package/dist/ripple/{p-07a4b825.entry.js → p-ca3b0bb2.entry.js} +1 -1
  167. package/dist/ripple/{p-9bfe715c.system.entry.js → p-d019d91e.system.entry.js} +1 -1
  168. package/dist/ripple/{p-ca6bf276.entry.js → p-d5994e7c.entry.js} +1 -1
  169. package/dist/ripple/{p-67f7aa48.system.entry.js → p-d748064a.system.entry.js} +1 -1
  170. package/dist/ripple/{p-948173a2.system.entry.js → p-d88a38be.system.entry.js} +1 -1
  171. package/dist/ripple/{p-c234c194.system.js → p-db9aa520.system.js} +1 -1
  172. package/dist/ripple/{p-936e4fc3.entry.js → p-dd4b472e.entry.js} +1 -1
  173. package/dist/ripple/{p-501aa9b9.entry.js → p-de1215f6.entry.js} +1 -1
  174. package/dist/ripple/{p-b65b9b4c.entry.js → p-e1d41109.entry.js} +1 -1
  175. package/dist/ripple/{p-703841a3.entry.js → p-e8325573.entry.js} +1 -1
  176. package/dist/ripple/{p-ff650269.system.entry.js → p-e870d3b6.system.entry.js} +1 -1
  177. package/dist/ripple/p-eb253749.system.js +1 -0
  178. package/dist/ripple/{p-2af01e17.system.entry.js → p-f07452f0.system.entry.js} +1 -1
  179. package/dist/ripple/{p-678483ca.entry.js → p-f3e5f455.entry.js} +1 -1
  180. package/dist/ripple/{p-91785165.entry.js → p-fcb7edda.entry.js} +1 -1
  181. package/dist/ripple/{p-eb74d85f.entry.js → p-fd045847.entry.js} +1 -1
  182. package/dist/ripple/{p-b55bb2ab.entry.js → p-ffe8376a.entry.js} +1 -1
  183. package/dist/ripple/ripple.esm.js +1 -1
  184. package/dist/ripple/ripple.js +1 -1
  185. package/dist/types/components/wm-search/wm-search.d.ts +1 -1
  186. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +2 -1
  187. package/dist/types/global/functions.d.ts +5 -1
  188. package/package.json +2 -2
  189. package/dist/esm-es5/app-globals-d3e3b925.js +0 -1
  190. package/dist/ripple/p-0494eb2c.system.js +0 -1
  191. package/dist/ripple/p-2785c796.entry.js +0 -1
  192. package/dist/ripple/p-46a5ea42.system.js +0 -1
  193. package/dist/ripple/p-6d0b3395.entry.js +0 -1
  194. package/dist/ripple/p-a5bdcf1b.entry.js +0 -1
  195. package/dist/ripple/p-c0157b4d.js +0 -1
  196. package/dist/ripple/p-de5b5ff0.system.entry.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { debounce, findScrollableParent, intl } from "../../../global/functions";
2
+ import { debounce, findAllScrollableParents, intl } from "../../../global/functions";
3
3
  export class ChartPopover {
4
4
  constructor() {
5
5
  this.chartEl = this.el.parentElement.getRootNode().host;
@@ -39,16 +39,21 @@ export class ChartPopover {
39
39
  componentDidLoad() {
40
40
  // set up event listeners for scrolling
41
41
  // to close popover on page scroll
42
- document.addEventListener("scroll", () => {
43
- this.debouncedClosePopover();
42
+ const scrollableParents = findAllScrollableParents(this.chartEl);
43
+ scrollableParents.forEach(scrollableParent => {
44
+ if (scrollableParent === document.documentElement) {
45
+ // For document element, listen to window scroll event
46
+ window.addEventListener("scroll", () => {
47
+ this.debouncedClosePopover();
48
+ });
49
+ }
50
+ else {
51
+ // For regular elements, listen to their scroll event
52
+ scrollableParent.addEventListener("scroll", () => {
53
+ this.debouncedClosePopover();
54
+ });
55
+ }
44
56
  });
45
- // ... and on parent scroll
46
- const scrollableParent = findScrollableParent(this.chartEl);
47
- if (!!scrollableParent) {
48
- scrollableParent.addEventListener("scroll", () => {
49
- this.debouncedClosePopover();
50
- });
51
- }
52
57
  }
53
58
  handleOpenChange() {
54
59
  this.intChartPopoverOpenChanged.emit(this.open);
@@ -111,11 +116,11 @@ export class ChartPopover {
111
116
  const titleAffordance = this.sliceDetails &&
112
117
  this.sliceDetails.title &&
113
118
  (this.sliceDetails.title[0] === "-" ? "negative" : this.sliceDetails.title[0] === "+" ? "positive" : "");
114
- return (h(Host, { key: 'd62b06c6554267fda571e17ec1cab1f38e9749cd' }, !!this.open && this.sliceDetails ? (h("div", { "aria-hidden": "true", class: "popover" }, h("h1", { class: `title ${titleAffordance}` }, this.sliceDetails.title), h("p", { class: "text" }, this.sliceDetails.text), this.sliceDetails.buttonText ? (
119
+ return (h(Host, { key: '25275e7ca9b1744629a4da08abccc1b99f301286' }, !!this.open && this.sliceDetails ? (h("div", { "aria-hidden": "true", class: "popover" }, h("h1", { class: `title ${titleAffordance}` }, this.sliceDetails.title), h("p", { class: "text" }, this.sliceDetails.text), this.sliceDetails.buttonText ? (
115
120
  // @ts-ignore
116
121
  h("button", { tabindex: "-1",
117
122
  // @ts-ignore
118
- focusable: "false", class: "popover-button", onClick: () => this.handleButtonClick() }, h("svg", { class: "btn-icon", height: "9", width: "9" }, h("path", { fill: "#575195", d: "M0 3.38v2.25h9V3.38H0zM0 0v2.25h4.5V0H0zm6.19 6.75H0V9h6.19V6.75z" })), h("span", { class: "button-text" }, this.sliceDetails.buttonText))) : (""))) : (""), h("div", { key: 'fb7f82f2ea6b6b37a6c25fdc542792244aeb3975', ref: (el) => (this.liveRegion = el), class: "live-region sr-only", "aria-live": "polite", "aria-atomic": "true" }, this.open && this.renderLiveRegion())));
123
+ focusable: "false", class: "popover-button", onClick: () => this.handleButtonClick() }, h("svg", { class: "btn-icon", height: "9", width: "9" }, h("path", { fill: "#575195", d: "M0 3.38v2.25h9V3.38H0zM0 0v2.25h4.5V0H0zm6.19 6.75H0V9h6.19V6.75z" })), h("span", { class: "button-text" }, this.sliceDetails.buttonText))) : (""))) : (""), h("div", { key: 'cdfdb9f58ebcbe375cc50214aac091c890587935', ref: (el) => (this.liveRegion = el), class: "live-region sr-only", "aria-live": "polite", "aria-atomic": "true" }, this.open && this.renderLiveRegion())));
119
124
  }
120
125
  static get is() { return "priv-chart-popover"; }
121
126
  static get originalStyleUrls() {
@@ -84,11 +84,13 @@ export class Search {
84
84
  //For search-and-find, the results should always restart at "[1 or 0] of ..." after any new input.
85
85
  //Reset the highlight count here just in case the new value doesn't end up changing the number of results.
86
86
  this.resetHighlightCountToStart();
87
+ // Results should be announced at every input, even if no change in results occurred
88
+ this.announceResults();
87
89
  }
88
90
  handleNumResultsUpdate() {
89
91
  this.resetHighlightCountToStart();
90
92
  if (this.value) {
91
- this.announceChanges();
93
+ this.announceResults();
92
94
  }
93
95
  }
94
96
  handleDisabledChange() {
@@ -105,7 +107,7 @@ export class Search {
105
107
  }
106
108
  this.announcement = message;
107
109
  }
108
- announceChanges() {
110
+ announceResults() {
109
111
  window.requestAnimationFrame(() => {
110
112
  // requestAnimationFrame to allow all changes to occur before announcing results
111
113
  let messageToAnnounce = this.resultCount;
@@ -130,7 +132,7 @@ export class Search {
130
132
  this.highlightedNum = newNum;
131
133
  }
132
134
  this.wmSearchBrowseResults.emit({ position: this.highlightedNum });
133
- this.announceChanges();
135
+ this.announceResults();
134
136
  }
135
137
  }
136
138
  handleBlur() {
@@ -166,10 +168,10 @@ export class Search {
166
168
  * End search and find render helpers
167
169
  */
168
170
  render() {
169
- return (h(Host, { key: '44fb666bb24ce19be5c1bb2b49da8e293d42f1de' }, h("div", { key: '134ffa5150ae4fbb63bffc6f2c34d42fad590205', id: "wm-search-wrapper", class: `wm-search-wrapper ${this.searchType}` }, h("input", { key: 'ac167e75f10db71531d4b9beea9c9e2ff3e1bdb1', disabled: this.isDisabled, id: "wm-search-input", placeholder: this.placeholder, "aria-label": `${this.label ? this.label + ". " : ""}${intl.formatMessage({
171
+ return (h(Host, { key: 'a6a5d00652d75c3f03ca996c283c0566ad229c68' }, h("div", { key: '1e7e8a9207a2ee1d5412cb2456c1c832060ac77d', id: "wm-search-wrapper", class: `wm-search-wrapper ${this.searchType}` }, h("input", { key: '1f36cf57bcfed0f808ef0b222d8eb65cb6518615', disabled: this.isDisabled, id: "wm-search-input", placeholder: this.placeholder, "aria-label": `${this.label ? this.label + ". " : ""}${intl.formatMessage({
170
172
  id: "search.typeToFilterResults",
171
173
  defaultMessage: "Type to filter the results",
172
- })}`, onInput: (ev) => this.updateValue(ev.target.value), onBlur: () => this.handleBlur(), "aria-autocomplete": "none", autocomplete: "off", value: this.value }), h("span", { key: '0c180be6082de7eddb06b2d15307fa85192915dc', class: "svg-icon svg-search" }), this.searchType === "find" && this.renderResultsAndBrowseButtons(), h("div", { key: '794b85e73e667dabcf8c0004d8e44a16f7a4197d', id: "wm-search-live", class: "sr-only", "aria-live": "polite", "aria-atomic": "true", ref: (el) => (this.resultsLiveRegion = el) }, this.announcement)), this.searchType === "find" && this.renderJumpToLink()));
174
+ })}`, onInput: (ev) => this.updateValue(ev.target.value), onBlur: () => this.handleBlur(), "aria-autocomplete": "none", autocomplete: "off", value: this.value }), h("span", { key: 'bf128d74c7fdbd590989d7999b1187d34b01bb31', class: "svg-icon svg-search" }), this.searchType === "find" && this.renderResultsAndBrowseButtons(), h("div", { key: '9898db1a5c0c3c0e13fb32782aa98d88f124798b', id: "wm-search-live", class: "sr-only", "aria-live": "polite", "aria-atomic": "true", ref: (el) => (this.resultsLiveRegion = el) }, this.announcement)), this.searchType === "find" && this.renderJumpToLink()));
173
175
  }
174
176
  static get is() { return "wm-search"; }
175
177
  static get encapsulation() { return "shadow"; }
@@ -1,20 +1,20 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import { showTooltip, hideTooltip, shouldOpenUp, shouldOpenDown, shouldShiftLeft, shouldShiftRight, intl, debounce, findScrollableParent, } from "../../global/functions";
2
+ import { showTooltip, hideTooltip, shouldOpenUp, shouldOpenDown, shouldShiftLeft, shouldShiftRight, intl, debounce, findAllScrollableParents, getCumulativeScrollOffset, } from "../../global/functions";
3
3
  export class Toggletip {
4
4
  constructor() {
5
+ this.scrollableParents = [];
5
6
  this.tooltipMessage = intl.formatMessage({
6
7
  id: "toggletip.moreInformation",
7
8
  defaultMessage: "More information",
8
9
  });
9
10
  this.debouncedReveal = debounce(() => {
10
- if (this.scrollableParent) {
11
- this.el.style.setProperty("--offset-x", "-" + this.scrollableParent.scrollLeft + "px");
12
- this.el.style.setProperty("--offset-y", "-" + this.scrollableParent.scrollTop + "px");
13
- }
11
+ const { x, y } = getCumulativeScrollOffset(this.el);
12
+ this.el.style.setProperty("--offset-x", "-" + x + "px");
13
+ this.el.style.setProperty("--offset-y", "-" + y + "px");
14
14
  this.isHidden = false;
15
15
  }, 100);
16
16
  this.debouncedResize = debounce(() => {
17
- this.scrollableParent = findScrollableParent(this.el);
17
+ this.scrollableParents = findAllScrollableParents(this.el);
18
18
  }, 200);
19
19
  this.label = undefined;
20
20
  this.tooltip = undefined;
@@ -89,16 +89,18 @@ export class Toggletip {
89
89
  }
90
90
  componentDidLoad() {
91
91
  if (!CSS.supports("top", "anchor(bottom)")) {
92
- this.scrollableParent = findScrollableParent(this.el);
93
- if (!!this.scrollableParent) {
94
- this.scrollableParent.addEventListener("scroll", () => {
95
- if (this.isOpen) {
96
- if (!this.isHidden)
97
- this.isHidden = true;
98
- this.debouncedReveal();
99
- }
100
- });
101
- }
92
+ this.scrollableParents = findAllScrollableParents(this.el);
93
+ // Add scroll listeners to all scrollable parents
94
+ this.scrollableParents.forEach(parent => {
95
+ if (parent === document.documentElement) {
96
+ // For document element, listen to window scroll event
97
+ window.addEventListener("scroll", () => this.handleScroll());
98
+ }
99
+ else {
100
+ // For regular elements, listen to their scroll event
101
+ parent.addEventListener("scroll", () => this.handleScroll());
102
+ }
103
+ });
102
104
  }
103
105
  }
104
106
  handleResize() {
@@ -130,6 +132,13 @@ export class Toggletip {
130
132
  }
131
133
  }
132
134
  }
135
+ handleScroll() {
136
+ if (this.isOpen) {
137
+ if (!this.isHidden)
138
+ this.isHidden = true;
139
+ this.debouncedReveal();
140
+ }
141
+ }
133
142
  open() {
134
143
  // the popover API takes care of the actual opening.
135
144
  // toggletip is visually hidden by default so it can be measured and repositioned.
@@ -139,11 +148,9 @@ export class Toggletip {
139
148
  this.toggletipEl.classList.add(this.toggletipPosition);
140
149
  // handling scroll offset for older browsers (currently FF and Safari)
141
150
  if (!CSS.supports("top", "anchor(bottom)")) {
142
- this.scrollableParent = findScrollableParent(this.el);
143
- if (!!this.scrollableParent) {
144
- this.el.style.setProperty("--offset-x", "-" + this.scrollableParent.scrollLeft + "px");
145
- this.el.style.setProperty("--offset-y", "-" + this.scrollableParent.scrollTop + "px");
146
- }
151
+ const { x, y } = getCumulativeScrollOffset(this.el);
152
+ this.el.style.setProperty("--offset-x", "-" + x + "px");
153
+ this.el.style.setProperty("--offset-y", "-" + y + "px");
147
154
  }
148
155
  this.toggletipEl.classList.remove("hidden");
149
156
  });
@@ -162,9 +169,9 @@ export class Toggletip {
162
169
  }, 10);
163
170
  }
164
171
  render() {
165
- return (h(Host, { key: 'c4f1f99b1b4991ef7bef8763f36cf684100e44ec', class: `size-${this.targetSize}` }, h("button", { key: '9ca73e3a4d53c58ed96c148a6c1c184d2360bd35', class: "button", type: "button", "aria-label": this.label, popoverTarget: "toggletip", popoverTargetAction: "toggle", onClick: () => this.open(),
172
+ return (h(Host, { key: 'a55a8dfabeac705978cc92af0a9d08a146fc9be0', class: `size-${this.targetSize}` }, h("button", { key: '65a11752911b7f4db68c30c8da0a382fbf8ae687', class: "button", type: "button", "aria-label": this.label, popoverTarget: "toggletip", popoverTargetAction: "toggle", onClick: () => this.open(),
166
173
  // In order to position the tooltip identically to the toggletip, its presence is determined by these four events
167
- onMouseEnter: () => !this.isOpen && showTooltip(this.toggletipPosition, this.el, this.tooltipMessage), onMouseLeave: () => hideTooltip(), onFocus: () => !this.isOpen && showTooltip(this.toggletipPosition, this.el, this.tooltipMessage), onBlur: () => this.handleBlur() }, h("div", { key: '46e7410232d32cac61fe4cd29a195fcd689251d7', class: "svg-icon svg-info" })), h("div", { key: '9a689f66818b357e2729654099a52075a624f5f6', popover: "", ref: (el) => (this.toggletipEl = el), class: `toggletip ${this.targetSize} ${this.isHidden ? "hidden" : ""}`, id: "toggletip" }, this.tooltip), h("div", { key: 'd792b4e03c3628cd44978e63969cb780481d8003', ref: (el) => (this.liveRegionEl = el), class: "live-region sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true" })));
174
+ onMouseEnter: () => !this.isOpen && showTooltip(this.toggletipPosition, this.el, this.tooltipMessage), onMouseLeave: () => hideTooltip(), onFocus: () => !this.isOpen && showTooltip(this.toggletipPosition, this.el, this.tooltipMessage), onBlur: () => this.handleBlur() }, h("div", { key: '371bd1c9111743351e856e8bf3573894cd252262', class: "svg-icon svg-info" })), h("div", { key: 'cc4b2547678bce5e6803a3d53358e9ccbc4aafca', popover: "", ref: (el) => (this.toggletipEl = el), class: `toggletip ${this.targetSize} ${this.isHidden ? "hidden" : ""}`, id: "toggletip" }, this.tooltip), h("div", { key: '1744407f0b73c50aa5972a8dda5eb8dd25ddcd44', ref: (el) => (this.liveRegionEl = el), class: "live-region sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true" })));
168
175
  }
169
176
  static get is() { return "wm-toggletip"; }
170
177
  static get encapsulation() { return "shadow"; }
@@ -1,9 +1,9 @@
1
1
  requestAnimationFrame(() => {
2
- // put toggletip in shadow DOM
2
+ // put toggletip in shadow DOM (now inside scrollable wrapper)
3
3
  const host = document.querySelector("#host");
4
4
  const shadow = host.attachShadow({ mode: "open" });
5
5
  const tsd = document.querySelector("#tsd");
6
- tsd.label = "Toggletip in shadow DOM";
7
- tsd.tooltip = "Toggletip in shadow DOM";
6
+ tsd.label = "Toggletip in shadow DOM with scrollable parent";
7
+ tsd.tooltip = "This should account for the red container's scroll offset";
8
8
  shadow.appendChild(tsd);
9
9
  });
@@ -73,20 +73,69 @@ export function getPosition(el) {
73
73
  }
74
74
  return { x, y };
75
75
  }
76
- export function findScrollableParent(el) {
77
- while (!!el) {
78
- if (["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
79
- return el;
76
+ function getParentOrHost(el) {
77
+ let nextEl = el.parentElement;
78
+ if (!nextEl) {
79
+ // Check if we're at a shadow root boundary
80
+ const rootNode = el.getRootNode();
81
+ if (rootNode instanceof ShadowRoot && rootNode.host) {
82
+ nextEl = rootNode.host;
80
83
  }
81
- el = el.parentElement;
82
84
  }
85
+ return nextEl;
86
+ }
87
+ export function findAllScrollableParents(el) {
88
+ const scrollableParents = [];
89
+ let currentEl = getParentOrHost(el);
90
+ // Traverse up to and including the document.documentElement (html element)
91
+ while (currentEl) {
92
+ const style = window.getComputedStyle(currentEl);
93
+ if (["scroll", "auto"].includes(style.overflowY) || ["scroll", "auto"].includes(style.overflowX)) {
94
+ scrollableParents.push(currentEl);
95
+ }
96
+ if (currentEl.assignedSlot) {
97
+ // Redirect to shadow dom if element is in a slot
98
+ currentEl = currentEl.assignedSlot;
99
+ }
100
+ currentEl = getParentOrHost(currentEl);
101
+ }
102
+ if (document.documentElement && !scrollableParents.includes(document.documentElement)) {
103
+ // Check if the document itself is scrollable (common case for page-level scrolling)
104
+ // Special case: document element can scroll even with overflow: visible when content overflows viewport
105
+ const htmlStyle = window.getComputedStyle(document.documentElement);
106
+ if (["scroll", "auto"].includes(htmlStyle.overflowY) || ["scroll", "auto"].includes(htmlStyle.overflowX) ||
107
+ // For document element only: also check if page content can actually scroll
108
+ document.documentElement.scrollHeight > document.documentElement.clientHeight ||
109
+ document.documentElement.scrollWidth > document.documentElement.clientWidth) {
110
+ scrollableParents.push(document.documentElement);
111
+ }
112
+ }
113
+ return scrollableParents;
114
+ }
115
+ export function getCumulativeScrollOffset(el) {
116
+ const scrollableParents = findAllScrollableParents(el);
117
+ let totalScrollX = 0;
118
+ let totalScrollY = 0;
119
+ scrollableParents.forEach(parent => {
120
+ if (parent === document.documentElement) {
121
+ // For the document element, use window scroll values
122
+ totalScrollX += window.scrollX || window.pageXOffset || 0;
123
+ totalScrollY += window.scrollY || window.pageYOffset || 0;
124
+ }
125
+ else {
126
+ // For regular elements, use scrollLeft/scrollTop
127
+ totalScrollX += parent.scrollLeft;
128
+ totalScrollY += parent.scrollTop;
129
+ }
130
+ });
131
+ return { x: totalScrollX, y: totalScrollY };
83
132
  }
84
133
  export function findParentWithHiddenOverflow(el) {
85
134
  while (!!el) {
86
135
  if (window.getComputedStyle(el).overflowY !== "visible") {
87
136
  return el;
88
137
  }
89
- el = el.parentElement;
138
+ el = getParentOrHost(el);
90
139
  }
91
140
  }
92
141
  export function isElOrChild(componentEl, el) {
@@ -1,6 +1,6 @@
1
1
  import './index-130e07bb.js';
2
2
 
3
- const version = "5.14.0";
3
+ const version = "5.15.0-alpha.0";
4
4
 
5
5
  // PRINT RIPPLE VERSION IN CONSOLE
6
6
  // test envs return 0 for plugin.length
@@ -1,5 +1,5 @@
1
1
  import { h } from './index-130e07bb.js';
2
- import { i as intl, c as checkForActiveElInShadow, e as safeMultiplyFloat, f as getPosition } from './functions-aad18286.js';
2
+ import { i as intl, c as checkForActiveElInShadow, e as safeMultiplyFloat, f as getPosition } from './functions-85bc4418.js';
3
3
 
4
4
  const colors = {
5
5
  salmon: "#ff5f4e",
@@ -9820,20 +9820,69 @@ function getPosition(el) {
9820
9820
  }
9821
9821
  return { x, y };
9822
9822
  }
9823
- function findScrollableParent(el) {
9824
- while (!!el) {
9825
- if (["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
9826
- return el;
9823
+ function getParentOrHost(el) {
9824
+ let nextEl = el.parentElement;
9825
+ if (!nextEl) {
9826
+ // Check if we're at a shadow root boundary
9827
+ const rootNode = el.getRootNode();
9828
+ if (rootNode instanceof ShadowRoot && rootNode.host) {
9829
+ nextEl = rootNode.host;
9827
9830
  }
9828
- el = el.parentElement;
9829
9831
  }
9832
+ return nextEl;
9833
+ }
9834
+ function findAllScrollableParents(el) {
9835
+ const scrollableParents = [];
9836
+ let currentEl = getParentOrHost(el);
9837
+ // Traverse up to and including the document.documentElement (html element)
9838
+ while (currentEl) {
9839
+ const style = window.getComputedStyle(currentEl);
9840
+ if (["scroll", "auto"].includes(style.overflowY) || ["scroll", "auto"].includes(style.overflowX)) {
9841
+ scrollableParents.push(currentEl);
9842
+ }
9843
+ if (currentEl.assignedSlot) {
9844
+ // Redirect to shadow dom if element is in a slot
9845
+ currentEl = currentEl.assignedSlot;
9846
+ }
9847
+ currentEl = getParentOrHost(currentEl);
9848
+ }
9849
+ if (document.documentElement && !scrollableParents.includes(document.documentElement)) {
9850
+ // Check if the document itself is scrollable (common case for page-level scrolling)
9851
+ // Special case: document element can scroll even with overflow: visible when content overflows viewport
9852
+ const htmlStyle = window.getComputedStyle(document.documentElement);
9853
+ if (["scroll", "auto"].includes(htmlStyle.overflowY) || ["scroll", "auto"].includes(htmlStyle.overflowX) ||
9854
+ // For document element only: also check if page content can actually scroll
9855
+ document.documentElement.scrollHeight > document.documentElement.clientHeight ||
9856
+ document.documentElement.scrollWidth > document.documentElement.clientWidth) {
9857
+ scrollableParents.push(document.documentElement);
9858
+ }
9859
+ }
9860
+ return scrollableParents;
9861
+ }
9862
+ function getCumulativeScrollOffset(el) {
9863
+ const scrollableParents = findAllScrollableParents(el);
9864
+ let totalScrollX = 0;
9865
+ let totalScrollY = 0;
9866
+ scrollableParents.forEach(parent => {
9867
+ if (parent === document.documentElement) {
9868
+ // For the document element, use window scroll values
9869
+ totalScrollX += window.scrollX || window.pageXOffset || 0;
9870
+ totalScrollY += window.scrollY || window.pageYOffset || 0;
9871
+ }
9872
+ else {
9873
+ // For regular elements, use scrollLeft/scrollTop
9874
+ totalScrollX += parent.scrollLeft;
9875
+ totalScrollY += parent.scrollTop;
9876
+ }
9877
+ });
9878
+ return { x: totalScrollX, y: totalScrollY };
9830
9879
  }
9831
9880
  function findParentWithHiddenOverflow(el) {
9832
9881
  while (!!el) {
9833
9882
  if (window.getComputedStyle(el).overflowY !== "visible") {
9834
9883
  return el;
9835
9884
  }
9836
- el = el.parentElement;
9885
+ el = getParentOrHost(el);
9837
9886
  }
9838
9887
  }
9839
9888
  function isElOrChild(componentEl, el) {
@@ -10487,4 +10536,4 @@ const weekdays = [
10487
10536
  intl.formatMessage({ id: "date.saturday", defaultMessage: "Saturday" }),
10488
10537
  ];
10489
10538
 
10490
- export { getTextDir as A, isElOrChild as B, throttle as C, getContextMeasurements as D, dateFind as E, calendar_months as F, findParentWithHiddenOverflow as G, transposeMatrix as H, wrapAround as I, getSmallestSkipInterval as J, calcPercentageInRange as K, makeISO as L, getMonthLength as M, weekdays as N, handleDisabledAttribute as a, triggerFormSubmit as b, checkForActiveElInShadow as c, debounce as d, safeMultiplyFloat as e, getPosition as f, generateId as g, hideTooltip as h, intl as i, dateToISO as j, shouldOpenUp as k, hasRoomRight as l, truncateText as m, getLastFocusableDescendant as n, csvToArray as o, snakeCaseToCamelCase as p, getNewIndexToFocus as q, findScrollableParent as r, showTooltip as s, toBool as t, shouldOpenDown as u, shouldShiftRight as v, shouldShiftLeft as w, measureText as x, findNext as y, findPrev as z };
10539
+ export { findPrev as A, getTextDir as B, isElOrChild as C, throttle as D, getContextMeasurements as E, dateFind as F, calendar_months as G, findParentWithHiddenOverflow as H, transposeMatrix as I, wrapAround as J, getSmallestSkipInterval as K, calcPercentageInRange as L, makeISO as M, getMonthLength as N, weekdays as O, handleDisabledAttribute as a, triggerFormSubmit as b, checkForActiveElInShadow as c, debounce as d, safeMultiplyFloat as e, getPosition as f, generateId as g, hideTooltip as h, intl as i, dateToISO as j, shouldOpenUp as k, hasRoomRight as l, truncateText as m, getLastFocusableDescendant as n, csvToArray as o, snakeCaseToCamelCase as p, getNewIndexToFocus as q, getCumulativeScrollOffset as r, showTooltip as s, toBool as t, findAllScrollableParents as u, shouldOpenDown as v, shouldShiftRight as w, shouldShiftLeft as x, measureText as y, findNext as z };
@@ -1,4 +1,4 @@
1
- import { i as intl } from './functions-aad18286.js';
1
+ import { i as intl } from './functions-85bc4418.js';
2
2
 
3
3
  const globalMessages = {
4
4
  characterLimitReached: intl.formatMessage({
@@ -1,6 +1,6 @@
1
1
  import { b as bootstrapLazy } from './index-130e07bb.js';
2
2
  export { s as setNonce } from './index-130e07bb.js';
3
- import { g as globalScripts } from './app-globals-d3e3b925.js';
3
+ import { g as globalScripts } from './app-globals-3753b41d.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;