@lensui/lens-table 0.1.47 → 0.1.49

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 CHANGED
@@ -2349,7 +2349,10 @@ function TableInner({
2349
2349
  selection: readThemeColor(themeStyles, "--rvg-color-primary", "#1677ff"),
2350
2350
  selectionFill: readThemeColor(themeStyles, "--rvg-color-selection-fill", "#edf4ff"),
2351
2351
  axisSelectionFill: isSelectedColumnDrag || isSelectedColumnDropTarget ? readThemeColor(themeStyles, "--rvg-color-axis-selection-drag-fill", "#d8e8f8") : readThemeColor(themeStyles, "--rvg-color-axis-selection-fill", "#e8f2ff"),
2352
- axisSelectionStripeFill: isSelectedColumnDrag || isSelectedColumnDropTarget ? readThemeColor(themeStyles, "--rvg-color-axis-selection-drag-fill", "#d8e8f8") : readThemeColor(themeStyles, "--rvg-color-axis-selection-stripe-fill", "#dfeeff"),
2352
+ // Keep zebra striping while a selected column is being dragged. The
2353
+ // regular and drag fills intentionally differ, but odd rows should
2354
+ // continue to use the dedicated stripe color in both states.
2355
+ axisSelectionStripeFill: readThemeColor(themeStyles, "--rvg-color-axis-selection-stripe-fill", "#dfeeff"),
2353
2356
  axisSelectionText: isSelectedColumnDrag || isSelectedColumnDropTarget ? readThemeColor(themeStyles, "--rvg-color-axis-selection-drag-text", "#325b88") : readThemeColor(themeStyles, "--rvg-color-axis-selection-text", readThemeColor(themeStyles, "--rvg-color-text", "#202124")),
2354
2357
  rowHoverFill: readThemeColor(themeStyles, "--rvg-color-row-hover-fill", "#f6f9fc"),
2355
2358
  editedFill: editedCellHighlightColor ?? readThemeColor(themeStyles, "--rvg-color-edited-fill", "#fff1b8"),
@@ -3958,6 +3961,17 @@ function TableInner({
3958
3961
  }, [viewport.width]);
3959
3962
  const headerTooltip = (() => {
3960
3963
  if (!visibleHeaderTooltip) return null;
3964
+ if (visibleHeaderTooltip.action === "sort" || visibleHeaderTooltip.action === "filter") {
3965
+ const column = columns[visibleHeaderTooltip.columnIndex];
3966
+ if (column) {
3967
+ const label = visibleHeaderTooltip.action === "sort" ? sortState?.columnKey === column.key ? sortState.direction === "asc" ? labels.sortAsc : labels.sortDesc : labels.sortBoth : filterValues[column.key] ? labels.filterWithValue(filterValues[column.key]) : labels.filter;
3968
+ return {
3969
+ ...visibleHeaderTooltip,
3970
+ key: `${visibleHeaderTooltip.key}:${label}`,
3971
+ label
3972
+ };
3973
+ }
3974
+ }
3961
3975
  return visibleHeaderTooltip;
3962
3976
  })();
3963
3977
  const getRangeBounds = () => selectionRange ? {
package/dist/index.css CHANGED
@@ -1575,6 +1575,9 @@
1575
1575
  border-bottom-color: color-mix(in srgb, var(--rvg-color-axis-selection-text) 34%, transparent);
1576
1576
  background: var(--rvg-color-axis-selection-fill);
1577
1577
  }
1578
+ .rvg-column-drag-preview.is-axis-selected .rvg-column-drag-preview-cell.is-striped {
1579
+ background: var(--rvg-color-axis-selection-stripe-fill);
1580
+ }
1578
1581
  .rvg-column-drag-preview-header .rvg-preview-header-icon {
1579
1582
  position: absolute;
1580
1583
  top: 50%;
package/dist/index.js CHANGED
@@ -2319,7 +2319,10 @@ function TableInner({
2319
2319
  selection: readThemeColor(themeStyles, "--rvg-color-primary", "#1677ff"),
2320
2320
  selectionFill: readThemeColor(themeStyles, "--rvg-color-selection-fill", "#edf4ff"),
2321
2321
  axisSelectionFill: isSelectedColumnDrag || isSelectedColumnDropTarget ? readThemeColor(themeStyles, "--rvg-color-axis-selection-drag-fill", "#d8e8f8") : readThemeColor(themeStyles, "--rvg-color-axis-selection-fill", "#e8f2ff"),
2322
- axisSelectionStripeFill: isSelectedColumnDrag || isSelectedColumnDropTarget ? readThemeColor(themeStyles, "--rvg-color-axis-selection-drag-fill", "#d8e8f8") : readThemeColor(themeStyles, "--rvg-color-axis-selection-stripe-fill", "#dfeeff"),
2322
+ // Keep zebra striping while a selected column is being dragged. The
2323
+ // regular and drag fills intentionally differ, but odd rows should
2324
+ // continue to use the dedicated stripe color in both states.
2325
+ axisSelectionStripeFill: readThemeColor(themeStyles, "--rvg-color-axis-selection-stripe-fill", "#dfeeff"),
2323
2326
  axisSelectionText: isSelectedColumnDrag || isSelectedColumnDropTarget ? readThemeColor(themeStyles, "--rvg-color-axis-selection-drag-text", "#325b88") : readThemeColor(themeStyles, "--rvg-color-axis-selection-text", readThemeColor(themeStyles, "--rvg-color-text", "#202124")),
2324
2327
  rowHoverFill: readThemeColor(themeStyles, "--rvg-color-row-hover-fill", "#f6f9fc"),
2325
2328
  editedFill: editedCellHighlightColor ?? readThemeColor(themeStyles, "--rvg-color-edited-fill", "#fff1b8"),
@@ -3928,6 +3931,17 @@ function TableInner({
3928
3931
  }, [viewport.width]);
3929
3932
  const headerTooltip = (() => {
3930
3933
  if (!visibleHeaderTooltip) return null;
3934
+ if (visibleHeaderTooltip.action === "sort" || visibleHeaderTooltip.action === "filter") {
3935
+ const column = columns[visibleHeaderTooltip.columnIndex];
3936
+ if (column) {
3937
+ const label = visibleHeaderTooltip.action === "sort" ? sortState?.columnKey === column.key ? sortState.direction === "asc" ? labels.sortAsc : labels.sortDesc : labels.sortBoth : filterValues[column.key] ? labels.filterWithValue(filterValues[column.key]) : labels.filter;
3938
+ return {
3939
+ ...visibleHeaderTooltip,
3940
+ key: `${visibleHeaderTooltip.key}:${label}`,
3941
+ label
3942
+ };
3943
+ }
3944
+ }
3931
3945
  return visibleHeaderTooltip;
3932
3946
  })();
3933
3947
  const getRangeBounds = () => selectionRange ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lensui/lens-table",
3
- "version": "0.1.47",
3
+ "version": "0.1.49",
4
4
  "description": "A lightweight, canvas-rendered React table component for LensUI.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",