import { Badge, Card, CardContent, CardDescription, CardHeader, CardTitle, Descriptions, Progress, Thumbnail, } from "@godxjp/ui/data-display"; import { Button, Text } from "@godxjp/ui/general"; import { Flex, PageContainer } from "@godxjp/ui/layout"; import { Download, ExternalLink, FileText } from "lucide-react"; /** * Descriptions — the label/value grid every detail page is made of. * * WHY THIS PAGE IS LONG. It was five tidy cards of short strings, and the owner's verdict was that * it shows nothing about whether the component holds up. That is right: a label/value grid is * trivial when every label is four characters and every value is one line. * * A real detail screen is not that. It has a label that runs to three lines beside one that is two * characters; a value that is an image, a file to download, a link, a status, a progress bar, a * 40-character machine ID, or nothing at all; and it has to survive all of them in the same grid, * at every breakpoint, bordered and not. * * So every section below is a case a real detail page hits. Where a section looks bad, the * component owes an answer — the sample data is not there to flatter it. */ const ID = "01JBQ9X7M4K2R8VT3NZ6YHF0PA"; export default function Demo() { return ( 1 · columns × bordered × layout — the three axes Every combination changes where the label sits and how the grid divides. These are the four a project actually picks between. columns=3 · bordered · horizontal — the dense admin default 株式会社山田製作所 佐藤 玲 有効 2024-04-01 ¥12,000,000 月末締め翌月末払い columns=2 · no border · vertical — the reading layout, label above value 株式会社山田製作所 佐藤 玲 ¥12,000,000 月末締め翌月末払い columns=1 · bordered — a narrow column or a phone 株式会社山田製作所 有効 labelAlign=end — right-aligned labels, so the values start on one line {ID} 有効 2 · responsive columns `columns` takes a breakpoint object. Narrow this frame with the Dimensions control: 1 column on a phone, 2 on a tablet, 3 on a desktop — the same markup throughout. 株式会社山田製作所 7010001071491 精密機器製造 山田 太郎 248 名 1974-06-12 3 · the value is not a string The value slot takes any node. These are the ones a detail page actually puts there — an image, a file, a link, a status, a proportion, a secret, money, a long memo. 出荷可 在庫僅少 ¥128,400 {ID} 4 · span — a value that needs the whole row An address, a memo or a JSON blob does not belong in a one-third cell. `span` widens the item; `span="filled"` takes whatever is left on the row, so the grid stays aligned instead of leaving a hole. 株式会社山田製作所 佐藤 玲 03-5555-0198 〒105-0011 東京都港区芝公園四丁目2番8号 東京タワー内 グローバルビジネスセンター 23F 株式会社山田製作所 東日本統括本部 検収は毎月第2・第4火曜のみ。祝日と重なる場合は翌営業日に振替。先方の受入窓口は 資材部・資材管理課(内線 4821)。2026年4月以降は電子取引のみとなるため、紙の納品書は不可。 ¥12,000,000 ¥8,214,930 5 · the cases that break a label/value grid This is the only section on the page that can tell you whether Descriptions is any good. If a row here looks wrong, the component owes an answer — not the data. 連携済 96.8% urn:godx:entitlement:ap-northeast-1:7010001071491:workforce/identity/administration/v4 {""} 0 ¥128,400,932,517 −¥412,880 AKIAIOSFODNN7EXAMPLEWJALRXUTNFEMIK7MDENGBPXRFICYEXAMPLEKEY 使い方の要点 この3点で、上のほとんどが決まります。 直下の子は Descriptions.Item だけです。生の <div><dt>/<dd> を混ぜるとグリッドが崩れます。 機械可読な値(ID・パス・鍵・通貨コード)には mono を付けてください。 等幅になるだけでなく break-all が効き、上の 57 文字の鍵がセルを突き破らずに折り返します。 住所・備考・JSON のような長い値には span を。 1/3 セルに押し込むと、その行だけ高さが跳ねて表全体が読みにくくなります。 ); }