@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.js
CHANGED
|
@@ -1704,8 +1704,8 @@ function RowIndexColumnHeader({
|
|
|
1704
1704
|
style: {
|
|
1705
1705
|
minWidth: `${ROW_INDEX_COLUMN_WIDTH}px`,
|
|
1706
1706
|
width: `${ROW_INDEX_COLUMN_WIDTH}px`,
|
|
1707
|
-
|
|
1708
|
-
|
|
1707
|
+
// Only sticky horizontally if pinned, NOT vertically
|
|
1708
|
+
position: isPinned ? "sticky" : void 0,
|
|
1709
1709
|
left: isPinned ? 0 : void 0,
|
|
1710
1710
|
backgroundColor: highlightColor || "rgb(243 244 246)"
|
|
1711
1711
|
}
|
|
@@ -4326,11 +4326,9 @@ function Spreadsheet({
|
|
|
4326
4326
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
4327
4327
|
RowIndexColumnHeader,
|
|
4328
4328
|
{
|
|
4329
|
-
enableHighlighting,
|
|
4330
4329
|
highlightColor: rowIndexHighlightColor,
|
|
4331
4330
|
isPinned: isRowIndexPinned,
|
|
4332
|
-
|
|
4333
|
-
onPinClick: () => handleTogglePin(ROW_INDEX_COLUMN_ID),
|
|
4331
|
+
isSecondRow: true,
|
|
4334
4332
|
compactMode: effectiveCompactMode
|
|
4335
4333
|
}
|
|
4336
4334
|
),
|
|
@@ -4383,15 +4381,7 @@ function Spreadsheet({
|
|
|
4383
4381
|
})
|
|
4384
4382
|
] }),
|
|
4385
4383
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("tr", { children: [
|
|
4386
|
-
|
|
4387
|
-
RowIndexColumnHeader,
|
|
4388
|
-
{
|
|
4389
|
-
highlightColor: rowIndexHighlightColor,
|
|
4390
|
-
isPinned: isRowIndexPinned,
|
|
4391
|
-
isSecondRow: true,
|
|
4392
|
-
compactMode: effectiveCompactMode
|
|
4393
|
-
}
|
|
4394
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
4384
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
4395
4385
|
RowIndexColumnHeader,
|
|
4396
4386
|
{
|
|
4397
4387
|
enableHighlighting,
|
|
@@ -4407,10 +4397,11 @@ function Spreadsheet({
|
|
|
4407
4397
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
4408
4398
|
"th",
|
|
4409
4399
|
{
|
|
4410
|
-
className: "border border-gray-200 px-2 py-1 text-center text-gray-400",
|
|
4400
|
+
className: "border border-gray-200 px-2 py-1 text-center text-gray-400 sticky z-20",
|
|
4411
4401
|
style: {
|
|
4412
4402
|
backgroundColor: item.headerColor || "rgb(243 244 246)",
|
|
4413
|
-
minWidth: "30px"
|
|
4403
|
+
minWidth: "30px",
|
|
4404
|
+
top: 0
|
|
4414
4405
|
},
|
|
4415
4406
|
children: "..."
|
|
4416
4407
|
},
|