@alaarab/ogrid-react-fluent 2.1.1 → 2.1.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.
|
@@ -71,7 +71,7 @@ function DataGridTableInner(props) {
|
|
|
71
71
|
['--data-table-min-width']: showEmptyInGrid ? '100%' : allowOverflowX ? 'max-content' : fitToContent ? 'max-content' : '100%',
|
|
72
72
|
['--data-table-total-min-width']: `${minTableWidth}px`,
|
|
73
73
|
...(rowHeight ? { ['--ogrid-row-height']: `${rowHeight}px` } : {}),
|
|
74
|
-
}, children: [_jsx("div", { className: styles.tableScrollContent, children: _jsx("div", { className: isLoading && items.length > 0 ? styles.loadingDimmed : undefined, children: _jsxs("div", { className: styles.tableWidthAnchor, ref: tableContainerRef, children: [_jsxs(Table, { role: "grid", className: styles.dataTable, children: [_jsx(TableHeader, { className: styles.stickyHeader, children: headerRows.map((row, rowIdx) => (_jsxs(TableRow, { children: [rowIdx === headerRows.length - 1 && hasCheckboxCol && (_jsx(TableHeaderCell, { className: styles.selectionHeaderCellWrapper, children: _jsx("div", { className: styles.selectionHeaderCellInner, children: _jsx(Checkbox, { checked: allSelected ? true : someSelected ? 'mixed' : false, onChange: (_, data) => handleSelectAll(!!data.checked), "aria-label": "Select all rows" }) }) }, "__selection__")), rowIdx === 0 && rowIdx < headerRows.length - 1 && hasCheckboxCol && (_jsx("th", { rowSpan: headerRows.length - 1 }, "__selection_placeholder__")), rowIdx === headerRows.length - 1 && hasRowNumbersCol && (_jsx(TableHeaderCell, { className: styles.rowNumberHeaderCellWrapper, children: _jsx("div", { className: styles.rowNumberHeaderCellInner, children: "#" }) }, "__row_number__")), rowIdx === 0 && rowIdx < headerRows.length - 1 && hasRowNumbersCol && (_jsx("th", { rowSpan: headerRows.length - 1 }, "__row_number_placeholder__")), row.map((cell, cellIdx) => {
|
|
74
|
+
}, children: [_jsx("div", { className: styles.tableScrollContent, children: _jsx("div", { className: isLoading && items.length > 0 ? styles.loadingDimmed : undefined, children: _jsxs("div", { className: styles.tableWidthAnchor, ref: tableContainerRef, children: [_jsxs(Table, { role: "grid", className: styles.dataTable, children: [_jsx(TableHeader, { className: o.stickyHeader ? styles.stickyHeader : undefined, children: headerRows.map((row, rowIdx) => (_jsxs(TableRow, { children: [rowIdx === headerRows.length - 1 && hasCheckboxCol && (_jsx(TableHeaderCell, { className: styles.selectionHeaderCellWrapper, children: _jsx("div", { className: styles.selectionHeaderCellInner, children: _jsx(Checkbox, { checked: allSelected ? true : someSelected ? 'mixed' : false, onChange: (_, data) => handleSelectAll(!!data.checked), "aria-label": "Select all rows" }) }) }, "__selection__")), rowIdx === 0 && rowIdx < headerRows.length - 1 && hasCheckboxCol && (_jsx("th", { rowSpan: headerRows.length - 1 }, "__selection_placeholder__")), rowIdx === headerRows.length - 1 && hasRowNumbersCol && (_jsx(TableHeaderCell, { className: styles.rowNumberHeaderCellWrapper, children: _jsx("div", { className: styles.rowNumberHeaderCellInner, children: "#" }) }, "__row_number__")), rowIdx === 0 && rowIdx < headerRows.length - 1 && hasRowNumbersCol && (_jsx("th", { rowSpan: headerRows.length - 1 }, "__row_number_placeholder__")), row.map((cell, cellIdx) => {
|
|
75
75
|
if (cell.isGroup) {
|
|
76
76
|
return (_jsx("th", { colSpan: cell.colSpan, className: styles.groupHeaderCell, scope: "colgroup", children: cell.label }, cellIdx));
|
|
77
77
|
}
|
|
@@ -514,8 +514,6 @@
|
|
|
514
514
|
font-size: 14px;
|
|
515
515
|
color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
|
|
516
516
|
white-space: nowrap;
|
|
517
|
-
position: sticky;
|
|
518
|
-
top: 0;
|
|
519
517
|
background-color: var(--colorSubtleBackgroundSelected, var(--ogrid-header-bg, #f3f2f1));
|
|
520
518
|
z-index: 8;
|
|
521
519
|
border-bottom: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
|
|
@@ -657,6 +655,11 @@
|
|
|
657
655
|
background-color: var(--colorSubtleBackgroundSelected, var(--ogrid-header-bg, #f3f2f1));
|
|
658
656
|
}
|
|
659
657
|
|
|
658
|
+
.stickyHeader :global(.fui-TableHeaderCell) {
|
|
659
|
+
position: sticky;
|
|
660
|
+
top: 0;
|
|
661
|
+
}
|
|
662
|
+
|
|
660
663
|
.stickyHeader .pinnedColLeft,
|
|
661
664
|
.stickyHeader .pinnedColRight {
|
|
662
665
|
top: 0;
|
|
@@ -665,6 +668,8 @@
|
|
|
665
668
|
|
|
666
669
|
.dataTable .pinnedColLeft {
|
|
667
670
|
background-color: var(--colorNeutralBackground1, var(--ogrid-bg, #ffffff));
|
|
671
|
+
border-right: 1px solid var(--colorNeutralStroke1, var(--ogrid-border, rgba(0, 0, 0, 0.12)));
|
|
672
|
+
box-shadow: 2px 0 4px -1px rgba(0, 0, 0, 0.1);
|
|
668
673
|
}
|
|
669
674
|
|
|
670
675
|
.dataTable :global(.fui-TableHeader) .pinnedColLeft {
|
|
@@ -673,6 +678,8 @@
|
|
|
673
678
|
|
|
674
679
|
.dataTable .pinnedColRight {
|
|
675
680
|
background-color: var(--colorNeutralBackground1, var(--ogrid-bg, #ffffff));
|
|
681
|
+
border-left: 1px solid var(--colorNeutralStroke1, var(--ogrid-border, rgba(0, 0, 0, 0.12)));
|
|
682
|
+
box-shadow: -2px 0 4px -1px rgba(0, 0, 0, 0.1);
|
|
676
683
|
}
|
|
677
684
|
|
|
678
685
|
.dataTable :global(.fui-TableHeader) .pinnedColRight {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alaarab/ogrid-react-fluent",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "OGrid React Fluent implementation – DataGrid-powered data table with sorting, filtering, pagination, column chooser, and CSV export.",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"node": ">=18"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@alaarab/ogrid-react": "2.1.
|
|
44
|
+
"@alaarab/ogrid-react": "2.1.2"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@fluentui/react-components": "^9.0.0",
|