@xcelsior/ui-spreadsheets 1.1.19 → 1.2.1
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.js +26 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/RowIndexColumnHeader.tsx +26 -6
- package/src/components/Spreadsheet.tsx +11 -17
package/dist/index.mjs
CHANGED
|
@@ -1642,11 +1642,33 @@ function RowIndexColumnHeader({
|
|
|
1642
1642
|
isPinned = false,
|
|
1643
1643
|
onHighlightClick,
|
|
1644
1644
|
onPinClick,
|
|
1645
|
-
|
|
1645
|
+
isSecondRow = false,
|
|
1646
1646
|
compactMode = false,
|
|
1647
1647
|
className
|
|
1648
1648
|
}) {
|
|
1649
1649
|
const cellPadding = compactMode ? cellPaddingCompact3 : cellPaddingNormal3;
|
|
1650
|
+
if (isSecondRow) {
|
|
1651
|
+
return /* @__PURE__ */ jsx7(
|
|
1652
|
+
"th",
|
|
1653
|
+
{
|
|
1654
|
+
className: cn(
|
|
1655
|
+
"border border-gray-200 text-center font-bold text-gray-700",
|
|
1656
|
+
compactMode ? "text-[10px]" : "text-xs",
|
|
1657
|
+
cellPadding,
|
|
1658
|
+
isPinned ? "z-30" : "z-20",
|
|
1659
|
+
className
|
|
1660
|
+
),
|
|
1661
|
+
style: {
|
|
1662
|
+
minWidth: `${ROW_INDEX_COLUMN_WIDTH}px`,
|
|
1663
|
+
width: `${ROW_INDEX_COLUMN_WIDTH}px`,
|
|
1664
|
+
position: "sticky",
|
|
1665
|
+
top: 0,
|
|
1666
|
+
left: isPinned ? 0 : void 0,
|
|
1667
|
+
backgroundColor: highlightColor || "rgb(243 244 246)"
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
);
|
|
1671
|
+
}
|
|
1650
1672
|
return /* @__PURE__ */ jsx7(
|
|
1651
1673
|
"th",
|
|
1652
1674
|
{
|
|
@@ -1657,16 +1679,13 @@ function RowIndexColumnHeader({
|
|
|
1657
1679
|
isPinned ? "z-30" : "z-20",
|
|
1658
1680
|
className
|
|
1659
1681
|
),
|
|
1660
|
-
rowSpan: hasColumnGroups ? 2 : void 0,
|
|
1661
1682
|
style: {
|
|
1662
1683
|
minWidth: `${ROW_INDEX_COLUMN_WIDTH}px`,
|
|
1663
1684
|
width: `${ROW_INDEX_COLUMN_WIDTH}px`,
|
|
1664
1685
|
position: "sticky",
|
|
1665
1686
|
top: 0,
|
|
1666
1687
|
left: isPinned ? 0 : void 0,
|
|
1667
|
-
backgroundColor: highlightColor || "rgb(243 244 246)"
|
|
1668
|
-
overflow: "hidden",
|
|
1669
|
-
verticalAlign: "middle"
|
|
1688
|
+
backgroundColor: highlightColor || "rgb(243 244 246)"
|
|
1670
1689
|
},
|
|
1671
1690
|
children: /* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-center gap-1", children: [
|
|
1672
1691
|
/* @__PURE__ */ jsx7("span", { children: "#" }),
|
|
@@ -4264,12 +4283,9 @@ function Spreadsheet({
|
|
|
4264
4283
|
/* @__PURE__ */ jsx13(
|
|
4265
4284
|
RowIndexColumnHeader,
|
|
4266
4285
|
{
|
|
4267
|
-
enableHighlighting,
|
|
4268
4286
|
highlightColor: rowIndexHighlightColor,
|
|
4269
4287
|
isPinned: isRowIndexPinned,
|
|
4270
|
-
|
|
4271
|
-
onPinClick: () => handleTogglePin(ROW_INDEX_COLUMN_ID),
|
|
4272
|
-
hasColumnGroups: true,
|
|
4288
|
+
isSecondRow: true,
|
|
4273
4289
|
compactMode: effectiveCompactMode
|
|
4274
4290
|
}
|
|
4275
4291
|
),
|
|
@@ -4322,7 +4338,7 @@ function Spreadsheet({
|
|
|
4322
4338
|
})
|
|
4323
4339
|
] }),
|
|
4324
4340
|
/* @__PURE__ */ jsxs13("tr", { children: [
|
|
4325
|
-
|
|
4341
|
+
/* @__PURE__ */ jsx13(
|
|
4326
4342
|
RowIndexColumnHeader,
|
|
4327
4343
|
{
|
|
4328
4344
|
enableHighlighting,
|
|
@@ -4330,7 +4346,6 @@ function Spreadsheet({
|
|
|
4330
4346
|
isPinned: isRowIndexPinned,
|
|
4331
4347
|
onHighlightClick: handleRowIndexHighlightClick,
|
|
4332
4348
|
onPinClick: () => handleTogglePin(ROW_INDEX_COLUMN_ID),
|
|
4333
|
-
hasColumnGroups: false,
|
|
4334
4349
|
compactMode: effectiveCompactMode
|
|
4335
4350
|
}
|
|
4336
4351
|
),
|