@designbasekorea/ui 0.2.5 → 0.2.7

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 CHANGED
@@ -3632,7 +3632,8 @@ const BottomNavigation = ({ items, activeItemId, onItemClick, fixed = true, back
3632
3632
  }, className);
3633
3633
  return (jsx("nav", { className: classes, style: style, role: "navigation", "aria-label": "\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158", children: jsx("div", { className: "designbase-bottom-navigation__container", children: items.map((item) => {
3634
3634
  const isActive = activeItemId === item.id || item.isActive;
3635
- const Icon = item.icon;
3635
+ // 활성화 상태에 따라 다른 아이콘 사용
3636
+ const Icon = isActive && item.activeIcon ? item.activeIcon : item.icon;
3636
3637
  return (jsx("button", { type: "button", className: clsx('designbase-bottom-navigation__item', {
3637
3638
  'designbase-bottom-navigation__item--active': isActive,
3638
3639
  'designbase-bottom-navigation__item--disabled': item.disabled,
@@ -6326,7 +6327,7 @@ const Drawer = ({ isOpen, onClose, title, children, position = 'right', size = '
6326
6327
  }), 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) && (jsxs("div", { className: "designbase-drawer__header", children: [title && (jsx("h2", { className: "designbase-drawer__title", id: id ? `${id}-title` : undefined, children: title })), showCloseButton && (jsx(Button, { variant: "ghost", size: "s", onClick: handleClose, className: "designbase-drawer__close-button", "aria-label": "\uB2EB\uAE30", children: jsx(CloseIcon, { size: iconSize, color: "currentColor" }) }))] })), jsx("div", { className: "designbase-drawer__content", id: id ? `${id}-content` : undefined, children: children })] })] }), document.body);
6327
6328
  };
6328
6329
 
6329
- const Dropdown = ({ items, trigger, label = '메뉴', size = 'm', placement = 'bottom-left', fullWidth = false, disabled = false, className, isOpen: controlledIsOpen, onToggle, ...props }) => {
6330
+ const Dropdown = ({ items, trigger, label = '메뉴', triggerVariant = 'tertiary', triggerIcon, iconOnly = false, size = 'm', placement = 'bottom-left', fullWidth = false, disabled = false, className, isOpen: controlledIsOpen, onToggle, ...props }) => {
6330
6331
  // 아이콘 크기 계산 (m이 기본값)
6331
6332
  const iconSize = size === 's' ? 14 : size === 'l' ? 18 : 16;
6332
6333
  const [isOpen, setIsOpen] = useState(false);
@@ -6455,13 +6456,11 @@ const Dropdown = ({ items, trigger, label = '메뉴', size = 'm', placement = 'b
6455
6456
  'designbase-dropdown--full-width': fullWidth,
6456
6457
  'designbase-dropdown--disabled': disabled,
6457
6458
  }, className);
6458
- const triggerClasses = clsx('designbase-dropdown__trigger', {
6459
- 'designbase-dropdown__trigger--open': isDropdownOpen,
6460
- });
6459
+ const buttonSize = size;
6461
6460
  const menuClasses = clsx('designbase-dropdown__menu', `designbase-dropdown__menu--${placement}`, {
6462
6461
  'designbase-dropdown__menu--open': isDropdownOpen,
6463
6462
  });
6464
- return (jsxs("div", { ref: containerRef, className: classes, ...props, children: [jsx("button", { ref: triggerRef, className: triggerClasses, onClick: handleToggle, onKeyDown: handleKeyDown, disabled: disabled, "aria-haspopup": "true", "aria-expanded": isDropdownOpen, "aria-label": label, children: trigger || (jsxs(Fragment, { children: [jsx("span", { className: "designbase-dropdown__trigger-label", children: label }), jsx(ChevronDownIcon, { size: iconSize, className: "designbase-dropdown__trigger-icon" })] })) }), jsx("div", { ref: menuRef, className: menuClasses, role: "menu", "aria-label": label, children: items.map((item, index) => {
6463
+ return (jsxs("div", { ref: containerRef, className: classes, ...props, children: [trigger ? (jsx("div", { ref: triggerRef, onClick: handleToggle, onKeyDown: handleKeyDown, children: trigger })) : (jsx("div", { ref: triggerRef, children: jsx(Button, { variant: triggerVariant, size: buttonSize, iconOnly: iconOnly, startIcon: triggerIcon, endIcon: ChevronDownIcon, disabled: disabled, fullWidth: fullWidth, onPress: handleToggle, "aria-haspopup": "true", "aria-expanded": isDropdownOpen, "aria-label": label, className: isDropdownOpen ? 'designbase-dropdown__trigger--open' : '', children: label }) })), jsx("div", { ref: menuRef, className: menuClasses, role: "menu", "aria-label": label, children: items.map((item, index) => {
6465
6464
  if (item.divider) {
6466
6465
  return (jsx("div", { className: "designbase-dropdown__divider", role: "separator" }, `divider-${index}`));
6467
6466
  }