@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.js
CHANGED
|
@@ -2527,6 +2527,8 @@ const colorPalettes = {
|
|
|
2527
2527
|
};
|
|
2528
2528
|
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, }) => {
|
|
2529
2529
|
const [gradientStyle, setGradientStyle] = React.useState({});
|
|
2530
|
+
// 블러 최소값 60으로 제한
|
|
2531
|
+
const minBlur = Math.max(60, blur);
|
|
2530
2532
|
// 그라데이션 생성 함수
|
|
2531
2533
|
const generateGradient = React.useMemo(() => {
|
|
2532
2534
|
return () => {
|
|
@@ -2543,11 +2545,11 @@ const RandomGradient = ({ scheme = 'primary', tone = 'vivid', width = '100%', he
|
|
|
2543
2545
|
const centerY = Math.random() * 100;
|
|
2544
2546
|
return {
|
|
2545
2547
|
background: `radial-gradient(circle at ${centerX}% ${centerY}%, ${gradientStops})`,
|
|
2546
|
-
filter: `blur(${
|
|
2548
|
+
filter: `blur(${minBlur}px)`,
|
|
2547
2549
|
transition: `all ${animationDuration}s ease-in-out`,
|
|
2548
2550
|
};
|
|
2549
2551
|
};
|
|
2550
|
-
}, [scheme, tone, colorCount,
|
|
2552
|
+
}, [scheme, tone, colorCount, minBlur, animationDuration]);
|
|
2551
2553
|
// 초기 그라데이션 및 애니메이션
|
|
2552
2554
|
React.useEffect(() => {
|
|
2553
2555
|
setGradientStyle(generateGradient());
|
|
@@ -5453,6 +5455,10 @@ const ColorPicker = ({ size = 'm', type = 'dropdown', position = 'bottom-left',
|
|
|
5453
5455
|
onChange?.(formatted);
|
|
5454
5456
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5455
5457
|
}, [formatted]); // onChange와 value를 의존성에서 제거
|
|
5458
|
+
/** formatted 변경시 colorInput 동기화 */
|
|
5459
|
+
React.useEffect(() => {
|
|
5460
|
+
setColorInput(formatted.toUpperCase());
|
|
5461
|
+
}, [formatted]);
|
|
5456
5462
|
/** 드롭다운 외부 클릭 닫기 */
|
|
5457
5463
|
React.useEffect(() => {
|
|
5458
5464
|
const handler = (e) => {
|