@ai-matrx/design-system 0.21.11 → 0.21.12

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.21.12
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/design-system/v0.21.11..npm/design-system/v0.21.12 -- apps/shared/design-system`).
7
+ No source changes intended and no consumer action required.
8
+
3
9
  ## 0.21.11
4
10
 
5
11
  Automatic changed-only republish (docs/metadata drift since the last tag — see
@@ -8616,6 +8616,10 @@ function TableToolbarAction({
8616
8616
  function hasSameRowReferences(previous, next) {
8617
8617
  return previous.length === next.length && previous.every((row, index) => row === next[index]);
8618
8618
  }
8619
+ var VERTICAL_SCROLL_GEOMETRY_TOLERANCE_PX = 2;
8620
+ function hasUsableVerticalScroll(element) {
8621
+ return element.scrollHeight - element.clientHeight > VERTICAL_SCROLL_GEOMETRY_TOLERANCE_PX;
8622
+ }
8619
8623
  function TableRowCopyControl({
8620
8624
  copy,
8621
8625
  row,
@@ -9131,7 +9135,7 @@ function MatrxDataTableCore({
9131
9135
  if (!scroll || !table || !header || !stickyHeader) return;
9132
9136
  let frame = 0;
9133
9137
  const update = () => {
9134
- const hasInternalVerticalScroll = scroll.scrollHeight > scroll.clientHeight + 1;
9138
+ const hasInternalVerticalScroll = hasUsableVerticalScroll(scroll);
9135
9139
  const nextDocumentSticky = !hasInternalVerticalScroll;
9136
9140
  if (documentStickyHeaderRef.current !== nextDocumentSticky) {
9137
9141
  documentStickyHeaderRef.current = nextDocumentSticky;
@@ -9151,7 +9155,7 @@ function MatrxDataTableCore({
9151
9155
  for (let ancestor = scroll.parentElement; ancestor; ancestor = ancestor.parentElement) {
9152
9156
  const ancestorStyle = window.getComputedStyle(ancestor);
9153
9157
  const overflowY = ancestorStyle.overflowY;
9154
- if (/^(auto|scroll|overlay)$/.test(overflowY) && ancestor.scrollHeight > ancestor.clientHeight + 1) {
9158
+ if (/^(auto|scroll|overlay)$/.test(overflowY) && hasUsableVerticalScroll(ancestor)) {
9155
9159
  const scrollPaddingTop = Number.parseFloat(ancestorStyle.scrollPaddingTop) || 0;
9156
9160
  scrollTargetTop = ancestor.getBoundingClientRect().top + scrollPaddingTop;
9157
9161
  break;