From 623615a287fc0eec9d6b863446ff70eda0dd2031 Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Mon, 16 Nov 2026 16:54:42 +0900 Subject: [PATCH] =?UTF-8?q?261116=5F03=5FENH:=20KriColorPalette=20?= =?UTF-8?q?=EC=A4=91=EC=B2=A9=20=EC=82=BC=ED=95=AD=20=EC=A0=9C=EA=B1=B0=20?= =?UTF-8?q?=EB=B0=8F=20Dice=20UI=20=EC=B6=9C=EC=B2=98=20=EC=A3=BC=EC=84=9D?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/KriColorPalette.tsx | 5 ++--- src/components/ui/color-picker.tsx | 3 +++ src/components/visually-hidden-input.tsx | 11 ++++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/components/common/KriColorPalette.tsx b/src/components/common/KriColorPalette.tsx index 9b6c931..90b667c 100644 --- a/src/components/common/KriColorPalette.tsx +++ b/src/components/common/KriColorPalette.tsx @@ -153,6 +153,7 @@ export function KriColorPalette({ const parsedColor = parseHexColor(color) if (!parsedColor) return null const selected = parsedColor.rgb === parsedValue?.rgb + const checkColorClass = isLightHexColor(parsedColor.rgb) ? 'text-black' : 'text-white' return ( ) })} diff --git a/src/components/ui/color-picker.tsx b/src/components/ui/color-picker.tsx index 316d0e0..7cab857 100644 --- a/src/components/ui/color-picker.tsx +++ b/src/components/ui/color-picker.tsx @@ -1,5 +1,8 @@ "use client"; +// Adapted from Dice UI color-picker (Radix variant), https://www.diceui.com/docs/components/radix/color-picker (MIT License). +// 로컬 변경: import 경로, 아이콘(lucide PipetteIcon), 빈 interface lint 수정. + import { cva, type VariantProps } from "class-variance-authority"; import { cn } from "@/lib/utils"; import { diff --git a/src/components/visually-hidden-input.tsx b/src/components/visually-hidden-input.tsx index 0edcd49..cadd4fb 100644 --- a/src/components/visually-hidden-input.tsx +++ b/src/components/visually-hidden-input.tsx @@ -101,11 +101,12 @@ function VisuallyHiddenInput( const propertyKey = isCheckInput ? "checked" : "value"; const eventType = isCheckInput ? "click" : "input"; - const serializedCurrentValue = isCheckInput - ? checked - : typeof value === "object" && value !== null - ? JSON.stringify(value) - : value; + let serializedCurrentValue: unknown = value; + if (isCheckInput) { + serializedCurrentValue = checked; + } else if (typeof value === "object" && value !== null) { + serializedCurrentValue = JSON.stringify(value); + } const descriptor = Object.getOwnPropertyDescriptor(inputProto, propertyKey);