@lensui/lens-table 0.1.49 → 0.1.51

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
@@ -1161,13 +1161,13 @@ function paintGrid(options) {
1161
1161
  label = "Render error";
1162
1162
  }
1163
1163
  if (label) {
1164
- const padding = 10;
1164
+ const padding = 4;
1165
1165
  const textX = column.align === "right" ? x + cellWidth - padding : column.align === "center" ? x + cellWidth / 2 : x + padding;
1166
1166
  ctx.save();
1167
1167
  ctx.beginPath();
1168
1168
  ctx.rect(x + 2, y + 1, Math.max(0, cellWidth - 4), cellHeight - 2);
1169
1169
  ctx.clip();
1170
- ctx.fillStyle = isColumnDropTarget ? colors.text : isAxisSelected && !isSelectedCell && !isRangeCell ? colors.axisSelectionText : cellStyle?.color ?? rowStyle?.color ?? colors.text;
1170
+ ctx.fillStyle = isAxisSelected ? colors.axisSelectionText : isColumnDropTarget ? colors.text : cellStyle?.color ?? rowStyle?.color ?? colors.text;
1171
1171
  ctx.font = createCellFont(bodyFontSize);
1172
1172
  ctx.textBaseline = "alphabetic";
1173
1173
  ctx.textAlign = column.align === "right" ? "right" : column.align === "center" ? "center" : "left";
@@ -2353,7 +2353,7 @@ function TableInner({
2353
2353
  // regular and drag fills intentionally differ, but odd rows should
2354
2354
  // continue to use the dedicated stripe color in both states.
2355
2355
  axisSelectionStripeFill: readThemeColor(themeStyles, "--rvg-color-axis-selection-stripe-fill", "#dfeeff"),
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")),
2356
+ axisSelectionText: isSelectedColumnDrag || isSelectedColumnDropTarget ? readThemeColor(themeStyles, "--rvg-color-axis-selection-drag-text", "#fff") : readThemeColor(themeStyles, "--rvg-color-axis-selection-text", readThemeColor(themeStyles, "--rvg-color-text", "#202124")),
2357
2357
  rowHoverFill: readThemeColor(themeStyles, "--rvg-color-row-hover-fill", "#f6f9fc"),
2358
2358
  editedFill: editedCellHighlightColor ?? readThemeColor(themeStyles, "--rvg-color-edited-fill", "#fff1b8"),
2359
2359
  insertedFill: insertedRowHighlightColor ?? readThemeColor(themeStyles, "--rvg-color-inserted-fill", "#c8ead4"),
package/dist/index.css CHANGED
@@ -19,7 +19,7 @@
19
19
  --rvg-color-axis-selection-stripe-fill: #dfeeff;
20
20
  --rvg-color-axis-selection-text: var(--rvg-color-text);
21
21
  --rvg-color-axis-selection-drag-fill: #d8e8f8;
22
- --rvg-color-axis-selection-drag-text: #325b88;
22
+ --rvg-color-axis-selection-drag-text: #fff;
23
23
  --rvg-color-column-drop-target-fill: #e2edf9;
24
24
  --rvg-color-range-fill: #e8f1ff;
25
25
  --rvg-color-row-hover-fill: #f6f9fc;
@@ -207,7 +207,7 @@
207
207
  display: flex;
208
208
  align-items: center;
209
209
  min-width: 0;
210
- padding: 0 10px;
210
+ padding: 0 4px;
211
211
  overflow: hidden;
212
212
  color: var(--rvg-color-text);
213
213
  font-family:
@@ -254,7 +254,7 @@
254
254
  z-index: 1;
255
255
  display: flex;
256
256
  min-width: 0;
257
- padding: 0 10px;
257
+ padding: 0 4px;
258
258
  align-items: center;
259
259
  overflow: hidden;
260
260
  color: var(--rvg-color-text);
@@ -2051,48 +2051,59 @@
2051
2051
  .rvg-date-editor [data-part=trigger] {
2052
2052
  position: absolute;
2053
2053
  top: 50%;
2054
- right: 4px;
2054
+ right: 3px;
2055
2055
  display: grid;
2056
- width: 23px;
2057
- height: 23px;
2056
+ width: 20px;
2057
+ height: 20px;
2058
2058
  padding: 0;
2059
2059
  place-items: center;
2060
- border: 0;
2061
- border-radius: 3px;
2060
+ border: 1px solid transparent;
2061
+ border-radius: 50%;
2062
2062
  background: transparent;
2063
- color: #70757a;
2063
+ color: var(--rvg-color-subtle);
2064
2064
  cursor: pointer;
2065
2065
  transform: translateY(-50%);
2066
- transition: background-color 120ms ease, color 120ms ease;
2066
+ transition:
2067
+ background-color 120ms ease,
2068
+ border-color 120ms ease,
2069
+ color 120ms ease;
2067
2070
  }
2068
2071
  .rvg-clear-trigger {
2069
2072
  position: absolute;
2070
2073
  top: 50%;
2071
- right: 4px;
2074
+ right: 3px;
2072
2075
  display: grid;
2073
- width: 23px;
2074
- height: 23px;
2076
+ width: 20px;
2077
+ height: 20px;
2075
2078
  padding: 0;
2076
2079
  place-items: center;
2077
- border: 0;
2078
- border-radius: 3px;
2080
+ border: 1px solid transparent;
2081
+ border-radius: 50%;
2079
2082
  background: transparent;
2080
- color: #9aa0a6;
2083
+ color: var(--rvg-color-subtle);
2081
2084
  cursor: pointer;
2082
2085
  transform: translateY(-50%);
2083
- transition: background-color 120ms ease, color 120ms ease;
2086
+ transition:
2087
+ background-color 120ms ease,
2088
+ border-color 120ms ease,
2089
+ color 120ms ease;
2084
2090
  }
2085
2091
  .rvg-clear-trigger:hover {
2092
+ border-color: var(--rvg-color-border);
2086
2093
  background: var(--rvg-color-hover-muted);
2087
- color: #3c4043;
2094
+ color: var(--rvg-color-text);
2095
+ }
2096
+ .rvg-clear-trigger:focus-visible {
2097
+ outline: 2px solid color-mix(in srgb, var(--rvg-color-primary) 45%, transparent);
2098
+ outline-offset: 1px;
2088
2099
  }
2089
2100
  .rvg-clear-icon {
2090
2101
  display: block;
2091
- width: 14px;
2092
- height: 14px;
2102
+ width: 11px;
2103
+ height: 11px;
2093
2104
  fill: none;
2094
2105
  stroke: currentColor;
2095
- stroke-width: 1.7;
2106
+ stroke-width: 1.8;
2096
2107
  stroke-linecap: round;
2097
2108
  }
2098
2109
  .rvg-date-editor [data-part=trigger]:hover {
@@ -2109,12 +2120,15 @@
2109
2120
  stroke-linejoin: round;
2110
2121
  paint-order: stroke fill;
2111
2122
  }
2112
- .rvg-choice-editor [data-part=trigger]:hover [data-part=indicator] {
2113
- color: #3c4043;
2123
+ .rvg-choice-editor [data-part=trigger]:hover [data-part=indicator],
2124
+ .rvg-date-editor [data-part=trigger]:hover {
2125
+ border-color: var(--rvg-color-border);
2126
+ background: var(--rvg-color-hover-muted);
2127
+ color: var(--rvg-color-text);
2114
2128
  }
2115
2129
  .rvg-choice-chevron {
2116
- width: 16px;
2117
- height: 16px;
2130
+ width: 13px;
2131
+ height: 13px;
2118
2132
  transition: transform 160ms ease;
2119
2133
  }
2120
2134
  .rvg-choice-chevron path,
package/dist/index.js CHANGED
@@ -1131,13 +1131,13 @@ function paintGrid(options) {
1131
1131
  label = "Render error";
1132
1132
  }
1133
1133
  if (label) {
1134
- const padding = 10;
1134
+ const padding = 4;
1135
1135
  const textX = column.align === "right" ? x + cellWidth - padding : column.align === "center" ? x + cellWidth / 2 : x + padding;
1136
1136
  ctx.save();
1137
1137
  ctx.beginPath();
1138
1138
  ctx.rect(x + 2, y + 1, Math.max(0, cellWidth - 4), cellHeight - 2);
1139
1139
  ctx.clip();
1140
- ctx.fillStyle = isColumnDropTarget ? colors.text : isAxisSelected && !isSelectedCell && !isRangeCell ? colors.axisSelectionText : cellStyle?.color ?? rowStyle?.color ?? colors.text;
1140
+ ctx.fillStyle = isAxisSelected ? colors.axisSelectionText : isColumnDropTarget ? colors.text : cellStyle?.color ?? rowStyle?.color ?? colors.text;
1141
1141
  ctx.font = createCellFont(bodyFontSize);
1142
1142
  ctx.textBaseline = "alphabetic";
1143
1143
  ctx.textAlign = column.align === "right" ? "right" : column.align === "center" ? "center" : "left";
@@ -2323,7 +2323,7 @@ function TableInner({
2323
2323
  // regular and drag fills intentionally differ, but odd rows should
2324
2324
  // continue to use the dedicated stripe color in both states.
2325
2325
  axisSelectionStripeFill: readThemeColor(themeStyles, "--rvg-color-axis-selection-stripe-fill", "#dfeeff"),
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")),
2326
+ axisSelectionText: isSelectedColumnDrag || isSelectedColumnDropTarget ? readThemeColor(themeStyles, "--rvg-color-axis-selection-drag-text", "#fff") : readThemeColor(themeStyles, "--rvg-color-axis-selection-text", readThemeColor(themeStyles, "--rvg-color-text", "#202124")),
2327
2327
  rowHoverFill: readThemeColor(themeStyles, "--rvg-color-row-hover-fill", "#f6f9fc"),
2328
2328
  editedFill: editedCellHighlightColor ?? readThemeColor(themeStyles, "--rvg-color-edited-fill", "#fff1b8"),
2329
2329
  insertedFill: insertedRowHighlightColor ?? readThemeColor(themeStyles, "--rvg-color-inserted-fill", "#c8ead4"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lensui/lens-table",
3
- "version": "0.1.49",
3
+ "version": "0.1.51",
4
4
  "description": "A lightweight, canvas-rendered React table component for LensUI.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",