bolt-table 0.1.2 → 0.1.3

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/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # bolt-table
2
2
 
3
- A high-performance, zero-dependency\* React table component built on [TanStack Virtual](https://tanstack.com/virtual). Only the rows visible in the viewport are ever in the DOM — making it fast for datasets of any size.
4
-
5
- \*Only peer dependency is `@tanstack/react-virtual` (+ React). No Tailwind, no CSS framework, no icon library required.
3
+ A high-performance, zero-dependency\* React table component. Only the rows visible in the viewport are ever in the DOM — making it fast for datasets of any size uisng [TanStack Virtual](https://tanstack.com/virtual).
6
4
 
7
5
  [![npm version](https://img.shields.io/npm/v/bolt-table)](https://www.npmjs.com/package/bolt-table)
8
6
  [![license](https://img.shields.io/npm/l/bolt-table)](./LICENSE)
package/dist/index.js CHANGED
@@ -206,12 +206,12 @@ var DraggableHeader = import_react.default.memo(
206
206
  ...column.pinned === "left" && stickyOffset !== void 0 ? { left: `${stickyOffset}px` } : {},
207
207
  ...column.pinned === "right" && stickyOffset !== void 0 ? { right: `${stickyOffset}px` } : {},
208
208
  ...isPinned ? {
209
- backgroundColor: styles?.pinnedBg ?? "Canvas",
209
+ backgroundColor: styles?.pinnedBg ?? "color-mix(in srgb, currentColor 4%, Canvas)",
210
210
  ...styles?.pinnedHeader
211
211
  } : {},
212
212
  ...column.style,
213
213
  ...styles?.header,
214
- backgroundColor: styles?.pinnedBg && isPinned ? styles.pinnedBg : isPinned ? "Canvas" : "rgba(128,128,128,0.06)",
214
+ backgroundColor: styles?.pinnedBg && isPinned ? styles.pinnedBg : isPinned ? "color-mix(in srgb, currentColor 4%, Canvas)" : "rgba(128,128,128,0.06)",
215
215
  display: "flex",
216
216
  height: 36,
217
217
  alignItems: "center",
@@ -1057,7 +1057,7 @@ var TableBody = ({
1057
1057
  else if (col.pinned === "right" && stickyOffset !== void 0)
1058
1058
  style.right = `${stickyOffset}px`;
1059
1059
  if (isPinned) {
1060
- style.backgroundColor = styles?.pinnedBg ?? "Canvas";
1060
+ style.backgroundColor = styles?.pinnedBg ?? "color-mix(in srgb, currentColor 4%, Canvas)";
1061
1061
  if (styles?.pinnedCell) Object.assign(style, styles.pinnedCell);
1062
1062
  }
1063
1063
  return { key: col.key, style, isPinned };
@@ -1934,7 +1934,7 @@ function BoltTable({
1934
1934
  50% { opacity: 0.5; }
1935
1935
  }
1936
1936
  [data-row-key][data-hover] > div {
1937
- background-color: ${styles.rowHover?.backgroundColor ?? "rgba(0, 0, 0, 0.04)"};
1937
+ background-color: ${styles.rowHover?.backgroundColor ?? "rgba(128, 128, 128, 0.1)"};
1938
1938
  }
1939
1939
  [data-row-key][data-selected] > div {
1940
1940
  background-color: ${styles.rowSelected?.backgroundColor ?? `${accentColor}15`};
@@ -1949,7 +1949,7 @@ function BoltTable({
1949
1949
  opacity: 1 !important;
1950
1950
  }
1951
1951
  [data-bt-ctx-item]:not(:disabled):hover {
1952
- background-color: rgba(0, 0, 0, 0.06);
1952
+ background-color: rgba(128, 128, 128, 0.15);
1953
1953
  }
1954
1954
  [data-column-key][data-dragging] {
1955
1955
  opacity: 0.3 !important;
@@ -2132,7 +2132,7 @@ function BoltTable({
2132
2132
  textOverflow: "ellipsis",
2133
2133
  whiteSpace: "nowrap",
2134
2134
  borderBottom: "1px solid rgba(128,128,128,0.2)",
2135
- backgroundColor: "Canvas",
2135
+ backgroundColor: styles?.pinnedBg ?? "color-mix(in srgb, currentColor 4%, Canvas)",
2136
2136
  position: "sticky",
2137
2137
  left: columnOffsets.get("__select__") ?? 0,
2138
2138
  top: 0,
@@ -2192,7 +2192,7 @@ function BoltTable({
2192
2192
  textOverflow: "ellipsis",
2193
2193
  whiteSpace: "nowrap",
2194
2194
  borderBottom: "1px solid rgba(128,128,128,0.2)",
2195
- backgroundColor: "Canvas",
2195
+ backgroundColor: styles?.pinnedBg ?? "color-mix(in srgb, currentColor 4%, Canvas)",
2196
2196
  position: "sticky",
2197
2197
  left: columnOffsets.get("__expand__") ?? 0,
2198
2198
  top: 0,
@@ -2272,7 +2272,7 @@ function BoltTable({
2272
2272
  gap: 8,
2273
2273
  paddingTop: 32,
2274
2274
  paddingBottom: 32,
2275
- color: "#6b7280"
2275
+ color: "GrayText"
2276
2276
  },
2277
2277
  children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { fontSize: 14 }, children: "No data" })
2278
2278
  }
@@ -2337,7 +2337,7 @@ function BoltTable({
2337
2337
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { display: "flex", flex: "1 1 0%", alignItems: "center" }, children: (() => {
2338
2338
  const rangeStart = total > 0 ? (currentPage - 1) * pageSize + 1 : 0;
2339
2339
  const rangeEnd = Math.min(currentPage * pageSize, total);
2340
- return pagination?.showTotal ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color: "#6b7280", fontSize: 12 }, children: [
2340
+ return pagination?.showTotal ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color: "GrayText", fontSize: 12 }, children: [
2341
2341
  "Showing",
2342
2342
  " ",
2343
2343
  pagination.showTotal(total, [rangeStart, rangeEnd]),
@@ -2345,7 +2345,7 @@ function BoltTable({
2345
2345
  " ",
2346
2346
  total,
2347
2347
  " items"
2348
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color: "#6b7280", fontSize: 12 }, children: [
2348
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color: "GrayText", fontSize: 12 }, children: [
2349
2349
  rangeStart,
2350
2350
  "\u2013",
2351
2351
  rangeEnd,
@@ -2416,7 +2416,7 @@ function BoltTable({
2416
2416
  "span",
2417
2417
  {
2418
2418
  style: {
2419
- color: "#6b7280",
2419
+ color: "GrayText",
2420
2420
  paddingLeft: 4,
2421
2421
  paddingRight: 4,
2422
2422
  fontSize: 12,