style(space-setup): 리추얼 톤의 드로어 카피와 입력 흐름으로 정리
맥락: - /space Setup Drawer가 설정 패널처럼 보여 프리미엄 라운지 톤이 약했습니다. - 첫 진입에서 사용자가 설명보다 리추얼 흐름으로 행동하도록 시각 계층을 조정할 필요가 있었습니다. 변경사항: - Setup Drawer 헤더 카피를 감성 톤으로 교체하고 섹션 레이블을 자연어 중심으로 정리했습니다. - Space 썸네일 카드에 텍스트 전용 하단 그라데이션을 적용하고 선택 테두리/글로우를 은은하게 낮췄습니다. - Goal 입력 라벨을 한 조각 중심 카피로 변경하고 보조 힌트를 추가했습니다. - Goal 추천 칩을 기본 4개 + 더보기 토글로 바꿔 부담을 줄였습니다. - Sound 프리셋을 무거운 버튼형에서 가벼운 pill 칩형으로 정리했습니다. - Goal 미입력 시 시작 버튼 상단에 상태 안내 문구를 추가했습니다. 검증: - npx tsc --noEmit - npm run build 세션-상태: Setup Drawer가 설정 패널보다 입장 의식 흐름에 맞는 톤으로 정리되었습니다. 세션-다음: 실제 화면 확인 후 타이포/간격 미세 조정 여부를 판단합니다. 세션-리스크: 더보기 토글 상태는 현재 세션 동안만 유지됩니다.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { useMemo, useState } from 'react';
|
||||
import type { GoalChip } from '@/entities/session';
|
||||
import { cn } from '@/shared/lib/cn';
|
||||
|
||||
@@ -16,11 +19,21 @@ export const SessionGoalField = ({
|
||||
onGoalChange,
|
||||
onGoalChipSelect,
|
||||
}: SessionGoalFieldProps) => {
|
||||
const [expanded, setExpanded] = useState(false);
|
||||
|
||||
const visibleChips = useMemo(() => {
|
||||
if (expanded) {
|
||||
return goalChips;
|
||||
}
|
||||
|
||||
return goalChips.slice(0, 4);
|
||||
}, [expanded, goalChips]);
|
||||
|
||||
return (
|
||||
<div className="space-y-2.5">
|
||||
<div className="space-y-1.5">
|
||||
<label htmlFor="space-goal-input" className="text-xs font-medium text-white/86">
|
||||
목표 <span className="text-sky-100">(필수)</span>
|
||||
이번 25분, 딱 한 가지 <span className="text-sky-100">(필수)</span>
|
||||
</label>
|
||||
<input
|
||||
id="space-goal-input"
|
||||
@@ -29,10 +42,11 @@ export const SessionGoalField = ({
|
||||
placeholder="예: 계약서 1페이지 정리"
|
||||
className="h-11 w-full rounded-xl border border-white/18 bg-slate-950/48 px-3 text-sm text-white placeholder:text-white/42 focus:border-sky-200/58 focus:outline-none"
|
||||
/>
|
||||
<p className="text-[11px] text-white/54">크게 말고, 바로 다음 한 조각.</p>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap gap-1.5">
|
||||
{goalChips.map((chip) => {
|
||||
{visibleChips.map((chip) => {
|
||||
const selected = chip.id === selectedGoalId;
|
||||
|
||||
return (
|
||||
@@ -41,16 +55,26 @@ export const SessionGoalField = ({
|
||||
type="button"
|
||||
onClick={() => onGoalChipSelect(chip)}
|
||||
className={cn(
|
||||
'rounded-full border px-2.5 py-1 text-xs transition-colors',
|
||||
'rounded-full border px-2.5 py-1 text-[11px] transition-colors',
|
||||
selected
|
||||
? 'border-sky-200/56 bg-sky-200/20 text-sky-50'
|
||||
: 'border-white/18 bg-white/8 text-white/76 hover:bg-white/14',
|
||||
? 'border-sky-200/42 bg-sky-200/16 text-white/92'
|
||||
: 'border-white/16 bg-white/6 text-white/72 hover:bg-white/11',
|
||||
)}
|
||||
>
|
||||
{chip.label}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
|
||||
{goalChips.length > 4 ? (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setExpanded((current) => !current)}
|
||||
className="rounded-full border border-white/14 bg-white/4 px-2.5 py-1 text-[11px] text-white/62 transition-colors hover:bg-white/10 hover:text-white/82"
|
||||
>
|
||||
{expanded ? '접기' : '+ 더보기'}
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -26,21 +26,21 @@ export const SpaceSelectCarousel = ({
|
||||
className={cn(
|
||||
'group relative h-24 min-w-[138px] overflow-hidden rounded-xl border text-left sm:min-w-[148px]',
|
||||
selected
|
||||
? 'border-sky-200/62 shadow-[0_0_0_1px_rgba(186,230,253,0.4),0_0_18px_rgba(56,189,248,0.22)]'
|
||||
: 'border-white/18 hover:border-white/32',
|
||||
? 'border-sky-200/38 shadow-[0_0_0_1px_rgba(186,230,253,0.2),0_0_10px_rgba(56,189,248,0.12)]'
|
||||
: 'border-white/16 hover:border-white/24',
|
||||
)}
|
||||
style={getRoomCardBackgroundStyle(room)}
|
||||
aria-label={`${room.name} 선택`}
|
||||
>
|
||||
<span className="absolute inset-0 bg-[linear-gradient(180deg,rgba(2,6,23,0.12)_0%,rgba(2,6,23,0.76)_100%)]" />
|
||||
<span className="absolute inset-x-0 bottom-0 h-[56%] bg-[linear-gradient(180deg,rgba(2,6,23,0)_0%,rgba(2,6,23,0.2)_52%,rgba(2,6,23,0.24)_100%)]" />
|
||||
{selected ? (
|
||||
<span className="absolute right-2 top-2 inline-flex h-5 w-5 items-center justify-center rounded-full border border-sky-200/64 bg-sky-200/24 text-[10px] font-semibold text-sky-50">
|
||||
✓
|
||||
</span>
|
||||
) : null}
|
||||
<div className="absolute inset-x-2 bottom-2">
|
||||
<p className="truncate text-sm font-semibold text-white">{room.name}</p>
|
||||
<p className="truncate text-[11px] text-white/72">{room.vibeLabel}</p>
|
||||
<p className="truncate text-sm font-semibold text-white/96">{room.name}</p>
|
||||
<p className="truncate text-[11px] text-white/66">{room.vibeLabel}</p>
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
|
||||
@@ -46,29 +46,34 @@ export const SpaceSetupDrawerWidget = ({
|
||||
return (
|
||||
<SpaceSideSheet
|
||||
open={open}
|
||||
title="Setup"
|
||||
subtitle="공간을 고르고, 한 줄 목표를 적어주세요."
|
||||
title="오늘은 한 조각만."
|
||||
subtitle="공간을 고르고, 한 줄 목표를 적으면 시작돼요."
|
||||
onClose={onClose}
|
||||
dismissible={dismissible}
|
||||
widthClassName="w-[min(360px,94vw)]"
|
||||
footer={(
|
||||
<div className="space-y-2">
|
||||
{!canStart ? (
|
||||
<p className="text-[11px] text-white/58">목표를 적으면 시작할 수 있어요.</p>
|
||||
) : null}
|
||||
<Button
|
||||
type="button"
|
||||
size="full"
|
||||
onClick={onStart}
|
||||
disabled={!canStart}
|
||||
className={cn(
|
||||
'h-11 rounded-xl !bg-sky-300/85 !text-slate-900 shadow-[0_10px_24px_rgba(125,211,252,0.26)] hover:!bg-sky-300 disabled:!bg-white/12 disabled:!text-white/42',
|
||||
'h-11 rounded-xl !bg-sky-300/85 !text-slate-900 shadow-[0_8px_20px_rgba(125,211,252,0.24)] hover:!bg-sky-300 disabled:!bg-white/12 disabled:!text-white/42',
|
||||
)}
|
||||
>
|
||||
시작하기
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
>
|
||||
<div className="space-y-5">
|
||||
<section className="space-y-2.5">
|
||||
<div className="space-y-0.5">
|
||||
<p className="text-[11px] uppercase tracking-[0.16em] text-white/55">1) Space</p>
|
||||
<p className="text-sm font-medium text-white/84">공간</p>
|
||||
</div>
|
||||
<SpaceSelectCarousel
|
||||
rooms={rooms}
|
||||
@@ -79,7 +84,7 @@ export const SpaceSetupDrawerWidget = ({
|
||||
|
||||
<section className="space-y-2.5">
|
||||
<div className="space-y-0.5">
|
||||
<p className="text-[11px] uppercase tracking-[0.16em] text-white/55">2) Goal</p>
|
||||
<p className="text-sm font-medium text-white/84">이번 세션 한 줄(필수)</p>
|
||||
</div>
|
||||
<SessionGoalField
|
||||
goalInput={goalInput}
|
||||
@@ -92,10 +97,10 @@ export const SpaceSetupDrawerWidget = ({
|
||||
|
||||
<section className="space-y-2.5">
|
||||
<div className="space-y-0.5">
|
||||
<p className="text-[11px] uppercase tracking-[0.16em] text-white/55">3) Sound</p>
|
||||
<p className="text-sm font-medium text-white/84">분위기(선택)</p>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
<div className="flex flex-wrap gap-1.5">
|
||||
{soundPresets.map((preset) => {
|
||||
const selected = preset.id === selectedSoundPresetId;
|
||||
|
||||
@@ -105,10 +110,10 @@ export const SpaceSetupDrawerWidget = ({
|
||||
type="button"
|
||||
onClick={() => onSoundSelect(preset.id)}
|
||||
className={cn(
|
||||
'rounded-xl border px-3 py-2 text-left text-xs transition-colors',
|
||||
'rounded-full border px-2.5 py-1 text-[11px] transition-colors',
|
||||
selected
|
||||
? 'border-sky-200/64 bg-sky-200/20 text-sky-50'
|
||||
: 'border-white/18 bg-white/8 text-white/78 hover:bg-white/14',
|
||||
? 'border-sky-200/36 bg-sky-200/14 text-white/92'
|
||||
: 'border-white/16 bg-white/6 text-white/72 hover:bg-white/11',
|
||||
)}
|
||||
>
|
||||
{preset.label}
|
||||
|
||||
Reference in New Issue
Block a user