Adopt the new palette; square corners, superellipse buttons
The theme defaults (light and dark) come from the 16-color grid, kept as PALETTE in src/lib/color.ts; every text pair passes the admin's 4.5:1 check. Nothing is rounded any more except buttons, which share one btn utility (Poppins Bold, a superellipse corner where the browser has corner-shape) and true dots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ecdcd4ec37
commit
d81f7bd856
62 changed files with 416 additions and 384 deletions
|
|
@ -327,7 +327,7 @@ export default function EventCalendar({
|
|||
<button
|
||||
type="button"
|
||||
onClick={() => go(monthKey(today))}
|
||||
className="rounded-full border px-3 py-1 text-sm font-semibold hover:bg-surface"
|
||||
className="btn border px-3 py-1 text-sm hover:bg-surface"
|
||||
style={{ borderColor: accent, color: accentText(accent) }}
|
||||
>
|
||||
Today
|
||||
|
|
@ -335,7 +335,7 @@ export default function EventCalendar({
|
|||
)}
|
||||
|
||||
<div
|
||||
className="ml-auto hidden overflow-hidden rounded-full border md:flex"
|
||||
className="ml-auto hidden overflow-hidden btn border md:flex"
|
||||
style={{ borderColor: accent }}
|
||||
role="group"
|
||||
aria-label="Calendar view"
|
||||
|
|
@ -381,12 +381,12 @@ export default function EventCalendar({
|
|||
/>
|
||||
)}
|
||||
{show('online') && (
|
||||
<label className="flex cursor-pointer items-center gap-2 rounded-full border border-brand/50 bg-surface px-4 py-2 text-sm">
|
||||
<label className="flex cursor-pointer items-center gap-2 btn border border-brand/50 bg-surface px-4 py-2 text-sm">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={onlineOnly}
|
||||
onChange={(e) => setOnlineOnly(e.target.checked)}
|
||||
className="h-4 w-4 rounded"
|
||||
className="h-4 w-4"
|
||||
style={{ accentColor: accent }}
|
||||
/>
|
||||
Online only
|
||||
|
|
@ -399,7 +399,7 @@ export default function EventCalendar({
|
|||
onChange={(e) => setQuery(e.target.value)}
|
||||
placeholder="Search events"
|
||||
aria-label="Search events"
|
||||
className="min-w-[12rem] flex-1 rounded-full border border-brand/50 bg-surface px-4 py-2 text-sm outline-none focus:border-link focus:ring-2 focus:ring-link/40 md:max-w-xs"
|
||||
className="min-w-[12rem] flex-1 border border-brand/50 bg-surface px-4 py-2 text-sm outline-none focus:border-link focus:ring-2 focus:ring-link/40 md:max-w-xs"
|
||||
/>
|
||||
)}
|
||||
{filtering && (
|
||||
|
|
@ -418,11 +418,11 @@ export default function EventCalendar({
|
|||
{/* ── Body ── */}
|
||||
<div className="mt-6">
|
||||
{error ? (
|
||||
<p className="rounded-2xl bg-surface p-6 text-danger">
|
||||
<p className="bg-surface p-6 text-danger">
|
||||
Couldn’t load events. {error.message}
|
||||
</p>
|
||||
) : loading ? (
|
||||
<div className="h-[32rem] animate-pulse rounded-3xl bg-tint" aria-hidden="true" />
|
||||
<div className="h-[32rem] animate-pulse bg-tint" aria-hidden="true" />
|
||||
) : (
|
||||
<>
|
||||
{view === 'month' && (
|
||||
|
|
@ -495,7 +495,7 @@ type MonthGridProps = {
|
|||
|
||||
function MonthGrid({ weeks, month, today, occurrences, selected, onSelect, accent }: MonthGridProps) {
|
||||
return (
|
||||
<div className="overflow-hidden rounded-3xl border border-brand/15 bg-surface shadow-sm">
|
||||
<div className="overflow-hidden border border-brand/15 bg-surface shadow-sm">
|
||||
<div className="grid grid-cols-7 border-b border-brand/10 bg-tint-soft">
|
||||
{WEEKDAYS.map((day) => (
|
||||
<div
|
||||
|
|
@ -539,7 +539,7 @@ function MonthGrid({ weeks, month, today, occurrences, selected, onSelect, accen
|
|||
}}
|
||||
>
|
||||
<span
|
||||
className="flex h-7 w-7 items-center justify-center rounded-full text-sm font-semibold"
|
||||
className="flex h-7 w-7 items-center justify-center text-sm font-semibold"
|
||||
style={
|
||||
isToday
|
||||
? { background: accent, color: readableOn(accent) }
|
||||
|
|
@ -583,8 +583,8 @@ function Bar({ seg, accent }: { seg: Segment; accent: string }) {
|
|||
to={eventHref(seg.event.id)}
|
||||
title={`${seg.event.title}${seg.time ? ` · ${seg.time}` : ''}`}
|
||||
className={`pointer-events-auto flex items-center gap-1 truncate px-2 text-xs font-semibold text-white transition-[filter] hover:brightness-110 ${
|
||||
seg.continuesBefore ? 'ml-0 rounded-l-none' : 'ml-1 rounded-l-md'
|
||||
} ${seg.continuesAfter ? 'mr-0 rounded-r-none' : 'mr-1 rounded-r-md'} ${
|
||||
seg.continuesBefore ? 'ml-0' : 'ml-1'
|
||||
} ${seg.continuesAfter ? 'mr-0' : 'mr-1'} ${
|
||||
canceled ? 'line-through opacity-60' : ''
|
||||
}`}
|
||||
style={{
|
||||
|
|
@ -621,7 +621,7 @@ function DayPanel({
|
|||
onClose: () => void
|
||||
}) {
|
||||
return (
|
||||
<div className="mt-4 rounded-3xl border bg-surface p-6" style={{ borderColor: `${withAlpha(accent, 25)}` }}>
|
||||
<div className="mt-4 border bg-surface p-6" style={{ borderColor: `${withAlpha(accent, 25)}`}}>
|
||||
<div className="flex items-center gap-4">
|
||||
<h4 className="font-display text-lg font-bold">{longDay(date)}</h4>
|
||||
<button
|
||||
|
|
@ -665,7 +665,7 @@ function MonthList({
|
|||
}) {
|
||||
if (items.length === 0) {
|
||||
return (
|
||||
<p className="rounded-3xl bg-surface p-10 text-center" style={{ color: BODY }}>
|
||||
<p className="bg-surface p-10 text-center" style={{ color: BODY }}>
|
||||
Nothing on the calendar this month.
|
||||
</p>
|
||||
)
|
||||
|
|
@ -684,7 +684,7 @@ function MonthList({
|
|||
{[...byDay.entries()].map(([day, list]) => {
|
||||
const d = parse(day)
|
||||
return (
|
||||
<li key={day} className="flex gap-5 rounded-3xl bg-surface p-5 shadow-sm">
|
||||
<li key={day} className="flex gap-5 bg-surface p-5 shadow-sm">
|
||||
<div className="w-14 shrink-0 text-center">
|
||||
<p className="text-xs font-bold uppercase tracking-widest" style={{ color: accentText(accent) }}>
|
||||
{d.toLocaleDateString(undefined, { weekday: 'short' })}
|
||||
|
|
@ -716,7 +716,7 @@ function EventLine({ item, accent }: { item: Occurrence; accent: string }) {
|
|||
return (
|
||||
<Link
|
||||
to={eventHref(event.id)}
|
||||
className="group flex items-start gap-3 rounded-xl p-2 transition-colors hover:bg-tint-soft"
|
||||
className="group flex items-start gap-3 p-2 transition-colors hover:bg-tint-soft"
|
||||
>
|
||||
<span className="mt-1.5 h-3 w-3 shrink-0 rounded-full" style={{ background: color }} aria-hidden="true" />
|
||||
<span className="min-w-0">
|
||||
|
|
@ -756,7 +756,7 @@ function NavButton({
|
|||
type="button"
|
||||
onClick={onClick}
|
||||
aria-label={label}
|
||||
className="flex h-10 w-10 items-center justify-center rounded-full border text-xl transition-colors hover:bg-surface"
|
||||
className="flex h-10 w-10 items-center justify-center btn border text-xl transition-colors hover:bg-surface"
|
||||
style={{ borderColor: accent, color: accentText(accent) }}
|
||||
>
|
||||
{children}
|
||||
|
|
@ -782,7 +782,7 @@ function FilterSelect({
|
|||
value={value}
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
aria-label={label}
|
||||
className="rounded-full border border-brand/50 bg-surface px-4 py-2 text-sm outline-none focus:border-link focus:ring-2 focus:ring-link/40"
|
||||
className=" border border-brand/50 bg-surface px-4 py-2 text-sm outline-none focus:border-link focus:ring-2 focus:ring-link/40"
|
||||
>
|
||||
<option value="">{all}</option>
|
||||
{options.map(([id, name]) => (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue