@lobehub/ui 4.7.1 → 4.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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/CodeEditor/CodeEditor.d.mts +2 -2
  9. package/es/Collapse/Collapse.d.mts +2 -2
  10. package/es/ConfigProvider/index.d.mts +2 -2
  11. package/es/ContextMenu/ContextMenuHost.d.mts +2 -2
  12. package/es/ContextMenu/renderItems.mjs +20 -3
  13. package/es/ContextMenu/renderItems.mjs.map +1 -1
  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/EditableText/EditableText.d.mts +2 -2
  25. package/es/EmojiPicker/AvatarUploader.mjs +1 -1
  26. package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
  27. package/es/EmojiPicker/EmojiPicker.mjs +1 -1
  28. package/es/Flex/FlexBasic.d.mts +2 -2
  29. package/es/Footer/Footer.d.mts +2 -2
  30. package/es/Form/components/FormGroup.d.mts +2 -2
  31. package/es/Form/components/FormItem.d.mts +2 -2
  32. package/es/Form/components/FormSubmitFooter.d.mts +2 -2
  33. package/es/FormModal/FormModal.d.mts +2 -2
  34. package/es/GuideCard/GuideCard.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/ImageSelect/ImageSelect.d.mts +2 -2
  44. package/es/Input/Input.d.mts +2 -2
  45. package/es/Input/InputNumber.d.mts +2 -2
  46. package/es/Input/InputOPT.d.mts +2 -2
  47. package/es/Input/InputPassword.d.mts +2 -2
  48. package/es/Input/TextArea.d.mts +2 -2
  49. package/es/Layout/components/LayoutFooter.d.mts +2 -2
  50. package/es/Layout/components/LayoutHeader.d.mts +2 -2
  51. package/es/Layout/components/LayoutMain.d.mts +2 -2
  52. package/es/Layout/components/LayoutSidebar.d.mts +2 -2
  53. package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
  54. package/es/Layout/components/LayoutToc.d.mts +2 -2
  55. package/es/List/ListItem/index.d.mts +2 -2
  56. package/es/Markdown/Markdown.d.mts +2 -2
  57. package/es/Markdown/Typography.d.mts +2 -2
  58. package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
  59. package/es/MaskShadow/MaskShadow.d.mts +2 -2
  60. package/es/Menu/Menu.d.mts +2 -2
  61. package/es/Menu/sharedStyle.mjs +5 -0
  62. package/es/Menu/sharedStyle.mjs.map +1 -1
  63. package/es/Mermaid/Mermaid.d.mts +2 -2
  64. package/es/Mermaid/SyntaxMermaid/index.d.mts +2 -2
  65. package/es/Modal/Modal.d.mts +2 -2
  66. package/es/Modal/ModalProvider.d.mts +2 -2
  67. package/es/MotionProvider/index.d.mts +2 -2
  68. package/es/SearchBar/SearchBar.d.mts +2 -2
  69. package/es/Segmented/Segmented.d.mts +2 -2
  70. package/es/Select/Select.d.mts +2 -2
  71. package/es/SideNav/SideNav.d.mts +2 -2
  72. package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
  73. package/es/SortableList/components/DragHandle.d.mts +2 -2
  74. package/es/SortableList/components/SortableItem.d.mts +2 -2
  75. package/es/Tag/Tag.mjs +10 -15
  76. package/es/Tag/Tag.mjs.map +1 -1
  77. package/es/Tag/utils.mjs +9 -4
  78. package/es/Tag/utils.mjs.map +1 -1
  79. package/es/ThemeProvider/GlobalMouseDirectionContext.mjs +28 -0
  80. package/es/ThemeProvider/GlobalMouseDirectionContext.mjs.map +1 -0
  81. package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
  82. package/es/ThemeProvider/ThemeProvider.mjs +3 -2
  83. package/es/ThemeProvider/ThemeProvider.mjs.map +1 -1
  84. package/es/Toc/Toc.d.mts +2 -2
  85. package/es/Tooltip/TooltipFloating.mjs +58 -36
  86. package/es/Tooltip/TooltipFloating.mjs.map +1 -1
  87. package/es/Tooltip/TooltipGroup.mjs +6 -0
  88. package/es/Tooltip/TooltipGroup.mjs.map +1 -1
  89. package/es/Tooltip/TooltipStandalone.mjs +1 -0
  90. package/es/Tooltip/TooltipStandalone.mjs.map +1 -1
  91. package/es/Tooltip/style.mjs +4 -1
  92. package/es/Tooltip/style.mjs.map +1 -1
  93. package/es/Video/index.d.mts +2 -2
  94. package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
  95. package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +2 -2
  96. package/es/awesome/Features/Features.d.mts +2 -2
  97. package/es/awesome/Giscus/Giscus.d.mts +2 -2
  98. package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
  99. package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
  100. package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
  101. package/es/awesome/Hero/Hero.d.mts +2 -2
  102. package/es/awesome/Spline/Spine.d.mts +2 -2
  103. package/es/awesome/Spotlight/Spotlight.d.mts +2 -2
  104. package/es/awesome/SpotlightCard/SpotlightCard.d.mts +2 -2
  105. package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +2 -2
  106. package/es/brand/LobeChat/index.d.mts +2 -2
  107. package/es/brand/LobeHub/index.d.mts +2 -2
  108. package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
  109. package/es/brand/LogoThree/index.d.mts +2 -2
  110. package/es/chat/BackBottom/BackBottom.d.mts +2 -2
  111. package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +2 -2
  112. package/es/chat/ChatItem/ChatItem.d.mts +2 -2
  113. package/es/chat/ChatList/ChatList.d.mts +2 -2
  114. package/es/chat/EditableMessage/EditableMessage.d.mts +2 -2
  115. package/es/chat/EditableMessageList/EditableMessageList.d.mts +2 -2
  116. package/es/chat/EditableMessageList/EditableMessageList.mjs +1 -1
  117. package/es/chat/MessageInput/MessageInput.d.mts +2 -2
  118. package/es/chat/MessageModal/MessageModal.d.mts +2 -2
  119. package/es/chat/MessageModal/MessageModal.mjs +1 -1
  120. package/es/color/ColorScales/index.d.mts +2 -2
  121. package/es/color/CssVar/index.d.mts +2 -2
  122. package/es/i18n/context.d.mts +2 -2
  123. package/es/i18n/resources/en/common.d.mts +1 -0
  124. package/es/i18n/resources/en/common.mjs +2 -1
  125. package/es/i18n/resources/en/common.mjs.map +1 -1
  126. package/es/i18n/resources/en/index.mjs +1 -1
  127. package/es/i18n/resources/zhCn/common.d.mts +1 -0
  128. package/es/i18n/resources/zhCn/common.mjs +2 -1
  129. package/es/i18n/resources/zhCn/common.mjs.map +1 -1
  130. package/es/icons/lucideExtra/BotPromptIcon.d.mts +3 -3
  131. package/es/icons/lucideExtra/CreateBotIcon.d.mts +3 -3
  132. package/es/icons/lucideExtra/DiscordIcon.d.mts +3 -3
  133. package/es/icons/lucideExtra/GlobeOffIcon.d.mts +3 -3
  134. package/es/icons/lucideExtra/GroupBotIcon.d.mts +3 -3
  135. package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
  136. package/es/icons/lucideExtra/LeftClickIcon.d.mts +2 -2
  137. package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +3 -3
  138. package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
  139. package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
  140. package/es/icons/lucideExtra/RightClickIcon.d.mts +3 -3
  141. package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +2 -2
  142. package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +3 -3
  143. package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +3 -3
  144. package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
  145. package/es/index.mjs +2 -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 { InputProps } from "./type.mjs";
2
- import * as react119 from "react";
2
+ import * as react136 from "react";
3
3
 
4
4
  //#region src/Input/Input.d.ts
5
- declare const Input: react119.NamedExoticComponent<InputProps>;
5
+ declare const Input: react136.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 react120 from "react";
2
+ import * as react138 from "react";
3
3
 
4
4
  //#region src/Input/InputNumber.d.ts
5
- declare const InputNumber: react120.NamedExoticComponent<InputNumberProps>;
5
+ declare const InputNumber: react138.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 react122 from "react";
2
+ import * as react135 from "react";
3
3
 
4
4
  //#region src/Input/InputOPT.d.ts
5
- declare const InputOPT: react122.NamedExoticComponent<InputOPTProps>;
5
+ declare const InputOPT: react135.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 react123 from "react";
2
+ import * as react134 from "react";
3
3
 
4
4
  //#region src/Input/InputPassword.d.ts
5
- declare const InputPassword: react123.NamedExoticComponent<InputPasswordProps>;
5
+ declare const InputPassword: react134.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 react121 from "react";
2
+ import * as react137 from "react";
3
3
 
4
4
  //#region src/Input/TextArea.d.ts
5
- declare const TextArea: react121.NamedExoticComponent<TextAreaProps>;
5
+ declare const TextArea: react137.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 react28 from "react";
3
+ import * as react47 from "react";
4
4
 
5
5
  //#region src/Layout/components/LayoutFooter.d.ts
6
- declare const LayoutFooter: react28.NamedExoticComponent<DivProps>;
6
+ declare const LayoutFooter: react47.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 react29 from "react";
2
+ import * as react48 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutHeader.d.ts
5
- declare const LayoutHeader: react29.NamedExoticComponent<LayoutHeaderProps>;
5
+ declare const LayoutHeader: react48.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 react26 from "react";
3
+ import * as react49 from "react";
4
4
 
5
5
  //#region src/Layout/components/LayoutMain.d.ts
6
- declare const LayoutMain: react26.NamedExoticComponent<DivProps>;
6
+ declare const LayoutMain: react49.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 react24 from "react";
2
+ import * as react50 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutSidebar.d.ts
5
- declare const LayoutSidebar: react24.NamedExoticComponent<LayoutSidebarProps>;
5
+ declare const LayoutSidebar: react50.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 react25 from "react";
2
+ import * as react51 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutSidebarInner.d.ts
5
- declare const LayoutSidebarInner: react25.NamedExoticComponent<LayoutSidebarInnerProps>;
5
+ declare const LayoutSidebarInner: react51.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 react27 from "react";
2
+ import * as react52 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutToc.d.ts
5
- declare const LayoutToc: react27.NamedExoticComponent<LayoutTocProps>;
5
+ declare const LayoutToc: react52.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 react22 from "react";
2
+ import * as react46 from "react";
3
3
 
4
4
  //#region src/List/ListItem/index.d.ts
5
- declare const ListItem: react22.NamedExoticComponent<ListItemProps>;
5
+ declare const ListItem: react46.NamedExoticComponent<ListItemProps>;
6
6
  //#endregion
7
7
  export { ListItem };
8
8
  //# sourceMappingURL=index.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { MarkdownProps } from "./type.mjs";
2
- import * as react19 from "react";
2
+ import * as react44 from "react";
3
3
 
4
4
  //#region src/Markdown/Markdown.d.ts
5
- declare const Markdown: react19.NamedExoticComponent<MarkdownProps>;
5
+ declare const Markdown: react44.NamedExoticComponent<MarkdownProps>;
6
6
  //#endregion
7
7
  export { Markdown };
8
8
  //# sourceMappingURL=Markdown.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { TypographyProps } from "./type.mjs";
2
- import * as react18 from "react";
2
+ import * as react43 from "react";
3
3
 
4
4
  //#region src/Markdown/Typography.d.ts
5
- declare const Typography: react18.NamedExoticComponent<TypographyProps>;
5
+ declare const Typography: react43.NamedExoticComponent<TypographyProps>;
6
6
  //#endregion
7
7
  export { Typography };
8
8
  //# sourceMappingURL=Typography.d.mts.map
@@ -1,6 +1,6 @@
1
1
  import { FlexboxProps } from "../../../Flex/type.mjs";
2
2
  import "../../../Flex/index.mjs";
3
- import * as react65 from "react";
3
+ import * as react70 from "react";
4
4
  import { Ref } from "react";
5
5
 
6
6
  //#region src/Markdown/components/SearchResultCards/index.d.ts
@@ -14,7 +14,7 @@ interface SearchResultCardsProps extends FlexboxProps {
14
14
  dataSource: string[] | SearchResultItem[];
15
15
  ref?: Ref<HTMLDivElement>;
16
16
  }
17
- declare const SearchResultCards: react65.NamedExoticComponent<SearchResultCardsProps>;
17
+ declare const SearchResultCards: react70.NamedExoticComponent<SearchResultCardsProps>;
18
18
  //#endregion
19
19
  export { SearchResultCards, SearchResultCardsProps };
20
20
  //# sourceMappingURL=index.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { MaskShadowProps } from "./type.mjs";
2
- import * as react17 from "react";
2
+ import * as react45 from "react";
3
3
 
4
4
  //#region src/MaskShadow/MaskShadow.d.ts
5
- declare const MaskShadow: react17.NamedExoticComponent<MaskShadowProps>;
5
+ declare const MaskShadow: react45.NamedExoticComponent<MaskShadowProps>;
6
6
  //#endregion
7
7
  export { MaskShadow };
8
8
  //# sourceMappingURL=MaskShadow.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { MenuProps } from "./type.mjs";
2
- import * as react16 from "react";
2
+ import * as react42 from "react";
3
3
 
4
4
  //#region src/Menu/Menu.d.ts
5
- declare const Menu: react16.NamedExoticComponent<MenuProps<unknown>>;
5
+ declare const Menu: react42.NamedExoticComponent<MenuProps<unknown>>;
6
6
  //#endregion
7
7
  export { Menu };
8
8
  //# sourceMappingURL=Menu.d.mts.map
@@ -8,6 +8,11 @@ const styles = createStaticStyles(({ css: css$1, cssVar: cssVar$1 }) => ({
8
8
  &:hover {
9
9
  background: ${cssVar$1.colorErrorBg} !important;
10
10
  }
11
+ `,
12
+ empty: css$1`
13
+ cursor: default;
14
+ font-style: italic;
15
+ color: ${cssVar$1.colorTextTertiary};
11
16
  `,
12
17
  extra: css$1`
13
18
  margin-inline-start: auto;
@@ -1 +1 @@
1
- {"version":3,"file":"sharedStyle.mjs","names":["cssVar"],"sources":["../../src/Menu/sharedStyle.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n danger: css`\n color: ${cssVar.colorError} !important;\n\n &:hover {\n background: ${cssVar.colorErrorBg} !important;\n }\n `,\n\n extra: css`\n margin-inline-start: auto;\n padding-inline-start: 16px;\n font-size: 12px;\n color: ${cssVar.colorTextTertiary};\n `,\n\n groupLabel: css`\n user-select: none;\n\n padding-block: 8px 4px;\n padding-inline: 12px;\n\n font-size: 12px;\n font-weight: 500;\n line-height: 16px;\n color: ${cssVar.colorTextTertiary};\n text-transform: uppercase;\n `,\n\n icon: css`\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n\n width: 16px;\n height: 16px;\n margin-inline-end: 8px;\n `,\n\n item: css`\n cursor: pointer;\n user-select: none;\n\n position: relative;\n\n overflow: hidden;\n display: flex;\n align-items: center;\n\n width: 100%;\n min-height: 36px;\n padding-block: 8px;\n padding-inline: 12px;\n border-radius: ${cssVar.borderRadius};\n\n font-size: 14px;\n line-height: 20px;\n color: ${cssVar.colorText};\n\n outline: none;\n\n transition: all 150ms ${cssVar.motionEaseOut};\n\n &:hover {\n background: ${cssVar.colorFillTertiary};\n }\n\n &:active {\n background: ${cssVar.colorFillSecondary};\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n color: ${cssVar.colorTextDisabled};\n opacity: 0.5;\n\n &:hover {\n background: transparent;\n }\n }\n\n &[data-highlighted]:not([data-disabled]) {\n background: ${cssVar.colorFillTertiary};\n }\n\n &[data-state='open']:not([data-disabled]),\n &[data-open]:not([data-disabled]),\n &[aria-expanded='true']:not([data-disabled]) {\n background: ${cssVar.colorFillTertiary};\n }\n `,\n\n itemContent: css`\n display: flex;\n flex: 1;\n gap: 0;\n align-items: center;\n `,\n\n label: css`\n overflow: hidden;\n flex: 1;\n text-overflow: ellipsis;\n white-space: nowrap;\n `,\n\n popup: css`\n min-width: 120px;\n padding: 4px;\n border-radius: ${cssVar.borderRadius};\n\n background: ${cssVar.colorBgElevated};\n outline: none;\n box-shadow:\n 0 0 15px 0 #00000008,\n 0 2px 30px 0 #00000014,\n 0 0 0 1px ${cssVar.colorBorder} inset;\n\n animation: context-menu-fade-in 150ms ${cssVar.motionEaseOut};\n\n @keyframes context-menu-fade-in {\n from {\n transform: scale(0.96);\n opacity: 0;\n }\n\n to {\n transform: scale(1);\n opacity: 1;\n }\n }\n `,\n positioner: css`\n z-index: 1100;\n `,\n\n separator: css`\n height: 1px;\n margin-block: 4px;\n margin-inline: 0;\n background: ${cssVar.colorBorder};\n `,\n\n submenuArrow: css`\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n\n width: 20px;\n height: 20px;\n margin-inline-start: auto;\n padding-inline-start: 8px;\n `,\n}));\n"],"mappings":";;;AAEA,MAAa,SAAS,oBAAoB,EAAE,YAAK,wBAAc;CAC7D,QAAQ,KAAG;aACAA,SAAO,WAAW;;;oBAGXA,SAAO,aAAa;;;CAItC,OAAO,KAAG;;;;aAICA,SAAO,kBAAkB;;CAGpC,YAAY,KAAG;;;;;;;;;aASJA,SAAO,kBAAkB;;;CAIpC,MAAM,KAAG;;;;;;;;;;CAWT,MAAM,KAAG;;;;;;;;;;;;;;qBAcUA,SAAO,aAAa;;;;aAI5BA,SAAO,UAAU;;;;4BAIFA,SAAO,cAAc;;;oBAG7BA,SAAO,kBAAkB;;;;oBAIzBA,SAAO,mBAAmB;;;;;eAK/BA,SAAO,kBAAkB;;;;;;;;;oBASpBA,SAAO,kBAAkB;;;;;;oBAMzBA,SAAO,kBAAkB;;;CAI3C,aAAa,KAAG;;;;;;CAOhB,OAAO,KAAG;;;;;;CAOV,OAAO,KAAG;;;qBAGSA,SAAO,aAAa;;kBAEvBA,SAAO,gBAAgB;;;;;kBAKvBA,SAAO,YAAY;;4CAEOA,SAAO,cAAc;;;;;;;;;;;;;;CAc/D,YAAY,KAAG;;;CAIf,WAAW,KAAG;;;;kBAIEA,SAAO,YAAY;;CAGnC,cAAc,KAAG;;;;;;;;;;;CAWlB,EAAE"}
1
+ {"version":3,"file":"sharedStyle.mjs","names":["cssVar"],"sources":["../../src/Menu/sharedStyle.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n danger: css`\n color: ${cssVar.colorError} !important;\n\n &:hover {\n background: ${cssVar.colorErrorBg} !important;\n }\n `,\n\n empty: css`\n cursor: default;\n font-style: italic;\n color: ${cssVar.colorTextTertiary};\n `,\n\n extra: css`\n margin-inline-start: auto;\n padding-inline-start: 16px;\n font-size: 12px;\n color: ${cssVar.colorTextTertiary};\n `,\n\n groupLabel: css`\n user-select: none;\n\n padding-block: 8px 4px;\n padding-inline: 12px;\n\n font-size: 12px;\n font-weight: 500;\n line-height: 16px;\n color: ${cssVar.colorTextTertiary};\n text-transform: uppercase;\n `,\n\n icon: css`\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n\n width: 16px;\n height: 16px;\n margin-inline-end: 8px;\n `,\n\n item: css`\n cursor: pointer;\n user-select: none;\n\n position: relative;\n\n overflow: hidden;\n display: flex;\n align-items: center;\n\n width: 100%;\n min-height: 36px;\n padding-block: 8px;\n padding-inline: 12px;\n border-radius: ${cssVar.borderRadius};\n\n font-size: 14px;\n line-height: 20px;\n color: ${cssVar.colorText};\n\n outline: none;\n\n transition: all 150ms ${cssVar.motionEaseOut};\n\n &:hover {\n background: ${cssVar.colorFillTertiary};\n }\n\n &:active {\n background: ${cssVar.colorFillSecondary};\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n color: ${cssVar.colorTextDisabled};\n opacity: 0.5;\n\n &:hover {\n background: transparent;\n }\n }\n\n &[data-highlighted]:not([data-disabled]) {\n background: ${cssVar.colorFillTertiary};\n }\n\n &[data-state='open']:not([data-disabled]),\n &[data-open]:not([data-disabled]),\n &[aria-expanded='true']:not([data-disabled]) {\n background: ${cssVar.colorFillTertiary};\n }\n `,\n\n itemContent: css`\n display: flex;\n flex: 1;\n gap: 0;\n align-items: center;\n `,\n\n label: css`\n overflow: hidden;\n flex: 1;\n text-overflow: ellipsis;\n white-space: nowrap;\n `,\n\n popup: css`\n min-width: 120px;\n padding: 4px;\n border-radius: ${cssVar.borderRadius};\n\n background: ${cssVar.colorBgElevated};\n outline: none;\n box-shadow:\n 0 0 15px 0 #00000008,\n 0 2px 30px 0 #00000014,\n 0 0 0 1px ${cssVar.colorBorder} inset;\n\n animation: context-menu-fade-in 150ms ${cssVar.motionEaseOut};\n\n @keyframes context-menu-fade-in {\n from {\n transform: scale(0.96);\n opacity: 0;\n }\n\n to {\n transform: scale(1);\n opacity: 1;\n }\n }\n `,\n positioner: css`\n z-index: 1100;\n `,\n\n separator: css`\n height: 1px;\n margin-block: 4px;\n margin-inline: 0;\n background: ${cssVar.colorBorder};\n `,\n\n submenuArrow: css`\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n\n width: 20px;\n height: 20px;\n margin-inline-start: auto;\n padding-inline-start: 8px;\n `,\n}));\n"],"mappings":";;;AAEA,MAAa,SAAS,oBAAoB,EAAE,YAAK,wBAAc;CAC7D,QAAQ,KAAG;aACAA,SAAO,WAAW;;;oBAGXA,SAAO,aAAa;;;CAItC,OAAO,KAAG;;;aAGCA,SAAO,kBAAkB;;CAGpC,OAAO,KAAG;;;;aAICA,SAAO,kBAAkB;;CAGpC,YAAY,KAAG;;;;;;;;;aASJA,SAAO,kBAAkB;;;CAIpC,MAAM,KAAG;;;;;;;;;;CAWT,MAAM,KAAG;;;;;;;;;;;;;;qBAcUA,SAAO,aAAa;;;;aAI5BA,SAAO,UAAU;;;;4BAIFA,SAAO,cAAc;;;oBAG7BA,SAAO,kBAAkB;;;;oBAIzBA,SAAO,mBAAmB;;;;;eAK/BA,SAAO,kBAAkB;;;;;;;;;oBASpBA,SAAO,kBAAkB;;;;;;oBAMzBA,SAAO,kBAAkB;;;CAI3C,aAAa,KAAG;;;;;;CAOhB,OAAO,KAAG;;;;;;CAOV,OAAO,KAAG;;;qBAGSA,SAAO,aAAa;;kBAEvBA,SAAO,gBAAgB;;;;;kBAKvBA,SAAO,YAAY;;4CAEOA,SAAO,cAAc;;;;;;;;;;;;;;CAc/D,YAAY,KAAG;;;CAIf,WAAW,KAAG;;;;kBAIEA,SAAO,YAAY;;CAGnC,cAAc,KAAG;;;;;;;;;;;CAWlB,EAAE"}
@@ -1,8 +1,8 @@
1
1
  import { MermaidProps } from "./type.mjs";
2
- import * as react20 from "react";
2
+ import * as react35 from "react";
3
3
 
4
4
  //#region src/Mermaid/Mermaid.d.ts
5
- declare const Mermaid: react20.NamedExoticComponent<MermaidProps>;
5
+ declare const Mermaid: react35.NamedExoticComponent<MermaidProps>;
6
6
  //#endregion
7
7
  export { Mermaid };
8
8
  //# sourceMappingURL=Mermaid.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { SyntaxMermaidProps } from "../type.mjs";
2
- import * as react21 from "react";
2
+ import * as react36 from "react";
3
3
 
4
4
  //#region src/Mermaid/SyntaxMermaid/index.d.ts
5
- declare const SyntaxMermaid: react21.NamedExoticComponent<SyntaxMermaidProps>;
5
+ declare const SyntaxMermaid: react36.NamedExoticComponent<SyntaxMermaidProps>;
6
6
  //#endregion
7
7
  export { SyntaxMermaid };
8
8
  //# sourceMappingURL=index.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { ModalProps } from "./type.mjs";
2
- import * as react12 from "react";
2
+ import * as react38 from "react";
3
3
 
4
4
  //#region src/Modal/Modal.d.ts
5
- declare const Modal: react12.NamedExoticComponent<ModalProps>;
5
+ declare const Modal: react38.NamedExoticComponent<ModalProps>;
6
6
  //#endregion
7
7
  export { Modal };
8
8
  //# sourceMappingURL=Modal.d.mts.map
@@ -1,9 +1,9 @@
1
1
  import { ModalContextValue } from "./type.mjs";
2
- import * as react13 from "react";
2
+ import * as react39 from "react";
3
3
  import { ReactNode } from "react";
4
4
 
5
5
  //#region src/Modal/ModalProvider.d.ts
6
- declare const ModalProvider: react13.NamedExoticComponent<{
6
+ declare const ModalProvider: react39.NamedExoticComponent<{
7
7
  children: ReactNode;
8
8
  value: ModalContextValue;
9
9
  }>;
@@ -1,4 +1,4 @@
1
- import * as react67 from "react";
1
+ import * as react71 from "react";
2
2
  import { Context, ReactNode } from "react";
3
3
  import * as motion_react0 from "motion/react";
4
4
  import * as m from "motion/react-m";
@@ -6,7 +6,7 @@ import * as m from "motion/react-m";
6
6
  //#region src/MotionProvider/index.d.ts
7
7
  type MotionComponentType = typeof motion_react0.motion | typeof m;
8
8
  declare const MotionComponent: Context<MotionComponentType>;
9
- declare const MotionProvider: react67.NamedExoticComponent<{
9
+ declare const MotionProvider: react71.NamedExoticComponent<{
10
10
  children: ReactNode;
11
11
  motion: MotionComponentType;
12
12
  }>;
@@ -1,8 +1,8 @@
1
1
  import { SearchBarProps } from "./type.mjs";
2
- import * as react7 from "react";
2
+ import * as react41 from "react";
3
3
 
4
4
  //#region src/SearchBar/SearchBar.d.ts
5
- declare const SearchBar: react7.NamedExoticComponent<SearchBarProps>;
5
+ declare const SearchBar: react41.NamedExoticComponent<SearchBarProps>;
6
6
  //#endregion
7
7
  export { SearchBar };
8
8
  //# sourceMappingURL=SearchBar.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { SegmentedProps } from "./type.mjs";
2
- import * as react15 from "react";
2
+ import * as react37 from "react";
3
3
 
4
4
  //#region src/Segmented/Segmented.d.ts
5
- declare const Segmented: react15.NamedExoticComponent<SegmentedProps>;
5
+ declare const Segmented: react37.NamedExoticComponent<SegmentedProps>;
6
6
  //#endregion
7
7
  export { Segmented };
8
8
  //# sourceMappingURL=Segmented.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { SelectProps } from "./type.mjs";
2
- import * as react11 from "react";
2
+ import * as react32 from "react";
3
3
 
4
4
  //#region src/Select/Select.d.ts
5
- declare const Input: react11.NamedExoticComponent<SelectProps>;
5
+ declare const Input: react32.NamedExoticComponent<SelectProps>;
6
6
  //#endregion
7
7
  export { Input };
8
8
  //# sourceMappingURL=Select.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { SideNavProps } from "./type.mjs";
2
- import * as react10 from "react";
2
+ import * as react34 from "react";
3
3
 
4
4
  //#region src/SideNav/SideNav.d.ts
5
- declare const SideNav: react10.NamedExoticComponent<SideNavProps>;
5
+ declare const SideNav: react34.NamedExoticComponent<SideNavProps>;
6
6
  //#endregion
7
7
  export { SideNav };
8
8
  //# sourceMappingURL=SideNav.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { SliderWithInputProps } from "./type.mjs";
2
- import * as react5 from "react";
2
+ import * as react27 from "react";
3
3
 
4
4
  //#region src/SliderWithInput/SliderWithInput.d.ts
5
- declare const SliderWithInput: react5.NamedExoticComponent<SliderWithInputProps>;
5
+ declare const SliderWithInput: react27.NamedExoticComponent<SliderWithInputProps>;
6
6
  //#endregion
7
7
  export { SliderWithInput };
8
8
  //# sourceMappingURL=SliderWithInput.d.mts.map
@@ -1,9 +1,9 @@
1
1
  import { ActionIconProps } from "../../ActionIcon/type.mjs";
2
2
  import "../../ActionIcon/index.mjs";
3
- import * as react76 from "react";
3
+ import * as react108 from "react";
4
4
 
5
5
  //#region src/SortableList/components/DragHandle.d.ts
6
- declare const DragHandle: react76.NamedExoticComponent<ActionIconProps>;
6
+ declare const DragHandle: react108.NamedExoticComponent<ActionIconProps>;
7
7
  //#endregion
8
8
  export { DragHandle };
9
9
  //# sourceMappingURL=DragHandle.d.mts.map
@@ -1,6 +1,6 @@
1
1
  import { FlexboxProps } from "../../Flex/type.mjs";
2
2
  import "../../Flex/index.mjs";
3
- import * as react74 from "react";
3
+ import * as react106 from "react";
4
4
  import "@dnd-kit/core";
5
5
 
6
6
  //#region src/SortableList/components/SortableItem.d.ts
@@ -9,7 +9,7 @@ interface SortableItemProps extends Omit<FlexboxProps, 'id'> {
9
9
  id: string | number;
10
10
  variant?: 'borderless' | 'filled' | 'outlined';
11
11
  }
12
- declare const SortableItem: react74.NamedExoticComponent<SortableItemProps>;
12
+ declare const SortableItem: react106.NamedExoticComponent<SortableItemProps>;
13
13
  //#endregion
14
14
  export { SortableItem };
15
15
  //# sourceMappingURL=SortableItem.d.mts.map
package/es/Tag/Tag.mjs CHANGED
@@ -5,13 +5,12 @@ import { variants } from "./styles.mjs";
5
5
  import { useMemo } from "react";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  import { Tag } from "antd";
8
- import { cx, useTheme } from "antd-style";
8
+ import { cssVar, cx } from "antd-style";
9
9
 
10
10
  //#region src/Tag/Tag.tsx
11
11
  const Tag$1 = ({ className, ref, size = "middle", color, variant = "filled", children, onClick, style, ...rest }) => {
12
- const theme = useTheme();
13
12
  const colors = useMemo(() => {
14
- let textColor = theme.colorTextSecondary;
13
+ let textColor = cssVar.colorTextSecondary;
15
14
  let backgroundColor;
16
15
  let borderColor;
17
16
  const isBorderless = variant === "borderless";
@@ -20,17 +19,17 @@ const Tag$1 = ({ className, ref, size = "middle", color, variant = "filled", chi
20
19
  const isPresetSystemColors = color && presetSystemColors.has(color);
21
20
  const isHexColor = color && color.startsWith("#");
22
21
  if (isPresetColor) {
23
- textColor = colorsPreset(theme, color);
24
- backgroundColor = isBorderless ? "transparent" : colorsPreset(theme, color, "fillTertiary");
25
- borderColor = colorsPreset(theme, color, isFilled ? "fillQuaternary" : "fillTertiary");
22
+ textColor = colorsPreset(color);
23
+ backgroundColor = isBorderless ? "transparent" : colorsPreset(color, "fillTertiary");
24
+ borderColor = colorsPreset(color, isFilled ? "fillQuaternary" : "fillTertiary");
26
25
  }
27
26
  if (isPresetSystemColors) {
28
- textColor = colorsPresetSystem(theme, color);
29
- backgroundColor = isBorderless ? "transparent" : colorsPresetSystem(theme, color, "fillTertiary");
30
- borderColor = colorsPresetSystem(theme, color, isFilled ? "fillQuaternary" : "fillTertiary");
27
+ textColor = colorsPresetSystem(color);
28
+ backgroundColor = isBorderless ? "transparent" : colorsPresetSystem(color, "fillTertiary");
29
+ borderColor = colorsPresetSystem(color, isFilled ? "fillQuaternary" : "fillTertiary");
31
30
  }
32
31
  if (isHexColor) {
33
- textColor = theme.colorBgLayout;
32
+ textColor = cssVar.colorBgLayout;
34
33
  backgroundColor = isBorderless ? "transparent" : color;
35
34
  }
36
35
  return {
@@ -38,11 +37,7 @@ const Tag$1 = ({ className, ref, size = "middle", color, variant = "filled", chi
38
37
  borderColor,
39
38
  textColor
40
39
  };
41
- }, [
42
- color,
43
- theme,
44
- variant
45
- ]);
40
+ }, [color, variant]);
46
41
  return /* @__PURE__ */ jsx(Tag, {
47
42
  className: cx(variants({
48
43
  size,
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.mjs","names":["Tag: FC<TagProps>","AntTag","Tag"],"sources":["../../src/Tag/Tag.tsx"],"sourcesContent":["'use client';\n\nimport { Tag as AntTag } from 'antd';\nimport { cx, useTheme } from 'antd-style';\nimport { type FC, useMemo } from 'react';\n\nimport { colorsPreset, colorsPresetSystem, presetColors, presetSystemColors } from '@/Tag/utils';\n\nimport { variants } from './styles';\nimport type { TagProps } from './type';\n\nconst Tag: FC<TagProps> = ({\n className,\n ref,\n size = 'middle',\n color,\n variant = 'filled',\n children,\n onClick,\n style,\n ...rest\n}) => {\n const theme = useTheme();\n\n const colors = useMemo(() => {\n let textColor = theme.colorTextSecondary;\n let backgroundColor;\n let borderColor;\n const isBorderless = variant === 'borderless';\n const isFilled = variant === 'filled';\n const isPresetColor = color && presetColors.includes(color);\n const isPresetSystemColors = color && presetSystemColors.has(color);\n const isHexColor = color && color.startsWith('#');\n\n if (isPresetColor) {\n textColor = colorsPreset(theme, color);\n backgroundColor = isBorderless ? 'transparent' : colorsPreset(theme, color, 'fillTertiary');\n borderColor = colorsPreset(theme, color, isFilled ? 'fillQuaternary' : 'fillTertiary');\n }\n if (isPresetSystemColors) {\n textColor = colorsPresetSystem(theme, color);\n backgroundColor = isBorderless\n ? 'transparent'\n : colorsPresetSystem(theme, color, 'fillTertiary');\n borderColor = colorsPresetSystem(theme, color, isFilled ? 'fillQuaternary' : 'fillTertiary');\n }\n if (isHexColor) {\n textColor = theme.colorBgLayout;\n backgroundColor = isBorderless ? 'transparent' : color;\n }\n\n return {\n backgroundColor,\n borderColor,\n textColor,\n };\n }, [color, theme, variant]);\n\n return (\n <AntTag\n className={cx(variants({ size, variant: variant as any }), className)}\n color={color}\n onClick={onClick}\n ref={ref}\n style={{\n background: colors?.backgroundColor,\n borderColor: colors?.borderColor,\n color: colors?.textColor,\n cursor: onClick ? 'pointer' : undefined,\n ...style,\n }}\n variant={variant === 'borderless' ? 'outlined' : variant}\n {...rest}\n >\n {children}\n </AntTag>\n );\n};\n\nTag.displayName = 'Tag';\n\nexport default Tag;\n"],"mappings":";;;;;;;;;;AAWA,MAAMA,SAAqB,EACzB,WACA,KACA,OAAO,UACP,OACA,UAAU,UACV,UACA,SACA,OACA,GAAG,WACC;CACJ,MAAM,QAAQ,UAAU;CAExB,MAAM,SAAS,cAAc;EAC3B,IAAI,YAAY,MAAM;EACtB,IAAI;EACJ,IAAI;EACJ,MAAM,eAAe,YAAY;EACjC,MAAM,WAAW,YAAY;EAC7B,MAAM,gBAAgB,SAAS,aAAa,SAAS,MAAM;EAC3D,MAAM,uBAAuB,SAAS,mBAAmB,IAAI,MAAM;EACnE,MAAM,aAAa,SAAS,MAAM,WAAW,IAAI;AAEjD,MAAI,eAAe;AACjB,eAAY,aAAa,OAAO,MAAM;AACtC,qBAAkB,eAAe,gBAAgB,aAAa,OAAO,OAAO,eAAe;AAC3F,iBAAc,aAAa,OAAO,OAAO,WAAW,mBAAmB,eAAe;;AAExF,MAAI,sBAAsB;AACxB,eAAY,mBAAmB,OAAO,MAAM;AAC5C,qBAAkB,eACd,gBACA,mBAAmB,OAAO,OAAO,eAAe;AACpD,iBAAc,mBAAmB,OAAO,OAAO,WAAW,mBAAmB,eAAe;;AAE9F,MAAI,YAAY;AACd,eAAY,MAAM;AAClB,qBAAkB,eAAe,gBAAgB;;AAGnD,SAAO;GACL;GACA;GACA;GACD;IACA;EAAC;EAAO;EAAO;EAAQ,CAAC;AAE3B,QACE,oBAACC;EACC,WAAW,GAAG,SAAS;GAAE;GAAe;GAAgB,CAAC,EAAE,UAAU;EAC9D;EACE;EACJ;EACL,OAAO;GACL,YAAY,QAAQ;GACpB,aAAa,QAAQ;GACrB,OAAO,QAAQ;GACf,QAAQ,UAAU,YAAY;GAC9B,GAAG;GACJ;EACD,SAAS,YAAY,eAAe,aAAa;EACjD,GAAI;EAEH;GACM;;AAIb,MAAI,cAAc;AAElB,kBAAeC"}
1
+ {"version":3,"file":"Tag.mjs","names":["Tag: FC<TagProps>","AntTag","Tag"],"sources":["../../src/Tag/Tag.tsx"],"sourcesContent":["'use client';\n\nimport { Tag as AntTag } from 'antd';\nimport { cssVar, cx } from 'antd-style';\nimport { type FC, useMemo } from 'react';\n\nimport { colorsPreset, colorsPresetSystem, presetColors, presetSystemColors } from '@/Tag/utils';\n\nimport { variants } from './styles';\nimport type { TagProps } from './type';\n\nconst Tag: FC<TagProps> = ({\n className,\n ref,\n size = 'middle',\n color,\n variant = 'filled',\n children,\n onClick,\n style,\n ...rest\n}) => {\n const colors = useMemo(() => {\n let textColor = cssVar.colorTextSecondary;\n let backgroundColor;\n let borderColor;\n const isBorderless = variant === 'borderless';\n const isFilled = variant === 'filled';\n const isPresetColor = color && presetColors.includes(color);\n const isPresetSystemColors = color && presetSystemColors.has(color);\n const isHexColor = color && color.startsWith('#');\n\n if (isPresetColor) {\n textColor = colorsPreset(color);\n backgroundColor = isBorderless ? 'transparent' : colorsPreset(color, 'fillTertiary');\n borderColor = colorsPreset(color, isFilled ? 'fillQuaternary' : 'fillTertiary');\n }\n if (isPresetSystemColors) {\n textColor = colorsPresetSystem(color);\n backgroundColor = isBorderless ? 'transparent' : colorsPresetSystem(color, 'fillTertiary');\n borderColor = colorsPresetSystem(color, isFilled ? 'fillQuaternary' : 'fillTertiary');\n }\n if (isHexColor) {\n textColor = cssVar.colorBgLayout;\n backgroundColor = isBorderless ? 'transparent' : color;\n }\n\n return {\n backgroundColor,\n borderColor,\n textColor,\n };\n }, [color, variant]);\n\n return (\n <AntTag\n className={cx(variants({ size, variant: variant as any }), className)}\n color={color}\n onClick={onClick}\n ref={ref}\n style={{\n background: colors?.backgroundColor,\n borderColor: colors?.borderColor,\n color: colors?.textColor,\n cursor: onClick ? 'pointer' : undefined,\n ...style,\n }}\n variant={variant === 'borderless' ? 'outlined' : variant}\n {...rest}\n >\n {children}\n </AntTag>\n );\n};\n\nTag.displayName = 'Tag';\n\nexport default Tag;\n"],"mappings":";;;;;;;;;;AAWA,MAAMA,SAAqB,EACzB,WACA,KACA,OAAO,UACP,OACA,UAAU,UACV,UACA,SACA,OACA,GAAG,WACC;CACJ,MAAM,SAAS,cAAc;EAC3B,IAAI,YAAY,OAAO;EACvB,IAAI;EACJ,IAAI;EACJ,MAAM,eAAe,YAAY;EACjC,MAAM,WAAW,YAAY;EAC7B,MAAM,gBAAgB,SAAS,aAAa,SAAS,MAAM;EAC3D,MAAM,uBAAuB,SAAS,mBAAmB,IAAI,MAAM;EACnE,MAAM,aAAa,SAAS,MAAM,WAAW,IAAI;AAEjD,MAAI,eAAe;AACjB,eAAY,aAAa,MAAM;AAC/B,qBAAkB,eAAe,gBAAgB,aAAa,OAAO,eAAe;AACpF,iBAAc,aAAa,OAAO,WAAW,mBAAmB,eAAe;;AAEjF,MAAI,sBAAsB;AACxB,eAAY,mBAAmB,MAAM;AACrC,qBAAkB,eAAe,gBAAgB,mBAAmB,OAAO,eAAe;AAC1F,iBAAc,mBAAmB,OAAO,WAAW,mBAAmB,eAAe;;AAEvF,MAAI,YAAY;AACd,eAAY,OAAO;AACnB,qBAAkB,eAAe,gBAAgB;;AAGnD,SAAO;GACL;GACA;GACA;GACD;IACA,CAAC,OAAO,QAAQ,CAAC;AAEpB,QACE,oBAACC;EACC,WAAW,GAAG,SAAS;GAAE;GAAe;GAAgB,CAAC,EAAE,UAAU;EAC9D;EACE;EACJ;EACL,OAAO;GACL,YAAY,QAAQ;GACpB,aAAa,QAAQ;GACrB,OAAO,QAAQ;GACf,QAAQ,UAAU,YAAY;GAC9B,GAAG;GACJ;EACD,SAAS,YAAY,eAAe,aAAa;EACjD,GAAI;EAEH;GACM;;AAIb,MAAI,cAAc;AAElB,kBAAeC"}
package/es/Tag/utils.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ import { cssVar } from "antd-style";
1
2
  import { camelCase } from "es-toolkit/compat";
2
3
 
3
4
  //#region src/Tag/utils.ts
@@ -23,13 +24,17 @@ const presetSystemColors = new Set([
23
24
  "info",
24
25
  "processing"
25
26
  ]);
26
- const colorsPreset = (theme, type, ...keys) => theme[camelCase([type, ...keys].join("-"))];
27
- const colorsPresetSystem = (theme, type, ...keys) => {
28
- return theme[camelCase([
27
+ const toKebabCase = (value) => value.replaceAll(/([a-z])([A-Z])/g, "$1-$2").replaceAll(/([a-z])(\d)/g, "$1-$2").replaceAll(/(\d)([A-Z])/g, "$1-$2").replaceAll(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").toLowerCase();
28
+ const getCssVar = (tokenKey) => {
29
+ return cssVar[tokenKey] || `var(--ant-${toKebabCase(tokenKey)})`;
30
+ };
31
+ const colorsPreset = (type, ...keys) => getCssVar(camelCase([type, ...keys].join("-")));
32
+ const colorsPresetSystem = (type, ...keys) => {
33
+ return getCssVar(camelCase([
29
34
  "color",
30
35
  type === "processing" ? "info" : type,
31
36
  ...keys
32
- ].join("-"))];
37
+ ].join("-")));
33
38
  };
34
39
 
35
40
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"utils.mjs","names":[],"sources":["../../src/Tag/utils.ts"],"sourcesContent":["import { camelCase } from 'es-toolkit/compat';\n\nexport const presetColors = [\n 'red',\n 'volcano',\n 'orange',\n 'gold',\n 'yellow',\n 'lime',\n 'green',\n 'cyan',\n 'blue',\n 'geekblue',\n 'purple',\n 'magenta',\n 'gray',\n];\n\nexport const presetSystemColors = new Set(['error', 'warning', 'success', 'info', 'processing']);\n\nexport const colorsPreset = (theme: any, type: string, ...keys: string[]) =>\n theme[camelCase([type, ...keys].join('-'))] as string;\n\nexport const colorsPresetSystem = (theme: any, type: string, ...keys: string[]) => {\n const t = type === 'processing' ? 'info' : type;\n return theme[camelCase(['color', t, ...keys].join('-'))] as string;\n};\n"],"mappings":";;;AAEA,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,qBAAqB,IAAI,IAAI;CAAC;CAAS;CAAW;CAAW;CAAQ;CAAa,CAAC;AAEhG,MAAa,gBAAgB,OAAY,MAAc,GAAG,SACxD,MAAM,UAAU,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,IAAI,CAAC;AAE5C,MAAa,sBAAsB,OAAY,MAAc,GAAG,SAAmB;AAEjF,QAAO,MAAM,UAAU;EAAC;EADd,SAAS,eAAe,SAAS;EACP,GAAG;EAAK,CAAC,KAAK,IAAI,CAAC"}
1
+ {"version":3,"file":"utils.mjs","names":[],"sources":["../../src/Tag/utils.ts"],"sourcesContent":["import { cssVar } from 'antd-style';\nimport { camelCase } from 'es-toolkit/compat';\n\nexport const presetColors = [\n 'red',\n 'volcano',\n 'orange',\n 'gold',\n 'yellow',\n 'lime',\n 'green',\n 'cyan',\n 'blue',\n 'geekblue',\n 'purple',\n 'magenta',\n 'gray',\n];\n\nexport const presetSystemColors = new Set(['error', 'warning', 'success', 'info', 'processing']);\n\nconst toKebabCase = (value: string) =>\n value\n .replaceAll(/([a-z])([A-Z])/g, '$1-$2')\n .replaceAll(/([a-z])(\\d)/g, '$1-$2')\n .replaceAll(/(\\d)([A-Z])/g, '$1-$2')\n .replaceAll(/([A-Z]+)([A-Z][a-z])/g, '$1-$2')\n .toLowerCase();\n\nconst getCssVar = (tokenKey: string) => {\n const mapped = (cssVar as Record<string, string>)[tokenKey];\n return mapped || `var(--ant-${toKebabCase(tokenKey)})`;\n};\n\nexport const colorsPreset = (type: string, ...keys: string[]) =>\n getCssVar(camelCase([type, ...keys].join('-')));\n\nexport const colorsPresetSystem = (type: string, ...keys: string[]) => {\n const t = type === 'processing' ? 'info' : type;\n return getCssVar(camelCase(['color', t, ...keys].join('-')));\n};\n"],"mappings":";;;;AAGA,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,qBAAqB,IAAI,IAAI;CAAC;CAAS;CAAW;CAAW;CAAQ;CAAa,CAAC;AAEhG,MAAM,eAAe,UACnB,MACG,WAAW,mBAAmB,QAAQ,CACtC,WAAW,gBAAgB,QAAQ,CACnC,WAAW,gBAAgB,QAAQ,CACnC,WAAW,yBAAyB,QAAQ,CAC5C,aAAa;AAElB,MAAM,aAAa,aAAqB;AAEtC,QADgB,OAAkC,aACjC,aAAa,YAAY,SAAS,CAAC;;AAGtD,MAAa,gBAAgB,MAAc,GAAG,SAC5C,UAAU,UAAU,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC;AAEjD,MAAa,sBAAsB,MAAc,GAAG,SAAmB;AAErE,QAAO,UAAU,UAAU;EAAC;EADlB,SAAS,eAAe,SAAS;EACH,GAAG;EAAK,CAAC,KAAK,IAAI,CAAC,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { createContext, memo, useEffect, useRef, useState } from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+
4
+ //#region src/ThemeProvider/GlobalMouseDirectionContext.tsx
5
+ const GlobalMouseDirectionContext = createContext("right");
6
+ const GlobalMouseDirectionProvider = memo(({ children }) => {
7
+ const [direction, setDirection] = useState("right");
8
+ const prevX = useRef(0);
9
+ useEffect(() => {
10
+ const handleMouseMove = (e) => {
11
+ if (e.clientX > prevX.current) setDirection((prev) => prev !== "right" ? "right" : prev);
12
+ else if (e.clientX < prevX.current) setDirection((prev) => prev !== "left" ? "left" : prev);
13
+ prevX.current = e.clientX;
14
+ };
15
+ window.addEventListener("mousemove", handleMouseMove);
16
+ return () => {
17
+ window.removeEventListener("mousemove", handleMouseMove);
18
+ };
19
+ }, []);
20
+ return /* @__PURE__ */ jsx(GlobalMouseDirectionContext.Provider, {
21
+ value: direction,
22
+ children
23
+ });
24
+ });
25
+
26
+ //#endregion
27
+ export { GlobalMouseDirectionProvider };
28
+ //# sourceMappingURL=GlobalMouseDirectionContext.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GlobalMouseDirectionContext.mjs","names":[],"sources":["../../src/ThemeProvider/GlobalMouseDirectionContext.tsx"],"sourcesContent":["import { ReactNode, createContext, memo, useEffect, useRef, useState } from 'react';\n\ntype Direction = 'left' | 'right';\n\nexport const GlobalMouseDirectionContext = createContext<Direction>('right');\n\nexport const GlobalMouseDirectionProvider = memo(({ children }: { children: ReactNode }) => {\n const [direction, setDirection] = useState<Direction>('right');\n const prevX = useRef(0);\n\n useEffect(() => {\n const handleMouseMove = (e: MouseEvent) => {\n if (e.clientX > prevX.current) {\n setDirection((prev) => (prev !== 'right' ? 'right' : prev));\n } else if (e.clientX < prevX.current) {\n setDirection((prev) => (prev !== 'left' ? 'left' : prev));\n }\n prevX.current = e.clientX;\n };\n\n window.addEventListener('mousemove', handleMouseMove);\n return () => {\n window.removeEventListener('mousemove', handleMouseMove);\n };\n }, []);\n\n return (\n <GlobalMouseDirectionContext.Provider value={direction}>\n {children}\n </GlobalMouseDirectionContext.Provider>\n );\n});\n"],"mappings":";;;;AAIA,MAAa,8BAA8B,cAAyB,QAAQ;AAE5E,MAAa,+BAA+B,MAAM,EAAE,eAAwC;CAC1F,MAAM,CAAC,WAAW,gBAAgB,SAAoB,QAAQ;CAC9D,MAAM,QAAQ,OAAO,EAAE;AAEvB,iBAAgB;EACd,MAAM,mBAAmB,MAAkB;AACzC,OAAI,EAAE,UAAU,MAAM,QACpB,eAAc,SAAU,SAAS,UAAU,UAAU,KAAM;YAClD,EAAE,UAAU,MAAM,QAC3B,eAAc,SAAU,SAAS,SAAS,SAAS,KAAM;AAE3D,SAAM,UAAU,EAAE;;AAGpB,SAAO,iBAAiB,aAAa,gBAAgB;AACrD,eAAa;AACX,UAAO,oBAAoB,aAAa,gBAAgB;;IAEzD,EAAE,CAAC;AAEN,QACE,oBAAC,4BAA4B;EAAS,OAAO;EAC1C;GACoC;EAEzC"}
@@ -1,8 +1,8 @@
1
1
  import { ThemeProviderProps } from "./type.mjs";
2
- import * as react4 from "react";
2
+ import * as react31 from "react";
3
3
 
4
4
  //#region src/ThemeProvider/ThemeProvider.d.ts
5
- declare const ThemeProvider: react4.NamedExoticComponent<ThemeProviderProps>;
5
+ declare const ThemeProvider: react31.NamedExoticComponent<ThemeProviderProps>;
6
6
  //#endregion
7
7
  export { ThemeProvider };
8
8
  //# sourceMappingURL=ThemeProvider.d.mts.map
@@ -7,6 +7,7 @@ import { LOBE_THEME_APP_ID } from "./constants.mjs";
7
7
  import FontLoader_default from "../FontLoader/index.mjs";
8
8
  import { createLobeAntdTheme } from "../styles/theme/antdTheme.mjs";
9
9
  import ConfigProvider_default from "./ConfigProvider.mjs";
10
+ import { GlobalMouseDirectionProvider } from "./GlobalMouseDirectionContext.mjs";
10
11
  import GlobalStyle_default from "./GlobalStyle/index.mjs";
11
12
  import { memo, useCallback, useMemo } from "react";
12
13
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -59,7 +60,7 @@ const ThemeProvider$1 = memo(({ children, customStylish, customToken, enableCust
59
60
  customToken: token,
60
61
  theme,
61
62
  ...rest,
62
- children: /* @__PURE__ */ jsxs(ConfigProvider_default, { children: [enableGlobalStyle && /* @__PURE__ */ jsx(GlobalStyle_default, {}), /* @__PURE__ */ jsx(App, {
63
+ children: /* @__PURE__ */ jsxs(ConfigProvider_default, { children: [enableGlobalStyle && /* @__PURE__ */ jsx(GlobalStyle_default, {}), /* @__PURE__ */ jsx(GlobalMouseDirectionProvider, { children: /* @__PURE__ */ jsx(App, {
63
64
  className,
64
65
  style: {
65
66
  minHeight: "inherit",
@@ -71,7 +72,7 @@ const ThemeProvider$1 = memo(({ children, customStylish, customToken, enableCust
71
72
  style: { display: "contents" },
72
73
  children
73
74
  })
74
- })] })
75
+ }) })] })
75
76
  })] });
76
77
  });
77
78
  ThemeProvider$1.displayName = "LobeThemeProvider";