@viliha/vui-ui 1.0.10 → 1.0.11
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/package.json +1 -1
- package/src/record-view.tsx +19 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viliha/vui-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "Vui UI — a clean, token-driven React admin/CRM component library built on Tailwind CSS v4, shadcn-style patterns, and Radix Icons. Ships as TypeScript source (Just-in-Time), compiled by the consuming app.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Suman Bonakurthi",
|
package/src/record-view.tsx
CHANGED
|
@@ -951,7 +951,10 @@ export function RecordView<T extends { id: RowId }>({
|
|
|
951
951
|
<TableHeader className="sticky top-0 z-20 bg-background [&_th]:sticky [&_th]:top-0 [&_th]:z-20 [&_th]:bg-background">
|
|
952
952
|
<TableRow className="hover:bg-transparent">
|
|
953
953
|
<TableHead style={{ width: CHECKBOX_W }} className="p-0">
|
|
954
|
-
<div className="flex h-8 items-center pl-
|
|
954
|
+
<div className="flex h-8 items-center gap-2 pl-2 pr-3">
|
|
955
|
+
{/* Spacer matching the row drag-grip slot so this checkbox
|
|
956
|
+
lines up vertically with the row checkboxes below. */}
|
|
957
|
+
<span aria-hidden="true" className="h-6 w-4 shrink-0" />
|
|
955
958
|
<Checkbox
|
|
956
959
|
checked={allSelected}
|
|
957
960
|
onChange={toggleSelectAll}
|
|
@@ -1002,16 +1005,18 @@ export function RecordView<T extends { id: RowId }>({
|
|
|
1002
1005
|
</TableHead>
|
|
1003
1006
|
);
|
|
1004
1007
|
})}
|
|
1008
|
+
{/* Flex spacer absorbs leftover width so data columns keep their
|
|
1009
|
+
natural size AND the Actions column stays pinned to the right
|
|
1010
|
+
edge. Borderless so no stray divider shows in the gap. */}
|
|
1011
|
+
<TableHead aria-hidden="true" className="w-full border-r-0" />
|
|
1005
1012
|
<TableHead
|
|
1006
1013
|
style={{ width: ACTIONS_W }}
|
|
1007
|
-
className="border-
|
|
1014
|
+
className="sticky right-0 z-30 border-l border-border text-right shadow-[-8px_0_12px_-8px_rgb(0_0_0/0.12)]"
|
|
1008
1015
|
>
|
|
1009
|
-
<span className="flex h-8 items-center justify-
|
|
1016
|
+
<span className="flex h-8 items-center justify-center whitespace-nowrap px-2">
|
|
1010
1017
|
Actions
|
|
1011
1018
|
</span>
|
|
1012
1019
|
</TableHead>
|
|
1013
|
-
{/* Filler so row borders reach the right edge of the page. */}
|
|
1014
|
-
<TableHead aria-hidden="true" />
|
|
1015
1020
|
</TableRow>
|
|
1016
1021
|
</TableHeader>
|
|
1017
1022
|
<TableBody>
|
|
@@ -1043,12 +1048,12 @@ export function RecordView<T extends { id: RowId }>({
|
|
|
1043
1048
|
}}
|
|
1044
1049
|
className="group data-[active=true]:bg-accent/60 data-[dragover=true]:border-t-2 data-[dragover=true]:border-t-primary data-[flash=true]:bg-primary/10"
|
|
1045
1050
|
>
|
|
1046
|
-
<TableCell className="p-0">
|
|
1047
|
-
<div className="
|
|
1051
|
+
<TableCell className="p-0" style={{ width: CHECKBOX_W }}>
|
|
1052
|
+
<div className="flex h-8 items-center gap-2 pl-2 pr-3">
|
|
1048
1053
|
{/* Drag grip — always visible in a light color (so the
|
|
1049
1054
|
reorder affordance is discoverable), darkening on
|
|
1050
|
-
hover.
|
|
1051
|
-
|
|
1055
|
+
hover. Inline before the checkbox; plain glyph (no
|
|
1056
|
+
icon-chip border) so it doesn't read as a box. */}
|
|
1052
1057
|
<div
|
|
1053
1058
|
draggable
|
|
1054
1059
|
onDragStart={(e) => {
|
|
@@ -1062,9 +1067,9 @@ export function RecordView<T extends { id: RowId }>({
|
|
|
1062
1067
|
}}
|
|
1063
1068
|
aria-label={`Drag ${primary.title || singular} to reorder`}
|
|
1064
1069
|
title="Drag to reorder"
|
|
1065
|
-
className="
|
|
1070
|
+
className="flex h-6 w-4 shrink-0 cursor-grab items-center justify-center text-muted-foreground/40 transition-colors hover:text-foreground active:cursor-grabbing"
|
|
1066
1071
|
>
|
|
1067
|
-
<GripVertical className="size-3.5" />
|
|
1072
|
+
<GripVertical className="size-3.5 border-transparent bg-transparent" />
|
|
1068
1073
|
</div>
|
|
1069
1074
|
<Checkbox
|
|
1070
1075
|
checked={selected.has(row.id)}
|
|
@@ -1099,11 +1104,12 @@ export function RecordView<T extends { id: RowId }>({
|
|
|
1099
1104
|
{renderCellValue(row, f)}
|
|
1100
1105
|
</TableCell>
|
|
1101
1106
|
))}
|
|
1107
|
+
<TableCell aria-hidden="true" className="w-full border-r-0" />
|
|
1102
1108
|
<TableCell
|
|
1103
|
-
className="border-
|
|
1109
|
+
className="sticky right-0 z-10 border-l border-border bg-card p-0 shadow-[-8px_0_12px_-8px_rgb(0_0_0/0.12)]"
|
|
1104
1110
|
style={{ width: ACTIONS_W }}
|
|
1105
1111
|
>
|
|
1106
|
-
<div className="flex items-center justify-
|
|
1112
|
+
<div className="flex items-center justify-center gap-0.5 px-2">
|
|
1107
1113
|
<button
|
|
1108
1114
|
type="button"
|
|
1109
1115
|
onClick={() => openView(row.id)}
|
|
@@ -1133,7 +1139,6 @@ export function RecordView<T extends { id: RowId }>({
|
|
|
1133
1139
|
</button>
|
|
1134
1140
|
</div>
|
|
1135
1141
|
</TableCell>
|
|
1136
|
-
<TableCell aria-hidden="true" />
|
|
1137
1142
|
</TableRow>
|
|
1138
1143
|
);
|
|
1139
1144
|
})
|