@watermarkinsights/ripple 5.20.0-alpha.1 → 5.20.0-alpha.2
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-e741af80.js → app-globals-5e245af0.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ripple.cjs.js +1 -1
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +13 -16
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +1 -0
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +2 -2
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +9 -12
- package/dist/esm/{app-globals-8edefb94.js → app-globals-e9c60a81.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ripple.js +1 -1
- package/dist/esm/wm-tab-item_3.entry.js +13 -16
- package/dist/esm-es5/{app-globals-8edefb94.js → app-globals-e9c60a81.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/ripple/{p-7b185f34.system.js → p-168ca8dc.system.js} +1 -1
- package/dist/ripple/{p-c650cd07.system.js → p-a5b6ff5b.system.js} +1 -1
- package/dist/ripple/p-c5d19aed.entry.js +1 -0
- package/dist/ripple/p-d03703e7.system.entry.js +1 -0
- package/dist/ripple/{p-b9db60d3.js → p-dbff175a.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +2 -7
- package/package.json +2 -2
- package/dist/ripple/p-74786c48.system.entry.js +0 -1
- package/dist/ripple/p-ca11a1be.entry.js +0 -1
|
@@ -882,6 +882,7 @@
|
|
|
882
882
|
.tab-item:hover {
|
|
883
883
|
background-color: var(--wmcolor-interactive-background-hover);
|
|
884
884
|
color: var(--wmcolor-interactive-hover);
|
|
885
|
+
cursor: pointer;
|
|
885
886
|
}
|
|
886
887
|
.tab-item:hover.dark {
|
|
887
888
|
background-color: var(--wmcolor-interactive-background-hover-ondark);
|
|
@@ -38,9 +38,9 @@ export class TabItem {
|
|
|
38
38
|
"background-size": `calc(100% - ${bkgSize}${units}) 3px`,
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
return (h(Host, { key: 'c4233132fdeffae370245ddb4d62e05fc59ac68d', role: "presentation" }, h("li", { key: '
|
|
41
|
+
return (h(Host, { key: 'c4233132fdeffae370245ddb4d62e05fc59ac68d', role: "presentation" }, h("li", { key: '748c4e4a2af2a3a073a2b7b4692b1b9624991ae4', class: `tab-item ${isDark ? "dark" : ""}`, role: "presentation", onClick: this.tabClicked }, h("a", { key: 'a46175de71ef92d9beec5969ca641f26689e2551', class: `tab`, style: styles, role: "tab", ref: (el) => (this.linkEl = el), id: `tab-link-${this.tabId}`, onKeyDown: (ev) => this.tabPressed(ev), "aria-selected": this.selected ? "true" : "false", tabindex: this.selected ? 0 : -1, onFocus: () => {
|
|
42
42
|
this.wmIntTabFocused.emit({ tabItem: this.el });
|
|
43
|
-
} }, h("slot", { key: '
|
|
43
|
+
} }, h("slot", { key: 'aa80ce2cc949795bc58d506d3491ec03e9e5ba76' })))));
|
|
44
44
|
}
|
|
45
45
|
static get is() { return "wm-tab-item"; }
|
|
46
46
|
static get encapsulation() { return "shadow"; }
|
|
@@ -899,7 +899,7 @@
|
|
|
899
899
|
}
|
|
900
900
|
:host .tabcontainer.dark {
|
|
901
901
|
margin: 0;
|
|
902
|
-
padding-inline
|
|
902
|
+
padding-inline: 0.125rem;
|
|
903
903
|
}
|
|
904
904
|
:host .tabcontainer.fade-left.fade-right {
|
|
905
905
|
mask-image: linear-gradient(90deg, transparent 0, black var(--fade-distance), black calc(100% - var(--fade-distance)), transparent 100%);
|
|
@@ -2,8 +2,8 @@ import { h, Host } from "@stencil/core";
|
|
|
2
2
|
import { debounce, intl } from "../../../global/functions";
|
|
3
3
|
export class TabList {
|
|
4
4
|
constructor() {
|
|
5
|
-
this.
|
|
6
|
-
this.
|
|
5
|
+
this.debouncedUpdateContainerState = debounce(() => {
|
|
6
|
+
this.updateContainerState();
|
|
7
7
|
this.updateArrowVisibility();
|
|
8
8
|
}, 16);
|
|
9
9
|
this.customBackground = undefined;
|
|
@@ -53,7 +53,9 @@ export class TabList {
|
|
|
53
53
|
this.setSelected(selectedTab);
|
|
54
54
|
this.handleTabFocused(this.selectedTabItem);
|
|
55
55
|
this.updateArrowVisibility();
|
|
56
|
-
this.tabContainerEl.addEventListener("scroll", this.
|
|
56
|
+
this.tabContainerEl.addEventListener("scroll", this.debouncedUpdateContainerState);
|
|
57
|
+
const resizeObserver = new ResizeObserver(() => this.debouncedUpdateContainerState());
|
|
58
|
+
resizeObserver.observe(this.tabContainerEl);
|
|
57
59
|
}
|
|
58
60
|
tabItemLoaded(ev) {
|
|
59
61
|
this.setAriaOnPanelAndTab(ev.target);
|
|
@@ -119,7 +121,7 @@ export class TabList {
|
|
|
119
121
|
const targetScrollLeft = this.calculateScrollPositionForTab(tabItem, alignment);
|
|
120
122
|
this.tabContainerEl.scrollTo({ left: targetScrollLeft, behavior: "smooth" });
|
|
121
123
|
// Update container fade effects based on scroll position
|
|
122
|
-
this.
|
|
124
|
+
this.updateContainerState();
|
|
123
125
|
}
|
|
124
126
|
calculateScrollPositionForTab(tabItem, alignment = "auto") {
|
|
125
127
|
const containerRect = this.tabContainerEl.getBoundingClientRect();
|
|
@@ -166,12 +168,7 @@ export class TabList {
|
|
|
166
168
|
}
|
|
167
169
|
return tabRight - containerRect.width; // Right side cut off, align right
|
|
168
170
|
}
|
|
169
|
-
|
|
170
|
-
* Updates fade effects on the container based on scroll position.
|
|
171
|
-
* Adds classes to show left/right fades when content is scrolled out of view.
|
|
172
|
-
* Disables fades on edges where the focused tab is aligned to avoid obscuring focus ring.
|
|
173
|
-
*/
|
|
174
|
-
updateContainerFades() {
|
|
171
|
+
updateContainerState() {
|
|
175
172
|
const scrollLeft = this.tabContainerEl.scrollLeft;
|
|
176
173
|
const scrollWidth = this.tabContainerEl.scrollWidth;
|
|
177
174
|
const containerWidth = this.tabContainerEl.clientWidth;
|
|
@@ -279,11 +276,11 @@ export class TabList {
|
|
|
279
276
|
"margin-left": "-" + this.customPadding,
|
|
280
277
|
};
|
|
281
278
|
}
|
|
282
|
-
return (h(Host, { key: '
|
|
279
|
+
return (h(Host, { key: '2c239f85e021a1306865f74bfd3653943243d70f' }, h("div", { key: 'ab5e9f0780a3589af9847df656eb34be0aed9491', class: "component-wrapper" }, h("wm-button", { key: 'd62a907b001606d374d9b2e9c1fdfd3c58ec8717', class: "left-arrow", "aria-controls": "tablist", customBackground: this.customBackground, buttonType: "navigational", icon: "chevron-left", tooltip: intl.formatMessage({
|
|
283
280
|
id: "tabs.showPreviousTabs",
|
|
284
281
|
defaultMessage: "Show previous tabs",
|
|
285
282
|
description: "Tooltip for button scrolling tab group.",
|
|
286
|
-
}), onClick: () => this.handleLeftArrowClick() }), h("ul", { key: '
|
|
283
|
+
}), onClick: () => this.handleLeftArrowClick() }), h("ul", { key: 'e2c8e1a159386f2a3cd1b1e9f2b9aee5e3bffe62', id: "tablist", ref: (el) => (this.tabContainerEl = el), class: `tabcontainer ${this.customBackground || ""}`, style: margins, role: "tablist", tabIndex: -1 }, h("slot", { key: '2ab972782d07628343c33c39fe622f8a16a33939' })), h("wm-button", { key: '951845b65f2b985609936714384e61189b7d7f12', class: "right-arrow", "aria-controls": "tablist", customBackground: this.customBackground, buttonType: "navigational", icon: "chevron-right", tooltip: intl.formatMessage({
|
|
287
284
|
id: "tabs.showNextTabs",
|
|
288
285
|
defaultMessage: "Show next tabs",
|
|
289
286
|
description: "Tooltip for button scrolling tab group.",
|
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-e9c60a81.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-e9c60a81.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v4.21.0 | MIT Licensed | https://stenciljs.com
|