@lensui/lens-table 0.1.45 → 0.1.47
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.cjs +5 -3
- package/dist/index.css +13 -1
- package/dist/index.js +5 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3894,13 +3894,15 @@ function TableInner({
|
|
|
3894
3894
|
anchorLeft = anchorX;
|
|
3895
3895
|
anchorY = rowTop + headerLeafTop + (column.renderHeader ? 8 + Math.max(0, (16 - headerActionSize) / 2) : (headerLeafHeight - headerActionSize) / 2) + headerActionSize / 2 + 1;
|
|
3896
3896
|
}
|
|
3897
|
-
const
|
|
3897
|
+
const isActionTooltip = action === "drag" || action === "sort" || action === "filter";
|
|
3898
|
+
const horizontalPlacement = anchorX + 328 > viewport.width ? "left" : "right";
|
|
3899
|
+
const placement = isActionTooltip ? "above" : horizontalPlacement;
|
|
3898
3900
|
return {
|
|
3899
3901
|
key: `${action}:${cell ? `cell:${cell.key}:${cell.level}` : `column:${column.key}`}:${Math.round(anchorX)}:${Math.round(rowTop)}`,
|
|
3900
3902
|
columnIndex,
|
|
3901
3903
|
action,
|
|
3902
|
-
left: placement === "right" ? anchorX + 8 : Math.max(8, anchorLeft - 8),
|
|
3903
|
-
top: anchorY,
|
|
3904
|
+
left: placement === "above" ? anchorX : placement === "right" ? anchorX + 8 : Math.max(8, anchorLeft - 8),
|
|
3905
|
+
top: placement === "above" ? anchorY - 14 : anchorY,
|
|
3904
3906
|
label,
|
|
3905
3907
|
placement
|
|
3906
3908
|
};
|
package/dist/index.css
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
.rvg-root {
|
|
37
37
|
position: relative;
|
|
38
|
-
overflow:
|
|
38
|
+
overflow: visible;
|
|
39
39
|
border: 0;
|
|
40
40
|
border-radius: 0;
|
|
41
41
|
background: var(--rvg-color-bg);
|
|
@@ -954,6 +954,18 @@
|
|
|
954
954
|
right: -4px;
|
|
955
955
|
border-left: 5px solid var(--rvg-color-tooltip-bg);
|
|
956
956
|
}
|
|
957
|
+
.rvg-header-tooltip.is-above {
|
|
958
|
+
transform: translate(-50%, -100%);
|
|
959
|
+
}
|
|
960
|
+
.rvg-header-tooltip.is-above::after {
|
|
961
|
+
bottom: -6px;
|
|
962
|
+
left: 50%;
|
|
963
|
+
transform: translateX(-50%);
|
|
964
|
+
border-right: 6px solid transparent;
|
|
965
|
+
border-top: 6px solid var(--rvg-color-tooltip-bg);
|
|
966
|
+
border-bottom: 0;
|
|
967
|
+
border-left: 6px solid transparent;
|
|
968
|
+
}
|
|
957
969
|
.rvg-header-tooltip.is-below,
|
|
958
970
|
.rvg-cell-tooltip.is-below {
|
|
959
971
|
transform: none;
|
package/dist/index.js
CHANGED
|
@@ -3864,13 +3864,15 @@ function TableInner({
|
|
|
3864
3864
|
anchorLeft = anchorX;
|
|
3865
3865
|
anchorY = rowTop + headerLeafTop + (column.renderHeader ? 8 + Math.max(0, (16 - headerActionSize) / 2) : (headerLeafHeight - headerActionSize) / 2) + headerActionSize / 2 + 1;
|
|
3866
3866
|
}
|
|
3867
|
-
const
|
|
3867
|
+
const isActionTooltip = action === "drag" || action === "sort" || action === "filter";
|
|
3868
|
+
const horizontalPlacement = anchorX + 328 > viewport.width ? "left" : "right";
|
|
3869
|
+
const placement = isActionTooltip ? "above" : horizontalPlacement;
|
|
3868
3870
|
return {
|
|
3869
3871
|
key: `${action}:${cell ? `cell:${cell.key}:${cell.level}` : `column:${column.key}`}:${Math.round(anchorX)}:${Math.round(rowTop)}`,
|
|
3870
3872
|
columnIndex,
|
|
3871
3873
|
action,
|
|
3872
|
-
left: placement === "right" ? anchorX + 8 : Math.max(8, anchorLeft - 8),
|
|
3873
|
-
top: anchorY,
|
|
3874
|
+
left: placement === "above" ? anchorX : placement === "right" ? anchorX + 8 : Math.max(8, anchorLeft - 8),
|
|
3875
|
+
top: placement === "above" ? anchorY - 14 : anchorY,
|
|
3874
3876
|
label,
|
|
3875
3877
|
placement
|
|
3876
3878
|
};
|