@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.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +39 -19
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.css.map +1 -1
- package/dist/index.esm.js +408 -175
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +407 -174
- package/dist/index.js.map +1 -1
- package/dist/index.umd.css +1 -1
- package/dist/index.umd.css.map +1 -1
- package/dist/index.umd.js +407 -174
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
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
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
const
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
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
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
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
|
-
}
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
const
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
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
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
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
|
-
|
|
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
|
|
3051
|
-
|
|
3052
|
-
return {
|
|
3053
|
-
'--ocean-colors': colors.join(', '),
|
|
3054
|
-
};
|
|
3055
|
-
}
|
|
3056
|
-
return {};
|
|
3144
|
+
const handleMouseLeave = () => {
|
|
3145
|
+
mouseRef.current = { x: -9999, y: -9999 };
|
|
3057
3146
|
};
|
|
3058
|
-
|
|
3059
|
-
|
|
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
|
-
|
|
3179
|
+
backgroundImage: `linear-gradient(${angle}, ${gradientStr})`,
|
|
3180
|
+
backgroundSize: '200% 200%',
|
|
3062
3181
|
};
|
|
3063
3182
|
}
|
|
3064
3183
|
return {};
|
|
3065
3184
|
};
|
|
3066
|
-
const
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
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
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
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
|
|
3087
|
-
if (
|
|
3088
|
-
return
|
|
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
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
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.
|
|
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.
|
|
11728
|
+
error: icons.ErrorIcon,
|
|
11496
11729
|
warning: icons.WarningIcon,
|
|
11497
11730
|
info: icons.InfoIcon,
|
|
11498
11731
|
};
|