@viliha/vui-ui 1.0.4 → 1.0.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viliha/vui-ui",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
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",
@@ -45,7 +45,7 @@
45
45
  "scripts": {
46
46
  "lint": "eslint . --max-warnings 0",
47
47
  "generate:component": "turbo gen react-component",
48
- "check-types": "tsc --noEmit",
48
+ "check-types": "tsgo --noEmit",
49
49
  "test": "vitest run"
50
50
  },
51
51
  "peerDependencies": {
@@ -60,7 +60,7 @@ type FieldGroup = "General" | "Work" | "Social" | "System";
60
60
  const GROUP_ORDER: FieldGroup[] = ["General", "Work", "Social", "System"];
61
61
 
62
62
  /** Fixed (non-resizable) leading/trailing column widths, in px. */
63
- const CHECKBOX_W = 44;
63
+ const CHECKBOX_W = 56;
64
64
  const ACTIONS_W = 120;
65
65
  const NAME_COL = "__name";
66
66
  const NAME_DEFAULT_W = 190;
@@ -633,7 +633,7 @@ export function RecordView<T extends { id: RowId }>({
633
633
  const cellKey = `${row.id}:${field.key}`;
634
634
  const hoverActions =
635
635
  (field.editable || (field.copyable && value)) ? (
636
- <span className="absolute inset-y-0 right-1 flex items-center gap-0.5 opacity-0 transition-opacity group-hover/cell:opacity-100 focus-within:opacity-100">
636
+ <span className="absolute right-1 top-1/2 flex -translate-y-1/2 items-center divide-x divide-border overflow-hidden rounded-sm bg-background shadow-sm ring-1 ring-border opacity-0 transition-opacity group-hover/cell:opacity-100 focus-within:opacity-100">
637
637
  {field.copyable && value && (
638
638
  <button
639
639
  type="button"
@@ -643,7 +643,7 @@ export function RecordView<T extends { id: RowId }>({
643
643
  }}
644
644
  aria-label={`Copy ${field.label}`}
645
645
  title={`Copy ${field.label}`}
646
- className="grid size-6 place-items-center rounded-sm bg-background text-muted-foreground shadow-sm ring-1 ring-border hover:text-foreground"
646
+ className="grid size-6 place-items-center text-muted-foreground hover:bg-muted hover:text-foreground"
647
647
  >
648
648
  {copiedKey === cellKey ? (
649
649
  <Check className="size-3.5 text-emerald-600" />
@@ -661,7 +661,7 @@ export function RecordView<T extends { id: RowId }>({
661
661
  }}
662
662
  aria-label={`Edit ${field.label}`}
663
663
  title={`Edit ${field.label}`}
664
- className="grid size-6 place-items-center rounded-sm bg-background text-muted-foreground shadow-sm ring-1 ring-border hover:text-foreground"
664
+ className="grid size-6 place-items-center text-muted-foreground hover:bg-muted hover:text-foreground"
665
665
  >
666
666
  <Pencil className="size-3.5" />
667
667
  </button>
@@ -954,7 +954,7 @@ export function RecordView<T extends { id: RowId }>({
954
954
  <TableHeader className="sticky top-0 z-20 bg-background [&_th]:sticky [&_th]:top-0 [&_th]:z-20 [&_th]:bg-background">
955
955
  <TableRow className="hover:bg-transparent">
956
956
  <TableHead style={{ width: CHECKBOX_W }} className="p-0">
957
- <div className="flex h-8 items-center pl-4">
957
+ <div className="flex h-8 items-center pl-8">
958
958
  <Checkbox
959
959
  checked={allSelected}
960
960
  onChange={toggleSelectAll}
@@ -1047,9 +1047,11 @@ export function RecordView<T extends { id: RowId }>({
1047
1047
  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"
1048
1048
  >
1049
1049
  <TableCell className="p-0">
1050
- <div className="relative flex h-8 items-center pl-4">
1051
- {/* Drag grip — overlaid in the left gutter on hover,
1052
- so it never shifts the checkbox's alignment. */}
1050
+ <div className="relative flex h-8 items-center pl-8">
1051
+ {/* Drag grip — always visible in a light color (so the
1052
+ reorder affordance is discoverable), darkening on
1053
+ hover. Sits in its own reserved slot in the left
1054
+ gutter so it never overlaps the checkbox. */}
1053
1055
  <div
1054
1056
  draggable
1055
1057
  onDragStart={(e) => {
@@ -1063,7 +1065,7 @@ export function RecordView<T extends { id: RowId }>({
1063
1065
  }}
1064
1066
  aria-label={`Drag ${primary.title || singular} to reorder`}
1065
1067
  title="Drag to reorder"
1066
- className="absolute left-0 top-1/2 flex h-6 w-4 -translate-y-1/2 cursor-grab items-center justify-center text-muted-foreground/50 opacity-0 transition-opacity hover:text-foreground group-hover:opacity-100 active:cursor-grabbing"
1068
+ className="absolute left-1.5 top-1/2 flex h-6 w-4 -translate-y-1/2 cursor-grab items-center justify-center text-muted-foreground/40 transition-colors hover:text-foreground active:cursor-grabbing"
1067
1069
  >
1068
1070
  <GripVertical className="size-3.5" />
1069
1071
  </div>