chore(web): 사용하지 않는 legacy 위젯 정리
This commit is contained in:
@@ -1,199 +0,0 @@
|
||||
'use client';
|
||||
|
||||
import { copy } from '@/shared/i18n';
|
||||
import { cn } from '@/shared/lib/cn';
|
||||
import {
|
||||
HUD_OPTION_CHEVRON,
|
||||
HUD_OPTION_ROW,
|
||||
HUD_OPTION_ROW_BREAK,
|
||||
HUD_OPTION_ROW_PRIMARY,
|
||||
HUD_REVEAL_BASE,
|
||||
HUD_REVEAL_HIDDEN,
|
||||
HUD_REVEAL_RETURN_BREAK,
|
||||
HUD_REVEAL_RETURN_FOCUS,
|
||||
HUD_RETURN_BODY,
|
||||
HUD_RETURN_TITLE,
|
||||
HUD_TRAY_CONTENT,
|
||||
HUD_TRAY_HAIRLINE_BREAK,
|
||||
HUD_TRAY_HAIRLINE,
|
||||
HUD_TRAY_LAYER_BREAK,
|
||||
HUD_TRAY_LAYER,
|
||||
HUD_TRAY_SHELL_BREAK,
|
||||
HUD_TRAY_SHELL,
|
||||
} from './overlayStyles';
|
||||
|
||||
interface ReturnPromptProps {
|
||||
open: boolean;
|
||||
mode: 'focus' | 'break';
|
||||
isBusy: boolean;
|
||||
onContinue: () => void;
|
||||
onRefocus: () => void;
|
||||
onRest?: () => void;
|
||||
onNextGoal?: () => void;
|
||||
onFinish: () => void;
|
||||
}
|
||||
|
||||
export const ReturnPrompt = ({
|
||||
open,
|
||||
mode,
|
||||
isBusy,
|
||||
onContinue,
|
||||
onRefocus,
|
||||
onRest,
|
||||
onNextGoal,
|
||||
onFinish,
|
||||
}: ReturnPromptProps) => {
|
||||
const isBreakReturn = mode === 'break';
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
HUD_REVEAL_BASE,
|
||||
open
|
||||
? isBreakReturn
|
||||
? HUD_REVEAL_RETURN_BREAK
|
||||
: HUD_REVEAL_RETURN_FOCUS
|
||||
: HUD_REVEAL_HIDDEN,
|
||||
)}
|
||||
aria-hidden={!open}
|
||||
>
|
||||
<section className={cn(isBreakReturn ? HUD_TRAY_SHELL_BREAK : HUD_TRAY_SHELL)}>
|
||||
<div aria-hidden className={isBreakReturn ? HUD_TRAY_LAYER_BREAK : HUD_TRAY_LAYER} />
|
||||
<div aria-hidden className={isBreakReturn ? HUD_TRAY_HAIRLINE_BREAK : HUD_TRAY_HAIRLINE} />
|
||||
|
||||
<div className={HUD_TRAY_CONTENT}>
|
||||
<p className={cn(
|
||||
'text-[11px] font-medium tracking-[0.12em]',
|
||||
isBreakReturn ? 'text-emerald-100/54' : 'text-white/42',
|
||||
)}>
|
||||
{copy.space.focusHud.returnPromptEyebrow}
|
||||
</p>
|
||||
<h3 className={cn(HUD_RETURN_TITLE, isBreakReturn ? 'text-white/96' : undefined)}>
|
||||
{isBreakReturn
|
||||
? copy.space.focusHud.returnPromptBreakTitle
|
||||
: copy.space.focusHud.returnPromptFocusTitle}
|
||||
</h3>
|
||||
<p className={cn(HUD_RETURN_BODY, isBreakReturn ? 'text-emerald-50/62' : undefined)}>
|
||||
{isBreakReturn
|
||||
? copy.space.focusHud.returnPromptBreakDescription
|
||||
: copy.space.focusHud.returnPromptFocusDescription}
|
||||
</p>
|
||||
|
||||
<div className="mt-5 space-y-2.5 border-t border-white/8 pt-4">
|
||||
{isBreakReturn ? (
|
||||
<>
|
||||
<button
|
||||
type="button"
|
||||
onClick={onRest}
|
||||
disabled={isBusy}
|
||||
className={cn(HUD_OPTION_ROW, HUD_OPTION_ROW_BREAK)}
|
||||
>
|
||||
<div className="min-w-0 max-w-[20.5rem]">
|
||||
<p className="text-[14px] font-semibold leading-[1.35] tracking-[-0.01em] text-white/92">
|
||||
{copy.space.focusHud.returnPromptRest}
|
||||
</p>
|
||||
<p className="mt-1.5 text-[12px] leading-[1.55] text-emerald-50/56">
|
||||
{copy.space.focusHud.returnPromptRestHint}
|
||||
</p>
|
||||
</div>
|
||||
<span aria-hidden className={cn(HUD_OPTION_CHEVRON, 'mt-[2px] text-emerald-100/34 group-hover:text-emerald-100/58')}>→</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={onNextGoal}
|
||||
disabled={isBusy}
|
||||
className={HUD_OPTION_ROW}
|
||||
>
|
||||
<div className="min-w-0 max-w-[20.5rem]">
|
||||
<p className="text-[14px] font-medium leading-[1.35] tracking-[-0.01em] text-white/82">
|
||||
{copy.space.focusHud.returnPromptNext}
|
||||
</p>
|
||||
<p className="mt-1.5 text-[12px] leading-[1.55] text-white/46">
|
||||
{copy.space.focusHud.returnPromptNextHint}
|
||||
</p>
|
||||
</div>
|
||||
<span aria-hidden className={cn(HUD_OPTION_CHEVRON, 'mt-[2px]')}>→</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={onRefocus}
|
||||
disabled={isBusy}
|
||||
className={HUD_OPTION_ROW}
|
||||
>
|
||||
<div className="min-w-0 max-w-[20.5rem]">
|
||||
<p className="text-[14px] font-medium leading-[1.35] tracking-[-0.01em] text-white/82">
|
||||
{copy.space.focusHud.returnPromptRefocus}
|
||||
</p>
|
||||
<p className="mt-1.5 text-[12px] leading-[1.55] text-white/46">
|
||||
{copy.space.focusHud.returnPromptRefocusHint}
|
||||
</p>
|
||||
</div>
|
||||
<span aria-hidden className={cn(HUD_OPTION_CHEVRON, 'mt-[2px]')}>→</span>
|
||||
</button>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<button
|
||||
type="button"
|
||||
onClick={onContinue}
|
||||
disabled={isBusy}
|
||||
className={cn(HUD_OPTION_ROW, HUD_OPTION_ROW_PRIMARY)}
|
||||
>
|
||||
<div className="min-w-0 max-w-[20.5rem]">
|
||||
<p className="text-[14px] font-semibold leading-[1.35] tracking-[-0.01em] text-white/92">
|
||||
{copy.space.focusHud.returnPromptContinue}
|
||||
</p>
|
||||
<p className="mt-1.5 text-[12px] leading-[1.55] text-white/48">
|
||||
{copy.space.focusHud.returnPromptContinueHint}
|
||||
</p>
|
||||
</div>
|
||||
<span aria-hidden className={cn(HUD_OPTION_CHEVRON, 'mt-[2px]')}>→</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={onRefocus}
|
||||
disabled={isBusy}
|
||||
className={HUD_OPTION_ROW}
|
||||
>
|
||||
<div className="min-w-0 max-w-[20.5rem]">
|
||||
<p className="text-[14px] font-medium leading-[1.35] tracking-[-0.01em] text-white/82">
|
||||
{copy.space.focusHud.returnPromptRefocus}
|
||||
</p>
|
||||
<p className="mt-1.5 text-[12px] leading-[1.55] text-white/46">
|
||||
{copy.space.focusHud.returnPromptRefocusHint}
|
||||
</p>
|
||||
</div>
|
||||
<span aria-hidden className={cn(HUD_OPTION_CHEVRON, 'mt-[2px]')}>→</span>
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="mt-4 border-t border-white/8 pt-3">
|
||||
<button
|
||||
type="button"
|
||||
onClick={onFinish}
|
||||
disabled={isBusy}
|
||||
className={cn(
|
||||
'text-[12px] font-medium tracking-[0.08em] underline underline-offset-4 transition-colors disabled:cursor-default disabled:no-underline',
|
||||
isBreakReturn
|
||||
? 'text-emerald-50/68 decoration-emerald-100/18 hover:text-emerald-50/92 hover:decoration-emerald-100/32 disabled:text-emerald-50/28'
|
||||
: 'text-white/58 decoration-white/12 hover:text-white/82 hover:decoration-white/24 disabled:text-white/26',
|
||||
)}
|
||||
>
|
||||
{copy.space.focusHud.returnPromptFinish}
|
||||
</button>
|
||||
<p
|
||||
className={cn(
|
||||
'mt-1.5 max-w-[20.5rem] text-[12px] leading-[1.55]',
|
||||
isBreakReturn ? 'text-emerald-50/46' : 'text-white/42',
|
||||
)}
|
||||
>
|
||||
{copy.space.focusHud.returnPromptFinishHint}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user