Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

⬆️ chore: update @lobehub/ui to 4.30.1 and remove deprecated nativeButton prop (#11821)

Inneid638a2442c18
diff --git a/package.json b/package.json
index 5513c2280f0..6b37a3df566 100644
--- a/package.json
+++ b/package.json
@@ -205,7 +205,7 @@
"@lobehub/icons": "^4.0.3",
"@lobehub/market-sdk": "0.29.1",
"@lobehub/tts": "^4.0.2",
- "@lobehub/ui": "^4.29.0",
+ "@lobehub/ui": "^4.30.1",
"@modelcontextprotocol/sdk": "^1.25.3",
"@napi-rs/canvas": "^0.1.88",
"@neondatabase/serverless": "^1.0.2",
@@ -459,4 +459,4 @@
"better-call": "1.1.8"
}
}
-}
+}
\ No newline at end of file
diff --git a/src/app/[variants]/(main)/agent/_layout/Sidebar/Topic/List/Item/Actions.tsx b/src/app/[variants]/(main)/agent/_layout/Sidebar/Topic/List/Item/Actions.tsx
index 05cb97d3861..9059aa25021 100644
--- a/src/app/[variants]/(main)/agent/_layout/Sidebar/Topic/List/Item/Actions.tsx
+++ b/src/app/[variants]/(main)/agent/_layout/Sidebar/Topic/List/Item/Actions.tsx
@@ -8,7 +8,7 @@ interface ActionProps {
const Actions = memo<ActionProps>(({ dropdownMenu }) => {
return (
- <DropdownMenu items={dropdownMenu} nativeButton={false}>
+ <DropdownMenu items={dropdownMenu}>
<ActionIcon icon={MoreHorizontalIcon} size={'small'} />
</DropdownMenu>
);
diff --git a/src/app/[variants]/(main)/agent/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Actions.tsx b/src/app/[variants]/(main)/agent/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Actions.tsx
index 05cb97d3861..9059aa25021 100644
--- a/src/app/[variants]/(main)/agent/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Actions.tsx
+++ b/src/app/[variants]/(main)/agent/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Actions.tsx
@@ -8,7 +8,7 @@ interface ActionProps {
const Actions = memo<ActionProps>(({ dropdownMenu }) => {
return (
- <DropdownMenu items={dropdownMenu} nativeButton={false}>
+ <DropdownMenu items={dropdownMenu}>
<ActionIcon icon={MoreHorizontalIcon} size={'small'} />
</DropdownMenu>
);
diff --git a/src/app/[variants]/(main)/agent/features/Conversation/Header/HeaderActions/index.tsx b/src/app/[variants]/(main)/agent/features/Conversation/Header/HeaderActions/index.tsx
index 41d03c3138d..4f5b39c36e9 100644
--- a/src/app/[variants]/(main)/agent/features/Conversation/Header/HeaderActions/index.tsx
+++ b/src/app/[variants]/(main)/agent/features/Conversation/Header/HeaderActions/index.tsx
@@ -12,7 +12,7 @@ const HeaderActions = memo(() => {
const { menuItems } = useMenu();
return (
- <DropdownMenu items={menuItems} nativeButton={false}>
+ <DropdownMenu items={menuItems}>
<ActionIcon icon={MoreHorizontal} size={DESKTOP_HEADER_ICON_SIZE} />
</DropdownMenu>
);
diff --git a/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/List/Item/Actions.tsx b/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/List/Item/Actions.tsx
index 05cb97d3861..9059aa25021 100644
--- a/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/List/Item/Actions.tsx
+++ b/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/List/Item/Actions.tsx
@@ -8,7 +8,7 @@ interface ActionProps {
const Actions = memo<ActionProps>(({ dropdownMenu }) => {
return (
- <DropdownMenu items={dropdownMenu} nativeButton={false}>
+ <DropdownMenu items={dropdownMenu}>
<ActionIcon icon={MoreHorizontalIcon} size={'small'} />
</DropdownMenu>
);
diff --git a/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Actions.tsx b/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Actions.tsx
index 05cb97d3861..9059aa25021 100644
--- a/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Actions.tsx
+++ b/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Actions.tsx
@@ -8,7 +8,7 @@ interface ActionProps {
const Actions = memo<ActionProps>(({ dropdownMenu }) => {
return (
- <DropdownMenu items={dropdownMenu} nativeButton={false}>
+ <DropdownMenu items={dropdownMenu}>
<ActionIcon icon={MoreHorizontalIcon} size={'small'} />
</DropdownMenu>
);
diff --git a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Item/Actions.tsx b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Item/Actions.tsx
index 05cb97d3861..9059aa25021 100644
--- a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Item/Actions.tsx
+++ b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Item/Actions.tsx
@@ -8,7 +8,7 @@ interface ActionProps {
const Actions = memo<ActionProps>(({ dropdownMenu }) => {
return (
- <DropdownMenu items={dropdownMenu} nativeButton={false}>
+ <DropdownMenu items={dropdownMenu}>
<ActionIcon icon={MoreHorizontalIcon} size={'small'} />
</DropdownMenu>
);
diff --git a/src/app/[variants]/(main)/home/_layout/Body/Project/List/Actions.tsx b/src/app/[variants]/(main)/home/_layout/Body/Project/List/Actions.tsx
index 6e38623d2d1..c44feb72e13 100644
--- a/src/app/[variants]/(main)/home/_layout/Body/Project/List/Actions.tsx
+++ b/src/app/[variants]/(main)/home/_layout/Body/Project/List/Actions.tsx
@@ -8,7 +8,7 @@ interface ActionsProps {
const Actions = memo<ActionsProps>(({ dropdownMenu }) => {
return (
- <DropdownMenu items={dropdownMenu} nativeButton={false}>
+ <DropdownMenu items={dropdownMenu}>
<ActionIcon icon={MoreHorizontalIcon} size={'small'} />
</DropdownMenu>
);
diff --git a/src/app/[variants]/(main)/home/_layout/Footer/index.tsx b/src/app/[variants]/(main)/home/_layout/Footer/index.tsx
index 2d7f6474a56..6ccbde11679 100644
--- a/src/app/[variants]/(main)/home/_layout/Footer/index.tsx
+++ b/src/app/[variants]/(main)/home/_layout/Footer/index.tsx
@@ -164,7 +164,7 @@ const Footer = memo(() => {
<>
<Flexbox align={'center'} gap={2} horizontal justify={'space-between'} padding={8}>
<Flexbox align={'center'} flex={1} gap={2} horizontal>
- <DropdownMenu items={helpMenuItems} nativeButton={false} placement="topLeft">
+ <DropdownMenu items={helpMenuItems} placement="topLeft">
<ActionIcon aria-label={t('userPanel.help')} icon={CircleHelp} size={16} />
</DropdownMenu>
{!hideGitHub && (
diff --git a/src/app/[variants]/(main)/home/_layout/Header/components/AddButton.tsx b/src/app/[variants]/(main)/home/_layout/Header/components/AddButton.tsx
index 5eb278e2610..6909f32a380 100644
--- a/src/app/[variants]/(main)/home/_layout/Header/components/AddButton.tsx
+++ b/src/app/[variants]/(main)/home/_layout/Header/components/AddButton.tsx
@@ -44,7 +44,7 @@ const AddButton = memo(() => {
size={DESKTOP_HEADER_ICON_SIZE}
title={tChat('newAgent')}
/>
- <DropdownMenu items={dropdownItems} nativeButton={false}>
+ <DropdownMenu items={dropdownItems}>
<ActionIcon
color={cssVar.colorTextQuaternary}
icon={ChevronDownIcon}
diff --git a/src/app/[variants]/(main)/page/_layout/Body/List/Item/Actions.tsx b/src/app/[variants]/(main)/page/_layout/Body/List/Item/Actions.tsx
index 05cb97d3861..9059aa25021 100644
--- a/src/app/[variants]/(main)/page/_layout/Body/List/Item/Actions.tsx
+++ b/src/app/[variants]/(main)/page/_layout/Body/List/Item/Actions.tsx
@@ -8,7 +8,7 @@ interface ActionProps {
const Actions = memo<ActionProps>(({ dropdownMenu }) => {
return (
- <DropdownMenu items={dropdownMenu} nativeButton={false}>
+ <DropdownMenu items={dropdownMenu}>
<ActionIcon icon={MoreHorizontalIcon} size={'small'} />
</DropdownMenu>
);
diff --git a/src/app/[variants]/(main)/resource/(home)/_layout/Body/LibraryList/Item/Actions.tsx b/src/app/[variants]/(main)/resource/(home)/_layout/Body/LibraryList/Item/Actions.tsx
index 05cb97d3861..9059aa25021 100644
--- a/src/app/[variants]/(main)/resource/(home)/_layout/Body/LibraryList/Item/Actions.tsx
+++ b/src/app/[variants]/(main)/resource/(home)/_layout/Body/LibraryList/Item/Actions.tsx
@@ -8,7 +8,7 @@ interface ActionProps {
const Actions = memo<ActionProps>(({ dropdownMenu }) => {
return (
- <DropdownMenu items={dropdownMenu} nativeButton={false}>
+ <DropdownMenu items={dropdownMenu}>
<ActionIcon icon={MoreHorizontalIcon} size={'small'} />
</DropdownMenu>
);
diff --git a/src/features/ModelSwitchPanel/index.tsx b/src/features/ModelSwitchPanel/index.tsx
index f6bbfd17317..30a62f79dcc 100644
--- a/src/features/ModelSwitchPanel/index.tsx
+++ b/src/features/ModelSwitchPanel/index.tsx
@@ -34,9 +34,7 @@ const ModelSwitchPanel = memo<ModelSwitchPanelProps>(
return (
<DropdownMenuRoot onOpenChange={handleOpenChange} open={isOpen}>
- <DropdownMenuTrigger nativeButton={false} openOnHover>
- {children}
- </DropdownMenuTrigger>
+ <DropdownMenuTrigger openOnHover>{children}</DropdownMenuTrigger>
<DropdownMenuPortal>
<DropdownMenuPositioner hoverTrigger placement={placement}>
<DropdownMenuPopup className={styles.container}>
diff --git a/src/features/PageEditor/Copilot/TopicSelector/Actions.tsx b/src/features/PageEditor/Copilot/TopicSelector/Actions.tsx
index 867c18a35f8..f033040060d 100644
--- a/src/features/PageEditor/Copilot/TopicSelector/Actions.tsx
+++ b/src/features/PageEditor/Copilot/TopicSelector/Actions.tsx
@@ -11,7 +11,7 @@ const Actions = memo<ActionsProps>(({ dropdownMenu }) => {
return null;
return (
- <DropdownMenu items={dropdownMenu} nativeButton={false}>
+ <DropdownMenu items={dropdownMenu}>
<ActionIcon icon={MoreHorizontalIcon} size={'small'} />
</DropdownMenu>
);
diff --git a/src/features/PageEditor/Header/index.tsx b/src/features/PageEditor/Header/index.tsx
index 6e5aaa7bd94..9a59147a94b 100644
--- a/src/features/PageEditor/Header/index.tsx
+++ b/src/features/PageEditor/Header/index.tsx
@@ -52,7 +52,6 @@ const Header = memo(() => {
{/* Three-dot menu */}
<DropdownMenu
items={menuItems}
- nativeButton={false}
placement="bottomRight"
popupProps={{
style: {
diff --git a/src/features/ResourceManager/components/Explorer/ItemDropdown/DropdownMenu.tsx b/src/features/ResourceManager/components/Explorer/ItemDropdown/DropdownMenu.tsx
index 2390b42984e..9da0a7623a3 100644
--- a/src/features/ResourceManager/components/Explorer/ItemDropdown/DropdownMenu.tsx
+++ b/src/features/ResourceManager/components/Explorer/ItemDropdown/DropdownMenu.tsx
@@ -10,7 +10,7 @@ interface DropdownMenuProps {
const DropdownMenu = memo<DropdownMenuProps>(({ items, className }) => {
return (
- <DropdownMenuUI items={items} nativeButton={false}>
+ <DropdownMenuUI items={items}>
<ActionIcon className={className} icon={MoreHorizontalIcon} size={'small'} />
</DropdownMenuUI>
);
diff --git a/src/features/User/UserPanel/ThemeButton.tsx b/src/features/User/UserPanel/ThemeButton.tsx
index a9dccb6d53d..d90232b2597 100644
--- a/src/features/User/UserPanel/ThemeButton.tsx
+++ b/src/features/User/UserPanel/ThemeButton.tsx
@@ -43,7 +43,7 @@ const ThemeButton: FC<{ placement?: DropdownMenuProps['placement']; size?: numbe
);
return (
- <DropdownMenu items={items} nativeButton={false} placement={placement}>
+ <DropdownMenu items={items} placement={placement}>
<ActionIcon
icon={themeIcons[(theme as 'dark' | 'light' | 'system') || 'system']}
size={size || { blockSize: 32, size: 16 }}