@xcelsior/ui-spreadsheets 1.1.19 → 1.2.0

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.mjs CHANGED
@@ -1642,11 +1642,33 @@ function RowIndexColumnHeader({
1642
1642
  isPinned = false,
1643
1643
  onHighlightClick,
1644
1644
  onPinClick,
1645
- hasColumnGroups = false,
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: "#" }),
@@ -4269,7 +4288,6 @@ function Spreadsheet({
4269
4288
  isPinned: isRowIndexPinned,
4270
4289
  onHighlightClick: handleRowIndexHighlightClick,
4271
4290
  onPinClick: () => handleTogglePin(ROW_INDEX_COLUMN_ID),
4272
- hasColumnGroups: true,
4273
4291
  compactMode: effectiveCompactMode
4274
4292
  }
4275
4293
  ),
@@ -4322,7 +4340,15 @@ function Spreadsheet({
4322
4340
  })
4323
4341
  ] }),
4324
4342
  /* @__PURE__ */ jsxs13("tr", { children: [
4325
- !columnGroups && /* @__PURE__ */ jsx13(
4343
+ columnGroups ? /* @__PURE__ */ jsx13(
4344
+ RowIndexColumnHeader,
4345
+ {
4346
+ highlightColor: rowIndexHighlightColor,
4347
+ isPinned: isRowIndexPinned,
4348
+ isSecondRow: true,
4349
+ compactMode: effectiveCompactMode
4350
+ }
4351
+ ) : /* @__PURE__ */ jsx13(
4326
4352
  RowIndexColumnHeader,
4327
4353
  {
4328
4354
  enableHighlighting,
@@ -4330,7 +4356,6 @@ function Spreadsheet({
4330
4356
  isPinned: isRowIndexPinned,
4331
4357
  onHighlightClick: handleRowIndexHighlightClick,
4332
4358
  onPinClick: () => handleTogglePin(ROW_INDEX_COLUMN_ID),
4333
- hasColumnGroups: false,
4334
4359
  compactMode: effectiveCompactMode
4335
4360
  }
4336
4361
  ),