@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.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.css.map +1 -1
- package/dist/index.esm.js +5 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -6
- package/dist/index.js.map +1 -1
- package/dist/index.umd.css +1 -1
- package/dist/index.umd.css.map +1 -1
- package/dist/index.umd.js +5 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -3633,7 +3633,8 @@
|
|
|
3633
3633
|
}, className);
|
|
3634
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
3635
|
const isActive = activeItemId === item.id || item.isActive;
|
|
3636
|
-
|
|
3636
|
+
// 활성화 상태에 따라 다른 아이콘 사용
|
|
3637
|
+
const Icon = isActive && item.activeIcon ? item.activeIcon : item.icon;
|
|
3637
3638
|
return (jsxRuntime.jsx("button", { type: "button", className: clsx('designbase-bottom-navigation__item', {
|
|
3638
3639
|
'designbase-bottom-navigation__item--active': isActive,
|
|
3639
3640
|
'designbase-bottom-navigation__item--disabled': item.disabled,
|
|
@@ -6327,7 +6328,7 @@
|
|
|
6327
6328
|
}), 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);
|
|
6328
6329
|
};
|
|
6329
6330
|
|
|
6330
|
-
const Dropdown = ({ items, trigger, label = '메뉴', size = 'm', placement = 'bottom-left', fullWidth = false, disabled = false, className, isOpen: controlledIsOpen, onToggle, ...props }) => {
|
|
6331
|
+
const Dropdown = ({ items, trigger, label = '메뉴', triggerVariant = 'tertiary', triggerIcon, iconOnly = false, size = 'm', placement = 'bottom-left', fullWidth = false, disabled = false, className, isOpen: controlledIsOpen, onToggle, ...props }) => {
|
|
6331
6332
|
// 아이콘 크기 계산 (m이 기본값)
|
|
6332
6333
|
const iconSize = size === 's' ? 14 : size === 'l' ? 18 : 16;
|
|
6333
6334
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
@@ -6456,13 +6457,11 @@
|
|
|
6456
6457
|
'designbase-dropdown--full-width': fullWidth,
|
|
6457
6458
|
'designbase-dropdown--disabled': disabled,
|
|
6458
6459
|
}, className);
|
|
6459
|
-
const
|
|
6460
|
-
'designbase-dropdown__trigger--open': isDropdownOpen,
|
|
6461
|
-
});
|
|
6460
|
+
const buttonSize = size;
|
|
6462
6461
|
const menuClasses = clsx('designbase-dropdown__menu', `designbase-dropdown__menu--${placement}`, {
|
|
6463
6462
|
'designbase-dropdown__menu--open': isDropdownOpen,
|
|
6464
6463
|
});
|
|
6465
|
-
return (jsxRuntime.jsxs("div", { ref: containerRef, className: classes, ...props, children: [jsxRuntime.jsx("
|
|
6464
|
+
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) => {
|
|
6466
6465
|
if (item.divider) {
|
|
6467
6466
|
return (jsxRuntime.jsx("div", { className: "designbase-dropdown__divider", role: "separator" }, `divider-${index}`));
|
|
6468
6467
|
}
|