@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.esm.js CHANGED
@@ -8255,6 +8255,32 @@ const HeroFeature = ({ title, subtitle, description, image, imageAlt, background
8255
8255
  return (jsxs("section", { className: classes, style: containerStyle, children: [renderBackground(), renderOverlay(), jsxs("div", { className: "designbase-hero-feature__container", children: [jsxs("div", { className: "designbase-hero-feature__content", children: [icon && (jsx("div", { className: "designbase-hero-feature__icon", children: icon })), renderBadge(), jsx("h1", { className: "designbase-hero-feature__title", children: title }), subtitle && (jsx("h2", { className: "designbase-hero-feature__subtitle", children: subtitle })), description && (jsx("p", { className: "designbase-hero-feature__description", children: description })), renderButtons(), renderStats()] }), variant === 'split' && renderImage()] }), variant !== 'split' && renderImage()] }));
8256
8256
  };
8257
8257
 
8258
+ /**
8259
+ * ImagePlaceholder 컴포넌트
8260
+ *
8261
+ * 이미지가 없거나 업로드 전 대기 상태일 때 격자 패턴과 라벨을 보여주는 자리표시자입니다.
8262
+ */
8263
+ const ImagePlaceholder = ({ className, style, label, showLabel = false, patternSize = 20, patternColor = '#f3f3f3', backgroundColor = '#e7e7e7', width = '100%', height, aspectRatio, hoverEffect = false, onClick, }) => {
8264
+ const rootStyle = {
8265
+ width,
8266
+ height,
8267
+ aspectRatio,
8268
+ ...style,
8269
+ };
8270
+ const patternStyle = {
8271
+ '--db-placeholder-bg': backgroundColor,
8272
+ '--db-placeholder-pattern': patternColor,
8273
+ '--db-placeholder-size': `${patternSize}px`,
8274
+ '--db-placeholder-half-size': `${patternSize / 2}px`,
8275
+ };
8276
+ const classes = clsx('designbase-image-placeholder', {
8277
+ 'designbase-image-placeholder--hover': hoverEffect,
8278
+ 'designbase-image-placeholder--clickable': !!onClick,
8279
+ }, className);
8280
+ return (jsxs("div", { className: classes, style: rootStyle, onClick: onClick, role: onClick ? 'button' : undefined, tabIndex: onClick ? 0 : undefined, children: [jsx("div", { className: "designbase-image-placeholder__pattern", style: patternStyle }), showLabel && label && (jsx("div", { className: "designbase-image-placeholder__label-wrap", children: jsx("span", { className: "designbase-image-placeholder__label", children: label }) }))] }));
8281
+ };
8282
+ ImagePlaceholder.displayName = 'ImagePlaceholder';
8283
+
8258
8284
  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, }) => {
8259
8285
  const [internalCurrentIndex, setInternalCurrentIndex] = useState(currentIndex);
8260
8286
  const [zoomLevel, setZoomLevel] = useState(1);
@@ -9354,6 +9380,17 @@ const OnboardingModal = ({ steps, currentStep = 0, isOpen, onClose, onStepChange
9354
9380
  };
9355
9381
  OnboardingModal.displayName = 'OnboardingModal';
9356
9382
 
9383
+ /**
9384
+ * PageHeader 컴포넌트
9385
+ *
9386
+ * 브레드크럼, 타이틀, 서브타이틀, 설명 및 액션(버튼, 탭 등)을 포함하는 페이지 헤더 섹션입니다.
9387
+ */
9388
+ const PageHeader = ({ title, description, subtitle, breadcrumbs, actions, align = 'center', className, }) => {
9389
+ const classes = clsx('designbase-page-header', `designbase-page-header--${align}`, className);
9390
+ return (jsxs("div", { className: classes, children: [breadcrumbs && breadcrumbs.length > 0 && (jsx("div", { className: "designbase-page-header__breadcrumbs", children: jsx(Breadcrumbs, { items: breadcrumbs, size: "s" }) })), jsxs("div", { className: "designbase-page-header__content", children: [jsx("h1", { className: "designbase-page-header__title", children: title }), subtitle && (jsx("h2", { className: "designbase-page-header__subtitle", children: subtitle })), description && (jsx("div", { className: "designbase-page-header__description", children: description }))] }), actions && (jsx("div", { className: "designbase-page-header__actions", children: actions }))] }));
9391
+ };
9392
+ PageHeader.displayName = 'PageHeader';
9393
+
9357
9394
  const Tutorial = ({ steps, currentStep = 0, isActive, onStart, onEnd, onStepChange, onNext, onPrev, indicatorType = 'numbers', indicatorSize = 'm', closeIcon: CloseIconComponent = CloseIcon, prevIcon: PrevIconComponent = ChevronLeftIcon, nextIcon: NextIconComponent = ChevronRightIcon, className, ...props }) => {
9358
9395
  const [internalStep, setInternalStep] = useState(currentStep);
9359
9396
  const [targetElement, setTargetElement] = useState(null);
@@ -10038,7 +10075,7 @@ const Progress = ({ value, max = 100, size = 'm', variant = 'default', type = 'l
10038
10075
  return (jsx("div", { className: classes, children: type === 'linear' ? renderLinearProgress() : renderCircularProgress() }));
10039
10076
  };
10040
10077
 
10041
- const ProgressStep = ({ items, size = 'm', layout = 'vertical', currentStep = 0, clickable = false, fullWidth = false, disabled = false, className, style, onStepClick, }) => {
10078
+ const ProgressStep = ({ items, size = 'm', layout = 'horizontal', currentStep = 0, clickable = false, fullWidth = false, disabled = false, className, style, onStepClick, }) => {
10042
10079
  const handleStepClick = (item, index) => {
10043
10080
  if (disabled || item.disabled || !clickable)
10044
10081
  return;
@@ -10076,7 +10113,7 @@ const ProgressStep = ({ items, size = 'm', layout = 'vertical', currentStep = 0,
10076
10113
  e.preventDefault();
10077
10114
  handleStepClick(item, index);
10078
10115
  }
10079
- }, children: [status === 'active' && (jsx("div", { className: "designbase-progress-step__pulse" })), item.icon ? (jsx("div", { className: "designbase-progress-step__icon", children: item.icon })) : (jsx("span", { className: "designbase-progress-step__number", children: index + 1 }))] }), !isLast && (jsx("div", { className: connectorClasses }))] }), jsxs("div", { className: "designbase-progress-step__content", children: [jsxs("div", { className: "designbase-progress-step__header", children: [jsx("h3", { className: "designbase-progress-step__title", children: item.title }), item.timestamp && (jsx("span", { className: "designbase-progress-step__timestamp", children: item.timestamp }))] }), item.description && (jsx("p", { className: "designbase-progress-step__description", children: item.description }))] })] }, item.id));
10116
+ }, children: [status === 'active' && (jsx("div", { className: "designbase-progress-step__pulse" })), item.icon ? (jsx("div", { className: "designbase-progress-step__icon", children: item.icon })) : (jsx("div", { className: "designbase-progress-step__icon", children: status === 'completed' ? (jsx(DoneIcon$1, { size: size === 's' ? 12 : size === 'l' ? 20 : 16 })) : status === 'error' ? (jsx(WarningFilledIcon, { size: size === 's' ? 12 : size === 'l' ? 20 : 16 })) : (jsx("span", { className: "designbase-progress-step__number", children: index + 1 })) }))] }), !isLast && (jsx("div", { className: connectorClasses }))] }), jsxs("div", { className: "designbase-progress-step__content", children: [jsx("div", { className: "designbase-progress-step__header", children: jsx("h3", { className: "designbase-progress-step__title", children: item.title }) }), item.description && (jsx("p", { className: "designbase-progress-step__description", children: item.description })), item.timestamp && (jsx("span", { className: "designbase-progress-step__timestamp", children: item.timestamp }))] })] }, item.id));
10080
10117
  }) }));
10081
10118
  };
10082
10119
 
@@ -12182,6 +12219,28 @@ const Toolbar = ({ items, size = 'm', variant = 'default', position = 'top', ful
12182
12219
  return (jsx("div", { className: classes, children: jsxs("div", { className: "designbase-toolbar__content", children: [Object.entries(groupedItems).map(([groupName, groupItems], groupIndex) => (jsxs("div", { className: "designbase-toolbar__group", children: [groupItems.map(renderItem), groupIndex < Object.keys(groupedItems).length - 1 && (jsx("div", { className: "designbase-toolbar__group-separator" }))] }, groupName))), children && (jsx("div", { className: "designbase-toolbar__children", children: children }))] }) }));
12183
12220
  };
12184
12221
 
12222
+ /**
12223
+ * TopBanner 컴포넌트
12224
+ *
12225
+ * 페이지 최상단에 위치하여 공지사항이나 프로모션을 안내하는 슬림한 배너입니다.
12226
+ */
12227
+ const TopBanner = ({ badgeText, content, image, linkText, onLinkPress, onClose, variant = 'primary', fixed = false, className, }) => {
12228
+ const [isVisible, setIsVisible] = useState(true);
12229
+ if (!isVisible)
12230
+ return null;
12231
+ const handleClose = () => {
12232
+ setIsVisible(false);
12233
+ onClose?.();
12234
+ };
12235
+ const isDarkBg = variant === 'primary' || variant === 'dark';
12236
+ const classes = clsx('designbase-top-banner', `designbase-top-banner--${variant}`, {
12237
+ 'designbase-top-banner--fixed': fixed,
12238
+ 'designbase-top-banner--has-image': !!image,
12239
+ }, className);
12240
+ return (jsx("div", { className: classes, role: "alert", children: jsxs("div", { className: "designbase-top-banner__container", children: [jsxs("div", { className: "designbase-top-banner__content", children: [image && (jsx("div", { className: "designbase-top-banner__image-wrapper", children: jsx("img", { src: image, alt: "", className: "designbase-top-banner__image" }) })), badgeText && (jsx(Badge, { size: "s", variant: isDarkBg ? 'secondary' : 'primary', style: "text", className: "designbase-top-banner__badge", children: badgeText })), jsx("span", { className: "designbase-top-banner__text", children: content }), linkText && (jsx(Button, { className: "designbase-top-banner__link", variant: isDarkBg ? 'secondary' : 'ghost', size: "s", onPress: onLinkPress, endIcon: ChevronRightIcon, children: linkText }))] }), jsx(Button, { className: "designbase-top-banner__close", variant: "ghost", size: "m", iconOnly: true, onPress: handleClose, "aria-label": "\uB2EB\uAE30", children: jsx(CloseIcon, {}) })] }) }));
12241
+ };
12242
+ TopBanner.displayName = 'TopBanner';
12243
+
12185
12244
  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, }) => {
12186
12245
  const videoRef = useRef(null);
12187
12246
  const containerRef = useRef(null);
@@ -12634,5 +12693,5 @@ const YouTubePlayer = ({ videoId, title, description, size = 'm', variant = 'def
12634
12693
  };
12635
12694
  YouTubePlayer.displayName = 'YouTubePlayer';
12636
12695
 
12637
- 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, Marquee, 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 };
12696
+ 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, ImagePlaceholder, Indicator, Input, Label, Lightbox, List, Logo, MarkdownEditor, Marquee, Masonry, MenuItem, Modal, ModalBody, ModalFooter, ModalHeader, Navbar, OnboardingModal, PageHeader, 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, TopBanner, Tutorial, VideoPlayer, YouTubePlayer, useToast };
12638
12697
  //# sourceMappingURL=index.esm.js.map