@aivex/ui 1.2.0-dev.41 → 1.2.0-dev.42

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.js CHANGED
@@ -761,13 +761,13 @@ function go({ className: t, children: n, edgeFade: r, onViewportScroll: i, ref:
761
761
  let f = o === "vertical" || o === "both", p = o === "horizontal" || o === "both";
762
762
  return /* @__PURE__ */ U(Ta.Root, {
763
763
  ref: a,
764
- className: e("aivex:relative aivex:overflow-hidden", t),
764
+ className: e("aivex:relative aivex:overflow-hidden aivex:scroll-sync-root", t),
765
765
  type: s,
766
766
  ...d,
767
767
  children: [
768
768
  /* @__PURE__ */ H(Ta.Viewport, {
769
769
  ref: u,
770
- className: e("aivex:h-full aivex:w-full aivex:rounded-[inherit] aivex:[&>div]:!grid aivex:[&>div]:min-h-full", r && "aivex:scroll-fade-y", l),
770
+ className: e("aivex:h-full aivex:w-full aivex:rounded-[inherit] aivex:[&>div]:!grid aivex:[&>div]:min-h-full aivex:scroll-sync-viewport", r && "aivex:scroll-fade-y", l),
771
771
  onScroll: i,
772
772
  children: n
773
773
  }),
@@ -781,10 +781,10 @@ function _o({ className: t, orientation: n = "vertical", ref: r, ...i }) {
781
781
  return /* @__PURE__ */ H(Ta.Scrollbar, {
782
782
  ref: r,
783
783
  orientation: n,
784
- className: e("aivex:z-20 aivex:flex aivex:touch-none aivex:select-none aivex:rounded-full aivex:p-2xs aivex:transition-colors", n === "vertical" && "aivex:h-full aivex:w-2.5", n === "horizontal" && "aivex:h-2.5 aivex:flex-col", t),
784
+ className: e("aivex:z-20 aivex:flex aivex:touch-none aivex:select-none aivex:rounded-full aivex:p-2xs aivex:transition-colors aivex:scroll-sync-scrollbar", n === "vertical" && "aivex:h-full aivex:w-2.5", n === "horizontal" && "aivex:h-2.5 aivex:flex-col", t),
785
785
  ...i,
786
786
  children: /* @__PURE__ */ U(Ta.Thumb, {
787
- className: "aivex:group aivex:relative aivex:flex-1 aivex:cursor-pointer aivex:overflow-hidden aivex:rounded-full aivex:bg-bg-primary",
787
+ className: e("aivex:group aivex:relative aivex:flex-1 aivex:cursor-pointer aivex:overflow-hidden aivex:rounded-full aivex:bg-bg-primary", n === "vertical" ? "aivex:scroll-sync-thumb-y" : "aivex:scroll-sync-thumb-x"),
788
788
  children: [/* @__PURE__ */ H("span", { className: "aivex:absolute aivex:inset-0 aivex:bg-icon-tertiary aivex:opacity-50" }), /* @__PURE__ */ H(L, { variant: "strong" })]
789
789
  })
790
790
  });
@@ -1319,7 +1319,7 @@ function is({ className: t, loading: n, loadingRowCount: r, empty: i, headerStic
1319
1319
  he.current = I;
1320
1320
  let ge = G((e) => {
1321
1321
  let t = Array.from(P.current?.querySelectorAll("[data-datagrid-row-id]") ?? []).find((t) => t.dataset.datagridRowId === e);
1322
- return t?.focus(), t != null;
1322
+ return t?.focus({ preventScroll: !0 }), t?.scrollIntoView({ block: "nearest" }), t != null;
1323
1323
  }, []);
1324
1324
  K(() => {
1325
1325
  w || fe == null || (ge(fe), pe(null));
@@ -1399,12 +1399,13 @@ function is({ className: t, loading: n, loadingRowCount: r, empty: i, headerStic
1399
1399
  children: /* @__PURE__ */ H(Go, {
1400
1400
  scrollbars: "both",
1401
1401
  className: o,
1402
+ viewportClassName: j ? "aivex:[scroll-padding-top:var(--datagrid-sticky-header-height)]" : void 0,
1402
1403
  style: { "--datagrid-sticky-header-height": `${re}px` },
1403
1404
  verticalScrollbarClassName: j ? "aivex:top-[var(--datagrid-sticky-header-height)]! aivex:bottom-0! aivex:h-auto!" : void 0,
1404
1405
  viewportRef: P,
1405
1406
  children: /* @__PURE__ */ U("div", {
1406
1407
  role: M ? "treegrid" : "table",
1407
- className: e("aivex:flex aivex:min-h-full aivex:min-w-full aivex:flex-col", s),
1408
+ className: e("aivex:flex aivex:min-w-full aivex:flex-col", s),
1408
1409
  children: [Ce(j), n ? /* @__PURE__ */ H(qo, {
1409
1410
  className: l,
1410
1411
  children: Se(r ?? 5, "loading")