@dmsi/wedgekit-react 0.0.687 → 0.0.689
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/{chunk-RC7O4NKD.js → chunk-QTSKA34J.js} +28 -10
- package/dist/components/CalendarRange.cjs +28 -10
- package/dist/components/CalendarRange.js +1 -1
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +28 -10
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +1 -1
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +28 -10
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +1 -1
- package/dist/components/DataGrid/PinnedColumns.cjs +28 -10
- package/dist/components/DataGrid/PinnedColumns.js +1 -1
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +28 -10
- package/dist/components/DataGrid/TableBody/LoadingCell.js +1 -1
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +28 -10
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +1 -1
- package/dist/components/DataGrid/TableBody/index.cjs +28 -10
- package/dist/components/DataGrid/TableBody/index.js +1 -1
- package/dist/components/DataGrid/index.cjs +28 -10
- package/dist/components/DataGrid/index.js +1 -1
- package/dist/components/DataGrid/utils.cjs +28 -10
- package/dist/components/DataGrid/utils.js +1 -1
- package/dist/components/DateInput.cjs +28 -10
- package/dist/components/DateInput.js +1 -1
- package/dist/components/DateRangeInput.cjs +28 -10
- package/dist/components/DateRangeInput.js +1 -1
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +28 -10
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +1 -1
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +28 -10
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +1 -1
- package/dist/components/MobileDataGrid/index.cjs +28 -10
- package/dist/components/MobileDataGrid/index.js +1 -1
- package/dist/components/index.cjs +28 -10
- package/dist/components/index.js +1 -1
- package/package.json +1 -1
|
@@ -163,7 +163,9 @@ function TableBodyRow({
|
|
|
163
163
|
// enableColumnSelector = false,
|
|
164
164
|
locked,
|
|
165
165
|
pinDirection,
|
|
166
|
-
disabled
|
|
166
|
+
disabled,
|
|
167
|
+
hoveredRowId,
|
|
168
|
+
setHoveredRowId
|
|
167
169
|
}) {
|
|
168
170
|
var _a;
|
|
169
171
|
let visibleCells;
|
|
@@ -176,17 +178,20 @@ function TableBodyRow({
|
|
|
176
178
|
const columns = locked ? visibleCells : virtualColumns;
|
|
177
179
|
const isError = typeof row.original === "object" && row.original !== null && "rowState" in row.original && row.original.rowState === "error";
|
|
178
180
|
const CellElement = locked ? DataGridCell : DragAlongCell;
|
|
181
|
+
const isHovered = hoveredRowId === row.id;
|
|
179
182
|
return /* @__PURE__ */ jsxs(
|
|
180
183
|
"tr",
|
|
181
184
|
{
|
|
182
185
|
className: clsx(
|
|
183
186
|
"min-h-10",
|
|
184
187
|
"transition-colors",
|
|
185
|
-
!disabled
|
|
188
|
+
showFilterRow && !disabled ? "even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal" : "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal",
|
|
189
|
+
!disabled && isHovered && "!bg-background-action-secondary-hover",
|
|
186
190
|
row.getIsSelected() && !disabled && "!bg-background-action-secondary-hover",
|
|
187
|
-
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
188
|
-
showFilterRow && !disabled ? "even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal" : "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal"
|
|
191
|
+
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
189
192
|
),
|
|
193
|
+
onMouseEnter: () => setHoveredRowId == null ? void 0 : setHoveredRowId(row.id),
|
|
194
|
+
onMouseLeave: () => setHoveredRowId == null ? void 0 : setHoveredRowId(null),
|
|
190
195
|
id: id ? `${id}-row-${row.id}` : void 0,
|
|
191
196
|
"data-testid": testid ? `${testid}-row-${row.id}` : void 0,
|
|
192
197
|
style: {
|
|
@@ -297,7 +302,9 @@ function TableBody({
|
|
|
297
302
|
locked,
|
|
298
303
|
pinDirection,
|
|
299
304
|
rowDisabled,
|
|
300
|
-
rowDisabledAccessor
|
|
305
|
+
rowDisabledAccessor,
|
|
306
|
+
hoveredRowId,
|
|
307
|
+
setHoveredRowId
|
|
301
308
|
}) {
|
|
302
309
|
const { rows } = table.getRowModel();
|
|
303
310
|
const rowVirtualizer = useVirtualizer({
|
|
@@ -391,7 +398,9 @@ function TableBody({
|
|
|
391
398
|
enableColumnSelector,
|
|
392
399
|
locked,
|
|
393
400
|
pinDirection,
|
|
394
|
-
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled
|
|
401
|
+
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled,
|
|
402
|
+
hoveredRowId,
|
|
403
|
+
setHoveredRowId
|
|
395
404
|
},
|
|
396
405
|
row.id
|
|
397
406
|
);
|
|
@@ -666,7 +675,9 @@ function PinnedColumns(_a) {
|
|
|
666
675
|
}, props), {
|
|
667
676
|
table,
|
|
668
677
|
locked: !enableColumnSelector || pinDirection === "right",
|
|
669
|
-
pinDirection
|
|
678
|
+
pinDirection,
|
|
679
|
+
hoveredRowId: props.hoveredRowId,
|
|
680
|
+
setHoveredRowId: props.setHoveredRowId
|
|
670
681
|
})
|
|
671
682
|
)
|
|
672
683
|
]
|
|
@@ -717,6 +728,7 @@ function DataGrid({
|
|
|
717
728
|
const [localSorting, setLocalSorting] = useState3([]);
|
|
718
729
|
const [localColumnFilters, setLocalColumnFilters] = useState3([]);
|
|
719
730
|
const [localRowSelection, setLocalRowSelection] = useState3({});
|
|
731
|
+
const [hoveredRowId, setHoveredRowId] = useState3(null);
|
|
720
732
|
const {
|
|
721
733
|
columns: tableColumns,
|
|
722
734
|
setColumns: setTableColumns,
|
|
@@ -965,7 +977,9 @@ function DataGrid({
|
|
|
965
977
|
pagination,
|
|
966
978
|
isLoadingMore,
|
|
967
979
|
hasMore,
|
|
968
|
-
showFilterRow
|
|
980
|
+
showFilterRow,
|
|
981
|
+
hoveredRowId,
|
|
982
|
+
setHoveredRowId
|
|
969
983
|
}
|
|
970
984
|
),
|
|
971
985
|
/* @__PURE__ */ jsxs5("table", { className: "flex-1 flex flex-col min-h-min", children: [
|
|
@@ -1096,7 +1110,9 @@ function DataGrid({
|
|
|
1096
1110
|
showFilterRow,
|
|
1097
1111
|
enableColumnSelector,
|
|
1098
1112
|
rowDisabled,
|
|
1099
|
-
rowDisabledAccessor
|
|
1113
|
+
rowDisabledAccessor,
|
|
1114
|
+
hoveredRowId,
|
|
1115
|
+
setHoveredRowId
|
|
1100
1116
|
}
|
|
1101
1117
|
)
|
|
1102
1118
|
] }),
|
|
@@ -1114,7 +1130,9 @@ function DataGrid({
|
|
|
1114
1130
|
pagination,
|
|
1115
1131
|
isLoadingMore,
|
|
1116
1132
|
hasMore,
|
|
1117
|
-
showFilterRow
|
|
1133
|
+
showFilterRow,
|
|
1134
|
+
hoveredRowId,
|
|
1135
|
+
setHoveredRowId
|
|
1118
1136
|
}
|
|
1119
1137
|
)
|
|
1120
1138
|
]
|
|
@@ -2738,7 +2738,9 @@ function TableBodyRow({
|
|
|
2738
2738
|
// enableColumnSelector = false,
|
|
2739
2739
|
locked,
|
|
2740
2740
|
pinDirection,
|
|
2741
|
-
disabled
|
|
2741
|
+
disabled,
|
|
2742
|
+
hoveredRowId,
|
|
2743
|
+
setHoveredRowId
|
|
2742
2744
|
}) {
|
|
2743
2745
|
var _a;
|
|
2744
2746
|
let visibleCells;
|
|
@@ -2751,17 +2753,20 @@ function TableBodyRow({
|
|
|
2751
2753
|
const columns = locked ? visibleCells : virtualColumns;
|
|
2752
2754
|
const isError = typeof row.original === "object" && row.original !== null && "rowState" in row.original && row.original.rowState === "error";
|
|
2753
2755
|
const CellElement = locked ? DataGridCell : DragAlongCell;
|
|
2756
|
+
const isHovered = hoveredRowId === row.id;
|
|
2754
2757
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2755
2758
|
"tr",
|
|
2756
2759
|
{
|
|
2757
2760
|
className: (0, import_clsx11.default)(
|
|
2758
2761
|
"min-h-10",
|
|
2759
2762
|
"transition-colors",
|
|
2760
|
-
!disabled
|
|
2763
|
+
showFilterRow && !disabled ? "even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal" : "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal",
|
|
2764
|
+
!disabled && isHovered && "!bg-background-action-secondary-hover",
|
|
2761
2765
|
row.getIsSelected() && !disabled && "!bg-background-action-secondary-hover",
|
|
2762
|
-
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
2763
|
-
showFilterRow && !disabled ? "even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal" : "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal"
|
|
2766
|
+
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
2764
2767
|
),
|
|
2768
|
+
onMouseEnter: () => setHoveredRowId == null ? void 0 : setHoveredRowId(row.id),
|
|
2769
|
+
onMouseLeave: () => setHoveredRowId == null ? void 0 : setHoveredRowId(null),
|
|
2765
2770
|
id: id ? `${id}-row-${row.id}` : void 0,
|
|
2766
2771
|
"data-testid": testid ? `${testid}-row-${row.id}` : void 0,
|
|
2767
2772
|
style: {
|
|
@@ -2872,7 +2877,9 @@ function TableBody({
|
|
|
2872
2877
|
locked,
|
|
2873
2878
|
pinDirection,
|
|
2874
2879
|
rowDisabled,
|
|
2875
|
-
rowDisabledAccessor
|
|
2880
|
+
rowDisabledAccessor,
|
|
2881
|
+
hoveredRowId,
|
|
2882
|
+
setHoveredRowId
|
|
2876
2883
|
}) {
|
|
2877
2884
|
const { rows } = table.getRowModel();
|
|
2878
2885
|
const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
|
|
@@ -2966,7 +2973,9 @@ function TableBody({
|
|
|
2966
2973
|
enableColumnSelector,
|
|
2967
2974
|
locked,
|
|
2968
2975
|
pinDirection,
|
|
2969
|
-
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled
|
|
2976
|
+
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled,
|
|
2977
|
+
hoveredRowId,
|
|
2978
|
+
setHoveredRowId
|
|
2970
2979
|
},
|
|
2971
2980
|
row.id
|
|
2972
2981
|
);
|
|
@@ -3241,7 +3250,9 @@ function PinnedColumns(_a) {
|
|
|
3241
3250
|
}, props), {
|
|
3242
3251
|
table,
|
|
3243
3252
|
locked: !enableColumnSelector || pinDirection === "right",
|
|
3244
|
-
pinDirection
|
|
3253
|
+
pinDirection,
|
|
3254
|
+
hoveredRowId: props.hoveredRowId,
|
|
3255
|
+
setHoveredRowId: props.setHoveredRowId
|
|
3245
3256
|
})
|
|
3246
3257
|
)
|
|
3247
3258
|
]
|
|
@@ -3295,6 +3306,7 @@ function DataGrid({
|
|
|
3295
3306
|
const [localSorting, setLocalSorting] = (0, import_react17.useState)([]);
|
|
3296
3307
|
const [localColumnFilters, setLocalColumnFilters] = (0, import_react17.useState)([]);
|
|
3297
3308
|
const [localRowSelection, setLocalRowSelection] = (0, import_react17.useState)({});
|
|
3309
|
+
const [hoveredRowId, setHoveredRowId] = (0, import_react17.useState)(null);
|
|
3298
3310
|
const {
|
|
3299
3311
|
columns: tableColumns,
|
|
3300
3312
|
setColumns: setTableColumns,
|
|
@@ -3543,7 +3555,9 @@ function DataGrid({
|
|
|
3543
3555
|
pagination,
|
|
3544
3556
|
isLoadingMore,
|
|
3545
3557
|
hasMore,
|
|
3546
|
-
showFilterRow
|
|
3558
|
+
showFilterRow,
|
|
3559
|
+
hoveredRowId,
|
|
3560
|
+
setHoveredRowId
|
|
3547
3561
|
}
|
|
3548
3562
|
),
|
|
3549
3563
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("table", { className: "flex-1 flex flex-col min-h-min", children: [
|
|
@@ -3674,7 +3688,9 @@ function DataGrid({
|
|
|
3674
3688
|
showFilterRow,
|
|
3675
3689
|
enableColumnSelector,
|
|
3676
3690
|
rowDisabled,
|
|
3677
|
-
rowDisabledAccessor
|
|
3691
|
+
rowDisabledAccessor,
|
|
3692
|
+
hoveredRowId,
|
|
3693
|
+
setHoveredRowId
|
|
3678
3694
|
}
|
|
3679
3695
|
)
|
|
3680
3696
|
] }),
|
|
@@ -3692,7 +3708,9 @@ function DataGrid({
|
|
|
3692
3708
|
pagination,
|
|
3693
3709
|
isLoadingMore,
|
|
3694
3710
|
hasMore,
|
|
3695
|
-
showFilterRow
|
|
3711
|
+
showFilterRow,
|
|
3712
|
+
hoveredRowId,
|
|
3713
|
+
setHoveredRowId
|
|
3696
3714
|
}
|
|
3697
3715
|
)
|
|
3698
3716
|
]
|
|
@@ -2732,7 +2732,9 @@ function TableBodyRow({
|
|
|
2732
2732
|
// enableColumnSelector = false,
|
|
2733
2733
|
locked,
|
|
2734
2734
|
pinDirection,
|
|
2735
|
-
disabled
|
|
2735
|
+
disabled,
|
|
2736
|
+
hoveredRowId,
|
|
2737
|
+
setHoveredRowId
|
|
2736
2738
|
}) {
|
|
2737
2739
|
var _a;
|
|
2738
2740
|
let visibleCells;
|
|
@@ -2745,17 +2747,20 @@ function TableBodyRow({
|
|
|
2745
2747
|
const columns = locked ? visibleCells : virtualColumns;
|
|
2746
2748
|
const isError = typeof row.original === "object" && row.original !== null && "rowState" in row.original && row.original.rowState === "error";
|
|
2747
2749
|
const CellElement = locked ? DataGridCell : DragAlongCell;
|
|
2750
|
+
const isHovered = hoveredRowId === row.id;
|
|
2748
2751
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2749
2752
|
"tr",
|
|
2750
2753
|
{
|
|
2751
2754
|
className: (0, import_clsx11.default)(
|
|
2752
2755
|
"min-h-10",
|
|
2753
2756
|
"transition-colors",
|
|
2754
|
-
!disabled
|
|
2757
|
+
showFilterRow && !disabled ? "even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal" : "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal",
|
|
2758
|
+
!disabled && isHovered && "!bg-background-action-secondary-hover",
|
|
2755
2759
|
row.getIsSelected() && !disabled && "!bg-background-action-secondary-hover",
|
|
2756
|
-
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
2757
|
-
showFilterRow && !disabled ? "even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal" : "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal"
|
|
2760
|
+
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
2758
2761
|
),
|
|
2762
|
+
onMouseEnter: () => setHoveredRowId == null ? void 0 : setHoveredRowId(row.id),
|
|
2763
|
+
onMouseLeave: () => setHoveredRowId == null ? void 0 : setHoveredRowId(null),
|
|
2759
2764
|
id: id ? `${id}-row-${row.id}` : void 0,
|
|
2760
2765
|
"data-testid": testid ? `${testid}-row-${row.id}` : void 0,
|
|
2761
2766
|
style: {
|
|
@@ -2866,7 +2871,9 @@ function TableBody({
|
|
|
2866
2871
|
locked,
|
|
2867
2872
|
pinDirection,
|
|
2868
2873
|
rowDisabled,
|
|
2869
|
-
rowDisabledAccessor
|
|
2874
|
+
rowDisabledAccessor,
|
|
2875
|
+
hoveredRowId,
|
|
2876
|
+
setHoveredRowId
|
|
2870
2877
|
}) {
|
|
2871
2878
|
const { rows } = table.getRowModel();
|
|
2872
2879
|
const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
|
|
@@ -2960,7 +2967,9 @@ function TableBody({
|
|
|
2960
2967
|
enableColumnSelector,
|
|
2961
2968
|
locked,
|
|
2962
2969
|
pinDirection,
|
|
2963
|
-
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled
|
|
2970
|
+
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled,
|
|
2971
|
+
hoveredRowId,
|
|
2972
|
+
setHoveredRowId
|
|
2964
2973
|
},
|
|
2965
2974
|
row.id
|
|
2966
2975
|
);
|
|
@@ -3207,7 +3216,9 @@ function PinnedColumns(_a) {
|
|
|
3207
3216
|
}, props), {
|
|
3208
3217
|
table,
|
|
3209
3218
|
locked: !enableColumnSelector || pinDirection === "right",
|
|
3210
|
-
pinDirection
|
|
3219
|
+
pinDirection,
|
|
3220
|
+
hoveredRowId: props.hoveredRowId,
|
|
3221
|
+
setHoveredRowId: props.setHoveredRowId
|
|
3211
3222
|
})
|
|
3212
3223
|
)
|
|
3213
3224
|
]
|
|
@@ -3261,6 +3272,7 @@ function DataGrid({
|
|
|
3261
3272
|
const [localSorting, setLocalSorting] = (0, import_react16.useState)([]);
|
|
3262
3273
|
const [localColumnFilters, setLocalColumnFilters] = (0, import_react16.useState)([]);
|
|
3263
3274
|
const [localRowSelection, setLocalRowSelection] = (0, import_react16.useState)({});
|
|
3275
|
+
const [hoveredRowId, setHoveredRowId] = (0, import_react16.useState)(null);
|
|
3264
3276
|
const {
|
|
3265
3277
|
columns: tableColumns,
|
|
3266
3278
|
setColumns: setTableColumns,
|
|
@@ -3509,7 +3521,9 @@ function DataGrid({
|
|
|
3509
3521
|
pagination,
|
|
3510
3522
|
isLoadingMore,
|
|
3511
3523
|
hasMore,
|
|
3512
|
-
showFilterRow
|
|
3524
|
+
showFilterRow,
|
|
3525
|
+
hoveredRowId,
|
|
3526
|
+
setHoveredRowId
|
|
3513
3527
|
}
|
|
3514
3528
|
),
|
|
3515
3529
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("table", { className: "flex-1 flex flex-col min-h-min", children: [
|
|
@@ -3640,7 +3654,9 @@ function DataGrid({
|
|
|
3640
3654
|
showFilterRow,
|
|
3641
3655
|
enableColumnSelector,
|
|
3642
3656
|
rowDisabled,
|
|
3643
|
-
rowDisabledAccessor
|
|
3657
|
+
rowDisabledAccessor,
|
|
3658
|
+
hoveredRowId,
|
|
3659
|
+
setHoveredRowId
|
|
3644
3660
|
}
|
|
3645
3661
|
)
|
|
3646
3662
|
] }),
|
|
@@ -3658,7 +3674,9 @@ function DataGrid({
|
|
|
3658
3674
|
pagination,
|
|
3659
3675
|
isLoadingMore,
|
|
3660
3676
|
hasMore,
|
|
3661
|
-
showFilterRow
|
|
3677
|
+
showFilterRow,
|
|
3678
|
+
hoveredRowId,
|
|
3679
|
+
setHoveredRowId
|
|
3662
3680
|
}
|
|
3663
3681
|
)
|
|
3664
3682
|
]
|
|
@@ -2732,7 +2732,9 @@ function TableBodyRow({
|
|
|
2732
2732
|
// enableColumnSelector = false,
|
|
2733
2733
|
locked,
|
|
2734
2734
|
pinDirection,
|
|
2735
|
-
disabled
|
|
2735
|
+
disabled,
|
|
2736
|
+
hoveredRowId,
|
|
2737
|
+
setHoveredRowId
|
|
2736
2738
|
}) {
|
|
2737
2739
|
var _a;
|
|
2738
2740
|
let visibleCells;
|
|
@@ -2745,17 +2747,20 @@ function TableBodyRow({
|
|
|
2745
2747
|
const columns = locked ? visibleCells : virtualColumns;
|
|
2746
2748
|
const isError = typeof row.original === "object" && row.original !== null && "rowState" in row.original && row.original.rowState === "error";
|
|
2747
2749
|
const CellElement = locked ? DataGridCell : DragAlongCell;
|
|
2750
|
+
const isHovered = hoveredRowId === row.id;
|
|
2748
2751
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2749
2752
|
"tr",
|
|
2750
2753
|
{
|
|
2751
2754
|
className: (0, import_clsx11.default)(
|
|
2752
2755
|
"min-h-10",
|
|
2753
2756
|
"transition-colors",
|
|
2754
|
-
!disabled
|
|
2757
|
+
showFilterRow && !disabled ? "even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal" : "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal",
|
|
2758
|
+
!disabled && isHovered && "!bg-background-action-secondary-hover",
|
|
2755
2759
|
row.getIsSelected() && !disabled && "!bg-background-action-secondary-hover",
|
|
2756
|
-
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
2757
|
-
showFilterRow && !disabled ? "even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal" : "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal"
|
|
2760
|
+
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
2758
2761
|
),
|
|
2762
|
+
onMouseEnter: () => setHoveredRowId == null ? void 0 : setHoveredRowId(row.id),
|
|
2763
|
+
onMouseLeave: () => setHoveredRowId == null ? void 0 : setHoveredRowId(null),
|
|
2759
2764
|
id: id ? `${id}-row-${row.id}` : void 0,
|
|
2760
2765
|
"data-testid": testid ? `${testid}-row-${row.id}` : void 0,
|
|
2761
2766
|
style: {
|
|
@@ -2866,7 +2871,9 @@ function TableBody({
|
|
|
2866
2871
|
locked,
|
|
2867
2872
|
pinDirection,
|
|
2868
2873
|
rowDisabled,
|
|
2869
|
-
rowDisabledAccessor
|
|
2874
|
+
rowDisabledAccessor,
|
|
2875
|
+
hoveredRowId,
|
|
2876
|
+
setHoveredRowId
|
|
2870
2877
|
}) {
|
|
2871
2878
|
const { rows } = table.getRowModel();
|
|
2872
2879
|
const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
|
|
@@ -2960,7 +2967,9 @@ function TableBody({
|
|
|
2960
2967
|
enableColumnSelector,
|
|
2961
2968
|
locked,
|
|
2962
2969
|
pinDirection,
|
|
2963
|
-
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled
|
|
2970
|
+
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled,
|
|
2971
|
+
hoveredRowId,
|
|
2972
|
+
setHoveredRowId
|
|
2964
2973
|
},
|
|
2965
2974
|
row.id
|
|
2966
2975
|
);
|
|
@@ -3129,7 +3138,9 @@ function PinnedColumns(_a) {
|
|
|
3129
3138
|
}, props), {
|
|
3130
3139
|
table,
|
|
3131
3140
|
locked: !enableColumnSelector || pinDirection === "right",
|
|
3132
|
-
pinDirection
|
|
3141
|
+
pinDirection,
|
|
3142
|
+
hoveredRowId: props.hoveredRowId,
|
|
3143
|
+
setHoveredRowId: props.setHoveredRowId
|
|
3133
3144
|
})
|
|
3134
3145
|
)
|
|
3135
3146
|
]
|
|
@@ -3183,6 +3194,7 @@ function DataGrid({
|
|
|
3183
3194
|
const [localSorting, setLocalSorting] = (0, import_react15.useState)([]);
|
|
3184
3195
|
const [localColumnFilters, setLocalColumnFilters] = (0, import_react15.useState)([]);
|
|
3185
3196
|
const [localRowSelection, setLocalRowSelection] = (0, import_react15.useState)({});
|
|
3197
|
+
const [hoveredRowId, setHoveredRowId] = (0, import_react15.useState)(null);
|
|
3186
3198
|
const {
|
|
3187
3199
|
columns: tableColumns,
|
|
3188
3200
|
setColumns: setTableColumns,
|
|
@@ -3431,7 +3443,9 @@ function DataGrid({
|
|
|
3431
3443
|
pagination,
|
|
3432
3444
|
isLoadingMore,
|
|
3433
3445
|
hasMore,
|
|
3434
|
-
showFilterRow
|
|
3446
|
+
showFilterRow,
|
|
3447
|
+
hoveredRowId,
|
|
3448
|
+
setHoveredRowId
|
|
3435
3449
|
}
|
|
3436
3450
|
),
|
|
3437
3451
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("table", { className: "flex-1 flex flex-col min-h-min", children: [
|
|
@@ -3562,7 +3576,9 @@ function DataGrid({
|
|
|
3562
3576
|
showFilterRow,
|
|
3563
3577
|
enableColumnSelector,
|
|
3564
3578
|
rowDisabled,
|
|
3565
|
-
rowDisabledAccessor
|
|
3579
|
+
rowDisabledAccessor,
|
|
3580
|
+
hoveredRowId,
|
|
3581
|
+
setHoveredRowId
|
|
3566
3582
|
}
|
|
3567
3583
|
)
|
|
3568
3584
|
] }),
|
|
@@ -3580,7 +3596,9 @@ function DataGrid({
|
|
|
3580
3596
|
pagination,
|
|
3581
3597
|
isLoadingMore,
|
|
3582
3598
|
hasMore,
|
|
3583
|
-
showFilterRow
|
|
3599
|
+
showFilterRow,
|
|
3600
|
+
hoveredRowId,
|
|
3601
|
+
setHoveredRowId
|
|
3584
3602
|
}
|
|
3585
3603
|
)
|
|
3586
3604
|
]
|
|
@@ -2725,7 +2725,9 @@ function TableBodyRow({
|
|
|
2725
2725
|
// enableColumnSelector = false,
|
|
2726
2726
|
locked,
|
|
2727
2727
|
pinDirection,
|
|
2728
|
-
disabled
|
|
2728
|
+
disabled,
|
|
2729
|
+
hoveredRowId,
|
|
2730
|
+
setHoveredRowId
|
|
2729
2731
|
}) {
|
|
2730
2732
|
var _a;
|
|
2731
2733
|
let visibleCells;
|
|
@@ -2738,17 +2740,20 @@ function TableBodyRow({
|
|
|
2738
2740
|
const columns = locked ? visibleCells : virtualColumns;
|
|
2739
2741
|
const isError = typeof row.original === "object" && row.original !== null && "rowState" in row.original && row.original.rowState === "error";
|
|
2740
2742
|
const CellElement = locked ? DataGridCell : DragAlongCell;
|
|
2743
|
+
const isHovered = hoveredRowId === row.id;
|
|
2741
2744
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2742
2745
|
"tr",
|
|
2743
2746
|
{
|
|
2744
2747
|
className: (0, import_clsx11.default)(
|
|
2745
2748
|
"min-h-10",
|
|
2746
2749
|
"transition-colors",
|
|
2747
|
-
!disabled
|
|
2750
|
+
showFilterRow && !disabled ? "even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal" : "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal",
|
|
2751
|
+
!disabled && isHovered && "!bg-background-action-secondary-hover",
|
|
2748
2752
|
row.getIsSelected() && !disabled && "!bg-background-action-secondary-hover",
|
|
2749
|
-
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
2750
|
-
showFilterRow && !disabled ? "even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal" : "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal"
|
|
2753
|
+
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
2751
2754
|
),
|
|
2755
|
+
onMouseEnter: () => setHoveredRowId == null ? void 0 : setHoveredRowId(row.id),
|
|
2756
|
+
onMouseLeave: () => setHoveredRowId == null ? void 0 : setHoveredRowId(null),
|
|
2752
2757
|
id: id ? `${id}-row-${row.id}` : void 0,
|
|
2753
2758
|
"data-testid": testid ? `${testid}-row-${row.id}` : void 0,
|
|
2754
2759
|
style: {
|
|
@@ -2859,7 +2864,9 @@ function TableBody({
|
|
|
2859
2864
|
locked,
|
|
2860
2865
|
pinDirection,
|
|
2861
2866
|
rowDisabled,
|
|
2862
|
-
rowDisabledAccessor
|
|
2867
|
+
rowDisabledAccessor,
|
|
2868
|
+
hoveredRowId,
|
|
2869
|
+
setHoveredRowId
|
|
2863
2870
|
}) {
|
|
2864
2871
|
const { rows } = table.getRowModel();
|
|
2865
2872
|
const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
|
|
@@ -2953,7 +2960,9 @@ function TableBody({
|
|
|
2953
2960
|
enableColumnSelector,
|
|
2954
2961
|
locked,
|
|
2955
2962
|
pinDirection,
|
|
2956
|
-
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled
|
|
2963
|
+
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled,
|
|
2964
|
+
hoveredRowId,
|
|
2965
|
+
setHoveredRowId
|
|
2957
2966
|
},
|
|
2958
2967
|
row.id
|
|
2959
2968
|
);
|
|
@@ -3030,6 +3039,7 @@ function DataGrid({
|
|
|
3030
3039
|
const [localSorting, setLocalSorting] = (0, import_react14.useState)([]);
|
|
3031
3040
|
const [localColumnFilters, setLocalColumnFilters] = (0, import_react14.useState)([]);
|
|
3032
3041
|
const [localRowSelection, setLocalRowSelection] = (0, import_react14.useState)({});
|
|
3042
|
+
const [hoveredRowId, setHoveredRowId] = (0, import_react14.useState)(null);
|
|
3033
3043
|
const {
|
|
3034
3044
|
columns: tableColumns,
|
|
3035
3045
|
setColumns: setTableColumns,
|
|
@@ -3278,7 +3288,9 @@ function DataGrid({
|
|
|
3278
3288
|
pagination,
|
|
3279
3289
|
isLoadingMore,
|
|
3280
3290
|
hasMore,
|
|
3281
|
-
showFilterRow
|
|
3291
|
+
showFilterRow,
|
|
3292
|
+
hoveredRowId,
|
|
3293
|
+
setHoveredRowId
|
|
3282
3294
|
}
|
|
3283
3295
|
),
|
|
3284
3296
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("table", { className: "flex-1 flex flex-col min-h-min", children: [
|
|
@@ -3409,7 +3421,9 @@ function DataGrid({
|
|
|
3409
3421
|
showFilterRow,
|
|
3410
3422
|
enableColumnSelector,
|
|
3411
3423
|
rowDisabled,
|
|
3412
|
-
rowDisabledAccessor
|
|
3424
|
+
rowDisabledAccessor,
|
|
3425
|
+
hoveredRowId,
|
|
3426
|
+
setHoveredRowId
|
|
3413
3427
|
}
|
|
3414
3428
|
)
|
|
3415
3429
|
] }),
|
|
@@ -3427,7 +3441,9 @@ function DataGrid({
|
|
|
3427
3441
|
pagination,
|
|
3428
3442
|
isLoadingMore,
|
|
3429
3443
|
hasMore,
|
|
3430
|
-
showFilterRow
|
|
3444
|
+
showFilterRow,
|
|
3445
|
+
hoveredRowId,
|
|
3446
|
+
setHoveredRowId
|
|
3431
3447
|
}
|
|
3432
3448
|
)
|
|
3433
3449
|
]
|
|
@@ -6024,7 +6040,9 @@ function PinnedColumns(_a) {
|
|
|
6024
6040
|
}, props), {
|
|
6025
6041
|
table,
|
|
6026
6042
|
locked: !enableColumnSelector || pinDirection === "right",
|
|
6027
|
-
pinDirection
|
|
6043
|
+
pinDirection,
|
|
6044
|
+
hoveredRowId: props.hoveredRowId,
|
|
6045
|
+
setHoveredRowId: props.setHoveredRowId
|
|
6028
6046
|
})
|
|
6029
6047
|
)
|
|
6030
6048
|
]
|