From ad23925ed54633d25df8412c377ad4db1b48ebe7 Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Tue, 7 Apr 2026 08:39:44 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=9E=85=EB=A0=A5=20=ED=94=84=EB=A6=AC?= =?UTF-8?q?=EB=AF=B8=ED=8B=B0=EB=B8=8C=20(TextInput=20/=20Textarea=20/=20S?= =?UTF-8?q?elect)=20+=20tsconfig=20=EB=B3=B4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UX/UI 개편 Phase A-6. 신규 컴포넌트 (lib/components/ui/) - TextInput.svelte: \$bindable value, label/error/hint, leading/trailing icon, \$props.id() 기반 SSR-safe 자동 id, aria-describedby 자동 연결. - Textarea.svelte: TextInput과 동일 구조 + autoGrow 옵션 (\$effect로 scrollHeight 동기화, maxRows 지원). - Select.svelte: 네이티브 + {#if placeholder} + + {/if} + {#each options as opt (opt.value)} + + {/each} + +
+ +
+ + + {#if error} +

{error}

+ {:else if hint} +

{hint}

+ {/if} + diff --git a/frontend/src/lib/components/ui/TextInput.svelte b/frontend/src/lib/components/ui/TextInput.svelte new file mode 100644 index 0000000..b3b10cb --- /dev/null +++ b/frontend/src/lib/components/ui/TextInput.svelte @@ -0,0 +1,115 @@ + + +
+ {#if label} + + {/if} + +
+ {#if LeadingIcon} +
+ +
+ {/if} + + + + {#if TrailingIcon} +
+ +
+ {/if} +
+ + {#if error} +

{error}

+ {:else if hint} +

{hint}

+ {/if} +
diff --git a/frontend/src/lib/components/ui/Textarea.svelte b/frontend/src/lib/components/ui/Textarea.svelte new file mode 100644 index 0000000..69bcfcf --- /dev/null +++ b/frontend/src/lib/components/ui/Textarea.svelte @@ -0,0 +1,105 @@ + + +
+ {#if label} + + {/if} + + + + {#if error} +

{error}

+ {:else if hint} +

{hint}

+ {/if} +
diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json new file mode 100644 index 0000000..8810c77 --- /dev/null +++ b/frontend/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": false, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": false + } +}