import { useState } from "react"; import { PageHeader } from "../components/page-header.jsx"; import { Alert } from "../components/ui/alert.jsx"; import { Badge } from "../components/ui/badge.jsx"; import { Button } from "../components/ui/button.jsx"; import { Card } from "../components/ui/card.jsx"; import { Dialog } from "../components/ui/dialog.jsx"; import { TextField } from "../components/ui/text-field.jsx"; const COLOR_TOKENS = Object.freeze([ ["Surface", "--color-surface"], ["Muted surface", "--color-surface-muted"], ["Content", "--color-content"], ["Muted content", "--color-content-muted"], ["Action", "--color-action"], ["Danger", "--color-danger"], ["Focus", "--color-focus"], ]); export default function UiGalleryPage() { const [projectName, setProjectName] = useState(""); const [fieldTouched, setFieldTouched] = useState(false); const [dialogOpen, setDialogOpen] = useState(false); const [notice, setNotice] = useState( "구성요소를 조작하면 결과가 여기에 표시됩니다.", ); const [alertVisible, setAlertVisible] = useState(true); const fieldError = fieldTouched && projectName.trim().length === 0 ? "프로젝트 이름을 입력해 주세요." : undefined; /** @param {React.FormEvent} event */ function submitExample(event) { event.preventDefault(); setFieldTouched(true); if (projectName.trim().length === 0) { setNotice("입력값을 확인해 주세요."); return; } setNotice(`“${projectName.trim()}” 입력을 확인했습니다.`); } return (

버튼과 입력

키보드, 비활성 상태, 오류 설명을 포함한 기본 상호작용입니다.

setProjectName(event.currentTarget.value)} />

피드백과 모달

상태 전달은 색에만 의존하지 않으며, 모든 제어에는 이름이 있습니다.

{alertVisible ? ( setAlertVisible(false)} >

운영 환경에는 실제 저장 포트를 연결하세요.

) : ( )}
중립 정보 준비됨 확인 필요 실패
setDialogOpen(false)} title="연동 확인" description="도메인 작업을 실행하기 전 확인 화면의 기본 구조입니다." actions={ <> } >

민감한 값이나 구현 세부정보는 확인 문구에 포함하지 않습니다.

디자인 토큰

구성요소가 사용하는 의미 기반 색상과 형태 토큰입니다.

{COLOR_TOKENS.map(([label, token]) => (
))}
{notice}
); }