@designbasekorea/ui 0.2.4 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -3617,6 +3617,32 @@
3617
3617
  })) : icon })), image && (jsxRuntime.jsx("div", { className: "designbase-banner__image", children: jsxRuntime.jsx("img", { src: image, alt: imageAlt || title || 'Banner image' }) })), jsxRuntime.jsxs("div", { className: "designbase-banner__content", children: [title && (jsxRuntime.jsx("h3", { className: "designbase-banner__title", children: title })), description && (jsxRuntime.jsx("p", { className: "designbase-banner__description", children: description }))] }), renderActions()] })] }));
3618
3618
  };
3619
3619
 
3620
+ const BottomNavigation = ({ items, activeItemId, onItemClick, fixed = true, backgroundColor = 'default', size = 'm', className, style, }) => {
3621
+ const handleItemClick = (item) => {
3622
+ if (item.disabled)
3623
+ return;
3624
+ if (item.onClick) {
3625
+ item.onClick();
3626
+ }
3627
+ if (onItemClick) {
3628
+ onItemClick(item);
3629
+ }
3630
+ };
3631
+ const classes = clsx('designbase-bottom-navigation', `designbase-bottom-navigation--${size}`, `designbase-bottom-navigation--${backgroundColor}`, {
3632
+ 'designbase-bottom-navigation--fixed': fixed,
3633
+ }, className);
3634
+ return (jsxRuntime.jsx("nav", { className: classes, style: style, role: "navigation", "aria-label": "\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158", children: jsxRuntime.jsx("div", { className: "designbase-bottom-navigation__container", children: items.map((item) => {
3635
+ const isActive = activeItemId === item.id || item.isActive;
3636
+ // 활성화 상태에 따라 다른 아이콘 사용
3637
+ const Icon = isActive && item.activeIcon ? item.activeIcon : item.icon;
3638
+ return (jsxRuntime.jsx("button", { type: "button", className: clsx('designbase-bottom-navigation__item', {
3639
+ 'designbase-bottom-navigation__item--active': isActive,
3640
+ 'designbase-bottom-navigation__item--disabled': item.disabled,
3641
+ }), onClick: () => handleItemClick(item), disabled: item.disabled, "aria-label": item.label, "aria-current": isActive ? 'page' : undefined, children: jsxRuntime.jsxs("div", { className: "designbase-bottom-navigation__item-content", children: [jsxRuntime.jsxs("div", { className: "designbase-bottom-navigation__icon-wrapper", children: [jsxRuntime.jsx(Icon, { size: size === 's' ? 20 : size === 'm' ? 24 : 28, className: "designbase-bottom-navigation__icon" }), item.badge && (jsxRuntime.jsx(Badge, { size: "s", variant: item.badgeColor === 'error' ? 'danger' : item.badgeColor === 'warning' ? 'warning' : item.badgeColor === 'success' ? 'success' : item.badgeColor === 'info' ? 'info' : item.badgeColor === 'primary' ? 'primary' : 'secondary', className: "designbase-bottom-navigation__badge", children: item.badge }))] }), jsxRuntime.jsx("span", { className: "designbase-bottom-navigation__label", children: item.label })] }) }, item.id));
3642
+ }) }) }));
3643
+ };
3644
+ BottomNavigation.displayName = 'BottomNavigation';
3645
+
3620
3646
  const BottomSheet = React.forwardRef(({ open = false, onClose, title, subtitle, size = 'm', variant = 'default', disableBackdropClick = false, disableEscapeKeyDown = false, disableDrag = false, maxHeight = 80, animation = 'slide', animationDuration = 300, zIndex = 1000, showBackdrop = true, backdropBlur = false, backdropOpacity = 0.5, stickyHeader = false, stickyFooter = false, className, style, header, footer, children, ...props }, forwardedRef) => {
3621
3647
  const [sheetHeight, setSheetHeight] = React.useState(maxHeight);
3622
3648
  const [isDragging, setIsDragging] = React.useState(false);
@@ -11711,6 +11737,7 @@
11711
11737
  exports.Backdrop = Backdrop;
11712
11738
  exports.Badge = Badge;
11713
11739
  exports.Banner = Banner;
11740
+ exports.BottomNavigation = BottomNavigation;
11714
11741
  exports.BottomSheet = BottomSheet;
11715
11742
  exports.Breadcrumbs = Breadcrumbs;
11716
11743
  exports.Button = Button;