@viliha/vui-ui 1.1.7 → 1.1.8

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.1.7",
3
+ "version": "1.1.8",
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",
@@ -1552,23 +1552,26 @@ function RecordDetailPanel<T extends { id: RowId }>({
1552
1552
  <h3 className="border-b border-border bg-muted/40 px-3 py-2 font-semibold text-[var(--button-primary)]">
1553
1553
  {group}
1554
1554
  </h3>
1555
- <dl className="divide-y divide-border">
1555
+ {/* Two columns sized to content: the label column auto-widens to the
1556
+ longest label (never wraps), controls stay aligned. The panel width
1557
+ follows (see the slide-over `sm:w-auto`). */}
1558
+ <dl className="grid grid-cols-[max-content_minmax(12rem,1fr)] gap-x-3">
1556
1559
  {groupFields.map((f) => (
1557
1560
  // Label, icon, required mark and control share one baseline —
1558
1561
  // vertically centered. ponytail: a wrapped textarea grows down and
1559
1562
  // the label centers against it; acceptable for the single-line norm.
1560
1563
  <div
1561
1564
  key={f.key}
1562
- className="flex items-center gap-3 px-3 py-3 leading-relaxed"
1565
+ className="col-span-2 grid grid-cols-subgrid items-center border-t border-border px-3 py-3 leading-relaxed first:border-t-0"
1563
1566
  >
1564
- <dt className="flex w-28 shrink-0 items-center gap-1.5 text-muted-foreground">
1567
+ <dt className="flex items-center gap-1.5 whitespace-nowrap text-muted-foreground">
1565
1568
  {f.icon && (
1566
1569
  <f.icon className="size-3.5 text-[var(--button-primary)]" />
1567
1570
  )}
1568
1571
  {f.label}
1569
1572
  {f.required && <RequiredMark />}
1570
1573
  </dt>
1571
- <dd className="min-w-0 flex-1">
1574
+ <dd className="min-w-0">
1572
1575
  {f.render ? (
1573
1576
  <div>{f.render(draft)}</div>
1574
1577
  ) : !readOnly && f.editable ? (
@@ -1729,7 +1732,9 @@ function RecordDetailPanel<T extends { id: RowId }>({
1729
1732
  <aside
1730
1733
  aria-label={`${singular} form`}
1731
1734
  className={cn(
1732
- "fixed inset-y-0 right-0 z-[60] flex w-full flex-col border-l border-border bg-background shadow-xl sm:w-[380px] sm:max-w-[90vw]",
1735
+ // Auto-size to content: wide enough for the longest label + control on
1736
+ // one line, clamped so it never gets too narrow or wider than the viewport.
1737
+ "fixed inset-y-0 right-0 z-[60] flex w-full flex-col border-l border-border bg-background shadow-xl sm:w-auto sm:min-w-[420px] sm:max-w-[90vw]",
1733
1738
  closing ? "vui-panel-out" : "vui-panel-in",
1734
1739
  )}
1735
1740
  onAnimationEnd={(e) => {