@lobehub/ui 4.24.0 → 4.25.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 (151) 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/ConfigProvider/index.d.mts +2 -2
  13. package/es/ContextMenu/ContextMenuHost.d.mts +3 -3
  14. package/es/CopyButton/CopyButton.d.mts +2 -2
  15. package/es/DatePicker/DatePicker.d.mts +2 -2
  16. package/es/DraggablePanel/components/DraggablePanelBody.d.mts +2 -2
  17. package/es/DraggablePanel/components/DraggablePanelContainer.d.mts +2 -2
  18. package/es/DraggablePanel/components/DraggablePanelFooter.d.mts +2 -2
  19. package/es/DraggablePanel/components/DraggablePanelHeader.d.mts +2 -2
  20. package/es/DraggableSideNav/DraggableSideNav.d.mts +2 -2
  21. package/es/Drawer/Drawer.d.mts +2 -2
  22. package/es/Dropdown/Dropdown.d.mts +2 -2
  23. package/es/DropdownMenu/DropdownMenu.d.mts +2 -2
  24. package/es/DropdownMenu/atoms.d.mts +16 -16
  25. package/es/EditableText/EditableText.d.mts +2 -2
  26. package/es/EditorSlashMenu/atoms.d.mts +12 -12
  27. package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
  28. package/es/Flex/FlexBasic.d.mts +2 -2
  29. package/es/FontLoader/index.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/GuideCard/GuideCard.d.mts +2 -2
  36. package/es/Header/Header.d.mts +2 -2
  37. package/es/Highlighter/Highlighter.d.mts +2 -2
  38. package/es/Highlighter/SyntaxHighlighter/index.d.mts +2 -2
  39. package/es/Hotkey/Hotkey.d.mts +2 -2
  40. package/es/HotkeyInput/HotkeyInput.d.mts +2 -2
  41. package/es/Icon/Icon.d.mts +2 -2
  42. package/es/Icon/components/IconProvider.d.mts +3 -3
  43. package/es/Image/PreviewGroup.d.mts +2 -2
  44. package/es/ImageSelect/ImageSelect.d.mts +2 -2
  45. package/es/Input/Input.d.mts +2 -2
  46. package/es/Input/InputNumber.d.mts +2 -2
  47. package/es/Input/InputOPT.d.mts +2 -2
  48. package/es/Input/InputPassword.d.mts +2 -2
  49. package/es/Input/TextArea.d.mts +2 -2
  50. package/es/Layout/components/LayoutFooter.d.mts +2 -2
  51. package/es/Layout/components/LayoutHeader.d.mts +2 -2
  52. package/es/Layout/components/LayoutMain.d.mts +2 -2
  53. package/es/Layout/components/LayoutSidebar.d.mts +2 -2
  54. package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
  55. package/es/Layout/components/LayoutToc.d.mts +2 -2
  56. package/es/List/ListItem/index.d.mts +2 -2
  57. package/es/LobeSelect/LobeSelect.d.mts +2 -2
  58. package/es/LobeSelect/atoms.d.mts +19 -19
  59. package/es/LobeSelect/style.mjs +18 -5
  60. package/es/LobeSelect/style.mjs.map +1 -1
  61. package/es/LobeSwitch/LobeSwitch.d.mts +8 -0
  62. package/es/LobeSwitch/LobeSwitch.mjs +68 -0
  63. package/es/LobeSwitch/LobeSwitch.mjs.map +1 -0
  64. package/es/LobeSwitch/atoms.d.mts +56 -0
  65. package/es/LobeSwitch/atoms.mjs +132 -0
  66. package/es/LobeSwitch/atoms.mjs.map +1 -0
  67. package/es/LobeSwitch/index.d.mts +5 -0
  68. package/es/LobeSwitch/index.d.ts +1 -0
  69. package/es/LobeSwitch/index.js +1 -0
  70. package/es/LobeSwitch/index.mjs +5 -0
  71. package/es/LobeSwitch/style.d.mts +19 -0
  72. package/es/LobeSwitch/style.mjs +146 -0
  73. package/es/LobeSwitch/style.mjs.map +1 -0
  74. package/es/LobeSwitch/type.d.mts +131 -0
  75. package/es/Markdown/Markdown.d.mts +2 -2
  76. package/es/Markdown/Typography.d.mts +2 -2
  77. package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
  78. package/es/MaskShadow/MaskShadow.d.mts +2 -2
  79. package/es/Menu/Menu.d.mts +2 -2
  80. package/es/Menu/sharedStyle.mjs +30 -54
  81. package/es/Menu/sharedStyle.mjs.map +1 -1
  82. package/es/Mermaid/Mermaid.d.mts +2 -2
  83. package/es/Mermaid/SyntaxMermaid/index.d.mts +2 -2
  84. package/es/Modal/Modal.d.mts +2 -2
  85. package/es/Modal/ModalProvider.d.mts +2 -2
  86. package/es/Modal/imperative.d.mts +2 -2
  87. package/es/MotionProvider/index.d.mts +2 -2
  88. package/es/Popover/ArrowIcon.d.mts +2 -2
  89. package/es/Popover/atoms.d.mts +9 -9
  90. package/es/Popover/context.d.mts +2 -2
  91. package/es/SearchBar/SearchBar.d.mts +2 -2
  92. package/es/Segmented/Segmented.d.mts +2 -2
  93. package/es/Select/Select.d.mts +2 -2
  94. package/es/SideNav/SideNav.d.mts +2 -2
  95. package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
  96. package/es/SortableList/components/DragHandle.d.mts +2 -2
  97. package/es/SortableList/components/SortableItem.d.mts +2 -2
  98. package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
  99. package/es/Toast/imperative.d.mts +3 -3
  100. package/es/Toc/Toc.d.mts +2 -2
  101. package/es/Video/index.d.mts +2 -2
  102. package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
  103. package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +2 -2
  104. package/es/awesome/Features/Features.d.mts +2 -2
  105. package/es/awesome/Giscus/Giscus.d.mts +2 -2
  106. package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
  107. package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
  108. package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
  109. package/es/awesome/Hero/Hero.d.mts +2 -2
  110. package/es/awesome/Spline/Spine.d.mts +2 -2
  111. package/es/awesome/Spotlight/Spotlight.d.mts +2 -2
  112. package/es/awesome/SpotlightCard/SpotlightCard.d.mts +2 -2
  113. package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +2 -2
  114. package/es/brand/LobeChat/index.d.mts +2 -2
  115. package/es/brand/LobeHub/index.d.mts +2 -2
  116. package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
  117. package/es/brand/LogoThree/index.d.mts +2 -2
  118. package/es/chat/BackBottom/BackBottom.d.mts +2 -2
  119. package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +2 -2
  120. package/es/chat/ChatItem/ChatItem.d.mts +2 -2
  121. package/es/chat/ChatList/ChatList.d.mts +2 -2
  122. package/es/chat/EditableMessage/EditableMessage.d.mts +2 -2
  123. package/es/chat/EditableMessageList/EditableMessageList.d.mts +2 -2
  124. package/es/chat/MessageInput/MessageInput.d.mts +2 -2
  125. package/es/chat/MessageModal/MessageModal.d.mts +2 -2
  126. package/es/color/ColorScales/index.d.mts +2 -2
  127. package/es/color/CssVar/index.d.mts +2 -2
  128. package/es/i18n/context.d.mts +2 -2
  129. package/es/icons/lucideExtra/BotPromptIcon.d.mts +2 -2
  130. package/es/icons/lucideExtra/CreateBotIcon.d.mts +3 -3
  131. package/es/icons/lucideExtra/DiscordIcon.d.mts +2 -2
  132. package/es/icons/lucideExtra/GlobeOffIcon.d.mts +2 -2
  133. package/es/icons/lucideExtra/GroupBotIcon.d.mts +3 -3
  134. package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
  135. package/es/icons/lucideExtra/LeftClickIcon.d.mts +2 -2
  136. package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +3 -3
  137. package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
  138. package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
  139. package/es/icons/lucideExtra/RightClickIcon.d.mts +2 -2
  140. package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +3 -3
  141. package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +3 -3
  142. package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +3 -3
  143. package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
  144. package/es/index.d.mts +7 -2
  145. package/es/index.mjs +5 -2
  146. package/es/mdx/Mdx/index.d.mts +2 -2
  147. package/es/mobile/ChatHeader/ChatHeaderTitle.d.mts +2 -2
  148. package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +2 -2
  149. package/es/mobile/TabBar/TabBar.d.mts +2 -2
  150. package/es/storybook/StoryBook/index.d.mts +2 -2
  151. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  import { GuideCardProps } from "./type.mjs";
2
- import * as react148 from "react";
2
+ import * as react138 from "react";
3
3
 
4
4
  //#region src/GuideCard/GuideCard.d.ts
5
- declare const GuideCard: react148.NamedExoticComponent<GuideCardProps>;
5
+ declare const GuideCard: react138.NamedExoticComponent<GuideCardProps>;
6
6
  //#endregion
7
7
  export { GuideCard };
8
8
  //# sourceMappingURL=GuideCard.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { HeaderProps } from "./type.mjs";
2
- import * as react26 from "react";
2
+ import * as react49 from "react";
3
3
 
4
4
  //#region src/Header/Header.d.ts
5
- declare const Header: react26.NamedExoticComponent<HeaderProps>;
5
+ declare const Header: react49.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 react23 from "react";
2
+ import * as react37 from "react";
3
3
 
4
4
  //#region src/Highlighter/Highlighter.d.ts
5
- declare const Highlighter: react23.NamedExoticComponent<HighlighterProps>;
5
+ declare const Highlighter: react37.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 react24 from "react";
2
+ import * as react38 from "react";
3
3
 
4
4
  //#region src/Highlighter/SyntaxHighlighter/index.d.ts
5
- declare const SyntaxHighlighter: react24.NamedExoticComponent<SyntaxHighlighterProps>;
5
+ declare const SyntaxHighlighter: react38.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 react25 from "react";
2
+ import * as react61 from "react";
3
3
 
4
4
  //#region src/Hotkey/Hotkey.d.ts
5
- declare const Hotkey: react25.NamedExoticComponent<HotkeyProps>;
5
+ declare const Hotkey: react61.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 react32 from "react";
2
+ import * as react0 from "react";
3
3
 
4
4
  //#region src/HotkeyInput/HotkeyInput.d.ts
5
- declare const HotkeyInput: react32.NamedExoticComponent<HotkeyInputProps>;
5
+ declare const HotkeyInput: react0.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 react15 from "react";
2
+ import * as react77 from "react";
3
3
 
4
4
  //#region src/Icon/Icon.d.ts
5
- declare const Icon: react15.NamedExoticComponent<IconProps>;
5
+ declare const Icon: react77.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 react13 from "react";
2
+ import * as react75 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: react13.Context<IconContentConfig>;
8
- declare const IconProvider: react13.NamedExoticComponent<{
7
+ declare const IconContext: react75.Context<IconContentConfig>;
8
+ declare const IconProvider: react75.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 react12 from "react";
2
+ import * as react67 from "react";
3
3
 
4
4
  //#region src/Image/PreviewGroup.d.ts
5
- declare const PreviewGroup: react12.NamedExoticComponent<PreviewGroupProps>;
5
+ declare const PreviewGroup: react67.NamedExoticComponent<PreviewGroupProps>;
6
6
  //#endregion
7
7
  export { PreviewGroup };
8
8
  //# sourceMappingURL=PreviewGroup.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { ImageSelectProps } from "./type.mjs";
2
- import * as react123 from "react";
2
+ import * as react91 from "react";
3
3
 
4
4
  //#region src/ImageSelect/ImageSelect.d.ts
5
- declare const ImageSelect: react123.NamedExoticComponent<ImageSelectProps>;
5
+ declare const ImageSelect: react91.NamedExoticComponent<ImageSelectProps>;
6
6
  //#endregion
7
7
  export { ImageSelect };
8
8
  //# sourceMappingURL=ImageSelect.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { InputProps } from "./type.mjs";
2
- import * as react151 from "react";
2
+ import * as react139 from "react";
3
3
 
4
4
  //#region src/Input/Input.d.ts
5
- declare const Input: react151.NamedExoticComponent<InputProps>;
5
+ declare const Input: react139.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 react149 from "react";
2
+ import * as react140 from "react";
3
3
 
4
4
  //#region src/Input/InputNumber.d.ts
5
- declare const InputNumber: react149.NamedExoticComponent<InputNumberProps>;
5
+ declare const InputNumber: react140.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 react152 from "react";
2
+ import * as react141 from "react";
3
3
 
4
4
  //#region src/Input/InputOPT.d.ts
5
- declare const InputOPT: react152.NamedExoticComponent<InputOPTProps>;
5
+ declare const InputOPT: react141.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 react150 from "react";
2
+ import * as react142 from "react";
3
3
 
4
4
  //#region src/Input/InputPassword.d.ts
5
- declare const InputPassword: react150.NamedExoticComponent<InputPasswordProps>;
5
+ declare const InputPassword: react142.NamedExoticComponent<InputPasswordProps>;
6
6
  //#endregion
7
7
  export { InputPassword };
8
8
  //# sourceMappingURL=InputPassword.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { TextAreaProps } from "./type.mjs";
2
- import * as react153 from "react";
2
+ import * as react143 from "react";
3
3
 
4
4
  //#region src/Input/TextArea.d.ts
5
- declare const TextArea: react153.NamedExoticComponent<TextAreaProps>;
5
+ declare const TextArea: react143.NamedExoticComponent<TextAreaProps>;
6
6
  //#endregion
7
7
  export { TextArea };
8
8
  //# sourceMappingURL=TextArea.d.mts.map
@@ -1,9 +1,9 @@
1
1
  import { DivProps } from "../../types/index.mjs";
2
2
  import "../../index.mjs";
3
- import * as react16 from "react";
3
+ import * as react69 from "react";
4
4
 
5
5
  //#region src/Layout/components/LayoutFooter.d.ts
6
- declare const LayoutFooter: react16.NamedExoticComponent<DivProps>;
6
+ declare const LayoutFooter: react69.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 react17 from "react";
2
+ import * as react70 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutHeader.d.ts
5
- declare const LayoutHeader: react17.NamedExoticComponent<LayoutHeaderProps>;
5
+ declare const LayoutHeader: react70.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 react18 from "react";
3
+ import * as react71 from "react";
4
4
 
5
5
  //#region src/Layout/components/LayoutMain.d.ts
6
- declare const LayoutMain: react18.NamedExoticComponent<DivProps>;
6
+ declare const LayoutMain: react71.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 react19 from "react";
2
+ import * as react72 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutSidebar.d.ts
5
- declare const LayoutSidebar: react19.NamedExoticComponent<LayoutSidebarProps>;
5
+ declare const LayoutSidebar: react72.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 react20 from "react";
2
+ import * as react73 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutSidebarInner.d.ts
5
- declare const LayoutSidebarInner: react20.NamedExoticComponent<LayoutSidebarInnerProps>;
5
+ declare const LayoutSidebarInner: react73.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 react21 from "react";
2
+ import * as react74 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutToc.d.ts
5
- declare const LayoutToc: react21.NamedExoticComponent<LayoutTocProps>;
5
+ declare const LayoutToc: react74.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 react4 from "react";
2
+ import * as react60 from "react";
3
3
 
4
4
  //#region src/List/ListItem/index.d.ts
5
- declare const ListItem: react4.NamedExoticComponent<ListItemProps>;
5
+ declare const ListItem: react60.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 react3 from "react";
2
+ import * as react66 from "react";
3
3
 
4
4
  //#region src/LobeSelect/LobeSelect.d.ts
5
- declare const LobeSelect: react3.NamedExoticComponent<LobeSelectProps<any>>;
5
+ declare const LobeSelect: react66.NamedExoticComponent<LobeSelectProps<any>>;
6
6
  //#endregion
7
7
  export { LobeSelect };
8
8
  //# sourceMappingURL=LobeSelect.d.mts.map
@@ -1,16 +1,16 @@
1
1
  import { LobeSelectSize, LobeSelectVariant } from "./type.mjs";
2
2
  import { LOBE_SELECT_CONTAINER_ATTR } from "./constants.mjs";
3
- import * as react0 from "react";
3
+ import * as react62 from "react";
4
4
  import { ComponentProps, ComponentPropsWithRef } from "react";
5
- import * as react_jsx_runtime0 from "react/jsx-runtime";
5
+ import * as react_jsx_runtime29 from "react/jsx-runtime";
6
6
  import * as _base_ui_react_select0 from "@base-ui/react/select";
7
7
  import { Select } from "@base-ui/react/select";
8
8
  import * as node_modules__base_ui_react_esm_separator_Separator0 from "node_modules/@base-ui/react/esm/separator/Separator";
9
9
 
10
10
  //#region src/LobeSelect/atoms.d.ts
11
11
  declare const LobeSelectRoot: typeof Select.Root;
12
- declare const LobeSelectBackdrop: react0.ForwardRefExoticComponent<_base_ui_react_select0.SelectBackdropProps & react0.RefAttributes<HTMLDivElement>>;
13
- declare const LobeSelectSeparator: react0.ForwardRefExoticComponent<node_modules__base_ui_react_esm_separator_Separator0.SeparatorProps & react0.RefAttributes<HTMLDivElement>>;
12
+ declare const LobeSelectBackdrop: react62.ForwardRefExoticComponent<_base_ui_react_select0.SelectBackdropProps & react62.RefAttributes<HTMLDivElement>>;
13
+ declare const LobeSelectSeparator: react62.ForwardRefExoticComponent<node_modules__base_ui_react_esm_separator_Separator0.SeparatorProps & react62.RefAttributes<HTMLDivElement>>;
14
14
  type LobeSelectTriggerProps = Omit<ComponentPropsWithRef<typeof Select.Trigger>, 'children' | 'render'> & {
15
15
  children: ComponentProps<typeof Select.Trigger>['children'];
16
16
  shadow?: boolean;
@@ -27,7 +27,7 @@ declare const LobeSelectTrigger: {
27
27
  variant,
28
28
  ref: refProp,
29
29
  ...rest
30
- }: LobeSelectTriggerProps): react_jsx_runtime0.JSX.Element;
30
+ }: LobeSelectTriggerProps): react_jsx_runtime29.JSX.Element;
31
31
  displayName: string;
32
32
  };
33
33
  type LobeSelectIconProps = ComponentProps<typeof Select.Icon>;
@@ -35,7 +35,7 @@ declare const LobeSelectIcon: {
35
35
  ({
36
36
  className,
37
37
  ...rest
38
- }: LobeSelectIconProps): react_jsx_runtime0.JSX.Element;
38
+ }: LobeSelectIconProps): react_jsx_runtime29.JSX.Element;
39
39
  displayName: string;
40
40
  };
41
41
  type LobeSelectValueProps = ComponentProps<typeof Select.Value>;
@@ -43,7 +43,7 @@ declare const LobeSelectValue: {
43
43
  ({
44
44
  className,
45
45
  ...rest
46
- }: LobeSelectValueProps): react_jsx_runtime0.JSX.Element;
46
+ }: LobeSelectValueProps): react_jsx_runtime29.JSX.Element;
47
47
  displayName: string;
48
48
  };
49
49
  type LobeSelectPortalProps = ComponentProps<typeof Select.Portal> & {
@@ -56,7 +56,7 @@ declare const LobeSelectPortal: {
56
56
  ({
57
57
  container,
58
58
  ...rest
59
- }: LobeSelectPortalProps): react_jsx_runtime0.JSX.Element;
59
+ }: LobeSelectPortalProps): react_jsx_runtime29.JSX.Element;
60
60
  displayName: string;
61
61
  };
62
62
  type LobeSelectPositionerProps = ComponentProps<typeof Select.Positioner>;
@@ -68,7 +68,7 @@ declare const LobeSelectPositioner: {
68
68
  side,
69
69
  sideOffset,
70
70
  ...rest
71
- }: LobeSelectPositionerProps): react_jsx_runtime0.JSX.Element;
71
+ }: LobeSelectPositionerProps): react_jsx_runtime29.JSX.Element;
72
72
  displayName: string;
73
73
  };
74
74
  type LobeSelectPopupProps = ComponentProps<typeof Select.Popup>;
@@ -76,7 +76,7 @@ declare const LobeSelectPopup: {
76
76
  ({
77
77
  className,
78
78
  ...rest
79
- }: LobeSelectPopupProps): react_jsx_runtime0.JSX.Element;
79
+ }: LobeSelectPopupProps): react_jsx_runtime29.JSX.Element;
80
80
  displayName: string;
81
81
  };
82
82
  type LobeSelectListProps = ComponentProps<typeof Select.List>;
@@ -84,7 +84,7 @@ declare const LobeSelectList: {
84
84
  ({
85
85
  className,
86
86
  ...rest
87
- }: LobeSelectListProps): react_jsx_runtime0.JSX.Element;
87
+ }: LobeSelectListProps): react_jsx_runtime29.JSX.Element;
88
88
  displayName: string;
89
89
  };
90
90
  type LobeSelectItemProps = ComponentProps<typeof Select.Item>;
@@ -92,7 +92,7 @@ declare const LobeSelectItem: {
92
92
  ({
93
93
  className,
94
94
  ...rest
95
- }: LobeSelectItemProps): react_jsx_runtime0.JSX.Element;
95
+ }: LobeSelectItemProps): react_jsx_runtime29.JSX.Element;
96
96
  displayName: string;
97
97
  };
98
98
  type LobeSelectItemTextProps = ComponentProps<typeof Select.ItemText>;
@@ -100,7 +100,7 @@ declare const LobeSelectItemText: {
100
100
  ({
101
101
  className,
102
102
  ...rest
103
- }: LobeSelectItemTextProps): react_jsx_runtime0.JSX.Element;
103
+ }: LobeSelectItemTextProps): react_jsx_runtime29.JSX.Element;
104
104
  displayName: string;
105
105
  };
106
106
  type LobeSelectItemIndicatorProps = ComponentProps<typeof Select.ItemIndicator>;
@@ -108,7 +108,7 @@ declare const LobeSelectItemIndicator: {
108
108
  ({
109
109
  className,
110
110
  ...rest
111
- }: LobeSelectItemIndicatorProps): react_jsx_runtime0.JSX.Element;
111
+ }: LobeSelectItemIndicatorProps): react_jsx_runtime29.JSX.Element;
112
112
  displayName: string;
113
113
  };
114
114
  type LobeSelectGroupProps = ComponentProps<typeof Select.Group>;
@@ -116,7 +116,7 @@ declare const LobeSelectGroup: {
116
116
  ({
117
117
  className,
118
118
  ...rest
119
- }: LobeSelectGroupProps): react_jsx_runtime0.JSX.Element;
119
+ }: LobeSelectGroupProps): react_jsx_runtime29.JSX.Element;
120
120
  displayName: string;
121
121
  };
122
122
  type LobeSelectGroupLabelProps = ComponentProps<typeof Select.GroupLabel>;
@@ -124,7 +124,7 @@ declare const LobeSelectGroupLabel: {
124
124
  ({
125
125
  className,
126
126
  ...rest
127
- }: LobeSelectGroupLabelProps): react_jsx_runtime0.JSX.Element;
127
+ }: LobeSelectGroupLabelProps): react_jsx_runtime29.JSX.Element;
128
128
  displayName: string;
129
129
  };
130
130
  type LobeSelectScrollUpArrowProps = ComponentProps<typeof Select.ScrollUpArrow>;
@@ -132,7 +132,7 @@ declare const LobeSelectScrollUpArrow: {
132
132
  ({
133
133
  className,
134
134
  ...rest
135
- }: LobeSelectScrollUpArrowProps): react_jsx_runtime0.JSX.Element;
135
+ }: LobeSelectScrollUpArrowProps): react_jsx_runtime29.JSX.Element;
136
136
  displayName: string;
137
137
  };
138
138
  type LobeSelectScrollDownArrowProps = ComponentProps<typeof Select.ScrollDownArrow>;
@@ -140,7 +140,7 @@ declare const LobeSelectScrollDownArrow: {
140
140
  ({
141
141
  className,
142
142
  ...rest
143
- }: LobeSelectScrollDownArrowProps): react_jsx_runtime0.JSX.Element;
143
+ }: LobeSelectScrollDownArrowProps): react_jsx_runtime29.JSX.Element;
144
144
  displayName: string;
145
145
  };
146
146
  type LobeSelectArrowProps = ComponentProps<typeof Select.Arrow>;
@@ -148,7 +148,7 @@ declare const LobeSelectArrow: {
148
148
  ({
149
149
  className,
150
150
  ...rest
151
- }: LobeSelectArrowProps): react_jsx_runtime0.JSX.Element;
151
+ }: LobeSelectArrowProps): react_jsx_runtime29.JSX.Element;
152
152
  displayName: string;
153
153
  };
154
154
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { staticStylish } from "../styles/theme/customStylishStatic.mjs";
2
- import { createStaticStyles } from "antd-style";
2
+ import { createStaticStyles, cx } from "antd-style";
3
3
  import { cva } from "class-variance-authority";
4
4
 
5
5
  //#region src/LobeSelect/style.ts
@@ -14,7 +14,9 @@ const styles = createStaticStyles(({ css: css$1, cssVar: cssVar$1 }) => ({
14
14
  height: 100%;
15
15
  }
16
16
  `,
17
- borderless: staticStylish.variantBorderless,
17
+ borderless: cx(staticStylish.variantBorderless, css$1`
18
+ --lobe-select-open-bg: ${cssVar$1.colorFillTertiary};
19
+ `),
18
20
  clear: css$1`
19
21
  display: inline-flex;
20
22
  align-items: center;
@@ -30,7 +32,9 @@ const styles = createStaticStyles(({ css: css$1, cssVar: cssVar$1 }) => ({
30
32
  }
31
33
  `,
32
34
  empty: css$1``,
33
- filled: staticStylish.variantFilled,
35
+ filled: cx(staticStylish.variantFilled, css$1`
36
+ --lobe-select-open-bg: ${cssVar$1.colorFillSecondary};
37
+ `),
34
38
  group: css$1``,
35
39
  groupLabel: css$1``,
36
40
  icon: css$1`
@@ -59,7 +63,9 @@ const styles = createStaticStyles(({ css: css$1, cssVar: cssVar$1 }) => ({
59
63
  max-height: var(--available-height);
60
64
  padding-block: 0;
61
65
  `,
62
- outlined: staticStylish.variantOutlined,
66
+ outlined: cx(staticStylish.variantOutlined, css$1`
67
+ --lobe-select-open-bg: ${cssVar$1.colorFillTertiary};
68
+ `),
63
69
  popup: css$1`
64
70
  transform-origin: var(--transform-origin);
65
71
  box-sizing: border-box;
@@ -69,7 +75,7 @@ const styles = createStaticStyles(({ css: css$1, cssVar: cssVar$1 }) => ({
69
75
 
70
76
  &[data-starting-style],
71
77
  &[data-ending-style] {
72
- transform: scale(0.98);
78
+ transform: scaleY(0.92);
73
79
  opacity: 0;
74
80
  }
75
81
  `,
@@ -175,6 +181,13 @@ const styles = createStaticStyles(({ css: css$1, cssVar: cssVar$1 }) => ({
175
181
 
176
182
  transition: all 150ms ${cssVar$1.motionEaseOut};
177
183
 
184
+ &:not([data-disabled])[data-popup-open],
185
+ &:not([data-disabled])[data-open],
186
+ &:not([data-disabled])[data-state='open'],
187
+ &:not([data-disabled])[aria-expanded='true'] {
188
+ background: var(--lobe-select-open-bg, ${cssVar$1.colorFillTertiary});
189
+ }
190
+
178
191
  &:focus-visible {
179
192
  outline: 2px solid ${cssVar$1.colorPrimaryBorder};
180
193
  outline-offset: 1px;
@@ -1 +1 @@
1
- {"version":3,"file":"style.mjs","names":["lobeStaticStylish","cssVar"],"sources":["../../src/LobeSelect/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nimport { lobeStaticStylish } from '@/styles';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n arrow: css`\n display: flex;\n width: 12px;\n height: 6px;\n\n & > svg {\n width: 100%;\n height: 100%;\n }\n `,\n borderless: lobeStaticStylish.variantBorderless,\n clear: css`\n display: inline-flex;\n align-items: center;\n\n color: ${cssVar.colorTextTertiary};\n\n opacity: 0;\n\n transition: opacity 150ms ${cssVar.motionEaseOut};\n\n &:hover {\n color: ${cssVar.colorTextSecondary};\n }\n `,\n empty: css``,\n filled: lobeStaticStylish.variantFilled,\n group: css``,\n groupLabel: css``,\n icon: css`\n display: inline-flex;\n align-items: center;\n transition: transform 150ms ${cssVar.motionEaseOut};\n\n &[data-popup-open] {\n transform: rotate(180deg);\n }\n `,\n item: css``,\n itemIndicator: css`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n margin-inline-start: auto;\n padding-inline-start: 8px;\n\n color: ${cssVar.colorPrimary};\n `,\n itemText: css``,\n list: css`\n overflow-y: auto;\n max-height: var(--available-height);\n padding-block: 0;\n `,\n outlined: lobeStaticStylish.variantOutlined,\n popup: css`\n transform-origin: var(--transform-origin);\n box-sizing: border-box;\n transition:\n opacity 150ms ${cssVar.motionEaseOut},\n transform 150ms ${cssVar.motionEaseOut};\n\n &[data-starting-style],\n &[data-ending-style] {\n transform: scale(0.98);\n opacity: 0;\n }\n `,\n positioner: css`\n z-index: 1100;\n outline: none;\n `,\n prefix: css`\n display: inline-flex;\n align-items: center;\n color: ${cssVar.colorTextSecondary};\n `,\n scrollArrow: css`\n cursor: default;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n height: 16px;\n\n color: ${cssVar.colorTextSecondary};\n\n background: ${cssVar.colorBgElevated};\n `,\n search: css`\n cursor: text;\n\n display: flex;\n align-items: center;\n\n min-height: 36px;\n margin-inline: -4px;\n padding-block: 8px;\n padding-inline: 12px;\n border-block-end: 1px solid ${cssVar.colorFillSecondary};\n `,\n searchInput: css`\n flex: 1;\n\n min-width: 0;\n padding-block: 0;\n padding-inline: 4px;\n border: 0;\n\n font-size: 14px;\n line-height: 20px;\n color: ${cssVar.colorText};\n\n background: transparent;\n outline: none;\n\n &::placeholder {\n color: ${cssVar.colorTextPlaceholder};\n }\n `,\n shadow: lobeStaticStylish.shadow,\n suffix: css`\n display: inline-flex;\n gap: 6px;\n align-items: center;\n color: ${cssVar.colorTextSecondary};\n `,\n tag: css`\n display: inline-flex;\n align-items: center;\n\n max-width: 100%;\n padding-block: 0;\n padding-inline: 6px;\n border-radius: ${cssVar.borderRadiusSM};\n\n font-size: 12px;\n line-height: 20px;\n color: ${cssVar.colorText};\n\n background: ${cssVar.colorFillTertiary};\n `,\n tags: css`\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n align-items: center;\n `,\n trigger: css`\n cursor: pointer;\n user-select: none;\n\n display: inline-flex;\n gap: 8px;\n align-items: center;\n\n box-sizing: border-box;\n width: 100%;\n border: 1px solid transparent;\n border-radius: ${cssVar.borderRadius};\n\n font-family: inherit;\n color: ${cssVar.colorText};\n\n background: transparent;\n outline: none;\n\n transition: all 150ms ${cssVar.motionEaseOut};\n\n &:focus-visible {\n outline: 2px solid ${cssVar.colorPrimaryBorder};\n outline-offset: 1px;\n }\n\n &:hover [data-role='lobe-select-clear'] {\n opacity: 1;\n }\n\n &[data-placeholder] [data-role='lobe-select-clear'] {\n pointer-events: none;\n opacity: 0;\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n color: ${cssVar.colorTextDisabled};\n opacity: 0.6;\n }\n\n &[data-disabled] [data-role='lobe-select-clear'] {\n pointer-events: none;\n opacity: 0;\n }\n `,\n triggerLarge: css`\n min-height: 40px;\n padding-block: 6px;\n padding-inline: 12px;\n\n font-size: 16px;\n line-height: 24px;\n `,\n triggerMiddle: css`\n min-height: 32px;\n padding-block: 4px;\n padding-inline: 11px;\n\n font-size: 14px;\n line-height: 20px;\n `,\n triggerSmall: css`\n min-height: 24px;\n padding-block: 0;\n padding-inline: 8px;\n\n font-size: 12px;\n line-height: 18px;\n `,\n value: css`\n display: flex;\n flex: 1;\n flex-wrap: wrap;\n gap: 4px;\n align-items: center;\n\n min-width: 0;\n\n color: inherit;\n\n &[data-placeholder] {\n color: ${cssVar.colorTextPlaceholder};\n }\n `,\n valueText: css`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n `,\n}));\n\nexport const triggerVariants = cva(styles.trigger, {\n defaultVariants: {\n shadow: false,\n size: 'middle',\n variant: 'outlined',\n },\n variants: {\n shadow: {\n false: null,\n true: styles.shadow,\n },\n size: {\n large: styles.triggerLarge,\n middle: styles.triggerMiddle,\n small: styles.triggerSmall,\n },\n variant: {\n borderless: styles.borderless,\n filled: styles.filled,\n outlined: styles.outlined,\n },\n },\n});\n"],"mappings":";;;;;AAKA,MAAa,SAAS,oBAAoB,EAAE,YAAK,wBAAc;CAC7D,OAAO,KAAG;;;;;;;;;;CAUV,YAAYA,cAAkB;CAC9B,OAAO,KAAG;;;;aAICC,SAAO,kBAAkB;;;;gCAINA,SAAO,cAAc;;;eAGtCA,SAAO,mBAAmB;;;CAGvC,OAAO,KAAG;CACV,QAAQD,cAAkB;CAC1B,OAAO,KAAG;CACV,YAAY,KAAG;CACf,MAAM,KAAG;;;kCAGuBC,SAAO,cAAc;;;;;;CAMrD,MAAM,KAAG;CACT,eAAe,KAAG;;;;;;;;aAQPA,SAAO,aAAa;;CAE/B,UAAU,KAAG;CACb,MAAM,KAAG;;;;;CAKT,UAAUD,cAAkB;CAC5B,OAAO,KAAG;;;;sBAIUC,SAAO,cAAc;wBACnBA,SAAO,cAAc;;;;;;;;CAQ3C,YAAY,KAAG;;;;CAIf,QAAQ,KAAG;;;aAGAA,SAAO,mBAAmB;;CAErC,aAAa,KAAG;;;;;;;;;aASLA,SAAO,mBAAmB;;kBAErBA,SAAO,gBAAgB;;CAEvC,QAAQ,KAAG;;;;;;;;;;kCAUqBA,SAAO,mBAAmB;;CAE1D,aAAa,KAAG;;;;;;;;;;aAULA,SAAO,UAAU;;;;;;eAMfA,SAAO,qBAAqB;;;CAGzC,QAAQD,cAAkB;CAC1B,QAAQ,KAAG;;;;aAIAC,SAAO,mBAAmB;;CAErC,KAAK,KAAG;;;;;;;qBAOWA,SAAO,eAAe;;;;aAI9BA,SAAO,UAAU;;kBAEZA,SAAO,kBAAkB;;CAEzC,MAAM,KAAG;;;;;;CAMT,SAAS,KAAG;;;;;;;;;;;qBAWOA,SAAO,aAAa;;;aAG5BA,SAAO,UAAU;;;;;4BAKFA,SAAO,cAAc;;;2BAGtBA,SAAO,mBAAmB;;;;;;;;;;;;;;;eAetCA,SAAO,kBAAkB;;;;;;;;;CAStC,cAAc,KAAG;;;;;;;;CAQjB,eAAe,KAAG;;;;;;;;CAQlB,cAAc,KAAG;;;;;;;;CAQjB,OAAO,KAAG;;;;;;;;;;;;eAYGA,SAAO,qBAAqB;;;CAGzC,WAAW,KAAG;;;;;CAKf,EAAE;AAEH,MAAa,kBAAkB,IAAI,OAAO,SAAS;CACjD,iBAAiB;EACf,QAAQ;EACR,MAAM;EACN,SAAS;EACV;CACD,UAAU;EACR,QAAQ;GACN,OAAO;GACP,MAAM,OAAO;GACd;EACD,MAAM;GACJ,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,OAAO,OAAO;GACf;EACD,SAAS;GACP,YAAY,OAAO;GACnB,QAAQ,OAAO;GACf,UAAU,OAAO;GAClB;EACF;CACF,CAAC"}
1
+ {"version":3,"file":"style.mjs","names":["lobeStaticStylish","cssVar"],"sources":["../../src/LobeSelect/style.ts"],"sourcesContent":["import { createStaticStyles, cx } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nimport { lobeStaticStylish } from '@/styles';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n arrow: css`\n display: flex;\n width: 12px;\n height: 6px;\n\n & > svg {\n width: 100%;\n height: 100%;\n }\n `,\n borderless: cx(\n lobeStaticStylish.variantBorderless,\n css`\n --lobe-select-open-bg: ${cssVar.colorFillTertiary};\n `,\n ),\n clear: css`\n display: inline-flex;\n align-items: center;\n\n color: ${cssVar.colorTextTertiary};\n\n opacity: 0;\n\n transition: opacity 150ms ${cssVar.motionEaseOut};\n\n &:hover {\n color: ${cssVar.colorTextSecondary};\n }\n `,\n empty: css``,\n filled: cx(\n lobeStaticStylish.variantFilled,\n css`\n --lobe-select-open-bg: ${cssVar.colorFillSecondary};\n `,\n ),\n group: css``,\n groupLabel: css``,\n icon: css`\n display: inline-flex;\n align-items: center;\n transition: transform 150ms ${cssVar.motionEaseOut};\n\n &[data-popup-open] {\n transform: rotate(180deg);\n }\n `,\n item: css``,\n itemIndicator: css`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n margin-inline-start: auto;\n padding-inline-start: 8px;\n\n color: ${cssVar.colorPrimary};\n `,\n itemText: css``,\n list: css`\n overflow-y: auto;\n max-height: var(--available-height);\n padding-block: 0;\n `,\n outlined: cx(\n lobeStaticStylish.variantOutlined,\n css`\n --lobe-select-open-bg: ${cssVar.colorFillTertiary};\n `,\n ),\n popup: css`\n transform-origin: var(--transform-origin);\n box-sizing: border-box;\n transition:\n opacity 150ms ${cssVar.motionEaseOut},\n transform 150ms ${cssVar.motionEaseOut};\n\n &[data-starting-style],\n &[data-ending-style] {\n transform: scaleY(0.92);\n opacity: 0;\n }\n `,\n positioner: css`\n z-index: 1100;\n outline: none;\n `,\n prefix: css`\n display: inline-flex;\n align-items: center;\n color: ${cssVar.colorTextSecondary};\n `,\n scrollArrow: css`\n cursor: default;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n height: 16px;\n\n color: ${cssVar.colorTextSecondary};\n\n background: ${cssVar.colorBgElevated};\n `,\n search: css`\n cursor: text;\n\n display: flex;\n align-items: center;\n\n min-height: 36px;\n margin-inline: -4px;\n padding-block: 8px;\n padding-inline: 12px;\n border-block-end: 1px solid ${cssVar.colorFillSecondary};\n `,\n searchInput: css`\n flex: 1;\n\n min-width: 0;\n padding-block: 0;\n padding-inline: 4px;\n border: 0;\n\n font-size: 14px;\n line-height: 20px;\n color: ${cssVar.colorText};\n\n background: transparent;\n outline: none;\n\n &::placeholder {\n color: ${cssVar.colorTextPlaceholder};\n }\n `,\n shadow: lobeStaticStylish.shadow,\n suffix: css`\n display: inline-flex;\n gap: 6px;\n align-items: center;\n color: ${cssVar.colorTextSecondary};\n `,\n tag: css`\n display: inline-flex;\n align-items: center;\n\n max-width: 100%;\n padding-block: 0;\n padding-inline: 6px;\n border-radius: ${cssVar.borderRadiusSM};\n\n font-size: 12px;\n line-height: 20px;\n color: ${cssVar.colorText};\n\n background: ${cssVar.colorFillTertiary};\n `,\n tags: css`\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n align-items: center;\n `,\n trigger: css`\n cursor: pointer;\n user-select: none;\n\n display: inline-flex;\n gap: 8px;\n align-items: center;\n\n box-sizing: border-box;\n width: 100%;\n border: 1px solid transparent;\n border-radius: ${cssVar.borderRadius};\n\n font-family: inherit;\n color: ${cssVar.colorText};\n\n background: transparent;\n outline: none;\n\n transition: all 150ms ${cssVar.motionEaseOut};\n\n &:not([data-disabled])[data-popup-open],\n &:not([data-disabled])[data-open],\n &:not([data-disabled])[data-state='open'],\n &:not([data-disabled])[aria-expanded='true'] {\n background: var(--lobe-select-open-bg, ${cssVar.colorFillTertiary});\n }\n\n &:focus-visible {\n outline: 2px solid ${cssVar.colorPrimaryBorder};\n outline-offset: 1px;\n }\n\n &:hover [data-role='lobe-select-clear'] {\n opacity: 1;\n }\n\n &[data-placeholder] [data-role='lobe-select-clear'] {\n pointer-events: none;\n opacity: 0;\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n color: ${cssVar.colorTextDisabled};\n opacity: 0.6;\n }\n\n &[data-disabled] [data-role='lobe-select-clear'] {\n pointer-events: none;\n opacity: 0;\n }\n `,\n triggerLarge: css`\n min-height: 40px;\n padding-block: 6px;\n padding-inline: 12px;\n\n font-size: 16px;\n line-height: 24px;\n `,\n triggerMiddle: css`\n min-height: 32px;\n padding-block: 4px;\n padding-inline: 11px;\n\n font-size: 14px;\n line-height: 20px;\n `,\n triggerSmall: css`\n min-height: 24px;\n padding-block: 0;\n padding-inline: 8px;\n\n font-size: 12px;\n line-height: 18px;\n `,\n value: css`\n display: flex;\n flex: 1;\n flex-wrap: wrap;\n gap: 4px;\n align-items: center;\n\n min-width: 0;\n\n color: inherit;\n\n &[data-placeholder] {\n color: ${cssVar.colorTextPlaceholder};\n }\n `,\n valueText: css`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n `,\n}));\n\nexport const triggerVariants = cva(styles.trigger, {\n defaultVariants: {\n shadow: false,\n size: 'middle',\n variant: 'outlined',\n },\n variants: {\n shadow: {\n false: null,\n true: styles.shadow,\n },\n size: {\n large: styles.triggerLarge,\n middle: styles.triggerMiddle,\n small: styles.triggerSmall,\n },\n variant: {\n borderless: styles.borderless,\n filled: styles.filled,\n outlined: styles.outlined,\n },\n },\n});\n"],"mappings":";;;;;AAKA,MAAa,SAAS,oBAAoB,EAAE,YAAK,wBAAc;CAC7D,OAAO,KAAG;;;;;;;;;;CAUV,YAAY,GACVA,cAAkB,mBAClB,KAAG;+BACwBC,SAAO,kBAAkB;MAErD;CACD,OAAO,KAAG;;;;aAICA,SAAO,kBAAkB;;;;gCAINA,SAAO,cAAc;;;eAGtCA,SAAO,mBAAmB;;;CAGvC,OAAO,KAAG;CACV,QAAQ,GACND,cAAkB,eAClB,KAAG;+BACwBC,SAAO,mBAAmB;MAEtD;CACD,OAAO,KAAG;CACV,YAAY,KAAG;CACf,MAAM,KAAG;;;kCAGuBA,SAAO,cAAc;;;;;;CAMrD,MAAM,KAAG;CACT,eAAe,KAAG;;;;;;;;aAQPA,SAAO,aAAa;;CAE/B,UAAU,KAAG;CACb,MAAM,KAAG;;;;;CAKT,UAAU,GACRD,cAAkB,iBAClB,KAAG;+BACwBC,SAAO,kBAAkB;MAErD;CACD,OAAO,KAAG;;;;sBAIUA,SAAO,cAAc;wBACnBA,SAAO,cAAc;;;;;;;;CAQ3C,YAAY,KAAG;;;;CAIf,QAAQ,KAAG;;;aAGAA,SAAO,mBAAmB;;CAErC,aAAa,KAAG;;;;;;;;;aASLA,SAAO,mBAAmB;;kBAErBA,SAAO,gBAAgB;;CAEvC,QAAQ,KAAG;;;;;;;;;;kCAUqBA,SAAO,mBAAmB;;CAE1D,aAAa,KAAG;;;;;;;;;;aAULA,SAAO,UAAU;;;;;;eAMfA,SAAO,qBAAqB;;;CAGzC,QAAQD,cAAkB;CAC1B,QAAQ,KAAG;;;;aAIAC,SAAO,mBAAmB;;CAErC,KAAK,KAAG;;;;;;;qBAOWA,SAAO,eAAe;;;;aAI9BA,SAAO,UAAU;;kBAEZA,SAAO,kBAAkB;;CAEzC,MAAM,KAAG;;;;;;CAMT,SAAS,KAAG;;;;;;;;;;;qBAWOA,SAAO,aAAa;;;aAG5BA,SAAO,UAAU;;;;;4BAKFA,SAAO,cAAc;;;;;;+CAMFA,SAAO,kBAAkB;;;;2BAI7CA,SAAO,mBAAmB;;;;;;;;;;;;;;;eAetCA,SAAO,kBAAkB;;;;;;;;;CAStC,cAAc,KAAG;;;;;;;;CAQjB,eAAe,KAAG;;;;;;;;CAQlB,cAAc,KAAG;;;;;;;;CAQjB,OAAO,KAAG;;;;;;;;;;;;eAYGA,SAAO,qBAAqB;;;CAGzC,WAAW,KAAG;;;;;CAKf,EAAE;AAEH,MAAa,kBAAkB,IAAI,OAAO,SAAS;CACjD,iBAAiB;EACf,QAAQ;EACR,MAAM;EACN,SAAS;EACV;CACD,UAAU;EACR,QAAQ;GACN,OAAO;GACP,MAAM,OAAO;GACd;EACD,MAAM;GACJ,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,OAAO,OAAO;GACf;EACD,SAAS;GACP,YAAY,OAAO;GACnB,QAAQ,OAAO;GACf,UAAU,OAAO;GAClB;EACF;CACF,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { LobeSwitchProps } from "./type.mjs";
2
+ import * as react58 from "react";
3
+
4
+ //#region src/LobeSwitch/LobeSwitch.d.ts
5
+ declare const LobeSwitch: react58.NamedExoticComponent<LobeSwitchProps>;
6
+ //#endregion
7
+ export { LobeSwitch };
8
+ //# sourceMappingURL=LobeSwitch.d.mts.map
@@ -0,0 +1,68 @@
1
+ 'use client';
2
+
3
+ import Icon_default from "../Icon/Icon.mjs";
4
+ import { styles } from "./style.mjs";
5
+ import { LobeSwitchIcon, LobeSwitchRoot, LobeSwitchThumb } from "./atoms.mjs";
6
+ import { memo } from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { cx } from "antd-style";
9
+ import { Loader2 } from "lucide-react";
10
+
11
+ //#region src/LobeSwitch/LobeSwitch.tsx
12
+ const LobeSwitch = memo(({ autoFocus, checked, checkedChildren, className, classNames, defaultChecked, defaultValue, disabled, id, loading, name, onChange, onClick, ref, rootClassName, size = "default", style, styles: customStyles, tabIndex, title, unCheckedChildren, value }) => {
13
+ const isDisabled = disabled || loading;
14
+ const resolvedChecked = value ?? checked;
15
+ const resolvedDefaultChecked = defaultValue ?? defaultChecked;
16
+ return /* @__PURE__ */ jsxs(LobeSwitchRoot, {
17
+ autoFocus,
18
+ checked: resolvedChecked,
19
+ className: cx(className, rootClassName, classNames?.root),
20
+ defaultChecked: resolvedDefaultChecked,
21
+ disabled: isDisabled,
22
+ id,
23
+ name,
24
+ onCheckedChange: onChange,
25
+ onClick,
26
+ ref,
27
+ size,
28
+ style: {
29
+ ...style,
30
+ ...customStyles?.root
31
+ },
32
+ tabIndex,
33
+ title,
34
+ children: [
35
+ checkedChildren && /* @__PURE__ */ jsx(LobeSwitchIcon, {
36
+ className: classNames?.content,
37
+ position: "left",
38
+ size,
39
+ style: customStyles?.content,
40
+ children: checkedChildren
41
+ }),
42
+ unCheckedChildren && /* @__PURE__ */ jsx(LobeSwitchIcon, {
43
+ className: classNames?.content,
44
+ position: "right",
45
+ size,
46
+ style: customStyles?.content,
47
+ children: unCheckedChildren
48
+ }),
49
+ /* @__PURE__ */ jsx(LobeSwitchThumb, {
50
+ className: classNames?.thumb,
51
+ size,
52
+ style: customStyles?.thumb,
53
+ children: loading && /* @__PURE__ */ jsx(Icon_default, {
54
+ className: styles.loading,
55
+ icon: Loader2,
56
+ size: size === "small" ? 8 : 12,
57
+ style: { color: "var(--lobe-color-primary)" }
58
+ })
59
+ })
60
+ ]
61
+ });
62
+ });
63
+ LobeSwitch.displayName = "LobeSwitch";
64
+ var LobeSwitch_default = LobeSwitch;
65
+
66
+ //#endregion
67
+ export { LobeSwitch_default as default };
68
+ //# sourceMappingURL=LobeSwitch.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LobeSwitch.mjs","names":["Icon"],"sources":["../../src/LobeSwitch/LobeSwitch.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\nimport { Loader2 } from 'lucide-react';\nimport { memo } from 'react';\n\nimport Icon from '@/Icon';\n\nimport { LobeSwitchIcon, LobeSwitchRoot, LobeSwitchThumb } from './atoms';\nimport { styles } from './style';\nimport type { LobeSwitchProps } from './type';\n\nconst LobeSwitch = memo<LobeSwitchProps>(\n ({\n autoFocus,\n checked,\n checkedChildren,\n className,\n classNames,\n defaultChecked,\n defaultValue,\n disabled,\n id,\n loading,\n name,\n onChange,\n onClick,\n ref,\n rootClassName,\n size = 'default',\n style,\n styles: customStyles,\n tabIndex,\n title,\n unCheckedChildren,\n value,\n }) => {\n const isDisabled = disabled || loading;\n const resolvedChecked = value ?? checked;\n const resolvedDefaultChecked = defaultValue ?? defaultChecked;\n\n return (\n <LobeSwitchRoot\n autoFocus={autoFocus}\n checked={resolvedChecked}\n className={cx(className, rootClassName, classNames?.root)}\n defaultChecked={resolvedDefaultChecked}\n disabled={isDisabled}\n id={id}\n name={name}\n onCheckedChange={onChange}\n onClick={onClick}\n ref={ref}\n size={size}\n style={{ ...style, ...customStyles?.root }}\n tabIndex={tabIndex}\n title={title}\n >\n {checkedChildren && (\n <LobeSwitchIcon\n className={classNames?.content}\n position=\"left\"\n size={size}\n style={customStyles?.content}\n >\n {checkedChildren}\n </LobeSwitchIcon>\n )}\n {unCheckedChildren && (\n <LobeSwitchIcon\n className={classNames?.content}\n position=\"right\"\n size={size}\n style={customStyles?.content}\n >\n {unCheckedChildren}\n </LobeSwitchIcon>\n )}\n <LobeSwitchThumb className={classNames?.thumb} size={size} style={customStyles?.thumb}>\n {loading && (\n <Icon\n className={styles.loading}\n icon={Loader2}\n size={size === 'small' ? 8 : 12}\n style={{ color: 'var(--lobe-color-primary)' }}\n />\n )}\n </LobeSwitchThumb>\n </LobeSwitchRoot>\n );\n },\n);\n\nLobeSwitch.displayName = 'LobeSwitch';\n\nexport default LobeSwitch;\n"],"mappings":";;;;;;;;;;;AAYA,MAAM,aAAa,MAChB,EACC,WACA,SACA,iBACA,WACA,YACA,gBACA,cACA,UACA,IACA,SACA,MACA,UACA,SACA,KACA,eACA,OAAO,WACP,OACA,QAAQ,cACR,UACA,OACA,mBACA,YACI;CACJ,MAAM,aAAa,YAAY;CAC/B,MAAM,kBAAkB,SAAS;CACjC,MAAM,yBAAyB,gBAAgB;AAE/C,QACE,qBAAC;EACY;EACX,SAAS;EACT,WAAW,GAAG,WAAW,eAAe,YAAY,KAAK;EACzD,gBAAgB;EAChB,UAAU;EACN;EACE;EACN,iBAAiB;EACR;EACJ;EACC;EACN,OAAO;GAAE,GAAG;GAAO,GAAG,cAAc;GAAM;EAChC;EACH;;GAEN,mBACC,oBAAC;IACC,WAAW,YAAY;IACvB,UAAS;IACH;IACN,OAAO,cAAc;cAEpB;KACc;GAElB,qBACC,oBAAC;IACC,WAAW,YAAY;IACvB,UAAS;IACH;IACN,OAAO,cAAc;cAEpB;KACc;GAEnB,oBAAC;IAAgB,WAAW,YAAY;IAAa;IAAM,OAAO,cAAc;cAC7E,WACC,oBAACA;KACC,WAAW,OAAO;KAClB,MAAM;KACN,MAAM,SAAS,UAAU,IAAI;KAC7B,OAAO,EAAE,OAAO,6BAA6B;MAC7C;KAEY;;GACH;EAGtB;AAED,WAAW,cAAc;AAEzB,yBAAe"}