@designbasekorea/ui 0.2.3 → 0.2.5

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,31 @@ 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
+ const Icon = 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
+
3621
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) => {
3622
3647
  const [sheetHeight, setSheetHeight] = React.useState(maxHeight);
3623
3648
  const [isDragging, setIsDragging] = React.useState(false);
@@ -11712,6 +11737,7 @@ exports.Avatar = Avatar;
11712
11737
  exports.Backdrop = Backdrop;
11713
11738
  exports.Badge = Badge;
11714
11739
  exports.Banner = Banner;
11740
+ exports.BottomNavigation = BottomNavigation;
11715
11741
  exports.BottomSheet = BottomSheet;
11716
11742
  exports.Breadcrumbs = Breadcrumbs;
11717
11743
  exports.Button = Button;