@versini/ui-datagrid 0.4.6 → 0.4.7
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/DataGrid/DataGrid.js +1 -1
- package/dist/DataGrid/DataGridContext.js +1 -1
- package/dist/DataGrid/DataGridTypes.js +1 -1
- package/dist/DataGrid/index.js +1 -1
- package/dist/DataGridAnimated/AnimatedWrapper.js +1 -1
- package/dist/DataGridAnimated/index.js +1 -1
- package/dist/DataGridAnimated/useAnimatedHeight.js +1 -1
- package/dist/DataGridBody/DataGridBody.js +1 -1
- package/dist/DataGridBody/getBodyClass.js +1 -1
- package/dist/DataGridBody/index.js +1 -1
- package/dist/DataGridBody/useColumnMeasurement.js +1 -1
- package/dist/DataGridCell/DataGridCell.js +1 -1
- package/dist/DataGridCell/index.js +1 -1
- package/dist/DataGridCellSort/DataGridCellSort.js +1 -1
- package/dist/DataGridCellSort/index.js +1 -1
- package/dist/DataGridConstants/DataGridConstants.js +1 -1
- package/dist/DataGridConstants/index.js +1 -1
- package/dist/DataGridFooter/DataGridFooter.js +1 -1
- package/dist/DataGridFooter/index.js +1 -1
- package/dist/DataGridHeader/DataGridHeader.js +1 -1
- package/dist/DataGridHeader/index.js +1 -1
- package/dist/DataGridInfinite/DataGridInfiniteBody.js +1 -1
- package/dist/DataGridInfinite/index.js +1 -1
- package/dist/DataGridRow/DataGridRow.js +5 -2
- package/dist/DataGridRow/index.js +1 -1
- package/dist/DataGridSorting/index.js +1 -1
- package/dist/DataGridSorting/sortingUtils.js +1 -1
- package/dist/utilities/classes.d.ts +4 -1
- package/dist/utilities/classes.js +23 -7
- package/package.json +2 -2
package/dist/DataGrid/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
@versini/ui-datagrid v0.4.
|
|
2
|
+
@versini/ui-datagrid v0.4.7
|
|
3
3
|
© 2026 gizmette.com
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -89,7 +89,10 @@ import { getRowClasses } from "../utilities/classes.js";
|
|
|
89
89
|
mode,
|
|
90
90
|
className,
|
|
91
91
|
cellWrapper,
|
|
92
|
-
isLastRow
|
|
92
|
+
isLastRow,
|
|
93
|
+
hasColumns: Boolean(columns),
|
|
94
|
+
stickyHeader,
|
|
95
|
+
stickyFooter
|
|
93
96
|
}),
|
|
94
97
|
style: {
|
|
95
98
|
...rowStyle,
|
|
@@ -114,11 +114,14 @@ export declare const getFooterClasses: ({ className, stickyFooter, mode, blurEff
|
|
|
114
114
|
* DataGridInfiniteBody), explicit odd/even classes are used instead of CSS
|
|
115
115
|
* :nth-child selectors, which don't work with wrapper elements.
|
|
116
116
|
*/
|
|
117
|
-
export declare const getRowClasses: ({ mode, className, cellWrapper, isLastRow, }: {
|
|
117
|
+
export declare const getRowClasses: ({ mode, className, cellWrapper, isLastRow, hasColumns, stickyHeader, stickyFooter, }: {
|
|
118
118
|
mode: ThemeMode;
|
|
119
119
|
cellWrapper?: CellWrapperType;
|
|
120
120
|
className?: string;
|
|
121
121
|
isLastRow?: boolean;
|
|
122
|
+
hasColumns?: boolean;
|
|
123
|
+
stickyHeader?: boolean;
|
|
124
|
+
stickyFooter?: boolean;
|
|
122
125
|
}) => string;
|
|
123
126
|
/**
|
|
124
127
|
* Generates classes for DataGridCell.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
@versini/ui-datagrid v0.4.
|
|
2
|
+
@versini/ui-datagrid v0.4.7
|
|
3
3
|
© 2026 gizmette.com
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -165,9 +165,25 @@ import { BlurEffects, CellWrapper } from "../DataGridConstants/DataGridConstants
|
|
|
165
165
|
* Generates classes for DataGridRow. When rowIndex is provided (e.g., from
|
|
166
166
|
* DataGridInfiniteBody), explicit odd/even classes are used instead of CSS
|
|
167
167
|
* :nth-child selectors, which don't work with wrapper elements.
|
|
168
|
-
*/ const getRowClasses = ({ mode, className, cellWrapper, isLastRow })=>{
|
|
168
|
+
*/ const getRowClasses = ({ mode, className, cellWrapper, isLastRow, hasColumns, stickyHeader, stickyFooter })=>{
|
|
169
169
|
const layoutClass = "group grid items-center";
|
|
170
170
|
if (cellWrapper === CellWrapper.HEADER || cellWrapper === CellWrapper.FOOTER) {
|
|
171
|
+
/**
|
|
172
|
+
* When hasColumns is true and not sticky, the parent wrapper uses
|
|
173
|
+
* `display: contents` which doesn't render a box. In this case, we need
|
|
174
|
+
* to apply background and border styling directly to the row.
|
|
175
|
+
*/ const isHeader = cellWrapper === CellWrapper.HEADER;
|
|
176
|
+
const parentUsesContents = isHeader ? hasColumns && !stickyHeader : hasColumns && !stickyFooter;
|
|
177
|
+
if (parentUsesContents) {
|
|
178
|
+
return clsx(layoutClass, getHeaderFooterBackgroundClasses({
|
|
179
|
+
mode,
|
|
180
|
+
hasBlur: false,
|
|
181
|
+
sticky: false
|
|
182
|
+
}), {
|
|
183
|
+
"border-b border-table-medium shadow-md": isHeader,
|
|
184
|
+
"border-t border-table-medium": !isHeader
|
|
185
|
+
}, className);
|
|
186
|
+
}
|
|
171
187
|
return clsx(layoutClass, className);
|
|
172
188
|
}
|
|
173
189
|
/**
|
|
@@ -197,12 +213,12 @@ import { BlurEffects, CellWrapper } from "../DataGridConstants/DataGridConstants
|
|
|
197
213
|
{
|
|
198
214
|
"font-bold": isHeader || isFooter
|
|
199
215
|
}, // Active row indicator.
|
|
200
|
-
"first:group-data-
|
|
216
|
+
"first:group-data-active:relative", "first:group-data-active:before:absolute first:group-data-active:before:left-0 first:group-data-active:before:top-0 first:group-data-active:before:bottom-0 first:group-data-active:before:w-1", "first:group-data-active:self-stretch first:group-data-active:flex first:group-data-active:items-center", // Active indicator color based on theme mode.
|
|
201
217
|
{
|
|
202
|
-
"first:group-data-
|
|
203
|
-
"first:group-data-
|
|
204
|
-
"first:group-data-
|
|
205
|
-
"first:group-data-
|
|
218
|
+
"first:group-data-active:before:bg-table-active-dark": mode === "dark",
|
|
219
|
+
"first:group-data-active:before:bg-table-active-light": mode === "light",
|
|
220
|
+
"first:group-data-active:before:bg-table-active-dark dark:first:group-data-active:before:bg-table-active-light": mode === "system",
|
|
221
|
+
"first:group-data-active:before:bg-table-active-light dark:first:group-data-active:before:bg-table-active-dark": mode === "alt-system"
|
|
206
222
|
}, // Vertical borders.
|
|
207
223
|
{
|
|
208
224
|
"self-stretch flex items-center": borderLeft || borderRight,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-datagrid",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"sideEffects": [
|
|
95
95
|
"**/*.css"
|
|
96
96
|
],
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "060ac013ddc251fea22063336302f5f804673301"
|
|
98
98
|
}
|