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

+8 -10
View File
@@ -14,12 +14,13 @@ const month = new Date(2026, 9, 1)
const box = (node: ReactNode) => <div className="rounded-md border bg-card w-fit">{node}</div>
function Single() {
// `showValue={false}` hides the value readout on the representative page; the verification Stories keep it.
function Single({ showValue = true }: { showValue?: boolean }) {
const [date, setDate] = useState<Date | undefined>(new Date(2026, 9, 15))
return (
<div className="grid gap-2">
{box(<Calendar mode="single" selected={date} onSelect={setDate} defaultMonth={month} today={today} />)}
<span className="text-sm text-muted-foreground" data-testid="single">{`선택: ${date ? date.toLocaleDateString("ko-KR") : "없음"}`}</span>
{showValue ? <span className="text-sm text-muted-foreground" data-testid="single">{`선택: ${date ? date.toLocaleDateString("ko-KR") : "없음"}`}</span> : null}
</div>
)
}
@@ -48,8 +49,8 @@ function TwoMonths() {
}
const sections = [
{ id: "single", label: "Single (today = 10/2, selected = 10/15)", node: <Single /> },
{ id: "disabled", label: "Disabled dates (before 10/5, Sundays)", node: <DisabledDates /> },
{ id: "single", label: "Single", node: <Single showValue={false} /> },
{ id: "disabled", label: "Disabled dates", node: <DisabledDates /> },
{ id: "range", label: "Range", node: <Range /> },
{ id: "months", label: "Two months", node: <TwoMonths /> },
]
@@ -69,12 +70,9 @@ export const All: Story = {
parameters: { layout: "fullscreen", controls: { disable: true } },
render: () => (
<StoryPage>
<StoryPageHeader
title="Calendar"
description="기본 locale 한국어 · 오늘은 2026-10-02로 고정"
/>
<StorySection title="Overview" description='mode="single"'>{board("single")}</StorySection>
<StorySection title="Variants" description='mode="range"와 여러 달 표시(numberOfMonths=2)입니다.'>{board("range", "months")}</StorySection>
<StoryPageHeader title="Calendar" />
<StorySection title="Overview">{board("single")}</StorySection>
<StorySection title="Variants">{board("range", "months")}</StorySection>
<StorySection title="States">{board("disabled")}</StorySection>
</StoryPage>
),