@lobehub/ui 1.157.0 → 1.158.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 (158) hide show
  1. package/es/A/index.js +2 -2
  2. package/es/ActionIcon/index.js +11 -15
  3. package/es/ActionIconGroup/index.js +45 -47
  4. package/es/Alert/index.js +43 -50
  5. package/es/Avatar/index.js +10 -12
  6. package/es/Burger/index.js +30 -35
  7. package/es/CodeEditor/index.js +38 -41
  8. package/es/Collapse/index.js +3 -3
  9. package/es/ColorScales/ScaleRow.js +39 -43
  10. package/es/ColorScales/index.js +57 -59
  11. package/es/ConfigProvider/index.js +3 -5
  12. package/es/ContextMenu/index.js +2 -3
  13. package/es/CopyButton/index.js +3 -4
  14. package/es/DraggablePanel/components/DraggablePanelBody.js +2 -3
  15. package/es/DraggablePanel/components/DraggablePanelContainer.js +2 -3
  16. package/es/DraggablePanel/components/DraggablePanelFooter.js +2 -3
  17. package/es/DraggablePanel/components/DraggablePanelHeader.js +5 -9
  18. package/es/DraggablePanel/index.js +28 -35
  19. package/es/EditableText/index.js +13 -16
  20. package/es/EmojiPicker/AvatarUploader.js +60 -71
  21. package/es/EmojiPicker/index.js +101 -110
  22. package/es/EmptyCard/index.js +23 -31
  23. package/es/FileTypeIcon/index.js +44 -55
  24. package/es/FluentEmoji/index.js +4 -6
  25. package/es/Footer/index.js +8 -10
  26. package/es/Form/components/FormDivider.js +2 -2
  27. package/es/Form/components/FormFlatGroup.js +4 -9
  28. package/es/Form/components/FormFooter.js +3 -6
  29. package/es/Form/components/FormGroup.js +15 -21
  30. package/es/Form/components/FormItem.js +10 -17
  31. package/es/Form/components/FormTitle.js +15 -23
  32. package/es/Form/index.js +26 -30
  33. package/es/FormModal/index.js +30 -34
  34. package/es/Grid/index.js +3 -6
  35. package/es/Header/index.js +49 -65
  36. package/es/Highlighter/FullFeatured.js +41 -51
  37. package/es/Highlighter/SyntaxHighlighter/index.js +19 -30
  38. package/es/Highlighter/index.js +23 -32
  39. package/es/Icon/icons/DiscordIcon.js +2 -3
  40. package/es/Icon/index.js +13 -16
  41. package/es/Image/ImageGallery.js +3 -5
  42. package/es/Image/Preview.js +5 -6
  43. package/es/Image/index.js +34 -38
  44. package/es/Image/usePreview.js +33 -37
  45. package/es/Img/index.js +2 -2
  46. package/es/Input/index.js +3 -3
  47. package/es/Layout/index.js +35 -63
  48. package/es/List/ListItem/index.js +53 -67
  49. package/es/Markdown/CodeBlock.js +10 -16
  50. package/es/Markdown/Typography.js +3 -6
  51. package/es/Markdown/index.js +18 -22
  52. package/es/MaterialFileTypeIcon/index.js +17 -20
  53. package/es/MaterialFileTypeIcon/utils.d.ts +2 -2
  54. package/es/Mermaid/FullFeatured.js +35 -45
  55. package/es/Mermaid/index.js +17 -26
  56. package/es/Mermaid/useMermaid.d.ts +2 -1
  57. package/es/Mermaid/useMermaid.js +3 -5
  58. package/es/Modal/index.js +48 -60
  59. package/es/SearchBar/index.js +48 -52
  60. package/es/SelectWithImg/index.js +34 -40
  61. package/es/SideNav/index.js +15 -22
  62. package/es/SliderWithInput/index.js +35 -38
  63. package/es/Snippet/index.js +11 -15
  64. package/es/SortableList/DragHandle.js +3 -3
  65. package/es/SortableList/SortableItem.js +16 -19
  66. package/es/SortableList/SortableOverlay.js +3 -5
  67. package/es/SortableList/index.js +15 -23
  68. package/es/Swatches/index.js +18 -20
  69. package/es/TabsNav/index.js +2 -3
  70. package/es/Tag/index.js +7 -12
  71. package/es/ThemeProvider/Meta.js +53 -58
  72. package/es/ThemeProvider/index.js +17 -23
  73. package/es/ThemeSwitch/index.js +15 -19
  74. package/es/Toc/TocMobile.js +47 -52
  75. package/es/Toc/index.js +8 -13
  76. package/es/Tooltip/index.js +2 -3
  77. package/es/Video/index.js +41 -47
  78. package/es/awesome/AuroraBackground/index.js +11 -18
  79. package/es/awesome/Features/Item.js +37 -45
  80. package/es/awesome/Features/index.js +5 -4
  81. package/es/awesome/GaussianBackground/index.js +8 -13
  82. package/es/awesome/GaussianBackground/useGaussianBackground.d.ts +1 -1
  83. package/es/awesome/GaussianBackground/useGaussianBackground.js +1 -1
  84. package/es/awesome/Giscus/index.js +13 -15
  85. package/es/awesome/GradientButton/index.js +5 -9
  86. package/es/awesome/GridBackground/Grid.js +49 -61
  87. package/es/awesome/GridBackground/GridShowcase.js +24 -28
  88. package/es/awesome/GridBackground/index.js +27 -33
  89. package/es/awesome/Hero/index.js +63 -74
  90. package/es/awesome/Spline/ParentSize.js +7 -8
  91. package/es/awesome/Spline/index.js +10 -13
  92. package/es/awesome/Spotlight/index.js +3 -4
  93. package/es/awesome/SpotlightCard/SpotlightCardItem.js +5 -8
  94. package/es/awesome/SpotlightCard/index.js +9 -12
  95. package/es/brand/BrandLoading/index.js +2 -3
  96. package/es/brand/LobeChat/index.js +29 -38
  97. package/es/brand/LobeChatText/index.js +8 -13
  98. package/es/brand/LobeHub/index.js +29 -38
  99. package/es/brand/LobeHubText/index.js +4 -9
  100. package/es/brand/Logo3d/index.js +2 -3
  101. package/es/brand/LogoFlat/index.js +44 -49
  102. package/es/brand/LogoMono/index.js +48 -53
  103. package/es/brand/LogoThree/Loading.js +9 -11
  104. package/es/brand/LogoThree/LogoSpline.js +10 -12
  105. package/es/brand/LogoThree/index.js +23 -25
  106. package/es/brand/components/Divider.js +4 -6
  107. package/es/chat/BackBottom/index.js +4 -6
  108. package/es/chat/ChatHeader/ChatHeaderTitle.js +22 -31
  109. package/es/chat/ChatHeader/index.js +35 -42
  110. package/es/chat/ChatInputArea/ChatInputActionBar.js +16 -21
  111. package/es/chat/ChatInputArea/ChatInputArea.d.ts +1 -1
  112. package/es/chat/ChatInputArea/ChatInputArea.js +19 -23
  113. package/es/chat/ChatInputArea/ChatInputAreaInner.d.ts +1 -1
  114. package/es/chat/ChatInputArea/ChatInputAreaInner.js +2 -3
  115. package/es/chat/ChatInputArea/SendButton.js +36 -51
  116. package/es/chat/ChatItem/components/Actions.js +3 -5
  117. package/es/chat/ChatItem/components/Avatar.js +17 -21
  118. package/es/chat/ChatItem/components/BorderSpacing.js +1 -2
  119. package/es/chat/ChatItem/components/ErrorContent.js +9 -11
  120. package/es/chat/ChatItem/components/Loading.js +10 -12
  121. package/es/chat/ChatItem/components/MessageContent.js +6 -10
  122. package/es/chat/ChatItem/components/Title.js +3 -8
  123. package/es/chat/ChatItem/index.js +47 -53
  124. package/es/chat/ChatList/ActionsBar.js +2 -3
  125. package/es/chat/ChatList/HistoryDivider.js +6 -11
  126. package/es/chat/ChatList/Item.js +14 -12
  127. package/es/chat/ChatList/index.js +25 -29
  128. package/es/chat/EditableMessage/index.js +26 -32
  129. package/es/chat/EditableMessageList/index.js +72 -76
  130. package/es/chat/MessageInput/index.js +35 -43
  131. package/es/chat/MessageModal/index.js +41 -51
  132. package/es/chat/TokenTag/index.js +7 -11
  133. package/es/components/ControlInput.js +18 -22
  134. package/es/hooks/useHighlight.d.ts +1 -1
  135. package/es/mdx/Callout/index.js +13 -19
  136. package/es/mdx/Cards/Card.js +46 -59
  137. package/es/mdx/Cards/index.js +3 -6
  138. package/es/mdx/FileTree/File.js +5 -11
  139. package/es/mdx/FileTree/Folder.js +13 -22
  140. package/es/mdx/FileTree/index.js +3 -6
  141. package/es/mdx/Mdx/index.d.ts +1 -0
  142. package/es/mdx/Mdx/index.js +24 -11
  143. package/es/mdx/Steps/index.js +3 -6
  144. package/es/mdx/Tabs/Tab.js +3 -8
  145. package/es/mdx/Tabs/index.js +17 -21
  146. package/es/mdx/mdxComponents/CodeBlock.js +9 -14
  147. package/es/mdx/mdxComponents/Image.js +2 -2
  148. package/es/mdx/mdxComponents/Link.js +2 -3
  149. package/es/mdx/mdxComponents/Pre.js +7 -14
  150. package/es/mdx/mdxComponents/Video.js +2 -2
  151. package/es/mobile/MobileChatInputArea/SendButton.js +3 -4
  152. package/es/mobile/MobileChatInputArea/index.js +69 -79
  153. package/es/mobile/MobileNavBar/MobileNavBarTitle.js +26 -37
  154. package/es/mobile/MobileNavBar/index.js +41 -48
  155. package/es/mobile/MobileSafeArea/index.js +2 -3
  156. package/es/mobile/MobileTabBar/index.js +29 -35
  157. package/es/storybook/StoryBook/index.js +19 -26
  158. package/package.json +41 -45
@@ -5,8 +5,6 @@ import { memo } from 'react';
5
5
  import { Flexbox } from 'react-layout-kit';
6
6
  import { copyToClipboard } from "../utils/copyToClipboard";
7
7
  import { alphaBg, useStyles } from "./style";
8
- import { jsx as _jsx } from "react/jsx-runtime";
9
- import { jsxs as _jsxs } from "react/jsx-runtime";
10
8
  var ScaleRow = /*#__PURE__*/memo(function (_ref) {
11
9
  var name = _ref.name,
12
10
  title = _ref.title,
@@ -39,47 +37,45 @@ var ScaleRow = /*#__PURE__*/memo(function (_ref) {
39
37
  break;
40
38
  }
41
39
  }
42
- return /*#__PURE__*/_jsxs(Space, {
43
- size: 2,
44
- children: [/*#__PURE__*/_jsx("div", {
45
- className: styles.scaleRowTitle,
46
- children: /*#__PURE__*/_jsx("div", {
47
- className: styles.text,
48
- children: title
49
- })
50
- }, title), scale.map(function (color, index) {
51
- if (index === 0 || index === 12) return false;
52
- return /*#__PURE__*/_jsx("div", {
53
- className: styles.scaleBox,
54
- onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
55
- var content;
56
- return _regeneratorRuntime().wrap(function _callee$(_context) {
57
- while (1) switch (_context.prev = _context.next) {
58
- case 0:
59
- content = "token.".concat(name).concat(index).concat(isAlpha ? 'A' : '', " /* ").concat(color, " */");
60
- _context.next = 3;
61
- return copyToClipboard(content);
62
- case 3:
63
- message.success(content);
64
- case 4:
65
- case "end":
66
- return _context.stop();
67
- }
68
- }, _callee);
69
- })),
70
- style: style,
71
- title: color,
72
- children: /*#__PURE__*/_jsx(Flexbox, {
73
- align: 'center',
74
- className: styles.scaleItem,
75
- horizontal: true,
76
- justify: 'center',
77
- style: {
78
- backgroundColor: color
40
+ return /*#__PURE__*/React.createElement(Space, {
41
+ size: 2
42
+ }, /*#__PURE__*/React.createElement("div", {
43
+ className: styles.scaleRowTitle,
44
+ key: title
45
+ }, /*#__PURE__*/React.createElement("div", {
46
+ className: styles.text
47
+ }, title)), scale.map(function (color, index) {
48
+ if (index === 0 || index === 12) return false;
49
+ return /*#__PURE__*/React.createElement("div", {
50
+ className: styles.scaleBox,
51
+ key: index,
52
+ onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
53
+ var content;
54
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
55
+ while (1) switch (_context.prev = _context.next) {
56
+ case 0:
57
+ content = "token.".concat(name).concat(index).concat(isAlpha ? 'A' : '', " /* ").concat(color, " */");
58
+ _context.next = 3;
59
+ return copyToClipboard(content);
60
+ case 3:
61
+ message.success(content);
62
+ case 4:
63
+ case "end":
64
+ return _context.stop();
79
65
  }
80
- })
81
- }, index);
82
- })]
83
- });
66
+ }, _callee);
67
+ })),
68
+ style: style,
69
+ title: color
70
+ }, /*#__PURE__*/React.createElement(Flexbox, {
71
+ align: 'center',
72
+ className: styles.scaleItem,
73
+ horizontal: true,
74
+ justify: 'center',
75
+ style: {
76
+ backgroundColor: color
77
+ }
78
+ }));
79
+ }));
84
80
  });
85
81
  export default ScaleRow;
@@ -5,74 +5,72 @@ import { memo } from 'react';
5
5
  import { Flexbox } from 'react-layout-kit';
6
6
  import ScaleRow from "./ScaleRow";
7
7
  import { useStyles } from "./style";
8
- import { jsx as _jsx } from "react/jsx-runtime";
9
- import { jsxs as _jsxs } from "react/jsx-runtime";
10
8
  var ColorScales = /*#__PURE__*/memo(function (_ref) {
11
9
  var name = _ref.name,
12
10
  scale = _ref.scale,
13
11
  midHighLight = _ref.midHighLight;
14
12
  var _useStyles = useStyles(),
15
13
  styles = _useStyles.styles;
16
- return /*#__PURE__*/_jsx(Flexbox, {
14
+ return /*#__PURE__*/React.createElement(Flexbox, {
17
15
  align: 'center',
18
16
  flex: 1,
19
17
  horizontal: true,
20
- justify: 'center',
21
- children: /*#__PURE__*/_jsx("div", {
18
+ justify: 'center'
19
+ }, /*#__PURE__*/React.createElement("div", {
20
+ style: {
21
+ padding: '8px 16px 32px 0'
22
+ }
23
+ }, /*#__PURE__*/React.createElement(Space, {
24
+ direction: 'vertical',
25
+ size: 2
26
+ }, /*#__PURE__*/React.createElement(Space, {
27
+ key: "scale-title",
28
+ size: 2
29
+ }, /*#__PURE__*/React.createElement(Flexbox, {
30
+ align: 'center',
31
+ className: styles.scaleRowTitle,
32
+ horizontal: true,
33
+ key: "scale-num"
34
+ }), Array.from({
35
+ length: scale.light.length
36
+ }).fill('').map(function (_, index) {
37
+ if (index === 0 || index === 12) return false;
38
+ var isMidHighlight = midHighLight === index;
39
+ return /*#__PURE__*/React.createElement("div", {
40
+ className: styles.scaleBox,
41
+ key: "num".concat(index)
42
+ }, /*#__PURE__*/React.createElement("div", {
43
+ className: styles.scaleBox
44
+ }, /*#__PURE__*/React.createElement(Flexbox, {
45
+ align: 'center',
46
+ className: styles.scaleItem,
47
+ horizontal: true,
48
+ justify: 'center',
22
49
  style: {
23
- padding: '8px 16px 32px 0'
24
- },
25
- children: /*#__PURE__*/_jsxs(Space, {
26
- direction: 'vertical',
27
- size: 2,
28
- children: [/*#__PURE__*/_jsxs(Space, {
29
- size: 2,
30
- children: [/*#__PURE__*/_jsx(Flexbox, {
31
- align: 'center',
32
- className: styles.scaleRowTitle,
33
- horizontal: true
34
- }, "scale-num"), Array.from({
35
- length: scale.light.length
36
- }).fill('').map(function (_, index) {
37
- if (index === 0 || index === 12) return false;
38
- var isMidHighlight = midHighLight === index;
39
- return /*#__PURE__*/_jsx("div", {
40
- className: styles.scaleBox,
41
- children: /*#__PURE__*/_jsx("div", {
42
- className: styles.scaleBox,
43
- children: /*#__PURE__*/_jsx(Flexbox, {
44
- align: 'center',
45
- className: styles.scaleItem,
46
- horizontal: true,
47
- justify: 'center',
48
- style: {
49
- fontWeight: isMidHighlight ? 700 : 400,
50
- opacity: 0.5
51
- },
52
- children: index
53
- })
54
- })
55
- }, "num".concat(index));
56
- })]
57
- }, "scale-title"), /*#__PURE__*/_jsx(ScaleRow, {
58
- name: name,
59
- scale: scale.light,
60
- title: "light"
61
- }, "light"), /*#__PURE__*/_jsx(ScaleRow, {
62
- name: name,
63
- scale: scale.lightA,
64
- title: "lightA"
65
- }, "lightA"), /*#__PURE__*/_jsx(ScaleRow, {
66
- name: name,
67
- scale: scale.dark,
68
- title: "dark"
69
- }, "dark"), /*#__PURE__*/_jsx(ScaleRow, {
70
- name: name,
71
- scale: scale.darkA,
72
- title: "darkA"
73
- }, "darkA")]
74
- })
75
- })
76
- });
50
+ fontWeight: isMidHighlight ? 700 : 400,
51
+ opacity: 0.5
52
+ }
53
+ }, index)));
54
+ })), /*#__PURE__*/React.createElement(ScaleRow, {
55
+ key: "light",
56
+ name: name,
57
+ scale: scale.light,
58
+ title: "light"
59
+ }), /*#__PURE__*/React.createElement(ScaleRow, {
60
+ key: "lightA",
61
+ name: name,
62
+ scale: scale.lightA,
63
+ title: "lightA"
64
+ }), /*#__PURE__*/React.createElement(ScaleRow, {
65
+ key: "dark",
66
+ name: name,
67
+ scale: scale.dark,
68
+ title: "dark"
69
+ }), /*#__PURE__*/React.createElement(ScaleRow, {
70
+ key: "darkA",
71
+ name: name,
72
+ scale: scale.darkA,
73
+ title: "darkA"
74
+ }))));
77
75
  });
78
76
  export default ColorScales;
@@ -1,14 +1,12 @@
1
1
  import { createContext, memo, useContext } from 'react';
2
2
  import { genCdnUrl } from "../utils/genCdnUrl";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
3
  export var ConfigContext = /*#__PURE__*/createContext(null);
5
4
  var ConfigProvider = /*#__PURE__*/memo(function (_ref) {
6
5
  var children = _ref.children,
7
6
  config = _ref.config;
8
- return /*#__PURE__*/_jsx(ConfigContext.Provider, {
9
- value: config,
10
- children: children
11
- });
7
+ return /*#__PURE__*/React.createElement(ConfigContext.Provider, {
8
+ value: config
9
+ }, children);
12
10
  });
13
11
 
14
12
  // useCdnFn
@@ -1,11 +1,10 @@
1
1
  'use client';
2
2
 
3
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import { Dropdown } from 'antd';
5
5
  import { memo } from 'react';
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
6
  var ContextMenu = /*#__PURE__*/memo(function (props) {
8
- return /*#__PURE__*/_jsx(Dropdown, _objectSpread({
7
+ return /*#__PURE__*/React.createElement(Dropdown, _extends({
9
8
  trigger: ['contextMenu']
10
9
  }, props));
11
10
  });
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
5
5
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
6
6
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
@@ -10,7 +10,6 @@ import { memo } from 'react';
10
10
  import ActionIcon from "../ActionIcon";
11
11
  import { useCopied } from "../hooks/useCopied";
12
12
  import { copyToClipboard } from "../utils/copyToClipboard";
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
13
  var CopyButton = /*#__PURE__*/memo(function (_ref) {
15
14
  var active = _ref.active,
16
15
  content = _ref.content,
@@ -27,12 +26,12 @@ var CopyButton = /*#__PURE__*/memo(function (_ref) {
27
26
  copied = _useCopied.copied,
28
27
  setCopied = _useCopied.setCopied;
29
28
  var Icon = icon || Copy;
30
- return /*#__PURE__*/_jsx(ActionIcon, _objectSpread(_objectSpread({
29
+ return /*#__PURE__*/React.createElement(ActionIcon, _extends({
31
30
  glass: glass,
32
31
  placement: placement,
33
32
  size: size,
34
33
  title: 'Copy'
35
- }, rest), {}, {
34
+ }, rest, {
36
35
  active: active || copied,
37
36
  icon: copied ? Check : Icon,
38
37
  onClick: ( /*#__PURE__*/function () {
@@ -1,17 +1,16 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  var _excluded = ["className"];
4
4
  import { memo } from 'react';
5
5
  import { Flexbox } from 'react-layout-kit';
6
6
  import { useStyles } from "./style";
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
7
  var DraggablePanelBody = /*#__PURE__*/memo(function (_ref) {
9
8
  var className = _ref.className,
10
9
  rest = _objectWithoutProperties(_ref, _excluded);
11
10
  var _useStyles = useStyles(),
12
11
  cx = _useStyles.cx,
13
12
  styles = _useStyles.styles;
14
- return /*#__PURE__*/_jsx(Flexbox, _objectSpread({
13
+ return /*#__PURE__*/React.createElement(Flexbox, _extends({
15
14
  className: cx(styles.body, className),
16
15
  flex: 1
17
16
  }, rest));
@@ -1,17 +1,16 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  var _excluded = ["className"];
4
4
  import { memo } from 'react';
5
5
  import { Flexbox } from 'react-layout-kit';
6
6
  import { useStyles } from "./style";
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
7
  var DraggablePanelContainer = /*#__PURE__*/memo(function (_ref) {
9
8
  var className = _ref.className,
10
9
  rest = _objectWithoutProperties(_ref, _excluded);
11
10
  var _useStyles = useStyles(),
12
11
  cx = _useStyles.cx,
13
12
  styles = _useStyles.styles;
14
- return /*#__PURE__*/_jsx(Flexbox, _objectSpread({
13
+ return /*#__PURE__*/React.createElement(Flexbox, _extends({
15
14
  className: cx(styles.container, className)
16
15
  }, rest));
17
16
  });
@@ -1,17 +1,16 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  var _excluded = ["className"];
4
4
  import { memo } from 'react';
5
5
  import { Flexbox } from 'react-layout-kit';
6
6
  import { useStyles } from "./style";
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
7
  var DraggablePanelFooter = /*#__PURE__*/memo(function (_ref) {
9
8
  var className = _ref.className,
10
9
  rest = _objectWithoutProperties(_ref, _excluded);
11
10
  var _useStyles = useStyles(),
12
11
  cx = _useStyles.cx,
13
12
  styles = _useStyles.styles;
14
- return /*#__PURE__*/_jsx(Flexbox, _objectSpread({
13
+ return /*#__PURE__*/React.createElement(Flexbox, _extends({
15
14
  align: 'center',
16
15
  className: cx(styles.footer, className),
17
16
  flex: 'none',
@@ -1,4 +1,4 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
4
  var _excluded = ["pin", "setPin", "className", "setExpand", "title", "position"];
@@ -8,8 +8,6 @@ import { Flexbox } from 'react-layout-kit';
8
8
  import useControlledState from 'use-merge-value';
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";
13
11
  var DraggablePanelHeader = /*#__PURE__*/memo(function (props) {
14
12
  var pin = props.pin,
15
13
  setPin = props.setPin,
@@ -29,7 +27,7 @@ var DraggablePanelHeader = /*#__PURE__*/memo(function (props) {
29
27
  _useControlledState2 = _slicedToArray(_useControlledState, 2),
30
28
  isPinned = _useControlledState2[0],
31
29
  setIsPinned = _useControlledState2[1];
32
- var panelIcon = /*#__PURE__*/_jsx(ActionIcon, {
30
+ var panelIcon = /*#__PURE__*/React.createElement(ActionIcon, {
33
31
  icon: PanelLeft,
34
32
  onClick: function onClick() {
35
33
  return setExpand === null || setExpand === void 0 ? void 0 : setExpand(false);
@@ -39,7 +37,7 @@ var DraggablePanelHeader = /*#__PURE__*/memo(function (props) {
39
37
  fontSize: 14
40
38
  }
41
39
  });
42
- var pinIcon = /*#__PURE__*/_jsx(ActionIcon, {
40
+ var pinIcon = /*#__PURE__*/React.createElement(ActionIcon, {
43
41
  active: pin,
44
42
  icon: pin ? Pin : PinOff,
45
43
  onClick: function onClick() {
@@ -50,15 +48,13 @@ var DraggablePanelHeader = /*#__PURE__*/memo(function (props) {
50
48
  fontSize: 14
51
49
  }
52
50
  });
53
- return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
51
+ return /*#__PURE__*/React.createElement(Flexbox, _extends({
54
52
  align: 'center',
55
53
  className: cx(styles.header, className),
56
54
  flex: 'none',
57
55
  gap: 8,
58
56
  horizontal: true,
59
57
  justify: 'space-between'
60
- }, rest), {}, {
61
- children: [position === 'left' ? panelIcon : pinIcon, title, position === 'left' ? pinIcon : panelIcon]
62
- }));
58
+ }, rest), position === 'left' ? panelIcon : pinIcon, title, position === 'left' ? pinIcon : panelIcon);
63
59
  });
64
60
  export default DraggablePanelHeader;
@@ -1,5 +1,6 @@
1
1
  'use client';
2
2
 
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
3
4
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
5
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
5
6
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
@@ -12,8 +13,6 @@ import { Center } from 'react-layout-kit';
12
13
  import useControlledState from 'use-merge-value';
13
14
  import { useStyles } from "./style";
14
15
  import { reversePlacement } from "./utils";
15
- import { jsx as _jsx } from "react/jsx-runtime";
16
- import { jsxs as _jsxs } from "react/jsx-runtime";
17
16
  var DEFAULT_HEIGHT = 180;
18
17
  var DEFAULT_WIDTH = 280;
19
18
  var DraggablePanel = /*#__PURE__*/memo(function (_ref) {
@@ -53,8 +52,8 @@ var DraggablePanel = /*#__PURE__*/memo(function (_ref) {
53
52
  _ref$classNames = _ref.classNames,
54
53
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
55
54
  dir = _ref.dir;
56
- var reference = useRef();
57
- var isHovering = useHover(reference);
55
+ var ref = useRef(null);
56
+ var isHovering = useHover(ref);
58
57
  var isVertical = placement === 'top' || placement === 'bottom';
59
58
 
60
59
  // inherit direction from Ant Design ConfigProvider
@@ -172,34 +171,31 @@ var DraggablePanel = /*#__PURE__*/memo(function (_ref) {
172
171
  }, [styles, internalPlacement]),
173
172
  Arrow = _useMemo.Arrow,
174
173
  arrowPlacement = _useMemo.className;
175
- var handler = /*#__PURE__*/_jsx(Center
174
+ var handler = /*#__PURE__*/React.createElement(Center
176
175
  // @ts-ignore
177
176
  , {
178
177
  className: cx(styles["toggle".concat(arrowPlacement)], classNames.handle),
179
178
  style: {
180
179
  opacity: isExpand ? pin ? undefined : 0 : showHandlerWhenUnexpand ? 1 : 0
180
+ }
181
+ }, /*#__PURE__*/React.createElement(Center, {
182
+ onClick: function onClick() {
183
+ setIsExpand(!isExpand);
181
184
  },
182
- children: /*#__PURE__*/_jsx(Center, {
183
- onClick: function onClick() {
184
- setIsExpand(!isExpand);
185
- },
186
- style: handlerStyle || hanlderStyle,
187
- children: /*#__PURE__*/_jsx("div", {
188
- className: styles.handlerIcon,
189
- style: {
190
- transform: "rotate(".concat(isExpand ? 180 : 0, "deg)")
191
- },
192
- children: /*#__PURE__*/_jsx(Arrow, {
193
- size: 16,
194
- strokeWidth: 1.5
195
- })
196
- })
197
- })
198
- });
185
+ style: handlerStyle || hanlderStyle
186
+ }, /*#__PURE__*/React.createElement("div", {
187
+ className: styles.handlerIcon,
188
+ style: {
189
+ transform: "rotate(".concat(isExpand ? 180 : 0, "deg)")
190
+ }
191
+ }, /*#__PURE__*/React.createElement(Arrow, {
192
+ size: 16,
193
+ strokeWidth: 1.5
194
+ }))));
199
195
  var inner =
200
196
  /*#__PURE__*/
201
197
  // @ts-ignore
202
- _jsx(Resizable, _objectSpread(_objectSpread({}, sizeProps), {}, {
198
+ React.createElement(Resizable, _extends({}, sizeProps, {
203
199
  className: cx(styles.panel, classNames.content),
204
200
  enable: canResizing ? resizing : undefined,
205
201
  handleClasses: resizeHandleClassNames,
@@ -223,21 +219,18 @@ var DraggablePanel = /*#__PURE__*/memo(function (_ref) {
223
219
  },
224
220
  style: _objectSpread({
225
221
  transition: isResizing ? 'unset' : undefined
226
- }, style),
227
- children: children
228
- }));
229
- if (fullscreen) return /*#__PURE__*/_jsx("div", {
230
- className: cx(styles.fullscreen, className),
231
- children: children
232
- });
233
- return /*#__PURE__*/_jsxs("aside", {
222
+ }, style)
223
+ }), children);
224
+ if (fullscreen) return /*#__PURE__*/React.createElement("div", {
225
+ className: cx(styles.fullscreen, className)
226
+ }, children);
227
+ return /*#__PURE__*/React.createElement("aside", {
234
228
  className: cx(styles.container,
235
229
  // @ts-ignore
236
230
  styles[mode === 'fixed' ? 'fixed' : "".concat(internalPlacement, "Float")], className),
237
231
  dir: dir,
238
- ref: reference,
239
- style: isExpand ? _defineProperty({}, "border".concat(arrowPlacement, "Width"), 1) : {},
240
- children: [expandable && showExpand && handler, destroyOnClose ? isExpand && inner : inner]
241
- });
232
+ ref: ref,
233
+ style: isExpand ? _defineProperty({}, "border".concat(arrowPlacement, "Width"), 1) : {}
234
+ }, expandable && showExpand && handler, destroyOnClose ? isExpand && inner : inner);
242
235
  });
243
236
  export default DraggablePanel;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
6
  var _excluded = ["value", "showEditIcon", "onChange", "editing", "onEditingChange"];
@@ -10,8 +10,6 @@ import { Flexbox } from 'react-layout-kit';
10
10
  import useControlledState from 'use-merge-value';
11
11
  import ActionIcon from "../ActionIcon";
12
12
  import { ControlInput } from "../components/ControlInput";
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { jsxs as _jsxs } from "react/jsx-runtime";
15
13
  var EditableText = /*#__PURE__*/memo(function (_ref) {
16
14
  var value = _ref.value,
17
15
  _ref$showEditIcon = _ref.showEditIcon,
@@ -27,24 +25,23 @@ var EditableText = /*#__PURE__*/memo(function (_ref) {
27
25
  _useControlledState2 = _slicedToArray(_useControlledState, 2),
28
26
  edited = _useControlledState2[0],
29
27
  setEdited = _useControlledState2[1];
30
- return edited ? /*#__PURE__*/_jsx(ControlInput, _objectSpread({
28
+ return edited ? /*#__PURE__*/React.createElement(ControlInput, _extends({
31
29
  onChange: onChange,
32
30
  onChangeEnd: function onChangeEnd() {
33
31
  setEdited(false);
34
32
  },
35
33
  value: value
36
- }, rest)) : /*#__PURE__*/_jsxs(Flexbox, {
34
+ }, rest)) : /*#__PURE__*/React.createElement(Flexbox, {
37
35
  gap: 8,
38
- horizontal: true,
39
- children: [value, showEditIcon && /*#__PURE__*/_jsx(ActionIcon, {
40
- icon: Edit3,
41
- onClick: function onClick() {
42
- setEdited(!edited);
43
- },
44
- placement: "right",
45
- size: "small",
46
- title: 'Edit'
47
- })]
48
- });
36
+ horizontal: true
37
+ }, value, showEditIcon && /*#__PURE__*/React.createElement(ActionIcon, {
38
+ icon: Edit3,
39
+ onClick: function onClick() {
40
+ setEdited(!edited);
41
+ },
42
+ placement: "right",
43
+ size: "small",
44
+ title: 'Edit'
45
+ }));
49
46
  });
50
47
  export default EditableText;