From 8e873714b619ea02ce580894f3c796a96d44ddfa Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Thu, 1 Oct 2026 12:11:29 +0900 Subject: [PATCH] =?UTF-8?q?261001=5F01=5FENH:=20mms=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EB=AF=B8=EB=A6=AC=EB=B3=B4=EA=B8=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- .../components/kri-editor/KriEditorSms.tsx | 18 ++++++++++++++---- registry/components/kri-editor/types.ts | 9 +++++++++ 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 249cf51..ad945c4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kri-ui-registry", - "version": "0.12.0", + "version": "0.13.0", "private": true, "description": "KRI internal shadcn UI registry", "scripts": { diff --git a/registry/components/kri-editor/KriEditorSms.tsx b/registry/components/kri-editor/KriEditorSms.tsx index ad913af..0b40870 100644 --- a/registry/components/kri-editor/KriEditorSms.tsx +++ b/registry/components/kri-editor/KriEditorSms.tsx @@ -27,6 +27,8 @@ export function KriEditorSms({ smsMaxBytes = 90, lmsMaxBytes = 2000, smsPreviewSuffix = '', + smsHasAttachment = false, + smsImages = [], }: SmsEditorProps) { const [text, setText] = React.useState(value || '') const textareaRef = React.useRef(null) @@ -36,7 +38,7 @@ export function KriEditorSms({ const textareaInsert = useTextareaInsert(textareaRef) const previewText = smsPreviewSuffix ? `${text}\n${smsPreviewSuffix}` : text const byteSize = React.useMemo(() => calculateBytes(previewText), [previewText]) - const messageType: 'SMS' | 'LMS' = byteSize > smsMaxBytes || Boolean(smsTitle) ? 'LMS' : 'SMS' + const messageType: 'SMS' | 'LMS' = byteSize > smsMaxBytes || Boolean(smsTitle) || smsHasAttachment ? 'LMS' : 'SMS' const maxBytes = messageType === 'SMS' ? smsMaxBytes : lmsMaxBytes const commitText = React.useCallback((next: string, immediate = false) => { @@ -88,11 +90,19 @@ export function KriEditorSms({
{byteSize}/{maxBytes}byte - {messageType} + {messageType === 'LMS' ? 'LMS/MMS' : 'SMS'}
-
+
0 ? 'overflow-y-auto' : 'overflow-hidden')}> {smsTitle ?
{smsTitle}
: null} + {smsImages.length > 0 ? ( +
+ {smsImages.map((image) => ( + // eslint-disable-next-line @next/next/no-img-element -- data/Object URL 미리보기라 next/image 최적화 대상이 아님 + {image.fileName} + ))} +
+ ) : null}