@lobehub/ui 1.158.1 → 1.160.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 (153) hide show
  1. package/es/A/index.js +2 -2
  2. package/es/ActionIcon/index.js +15 -11
  3. package/es/ActionIconGroup/index.js +47 -45
  4. package/es/Alert/index.js +50 -43
  5. package/es/Avatar/index.js +12 -10
  6. package/es/Burger/index.js +35 -30
  7. package/es/CodeEditor/index.js +43 -38
  8. package/es/Collapse/index.js +3 -3
  9. package/es/ColorScales/ScaleRow.js +43 -39
  10. package/es/ColorScales/index.js +59 -57
  11. package/es/ConfigProvider/index.js +5 -3
  12. package/es/ContextMenu/index.js +3 -2
  13. package/es/CopyButton/index.js +4 -3
  14. package/es/DraggablePanel/components/DraggablePanelBody.js +3 -2
  15. package/es/DraggablePanel/components/DraggablePanelContainer.js +3 -2
  16. package/es/DraggablePanel/components/DraggablePanelFooter.js +3 -2
  17. package/es/DraggablePanel/components/DraggablePanelHeader.js +9 -5
  18. package/es/DraggablePanel/index.js +32 -25
  19. package/es/EditableText/index.js +16 -13
  20. package/es/EmojiPicker/AvatarUploader.js +71 -60
  21. package/es/EmojiPicker/index.js +110 -101
  22. package/es/EmptyCard/index.js +31 -23
  23. package/es/FileTypeIcon/index.js +55 -44
  24. package/es/FluentEmoji/index.js +6 -4
  25. package/es/Footer/index.js +10 -8
  26. package/es/Form/components/FormDivider.js +2 -2
  27. package/es/Form/components/FormFlatGroup.js +9 -4
  28. package/es/Form/components/FormFooter.js +6 -3
  29. package/es/Form/components/FormGroup.js +21 -15
  30. package/es/Form/components/FormItem.js +17 -10
  31. package/es/Form/components/FormTitle.js +23 -15
  32. package/es/Form/index.js +30 -26
  33. package/es/FormModal/index.js +34 -30
  34. package/es/Grid/index.js +6 -3
  35. package/es/Header/index.js +65 -49
  36. package/es/Highlighter/FullFeatured.js +51 -41
  37. package/es/Highlighter/SyntaxHighlighter/index.js +30 -19
  38. package/es/Highlighter/index.js +29 -19
  39. package/es/Icon/icons/DiscordIcon.js +3 -2
  40. package/es/Icon/index.js +16 -13
  41. package/es/Image/ImageGallery.js +5 -3
  42. package/es/Image/Preview.js +5 -3
  43. package/es/Image/index.js +38 -34
  44. package/es/Image/usePreview.js +37 -33
  45. package/es/Img/index.js +2 -2
  46. package/es/Input/index.js +3 -3
  47. package/es/Layout/index.js +63 -35
  48. package/es/List/ListItem/index.js +67 -53
  49. package/es/Markdown/CodeBlock.js +16 -10
  50. package/es/Markdown/Typography.js +6 -3
  51. package/es/Markdown/index.js +22 -18
  52. package/es/MaterialFileTypeIcon/index.js +20 -17
  53. package/es/MaterialFileTypeIcon/utils.d.ts +2 -2
  54. package/es/Mermaid/FullFeatured.js +45 -35
  55. package/es/Mermaid/index.js +26 -17
  56. package/es/Mermaid/useMermaid.d.ts +1 -2
  57. package/es/Mermaid/useMermaid.js +5 -3
  58. package/es/Modal/index.js +60 -48
  59. package/es/SearchBar/index.js +51 -47
  60. package/es/SelectWithImg/index.js +40 -34
  61. package/es/SideNav/index.js +22 -15
  62. package/es/SliderWithInput/index.js +38 -35
  63. package/es/Snippet/index.js +15 -10
  64. package/es/SortableList/DragHandle.js +3 -3
  65. package/es/SortableList/SortableItem.js +19 -16
  66. package/es/SortableList/SortableOverlay.js +5 -3
  67. package/es/SortableList/index.js +23 -15
  68. package/es/Swatches/index.js +20 -18
  69. package/es/TabsNav/index.js +3 -2
  70. package/es/Tag/index.js +12 -7
  71. package/es/ThemeProvider/Meta.js +58 -53
  72. package/es/ThemeProvider/index.js +23 -17
  73. package/es/ThemeSwitch/index.js +19 -15
  74. package/es/Toc/TocMobile.js +52 -47
  75. package/es/Toc/index.js +13 -8
  76. package/es/Tooltip/index.js +3 -2
  77. package/es/Video/index.js +47 -41
  78. package/es/awesome/AuroraBackground/index.js +18 -11
  79. package/es/awesome/Features/Item.js +45 -37
  80. package/es/awesome/Features/index.js +4 -5
  81. package/es/awesome/GaussianBackground/index.js +13 -8
  82. package/es/awesome/Giscus/index.js +15 -13
  83. package/es/awesome/GradientButton/index.js +9 -5
  84. package/es/awesome/GridBackground/Grid.js +61 -49
  85. package/es/awesome/GridBackground/GridShowcase.js +28 -24
  86. package/es/awesome/GridBackground/index.js +33 -27
  87. package/es/awesome/Hero/index.js +74 -63
  88. package/es/awesome/Spline/ParentSize.js +8 -7
  89. package/es/awesome/Spline/index.js +13 -10
  90. package/es/awesome/Spotlight/index.js +3 -2
  91. package/es/awesome/SpotlightCard/SpotlightCardItem.js +8 -5
  92. package/es/awesome/SpotlightCard/index.js +12 -9
  93. package/es/brand/BrandLoading/index.js +3 -2
  94. package/es/brand/LobeChat/index.js +38 -29
  95. package/es/brand/LobeChatText/index.js +13 -8
  96. package/es/brand/LobeHub/index.js +38 -29
  97. package/es/brand/LobeHubText/index.js +9 -4
  98. package/es/brand/Logo3d/index.js +3 -2
  99. package/es/brand/LogoFlat/index.js +49 -44
  100. package/es/brand/LogoMono/index.js +53 -48
  101. package/es/brand/LogoThree/Loading.js +11 -9
  102. package/es/brand/LogoThree/LogoSpline.js +12 -10
  103. package/es/brand/LogoThree/index.js +25 -23
  104. package/es/brand/components/Divider.js +6 -4
  105. package/es/chat/BackBottom/index.js +6 -4
  106. package/es/chat/ChatHeader/ChatHeaderTitle.js +31 -22
  107. package/es/chat/ChatHeader/index.js +42 -35
  108. package/es/chat/ChatInputArea/ChatInputActionBar.js +21 -16
  109. package/es/chat/ChatInputArea/ChatInputArea.js +23 -19
  110. package/es/chat/ChatInputArea/ChatInputAreaInner.js +3 -2
  111. package/es/chat/ChatInputArea/SendButton.js +51 -36
  112. package/es/chat/ChatItem/components/Actions.js +5 -3
  113. package/es/chat/ChatItem/components/Avatar.js +21 -17
  114. package/es/chat/ChatItem/components/BorderSpacing.js +2 -1
  115. package/es/chat/ChatItem/components/ErrorContent.js +11 -9
  116. package/es/chat/ChatItem/components/Loading.js +12 -10
  117. package/es/chat/ChatItem/components/MessageContent.js +10 -6
  118. package/es/chat/ChatItem/components/Title.js +8 -3
  119. package/es/chat/ChatItem/index.js +53 -47
  120. package/es/chat/ChatList/ActionsBar.js +3 -2
  121. package/es/chat/ChatList/HistoryDivider.js +11 -6
  122. package/es/chat/ChatList/Item.js +12 -14
  123. package/es/chat/ChatList/index.js +29 -25
  124. package/es/chat/EditableMessage/index.js +32 -26
  125. package/es/chat/EditableMessageList/index.js +76 -72
  126. package/es/chat/MessageInput/index.js +43 -35
  127. package/es/chat/MessageModal/index.js +51 -41
  128. package/es/chat/TokenTag/index.js +11 -7
  129. package/es/components/ControlInput.js +22 -18
  130. package/es/hooks/useHighlight.d.ts +1 -1
  131. package/es/mdx/Callout/index.js +19 -13
  132. package/es/mdx/Cards/Card.js +59 -46
  133. package/es/mdx/Cards/index.js +6 -3
  134. package/es/mdx/FileTree/File.js +11 -5
  135. package/es/mdx/FileTree/Folder.js +22 -13
  136. package/es/mdx/FileTree/index.js +6 -3
  137. package/es/mdx/Mdx/index.js +9 -7
  138. package/es/mdx/Steps/index.js +6 -3
  139. package/es/mdx/Tabs/Tab.js +8 -3
  140. package/es/mdx/Tabs/index.js +21 -17
  141. package/es/mdx/mdxComponents/CodeBlock.js +14 -9
  142. package/es/mdx/mdxComponents/Image.js +2 -2
  143. package/es/mdx/mdxComponents/Link.js +3 -2
  144. package/es/mdx/mdxComponents/Pre.js +14 -7
  145. package/es/mdx/mdxComponents/Video.js +2 -2
  146. package/es/mobile/MobileChatInputArea/SendButton.js +4 -3
  147. package/es/mobile/MobileChatInputArea/index.js +79 -69
  148. package/es/mobile/MobileNavBar/MobileNavBarTitle.js +37 -26
  149. package/es/mobile/MobileNavBar/index.js +48 -41
  150. package/es/mobile/MobileSafeArea/index.js +3 -2
  151. package/es/mobile/MobileTabBar/index.js +35 -29
  152. package/es/storybook/StoryBook/index.js +26 -19
  153. package/package.json +1 -90
@@ -1,14 +1,14 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
3
  var _excluded = ["size", "style"];
5
4
  import { memo } from 'react';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
6
  var Divider = /*#__PURE__*/memo(function (_ref) {
7
7
  var _ref$size = _ref.size,
8
8
  size = _ref$size === void 0 ? '1em' : _ref$size,
9
9
  style = _ref.style,
10
10
  rest = _objectWithoutProperties(_ref, _excluded);
11
- return /*#__PURE__*/React.createElement("svg", _extends({
11
+ return /*#__PURE__*/_jsx("svg", _objectSpread(_objectSpread({
12
12
  fill: "none",
13
13
  height: size,
14
14
  shapeRendering: "geometricPrecision",
@@ -21,8 +21,10 @@ var Divider = /*#__PURE__*/memo(function (_ref) {
21
21
  }, style),
22
22
  viewBox: "0 0 24 24",
23
23
  width: size
24
- }, rest), /*#__PURE__*/React.createElement("path", {
25
- d: "M16.88 3.549L7.12 20.451"
24
+ }, rest), {}, {
25
+ children: /*#__PURE__*/_jsx("path", {
26
+ d: "M16.88 3.549L7.12 20.451"
27
+ })
26
28
  }));
27
29
  });
28
30
  export default Divider;
@@ -7,6 +7,7 @@ import { ListEnd } from 'lucide-react';
7
7
  import { memo, useEffect, useRef, useState } from 'react';
8
8
  import Icon from "../../Icon";
9
9
  import { useStyles } from "./style";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
10
11
  var BackBottom = /*#__PURE__*/memo(function (_ref) {
11
12
  var _ref$visibilityHeight = _ref.visibilityHeight,
12
13
  visibilityHeight = _ref$visibilityHeight === void 0 ? 240 : _ref$visibilityHeight,
@@ -41,15 +42,16 @@ var BackBottom = /*#__PURE__*/memo(function (_ref) {
41
42
  });
42
43
  onClick === null || onClick === void 0 || onClick(e);
43
44
  };
44
- return /*#__PURE__*/React.createElement(Button, {
45
+ return /*#__PURE__*/_jsx(Button, {
45
46
  className: cx(styles, className),
46
- icon: /*#__PURE__*/React.createElement(Icon, {
47
+ icon: /*#__PURE__*/_jsx(Icon, {
47
48
  icon: ListEnd
48
49
  }),
49
50
  onClick: scrollToBottom,
50
51
  ref: ref,
51
52
  size: 'small',
52
- style: style
53
- }, text || 'Back to bottom');
53
+ style: style,
54
+ children: text || 'Back to bottom'
55
+ });
54
56
  });
55
57
  export default BackBottom;
@@ -3,6 +3,8 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
3
3
  import { createStyles } from 'antd-style';
4
4
  import { memo } from 'react';
5
5
  import { Flexbox } from 'react-layout-kit';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
8
  var useStyles = createStyles(function (_ref) {
7
9
  var css = _ref.css,
8
10
  token = _ref.token;
@@ -21,33 +23,40 @@ var ChatHeaderTitle = /*#__PURE__*/memo(function (_ref2) {
21
23
  tag = _ref2.tag;
22
24
  var _useStyles = useStyles(),
23
25
  styles = _useStyles.styles;
24
- var tagContent = tag && /*#__PURE__*/React.createElement(Flexbox, {
26
+ var tagContent = tag && /*#__PURE__*/_jsx(Flexbox, {
25
27
  align: 'center',
26
28
  className: styles.tag,
27
- horizontal: true
28
- }, tag);
29
- if (desc) return /*#__PURE__*/React.createElement(Flexbox, {
29
+ horizontal: true,
30
+ children: tag
31
+ });
32
+ if (desc) return /*#__PURE__*/_jsxs(Flexbox, {
30
33
  className: styles.container,
31
- gap: 4
32
- }, /*#__PURE__*/React.createElement(Flexbox, {
33
- align: 'center',
34
- className: styles.titleContainer,
35
- gap: 8,
36
- horizontal: true
37
- }, /*#__PURE__*/React.createElement("div", {
38
- className: styles.titleWithDesc
39
- }, title), tagContent), /*#__PURE__*/React.createElement(Flexbox, {
40
- align: 'center',
41
- className: styles.desc,
42
- horizontal: true
43
- }, desc));
44
- return /*#__PURE__*/React.createElement(Flexbox, {
34
+ gap: 4,
35
+ children: [/*#__PURE__*/_jsxs(Flexbox, {
36
+ align: 'center',
37
+ className: styles.titleContainer,
38
+ gap: 8,
39
+ horizontal: true,
40
+ children: [/*#__PURE__*/_jsx("div", {
41
+ className: styles.titleWithDesc,
42
+ children: title
43
+ }), tagContent]
44
+ }), /*#__PURE__*/_jsx(Flexbox, {
45
+ align: 'center',
46
+ className: styles.desc,
47
+ horizontal: true,
48
+ children: desc
49
+ })]
50
+ });
51
+ return /*#__PURE__*/_jsxs(Flexbox, {
45
52
  align: 'center',
46
53
  className: styles.container,
47
54
  gap: 8,
48
- horizontal: true
49
- }, /*#__PURE__*/React.createElement("div", {
50
- className: styles.title
51
- }, title), tagContent);
55
+ horizontal: true,
56
+ children: [/*#__PURE__*/_jsx("div", {
57
+ className: styles.title,
58
+ children: title
59
+ }), tagContent]
60
+ });
52
61
  });
53
62
  export default ChatHeaderTitle;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  var _excluded = ["left", "right", "className", "styles", "gaps", "classNames", "showBackButton", "onBackClick", "children", "gap"];
6
6
  import { ChevronLeft } from 'lucide-react';
@@ -8,6 +8,8 @@ import { memo } from 'react';
8
8
  import { Flexbox } from 'react-layout-kit';
9
9
  import ActionIcon from "../../ActionIcon";
10
10
  import { useStyles } from "./style";
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
+ import { jsxs as _jsxs } from "react/jsx-runtime";
11
13
  var ChatHeader = /*#__PURE__*/memo(function (_ref) {
12
14
  var left = _ref.left,
13
15
  right = _ref.right,
@@ -24,45 +26,50 @@ var ChatHeader = /*#__PURE__*/memo(function (_ref) {
24
26
  var _useStyles = useStyles(),
25
27
  cx = _useStyles.cx,
26
28
  styles = _useStyles.styles;
27
- return /*#__PURE__*/React.createElement(Flexbox, _extends({
29
+ return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
28
30
  align: 'center',
29
31
  className: cx(styles.container, className),
30
32
  distribution: 'space-between',
31
33
  gap: gap,
32
34
  horizontal: true,
33
35
  paddingInline: 16
34
- }, rest), /*#__PURE__*/React.createElement(Flexbox, {
35
- align: 'center',
36
- className: cx(styles.left, classNames === null || classNames === void 0 ? void 0 : classNames.left),
37
- gap: (gaps === null || gaps === void 0 ? void 0 : gaps.left) || 12,
38
- horizontal: true,
39
- justify: 'flex-start',
40
- style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.left
41
- }, showBackButton && /*#__PURE__*/React.createElement(ActionIcon, {
42
- icon: ChevronLeft,
43
- onClick: function onClick() {
44
- return onBackClick === null || onBackClick === void 0 ? void 0 : onBackClick();
45
- },
46
- size: {
47
- fontSize: 24
48
- },
49
- style: {
50
- marginRight: gaps !== null && gaps !== void 0 && gaps.left ? -gaps.left / 2 : -6
51
- }
52
- }), left), children && /*#__PURE__*/React.createElement(Flexbox, {
53
- align: 'center',
54
- className: cx(styles.center, classNames === null || classNames === void 0 ? void 0 : classNames.center),
55
- gap: (gaps === null || gaps === void 0 ? void 0 : gaps.center) || 8,
56
- horizontal: true,
57
- justify: 'center',
58
- style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.center
59
- }, children), /*#__PURE__*/React.createElement(Flexbox, {
60
- align: 'center',
61
- className: cx(styles.right, classNames === null || classNames === void 0 ? void 0 : classNames.right),
62
- gap: (gaps === null || gaps === void 0 ? void 0 : gaps.right) || 8,
63
- horizontal: true,
64
- justify: 'flex-end',
65
- style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.right
66
- }, right));
36
+ }, rest), {}, {
37
+ children: [/*#__PURE__*/_jsxs(Flexbox, {
38
+ align: 'center',
39
+ className: cx(styles.left, classNames === null || classNames === void 0 ? void 0 : classNames.left),
40
+ gap: (gaps === null || gaps === void 0 ? void 0 : gaps.left) || 12,
41
+ horizontal: true,
42
+ justify: 'flex-start',
43
+ style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.left,
44
+ children: [showBackButton && /*#__PURE__*/_jsx(ActionIcon, {
45
+ icon: ChevronLeft,
46
+ onClick: function onClick() {
47
+ return onBackClick === null || onBackClick === void 0 ? void 0 : onBackClick();
48
+ },
49
+ size: {
50
+ fontSize: 24
51
+ },
52
+ style: {
53
+ marginRight: gaps !== null && gaps !== void 0 && gaps.left ? -gaps.left / 2 : -6
54
+ }
55
+ }), left]
56
+ }), children && /*#__PURE__*/_jsx(Flexbox, {
57
+ align: 'center',
58
+ className: cx(styles.center, classNames === null || classNames === void 0 ? void 0 : classNames.center),
59
+ gap: (gaps === null || gaps === void 0 ? void 0 : gaps.center) || 8,
60
+ horizontal: true,
61
+ justify: 'center',
62
+ style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.center,
63
+ children: children
64
+ }), /*#__PURE__*/_jsx(Flexbox, {
65
+ align: 'center',
66
+ className: cx(styles.right, classNames === null || classNames === void 0 ? void 0 : classNames.right),
67
+ gap: (gaps === null || gaps === void 0 ? void 0 : gaps.right) || 8,
68
+ horizontal: true,
69
+ justify: 'flex-end',
70
+ style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.right,
71
+ children: right
72
+ })]
73
+ }));
67
74
  });
68
75
  export default ChatHeader;
@@ -3,6 +3,8 @@ var _templateObject, _templateObject2, _templateObject3;
3
3
  import { createStyles, useResponsive } from 'antd-style';
4
4
  import { memo } from 'react';
5
5
  import { Flexbox } from 'react-layout-kit';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
8
  var useStyles = createStyles(function (_ref) {
7
9
  var css = _ref.css,
8
10
  cx = _ref.cx,
@@ -22,26 +24,29 @@ var ChatInputActionBar = /*#__PURE__*/memo(function (_ref2) {
22
24
  mobile = _useResponsive.mobile;
23
25
  var _useStyles = useStyles(),
24
26
  styles = _useStyles.styles;
25
- return /*#__PURE__*/React.createElement(Flexbox, {
27
+ return /*#__PURE__*/_jsxs(Flexbox, {
26
28
  align: 'center',
27
29
  className: styles.container,
28
30
  flex: 'none',
29
31
  horizontal: true,
30
32
  justify: 'space-between',
31
- padding: padding
32
- }, /*#__PURE__*/React.createElement(Flexbox, {
33
- align: 'center',
34
- className: styles.left,
35
- flex: 1,
36
- gap: mobile ? 0 : 4,
37
- horizontal: true
38
- }, leftAddons), /*#__PURE__*/React.createElement(Flexbox, {
39
- align: 'center',
40
- className: styles.right,
41
- flex: 0,
42
- gap: mobile ? 0 : 4,
43
- horizontal: true,
44
- justify: 'flex-end'
45
- }, rightAddons));
33
+ padding: padding,
34
+ children: [/*#__PURE__*/_jsx(Flexbox, {
35
+ align: 'center',
36
+ className: styles.left,
37
+ flex: 1,
38
+ gap: mobile ? 0 : 4,
39
+ horizontal: true,
40
+ children: leftAddons
41
+ }), /*#__PURE__*/_jsx(Flexbox, {
42
+ align: 'center',
43
+ className: styles.right,
44
+ flex: 0,
45
+ gap: mobile ? 0 : 4,
46
+ horizontal: true,
47
+ justify: 'flex-end',
48
+ children: rightAddons
49
+ })]
50
+ });
46
51
  });
47
52
  export default ChatInputActionBar;
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
3
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
@@ -8,6 +7,8 @@ import { createStyles } from 'antd-style';
8
7
  import { forwardRef, memo } from 'react';
9
8
  import DraggablePanel from "../../DraggablePanel";
10
9
  import ChatInputAreaInner from "./ChatInputAreaInner";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ import { jsxs as _jsxs } from "react/jsx-runtime";
11
12
  var useStyles = createStyles(function (_ref) {
12
13
  var css = _ref.css;
13
14
  return {
@@ -31,7 +32,7 @@ var ChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
31
32
  rest = _objectWithoutProperties(_ref2, _excluded);
32
33
  var _useStyles = useStyles(),
33
34
  styles = _useStyles.styles;
34
- return /*#__PURE__*/React.createElement(DraggablePanel, {
35
+ return /*#__PURE__*/_jsx(DraggablePanel, {
35
36
  className: className,
36
37
  classNames: classNames,
37
38
  fullscreen: expand,
@@ -46,22 +47,25 @@ var ChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
46
47
  },
47
48
  style: _objectSpread({
48
49
  zIndex: 10
49
- }, style)
50
- }, /*#__PURE__*/React.createElement("section", {
51
- className: styles.container,
52
- style: {
53
- minHeight: heights === null || heights === void 0 ? void 0 : heights.minHeight
54
- }
55
- }, topAddons, /*#__PURE__*/React.createElement("div", {
56
- className: styles.textareaContainer
57
- }, /*#__PURE__*/React.createElement(ChatInputAreaInner, _extends({
58
- className: styles.textarea,
59
- onSend: function onSend() {
60
- _onSend === null || _onSend === void 0 || _onSend();
61
- setExpand === null || setExpand === void 0 || setExpand(false);
62
- },
63
- ref: ref,
64
- type: 'pure'
65
- }, rest))), bottomAddons));
50
+ }, style),
51
+ children: /*#__PURE__*/_jsxs("section", {
52
+ className: styles.container,
53
+ style: {
54
+ minHeight: heights === null || heights === void 0 ? void 0 : heights.minHeight
55
+ },
56
+ children: [topAddons, /*#__PURE__*/_jsx("div", {
57
+ className: styles.textareaContainer,
58
+ children: /*#__PURE__*/_jsx(ChatInputAreaInner, _objectSpread({
59
+ className: styles.textarea,
60
+ onSend: function onSend() {
61
+ _onSend === null || _onSend === void 0 || _onSend();
62
+ setExpand === null || setExpand === void 0 || setExpand(false);
63
+ },
64
+ ref: ref,
65
+ type: 'pure'
66
+ }, rest))
67
+ }), bottomAddons]
68
+ })
69
+ });
66
70
  });
67
71
  export default /*#__PURE__*/memo(ChatInputArea);
@@ -1,8 +1,9 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  var _excluded = ["resize", "onCompositionEnd", "onPressEnter", "onCompositionStart", "className", "onInput", "loading", "onSend", "onBlur", "onChange"];
4
4
  import { forwardRef, memo, useRef } from 'react';
5
5
  import { TextArea } from "../../Input";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
6
7
  var ChatInputAreaInner = /*#__PURE__*/forwardRef(function (_ref, ref) {
7
8
  var _ref$resize = _ref.resize,
8
9
  resize = _ref$resize === void 0 ? false : _ref$resize,
@@ -17,7 +18,7 @@ var ChatInputAreaInner = /*#__PURE__*/forwardRef(function (_ref, ref) {
17
18
  _onChange = _ref.onChange,
18
19
  rest = _objectWithoutProperties(_ref, _excluded);
19
20
  var isChineseInput = useRef(false);
20
- return /*#__PURE__*/React.createElement(TextArea, _extends({
21
+ return /*#__PURE__*/_jsx(TextArea, _objectSpread({
21
22
  className: className,
22
23
  onBlur: function onBlur(e) {
23
24
  onInput === null || onInput === void 0 || onInput(e.target.value);
@@ -4,6 +4,8 @@ import { ArrowBigUp, CornerDownLeft, Loader2 } from 'lucide-react';
4
4
  import { memo } from 'react';
5
5
  import { Flexbox } from 'react-layout-kit';
6
6
  import Icon from "../../Icon";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ import { jsxs as _jsxs } from "react/jsx-runtime";
7
9
  var ChatSendButton = /*#__PURE__*/memo(function (_ref) {
8
10
  var className = _ref.className,
9
11
  style = _ref.style,
@@ -14,7 +16,7 @@ var ChatSendButton = /*#__PURE__*/memo(function (_ref) {
14
16
  loading = _ref.loading,
15
17
  onStop = _ref.onStop;
16
18
  var theme = useTheme();
17
- return /*#__PURE__*/React.createElement(Flexbox, {
19
+ return /*#__PURE__*/_jsxs(Flexbox, {
18
20
  align: 'end',
19
21
  className: className,
20
22
  distribution: 'space-between',
@@ -22,40 +24,53 @@ var ChatSendButton = /*#__PURE__*/memo(function (_ref) {
22
24
  gap: 8,
23
25
  horizontal: true,
24
26
  padding: '0 24px',
25
- style: style
26
- }, /*#__PURE__*/React.createElement(Flexbox, {
27
- align: 'center',
28
- gap: 8,
29
- horizontal: true
30
- }, leftAddons), /*#__PURE__*/React.createElement(Flexbox, {
31
- align: 'center',
32
- gap: 8,
33
- horizontal: true
34
- }, /*#__PURE__*/React.createElement(Flexbox, {
35
- gap: 4,
36
- horizontal: true,
37
- style: {
38
- color: theme.colorTextDescription,
39
- fontSize: 12,
40
- marginRight: 12
41
- }
42
- }, /*#__PURE__*/React.createElement(Icon, {
43
- icon: CornerDownLeft
44
- }), /*#__PURE__*/React.createElement("span", null, (texts === null || texts === void 0 ? void 0 : texts.send) || 'Send'), /*#__PURE__*/React.createElement("span", null, "/"), /*#__PURE__*/React.createElement(Flexbox, {
45
- horizontal: true
46
- }, /*#__PURE__*/React.createElement(Icon, {
47
- icon: ArrowBigUp
48
- }), /*#__PURE__*/React.createElement(Icon, {
49
- icon: CornerDownLeft
50
- })), /*#__PURE__*/React.createElement("span", null, (texts === null || texts === void 0 ? void 0 : texts.warp) || 'Warp')), rightAddons, loading ? /*#__PURE__*/React.createElement(Button, {
51
- icon: loading && /*#__PURE__*/React.createElement(Icon, {
52
- icon: Loader2,
53
- spin: true
54
- }),
55
- onClick: onStop
56
- }, (texts === null || texts === void 0 ? void 0 : texts.stop) || 'Stop') : /*#__PURE__*/React.createElement(Button, {
57
- onClick: onSend,
58
- type: 'primary'
59
- }, (texts === null || texts === void 0 ? void 0 : texts.send) || 'Send')));
27
+ style: style,
28
+ children: [/*#__PURE__*/_jsx(Flexbox, {
29
+ align: 'center',
30
+ gap: 8,
31
+ horizontal: true,
32
+ children: leftAddons
33
+ }), /*#__PURE__*/_jsxs(Flexbox, {
34
+ align: 'center',
35
+ gap: 8,
36
+ horizontal: true,
37
+ children: [/*#__PURE__*/_jsxs(Flexbox, {
38
+ gap: 4,
39
+ horizontal: true,
40
+ style: {
41
+ color: theme.colorTextDescription,
42
+ fontSize: 12,
43
+ marginRight: 12
44
+ },
45
+ children: [/*#__PURE__*/_jsx(Icon, {
46
+ icon: CornerDownLeft
47
+ }), /*#__PURE__*/_jsx("span", {
48
+ children: (texts === null || texts === void 0 ? void 0 : texts.send) || 'Send'
49
+ }), /*#__PURE__*/_jsx("span", {
50
+ children: "/"
51
+ }), /*#__PURE__*/_jsxs(Flexbox, {
52
+ horizontal: true,
53
+ children: [/*#__PURE__*/_jsx(Icon, {
54
+ icon: ArrowBigUp
55
+ }), /*#__PURE__*/_jsx(Icon, {
56
+ icon: CornerDownLeft
57
+ })]
58
+ }), /*#__PURE__*/_jsx("span", {
59
+ children: (texts === null || texts === void 0 ? void 0 : texts.warp) || 'Warp'
60
+ })]
61
+ }), rightAddons, loading ? /*#__PURE__*/_jsx(Button, {
62
+ icon: loading && /*#__PURE__*/_jsx(Icon, {
63
+ icon: Loader2,
64
+ spin: true
65
+ }),
66
+ onClick: onStop,
67
+ children: (texts === null || texts === void 0 ? void 0 : texts.stop) || 'Stop'
68
+ }) : /*#__PURE__*/_jsx(Button, {
69
+ onClick: onSend,
70
+ type: 'primary',
71
+ children: (texts === null || texts === void 0 ? void 0 : texts.send) || 'Send'
72
+ })]
73
+ })]
74
+ });
60
75
  });
61
76
  export default ChatSendButton;
@@ -1,6 +1,7 @@
1
1
  import { memo } from 'react';
2
2
  import { Flexbox } from 'react-layout-kit';
3
3
  import { useStyles } from "../style";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
4
5
  var Actions = /*#__PURE__*/memo(function (_ref) {
5
6
  var actions = _ref.actions,
6
7
  placement = _ref.placement,
@@ -12,10 +13,11 @@ var Actions = /*#__PURE__*/memo(function (_ref) {
12
13
  type: type
13
14
  }),
14
15
  styles = _useStyles.styles;
15
- return /*#__PURE__*/React.createElement(Flexbox, {
16
+ return /*#__PURE__*/_jsx(Flexbox, {
16
17
  align: 'flex-start',
17
18
  className: styles.actions,
18
- role: "menubar"
19
- }, actions);
19
+ role: "menubar",
20
+ children: actions
21
+ });
20
22
  });
21
23
  export default Actions;
@@ -3,6 +3,8 @@ import { Flexbox } from 'react-layout-kit';
3
3
  import A from "../../../Avatar";
4
4
  import { useStyles } from "../style";
5
5
  import Loading from "./Loading";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
8
  var Avatar = /*#__PURE__*/memo(function (_ref) {
7
9
  var loading = _ref.loading,
8
10
  avatar = _ref.avatar,
@@ -16,25 +18,27 @@ var Avatar = /*#__PURE__*/memo(function (_ref) {
16
18
  avatarSize: size
17
19
  }),
18
20
  styles = _useStyles.styles;
19
- var avatarContent = /*#__PURE__*/React.createElement("div", {
20
- className: styles.avatarContainer
21
- }, /*#__PURE__*/React.createElement(A, {
22
- animation: loading,
23
- avatar: avatar.avatar,
24
- background: avatar.backgroundColor,
25
- onClick: onClick,
26
- size: size,
27
- title: avatar.title,
28
- unoptimized: unoptimized
29
- }), /*#__PURE__*/React.createElement(Loading, {
30
- loading: loading,
31
- placement: placement
32
- }));
21
+ var avatarContent = /*#__PURE__*/_jsxs("div", {
22
+ className: styles.avatarContainer,
23
+ children: [/*#__PURE__*/_jsx(A, {
24
+ animation: loading,
25
+ avatar: avatar.avatar,
26
+ background: avatar.backgroundColor,
27
+ onClick: onClick,
28
+ size: size,
29
+ title: avatar.title,
30
+ unoptimized: unoptimized
31
+ }), /*#__PURE__*/_jsx(Loading, {
32
+ loading: loading,
33
+ placement: placement
34
+ })]
35
+ });
33
36
  if (!addon) return avatarContent;
34
- return /*#__PURE__*/React.createElement(Flexbox, {
37
+ return /*#__PURE__*/_jsxs(Flexbox, {
35
38
  align: 'center',
36
39
  className: styles.avatarGroupContainer,
37
- gap: 8
38
- }, avatarContent, addon);
40
+ gap: 8,
41
+ children: [avatarContent, addon]
42
+ });
39
43
  });
40
44
  export default Avatar;
@@ -1,8 +1,9 @@
1
1
  import { memo } from 'react';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
2
3
  var BorderSpacing = /*#__PURE__*/memo(function (_ref) {
3
4
  var borderSpacing = _ref.borderSpacing;
4
5
  if (!borderSpacing) return null;
5
- return /*#__PURE__*/React.createElement("div", {
6
+ return /*#__PURE__*/_jsx("div", {
6
7
  style: {
7
8
  flex: 'none',
8
9
  width: borderSpacing
@@ -1,8 +1,9 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import { memo } from 'react';
3
3
  import { Flexbox } from 'react-layout-kit';
4
4
  import Alert from "../../../Alert";
5
5
  import { useStyles } from "../style";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
6
7
  var ErrorContent = /*#__PURE__*/memo(function (_ref) {
7
8
  var message = _ref.message,
8
9
  error = _ref.error,
@@ -11,13 +12,14 @@ var ErrorContent = /*#__PURE__*/memo(function (_ref) {
11
12
  placement: placement
12
13
  }),
13
14
  styles = _useStyles.styles;
14
- return /*#__PURE__*/React.createElement(Flexbox, {
15
- className: styles.errorContainer
16
- }, /*#__PURE__*/React.createElement(Alert, _extends({
17
- closable: false,
18
- extra: message,
19
- showIcon: true,
20
- type: 'error'
21
- }, error)));
15
+ return /*#__PURE__*/_jsx(Flexbox, {
16
+ className: styles.errorContainer,
17
+ children: /*#__PURE__*/_jsx(Alert, _objectSpread({
18
+ closable: false,
19
+ extra: message,
20
+ showIcon: true,
21
+ type: 'error'
22
+ }, error))
23
+ });
22
24
  });
23
25
  export default ErrorContent;
@@ -3,6 +3,7 @@ import { memo } from 'react';
3
3
  import { Flexbox } from 'react-layout-kit';
4
4
  import Icon from "../../../Icon";
5
5
  import { useStyles } from "../style";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
6
7
  var Loading = /*#__PURE__*/memo(function (_ref) {
7
8
  var loading = _ref.loading,
8
9
  placement = _ref.placement;
@@ -11,17 +12,18 @@ var Loading = /*#__PURE__*/memo(function (_ref) {
11
12
  }),
12
13
  styles = _useStyles.styles;
13
14
  if (!loading) return null;
14
- return /*#__PURE__*/React.createElement(Flexbox, {
15
+ return /*#__PURE__*/_jsx(Flexbox, {
15
16
  align: 'center',
16
17
  className: styles.loading,
17
- justify: 'center'
18
- }, /*#__PURE__*/React.createElement(Icon, {
19
- icon: Loader2,
20
- size: {
21
- fontSize: 12,
22
- strokeWidth: 3
23
- },
24
- spin: true
25
- }));
18
+ justify: 'center',
19
+ children: /*#__PURE__*/_jsx(Icon, {
20
+ icon: Loader2,
21
+ size: {
22
+ fontSize: 12,
23
+ strokeWidth: 3
24
+ },
25
+ spin: true
26
+ })
27
+ });
26
28
  });
27
29
  export default Loading;