@designbasekorea/ui 0.2.31 → 0.2.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +8 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +8 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2525,6 +2525,8 @@ const colorPalettes = {
|
|
|
2525
2525
|
};
|
|
2526
2526
|
const RandomGradient = ({ scheme = 'primary', tone = 'vivid', width = '100%', height = '600px', blur = 60, colorCount = 4, animated = false, animationDuration = 10, overlay = true, overlayOpacity = 0.2, children, className, }) => {
|
|
2527
2527
|
const [gradientStyle, setGradientStyle] = useState({});
|
|
2528
|
+
// 블러 최소값 60으로 제한
|
|
2529
|
+
const minBlur = Math.max(60, blur);
|
|
2528
2530
|
// 그라데이션 생성 함수
|
|
2529
2531
|
const generateGradient = useMemo(() => {
|
|
2530
2532
|
return () => {
|
|
@@ -2541,11 +2543,11 @@ const RandomGradient = ({ scheme = 'primary', tone = 'vivid', width = '100%', he
|
|
|
2541
2543
|
const centerY = Math.random() * 100;
|
|
2542
2544
|
return {
|
|
2543
2545
|
background: `radial-gradient(circle at ${centerX}% ${centerY}%, ${gradientStops})`,
|
|
2544
|
-
filter: `blur(${
|
|
2546
|
+
filter: `blur(${minBlur}px)`,
|
|
2545
2547
|
transition: `all ${animationDuration}s ease-in-out`,
|
|
2546
2548
|
};
|
|
2547
2549
|
};
|
|
2548
|
-
}, [scheme, tone, colorCount,
|
|
2550
|
+
}, [scheme, tone, colorCount, minBlur, animationDuration]);
|
|
2549
2551
|
// 초기 그라데이션 및 애니메이션
|
|
2550
2552
|
useEffect(() => {
|
|
2551
2553
|
setGradientStyle(generateGradient());
|
|
@@ -5451,6 +5453,10 @@ const ColorPicker = ({ size = 'm', type = 'dropdown', position = 'bottom-left',
|
|
|
5451
5453
|
onChange?.(formatted);
|
|
5452
5454
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5453
5455
|
}, [formatted]); // onChange와 value를 의존성에서 제거
|
|
5456
|
+
/** formatted 변경시 colorInput 동기화 */
|
|
5457
|
+
useEffect(() => {
|
|
5458
|
+
setColorInput(formatted.toUpperCase());
|
|
5459
|
+
}, [formatted]);
|
|
5454
5460
|
/** 드롭다운 외부 클릭 닫기 */
|
|
5455
5461
|
useEffect(() => {
|
|
5456
5462
|
const handler = (e) => {
|