@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
|
@@ -2731,7 +2731,9 @@ function TableBodyRow({
|
|
|
2731
2731
|
// enableColumnSelector = false,
|
|
2732
2732
|
locked,
|
|
2733
2733
|
pinDirection,
|
|
2734
|
-
disabled
|
|
2734
|
+
disabled,
|
|
2735
|
+
hoveredRowId,
|
|
2736
|
+
setHoveredRowId
|
|
2735
2737
|
}) {
|
|
2736
2738
|
var _a;
|
|
2737
2739
|
let visibleCells;
|
|
@@ -2744,17 +2746,20 @@ function TableBodyRow({
|
|
|
2744
2746
|
const columns = locked ? visibleCells : virtualColumns;
|
|
2745
2747
|
const isError = typeof row.original === "object" && row.original !== null && "rowState" in row.original && row.original.rowState === "error";
|
|
2746
2748
|
const CellElement = locked ? DataGridCell : DragAlongCell;
|
|
2749
|
+
const isHovered = hoveredRowId === row.id;
|
|
2747
2750
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2748
2751
|
"tr",
|
|
2749
2752
|
{
|
|
2750
2753
|
className: (0, import_clsx11.default)(
|
|
2751
2754
|
"min-h-10",
|
|
2752
2755
|
"transition-colors",
|
|
2753
|
-
!disabled
|
|
2756
|
+
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",
|
|
2757
|
+
!disabled && isHovered && "!bg-background-action-secondary-hover",
|
|
2754
2758
|
row.getIsSelected() && !disabled && "!bg-background-action-secondary-hover",
|
|
2755
|
-
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
2756
|
-
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"
|
|
2759
|
+
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
2757
2760
|
),
|
|
2761
|
+
onMouseEnter: () => setHoveredRowId == null ? void 0 : setHoveredRowId(row.id),
|
|
2762
|
+
onMouseLeave: () => setHoveredRowId == null ? void 0 : setHoveredRowId(null),
|
|
2758
2763
|
id: id ? `${id}-row-${row.id}` : void 0,
|
|
2759
2764
|
"data-testid": testid ? `${testid}-row-${row.id}` : void 0,
|
|
2760
2765
|
style: {
|
|
@@ -2830,7 +2835,9 @@ function TableBody({
|
|
|
2830
2835
|
locked,
|
|
2831
2836
|
pinDirection,
|
|
2832
2837
|
rowDisabled,
|
|
2833
|
-
rowDisabledAccessor
|
|
2838
|
+
rowDisabledAccessor,
|
|
2839
|
+
hoveredRowId,
|
|
2840
|
+
setHoveredRowId
|
|
2834
2841
|
}) {
|
|
2835
2842
|
const { rows } = table.getRowModel();
|
|
2836
2843
|
const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
|
|
@@ -2924,7 +2931,9 @@ function TableBody({
|
|
|
2924
2931
|
enableColumnSelector,
|
|
2925
2932
|
locked,
|
|
2926
2933
|
pinDirection,
|
|
2927
|
-
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled
|
|
2934
|
+
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled,
|
|
2935
|
+
hoveredRowId,
|
|
2936
|
+
setHoveredRowId
|
|
2928
2937
|
},
|
|
2929
2938
|
row.id
|
|
2930
2939
|
);
|
|
@@ -3199,7 +3208,9 @@ function PinnedColumns(_a) {
|
|
|
3199
3208
|
}, props), {
|
|
3200
3209
|
table,
|
|
3201
3210
|
locked: !enableColumnSelector || pinDirection === "right",
|
|
3202
|
-
pinDirection
|
|
3211
|
+
pinDirection,
|
|
3212
|
+
hoveredRowId: props.hoveredRowId,
|
|
3213
|
+
setHoveredRowId: props.setHoveredRowId
|
|
3203
3214
|
})
|
|
3204
3215
|
)
|
|
3205
3216
|
]
|
|
@@ -3253,6 +3264,7 @@ function DataGrid({
|
|
|
3253
3264
|
const [localSorting, setLocalSorting] = (0, import_react17.useState)([]);
|
|
3254
3265
|
const [localColumnFilters, setLocalColumnFilters] = (0, import_react17.useState)([]);
|
|
3255
3266
|
const [localRowSelection, setLocalRowSelection] = (0, import_react17.useState)({});
|
|
3267
|
+
const [hoveredRowId, setHoveredRowId] = (0, import_react17.useState)(null);
|
|
3256
3268
|
const {
|
|
3257
3269
|
columns: tableColumns,
|
|
3258
3270
|
setColumns: setTableColumns,
|
|
@@ -3501,7 +3513,9 @@ function DataGrid({
|
|
|
3501
3513
|
pagination,
|
|
3502
3514
|
isLoadingMore,
|
|
3503
3515
|
hasMore,
|
|
3504
|
-
showFilterRow
|
|
3516
|
+
showFilterRow,
|
|
3517
|
+
hoveredRowId,
|
|
3518
|
+
setHoveredRowId
|
|
3505
3519
|
}
|
|
3506
3520
|
),
|
|
3507
3521
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("table", { className: "flex-1 flex flex-col min-h-min", children: [
|
|
@@ -3632,7 +3646,9 @@ function DataGrid({
|
|
|
3632
3646
|
showFilterRow,
|
|
3633
3647
|
enableColumnSelector,
|
|
3634
3648
|
rowDisabled,
|
|
3635
|
-
rowDisabledAccessor
|
|
3649
|
+
rowDisabledAccessor,
|
|
3650
|
+
hoveredRowId,
|
|
3651
|
+
setHoveredRowId
|
|
3636
3652
|
}
|
|
3637
3653
|
)
|
|
3638
3654
|
] }),
|
|
@@ -3650,7 +3666,9 @@ function DataGrid({
|
|
|
3650
3666
|
pagination,
|
|
3651
3667
|
isLoadingMore,
|
|
3652
3668
|
hasMore,
|
|
3653
|
-
showFilterRow
|
|
3669
|
+
showFilterRow,
|
|
3670
|
+
hoveredRowId,
|
|
3671
|
+
setHoveredRowId
|
|
3654
3672
|
}
|
|
3655
3673
|
)
|
|
3656
3674
|
]
|
|
@@ -2762,7 +2762,9 @@ function TableBody({
|
|
|
2762
2762
|
locked,
|
|
2763
2763
|
pinDirection,
|
|
2764
2764
|
rowDisabled,
|
|
2765
|
-
rowDisabledAccessor
|
|
2765
|
+
rowDisabledAccessor,
|
|
2766
|
+
hoveredRowId,
|
|
2767
|
+
setHoveredRowId
|
|
2766
2768
|
}) {
|
|
2767
2769
|
const { rows } = table.getRowModel();
|
|
2768
2770
|
const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
|
|
@@ -2856,7 +2858,9 @@ function TableBody({
|
|
|
2856
2858
|
enableColumnSelector,
|
|
2857
2859
|
locked,
|
|
2858
2860
|
pinDirection,
|
|
2859
|
-
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled
|
|
2861
|
+
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled,
|
|
2862
|
+
hoveredRowId,
|
|
2863
|
+
setHoveredRowId
|
|
2860
2864
|
},
|
|
2861
2865
|
row.id
|
|
2862
2866
|
);
|
|
@@ -3131,7 +3135,9 @@ function PinnedColumns(_a) {
|
|
|
3131
3135
|
}, props), {
|
|
3132
3136
|
table,
|
|
3133
3137
|
locked: !enableColumnSelector || pinDirection === "right",
|
|
3134
|
-
pinDirection
|
|
3138
|
+
pinDirection,
|
|
3139
|
+
hoveredRowId: props.hoveredRowId,
|
|
3140
|
+
setHoveredRowId: props.setHoveredRowId
|
|
3135
3141
|
})
|
|
3136
3142
|
)
|
|
3137
3143
|
]
|
|
@@ -3185,6 +3191,7 @@ function DataGrid({
|
|
|
3185
3191
|
const [localSorting, setLocalSorting] = (0, import_react16.useState)([]);
|
|
3186
3192
|
const [localColumnFilters, setLocalColumnFilters] = (0, import_react16.useState)([]);
|
|
3187
3193
|
const [localRowSelection, setLocalRowSelection] = (0, import_react16.useState)({});
|
|
3194
|
+
const [hoveredRowId, setHoveredRowId] = (0, import_react16.useState)(null);
|
|
3188
3195
|
const {
|
|
3189
3196
|
columns: tableColumns,
|
|
3190
3197
|
setColumns: setTableColumns,
|
|
@@ -3433,7 +3440,9 @@ function DataGrid({
|
|
|
3433
3440
|
pagination,
|
|
3434
3441
|
isLoadingMore,
|
|
3435
3442
|
hasMore,
|
|
3436
|
-
showFilterRow
|
|
3443
|
+
showFilterRow,
|
|
3444
|
+
hoveredRowId,
|
|
3445
|
+
setHoveredRowId
|
|
3437
3446
|
}
|
|
3438
3447
|
),
|
|
3439
3448
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("table", { className: "flex-1 flex flex-col min-h-min", children: [
|
|
@@ -3564,7 +3573,9 @@ function DataGrid({
|
|
|
3564
3573
|
showFilterRow,
|
|
3565
3574
|
enableColumnSelector,
|
|
3566
3575
|
rowDisabled,
|
|
3567
|
-
rowDisabledAccessor
|
|
3576
|
+
rowDisabledAccessor,
|
|
3577
|
+
hoveredRowId,
|
|
3578
|
+
setHoveredRowId
|
|
3568
3579
|
}
|
|
3569
3580
|
)
|
|
3570
3581
|
] }),
|
|
@@ -3582,7 +3593,9 @@ function DataGrid({
|
|
|
3582
3593
|
pagination,
|
|
3583
3594
|
isLoadingMore,
|
|
3584
3595
|
hasMore,
|
|
3585
|
-
showFilterRow
|
|
3596
|
+
showFilterRow,
|
|
3597
|
+
hoveredRowId,
|
|
3598
|
+
setHoveredRowId
|
|
3586
3599
|
}
|
|
3587
3600
|
)
|
|
3588
3601
|
]
|
|
@@ -5953,7 +5966,9 @@ function TableBodyRow({
|
|
|
5953
5966
|
// enableColumnSelector = false,
|
|
5954
5967
|
locked,
|
|
5955
5968
|
pinDirection,
|
|
5956
|
-
disabled
|
|
5969
|
+
disabled,
|
|
5970
|
+
hoveredRowId,
|
|
5971
|
+
setHoveredRowId
|
|
5957
5972
|
}) {
|
|
5958
5973
|
var _a;
|
|
5959
5974
|
let visibleCells;
|
|
@@ -5966,17 +5981,20 @@ function TableBodyRow({
|
|
|
5966
5981
|
const columns = locked ? visibleCells : virtualColumns;
|
|
5967
5982
|
const isError = typeof row.original === "object" && row.original !== null && "rowState" in row.original && row.original.rowState === "error";
|
|
5968
5983
|
const CellElement = locked ? DataGridCell : DragAlongCell;
|
|
5984
|
+
const isHovered = hoveredRowId === row.id;
|
|
5969
5985
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
5970
5986
|
"tr",
|
|
5971
5987
|
{
|
|
5972
5988
|
className: (0, import_clsx42.default)(
|
|
5973
5989
|
"min-h-10",
|
|
5974
5990
|
"transition-colors",
|
|
5975
|
-
!disabled
|
|
5991
|
+
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",
|
|
5992
|
+
!disabled && isHovered && "!bg-background-action-secondary-hover",
|
|
5976
5993
|
row.getIsSelected() && !disabled && "!bg-background-action-secondary-hover",
|
|
5977
|
-
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
5978
|
-
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"
|
|
5994
|
+
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
5979
5995
|
),
|
|
5996
|
+
onMouseEnter: () => setHoveredRowId == null ? void 0 : setHoveredRowId(row.id),
|
|
5997
|
+
onMouseLeave: () => setHoveredRowId == null ? void 0 : setHoveredRowId(null),
|
|
5980
5998
|
id: id ? `${id}-row-${row.id}` : void 0,
|
|
5981
5999
|
"data-testid": testid ? `${testid}-row-${row.id}` : void 0,
|
|
5982
6000
|
style: {
|
|
@@ -2947,7 +2947,9 @@ function PinnedColumns(_a) {
|
|
|
2947
2947
|
}, props), {
|
|
2948
2948
|
table,
|
|
2949
2949
|
locked: !enableColumnSelector || pinDirection === "right",
|
|
2950
|
-
pinDirection
|
|
2950
|
+
pinDirection,
|
|
2951
|
+
hoveredRowId: props.hoveredRowId,
|
|
2952
|
+
setHoveredRowId: props.setHoveredRowId
|
|
2951
2953
|
})
|
|
2952
2954
|
)
|
|
2953
2955
|
]
|
|
@@ -3001,6 +3003,7 @@ function DataGrid({
|
|
|
3001
3003
|
const [localSorting, setLocalSorting] = (0, import_react16.useState)([]);
|
|
3002
3004
|
const [localColumnFilters, setLocalColumnFilters] = (0, import_react16.useState)([]);
|
|
3003
3005
|
const [localRowSelection, setLocalRowSelection] = (0, import_react16.useState)({});
|
|
3006
|
+
const [hoveredRowId, setHoveredRowId] = (0, import_react16.useState)(null);
|
|
3004
3007
|
const {
|
|
3005
3008
|
columns: tableColumns,
|
|
3006
3009
|
setColumns: setTableColumns,
|
|
@@ -3249,7 +3252,9 @@ function DataGrid({
|
|
|
3249
3252
|
pagination,
|
|
3250
3253
|
isLoadingMore,
|
|
3251
3254
|
hasMore,
|
|
3252
|
-
showFilterRow
|
|
3255
|
+
showFilterRow,
|
|
3256
|
+
hoveredRowId,
|
|
3257
|
+
setHoveredRowId
|
|
3253
3258
|
}
|
|
3254
3259
|
),
|
|
3255
3260
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("table", { className: "flex-1 flex flex-col min-h-min", children: [
|
|
@@ -3380,7 +3385,9 @@ function DataGrid({
|
|
|
3380
3385
|
showFilterRow,
|
|
3381
3386
|
enableColumnSelector,
|
|
3382
3387
|
rowDisabled,
|
|
3383
|
-
rowDisabledAccessor
|
|
3388
|
+
rowDisabledAccessor,
|
|
3389
|
+
hoveredRowId,
|
|
3390
|
+
setHoveredRowId
|
|
3384
3391
|
}
|
|
3385
3392
|
)
|
|
3386
3393
|
] }),
|
|
@@ -3398,7 +3405,9 @@ function DataGrid({
|
|
|
3398
3405
|
pagination,
|
|
3399
3406
|
isLoadingMore,
|
|
3400
3407
|
hasMore,
|
|
3401
|
-
showFilterRow
|
|
3408
|
+
showFilterRow,
|
|
3409
|
+
hoveredRowId,
|
|
3410
|
+
setHoveredRowId
|
|
3402
3411
|
}
|
|
3403
3412
|
)
|
|
3404
3413
|
]
|
|
@@ -5775,7 +5784,9 @@ function TableBodyRow({
|
|
|
5775
5784
|
// enableColumnSelector = false,
|
|
5776
5785
|
locked,
|
|
5777
5786
|
pinDirection,
|
|
5778
|
-
disabled
|
|
5787
|
+
disabled,
|
|
5788
|
+
hoveredRowId,
|
|
5789
|
+
setHoveredRowId
|
|
5779
5790
|
}) {
|
|
5780
5791
|
var _a;
|
|
5781
5792
|
let visibleCells;
|
|
@@ -5788,17 +5799,20 @@ function TableBodyRow({
|
|
|
5788
5799
|
const columns = locked ? visibleCells : virtualColumns;
|
|
5789
5800
|
const isError = typeof row.original === "object" && row.original !== null && "rowState" in row.original && row.original.rowState === "error";
|
|
5790
5801
|
const CellElement = locked ? DataGridCell : DragAlongCell;
|
|
5802
|
+
const isHovered = hoveredRowId === row.id;
|
|
5791
5803
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
5792
5804
|
"tr",
|
|
5793
5805
|
{
|
|
5794
5806
|
className: (0, import_clsx41.default)(
|
|
5795
5807
|
"min-h-10",
|
|
5796
5808
|
"transition-colors",
|
|
5797
|
-
!disabled
|
|
5809
|
+
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",
|
|
5810
|
+
!disabled && isHovered && "!bg-background-action-secondary-hover",
|
|
5798
5811
|
row.getIsSelected() && !disabled && "!bg-background-action-secondary-hover",
|
|
5799
|
-
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
5800
|
-
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"
|
|
5812
|
+
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
5801
5813
|
),
|
|
5814
|
+
onMouseEnter: () => setHoveredRowId == null ? void 0 : setHoveredRowId(row.id),
|
|
5815
|
+
onMouseLeave: () => setHoveredRowId == null ? void 0 : setHoveredRowId(null),
|
|
5802
5816
|
id: id ? `${id}-row-${row.id}` : void 0,
|
|
5803
5817
|
"data-testid": testid ? `${testid}-row-${row.id}` : void 0,
|
|
5804
5818
|
style: {
|
|
@@ -5909,7 +5923,9 @@ function TableBody({
|
|
|
5909
5923
|
locked,
|
|
5910
5924
|
pinDirection,
|
|
5911
5925
|
rowDisabled,
|
|
5912
|
-
rowDisabledAccessor
|
|
5926
|
+
rowDisabledAccessor,
|
|
5927
|
+
hoveredRowId,
|
|
5928
|
+
setHoveredRowId
|
|
5913
5929
|
}) {
|
|
5914
5930
|
const { rows } = table.getRowModel();
|
|
5915
5931
|
const rowVirtualizer = (0, import_react_virtual2.useVirtualizer)({
|
|
@@ -6003,7 +6019,9 @@ function TableBody({
|
|
|
6003
6019
|
enableColumnSelector,
|
|
6004
6020
|
locked,
|
|
6005
6021
|
pinDirection,
|
|
6006
|
-
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled
|
|
6022
|
+
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled,
|
|
6023
|
+
hoveredRowId,
|
|
6024
|
+
setHoveredRowId
|
|
6007
6025
|
},
|
|
6008
6026
|
row.id
|
|
6009
6027
|
);
|
|
@@ -4951,7 +4951,9 @@ function TableBodyRow({
|
|
|
4951
4951
|
// enableColumnSelector = false,
|
|
4952
4952
|
locked,
|
|
4953
4953
|
pinDirection,
|
|
4954
|
-
disabled
|
|
4954
|
+
disabled,
|
|
4955
|
+
hoveredRowId,
|
|
4956
|
+
setHoveredRowId
|
|
4955
4957
|
}) {
|
|
4956
4958
|
var _a;
|
|
4957
4959
|
let visibleCells;
|
|
@@ -4964,17 +4966,20 @@ function TableBodyRow({
|
|
|
4964
4966
|
const columns = locked ? visibleCells : virtualColumns;
|
|
4965
4967
|
const isError = typeof row.original === "object" && row.original !== null && "rowState" in row.original && row.original.rowState === "error";
|
|
4966
4968
|
const CellElement = locked ? DataGridCell : DragAlongCell;
|
|
4969
|
+
const isHovered = hoveredRowId === row.id;
|
|
4967
4970
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
4968
4971
|
"tr",
|
|
4969
4972
|
{
|
|
4970
4973
|
className: (0, import_clsx39.default)(
|
|
4971
4974
|
"min-h-10",
|
|
4972
4975
|
"transition-colors",
|
|
4973
|
-
!disabled
|
|
4976
|
+
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",
|
|
4977
|
+
!disabled && isHovered && "!bg-background-action-secondary-hover",
|
|
4974
4978
|
row.getIsSelected() && !disabled && "!bg-background-action-secondary-hover",
|
|
4975
|
-
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
4976
|
-
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"
|
|
4979
|
+
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
4977
4980
|
),
|
|
4981
|
+
onMouseEnter: () => setHoveredRowId == null ? void 0 : setHoveredRowId(row.id),
|
|
4982
|
+
onMouseLeave: () => setHoveredRowId == null ? void 0 : setHoveredRowId(null),
|
|
4978
4983
|
id: id ? `${id}-row-${row.id}` : void 0,
|
|
4979
4984
|
"data-testid": testid ? `${testid}-row-${row.id}` : void 0,
|
|
4980
4985
|
style: {
|
|
@@ -5085,7 +5090,9 @@ function TableBody({
|
|
|
5085
5090
|
locked,
|
|
5086
5091
|
pinDirection,
|
|
5087
5092
|
rowDisabled,
|
|
5088
|
-
rowDisabledAccessor
|
|
5093
|
+
rowDisabledAccessor,
|
|
5094
|
+
hoveredRowId,
|
|
5095
|
+
setHoveredRowId
|
|
5089
5096
|
}) {
|
|
5090
5097
|
const { rows } = table.getRowModel();
|
|
5091
5098
|
const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
|
|
@@ -5179,7 +5186,9 @@ function TableBody({
|
|
|
5179
5186
|
enableColumnSelector,
|
|
5180
5187
|
locked,
|
|
5181
5188
|
pinDirection,
|
|
5182
|
-
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled
|
|
5189
|
+
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled,
|
|
5190
|
+
hoveredRowId,
|
|
5191
|
+
setHoveredRowId
|
|
5183
5192
|
},
|
|
5184
5193
|
row.id
|
|
5185
5194
|
);
|
|
@@ -5454,7 +5463,9 @@ function PinnedColumns(_a) {
|
|
|
5454
5463
|
}, props), {
|
|
5455
5464
|
table,
|
|
5456
5465
|
locked: !enableColumnSelector || pinDirection === "right",
|
|
5457
|
-
pinDirection
|
|
5466
|
+
pinDirection,
|
|
5467
|
+
hoveredRowId: props.hoveredRowId,
|
|
5468
|
+
setHoveredRowId: props.setHoveredRowId
|
|
5458
5469
|
})
|
|
5459
5470
|
)
|
|
5460
5471
|
]
|
|
@@ -5505,6 +5516,7 @@ function DataGrid({
|
|
|
5505
5516
|
const [localSorting, setLocalSorting] = (0, import_react40.useState)([]);
|
|
5506
5517
|
const [localColumnFilters, setLocalColumnFilters] = (0, import_react40.useState)([]);
|
|
5507
5518
|
const [localRowSelection, setLocalRowSelection] = (0, import_react40.useState)({});
|
|
5519
|
+
const [hoveredRowId, setHoveredRowId] = (0, import_react40.useState)(null);
|
|
5508
5520
|
const {
|
|
5509
5521
|
columns: tableColumns,
|
|
5510
5522
|
setColumns: setTableColumns,
|
|
@@ -5753,7 +5765,9 @@ function DataGrid({
|
|
|
5753
5765
|
pagination,
|
|
5754
5766
|
isLoadingMore,
|
|
5755
5767
|
hasMore,
|
|
5756
|
-
showFilterRow
|
|
5768
|
+
showFilterRow,
|
|
5769
|
+
hoveredRowId,
|
|
5770
|
+
setHoveredRowId
|
|
5757
5771
|
}
|
|
5758
5772
|
),
|
|
5759
5773
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("table", { className: "flex-1 flex flex-col min-h-min", children: [
|
|
@@ -5884,7 +5898,9 @@ function DataGrid({
|
|
|
5884
5898
|
showFilterRow,
|
|
5885
5899
|
enableColumnSelector,
|
|
5886
5900
|
rowDisabled,
|
|
5887
|
-
rowDisabledAccessor
|
|
5901
|
+
rowDisabledAccessor,
|
|
5902
|
+
hoveredRowId,
|
|
5903
|
+
setHoveredRowId
|
|
5888
5904
|
}
|
|
5889
5905
|
)
|
|
5890
5906
|
] }),
|
|
@@ -5902,7 +5918,9 @@ function DataGrid({
|
|
|
5902
5918
|
pagination,
|
|
5903
5919
|
isLoadingMore,
|
|
5904
5920
|
hasMore,
|
|
5905
|
-
showFilterRow
|
|
5921
|
+
showFilterRow,
|
|
5922
|
+
hoveredRowId,
|
|
5923
|
+
setHoveredRowId
|
|
5906
5924
|
}
|
|
5907
5925
|
)
|
|
5908
5926
|
]
|
|
@@ -2715,7 +2715,9 @@ function TableBodyRow({
|
|
|
2715
2715
|
// enableColumnSelector = false,
|
|
2716
2716
|
locked,
|
|
2717
2717
|
pinDirection,
|
|
2718
|
-
disabled
|
|
2718
|
+
disabled,
|
|
2719
|
+
hoveredRowId,
|
|
2720
|
+
setHoveredRowId
|
|
2719
2721
|
}) {
|
|
2720
2722
|
var _a;
|
|
2721
2723
|
let visibleCells;
|
|
@@ -2728,17 +2730,20 @@ function TableBodyRow({
|
|
|
2728
2730
|
const columns = locked ? visibleCells : virtualColumns;
|
|
2729
2731
|
const isError = typeof row.original === "object" && row.original !== null && "rowState" in row.original && row.original.rowState === "error";
|
|
2730
2732
|
const CellElement = locked ? DataGridCell : DragAlongCell;
|
|
2733
|
+
const isHovered = hoveredRowId === row.id;
|
|
2731
2734
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2732
2735
|
"tr",
|
|
2733
2736
|
{
|
|
2734
2737
|
className: (0, import_clsx10.default)(
|
|
2735
2738
|
"min-h-10",
|
|
2736
2739
|
"transition-colors",
|
|
2737
|
-
!disabled
|
|
2740
|
+
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",
|
|
2741
|
+
!disabled && isHovered && "!bg-background-action-secondary-hover",
|
|
2738
2742
|
row.getIsSelected() && !disabled && "!bg-background-action-secondary-hover",
|
|
2739
|
-
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
2740
|
-
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"
|
|
2743
|
+
isError && !disabled && "!bg-background-action-critical-secondary-hover"
|
|
2741
2744
|
),
|
|
2745
|
+
onMouseEnter: () => setHoveredRowId == null ? void 0 : setHoveredRowId(row.id),
|
|
2746
|
+
onMouseLeave: () => setHoveredRowId == null ? void 0 : setHoveredRowId(null),
|
|
2742
2747
|
id: id ? `${id}-row-${row.id}` : void 0,
|
|
2743
2748
|
"data-testid": testid ? `${testid}-row-${row.id}` : void 0,
|
|
2744
2749
|
style: {
|
|
@@ -2849,7 +2854,9 @@ function TableBody({
|
|
|
2849
2854
|
locked,
|
|
2850
2855
|
pinDirection,
|
|
2851
2856
|
rowDisabled,
|
|
2852
|
-
rowDisabledAccessor
|
|
2857
|
+
rowDisabledAccessor,
|
|
2858
|
+
hoveredRowId,
|
|
2859
|
+
setHoveredRowId
|
|
2853
2860
|
}) {
|
|
2854
2861
|
const { rows } = table.getRowModel();
|
|
2855
2862
|
const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
|
|
@@ -2943,7 +2950,9 @@ function TableBody({
|
|
|
2943
2950
|
enableColumnSelector,
|
|
2944
2951
|
locked,
|
|
2945
2952
|
pinDirection,
|
|
2946
|
-
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled
|
|
2953
|
+
disabled: rowDisabledAccessor ? rowDisabledAccessor(row.original) : rowDisabled,
|
|
2954
|
+
hoveredRowId,
|
|
2955
|
+
setHoveredRowId
|
|
2947
2956
|
},
|
|
2948
2957
|
row.id
|
|
2949
2958
|
);
|
|
@@ -3218,7 +3227,9 @@ function PinnedColumns(_a) {
|
|
|
3218
3227
|
}, props), {
|
|
3219
3228
|
table,
|
|
3220
3229
|
locked: !enableColumnSelector || pinDirection === "right",
|
|
3221
|
-
pinDirection
|
|
3230
|
+
pinDirection,
|
|
3231
|
+
hoveredRowId: props.hoveredRowId,
|
|
3232
|
+
setHoveredRowId: props.setHoveredRowId
|
|
3222
3233
|
})
|
|
3223
3234
|
)
|
|
3224
3235
|
]
|
|
@@ -3272,6 +3283,7 @@ function DataGrid({
|
|
|
3272
3283
|
const [localSorting, setLocalSorting] = (0, import_react17.useState)([]);
|
|
3273
3284
|
const [localColumnFilters, setLocalColumnFilters] = (0, import_react17.useState)([]);
|
|
3274
3285
|
const [localRowSelection, setLocalRowSelection] = (0, import_react17.useState)({});
|
|
3286
|
+
const [hoveredRowId, setHoveredRowId] = (0, import_react17.useState)(null);
|
|
3275
3287
|
const {
|
|
3276
3288
|
columns: tableColumns,
|
|
3277
3289
|
setColumns: setTableColumns,
|
|
@@ -3520,7 +3532,9 @@ function DataGrid({
|
|
|
3520
3532
|
pagination,
|
|
3521
3533
|
isLoadingMore,
|
|
3522
3534
|
hasMore,
|
|
3523
|
-
showFilterRow
|
|
3535
|
+
showFilterRow,
|
|
3536
|
+
hoveredRowId,
|
|
3537
|
+
setHoveredRowId
|
|
3524
3538
|
}
|
|
3525
3539
|
),
|
|
3526
3540
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("table", { className: "flex-1 flex flex-col min-h-min", children: [
|
|
@@ -3651,7 +3665,9 @@ function DataGrid({
|
|
|
3651
3665
|
showFilterRow,
|
|
3652
3666
|
enableColumnSelector,
|
|
3653
3667
|
rowDisabled,
|
|
3654
|
-
rowDisabledAccessor
|
|
3668
|
+
rowDisabledAccessor,
|
|
3669
|
+
hoveredRowId,
|
|
3670
|
+
setHoveredRowId
|
|
3655
3671
|
}
|
|
3656
3672
|
)
|
|
3657
3673
|
] }),
|
|
@@ -3669,7 +3685,9 @@ function DataGrid({
|
|
|
3669
3685
|
pagination,
|
|
3670
3686
|
isLoadingMore,
|
|
3671
3687
|
hasMore,
|
|
3672
|
-
showFilterRow
|
|
3688
|
+
showFilterRow,
|
|
3689
|
+
hoveredRowId,
|
|
3690
|
+
setHoveredRowId
|
|
3673
3691
|
}
|
|
3674
3692
|
)
|
|
3675
3693
|
]
|