refactor(storybook): simplify component and preview examples

Drop page / section descriptions, state notes and repeated captions from
the representative Stories of 44 components, the Patterns, Center
Graphic and OrgChart pages. Value readouts, spec lists and captions hide
only on the representative page; hidden verification Stories keep them.
Tabs Default API and the Filter Bar draft / applied counts move to the
hidden DefaultApi and DraftApplied Stories; Center Overview is hidden
with its direct URL kept. Story IDs are unchanged.

Align the component, pattern and OrgChart docs with the pages, point the
quality reference check at the DraftApplied Story, and make the P8
styles check expect no section header on the preview-only Expanded page.
This commit is contained in:
shkim4 committed 2026-10-23 00:28:05 +09:00
1 parent 48977e7823
commit 4c29894e56
81 files changed
+520 -671

No files matched your search

+13 -11
View File
@@ -52,14 +52,15 @@ function FormatExamples() {
)
}
function Controlled() {
// `showValue={false}` hides the value readout on the representative page; the verification Stories keep it.
function Controlled({ showValue = true }: { showValue?: boolean }) {
const [date, setDate] = useState<Date | undefined>()
return (
<div className="grid gap-2">
<Field label="마감일 (controlled)" id="dp-controlled">
<DatePicker id="dp-controlled" controlled value={date} onValueChange={setDate} calendarProps={calendarProps} />
</Field>
<span className="text-sm text-muted-foreground" data-testid="controlled">{`value = ${date ? date.toLocaleDateString("ko-KR") : "undefined"}`}</span>
{showValue ? <span className="text-sm text-muted-foreground" data-testid="controlled">{`value = ${date ? date.toLocaleDateString("ko-KR") : "undefined"}`}</span> : null}
</div>
)
}
@@ -92,11 +93,10 @@ function Disabled() {
}
const sections = [
{ id: "empty", label: "Empty (placeholder)", node: <Empty /> },
{ id: "empty", label: "Empty", node: <Empty /> },
{ id: "selected", label: "Selected", node: <Selected /> },
{ id: "format", label: "Default format / custom override", node: <FormatExamples /> },
{ id: "controlled", label: "Controlled", node: <Controlled /> },
{ id: "medium", label: "Medium size", node: <Medium /> },
{ id: "format", label: "Format", node: <FormatExamples /> },
{ id: "controlled", label: "Controlled", node: <Controlled showValue={false} /> },
{ id: "disabled-dates", label: "Disabled dates", node: <DisabledDates /> },
{ id: "disabled", label: "Disabled", node: <Disabled /> },
]
@@ -115,12 +115,14 @@ export const All: Story = {
parameters: { layout: "fullscreen", controls: { disable: true } },
render: () => (
<StoryPage>
<StoryPageHeader
title="Date Picker"
description="Popover + Calendar · 날짜 선택 시 닫힘"
/>
<StoryPageHeader title="Date Picker" />
<StorySection title="Overview">{board("empty")}</StorySection>
<StorySection title="Sizes" description="기본값: Large">{board("medium")}</StorySection>
{/* The field label already names the size, so the Medium specimen has no separate example title. */}
<StorySection title="Sizes">
<div className="max-w-sm">
<Medium />
</div>
</StorySection>
<StorySection title="States">{board("selected", "controlled", "disabled-dates", "disabled")}</StorySection>
<StorySection title="Usage">{board("format")}</StorySection>
</StoryPage>