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