@watermarkinsights/ripple 5.20.0-alpha.11 → 5.20.0-alpha.13

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 (30) hide show
  1. package/dist/cjs/{app-globals-6817b91e.js → app-globals-4aa6714d.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/ripple.cjs.js +1 -1
  4. package/dist/cjs/wm-option_2.cjs.entry.js +22 -9
  5. package/dist/cjs/wm-tab-item_3.cjs.entry.js +7 -4
  6. package/dist/collection/components/selects/wm-select/wm-select.css +0 -1
  7. package/dist/collection/components/selects/wm-select/wm-select.js +21 -8
  8. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +7 -4
  9. package/dist/esm/{app-globals-875a52fe.js → app-globals-f4e5a389.js} +1 -1
  10. package/dist/esm/loader.js +1 -1
  11. package/dist/esm/ripple.js +1 -1
  12. package/dist/esm/wm-option_2.entry.js +22 -9
  13. package/dist/esm/wm-tab-item_3.entry.js +7 -4
  14. package/dist/esm-es5/{app-globals-875a52fe.js → app-globals-f4e5a389.js} +1 -1
  15. package/dist/esm-es5/loader.js +1 -1
  16. package/dist/esm-es5/ripple.js +1 -1
  17. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  18. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  19. package/dist/ripple/p-2f8bad10.entry.js +1 -0
  20. package/dist/ripple/{p-f9830a37.system.js → p-55521f22.system.js} +1 -1
  21. package/dist/ripple/{p-19ee7c75.js → p-78528fe5.js} +1 -1
  22. package/dist/ripple/{p-99302224.system.js → p-8e09479c.system.js} +1 -1
  23. package/dist/ripple/{p-1fcf0ea8.system.entry.js → p-e1d5c187.system.entry.js} +1 -1
  24. package/dist/ripple/{p-b921ee01.entry.js → p-fc135d6d.entry.js} +1 -1
  25. package/dist/ripple/{p-f9c88d5b.system.entry.js → p-fe697924.system.entry.js} +1 -1
  26. package/dist/ripple/ripple.esm.js +1 -1
  27. package/dist/ripple/ripple.js +1 -1
  28. package/dist/types/components/selects/wm-select/wm-select.d.ts +3 -2
  29. package/package.json +2 -2
  30. package/dist/ripple/p-6b9e6233.entry.js +0 -1
@@ -68,7 +68,7 @@ export class Select {
68
68
  }
69
69
  }
70
70
  handleToggle(ev) {
71
- ev.newState === "open" ? this.open() : this.close();
71
+ ev.newState === "open" ? this.onOpen() : this.onClose();
72
72
  }
73
73
  dropdownPosition() {
74
74
  // polyfill for opening up or down + positioning according to screen
@@ -108,7 +108,7 @@ export class Select {
108
108
  }
109
109
  this.isHidden = false;
110
110
  }
111
- open() {
111
+ onOpen() {
112
112
  if (!this.isExpanded && !this.isDisabled) {
113
113
  // polyfill for browsers without anchor() support (FF)
114
114
  if (!this.hasAnchor) {
@@ -119,18 +119,31 @@ export class Select {
119
119
  const hasSpaceBelow = this.dropdownEl.offsetHeight <= document.documentElement.clientHeight - anchorRect.bottom;
120
120
  const hasSpaceAbove = this.dropdownEl.offsetHeight <= anchorRect.top;
121
121
  this.openUp = !hasSpaceBelow && hasSpaceAbove;
122
+ if (!hasSpaceBelow && !hasSpaceAbove) {
123
+ // dropdown will open downwards but doesn't have enough space
124
+ // it needs to be absolutely positioned + html has to have overflow-y auto
125
+ // (the default, but could have been overriden)
126
+ // in order to ensure the options can be scrolled to
127
+ // (would already be possible if the page has content below. this is in case select was at bottom of page)
128
+ this.initialHtmlOverflowY = document.documentElement.style.overflowY;
129
+ document.documentElement.style.overflowY = "auto";
130
+ this.dropdownEl.style.position = "absolute";
131
+ }
122
132
  this.isExpanded = true;
123
133
  });
124
134
  setTimeout(() => {
125
135
  // focusing doesn't work when within requestAnimationFrame
126
136
  this.optionListEl.handleInitialFocus(this.elToFocus);
127
137
  this.elToFocus = undefined;
128
- }, 50);
138
+ }, 100);
129
139
  }
130
140
  }
131
- close() {
141
+ onClose() {
132
142
  if (this.isExpanded) {
133
143
  this.optionListEl.unfocusAll();
144
+ // see onOpen
145
+ document.documentElement.style.overflowY = this.initialHtmlOverflowY || "";
146
+ this.dropdownEl.style.position = "fixed";
134
147
  window.setTimeout(() => {
135
148
  if (!this.hasAnchor) {
136
149
  this.isHidden = true;
@@ -301,14 +314,14 @@ export class Select {
301
314
  }
302
315
  render() {
303
316
  const showSubinfo = !this.multiple && this.selectedOptions.length > 0 && this.selectedOptions[0].subinfo;
304
- return (h(Host, { key: '4ec7d687b40ffcef80fbce21e6880680c72d03a7', onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { key: 'c400196d862a763af6f4f5d4663a8f3e805a9ddd', class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '1c7df9eee5ebc62a12bd36e97918e144c7e4dc72', class: "label-wrapper" }, h("label", { key: '752c9ce6491c959afda2105a5e2c6063ce4ee52e', class: "label", id: "label", htmlFor: "selectbtn", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label),
317
+ return (h(Host, { key: '3fcd03885fbfcc151122eeaa6b2ea5d66bca8087', onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { key: 'c2d9380b84acfe546c93be0aeabab2b26f0e8679', class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: 'bec7ca8c61ecfab6a3ffddda763afca1a33feb05', class: "label-wrapper" }, h("label", { key: '15da16525dcd6ac3920fc04c7cb1bef5a5538c4b', class: "label", id: "label", htmlFor: "selectbtn", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label),
305
318
  // we can't use aria-required because the listbox is in a sub-component and it is not announced
306
- this.requiredField && (h("span", { key: 'c0b4660ed16129c1a3aaf5252aa5e7c71eb42f20', class: "required" }, h("span", { key: '8c4a41df3473c88021f8d73f09fdfd33e3ad1c48', class: "sr-only" }, globalMessages.requiredField), h("span", { key: '303e6f18bef3d30b32508c6192ac363bbc8fb80c', "aria-hidden": "true" }, "*")))), h("div", { key: '7acc269a0e60042549cbc3fc6879b3e471f1b016', class: "button-wrapper" }, h("button", { key: 'd1e7751c22951130f92ca6fdc2c9f253e4e63b5b', id: "selectbtn", disabled: this.isDisabled, "aria-labelledby": "label selectbtn", "aria-describedby": "error", popoverTarget: "dropdown", popoverTargetAction: "toggle", class: "displayedoption", ref: (el) => (this.buttonEl = el) }, h("span", { key: '6236a027968e849c873e1d09bf89910ca627b760', class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, h("span", { key: '3af139e809e636873cd53dfb53141c0c606e4963', class: "button-text" }, this.renderButtonText()), showSubinfo && h("span", { key: '5894b37ef490101b0ba38547745f450c0521a8ea', class: "subinfo" }, this.selectedOptions[0].subinfo)), h("div", { key: '6bce5cbddd6160c0d2eeb8de27ed7f0d46fffb38', class: `expand-icon svg-icon ${this.isExpanded ? "svg-expand-less" : "svg-expand-more"}` }), this.renderOverflowCount(), h("div", { key: 'a0d9da60b818f8a576f6fcaab422b9ec31d42fd4', ref: (el) => (this.measurementAreaEl = el), class: "measurement-area", "aria-hidden": "true" })), h("div", { key: 'dc70db1f203700702cf3586412eef64ab108b86f',
319
+ this.requiredField && (h("span", { key: 'a9beeb0b4ef38862af732f158021855bd78cef42', class: "required" }, h("span", { key: '9ff60a2e20dc60549318f867d4b7a6c10d541f8b', class: "sr-only" }, globalMessages.requiredField), h("span", { key: 'e2cf635fb00b871d990629a1607221ea7c2e1f88', "aria-hidden": "true" }, "*")))), h("div", { key: 'c5605786b12c33cddb06cedff0c994478d4acff4', class: "button-wrapper" }, h("button", { key: 'd1712c1d8069766f0228ffd85247685f3bafa540', id: "selectbtn", disabled: this.isDisabled, "aria-labelledby": "label selectbtn", "aria-describedby": "error", popoverTarget: "dropdown", popoverTargetAction: "toggle", class: "displayedoption", ref: (el) => (this.buttonEl = el) }, h("span", { key: '38fd12103e1da0037d9b3c845cfd1cd6e4a64a32', class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, h("span", { key: 'd5708f71ce4610455d0eecda4d3e5f1e39ff625b', class: "button-text" }, this.renderButtonText()), showSubinfo && h("span", { key: '0c4c7d045c687672248ca9346a9d6d51ef0d7989', class: "subinfo" }, this.selectedOptions[0].subinfo)), h("div", { key: 'cc1ba9b5123efd0e29004d9837dc9856d229416b', class: `expand-icon svg-icon ${this.isExpanded ? "svg-expand-less" : "svg-expand-more"}` }), this.renderOverflowCount(), h("div", { key: 'd97730b3fd77457642d81704fde92929d818f842', ref: (el) => (this.measurementAreaEl = el), class: "measurement-area", "aria-hidden": "true" })), h("div", { key: 'dd8ee12a983657908640c38c981a76735b0e211e',
307
320
  // is-open is for the CSS transition in modern browsers
308
321
  // hidden is to wait for position calculations in Firefox
309
322
  class: `dropdown ${this.isExpanded ? "is-open" : ""} ${this.isHidden ? "hidden" : ""} ${this.openUp ? "upward" : ""}`, id: "dropdown", popover: "auto", ref: (el) => (this.dropdownEl = el),
310
323
  // @ts-ignore -- don't tell typescript but we're in the future
311
- onToggle: (ev) => this.handleToggle(ev) }, h("priv-option-list", { key: '09db81570f9990ec4cf87f16b52320ec82701a04', ref: (el) => (this.optionListEl = el), multiple: this.multiple, search: this.search, selectAll: this.selectAll, maxHeight: this.maxHeight, searchPlaceholder: this.searchPlaceholder, onOptionListCloseRequested: () => {
324
+ onToggle: (ev) => this.handleToggle(ev) }, h("priv-option-list", { key: '9706c17c9e999007f196e631e75684dbde28964e', ref: (el) => (this.optionListEl = el), multiple: this.multiple, search: this.search, selectAll: this.selectAll, maxHeight: this.maxHeight, searchPlaceholder: this.searchPlaceholder, onOptionListCloseRequested: () => {
312
325
  this.dropdownEl.hidePopover();
313
326
  }, onOptionListAllSelected: () => {
314
327
  this.returnFocus = true;
@@ -316,7 +329,7 @@ export class Select {
316
329
  }, onOptionListAllDeselected: () => {
317
330
  this.returnFocus = true;
318
331
  this.wmSelectAllDeselected.emit();
319
- } }, h("slot", { key: '420515d805ad1039ed3b72bd2968a0a29c27a5fc' }))), h("div", { key: '3bda216f90f3d6b10b92034996d3bdc90a4ffd60', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage), h("div", { key: '032fb47f7c64c04d518740dbcb31efcd761baed6', id: "announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
332
+ } }, h("slot", { key: 'd828427ecec9469efbf4b18343b966800c8b54dd' }))), h("div", { key: '6cecc516bbd4b0be21604d76bf4ffc5b073f1b45', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage), h("div", { key: '3579651121bb56282663827993aaf11de1d09d32', id: "announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
320
333
  }
321
334
  static get is() { return "wm-select"; }
322
335
  static get encapsulation() { return "shadow"; }
@@ -54,11 +54,14 @@ export class TabList {
54
54
  componentDidLoad() {
55
55
  const selectedTab = this.selectedTab || this.tabItems[0].tabId;
56
56
  this.setSelected(selectedTab);
57
- this.handleTabFocused(this.selectedTabItem);
58
57
  this.updateArrowVisibility();
59
58
  this.tabContainerEl.addEventListener("scroll", this.debouncedUpdateContainerState);
60
59
  const resizeObserver = new ResizeObserver(() => this.debouncedUpdateContainerState());
61
60
  resizeObserver.observe(this.el);
61
+ requestAnimationFrame(() => {
62
+ // Wait for layout to complete before measuring and scrolling initial tab into view
63
+ this.handleTabFocused(this.selectedTabItem);
64
+ });
62
65
  }
63
66
  tabItemLoaded(ev) {
64
67
  this.setAriaOnPanelAndTab(ev.target);
@@ -254,15 +257,15 @@ export class TabList {
254
257
  this.announcement = message;
255
258
  }
256
259
  render() {
257
- return (h(Host, { key: '3ca0e37138d368c09ec188b8023ec1bc9cda9428' }, h("div", { key: '3c7ead3f44a7c03980eefde2a36e64d7c62da7b9', class: "component-wrapper" }, h("wm-button", { key: '979ea44451d40012037b169201d9b7f84f432e2f', class: `left-arrow ${this.scrollArrowsVisible ? "visible" : ""}`, "aria-controls": "tablist", customBackground: this.customBackground, buttonType: "navigational", icon: "#previous", tooltip: intl.formatMessage({
260
+ return (h(Host, { key: '5818027d2cb7470679c21ac94fef8bae53395054' }, h("div", { key: '02a4a7678765a6cbf269c01d4e2f2f8afcde8cb1', class: "component-wrapper" }, h("wm-button", { key: '267436b0e7f4dae88da12517527ca0dbf324d0b0', class: `left-arrow ${this.scrollArrowsVisible ? "visible" : ""}`, "aria-controls": "tablist", customBackground: this.customBackground, buttonType: "navigational", icon: "#previous", tooltip: intl.formatMessage({
258
261
  id: "tabs.showPreviousTabs",
259
262
  defaultMessage: "Show previous tabs",
260
263
  description: "Tooltip for button scrolling tab group.",
261
- }), onClick: (ev) => this.handleLeftArrowClick(ev) }), h("ul", { key: '993e39f11a24760262c017d40ca1691cb8e8a093', id: "tablist", ref: (el) => (this.tabContainerEl = el), class: `tabcontainer ${this.customBackground || ""} ${this.containerFadeLeft ? "fade-left" : ""} ${this.containerFadeRight ? "fade-right" : ""}`, role: "tablist", tabIndex: -1 }, h("slot", { key: '0e6176cd6fc3c360016dd98cc6c1d3443bead0d3' })), h("wm-button", { key: '40b09e7e81013467eff14d8fe5855ded630888d7', class: `right-arrow ${this.scrollArrowsVisible ? "visible" : ""}`, "aria-controls": "tablist", customBackground: this.customBackground, buttonType: "navigational", icon: "#next", tooltip: intl.formatMessage({
264
+ }), onClick: (ev) => this.handleLeftArrowClick(ev) }), h("ul", { key: '4983447234c47552d424d4572ae794503eb536fd', id: "tablist", ref: (el) => (this.tabContainerEl = el), class: `tabcontainer ${this.customBackground || ""} ${this.containerFadeLeft ? "fade-left" : ""} ${this.containerFadeRight ? "fade-right" : ""}`, role: "tablist", tabIndex: -1 }, h("slot", { key: '40d3c063e98bf2fbec8d9e92ecc8ada156cea2ea' })), h("wm-button", { key: 'bc45390e49d2246cd16b24a1159720308a3fe24f', class: `right-arrow ${this.scrollArrowsVisible ? "visible" : ""}`, "aria-controls": "tablist", customBackground: this.customBackground, buttonType: "navigational", icon: "#next", tooltip: intl.formatMessage({
262
265
  id: "tabs.showNextTabs",
263
266
  defaultMessage: "Show next tabs",
264
267
  description: "Tooltip for button scrolling tab group.",
265
- }), onClick: (ev) => this.handleRightArrowClick(ev) }), h("span", { key: 'bc41b920586e762674761ba973ed91a041d2022e', "aria-live": "assertive", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement))));
268
+ }), onClick: (ev) => this.handleRightArrowClick(ev) }), h("span", { key: 'c98334986ffe5ffc47d0b48d141c2d985772b3e5', "aria-live": "assertive", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement))));
266
269
  }
267
270
  static get is() { return "wm-tab-list"; }
268
271
  static get encapsulation() { return "shadow"; }
@@ -1,6 +1,6 @@
1
1
  import './index-130e07bb.js';
2
2
 
3
- const version = "5.20.0-alpha.11";
3
+ const version = "5.20.0-alpha.13";
4
4
 
5
5
  // PRINT RIPPLE VERSION IN CONSOLE
6
6
  // test envs return 0 for plugin.length
@@ -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-875a52fe.js';
3
+ import { g as globalScripts } from './app-globals-f4e5a389.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
@@ -1,6 +1,6 @@
1
1
  import { p as promiseResolve, 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-875a52fe.js';
3
+ import { g as globalScripts } from './app-globals-f4e5a389.js';
4
4
 
5
5
  /*
6
6
  Stencil Client Patch Browser v4.21.0 | MIT Licensed | https://stenciljs.com