@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.js CHANGED
@@ -3618,6 +3618,32 @@ const Banner = ({ title, description, icon, image, imageAlt, actions = [], size
3618
3618
  })) : 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()] })] }));
3619
3619
  };
3620
3620
 
3621
+ const BottomNavigation = ({ items, activeItemId, onItemClick, fixed = true, backgroundColor = 'default', size = 'm', className, style, }) => {
3622
+ const handleItemClick = (item) => {
3623
+ if (item.disabled)
3624
+ return;
3625
+ if (item.onClick) {
3626
+ item.onClick();
3627
+ }
3628
+ if (onItemClick) {
3629
+ onItemClick(item);
3630
+ }
3631
+ };
3632
+ const classes = clsx('designbase-bottom-navigation', `designbase-bottom-navigation--${size}`, `designbase-bottom-navigation--${backgroundColor}`, {
3633
+ 'designbase-bottom-navigation--fixed': fixed,
3634
+ }, className);
3635
+ 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) => {
3636
+ const isActive = activeItemId === item.id || item.isActive;
3637
+ // 활성화 상태에 따라 다른 아이콘 사용
3638
+ const Icon = isActive && item.activeIcon ? item.activeIcon : item.icon;
3639
+ return (jsxRuntime.jsx("button", { type: "button", className: clsx('designbase-bottom-navigation__item', {
3640
+ 'designbase-bottom-navigation__item--active': isActive,
3641
+ 'designbase-bottom-navigation__item--disabled': item.disabled,
3642
+ }), 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));
3643
+ }) }) }));
3644
+ };
3645
+ BottomNavigation.displayName = 'BottomNavigation';
3646
+
3621
3647
  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) => {
3622
3648
  const [sheetHeight, setSheetHeight] = React.useState(maxHeight);
3623
3649
  const [isDragging, setIsDragging] = React.useState(false);
@@ -11712,6 +11738,7 @@ exports.Avatar = Avatar;
11712
11738
  exports.Backdrop = Backdrop;
11713
11739
  exports.Badge = Badge;
11714
11740
  exports.Banner = Banner;
11741
+ exports.BottomNavigation = BottomNavigation;
11715
11742
  exports.BottomSheet = BottomSheet;
11716
11743
  exports.Breadcrumbs = Breadcrumbs;
11717
11744
  exports.Button = Button;