@xcelsior/ui-spreadsheets 1.2.0 → 1.2.2
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 +7 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -16
- package/dist/index.mjs.map +1 -1
- package/dist/styles/globals.css +3 -0
- package/dist/styles/globals.css.map +1 -1
- package/package.json +1 -1
- package/src/components/RowIndexColumnHeader.tsx +4 -3
- package/src/components/Spreadsheet.stories.tsx +142 -0
- package/src/components/Spreadsheet.tsx +13 -23
package/dist/index.mjs
CHANGED
|
@@ -1661,8 +1661,8 @@ function RowIndexColumnHeader({
|
|
|
1661
1661
|
style: {
|
|
1662
1662
|
minWidth: `${ROW_INDEX_COLUMN_WIDTH}px`,
|
|
1663
1663
|
width: `${ROW_INDEX_COLUMN_WIDTH}px`,
|
|
1664
|
-
|
|
1665
|
-
|
|
1664
|
+
// Only sticky horizontally if pinned, NOT vertically
|
|
1665
|
+
position: isPinned ? "sticky" : void 0,
|
|
1666
1666
|
left: isPinned ? 0 : void 0,
|
|
1667
1667
|
backgroundColor: highlightColor || "rgb(243 244 246)"
|
|
1668
1668
|
}
|
|
@@ -4283,11 +4283,9 @@ function Spreadsheet({
|
|
|
4283
4283
|
/* @__PURE__ */ jsx13(
|
|
4284
4284
|
RowIndexColumnHeader,
|
|
4285
4285
|
{
|
|
4286
|
-
enableHighlighting,
|
|
4287
4286
|
highlightColor: rowIndexHighlightColor,
|
|
4288
4287
|
isPinned: isRowIndexPinned,
|
|
4289
|
-
|
|
4290
|
-
onPinClick: () => handleTogglePin(ROW_INDEX_COLUMN_ID),
|
|
4288
|
+
isSecondRow: true,
|
|
4291
4289
|
compactMode: effectiveCompactMode
|
|
4292
4290
|
}
|
|
4293
4291
|
),
|
|
@@ -4340,15 +4338,7 @@ function Spreadsheet({
|
|
|
4340
4338
|
})
|
|
4341
4339
|
] }),
|
|
4342
4340
|
/* @__PURE__ */ jsxs13("tr", { children: [
|
|
4343
|
-
|
|
4344
|
-
RowIndexColumnHeader,
|
|
4345
|
-
{
|
|
4346
|
-
highlightColor: rowIndexHighlightColor,
|
|
4347
|
-
isPinned: isRowIndexPinned,
|
|
4348
|
-
isSecondRow: true,
|
|
4349
|
-
compactMode: effectiveCompactMode
|
|
4350
|
-
}
|
|
4351
|
-
) : /* @__PURE__ */ jsx13(
|
|
4341
|
+
/* @__PURE__ */ jsx13(
|
|
4352
4342
|
RowIndexColumnHeader,
|
|
4353
4343
|
{
|
|
4354
4344
|
enableHighlighting,
|
|
@@ -4364,10 +4354,11 @@ function Spreadsheet({
|
|
|
4364
4354
|
return /* @__PURE__ */ jsx13(
|
|
4365
4355
|
"th",
|
|
4366
4356
|
{
|
|
4367
|
-
className: "border border-gray-200 px-2 py-1 text-center text-gray-400",
|
|
4357
|
+
className: "border border-gray-200 px-2 py-1 text-center text-gray-400 sticky z-20",
|
|
4368
4358
|
style: {
|
|
4369
4359
|
backgroundColor: item.headerColor || "rgb(243 244 246)",
|
|
4370
|
-
minWidth: "30px"
|
|
4360
|
+
minWidth: "30px",
|
|
4361
|
+
top: 0
|
|
4371
4362
|
},
|
|
4372
4363
|
children: "..."
|
|
4373
4364
|
},
|