@lensui/lens-table 0.1.50 → 0.1.52

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,7 +1161,7 @@ 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();
@@ -1291,7 +1291,7 @@ function paintGrid(options) {
1291
1291
  const visibleActions = getVisibleHeaderActions(column, metric.width, columnDraggable, titleWidth, headerActionSlotWidth);
1292
1292
  const actionWidth = (Number(visibleActions.drag) + Number(visibleActions.filter) + Number(visibleActions.sort)) * headerActionSlotWidth;
1293
1293
  const contentWidth = Math.max(0, metric.width - actionWidth);
1294
- const padding = 10;
1294
+ const padding = 4;
1295
1295
  const clipWidth = contentWidth;
1296
1296
  const centeredTextX = metric.width / 2;
1297
1297
  const centerTitleWidth = Math.max(0, Math.min(centeredTextX - padding, contentWidth - padding - centeredTextX) * 2);
package/dist/index.css CHANGED
@@ -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);
@@ -1683,7 +1683,7 @@
1683
1683
  position: absolute;
1684
1684
  z-index: 2;
1685
1685
  margin: 0;
1686
- padding: 0 10px;
1686
+ padding: 0 4px;
1687
1687
  border: 0;
1688
1688
  border-radius: 0;
1689
1689
  outline: 0;
@@ -1720,7 +1720,7 @@
1720
1720
  position: absolute;
1721
1721
  z-index: 6;
1722
1722
  display: flex;
1723
- padding: 0 28px 0 10px;
1723
+ padding: 0 24px 0 4px;
1724
1724
  align-items: center;
1725
1725
  gap: 3px;
1726
1726
  background: var(--rvg-color-bg);
@@ -1751,16 +1751,16 @@
1751
1751
  position: absolute;
1752
1752
  z-index: 6;
1753
1753
  display: flex;
1754
- padding: 0 10px;
1754
+ padding: 0 4px;
1755
1755
  align-items: center;
1756
- gap: 6px;
1756
+ gap: 4px;
1757
1757
  overflow: hidden;
1758
1758
  background: var(--rvg-color-bg);
1759
1759
  line-height: 1;
1760
1760
  box-sizing: border-box;
1761
1761
  }
1762
1762
  .rvg-native-editor.has-clear {
1763
- padding-right: 10px;
1763
+ padding-right: 4px;
1764
1764
  }
1765
1765
  .rvg-native-editor input {
1766
1766
  min-width: 0;
@@ -2001,7 +2001,7 @@
2001
2001
  display: flex;
2002
2002
  min-width: 0;
2003
2003
  height: 100%;
2004
- padding: 0 8px;
2004
+ padding: 0 4px;
2005
2005
  flex: 1;
2006
2006
  align-items: center;
2007
2007
  border: 0;
@@ -2018,11 +2018,11 @@
2018
2018
  text-align: left;
2019
2019
  }
2020
2020
  .rvg-choice-editor [data-part=trigger] {
2021
- padding: 0 28px 0 10px;
2021
+ padding: 0 24px 0 4px;
2022
2022
  line-height: 1;
2023
2023
  }
2024
2024
  .rvg-date-value {
2025
- padding: 0 8px 2px 10px;
2025
+ padding: 0 4px 2px 4px;
2026
2026
  }
2027
2027
  .rvg-choice-editor [data-part=value-text] {
2028
2028
  min-width: 0;
@@ -2035,7 +2035,7 @@
2035
2035
  }
2036
2036
  .rvg-date-editor [data-part=control] {
2037
2037
  display: flex;
2038
- padding-right: 28px;
2038
+ padding-right: 24px;
2039
2039
  align-items: center;
2040
2040
  }
2041
2041
  .rvg-date-separator {
@@ -2051,10 +2051,10 @@
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: 19px;
2057
+ height: 19px;
2058
2058
  padding: 0;
2059
2059
  place-items: center;
2060
2060
  border: 0;
@@ -2068,10 +2068,10 @@
2068
2068
  .rvg-clear-trigger {
2069
2069
  position: absolute;
2070
2070
  top: 50%;
2071
- right: 4px;
2071
+ right: 3px;
2072
2072
  display: grid;
2073
- width: 23px;
2074
- height: 23px;
2073
+ width: 19px;
2074
+ height: 19px;
2075
2075
  padding: 0;
2076
2076
  place-items: center;
2077
2077
  border: 0;
@@ -2086,10 +2086,14 @@
2086
2086
  background: var(--rvg-color-hover-muted);
2087
2087
  color: #3c4043;
2088
2088
  }
2089
+ .rvg-clear-trigger:focus-visible {
2090
+ outline: 2px solid color-mix(in srgb, var(--rvg-color-primary) 45%, transparent);
2091
+ outline-offset: 1px;
2092
+ }
2089
2093
  .rvg-clear-icon {
2090
2094
  display: block;
2091
- width: 14px;
2092
- height: 14px;
2095
+ width: 12px;
2096
+ height: 12px;
2093
2097
  fill: none;
2094
2098
  stroke: currentColor;
2095
2099
  stroke-width: 1.7;
@@ -2109,12 +2113,14 @@
2109
2113
  stroke-linejoin: round;
2110
2114
  paint-order: stroke fill;
2111
2115
  }
2112
- .rvg-choice-editor [data-part=trigger]:hover [data-part=indicator] {
2116
+ .rvg-choice-editor [data-part=trigger]:hover [data-part=indicator],
2117
+ .rvg-date-editor [data-part=trigger]:hover {
2118
+ background: var(--rvg-color-hover-muted);
2113
2119
  color: #3c4043;
2114
2120
  }
2115
2121
  .rvg-choice-chevron {
2116
- width: 16px;
2117
- height: 16px;
2122
+ width: 14px;
2123
+ height: 14px;
2118
2124
  transition: transform 160ms ease;
2119
2125
  }
2120
2126
  .rvg-choice-chevron path,
package/dist/index.js CHANGED
@@ -1131,7 +1131,7 @@ 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();
@@ -1261,7 +1261,7 @@ function paintGrid(options) {
1261
1261
  const visibleActions = getVisibleHeaderActions(column, metric.width, columnDraggable, titleWidth, headerActionSlotWidth);
1262
1262
  const actionWidth = (Number(visibleActions.drag) + Number(visibleActions.filter) + Number(visibleActions.sort)) * headerActionSlotWidth;
1263
1263
  const contentWidth = Math.max(0, metric.width - actionWidth);
1264
- const padding = 10;
1264
+ const padding = 4;
1265
1265
  const clipWidth = contentWidth;
1266
1266
  const centeredTextX = metric.width / 2;
1267
1267
  const centerTitleWidth = Math.max(0, Math.min(centeredTextX - padding, contentWidth - padding - centeredTextX) * 2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lensui/lens-table",
3
- "version": "0.1.50",
3
+ "version": "0.1.52",
4
4
  "description": "A lightweight, canvas-rendered React table component for LensUI.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",