import { Alert, AlertActions, AlertContent, AlertDescription, AlertQueryError, AlertTitle, Banner, } from "@godxjp/ui/feedback"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display"; import { Button } from "@godxjp/ui/general"; import { Flex, PageContainer } from "@godxjp/ui/layout"; /** * Alert · inline persistent banner for page-scoped feedback (errors, warnings, * success, info). NOT for transient toasts. Compose AlertTitle + * AlertDescription inside; add AlertActions for CTA buttons. Pass onDismiss to * show the built-in × button. */ export default function Demo() { return ( Every tone branch · variant All seven tone branches, in order: default, success, warning, destructive, info, muted, neutral. Tone sets the icon, the surface and the live-region politeness (destructive and warning announce assertively; the rest are polite). default, muted and neutral deliberately share the quiet neutral surface, so the caller names intent without adding colour. variant is the structural axis: the MEASURE of the box, never the colour: default (spelled out on the first banner) is this inset, rounded, inline alert; banner is the page-level strip shown at the bottom of this page. 勘定科目マスタを更新しました 変更内容は次回の仕訳入力から反映されます。 インポートが完了しました 1,240 件の仕訳を取り込みました。 3 件の打刻漏れがあります 本日中に確認してください。 請求書の保存に失敗しました サーバーエラーが発生しました。内容を確認のうえ再度お試しください。 電子帳簿保存法の保存要件が変更されます 2026年1月以降に受領した証憑が対象です。保存設定をご確認ください。 この請求書は下書きです 送信するまで取引先には表示されません。 8月10日 02:00 から 04:00 まで定期メンテナンスを行います 作業中は仕訳の保存ができません。 AlertContent + cause-aware query recovery Content groups copy; transient errors expose an explicit retry. 同期状態 最終同期は 2 分前です。 {}} /> AlertTitle + AlertDescription + AlertActions Wrap text in AlertTitle / AlertDescription; put CTA Buttons in AlertActions (renders in the action slot). Never place raw buttons as top-level Alert children. MF 連携トークンの有効期限が近づいています 7 日以内にトークンが失効します。今すぐ再連携してください。 Dismissible banner Pass onDismiss: the component renders an accessible × button automatically. Never hand-roll your own dismiss button. { /* set session flag */ }} > 請求が未払いです 期日を過ぎた請求書が 2 件あります。早急にご確認ください。 {/* Banner — the SAME component at the page measure. variant="banner" swaps only the box: square, edge-to-edge, ruled on the block-end edge, measured by the --banner-* tokens. Every tone, the icon, the actions grid and the dismiss ✕ are inherited from the inline alert above, so there is nothing new to learn and nothing duplicated. `CardContent flush` removes the card inset so the strip really does reach both edges — which is the whole point of the variant and cannot be shown inside a padded body. */} Banner · page-level strip Mount it above PageHeader/PageContainer, or in AppShell to span every route. Use it only for page- or app-scoped messages (maintenance, trial expiry, read-only mode); a message about ONE section stays an inline Alert inside that section. Never stack two. 8月10日 02:00〜04:00 に定期メンテナンスを実施します 作業中は仕訳の保存ができません。 { /* set session flag */ }} > お試し期間は残り 3 日です 期限までにプランを選択してください。 閲覧専用モードで表示しています サポート担当として代理ログイン中のため、編集操作は無効です。 請求が未払いのため一部機能を停止しています 期日を過ぎた請求書が 2 件あります。お支払い後、数分で再開されます。 {/* Long EN / VI copy at the same measure — the strip wraps rather than truncating, and the actions column keeps its minimum before dropping to its own row. This is the 390px stress case: nothing here sets a width. */} Scheduled maintenance will pause synchronisation for all connected accounting workspaces Journal entries created during the window are queued and submitted automatically once the service resumes. No action is required. Việc đồng bộ dữ liệu hoá đơn sẽ tạm dừng trong thời gian bảo trì định kỳ Các bút toán được tạo trong khoảng thời gian này sẽ được xếp hàng và gửi lại tự động sau khi dịch vụ hoạt động trở lại. {/* The remaining three tones. default / muted / neutral deliberately share the quiet neutral surface — the caller names intent without adding colour — so all three belong here: a reader has to SEE that they resolve alike, not be told. */} 新しい利用規約が2026年9月1日に発効します 内容は設定画面からいつでも確認できます。 すべてのサービスが正常に稼働しています 直近のインシデントは解決済みです。 この組織はアーカイブされています 閲覧のみ可能で、新しい操作は記録されません。 ); }