@watermarkinsights/ripple 5.20.0-alpha.12 → 5.20.0-alpha.14
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-fc0a04d8.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-option/wm-option.css +5 -10
- package/dist/collection/components/selects/wm-select/wm-select.css +0 -1
- package/dist/collection/components/selects/wm-select/wm-select.js +20 -7
- package/dist/esm/{app-globals-289e89c8.js → app-globals-9401ec2f.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-9401ec2f.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-1fcf0ea8.system.entry.js → p-2f7e25a2.system.entry.js} +1 -1
- package/dist/ripple/{p-b921ee01.entry.js → p-47e87534.entry.js} +1 -1
- package/dist/ripple/{p-0253a6eb.js → p-75b8ee19.js} +1 -1
- package/dist/ripple/{p-2c1df302.system.js → p-d4a2bac5.system.js} +1 -1
- package/dist/ripple/{p-0f7725a3.system.js → p-f031c5c2.system.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
|
@@ -876,11 +876,6 @@
|
|
|
876
876
|
color: var(--wmcolor-select-option-text);
|
|
877
877
|
user-select: none;
|
|
878
878
|
}
|
|
879
|
-
:host:focus, :host.focus {
|
|
880
|
-
outline: none;
|
|
881
|
-
background: var(--wmcolor-select-option-background-focus);
|
|
882
|
-
color: var(--wmcolor-interactive-text);
|
|
883
|
-
}
|
|
884
879
|
:host.icon {
|
|
885
880
|
color: var(--wmcolor-interactive);
|
|
886
881
|
}
|
|
@@ -993,13 +988,13 @@
|
|
|
993
988
|
pointer-events: none;
|
|
994
989
|
}
|
|
995
990
|
|
|
996
|
-
:host(:focus
|
|
991
|
+
:host(:focus) {
|
|
997
992
|
outline: none;
|
|
998
993
|
background: var(--wmcolor-select-option-background-focus);
|
|
999
994
|
color: var(--wmcolor-interactive-text);
|
|
1000
995
|
}
|
|
1001
|
-
:host(:focus
|
|
1002
|
-
:host(:focus
|
|
996
|
+
:host(:focus) .checkbox.svg-checkbox-blank,
|
|
997
|
+
:host(:focus) .checkbox.svg-checkbox-selected {
|
|
1003
998
|
--icon-fill: var(--wmcolor-interactive-text);
|
|
1004
999
|
}
|
|
1005
1000
|
|
|
@@ -1009,7 +1004,7 @@
|
|
|
1009
1004
|
outline: none;
|
|
1010
1005
|
}
|
|
1011
1006
|
|
|
1012
|
-
:host(:focus
|
|
1013
|
-
:host(:focus
|
|
1007
|
+
:host(:focus:hover) .checkbox.svg-checkbox-blank,
|
|
1008
|
+
:host(:focus:hover) .checkbox.svg-checkbox-selected {
|
|
1014
1009
|
--icon-fill: var(--wmcolor-interactive);
|
|
1015
1010
|
}
|
|
@@ -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,6 +119,16 @@ 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(() => {
|
|
@@ -128,9 +138,12 @@ export class Select {
|
|
|
128
138
|
}, 50);
|
|
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: '7e8a475bb0ec52e4944c6873e01c4606898f4c5f', onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { key: 'ab7b7ac75c131204dfb9053522aca310def8f45c', class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: 'd621ab97f8538a4888b57724ce19459216a909a2', class: "label-wrapper" }, h("label", { key: '6721709ccc53c4dcb34adde92400213edcecfcd1', 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: 'aa206ab21ef45c4881508a7d89dbeb9c9e391bc5', class: "required" }, h("span", { key: '4831f113ee6326704bdd4c54062e3a68c6c17783', class: "sr-only" }, globalMessages.requiredField), h("span", { key: '88d2090f8ad7a017a0d43d54e8344b8ee6fa858d', "aria-hidden": "true" }, "*")))), h("div", { key: '414f570b751a2c8a886b7b4b8c80b2c2f9150f2d', class: "button-wrapper" }, h("button", { key: '11bd141ae70438ac048bce9df4e8983e36b4abb0', 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: '1f337bb2196dfd0c2c22f32f05073eac31f978d2', class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, h("span", { key: '978a03d535551ade50c872610b53af59bca79004', class: "button-text" }, this.renderButtonText()), showSubinfo && h("span", { key: 'b97e2bccd8dc0ccc55df54a8220c80940ae21b15', class: "subinfo" }, this.selectedOptions[0].subinfo)), h("div", { key: '687523e6ee6f23a22a55481dbbb4856580e71770', class: `expand-icon svg-icon ${this.isExpanded ? "svg-expand-less" : "svg-expand-more"}` }), this.renderOverflowCount(), h("div", { key: 'eb88eb23947a6c7c608fe80c752b604102db6a2d', ref: (el) => (this.measurementAreaEl = el), class: "measurement-area", "aria-hidden": "true" })), h("div", { key: '0c8b8cd661caa7f55de6e0eb56d304e6ae299e45',
|
|
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: 'c2f173700a255dfe637bb0bbd12d73ef1c4e15fd', 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: '7f7e2c3a4c3e174a108f028fb4fa0236f829b7b8' }))), h("div", { key: '4734b6b6f448c151a2f4373001285e0f2bbacff8', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage), h("div", { key: 'c8a8b6d9d4e67b71f86ee522386fbc9f5e47c3de', 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-9401ec2f.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-9401ec2f.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v4.21.0 | MIT Licensed | https://stenciljs.com
|