Match popup panels exactly to mockups (3-color action system)

The button-triggered panels followed a coarse "primary = red" rule; the mockups
actually use: black for confirm actions, navy #1e3a5f for suggestions/AI recs,
khaki #e2db8d for "Translate", grey-blue #c8cbd8 for delete, red only for total
text and add-to-order/FAB/CTA.

- OrderPanel: Confirm/order/split-create buttons -> black #111; Total -> red;
  cart item qty stepper -> white pill (matches mockup).
- SuggestionCarousel: "Add" -> navy #1e3a5f; price -> black.
- AiConsultant: recommendation name + "Add" + send arrow -> navy #1e3a5f.
- SplitPanel: join/create + order buttons -> black #111.
- ProductEditor: Save -> black #111; Delete -> grey-blue #c8cbd8;
  "Translate with AI" -> khaki #e2db8d.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Collina SystemsandClaude Opus 4.8 committed 2026-06-23 18:02:21 -06:00
1 parent bcec7ee8dc
commit ffa8766540
5 files changed
+40 -24

No files matched your search

+5 -3
View File
@@ -327,7 +327,8 @@ export default function ProductEditor({
<div className="mt-1 flex gap-3 border-t border-white/30 pt-5">
<button
onClick={() => onDelete(draft)}
className="liquid-btn rounded-2xl px-5 py-3 text-sm font-medium text-red-700"
className="rounded-2xl px-5 py-3 text-sm font-medium"
style={{ backgroundColor: '#c8cbd8', color: '#000' }}
>
{t('delete')}
</button>
@@ -335,7 +336,7 @@ export default function ProductEditor({
onClick={save}
disabled={saving}
className="flex-1 rounded-2xl py-3 text-sm font-semibold text-white shadow-lg transition active:scale-[0.99] disabled:opacity-50"
style={{ backgroundColor: '#dc2626' }}
style={{ backgroundColor: '#111' }}
>
{t('save')}
</button>
@@ -407,7 +408,8 @@ function TranslateRow({
<button
onClick={onClick}
disabled={loading}
className="liquid-btn flex items-center gap-2 whitespace-nowrap rounded-full px-3 py-2 text-xs font-semibold disabled:opacity-50"
className="flex items-center gap-2 whitespace-nowrap rounded-full px-3 py-2 text-xs font-semibold disabled:opacity-50"
style={{ backgroundColor: '#e2db8d', color: '#000' }}
>
{loading ? '…' : `✨ ${t('translateAi')}`}
</button>
+3 -3
View File
@@ -66,13 +66,13 @@ export default function AiConsultant({
return (
<div key={key} className="glass-soft flex items-start gap-3 rounded-2xl p-4">
<div className="min-w-0 flex-1">
<div className="font-semibold text-[var(--accent)]">{r.dish}</div>
<div className="font-semibold" style={{ color: '#1e3a5f' }}>{r.dish}</div>
<p className="text-sm text-[var(--text)]/80">{r.reason}</p>
</div>
{ordersEnabled && product && (
<button
onClick={() => onAdd(product)}
style={{ backgroundColor: '#dc2626' }}
style={{ backgroundColor: '#1e3a5f' }}
className="shrink-0 rounded-full px-3 py-1.5 text-xs font-medium text-white"
>
{tm('addToOrder')}
@@ -138,7 +138,7 @@ export default function AiConsultant({
<button
onClick={ask}
disabled={loading}
style={{ backgroundColor: '#dc2626' }}
style={{ backgroundColor: '#1e3a5f' }}
className="rounded-full px-4 py-2 text-sm font-medium text-white disabled:opacity-50"
>
→
+27 -14
View File
@@ -564,20 +564,33 @@ function OrderPanel({
{cart.length === 0 && <p className="text-sm text-[var(--text)]/60">{t('cartEmpty')}</p>}
{cart.map((l) => (
<div key={l.product.id} className="glass-soft flex flex-col gap-2 rounded-2xl px-3 py-2">
<div className="flex items-center gap-2">
<div className="flex items-center gap-3">
<span className="min-w-0 flex-1 text-sm font-medium">
{pickText(l.product.name, locale)}
</span>
<span className="shrink-0 text-sm text-[var(--text)]/60">
<span className="w-16 shrink-0 text-right text-sm text-[var(--text)]/60">
${(l.product.price * l.qty).toFixed(2)}
</span>
<button onClick={() => setQty(l.product.id, -1)} className="px-2 text-lg" aria-label="−">
−
</button>
<span className="w-5 text-center">{l.qty}</span>
<button onClick={() => setQty(l.product.id, 1)} className="px-2 text-lg" aria-label="+">
+
</button>
<div
className="flex shrink-0 items-center gap-1 rounded-full bg-white px-1.5 py-1"
style={{ boxShadow: '0 2px 8px rgba(40,30,20,.15)' }}
>
<button
onClick={() => setQty(l.product.id, -1)}
className="flex h-7 w-7 items-center justify-center rounded-full text-lg leading-none"
aria-label="−"
>
−
</button>
<span className="w-6 text-center text-sm font-medium">{l.qty}</span>
<button
onClick={() => setQty(l.product.id, 1)}
className="flex h-7 w-7 items-center justify-center rounded-full text-lg leading-none"
aria-label="+"
>
+
</button>
</div>
</div>
<input
value={l.note ?? ''}
@@ -592,7 +605,7 @@ function OrderPanel({
{suggestions.length > 0 && <SuggestionCarousel products={suggestions} onAdd={onAdd} />}
{cart.length > 0 && (
<div className="flex items-center justify-between px-1 text-sm font-semibold">
<div className="flex items-center justify-between px-1 text-sm font-semibold text-[#dc2626]">
<span>{t('total')}</span>
<span>${total.toFixed(2)}</span>
</div>
@@ -634,7 +647,7 @@ function OrderPanel({
<button
onClick={() => newName.trim() && onCreateSubaccount(newName.trim(), Number(table))}
disabled={!newName.trim()}
className="rounded-2xl bg-[#dc2626] py-3 font-medium text-white disabled:opacity-50"
className="rounded-2xl bg-[#111] py-3 font-medium text-white disabled:opacity-50"
>
{t('createSplit')}
</button>
@@ -642,7 +655,7 @@ function OrderPanel({
) : (
<button
onClick={() => setPickNew(true)}
className="rounded-2xl bg-[#dc2626] py-3 font-medium text-white"
className="rounded-2xl bg-[#111] py-3 font-medium text-white"
>
{t('imNew')}
</button>
@@ -652,7 +665,7 @@ function OrderPanel({
<button
onClick={send}
disabled={!table || cart.length === 0 || sending}
className="rounded-2xl bg-[#dc2626] py-3 font-medium text-white disabled:opacity-50"
className="rounded-2xl bg-[#111] py-3 font-medium text-white disabled:opacity-50"
>
{t('confirmOrder')}
</button>
@@ -695,7 +708,7 @@ function WaiterPanel({
<button
onClick={send}
disabled={!table || sending}
className="rounded-2xl bg-[#dc2626] py-3 font-medium text-white disabled:opacity-50"
className="rounded-2xl bg-[#111] py-3 font-medium text-white disabled:opacity-50"
>
{t('send')}
</button>
+2 -2
View File
@@ -167,7 +167,7 @@ export default function SplitPanel({
<button
onClick={join}
disabled={!name.trim() || !table || busy}
className="rounded-2xl bg-[#dc2626] py-3 font-medium text-white disabled:opacity-50"
className="rounded-2xl bg-[#111] py-3 font-medium text-white disabled:opacity-50"
>
{mode === 'split' && table ? t('joinSplit', { table: Number(table) }) : t('createSplit')}
</button>
@@ -238,7 +238,7 @@ export default function SplitPanel({
<button
onClick={sync}
disabled={busy}
className="flex-1 rounded-2xl bg-[#dc2626] py-3 font-medium text-white disabled:opacity-50"
className="flex-1 rounded-2xl bg-[#111] py-3 font-medium text-white disabled:opacity-50"
>
{t('updateSubaccount')}
</button>
+3 -2
View File
@@ -62,10 +62,11 @@ export default function SuggestionCarousel({
<span className="line-clamp-2 text-xs font-medium leading-tight">
{pickText(p.name, locale)}
</span>
<span className="text-xs text-[var(--accent)]">${p.price.toFixed(2)}</span>
<span className="text-xs text-black">${p.price.toFixed(2)}</span>
<button
onClick={() => onAdd(p)}
className="mt-auto rounded-full bg-[var(--accent)] py-1 text-xs font-medium text-white"
style={{ backgroundColor: '#1e3a5f' }}
className="mt-auto rounded-full py-1 text-xs font-medium text-white"
>
{t('addToOrder')}
</button>