@watermarkinsights/ripple 5.20.0-alpha.1 → 5.20.0-alpha.3
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-48c45f70.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 +16 -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 +12 -12
- package/dist/esm/{app-globals-8edefb94.js → app-globals-6487fe11.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 +16 -16
- package/dist/esm-es5/{app-globals-8edefb94.js → app-globals-6487fe11.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-b9db60d3.js → p-09617652.js} +1 -1
- package/dist/ripple/{p-7b185f34.system.js → p-3540baa1.system.js} +1 -1
- package/dist/ripple/{p-c650cd07.system.js → p-398254de.system.js} +1 -1
- package/dist/ripple/p-48dd5a6e.entry.js +1 -0
- package/dist/ripple/p-ba574f1a.system.entry.js +1 -0
- 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 +3 -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,10 +2,13 @@ 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.updateContainerFade();
|
|
7
7
|
this.updateArrowVisibility();
|
|
8
8
|
}, 16);
|
|
9
|
+
this.debouncedUpdateFade = debounce(() => {
|
|
10
|
+
this.updateContainerFade();
|
|
11
|
+
}, 16);
|
|
9
12
|
this.customBackground = undefined;
|
|
10
13
|
this.customPadding = undefined;
|
|
11
14
|
this.selectedTab = undefined;
|
|
@@ -53,7 +56,9 @@ export class TabList {
|
|
|
53
56
|
this.setSelected(selectedTab);
|
|
54
57
|
this.handleTabFocused(this.selectedTabItem);
|
|
55
58
|
this.updateArrowVisibility();
|
|
56
|
-
this.tabContainerEl.addEventListener("scroll", this.
|
|
59
|
+
this.tabContainerEl.addEventListener("scroll", this.debouncedUpdateContainerState);
|
|
60
|
+
const resizeObserver = new ResizeObserver(() => this.debouncedUpdateFade());
|
|
61
|
+
resizeObserver.observe(this.tabContainerEl);
|
|
57
62
|
}
|
|
58
63
|
tabItemLoaded(ev) {
|
|
59
64
|
this.setAriaOnPanelAndTab(ev.target);
|
|
@@ -119,7 +124,7 @@ export class TabList {
|
|
|
119
124
|
const targetScrollLeft = this.calculateScrollPositionForTab(tabItem, alignment);
|
|
120
125
|
this.tabContainerEl.scrollTo({ left: targetScrollLeft, behavior: "smooth" });
|
|
121
126
|
// Update container fade effects based on scroll position
|
|
122
|
-
this.
|
|
127
|
+
this.updateContainerFade();
|
|
123
128
|
}
|
|
124
129
|
calculateScrollPositionForTab(tabItem, alignment = "auto") {
|
|
125
130
|
const containerRect = this.tabContainerEl.getBoundingClientRect();
|
|
@@ -166,12 +171,7 @@ export class TabList {
|
|
|
166
171
|
}
|
|
167
172
|
return tabRight - containerRect.width; // Right side cut off, align right
|
|
168
173
|
}
|
|
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() {
|
|
174
|
+
updateContainerFade() {
|
|
175
175
|
const scrollLeft = this.tabContainerEl.scrollLeft;
|
|
176
176
|
const scrollWidth = this.tabContainerEl.scrollWidth;
|
|
177
177
|
const containerWidth = this.tabContainerEl.clientWidth;
|
|
@@ -279,11 +279,11 @@ export class TabList {
|
|
|
279
279
|
"margin-left": "-" + this.customPadding,
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
|
-
return (h(Host, { key: '
|
|
282
|
+
return (h(Host, { key: '81232664b58f1c0c39e62d502753e1b648b587d2' }, h("div", { key: 'ed6c7811469bc394b2215c732b073b03fa935bf3', class: "component-wrapper" }, h("wm-button", { key: 'c2bf1c1070515c5ec1fb800e9c30db40e11d35ba', class: "left-arrow", "aria-controls": "tablist", customBackground: this.customBackground, buttonType: "navigational", icon: "chevron-left", tooltip: intl.formatMessage({
|
|
283
283
|
id: "tabs.showPreviousTabs",
|
|
284
284
|
defaultMessage: "Show previous tabs",
|
|
285
285
|
description: "Tooltip for button scrolling tab group.",
|
|
286
|
-
}), onClick: () => this.handleLeftArrowClick() }), h("ul", { key: '
|
|
286
|
+
}), onClick: () => this.handleLeftArrowClick() }), h("ul", { key: '0ec8db2e754e96ebfcac536054698862a97f79fd', id: "tablist", ref: (el) => (this.tabContainerEl = el), class: `tabcontainer ${this.customBackground || ""}`, style: margins, role: "tablist", tabIndex: -1 }, h("slot", { key: '5a1b00b872d9c72dd395a5cb959fc9566b8f108f' })), h("wm-button", { key: '424d7e7a460d82406654e2989a2d15adf8638a9c', class: "right-arrow", "aria-controls": "tablist", customBackground: this.customBackground, buttonType: "navigational", icon: "chevron-right", tooltip: intl.formatMessage({
|
|
287
287
|
id: "tabs.showNextTabs",
|
|
288
288
|
defaultMessage: "Show next tabs",
|
|
289
289
|
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-6487fe11.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-6487fe11.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v4.21.0 | MIT Licensed | https://stenciljs.com
|