@designbasekorea/ui 0.4.1 → 0.5.2
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/README.md +68 -28
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +49 -26
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.css.map +1 -1
- package/dist/index.esm.js +595 -264
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +605 -265
- 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 +608 -269
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import React, { useState, useCallback, useEffect, useRef, useMemo, useContext, useLayoutEffect, forwardRef, useId, createContext } from 'react';
|
|
3
|
-
import { ChevronDownIcon, StarIcon, TrendingUpIcon, StarFilledIcon, CartIcon, CloseIcon, ArrowRightIcon, InfoFilledIcon, ErrorFilledIcon, WarningFilledIcon, CircleCheckFilledIcon, RefreshIcon, ChevronLeftIcon, PauseIcon, PlayIcon, ChevronRightIcon, RepeatIcon, MuteFilledIcon, VolumeUpIcon, SettingsIcon, UserIcon, HideIcon, ShowIcon, SearchIcon, ChevronUpIcon, GalleryIcon, HeartIcon, BookmarkIcon, ShareAltIcon, DownloadIcon, ArrowLeftIcon, ShrinkIcon, ExpandIcon, DoneIcon as DoneIcon$1, CopyIcon, EyedropperIcon, BulbIcon, CloudCloseIcon, BellActiveIcon, AwardIcon, CalendarIcon, PlusIcon, ErrorIcon, FileBlankIcon, ClockIcon, MinusIcon as MinusIcon$1, VideoIcon, CodeIcon, WriteIcon, UploadIcon, ArrowBarLeftIcon, ArrowBarRightIcon, StarHalfIcon, MoveIcon, MoreVerticalIcon, ArrowDownIcon, ArrowUpLeftIcon, ArrowUpRightIcon, ArrowDownLeftIcon, ArrowDownRightIcon, FacebookIcon, XIcon, InstagramIcon, LinkedinIcon, PinterestIcon, WhatsappIcon, TelegramIcon, MailIcon, LinkIcon, ScanQrcodeIcon, CaretUpdownFilledIcon,
|
|
3
|
+
import { ChevronDownIcon, StarIcon, TrendingUpIcon, StarFilledIcon, CartIcon, CloseIcon, ArrowRightIcon, InfoFilledIcon, ErrorFilledIcon, WarningFilledIcon, CircleCheckFilledIcon, RefreshIcon, ChevronLeftIcon, PauseIcon, PlayIcon, ChevronRightIcon, RepeatIcon, MuteFilledIcon, VolumeUpIcon, SettingsIcon, UserIcon, HideIcon, ShowIcon, SearchIcon, ChevronUpIcon, GalleryIcon, HeartIcon, BookmarkIcon, ShareAltIcon, DownloadIcon, ArrowLeftIcon, ShrinkIcon, ExpandIcon, DoneIcon as DoneIcon$1, CopyIcon, EyedropperIcon, BulbIcon, CloudCloseIcon, BellActiveIcon, AwardIcon, CalendarIcon, PlusIcon, ErrorIcon, FileBlankIcon, ClockIcon, MinusIcon as MinusIcon$1, VideoIcon, CodeIcon, WriteIcon, UploadIcon, ArrowBarLeftIcon, ArrowBarRightIcon, StarHalfIcon, MoveIcon, MoreVerticalIcon, ArrowDownIcon, ArrowUpLeftIcon, ArrowUpRightIcon, ArrowDownLeftIcon, ArrowDownRightIcon, FacebookIcon, XIcon, InstagramIcon, LinkedinIcon, PinterestIcon, WhatsappIcon, TelegramIcon, MailIcon, LinkIcon, ScanQrcodeIcon, CaretUpdownFilledIcon, WarningIcon, InfoIcon } from '@designbasekorea/icons';
|
|
4
4
|
import { flushSync, createPortal } from 'react-dom';
|
|
5
|
+
export { getTheme, setTheme, toggleTheme } from '@designbasekorea/theme';
|
|
5
6
|
|
|
6
7
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
7
8
|
|
|
@@ -2897,256 +2898,584 @@ var classnames = {exports: {}};
|
|
|
2897
2898
|
var classnamesExports = classnames.exports;
|
|
2898
2899
|
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
2899
2900
|
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
const
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
return () => clearTimeout(timer);
|
|
2911
|
-
}
|
|
2912
|
-
else {
|
|
2913
|
-
setIsVisible(true);
|
|
2901
|
+
/**
|
|
2902
|
+
* Canvas 렌더러: particles, stars, wave, pulse
|
|
2903
|
+
*/
|
|
2904
|
+
const hexToRgb$1 = (hex) => {
|
|
2905
|
+
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
2906
|
+
return result
|
|
2907
|
+
? {
|
|
2908
|
+
r: parseInt(result[1], 16),
|
|
2909
|
+
g: parseInt(result[2], 16),
|
|
2910
|
+
b: parseInt(result[3], 16),
|
|
2914
2911
|
}
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2912
|
+
: { r: 0, g: 0, b: 0 };
|
|
2913
|
+
};
|
|
2914
|
+
const drawParticles = (ctx, width, height, particlesRef, options) => {
|
|
2915
|
+
if (particlesRef.current.length !== options.count) {
|
|
2916
|
+
particlesRef.current = Array.from({ length: options.count }).map(() => ({
|
|
2917
|
+
x: Math.random() * width,
|
|
2918
|
+
y: Math.random() * height,
|
|
2919
|
+
vx: (Math.random() - 0.5) * 1.5,
|
|
2920
|
+
vy: (Math.random() - 0.5) * 1.5,
|
|
2921
|
+
size: Math.random() * options.size + 1,
|
|
2922
|
+
color: options.colors[Math.floor(Math.random() * options.colors.length)],
|
|
2923
|
+
}));
|
|
2924
|
+
}
|
|
2925
|
+
const particles = particlesRef.current;
|
|
2926
|
+
const interactionRadius = 150;
|
|
2927
|
+
particles.forEach((p, i) => {
|
|
2928
|
+
p.x += p.vx;
|
|
2929
|
+
p.y += p.vy;
|
|
2930
|
+
if (p.x < 0 || p.x > width)
|
|
2931
|
+
p.vx *= -1;
|
|
2932
|
+
if (p.y < 0 || p.y > height)
|
|
2933
|
+
p.vy *= -1;
|
|
2934
|
+
if (options.clickable) {
|
|
2935
|
+
const dx = options.mouse.x - p.x;
|
|
2936
|
+
const dy = options.mouse.y - p.y;
|
|
2937
|
+
const distance = Math.sqrt(dx * dx + dy * dy);
|
|
2938
|
+
if (distance < interactionRadius) {
|
|
2939
|
+
const force = (interactionRadius - distance) / interactionRadius;
|
|
2940
|
+
p.vx += (dx / distance) * force * 0.5;
|
|
2941
|
+
p.vy += (dy / distance) * force * 0.5;
|
|
2942
|
+
}
|
|
2943
|
+
const maxSpeed = 3;
|
|
2944
|
+
const speed = Math.sqrt(p.vx * p.vx + p.vy * p.vy);
|
|
2945
|
+
if (speed > maxSpeed) {
|
|
2946
|
+
p.vx = (p.vx / speed) * maxSpeed;
|
|
2947
|
+
p.vy = (p.vy / speed) * maxSpeed;
|
|
2948
|
+
}
|
|
2949
|
+
}
|
|
2950
|
+
ctx.beginPath();
|
|
2951
|
+
ctx.arc(p.x, p.y, p.size, 0, Math.PI * 2);
|
|
2952
|
+
ctx.fillStyle = p.color;
|
|
2953
|
+
ctx.fill();
|
|
2954
|
+
for (let j = i + 1; j < particles.length; j++) {
|
|
2955
|
+
const p2 = particles[j];
|
|
2956
|
+
const dx = p.x - p2.x;
|
|
2957
|
+
const dy = p.y - p2.y;
|
|
2958
|
+
const dist = Math.sqrt(dx * dx + dy * dy);
|
|
2959
|
+
if (dist < 100) {
|
|
2960
|
+
ctx.beginPath();
|
|
2961
|
+
ctx.strokeStyle = p.color;
|
|
2962
|
+
ctx.globalAlpha = 1 - dist / 100;
|
|
2963
|
+
ctx.lineWidth = 0.5;
|
|
2964
|
+
ctx.moveTo(p.x, p.y);
|
|
2965
|
+
ctx.lineTo(p2.x, p2.y);
|
|
2966
|
+
ctx.stroke();
|
|
2967
|
+
ctx.globalAlpha = 1;
|
|
2932
2968
|
}
|
|
2933
2969
|
}
|
|
2934
|
-
}
|
|
2935
|
-
|
|
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
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2970
|
+
});
|
|
2971
|
+
};
|
|
2972
|
+
const drawStars = (ctx, width, height, starsRef, options) => {
|
|
2973
|
+
if (starsRef.current.length !== options.count) {
|
|
2974
|
+
starsRef.current = Array.from({ length: options.count }).map(() => ({
|
|
2975
|
+
x: Math.random() * width,
|
|
2976
|
+
y: Math.random() * height,
|
|
2977
|
+
size: Math.random() * options.size,
|
|
2978
|
+
blinkSpeed: Math.random() * 0.05 + 0.01,
|
|
2979
|
+
color: options.colors[Math.floor(Math.random() * options.colors.length)],
|
|
2980
|
+
}));
|
|
2981
|
+
}
|
|
2982
|
+
starsRef.current.forEach(star => {
|
|
2983
|
+
star.y -= 0.05;
|
|
2984
|
+
if (star.y < 0)
|
|
2985
|
+
star.y = height;
|
|
2986
|
+
const opacity = 0.5 + Math.sin(options.time * star.blinkSpeed) * 0.5;
|
|
2987
|
+
ctx.beginPath();
|
|
2988
|
+
ctx.arc(star.x, star.y, star.size, 0, Math.PI * 2);
|
|
2989
|
+
ctx.fillStyle = star.color;
|
|
2990
|
+
ctx.globalAlpha = opacity;
|
|
2991
|
+
ctx.fill();
|
|
2992
|
+
ctx.globalAlpha = 1;
|
|
2993
|
+
});
|
|
2994
|
+
};
|
|
2995
|
+
const drawWaves = (ctx, width, height, options) => {
|
|
2996
|
+
const { colors, offset, speedFactor } = options;
|
|
2997
|
+
offset.current += 0.005 * speedFactor; // Slower, smoother movement
|
|
2998
|
+
colors.forEach((color, i) => {
|
|
2999
|
+
const rgb = hexToRgb$1(color);
|
|
3000
|
+
const gradient = ctx.createLinearGradient(0, 0, 0, height);
|
|
3001
|
+
// Gradient from color to transparent for depth
|
|
3002
|
+
gradient.addColorStop(0, `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0)`);
|
|
3003
|
+
gradient.addColorStop(0.5, `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0.5)`);
|
|
3004
|
+
gradient.addColorStop(1, `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0.8)`);
|
|
3005
|
+
ctx.fillStyle = gradient;
|
|
3006
|
+
ctx.beginPath();
|
|
3007
|
+
ctx.moveTo(0, height);
|
|
3008
|
+
// Organic wave generation
|
|
3009
|
+
for (let x = 0; x <= width; x += 5) {
|
|
3010
|
+
const freq1 = 0.002 + i * 0.0005;
|
|
3011
|
+
const freq2 = 0.005 + i * 0.001;
|
|
3012
|
+
const phase = offset.current + i * 1.5;
|
|
3013
|
+
// Combine two sine waves for more natural look
|
|
3014
|
+
const y1 = Math.sin(x * freq1 + phase) * (40 + i * 15);
|
|
3015
|
+
const y2 = Math.sin(x * freq2 + phase * 1.2) * (20 + i * 5);
|
|
3016
|
+
const y = height / 1.5 + y1 + y2 + (i * 30); // Base height + waves + layering offset
|
|
3017
|
+
ctx.lineTo(x, y);
|
|
3018
|
+
}
|
|
3019
|
+
ctx.lineTo(width, height);
|
|
3020
|
+
ctx.lineTo(0, height);
|
|
3021
|
+
ctx.closePath();
|
|
3022
|
+
// Add subtle blur for "dreamy" effect
|
|
3023
|
+
// Note: filter can be expensive, use sparingly.
|
|
3024
|
+
// If performance is an issue, remove this toggle or reduce canvas size.
|
|
3025
|
+
// ctx.filter = 'blur(4px)';
|
|
3026
|
+
ctx.globalAlpha = 0.6; // Base transparency
|
|
3027
|
+
ctx.fill();
|
|
3028
|
+
ctx.globalAlpha = 1.0;
|
|
3029
|
+
// ctx.filter = 'none';
|
|
3030
|
+
});
|
|
3031
|
+
};
|
|
3032
|
+
const drawPulse = (ctx, width, height, options) => {
|
|
3033
|
+
const { colors, time, intensity } = options;
|
|
3034
|
+
const centerX = width / 2;
|
|
3035
|
+
const centerY = height / 2;
|
|
3036
|
+
const maxRadius = Math.max(width, height) * 0.6; // Slightly reduced max radius to keep it contained
|
|
3037
|
+
const intensityMap = { subtle: 0.8, medium: 1.2, vivid: 1.8 }; // Increased base intensity
|
|
3038
|
+
const factor = intensityMap[intensity];
|
|
3039
|
+
colors.forEach((color, i) => {
|
|
3040
|
+
// Offset time for each color layer
|
|
3041
|
+
const t = time * 0.002 * factor + (i * (Math.PI / 1.5));
|
|
3042
|
+
// Breathing effect for radius
|
|
3043
|
+
const radius = (Math.sin(t) * 0.15 + 0.6) * maxRadius;
|
|
3044
|
+
// Breathing effect for opacity
|
|
3045
|
+
const alpha = (Math.sin(t + Math.PI / 2) * 0.3 + 0.5) * factor; // Higher base alpha (0.2->0.8 range)
|
|
3046
|
+
// Clamp alpha max to 1
|
|
3047
|
+
const safeAlpha = Math.min(Math.max(alpha, 0), 1);
|
|
3048
|
+
if (safeAlpha <= 0.01)
|
|
3049
|
+
return;
|
|
3050
|
+
const gradient = ctx.createRadialGradient(centerX, centerY, 0, centerX, centerY, radius);
|
|
3051
|
+
const rgb = hexToRgb$1(color);
|
|
3052
|
+
// Harder center, softer edge
|
|
3053
|
+
gradient.addColorStop(0, `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0)`);
|
|
3054
|
+
gradient.addColorStop(0.2, `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${safeAlpha * 0.2})`);
|
|
3055
|
+
gradient.addColorStop(0.6, `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${safeAlpha * 0.6})`);
|
|
3056
|
+
gradient.addColorStop(1, `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0)`);
|
|
3057
|
+
ctx.fillStyle = gradient;
|
|
3058
|
+
// Use globalCompositeOperation to blend nicely
|
|
3059
|
+
ctx.globalCompositeOperation = 'screen';
|
|
3060
|
+
ctx.fillRect(0, 0, width, height);
|
|
3061
|
+
ctx.globalCompositeOperation = 'source-over';
|
|
3062
|
+
});
|
|
3063
|
+
};
|
|
3064
|
+
|
|
3065
|
+
const CanvasLayer = ({ type, colors, speed, particleCount, particleSize, starCount, starSize, intensity, clickable, }) => {
|
|
3066
|
+
const canvasRef = useRef(null);
|
|
3067
|
+
const containerRef = useRef(null);
|
|
3068
|
+
const requestRef = useRef(undefined);
|
|
3069
|
+
const frameCountRef = useRef(0);
|
|
3070
|
+
const mouseRef = useRef({ x: -9999, y: -9999 });
|
|
3071
|
+
const particlesRef = useRef([]);
|
|
3072
|
+
const starsRef = useRef([]);
|
|
3073
|
+
const waveOffsetRef = useRef(0);
|
|
3074
|
+
const handleResize = useCallback(() => {
|
|
3075
|
+
const canvas = canvasRef.current;
|
|
3076
|
+
const container = containerRef.current;
|
|
3077
|
+
if (!canvas || !container)
|
|
3078
|
+
return;
|
|
3079
|
+
const dpr = window.devicePixelRatio || 1;
|
|
3080
|
+
const rect = container.getBoundingClientRect();
|
|
3081
|
+
canvas.width = rect.width * dpr;
|
|
3082
|
+
canvas.height = rect.height * dpr;
|
|
3083
|
+
canvas.style.width = `${rect.width}px`;
|
|
3084
|
+
canvas.style.height = `${rect.height}px`;
|
|
3085
|
+
const ctx = canvas.getContext('2d');
|
|
3086
|
+
if (ctx)
|
|
3087
|
+
ctx.scale(dpr, dpr);
|
|
3088
|
+
}, []);
|
|
3089
|
+
const animate = useCallback(() => {
|
|
3090
|
+
const canvas = canvasRef.current;
|
|
3091
|
+
if (!canvas)
|
|
3092
|
+
return;
|
|
3093
|
+
const ctx = canvas.getContext('2d');
|
|
3094
|
+
if (!ctx)
|
|
3095
|
+
return;
|
|
3096
|
+
const dpr = window.devicePixelRatio || 1;
|
|
3097
|
+
const width = canvas.width / dpr;
|
|
3098
|
+
const height = canvas.height / dpr;
|
|
3099
|
+
ctx.clearRect(0, 0, width, height);
|
|
3100
|
+
const time = frameCountRef.current * (3000 / (speed || 3000));
|
|
3101
|
+
frameCountRef.current += 1;
|
|
3102
|
+
switch (type) {
|
|
3103
|
+
case 'particles':
|
|
3104
|
+
drawParticles(ctx, width, height, particlesRef, {
|
|
3105
|
+
count: particleCount,
|
|
3106
|
+
colors,
|
|
3107
|
+
size: particleSize,
|
|
3108
|
+
mouse: mouseRef.current,
|
|
3109
|
+
clickable,
|
|
2985
3110
|
});
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
}
|
|
3010
|
-
else {
|
|
3011
|
-
const angle = direction === 'left' ? '90deg' :
|
|
3012
|
-
direction === 'right' ? '270deg' :
|
|
3013
|
-
direction === 'up' ? '0deg' :
|
|
3014
|
-
direction === 'down' ? '180deg' :
|
|
3015
|
-
direction === 'diagonal' ? '45deg' : '90deg';
|
|
3016
|
-
return {
|
|
3017
|
-
background: `linear-gradient(${angle}, ${gradientColors.join(', ')})`,
|
|
3018
|
-
backgroundSize: '400% 400%',
|
|
3019
|
-
};
|
|
3020
|
-
}
|
|
3021
|
-
}
|
|
3022
|
-
return {};
|
|
3023
|
-
};
|
|
3024
|
-
const getWaveStyle = () => {
|
|
3025
|
-
if (type === 'wave') {
|
|
3026
|
-
return {
|
|
3027
|
-
'--wave-colors': colors.join(', '),
|
|
3028
|
-
};
|
|
3029
|
-
}
|
|
3030
|
-
return {};
|
|
3031
|
-
};
|
|
3032
|
-
const getAuroraStyle = () => {
|
|
3033
|
-
if (type === 'aurora') {
|
|
3034
|
-
return {
|
|
3035
|
-
'--aurora-colors': colors.join(', '),
|
|
3036
|
-
};
|
|
3037
|
-
}
|
|
3038
|
-
return {};
|
|
3039
|
-
};
|
|
3040
|
-
const getFireStyle = () => {
|
|
3041
|
-
if (type === 'fire') {
|
|
3042
|
-
return {
|
|
3043
|
-
'--fire-colors': colors.join(', '),
|
|
3044
|
-
};
|
|
3111
|
+
break;
|
|
3112
|
+
case 'stars':
|
|
3113
|
+
drawStars(ctx, width, height, starsRef, {
|
|
3114
|
+
count: starCount,
|
|
3115
|
+
colors,
|
|
3116
|
+
size: starSize,
|
|
3117
|
+
time,
|
|
3118
|
+
});
|
|
3119
|
+
break;
|
|
3120
|
+
case 'wave':
|
|
3121
|
+
drawWaves(ctx, width, height, {
|
|
3122
|
+
colors,
|
|
3123
|
+
offset: waveOffsetRef,
|
|
3124
|
+
speedFactor: 10000 / (speed || 5000),
|
|
3125
|
+
});
|
|
3126
|
+
break;
|
|
3127
|
+
case 'pulse':
|
|
3128
|
+
drawPulse(ctx, width, height, {
|
|
3129
|
+
colors,
|
|
3130
|
+
time,
|
|
3131
|
+
intensity,
|
|
3132
|
+
});
|
|
3133
|
+
break;
|
|
3045
3134
|
}
|
|
3046
|
-
|
|
3135
|
+
requestRef.current = requestAnimationFrame(animate);
|
|
3136
|
+
}, [
|
|
3137
|
+
type,
|
|
3138
|
+
colors,
|
|
3139
|
+
speed,
|
|
3140
|
+
particleCount,
|
|
3141
|
+
particleSize,
|
|
3142
|
+
starCount,
|
|
3143
|
+
starSize,
|
|
3144
|
+
intensity,
|
|
3145
|
+
clickable,
|
|
3146
|
+
]);
|
|
3147
|
+
useEffect(() => {
|
|
3148
|
+
handleResize();
|
|
3149
|
+
window.addEventListener('resize', handleResize);
|
|
3150
|
+
particlesRef.current = [];
|
|
3151
|
+
starsRef.current = [];
|
|
3152
|
+
waveOffsetRef.current = 0;
|
|
3153
|
+
frameCountRef.current = 0;
|
|
3154
|
+
requestRef.current = requestAnimationFrame(animate);
|
|
3155
|
+
return () => {
|
|
3156
|
+
window.removeEventListener('resize', handleResize);
|
|
3157
|
+
if (requestRef.current)
|
|
3158
|
+
cancelAnimationFrame(requestRef.current);
|
|
3159
|
+
};
|
|
3160
|
+
}, [animate, handleResize]);
|
|
3161
|
+
const handleMouseMove = (e) => {
|
|
3162
|
+
if (!containerRef.current)
|
|
3163
|
+
return;
|
|
3164
|
+
const rect = containerRef.current.getBoundingClientRect();
|
|
3165
|
+
mouseRef.current = {
|
|
3166
|
+
x: e.clientX - rect.left,
|
|
3167
|
+
y: e.clientY - rect.top,
|
|
3168
|
+
};
|
|
3047
3169
|
};
|
|
3048
|
-
const
|
|
3049
|
-
|
|
3050
|
-
return {
|
|
3051
|
-
'--ocean-colors': colors.join(', '),
|
|
3052
|
-
};
|
|
3053
|
-
}
|
|
3054
|
-
return {};
|
|
3170
|
+
const handleMouseLeave = () => {
|
|
3171
|
+
mouseRef.current = { x: -9999, y: -9999 };
|
|
3055
3172
|
};
|
|
3056
|
-
|
|
3057
|
-
|
|
3173
|
+
return (jsx("div", { ref: containerRef, className: "designbase-animation-background__canvas-layer", onMouseMove: handleMouseMove, onMouseLeave: handleMouseLeave, children: jsx("canvas", { ref: canvasRef, className: "designbase-animation-background__canvas" }) }));
|
|
3174
|
+
};
|
|
3175
|
+
|
|
3176
|
+
const CSSGradientLayer = ({ type, direction, colors, speed, }) => {
|
|
3177
|
+
const getBackgroundStyle = () => {
|
|
3178
|
+
const safeColors = colors.length > 0 ? colors : ['#ccc'];
|
|
3179
|
+
const gradientStr = safeColors.join(', ');
|
|
3180
|
+
if (type === 'gradient') {
|
|
3181
|
+
let angle = '90deg';
|
|
3182
|
+
switch (direction) {
|
|
3183
|
+
case 'up':
|
|
3184
|
+
angle = '0deg';
|
|
3185
|
+
break;
|
|
3186
|
+
case 'down':
|
|
3187
|
+
angle = '180deg';
|
|
3188
|
+
break;
|
|
3189
|
+
case 'left':
|
|
3190
|
+
angle = '270deg';
|
|
3191
|
+
break;
|
|
3192
|
+
case 'right':
|
|
3193
|
+
angle = '90deg';
|
|
3194
|
+
break;
|
|
3195
|
+
case 'diagonal':
|
|
3196
|
+
angle = '45deg';
|
|
3197
|
+
break;
|
|
3198
|
+
case 'radial':
|
|
3199
|
+
return {
|
|
3200
|
+
backgroundImage: `radial-gradient(circle, ${gradientStr})`,
|
|
3201
|
+
backgroundSize: '200% 200%',
|
|
3202
|
+
};
|
|
3203
|
+
}
|
|
3058
3204
|
return {
|
|
3059
|
-
|
|
3205
|
+
backgroundImage: `linear-gradient(${angle}, ${gradientStr})`,
|
|
3206
|
+
backgroundSize: '200% 200%',
|
|
3060
3207
|
};
|
|
3061
3208
|
}
|
|
3062
3209
|
return {};
|
|
3063
3210
|
};
|
|
3064
|
-
const
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3211
|
+
const duration = `${Math.max(2, speed / 1000)}s`;
|
|
3212
|
+
return (jsx("div", { className: "designbase-animation-background__css-layer", style: {
|
|
3213
|
+
...getBackgroundStyle(),
|
|
3214
|
+
animation: `designbase-gradient-move ${duration} ease infinite`,
|
|
3215
|
+
}, children: jsx("style", { children: `
|
|
3216
|
+
@keyframes designbase-gradient-move {
|
|
3217
|
+
0% { background-position: 0% 50%; }
|
|
3218
|
+
50% { background-position: 100% 50%; }
|
|
3219
|
+
100% { background-position: 0% 50%; }
|
|
3220
|
+
}
|
|
3221
|
+
` }) }));
|
|
3222
|
+
};
|
|
3223
|
+
|
|
3224
|
+
const MeshAuroraLayer = ({ colors, speed, blur, intensity, theme, }) => {
|
|
3225
|
+
const baseOpacity = intensity === 'subtle' ? 0.3 : intensity === 'medium' ? 0.6 : 0.8;
|
|
3226
|
+
const duration = Math.max(5, speed / 1000);
|
|
3227
|
+
const palette = colors.length >= 3
|
|
3228
|
+
? colors
|
|
3229
|
+
: ['#4f46e5', '#ec4899', '#06b6d4', '#8b5cf6'];
|
|
3230
|
+
const blendMode = theme === 'dark' ? 'screen' : 'multiply';
|
|
3231
|
+
const filterStyle = `blur(${blur}px)`;
|
|
3232
|
+
const blobBaseClass = 'designbase-animation-background__aurora-blob';
|
|
3233
|
+
return (jsxs("div", { className: "designbase-animation-background__aurora-mesh", children: [jsx("div", { className: blobBaseClass, style: {
|
|
3234
|
+
backgroundColor: palette[0],
|
|
3235
|
+
filter: filterStyle,
|
|
3236
|
+
opacity: baseOpacity,
|
|
3237
|
+
animationDuration: `${duration}s`,
|
|
3238
|
+
top: '-10%',
|
|
3239
|
+
left: '-10%',
|
|
3240
|
+
animationDelay: '0s',
|
|
3241
|
+
mixBlendMode: blendMode,
|
|
3242
|
+
} }), jsx("div", { className: blobBaseClass, style: {
|
|
3243
|
+
backgroundColor: palette[1],
|
|
3244
|
+
filter: filterStyle,
|
|
3245
|
+
opacity: baseOpacity,
|
|
3246
|
+
animationDuration: `${duration * 1.2}s`,
|
|
3247
|
+
top: '-10%',
|
|
3248
|
+
right: '-10%',
|
|
3249
|
+
animationDelay: '2s',
|
|
3250
|
+
mixBlendMode: blendMode,
|
|
3251
|
+
} }), jsx("div", { className: blobBaseClass, style: {
|
|
3252
|
+
backgroundColor: palette[2],
|
|
3253
|
+
filter: filterStyle,
|
|
3254
|
+
opacity: baseOpacity,
|
|
3255
|
+
animationDuration: `${duration * 1.5}s`,
|
|
3256
|
+
bottom: '-20%',
|
|
3257
|
+
left: '20%',
|
|
3258
|
+
animationDelay: '4s',
|
|
3259
|
+
mixBlendMode: blendMode,
|
|
3260
|
+
} }), palette[3] && (jsx("div", { className: blobBaseClass, style: {
|
|
3261
|
+
backgroundColor: palette[3],
|
|
3262
|
+
filter: filterStyle,
|
|
3263
|
+
opacity: baseOpacity,
|
|
3264
|
+
animationDuration: `${duration * 1.1}s`,
|
|
3265
|
+
bottom: '-10%',
|
|
3266
|
+
right: '-10%',
|
|
3267
|
+
animationDelay: '1s',
|
|
3268
|
+
mixBlendMode: blendMode,
|
|
3269
|
+
} })), jsx("div", { className: "designbase-animation-background__aurora-noise", style: {
|
|
3270
|
+
opacity: theme === 'dark' ? 0.03 : 0.05,
|
|
3271
|
+
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")`,
|
|
3272
|
+
} })] }));
|
|
3273
|
+
};
|
|
3274
|
+
|
|
3275
|
+
const GridOverlay = ({ size = 40, color = '#ffffff', opacity = 0.1, }) => {
|
|
3070
3276
|
const style = {
|
|
3277
|
+
position: 'absolute',
|
|
3278
|
+
inset: 0,
|
|
3279
|
+
width: '100%',
|
|
3280
|
+
height: '100%',
|
|
3281
|
+
pointerEvents: 'none',
|
|
3282
|
+
zIndex: 1,
|
|
3283
|
+
backgroundImage: `
|
|
3284
|
+
linear-gradient(to right, ${color} 1px, transparent 1px),
|
|
3285
|
+
linear-gradient(to bottom, ${color} 1px, transparent 1px)
|
|
3286
|
+
`,
|
|
3287
|
+
backgroundSize: `${size}px ${size}px`,
|
|
3288
|
+
opacity,
|
|
3289
|
+
// 은은하게 전체에 라인 유지, 맨 아래만 살짝 페이드
|
|
3290
|
+
maskImage: 'linear-gradient(to bottom, black 0%, black 92%, transparent 100%)',
|
|
3291
|
+
WebkitMaskImage: 'linear-gradient(to bottom, black 0%, black 92%, transparent 100%)',
|
|
3292
|
+
};
|
|
3293
|
+
return jsx("div", { className: "designbase-animation-background__grid-overlay", style: style });
|
|
3294
|
+
};
|
|
3295
|
+
|
|
3296
|
+
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, }) => {
|
|
3297
|
+
const backgroundColor = theme === 'dark' ? 'var(--db-surface-base, #0f172a)' : 'var(--db-surface-base, #ffffff)';
|
|
3298
|
+
const effectiveGridColor = gridColor ?? (theme === 'dark' ? '#ffffff' : '#000000');
|
|
3299
|
+
const containerStyle = {
|
|
3071
3300
|
width: typeof width === 'number' ? `${width}px` : width,
|
|
3072
3301
|
height: typeof height === 'number' ? `${height}px` : height,
|
|
3073
3302
|
borderRadius: typeof borderRadius === 'number' ? `${borderRadius}px` : borderRadius,
|
|
3074
3303
|
opacity,
|
|
3075
3304
|
mixBlendMode: blendMode,
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
...getFireStyle(),
|
|
3080
|
-
...getOceanStyle(),
|
|
3081
|
-
...getSunsetStyle(),
|
|
3082
|
-
'--db-animation-speed': `${speed}ms`,
|
|
3305
|
+
position: 'relative',
|
|
3306
|
+
overflow: 'hidden',
|
|
3307
|
+
backgroundColor: type !== 'gradient' ? backgroundColor : undefined,
|
|
3083
3308
|
};
|
|
3084
|
-
const
|
|
3085
|
-
if (
|
|
3086
|
-
return
|
|
3309
|
+
const content = useMemo(() => {
|
|
3310
|
+
if (disabled)
|
|
3311
|
+
return null;
|
|
3312
|
+
switch (type) {
|
|
3313
|
+
case 'particles':
|
|
3314
|
+
case 'stars':
|
|
3315
|
+
case 'wave':
|
|
3316
|
+
case 'pulse':
|
|
3317
|
+
return (jsx(CanvasLayer, { type: type, colors: colors, speed: speed, particleCount: particleCount, particleSize: particleSize, starCount: starCount, starSize: starSize, intensity: intensity, clickable: clickable }));
|
|
3318
|
+
case 'aurora':
|
|
3319
|
+
return (jsx(MeshAuroraLayer, { colors: colors, speed: speed, blur: blur, intensity: intensity, theme: theme }));
|
|
3320
|
+
case 'gradient':
|
|
3321
|
+
return (jsx(CSSGradientLayer, { type: type, direction: direction, colors: colors, speed: speed }));
|
|
3322
|
+
default:
|
|
3323
|
+
return null;
|
|
3087
3324
|
}
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3325
|
+
}, [
|
|
3326
|
+
type,
|
|
3327
|
+
disabled,
|
|
3328
|
+
colors,
|
|
3329
|
+
speed,
|
|
3330
|
+
intensity,
|
|
3331
|
+
blur,
|
|
3332
|
+
theme,
|
|
3333
|
+
particleCount,
|
|
3334
|
+
particleSize,
|
|
3335
|
+
starCount,
|
|
3336
|
+
starSize,
|
|
3337
|
+
clickable,
|
|
3338
|
+
direction,
|
|
3339
|
+
]);
|
|
3340
|
+
const classes = classNames('designbase-animation-background', `designbase-animation-background--${type}`, {
|
|
3341
|
+
'designbase-animation-background--clickable': clickable,
|
|
3342
|
+
'designbase-animation-background--disabled': disabled,
|
|
3343
|
+
}, className);
|
|
3344
|
+
return (jsxs("div", { className: classes, style: containerStyle, onClick: clickable && !disabled ? onClick : undefined, children: [jsx("div", { className: "designbase-animation-background__layers", style: {
|
|
3345
|
+
position: 'absolute',
|
|
3346
|
+
inset: 0,
|
|
3347
|
+
width: '100%',
|
|
3348
|
+
height: '100%',
|
|
3349
|
+
zIndex: 0,
|
|
3350
|
+
}, children: content }), showGrid && (jsx(GridOverlay, { size: gridSize, color: effectiveGridColor, opacity: gridOpacity })), children && (jsx("div", { className: "designbase-animation-background__content", style: { position: 'relative', zIndex: 10, width: '100%', height: '100%' }, children: children }))] }));
|
|
3091
3351
|
};
|
|
3092
3352
|
|
|
3093
|
-
const AnimationText = ({ children, type = 'fade', speed = 1000, repeat =
|
|
3353
|
+
const AnimationText = ({ children, trigger = 'mount', type = 'fade', speed = 1000, repeat = 1, 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, }) => {
|
|
3094
3354
|
const [isVisible, setIsVisible] = useState(false);
|
|
3095
|
-
const [currentIndex, setCurrentIndex] = useState(0);
|
|
3096
3355
|
const [isAnimating, setIsAnimating] = useState(false);
|
|
3356
|
+
// Initialize with full text unless it's a mount trigger for typing/decode
|
|
3357
|
+
const [displayText, setDisplayText] = useState((type === 'decode' || type === 'typing') && trigger === 'mount' ? '' : children);
|
|
3358
|
+
const [currentRepeat, setCurrentRepeat] = useState(0);
|
|
3097
3359
|
const textRef = useRef(null);
|
|
3098
|
-
useRef(null);
|
|
3099
|
-
//
|
|
3100
|
-
const [displayText, setDisplayText] = useState('');
|
|
3360
|
+
const observerRef = useRef(null);
|
|
3361
|
+
// Initial trigger logic
|
|
3101
3362
|
useEffect(() => {
|
|
3102
|
-
if (
|
|
3363
|
+
if (trigger === 'mount') {
|
|
3103
3364
|
const timer = setTimeout(() => {
|
|
3104
3365
|
setIsVisible(true);
|
|
3366
|
+
startAnimation();
|
|
3105
3367
|
}, delay);
|
|
3106
3368
|
return () => clearTimeout(timer);
|
|
3107
3369
|
}
|
|
3108
|
-
else {
|
|
3109
|
-
|
|
3370
|
+
else if (trigger === 'in-view' && textRef.current) {
|
|
3371
|
+
observerRef.current = new IntersectionObserver((entries) => {
|
|
3372
|
+
if (entries[0].isIntersecting) {
|
|
3373
|
+
setTimeout(() => {
|
|
3374
|
+
setIsVisible(true);
|
|
3375
|
+
startAnimation();
|
|
3376
|
+
}, delay);
|
|
3377
|
+
observerRef.current?.disconnect();
|
|
3378
|
+
}
|
|
3379
|
+
});
|
|
3380
|
+
observerRef.current.observe(textRef.current);
|
|
3381
|
+
return () => observerRef.current?.disconnect();
|
|
3110
3382
|
}
|
|
3111
|
-
}, [delay]);
|
|
3112
|
-
//
|
|
3383
|
+
}, [trigger, delay]);
|
|
3384
|
+
// Update initial text visibility when props change
|
|
3113
3385
|
useEffect(() => {
|
|
3114
|
-
if (type === 'typing' &&
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
clearInterval(typeInterval);
|
|
3121
|
-
return prev;
|
|
3122
|
-
}
|
|
3123
|
-
setDisplayText(children.slice(0, prev + 1));
|
|
3124
|
-
return prev + 1;
|
|
3125
|
-
});
|
|
3126
|
-
}, speed / children.length);
|
|
3127
|
-
return () => clearInterval(typeInterval);
|
|
3386
|
+
if ((type === 'typing' || type === 'decode') && trigger === 'mount') ;
|
|
3387
|
+
else {
|
|
3388
|
+
// For hover/click, ensure text is visible when not animating
|
|
3389
|
+
if (!isAnimating) {
|
|
3390
|
+
setDisplayText(children);
|
|
3391
|
+
}
|
|
3128
3392
|
}
|
|
3129
|
-
}, [
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3393
|
+
}, [children, type, trigger]);
|
|
3394
|
+
const startAnimation = () => {
|
|
3395
|
+
setIsAnimating(true);
|
|
3396
|
+
setCurrentRepeat(0);
|
|
3397
|
+
if (type === 'typing') {
|
|
3398
|
+
startTyping(0);
|
|
3399
|
+
}
|
|
3400
|
+
else if (type === 'decode') {
|
|
3401
|
+
startDecoding(0);
|
|
3402
|
+
}
|
|
3403
|
+
};
|
|
3404
|
+
const startTyping = (iteration) => {
|
|
3405
|
+
setDisplayText('');
|
|
3406
|
+
let currentIndex = 0;
|
|
3407
|
+
const interval = setInterval(() => {
|
|
3408
|
+
if (currentIndex >= children.length) {
|
|
3409
|
+
clearInterval(interval);
|
|
3410
|
+
// Repetition logic
|
|
3411
|
+
if (repeat === 0 || iteration < repeat - 1) {
|
|
3412
|
+
setTimeout(() => {
|
|
3413
|
+
startTyping(iteration + 1);
|
|
3414
|
+
}, 500);
|
|
3415
|
+
}
|
|
3416
|
+
else {
|
|
3137
3417
|
setIsAnimating(false);
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3418
|
+
}
|
|
3419
|
+
return;
|
|
3420
|
+
}
|
|
3421
|
+
setDisplayText(children.slice(0, currentIndex + 1));
|
|
3422
|
+
currentIndex++;
|
|
3423
|
+
}, speed / children.length);
|
|
3424
|
+
};
|
|
3425
|
+
const startDecoding = (iteration) => {
|
|
3426
|
+
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+';
|
|
3427
|
+
let iterations = 0;
|
|
3428
|
+
const interval = setInterval(() => {
|
|
3429
|
+
setDisplayText(children.split('').map((char, index) => {
|
|
3430
|
+
if (index < iterations) {
|
|
3431
|
+
return children[index];
|
|
3432
|
+
}
|
|
3433
|
+
return characters[Math.floor(Math.random() * characters.length)];
|
|
3434
|
+
}).join(''));
|
|
3435
|
+
if (iterations >= children.length) {
|
|
3436
|
+
clearInterval(interval);
|
|
3437
|
+
setDisplayText(children);
|
|
3438
|
+
// Repetition logic
|
|
3439
|
+
if (repeat === 0 || iteration < repeat - 1) {
|
|
3440
|
+
setTimeout(() => {
|
|
3441
|
+
startDecoding(iteration + 1);
|
|
3442
|
+
}, 500);
|
|
3443
|
+
}
|
|
3444
|
+
else {
|
|
3445
|
+
setIsAnimating(false);
|
|
3446
|
+
}
|
|
3447
|
+
}
|
|
3448
|
+
iterations += 1 / 3;
|
|
3449
|
+
}, 30);
|
|
3450
|
+
};
|
|
3451
|
+
const handleMouseEnter = () => {
|
|
3452
|
+
if (trigger === 'hover') {
|
|
3453
|
+
setIsVisible(true);
|
|
3454
|
+
startAnimation();
|
|
3455
|
+
}
|
|
3456
|
+
};
|
|
3457
|
+
const handleMouseLeave = () => {
|
|
3458
|
+
if (trigger === 'hover') {
|
|
3459
|
+
setIsVisible(false);
|
|
3460
|
+
setIsAnimating(false);
|
|
3461
|
+
if (type === 'typing' || type === 'decode') {
|
|
3462
|
+
setDisplayText(children);
|
|
3146
3463
|
}
|
|
3147
3464
|
}
|
|
3148
|
-
}
|
|
3465
|
+
};
|
|
3149
3466
|
const handleClick = () => {
|
|
3467
|
+
if (trigger === 'click') {
|
|
3468
|
+
setIsVisible(!isVisible);
|
|
3469
|
+
if (isVisible) {
|
|
3470
|
+
setIsAnimating(false);
|
|
3471
|
+
if (type === 'typing' || type === 'decode') {
|
|
3472
|
+
setDisplayText(children);
|
|
3473
|
+
}
|
|
3474
|
+
}
|
|
3475
|
+
else {
|
|
3476
|
+
startAnimation();
|
|
3477
|
+
}
|
|
3478
|
+
}
|
|
3150
3479
|
if (clickable && !disabled && onClick) {
|
|
3151
3480
|
onClick();
|
|
3152
3481
|
}
|
|
@@ -3163,14 +3492,6 @@ const AnimationText = ({ children, type = 'fade', speed = 1000, repeat = 0, dela
|
|
|
3163
3492
|
}
|
|
3164
3493
|
return {};
|
|
3165
3494
|
};
|
|
3166
|
-
const getWaveStyle = () => {
|
|
3167
|
-
if (type === 'wave') {
|
|
3168
|
-
return {
|
|
3169
|
-
'--wave-colors': waveColors.join(', '),
|
|
3170
|
-
};
|
|
3171
|
-
}
|
|
3172
|
-
return {};
|
|
3173
|
-
};
|
|
3174
3495
|
const getGlowStyle = () => {
|
|
3175
3496
|
if (type === 'glow') {
|
|
3176
3497
|
return {
|
|
@@ -3179,26 +3500,52 @@ const AnimationText = ({ children, type = 'fade', speed = 1000, repeat = 0, dela
|
|
|
3179
3500
|
}
|
|
3180
3501
|
return {};
|
|
3181
3502
|
};
|
|
3182
|
-
|
|
3503
|
+
// For typing, the class should be applied to the inner element to handle caret correctly with ghost element
|
|
3504
|
+
const containerClasses = classNames('designbase-animation-text',
|
|
3505
|
+
// Exclude typing logic from outer container to prevent caret on full-width ghost container
|
|
3506
|
+
type !== 'typing' && `designbase-animation-text--${type}`, `designbase-animation-text--${size}`, `designbase-animation-text--${color}`, `designbase-animation-text--${weight}`, `designbase-animation-text--${align}`, `designbase-animation-text--${direction}`, {
|
|
3183
3507
|
'designbase-animation-text--visible': isVisible,
|
|
3184
3508
|
'designbase-animation-text--animating': isAnimating,
|
|
3185
|
-
'designbase-animation-text--clickable': clickable,
|
|
3509
|
+
'designbase-animation-text--clickable': clickable || trigger === 'click',
|
|
3186
3510
|
'designbase-animation-text--disabled': disabled,
|
|
3187
3511
|
}, className);
|
|
3188
3512
|
const style = {
|
|
3189
3513
|
...getGradientStyle(),
|
|
3190
|
-
...getWaveStyle(),
|
|
3191
3514
|
...getGlowStyle(),
|
|
3192
3515
|
'--db-animation-speed': `${speed}ms`,
|
|
3193
3516
|
'--db-text-custom': customColor,
|
|
3517
|
+
'--db-wave-colors': waveColors.join(', '),
|
|
3518
|
+
'--db-animation-iteration-count': repeat === 0 ? 'infinite' : repeat,
|
|
3194
3519
|
};
|
|
3195
|
-
const
|
|
3196
|
-
if (type === '
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3520
|
+
const renderContent = () => {
|
|
3521
|
+
if (type === 'wave' || type === 'shake') {
|
|
3522
|
+
if (!isVisible && !isAnimating)
|
|
3523
|
+
return children;
|
|
3524
|
+
return children.split('').map((char, index) => (jsx("span", { style: {
|
|
3525
|
+
animationDelay: `${index * 0.05}s`,
|
|
3526
|
+
display: 'inline-block'
|
|
3527
|
+
}, children: char === ' ' ? '\u00A0' : char }, index)));
|
|
3528
|
+
}
|
|
3529
|
+
return displayText;
|
|
3530
|
+
};
|
|
3531
|
+
return (jsxs("div", { ref: textRef, className: containerClasses, style: style, onClick: handleClick, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: [jsx("span", { "aria-hidden": "true", style: {
|
|
3532
|
+
visibility: 'hidden',
|
|
3533
|
+
pointerEvents: 'none',
|
|
3534
|
+
userSelect: 'none',
|
|
3535
|
+
whiteSpace: type === 'typing' ? 'pre-wrap' : undefined
|
|
3536
|
+
}, children: children }), jsx("span", { className: classNames({
|
|
3537
|
+
'designbase-animation-text--typing': type === 'typing',
|
|
3538
|
+
'designbase-animation-text--animating': isAnimating && type === 'typing' // Ensure animating class is passed for typing caret
|
|
3539
|
+
}), style: {
|
|
3540
|
+
position: 'absolute',
|
|
3541
|
+
top: 0,
|
|
3542
|
+
left: 0,
|
|
3543
|
+
// For typing, we want width to be auto so caret follows text
|
|
3544
|
+
// For others, width 100% matches ghost element
|
|
3545
|
+
width: type === 'typing' ? 'auto' : '100%',
|
|
3546
|
+
height: '100%',
|
|
3547
|
+
whiteSpace: type === 'typing' ? 'pre-wrap' : undefined // Ensure pre-wrap behavior matches
|
|
3548
|
+
}, children: renderContent() })] }));
|
|
3202
3549
|
};
|
|
3203
3550
|
|
|
3204
3551
|
const AudioPlayer = ({ src, title, artist, album, albumArt, size = 'm', variant = 'default', theme = 'auto', autoPlay = false, loop = false, muted = false, showControls = true, enableKeyboard = true, showProgress = true, showTime = true, showVolume = true, showSettings = false, playlist = [], currentIndex = 0, autoPause = true, playbackRates = [0.5, 0.75, 1, 1.25, 1.5, 2], defaultPlaybackRate = 1, repeatMode = 'none', shuffle = false, onPlay, onPause, onEnded, onTimeUpdate, onVolumeChange, onPlaylistChange, onPlaybackRateChange, onRepeatModeChange, onShuffleChange, onError, className, }) => {
|
|
@@ -3960,6 +4307,7 @@ SegmentControl.displayName = 'SegmentControl';
|
|
|
3960
4307
|
|
|
3961
4308
|
const Modal = ({ isOpen, onClose, title, size = 'm', closeOnOutsideClick = true, closeOnEscape = true, children, className, overlayClassName, }) => {
|
|
3962
4309
|
const modalRef = useRef(null);
|
|
4310
|
+
const titleId = useId();
|
|
3963
4311
|
// 아이콘 크기 계산 (m이 기본값)
|
|
3964
4312
|
const iconSize = size === 's' ? 16 : size === 'l' ? 20 : size === 'xl' ? 24 : 18;
|
|
3965
4313
|
// Prevent scrolling while modal is open
|
|
@@ -3991,11 +4339,11 @@ const Modal = ({ isOpen, onClose, title, size = 'm', closeOnOutsideClick = true,
|
|
|
3991
4339
|
return null;
|
|
3992
4340
|
const modalClasses = clsx('designbase-modal', `designbase-modal--${size}`, className);
|
|
3993
4341
|
const overlayClasses = clsx('designbase-modal__overlay', overlayClassName);
|
|
3994
|
-
return (jsx("div", { className: overlayClasses, onClick: closeOnOutsideClick ? onClose : undefined, children: jsxs("div", { ref: modalRef, className: modalClasses, onClick: (e) => e.stopPropagation(), role: "dialog", "aria-modal": "true", "aria-labelledby": title ?
|
|
4342
|
+
return (jsx("div", { className: overlayClasses, onClick: closeOnOutsideClick ? onClose : undefined, children: jsxs("div", { ref: modalRef, className: modalClasses, onClick: (e) => e.stopPropagation(), role: "dialog", "aria-modal": "true", "aria-labelledby": title ? titleId : undefined, children: [title && (jsx(ModalHeader, { title: title, titleId: titleId, showCloseButton: true, onClose: onClose, iconSize: iconSize })), jsx("div", { className: "designbase-modal__content", children: children })] }) }));
|
|
3995
4343
|
};
|
|
3996
|
-
const ModalHeader = ({ title, showCloseButton = true, onClose, iconSize = 20, className, children, }) => {
|
|
4344
|
+
const ModalHeader = ({ title, titleId, showCloseButton = true, onClose, iconSize = 20, className, children, }) => {
|
|
3997
4345
|
const classes = clsx('designbase-modal__header', className);
|
|
3998
|
-
return (jsxs("div", { className: classes, children: [jsxs("div", { className: "designbase-modal__header-content", children: [title && (jsx("h2", { id:
|
|
4346
|
+
return (jsxs("div", { className: classes, children: [jsxs("div", { className: "designbase-modal__header-content", children: [title && (jsx("h2", { id: titleId || 'modal-title', className: "designbase-modal__title", children: title })), children] }), showCloseButton && onClose && (jsx("button", { type: "button", onClick: onClose, "aria-label": "\uBAA8\uB2EC \uB2EB\uAE30", className: "designbase-modal__close-button", children: jsx(CloseIcon, { size: iconSize, color: "currentColor" }) }))] }));
|
|
3999
4347
|
};
|
|
4000
4348
|
const ModalBody = ({ className, children, }) => {
|
|
4001
4349
|
const classes = clsx('designbase-modal__body', className);
|
|
@@ -4253,11 +4601,12 @@ const SearchBar = ({ value, defaultValue = '', placeholder = '검색...', size =
|
|
|
4253
4601
|
};
|
|
4254
4602
|
SearchBar.displayName = 'SearchBar';
|
|
4255
4603
|
|
|
4256
|
-
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 }) => {
|
|
4604
|
+
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 }) => {
|
|
4257
4605
|
const [isOpen, setIsOpen] = useState(false);
|
|
4258
4606
|
const [selectedValue, setSelectedValue] = useState(value ?? defaultValue ?? (multiple ? [] : ''));
|
|
4259
4607
|
const [searchTerm, setSearchTerm] = useState('');
|
|
4260
4608
|
const [focusedIndex, setFocusedIndex] = useState(-1);
|
|
4609
|
+
const labelId = useId();
|
|
4261
4610
|
const containerRef = useRef(null);
|
|
4262
4611
|
const inputRef = useRef(null);
|
|
4263
4612
|
const dropdownRef = useRef(null);
|
|
@@ -4412,11 +4761,12 @@ const Select = ({ value, defaultValue, options, label, placeholder = '선택하
|
|
|
4412
4761
|
});
|
|
4413
4762
|
const dropdownClasses = clsx('designbase-select__dropdown', `designbase-select__dropdown--${dropdownWidth}`, `designbase-select__dropdown--${position}`, {
|
|
4414
4763
|
'designbase-select__dropdown--open': isOpen,
|
|
4764
|
+
'designbase-select__dropdown--mobile-sheet': useMobileBottomSheet,
|
|
4415
4765
|
});
|
|
4416
4766
|
const filteredOptions = getFilteredOptions();
|
|
4417
4767
|
const selectedLabels = getSelectedLabels();
|
|
4418
4768
|
const hasValue = multiple ? selectedValue.length > 0 : selectedValue !== '';
|
|
4419
|
-
return (jsxs("div", { className: classes, ref: containerRef, children: [label && (jsxs("label", { className: "designbase-select__label", children: [label, required && jsx("span", { className: "designbase-select__required", children: "*" })] })), jsxs("div", { className: triggerClasses, onClick: handleToggle, onFocus: onFocus, onBlur: onBlur, tabIndex: disabled || readOnly ? -1 : 0, role: "combobox", "aria-expanded": isOpen, "aria-haspopup": "listbox", "aria-labelledby": label ?
|
|
4769
|
+
return (jsxs("div", { className: classes, ref: containerRef, children: [label && (jsxs("label", { id: labelId, className: "designbase-select__label", children: [label, required && jsx("span", { className: "designbase-select__required", children: "*" })] })), jsxs("div", { className: triggerClasses, onClick: handleToggle, onFocus: onFocus, onBlur: onBlur, tabIndex: disabled || readOnly ? -1 : 0, role: "combobox", "aria-expanded": isOpen, "aria-haspopup": "listbox", "aria-labelledby": label ? labelId : undefined, ...props, children: [jsx("div", { className: "designbase-select__value", children: multiple ? (jsx("div", { className: "designbase-select__tags", ref: tagsContainerRef, children: selectedValue.map((value) => {
|
|
4420
4770
|
const option = options.find(opt => opt.value === value);
|
|
4421
4771
|
return (jsxs("span", { className: "designbase-select__tag", children: [jsx("span", { className: "designbase-select__tag-label", children: option?.label || value }), jsx("button", { type: "button", className: "designbase-select__tag-remove", onClick: (e) => {
|
|
4422
4772
|
e.stopPropagation();
|
|
@@ -5036,7 +5386,7 @@ const Card = forwardRef(function Card({ title, subtitle, description, children,
|
|
|
5036
5386
|
return null;
|
|
5037
5387
|
return (jsx("div", { className: "designbase-card__actions", children: actions.map((action, index) => {
|
|
5038
5388
|
const ActionIcon = action.icon;
|
|
5039
|
-
return (jsx(Button, { variant: action.variant || 'primary', size: action.size || 's', onClick: () => handleActionClick(action, index), disabled: action.disabled || disabled, loading: !!action.loading,
|
|
5389
|
+
return (jsx(Button, { variant: action.variant || 'primary', size: action.size || 's', onClick: () => handleActionClick(action, index), disabled: action.disabled || disabled, loading: !!action.loading, startIcon: ActionIcon, children: action.label }, index));
|
|
5040
5390
|
}) }));
|
|
5041
5391
|
};
|
|
5042
5392
|
const renderContent = () => (jsxs("div", { className: "designbase-card__content", children: [renderIcon(), (title || subtitle) && (jsxs("div", { className: "designbase-card__header", children: [title && jsx("h3", { className: "designbase-card__title", children: title }), subtitle && jsx("p", { className: "designbase-card__subtitle", children: subtitle })] })), description && jsx("p", { className: "designbase-card__description", children: description }), children && jsx("div", { className: "designbase-card__body", children: children }), renderTags(), renderMeta(), renderActions()] }));
|
|
@@ -7812,7 +8162,7 @@ const Stat = ({ value, label, icon, iconPosition = 'left', size = 'm', variant =
|
|
|
7812
8162
|
return;
|
|
7813
8163
|
onClick?.();
|
|
7814
8164
|
};
|
|
7815
|
-
return (jsxs("div", { className: classes, style: customStyle, onClick: handleClick, role: clickable ? 'button' : undefined, tabIndex: clickable ? 0 : undefined, children: [icon && (jsx("div", { className: clsx('designbase-stat__icon', `designbase-stat__icon--${iconPosition}`), children: icon })), jsxs("div", { className: "designbase-stat__content", children: [
|
|
8165
|
+
return (jsxs("div", { className: classes, style: customStyle, onClick: handleClick, role: clickable ? 'button' : undefined, tabIndex: clickable ? 0 : undefined, children: [icon && (jsx("div", { className: clsx('designbase-stat__icon', `designbase-stat__icon--${iconPosition}`), children: icon })), jsxs("div", { className: "designbase-stat__content", children: [jsx("div", { className: "designbase-stat__main", children: variant === 'iconBox' ? (jsxs(Fragment, { children: [jsx("div", { className: "designbase-stat__label", children: label }), jsx("div", { className: "designbase-stat__value", children: value })] })) : (jsxs(Fragment, { children: [jsx("div", { className: "designbase-stat__value", children: value }), jsx("div", { className: "designbase-stat__label", children: label })] })) }), showChange && change && (jsx("div", { className: clsx('designbase-stat__change', getChangeClass()), children: getChangeText() })), showDescription && description && (jsx("div", { className: "designbase-stat__description", children: description }))] }), showProgress && typeof progress === 'number' && (jsx("div", { className: "designbase-stat__progress", children: 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' }) }))] }));
|
|
7816
8166
|
};
|
|
7817
8167
|
|
|
7818
8168
|
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, }) => {
|
|
@@ -10664,7 +11014,7 @@ const Share = ({ url, title, description = '', imageUrl, hashtags = [], variant
|
|
|
10664
11014
|
}
|
|
10665
11015
|
};
|
|
10666
11016
|
|
|
10667
|
-
const Sidebar = ({ size = 'm', variant = 'default', position = 'left', logo, onLogoClick, items = [], onItemClick, userProfile, userMenuItems = [], onUserMenuItemClick, collapsed = false, onToggle, collapsible = true, fixed = false, fullHeight = false, shadow = false, className, ...props }) => {
|
|
11017
|
+
const Sidebar = ({ size = 'm', variant = 'default', position = 'left', showLogo = false, logo, onLogoClick, items = [], onItemClick, userProfile, userMenuItems = [], onUserMenuItemClick, collapsed = false, onToggle, collapsible = true, fixed = false, fullHeight = false, shadow = false, className, ...props }) => {
|
|
10668
11018
|
const [expandedItems, setExpandedItems] = useState([]);
|
|
10669
11019
|
const handleToggle = () => {
|
|
10670
11020
|
if (onToggle) {
|
|
@@ -10705,24 +11055,24 @@ const Sidebar = ({ size = 'm', variant = 'default', position = 'left', logo, onL
|
|
|
10705
11055
|
const hasChildren = item.children && item.children.length > 0;
|
|
10706
11056
|
return (jsx("li", { className: "designbase-sidebar__item", children: jsx(MenuItem, { ...item, type: "block", style: "accordion", depth: level, expanded: isExpanded, expandable: hasChildren, onClick: () => handleItemClick(item), onChildClick: (child) => handleItemClick(child) }) }, item.id));
|
|
10707
11057
|
};
|
|
10708
|
-
return (jsx("aside", { className: classes, role: "complementary", "aria-label": "\uC0AC\uC774\uB4DC\uBC14 \uB124\uBE44\uAC8C\uC774\uC158", ...props, children: jsxs("div", { className: "designbase-sidebar__container", children: [jsxs("div", { className: "designbase-sidebar__header", children: [jsx("div", { className: "designbase-sidebar__logo", onClick: onLogoClick, role: onLogoClick ? 'button' : undefined, tabIndex: onLogoClick ? 0 : undefined, onKeyDown: (e) => {
|
|
11058
|
+
return (jsx("aside", { className: classes, role: "complementary", "aria-label": "\uC0AC\uC774\uB4DC\uBC14 \uB124\uBE44\uAC8C\uC774\uC158", ...props, children: jsxs("div", { className: "designbase-sidebar__container", children: [showLogo && (jsxs("div", { className: "designbase-sidebar__header", children: [jsx("div", { className: "designbase-sidebar__logo", onClick: onLogoClick, role: onLogoClick ? 'button' : undefined, tabIndex: onLogoClick ? 0 : undefined, onKeyDown: (e) => {
|
|
10709
11059
|
if (onLogoClick && (e.key === 'Enter' || e.key === ' ')) {
|
|
10710
11060
|
e.preventDefault();
|
|
10711
11061
|
onLogoClick();
|
|
10712
11062
|
}
|
|
10713
11063
|
}, children: logo || jsx(Logo, { size: "s" }) }), collapsible && (jsx(Button, { variant: "ghost", size: "s", iconOnly: true, className: "designbase-sidebar__toggle", onPress: handleToggle, "aria-label": collapsed ? '사이드바 펼치기' : '사이드바 접기', children: jsx(ChevronLeftIcon, { className: clsx('designbase-sidebar__toggle-icon', {
|
|
10714
11064
|
'designbase-sidebar__toggle-icon--collapsed': collapsed,
|
|
10715
|
-
}) }) }))] }), jsx("nav", { className: "designbase-sidebar__nav", children: jsx("ul", { className: "designbase-sidebar__nav-list", children: items.map((item) => renderSidebarItem(item)) }) }), userProfile && !collapsed && (jsxs("div", { className: "designbase-sidebar__user", children: [jsxs("div", { className: "designbase-sidebar__user-info", onClick: () => onUserMenuItemClick?.({ id: 'profile', label: '프로필', href: '#' }), role: "button", tabIndex: 0, onKeyDown: (e) => {
|
|
11065
|
+
}) }) }))] })), jsx("nav", { className: "designbase-sidebar__nav", children: jsx("ul", { className: "designbase-sidebar__nav-list", children: items.map((item) => renderSidebarItem(item)) }) }), userProfile && !collapsed && (jsxs("div", { className: "designbase-sidebar__user", children: [jsxs("div", { className: "designbase-sidebar__user-info", onClick: () => onUserMenuItemClick?.({ id: 'profile', label: '프로필', href: '#' }), role: "button", tabIndex: 0, onKeyDown: (e) => {
|
|
10716
11066
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
10717
11067
|
e.preventDefault();
|
|
10718
11068
|
onUserMenuItemClick?.({ id: 'profile', label: '프로필', href: '#' });
|
|
10719
11069
|
}
|
|
10720
|
-
}, style: { cursor: 'pointer' }, children: [
|
|
11070
|
+
}, style: { cursor: 'pointer' }, children: [jsx(Avatar, { src: userProfile.avatar, initials: userProfile.name, alt: userProfile.name, size: "s", className: "designbase-sidebar__user-avatar" }), jsxs("div", { className: "designbase-sidebar__user-details", children: [jsx("div", { className: "designbase-sidebar__user-name", children: userProfile.name }), userProfile.email && (jsx("div", { className: "designbase-sidebar__user-email", children: userProfile.email })), userProfile.role && (jsx("div", { className: "designbase-sidebar__user-role", children: userProfile.role }))] })] }), userMenuItems.length > 0 && (jsx("ul", { className: "designbase-sidebar__user-menu", children: userMenuItems.map((item) => (jsx("li", { children: jsx(MenuItem, { id: item.id, label: item.label, href: item.href, icon: item.icon, disabled: item.disabled, type: "block", style: "accordion", onClick: () => handleUserMenuItemClick(item) }) }, item.id))) }))] })), userProfile && collapsed && (jsx("div", { className: "designbase-sidebar__user-collapsed", onClick: () => onUserMenuItemClick?.({ id: 'profile', label: '프로필', href: '#' }), role: "button", tabIndex: 0, onKeyDown: (e) => {
|
|
10721
11071
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
10722
11072
|
e.preventDefault();
|
|
10723
11073
|
onUserMenuItemClick?.({ id: 'profile', label: '프로필', href: '#' });
|
|
10724
11074
|
}
|
|
10725
|
-
}, style: { cursor: 'pointer' }, children:
|
|
11075
|
+
}, style: { cursor: 'pointer' }, children: jsx(Avatar, { src: userProfile.avatar, initials: userProfile.name, alt: userProfile.name, size: "s", className: "designbase-sidebar__user-avatar-collapsed" }) }))] }) }));
|
|
10726
11076
|
};
|
|
10727
11077
|
Sidebar.displayName = 'Sidebar';
|
|
10728
11078
|
|
|
@@ -11490,7 +11840,7 @@ const Toast = ({ id, status = 'info', title, description, icon: Icon, duration =
|
|
|
11490
11840
|
// 기본 상태 아이콘 (아이콘 패키지에서 가져온 아이콘 사용)
|
|
11491
11841
|
const iconMap = {
|
|
11492
11842
|
success: CircleCheckFilledIcon,
|
|
11493
|
-
error:
|
|
11843
|
+
error: ErrorIcon,
|
|
11494
11844
|
warning: WarningIcon,
|
|
11495
11845
|
info: InfoIcon,
|
|
11496
11846
|
};
|
|
@@ -12157,24 +12507,5 @@ const YouTubePlayer = ({ videoId, title, description, size = 'm', variant = 'def
|
|
|
12157
12507
|
};
|
|
12158
12508
|
YouTubePlayer.displayName = 'YouTubePlayer';
|
|
12159
12509
|
|
|
12160
|
-
|
|
12161
|
-
* Designbase UI 컴포넌트 라이브러리 메인 엔트리 포인트
|
|
12162
|
-
*
|
|
12163
|
-
* 목적: 모든 UI 컴포넌트와 타입을 내보냄
|
|
12164
|
-
* 기능: Tree-shaking 가능한 개별 컴포넌트 내보내기
|
|
12165
|
-
* 사용법: import { Button, Input } from '@designbasekorea/ui'
|
|
12166
|
-
*/
|
|
12167
|
-
// 테마 CSS 자동 로드 (로컬 복사본 사용)
|
|
12168
|
-
// 테마 관련 유틸리티 재내보내기
|
|
12169
|
-
const setTheme = (theme) => {
|
|
12170
|
-
console.log('setTheme called with:', theme);
|
|
12171
|
-
};
|
|
12172
|
-
const getTheme = () => {
|
|
12173
|
-
return 'light';
|
|
12174
|
-
};
|
|
12175
|
-
const toggleTheme = () => {
|
|
12176
|
-
console.log('toggleTheme called');
|
|
12177
|
-
};
|
|
12178
|
-
|
|
12179
|
-
export { Accordion, AdBanner, Alert, AnimationBackground, AnimationText, AudioPlayer, Avatar, Backdrop, Badge, Banner, BottomNavigation, BottomSheet, Breadcrumbs, Button, Calendar, Card, Carousel, Checkbox, Chip, ColorPicker, Confirm, Container, ContextMenu, Countdown, DatePicker, Divider, Drawer, Dropdown, Dropzone, EmptyState, FileUploader, FloatingActionButton, Form, Gradient, Grid, HeroFeature, Image$1 as Image, ImageList, Indicator, Input, Label, Lightbox, List, Logo, MarkdownEditor, Masonry, MenuItem, Modal, ModalBody, ModalFooter, ModalHeader, Navbar, OnboardingModal, Pagination, Popover, Progress, ProgressStep, Progressbar, Radio, RandomGradient, RangeSlider, Rating, Reorder, ResizablePanels, ScrollArea, SearchBar, Section, SegmentControl, Select, Share, Sidebar, Skeleton, Spinner, SplitView, Stack, Stat, Stepper, Table, Tabs, Testimonial, Textarea, TimePicker, Timeline, Toast, ToastContainer, ToastProvider, Toggle, Toolbar, Tooltip, Tutorial, VideoPlayer, YouTubePlayer, getTheme, setTheme, toggleTheme, useToast };
|
|
12510
|
+
export { Accordion, AdBanner, Alert, AnimationBackground, AnimationText, AudioPlayer, Avatar, Backdrop, Badge, Banner, BottomNavigation, BottomSheet, Breadcrumbs, Button, Calendar, Card, Carousel, Checkbox, Chip, ColorPicker, Confirm, Container, ContextMenu, Countdown, DatePicker, Divider, Drawer, Dropdown, Dropzone, EmptyState, FileUploader, FloatingActionButton, Form, Gradient, Grid, HeroFeature, Image$1 as Image, ImageList, Indicator, Input, Label, Lightbox, List, Logo, MarkdownEditor, Masonry, MenuItem, Modal, ModalBody, ModalFooter, ModalHeader, Navbar, OnboardingModal, Pagination, Popover, Progress, ProgressStep, Progressbar, Radio, RandomGradient, RangeSlider, Rating, Reorder, ResizablePanels, ScrollArea, SearchBar, Section, SegmentControl, Select, Share, Sidebar, Skeleton, Spinner, SplitView, Stack, Stat, Stepper, Table, Tabs, Testimonial, Textarea, TimePicker, Timeline, Toast, ToastContainer, ToastProvider, Toggle, Toolbar, Tooltip, Tutorial, VideoPlayer, YouTubePlayer, useToast };
|
|
12180
12511
|
//# sourceMappingURL=index.esm.js.map
|