feat: shared/ui 공통 컴포넌트 3종 구현 (Indicator, OptionItem, NumberField) - #30
Open
thwjddlqslek wants to merge 9 commits into
Open
feat: shared/ui 공통 컴포넌트 3종 구현 (Indicator, OptionItem, NumberField)#30thwjddlqslek wants to merge 9 commits into
thwjddlqslek wants to merge 9 commits into
Conversation
폴더/파일 네이밍, 배럴 구조, default export + named 재노출, forwardRef 미사용, rem 임의값 표기, convenience prop 기준을 고정한다. CONTEXT.md 용어집에도 Indicator, OptionItem, TextField를 추가한다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014h9xQjVqHusEmVuiNyVACt
온보딩 단계 진행 표시. 세그먼트가 컨테이너 폭을 균등 분할하고, role="progressbar" + aria-valuenow/min/max로 진행 상태를 노출한다. current=0은 아직 시작 전이라 아무 칸도 채우지 않는다. Figma: 482:7011 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014h9xQjVqHusEmVuiNyVACt
원형 이미지 + 라벨 선택 아이템. <button type="button"> + aria-pressed이고, 선택 상태는 부모가 소유한다. 이미지는 장식이라 alt=""로 두고, imageSrc가 없으면 플레이스홀더를 보여준다. hover/pressed/selected가 같은 색 오버레이를 공유하고 selected만 테두리가 추가된다. Figma: 452:5885 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014h9xQjVqHusEmVuiNyVACt
TextField는 코드 위치만 잡아두고 구현 예정으로 표기한다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014h9xQjVqHusEmVuiNyVACt
3 tasks
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
숫자 전용 입력 필드. suffix prop으로 단위(cm, kg 등) 표시, error prop으로 외부에서 에러 상태 제어 (blur 시 판단은 사용처에서). ghost span으로 value + suffix를 하나의 덩어리로 center 정렬. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
aria-label을 외부에서 주입할 수 있도록 label prop 추가 (기본값 "진행 단계"). gap/height 임의값을 디자인 토큰 기반 클래스로 교체. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
label prop을 alt로 변경해 이미지 대체 텍스트 의도를 명확히 함. aria-label에도 alt를 사용해 접근성 보강. 라벨 텍스트 span 제거 — 이미지만 표시하는 구조로 단순화. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
onKeyDown은 붙여넣기·IME·드래그앤드롭을 막지 못한다. 모든 입력 경로가 거치는 onChange에서 /\D/g replace로 처리. 외부 onChange prop은 필터링 후 그대로 호출된다. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
thwjddlqslek
marked this pull request as ready for review
August 11, 2026 04:17
sohxxny
reviewed
Aug 11, 2026
| {Array.from({ length: total }, (_, index) => ( | ||
| <span | ||
| key={index} | ||
| className={cn("h-1 flex-1", index < filled ? "bg-bg-inverse" : "bg-bg-muted")} |
Member
There was a problem hiding this comment.
bg-muted는 gray-97인데 디자인 스펙 보면 gray-96이어야 합니당
그리고 막대끼리 gap이 10px이라서 gap-5가 아니라 gap-2.5가 되어야 해요!!
Member
There was a problem hiding this comment.
디자인 시안과 다른 부분이 있어 말씀 드립니당
- input 폰트는
title-1-emphasized입니다! - suffix는 타이포가
typo-headline-regular이고, input과 suffix의 gap이8px이라서ml-3으로 해야합니다! - 입력 박스만 봤을 때 높이가
82px이어야 하고, radius 값이20px이어야 합니다! - placeholder가
gray-95여야 하고, 아무 값도 입력되지 않았을 때 suffix도 같은 값이 되어야 합니다! - input과 suffix가 중앙 정렬이 아닌 하단 정렬이 되어야 합니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/shared/ui가 비어 있던 상태에서 Figma 기반 공통 컴포넌트 3종을 구현한다.여기서 정한 폴더 구조·작성 방식이 이후 모든 공통 컴포넌트의 기준이 되므로
ADR-0001로 같이 고정했다.
Related Issues
PR Point (To Reviewer)
컴포넌트
Indicator— 온보딩 단계 진행 표시. 세그먼트가 컨테이너 폭을 균등 분할합니다.role="progressbar"+aria-valuenow/min/max.labelprop으로 스크린리더 텍스트 주입 가능.OptionItem— 원형 이미지 선택 아이템.<button type="button">+aria-pressed.alt가 이미지 대체 텍스트 겸 aria-label. 선택 상태는 부모가 소유, 나열 컨테이너는 쓰는 쪽(feature)에서 만듭니다.NumberField(Figma 명칭 "text field"에서 숫자 전용임을 명확히 하기 위해 변경) — 숫자 전용 단일 라인 입력 필드.suffix로 단위 표시,errorprop으로 외부에서 에러 상태 제어. ghost span으로 value + suffix를 하나의 덩어리로 center 정렬.너비는 부모 컨테이너를 따릅니다(
w-full).onChange내부에서 숫자 외 문자를 필터링해 붙여넣기·IME·드래그앤드롭 등 모든 입력 경로를 커버.리뷰 포인트
OptionItem의 hover / pressed / selected가 같은 색 오버레이를 공유합니다.bg-accent-base/20하나로 세 상태를 처리하고,selected만ring-2 ring-accent-base가 추가됩니다.className은 세 컴포넌트 모두 루트 엘리먼트로 갑니다.Screenshot
ETC
docs/adr/0001-shared-ui-component-convention.md신규 — 폴더 구조, default export + 배럴 재노출, forwardRef 미사용, rem 임의값 표기, convenience prop 기준docs/design/design-system.mdFigma ↔ 코드 대응표,CONTEXT.md용어집에 3종 반영styles/tokens/*.css의 기존 토큰만 사용