@xcelsior/ui-spreadsheets 1.1.18 → 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,7 +1679,6 @@ 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`,
@@ -4267,7 +4288,6 @@ function Spreadsheet({
4267
4288
  isPinned: isRowIndexPinned,
4268
4289
  onHighlightClick: handleRowIndexHighlightClick,
4269
4290
  onPinClick: () => handleTogglePin(ROW_INDEX_COLUMN_ID),
4270
- hasColumnGroups: true,
4271
4291
  compactMode: effectiveCompactMode
4272
4292
  }
4273
4293
  ),
@@ -4320,7 +4340,15 @@ function Spreadsheet({
4320
4340
  })
4321
4341
  ] }),
4322
4342
  /* @__PURE__ */ jsxs13("tr", { children: [
4323
- !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(
4324
4352
  RowIndexColumnHeader,
4325
4353
  {
4326
4354
  enableHighlighting,
@@ -4328,7 +4356,6 @@ function Spreadsheet({
4328
4356
  isPinned: isRowIndexPinned,
4329
4357
  onHighlightClick: handleRowIndexHighlightClick,
4330
4358
  onPinClick: () => handleTogglePin(ROW_INDEX_COLUMN_ID),
4331
- hasColumnGroups: false,
4332
4359
  compactMode: effectiveCompactMode
4333
4360
  }
4334
4361
  ),