fix: use accessible button color tokens for WCAG AA contrast

Swap bg-brand-orange to bg-brand-orange-button on all interactive
buttons with white text. Decorative uses unchanged. Bumps
@ciphera-net/ui to 0.3.6.
This commit is contained in:
Usman Baig
2026-03-28 00:48:05 +01:00
parent 8c0700f406
commit 07401a4ce2
12 changed files with 20 additions and 20 deletions

View File

@@ -333,7 +333,7 @@ export default function PaymentForm({ plan, interval, limit, country, vatId }: P
ref={submitRef}
type="submit"
disabled={submitting || !selectedMethod || (isCard && !mollieReady && !mollieError)}
className="mt-4 w-full rounded-lg bg-brand-orange px-4 py-3 text-sm font-semibold text-white transition-colors hover:bg-brand-orange/90 disabled:opacity-50 disabled:cursor-not-allowed"
className="mt-4 w-full rounded-lg bg-brand-orange-button px-4 py-3 text-sm font-semibold text-white transition-colors hover:bg-brand-orange-button-hover disabled:opacity-50 disabled:cursor-not-allowed"
>
{submitting ? 'Processing...' : 'Start free trial'}
</button>

View File

@@ -164,7 +164,7 @@ export default function AddFilterDropdown({ onAdd, suggestions = {}, onFetchSugg
onClick={() => setOperator(op)}
className={`px-2.5 py-1 text-[11px] font-medium rounded-md transition-colors cursor-pointer ${
operator === op
? 'bg-brand-orange text-white'
? 'bg-brand-orange-button text-white'
: 'bg-neutral-800 text-neutral-400 hover:bg-neutral-700'
}`}
>
@@ -219,7 +219,7 @@ export default function AddFilterDropdown({ onAdd, suggestions = {}, onFetchSugg
<div className="px-3 py-3 border-t border-neutral-800">
<button
onClick={handleSubmitCustom}
className="w-full px-3 py-2 text-sm font-medium bg-brand-orange text-white rounded-lg hover:bg-brand-orange/90 transition-colors cursor-pointer"
className="w-full px-3 py-2 text-sm font-medium bg-brand-orange-button text-white rounded-lg hover:bg-brand-orange/90 transition-colors cursor-pointer"
>
Filter by &ldquo;{search.trim()}&rdquo;
</button>

View File

@@ -674,7 +674,7 @@ export default function Chart({
type="button"
disabled={!annotationForm.text.trim() || !annotationForm.date || saving}
onClick={handleSaveAnnotation}
className="px-3 py-1.5 text-xs font-medium text-white bg-brand-orange hover:bg-brand-orange/90 rounded-lg disabled:opacity-50 cursor-pointer"
className="px-3 py-1.5 text-xs font-medium text-white bg-brand-orange-button hover:bg-brand-orange-button-hover rounded-lg disabled:opacity-50 cursor-pointer"
>
{saving ? 'Saving...' : annotationForm.editingId ? 'Save' : 'Add'}
</button>

View File

@@ -70,7 +70,7 @@ export default function EventProperties({ siteId, eventName, dateRange, onClose
onClick={() => setSelectedKey(k.key)}
className={`px-3 py-1 text-xs font-medium rounded-full transition-colors cursor-pointer ${
selectedKey === k.key
? 'bg-brand-orange text-white'
? 'bg-brand-orange-button text-white'
: 'bg-neutral-800 text-neutral-400 hover:bg-neutral-700'
}`}
>

View File

@@ -17,7 +17,7 @@ export default function FilterBar({ filters, onRemove, onClear }: FilterBarProps
<button
key={`${f.dimension}-${f.operator}-${f.values.join(',')}`}
onClick={() => onRemove(i)}
className="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg bg-brand-orange text-white hover:bg-brand-orange/80 transition-colors cursor-pointer group"
className="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg bg-brand-orange-button text-white hover:bg-brand-orange-button-hover transition-colors cursor-pointer group"
title={`Remove filter: ${filterLabel(f)}`}
>
<span>{filterLabel(f)}</span>

View File

@@ -68,7 +68,7 @@ export default function BreakdownDrawer({ siteId, funnelId, stepIndex, stepName,
onClick={() => setActiveDimension(dim)}
className={`px-3 py-1.5 text-xs font-medium rounded-lg whitespace-nowrap transition-colors ${
activeDimension === dim
? 'bg-brand-orange text-white'
? 'bg-brand-orange-button text-white'
: 'bg-neutral-100 dark:bg-neutral-800 text-neutral-500 hover:bg-neutral-200 dark:hover:bg-neutral-700'
}`}
>

View File

@@ -296,7 +296,7 @@ export default function FunnelForm({ siteId, initialData, onSubmit, submitLabel,
onClick={() => handleUpdateStep(index, 'category', 'page')}
className={`px-3 py-1.5 text-xs font-medium rounded-lg transition-colors ${
category === 'page'
? 'bg-brand-orange text-white'
? 'bg-brand-orange-button text-white'
: 'bg-neutral-100 dark:bg-neutral-800 text-neutral-600 dark:text-neutral-400 hover:bg-neutral-200 dark:hover:bg-neutral-700'
}`}
>
@@ -307,7 +307,7 @@ export default function FunnelForm({ siteId, initialData, onSubmit, submitLabel,
onClick={() => handleUpdateStep(index, 'category', 'event')}
className={`px-3 py-1.5 text-xs font-medium rounded-lg transition-colors ${
category === 'event'
? 'bg-brand-orange text-white'
? 'bg-brand-orange-button text-white'
: 'bg-neutral-100 dark:bg-neutral-800 text-neutral-600 dark:text-neutral-400 hover:bg-neutral-200 dark:hover:bg-neutral-700'
}`}
>
@@ -470,7 +470,7 @@ export default function FunnelForm({ siteId, initialData, onSubmit, submitLabel,
}}
className={`px-3 py-1.5 text-xs font-medium rounded-lg transition-colors ${
windowValue === preset.value && windowUnit === preset.unit
? 'bg-brand-orange text-white'
? 'bg-brand-orange-button text-white'
: 'bg-neutral-100 dark:bg-neutral-800 text-neutral-600 dark:text-neutral-400 hover:bg-neutral-200 dark:hover:bg-neutral-700'
}`}
>