@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.
Files changed (27) hide show
  1. package/dist/cjs/{app-globals-e741af80.js → app-globals-48c45f70.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-tab-item_3.cjs.entry.js +16 -16
  5. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +1 -0
  6. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +2 -2
  7. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +1 -1
  8. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +12 -12
  9. package/dist/esm/{app-globals-8edefb94.js → app-globals-6487fe11.js} +1 -1
  10. package/dist/esm/loader.js +1 -1
  11. package/dist/esm/ripple.js +1 -1
  12. package/dist/esm/wm-tab-item_3.entry.js +16 -16
  13. package/dist/esm-es5/{app-globals-8edefb94.js → app-globals-6487fe11.js} +1 -1
  14. package/dist/esm-es5/loader.js +1 -1
  15. package/dist/esm-es5/ripple.js +1 -1
  16. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  17. package/dist/ripple/{p-b9db60d3.js → p-09617652.js} +1 -1
  18. package/dist/ripple/{p-7b185f34.system.js → p-3540baa1.system.js} +1 -1
  19. package/dist/ripple/{p-c650cd07.system.js → p-398254de.system.js} +1 -1
  20. package/dist/ripple/p-48dd5a6e.entry.js +1 -0
  21. package/dist/ripple/p-ba574f1a.system.entry.js +1 -0
  22. package/dist/ripple/ripple.esm.js +1 -1
  23. package/dist/ripple/ripple.js +1 -1
  24. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +3 -7
  25. package/package.json +2 -2
  26. package/dist/ripple/p-74786c48.system.entry.js +0 -1
  27. 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: '43d23f45217e39a9c6e8d6d0f3f5401c1fa7f252', class: `tab-item ${isDark ? "dark" : ""}`, role: "presentation" }, h("a", { key: '4606d7b99a4ebe3e92bc71089458ce4356ef318a', class: `tab`, style: styles, role: "tab", ref: (el) => (this.linkEl = el), onClick: this.tabClicked, id: `tab-link-${this.tabId}`, onKeyDown: (ev) => this.tabPressed(ev), "aria-selected": this.selected ? "true" : "false", tabindex: this.selected ? 0 : -1, onFocus: () => {
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: '0ec5fa05c84e7b1e6eb51a3f6e6da39568c44a5c' })))));
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-start: 0.125rem;
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.debouncedUpdateContainerFades = debounce(() => {
6
- this.updateContainerFades();
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.debouncedUpdateContainerFades);
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.updateContainerFades();
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: 'b2757d684e2de9a0c37e39a16adba7933497e5ad' }, h("div", { key: 'bebc718c9cf90387d1aa081ff559ac8ded3c1862', class: "component-wrapper" }, h("wm-button", { key: '25d51d95e3f181ca9a3f1eca892151a6c4679838', class: "left-arrow", "aria-controls": "tablist", customBackground: this.customBackground, buttonType: "navigational", icon: "chevron-left", tooltip: intl.formatMessage({
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: 'e7179a83c597cfb8e18d97ca03f951a9000c3213', id: "tablist", ref: (el) => (this.tabContainerEl = el), class: `tabcontainer ${this.customBackground || ""}`, style: margins, role: "tablist", tabIndex: -1 }, h("slot", { key: '9569251578be9691fb6c03c94dfeb2fe1a0aa04d' })), h("wm-button", { key: '996fe7e8bf119336b2b11b20219d7b00a9059ef7', class: "right-arrow", "aria-controls": "tablist", customBackground: this.customBackground, buttonType: "navigational", icon: "chevron-right", tooltip: intl.formatMessage({
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.",
@@ -1,6 +1,6 @@
1
1
  import './index-130e07bb.js';
2
2
 
3
- const version = "5.20.0-alpha.1";
3
+ const version = "5.20.0-alpha.3";
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-8edefb94.js';
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;
@@ -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-8edefb94.js';
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