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
+31
View File
@@ -0,0 +1,31 @@
import type { ReactNode } from 'react'
import { cx } from './cx'
export function Segmented({
value,
onChange,
options,
}: {
value: string
onChange: (v: string) => void
options: Array<{ value: string; label: ReactNode }>
}) {
return (
<div className="inline-flex p-0.5 rounded-[10px] bg-rule-2">
{options.map(o => (
<button
key={o.value}
type="button"
aria-pressed={o.value === value}
onClick={() => onChange(o.value)}
className={cx(
'inline-flex items-center gap-1.5 px-2.5 py-[5px] rounded-md text-[13px] cursor-pointer whitespace-nowrap',
o.value === value ? 'bg-surface font-semibold shadow-sm' : 'text-ink-3',
)}
>
{o.label}
</button>
))}
</div>
)
}