@designbasekorea/ui 0.1.40 → 0.1.41
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 +5 -0
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.css.map +1 -1
- package/dist/index.esm.js +53 -71
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +53 -71
- 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 +53 -71
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2262,78 +2262,60 @@ const Button = forwardRef(({ variant = 'primary', size = 'm', radius, fullWidth
|
|
|
2262
2262
|
});
|
|
2263
2263
|
Button.displayName = 'Button';
|
|
2264
2264
|
|
|
2265
|
-
//
|
|
2266
|
-
const
|
|
2267
|
-
primary:
|
|
2268
|
-
'#
|
|
2269
|
-
'#
|
|
2270
|
-
'#
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
'#
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
'#
|
|
2279
|
-
'#
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
'#
|
|
2284
|
-
'#
|
|
2285
|
-
'#
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
'#
|
|
2290
|
-
'#
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
'#
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
'#
|
|
2299
|
-
'#
|
|
2300
|
-
'#
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
'#
|
|
2304
|
-
'#
|
|
2305
|
-
'#
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
'#
|
|
2311
|
-
|
|
2312
|
-
'#7830f7', // purple-600
|
|
2313
|
-
'#6a1ee3', // purple-700
|
|
2314
|
-
'#5818bf', // purple-800
|
|
2315
|
-
],
|
|
2316
|
-
ocean: [
|
|
2317
|
-
'#1ea2ff', // blue-500
|
|
2318
|
-
'#48c3ff', // blue-400
|
|
2319
|
-
'#2dd4c2', // teal-400
|
|
2320
|
-
'#14b8a6', // teal-500
|
|
2321
|
-
'#0d9485', // teal-600
|
|
2322
|
-
],
|
|
2323
|
-
sunset: [
|
|
2324
|
-
'#ff8c32', // orange-400
|
|
2325
|
-
'#ff6b0a', // orange-500
|
|
2326
|
-
'#ff5100', // orange-600
|
|
2327
|
-
'#ef4444', // red-500
|
|
2328
|
-
'#f87171', // red-400
|
|
2329
|
-
],
|
|
2265
|
+
// 톤별 색상 팔레트
|
|
2266
|
+
const colorPalettes = {
|
|
2267
|
+
primary: {
|
|
2268
|
+
light: ['#dbeafe', '#bfdbfe', '#93c5fd', '#60a5fa', '#3b82f6'], // blue-100 ~ blue-500
|
|
2269
|
+
vivid: ['#3b82f6', '#2563eb', '#1d4ed8', '#1e40af', '#1e3a8a'], // blue-500 ~ blue-900
|
|
2270
|
+
dark: ['#1e3a8a', '#1e40af', '#1d4ed8', '#2563eb', '#3b82f6'], // blue-900 ~ blue-500
|
|
2271
|
+
},
|
|
2272
|
+
secondary: {
|
|
2273
|
+
light: ['#f3f4f6', '#e5e7eb', '#d1d5db', '#9ca3af', '#6b7280'], // gray-100 ~ gray-500
|
|
2274
|
+
vivid: ['#6b7280', '#4b5563', '#374151', '#1f2937', '#111827'], // gray-500 ~ gray-900
|
|
2275
|
+
dark: ['#111827', '#1f2937', '#374151', '#4b5563', '#6b7280'], // gray-900 ~ gray-500
|
|
2276
|
+
},
|
|
2277
|
+
success: {
|
|
2278
|
+
light: ['#dcfce7', '#bbf7d0', '#86efac', '#4ade80', '#22c55e'], // green-100 ~ green-500
|
|
2279
|
+
vivid: ['#22c55e', '#16a34a', '#15803d', '#166534', '#14532d'], // green-500 ~ green-900
|
|
2280
|
+
dark: ['#14532d', '#166534', '#15803d', '#16a34a', '#22c55e'], // green-900 ~ green-500
|
|
2281
|
+
},
|
|
2282
|
+
warning: {
|
|
2283
|
+
light: ['#fef3c7', '#fde68a', '#fcd34d', '#f59e0b', '#d97706'], // yellow-100 ~ yellow-600
|
|
2284
|
+
vivid: ['#f59e0b', '#d97706', '#b45309', '#92400e', '#78350f'], // yellow-600 ~ yellow-900
|
|
2285
|
+
dark: ['#78350f', '#92400e', '#b45309', '#d97706', '#f59e0b'], // yellow-900 ~ yellow-600
|
|
2286
|
+
},
|
|
2287
|
+
error: {
|
|
2288
|
+
light: ['#fecaca', '#fca5a5', '#f87171', '#ef4444', '#dc2626'], // red-100 ~ red-600
|
|
2289
|
+
vivid: ['#ef4444', '#dc2626', '#b91c1c', '#991b1b', '#7f1d1d'], // red-500 ~ red-900
|
|
2290
|
+
dark: ['#7f1d1d', '#991b1b', '#b91c1c', '#dc2626', '#ef4444'], // red-900 ~ red-500
|
|
2291
|
+
},
|
|
2292
|
+
info: {
|
|
2293
|
+
light: ['#dbeafe', '#bfdbfe', '#93c5fd', '#60a5fa', '#3b82f6'], // blue-100 ~ blue-500
|
|
2294
|
+
vivid: ['#3b82f6', '#2563eb', '#1d4ed8', '#1e40af', '#1e3a8a'], // blue-500 ~ blue-900
|
|
2295
|
+
dark: ['#1e3a8a', '#1e40af', '#1d4ed8', '#2563eb', '#3b82f6'], // blue-900 ~ blue-500
|
|
2296
|
+
},
|
|
2297
|
+
purple: {
|
|
2298
|
+
light: ['#e9d5ff', '#d8b4fe', '#c084fc', '#a855f7', '#9333ea'], // purple-100 ~ purple-600
|
|
2299
|
+
vivid: ['#a855f7', '#9333ea', '#7c3aed', '#6d28d9', '#5b21b6'], // purple-600 ~ purple-900
|
|
2300
|
+
dark: ['#5b21b6', '#6d28d9', '#7c3aed', '#9333ea', '#a855f7'], // purple-900 ~ purple-600
|
|
2301
|
+
},
|
|
2302
|
+
ocean: {
|
|
2303
|
+
light: ['#ccfbf1', '#99f6e4', '#5eead4', '#2dd4bf', '#14b8a6'], // teal-100 ~ teal-500
|
|
2304
|
+
vivid: ['#14b8a6', '#0d9488', '#0f766e', '#115e59', '#134e4a'], // teal-500 ~ teal-900
|
|
2305
|
+
dark: ['#134e4a', '#115e59', '#0f766e', '#0d9488', '#14b8a6'], // teal-900 ~ teal-500
|
|
2306
|
+
},
|
|
2307
|
+
sunset: {
|
|
2308
|
+
light: ['#fed7aa', '#fdba74', '#fb923c', '#f97316', '#ea580c'], // orange-100 ~ orange-600
|
|
2309
|
+
vivid: ['#f97316', '#ea580c', '#c2410c', '#9a3412', '#7c2d12'], // orange-600 ~ orange-900
|
|
2310
|
+
dark: ['#7c2d12', '#9a3412', '#c2410c', '#ea580c', '#f97316'], // orange-900 ~ orange-600
|
|
2311
|
+
},
|
|
2330
2312
|
};
|
|
2331
|
-
const RandomGradient = ({ scheme = 'primary', width = '100%', height = '600px', blur = 60, colorCount = 4, animated = false, animationDuration = 10, overlay = true, overlayOpacity = 0.2, children, className, }) => {
|
|
2313
|
+
const RandomGradient = ({ scheme = 'primary', tone = 'vivid', width = '100%', height = '600px', blur = 60, colorCount = 4, animated = false, animationDuration = 10, overlay = true, overlayOpacity = 0.2, children, className, }) => {
|
|
2332
2314
|
const [gradientStyle, setGradientStyle] = useState({});
|
|
2333
2315
|
// 그라데이션 생성 함수
|
|
2334
2316
|
const generateGradient = useMemo(() => {
|
|
2335
2317
|
return () => {
|
|
2336
|
-
const schemeColors =
|
|
2318
|
+
const schemeColors = colorPalettes[scheme][tone];
|
|
2337
2319
|
const numColors = Math.min(6, Math.max(3, colorCount));
|
|
2338
2320
|
const colors = [];
|
|
2339
2321
|
for (let i = 0; i < numColors; i++) {
|
|
@@ -2350,7 +2332,7 @@ const RandomGradient = ({ scheme = 'primary', width = '100%', height = '600px',
|
|
|
2350
2332
|
transition: `all ${animationDuration}s ease-in-out`,
|
|
2351
2333
|
};
|
|
2352
2334
|
};
|
|
2353
|
-
}, [scheme, colorCount, blur, animationDuration]);
|
|
2335
|
+
}, [scheme, tone, colorCount, blur, animationDuration]);
|
|
2354
2336
|
// 초기 그라데이션 및 애니메이션
|
|
2355
2337
|
useEffect(() => {
|
|
2356
2338
|
setGradientStyle(generateGradient());
|
|
@@ -2371,7 +2353,7 @@ const RandomGradient = ({ scheme = 'primary', width = '100%', height = '600px',
|
|
|
2371
2353
|
};
|
|
2372
2354
|
const overlayStyle = overlay
|
|
2373
2355
|
? {
|
|
2374
|
-
background: `linear-gradient(45deg, ${
|
|
2356
|
+
background: `linear-gradient(45deg, ${colorPalettes[scheme][tone][0]}, ${colorPalettes[scheme][tone][1]})`,
|
|
2375
2357
|
opacity: overlayOpacity,
|
|
2376
2358
|
}
|
|
2377
2359
|
: {};
|
|
@@ -2379,7 +2361,7 @@ const RandomGradient = ({ scheme = 'primary', width = '100%', height = '600px',
|
|
|
2379
2361
|
};
|
|
2380
2362
|
RandomGradient.displayName = 'RandomGradient';
|
|
2381
2363
|
|
|
2382
|
-
const AdBanner = ({ type = 'hero', variant = 'primary', title, subtitle, ctaText, onCtaClick, onClose, autoClose = false, closeDelay = 5000, icon, useRandomGradient = false, gradientScheme, gradientAnimated = true, className, }) => {
|
|
2364
|
+
const AdBanner = ({ type = 'hero', variant = 'primary', title, subtitle, ctaText, onCtaClick, onClose, autoClose = false, closeDelay = 5000, icon, useRandomGradient = false, gradientScheme, gradientTone = 'vivid', gradientAnimated = true, className, }) => {
|
|
2383
2365
|
const [isVisible, setIsVisible] = useState(true);
|
|
2384
2366
|
const [progress, setProgress] = useState(100);
|
|
2385
2367
|
useEffect(() => {
|
|
@@ -2438,7 +2420,7 @@ const AdBanner = ({ type = 'hero', variant = 'primary', title, subtitle, ctaText
|
|
|
2438
2420
|
};
|
|
2439
2421
|
// 배너 컨텐츠
|
|
2440
2422
|
const bannerContent = (jsxs("div", { className: "designbase-ad-banner__content", children: [jsx("button", { className: "designbase-ad-banner__close", onClick: handleClose, "aria-label": "\uB2EB\uAE30", children: jsx(CloseIcon, { size: type === 'hero' ? 20 : 18 }) }), type === 'hero' && !useRandomGradient && (jsxs(Fragment, { children: [jsx("div", { className: "designbase-ad-banner__decoration designbase-ad-banner__decoration--top" }), jsx("div", { className: "designbase-ad-banner__decoration designbase-ad-banner__decoration--bottom" })] })), jsxs("div", { className: "designbase-ad-banner__main", children: [jsxs("div", { className: "designbase-ad-banner__icon", children: [displayIcon, type === 'topbar' && (jsx("span", { className: "designbase-ad-banner__label", children: "\uD2B9\uBCC4 \uC774\uBCA4\uD2B8" })), type === 'floating' && (jsx("span", { className: "designbase-ad-banner__badge", children: "HOT DEAL" }))] }), jsxs("div", { className: "designbase-ad-banner__text", children: [jsx("h2", { className: "designbase-ad-banner__title", children: displayTitle }), jsx("p", { className: "designbase-ad-banner__subtitle", children: displaySubtitle })] }), jsx("div", { className: "designbase-ad-banner__actions", children: jsxs(Button, { variant: "primary", size: type === 'hero' ? 'l' : type === 'card' ? 's' : 'm', onPress: handleCtaClick, className: "designbase-ad-banner__cta", fullWidth: type === 'floating', children: [displayCtaText, jsx(ArrowRightIcon, { size: type === 'hero' ? 20 : 16 })] }) })] }), autoClose && (jsx("div", { className: "designbase-ad-banner__progress", children: jsx("div", { className: "designbase-ad-banner__progress-bar", style: { width: `${progress}%` } }) }))] }));
|
|
2441
|
-
return (jsx("div", { className: classes, children: useRandomGradient ? (jsx(RandomGradient, { scheme: getGradientScheme(), animated: gradientAnimated, height: "100%", width: "100%", className: "designbase-ad-banner__gradient-bg", children: bannerContent })) : (bannerContent) }));
|
|
2423
|
+
return (jsx("div", { className: classes, children: useRandomGradient ? (jsx(RandomGradient, { scheme: getGradientScheme(), tone: gradientTone, animated: gradientAnimated, height: "100%", width: "100%", className: "designbase-ad-banner__gradient-bg", children: bannerContent })) : (bannerContent) }));
|
|
2442
2424
|
};
|
|
2443
2425
|
// 기본 텍스트 헬퍼
|
|
2444
2426
|
function getDefaultTitle(type) {
|