feat(design): add IMS Admin primitives (Button, StatusTag, Checkbox, FilterChip, Segmented, Avatar, Drawer) and restyle Field, Card, Modal

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 09:28:34 +08:00
co-authored by Claude Haiku 4.5
parent 01343d732e
commit 2a5b9332c7
15 changed files with 417 additions and 248 deletions
+34
View File
@@ -0,0 +1,34 @@
import { Check, Minus } from 'lucide-react'
import { cx } from './cx'
export function Checkbox({
checked,
indeterminate = false,
onChange,
label,
}: {
checked: boolean
indeterminate?: boolean
onChange: (next: boolean) => void
label: string
}) {
const on = checked || indeterminate
return (
<button
type="button"
role="checkbox"
aria-checked={indeterminate ? 'mixed' : checked}
aria-label={label}
onClick={e => {
e.stopPropagation()
onChange(!checked)
}}
className={cx(
'inline-grid place-items-center w-4 h-4 rounded-[5px] cursor-pointer',
on ? 'bg-accent text-white' : 'bg-surface shadow-[inset_0_0_0_1.5px_var(--color-faint)]',
)}
>
{indeterminate ? <Minus size={12} strokeWidth={3} aria-hidden /> : checked ? <Check size={12} strokeWidth={3} aria-hidden /> : null}
</button>
)
}