@designbasekorea/ui 0.1.11 → 0.1.12
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 +82 -156
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +118 -192
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +118 -192
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1381,7 +1381,7 @@ var jsxRuntimeExports = jsxRuntime.exports;
|
|
|
1381
1381
|
|
|
1382
1382
|
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}
|
|
1383
1383
|
|
|
1384
|
-
const Accordion
|
|
1384
|
+
const Accordion = ({ items, style = 'default', size = 'm', allowMultiple = false, defaultExpandedItems = [], defaultItemType = 'none', onItemChange, className, }) => {
|
|
1385
1385
|
const [expandedItems, setExpandedItems] = useState(() => {
|
|
1386
1386
|
if (allowMultiple) {
|
|
1387
1387
|
return defaultExpandedItems;
|
|
@@ -1472,9 +1472,7 @@ const Accordion$1 = ({ items, style = 'default', size = 'm', allowMultiple = fal
|
|
|
1472
1472
|
return (jsxRuntimeExports.jsxs("div", { className: itemClasses, children: [jsxRuntimeExports.jsxs("button", { type: "button", className: "designbase-accordion__trigger", onClick: () => !item.disabled && handleItemToggle(item.id), disabled: item.disabled, "aria-expanded": expanded, "aria-controls": `accordion-content-${item.id}`, children: [renderItemPrefix(item, index), jsxRuntimeExports.jsx("span", { className: "designbase-accordion__title", children: item.title }), jsxRuntimeExports.jsx("div", { className: "designbase-accordion__chevron", children: jsxRuntimeExports.jsx(ChevronDownIcon, { size: iconSize, color: "var(--db-icon-primary)" }) })] }), jsxRuntimeExports.jsx("div", { id: `accordion-content-${item.id}`, className: "designbase-accordion__content", "aria-hidden": !expanded, children: jsxRuntimeExports.jsx("div", { className: "designbase-accordion__content-inner", children: item.content }) })] }, item.id));
|
|
1473
1473
|
}) }));
|
|
1474
1474
|
};
|
|
1475
|
-
Accordion
|
|
1476
|
-
|
|
1477
|
-
Accordion;
|
|
1475
|
+
Accordion.displayName = 'Accordion';
|
|
1478
1476
|
|
|
1479
1477
|
/*
|
|
1480
1478
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -3542,7 +3540,7 @@ function $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {
|
|
|
3542
3540
|
};
|
|
3543
3541
|
}
|
|
3544
3542
|
|
|
3545
|
-
const Spinner
|
|
3543
|
+
const Spinner = ({ type = 'circular', size = 'm', color, speed = 1, label = '로딩 중...', showLabel = false, className, ...props }) => {
|
|
3546
3544
|
const classes = clsx('designbase-spinner', `designbase-spinner--${type}`, `designbase-spinner--${size}`, className);
|
|
3547
3545
|
const style = {
|
|
3548
3546
|
'--spinner-color': color,
|
|
@@ -3566,7 +3564,7 @@ const Spinner$1 = ({ type = 'circular', size = 'm', color, speed = 1, label = '
|
|
|
3566
3564
|
};
|
|
3567
3565
|
return (jsxRuntimeExports.jsxs("div", { className: classes, style: style, role: "status", "aria-live": "polite", "aria-busy": "true", "aria-label": showLabel ? label : undefined, ...props, children: [renderSpinner(), showLabel && label && (jsxRuntimeExports.jsx("span", { className: "designbase-spinner__label", "aria-hidden": "true", children: label }))] }));
|
|
3568
3566
|
};
|
|
3569
|
-
Spinner
|
|
3567
|
+
Spinner.displayName = 'Spinner';
|
|
3570
3568
|
|
|
3571
3569
|
const Button = forwardRef(({ variant = 'primary', size = 'm', radius, fullWidth = false, disabled = false, loading = false, iconOnly = false, startIcon: StartIcon, endIcon: EndIcon, className, children, onPress, type = 'button', ...props }, forwardedRef) => {
|
|
3572
3570
|
const ref = $df56164dff5785e2$export$4338b53315abf666(forwardedRef);
|
|
@@ -3620,7 +3618,7 @@ const Button = forwardRef(({ variant = 'primary', size = 'm', radius, fullWidth
|
|
|
3620
3618
|
};
|
|
3621
3619
|
const renderContent = () => {
|
|
3622
3620
|
if (loading) {
|
|
3623
|
-
return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Spinner
|
|
3621
|
+
return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Spinner, { type: "circular", size: size === 'xs' ? 'xs' : size === 's' ? 's' : 'm', color: getIconColor(), speed: 1, showLabel: false }), !iconOnly && jsxRuntimeExports.jsx("span", { children: "\uB85C\uB529 \uC911..." })] }));
|
|
3624
3622
|
}
|
|
3625
3623
|
// iconOnly 버튼일 때는 children을 아이콘으로 처리
|
|
3626
3624
|
if (iconOnly && children) {
|
|
@@ -3638,7 +3636,7 @@ const Button = forwardRef(({ variant = 'primary', size = 'm', radius, fullWidth
|
|
|
3638
3636
|
});
|
|
3639
3637
|
Button.displayName = 'Button';
|
|
3640
3638
|
|
|
3641
|
-
const Alert
|
|
3639
|
+
const Alert = ({ title, children, variant = 'info', size = 'm', showIcon = true, closable = false, actions, actionButtons, onClose, className, ...props }) => {
|
|
3642
3640
|
const [isVisible, setIsVisible] = useState(true);
|
|
3643
3641
|
const handleClose = () => {
|
|
3644
3642
|
setIsVisible(false);
|
|
@@ -3675,9 +3673,7 @@ const Alert$1 = ({ title, children, variant = 'info', size = 'm', showIcon = tru
|
|
|
3675
3673
|
}, className);
|
|
3676
3674
|
return (jsxRuntimeExports.jsxs("div", { className: classes, role: "alert", "aria-live": "polite", ...props, children: [jsxRuntimeExports.jsxs("div", { className: "designbase-alert__content", children: [showIcon && (jsxRuntimeExports.jsx("div", { className: "designbase-alert__icon", children: getIcon() })), jsxRuntimeExports.jsxs("div", { className: "designbase-alert__body", children: [title && (jsxRuntimeExports.jsx("div", { className: "designbase-alert__title", children: title })), jsxRuntimeExports.jsx("div", { className: "designbase-alert__message", children: children })] }), closable && (jsxRuntimeExports.jsx("button", { type: "button", className: "designbase-alert__close", onClick: handleClose, "aria-label": "\uC54C\uB9BC \uB2EB\uAE30", children: jsxRuntimeExports.jsx(CloseIcon, { size: iconSize }) }))] }), (actions || actionButtons) && (jsxRuntimeExports.jsx("div", { className: "designbase-alert__actions", children: actionButtons ? (jsxRuntimeExports.jsx("div", { className: "designbase-alert__action-buttons", children: actionButtons.map((action, index) => (jsxRuntimeExports.jsx(Button, { size: action.size || size, variant: action.variant || 'secondary', onClick: action.onClick, disabled: action.disabled, children: action.label }, index))) })) : (actions) }))] }));
|
|
3677
3675
|
};
|
|
3678
|
-
Alert
|
|
3679
|
-
|
|
3680
|
-
Alert;
|
|
3676
|
+
Alert.displayName = 'Alert';
|
|
3681
3677
|
|
|
3682
3678
|
var classnames = {exports: {}};
|
|
3683
3679
|
|
|
@@ -4355,7 +4351,7 @@ const AudioPlayer = ({ src, title, artist, album, albumArt, size = 'm', variant
|
|
|
4355
4351
|
}), onClick: () => handlePlaylistChange(index), children: [track.albumArt && (jsxRuntimeExports.jsx("img", { src: track.albumArt, alt: track.title || 'Album Art' })), jsxRuntimeExports.jsxs("div", { className: "designbase-audio-player__playlist-track-info", children: [jsxRuntimeExports.jsx("div", { className: "designbase-audio-player__playlist-track-title", children: track.title || 'Unknown Track' }), jsxRuntimeExports.jsx("div", { className: "designbase-audio-player__playlist-track-artist", children: track.artist || 'Unknown Artist' })] })] }, index))) })] }))] }));
|
|
4356
4352
|
};
|
|
4357
4353
|
|
|
4358
|
-
const Badge
|
|
4354
|
+
const Badge = ({ children, size = 'm', variant = 'primary', style = 'text', count, maxCount = 99, disabled = false, className, ...props }) => {
|
|
4359
4355
|
// 숫자 스타일일 때 count 값을 사용
|
|
4360
4356
|
const displayContent = style === 'number' && count !== undefined
|
|
4361
4357
|
? (count > maxCount ? `${maxCount}+` : count.toString())
|
|
@@ -4365,9 +4361,9 @@ const Badge$1 = ({ children, size = 'm', variant = 'primary', style = 'text', co
|
|
|
4365
4361
|
}, className);
|
|
4366
4362
|
return (jsxRuntimeExports.jsx("span", { className: classes, ...props, children: displayContent }));
|
|
4367
4363
|
};
|
|
4368
|
-
Badge
|
|
4364
|
+
Badge.displayName = 'Badge';
|
|
4369
4365
|
|
|
4370
|
-
const Avatar
|
|
4366
|
+
const Avatar = ({ src, alt, initials, icon, size = 'm', variant = 'circle', status, badge, badgeMaxCount = 99, badgeVariant = 'danger', badgeStyle = 'number', badgeText, onClick, disabled = false, className, ...props }) => {
|
|
4371
4367
|
const [imageError, setImageError] = useState(false);
|
|
4372
4368
|
const [imageLoading, setImageLoading] = useState(true);
|
|
4373
4369
|
// 아이콘 크기 계산 (m이 기본값)
|
|
@@ -4444,11 +4440,9 @@ const Avatar$1 = ({ src, alt, initials, icon, size = 'm', variant = 'circle', st
|
|
|
4444
4440
|
}, ...props, children: [imageLoading && shouldShowImage && (jsxRuntimeExports.jsx("div", { className: "designbase-avatar__loading", children: jsxRuntimeExports.jsx("div", { className: "designbase-avatar__skeleton" }) })), shouldShowImage && (jsxRuntimeExports.jsx("img", { src: src, alt: alt || '아바타 이미지', className: "designbase-avatar__image", onLoad: handleImageLoad, onError: handleImageError, loading: "lazy" })), shouldShowInitials && (jsxRuntimeExports.jsx("div", { className: "designbase-avatar__initials", style: generateRandomColor(initials || ''), children: getInitials() })), shouldShowIcon && (jsxRuntimeExports.jsx("div", { className: "designbase-avatar__icon", children: icon ? (React.isValidElement(icon) ? (React.cloneElement(icon, {
|
|
4445
4441
|
size: iconSize,
|
|
4446
4442
|
color: 'currentColor'
|
|
4447
|
-
})) : icon) : (jsxRuntimeExports.jsx(UserIcon, { size: iconSize, color: "currentColor" })) })), status && (jsxRuntimeExports.jsx("span", { className: clsx('designbase-avatar__status', `designbase-avatar__status--${status}`) })), badge !== undefined && (jsxRuntimeExports.jsx("div", { className: "designbase-avatar__badge", children: jsxRuntimeExports.jsx(Badge
|
|
4443
|
+
})) : icon) : (jsxRuntimeExports.jsx(UserIcon, { size: iconSize, color: "currentColor" })) })), status && (jsxRuntimeExports.jsx("span", { className: clsx('designbase-avatar__status', `designbase-avatar__status--${status}`) })), badge !== undefined && (jsxRuntimeExports.jsx("div", { className: "designbase-avatar__badge", children: jsxRuntimeExports.jsx(Badge, { count: badgeStyle === 'text' ? undefined : badge, maxCount: badgeMaxCount, variant: badgeVariant, style: badgeStyle, size: size === 'xs' || size === 's' ? 's' : size === 'l' || size === 'xl' || size === '2xl' ? 'l' : 'm', children: badgeStyle === 'text' ? badgeText : undefined }) }))] }));
|
|
4448
4444
|
};
|
|
4449
|
-
Avatar
|
|
4450
|
-
|
|
4451
|
-
Avatar;
|
|
4445
|
+
Avatar.displayName = 'Avatar';
|
|
4452
4446
|
|
|
4453
4447
|
const Backdrop = forwardRef(({ open = false, onClick, disableBackdropClick = false, disableEscapeKeyDown = false, backgroundColor, opacity = 0.5, blur = false, blurAmount = 4, animation = 'fade', animationDuration = 300, zIndex = 1000, className, style, children, ...props }, forwardedRef) => {
|
|
4454
4448
|
// ESC 키 처리
|
|
@@ -4496,8 +4490,6 @@ const Backdrop = forwardRef(({ open = false, onClick, disableBackdropClick = fal
|
|
|
4496
4490
|
});
|
|
4497
4491
|
Backdrop.displayName = 'Backdrop';
|
|
4498
4492
|
|
|
4499
|
-
Badge;
|
|
4500
|
-
|
|
4501
4493
|
const Banner = ({ title, description, icon, image, imageAlt, actions = [], dismissible = false, autoDismiss, size = 'm', variant = 'default', style = 'solid', position = 'top', alignment = 'left', animated = false, fullWidth = false, shadow = false, rounded = true, backgroundImage, overlayColor, overlayOpacity = 0.1, onDismiss, className, }) => {
|
|
4502
4494
|
const [isVisible, setIsVisible] = React.useState(true);
|
|
4503
4495
|
// 아이콘 크기 계산 (m이 기본값)
|
|
@@ -4683,7 +4675,7 @@ const BottomSheet = forwardRef(({ open = false, onClose, title, subtitle, size =
|
|
|
4683
4675
|
});
|
|
4684
4676
|
BottomSheet.displayName = 'BottomSheet';
|
|
4685
4677
|
|
|
4686
|
-
const Breadcrumbs
|
|
4678
|
+
const Breadcrumbs = ({ items, size = 'm', breadcrumbStyle = 'default', separator = jsxRuntimeExports.jsx(ChevronRightIcon, { size: 16 }), onItemClick, maxItems, collapseOnMobile = true, className, ...props }) => {
|
|
4687
4679
|
const handleItemClick = (item, e) => {
|
|
4688
4680
|
if (item.disabled || item.active) {
|
|
4689
4681
|
e.preventDefault();
|
|
@@ -4725,11 +4717,9 @@ const Breadcrumbs$1 = ({ items, size = 'm', breadcrumbStyle = 'default', separat
|
|
|
4725
4717
|
};
|
|
4726
4718
|
return (jsxRuntimeExports.jsx("nav", { className: classes, "aria-label": "\uBE0C\uB808\uB4DC\uD06C\uB7FC \uB124\uBE44\uAC8C\uC774\uC158", ...props, children: jsxRuntimeExports.jsx("ol", { className: "designbase-breadcrumbs__list", children: visibleItems.map(renderItem) }) }));
|
|
4727
4719
|
};
|
|
4728
|
-
Breadcrumbs
|
|
4729
|
-
|
|
4730
|
-
Breadcrumbs;
|
|
4720
|
+
Breadcrumbs.displayName = 'Breadcrumbs';
|
|
4731
4721
|
|
|
4732
|
-
const SegmentControl
|
|
4722
|
+
const SegmentControl = ({ options, defaultValue, value, size = 'm', fullWidth = false, disabled = false, className, onChange, ...props }) => {
|
|
4733
4723
|
const [selectedValue, setSelectedValue] = useState(value ?? defaultValue ?? options[0]?.value ?? '');
|
|
4734
4724
|
const [focusedIndex, setFocusedIndex] = useState(-1);
|
|
4735
4725
|
const containerRef = useRef(null);
|
|
@@ -4830,7 +4820,7 @@ const SegmentControl$1 = ({ options, defaultValue, value, size = 'm', fullWidth
|
|
|
4830
4820
|
width: `${100 / options.length}%`,
|
|
4831
4821
|
} })] }));
|
|
4832
4822
|
};
|
|
4833
|
-
SegmentControl
|
|
4823
|
+
SegmentControl.displayName = 'SegmentControl';
|
|
4834
4824
|
|
|
4835
4825
|
const Modal = ({ isOpen, onClose, title, size = 'm', closeOnOutsideClick = true, closeOnEscape = true, children, className, overlayClassName, }) => {
|
|
4836
4826
|
const modalRef = useRef(null);
|
|
@@ -4944,7 +4934,7 @@ const Checkbox = forwardRef(({ isSelected, defaultSelected, isIndeterminate = fa
|
|
|
4944
4934
|
});
|
|
4945
4935
|
Checkbox.displayName = 'Checkbox';
|
|
4946
4936
|
|
|
4947
|
-
const Select
|
|
4937
|
+
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', maxHeight = 200, showClearButton = true, className, onChange, onFocus, onBlur, ...props }) => {
|
|
4948
4938
|
const [isOpen, setIsOpen] = useState(false);
|
|
4949
4939
|
const [selectedValue, setSelectedValue] = useState(value ?? defaultValue ?? (multiple ? [] : ''));
|
|
4950
4940
|
const [searchTerm, setSearchTerm] = useState('');
|
|
@@ -5126,7 +5116,7 @@ const Select$1 = ({ value, defaultValue, options, label, placeholder = '선택
|
|
|
5126
5116
|
}), onClick: () => handleOptionSelect(option), role: "option", "aria-selected": isSelected, children: [multiple && (jsxRuntimeExports.jsx("div", { className: "designbase-select__checkbox", children: jsxRuntimeExports.jsx(Checkbox, { isSelected: isSelected, isDisabled: option.disabled, size: "s", hasLabel: false, onChange: () => handleOptionSelect(option) }) })), jsxRuntimeExports.jsx("span", { className: "designbase-select__option-label", children: option.label })] }, option.value));
|
|
5127
5117
|
})) }) }), helperText && !error && (jsxRuntimeExports.jsx("p", { className: "designbase-select__helper-text", children: helperText })), error && errorMessage && (jsxRuntimeExports.jsx("p", { className: "designbase-select__error-message", children: errorMessage }))] }));
|
|
5128
5118
|
};
|
|
5129
|
-
Select
|
|
5119
|
+
Select.displayName = 'Select';
|
|
5130
5120
|
|
|
5131
5121
|
const Calendar = ({ currentDate = new Date(), view = 'month', events = [], onEventAdd, onEventEdit, onEventDelete, onDateClick, onEventClick, onViewChange, onMonthChange, onYearChange, showWeekends = true, highlightToday = true, showOutsideDays = true, locale = 'ko-KR', className, style, ...props }) => {
|
|
5132
5122
|
const [selectedDate, setSelectedDate] = useState(currentDate);
|
|
@@ -5475,7 +5465,7 @@ const Calendar = ({ currentDate = new Date(), view = 'month', events = [], onEve
|
|
|
5475
5465
|
else {
|
|
5476
5466
|
handleMonthChange('next');
|
|
5477
5467
|
}
|
|
5478
|
-
}, "aria-label": "\uB2E4\uC74C", children: "\u2192" })] }), jsxRuntimeExports.jsx(SegmentControl
|
|
5468
|
+
}, "aria-label": "\uB2E4\uC74C", children: "\u2192" })] }), jsxRuntimeExports.jsx(SegmentControl, { options: [
|
|
5479
5469
|
{ value: 'year', label: '년' },
|
|
5480
5470
|
{ value: 'month', label: '월' },
|
|
5481
5471
|
{ value: 'week', label: '주' },
|
|
@@ -5558,7 +5548,7 @@ const Calendar = ({ currentDate = new Date(), view = 'month', events = [], onEve
|
|
|
5558
5548
|
}) })] })] }))] }), jsxRuntimeExports.jsxs(Modal, { isOpen: showEventModal, onClose: handleCloseModal, title: isEditing ? '일정 편집' : '새 일정 추가', size: "l", children: [jsxRuntimeExports.jsx(ModalBody, { children: jsxRuntimeExports.jsxs("div", { className: "designbase-calendar__event-form", children: [jsxRuntimeExports.jsxs("div", { className: "designbase-calendar__form-row", children: [jsxRuntimeExports.jsx("label", { children: "\uC81C\uBAA9 *" }), jsxRuntimeExports.jsx(Input, { value: eventForm.title, onChange: (value) => setEventForm(prev => ({ ...prev, title: value })), placeholder: "\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694" })] }), jsxRuntimeExports.jsxs("div", { className: "designbase-calendar__form-row", children: [jsxRuntimeExports.jsx("label", { children: "\uC124\uBA85" }), jsxRuntimeExports.jsx(Input, { value: eventForm.description, onChange: (value) => setEventForm(prev => ({ ...prev, description: value })), placeholder: "\uC77C\uC815 \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694" })] }), jsxRuntimeExports.jsxs("div", { className: "designbase-calendar__form-row", children: [jsxRuntimeExports.jsx("label", { children: "\uB0A0\uC9DC" }), jsxRuntimeExports.jsx(Input, { type: "date", value: selectedDate.toISOString().split('T')[0], onChange: (value) => {
|
|
5559
5549
|
const newDate = new Date(value);
|
|
5560
5550
|
setSelectedDate(newDate);
|
|
5561
|
-
} })] }), jsxRuntimeExports.jsxs("div", { className: "designbase-calendar__form-row", children: [jsxRuntimeExports.jsx("label", { children: "\uC77C\uC815 \uD0C0\uC785" }), jsxRuntimeExports.jsx(Select
|
|
5551
|
+
} })] }), jsxRuntimeExports.jsxs("div", { className: "designbase-calendar__form-row", children: [jsxRuntimeExports.jsx("label", { children: "\uC77C\uC815 \uD0C0\uC785" }), jsxRuntimeExports.jsx(Select, { value: eventForm.type, onChange: (value) => {
|
|
5562
5552
|
const selectedValue = Array.isArray(value) ? value[0] : value;
|
|
5563
5553
|
setEventForm(prev => ({ ...prev, type: selectedValue }));
|
|
5564
5554
|
}, options: [
|
|
@@ -6061,7 +6051,7 @@ const Carousel = ({ items, size = 'm', variant = 'default', theme = 'light', tra
|
|
|
6061
6051
|
}), onClick: () => goToSlide(index), disabled: disabled || readonly, title: `슬라이드 ${index + 1}로 이동`, type: "button", children: indicatorStyle === 'thumbnails' && item.thumbnail ? (jsxRuntimeExports.jsx("img", { src: item.thumbnail, alt: item.title || `썸네일 ${index + 1}`, className: "designbase-carousel__indicator-thumbnail" })) : indicatorStyle === 'numbers' ? (jsxRuntimeExports.jsx("span", { className: "designbase-carousel__indicator-number", children: index + 1 })) : indicatorStyle === 'lines' ? (jsxRuntimeExports.jsx("span", { className: "designbase-carousel__indicator-line" })) : (jsxRuntimeExports.jsx("span", { className: "designbase-carousel__indicator-dot" })) }, index))) })), showAutoPlayControl && items.length > 1 && (jsxRuntimeExports.jsx("button", { className: "designbase-carousel__autoplay-button", onClick: handleAutoPlayToggle, disabled: disabled || readonly, title: isAutoPlaying ? "자동 재생 정지" : "자동 재생 시작", type: "button", children: isAutoPlaying ? jsxRuntimeExports.jsx(PauseIcon, { size: iconSize, color: "currentColor" }) : jsxRuntimeExports.jsx(PlayIcon, { size: iconSize, color: "currentColor" }) }))] })] }));
|
|
6062
6052
|
};
|
|
6063
6053
|
|
|
6064
|
-
const Chip
|
|
6054
|
+
const Chip = ({ label, size = 'm', variant = 'default', color = 'primary', deletable = false, onDelete, onClick, startIcon, endIcon, disabled = false, selected = false, fullWidth = false, className, ...props }) => {
|
|
6065
6055
|
const handleDelete = (e) => {
|
|
6066
6056
|
e.stopPropagation();
|
|
6067
6057
|
if (!disabled && onDelete) {
|
|
@@ -6087,11 +6077,9 @@ const Chip$1 = ({ label, size = 'm', variant = 'default', color = 'primary', del
|
|
|
6087
6077
|
}
|
|
6088
6078
|
}, ...props, children: [startIcon && (jsxRuntimeExports.jsx("span", { className: "designbase-chip__start-icon", children: startIcon })), jsxRuntimeExports.jsx("span", { className: "designbase-chip__label", children: label }), endIcon && !deletable && (jsxRuntimeExports.jsx("span", { className: "designbase-chip__end-icon", children: endIcon })), deletable && (jsxRuntimeExports.jsx("button", { type: "button", className: "designbase-chip__delete-button", onClick: handleDelete, disabled: disabled, "aria-label": `${label} 삭제`, children: jsxRuntimeExports.jsx("i", { className: "designbase-icon-x" }) }))] }));
|
|
6089
6079
|
};
|
|
6090
|
-
Chip
|
|
6080
|
+
Chip.displayName = 'Chip';
|
|
6091
6081
|
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
const Confirm$1 = ({ open, title, children, confirmText = '확인', cancelText = '취소', confirmVariant = 'primary', variant = 'info', size = 'm', showIcon = true, confirmDisabled = false, cancelDisabled = false, onConfirm, onCancel, onClose, closeOnEscape = true, closeOnOverlayClick = true, className, ...props }) => {
|
|
6082
|
+
const Confirm = ({ open, title, children, confirmText = '확인', cancelText = '취소', confirmVariant = 'primary', variant = 'info', size = 'm', showIcon = true, confirmDisabled = false, cancelDisabled = false, onConfirm, onCancel, onClose, closeOnEscape = true, closeOnOverlayClick = true, className, ...props }) => {
|
|
6095
6083
|
const modalRef = useRef(null);
|
|
6096
6084
|
// ESC 키 처리
|
|
6097
6085
|
useEffect(() => {
|
|
@@ -6189,11 +6177,9 @@ const Confirm$1 = ({ open, title, children, confirmText = '확인', cancelText =
|
|
|
6189
6177
|
const modalClasses = clsx('designbase-confirm__modal', `designbase-confirm__modal--${variant}`, `designbase-confirm__modal--${size}`);
|
|
6190
6178
|
return (jsxRuntimeExports.jsx("div", { className: "designbase-confirm__overlay", onClick: handleOverlayClick, role: "dialog", "aria-modal": "true", "aria-labelledby": title ? 'confirm-title' : undefined, "aria-describedby": "confirm-content", children: jsxRuntimeExports.jsxs("div", { ref: modalRef, className: modalClasses, ...props, children: [jsxRuntimeExports.jsxs("div", { className: "designbase-confirm__header", children: [showIcon && (jsxRuntimeExports.jsx("div", { className: "designbase-confirm__icon", children: getIcon() })), jsxRuntimeExports.jsx("div", { className: "designbase-confirm__title-area", children: title && (jsxRuntimeExports.jsx("h2", { id: "confirm-title", className: "designbase-confirm__title", children: title })) })] }), jsxRuntimeExports.jsx("div", { id: "confirm-content", className: "designbase-confirm__content", children: children }), jsxRuntimeExports.jsxs("div", { className: "designbase-confirm__footer", children: [jsxRuntimeExports.jsx(Button, { variant: "outlined", onClick: handleCancel, disabled: cancelDisabled, children: cancelText }), jsxRuntimeExports.jsx(Button, { variant: confirmVariant, onClick: handleConfirm, disabled: confirmDisabled, children: confirmText })] })] }) }));
|
|
6191
6179
|
};
|
|
6192
|
-
Confirm
|
|
6193
|
-
|
|
6194
|
-
Confirm;
|
|
6180
|
+
Confirm.displayName = 'Confirm';
|
|
6195
6181
|
|
|
6196
|
-
const Container
|
|
6182
|
+
const Container = ({ size = 'l', maxWidth, variant = 'plain', padding = 'm', margin = 'none', backgroundColor, border = false, rounded = false, shadow = false, className, children, }) => {
|
|
6197
6183
|
// 크기별 최대 폭 설정 (토큰 기반)
|
|
6198
6184
|
const getMaxWidth = () => {
|
|
6199
6185
|
if (maxWidth)
|
|
@@ -6263,9 +6249,7 @@ const Container$1 = ({ size = 'l', maxWidth, variant = 'plain', padding = 'm', m
|
|
|
6263
6249
|
return (jsxRuntimeExports.jsx("div", { className: classes, style: style, children: children }));
|
|
6264
6250
|
};
|
|
6265
6251
|
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
const MenuItem$1 = ({ id, label, href, icon: Icon, active = false, disabled = false, badge, badgeColor = 'primary', variant = 'default', type = 'inline', size = 'm', style = 'dropdown', subItems, expanded = false, expandable = false, depth = 0, onClick, onChildClick, className, }) => {
|
|
6252
|
+
const MenuItem = ({ id, label, href, icon: Icon, active = false, disabled = false, badge, badgeColor = 'primary', variant = 'default', type = 'inline', size = 'm', style = 'dropdown', subItems, expanded = false, expandable = false, depth = 0, onClick, onChildClick, className, }) => {
|
|
6269
6253
|
const [internalExpanded, setInternalExpanded] = useState(expanded);
|
|
6270
6254
|
// expanded prop이 변경될 때 internalExpanded 업데이트
|
|
6271
6255
|
useEffect(() => {
|
|
@@ -6320,11 +6304,11 @@ const MenuItem$1 = ({ id, label, href, icon: Icon, active = false, disabled = fa
|
|
|
6320
6304
|
return (jsxRuntimeExports.jsxs("div", { className: classes, children: [jsxRuntimeExports.jsxs("div", { className: contentClasses, onClick: handleClick, children: [Icon && (jsxRuntimeExports.jsx("div", { className: clsx('designbase-menu-item__icon', `designbase-menu-item__icon--${variant}`, {
|
|
6321
6305
|
'designbase-menu-item__icon--active': active,
|
|
6322
6306
|
'designbase-menu-item__icon--disabled': disabled,
|
|
6323
|
-
}), children: jsxRuntimeExports.jsx(Icon, { size: size === 's' ? 16 : size === 'l' ? 24 : 20 }) })), jsxRuntimeExports.jsx("span", { className: "designbase-menu-item__label", children: label }), badge && (jsxRuntimeExports.jsx(Badge
|
|
6307
|
+
}), children: jsxRuntimeExports.jsx(Icon, { size: size === 's' ? 16 : size === 'l' ? 24 : 20 }) })), jsxRuntimeExports.jsx("span", { className: "designbase-menu-item__label", children: label }), badge && (jsxRuntimeExports.jsx(Badge, { count: typeof badge === 'string' ? parseInt(badge) : badge, variant: badgeColor === 'neutral' ? 'secondary' : badgeColor, size: "s", style: "number" })), hasChildren && (jsxRuntimeExports.jsx("div", { className: "designbase-menu-item__expand-icon", children: isExpanded ? (jsxRuntimeExports.jsx(ChevronUpIcon, { size: 16 })) : (jsxRuntimeExports.jsx(ChevronDownIcon, { size: 16 })) }))] }), hasChildren && isExpanded && (jsxRuntimeExports.jsx("div", { className: clsx('designbase-menu-item__children', `designbase-menu-item__children--${style}`), children: subItems.map((child) => (jsxRuntimeExports.jsx(MenuItem, { id: child.id, label: child.label, href: child.href, icon: child.icon, active: child.active, disabled: child.disabled, badge: child.badge, badgeColor: child.badgeColor, variant: child.variant, type: child.type, size: size, style: child.style || style, subItems: child.subItems, depth: depth + 1, onClick: () => handleChildClick(child), onChildClick: onChildClick }, child.id))) }))] }));
|
|
6324
6308
|
};
|
|
6325
|
-
MenuItem
|
|
6309
|
+
MenuItem.displayName = 'MenuItem';
|
|
6326
6310
|
|
|
6327
|
-
const Divider
|
|
6311
|
+
const Divider = ({ orientation = 'horizontal', thickness = 1, color, length, variant = 'solid', margin, className = '', style, ...props }) => {
|
|
6328
6312
|
const baseClass = 'designbase-divider';
|
|
6329
6313
|
const dividerClasses = [
|
|
6330
6314
|
baseClass,
|
|
@@ -6349,7 +6333,7 @@ const Divider$1 = ({ orientation = 'horizontal', thickness = 1, color, length, v
|
|
|
6349
6333
|
return (jsxRuntimeExports.jsx("div", { className: dividerClasses, style: dividerStyle, role: "separator", "aria-orientation": orientation, ...props }));
|
|
6350
6334
|
};
|
|
6351
6335
|
|
|
6352
|
-
const ContextMenu
|
|
6336
|
+
const ContextMenu = ({ items, open, x, y, onClose, className, }) => {
|
|
6353
6337
|
const [menuStyle, setMenuStyle] = useState({});
|
|
6354
6338
|
const [activeSubMenu, setActiveSubMenu] = useState(null);
|
|
6355
6339
|
const menuRef = useRef(null);
|
|
@@ -6441,11 +6425,11 @@ const ContextMenu$1 = ({ items, open, x, y, onClose, className, }) => {
|
|
|
6441
6425
|
}, [onClose]);
|
|
6442
6426
|
const renderMenuItem = useCallback((item, index) => {
|
|
6443
6427
|
if (item.isDivider) {
|
|
6444
|
-
return jsxRuntimeExports.jsx(Divider
|
|
6428
|
+
return jsxRuntimeExports.jsx(Divider, {}, `divider-${index}`);
|
|
6445
6429
|
}
|
|
6446
6430
|
const hasSubMenu = item.subItems && item.subItems.length > 0;
|
|
6447
6431
|
const isSubMenuOpen = activeSubMenu === item.id;
|
|
6448
|
-
return (jsxRuntimeExports.jsxs("div", { className: "designbase-context-menu__item-wrapper", children: [jsxRuntimeExports.jsx(MenuItem
|
|
6432
|
+
return (jsxRuntimeExports.jsxs("div", { className: "designbase-context-menu__item-wrapper", children: [jsxRuntimeExports.jsx(MenuItem, { id: item.id, label: item.label || '', icon: item.icon, onClick: () => handleItemClick(item), disabled: item.disabled, variant: item.variant, className: item.className }), hasSubMenu && (jsxRuntimeExports.jsx("div", { ref: (el) => (subMenuRefs.current[item.id] = el), className: clsx('designbase-context-menu__submenu', {
|
|
6449
6433
|
'designbase-context-menu__submenu--open': isSubMenuOpen,
|
|
6450
6434
|
}), onMouseEnter: () => setActiveSubMenu(item.id), onMouseLeave: handleSubMenuClose, children: item.subItems.map((subItem, subIndex) => renderMenuItem(subItem, subIndex)) }))] }, item.id));
|
|
6451
6435
|
}, [activeSubMenu, handleItemClick, handleSubMenuOpen, handleSubMenuClose]);
|
|
@@ -6454,9 +6438,7 @@ const ContextMenu$1 = ({ items, open, x, y, onClose, className, }) => {
|
|
|
6454
6438
|
const classes = clsx('designbase-context-menu', className);
|
|
6455
6439
|
return (jsxRuntimeExports.jsx("div", { ref: menuRef, className: classes, style: menuStyle, role: "menu", "aria-orientation": "vertical", children: items.map((item, index) => renderMenuItem(item, index)) }));
|
|
6456
6440
|
};
|
|
6457
|
-
ContextMenu
|
|
6458
|
-
|
|
6459
|
-
ContextMenu;
|
|
6441
|
+
ContextMenu.displayName = 'ContextMenu';
|
|
6460
6442
|
|
|
6461
6443
|
const DatePicker = ({ mode = 'single', value, onChange, minDate, maxDate, events = [], showOutsideDays = true, startOfWeek = 'sunday', size = 'm', variant = 'default', highlightWeekends = true, highlightHolidays = false, today = new Date(), locale = 'ko-KR', format = 'yyyy-MM-dd', className, disabled = false, readonly = false,
|
|
6462
6444
|
// 드롭다운 관련 props
|
|
@@ -6720,8 +6702,6 @@ inline = false, }) => {
|
|
|
6720
6702
|
}, className), children: [jsxRuntimeExports.jsxs("div", { className: "designbase-date-picker__header", children: [jsxRuntimeExports.jsx("button", { className: "designbase-date-picker__nav-button", onClick: goToPreviousMonth, disabled: disabled || readonly, type: "button", "aria-label": "\uC774\uC804 \uB2EC", children: jsxRuntimeExports.jsx(ChevronLeftIcon, { size: iconSize, color: "currentColor" }) }), jsxRuntimeExports.jsx("div", { className: "designbase-date-picker__current-month", children: currentDate.toLocaleDateString(locale, { year: 'numeric', month: 'long' }) }), jsxRuntimeExports.jsx("button", { className: "designbase-date-picker__nav-button", onClick: goToNextMonth, disabled: disabled || readonly, type: "button", "aria-label": "\uB2E4\uC74C \uB2EC", children: jsxRuntimeExports.jsx(ChevronRightIcon, { size: iconSize, color: "currentColor" }) })] }), jsxRuntimeExports.jsx("div", { className: "designbase-date-picker__weekdays", children: weekdays.map(day => (jsxRuntimeExports.jsx("div", { className: "designbase-date-picker__weekday", children: day }, day))) }), jsxRuntimeExports.jsx("div", { className: "designbase-date-picker__grid", children: calendarGrid.map(date => renderDateCell(date)) }), jsxRuntimeExports.jsx("div", { className: "designbase-date-picker__footer", children: jsxRuntimeExports.jsx("button", { className: "designbase-date-picker__today-button", onClick: goToToday, disabled: disabled || readonly, type: "button", children: "\uC624\uB298" }) })] }));
|
|
6721
6703
|
};
|
|
6722
6704
|
|
|
6723
|
-
Divider;
|
|
6724
|
-
|
|
6725
6705
|
const Drawer = ({ isOpen, onClose, title, children, position = 'right', size = 'm', showCloseButton = true, closeOnBackdropClick = true, closeOnEscape = true, animationDuration = 300, showOverlay = true, overlayClosable = true, className, style, zIndex = 1000, trapFocus = true, id, ...props }) => {
|
|
6726
6706
|
// 아이콘 크기 계산 (m이 기본값)
|
|
6727
6707
|
const iconSize = size === 's' ? 16 : size === 'l' ? 20 : size === 'xl' ? 24 : 18;
|
|
@@ -6799,7 +6779,7 @@ const Drawer = ({ isOpen, onClose, title, children, position = 'right', size = '
|
|
|
6799
6779
|
}), onClick: handleDrawerClick, role: "dialog", "aria-modal": "true", "aria-labelledby": title ? `${id || 'drawer'}-title` : undefined, "aria-describedby": id ? `${id}-content` : undefined, tabIndex: -1, id: id, children: [(title || showCloseButton) && (jsxRuntimeExports.jsxs("div", { className: "designbase-drawer__header", children: [title && (jsxRuntimeExports.jsx("h2", { className: "designbase-drawer__title", id: id ? `${id}-title` : undefined, children: title })), showCloseButton && (jsxRuntimeExports.jsx(Button, { variant: "ghost", size: "s", onClick: handleClose, className: "designbase-drawer__close-button", "aria-label": "\uB2EB\uAE30", children: jsxRuntimeExports.jsx(CloseIcon, { size: iconSize, color: "currentColor" }) }))] })), jsxRuntimeExports.jsx("div", { className: "designbase-drawer__content", id: id ? `${id}-content` : undefined, children: children })] })] }), document.body);
|
|
6800
6780
|
};
|
|
6801
6781
|
|
|
6802
|
-
const Dropdown
|
|
6782
|
+
const Dropdown = ({ items, trigger, label = '메뉴', size = 'm', placement = 'bottom-left', fullWidth = false, disabled = false, className, isOpen: controlledIsOpen, onToggle, ...props }) => {
|
|
6803
6783
|
// 아이콘 크기 계산 (m이 기본값)
|
|
6804
6784
|
const iconSize = size === 's' ? 14 : size === 'l' ? 18 : 16;
|
|
6805
6785
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -6954,9 +6934,7 @@ const Dropdown$1 = ({ items, trigger, label = '메뉴', size = 'm', placement =
|
|
|
6954
6934
|
}, className: itemClasses, role: "menuitem", disabled: isDisabled, onClick: () => handleItemClick(item), onFocus: () => setFocusedIndex(index), children: [item.icon && (jsxRuntimeExports.jsx("span", { className: "designbase-dropdown__item-icon", children: jsxRuntimeExports.jsx(item.icon, { size: iconSize, color: "currentColor" }) })), jsxRuntimeExports.jsx("span", { className: "designbase-dropdown__item-label", children: item.label })] }, item.id));
|
|
6955
6935
|
}) })] }));
|
|
6956
6936
|
};
|
|
6957
|
-
Dropdown
|
|
6958
|
-
|
|
6959
|
-
Dropdown;
|
|
6937
|
+
Dropdown.displayName = 'Dropdown';
|
|
6960
6938
|
|
|
6961
6939
|
const Dropzone = ({ size = 'm', variant = 'default', showIcon = true, icon, image, title = '파일을 드래그하여 업로드하거나 클릭하여 선택하세요', description, buttonText = '파일 선택', showButton = false, accept, maxSize, multiple = false, isDragOver: controlledIsDragOver, disabled = false, readonly = false, onFileSelect, onDragOver, onDragLeave, onDrop, onClick, className, children, }) => {
|
|
6962
6940
|
const [internalIsDragOver, setInternalIsDragOver] = useState(false);
|
|
@@ -7073,7 +7051,7 @@ const Dropzone = ({ size = 'm', variant = 'default', showIcon = true, icon, imag
|
|
|
7073
7051
|
}, className), onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, onClick: handleClick, children: [jsxRuntimeExports.jsx("input", { ref: fileInputRef, type: "file", accept: accept, multiple: multiple, onChange: handleFileInputChange, disabled: disabled || readonly, style: { display: 'none' } }), children || (jsxRuntimeExports.jsxs("div", { className: "designbase-dropzone__content", children: [image ? (jsxRuntimeExports.jsx("div", { className: "designbase-dropzone__image", children: jsxRuntimeExports.jsx("img", { src: image, alt: "Upload illustration" }) })) : showIcon && (jsxRuntimeExports.jsx("div", { className: "designbase-dropzone__icon", children: icon || defaultIcon })), title && (jsxRuntimeExports.jsx("div", { className: "designbase-dropzone__title", children: title })), getDescription() && (jsxRuntimeExports.jsx("div", { className: "designbase-dropzone__description", children: getDescription() })), showButton && (jsxRuntimeExports.jsx("button", { className: "designbase-dropzone__button", type: "button", disabled: disabled || readonly, children: buttonText }))] }))] }));
|
|
7074
7052
|
};
|
|
7075
7053
|
|
|
7076
|
-
const EmptyState
|
|
7054
|
+
const EmptyState = ({ variant = 'no-data', size = 'm', title, description, icon: CustomIcon, iconSize, actionText, onAction, secondaryActionText, onSecondaryAction, action, image, imageAlt, className, }) => {
|
|
7077
7055
|
const getDefaultIcon = () => {
|
|
7078
7056
|
const defaultIconSize = iconSize || (() => {
|
|
7079
7057
|
switch (size) {
|
|
@@ -7106,11 +7084,9 @@ const EmptyState$1 = ({ variant = 'no-data', size = 'm', title, description, ico
|
|
|
7106
7084
|
const classes = clsx('designbase-empty-state', `designbase-empty-state--${variant}`, `designbase-empty-state--${size}`, className);
|
|
7107
7085
|
return (jsxRuntimeExports.jsx("div", { className: classes, role: "status", "aria-live": "polite", children: jsxRuntimeExports.jsxs("div", { className: "designbase-empty-state__content", children: [image ? (jsxRuntimeExports.jsx("div", { className: "designbase-empty-state__image", children: jsxRuntimeExports.jsx("img", { src: image, alt: imageAlt || title, className: "designbase-empty-state__image-element" }) })) : (jsxRuntimeExports.jsx("div", { className: "designbase-empty-state__icon", children: getDefaultIcon() })), jsxRuntimeExports.jsx("h3", { className: "designbase-empty-state__title", children: title }), description && (jsxRuntimeExports.jsx("div", { className: "designbase-empty-state__description", children: description })), (action || actionText || secondaryActionText) && (jsxRuntimeExports.jsx("div", { className: "designbase-empty-state__actions", children: action ? (action) : (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [actionText && onAction && (jsxRuntimeExports.jsx(Button, { variant: variant === 'onboarding' ? 'primary' : 'secondary', size: size, onPress: onAction, children: actionText })), secondaryActionText && onSecondaryAction && (jsxRuntimeExports.jsx(Button, { variant: "tertiary", size: size, onPress: onSecondaryAction, children: secondaryActionText }))] })) }))] }) }));
|
|
7108
7086
|
};
|
|
7109
|
-
EmptyState
|
|
7110
|
-
|
|
7111
|
-
EmptyState;
|
|
7087
|
+
EmptyState.displayName = 'EmptyState';
|
|
7112
7088
|
|
|
7113
|
-
const Progressbar
|
|
7089
|
+
const Progressbar = ({ value, max = 100, min = 0, size = 'm', variant = 'default', style = 'solid', showLabel = false, label, labelPosition = 'top', fullWidth = false, disabled = false, className, ...props }) => {
|
|
7114
7090
|
// 값 범위 제한
|
|
7115
7091
|
const clampedValue = Math.max(min, Math.min(max, value));
|
|
7116
7092
|
const percentage = ((clampedValue - min) / (max - min)) * 100;
|
|
@@ -7136,7 +7112,7 @@ const Progressbar$1 = ({ value, max = 100, min = 0, size = 'm', variant = 'defau
|
|
|
7136
7112
|
const displayLabel = getDisplayLabel();
|
|
7137
7113
|
return (jsxRuntimeExports.jsx("div", { className: classes, role: "progressbar", "aria-valuenow": clampedValue, "aria-valuemin": min, "aria-valuemax": max, "aria-label": label || `진행률 ${Math.round(percentage)}%`, ...props, children: jsxRuntimeExports.jsxs("div", { className: containerClasses, children: [displayLabel && labelPosition === 'top' && (jsxRuntimeExports.jsx("div", { className: labelClasses, children: displayLabel })), jsxRuntimeExports.jsx("div", { className: trackClasses, children: jsxRuntimeExports.jsx("div", { className: fillClasses, style: { width: `${percentage}%` }, children: displayLabel && labelPosition === 'inside' && (jsxRuntimeExports.jsx("span", { className: "designbase-progressbar__fill-label", children: displayLabel })) }) }), displayLabel && labelPosition === 'bottom' && (jsxRuntimeExports.jsx("div", { className: labelClasses, children: displayLabel }))] }) }));
|
|
7138
7114
|
};
|
|
7139
|
-
Progressbar
|
|
7115
|
+
Progressbar.displayName = 'Progressbar';
|
|
7140
7116
|
|
|
7141
7117
|
const FileUploader = ({ size = 'm', variant = 'default', accept, maxSize, multiple = false, showFileList = true, showProgress = true, disabled = false, readonly = false, onUpload, onRemove, onRetry, className, }) => {
|
|
7142
7118
|
const [uploadedFiles, setUploadedFiles] = useState([]);
|
|
@@ -7234,7 +7210,7 @@ const FileUploader = ({ size = 'm', variant = 'default', accept, maxSize, multip
|
|
|
7234
7210
|
case 'pending':
|
|
7235
7211
|
return (jsxRuntimeExports.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: jsxRuntimeExports.jsx("circle", { cx: "8", cy: "8", r: "7", stroke: "currentColor", strokeWidth: "2", fill: "none" }) }));
|
|
7236
7212
|
case 'uploading':
|
|
7237
|
-
return jsxRuntimeExports.jsx(Spinner
|
|
7213
|
+
return jsxRuntimeExports.jsx(Spinner, { type: "circular", size: "s" });
|
|
7238
7214
|
case 'success':
|
|
7239
7215
|
return (jsxRuntimeExports.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: jsxRuntimeExports.jsx("path", { d: "M13 5L6 12L3 9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
7240
7216
|
case 'error':
|
|
@@ -7246,7 +7222,7 @@ const FileUploader = ({ size = 'm', variant = 'default', accept, maxSize, multip
|
|
|
7246
7222
|
return (jsxRuntimeExports.jsxs("div", { className: clsx('designbase-file-uploader', `designbase-file-uploader--size-${size}`, `designbase-file-uploader--variant-${variant}`, {
|
|
7247
7223
|
'designbase-file-uploader--disabled': disabled,
|
|
7248
7224
|
'designbase-file-uploader--readonly': readonly,
|
|
7249
|
-
}, className), children: [jsxRuntimeExports.jsx(Dropzone, { size: size, variant: variant, accept: accept, maxSize: maxSize, multiple: multiple, disabled: disabled, readonly: readonly, onFileSelect: handleFileSelect }), showFileList && uploadedFiles.length > 0 && (jsxRuntimeExports.jsxs("div", { className: "designbase-file-uploader__file-list", children: [jsxRuntimeExports.jsxs("div", { className: "designbase-file-uploader__file-list-title", children: ["\uC5C5\uB85C\uB4DC\uB41C \uD30C\uC77C\uB4E4 (", uploadedFiles.length, "\uAC1C)"] }), jsxRuntimeExports.jsx("div", { className: "designbase-file-uploader__file-items", children: uploadedFiles.map((uploadFile) => (jsxRuntimeExports.jsxs("div", { className: clsx('designbase-file-uploader__file-item', `designbase-file-uploader__file-item--${uploadFile.status}`), children: [jsxRuntimeExports.jsxs("div", { className: "designbase-file-uploader__file-info", children: [jsxRuntimeExports.jsx("div", { className: "designbase-file-uploader__file-icon", children: getStatusIcon(uploadFile.status) }), jsxRuntimeExports.jsxs("div", { className: "designbase-file-uploader__file-details", children: [jsxRuntimeExports.jsx("div", { className: "designbase-file-uploader__file-name", children: uploadFile.file.name }), jsxRuntimeExports.jsx("div", { className: "designbase-file-uploader__file-size", children: formatFileSize(uploadFile.file.size) }), uploadFile.error && (jsxRuntimeExports.jsx("div", { className: "designbase-file-uploader__file-error", children: uploadFile.error }))] })] }), showProgress && uploadFile.status === 'uploading' && (jsxRuntimeExports.jsx("div", { className: "designbase-file-uploader__progress", children: jsxRuntimeExports.jsx(Progressbar
|
|
7225
|
+
}, className), children: [jsxRuntimeExports.jsx(Dropzone, { size: size, variant: variant, accept: accept, maxSize: maxSize, multiple: multiple, disabled: disabled, readonly: readonly, onFileSelect: handleFileSelect }), showFileList && uploadedFiles.length > 0 && (jsxRuntimeExports.jsxs("div", { className: "designbase-file-uploader__file-list", children: [jsxRuntimeExports.jsxs("div", { className: "designbase-file-uploader__file-list-title", children: ["\uC5C5\uB85C\uB4DC\uB41C \uD30C\uC77C\uB4E4 (", uploadedFiles.length, "\uAC1C)"] }), jsxRuntimeExports.jsx("div", { className: "designbase-file-uploader__file-items", children: uploadedFiles.map((uploadFile) => (jsxRuntimeExports.jsxs("div", { className: clsx('designbase-file-uploader__file-item', `designbase-file-uploader__file-item--${uploadFile.status}`), children: [jsxRuntimeExports.jsxs("div", { className: "designbase-file-uploader__file-info", children: [jsxRuntimeExports.jsx("div", { className: "designbase-file-uploader__file-icon", children: getStatusIcon(uploadFile.status) }), jsxRuntimeExports.jsxs("div", { className: "designbase-file-uploader__file-details", children: [jsxRuntimeExports.jsx("div", { className: "designbase-file-uploader__file-name", children: uploadFile.file.name }), jsxRuntimeExports.jsx("div", { className: "designbase-file-uploader__file-size", children: formatFileSize(uploadFile.file.size) }), uploadFile.error && (jsxRuntimeExports.jsx("div", { className: "designbase-file-uploader__file-error", children: uploadFile.error }))] })] }), showProgress && uploadFile.status === 'uploading' && (jsxRuntimeExports.jsx("div", { className: "designbase-file-uploader__progress", children: jsxRuntimeExports.jsx(Progressbar, { value: uploadFile.progress || 0, size: "s", variant: "primary", style: "solid", showLabel: true, labelPosition: "inside", fullWidth: true }) })), jsxRuntimeExports.jsxs("div", { className: "designbase-file-uploader__file-actions", children: [uploadFile.status === 'error' && (jsxRuntimeExports.jsx("button", { className: "designbase-file-uploader__retry-button", onClick: () => handleRetry(uploadFile.id), disabled: disabled || readonly, type: "button", children: "\uC7AC\uC2DC\uB3C4" })), jsxRuntimeExports.jsx("button", { className: "designbase-file-uploader__remove-button", onClick: () => handleRemove(uploadFile.id), disabled: disabled || readonly, type: "button", children: "\uC0AD\uC81C" })] })] }, uploadFile.id))) })] }))] }));
|
|
7250
7226
|
};
|
|
7251
7227
|
|
|
7252
7228
|
const FloatingActionButton = forwardRef(({ size = 'm', variant = 'primary', icon, disabled = false, onClick, className, style, ...props }, forwardedRef) => {
|
|
@@ -7465,7 +7441,7 @@ const Form = ({ fields, layout = 'vertical', size = 'm', variant = 'default', on
|
|
|
7465
7441
|
case 'textarea':
|
|
7466
7442
|
return (jsxRuntimeExports.jsx(Textarea, { ...commonProps, rows: 4, maxLength: field.maxLength, minLength: field.minLength }));
|
|
7467
7443
|
case 'select':
|
|
7468
|
-
return (jsxRuntimeExports.jsx(Select
|
|
7444
|
+
return (jsxRuntimeExports.jsx(Select, { ...commonProps, options: field.options || [], multiple: field.multiple }));
|
|
7469
7445
|
case 'radio':
|
|
7470
7446
|
if (field.radioGroup) {
|
|
7471
7447
|
return (jsxRuntimeExports.jsx("div", { className: "designbase-form__radio-group", children: field.options?.map((option, index) => (jsxRuntimeExports.jsx(Radio, { name: field.name, value: option.value, isSelected: fieldValue === option.value, isDisabled: option.disabled || field.disabled, onChange: () => handleFieldChange(field.name, option.value), children: option.label }, `${field.name}-${option.value}`))) }));
|
|
@@ -7502,7 +7478,7 @@ const Form = ({ fields, layout = 'vertical', size = 'm', variant = 'default', on
|
|
|
7502
7478
|
return (jsxRuntimeExports.jsxs("form", { ref: formRef, className: classes, style: style, onSubmit: handleSubmit, children: [(title || description) && (jsxRuntimeExports.jsxs("div", { className: "designbase-form__header", children: [title && jsxRuntimeExports.jsx("h3", { className: "designbase-form__title", children: title }), description && jsxRuntimeExports.jsx("p", { className: "designbase-form__description", children: description })] })), jsxRuntimeExports.jsx("div", { className: "designbase-form__fields", children: fields.map(field => (jsxRuntimeExports.jsxs("div", { className: clsx('designbase-form__field-wrapper', `designbase-form__field-wrapper--${field.type}`), children: [field.label && (jsxRuntimeExports.jsxs("label", { className: "designbase-form__label", htmlFor: field.name, children: [field.label, field.required && jsxRuntimeExports.jsx("span", { className: "designbase-form__required", children: "*" })] })), renderField(field), touched[field.name] && errors[field.name] && (jsxRuntimeExports.jsx("div", { className: "designbase-form__error", children: errors[field.name] })), field.helpText && !errors[field.name] && (jsxRuntimeExports.jsx("div", { className: "designbase-form__help", children: field.helpText }))] }, field.name))) }), jsxRuntimeExports.jsxs("div", { className: "designbase-form__actions", children: [jsxRuntimeExports.jsx(Button, { type: "submit", variant: "primary", size: size, loading: submitLoading, disabled: submitDisabled, children: submitText }), showReset && (jsxRuntimeExports.jsx(Button, { type: "button", variant: "secondary", size: size, onClick: handleReset, children: resetText }))] })] }));
|
|
7503
7479
|
};
|
|
7504
7480
|
|
|
7505
|
-
const Gradient
|
|
7481
|
+
const Gradient = ({ colors, direction = 'to-right', size = 'm', variant = 'default', animationDuration = 3, animationDelay = 0, fullWidth = false, fullHeight = false, className, children, }) => {
|
|
7506
7482
|
const generateGradientStyle = () => {
|
|
7507
7483
|
if (colors.length === 0)
|
|
7508
7484
|
return {};
|
|
@@ -7595,8 +7571,6 @@ const Gradient$1 = ({ colors, direction = 'to-right', size = 'm', variant = 'def
|
|
|
7595
7571
|
return (jsxRuntimeExports.jsx("div", { className: classes, style: getStyle(), children: children }));
|
|
7596
7572
|
};
|
|
7597
7573
|
|
|
7598
|
-
Gradient;
|
|
7599
|
-
|
|
7600
7574
|
const Grid = ({ fixed = false, noPadding = false, className, style, children, }) => {
|
|
7601
7575
|
const classes = clsx('designbase-grid', {
|
|
7602
7576
|
'designbase-grid--fixed': fixed,
|
|
@@ -7664,7 +7638,7 @@ const HeroFeature = ({ title, subtitle, description, image, imageAlt, background
|
|
|
7664
7638
|
default: return 'text';
|
|
7665
7639
|
}
|
|
7666
7640
|
};
|
|
7667
|
-
return (jsxRuntimeExports.jsx(Badge
|
|
7641
|
+
return (jsxRuntimeExports.jsx(Badge, { variant: getBadgeVariant(badge.color || 'primary'), style: getBadgeStyle(badge.variant || 'solid'), size: "m", className: "designbase-hero-feature__badge", children: badge.text }));
|
|
7668
7642
|
};
|
|
7669
7643
|
const renderButtons = () => {
|
|
7670
7644
|
if (buttons.length === 0)
|
|
@@ -8186,7 +8160,7 @@ const DesignBaseLogoMark = ({ size = 38, color = 'currentColor', className, }) =
|
|
|
8186
8160
|
};
|
|
8187
8161
|
DesignBaseLogoMark.displayName = 'DesignBaseLogoMark';
|
|
8188
8162
|
|
|
8189
|
-
const Logo
|
|
8163
|
+
const Logo = ({ type = 'designbase', text = 'Logo', src, alt, size = 'm', variant = 'default', clickable = false, href, target = '_self', fullWidth = false, className, onClick, ...props }) => {
|
|
8190
8164
|
const classes = clsx('designbase-logo', `designbase-logo--${size}`, `designbase-logo--${variant}`, {
|
|
8191
8165
|
'designbase-logo--clickable': clickable || href,
|
|
8192
8166
|
'designbase-logo--full-width': fullWidth,
|
|
@@ -8245,9 +8219,7 @@ const Logo$1 = ({ type = 'designbase', text = 'Logo', src, alt, size = 'm', vari
|
|
|
8245
8219
|
}
|
|
8246
8220
|
return logoContent;
|
|
8247
8221
|
};
|
|
8248
|
-
Logo
|
|
8249
|
-
|
|
8250
|
-
Logo;
|
|
8222
|
+
Logo.displayName = 'Logo';
|
|
8251
8223
|
|
|
8252
8224
|
const MarkdownEditor = ({ size = 'm', variant = 'default', mode = 'preview', // 기본값을 preview로 변경
|
|
8253
8225
|
theme = 'light', value = '', placeholder = '마크다운을 입력하세요...', minHeight = 200, maxHeight = 600, autoHeight = false, readonly = false, disabled = false, showToolbar = true, toolbarItems = [], showStatus = true, showWordCount = true, showLineCount = true, autoSave = false, autoSaveInterval = 30000, // 30초
|
|
@@ -8676,9 +8648,7 @@ const Masonry = ({ images, columns = 3, spacing = 'md', ratio = 'auto', fit = 'c
|
|
|
8676
8648
|
})), currentIndex: selectedImageIndex, isOpen: true, onOpenChange: handleLightboxClose, onImageChange: handleLightboxNavigate }))] }));
|
|
8677
8649
|
};
|
|
8678
8650
|
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
const SearchBar$1 = ({ value, defaultValue = '', placeholder = '검색...', size = 'm', variant = 'default', disabled = false, readOnly = false, fullWidth = false, searchIcon: SearchIconComponent = SearchIcon, clearIcon: ClearIconComponent = CloseIcon, onChange, onSearch, onFocus, onBlur, onKeyDown, className, ...props }) => {
|
|
8651
|
+
const SearchBar = ({ value, defaultValue = '', placeholder = '검색...', size = 'm', variant = 'default', disabled = false, readOnly = false, fullWidth = false, searchIcon: SearchIconComponent = SearchIcon, clearIcon: ClearIconComponent = CloseIcon, onChange, onSearch, onFocus, onBlur, onKeyDown, className, ...props }) => {
|
|
8682
8652
|
const [internalValue, setInternalValue] = useState(defaultValue);
|
|
8683
8653
|
const inputRef = useRef(null);
|
|
8684
8654
|
const currentValue = value !== undefined ? value : internalValue;
|
|
@@ -8720,9 +8690,9 @@ const SearchBar$1 = ({ value, defaultValue = '', placeholder = '검색...', size
|
|
|
8720
8690
|
});
|
|
8721
8691
|
return (jsxRuntimeExports.jsx("div", { className: classes, role: "search", children: jsxRuntimeExports.jsxs("div", { className: "designbase-search-bar__container", children: [jsxRuntimeExports.jsx("div", { className: "designbase-search-bar__search-icon", children: jsxRuntimeExports.jsx(SearchIconComponent, { size: size === 's' ? 16 : size === 'l' ? 24 : 20 }) }), jsxRuntimeExports.jsx("input", { ref: inputRef, type: "text", className: inputClasses, value: currentValue, placeholder: placeholder, disabled: disabled, readOnly: readOnly, onChange: handleChange, onFocus: onFocus, onBlur: onBlur, onKeyDown: handleKeyDown, "aria-label": "\uAC80\uC0C9\uC5B4 \uC785\uB825", ...props }), currentValue && currentValue.length > 0 && !disabled && !readOnly && (jsxRuntimeExports.jsx("button", { type: "button", className: "designbase-search-bar__clear-button", onClick: handleClear, "aria-label": "\uAC80\uC0C9\uC5B4 \uC9C0\uC6B0\uAE30", children: jsxRuntimeExports.jsx(ClearIconComponent, { size: size === 's' ? 16 : size === 'l' ? 24 : 20 }) }))] }) }));
|
|
8722
8692
|
};
|
|
8723
|
-
SearchBar
|
|
8693
|
+
SearchBar.displayName = 'SearchBar';
|
|
8724
8694
|
|
|
8725
|
-
const Navbar
|
|
8695
|
+
const Navbar = ({ size = 'm', variant = 'default', position = 'static', logo, onLogoClick, items = [], onItemClick, userMenuItems = [], onUserMenuItemClick, userProfile, onAuthClick, isAuthenticated = false, showSearch = false, onSearch, searchPlaceholder = '검색...', fullWidth = false, shadow = false, className, ...props }) => {
|
|
8726
8696
|
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
|
8727
8697
|
const [isUserMenuOpen, setIsUserMenuOpen] = useState(false);
|
|
8728
8698
|
const [searchQuery, setSearchQuery] = useState('');
|
|
@@ -8819,7 +8789,7 @@ const Navbar$1 = ({ size = 'm', variant = 'default', position = 'static', logo,
|
|
|
8819
8789
|
}
|
|
8820
8790
|
};
|
|
8821
8791
|
const renderNavItem = (item) => renderMenuItem(item, 0);
|
|
8822
|
-
return (jsxRuntimeExports.jsxs("nav", { className: classes, role: "navigation", "aria-label": "\uBA54\uC778 \uB124\uBE44\uAC8C\uC774\uC158", ...props, children: [jsxRuntimeExports.jsxs("div", { className: containerClasses, children: [jsxRuntimeExports.jsx("div", { className: "designbase-navbar__brand", children: jsxRuntimeExports.jsx("div", { className: "designbase-navbar__logo", onClick: onLogoClick, role: onLogoClick ? 'button' : undefined, tabIndex: onLogoClick ? 0 : undefined, children: logo || jsxRuntimeExports.jsx(Logo
|
|
8792
|
+
return (jsxRuntimeExports.jsxs("nav", { className: classes, role: "navigation", "aria-label": "\uBA54\uC778 \uB124\uBE44\uAC8C\uC774\uC158", ...props, children: [jsxRuntimeExports.jsxs("div", { className: containerClasses, children: [jsxRuntimeExports.jsx("div", { className: "designbase-navbar__brand", children: jsxRuntimeExports.jsx("div", { className: "designbase-navbar__logo", onClick: onLogoClick, role: onLogoClick ? 'button' : undefined, tabIndex: onLogoClick ? 0 : undefined, children: logo || jsxRuntimeExports.jsx(Logo, { size: size === 's' ? 's' : size === 'l' ? 'l' : 'm' }) }) }), jsxRuntimeExports.jsx("div", { className: "designbase-navbar__nav", children: jsxRuntimeExports.jsx("ul", { className: "designbase-navbar__nav-list", children: items.map(renderNavItem) }) }), showSearch && (jsxRuntimeExports.jsx("div", { className: "designbase-navbar__search", children: jsxRuntimeExports.jsx(SearchBar, { placeholder: searchPlaceholder, value: searchQuery, onChange: setSearchQuery, onSearch: onSearch, size: size === 's' ? 's' : size === 'l' ? 'l' : 'm', variant: "outlined" }) })), jsxRuntimeExports.jsx("div", { className: "designbase-navbar__user-menu", children: isAuthenticated && userProfile ? (jsxRuntimeExports.jsxs("div", { className: "designbase-navbar__user-dropdown", children: [jsxRuntimeExports.jsxs("button", { className: "designbase-navbar__user-toggle", onClick: handleUserMenuToggle, "aria-expanded": isUserMenuOpen, children: [jsxRuntimeExports.jsx(Avatar, { src: userProfile.avatar, alt: userProfile.name, initials: userProfile.name, size: size === 's' ? 's' : size === 'l' ? 'l' : 'm', badge: userProfile.badge, badgeVariant: userProfile.badgeVariant, badgeStyle: userProfile.badgeStyle, badgeText: userProfile.badgeText }), jsxRuntimeExports.jsx("span", { className: "designbase-navbar__user-name", children: userProfile.name }), jsxRuntimeExports.jsx(ChevronDownIcon, { size: 12 })] }), isUserMenuOpen && (jsxRuntimeExports.jsxs("ul", { className: "designbase-navbar__user-dropdown-menu", children: [userProfile.email && (jsxRuntimeExports.jsx("li", { className: "designbase-navbar__user-info", children: jsxRuntimeExports.jsx("span", { className: "designbase-navbar__user-email", children: userProfile.email }) })), userMenuItems.map((item) => (jsxRuntimeExports.jsx("li", { children: jsxRuntimeExports.jsxs("a", { href: item.href, className: clsx('designbase-navbar__user-dropdown-item', {
|
|
8823
8793
|
'designbase-navbar__user-dropdown-item--disabled': item.disabled,
|
|
8824
8794
|
}), onClick: (e) => {
|
|
8825
8795
|
if (item.disabled) {
|
|
@@ -8827,7 +8797,7 @@ const Navbar$1 = ({ size = 'm', variant = 'default', position = 'static', logo,
|
|
|
8827
8797
|
return;
|
|
8828
8798
|
}
|
|
8829
8799
|
handleUserMenuItemClick(item);
|
|
8830
|
-
}, children: [item.icon && React.createElement(item.icon, { size: iconSize, color: 'currentColor' }), item.label] }) }, item.id)))] }))] })) : (jsxRuntimeExports.jsx("button", { className: "designbase-navbar__auth-button", onClick: onAuthClick, children: "\uB85C\uADF8\uC778" })) }), jsxRuntimeExports.jsxs("button", { className: "designbase-navbar__mobile-toggle", onClick: handleMobileMenuToggle, "aria-expanded": isMobileMenuOpen, "aria-label": "\uBA54\uB274 \uC5F4\uAE30", children: [jsxRuntimeExports.jsx("span", { className: "designbase-navbar__mobile-toggle-line" }), jsxRuntimeExports.jsx("span", { className: "designbase-navbar__mobile-toggle-line" }), jsxRuntimeExports.jsx("span", { className: "designbase-navbar__mobile-toggle-line" })] })] }), isMobileMenuOpen && (jsxRuntimeExports.jsxs("div", { className: "designbase-navbar__mobile-menu", children: [jsxRuntimeExports.jsxs("div", { className: "designbase-navbar__mobile-menu-header", children: [jsxRuntimeExports.jsx("h3", { children: "\uBA54\uB274" }), jsxRuntimeExports.jsx("button", { className: "designbase-navbar__mobile-menu-close", onClick: handleMobileMenuToggle, "aria-label": "\uBA54\uB274 \uB2EB\uAE30", children: jsxRuntimeExports.jsx("i", { className: "designbase-icon-x" }) })] }), showSearch && (jsxRuntimeExports.jsx("div", { className: "designbase-navbar__mobile-search", children: jsxRuntimeExports.jsx(SearchBar
|
|
8800
|
+
}, children: [item.icon && React.createElement(item.icon, { size: iconSize, color: 'currentColor' }), item.label] }) }, item.id)))] }))] })) : (jsxRuntimeExports.jsx("button", { className: "designbase-navbar__auth-button", onClick: onAuthClick, children: "\uB85C\uADF8\uC778" })) }), jsxRuntimeExports.jsxs("button", { className: "designbase-navbar__mobile-toggle", onClick: handleMobileMenuToggle, "aria-expanded": isMobileMenuOpen, "aria-label": "\uBA54\uB274 \uC5F4\uAE30", children: [jsxRuntimeExports.jsx("span", { className: "designbase-navbar__mobile-toggle-line" }), jsxRuntimeExports.jsx("span", { className: "designbase-navbar__mobile-toggle-line" }), jsxRuntimeExports.jsx("span", { className: "designbase-navbar__mobile-toggle-line" })] })] }), isMobileMenuOpen && (jsxRuntimeExports.jsxs("div", { className: "designbase-navbar__mobile-menu", children: [jsxRuntimeExports.jsxs("div", { className: "designbase-navbar__mobile-menu-header", children: [jsxRuntimeExports.jsx("h3", { children: "\uBA54\uB274" }), jsxRuntimeExports.jsx("button", { className: "designbase-navbar__mobile-menu-close", onClick: handleMobileMenuToggle, "aria-label": "\uBA54\uB274 \uB2EB\uAE30", children: jsxRuntimeExports.jsx("i", { className: "designbase-icon-x" }) })] }), showSearch && (jsxRuntimeExports.jsx("div", { className: "designbase-navbar__mobile-search", children: jsxRuntimeExports.jsx(SearchBar, { placeholder: searchPlaceholder, value: searchQuery, onChange: setSearchQuery, onSearch: onSearch, size: "s", variant: "outlined", fullWidth: true }) })), jsxRuntimeExports.jsx("ul", { className: "designbase-navbar__mobile-nav-list", children: items.map((item) => (jsxRuntimeExports.jsxs("li", { className: "designbase-navbar__mobile-nav-item", children: [jsxRuntimeExports.jsxs("a", { href: item.href, className: clsx('designbase-navbar__mobile-nav-link', {
|
|
8831
8801
|
'designbase-navbar__mobile-nav-link--active': item.active,
|
|
8832
8802
|
'designbase-navbar__mobile-nav-link--disabled': item.disabled,
|
|
8833
8803
|
}), onClick: (e) => {
|
|
@@ -8855,11 +8825,9 @@ const Navbar$1 = ({ size = 'm', variant = 'default', position = 'static', logo,
|
|
|
8855
8825
|
handleUserMenuItemClick(item);
|
|
8856
8826
|
}, children: [item.icon && React.createElement(item.icon, { size: iconSize, color: 'currentColor' }), item.label] }) }, item.id))) })] }))] }))] }));
|
|
8857
8827
|
};
|
|
8858
|
-
Navbar
|
|
8828
|
+
Navbar.displayName = 'Navbar';
|
|
8859
8829
|
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
const Pagination$1 = ({ currentPage, totalPages, totalItems, pageSize = 10, pageSizeOptions = [10, 20, 50, 100], onPageChange, onPageSizeChange, size = 'm', variant = 'default', alignment = 'center', siblingCount = 1, boundaryCount = 1, showPreviousNext = true, showFirstLast = false, showPageSizeSelector = false, showTotal = false, totalTemplate, disabled = false, fullWidth = false, className, ...props }) => {
|
|
8830
|
+
const Pagination = ({ currentPage, totalPages, totalItems, pageSize = 10, pageSizeOptions = [10, 20, 50, 100], onPageChange, onPageSizeChange, size = 'm', variant = 'default', alignment = 'center', siblingCount = 1, boundaryCount = 1, showPreviousNext = true, showFirstLast = false, showPageSizeSelector = false, showTotal = false, totalTemplate, disabled = false, fullWidth = false, className, ...props }) => {
|
|
8863
8831
|
// 페이지 범위 계산
|
|
8864
8832
|
const getPageNumbers = () => {
|
|
8865
8833
|
const totalNumbers = siblingCount * 2 + 3; // 이전, 다음, 현재, 경계 페이지들
|
|
@@ -8924,7 +8892,7 @@ const Pagination$1 = ({ currentPage, totalPages, totalItems, pageSize = 10, page
|
|
|
8924
8892
|
'designbase-pagination__button--active': isActive,
|
|
8925
8893
|
}), onClick: () => handlePageClick(pageNumber), disabled: disabled, "aria-current": isActive ? 'page' : undefined, "aria-label": `페이지 ${pageNumber}로 이동`, children: pageNumber }) }, pageNumber));
|
|
8926
8894
|
};
|
|
8927
|
-
return (jsxRuntimeExports.jsx("div", { className: classes, role: "navigation", "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", ...props, children: jsxRuntimeExports.jsxs("div", { className: containerClasses, children: [showTotal && totalItems && (jsxRuntimeExports.jsx("div", { className: "designbase-pagination__total", children: getTotalTemplate() })), jsxRuntimeExports.jsx("nav", { className: "designbase-pagination__nav", "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: jsxRuntimeExports.jsxs("ul", { className: "designbase-pagination__list", children: [showFirstLast && !isFirstPage && (jsxRuntimeExports.jsx("li", { className: "designbase-pagination__item", children: jsxRuntimeExports.jsx("button", { className: "designbase-pagination__button designbase-pagination__button--first", onClick: () => handlePageClick(1), disabled: disabled, "aria-label": "\uCCAB \uD398\uC774\uC9C0\uB85C \uC774\uB3D9", children: jsxRuntimeExports.jsx(ArrowBarLeftIcon, { size: 16 }) }) })), showPreviousNext && !isFirstPage && (jsxRuntimeExports.jsx("li", { className: "designbase-pagination__item", children: jsxRuntimeExports.jsx("button", { className: "designbase-pagination__button designbase-pagination__button--previous", onClick: () => handlePageClick(currentPage - 1), disabled: disabled, "aria-label": "\uC774\uC804 \uD398\uC774\uC9C0\uB85C \uC774\uB3D9", children: jsxRuntimeExports.jsx(ChevronLeftIcon, { size: 16 }) }) })), pageNumbers.map(renderPageButton), showPreviousNext && !isLastPage && (jsxRuntimeExports.jsx("li", { className: "designbase-pagination__item", children: jsxRuntimeExports.jsx("button", { className: "designbase-pagination__button designbase-pagination__button--next", onClick: () => handlePageClick(currentPage + 1), disabled: disabled, "aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0\uB85C \uC774\uB3D9", children: jsxRuntimeExports.jsx(ChevronRightIcon, { size: 16 }) }) })), showFirstLast && !isLastPage && (jsxRuntimeExports.jsx("li", { className: "designbase-pagination__item", children: jsxRuntimeExports.jsx("button", { className: "designbase-pagination__button designbase-pagination__button--last", onClick: () => handlePageClick(totalPages), disabled: disabled, "aria-label": "\uB9C8\uC9C0\uB9C9 \uD398\uC774\uC9C0\uB85C \uC774\uB3D9", children: jsxRuntimeExports.jsx(ArrowBarRightIcon, { size: 16 }) }) }))] }) }), showPageSizeSelector && onPageSizeChange && (jsxRuntimeExports.jsx("div", { className: "designbase-pagination__page-size", children: jsxRuntimeExports.jsxs("label", { className: "designbase-pagination__page-size-label", children: ["\uD398\uC774\uC9C0\uB2F9:", jsxRuntimeExports.jsx(Select
|
|
8895
|
+
return (jsxRuntimeExports.jsx("div", { className: classes, role: "navigation", "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", ...props, children: jsxRuntimeExports.jsxs("div", { className: containerClasses, children: [showTotal && totalItems && (jsxRuntimeExports.jsx("div", { className: "designbase-pagination__total", children: getTotalTemplate() })), jsxRuntimeExports.jsx("nav", { className: "designbase-pagination__nav", "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: jsxRuntimeExports.jsxs("ul", { className: "designbase-pagination__list", children: [showFirstLast && !isFirstPage && (jsxRuntimeExports.jsx("li", { className: "designbase-pagination__item", children: jsxRuntimeExports.jsx("button", { className: "designbase-pagination__button designbase-pagination__button--first", onClick: () => handlePageClick(1), disabled: disabled, "aria-label": "\uCCAB \uD398\uC774\uC9C0\uB85C \uC774\uB3D9", children: jsxRuntimeExports.jsx(ArrowBarLeftIcon, { size: 16 }) }) })), showPreviousNext && !isFirstPage && (jsxRuntimeExports.jsx("li", { className: "designbase-pagination__item", children: jsxRuntimeExports.jsx("button", { className: "designbase-pagination__button designbase-pagination__button--previous", onClick: () => handlePageClick(currentPage - 1), disabled: disabled, "aria-label": "\uC774\uC804 \uD398\uC774\uC9C0\uB85C \uC774\uB3D9", children: jsxRuntimeExports.jsx(ChevronLeftIcon, { size: 16 }) }) })), pageNumbers.map(renderPageButton), showPreviousNext && !isLastPage && (jsxRuntimeExports.jsx("li", { className: "designbase-pagination__item", children: jsxRuntimeExports.jsx("button", { className: "designbase-pagination__button designbase-pagination__button--next", onClick: () => handlePageClick(currentPage + 1), disabled: disabled, "aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0\uB85C \uC774\uB3D9", children: jsxRuntimeExports.jsx(ChevronRightIcon, { size: 16 }) }) })), showFirstLast && !isLastPage && (jsxRuntimeExports.jsx("li", { className: "designbase-pagination__item", children: jsxRuntimeExports.jsx("button", { className: "designbase-pagination__button designbase-pagination__button--last", onClick: () => handlePageClick(totalPages), disabled: disabled, "aria-label": "\uB9C8\uC9C0\uB9C9 \uD398\uC774\uC9C0\uB85C \uC774\uB3D9", children: jsxRuntimeExports.jsx(ArrowBarRightIcon, { size: 16 }) }) }))] }) }), showPageSizeSelector && onPageSizeChange && (jsxRuntimeExports.jsx("div", { className: "designbase-pagination__page-size", children: jsxRuntimeExports.jsxs("label", { className: "designbase-pagination__page-size-label", children: ["\uD398\uC774\uC9C0\uB2F9:", jsxRuntimeExports.jsx(Select, { value: pageSize.toString(), options: pageSizeOptions.map(option => ({
|
|
8928
8896
|
value: option.toString(),
|
|
8929
8897
|
label: option.toString()
|
|
8930
8898
|
})), onChange: (value) => {
|
|
@@ -8935,11 +8903,9 @@ const Pagination$1 = ({ currentPage, totalPages, totalItems, pageSize = 10, page
|
|
|
8935
8903
|
}
|
|
8936
8904
|
}, disabled: disabled, size: size, className: "designbase-pagination__page-size-select", searchable: false, multiple: false, showClearButton: false })] }) }))] }) }));
|
|
8937
8905
|
};
|
|
8938
|
-
Pagination
|
|
8939
|
-
|
|
8940
|
-
Pagination;
|
|
8906
|
+
Pagination.displayName = 'Pagination';
|
|
8941
8907
|
|
|
8942
|
-
const Popover
|
|
8908
|
+
const Popover = ({ content, children, position = 'top', size = 'm', variant = 'default', trigger = 'click', delay = 200, hideDelay = 0, alwaysShow = false, disabled = false, maxWidth = 300, showArrow = true, closeOnOutsideClick = true, closeOnEscape = true, open: controlledOpen, onOpenChange, showCloseButton = true, className, ...props }) => {
|
|
8943
8909
|
const [internalOpen, setInternalOpen] = useState(false);
|
|
8944
8910
|
const [popoverStyle, setPopoverStyle] = useState({});
|
|
8945
8911
|
const [arrowStyle, setArrowStyle] = useState({});
|
|
@@ -9236,11 +9202,9 @@ const Popover$1 = ({ content, children, position = 'top', size = 'm', variant =
|
|
|
9236
9202
|
});
|
|
9237
9203
|
return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [enhancedChildren, isOpen && (jsxRuntimeExports.jsxs("div", { ref: popoverRef, className: classes, style: popoverStyle, role: "dialog", "aria-modal": "false", ...props, children: [jsxRuntimeExports.jsxs("div", { className: "designbase-popover__content", children: [showCloseButton && (jsxRuntimeExports.jsx("button", { className: "designbase-popover__close-button", onClick: handleCloseClick, "aria-label": "\uD31D\uC624\uBC84 \uB2EB\uAE30", type: "button" })), content] }), showArrow && (jsxRuntimeExports.jsx("div", { className: arrowClasses, style: arrowStyle }))] }))] }));
|
|
9238
9204
|
};
|
|
9239
|
-
Popover
|
|
9205
|
+
Popover.displayName = 'Popover';
|
|
9240
9206
|
|
|
9241
|
-
|
|
9242
|
-
|
|
9243
|
-
const Progress$1 = ({ value, max = 100, size = 'm', variant = 'default', type = 'linear', showValue = false, valueFormatter, animated = false, striped = false, className, }) => {
|
|
9207
|
+
const Progress = ({ value, max = 100, size = 'm', variant = 'default', type = 'linear', showValue = false, valueFormatter, animated = false, striped = false, className, }) => {
|
|
9244
9208
|
const percentage = Math.min(Math.max((value / max) * 100, 0), 100);
|
|
9245
9209
|
const classes = clsx('designbase-progress', `designbase-progress--size-${size}`, `designbase-progress--variant-${variant}`, `designbase-progress--type-${type}`, {
|
|
9246
9210
|
'designbase-progress--animated': animated,
|
|
@@ -9258,8 +9222,6 @@ const Progress$1 = ({ value, max = 100, size = 'm', variant = 'default', type =
|
|
|
9258
9222
|
return (jsxRuntimeExports.jsx("div", { className: classes, children: type === 'linear' ? renderLinearProgress() : renderCircularProgress() }));
|
|
9259
9223
|
};
|
|
9260
9224
|
|
|
9261
|
-
Progress;
|
|
9262
|
-
|
|
9263
9225
|
const ProgressStep = ({ items, variant = 'default', size = 'm', layout = 'vertical', currentStep = 0, clickable = false, fullWidth = false, disabled = false, className, style, onStepClick, }) => {
|
|
9264
9226
|
const handleStepClick = (item, index) => {
|
|
9265
9227
|
if (disabled || item.disabled || !clickable)
|
|
@@ -9298,9 +9260,7 @@ const ProgressStep = ({ items, variant = 'default', size = 'm', layout = 'vertic
|
|
|
9298
9260
|
}) }));
|
|
9299
9261
|
};
|
|
9300
9262
|
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
const RangeSlider$1 = ({ value, range, min = 0, max = 100, step = 1, size = 'm', variant = 'default', showValue = false, showMarks = false, marks = [], markLabels = {}, disabled = false, readOnly = false, fullWidth = false, vertical = false, onChange, onRangeChange, className, ...props }) => {
|
|
9263
|
+
const RangeSlider = ({ value, range, min = 0, max = 100, step = 1, size = 'm', variant = 'default', showValue = false, showMarks = false, marks = [], markLabels = {}, disabled = false, readOnly = false, fullWidth = false, vertical = false, onChange, onRangeChange, className, ...props }) => {
|
|
9304
9264
|
const [internalValue, setInternalValue] = useState(value ?? min);
|
|
9305
9265
|
const [internalRange, setInternalRange] = useState(range ?? [min, max]);
|
|
9306
9266
|
const [isDragging, setIsDragging] = useState(false);
|
|
@@ -9515,9 +9475,7 @@ const RangeSlider$1 = ({ value, range, min = 0, max = 100, step = 1, size = 'm',
|
|
|
9515
9475
|
[vertical ? 'bottom' : 'left']: `${getPercentage(currentValue)}%`,
|
|
9516
9476
|
}, onPointerDown: handlePointerDown, onKeyDown: handleKeyDown, role: "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": currentValue, tabIndex: disabled || readOnly ? -1 : 0, draggable: false }))] }) })] }));
|
|
9517
9477
|
};
|
|
9518
|
-
RangeSlider
|
|
9519
|
-
|
|
9520
|
-
RangeSlider;
|
|
9478
|
+
RangeSlider.displayName = 'RangeSlider';
|
|
9521
9479
|
|
|
9522
9480
|
const Rating = ({ value, maxValue = 5, size = 'm', variant = 'default', type = 'star', display = 'stars', reviewCount, ratingText, reviewText, allowHalf = false, readonly = false, disabled = false, clickable = false, color = 'primary', customColor, animated = false, hoverEffect = true, onChange, onHover, onClick, className, }) => {
|
|
9523
9481
|
const [hoverValue, setHoverValue] = useState(null);
|
|
@@ -10108,7 +10066,7 @@ const ResizablePanels = ({ children, initialWidth = '100%', initialHeight = '100
|
|
|
10108
10066
|
}, children: handleIcon || getDefaultHandleIcon() })] }));
|
|
10109
10067
|
};
|
|
10110
10068
|
|
|
10111
|
-
const ScrollArea
|
|
10069
|
+
const ScrollArea = ({ direction = 'vertical', scrollbarStyle = 'auto', maxHeight, maxWidth, minHeight, minWidth, fullWidth = false, fullHeight = false, alwaysShowScrollbar = false, scrollbarColor, scrollbarTrackColor, className, children, }) => {
|
|
10112
10070
|
const scrollRef = useRef(null);
|
|
10113
10071
|
const [hasVerticalScroll, setHasVerticalScroll] = useState(false);
|
|
10114
10072
|
const [hasHorizontalScroll, setHasHorizontalScroll] = useState(false);
|
|
@@ -10149,11 +10107,7 @@ const ScrollArea$1 = ({ direction = 'vertical', scrollbarStyle = 'auto', maxHeig
|
|
|
10149
10107
|
return (jsxRuntimeExports.jsx("div", { className: classes, style: style, children: jsxRuntimeExports.jsx("div", { ref: scrollRef, className: "designbase-scroll-area__content", children: children }) }));
|
|
10150
10108
|
};
|
|
10151
10109
|
|
|
10152
|
-
|
|
10153
|
-
|
|
10154
|
-
SearchBar;
|
|
10155
|
-
|
|
10156
|
-
const Section$1 = ({ title, subtitle, description, size = 'm', variant = 'default', header, footer, actions, noPadding = false, fullWidth = false, fullHeight = false, className, children, }) => {
|
|
10110
|
+
const Section = ({ title, subtitle, description, size = 'm', variant = 'default', header, footer, actions, noPadding = false, fullWidth = false, fullHeight = false, className, children, }) => {
|
|
10157
10111
|
const classes = clsx('designbase-section', `designbase-section--size-${size}`, `designbase-section--variant-${variant}`, {
|
|
10158
10112
|
'designbase-section--no-padding': noPadding,
|
|
10159
10113
|
'designbase-section--full-width': fullWidth,
|
|
@@ -10163,12 +10117,6 @@ const Section$1 = ({ title, subtitle, description, size = 'm', variant = 'defaul
|
|
|
10163
10117
|
return (jsxRuntimeExports.jsxs("section", { className: classes, children: [hasHeader && (jsxRuntimeExports.jsx("div", { className: "designbase-section__header", children: header || (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [(title || subtitle) && (jsxRuntimeExports.jsxs("div", { className: "designbase-section__title-area", children: [title && (jsxRuntimeExports.jsx("h2", { className: "designbase-section__title", children: title })), subtitle && (jsxRuntimeExports.jsx("h3", { className: "designbase-section__subtitle", children: subtitle })), description && (jsxRuntimeExports.jsx("p", { className: "designbase-section__description", children: description }))] })), actions && (jsxRuntimeExports.jsx("div", { className: "designbase-section__actions", children: actions }))] })) })), jsxRuntimeExports.jsx("div", { className: "designbase-section__content", children: children }), footer && (jsxRuntimeExports.jsx("div", { className: "designbase-section__footer", children: footer }))] }));
|
|
10164
10118
|
};
|
|
10165
10119
|
|
|
10166
|
-
Section;
|
|
10167
|
-
|
|
10168
|
-
SegmentControl;
|
|
10169
|
-
|
|
10170
|
-
Select;
|
|
10171
|
-
|
|
10172
10120
|
const Share = ({ url, title, description = '', imageUrl, hashtags = [], variant = 'button', size = 'm', position = 'bottom', platforms = ['facebook', 'twitter', 'linkedin', 'whatsapp', 'email', 'link'], customPlatforms = {}, buttonText = '공유', buttonIcon = ShareAltIcon, modalTitle = '공유하기', copySuccessMessage = '링크가 클립보드에 복사되었습니다!', showQrCode = true, qrCodeSize = 200, className, style, onShare, onShareError, onCopySuccess, onCopyError, }) => {
|
|
10173
10121
|
const [isOpen, setIsOpen] = useState(false);
|
|
10174
10122
|
const [isCopied, setIsCopied] = useState(false);
|
|
@@ -10330,7 +10278,7 @@ const Share = ({ url, title, description = '', imageUrl, hashtags = [], variant
|
|
|
10330
10278
|
// 변형별 렌더링
|
|
10331
10279
|
switch (variant) {
|
|
10332
10280
|
case 'dropdown':
|
|
10333
|
-
return (jsxRuntimeExports.jsx("div", { className: clsx('designbase-share', `designbase-share--${variant}`, className), style: style, children: jsxRuntimeExports.jsx(Dropdown
|
|
10281
|
+
return (jsxRuntimeExports.jsx("div", { className: clsx('designbase-share', `designbase-share--${variant}`, className), style: style, children: jsxRuntimeExports.jsx(Dropdown, { items: activePlatforms.map(platform => {
|
|
10334
10282
|
const config = platformConfigs[platform];
|
|
10335
10283
|
const PlatformIcon = config?.icon;
|
|
10336
10284
|
return {
|
|
@@ -10351,7 +10299,7 @@ const Share = ({ url, title, description = '', imageUrl, hashtags = [], variant
|
|
|
10351
10299
|
}
|
|
10352
10300
|
};
|
|
10353
10301
|
|
|
10354
|
-
const Sidebar
|
|
10302
|
+
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 }) => {
|
|
10355
10303
|
const [expandedItems, setExpandedItems] = useState([]);
|
|
10356
10304
|
const handleToggle = () => {
|
|
10357
10305
|
if (onToggle) {
|
|
@@ -10390,14 +10338,14 @@ const Sidebar$1 = ({ size = 'm', variant = 'default', position = 'left', logo, o
|
|
|
10390
10338
|
const renderSidebarItem = (item, level = 0) => {
|
|
10391
10339
|
const isExpanded = expandedItems.includes(item.id);
|
|
10392
10340
|
const hasChildren = item.children && item.children.length > 0;
|
|
10393
|
-
return (jsxRuntimeExports.jsx("li", { className: "designbase-sidebar__item", children: jsxRuntimeExports.jsx(MenuItem
|
|
10341
|
+
return (jsxRuntimeExports.jsx("li", { className: "designbase-sidebar__item", children: jsxRuntimeExports.jsx(MenuItem, { ...item, type: "block", style: "accordion", depth: level, expanded: isExpanded, expandable: hasChildren, onClick: () => handleItemClick(item), onChildClick: (child) => handleItemClick(child) }) }, item.id));
|
|
10394
10342
|
};
|
|
10395
10343
|
return (jsxRuntimeExports.jsx("aside", { className: classes, role: "complementary", "aria-label": "\uC0AC\uC774\uB4DC\uBC14 \uB124\uBE44\uAC8C\uC774\uC158", ...props, children: jsxRuntimeExports.jsxs("div", { className: "designbase-sidebar__container", children: [jsxRuntimeExports.jsxs("div", { className: "designbase-sidebar__header", children: [jsxRuntimeExports.jsx("div", { className: "designbase-sidebar__logo", onClick: onLogoClick, role: onLogoClick ? 'button' : undefined, tabIndex: onLogoClick ? 0 : undefined, onKeyDown: (e) => {
|
|
10396
10344
|
if (onLogoClick && (e.key === 'Enter' || e.key === ' ')) {
|
|
10397
10345
|
e.preventDefault();
|
|
10398
10346
|
onLogoClick();
|
|
10399
10347
|
}
|
|
10400
|
-
}, children: logo || jsxRuntimeExports.jsx(Logo
|
|
10348
|
+
}, children: logo || jsxRuntimeExports.jsx(Logo, { size: size === 's' ? 's' : size === 'l' ? 'l' : 'm' }) }), collapsible && (jsxRuntimeExports.jsx(Button, { variant: "ghost", size: "s", iconOnly: true, className: "designbase-sidebar__toggle", onPress: handleToggle, "aria-label": collapsed ? '사이드바 펼치기' : '사이드바 접기', children: jsxRuntimeExports.jsx(ChevronLeftIcon, { className: clsx('designbase-sidebar__toggle-icon', {
|
|
10401
10349
|
'designbase-sidebar__toggle-icon--collapsed': collapsed,
|
|
10402
10350
|
}) }) }))] }), jsxRuntimeExports.jsx("nav", { className: "designbase-sidebar__nav", children: jsxRuntimeExports.jsx("ul", { className: "designbase-sidebar__nav-list", children: items.map((item) => renderSidebarItem(item)) }) }), userProfile && !collapsed && (jsxRuntimeExports.jsxs("div", { className: "designbase-sidebar__user", children: [jsxRuntimeExports.jsxs("div", { className: "designbase-sidebar__user-info", onClick: () => onUserMenuItemClick?.({ id: 'profile', label: '프로필', href: '#' }), role: "button", tabIndex: 0, onKeyDown: (e) => {
|
|
10403
10351
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
@@ -10419,9 +10367,7 @@ const Sidebar$1 = ({ size = 'm', variant = 'default', position = 'left', logo, o
|
|
|
10419
10367
|
}
|
|
10420
10368
|
}, style: { cursor: 'pointer' }, children: userProfile.avatar ? (jsxRuntimeExports.jsx("img", { src: userProfile.avatar, alt: userProfile.name, className: "designbase-sidebar__user-avatar-collapsed" })) : (jsxRuntimeExports.jsx("div", { className: "designbase-sidebar__user-avatar-placeholder-collapsed", children: userProfile.name.charAt(0).toUpperCase() })) }))] }) }));
|
|
10421
10369
|
};
|
|
10422
|
-
Sidebar
|
|
10423
|
-
|
|
10424
|
-
Sidebar;
|
|
10370
|
+
Sidebar.displayName = 'Sidebar';
|
|
10425
10371
|
|
|
10426
10372
|
const Skeleton = forwardRef(({ variant = 'text', size = 'm', width, height, animation = 'pulse', lines = 1, lineSpacing = '8px', lastLineWidth = '60%', className, style, 'aria-label': ariaLabel, ...props }, forwardedRef) => {
|
|
10427
10373
|
// 기본 크기 결정
|
|
@@ -10475,9 +10421,7 @@ const Skeleton = forwardRef(({ variant = 'text', size = 'm', width, height, anim
|
|
|
10475
10421
|
});
|
|
10476
10422
|
Skeleton.displayName = 'Skeleton';
|
|
10477
10423
|
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
const SplitView$1 = ({ direction = 'horizontal', mode = 'ratio', initialSplit = 0.5, firstSize = 200, minSize = 100, maxSize, splitterSize = 4, splitterColor, splitterHoverColor, first, second, fullWidth = false, fullHeight = false, className, }) => {
|
|
10424
|
+
const SplitView = ({ direction = 'horizontal', mode = 'ratio', initialSplit = 0.5, firstSize = 200, minSize = 100, maxSize, splitterSize = 4, splitterColor, splitterHoverColor, first, second, fullWidth = false, fullHeight = false, className, }) => {
|
|
10481
10425
|
const [split, setSplit] = useState(initialSplit);
|
|
10482
10426
|
const [isDragging, setIsDragging] = useState(false);
|
|
10483
10427
|
const containerRef = useRef(null);
|
|
@@ -10575,9 +10519,7 @@ const SplitView$1 = ({ direction = 'horizontal', mode = 'ratio', initialSplit =
|
|
|
10575
10519
|
return (jsxRuntimeExports.jsxs("div", { ref: containerRef, className: classes, style: style, children: [jsxRuntimeExports.jsx("div", { className: "designbase-split-view__first", children: first }), jsxRuntimeExports.jsx("div", { ref: splitterRef, className: splitterClasses, onMouseDown: handleMouseDown }), jsxRuntimeExports.jsx("div", { className: "designbase-split-view__second", children: second })] }));
|
|
10576
10520
|
};
|
|
10577
10521
|
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
const Stack$1 = ({ direction = 'vertical', alignment = 'start', justify = 'start', spacing = 'md', fullWidth = false, fullHeight = false, wrap = false, className, children, }) => {
|
|
10522
|
+
const Stack = ({ direction = 'vertical', alignment = 'start', justify = 'start', spacing = 'md', fullWidth = false, fullHeight = false, wrap = false, className, children, }) => {
|
|
10581
10523
|
const classes = clsx('designbase-stack', `designbase-stack--direction-${direction}`, `designbase-stack--alignment-${alignment}`, `designbase-stack--justify-${justify}`, `designbase-stack--spacing-${spacing}`, {
|
|
10582
10524
|
'designbase-stack--full-width': fullWidth,
|
|
10583
10525
|
'designbase-stack--full-height': fullHeight,
|
|
@@ -10586,9 +10528,7 @@ const Stack$1 = ({ direction = 'vertical', alignment = 'start', justify = 'start
|
|
|
10586
10528
|
return (jsxRuntimeExports.jsx("div", { className: classes, children: children }));
|
|
10587
10529
|
};
|
|
10588
10530
|
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
const Stepper$1 = ({ value = 0, min = 0, max = 100, step = 1, size = 'm', variant = 'default', disabled = false, readonly = false, onChange, onMinReached, onMaxReached, className, }) => {
|
|
10531
|
+
const Stepper = ({ value = 0, min = 0, max = 100, step = 1, size = 'm', variant = 'default', disabled = false, readonly = false, onChange, onMinReached, onMaxReached, className, }) => {
|
|
10592
10532
|
const [internalValue, setInternalValue] = useState(value);
|
|
10593
10533
|
const currentValue = value !== undefined ? value : internalValue;
|
|
10594
10534
|
const isMinReached = currentValue <= min;
|
|
@@ -10656,9 +10596,7 @@ const Stepper$1 = ({ value = 0, min = 0, max = 100, step = 1, size = 'm', varian
|
|
|
10656
10596
|
return (jsxRuntimeExports.jsxs("div", { className: classes, children: [jsxRuntimeExports.jsx("button", { type: "button", className: decrementClasses, onClick: handleDecrement, disabled: disabled || readonly || isMinReached, "aria-label": "\uAC10\uC18C", "aria-describedby": "stepper-description", children: jsxRuntimeExports.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsxRuntimeExports.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) }) }), jsxRuntimeExports.jsx("div", { className: "designbase-stepper__value", children: jsxRuntimeExports.jsx("span", { className: "designbase-stepper__value-text", children: currentValue }) }), jsxRuntimeExports.jsx("button", { type: "button", className: incrementClasses, onClick: handleIncrement, disabled: disabled || readonly || isMaxReached, "aria-label": "\uC99D\uAC00", "aria-describedby": "stepper-description", children: jsxRuntimeExports.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntimeExports.jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" }), jsxRuntimeExports.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" })] }) }), jsxRuntimeExports.jsxs("div", { id: "stepper-description", className: "sr-only", children: ["\uC22B\uC790 \uC870\uC815\uAE30. \uD654\uC0B4\uD45C \uD0A4\uB098 +/- \uD0A4\uB97C \uC0AC\uC6A9\uD558\uC5EC \uAC12\uC744 \uC870\uC815\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD604\uC7AC \uAC12: ", currentValue, ", \uCD5C\uC18C\uAC12: ", min, ", \uCD5C\uB300\uAC12: ", max, ", \uB2E8\uACC4: ", step] })] }));
|
|
10657
10597
|
};
|
|
10658
10598
|
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
const Table$1 = ({ data, columns, title, showCountBadge = false, showFilter = false, filterOptions = [], onFilterChange, size = 'm', variant = 'default', selectable = false, multiSelect = false, selectedRows = [], onSelectionChange, sortable = false, sortColumn, sortDirection, onSortChange, loading = false, emptyMessage = '데이터가 없습니다.', onRowClick, rowKey = 'id', height, scrollable = false, className, ...props }) => {
|
|
10599
|
+
const Table = ({ data, columns, title, showCountBadge = false, showFilter = false, filterOptions = [], onFilterChange, size = 'm', variant = 'default', selectable = false, multiSelect = false, selectedRows = [], onSelectionChange, sortable = false, sortColumn, sortDirection, onSortChange, loading = false, emptyMessage = '데이터가 없습니다.', onRowClick, rowKey = 'id', height, scrollable = false, className, ...props }) => {
|
|
10662
10600
|
const [internalSelectedRows, setInternalSelectedRows] = useState(selectedRows);
|
|
10663
10601
|
const getRowKey = (item, index) => {
|
|
10664
10602
|
if (typeof rowKey === 'string') {
|
|
@@ -10742,7 +10680,7 @@ const Table$1 = ({ data, columns, title, showCountBadge = false, showFilter = fa
|
|
|
10742
10680
|
if (loading) {
|
|
10743
10681
|
return (jsxRuntimeExports.jsx("div", { className: classes, ...props, children: jsxRuntimeExports.jsxs("div", { className: "designbase-table__loading", children: [jsxRuntimeExports.jsx("div", { className: "designbase-table__loading-spinner" }), jsxRuntimeExports.jsx("span", { children: "\uB85C\uB529 \uC911..." })] }) }));
|
|
10744
10682
|
}
|
|
10745
|
-
return (jsxRuntimeExports.jsxs("div", { className: classes, style: { height }, ...props, children: [(title || showCountBadge || showFilter) && (jsxRuntimeExports.jsxs("div", { className: "designbase-table__header", children: [jsxRuntimeExports.jsxs("div", { className: "designbase-table__header-left", children: [title && (jsxRuntimeExports.jsx("h3", { className: "designbase-table__title", children: title })), showCountBadge && (jsxRuntimeExports.jsx(Badge
|
|
10683
|
+
return (jsxRuntimeExports.jsxs("div", { className: classes, style: { height }, ...props, children: [(title || showCountBadge || showFilter) && (jsxRuntimeExports.jsxs("div", { className: "designbase-table__header", children: [jsxRuntimeExports.jsxs("div", { className: "designbase-table__header-left", children: [title && (jsxRuntimeExports.jsx("h3", { className: "designbase-table__title", children: title })), showCountBadge && (jsxRuntimeExports.jsx(Badge, { count: data.length, style: "number", variant: "primary", size: "s" }))] }), showFilter && filterOptions.length > 0 && (jsxRuntimeExports.jsx("div", { className: "designbase-table__header-right", children: jsxRuntimeExports.jsx(Select, { placeholder: "\uD544\uD130 \uC120\uD0DD", options: filterOptions, onChange: (value) => onFilterChange?.(Array.isArray(value) ? value[0] : value), size: size, showClearButton: false, searchable: false, multiple: false }) }))] })), jsxRuntimeExports.jsx("div", { className: "designbase-table__container", children: jsxRuntimeExports.jsxs("table", { className: tableClasses, children: [jsxRuntimeExports.jsx("thead", { className: "designbase-table__thead", children: jsxRuntimeExports.jsxs("tr", { className: "designbase-table__tr", children: [selectable && (jsxRuntimeExports.jsx("th", { className: "designbase-table__th designbase-table__th--checkbox", children: jsxRuntimeExports.jsx(Checkbox, { isSelected: isAllSelected, isIndeterminate: isIndeterminate, onChange: (checked) => handleSelectAll(checked), size: "s", hasLabel: false }) })), columns.map((column) => (jsxRuntimeExports.jsx("th", { className: clsx('designbase-table__th', {
|
|
10746
10684
|
'designbase-table__th--sortable': sortable && column.sortable,
|
|
10747
10685
|
'designbase-table__th--sorted': sortColumn === column.key,
|
|
10748
10686
|
[`designbase-table__th--${column.align || 'left'}`]: column.align,
|
|
@@ -10761,11 +10699,9 @@ const Table$1 = ({ data, columns, title, showCountBadge = false, showFilter = fa
|
|
|
10761
10699
|
}), children: renderCell(column, item, index) }, column.key)))] }, key));
|
|
10762
10700
|
})) })] }) })] }));
|
|
10763
10701
|
};
|
|
10764
|
-
Table
|
|
10702
|
+
Table.displayName = 'Table';
|
|
10765
10703
|
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
const Tabs$1 = ({ items, defaultSelectedId, selectedId, orientation = 'horizontal', size = 'm', fullWidth = false, variant = 'default', className, onTabChange, ...props }) => {
|
|
10704
|
+
const Tabs = ({ items, defaultSelectedId, selectedId, orientation = 'horizontal', size = 'm', fullWidth = false, variant = 'default', className, onTabChange, ...props }) => {
|
|
10769
10705
|
const [activeTabId, setActiveTabId] = useState(selectedId ?? defaultSelectedId ?? items[0]?.id ?? '');
|
|
10770
10706
|
const [focusedTabId, setFocusedTabId] = useState('');
|
|
10771
10707
|
const tabListRef = useRef(null);
|
|
@@ -10880,11 +10816,9 @@ const Tabs$1 = ({ items, defaultSelectedId, selectedId, orientation = 'horizonta
|
|
|
10880
10816
|
}, className: tabClasses, role: "tab", "aria-selected": isSelected, "aria-disabled": isDisabled, "aria-controls": `panel-${item.id}`, id: `tab-${item.id}`, tabIndex: isSelected ? 0 : -1, disabled: isDisabled, onClick: () => handleTabSelect(item.id), onKeyDown: (e) => handleKeyDown(e, item.id), onFocus: () => handleTabFocus(item.id), onBlur: handleTabBlur, children: [item.icon && (jsxRuntimeExports.jsx("span", { className: "designbase-tabs__tab-icon", children: jsxRuntimeExports.jsx(item.icon, { size: size === 's' ? 16 : size === 'l' ? 20 : 18 }) })), jsxRuntimeExports.jsx("span", { className: "designbase-tabs__tab-label", children: item.label })] }, item.id));
|
|
10881
10817
|
}) }), activeTab && (jsxRuntimeExports.jsx("div", { className: "designbase-tabs__panel", role: "tabpanel", id: `panel-${activeTab.id}`, "aria-labelledby": `tab-${activeTab.id}`, tabIndex: 0, children: activeTab.content }))] }));
|
|
10882
10818
|
};
|
|
10883
|
-
Tabs
|
|
10884
|
-
|
|
10885
|
-
Tabs;
|
|
10819
|
+
Tabs.displayName = 'Tabs';
|
|
10886
10820
|
|
|
10887
|
-
const TimePicker
|
|
10821
|
+
const TimePicker = ({ value, onChange, format = '24h', mode = 'dropdown', hourStep = 1, minuteStep = 15, minTime, maxTime, size = 'm', variant = 'default', disabled = false, readonly = false, placeholder = '시간을 선택하세요', displayFormat, className, }) => {
|
|
10888
10822
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
10889
10823
|
const [selectedHour, setSelectedHour] = React.useState(() => {
|
|
10890
10824
|
if (value) {
|
|
@@ -11077,8 +11011,6 @@ const TimePicker$1 = ({ value, onChange, format = '24h', mode = 'dropdown', hour
|
|
|
11077
11011
|
}) })] }))] }) }))] }));
|
|
11078
11012
|
};
|
|
11079
11013
|
|
|
11080
|
-
TimePicker;
|
|
11081
|
-
|
|
11082
11014
|
const Timeline = ({ items, position = 'alternate', variant = 'default', size = 'm', color = 'primary', clickable = false, fullWidth = false, disabled = false, className, style, onItemClick, }) => {
|
|
11083
11015
|
const handleItemClick = (item, index) => {
|
|
11084
11016
|
if (disabled || item.disabled || !clickable)
|
|
@@ -11133,7 +11065,7 @@ const Timeline = ({ items, position = 'alternate', variant = 'default', size = '
|
|
|
11133
11065
|
}) }) }));
|
|
11134
11066
|
};
|
|
11135
11067
|
|
|
11136
|
-
const Toast
|
|
11068
|
+
const Toast = ({ id, status = 'info', title, description, icon: Icon, duration = 5000, showProgress = false, showCloseButton = true, position = 'top-right', onClose, className, }) => {
|
|
11137
11069
|
const [isVisible, setIsVisible] = useState(false);
|
|
11138
11070
|
const [progress, setProgress] = useState(100);
|
|
11139
11071
|
const progressRef = useRef(null);
|
|
@@ -11212,9 +11144,7 @@ const Toast$1 = ({ id, status = 'info', title, description, icon: Icon, duration
|
|
|
11212
11144
|
};
|
|
11213
11145
|
return (jsxRuntimeExports.jsxs("div", { className: classes, role: "alert", "aria-live": "assertive", "aria-atomic": "true", children: [duration > 0 && showProgress && (jsxRuntimeExports.jsx("div", { className: "designbase-toast__progress", children: jsxRuntimeExports.jsx("div", { ref: progressRef, className: "designbase-toast__progress-bar", style: { width: `${progress}%` } }) })), jsxRuntimeExports.jsx("div", { className: `designbase-toast__icon designbase-toast__icon--${getIconColor()}`, children: getStatusIcon() }), jsxRuntimeExports.jsxs("div", { className: "designbase-toast__content", children: [jsxRuntimeExports.jsx("div", { className: "designbase-toast__title", children: title }), description && (jsxRuntimeExports.jsx("div", { className: "designbase-toast__description", children: description }))] }), showCloseButton && (jsxRuntimeExports.jsx("button", { type: "button", onClick: handleCloseClick, className: "designbase-toast__close-button", "aria-label": "\uD1A0\uC2A4\uD2B8 \uB2EB\uAE30", children: jsxRuntimeExports.jsx(CloseIcon, { size: 16 }) }))] }));
|
|
11214
11146
|
};
|
|
11215
|
-
Toast
|
|
11216
|
-
|
|
11217
|
-
Toast;
|
|
11147
|
+
Toast.displayName = 'Toast';
|
|
11218
11148
|
|
|
11219
11149
|
const Toggle = forwardRef(({ isSelected, defaultSelected, isDisabled = false, isReadOnly = false, size = 'm', children, className, onChange, ...props }, forwardedRef) => {
|
|
11220
11150
|
const [selected, setSelected] = React.useState(isSelected ?? defaultSelected ?? false);
|
|
@@ -11240,7 +11170,7 @@ const Toggle = forwardRef(({ isSelected, defaultSelected, isDisabled = false, is
|
|
|
11240
11170
|
});
|
|
11241
11171
|
Toggle.displayName = 'Toggle';
|
|
11242
11172
|
|
|
11243
|
-
const Toolbar
|
|
11173
|
+
const Toolbar = ({ items, size = 'm', variant = 'default', position = 'top', fullWidth = false, fixed = false, shadow = true, rounded = true, className, children, }) => {
|
|
11244
11174
|
const [openDropdown, setOpenDropdown] = React.useState(null);
|
|
11245
11175
|
const handleItemClick = (item) => {
|
|
11246
11176
|
if (item.disabled)
|
|
@@ -11299,9 +11229,7 @@ const Toolbar$1 = ({ items, size = 'm', variant = 'default', position = 'top', f
|
|
|
11299
11229
|
return (jsxRuntimeExports.jsx("div", { className: classes, children: jsxRuntimeExports.jsxs("div", { className: "designbase-toolbar__content", children: [Object.entries(groupedItems).map(([groupName, groupItems], groupIndex) => (jsxRuntimeExports.jsxs("div", { className: "designbase-toolbar__group", children: [groupItems.map(renderItem), groupIndex < Object.keys(groupedItems).length - 1 && (jsxRuntimeExports.jsx("div", { className: "designbase-toolbar__group-separator" }))] }, groupName))), children && (jsxRuntimeExports.jsx("div", { className: "designbase-toolbar__children", children: children }))] }) }));
|
|
11300
11230
|
};
|
|
11301
11231
|
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
const Tooltip$1 = ({ content, children, position = 'top', size = 'm', variant = 'default', delay = 200, hideDelay = 0, alwaysShow = false, disabled = false, maxWidth = 200, showArrow = true, className, ...props }) => {
|
|
11232
|
+
const Tooltip = ({ content, children, position = 'top', size = 'm', variant = 'default', delay = 200, hideDelay = 0, alwaysShow = false, disabled = false, maxWidth = 200, showArrow = true, className, ...props }) => {
|
|
11305
11233
|
const [isVisible, setIsVisible] = useState(false);
|
|
11306
11234
|
const [tooltipStyle, setTooltipStyle] = useState({});
|
|
11307
11235
|
const [arrowStyle, setArrowStyle] = useState({});
|
|
@@ -11515,9 +11443,7 @@ const Tooltip$1 = ({ content, children, position = 'top', size = 'm', variant =
|
|
|
11515
11443
|
const arrowClasses = clsx('designbase-tooltip__arrow', `designbase-tooltip__arrow--${position}`);
|
|
11516
11444
|
return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { ref: triggerWrapperRef, className: "designbase-tooltip__trigger", onMouseEnter: showTooltip, onMouseLeave: hideTooltip, onFocus: showTooltip, onBlur: hideTooltip, onKeyDown: handleKeyDown, tabIndex: 0, "aria-describedby": isVisible ? 'designbase-tooltip' : undefined, children: children }), isVisible && (jsxRuntimeExports.jsxs("div", { ref: tooltipRef, className: classes, style: tooltipStyle, role: "tooltip", id: "designbase-tooltip", "aria-hidden": !isVisible, ...props, children: [jsxRuntimeExports.jsx("div", { className: "designbase-tooltip__content", children: content }), showArrow && jsxRuntimeExports.jsx("div", { className: arrowClasses, style: arrowStyle })] }))] }));
|
|
11517
11445
|
};
|
|
11518
|
-
Tooltip
|
|
11519
|
-
|
|
11520
|
-
Tooltip;
|
|
11446
|
+
Tooltip.displayName = 'Tooltip';
|
|
11521
11447
|
|
|
11522
11448
|
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, }) => {
|
|
11523
11449
|
const videoRef = useRef(null);
|
|
@@ -11990,5 +11916,5 @@ const toggleTheme = () => {
|
|
|
11990
11916
|
console.log('toggleTheme called');
|
|
11991
11917
|
};
|
|
11992
11918
|
|
|
11993
|
-
export { Accordion
|
|
11919
|
+
export { Accordion, Alert, AnimationBackground, AnimationText, AudioPlayer, Avatar, Backdrop, Badge, Banner, BottomSheet, Breadcrumbs, Button, Calendar, Card, Carousel, Checkbox, Chip, Confirm, Container, ContextMenu, DatePicker, Divider, Drawer, Dropdown, Dropzone, EmptyState, FileUploader, FloatingActionButton, Form, Gradient, Grid, HeroFeature, Image$1 as Image, ImageList, Input, Lightbox, List, Logo, MarkdownEditor, Masonry, MenuItem, Modal, Navbar, Pagination, Popover, Progress, ProgressStep, Progressbar, Radio, RangeSlider, Rating, Reorder, ResizablePanels, ScrollArea, SearchBar, Section, SegmentControl, Select, Share, Sidebar, Skeleton, Spinner, SplitView, Stack, Stat, Stepper, Table, Tabs, Textarea, TimePicker, Timeline, Toast, Toggle, Toolbar, Tooltip, VideoPlayer, YouTubePlayer, getTheme, setTheme, toggleTheme };
|
|
11994
11920
|
//# sourceMappingURL=index.esm.js.map
|