From f6b92d781a5584b5b9c1c66411f6230bd63a23f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=88=98=ED=98=84?= Date: Mon, 9 Nov 2026 15:33:23 +0900 Subject: [PATCH] style(storybook): refine form component stories --- .storybook/qa/STORY-INVENTORY.md | 10 ++- .storybook/qa/story-inventory.json | 66 +++++++++++++++++- docs/components/button.md | 2 +- docs/components/checkbox.md | 4 +- docs/components/label.md | 2 +- docs/components/radio-group.md | 2 +- docs/components/select.md | 2 +- docs/components/slider.md | 2 +- docs/components/switch.md | 2 +- docs/components/textarea.md | 8 +-- docs/components/toggle-group.md | 2 +- docs/components/toggle.md | 2 +- src/components/button.stories.tsx | 89 ++++++++++++++++++++----- src/components/checkbox.stories.tsx | 69 ++++++++++--------- src/components/input.stories.tsx | 7 +- src/components/label.stories.tsx | 57 ++++++++++------ src/components/radio-group.stories.tsx | 51 +++++++++++--- src/components/select.stories.tsx | 41 +++++++++--- src/components/slider.stories.tsx | 33 ++++++--- src/components/switch.stories.tsx | 34 ++++++---- src/components/textarea.stories.tsx | 57 +++++++++++----- src/components/toggle-group.stories.tsx | 73 ++++++++++++-------- src/components/toggle.stories.tsx | 38 ++++++++--- 23 files changed, 471 insertions(+), 182 deletions(-) diff --git a/.storybook/qa/STORY-INVENTORY.md b/.storybook/qa/STORY-INVENTORY.md index 8a94d23..711faa2 100644 --- a/.storybook/qa/STORY-INVENTORY.md +++ b/.storybook/qa/STORY-INVENTORY.md @@ -7,15 +7,15 @@ This is a classification record. No Story IDs, exports or titles are renamed. HI ## Summary - PRIMARY: 82 -- VERIFICATION: 252 +- VERIFICATION: 256 - UTILITY: 38 - LEGACY / DUPLICATE: 0 - KEEP: 82 -- HIDE: 290 +- HIDE: 294 - MERGE_CANDIDATE: 33 - DELETE_CANDIDATE: 0 - Story files: 82 -- Stories: 372 +- Stories: 376 - Hierarchy: Foundation → Components → Patterns → Center Graphic → Theme ## Full inventory @@ -171,6 +171,7 @@ Source: `src/components/checkbox.stories.tsx`; meta.tags: [] - Indeterminate — Indeterminate; tags: ["verification"]; VERIFICATION; HIDE. Keep direct URL and tag-filter access; excluded from default sidebar. - Disabled — Disabled; tags: ["verification"]; VERIFICATION; HIDE; MERGE_CANDIDATE. Representative board may cover the same specimen; keep direct QA until behavioral equivalence is reviewed. - Error — Error; tags: ["verification"]; VERIFICATION; HIDE. Keep direct URL and tag-filter access; excluded from default sidebar. +- LongLabel — Long Label; tags: ["verification"]; VERIFICATION; HIDE. Keep direct URL and tag-filter access; excluded from default sidebar. - Playground — Playground; tags: ["verification"]; UTILITY; HIDE. Keep direct URL and tag-filter access; excluded from default sidebar. ### Components/Disclosure/Collapsible @@ -467,6 +468,8 @@ Source: `src/components/textarea.stories.tsx`; meta.tags: [] - InvalidFocus — Invalid Focus; tags: ["verification","play-fn"]; VERIFICATION; HIDE. Keep direct URL and tag-filter access; excluded from default sidebar. - ErrorMessage — Error Message; tags: ["verification"]; VERIFICATION; HIDE. Keep direct URL and tag-filter access; excluded from default sidebar. - Required — Required; tags: ["verification"]; VERIFICATION; HIDE. Keep direct URL and tag-filter access; excluded from default sidebar. +- Multiline — Multiline · Wrap; tags: ["verification"]; VERIFICATION; HIDE. Keep direct URL and tag-filter access; excluded from default sidebar. +- ResizeNone — Resize · none; tags: ["verification"]; VERIFICATION; HIDE. Keep direct URL and tag-filter access; excluded from default sidebar. - Readonly — Readonly; tags: ["verification"]; VERIFICATION; HIDE. Keep direct URL and tag-filter access; excluded from default sidebar. - Disabled — Disabled; tags: ["verification"]; VERIFICATION; HIDE; MERGE_CANDIDATE. Representative board may cover the same specimen; keep direct QA until behavioral equivalence is reviewed. - LongContent — Long Content; tags: ["verification"]; VERIFICATION; HIDE. Keep direct URL and tag-filter access; excluded from default sidebar. @@ -480,6 +483,7 @@ Source: `src/components/toggle-group.stories.tsx`; meta.tags: [] - SingleSelection — Single; tags: ["verification"]; VERIFICATION; HIDE. Keep direct URL and tag-filter access; excluded from default sidebar. - MultipleSelection — Multiple; tags: ["verification"]; VERIFICATION; HIDE. Keep direct URL and tag-filter access; excluded from default sidebar. - VerticalGroup — Vertical; tags: ["verification"]; VERIFICATION; HIDE. Keep direct URL and tag-filter access; excluded from default sidebar. +- ManyOptions — Many Options; tags: ["verification"]; VERIFICATION; HIDE. Keep direct URL and tag-filter access; excluded from default sidebar. - ContentNodes — Content Nodes; tags: ["verification"]; VERIFICATION; HIDE. Keep direct URL and tag-filter access; excluded from default sidebar. ### Components/Form/Toggle diff --git a/.storybook/qa/story-inventory.json b/.storybook/qa/story-inventory.json index 65a1f54..e84c2f0 100644 --- a/.storybook/qa/story-inventory.json +++ b/.storybook/qa/story-inventory.json @@ -1,16 +1,16 @@ { "summary": { "storyFiles": 82, - "stories": 372, + "stories": 376, "categories": { "PRIMARY": 82, - "VERIFICATION": 252, + "VERIFICATION": 256, "UTILITY": 38, "LEGACY / DUPLICATE": 0 }, "decisions": { "KEEP": 82, - "HIDE": 290, + "HIDE": 294, "MERGE_CANDIDATE": 33, "DELETE_CANDIDATE": 0 }, @@ -1061,6 +1061,21 @@ "candidate": null, "reason": "Keep direct URL and tag-filter access; excluded from default sidebar." }, + { + "id": "components-form-checkbox--long-label", + "exportName": "LongLabel", + "name": "Long Label", + "storyTags": [ + "verification" + ], + "effectiveTags": [ + "verification" + ], + "category": "VERIFICATION", + "decision": "HIDE", + "candidate": null, + "reason": "Keep direct URL and tag-filter access; excluded from default sidebar." + }, { "id": "components-form-checkbox--playground", "exportName": "Playground", @@ -3384,6 +3399,36 @@ "candidate": null, "reason": "Keep direct URL and tag-filter access; excluded from default sidebar." }, + { + "id": "components-form-textarea--multiline", + "exportName": "Multiline", + "name": "Multiline · Wrap", + "storyTags": [ + "verification" + ], + "effectiveTags": [ + "verification" + ], + "category": "VERIFICATION", + "decision": "HIDE", + "candidate": null, + "reason": "Keep direct URL and tag-filter access; excluded from default sidebar." + }, + { + "id": "components-form-textarea--resize-none", + "exportName": "ResizeNone", + "name": "Resize · none", + "storyTags": [ + "verification" + ], + "effectiveTags": [ + "verification" + ], + "category": "VERIFICATION", + "decision": "HIDE", + "candidate": null, + "reason": "Keep direct URL and tag-filter access; excluded from default sidebar." + }, { "id": "components-form-textarea--readonly", "exportName": "Readonly", @@ -3507,6 +3552,21 @@ "candidate": null, "reason": "Keep direct URL and tag-filter access; excluded from default sidebar." }, + { + "id": "components-form-toggle-group--many-options", + "exportName": "ManyOptions", + "name": "Many Options", + "storyTags": [ + "verification" + ], + "effectiveTags": [ + "verification" + ], + "category": "VERIFICATION", + "decision": "HIDE", + "candidate": null, + "reason": "Keep direct URL and tag-filter access; excluded from default sidebar." + }, { "id": "components-form-toggle-group--content-nodes", "exportName": "ContentNodes", diff --git a/docs/components/button.md b/docs/components/button.md index 281502f..94a2343 100644 --- a/docs/components/button.md +++ b/docs/components/button.md @@ -150,7 +150,7 @@ CVA 구조, `data-slot`, `asChild`(Radix `Slot`), `className` 확장, focus-visi ## 11. Storybook - 대표 Story `All`("Button")이 기본 sidebar의 유일한 Button 항목이다 → 1뎁스. -- `All`의 구역: Overview → Sizes → Variants → States. 기본 버튼·크기·허용 조합·Brand/Standard 상태를 보여준다. Red Solid와 Outline은 Variants와 Standard States에도 포함되며, 삭제·취소 세트와 Long Label은 verification Story에서 따로 확인한다. +- `All`의 구역: Sizes → Variants → States(2026-11-09 Overview 제거; 단독 Overview 버튼은 Sizes의 Brand Medium과 같아 통합). 기본 버튼·크기·허용 조합·Brand/Standard 상태를 보여준다. Red Solid와 Outline은 Variants와 Standard States에도 포함되며, 삭제·취소 세트와 Long Label은 verification Story에서 따로 확인한다. PC에서는 Sizes·Variants가 같은 3열(Brand / Standard Solid / Standard Outline)을 쓰고 States의 Solid·Outline 표는 좌우 2열이다. - verification(`tags: ["verification"]`, 기본 sidebar 제외): `Roles`, `Sizes`, `States`("Brand States"), `StandardStates`, `LongLabel`, `KoreanLabels`, `IconTextNarrow`, `Destructive`, `Playground`(HM 전용), `Compatibility`(ghost/link, default/outline 별칭). Controls는 조합별 선택을 제한하지 않으므로 §6.1의 허용 조합을 직접 지킨다. Verification은 기술 점검용이며 운영 화면의 사용 위치·세트 규칙은 §5가 우선한다. - 대표 경로/ID: `Components/Form/Button → All` (`components-form-button--all`), `Components/Overlay/Dialog → All` (`components-overlay-dialog--all`), `Components/Overlay/Alert Dialog → All` (`components-overlay-alert-dialog--all`), `Patterns/Data/Filter Bar → Filter Bar` (`patterns-data-filter-bar--all`). 삭제 세트 점검 ID는 `components-form-button--destructive`(verification)다. - 운영 규칙은 `프로젝트-지침.md` §6.3, §7 참조. diff --git a/docs/components/checkbox.md b/docs/components/checkbox.md index b7b1bc8..f837ade 100644 --- a/docs/components/checkbox.md +++ b/docs/components/checkbox.md @@ -100,8 +100,8 @@ Radix 구조·ARIA(`role=checkbox`, `aria-checked`)·키보드, `data-slot`, `cn ## 9. Storybook -- 대표 Story `All`("Checkbox"): `unchecked`, `checked`, `indeterminate`, `hover`, `focus`, `error`, `disabled`, `long`. Focus는 `play`로 실제 focus. `indeterminate`는 controlled 예시를 겸해 클릭하면 checked가 된다(Radix, 2026-10-22 별도 `interactive` 구역 통합). `hover`는 Unchecked·Checked를 Storybook 전용 `data-sb-hover`(`.storybook/pseudo-states.ts`)로 고정해 보여 준다. Checkbox API가 아니며 소비 코드에 붙이지 않는다. -- verification: `Unchecked`, `Checked`, `Indeterminate`, `Disabled`, `Error`, `Playground`. +- 대표 Story `All`("Checkbox"): States `unchecked`, `checked`, `indeterminate`, `hover`, `focus`, `disabled`(PC 3열 × 2행)와 Validation `error`. Overview·Usage 구역은 2026-11-09에 없앴고 `long`(Long Label) 예시는 숨김 verification Story `LongLabel`로 옮겼다. 옵션 Label은 Story에서만 `--hm-label-text`를 `--foreground`로 덮어 기본 텍스트 색으로 보이며(공용 Label은 그대로, 비활성 Checkbox 옆 Label은 `peer-disabled`로 보조색 유지), 예시 제목은 보조색이다. Focus는 `play`로 실제 focus. `indeterminate`는 controlled 예시를 겸해 클릭하면 checked가 된다(Radix, 2026-10-22 별도 `interactive` 구역 통합). `hover`는 Unchecked·Checked를 Storybook 전용 `data-sb-hover`(`.storybook/pseudo-states.ts`)로 고정해 보여 준다. Checkbox API가 아니며 소비 코드에 붙이지 않는다. +- verification: `Unchecked`, `Checked`, `Indeterminate`, `Disabled`, `Error`, `LongLabel`("Long Label"), `Playground`. ## 10. 사용자 확정 결정 diff --git a/docs/components/label.md b/docs/components/label.md index da2127e..dfb0e96 100644 --- a/docs/components/label.md +++ b/docs/components/label.md @@ -88,7 +88,7 @@ Radix Label 동작·접근성, `data-slot`, `cn(..., className)`, `select-none`, ## 9. Storybook -- 대표 Story `All`("Label"): 구역 `default`(htmlFor), `required`(소비 조합), `disabled`, `long`. +- 대표 Story `All`("Label"): States(`default`(htmlFor), `disabled`)와 Usage(`select`(부서 선택), `required`(소비 조합), `long`)(2026-11-09 Overview 제거). - 별도 verification Story 없음(구역이 단순). ## 10. 사용자 확정 결정 diff --git a/docs/components/radio-group.md b/docs/components/radio-group.md index d207cc1..d6fe9ce 100644 --- a/docs/components/radio-group.md +++ b/docs/components/radio-group.md @@ -57,7 +57,7 @@ shadcn `size-4 border-input text-primary shadow-xs dark:` class 제거 → theme ## 9. Storybook -대표 Story `All`: `vertical`, `horizontal`, `hover`, `focus`, `error`, `disabled-item`, `disabled-group`. Focus는 `play`로 실제 focus. `hover`는 첫 항목을 Storybook 전용 `data-sb-hover`로 고정해 보여 주며 RadioGroupItem API가 아니다. verification: `Vertical`, `Horizontal`, `Disabled`, `Error`. +대표 Story `All`: Variants(`vertical`, `horizontal`; 2026-11-09 Overview 제거로 Vertical이 Variants 첫 항목), States(`hover`, `focus`, `disabled-item`, `disabled-group`), Validation(`error`). Focus는 `play`로 실제 focus. `hover`는 첫 항목을 Storybook 전용 `data-sb-hover`로 고정해 보여 주며 RadioGroupItem API가 아니다. verification: `Vertical`, `Horizontal`, `Disabled`, `Error`. ## 10. 사용자 확정 결정 diff --git a/docs/components/select.md b/docs/components/select.md index 6a0052d..165e889 100644 --- a/docs/components/select.md +++ b/docs/components/select.md @@ -98,7 +98,7 @@ Radix Root/Trigger/Portal/Content/Viewport/Item/ItemText 구조, 키보드 조 ## 9. Storybook -- 대표 Story `All`("Select"): Sizes(Medium / Large 비교, 각 Trigger로 실제 목록 열기) → States(`selected`, `disabled`, `disabled-placeholder`) → Invalid / Focus(`invalid`, `invalid-disabled`). 2026-10-22 Overview의 `default`·로드 시 열린 `open` 예시는 대표 화면에서 뺐다. 열린 목록은 숨김 `Open`, 크기별 수치 목록은 숨김 `Sizes`("Compare Sizes")에서 확인한다. size 생략 시 Large(§5)는 그대로다. +- 대표 Story `All`("Select"): Sizes(Medium / Large 비교, 각 Trigger로 실제 목록 열기) → States(`selected`, `disabled`, `disabled-placeholder`) → Validation(`invalid`, `invalid-disabled`; 2026-11-09 `Invalid / Focus`에서 제목 변경, Focus 예시가 없다). PC에서는 세 구역이 같은 3열 칸을 쓰고 Sizes·Validation은 첫 두 칸만 채운다. 2026-10-22 Overview의 `default`·로드 시 열린 `open` 예시는 대표 화면에서 뺐다. 열린 목록은 숨김 `Open`, 크기별 수치 목록은 숨김 `Sizes`("Compare Sizes")에서 확인한다. size 생략 시 Large(§5)는 그대로다. - verification(`tags: ["verification"]`): `Default`, `Open`, `Selected`, `Disabled`, `Sizes`("Compare Sizes"), `Medium`, `Large`, `LongContent`, `Scroll`, `Playground`(HM 전용). - `Disabled` Story 구성: Trigger 비활성 상태들(placeholder 포함). - `InvalidFocus` verification Story: 앞/뒤 버튼 사이의 Invalid Trigger와 Disabled Invalid Trigger. Tab / Shift+Tab, Enter / Space, Escape 및 focus return을 실제 키보드로 확인한다. diff --git a/docs/components/slider.md b/docs/components/slider.md index 804a2b7..a0ea50c 100644 --- a/docs/components/slider.md +++ b/docs/components/slider.md @@ -74,7 +74,7 @@ Radix 구조·동작(pointer drag, track 클릭 이동, 키보드, thumb 정렬/ ## 9. Storybook -- 대표 Story `All`("Slider"): Single(값 label), Range(두 thumb, `minStepsBetweenThumbs` 5), Step(25), Disabled, Vertical을 한 페이지에 둔다. 값 label은 Story 조합(local state)이다. +- 대표 Story `All`("Slider"): Variants(Single, Range(두 thumb, `minStepsBetweenThumbs` 5), Step(25), Vertical)와 States(Disabled) 두 구역으로 둔다(2026-11-09 Overview 제거, PC 4열). 값 label은 Story 조합(local state)이다. - verification: `Single`, `Range`, `Disabled`, `Focus`(실제 thumb focus). 기본 Sidebar에서 숨긴다. ## 10. 사용자 확정 결정 diff --git a/docs/components/switch.md b/docs/components/switch.md index f73be9a..286d2e6 100644 --- a/docs/components/switch.md +++ b/docs/components/switch.md @@ -56,7 +56,7 @@ shadcn의 `h-[1.15rem] w-8`, `border`, `shadow-xs`, `dark:` class 제거 → the ## 9. Storybook -대표 Story `All`: `off`, `on`, `hover`, `focus`, `disabled`(2026-10-22 `interactive` 구역 제거, 모든 예시가 실제 클릭으로 토글). `hover`는 Off·On을 Storybook 전용 `data-sb-hover`로 고정해 보여 주며 Switch API가 아니다. Focus는 `play`로 실제 focus. verification: `Off`, `On`, `Disabled`. +대표 Story `All`: States 한 구역에 `off`, `on`, `hover`, `focus`, `disabled`(2026-11-09 Overview 제거, PC 5열; 2026-10-22 `interactive` 구역 제거, 모든 예시가 실제 클릭으로 토글). `hover`는 Off·On을 Storybook 전용 `data-sb-hover`로 고정해 보여 주며 Switch API가 아니다. Focus는 `play`로 실제 focus. verification: `Off`, `On`, `Disabled`. ## 10. 사용자 확정 결정 diff --git a/docs/components/textarea.md b/docs/components/textarea.md index 6c4865d..d5cc7d6 100644 --- a/docs/components/textarea.md +++ b/docs/components/textarea.md @@ -86,8 +86,8 @@ native `