import { Card, CardContent, CardHeader, CardTitle } from "@godxjp/ui/data-display"; import { Button, Logo } from "@godxjp/ui/general"; import { ErrorSurface, Flex, PageContainer, ResponsiveGrid } from "@godxjp/ui/layout"; import { LifeBuoy, RotateCcw } from "lucide-react"; /** * ERROR SURFACE (403 · 404 · 500 · 503) — a real, importable component: `ErrorSurface`. * * `mode` is the SHELL CONTRACT, not a skin: * application (403/404) → the BODY you place inside the AppShell the route already renders * system (500/503) → owns the page: CenteredShell align="center", package-owned geometry * * Every card below renders the surface in `application` mode, because a `system` surface is a full * `100dvh` page and would swallow this catalogue page — see the Examples for the two real screens. * * Structure of the surface: status code (compact, mono/tabular, announced as "HTTP status 403") * → icon · tone · title · description · EXACTLY ONE action → optional semantic metadata rows * (request id · required permission · organization · maintenance window + progress). */ export default function Demo() { return ( status=403 · 権限なし(permission + organization) ダッシュボードへ戻る} /> status=404 · 未検出(メタデータなし) {/* Every metadata slot omitted ⇒ the whole description list disappears. Metadata is optional; the surface never renders an empty row or a dangling label. */} ダッシュボードへ戻る} /> status=500 · リクエスト ID 付き {/* Shown here in application mode so the card can contain it. In a real 500 page this is mode="system" and the surface owns the whole viewport. */} 再読み込み } /> status=503 · メンテナンス時間帯 + 進捗 {/* ISO-8601 instants + an IANA zone in, Intl.DateTimeFormat.formatRange out. The progress meter is server-sent (a client clock would break SSR hydration). */} 再読み込み } /> icon / tone / brand の上書き {/* icon and tone DEFAULT from the status (500 ⇒ ServerCrash + destructive). Override them only when the product has a truer glyph for the failure — never to recolour a status into a different severity. `brand` is system-mode only and is ignored here. */} } title="復旧作業中です" description="サポートチームが対応しています。復旧までしばらくお待ちください。" action={} /> tone · セマンティックな重大度の 5 段階 {/* `tone` DEFAULTS from `status` (403/503 warning · 404 muted · 500 destructive). An explicit tone is for the case where the product knows a TRUER severity than the status code carries -- a planned window is informational, a resolved incident is a success -- never to recolour one severity into another for decoration. All five branches are rendered here so the whole axis is readable at rest. */} ホームへ戻る} /> ステータスページを見る} /> 権限を申請する} /> 再読み込み} /> 再読み込み} /> {/* The same surface in ja / en / vi. The library-owned metadata LABELS ("Request ID") follow the active app locale; the product copy is whatever the app's own t() returns. The description measure is owned by --empty-state-description-max-width (28rem), and the surface measure by --error-surface-max-width (32rem), so the longest locale wraps instead of breaking the layout. */} 多言語オーバーフロー:ja / en / vi 再読み込み} /> Reload} /> Tải lại} /> ); }