@watermarkinsights/ripple 5.20.0-alpha.12 → 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.
- package/dist/cjs/{app-globals-e35143b9.js → app-globals-4aa6714d.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ripple.cjs.js +1 -1
- package/dist/cjs/wm-option_2.cjs.entry.js +22 -9
- package/dist/collection/components/selects/wm-select/wm-select.css +0 -1
- package/dist/collection/components/selects/wm-select/wm-select.js +21 -8
- package/dist/esm/{app-globals-289e89c8.js → app-globals-f4e5a389.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ripple.js +1 -1
- package/dist/esm/wm-option_2.entry.js +22 -9
- package/dist/esm-es5/{app-globals-289e89c8.js → app-globals-f4e5a389.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/ripple/{p-0f7725a3.system.js → p-55521f22.system.js} +1 -1
- package/dist/ripple/{p-0253a6eb.js → p-78528fe5.js} +1 -1
- package/dist/ripple/{p-2c1df302.system.js → p-8e09479c.system.js} +1 -1
- package/dist/ripple/{p-1fcf0ea8.system.entry.js → p-e1d5c187.system.entry.js} +1 -1
- package/dist/ripple/{p-b921ee01.entry.js → p-fc135d6d.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/selects/wm-select/wm-select.d.ts +3 -2
- package/package.json +2 -2
|
@@ -68,7 +68,7 @@ export class Select {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
handleToggle(ev) {
|
|
71
|
-
ev.newState === "open" ? this.
|
|
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
|
-
|
|
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
|
-
},
|
|
138
|
+
}, 100);
|
|
129
139
|
}
|
|
130
140
|
}
|
|
131
|
-
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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"; }
|
package/dist/esm/loader.js
CHANGED
|
@@ -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-
|
|
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;
|
package/dist/esm/ripple.js
CHANGED
|
@@ -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-
|
|
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
|