@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.umd.js CHANGED
@@ -3617,6 +3617,31 @@
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
+ const Icon = item.icon;
3637
+ return (jsxRuntime.jsx("button", { type: "button", className: clsx('designbase-bottom-navigation__item', {
3638
+ 'designbase-bottom-navigation__item--active': isActive,
3639
+ 'designbase-bottom-navigation__item--disabled': item.disabled,
3640
+ }), 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));
3641
+ }) }) }));
3642
+ };
3643
+ BottomNavigation.displayName = 'BottomNavigation';
3644
+
3620
3645
  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
3646
  const [sheetHeight, setSheetHeight] = React.useState(maxHeight);
3622
3647
  const [isDragging, setIsDragging] = React.useState(false);
@@ -11711,6 +11736,7 @@
11711
11736
  exports.Backdrop = Backdrop;
11712
11737
  exports.Badge = Badge;
11713
11738
  exports.Banner = Banner;
11739
+ exports.BottomNavigation = BottomNavigation;
11714
11740
  exports.BottomSheet = BottomSheet;
11715
11741
  exports.Breadcrumbs = Breadcrumbs;
11716
11742
  exports.Button = Button;