@designbasekorea/ui 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -8257,6 +8257,32 @@ const HeroFeature = ({ title, subtitle, description, image, imageAlt, background
8257
8257
  return (jsxRuntime.jsxs("section", { className: classes, style: containerStyle, children: [renderBackground(), renderOverlay(), jsxRuntime.jsxs("div", { className: "designbase-hero-feature__container", children: [jsxRuntime.jsxs("div", { className: "designbase-hero-feature__content", children: [icon && (jsxRuntime.jsx("div", { className: "designbase-hero-feature__icon", children: icon })), renderBadge(), jsxRuntime.jsx("h1", { className: "designbase-hero-feature__title", children: title }), subtitle && (jsxRuntime.jsx("h2", { className: "designbase-hero-feature__subtitle", children: subtitle })), description && (jsxRuntime.jsx("p", { className: "designbase-hero-feature__description", children: description })), renderButtons(), renderStats()] }), variant === 'split' && renderImage()] }), variant !== 'split' && renderImage()] }));
8258
8258
  };
8259
8259
 
8260
+ /**
8261
+ * ImagePlaceholder 컴포넌트
8262
+ *
8263
+ * 이미지가 없거나 업로드 전 대기 상태일 때 격자 패턴과 라벨을 보여주는 자리표시자입니다.
8264
+ */
8265
+ const ImagePlaceholder = ({ className, style, label, showLabel = false, patternSize = 20, patternColor = '#f3f3f3', backgroundColor = '#e7e7e7', width = '100%', height, aspectRatio, hoverEffect = false, onClick, }) => {
8266
+ const rootStyle = {
8267
+ width,
8268
+ height,
8269
+ aspectRatio,
8270
+ ...style,
8271
+ };
8272
+ const patternStyle = {
8273
+ '--db-placeholder-bg': backgroundColor,
8274
+ '--db-placeholder-pattern': patternColor,
8275
+ '--db-placeholder-size': `${patternSize}px`,
8276
+ '--db-placeholder-half-size': `${patternSize / 2}px`,
8277
+ };
8278
+ const classes = clsx('designbase-image-placeholder', {
8279
+ 'designbase-image-placeholder--hover': hoverEffect,
8280
+ 'designbase-image-placeholder--clickable': !!onClick,
8281
+ }, className);
8282
+ return (jsxRuntime.jsxs("div", { className: classes, style: rootStyle, onClick: onClick, role: onClick ? 'button' : undefined, tabIndex: onClick ? 0 : undefined, children: [jsxRuntime.jsx("div", { className: "designbase-image-placeholder__pattern", style: patternStyle }), showLabel && label && (jsxRuntime.jsx("div", { className: "designbase-image-placeholder__label-wrap", children: jsxRuntime.jsx("span", { className: "designbase-image-placeholder__label", children: label }) }))] }));
8283
+ };
8284
+ ImagePlaceholder.displayName = 'ImagePlaceholder';
8285
+
8260
8286
  const Lightbox = ({ images, currentIndex = 0, size = 'l', isOpen, onOpenChange, onImageChange, enableZoom = true, enableRotate = true, enableDownload = true, enableFullscreen = true, enableKeyboard = true, enableWheelZoom = true, showThumbnails = true, showCounter = true, showCloseButton = true, showNavigationButtons = true, showToolbar = true, closeOnBackdropClick = true, closeOnEscape = true, className, }) => {
8261
8287
  const [internalCurrentIndex, setInternalCurrentIndex] = React.useState(currentIndex);
8262
8288
  const [zoomLevel, setZoomLevel] = React.useState(1);
@@ -9356,6 +9382,17 @@ const OnboardingModal = ({ steps, currentStep = 0, isOpen, onClose, onStepChange
9356
9382
  };
9357
9383
  OnboardingModal.displayName = 'OnboardingModal';
9358
9384
 
9385
+ /**
9386
+ * PageHeader 컴포넌트
9387
+ *
9388
+ * 브레드크럼, 타이틀, 서브타이틀, 설명 및 액션(버튼, 탭 등)을 포함하는 페이지 헤더 섹션입니다.
9389
+ */
9390
+ const PageHeader = ({ title, description, subtitle, breadcrumbs, actions, align = 'center', className, }) => {
9391
+ const classes = clsx('designbase-page-header', `designbase-page-header--${align}`, className);
9392
+ return (jsxRuntime.jsxs("div", { className: classes, children: [breadcrumbs && breadcrumbs.length > 0 && (jsxRuntime.jsx("div", { className: "designbase-page-header__breadcrumbs", children: jsxRuntime.jsx(Breadcrumbs, { items: breadcrumbs, size: "s" }) })), jsxRuntime.jsxs("div", { className: "designbase-page-header__content", children: [jsxRuntime.jsx("h1", { className: "designbase-page-header__title", children: title }), subtitle && (jsxRuntime.jsx("h2", { className: "designbase-page-header__subtitle", children: subtitle })), description && (jsxRuntime.jsx("div", { className: "designbase-page-header__description", children: description }))] }), actions && (jsxRuntime.jsx("div", { className: "designbase-page-header__actions", children: actions }))] }));
9393
+ };
9394
+ PageHeader.displayName = 'PageHeader';
9395
+
9359
9396
  const Tutorial = ({ steps, currentStep = 0, isActive, onStart, onEnd, onStepChange, onNext, onPrev, indicatorType = 'numbers', indicatorSize = 'm', closeIcon: CloseIconComponent = icons.CloseIcon, prevIcon: PrevIconComponent = icons.ChevronLeftIcon, nextIcon: NextIconComponent = icons.ChevronRightIcon, className, ...props }) => {
9360
9397
  const [internalStep, setInternalStep] = React.useState(currentStep);
9361
9398
  const [targetElement, setTargetElement] = React.useState(null);
@@ -10040,7 +10077,7 @@ const Progress = ({ value, max = 100, size = 'm', variant = 'default', type = 'l
10040
10077
  return (jsxRuntime.jsx("div", { className: classes, children: type === 'linear' ? renderLinearProgress() : renderCircularProgress() }));
10041
10078
  };
10042
10079
 
10043
- const ProgressStep = ({ items, size = 'm', layout = 'vertical', currentStep = 0, clickable = false, fullWidth = false, disabled = false, className, style, onStepClick, }) => {
10080
+ const ProgressStep = ({ items, size = 'm', layout = 'horizontal', currentStep = 0, clickable = false, fullWidth = false, disabled = false, className, style, onStepClick, }) => {
10044
10081
  const handleStepClick = (item, index) => {
10045
10082
  if (disabled || item.disabled || !clickable)
10046
10083
  return;
@@ -10078,7 +10115,7 @@ const ProgressStep = ({ items, size = 'm', layout = 'vertical', currentStep = 0,
10078
10115
  e.preventDefault();
10079
10116
  handleStepClick(item, index);
10080
10117
  }
10081
- }, children: [status === 'active' && (jsxRuntime.jsx("div", { className: "designbase-progress-step__pulse" })), item.icon ? (jsxRuntime.jsx("div", { className: "designbase-progress-step__icon", children: item.icon })) : (jsxRuntime.jsx("span", { className: "designbase-progress-step__number", children: index + 1 }))] }), !isLast && (jsxRuntime.jsx("div", { className: connectorClasses }))] }), jsxRuntime.jsxs("div", { className: "designbase-progress-step__content", children: [jsxRuntime.jsxs("div", { className: "designbase-progress-step__header", children: [jsxRuntime.jsx("h3", { className: "designbase-progress-step__title", children: item.title }), item.timestamp && (jsxRuntime.jsx("span", { className: "designbase-progress-step__timestamp", children: item.timestamp }))] }), item.description && (jsxRuntime.jsx("p", { className: "designbase-progress-step__description", children: item.description }))] })] }, item.id));
10118
+ }, children: [status === 'active' && (jsxRuntime.jsx("div", { className: "designbase-progress-step__pulse" })), item.icon ? (jsxRuntime.jsx("div", { className: "designbase-progress-step__icon", children: item.icon })) : (jsxRuntime.jsx("div", { className: "designbase-progress-step__icon", children: status === 'completed' ? (jsxRuntime.jsx(icons.DoneIcon, { size: size === 's' ? 12 : size === 'l' ? 20 : 16 })) : status === 'error' ? (jsxRuntime.jsx(icons.WarningFilledIcon, { size: size === 's' ? 12 : size === 'l' ? 20 : 16 })) : (jsxRuntime.jsx("span", { className: "designbase-progress-step__number", children: index + 1 })) }))] }), !isLast && (jsxRuntime.jsx("div", { className: connectorClasses }))] }), jsxRuntime.jsxs("div", { className: "designbase-progress-step__content", children: [jsxRuntime.jsx("div", { className: "designbase-progress-step__header", children: jsxRuntime.jsx("h3", { className: "designbase-progress-step__title", children: item.title }) }), item.description && (jsxRuntime.jsx("p", { className: "designbase-progress-step__description", children: item.description })), item.timestamp && (jsxRuntime.jsx("span", { className: "designbase-progress-step__timestamp", children: item.timestamp }))] })] }, item.id));
10082
10119
  }) }));
10083
10120
  };
10084
10121
 
@@ -12184,6 +12221,28 @@ const Toolbar = ({ items, size = 'm', variant = 'default', position = 'top', ful
12184
12221
  return (jsxRuntime.jsx("div", { className: classes, children: jsxRuntime.jsxs("div", { className: "designbase-toolbar__content", children: [Object.entries(groupedItems).map(([groupName, groupItems], groupIndex) => (jsxRuntime.jsxs("div", { className: "designbase-toolbar__group", children: [groupItems.map(renderItem), groupIndex < Object.keys(groupedItems).length - 1 && (jsxRuntime.jsx("div", { className: "designbase-toolbar__group-separator" }))] }, groupName))), children && (jsxRuntime.jsx("div", { className: "designbase-toolbar__children", children: children }))] }) }));
12185
12222
  };
12186
12223
 
12224
+ /**
12225
+ * TopBanner 컴포넌트
12226
+ *
12227
+ * 페이지 최상단에 위치하여 공지사항이나 프로모션을 안내하는 슬림한 배너입니다.
12228
+ */
12229
+ const TopBanner = ({ badgeText, content, image, linkText, onLinkPress, onClose, variant = 'primary', fixed = false, className, }) => {
12230
+ const [isVisible, setIsVisible] = React.useState(true);
12231
+ if (!isVisible)
12232
+ return null;
12233
+ const handleClose = () => {
12234
+ setIsVisible(false);
12235
+ onClose?.();
12236
+ };
12237
+ const isDarkBg = variant === 'primary' || variant === 'dark';
12238
+ const classes = clsx('designbase-top-banner', `designbase-top-banner--${variant}`, {
12239
+ 'designbase-top-banner--fixed': fixed,
12240
+ 'designbase-top-banner--has-image': !!image,
12241
+ }, className);
12242
+ return (jsxRuntime.jsx("div", { className: classes, role: "alert", children: jsxRuntime.jsxs("div", { className: "designbase-top-banner__container", children: [jsxRuntime.jsxs("div", { className: "designbase-top-banner__content", children: [image && (jsxRuntime.jsx("div", { className: "designbase-top-banner__image-wrapper", children: jsxRuntime.jsx("img", { src: image, alt: "", className: "designbase-top-banner__image" }) })), badgeText && (jsxRuntime.jsx(Badge, { size: "s", variant: isDarkBg ? 'secondary' : 'primary', style: "text", className: "designbase-top-banner__badge", children: badgeText })), jsxRuntime.jsx("span", { className: "designbase-top-banner__text", children: content }), linkText && (jsxRuntime.jsx(Button, { className: "designbase-top-banner__link", variant: isDarkBg ? 'secondary' : 'ghost', size: "s", onPress: onLinkPress, endIcon: icons.ChevronRightIcon, children: linkText }))] }), jsxRuntime.jsx(Button, { className: "designbase-top-banner__close", variant: "ghost", size: "m", iconOnly: true, onPress: handleClose, "aria-label": "\uB2EB\uAE30", children: jsxRuntime.jsx(icons.CloseIcon, {}) })] }) }));
12243
+ };
12244
+ TopBanner.displayName = 'TopBanner';
12245
+
12187
12246
  const VideoPlayer = ({ src, poster, title, description, size = 'm', variant = 'default', theme = 'auto', autoPlay = false, loop = false, muted = false, showControls = true, enableFullscreen = true, enableKeyboard = true, enableTouch = 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, qualities = [], defaultQuality = '', subtitles = [], defaultSubtitle = '', onPlay, onPause, onEnded, onTimeUpdate, onVolumeChange, onFullscreenChange, onPlaylistChange, onPlaybackRateChange, onQualityChange, onSubtitleChange, onError, className, }) => {
12188
12247
  const videoRef = React.useRef(null);
12189
12248
  const containerRef = React.useRef(null);
@@ -12686,6 +12745,7 @@ exports.Grid = Grid;
12686
12745
  exports.HeroFeature = HeroFeature;
12687
12746
  exports.Image = Image$1;
12688
12747
  exports.ImageList = ImageList;
12748
+ exports.ImagePlaceholder = ImagePlaceholder;
12689
12749
  exports.Indicator = Indicator;
12690
12750
  exports.Input = Input;
12691
12751
  exports.Label = Label;
@@ -12702,6 +12762,7 @@ exports.ModalFooter = ModalFooter;
12702
12762
  exports.ModalHeader = ModalHeader;
12703
12763
  exports.Navbar = Navbar;
12704
12764
  exports.OnboardingModal = OnboardingModal;
12765
+ exports.PageHeader = PageHeader;
12705
12766
  exports.Pagination = Pagination;
12706
12767
  exports.Popover = Popover;
12707
12768
  exports.Progress = Progress;
@@ -12738,6 +12799,7 @@ exports.ToastProvider = ToastProvider;
12738
12799
  exports.Toggle = Toggle;
12739
12800
  exports.Toolbar = Toolbar;
12740
12801
  exports.Tooltip = Tooltip;
12802
+ exports.TopBanner = TopBanner;
12741
12803
  exports.Tutorial = Tutorial;
12742
12804
  exports.VideoPlayer = VideoPlayer;
12743
12805
  exports.YouTubePlayer = YouTubePlayer;