@designbasekorea/ui 0.4.1 → 0.5.1

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.js CHANGED
@@ -2899,197 +2899,429 @@ var classnames = {exports: {}};
2899
2899
  var classnamesExports = classnames.exports;
2900
2900
  var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
2901
2901
 
2902
- const AnimationBackground = ({ type = 'gradient', speed = 3000, repeat = 0, delay = 0, direction = 'left', colors = ['#667eea', '#764ba2', '#f093fb', '#f5576c'], width = '100%', height = '200px', borderRadius = 0, opacity = 1, blendMode = 'normal', particleCount = 50, particleSize = 2, starCount = 100, starSize = 2, clickable = false, disabled = false, className, onClick, children, }) => {
2903
- const [isVisible, setIsVisible] = React.useState(false);
2904
- const [isAnimating, setIsAnimating] = React.useState(false);
2905
- const containerRef = React.useRef(null);
2906
- const canvasRef = React.useRef(null);
2907
- React.useEffect(() => {
2908
- if (delay > 0) {
2909
- const timer = setTimeout(() => {
2910
- setIsVisible(true);
2911
- }, delay);
2912
- return () => clearTimeout(timer);
2913
- }
2914
- else {
2915
- setIsVisible(true);
2902
+ /**
2903
+ * Canvas 렌더러: particles, stars, wave, pulse
2904
+ */
2905
+ const hexToRgb$1 = (hex) => {
2906
+ const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
2907
+ return result
2908
+ ? {
2909
+ r: parseInt(result[1], 16),
2910
+ g: parseInt(result[2], 16),
2911
+ b: parseInt(result[3], 16),
2916
2912
  }
2917
- }, [delay]);
2918
- // 반복 애니메이션
2919
- React.useEffect(() => {
2920
- if (repeat > 0) {
2921
- let repeatCount = 0;
2922
- const repeatAnimation = () => {
2923
- setIsAnimating(true);
2924
- setTimeout(() => {
2925
- setIsAnimating(false);
2926
- repeatCount++;
2927
- if (repeatCount < repeat) {
2928
- setTimeout(repeatAnimation, speed);
2929
- }
2930
- }, speed);
2931
- };
2932
- if (isVisible) {
2933
- setTimeout(repeatAnimation, speed);
2913
+ : { r: 0, g: 0, b: 0 };
2914
+ };
2915
+ const drawParticles = (ctx, width, height, particlesRef, options) => {
2916
+ if (particlesRef.current.length !== options.count) {
2917
+ particlesRef.current = Array.from({ length: options.count }).map(() => ({
2918
+ x: Math.random() * width,
2919
+ y: Math.random() * height,
2920
+ vx: (Math.random() - 0.5) * 1.5,
2921
+ vy: (Math.random() - 0.5) * 1.5,
2922
+ size: Math.random() * options.size + 1,
2923
+ color: options.colors[Math.floor(Math.random() * options.colors.length)],
2924
+ }));
2925
+ }
2926
+ const particles = particlesRef.current;
2927
+ const interactionRadius = 150;
2928
+ particles.forEach((p, i) => {
2929
+ p.x += p.vx;
2930
+ p.y += p.vy;
2931
+ if (p.x < 0 || p.x > width)
2932
+ p.vx *= -1;
2933
+ if (p.y < 0 || p.y > height)
2934
+ p.vy *= -1;
2935
+ if (options.clickable) {
2936
+ const dx = options.mouse.x - p.x;
2937
+ const dy = options.mouse.y - p.y;
2938
+ const distance = Math.sqrt(dx * dx + dy * dy);
2939
+ if (distance < interactionRadius) {
2940
+ const force = (interactionRadius - distance) / interactionRadius;
2941
+ p.vx += (dx / distance) * force * 0.5;
2942
+ p.vy += (dy / distance) * force * 0.5;
2943
+ }
2944
+ const maxSpeed = 3;
2945
+ const speed = Math.sqrt(p.vx * p.vx + p.vy * p.vy);
2946
+ if (speed > maxSpeed) {
2947
+ p.vx = (p.vx / speed) * maxSpeed;
2948
+ p.vy = (p.vy / speed) * maxSpeed;
2949
+ }
2950
+ }
2951
+ ctx.beginPath();
2952
+ ctx.arc(p.x, p.y, p.size, 0, Math.PI * 2);
2953
+ ctx.fillStyle = p.color;
2954
+ ctx.fill();
2955
+ for (let j = i + 1; j < particles.length; j++) {
2956
+ const p2 = particles[j];
2957
+ const dx = p.x - p2.x;
2958
+ const dy = p.y - p2.y;
2959
+ const dist = Math.sqrt(dx * dx + dy * dy);
2960
+ if (dist < 100) {
2961
+ ctx.beginPath();
2962
+ ctx.strokeStyle = p.color;
2963
+ ctx.globalAlpha = 1 - dist / 100;
2964
+ ctx.lineWidth = 0.5;
2965
+ ctx.moveTo(p.x, p.y);
2966
+ ctx.lineTo(p2.x, p2.y);
2967
+ ctx.stroke();
2968
+ ctx.globalAlpha = 1;
2934
2969
  }
2935
2970
  }
2936
- }, [repeat, speed, isVisible]);
2937
- // Canvas 애니메이션 (particles, stars 타입용)
2938
- React.useEffect(() => {
2939
- if ((type === 'particles' || type === 'stars') && canvasRef.current && isVisible) {
2940
- const canvas = canvasRef.current;
2941
- const ctx = canvas.getContext('2d');
2942
- if (!ctx)
2943
- return;
2944
- const resizeCanvas = () => {
2945
- const rect = containerRef.current?.getBoundingClientRect();
2946
- if (rect) {
2947
- canvas.width = rect.width;
2948
- canvas.height = rect.height;
2949
- }
2950
- };
2951
- resizeCanvas();
2952
- window.addEventListener('resize', resizeCanvas);
2953
- const particles = [];
2954
- // 파티클 초기화
2955
- const initParticles = () => {
2956
- particles.length = 0;
2957
- const count = type === 'particles' ? particleCount : starCount;
2958
- const size = type === 'particles' ? particleSize : starSize;
2959
- for (let i = 0; i < count; i++) {
2960
- particles.push({
2961
- x: Math.random() * canvas.width,
2962
- y: Math.random() * canvas.height,
2963
- vx: (Math.random() - 0.5) * 2,
2964
- vy: (Math.random() - 0.5) * 2,
2965
- size: Math.random() * size + 1,
2966
- color: colors[Math.floor(Math.random() * colors.length)],
2967
- });
2968
- }
2969
- };
2970
- initParticles();
2971
- const animate = () => {
2972
- ctx.clearRect(0, 0, canvas.width, canvas.height);
2973
- particles.forEach(particle => {
2974
- // 위치 업데이트
2975
- particle.x += particle.vx;
2976
- particle.y += particle.vy;
2977
- // 경계 처리
2978
- if (particle.x < 0 || particle.x > canvas.width)
2979
- particle.vx *= -1;
2980
- if (particle.y < 0 || particle.y > canvas.height)
2981
- particle.vy *= -1;
2982
- // 그리기
2983
- ctx.beginPath();
2984
- ctx.arc(particle.x, particle.y, particle.size, 0, Math.PI * 2);
2985
- ctx.fillStyle = particle.color;
2986
- ctx.fill();
2971
+ });
2972
+ };
2973
+ const drawStars = (ctx, width, height, starsRef, options) => {
2974
+ if (starsRef.current.length !== options.count) {
2975
+ starsRef.current = Array.from({ length: options.count }).map(() => ({
2976
+ x: Math.random() * width,
2977
+ y: Math.random() * height,
2978
+ size: Math.random() * options.size,
2979
+ blinkSpeed: Math.random() * 0.05 + 0.01,
2980
+ color: options.colors[Math.floor(Math.random() * options.colors.length)],
2981
+ }));
2982
+ }
2983
+ starsRef.current.forEach(star => {
2984
+ star.y -= 0.05;
2985
+ if (star.y < 0)
2986
+ star.y = height;
2987
+ const opacity = 0.5 + Math.sin(options.time * star.blinkSpeed) * 0.5;
2988
+ ctx.beginPath();
2989
+ ctx.arc(star.x, star.y, star.size, 0, Math.PI * 2);
2990
+ ctx.fillStyle = star.color;
2991
+ ctx.globalAlpha = opacity;
2992
+ ctx.fill();
2993
+ ctx.globalAlpha = 1;
2994
+ });
2995
+ };
2996
+ const drawWaves = (ctx, width, height, options) => {
2997
+ const { colors, offset, speedFactor } = options;
2998
+ offset.current += 0.02 * speedFactor;
2999
+ colors.forEach((color, i) => {
3000
+ ctx.beginPath();
3001
+ ctx.moveTo(0, height);
3002
+ const freq = 0.003 + i * 0.001;
3003
+ const amp = 30 + i * 20;
3004
+ const phase = offset.current + i * 2;
3005
+ for (let x = 0; x <= width; x += 10) {
3006
+ const y = height / 2 +
3007
+ Math.sin(x * freq + phase) * amp +
3008
+ Math.sin(x * 0.001 + phase * 0.5) * 50;
3009
+ ctx.lineTo(x, y);
3010
+ }
3011
+ ctx.lineTo(width, height);
3012
+ ctx.lineTo(0, height);
3013
+ ctx.closePath();
3014
+ ctx.fillStyle = color;
3015
+ ctx.fill();
3016
+ });
3017
+ };
3018
+ const drawPulse = (ctx, width, height, options) => {
3019
+ const { colors, time, intensity } = options;
3020
+ const centerX = width / 2;
3021
+ const centerY = height / 2;
3022
+ const maxRadius = Math.max(width, height) * 0.8;
3023
+ const intensityMap = { subtle: 0.5, medium: 1, vivid: 1.5 };
3024
+ const factor = intensityMap[intensity];
3025
+ colors.forEach((color, i) => {
3026
+ const t = time * 0.02 * factor + (i * (Math.PI * 2)) / colors.length;
3027
+ const radius = (Math.sin(t) * 0.2 + 0.5) * maxRadius;
3028
+ const alpha = (Math.sin(t + Math.PI) * 0.2 + 0.3) * factor;
3029
+ const gradient = ctx.createRadialGradient(centerX, centerY, 0, centerX, centerY, radius);
3030
+ const rgb = hexToRgb$1(color);
3031
+ gradient.addColorStop(0, `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0)`);
3032
+ gradient.addColorStop(0.5, `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${alpha * 0.5})`);
3033
+ gradient.addColorStop(1, `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0)`);
3034
+ ctx.fillStyle = gradient;
3035
+ ctx.fillRect(0, 0, width, height);
3036
+ });
3037
+ };
3038
+
3039
+ const CanvasLayer = ({ type, colors, speed, particleCount, particleSize, starCount, starSize, intensity, clickable, }) => {
3040
+ const canvasRef = React.useRef(null);
3041
+ const containerRef = React.useRef(null);
3042
+ const requestRef = React.useRef(undefined);
3043
+ const frameCountRef = React.useRef(0);
3044
+ const mouseRef = React.useRef({ x: -9999, y: -9999 });
3045
+ const particlesRef = React.useRef([]);
3046
+ const starsRef = React.useRef([]);
3047
+ const waveOffsetRef = React.useRef(0);
3048
+ const handleResize = React.useCallback(() => {
3049
+ const canvas = canvasRef.current;
3050
+ const container = containerRef.current;
3051
+ if (!canvas || !container)
3052
+ return;
3053
+ const dpr = window.devicePixelRatio || 1;
3054
+ const rect = container.getBoundingClientRect();
3055
+ canvas.width = rect.width * dpr;
3056
+ canvas.height = rect.height * dpr;
3057
+ canvas.style.width = `${rect.width}px`;
3058
+ canvas.style.height = `${rect.height}px`;
3059
+ const ctx = canvas.getContext('2d');
3060
+ if (ctx)
3061
+ ctx.scale(dpr, dpr);
3062
+ }, []);
3063
+ const animate = React.useCallback(() => {
3064
+ const canvas = canvasRef.current;
3065
+ if (!canvas)
3066
+ return;
3067
+ const ctx = canvas.getContext('2d');
3068
+ if (!ctx)
3069
+ return;
3070
+ const dpr = window.devicePixelRatio || 1;
3071
+ const width = canvas.width / dpr;
3072
+ const height = canvas.height / dpr;
3073
+ ctx.clearRect(0, 0, width, height);
3074
+ const time = frameCountRef.current * (3000 / (speed || 3000));
3075
+ frameCountRef.current += 1;
3076
+ switch (type) {
3077
+ case 'particles':
3078
+ drawParticles(ctx, width, height, particlesRef, {
3079
+ count: particleCount,
3080
+ colors,
3081
+ size: particleSize,
3082
+ mouse: mouseRef.current,
3083
+ clickable,
2987
3084
  });
2988
- requestAnimationFrame(animate);
2989
- };
2990
- animate();
2991
- return () => {
2992
- window.removeEventListener('resize', resizeCanvas);
2993
- };
2994
- }
2995
- }, [type, isVisible, colors, particleCount, particleSize, starCount, starSize]);
2996
- const handleClick = () => {
2997
- if (clickable && !disabled && onClick) {
2998
- onClick();
2999
- }
3000
- };
3001
- const getGradientStyle = () => {
3002
- if (type === 'gradient' || type === 'rainbow') {
3003
- const gradientColors = type === 'rainbow'
3004
- ? ['#ff0000', '#ff8000', '#ffff00', '#80ff00', '#00ff00', '#00ff80', '#00ffff', '#0080ff', '#0000ff', '#8000ff', '#ff00ff', '#ff0080']
3005
- : colors;
3006
- if (direction === 'radial') {
3007
- return {
3008
- background: `radial-gradient(circle, ${gradientColors.join(', ')})`,
3009
- backgroundSize: '400% 400%',
3010
- };
3011
- }
3012
- else {
3013
- const angle = direction === 'left' ? '90deg' :
3014
- direction === 'right' ? '270deg' :
3015
- direction === 'up' ? '0deg' :
3016
- direction === 'down' ? '180deg' :
3017
- direction === 'diagonal' ? '45deg' : '90deg';
3018
- return {
3019
- background: `linear-gradient(${angle}, ${gradientColors.join(', ')})`,
3020
- backgroundSize: '400% 400%',
3021
- };
3022
- }
3023
- }
3024
- return {};
3025
- };
3026
- const getWaveStyle = () => {
3027
- if (type === 'wave') {
3028
- return {
3029
- '--wave-colors': colors.join(', '),
3030
- };
3031
- }
3032
- return {};
3033
- };
3034
- const getAuroraStyle = () => {
3035
- if (type === 'aurora') {
3036
- return {
3037
- '--aurora-colors': colors.join(', '),
3038
- };
3039
- }
3040
- return {};
3041
- };
3042
- const getFireStyle = () => {
3043
- if (type === 'fire') {
3044
- return {
3045
- '--fire-colors': colors.join(', '),
3046
- };
3085
+ break;
3086
+ case 'stars':
3087
+ drawStars(ctx, width, height, starsRef, {
3088
+ count: starCount,
3089
+ colors,
3090
+ size: starSize,
3091
+ time,
3092
+ });
3093
+ break;
3094
+ case 'wave':
3095
+ drawWaves(ctx, width, height, {
3096
+ colors,
3097
+ offset: waveOffsetRef,
3098
+ speedFactor: 10000 / (speed || 5000),
3099
+ });
3100
+ break;
3101
+ case 'pulse':
3102
+ drawPulse(ctx, width, height, {
3103
+ colors,
3104
+ time,
3105
+ intensity,
3106
+ });
3107
+ break;
3047
3108
  }
3048
- return {};
3109
+ requestRef.current = requestAnimationFrame(animate);
3110
+ }, [
3111
+ type,
3112
+ colors,
3113
+ speed,
3114
+ particleCount,
3115
+ particleSize,
3116
+ starCount,
3117
+ starSize,
3118
+ intensity,
3119
+ clickable,
3120
+ ]);
3121
+ React.useEffect(() => {
3122
+ handleResize();
3123
+ window.addEventListener('resize', handleResize);
3124
+ particlesRef.current = [];
3125
+ starsRef.current = [];
3126
+ waveOffsetRef.current = 0;
3127
+ frameCountRef.current = 0;
3128
+ requestRef.current = requestAnimationFrame(animate);
3129
+ return () => {
3130
+ window.removeEventListener('resize', handleResize);
3131
+ if (requestRef.current)
3132
+ cancelAnimationFrame(requestRef.current);
3133
+ };
3134
+ }, [animate, handleResize]);
3135
+ const handleMouseMove = (e) => {
3136
+ if (!containerRef.current)
3137
+ return;
3138
+ const rect = containerRef.current.getBoundingClientRect();
3139
+ mouseRef.current = {
3140
+ x: e.clientX - rect.left,
3141
+ y: e.clientY - rect.top,
3142
+ };
3049
3143
  };
3050
- const getOceanStyle = () => {
3051
- if (type === 'ocean') {
3052
- return {
3053
- '--ocean-colors': colors.join(', '),
3054
- };
3055
- }
3056
- return {};
3144
+ const handleMouseLeave = () => {
3145
+ mouseRef.current = { x: -9999, y: -9999 };
3057
3146
  };
3058
- const getSunsetStyle = () => {
3059
- if (type === 'sunset') {
3147
+ return (jsxRuntime.jsx("div", { ref: containerRef, className: "designbase-animation-background__canvas-layer", onMouseMove: handleMouseMove, onMouseLeave: handleMouseLeave, children: jsxRuntime.jsx("canvas", { ref: canvasRef, className: "designbase-animation-background__canvas" }) }));
3148
+ };
3149
+
3150
+ const CSSGradientLayer = ({ type, direction, colors, speed, }) => {
3151
+ const getBackgroundStyle = () => {
3152
+ const safeColors = colors.length > 0 ? colors : ['#ccc'];
3153
+ const gradientStr = safeColors.join(', ');
3154
+ if (type === 'gradient') {
3155
+ let angle = '90deg';
3156
+ switch (direction) {
3157
+ case 'up':
3158
+ angle = '0deg';
3159
+ break;
3160
+ case 'down':
3161
+ angle = '180deg';
3162
+ break;
3163
+ case 'left':
3164
+ angle = '270deg';
3165
+ break;
3166
+ case 'right':
3167
+ angle = '90deg';
3168
+ break;
3169
+ case 'diagonal':
3170
+ angle = '45deg';
3171
+ break;
3172
+ case 'radial':
3173
+ return {
3174
+ backgroundImage: `radial-gradient(circle, ${gradientStr})`,
3175
+ backgroundSize: '200% 200%',
3176
+ };
3177
+ }
3060
3178
  return {
3061
- '--sunset-colors': colors.join(', '),
3179
+ backgroundImage: `linear-gradient(${angle}, ${gradientStr})`,
3180
+ backgroundSize: '200% 200%',
3062
3181
  };
3063
3182
  }
3064
3183
  return {};
3065
3184
  };
3066
- const classes = classNames('designbase-animation-background', `designbase-animation-background--${type}`, `designbase-animation-background--${direction}`, {
3067
- 'designbase-animation-background--visible': isVisible,
3068
- 'designbase-animation-background--animating': isAnimating,
3069
- 'designbase-animation-background--clickable': clickable,
3070
- 'designbase-animation-background--disabled': disabled,
3071
- }, className);
3185
+ const duration = `${Math.max(2, speed / 1000)}s`;
3186
+ return (jsxRuntime.jsx("div", { className: "designbase-animation-background__css-layer", style: {
3187
+ ...getBackgroundStyle(),
3188
+ animation: `designbase-gradient-move ${duration} ease infinite`,
3189
+ }, children: jsxRuntime.jsx("style", { children: `
3190
+ @keyframes designbase-gradient-move {
3191
+ 0% { background-position: 0% 50%; }
3192
+ 50% { background-position: 100% 50%; }
3193
+ 100% { background-position: 0% 50%; }
3194
+ }
3195
+ ` }) }));
3196
+ };
3197
+
3198
+ const MeshAuroraLayer = ({ colors, speed, blur, intensity, theme, }) => {
3199
+ const baseOpacity = intensity === 'subtle' ? 0.3 : intensity === 'medium' ? 0.6 : 0.8;
3200
+ const duration = Math.max(5, speed / 1000);
3201
+ const palette = colors.length >= 3
3202
+ ? colors
3203
+ : ['#4f46e5', '#ec4899', '#06b6d4', '#8b5cf6'];
3204
+ const blendMode = theme === 'dark' ? 'screen' : 'multiply';
3205
+ const filterStyle = `blur(${blur}px)`;
3206
+ const blobBaseClass = 'designbase-animation-background__aurora-blob';
3207
+ return (jsxRuntime.jsxs("div", { className: "designbase-animation-background__aurora-mesh", children: [jsxRuntime.jsx("div", { className: blobBaseClass, style: {
3208
+ backgroundColor: palette[0],
3209
+ filter: filterStyle,
3210
+ opacity: baseOpacity,
3211
+ animationDuration: `${duration}s`,
3212
+ top: '-10%',
3213
+ left: '-10%',
3214
+ animationDelay: '0s',
3215
+ mixBlendMode: blendMode,
3216
+ } }), jsxRuntime.jsx("div", { className: blobBaseClass, style: {
3217
+ backgroundColor: palette[1],
3218
+ filter: filterStyle,
3219
+ opacity: baseOpacity,
3220
+ animationDuration: `${duration * 1.2}s`,
3221
+ top: '-10%',
3222
+ right: '-10%',
3223
+ animationDelay: '2s',
3224
+ mixBlendMode: blendMode,
3225
+ } }), jsxRuntime.jsx("div", { className: blobBaseClass, style: {
3226
+ backgroundColor: palette[2],
3227
+ filter: filterStyle,
3228
+ opacity: baseOpacity,
3229
+ animationDuration: `${duration * 1.5}s`,
3230
+ bottom: '-20%',
3231
+ left: '20%',
3232
+ animationDelay: '4s',
3233
+ mixBlendMode: blendMode,
3234
+ } }), palette[3] && (jsxRuntime.jsx("div", { className: blobBaseClass, style: {
3235
+ backgroundColor: palette[3],
3236
+ filter: filterStyle,
3237
+ opacity: baseOpacity,
3238
+ animationDuration: `${duration * 1.1}s`,
3239
+ bottom: '-10%',
3240
+ right: '-10%',
3241
+ animationDelay: '1s',
3242
+ mixBlendMode: blendMode,
3243
+ } })), jsxRuntime.jsx("div", { className: "designbase-animation-background__aurora-noise", style: {
3244
+ opacity: theme === 'dark' ? 0.03 : 0.05,
3245
+ backgroundImage: `url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`,
3246
+ } })] }));
3247
+ };
3248
+
3249
+ const GridOverlay = ({ size = 40, color = '#ffffff', opacity = 0.1, }) => {
3072
3250
  const style = {
3251
+ position: 'absolute',
3252
+ inset: 0,
3253
+ width: '100%',
3254
+ height: '100%',
3255
+ pointerEvents: 'none',
3256
+ zIndex: 1,
3257
+ backgroundImage: `
3258
+ linear-gradient(to right, ${color} 1px, transparent 1px),
3259
+ linear-gradient(to bottom, ${color} 1px, transparent 1px)
3260
+ `,
3261
+ backgroundSize: `${size}px ${size}px`,
3262
+ opacity,
3263
+ // 은은하게 전체에 라인 유지, 맨 아래만 살짝 페이드
3264
+ maskImage: 'linear-gradient(to bottom, black 0%, black 92%, transparent 100%)',
3265
+ WebkitMaskImage: 'linear-gradient(to bottom, black 0%, black 92%, transparent 100%)',
3266
+ };
3267
+ return jsxRuntime.jsx("div", { className: "designbase-animation-background__grid-overlay", style: style });
3268
+ };
3269
+
3270
+ const AnimationBackground = ({ type = 'gradient', theme = 'dark', intensity = 'subtle', blur = 80, speed = 3000, repeat = 0, direction = 'left', colors = ['#667eea', '#764ba2', '#f093fb'], width = '100%', height = '100%', borderRadius = 0, opacity = 1, blendMode = 'normal', particleCount = 50, particleSize = 2, starCount = 100, starSize = 1.5, clickable = false, disabled = false, className = '', onClick, children, showGrid = false, gridSize = 40, gridColor, gridOpacity = 0.1, }) => {
3271
+ const backgroundColor = theme === 'dark' ? 'var(--db-surface-base, #0f172a)' : 'var(--db-surface-base, #ffffff)';
3272
+ const effectiveGridColor = gridColor ?? (theme === 'dark' ? '#ffffff' : '#000000');
3273
+ const containerStyle = {
3073
3274
  width: typeof width === 'number' ? `${width}px` : width,
3074
3275
  height: typeof height === 'number' ? `${height}px` : height,
3075
3276
  borderRadius: typeof borderRadius === 'number' ? `${borderRadius}px` : borderRadius,
3076
3277
  opacity,
3077
3278
  mixBlendMode: blendMode,
3078
- ...getGradientStyle(),
3079
- ...getWaveStyle(),
3080
- ...getAuroraStyle(),
3081
- ...getFireStyle(),
3082
- ...getOceanStyle(),
3083
- ...getSunsetStyle(),
3084
- '--db-animation-speed': `${speed}ms`,
3279
+ position: 'relative',
3280
+ overflow: 'hidden',
3281
+ backgroundColor: type !== 'gradient' ? backgroundColor : undefined,
3085
3282
  };
3086
- const renderContent = () => {
3087
- if (type === 'particles' || type === 'stars') {
3088
- return (jsxRuntime.jsx("canvas", { ref: canvasRef, className: "designbase-animation-background__canvas", style: { width: '100%', height: '100%' } }));
3283
+ const content = React.useMemo(() => {
3284
+ if (disabled)
3285
+ return null;
3286
+ switch (type) {
3287
+ case 'particles':
3288
+ case 'stars':
3289
+ case 'wave':
3290
+ case 'pulse':
3291
+ return (jsxRuntime.jsx(CanvasLayer, { type: type, colors: colors, speed: speed, particleCount: particleCount, particleSize: particleSize, starCount: starCount, starSize: starSize, intensity: intensity, clickable: clickable }));
3292
+ case 'aurora':
3293
+ return (jsxRuntime.jsx(MeshAuroraLayer, { colors: colors, speed: speed, blur: blur, intensity: intensity, theme: theme }));
3294
+ case 'gradient':
3295
+ return (jsxRuntime.jsx(CSSGradientLayer, { type: type, direction: direction, colors: colors, speed: speed }));
3296
+ default:
3297
+ return null;
3089
3298
  }
3090
- return children;
3091
- };
3092
- return (jsxRuntime.jsx("div", { ref: containerRef, className: classes, style: style, onClick: handleClick, children: renderContent() }));
3299
+ }, [
3300
+ type,
3301
+ disabled,
3302
+ colors,
3303
+ speed,
3304
+ intensity,
3305
+ blur,
3306
+ theme,
3307
+ particleCount,
3308
+ particleSize,
3309
+ starCount,
3310
+ starSize,
3311
+ clickable,
3312
+ direction,
3313
+ ]);
3314
+ const classes = classNames('designbase-animation-background', `designbase-animation-background--${type}`, {
3315
+ 'designbase-animation-background--clickable': clickable,
3316
+ 'designbase-animation-background--disabled': disabled,
3317
+ }, className);
3318
+ return (jsxRuntime.jsxs("div", { className: classes, style: containerStyle, onClick: clickable && !disabled ? onClick : undefined, children: [jsxRuntime.jsx("div", { className: "designbase-animation-background__layers", style: {
3319
+ position: 'absolute',
3320
+ inset: 0,
3321
+ width: '100%',
3322
+ height: '100%',
3323
+ zIndex: 0,
3324
+ }, children: content }), showGrid && (jsxRuntime.jsx(GridOverlay, { size: gridSize, color: effectiveGridColor, opacity: gridOpacity })), children && (jsxRuntime.jsx("div", { className: "designbase-animation-background__content", style: { position: 'relative', zIndex: 10, width: '100%', height: '100%' }, children: children }))] }));
3093
3325
  };
3094
3326
 
3095
3327
  const AnimationText = ({ children, type = 'fade', speed = 1000, repeat = 0, delay = 0, direction = 'left', size = 'm', color = 'primary', customColor, weight = 'normal', align = 'left', gradientColors = ['#667eea', '#764ba2'], waveColors = ['#ff6b6b', '#4ecdc4', '#45b7d1', '#96ceb4', '#feca57'], glowColor = '#667eea', clickable = false, disabled = false, className, onClick, }) => {
@@ -4255,7 +4487,7 @@ const SearchBar = ({ value, defaultValue = '', placeholder = '검색...', size =
4255
4487
  };
4256
4488
  SearchBar.displayName = 'SearchBar';
4257
4489
 
4258
- const Select = ({ value, defaultValue, options, label, placeholder = '선택하세요', multiple = false, searchable = false, disabled = false, readOnly = false, required = false, error = false, errorMessage, helperText, size = 'm', fullWidth = false, dropdownWidth = 'auto', position = 'bottom', maxHeight = 200, showClearButton = true, className, onChange, onFocus, onBlur, ...props }) => {
4490
+ const Select = ({ value, defaultValue, options, label, placeholder = '선택하세요', multiple = false, searchable = false, disabled = false, readOnly = false, required = false, error = false, errorMessage, helperText, size = 'm', fullWidth = false, dropdownWidth = 'auto', position = 'bottom', maxHeight = 200, showClearButton = true, useMobileBottomSheet = false, className, onChange, onFocus, onBlur, ...props }) => {
4259
4491
  const [isOpen, setIsOpen] = React.useState(false);
4260
4492
  const [selectedValue, setSelectedValue] = React.useState(value ?? defaultValue ?? (multiple ? [] : ''));
4261
4493
  const [searchTerm, setSearchTerm] = React.useState('');
@@ -4414,6 +4646,7 @@ const Select = ({ value, defaultValue, options, label, placeholder = '선택하
4414
4646
  });
4415
4647
  const dropdownClasses = clsx('designbase-select__dropdown', `designbase-select__dropdown--${dropdownWidth}`, `designbase-select__dropdown--${position}`, {
4416
4648
  'designbase-select__dropdown--open': isOpen,
4649
+ 'designbase-select__dropdown--mobile-sheet': useMobileBottomSheet,
4417
4650
  });
4418
4651
  const filteredOptions = getFilteredOptions();
4419
4652
  const selectedLabels = getSelectedLabels();
@@ -7814,7 +8047,7 @@ const Stat = ({ value, label, icon, iconPosition = 'left', size = 'm', variant =
7814
8047
  return;
7815
8048
  onClick?.();
7816
8049
  };
7817
- return (jsxRuntime.jsxs("div", { className: classes, style: customStyle, onClick: handleClick, role: clickable ? 'button' : undefined, tabIndex: clickable ? 0 : undefined, children: [icon && (jsxRuntime.jsx("div", { className: clsx('designbase-stat__icon', `designbase-stat__icon--${iconPosition}`), children: icon })), jsxRuntime.jsxs("div", { className: "designbase-stat__content", children: [jsxRuntime.jsxs("div", { className: "designbase-stat__main", children: [jsxRuntime.jsx("div", { className: "designbase-stat__value", children: value }), jsxRuntime.jsx("div", { className: "designbase-stat__label", children: label })] }), showChange && change && (jsxRuntime.jsx("div", { className: clsx('designbase-stat__change', getChangeClass()), children: getChangeText() })), showDescription && description && (jsxRuntime.jsx("div", { className: "designbase-stat__description", children: description }))] }), showProgress && typeof progress === 'number' && (jsxRuntime.jsx("div", { className: "designbase-stat__progress", children: jsxRuntime.jsx(Progressbar, { value: Math.min(Math.max(progress, 0), 100), size: "s", variant: color === 'primary' ? 'primary' : color === 'success' ? 'success' : color === 'warning' ? 'warning' : color === 'error' ? 'danger' : 'default' }) }))] }));
8050
+ return (jsxRuntime.jsxs("div", { className: classes, style: customStyle, onClick: handleClick, role: clickable ? 'button' : undefined, tabIndex: clickable ? 0 : undefined, children: [icon && (jsxRuntime.jsx("div", { className: clsx('designbase-stat__icon', `designbase-stat__icon--${iconPosition}`), children: icon })), jsxRuntime.jsxs("div", { className: "designbase-stat__content", children: [jsxRuntime.jsx("div", { className: "designbase-stat__main", children: variant === 'iconBox' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "designbase-stat__label", children: label }), jsxRuntime.jsx("div", { className: "designbase-stat__value", children: value })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "designbase-stat__value", children: value }), jsxRuntime.jsx("div", { className: "designbase-stat__label", children: label })] })) }), showChange && change && (jsxRuntime.jsx("div", { className: clsx('designbase-stat__change', getChangeClass()), children: getChangeText() })), showDescription && description && (jsxRuntime.jsx("div", { className: "designbase-stat__description", children: description }))] }), showProgress && typeof progress === 'number' && (jsxRuntime.jsx("div", { className: "designbase-stat__progress", children: jsxRuntime.jsx(Progressbar, { value: Math.min(Math.max(progress, 0), 100), size: "s", variant: color === 'primary' ? 'primary' : color === 'success' ? 'success' : color === 'warning' ? 'warning' : color === 'error' ? 'danger' : 'default' }) }))] }));
7818
8051
  };
7819
8052
 
7820
8053
  const HeroFeature = ({ title, subtitle, description, image, imageAlt, backgroundImage, backgroundVideo, overlayColor, overlayOpacity = 0.5, buttons = [], badge, stats = [], icon, size = 'l', variant = 'default', theme = 'light', alignment = 'left', animated = false, parallax = false, fullHeight = false, minHeight, maxHeight, className, }) => {
@@ -11492,7 +11725,7 @@ const Toast = ({ id, status = 'info', title, description, icon: Icon, duration =
11492
11725
  // 기본 상태 아이콘 (아이콘 패키지에서 가져온 아이콘 사용)
11493
11726
  const iconMap = {
11494
11727
  success: icons.CircleCheckFilledIcon,
11495
- error: icons.DeleteIcon,
11728
+ error: icons.ErrorIcon,
11496
11729
  warning: icons.WarningIcon,
11497
11730
  info: icons.InfoIcon,
11498
11731
  };