e.stopPropagation()}
+ className="absolute right-0 top-full z-[60] mt-1 w-64 bg-white border border-[rgba(38,37,30,0.15)] rounded-xl shadow-lg p-3"
>
{po ? (
<>
@@ -331,16 +343,15 @@ export default function CollectionItemCard({
onClick={(e) => { e.stopPropagation(); setShowNotesTooltip(v => !v); setShowPoTooltip(false); }}
aria-label="Show notes"
aria-expanded={showNotesTooltip}
- className="w-7 h-7 rounded-lg flex items-center justify-center bg-[#8a5a02] text-white active:bg-[#6b4501] transition-colors"
+ className="w-6 h-6 rounded-md flex items-center justify-center bg-[#8a5a02] text-white active:bg-[#6b4501] transition-colors"
>
-
+
{/* Notes tooltip popover */}
{showNotesTooltip && (
e.stopPropagation()}
+ className="absolute right-0 top-full z-[60] mt-1 w-64 bg-white border border-[rgba(38,37,30,0.15)] rounded-xl shadow-lg p-3"
>
(null);
// Close tooltip when clicking outside the list
@@ -83,9 +89,16 @@ export default function SupplierGroup({
return (
@@ -169,7 +182,14 @@ export default function SupplierGroup({
return (
{/* Left: icon + description */}
Buyer Notes
diff --git a/components/SupplierGroup.tsx b/components/SupplierGroup.tsx index 4b9f2d4..a78bcf1 100644 --- a/components/SupplierGroup.tsx +++ b/components/SupplierGroup.tsx @@ -67,6 +67,12 @@ export default function SupplierGroup({ // Active tooltip: { itemId, type } const [activeTooltip, setActiveTooltip] = useState<{ itemId: string; type: 'po' | 'notes' } | null>(null); + // Tracks whether a *detailed-mode* card inside this group has its + // own popover open — they live in CollectionItemCard state, so we + // learn about them via the onPopoverChange callback. Combined with + // activeTooltip above, this drives whether the section lifts to z-30 + // to paint above the next supplier/area group. + const [childPopoverOpen, setChildPopoverOpen] = useState(false); const listRef = useRef
@@ -185,7 +205,7 @@ export default function SupplierGroup({
{/* Right: qty + FileText + Collect/Problem */}
-
+
{expectedQty}×
{/* PO FileText button */}
@@ -197,15 +217,14 @@ export default function SupplierGroup({
}}
aria-label="Show PO details"
aria-expanded={isPoOpen}
- className="w-8 h-8 rounded-lg flex items-center justify-center bg-[#6c5a99] text-white active:bg-[#4a3d6b] transition-colors"
+ className="w-6 h-6 rounded-md flex items-center justify-center bg-[#6c5a99] text-white active:bg-[#4a3d6b] transition-colors"
>
-
+
{/* PO tooltip popover */}
{isPoOpen && (
e.stopPropagation()}
+ className="absolute right-0 top-full z-[60] mt-1 w-64 bg-white border border-[rgba(38,37,30,0.15)] rounded-xl shadow-lg p-3"
>
Purchase Order
@@ -276,15 +295,14 @@ export default function SupplierGroup({ }} aria-label="Show notes" aria-expanded={isNotesOpen} - className="w-8 h-8 rounded-lg flex items-center justify-center bg-[#8a5a02] text-white active:bg-[#6b4501] transition-colors" + className="w-6 h-6 rounded-md flex items-center justify-center bg-[#8a5a02] text-white active:bg-[#6b4501] transition-colors" > - + {/* Notes tooltip popover */} {isNotesOpen && ( e.stopPropagation()}
+ className="absolute right-0 top-full z-[60] mt-1 w-64 bg-white border border-[rgba(38,37,30,0.15)] rounded-xl shadow-lg p-3"
>
diff --git a/tailwind.config.js b/tailwind.config.js
index fc312c6..0eeb3f6 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -25,6 +25,15 @@ module.exports = {
'18': '4.5rem',
'22': '5.5rem',
},
+ screens: {
+ // Tiny phones (320–479px). Default Tailwind starts at `sm`=640px,
+ // which leaves the 320–414px band — the smallest screens the
+ // app actually ships to — without an in-between breakpoint.
+ // `xs` lets us hide labels on those screens while keeping the
+ // rest of the layout compact, instead of squeezing everything
+ // into a single cramped row.
+ xs: '480px',
+ },
animation: {
'fade-in': 'fadeIn 0.3s ease-out forwards',
'slide-up': 'slideUp 0.3s ease-out forwards',
Buyer Notes
@@ -354,6 +372,7 @@ export default function SupplierGroup({ onProblem={onProblem} onNavigate={onNavigate} onShowDetails={onShowDetails} + onPopoverChange={setChildPopoverOpen} /> ))}