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