elseware-ui 2.29.0 → 2.29.1

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/index.d.mts CHANGED
@@ -1528,8 +1528,9 @@ declare function EUIDevLayout({ children, header, footer, }: EUIDevLayoutProps):
1528
1528
  interface ScrollToTopProps {
1529
1529
  trigger?: any;
1530
1530
  behavior?: ScrollBehavior;
1531
+ target?: HTMLElement | null;
1531
1532
  }
1532
- declare function ScrollToTop({ trigger, behavior }: ScrollToTopProps): null;
1533
+ declare function ScrollToTop({ trigger, behavior, target, }: ScrollToTopProps): null;
1533
1534
 
1534
1535
  declare function cn(...inputs: ClassValue[]): string;
1535
1536
 
package/dist/index.d.ts CHANGED
@@ -1528,8 +1528,9 @@ declare function EUIDevLayout({ children, header, footer, }: EUIDevLayoutProps):
1528
1528
  interface ScrollToTopProps {
1529
1529
  trigger?: any;
1530
1530
  behavior?: ScrollBehavior;
1531
+ target?: HTMLElement | null;
1531
1532
  }
1532
- declare function ScrollToTop({ trigger, behavior }: ScrollToTopProps): null;
1533
+ declare function ScrollToTop({ trigger, behavior, target, }: ScrollToTopProps): null;
1533
1534
 
1534
1535
  declare function cn(...inputs: ClassValue[]): string;
1535
1536
 
package/dist/index.js CHANGED
@@ -17586,13 +17586,24 @@ function EUIDevLayout({
17586
17586
  );
17587
17587
  }
17588
17588
  var EUIDevLayout_default = EUIDevLayout;
17589
- function ScrollToTop({ trigger, behavior = "smooth" }) {
17589
+ function ScrollToTop({
17590
+ trigger,
17591
+ behavior = "smooth",
17592
+ target
17593
+ }) {
17590
17594
  React4.useEffect(() => {
17595
+ if (target) {
17596
+ target.scrollTo({
17597
+ top: 0,
17598
+ behavior
17599
+ });
17600
+ return;
17601
+ }
17591
17602
  window.scrollTo({
17592
17603
  top: 0,
17593
17604
  behavior
17594
17605
  });
17595
- }, [trigger]);
17606
+ }, [trigger, target]);
17596
17607
  return null;
17597
17608
  }
17598
17609
  var ScrollToTop_default = ScrollToTop;