@lobehub/ui 4.28.1 → 4.29.0

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.
Files changed (128) hide show
  1. package/es/Accordion/Accordion.d.mts +2 -2
  2. package/es/Accordion/AccordionItem.d.mts +2 -2
  3. package/es/ActionIcon/ActionIcon.d.mts +2 -2
  4. package/es/Alert/Alert.d.mts +2 -2
  5. package/es/AutoComplete/Select.d.mts +2 -2
  6. package/es/Avatar/AvatarGroup/index.d.mts +2 -2
  7. package/es/Burger/Burger.d.mts +2 -2
  8. package/es/CodeDiff/CodeDiff.d.mts +2 -2
  9. package/es/CodeDiff/PatchDiff.d.mts +2 -2
  10. package/es/CodeEditor/CodeEditor.d.mts +2 -2
  11. package/es/Collapse/Collapse.d.mts +2 -2
  12. package/es/ContextMenu/ContextMenuHost.d.mts +2 -2
  13. package/es/CopyButton/CopyButton.d.mts +2 -2
  14. package/es/DatePicker/DatePicker.d.mts +2 -2
  15. package/es/DraggablePanel/components/DraggablePanelBody.d.mts +2 -2
  16. package/es/DraggablePanel/components/DraggablePanelContainer.d.mts +2 -2
  17. package/es/DraggablePanel/components/DraggablePanelFooter.d.mts +2 -2
  18. package/es/DraggablePanel/components/DraggablePanelHeader.d.mts +2 -2
  19. package/es/DraggableSideNav/DraggableSideNav.d.mts +2 -2
  20. package/es/Drawer/Drawer.d.mts +2 -2
  21. package/es/Dropdown/Dropdown.d.mts +2 -2
  22. package/es/DropdownMenu/DropdownMenu.d.mts +2 -2
  23. package/es/DropdownMenu/atoms.d.mts +16 -16
  24. package/es/DropdownMenu/atoms.mjs +4 -1
  25. package/es/DropdownMenu/atoms.mjs.map +1 -1
  26. package/es/EditableText/EditableText.d.mts +2 -2
  27. package/es/EditorSlashMenu/atoms.d.mts +12 -12
  28. package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
  29. package/es/Flex/FlexBasic.d.mts +2 -2
  30. package/es/Footer/Footer.d.mts +2 -2
  31. package/es/Form/components/FormGroup.d.mts +2 -2
  32. package/es/Form/components/FormItem.d.mts +2 -2
  33. package/es/Form/components/FormSubmitFooter.d.mts +2 -2
  34. package/es/FormModal/FormModal.d.mts +2 -2
  35. package/es/Header/Header.d.mts +2 -2
  36. package/es/Highlighter/Highlighter.d.mts +2 -2
  37. package/es/Highlighter/SyntaxHighlighter/index.d.mts +2 -2
  38. package/es/Hotkey/Hotkey.d.mts +2 -2
  39. package/es/HotkeyInput/HotkeyInput.d.mts +2 -2
  40. package/es/Icon/Icon.d.mts +2 -2
  41. package/es/Icon/components/IconProvider.d.mts +3 -3
  42. package/es/Image/PreviewGroup.d.mts +2 -2
  43. package/es/Input/Input.d.mts +2 -2
  44. package/es/Input/InputNumber.d.mts +2 -2
  45. package/es/Input/InputOPT.d.mts +2 -2
  46. package/es/Input/InputPassword.d.mts +2 -2
  47. package/es/Layout/components/LayoutFooter.d.mts +2 -2
  48. package/es/Layout/components/LayoutHeader.d.mts +2 -2
  49. package/es/Layout/components/LayoutMain.d.mts +2 -2
  50. package/es/Layout/components/LayoutSidebar.d.mts +2 -2
  51. package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
  52. package/es/Layout/components/LayoutToc.d.mts +2 -2
  53. package/es/List/ListItem/index.d.mts +2 -2
  54. package/es/LobeSelect/LobeSelect.d.mts +2 -2
  55. package/es/LobeSelect/LobeSelect.mjs +6 -5
  56. package/es/LobeSelect/LobeSelect.mjs.map +1 -1
  57. package/es/LobeSelect/atoms.d.mts +19 -19
  58. package/es/LobeSelect/index.d.mts +2 -2
  59. package/es/LobeSelect/style.mjs +5 -0
  60. package/es/LobeSelect/style.mjs.map +1 -1
  61. package/es/LobeSelect/type.d.mts +14 -1
  62. package/es/LobeSwitch/LobeSwitch.d.mts +2 -2
  63. package/es/LobeSwitch/atoms.d.mts +4 -4
  64. package/es/Markdown/Markdown.d.mts +2 -2
  65. package/es/Markdown/Typography.d.mts +2 -2
  66. package/es/MaskShadow/MaskShadow.d.mts +2 -2
  67. package/es/Menu/Menu.d.mts +2 -2
  68. package/es/Mermaid/Mermaid.d.mts +2 -2
  69. package/es/Mermaid/SyntaxMermaid/index.d.mts +2 -2
  70. package/es/Modal/Modal.d.mts +2 -2
  71. package/es/Modal/ModalProvider.d.mts +2 -2
  72. package/es/Modal/imperative.d.mts +2 -2
  73. package/es/Popover/ArrowIcon.d.mts +2 -2
  74. package/es/Popover/atoms.d.mts +9 -9
  75. package/es/Popover/context.d.mts +2 -2
  76. package/es/SearchBar/SearchBar.d.mts +2 -2
  77. package/es/Segmented/Segmented.d.mts +2 -2
  78. package/es/Select/Select.d.mts +2 -2
  79. package/es/SideNav/SideNav.d.mts +2 -2
  80. package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
  81. package/es/SortableList/components/DragHandle.d.mts +2 -2
  82. package/es/SortableList/components/SortableItem.d.mts +2 -2
  83. package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
  84. package/es/Toast/imperative.d.mts +3 -3
  85. package/es/Toc/Toc.d.mts +2 -2
  86. package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
  87. package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +2 -2
  88. package/es/awesome/Features/Features.d.mts +2 -2
  89. package/es/awesome/Giscus/Giscus.d.mts +2 -2
  90. package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
  91. package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
  92. package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
  93. package/es/awesome/Spline/Spine.d.mts +2 -2
  94. package/es/awesome/Spotlight/Spotlight.d.mts +2 -2
  95. package/es/awesome/SpotlightCard/SpotlightCard.d.mts +2 -2
  96. package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +2 -2
  97. package/es/brand/LobeChat/index.d.mts +2 -2
  98. package/es/brand/LobeHub/index.d.mts +2 -2
  99. package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
  100. package/es/brand/LogoThree/index.d.mts +2 -2
  101. package/es/chat/BackBottom/BackBottom.d.mts +2 -2
  102. package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +2 -2
  103. package/es/chat/ChatItem/ChatItem.d.mts +2 -2
  104. package/es/chat/ChatList/ChatList.d.mts +2 -2
  105. package/es/chat/EditableMessageList/EditableMessageList.d.mts +2 -2
  106. package/es/chat/MessageInput/MessageInput.d.mts +2 -2
  107. package/es/chat/MessageModal/MessageModal.d.mts +2 -2
  108. package/es/color/ColorScales/index.d.mts +2 -2
  109. package/es/color/CssVar/index.d.mts +2 -2
  110. package/es/i18n/context.d.mts +2 -2
  111. package/es/icons/lucideExtra/CreateBotIcon.d.mts +3 -3
  112. package/es/icons/lucideExtra/DiscordIcon.d.mts +3 -3
  113. package/es/icons/lucideExtra/GlobeOffIcon.d.mts +3 -3
  114. package/es/icons/lucideExtra/GroupBotIcon.d.mts +3 -3
  115. package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
  116. package/es/icons/lucideExtra/LeftClickIcon.d.mts +3 -3
  117. package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +3 -3
  118. package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
  119. package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
  120. package/es/icons/lucideExtra/RightClickIcon.d.mts +3 -3
  121. package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +3 -3
  122. package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
  123. package/es/mdx/Mdx/index.d.mts +2 -2
  124. package/es/mobile/ChatHeader/ChatHeaderTitle.d.mts +2 -2
  125. package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +2 -2
  126. package/es/mobile/TabBar/TabBar.d.mts +2 -2
  127. package/es/storybook/StoryBook/index.d.mts +2 -2
  128. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  import { FlexBasicProps } from "./type.mjs";
2
- import * as react1 from "react";
2
+ import * as react49 from "react";
3
3
 
4
4
  //#region src/Flex/FlexBasic.d.ts
5
- declare const _default: react1.NamedExoticComponent<FlexBasicProps>;
5
+ declare const _default: react49.NamedExoticComponent<FlexBasicProps>;
6
6
  //#endregion
7
7
  export { _default };
8
8
  //# sourceMappingURL=FlexBasic.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FooterProps } from "./type.mjs";
2
- import * as react0 from "react";
2
+ import * as react46 from "react";
3
3
 
4
4
  //#region src/Footer/Footer.d.ts
5
- declare const Footer: react0.NamedExoticComponent<FooterProps>;
5
+ declare const Footer: react46.NamedExoticComponent<FooterProps>;
6
6
  //#endregion
7
7
  export { Footer };
8
8
  //# sourceMappingURL=Footer.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FormGroupProps } from "../type.mjs";
2
- import * as react77 from "react";
2
+ import * as react43 from "react";
3
3
 
4
4
  //#region src/Form/components/FormGroup.d.ts
5
- declare const FormGroup: react77.NamedExoticComponent<FormGroupProps>;
5
+ declare const FormGroup: react43.NamedExoticComponent<FormGroupProps>;
6
6
  //#endregion
7
7
  export { FormGroup };
8
8
  //# sourceMappingURL=FormGroup.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FormItemProps } from "../type.mjs";
2
- import * as react76 from "react";
2
+ import * as react44 from "react";
3
3
 
4
4
  //#region src/Form/components/FormItem.d.ts
5
- declare const FormItem: react76.NamedExoticComponent<FormItemProps>;
5
+ declare const FormItem: react44.NamedExoticComponent<FormItemProps>;
6
6
  //#endregion
7
7
  export { FormItem };
8
8
  //# sourceMappingURL=FormItem.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FormSubmitFooterProps } from "../type.mjs";
2
- import * as react78 from "react";
2
+ import * as react45 from "react";
3
3
 
4
4
  //#region src/Form/components/FormSubmitFooter.d.ts
5
- declare const FormSubmitFooter: react78.NamedExoticComponent<FormSubmitFooterProps>;
5
+ declare const FormSubmitFooter: react45.NamedExoticComponent<FormSubmitFooterProps>;
6
6
  //#endregion
7
7
  export { FormSubmitFooter };
8
8
  //# sourceMappingURL=FormSubmitFooter.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FormModalProps } from "./type.mjs";
2
- import * as react0 from "react";
2
+ import * as react41 from "react";
3
3
 
4
4
  //#region src/FormModal/FormModal.d.ts
5
- declare const FormModal: react0.NamedExoticComponent<FormModalProps>;
5
+ declare const FormModal: react41.NamedExoticComponent<FormModalProps>;
6
6
  //#endregion
7
7
  export { FormModal };
8
8
  //# sourceMappingURL=FormModal.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { HeaderProps } from "./type.mjs";
2
- import * as react75 from "react";
2
+ import * as react48 from "react";
3
3
 
4
4
  //#region src/Header/Header.d.ts
5
- declare const Header: react75.NamedExoticComponent<HeaderProps>;
5
+ declare const Header: react48.NamedExoticComponent<HeaderProps>;
6
6
  //#endregion
7
7
  export { Header };
8
8
  //# sourceMappingURL=Header.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { HighlighterProps } from "./type.mjs";
2
- import * as react73 from "react";
2
+ import * as react47 from "react";
3
3
 
4
4
  //#region src/Highlighter/Highlighter.d.ts
5
- declare const Highlighter: react73.NamedExoticComponent<HighlighterProps>;
5
+ declare const Highlighter: react47.NamedExoticComponent<HighlighterProps>;
6
6
  //#endregion
7
7
  export { Highlighter };
8
8
  //# sourceMappingURL=Highlighter.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { SyntaxHighlighterProps } from "../type.mjs";
2
- import * as react74 from "react";
2
+ import * as react42 from "react";
3
3
 
4
4
  //#region src/Highlighter/SyntaxHighlighter/index.d.ts
5
- declare const SyntaxHighlighter: react74.NamedExoticComponent<SyntaxHighlighterProps>;
5
+ declare const SyntaxHighlighter: react42.NamedExoticComponent<SyntaxHighlighterProps>;
6
6
  //#endregion
7
7
  export { SyntaxHighlighter };
8
8
  //# sourceMappingURL=index.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { HotkeyProps } from "./type.mjs";
2
- import * as react71 from "react";
2
+ import * as react32 from "react";
3
3
 
4
4
  //#region src/Hotkey/Hotkey.d.ts
5
- declare const Hotkey: react71.NamedExoticComponent<HotkeyProps>;
5
+ declare const Hotkey: react32.NamedExoticComponent<HotkeyProps>;
6
6
  //#endregion
7
7
  export { Hotkey };
8
8
  //# sourceMappingURL=Hotkey.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { HotkeyInputProps } from "./type.mjs";
2
- import * as react72 from "react";
2
+ import * as react40 from "react";
3
3
 
4
4
  //#region src/HotkeyInput/HotkeyInput.d.ts
5
- declare const HotkeyInput: react72.NamedExoticComponent<HotkeyInputProps>;
5
+ declare const HotkeyInput: react40.NamedExoticComponent<HotkeyInputProps>;
6
6
  //#endregion
7
7
  export { HotkeyInput };
8
8
  //# sourceMappingURL=HotkeyInput.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { IconProps } from "./type.mjs";
2
- import * as react70 from "react";
2
+ import * as react39 from "react";
3
3
 
4
4
  //#region src/Icon/Icon.d.ts
5
- declare const Icon: react70.NamedExoticComponent<IconProps>;
5
+ declare const Icon: react39.NamedExoticComponent<IconProps>;
6
6
  //#endregion
7
7
  export { Icon };
8
8
  //# sourceMappingURL=Icon.d.mts.map
@@ -1,11 +1,11 @@
1
1
  import { IconProps } from "../type.mjs";
2
- import * as react68 from "react";
2
+ import * as react37 from "react";
3
3
  import { ReactNode } from "react";
4
4
 
5
5
  //#region src/Icon/components/IconProvider.d.ts
6
6
  type IconContentConfig = Omit<IconProps, 'icon' | 'ref'>;
7
- declare const IconContext: react68.Context<IconContentConfig>;
8
- declare const IconProvider: react68.NamedExoticComponent<{
7
+ declare const IconContext: react37.Context<IconContentConfig>;
8
+ declare const IconProvider: react37.NamedExoticComponent<{
9
9
  children: ReactNode;
10
10
  config?: IconContentConfig;
11
11
  }>;
@@ -1,8 +1,8 @@
1
1
  import { PreviewGroupProps } from "./type.mjs";
2
- import * as react61 from "react";
2
+ import * as react21 from "react";
3
3
 
4
4
  //#region src/Image/PreviewGroup.d.ts
5
- declare const PreviewGroup: react61.NamedExoticComponent<PreviewGroupProps>;
5
+ declare const PreviewGroup: react21.NamedExoticComponent<PreviewGroupProps>;
6
6
  //#endregion
7
7
  export { PreviewGroup };
8
8
  //# sourceMappingURL=PreviewGroup.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { InputProps } from "./type.mjs";
2
- import * as react152 from "react";
2
+ import * as react150 from "react";
3
3
 
4
4
  //#region src/Input/Input.d.ts
5
- declare const Input: react152.NamedExoticComponent<InputProps>;
5
+ declare const Input: react150.NamedExoticComponent<InputProps>;
6
6
  //#endregion
7
7
  export { Input };
8
8
  //# sourceMappingURL=Input.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { InputNumberProps } from "./type.mjs";
2
- import * as react150 from "react";
2
+ import * as react151 from "react";
3
3
 
4
4
  //#region src/Input/InputNumber.d.ts
5
- declare const InputNumber: react150.NamedExoticComponent<InputNumberProps>;
5
+ declare const InputNumber: react151.NamedExoticComponent<InputNumberProps>;
6
6
  //#endregion
7
7
  export { InputNumber };
8
8
  //# sourceMappingURL=InputNumber.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { InputOPTProps } from "./type.mjs";
2
- import * as react153 from "react";
2
+ import * as react152 from "react";
3
3
 
4
4
  //#region src/Input/InputOPT.d.ts
5
- declare const InputOPT: react153.NamedExoticComponent<InputOPTProps>;
5
+ declare const InputOPT: react152.NamedExoticComponent<InputOPTProps>;
6
6
  //#endregion
7
7
  export { InputOPT };
8
8
  //# sourceMappingURL=InputOPT.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { InputPasswordProps } from "./type.mjs";
2
- import * as react151 from "react";
2
+ import * as react153 from "react";
3
3
 
4
4
  //#region src/Input/InputPassword.d.ts
5
- declare const InputPassword: react151.NamedExoticComponent<InputPasswordProps>;
5
+ declare const InputPassword: react153.NamedExoticComponent<InputPasswordProps>;
6
6
  //#endregion
7
7
  export { InputPassword };
8
8
  //# sourceMappingURL=InputPassword.d.mts.map
@@ -1,9 +1,9 @@
1
1
  import { DivProps } from "../../types/index.mjs";
2
2
  import "../../index.mjs";
3
- import * as react62 from "react";
3
+ import * as react22 from "react";
4
4
 
5
5
  //#region src/Layout/components/LayoutFooter.d.ts
6
- declare const LayoutFooter: react62.NamedExoticComponent<DivProps>;
6
+ declare const LayoutFooter: react22.NamedExoticComponent<DivProps>;
7
7
  //#endregion
8
8
  export { LayoutFooter };
9
9
  //# sourceMappingURL=LayoutFooter.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { LayoutHeaderProps } from "../type.mjs";
2
- import * as react66 from "react";
2
+ import * as react23 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutHeader.d.ts
5
- declare const LayoutHeader: react66.NamedExoticComponent<LayoutHeaderProps>;
5
+ declare const LayoutHeader: react23.NamedExoticComponent<LayoutHeaderProps>;
6
6
  //#endregion
7
7
  export { LayoutHeader };
8
8
  //# sourceMappingURL=LayoutHeader.d.mts.map
@@ -1,9 +1,9 @@
1
1
  import { DivProps } from "../../types/index.mjs";
2
2
  import "../../index.mjs";
3
- import * as react67 from "react";
3
+ import * as react24 from "react";
4
4
 
5
5
  //#region src/Layout/components/LayoutMain.d.ts
6
- declare const LayoutMain: react67.NamedExoticComponent<DivProps>;
6
+ declare const LayoutMain: react24.NamedExoticComponent<DivProps>;
7
7
  //#endregion
8
8
  export { LayoutMain };
9
9
  //# sourceMappingURL=LayoutMain.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { LayoutSidebarProps } from "../type.mjs";
2
- import * as react64 from "react";
2
+ import * as react25 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutSidebar.d.ts
5
- declare const LayoutSidebar: react64.NamedExoticComponent<LayoutSidebarProps>;
5
+ declare const LayoutSidebar: react25.NamedExoticComponent<LayoutSidebarProps>;
6
6
  //#endregion
7
7
  export { LayoutSidebar };
8
8
  //# sourceMappingURL=LayoutSidebar.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { LayoutSidebarInnerProps } from "../type.mjs";
2
- import * as react63 from "react";
2
+ import * as react26 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutSidebarInner.d.ts
5
- declare const LayoutSidebarInner: react63.NamedExoticComponent<LayoutSidebarInnerProps>;
5
+ declare const LayoutSidebarInner: react26.NamedExoticComponent<LayoutSidebarInnerProps>;
6
6
  //#endregion
7
7
  export { LayoutSidebarInner };
8
8
  //# sourceMappingURL=LayoutSidebarInner.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { LayoutTocProps } from "../type.mjs";
2
- import * as react65 from "react";
2
+ import * as react27 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutToc.d.ts
5
- declare const LayoutToc: react65.NamedExoticComponent<LayoutTocProps>;
5
+ declare const LayoutToc: react27.NamedExoticComponent<LayoutTocProps>;
6
6
  //#endregion
7
7
  export { LayoutToc };
8
8
  //# sourceMappingURL=LayoutToc.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { ListItemProps } from "../type.mjs";
2
- import * as react60 from "react";
2
+ import * as react17 from "react";
3
3
 
4
4
  //#region src/List/ListItem/index.d.ts
5
- declare const ListItem: react60.NamedExoticComponent<ListItemProps>;
5
+ declare const ListItem: react17.NamedExoticComponent<ListItemProps>;
6
6
  //#endregion
7
7
  export { ListItem };
8
8
  //# sourceMappingURL=index.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { LobeSelectProps } from "./type.mjs";
2
- import * as react59 from "react";
2
+ import * as react16 from "react";
3
3
 
4
4
  //#region src/LobeSelect/LobeSelect.d.ts
5
- declare const LobeSelect: react59.NamedExoticComponent<LobeSelectProps<any>>;
5
+ declare const LobeSelect: react16.NamedExoticComponent<LobeSelectProps<any>>;
6
6
  //#endregion
7
7
  export { LobeSelect };
8
8
  //# sourceMappingURL=LobeSelect.d.mts.map
@@ -31,7 +31,7 @@ const countVirtualItems = (items) => items.reduce((count, item) => {
31
31
  return count + 1;
32
32
  }, 0);
33
33
  const isValueEmpty = (value) => value === null || value === void 0 || value === "";
34
- const LobeSelect = memo(({ allowClear, autoFocus, className, classNames, defaultOpen, defaultValue, disabled, id, listItemHeight, labelRender, loading, mode, name, onChange, onOpenChange, onSelect, open, optionRender, options, placeholder, popupClassName, popupMatchSelectWidth, prefix, readOnly, required, behaviorVariant = "default", shadow, showSearch, size = "middle", style, suffixIcon, suffixIconProps, tokenSeparators, value, variant, virtual }) => {
34
+ const LobeSelect = memo(({ allowClear, autoFocus, className, classNames, defaultOpen, defaultValue, disabled, id, listItemHeight, labelRender, loading, mode, name, onChange, onOpenChange, onSelect, open, optionRender, options, placeholder, popupClassName, popupMatchSelectWidth, prefix, readOnly, required, behaviorVariant = "default", selectedIndicatorVariant = "check", shadow, showSearch, size = "middle", style, suffixIcon, suffixIconProps, tokenSeparators, value, variant, virtual }) => {
35
35
  const { isDarkMode } = useThemeMode();
36
36
  const resolvedVariant = variant ?? (isDarkMode ? "filled" : "outlined");
37
37
  const isMultiple = mode === "multiple" || mode === "tags";
@@ -342,6 +342,7 @@ const LobeSelect = memo(({ allowClear, autoFocus, className, classNames, default
342
342
  virtual
343
343
  ]);
344
344
  const itemTextClassName = cx(optionRender ? styles.itemContent : styles.label, styles$1.itemText, classNames?.itemText);
345
+ const isBoldIndicator = selectedIndicatorVariant === "bold";
345
346
  let optionIndex = 0;
346
347
  const renderOptions = (items) => items.map((item, index) => {
347
348
  if (isGroupOption(item)) return /* @__PURE__ */ jsxs(Select.Group, {
@@ -352,7 +353,7 @@ const LobeSelect = memo(({ allowClear, autoFocus, className, classNames, default
352
353
  }), item.options.map((option) => {
353
354
  const currentIndex$1 = optionIndex++;
354
355
  return /* @__PURE__ */ jsxs(Select.Item, {
355
- className: cx(styles.item, styles$1.item, classNames?.item, classNames?.option, option.className),
356
+ className: cx(styles.item, styles$1.item, isBoldIndicator && styles$1.itemBoldSelected, classNames?.item, classNames?.option, option.className),
356
357
  disabled: option.disabled,
357
358
  label: getOptionSearchText(option),
358
359
  style: {
@@ -363,7 +364,7 @@ const LobeSelect = memo(({ allowClear, autoFocus, className, classNames, default
363
364
  children: [/* @__PURE__ */ jsx(Select.ItemText, {
364
365
  className: itemTextClassName,
365
366
  children: optionRender ? optionRender(option, { index: currentIndex$1 }) : option.label
366
- }), /* @__PURE__ */ jsx(Select.ItemIndicator, {
367
+ }), !isBoldIndicator && /* @__PURE__ */ jsx(Select.ItemIndicator, {
367
368
  className: cx(styles$1.itemIndicator, classNames?.itemIndicator),
368
369
  children: /* @__PURE__ */ jsx(Icon_default, {
369
370
  icon: Check,
@@ -375,7 +376,7 @@ const LobeSelect = memo(({ allowClear, autoFocus, className, classNames, default
375
376
  }, `group-${index}`);
376
377
  const currentIndex = optionIndex++;
377
378
  return /* @__PURE__ */ jsxs(Select.Item, {
378
- className: cx(styles.item, styles$1.item, classNames?.item, classNames?.option, item.className),
379
+ className: cx(styles.item, styles$1.item, isBoldIndicator && styles$1.itemBoldSelected, classNames?.item, classNames?.option, item.className),
379
380
  disabled: item.disabled,
380
381
  label: getOptionSearchText(item),
381
382
  style: {
@@ -386,7 +387,7 @@ const LobeSelect = memo(({ allowClear, autoFocus, className, classNames, default
386
387
  children: [/* @__PURE__ */ jsx(Select.ItemText, {
387
388
  className: itemTextClassName,
388
389
  children: optionRender ? optionRender(item, { index: currentIndex }) : item.label
389
- }), /* @__PURE__ */ jsx(Select.ItemIndicator, {
390
+ }), !isBoldIndicator && /* @__PURE__ */ jsx(Select.ItemIndicator, {
390
391
  className: cx(styles$1.itemIndicator, classNames?.itemIndicator),
391
392
  children: /* @__PURE__ */ jsx(Icon_default, {
392
393
  icon: Check,
@@ -1 +1 @@
1
- {"version":3,"file":"LobeSelect.mjs","names":["mergedOptions: LobeSelectOptions","missingValueOptions: LobeSelectOption<any>[]","styles","option","content","Icon","baseStyle: React.CSSProperties","menuStyles","currentIndex"],"sources":["../../src/LobeSelect/LobeSelect.tsx"],"sourcesContent":["'use client';\n\nimport { Select } from '@base-ui/react/select';\nimport { cx, useThemeMode } from 'antd-style';\nimport { Check, ChevronDown, Loader2, X } from 'lucide-react';\nimport type { ChangeEvent, KeyboardEvent, MouseEvent } from 'react';\nimport { isValidElement, memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { Virtualizer } from 'virtua';\n\nimport Icon from '@/Icon';\nimport { styles as menuStyles } from '@/Menu/sharedStyle';\nimport { usePortalContainer } from '@/hooks/usePortalContainer';\n\nimport { LOBE_SELECT_CONTAINER_ATTR } from './constants';\nimport { styles, triggerVariants } from './style';\nimport type {\n LobeSelectOption,\n LobeSelectOptionGroup,\n LobeSelectOptions,\n LobeSelectProps,\n} from './type';\n\nconst isGroupOption = <Value,>(\n option: LobeSelectOption<Value> | LobeSelectOptionGroup<Value>,\n): option is LobeSelectOptionGroup<Value> =>\n Boolean((option as LobeSelectOptionGroup<Value>).options);\n\nconst getOptionSearchText = <Value,>(option: LobeSelectOption<Value>) => {\n if (typeof option.label === 'string' || typeof option.label === 'number') {\n return String(option.label);\n }\n if (typeof option.value === 'string' || typeof option.value === 'number') {\n return String(option.value);\n }\n if (option.title) return option.title;\n return '';\n};\n\nconst escapeRegExp = (value: string) => value.replaceAll(/[$()*+.?[\\\\\\]^{|}]/g, '\\\\$&');\n\nconst splitBySeparators = (value: string, separators?: string[]) => {\n if (!separators || separators.length === 0) return [value];\n const pattern = separators.map(escapeRegExp).join('|');\n return value.split(new RegExp(pattern, 'g'));\n};\n\nconst countVirtualItems = (items: LobeSelectOptions) =>\n items.reduce((count, item) => {\n if (isGroupOption(item)) {\n return count + item.options.length + 1;\n }\n return count + 1;\n }, 0);\n\nconst isValueEmpty = (value: unknown) => value === null || value === undefined || value === '';\n\nconst LobeSelect = memo<LobeSelectProps<any>>(\n ({\n allowClear,\n autoFocus,\n className,\n classNames,\n defaultOpen,\n defaultValue,\n disabled,\n id,\n listItemHeight,\n labelRender,\n loading,\n mode,\n name,\n onChange,\n onOpenChange,\n onSelect,\n open,\n optionRender,\n options,\n placeholder,\n popupClassName,\n popupMatchSelectWidth,\n prefix,\n readOnly,\n required,\n behaviorVariant = 'default',\n shadow,\n showSearch,\n size = 'middle',\n style,\n suffixIcon,\n suffixIconProps,\n tokenSeparators,\n value,\n variant,\n virtual,\n }) => {\n const { isDarkMode } = useThemeMode();\n const resolvedVariant = variant ?? (isDarkMode ? 'filled' : 'outlined');\n const isMultiple = mode === 'multiple' || mode === 'tags';\n const isItemAligned = behaviorVariant === 'item-aligned';\n\n const [uncontrolledValue, setUncontrolledValue] = useState<any>(() => {\n if (defaultValue !== undefined) return defaultValue;\n return isMultiple ? [] : null;\n });\n\n const normalizeValue = useCallback(\n (nextValue: any) => {\n if (isMultiple) {\n if (Array.isArray(nextValue)) return nextValue;\n if (nextValue === null || nextValue === undefined) return [];\n return [nextValue];\n }\n if (Array.isArray(nextValue)) return nextValue[0] ?? null;\n return nextValue === undefined ? null : nextValue;\n },\n [isMultiple],\n );\n\n const mergedValue = value !== undefined ? value : uncontrolledValue;\n const normalizedValue = useMemo(\n () => normalizeValue(mergedValue),\n [mergedValue, normalizeValue],\n );\n const valueArray = useMemo(\n () =>\n isMultiple\n ? (normalizedValue as any[])\n : isValueEmpty(normalizedValue)\n ? []\n : [normalizedValue],\n [isMultiple, normalizedValue],\n );\n\n const [extraOptions, setExtraOptions] = useState<LobeSelectOption<any>[]>([]);\n\n useEffect(() => {\n if (mode !== 'tags' && extraOptions.length > 0) {\n setExtraOptions([]);\n }\n }, [mode, extraOptions.length]);\n\n const { resolvedOptions, optionMap } = useMemo(() => {\n const baseOptions = options ?? [];\n const optionValueMap = new Map<any, LobeSelectOption<any>>();\n\n const addOption = (item: LobeSelectOption<any>) => {\n if (!optionValueMap.has(item.value)) {\n optionValueMap.set(item.value, item);\n }\n };\n\n const walkOptions = (items: LobeSelectOptions) => {\n items.forEach((item) => {\n if (isGroupOption(item)) {\n item.options.forEach(addOption);\n } else {\n addOption(item);\n }\n });\n };\n\n walkOptions(baseOptions);\n\n const filteredExtraOptions = extraOptions.filter((item) => !optionValueMap.has(item.value));\n filteredExtraOptions.forEach(addOption);\n\n const mergedOptions: LobeSelectOptions = [...baseOptions, ...filteredExtraOptions];\n\n const missingValueOptions: LobeSelectOption<any>[] = valueArray\n .filter((val) => !optionValueMap.has(val))\n .map((val) => ({\n label: String(val),\n value: val,\n }));\n missingValueOptions.forEach(addOption);\n\n return {\n optionMap: optionValueMap,\n resolvedOptions: missingValueOptions.length\n ? [...mergedOptions, ...missingValueOptions]\n : mergedOptions,\n };\n }, [extraOptions, options, valueArray]);\n\n const [uncontrolledOpen, setUncontrolledOpen] = useState(Boolean(defaultOpen));\n\n useEffect(() => {\n if (open !== undefined) {\n setUncontrolledOpen(open);\n }\n }, [open]);\n\n const mergedOpen = open ?? uncontrolledOpen;\n\n const handleOpenChange = useCallback(\n (nextOpen: boolean) => {\n onOpenChange?.(nextOpen);\n if (open === undefined) {\n setUncontrolledOpen(nextOpen);\n }\n },\n [onOpenChange, open],\n );\n\n const [searchValue, setSearchValue] = useState('');\n const shouldShowSearch = Boolean(showSearch || mode === 'tags');\n\n useEffect(() => {\n if (!mergedOpen) setSearchValue('');\n }, [mergedOpen]);\n\n const getOption = useCallback(\n (optionValue: any): LobeSelectOption<any> => {\n const matched = optionMap.get(optionValue);\n if (matched) return matched;\n if (optionValue && typeof optionValue === 'object' && 'label' in optionValue) {\n return {\n label: (optionValue as any).label,\n value: optionValue,\n };\n }\n return {\n label: String(optionValue),\n value: optionValue,\n };\n },\n [optionMap],\n );\n\n const previousValueRef = useRef<any>(normalizedValue);\n\n useEffect(() => {\n previousValueRef.current = normalizedValue;\n }, [normalizedValue]);\n\n const handleValueChange = useCallback(\n (nextValue: any) => {\n const normalizedNextValue = normalizeValue(nextValue);\n const previousValue = previousValueRef.current;\n\n if (isMultiple) {\n const prevValues = Array.isArray(previousValue) ? previousValue : [];\n const nextValues = Array.isArray(normalizedNextValue) ? normalizedNextValue : [];\n const addedValues = nextValues.filter(\n (val) => !prevValues.some((prev) => Object.is(prev, val)),\n );\n\n addedValues.forEach((val) => {\n onSelect?.(val, getOption(val));\n });\n\n if (value === undefined) {\n setUncontrolledValue(nextValues);\n }\n onChange?.(\n nextValues,\n nextValues.map((val) => getOption(val)),\n );\n } else {\n if (\n !isValueEmpty(normalizedNextValue) &&\n !Object.is(previousValue, normalizedNextValue)\n ) {\n onSelect?.(normalizedNextValue, getOption(normalizedNextValue));\n }\n if (value === undefined) {\n setUncontrolledValue(normalizedNextValue);\n }\n onChange?.(\n normalizedNextValue,\n isValueEmpty(normalizedNextValue) ? undefined : getOption(normalizedNextValue),\n );\n }\n\n previousValueRef.current = normalizedNextValue;\n },\n [getOption, isMultiple, normalizeValue, onChange, onSelect, value],\n );\n\n const appendTagValues = useCallback(\n (rawValues: string[]) => {\n const valuesToAdd = rawValues.map((val) => val.trim()).filter(Boolean);\n if (!valuesToAdd.length) return;\n\n const nextValues = [...valueArray];\n const newOptionValues = valuesToAdd.filter((val) => !optionMap.has(val));\n\n if (newOptionValues.length > 0) {\n setExtraOptions((prev) => {\n const existingValues = new Set(prev.map((item) => item.value));\n const merged = [...prev];\n newOptionValues.forEach((val) => {\n if (!existingValues.has(val)) {\n merged.push({ label: val, value: val });\n }\n });\n return merged;\n });\n }\n\n valuesToAdd.forEach((val) => {\n if (!nextValues.some((item) => Object.is(item, val))) {\n nextValues.push(val);\n }\n });\n\n if (nextValues.length !== valueArray.length) {\n handleValueChange(nextValues);\n }\n },\n [handleValueChange, optionMap, valueArray],\n );\n\n const handleSearchChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const nextValue = event.target.value;\n if (mode === 'tags') {\n const parts = splitBySeparators(nextValue, tokenSeparators);\n if (parts.length > 1) {\n const pending = parts.pop() ?? '';\n appendTagValues(parts.filter(Boolean));\n setSearchValue(pending);\n return;\n }\n }\n setSearchValue(nextValue);\n },\n [appendTagValues, mode, tokenSeparators],\n );\n\n const handleSearchKeyDown = useCallback(\n (event: KeyboardEvent<HTMLInputElement>) => {\n event.stopPropagation();\n\n if (event.key === 'Escape') {\n handleOpenChange(false);\n return;\n }\n\n if (mode !== 'tags') return;\n\n if (event.key === 'Enter') {\n event.preventDefault();\n event.stopPropagation();\n appendTagValues([searchValue]);\n setSearchValue('');\n return;\n }\n\n if (tokenSeparators?.includes(event.key)) {\n event.preventDefault();\n event.stopPropagation();\n appendTagValues([searchValue]);\n setSearchValue('');\n }\n },\n [appendTagValues, handleOpenChange, mode, searchValue, tokenSeparators],\n );\n\n const filteredOptions = useMemo(() => {\n if (!shouldShowSearch || !searchValue.trim()) return resolvedOptions;\n const query = searchValue.trim().toLowerCase();\n\n const filterItems = (items: LobeSelectOptions): LobeSelectOptions => {\n const filtered = items\n .map((item) => {\n if (isGroupOption(item)) {\n const groupItems = item.options.filter((option) =>\n getOptionSearchText(option).toLowerCase().includes(query),\n );\n if (!groupItems.length) return null;\n return { ...item, options: groupItems };\n }\n return getOptionSearchText(item).toLowerCase().includes(query) ? item : null;\n })\n .filter(Boolean) as LobeSelectOptions;\n\n return filtered;\n };\n\n return filterItems(resolvedOptions);\n }, [resolvedOptions, searchValue, shouldShowSearch]);\n\n const renderValue = useCallback(\n (currentValue: any) => {\n const resolved = normalizeValue(currentValue);\n const placeholderNode =\n placeholder === undefined ? null : (\n <span className={styles.valueText}>{placeholder}</span>\n );\n\n if (isMultiple) {\n const values = Array.isArray(resolved) ? resolved : [];\n if (values.length === 0) return placeholderNode;\n return (\n <span className={styles.tags}>\n {values.map((val, index) => {\n const option = getOption(val);\n const content = labelRender ? labelRender(option) : (option.label ?? String(val));\n return (\n <span className={styles.tag} key={`${String(val)}-${index}`}>\n {content}\n </span>\n );\n })}\n </span>\n );\n }\n\n if (isValueEmpty(resolved)) return placeholderNode;\n const option = getOption(resolved);\n const content = labelRender ? labelRender(option) : (option.label ?? String(resolved));\n return <span className={styles.valueText}>{content}</span>;\n },\n [getOption, isMultiple, labelRender, normalizeValue, placeholder],\n );\n\n const hasValue = isMultiple ? valueArray.length > 0 : !isValueEmpty(normalizedValue);\n const showClear = Boolean(allowClear && hasValue && !disabled && !readOnly);\n\n const handleClear = useCallback(\n (event: MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n handleValueChange(isMultiple ? [] : null);\n },\n [handleValueChange, isMultiple],\n );\n\n const prefixNode = useMemo(() => {\n if (prefix === undefined || prefix === null) return null;\n if (isValidElement(prefix) || typeof prefix === 'string' || typeof prefix === 'number') {\n return prefix;\n }\n return <Icon icon={prefix as any} size={'small'} />;\n }, [prefix]);\n\n const suffixIconNode = useMemo(() => {\n if (loading) {\n return <Icon icon={Loader2} size={'small'} spin />;\n }\n if (suffixIcon === null) return null;\n if (\n isValidElement(suffixIcon) ||\n typeof suffixIcon === 'string' ||\n typeof suffixIcon === 'number'\n ) {\n return suffixIcon;\n }\n return (\n <Icon\n icon={(suffixIcon as any) || ChevronDown}\n size={'small'}\n {...suffixIconProps}\n style={{\n pointerEvents: 'none',\n ...suffixIconProps?.style,\n }}\n />\n );\n }, [loading, suffixIcon, suffixIconProps]);\n\n const popupStyle = useMemo(() => {\n const maxHeight = isItemAligned ? '80vh' : '450px';\n const baseStyle: React.CSSProperties = {\n maxHeight,\n maxWidth: 'var(--available-width)',\n minWidth: 'var(--anchor-width)',\n ['--lobe-select-popup-max-height' as any]: maxHeight,\n };\n\n if (popupMatchSelectWidth === undefined || popupMatchSelectWidth === true) {\n return baseStyle;\n }\n if (typeof popupMatchSelectWidth === 'number') {\n return {\n ...baseStyle,\n minWidth: popupMatchSelectWidth,\n width: popupMatchSelectWidth,\n };\n }\n return {\n ...baseStyle,\n minWidth: 'max-content',\n };\n }, [isItemAligned, popupMatchSelectWidth]);\n\n const triggerClassName = cx(\n triggerVariants({ shadow, size, variant: resolvedVariant }),\n className,\n classNames?.root,\n classNames?.trigger,\n );\n\n const portalContainer = usePortalContainer(LOBE_SELECT_CONTAINER_ATTR);\n const virtualListStyle = useMemo(() => {\n if (!virtual) return undefined;\n const rowCount = countVirtualItems(filteredOptions);\n const maxVisibleRows = 6;\n const estimatedRowHeight =\n listItemHeight ?? (size === 'large' ? 40 : size === 'small' ? 28 : 32);\n const visibleRows = Math.min(Math.max(rowCount, 1), maxVisibleRows);\n const estimatedHeight = visibleRows * estimatedRowHeight + 8;\n\n return {\n height: `min(${estimatedHeight}px, var(--lobe-select-available-height, var(--available-height)))`,\n };\n }, [filteredOptions, listItemHeight, size, virtual]);\n\n const itemTextClassName = cx(\n optionRender ? menuStyles.itemContent : menuStyles.label,\n styles.itemText,\n classNames?.itemText,\n );\n let optionIndex = 0;\n const renderOptions = (items: LobeSelectOptions) =>\n items.map((item, index) => {\n if (isGroupOption(item)) {\n return (\n <Select.Group className={cx(styles.group, classNames?.group)} key={`group-${index}`}>\n <Select.GroupLabel\n className={cx(menuStyles.groupLabel, styles.groupLabel, classNames?.groupLabel)}\n >\n {item.label}\n </Select.GroupLabel>\n {item.options.map((option) => {\n const currentIndex = optionIndex++;\n return (\n <Select.Item\n className={cx(\n menuStyles.item,\n styles.item,\n classNames?.item,\n classNames?.option,\n option.className,\n )}\n disabled={option.disabled}\n key={`${String(option.value)}-${currentIndex}`}\n label={getOptionSearchText(option)}\n style={{\n minHeight: listItemHeight,\n ...option.style,\n }}\n value={option.value}\n >\n <Select.ItemText className={itemTextClassName}>\n {optionRender ? optionRender(option, { index: currentIndex }) : option.label}\n </Select.ItemText>\n <Select.ItemIndicator\n className={cx(styles.itemIndicator, classNames?.itemIndicator)}\n >\n <Icon icon={Check} size={'small'} />\n </Select.ItemIndicator>\n </Select.Item>\n );\n })}\n </Select.Group>\n );\n }\n\n const currentIndex = optionIndex++;\n return (\n <Select.Item\n className={cx(\n menuStyles.item,\n styles.item,\n classNames?.item,\n classNames?.option,\n item.className,\n )}\n disabled={item.disabled}\n key={`${String(item.value)}-${currentIndex}`}\n label={getOptionSearchText(item)}\n style={{\n minHeight: listItemHeight,\n ...item.style,\n }}\n value={item.value}\n >\n <Select.ItemText className={itemTextClassName}>\n {optionRender ? optionRender(item, { index: currentIndex }) : item.label}\n </Select.ItemText>\n <Select.ItemIndicator className={cx(styles.itemIndicator, classNames?.itemIndicator)}>\n <Icon icon={Check} size={'small'} />\n </Select.ItemIndicator>\n </Select.Item>\n );\n });\n\n return (\n <Select.Root\n disabled={disabled}\n id={id}\n modal={isItemAligned}\n multiple={isMultiple}\n name={name}\n onOpenChange={handleOpenChange}\n onValueChange={handleValueChange}\n open={mergedOpen}\n readOnly={readOnly}\n required={required}\n value={normalizedValue}\n >\n <Select.Trigger\n autoFocus={autoFocus}\n className={triggerClassName}\n disabled={disabled}\n style={style}\n >\n {prefixNode !== null && prefixNode !== undefined && (\n <span className={cx(styles.prefix, classNames?.prefix)}>{prefixNode}</span>\n )}\n <Select.Value className={cx(styles.value, classNames?.value)}>{renderValue}</Select.Value>\n <span className={cx(styles.suffix, classNames?.suffix)}>\n {showClear && (\n <span\n className={cx(styles.clear, classNames?.clear)}\n data-role=\"lobe-select-clear\"\n onClick={handleClear}\n >\n <Icon icon={X} size={'small'} />\n </span>\n )}\n {suffixIconNode !== null && suffixIconNode !== undefined && (\n <Select.Icon className={cx(styles.icon, classNames?.icon)}>\n {suffixIconNode}\n </Select.Icon>\n )}\n </span>\n </Select.Trigger>\n\n <Select.Portal container={portalContainer}>\n <Select.Positioner\n align=\"start\"\n alignItemWithTrigger={isItemAligned}\n className={styles.positioner}\n side=\"bottom\"\n sideOffset={6}\n >\n <Select.Popup\n className={cx(\n menuStyles.popup,\n styles.popup,\n popupClassName,\n classNames?.popup,\n classNames?.dropdown,\n )}\n style={popupStyle}\n >\n {shouldShowSearch && (\n <div className={cx(styles.search, classNames?.search)}>\n <input\n className={styles.searchInput}\n onChange={handleSearchChange}\n onKeyDown={handleSearchKeyDown}\n placeholder={typeof placeholder === 'string' ? placeholder : undefined}\n value={searchValue}\n />\n </div>\n )}\n {(() => {\n const content =\n filteredOptions.length > 0 ? (\n renderOptions(filteredOptions)\n ) : (\n <div\n className={cx(\n menuStyles.item,\n menuStyles.empty,\n styles.empty,\n classNames?.empty,\n )}\n >\n No data\n </div>\n );\n\n if (!virtual || filteredOptions.length === 0) {\n return (\n <Select.List\n className={cx(styles.list, classNames?.list)}\n data-virtual={virtual || undefined}\n >\n {content}\n </Select.List>\n );\n }\n\n return (\n <Select.List\n className={cx(styles.list, classNames?.list)}\n data-virtual={virtual || undefined}\n style={virtualListStyle}\n >\n <Virtualizer itemSize={listItemHeight}>{content}</Virtualizer>\n </Select.List>\n );\n })()}\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n );\n },\n);\n\nLobeSelect.displayName = 'LobeSelect';\n\nexport default LobeSelect;\n"],"mappings":";;;;;;;;;;;;;;;AAsBA,MAAM,iBACJ,WAEA,QAAS,OAAwC,QAAQ;AAE3D,MAAM,uBAA+B,WAAoC;AACvE,KAAI,OAAO,OAAO,UAAU,YAAY,OAAO,OAAO,UAAU,SAC9D,QAAO,OAAO,OAAO,MAAM;AAE7B,KAAI,OAAO,OAAO,UAAU,YAAY,OAAO,OAAO,UAAU,SAC9D,QAAO,OAAO,OAAO,MAAM;AAE7B,KAAI,OAAO,MAAO,QAAO,OAAO;AAChC,QAAO;;AAGT,MAAM,gBAAgB,UAAkB,MAAM,WAAW,uBAAuB,OAAO;AAEvF,MAAM,qBAAqB,OAAe,eAA0B;AAClE,KAAI,CAAC,cAAc,WAAW,WAAW,EAAG,QAAO,CAAC,MAAM;CAC1D,MAAM,UAAU,WAAW,IAAI,aAAa,CAAC,KAAK,IAAI;AACtD,QAAO,MAAM,MAAM,IAAI,OAAO,SAAS,IAAI,CAAC;;AAG9C,MAAM,qBAAqB,UACzB,MAAM,QAAQ,OAAO,SAAS;AAC5B,KAAI,cAAc,KAAK,CACrB,QAAO,QAAQ,KAAK,QAAQ,SAAS;AAEvC,QAAO,QAAQ;GACd,EAAE;AAEP,MAAM,gBAAgB,UAAmB,UAAU,QAAQ,UAAU,UAAa,UAAU;AAE5F,MAAM,aAAa,MAChB,EACC,YACA,WACA,WACA,YACA,aACA,cACA,UACA,IACA,gBACA,aACA,SACA,MACA,MACA,UACA,cACA,UACA,MACA,cACA,SACA,aAC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UAC7C,oBAAC,OAAO;MAAK,WAAW,GAAGH,SAAO,MAAM,YAAY,KAAK;gBACtD;OACW;MAEX;;IACQ,EAEjB,oBAAC,OAAO;GAAO,WAAW;aACxB,oBAAC,OAAO;IACN,OAAM;IACN,sBAAsB;IACtB,WAAWA,SAAO;IAClB,MAAK;IACL,YAAY;cAEZ,qBAAC,OAAO;KACN,WAAW,GACTK,OAAW,OACXL,SAAO,OACP,gBACA,YAAY,OACZ,YAAY,SACb;KACD,OAAO;gBAEN,oBACC,oBAAC;MAAI,WAAW,GAAGA,SAAO,QAAQ,YAAY,OAAO;gBACnD,oBAAC;OACC,WAAWA,SAAO;OAClB,UAAU;OACV,WAAW;OACX,aAAa,OAAO,gBAAgB,WAAW,cAAc;OAC7D,OAAO;QACP;OACE,SAEA;MACN,MAAM,UACJ,gBAAgB,SAAS,IACvB,cAAc,gBAAgB,GAE9B,oBAAC;OACC,WAAW,GACTK,OAAW,MACXA,OAAW,OACXL,SAAO,OACP,YAAY,MACb;iBACF;QAEK;AAGV,UAAI,CAAC,WAAW,gBAAgB,WAAW,EACzC,QACE,oBAAC,OAAO;OACN,WAAW,GAAGA,SAAO,MAAM,YAAY,KAAK;OAC5C,gBAAc,WAAW;iBAExB;QACW;AAIlB,aACE,oBAAC,OAAO;OACN,WAAW,GAAGA,SAAO,MAAM,YAAY,KAAK;OAC5C,gBAAc,WAAW;OACzB,OAAO;iBAEP,oBAAC;QAAY,UAAU;kBAAiB;SAAsB;QAClD;SAEd;MACS;KACG;IACN;GACJ;EAGnB;AAED,WAAW,cAAc;AAEzB,yBAAe"}
1
+ {"version":3,"file":"LobeSelect.mjs","names":["mergedOptions: LobeSelectOptions","missingValueOptions: LobeSelectOption<any>[]","styles","option","content","Icon","baseStyle: React.CSSProperties","menuStyles","currentIndex"],"sources":["../../src/LobeSelect/LobeSelect.tsx"],"sourcesContent":["'use client';\n\nimport { Select } from '@base-ui/react/select';\nimport { cx, useThemeMode } from 'antd-style';\nimport { Check, ChevronDown, Loader2, X } from 'lucide-react';\nimport type { ChangeEvent, KeyboardEvent, MouseEvent } from 'react';\nimport { isValidElement, memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { Virtualizer } from 'virtua';\n\nimport Icon from '@/Icon';\nimport { styles as menuStyles } from '@/Menu/sharedStyle';\nimport { usePortalContainer } from '@/hooks/usePortalContainer';\n\nimport { LOBE_SELECT_CONTAINER_ATTR } from './constants';\nimport { styles, triggerVariants } from './style';\nimport type {\n LobeSelectOption,\n LobeSelectOptionGroup,\n LobeSelectOptions,\n LobeSelectProps,\n} from './type';\n\nconst isGroupOption = <Value,>(\n option: LobeSelectOption<Value> | LobeSelectOptionGroup<Value>,\n): option is LobeSelectOptionGroup<Value> =>\n Boolean((option as LobeSelectOptionGroup<Value>).options);\n\nconst getOptionSearchText = <Value,>(option: LobeSelectOption<Value>) => {\n if (typeof option.label === 'string' || typeof option.label === 'number') {\n return String(option.label);\n }\n if (typeof option.value === 'string' || typeof option.value === 'number') {\n return String(option.value);\n }\n if (option.title) return option.title;\n return '';\n};\n\nconst escapeRegExp = (value: string) => value.replaceAll(/[$()*+.?[\\\\\\]^{|}]/g, '\\\\$&');\n\nconst splitBySeparators = (value: string, separators?: string[]) => {\n if (!separators || separators.length === 0) return [value];\n const pattern = separators.map(escapeRegExp).join('|');\n return value.split(new RegExp(pattern, 'g'));\n};\n\nconst countVirtualItems = (items: LobeSelectOptions) =>\n items.reduce((count, item) => {\n if (isGroupOption(item)) {\n return count + item.options.length + 1;\n }\n return count + 1;\n }, 0);\n\nconst isValueEmpty = (value: unknown) => value === null || value === undefined || value === '';\n\nconst LobeSelect = memo<LobeSelectProps<any>>(\n ({\n allowClear,\n autoFocus,\n className,\n classNames,\n defaultOpen,\n defaultValue,\n disabled,\n id,\n listItemHeight,\n labelRender,\n loading,\n mode,\n name,\n onChange,\n onOpenChange,\n onSelect,\n open,\n optionRender,\n options,\n placeholder,\n popupClassName,\n popupMatchSelectWidth,\n prefix,\n readOnly,\n required,\n behaviorVariant = 'default',\n selectedIndicatorVariant = 'check',\n shadow,\n showSearch,\n size = 'middle',\n style,\n suffixIcon,\n suffixIconProps,\n tokenSeparators,\n value,\n variant,\n virtual,\n }) => {\n const { isDarkMode } = useThemeMode();\n const resolvedVariant = variant ?? (isDarkMode ? 'filled' : 'outlined');\n const isMultiple = mode === 'multiple' || mode === 'tags';\n const isItemAligned = behaviorVariant === 'item-aligned';\n\n const [uncontrolledValue, setUncontrolledValue] = useState<any>(() => {\n if (defaultValue !== undefined) return defaultValue;\n return isMultiple ? [] : null;\n });\n\n const normalizeValue = useCallback(\n (nextValue: any) => {\n if (isMultiple) {\n if (Array.isArray(nextValue)) return nextValue;\n if (nextValue === null || nextValue === undefined) return [];\n return [nextValue];\n }\n if (Array.isArray(nextValue)) return nextValue[0] ?? null;\n return nextValue === undefined ? null : nextValue;\n },\n [isMultiple],\n );\n\n const mergedValue = value !== undefined ? value : uncontrolledValue;\n const normalizedValue = useMemo(\n () => normalizeValue(mergedValue),\n [mergedValue, normalizeValue],\n );\n const valueArray = useMemo(\n () =>\n isMultiple\n ? (normalizedValue as any[])\n : isValueEmpty(normalizedValue)\n ? []\n : [normalizedValue],\n [isMultiple, normalizedValue],\n );\n\n const [extraOptions, setExtraOptions] = useState<LobeSelectOption<any>[]>([]);\n\n useEffect(() => {\n if (mode !== 'tags' && extraOptions.length > 0) {\n setExtraOptions([]);\n }\n }, [mode, extraOptions.length]);\n\n const { resolvedOptions, optionMap } = useMemo(() => {\n const baseOptions = options ?? [];\n const optionValueMap = new Map<any, LobeSelectOption<any>>();\n\n const addOption = (item: LobeSelectOption<any>) => {\n if (!optionValueMap.has(item.value)) {\n optionValueMap.set(item.value, item);\n }\n };\n\n const walkOptions = (items: LobeSelectOptions) => {\n items.forEach((item) => {\n if (isGroupOption(item)) {\n item.options.forEach(addOption);\n } else {\n addOption(item);\n }\n });\n };\n\n walkOptions(baseOptions);\n\n const filteredExtraOptions = extraOptions.filter((item) => !optionValueMap.has(item.value));\n filteredExtraOptions.forEach(addOption);\n\n const mergedOptions: LobeSelectOptions = [...baseOptions, ...filteredExtraOptions];\n\n const missingValueOptions: LobeSelectOption<any>[] = valueArray\n .filter((val) => !optionValueMap.has(val))\n .map((val) => ({\n label: String(val),\n value: val,\n }));\n missingValueOptions.forEach(addOption);\n\n return {\n optionMap: optionValueMap,\n resolvedOptions: missingValueOptions.length\n ? [...mergedOptions, ...missingValueOptions]\n : mergedOptions,\n };\n }, [extraOptions, options, valueArray]);\n\n const [uncontrolledOpen, setUncontrolledOpen] = useState(Boolean(defaultOpen));\n\n useEffect(() => {\n if (open !== undefined) {\n setUncontrolledOpen(open);\n }\n }, [open]);\n\n const mergedOpen = open ?? uncontrolledOpen;\n\n const handleOpenChange = useCallback(\n (nextOpen: boolean) => {\n onOpenChange?.(nextOpen);\n if (open === undefined) {\n setUncontrolledOpen(nextOpen);\n }\n },\n [onOpenChange, open],\n );\n\n const [searchValue, setSearchValue] = useState('');\n const shouldShowSearch = Boolean(showSearch || mode === 'tags');\n\n useEffect(() => {\n if (!mergedOpen) setSearchValue('');\n }, [mergedOpen]);\n\n const getOption = useCallback(\n (optionValue: any): LobeSelectOption<any> => {\n const matched = optionMap.get(optionValue);\n if (matched) return matched;\n if (optionValue && typeof optionValue === 'object' && 'label' in optionValue) {\n return {\n label: (optionValue as any).label,\n value: optionValue,\n };\n }\n return {\n label: String(optionValue),\n value: optionValue,\n };\n },\n [optionMap],\n );\n\n const previousValueRef = useRef<any>(normalizedValue);\n\n useEffect(() => {\n previousValueRef.current = normalizedValue;\n }, [normalizedValue]);\n\n const handleValueChange = useCallback(\n (nextValue: any) => {\n const normalizedNextValue = normalizeValue(nextValue);\n const previousValue = previousValueRef.current;\n\n if (isMultiple) {\n const prevValues = Array.isArray(previousValue) ? previousValue : [];\n const nextValues = Array.isArray(normalizedNextValue) ? normalizedNextValue : [];\n const addedValues = nextValues.filter(\n (val) => !prevValues.some((prev) => Object.is(prev, val)),\n );\n\n addedValues.forEach((val) => {\n onSelect?.(val, getOption(val));\n });\n\n if (value === undefined) {\n setUncontrolledValue(nextValues);\n }\n onChange?.(\n nextValues,\n nextValues.map((val) => getOption(val)),\n );\n } else {\n if (\n !isValueEmpty(normalizedNextValue) &&\n !Object.is(previousValue, normalizedNextValue)\n ) {\n onSelect?.(normalizedNextValue, getOption(normalizedNextValue));\n }\n if (value === undefined) {\n setUncontrolledValue(normalizedNextValue);\n }\n onChange?.(\n normalizedNextValue,\n isValueEmpty(normalizedNextValue) ? undefined : getOption(normalizedNextValue),\n );\n }\n\n previousValueRef.current = normalizedNextValue;\n },\n [getOption, isMultiple, normalizeValue, onChange, onSelect, value],\n );\n\n const appendTagValues = useCallback(\n (rawValues: string[]) => {\n const valuesToAdd = rawValues.map((val) => val.trim()).filter(Boolean);\n if (!valuesToAdd.length) return;\n\n const nextValues = [...valueArray];\n const newOptionValues = valuesToAdd.filter((val) => !optionMap.has(val));\n\n if (newOptionValues.length > 0) {\n setExtraOptions((prev) => {\n const existingValues = new Set(prev.map((item) => item.value));\n const merged = [...prev];\n newOptionValues.forEach((val) => {\n if (!existingValues.has(val)) {\n merged.push({ label: val, value: val });\n }\n });\n return merged;\n });\n }\n\n valuesToAdd.forEach((val) => {\n if (!nextValues.some((item) => Object.is(item, val))) {\n nextValues.push(val);\n }\n });\n\n if (nextValues.length !== valueArray.length) {\n handleValueChange(nextValues);\n }\n },\n [handleValueChange, optionMap, valueArray],\n );\n\n const handleSearchChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const nextValue = event.target.value;\n if (mode === 'tags') {\n const parts = splitBySeparators(nextValue, tokenSeparators);\n if (parts.length > 1) {\n const pending = parts.pop() ?? '';\n appendTagValues(parts.filter(Boolean));\n setSearchValue(pending);\n return;\n }\n }\n setSearchValue(nextValue);\n },\n [appendTagValues, mode, tokenSeparators],\n );\n\n const handleSearchKeyDown = useCallback(\n (event: KeyboardEvent<HTMLInputElement>) => {\n event.stopPropagation();\n\n if (event.key === 'Escape') {\n handleOpenChange(false);\n return;\n }\n\n if (mode !== 'tags') return;\n\n if (event.key === 'Enter') {\n event.preventDefault();\n event.stopPropagation();\n appendTagValues([searchValue]);\n setSearchValue('');\n return;\n }\n\n if (tokenSeparators?.includes(event.key)) {\n event.preventDefault();\n event.stopPropagation();\n appendTagValues([searchValue]);\n setSearchValue('');\n }\n },\n [appendTagValues, handleOpenChange, mode, searchValue, tokenSeparators],\n );\n\n const filteredOptions = useMemo(() => {\n if (!shouldShowSearch || !searchValue.trim()) return resolvedOptions;\n const query = searchValue.trim().toLowerCase();\n\n const filterItems = (items: LobeSelectOptions): LobeSelectOptions => {\n const filtered = items\n .map((item) => {\n if (isGroupOption(item)) {\n const groupItems = item.options.filter((option) =>\n getOptionSearchText(option).toLowerCase().includes(query),\n );\n if (!groupItems.length) return null;\n return { ...item, options: groupItems };\n }\n return getOptionSearchText(item).toLowerCase().includes(query) ? item : null;\n })\n .filter(Boolean) as LobeSelectOptions;\n\n return filtered;\n };\n\n return filterItems(resolvedOptions);\n }, [resolvedOptions, searchValue, shouldShowSearch]);\n\n const renderValue = useCallback(\n (currentValue: any) => {\n const resolved = normalizeValue(currentValue);\n const placeholderNode =\n placeholder === undefined ? null : (\n <span className={styles.valueText}>{placeholder}</span>\n );\n\n if (isMultiple) {\n const values = Array.isArray(resolved) ? resolved : [];\n if (values.length === 0) return placeholderNode;\n return (\n <span className={styles.tags}>\n {values.map((val, index) => {\n const option = getOption(val);\n const content = labelRender ? labelRender(option) : (option.label ?? String(val));\n return (\n <span className={styles.tag} key={`${String(val)}-${index}`}>\n {content}\n </span>\n );\n })}\n </span>\n );\n }\n\n if (isValueEmpty(resolved)) return placeholderNode;\n const option = getOption(resolved);\n const content = labelRender ? labelRender(option) : (option.label ?? String(resolved));\n return <span className={styles.valueText}>{content}</span>;\n },\n [getOption, isMultiple, labelRender, normalizeValue, placeholder],\n );\n\n const hasValue = isMultiple ? valueArray.length > 0 : !isValueEmpty(normalizedValue);\n const showClear = Boolean(allowClear && hasValue && !disabled && !readOnly);\n\n const handleClear = useCallback(\n (event: MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n handleValueChange(isMultiple ? [] : null);\n },\n [handleValueChange, isMultiple],\n );\n\n const prefixNode = useMemo(() => {\n if (prefix === undefined || prefix === null) return null;\n if (isValidElement(prefix) || typeof prefix === 'string' || typeof prefix === 'number') {\n return prefix;\n }\n return <Icon icon={prefix as any} size={'small'} />;\n }, [prefix]);\n\n const suffixIconNode = useMemo(() => {\n if (loading) {\n return <Icon icon={Loader2} size={'small'} spin />;\n }\n if (suffixIcon === null) return null;\n if (\n isValidElement(suffixIcon) ||\n typeof suffixIcon === 'string' ||\n typeof suffixIcon === 'number'\n ) {\n return suffixIcon;\n }\n return (\n <Icon\n icon={(suffixIcon as any) || ChevronDown}\n size={'small'}\n {...suffixIconProps}\n style={{\n pointerEvents: 'none',\n ...suffixIconProps?.style,\n }}\n />\n );\n }, [loading, suffixIcon, suffixIconProps]);\n\n const popupStyle = useMemo(() => {\n const maxHeight = isItemAligned ? '80vh' : '450px';\n const baseStyle: React.CSSProperties = {\n maxHeight,\n maxWidth: 'var(--available-width)',\n minWidth: 'var(--anchor-width)',\n ['--lobe-select-popup-max-height' as any]: maxHeight,\n };\n\n if (popupMatchSelectWidth === undefined || popupMatchSelectWidth === true) {\n return baseStyle;\n }\n if (typeof popupMatchSelectWidth === 'number') {\n return {\n ...baseStyle,\n minWidth: popupMatchSelectWidth,\n width: popupMatchSelectWidth,\n };\n }\n return {\n ...baseStyle,\n minWidth: 'max-content',\n };\n }, [isItemAligned, popupMatchSelectWidth]);\n\n const triggerClassName = cx(\n triggerVariants({ shadow, size, variant: resolvedVariant }),\n className,\n classNames?.root,\n classNames?.trigger,\n );\n\n const portalContainer = usePortalContainer(LOBE_SELECT_CONTAINER_ATTR);\n const virtualListStyle = useMemo(() => {\n if (!virtual) return undefined;\n const rowCount = countVirtualItems(filteredOptions);\n const maxVisibleRows = 6;\n const estimatedRowHeight =\n listItemHeight ?? (size === 'large' ? 40 : size === 'small' ? 28 : 32);\n const visibleRows = Math.min(Math.max(rowCount, 1), maxVisibleRows);\n const estimatedHeight = visibleRows * estimatedRowHeight + 8;\n\n return {\n height: `min(${estimatedHeight}px, var(--lobe-select-available-height, var(--available-height)))`,\n };\n }, [filteredOptions, listItemHeight, size, virtual]);\n\n const itemTextClassName = cx(\n optionRender ? menuStyles.itemContent : menuStyles.label,\n styles.itemText,\n classNames?.itemText,\n );\n\n const isBoldIndicator = selectedIndicatorVariant === 'bold';\n let optionIndex = 0;\n const renderOptions = (items: LobeSelectOptions) =>\n items.map((item, index) => {\n if (isGroupOption(item)) {\n return (\n <Select.Group className={cx(styles.group, classNames?.group)} key={`group-${index}`}>\n <Select.GroupLabel\n className={cx(menuStyles.groupLabel, styles.groupLabel, classNames?.groupLabel)}\n >\n {item.label}\n </Select.GroupLabel>\n {item.options.map((option) => {\n const currentIndex = optionIndex++;\n return (\n <Select.Item\n className={cx(\n menuStyles.item,\n styles.item,\n isBoldIndicator && styles.itemBoldSelected,\n classNames?.item,\n classNames?.option,\n option.className,\n )}\n disabled={option.disabled}\n key={`${String(option.value)}-${currentIndex}`}\n label={getOptionSearchText(option)}\n style={{\n minHeight: listItemHeight,\n ...option.style,\n }}\n value={option.value}\n >\n <Select.ItemText className={itemTextClassName}>\n {optionRender ? optionRender(option, { index: currentIndex }) : option.label}\n </Select.ItemText>\n {!isBoldIndicator && (\n <Select.ItemIndicator\n className={cx(styles.itemIndicator, classNames?.itemIndicator)}\n >\n <Icon icon={Check} size={'small'} />\n </Select.ItemIndicator>\n )}\n </Select.Item>\n );\n })}\n </Select.Group>\n );\n }\n\n const currentIndex = optionIndex++;\n return (\n <Select.Item\n className={cx(\n menuStyles.item,\n styles.item,\n isBoldIndicator && styles.itemBoldSelected,\n classNames?.item,\n classNames?.option,\n item.className,\n )}\n disabled={item.disabled}\n key={`${String(item.value)}-${currentIndex}`}\n label={getOptionSearchText(item)}\n style={{\n minHeight: listItemHeight,\n ...item.style,\n }}\n value={item.value}\n >\n <Select.ItemText className={itemTextClassName}>\n {optionRender ? optionRender(item, { index: currentIndex }) : item.label}\n </Select.ItemText>\n {!isBoldIndicator && (\n <Select.ItemIndicator className={cx(styles.itemIndicator, classNames?.itemIndicator)}>\n <Icon icon={Check} size={'small'} />\n </Select.ItemIndicator>\n )}\n </Select.Item>\n );\n });\n\n return (\n <Select.Root\n disabled={disabled}\n id={id}\n modal={isItemAligned}\n multiple={isMultiple}\n name={name}\n onOpenChange={handleOpenChange}\n onValueChange={handleValueChange}\n open={mergedOpen}\n readOnly={readOnly}\n required={required}\n value={normalizedValue}\n >\n <Select.Trigger\n autoFocus={autoFocus}\n className={triggerClassName}\n disabled={disabled}\n style={style}\n >\n {prefixNode !== null && prefixNode !== undefined && (\n <span className={cx(styles.prefix, classNames?.prefix)}>{prefixNode}</span>\n )}\n <Select.Value className={cx(styles.value, classNames?.value)}>{renderValue}</Select.Value>\n <span className={cx(styles.suffix, classNames?.suffix)}>\n {showClear && (\n <span\n className={cx(styles.clear, classNames?.clear)}\n data-role=\"lobe-select-clear\"\n onClick={handleClear}\n >\n <Icon icon={X} size={'small'} />\n </span>\n )}\n {suffixIconNode !== null && suffixIconNode !== undefined && (\n <Select.Icon className={cx(styles.icon, classNames?.icon)}>\n {suffixIconNode}\n </Select.Icon>\n )}\n </span>\n </Select.Trigger>\n\n <Select.Portal container={portalContainer}>\n <Select.Positioner\n align=\"start\"\n alignItemWithTrigger={isItemAligned}\n className={styles.positioner}\n side=\"bottom\"\n sideOffset={6}\n >\n <Select.Popup\n className={cx(\n menuStyles.popup,\n styles.popup,\n popupClassName,\n classNames?.popup,\n classNames?.dropdown,\n )}\n style={popupStyle}\n >\n {shouldShowSearch && (\n <div className={cx(styles.search, classNames?.search)}>\n <input\n className={styles.searchInput}\n onChange={handleSearchChange}\n onKeyDown={handleSearchKeyDown}\n placeholder={typeof placeholder === 'string' ? placeholder : undefined}\n value={searchValue}\n />\n </div>\n )}\n {(() => {\n const content =\n filteredOptions.length > 0 ? (\n renderOptions(filteredOptions)\n ) : (\n <div\n className={cx(\n menuStyles.item,\n menuStyles.empty,\n styles.empty,\n classNames?.empty,\n )}\n >\n No data\n </div>\n );\n\n if (!virtual || filteredOptions.length === 0) {\n return (\n <Select.List\n className={cx(styles.list, classNames?.list)}\n data-virtual={virtual || undefined}\n >\n {content}\n </Select.List>\n );\n }\n\n return (\n <Select.List\n className={cx(styles.list, classNames?.list)}\n data-virtual={virtual || undefined}\n style={virtualListStyle}\n >\n <Virtualizer itemSize={listItemHeight}>{content}</Virtualizer>\n </Select.List>\n );\n })()}\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n );\n },\n);\n\nLobeSelect.displayName = 'LobeSelect';\n\nexport default LobeSelect;\n"],"mappings":";;;;;;;;;;;;;;;AAsBA,MAAM,iBACJ,WAEA,QAAS,OAAwC,QAAQ;AAE3D,MAAM,uBAA+B,WAAoC;AACvE,KAAI,OAAO,OAAO,UAAU,YAAY,OAAO,OAAO,UAAU,SAC9D,QAAO,OAAO,OAAO,MAAM;AAE7B,KAAI,OAAO,OAAO,UAAU,YAAY,OAAO,OAAO,UAAU,SAC9D,QAAO,OAAO,OAAO,MAAM;AAE7B,KAAI,OAAO,MAAO,QAAO,OAAO;AAChC,QAAO;;AAGT,MAAM,gBAAgB,UAAkB,MAAM,WAAW,uBAAuB,OAAO;AAEvF,MAAM,qBAAqB,OAAe,eAA0B;AAClE,KAAI,CAAC,cAAc,WAAW,WAAW,EAAG,QAAO,CAAC,MAAM;CAC1D,MAAM,UAAU,WAAW,IAAI,aAAa,CAAC,KAAK,IAAI;AACtD,QAAO,MAAM,MAAM,IAAI,OAAO,SAAS,IAAI,CAAC;;AAG9C,MAAM,qBAAqB,UACzB,MAAM,QAAQ,OAAO,SAAS;AAC5B,KAAI,cAAc,KAAK,CACrB,QAAO,QAAQ,KAAK,QAAQ,SAAS;AAEvC,QAAO,QAAQ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