@lobehub/ui 4.20.1 → 4.21.1
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/es/Accordion/Accordion.d.mts +2 -2
- package/es/Accordion/AccordionItem.d.mts +2 -2
- package/es/ActionIcon/ActionIcon.d.mts +2 -2
- package/es/Alert/Alert.d.mts +2 -2
- package/es/AutoComplete/Select.d.mts +2 -2
- package/es/Avatar/AvatarGroup/index.d.mts +2 -2
- package/es/Burger/Burger.d.mts +2 -2
- package/es/CodeDiff/CodeDiff.d.mts +2 -2
- package/es/CodeDiff/PatchDiff.d.mts +2 -2
- package/es/CodeEditor/CodeEditor.d.mts +2 -2
- package/es/Collapse/Collapse.d.mts +2 -2
- package/es/ConfigProvider/index.d.mts +2 -2
- package/es/ContextMenu/ContextMenuHost.d.mts +3 -3
- package/es/CopyButton/CopyButton.d.mts +2 -2
- package/es/DatePicker/DatePicker.d.mts +2 -2
- package/es/DraggablePanel/components/DraggablePanelBody.d.mts +2 -2
- package/es/DraggablePanel/components/DraggablePanelContainer.d.mts +2 -2
- package/es/DraggablePanel/components/DraggablePanelFooter.d.mts +2 -2
- package/es/DraggablePanel/components/DraggablePanelHeader.d.mts +2 -2
- package/es/DraggableSideNav/DraggableSideNav.d.mts +2 -2
- package/es/Drawer/Drawer.d.mts +2 -2
- package/es/Dropdown/Dropdown.d.mts +2 -2
- package/es/DropdownMenu/DropdownMenu.d.mts +2 -2
- package/es/DropdownMenu/DropdownMenu.mjs +7 -5
- package/es/DropdownMenu/DropdownMenu.mjs.map +1 -1
- package/es/DropdownMenu/atoms.d.mts +29 -20
- package/es/DropdownMenu/atoms.mjs +5 -5
- package/es/DropdownMenu/atoms.mjs.map +1 -1
- package/es/DropdownMenu/type.d.mts +7 -0
- package/es/EditableText/EditableText.d.mts +2 -2
- package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
- package/es/EmojiPicker/EmojiPicker.mjs +5 -1
- package/es/EmojiPicker/EmojiPicker.mjs.map +1 -1
- package/es/EmojiPicker/style.mjs +4 -0
- package/es/EmojiPicker/style.mjs.map +1 -1
- package/es/Flex/FlexBasic.d.mts +2 -2
- package/es/FontLoader/index.d.mts +2 -2
- package/es/Footer/Footer.d.mts +2 -2
- package/es/Form/components/FormGroup.d.mts +2 -2
- package/es/Form/components/FormItem.d.mts +2 -2
- package/es/Form/components/FormSubmitFooter.d.mts +2 -2
- package/es/FormModal/FormModal.d.mts +2 -2
- package/es/GuideCard/GuideCard.d.mts +2 -2
- package/es/Header/Header.d.mts +2 -2
- package/es/Highlighter/Highlighter.d.mts +2 -2
- package/es/Highlighter/SyntaxHighlighter/index.d.mts +2 -2
- package/es/Hotkey/Hotkey.d.mts +2 -2
- package/es/HotkeyInput/HotkeyInput.d.mts +2 -2
- package/es/Icon/Icon.d.mts +2 -2
- package/es/Icon/components/IconProvider.d.mts +3 -3
- package/es/Image/PreviewGroup.d.mts +2 -2
- package/es/ImageSelect/ImageSelect.d.mts +2 -2
- package/es/Input/Input.d.mts +2 -2
- package/es/Input/InputNumber.d.mts +2 -2
- package/es/Input/InputOPT.d.mts +2 -2
- package/es/Input/InputPassword.d.mts +2 -2
- package/es/Input/TextArea.d.mts +2 -2
- package/es/Layout/components/LayoutFooter.d.mts +2 -2
- package/es/Layout/components/LayoutHeader.d.mts +2 -2
- package/es/Layout/components/LayoutMain.d.mts +2 -2
- package/es/Layout/components/LayoutSidebar.d.mts +2 -2
- package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
- package/es/Layout/components/LayoutToc.d.mts +2 -2
- package/es/List/ListItem/index.d.mts +2 -2
- package/es/LobeSelect/LobeSelect.d.mts +8 -0
- package/es/LobeSelect/LobeSelect.mjs +486 -0
- package/es/LobeSelect/LobeSelect.mjs.map +1 -0
- package/es/LobeSelect/atoms.d.mts +155 -0
- package/es/LobeSelect/atoms.mjs +172 -0
- package/es/LobeSelect/atoms.mjs.map +1 -0
- package/es/LobeSelect/constants.d.mts +5 -0
- package/es/LobeSelect/constants.mjs +6 -0
- package/es/LobeSelect/constants.mjs.map +1 -0
- package/es/LobeSelect/index.d.mts +5 -0
- package/es/LobeSelect/index.d.ts +1 -0
- package/es/LobeSelect/index.js +1 -0
- package/es/LobeSelect/index.mjs +5 -0
- package/es/LobeSelect/style.mjs +274 -0
- package/es/LobeSelect/style.mjs.map +1 -0
- package/es/LobeSelect/type.d.mts +83 -0
- package/es/Markdown/Markdown.d.mts +2 -2
- package/es/Markdown/Typography.d.mts +2 -2
- package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
- package/es/Markdown/markdown.style.mjs +40 -15
- package/es/Markdown/markdown.style.mjs.map +1 -1
- package/es/MaskShadow/MaskShadow.d.mts +2 -2
- package/es/Menu/Menu.d.mts +2 -2
- package/es/Menu/sharedStyle.mjs +2 -2
- package/es/Menu/sharedStyle.mjs.map +1 -1
- package/es/Mermaid/Mermaid.d.mts +2 -2
- package/es/Mermaid/SyntaxMermaid/index.d.mts +2 -2
- package/es/Modal/Modal.d.mts +2 -2
- package/es/Modal/ModalProvider.d.mts +2 -2
- package/es/Modal/imperative.d.mts +2 -2
- package/es/MotionProvider/index.d.mts +2 -2
- package/es/Popover/ArrowIcon.d.mts +2 -2
- package/es/Popover/Popover.d.mts +1 -1
- package/es/Popover/Popover.mjs +1 -1
- package/es/Popover/Popover.mjs.map +1 -1
- package/es/Popover/PopoverGroup.mjs +1 -1
- package/es/Popover/PopoverGroup.mjs.map +1 -1
- package/es/Popover/PopoverInGroup.mjs +1 -1
- package/es/Popover/PopoverInGroup.mjs.map +1 -1
- package/es/Popover/PopoverStandalone.mjs +1 -1
- package/es/Popover/PopoverStandalone.mjs.map +1 -1
- package/es/Popover/atoms.d.mts +15 -6
- package/es/Popover/atoms.mjs +5 -5
- package/es/Popover/atoms.mjs.map +1 -1
- package/es/Popover/context.d.mts +2 -2
- package/es/Popover/index.d.mts +1 -1
- package/es/Popover/index.mjs +1 -1
- package/es/Popover/style.mjs +2 -2
- package/es/Popover/style.mjs.map +1 -1
- package/es/Popover/type.d.mts +7 -5
- package/es/SearchBar/SearchBar.d.mts +2 -2
- package/es/Segmented/Segmented.d.mts +2 -2
- package/es/Select/Select.d.mts +2 -2
- package/es/SideNav/SideNav.d.mts +2 -2
- package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
- package/es/SortableList/components/DragHandle.d.mts +2 -2
- package/es/SortableList/components/SortableItem.d.mts +2 -2
- package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
- package/es/Toast/imperative.d.mts +3 -3
- package/es/Toast/style.mjs +6 -3
- package/es/Toast/style.mjs.map +1 -1
- package/es/Toc/Toc.d.mts +2 -2
- package/es/Tooltip/type.d.mts +3 -3
- package/es/Video/index.d.mts +2 -2
- package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
- package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +2 -2
- package/es/awesome/Features/Features.d.mts +2 -2
- package/es/awesome/Giscus/Giscus.d.mts +2 -2
- package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
- package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
- package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
- package/es/awesome/Spline/Spine.d.mts +2 -2
- package/es/awesome/Spotlight/Spotlight.d.mts +2 -2
- package/es/awesome/SpotlightCard/SpotlightCard.d.mts +2 -2
- package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +2 -2
- package/es/brand/LobeChat/index.d.mts +2 -2
- package/es/brand/LobeHub/index.d.mts +2 -2
- package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
- package/es/brand/LogoThree/index.d.mts +2 -2
- package/es/chat/BackBottom/BackBottom.d.mts +2 -2
- package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +2 -2
- package/es/chat/ChatItem/ChatItem.d.mts +2 -2
- package/es/chat/ChatList/ChatList.d.mts +2 -2
- package/es/chat/EditableMessage/EditableMessage.d.mts +2 -2
- package/es/chat/EditableMessageList/EditableMessageList.d.mts +2 -2
- package/es/chat/MessageInput/MessageInput.d.mts +2 -2
- package/es/chat/MessageModal/MessageModal.d.mts +2 -2
- package/es/color/ColorScales/index.d.mts +2 -2
- package/es/color/CssVar/index.d.mts +2 -2
- package/es/i18n/context.d.mts +2 -2
- package/es/icons/lucideExtra/BotPromptIcon.d.mts +2 -2
- package/es/icons/lucideExtra/DiscordIcon.d.mts +3 -3
- package/es/icons/lucideExtra/GlobeOffIcon.d.mts +3 -3
- package/es/icons/lucideExtra/GroupBotIcon.d.mts +3 -3
- package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
- package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +3 -3
- package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
- package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
- package/es/icons/lucideExtra/RightClickIcon.d.mts +3 -3
- package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +3 -3
- package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +3 -3
- package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +3 -3
- package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
- package/es/index.d.mts +7 -1
- package/es/index.mjs +4 -1
- package/es/mdx/Mdx/index.d.mts +2 -2
- package/es/mobile/ChatHeader/ChatHeaderTitle.d.mts +2 -2
- package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +2 -2
- package/es/mobile/TabBar/TabBar.d.mts +2 -2
- package/es/storybook/StoryBook/index.d.mts +2 -2
- package/es/types/index.d.mts +2 -1
- package/es/types/trigger.d.mts +8 -0
- package/es/utils/parseTrigger.d.mts +14 -0
- package/es/{Popover → utils}/parseTrigger.mjs +1 -1
- package/es/utils/parseTrigger.mjs.map +1 -0
- package/package.json +3 -2
- package/es/Popover/parseTrigger.d.mts +0 -14
- package/es/Popover/parseTrigger.mjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AccordionProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react77 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Accordion/Accordion.d.ts
|
|
5
|
-
declare const Accordion:
|
|
5
|
+
declare const Accordion: react77.NamedExoticComponent<AccordionProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Accordion };
|
|
8
8
|
//# sourceMappingURL=Accordion.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AccordionItemProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react76 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Accordion/AccordionItem.d.ts
|
|
5
|
-
declare const AccordionItem:
|
|
5
|
+
declare const AccordionItem: react76.NamedExoticComponent<AccordionItemProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { AccordionItem };
|
|
8
8
|
//# sourceMappingURL=AccordionItem.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ActionIconProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react75 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/ActionIcon/ActionIcon.d.ts
|
|
5
|
-
declare const ActionIcon:
|
|
5
|
+
declare const ActionIcon: react75.NamedExoticComponent<ActionIconProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ActionIcon };
|
|
8
8
|
//# sourceMappingURL=ActionIcon.d.mts.map
|
package/es/Alert/Alert.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AlertProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react1 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Alert/Alert.d.ts
|
|
5
|
-
declare const Alert:
|
|
5
|
+
declare const Alert: react1.NamedExoticComponent<AlertProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Alert };
|
|
8
8
|
//# sourceMappingURL=Alert.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AutoCompleteProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react67 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/AutoComplete/Select.d.ts
|
|
5
|
-
declare const AutoComplete:
|
|
5
|
+
declare const AutoComplete: react67.NamedExoticComponent<AutoCompleteProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { AutoComplete };
|
|
8
8
|
//# sourceMappingURL=Select.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AvatarGroupProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react58 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Avatar/AvatarGroup/index.d.ts
|
|
5
|
-
declare const AvatarGroup:
|
|
5
|
+
declare const AvatarGroup: react58.NamedExoticComponent<AvatarGroupProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { AvatarGroup };
|
|
8
8
|
//# sourceMappingURL=index.d.mts.map
|
package/es/Burger/Burger.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BurgerProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react63 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Burger/Burger.d.ts
|
|
5
|
-
declare const Burger:
|
|
5
|
+
declare const Burger: react63.NamedExoticComponent<BurgerProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Burger };
|
|
8
8
|
//# sourceMappingURL=Burger.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CodeDiffProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react61 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/CodeDiff/CodeDiff.d.ts
|
|
5
|
-
declare const CodeDiff:
|
|
5
|
+
declare const CodeDiff: react61.NamedExoticComponent<CodeDiffProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { CodeDiff };
|
|
8
8
|
//# sourceMappingURL=CodeDiff.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PatchDiffProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react62 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/CodeDiff/PatchDiff.d.ts
|
|
5
|
-
declare const PatchDiff:
|
|
5
|
+
declare const PatchDiff: react62.NamedExoticComponent<PatchDiffProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { PatchDiff };
|
|
8
8
|
//# sourceMappingURL=PatchDiff.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CodeEditorProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react60 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/CodeEditor/CodeEditor.d.ts
|
|
5
|
-
declare const CodeEditor:
|
|
5
|
+
declare const CodeEditor: react60.NamedExoticComponent<CodeEditorProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { CodeEditor };
|
|
8
8
|
//# sourceMappingURL=CodeEditor.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CollapseProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react59 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Collapse/Collapse.d.ts
|
|
5
|
-
declare const Collapse:
|
|
5
|
+
declare const Collapse: react59.NamedExoticComponent<CollapseProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Collapse };
|
|
8
8
|
//# sourceMappingURL=Collapse.d.mts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MotionComponentType } from "../MotionProvider/index.mjs";
|
|
2
2
|
import { TranslationResourcesInput } from "../i18n/types.mjs";
|
|
3
3
|
import { CDN, CdnApi } from "../utils/genCdnUrl.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react68 from "react";
|
|
5
5
|
import { ElementType, ReactNode } from "react";
|
|
6
6
|
|
|
7
7
|
//#region src/ConfigProvider/index.d.ts
|
|
@@ -19,7 +19,7 @@ interface ConfigProviderProps {
|
|
|
19
19
|
motion: MotionComponentType;
|
|
20
20
|
resources?: TranslationResourcesInput;
|
|
21
21
|
}
|
|
22
|
-
declare const ConfigProvider:
|
|
22
|
+
declare const ConfigProvider: react68.NamedExoticComponent<ConfigProviderProps>;
|
|
23
23
|
type CdnFn = ({
|
|
24
24
|
pkg,
|
|
25
25
|
version,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react87 from "react";
|
|
2
|
+
import * as react_jsx_runtime37 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/ContextMenu/ContextMenuHost.d.ts
|
|
5
|
-
declare const ContextMenuHost:
|
|
5
|
+
declare const ContextMenuHost: react87.MemoExoticComponent<() => react_jsx_runtime37.JSX.Element | null>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ContextMenuHost };
|
|
8
8
|
//# sourceMappingURL=ContextMenuHost.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CopyButtonProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react12 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/CopyButton/CopyButton.d.ts
|
|
5
|
-
declare const CopyButton:
|
|
5
|
+
declare const CopyButton: react12.NamedExoticComponent<CopyButtonProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { CopyButton };
|
|
8
8
|
//# sourceMappingURL=CopyButton.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DatePickerProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react13 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/DatePicker/DatePicker.d.ts
|
|
5
|
-
declare const DatePicker:
|
|
5
|
+
declare const DatePicker: react13.NamedExoticComponent<DatePickerProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { DatePicker };
|
|
8
8
|
//# sourceMappingURL=DatePicker.d.mts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DivProps } from "../../types/index.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react8 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/DraggablePanel/components/DraggablePanelBody.d.ts
|
|
5
5
|
type DraggablePanelBodyProps = DivProps;
|
|
6
|
-
declare const DraggablePanelBody:
|
|
6
|
+
declare const DraggablePanelBody: react8.NamedExoticComponent<DivProps>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { DraggablePanelBody, DraggablePanelBodyProps };
|
|
9
9
|
//# sourceMappingURL=DraggablePanelBody.d.mts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DivProps } from "../../types/index.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react9 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/DraggablePanel/components/DraggablePanelContainer.d.ts
|
|
5
5
|
type DraggablePanelContainerProps = DivProps;
|
|
6
|
-
declare const DraggablePanelContainer:
|
|
6
|
+
declare const DraggablePanelContainer: react9.NamedExoticComponent<DivProps>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { DraggablePanelContainer, DraggablePanelContainerProps };
|
|
9
9
|
//# sourceMappingURL=DraggablePanelContainer.d.mts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DivProps } from "../../types/index.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react10 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/DraggablePanel/components/DraggablePanelFooter.d.ts
|
|
5
5
|
type DraggablePanelFooterProps = DivProps;
|
|
6
|
-
declare const DraggablePanelFooter:
|
|
6
|
+
declare const DraggablePanelFooter: react10.NamedExoticComponent<DivProps>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { DraggablePanelFooter, DraggablePanelFooterProps };
|
|
9
9
|
//# sourceMappingURL=DraggablePanelFooter.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DivProps } from "../../types/index.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react11 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/DraggablePanel/components/DraggablePanelHeader.d.ts
|
|
5
5
|
interface DraggablePanelHeaderProps extends Omit<DivProps, 'children'> {
|
|
@@ -9,7 +9,7 @@ interface DraggablePanelHeaderProps extends Omit<DivProps, 'children'> {
|
|
|
9
9
|
setPin?: (pin: boolean) => void;
|
|
10
10
|
title?: string;
|
|
11
11
|
}
|
|
12
|
-
declare const DraggablePanelHeader:
|
|
12
|
+
declare const DraggablePanelHeader: react11.NamedExoticComponent<DraggablePanelHeaderProps>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { DraggablePanelHeader, DraggablePanelHeaderProps };
|
|
15
15
|
//# sourceMappingURL=DraggablePanelHeader.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DraggableSideNavProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react7 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/DraggableSideNav/DraggableSideNav.d.ts
|
|
5
|
-
declare const DraggableSideNav:
|
|
5
|
+
declare const DraggableSideNav: react7.NamedExoticComponent<DraggableSideNavProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { DraggableSideNav };
|
|
8
8
|
//# sourceMappingURL=DraggableSideNav.d.mts.map
|
package/es/Drawer/Drawer.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DrawerProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react85 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Drawer/Drawer.d.ts
|
|
5
|
-
declare const Drawer:
|
|
5
|
+
declare const Drawer: react85.NamedExoticComponent<DrawerProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Drawer };
|
|
8
8
|
//# sourceMappingURL=Drawer.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DropdownProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react6 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Dropdown/Dropdown.d.ts
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ import * as react34 from "react";
|
|
|
9
9
|
* @see https://ui.lobehub.com/components/context-menu
|
|
10
10
|
* @see https://ui.lobehub.com/components/dropdown-menu
|
|
11
11
|
*/
|
|
12
|
-
declare const Dropdown:
|
|
12
|
+
declare const Dropdown: react6.NamedExoticComponent<DropdownProps>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { Dropdown };
|
|
15
15
|
//# sourceMappingURL=Dropdown.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DropdownMenuProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react84 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/DropdownMenu/DropdownMenu.d.ts
|
|
5
|
-
declare const DropdownMenu:
|
|
5
|
+
declare const DropdownMenu: react84.NamedExoticComponent<DropdownMenuProps<unknown>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { DropdownMenu };
|
|
8
8
|
//# sourceMappingURL=DropdownMenu.d.mts.map
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
import { useNativeButton } from "../hooks/useNativeButton.mjs";
|
|
4
4
|
import { DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuTrigger } from "./atoms.mjs";
|
|
5
|
+
import { parseTrigger } from "../utils/parseTrigger.mjs";
|
|
5
6
|
import { renderDropdownMenuItems } from "./renderItems.mjs";
|
|
6
7
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { Menu } from "@base-ui/react/menu";
|
|
9
10
|
|
|
10
11
|
//#region src/DropdownMenu/DropdownMenu.tsx
|
|
11
|
-
const DropdownMenu = memo(({ children, defaultOpen, items, nativeButton, onOpenChange, onOpenChangeComplete, open, placement = "bottomLeft", popupProps, portalProps, positionerProps, triggerProps, ...rest }) => {
|
|
12
|
+
const DropdownMenu = memo(({ children, defaultOpen, items, nativeButton, onOpenChange, onOpenChangeComplete, open, placement = "bottomLeft", popupProps, portalProps, positionerProps, trigger = "click", triggerProps, ...rest }) => {
|
|
12
13
|
const [uncontrolledOpen, setUncontrolledOpen] = useState(Boolean(defaultOpen));
|
|
14
|
+
const { openOnHover } = useMemo(() => parseTrigger(trigger), [trigger]);
|
|
13
15
|
useEffect(() => {
|
|
14
16
|
if (open === void 0) return;
|
|
15
17
|
setUncontrolledOpen(open);
|
|
@@ -32,16 +34,16 @@ const DropdownMenu = memo(({ children, defaultOpen, items, nativeButton, onOpenC
|
|
|
32
34
|
onOpenChangeComplete?.(nextOpen);
|
|
33
35
|
if (!nextOpen) menuItemsRef.current = null;
|
|
34
36
|
}, [onOpenChangeComplete]);
|
|
35
|
-
const hoverTrigger = Boolean(triggerProps?.openOnHover);
|
|
36
37
|
const { container: portalContainer, ...restPortalProps } = portalProps ?? {};
|
|
37
38
|
const { resolvedNativeButton } = useNativeButton({
|
|
38
39
|
children,
|
|
39
40
|
nativeButton,
|
|
40
41
|
triggerNativeButton: triggerProps?.nativeButton
|
|
41
42
|
});
|
|
42
|
-
const
|
|
43
|
+
const triggerElement = /* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
43
44
|
...triggerProps,
|
|
44
45
|
nativeButton: resolvedNativeButton,
|
|
46
|
+
openOnHover,
|
|
45
47
|
children
|
|
46
48
|
});
|
|
47
49
|
return /* @__PURE__ */ jsxs(Menu.Root, {
|
|
@@ -50,12 +52,12 @@ const DropdownMenu = memo(({ children, defaultOpen, items, nativeButton, onOpenC
|
|
|
50
52
|
onOpenChange: handleOpenChange,
|
|
51
53
|
onOpenChangeComplete: handleOpenChangeComplete,
|
|
52
54
|
open,
|
|
53
|
-
children: [
|
|
55
|
+
children: [triggerElement, /* @__PURE__ */ jsx(DropdownMenuPortal, {
|
|
54
56
|
container: portalContainer,
|
|
55
57
|
...restPortalProps,
|
|
56
58
|
children: /* @__PURE__ */ jsx(DropdownMenuPositioner, {
|
|
57
59
|
...positionerProps,
|
|
58
|
-
hoverTrigger,
|
|
60
|
+
hoverTrigger: openOnHover,
|
|
59
61
|
placement,
|
|
60
62
|
children: /* @__PURE__ */ jsx(DropdownMenuPopup, {
|
|
61
63
|
...popupProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.mjs","names":[],"sources":["../../src/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["'use client';\n\nimport { Menu } from '@base-ui/react/menu';\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { useNativeButton } from '@/hooks/useNativeButton';\n\nimport {\n DropdownMenuPopup,\n DropdownMenuPortal,\n DropdownMenuPositioner,\n DropdownMenuTrigger,\n} from './atoms';\nimport { renderDropdownMenuItems } from './renderItems';\nimport type { DropdownMenuProps } from './type';\n\nconst DropdownMenu = memo<DropdownMenuProps>(\n ({\n children,\n defaultOpen,\n\n items,\n nativeButton,\n onOpenChange,\n onOpenChangeComplete,\n open,\n placement = 'bottomLeft',\n popupProps,\n portalProps,\n positionerProps,\n triggerProps,\n ...rest\n }) => {\n const [uncontrolledOpen, setUncontrolledOpen] = useState(Boolean(defaultOpen));\n\n useEffect(() => {\n if (open === undefined) return;\n setUncontrolledOpen(open);\n }, [open]);\n\n const handleOpenChange = useCallback(\n (nextOpen: boolean, details: Parameters<NonNullable<typeof onOpenChange>>[1]) => {\n onOpenChange?.(nextOpen, details);\n if (open === undefined) {\n setUncontrolledOpen(nextOpen);\n }\n },\n [onOpenChange, open],\n );\n\n const menuItemsRef = useRef<ReturnType<typeof renderDropdownMenuItems> | null>(null);\n const isOpen = open ?? uncontrolledOpen;\n const menuItems = useMemo(() => {\n if (isOpen) {\n const resolvedItems = typeof items === 'function' ? items() : items;\n const renderedItems = renderDropdownMenuItems(resolvedItems);\n menuItemsRef.current = renderedItems;\n return renderedItems;\n }\n return menuItemsRef.current;\n }, [isOpen, items]);\n const handleOpenChangeComplete = useCallback(\n (nextOpen: boolean) => {\n onOpenChangeComplete?.(nextOpen);\n if (!nextOpen) {\n menuItemsRef.current = null;\n }\n },\n [onOpenChangeComplete],\n );\n const
|
|
1
|
+
{"version":3,"file":"DropdownMenu.mjs","names":[],"sources":["../../src/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["'use client';\n\nimport { Menu } from '@base-ui/react/menu';\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { useNativeButton } from '@/hooks/useNativeButton';\nimport { parseTrigger } from '@/utils/parseTrigger';\n\nimport {\n DropdownMenuPopup,\n DropdownMenuPortal,\n DropdownMenuPositioner,\n DropdownMenuTrigger,\n} from './atoms';\nimport { renderDropdownMenuItems } from './renderItems';\nimport type { DropdownMenuProps } from './type';\n\nconst DropdownMenu = memo<DropdownMenuProps>(\n ({\n children,\n defaultOpen,\n\n items,\n nativeButton,\n onOpenChange,\n onOpenChangeComplete,\n open,\n placement = 'bottomLeft',\n popupProps,\n portalProps,\n positionerProps,\n trigger = 'click',\n triggerProps,\n ...rest\n }) => {\n const [uncontrolledOpen, setUncontrolledOpen] = useState(Boolean(defaultOpen));\n\n const { openOnHover } = useMemo(() => parseTrigger(trigger), [trigger]);\n\n useEffect(() => {\n if (open === undefined) return;\n setUncontrolledOpen(open);\n }, [open]);\n\n const handleOpenChange = useCallback(\n (nextOpen: boolean, details: Parameters<NonNullable<typeof onOpenChange>>[1]) => {\n onOpenChange?.(nextOpen, details);\n if (open === undefined) {\n setUncontrolledOpen(nextOpen);\n }\n },\n [onOpenChange, open],\n );\n\n const menuItemsRef = useRef<ReturnType<typeof renderDropdownMenuItems> | null>(null);\n const isOpen = open ?? uncontrolledOpen;\n const menuItems = useMemo(() => {\n if (isOpen) {\n const resolvedItems = typeof items === 'function' ? items() : items;\n const renderedItems = renderDropdownMenuItems(resolvedItems);\n menuItemsRef.current = renderedItems;\n return renderedItems;\n }\n return menuItemsRef.current;\n }, [isOpen, items]);\n const handleOpenChangeComplete = useCallback(\n (nextOpen: boolean) => {\n onOpenChangeComplete?.(nextOpen);\n if (!nextOpen) {\n menuItemsRef.current = null;\n }\n },\n [onOpenChangeComplete],\n );\n const { container: portalContainer, ...restPortalProps } = (portalProps ?? {}) as any;\n\n const { resolvedNativeButton } = useNativeButton({\n children,\n nativeButton,\n triggerNativeButton: triggerProps?.nativeButton,\n });\n\n const triggerElement = (\n <DropdownMenuTrigger\n {...triggerProps}\n nativeButton={resolvedNativeButton}\n openOnHover={openOnHover}\n >\n {children}\n </DropdownMenuTrigger>\n );\n\n return (\n <Menu.Root\n {...rest}\n defaultOpen={defaultOpen}\n onOpenChange={handleOpenChange}\n onOpenChangeComplete={handleOpenChangeComplete}\n open={open}\n >\n {triggerElement}\n <DropdownMenuPortal container={portalContainer} {...restPortalProps}>\n <DropdownMenuPositioner\n {...positionerProps}\n hoverTrigger={openOnHover}\n placement={placement}\n >\n <DropdownMenuPopup {...popupProps}>{menuItems}</DropdownMenuPopup>\n </DropdownMenuPositioner>\n </DropdownMenuPortal>\n </Menu.Root>\n );\n },\n);\n\nDropdownMenu.displayName = 'DropdownMenuV2';\n\nexport default DropdownMenu;\n"],"mappings":";;;;;;;;;;;AAiBA,MAAM,eAAe,MAClB,EACC,UACA,aAEA,OACA,cACA,cACA,sBACA,MACA,YAAY,cACZ,YACA,aACA,iBACA,UAAU,SACV,cACA,GAAG,WACC;CACJ,MAAM,CAAC,kBAAkB,uBAAuB,SAAS,QAAQ,YAAY,CAAC;CAE9E,MAAM,EAAE,gBAAgB,cAAc,aAAa,QAAQ,EAAE,CAAC,QAAQ,CAAC;AAEvE,iBAAgB;AACd,MAAI,SAAS,OAAW;AACxB,sBAAoB,KAAK;IACxB,CAAC,KAAK,CAAC;CAEV,MAAM,mBAAmB,aACtB,UAAmB,YAA6D;AAC/E,iBAAe,UAAU,QAAQ;AACjC,MAAI,SAAS,OACX,qBAAoB,SAAS;IAGjC,CAAC,cAAc,KAAK,CACrB;CAED,MAAM,eAAe,OAA0D,KAAK;CACpF,MAAM,SAAS,QAAQ;CACvB,MAAM,YAAY,cAAc;AAC9B,MAAI,QAAQ;GAEV,MAAM,gBAAgB,wBADA,OAAO,UAAU,aAAa,OAAO,GAAG,MACF;AAC5D,gBAAa,UAAU;AACvB,UAAO;;AAET,SAAO,aAAa;IACnB,CAAC,QAAQ,MAAM,CAAC;CACnB,MAAM,2BAA2B,aAC9B,aAAsB;AACrB,yBAAuB,SAAS;AAChC,MAAI,CAAC,SACH,cAAa,UAAU;IAG3B,CAAC,qBAAqB,CACvB;CACD,MAAM,EAAE,WAAW,iBAAiB,GAAG,oBAAqB,eAAe,EAAE;CAE7E,MAAM,EAAE,yBAAyB,gBAAgB;EAC/C;EACA;EACA,qBAAqB,cAAc;EACpC,CAAC;CAEF,MAAM,iBACJ,oBAAC;EACC,GAAI;EACJ,cAAc;EACD;EAEZ;GACmB;AAGxB,QACE,qBAAC,KAAK;EACJ,GAAI;EACS;EACb,cAAc;EACd,sBAAsB;EAChB;aAEL,gBACD,oBAAC;GAAmB,WAAW;GAAiB,GAAI;aAClD,oBAAC;IACC,GAAI;IACJ,cAAc;IACH;cAEX,oBAAC;KAAkB,GAAI;eAAa;MAA8B;KAC3C;IACN;GACX;EAGjB;AAED,aAAa,cAAc;AAE3B,2BAAe"}
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
import { DropdownMenuPlacement } from "./type.mjs";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import * as
|
|
4
|
-
import * as _base_ui_react_menu0 from "@base-ui/react/menu";
|
|
3
|
+
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
5
4
|
import { Menu } from "@base-ui/react/menu";
|
|
5
|
+
import * as _base_ui_react2 from "@base-ui/react";
|
|
6
6
|
|
|
7
7
|
//#region src/DropdownMenu/atoms.d.ts
|
|
8
8
|
declare const DROPDOWN_MENU_CONTAINER_ATTR = "data-lobe-ui-dropdown-menu-container";
|
|
9
9
|
declare const DropdownMenuRoot: typeof Menu.Root;
|
|
10
10
|
declare const DropdownMenuSubmenuRoot: typeof Menu.SubmenuRoot;
|
|
11
|
-
declare const DropdownMenuCheckboxItemIndicator: React.ForwardRefExoticComponent<
|
|
12
|
-
type DropdownMenuTriggerProps = Omit<React.
|
|
11
|
+
declare const DropdownMenuCheckboxItemIndicator: React.ForwardRefExoticComponent<Omit<_base_ui_react2.ContextMenuCheckboxItemIndicatorProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
type DropdownMenuTriggerProps = Omit<React.ComponentPropsWithRef<typeof Menu.Trigger>, 'children' | 'render'> & {
|
|
13
13
|
children: React.ReactNode;
|
|
14
14
|
};
|
|
15
|
-
declare const DropdownMenuTrigger:
|
|
15
|
+
declare const DropdownMenuTrigger: {
|
|
16
|
+
({
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
nativeButton,
|
|
20
|
+
ref: refProp,
|
|
21
|
+
...rest
|
|
22
|
+
}: DropdownMenuTriggerProps): react_jsx_runtime22.JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
16
25
|
type DropdownMenuPortalProps = React.ComponentProps<typeof Menu.Portal> & {
|
|
17
26
|
/**
|
|
18
27
|
* When `container` is not provided, it uses a shared container created by `usePortalContainer`.
|
|
@@ -23,7 +32,7 @@ declare const DropdownMenuPortal: {
|
|
|
23
32
|
({
|
|
24
33
|
container,
|
|
25
34
|
...rest
|
|
26
|
-
}: DropdownMenuPortalProps):
|
|
35
|
+
}: DropdownMenuPortalProps): react_jsx_runtime22.JSX.Element;
|
|
27
36
|
displayName: string;
|
|
28
37
|
};
|
|
29
38
|
type DropdownMenuPositionerProps = React.ComponentProps<typeof Menu.Positioner> & {
|
|
@@ -39,7 +48,7 @@ declare const DropdownMenuPositioner: {
|
|
|
39
48
|
side,
|
|
40
49
|
sideOffset,
|
|
41
50
|
...rest
|
|
42
|
-
}: DropdownMenuPositionerProps):
|
|
51
|
+
}: DropdownMenuPositionerProps): react_jsx_runtime22.JSX.Element;
|
|
43
52
|
displayName: string;
|
|
44
53
|
};
|
|
45
54
|
type DropdownMenuPopupProps = React.ComponentProps<typeof Menu.Popup>;
|
|
@@ -47,7 +56,7 @@ declare const DropdownMenuPopup: {
|
|
|
47
56
|
({
|
|
48
57
|
className,
|
|
49
58
|
...rest
|
|
50
|
-
}: DropdownMenuPopupProps):
|
|
59
|
+
}: DropdownMenuPopupProps): react_jsx_runtime22.JSX.Element;
|
|
51
60
|
displayName: string;
|
|
52
61
|
};
|
|
53
62
|
type DropdownMenuItemProps = React.ComponentProps<typeof Menu.Item> & {
|
|
@@ -58,7 +67,7 @@ declare const DropdownMenuItem: {
|
|
|
58
67
|
className,
|
|
59
68
|
danger,
|
|
60
69
|
...rest
|
|
61
|
-
}: DropdownMenuItemProps):
|
|
70
|
+
}: DropdownMenuItemProps): react_jsx_runtime22.JSX.Element;
|
|
62
71
|
displayName: string;
|
|
63
72
|
};
|
|
64
73
|
type DropdownMenuCheckboxItemProps = React.ComponentProps<typeof Menu.CheckboxItem> & {
|
|
@@ -69,7 +78,7 @@ declare const DropdownMenuCheckboxItemPrimitive: {
|
|
|
69
78
|
className,
|
|
70
79
|
danger,
|
|
71
80
|
...rest
|
|
72
|
-
}: DropdownMenuCheckboxItemProps):
|
|
81
|
+
}: DropdownMenuCheckboxItemProps): react_jsx_runtime22.JSX.Element;
|
|
73
82
|
displayName: string;
|
|
74
83
|
};
|
|
75
84
|
type DropdownMenuSeparatorProps = React.ComponentProps<typeof Menu.Separator>;
|
|
@@ -77,16 +86,16 @@ declare const DropdownMenuSeparator: {
|
|
|
77
86
|
({
|
|
78
87
|
className,
|
|
79
88
|
...rest
|
|
80
|
-
}: DropdownMenuSeparatorProps):
|
|
89
|
+
}: DropdownMenuSeparatorProps): react_jsx_runtime22.JSX.Element;
|
|
81
90
|
displayName: string;
|
|
82
91
|
};
|
|
83
|
-
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<
|
|
92
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<Omit<_base_ui_react2.ContextMenuGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
84
93
|
type DropdownMenuGroupLabelProps = React.ComponentProps<typeof Menu.GroupLabel>;
|
|
85
94
|
declare const DropdownMenuGroupLabel: {
|
|
86
95
|
({
|
|
87
96
|
className,
|
|
88
97
|
...rest
|
|
89
|
-
}: DropdownMenuGroupLabelProps):
|
|
98
|
+
}: DropdownMenuGroupLabelProps): react_jsx_runtime22.JSX.Element;
|
|
90
99
|
displayName: string;
|
|
91
100
|
};
|
|
92
101
|
type DropdownMenuSubmenuTriggerProps = React.ComponentProps<typeof Menu.SubmenuTrigger> & {
|
|
@@ -97,7 +106,7 @@ declare const DropdownMenuSubmenuTrigger: {
|
|
|
97
106
|
className,
|
|
98
107
|
danger,
|
|
99
108
|
...rest
|
|
100
|
-
}: DropdownMenuSubmenuTriggerProps):
|
|
109
|
+
}: DropdownMenuSubmenuTriggerProps): react_jsx_runtime22.JSX.Element;
|
|
101
110
|
displayName: string;
|
|
102
111
|
};
|
|
103
112
|
type DropdownMenuItemContentProps = React.HTMLAttributes<HTMLDivElement>;
|
|
@@ -105,7 +114,7 @@ declare const DropdownMenuItemContent: {
|
|
|
105
114
|
({
|
|
106
115
|
className,
|
|
107
116
|
...rest
|
|
108
|
-
}: DropdownMenuItemContentProps):
|
|
117
|
+
}: DropdownMenuItemContentProps): react_jsx_runtime22.JSX.Element;
|
|
109
118
|
displayName: string;
|
|
110
119
|
};
|
|
111
120
|
type DropdownMenuItemIconProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
@@ -113,7 +122,7 @@ declare const DropdownMenuItemIcon: {
|
|
|
113
122
|
({
|
|
114
123
|
className,
|
|
115
124
|
...rest
|
|
116
|
-
}: DropdownMenuItemIconProps):
|
|
125
|
+
}: DropdownMenuItemIconProps): react_jsx_runtime22.JSX.Element;
|
|
117
126
|
displayName: string;
|
|
118
127
|
};
|
|
119
128
|
type DropdownMenuItemLabelProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
@@ -121,7 +130,7 @@ declare const DropdownMenuItemLabel: {
|
|
|
121
130
|
({
|
|
122
131
|
className,
|
|
123
132
|
...rest
|
|
124
|
-
}: DropdownMenuItemLabelProps):
|
|
133
|
+
}: DropdownMenuItemLabelProps): react_jsx_runtime22.JSX.Element;
|
|
125
134
|
displayName: string;
|
|
126
135
|
};
|
|
127
136
|
type DropdownMenuItemExtraProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
@@ -129,7 +138,7 @@ declare const DropdownMenuItemExtra: {
|
|
|
129
138
|
({
|
|
130
139
|
className,
|
|
131
140
|
...rest
|
|
132
|
-
}: DropdownMenuItemExtraProps):
|
|
141
|
+
}: DropdownMenuItemExtraProps): react_jsx_runtime22.JSX.Element;
|
|
133
142
|
displayName: string;
|
|
134
143
|
};
|
|
135
144
|
type DropdownMenuSubmenuArrowProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
@@ -137,7 +146,7 @@ declare const DropdownMenuSubmenuArrow: {
|
|
|
137
146
|
({
|
|
138
147
|
className,
|
|
139
148
|
...rest
|
|
140
|
-
}: DropdownMenuSubmenuArrowProps):
|
|
149
|
+
}: DropdownMenuSubmenuArrowProps): react_jsx_runtime22.JSX.Element;
|
|
141
150
|
displayName: string;
|
|
142
151
|
};
|
|
143
152
|
type DropdownMenuSwitchItemProps = Omit<React.ComponentProps<typeof Menu.Item>, 'onClick'> & {
|
|
@@ -158,7 +167,7 @@ declare const DropdownMenuSwitchItem: {
|
|
|
158
167
|
onCheckedChange,
|
|
159
168
|
children,
|
|
160
169
|
...rest
|
|
161
|
-
}: DropdownMenuSwitchItemProps):
|
|
170
|
+
}: DropdownMenuSwitchItemProps): react_jsx_runtime22.JSX.Element;
|
|
162
171
|
displayName: string;
|
|
163
172
|
};
|
|
164
173
|
//#endregion
|
|
@@ -5,7 +5,7 @@ import { placementMap } from "../utils/placement.mjs";
|
|
|
5
5
|
import { CLASSNAMES } from "../styles/classNames.mjs";
|
|
6
6
|
import { styles } from "../Menu/sharedStyle.mjs";
|
|
7
7
|
import { usePortalContainer } from "../hooks/usePortalContainer.mjs";
|
|
8
|
-
import { cloneElement,
|
|
8
|
+
import { cloneElement, isValidElement, useCallback, useState } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { Switch } from "antd";
|
|
11
11
|
import { cx } from "antd-style";
|
|
@@ -23,7 +23,7 @@ const mergeStateClassName = (base, className) => {
|
|
|
23
23
|
if (typeof className === "function") return (state) => cx(base, className(state));
|
|
24
24
|
return cx(base, className);
|
|
25
25
|
};
|
|
26
|
-
const DropdownMenuTrigger =
|
|
26
|
+
const DropdownMenuTrigger = ({ children, className, nativeButton, ref: refProp, ...rest }) => {
|
|
27
27
|
const { isNativeButtonTriggerElement, resolvedNativeButton } = useNativeButton({
|
|
28
28
|
children,
|
|
29
29
|
nativeButton
|
|
@@ -41,7 +41,7 @@ const DropdownMenuTrigger = forwardRef(({ children, className, nativeButton, ...
|
|
|
41
41
|
ref: mergeRefs([
|
|
42
42
|
children.ref,
|
|
43
43
|
props.ref,
|
|
44
|
-
|
|
44
|
+
refProp
|
|
45
45
|
])
|
|
46
46
|
});
|
|
47
47
|
};
|
|
@@ -54,10 +54,10 @@ const DropdownMenuTrigger = forwardRef(({ children, className, nativeButton, ...
|
|
|
54
54
|
...rest,
|
|
55
55
|
className: clsx(CLASSNAMES.DropdownMenuTrigger, className),
|
|
56
56
|
nativeButton: resolvedNativeButton,
|
|
57
|
-
ref,
|
|
57
|
+
ref: refProp,
|
|
58
58
|
children
|
|
59
59
|
});
|
|
60
|
-
}
|
|
60
|
+
};
|
|
61
61
|
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
62
62
|
const DropdownMenuPortal = ({ container, ...rest }) => {
|
|
63
63
|
const defaultContainer = usePortalContainer(DROPDOWN_MENU_CONTAINER_ATTR);
|