@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.
- package/es/A/index.js +2 -2
- package/es/ActionIcon/index.js +15 -11
- package/es/ActionIconGroup/index.js +47 -45
- package/es/Alert/index.js +50 -43
- package/es/Avatar/index.js +12 -10
- package/es/Burger/index.js +35 -30
- package/es/CodeEditor/index.js +43 -38
- package/es/Collapse/index.js +3 -3
- package/es/ColorScales/ScaleRow.js +43 -39
- package/es/ColorScales/index.js +59 -57
- package/es/ConfigProvider/index.js +5 -3
- package/es/ContextMenu/index.js +3 -2
- package/es/CopyButton/index.js +4 -3
- package/es/DraggablePanel/components/DraggablePanelBody.js +3 -2
- package/es/DraggablePanel/components/DraggablePanelContainer.js +3 -2
- package/es/DraggablePanel/components/DraggablePanelFooter.js +3 -2
- package/es/DraggablePanel/components/DraggablePanelHeader.js +9 -5
- package/es/DraggablePanel/index.js +32 -25
- package/es/EditableText/index.js +16 -13
- package/es/EmojiPicker/AvatarUploader.js +71 -60
- package/es/EmojiPicker/index.js +110 -101
- package/es/EmptyCard/index.js +31 -23
- package/es/FileTypeIcon/index.js +55 -44
- package/es/FluentEmoji/index.js +6 -4
- package/es/Footer/index.js +10 -8
- package/es/Form/components/FormDivider.js +2 -2
- package/es/Form/components/FormFlatGroup.js +9 -4
- package/es/Form/components/FormFooter.js +6 -3
- package/es/Form/components/FormGroup.js +21 -15
- package/es/Form/components/FormItem.js +17 -10
- package/es/Form/components/FormTitle.js +23 -15
- package/es/Form/index.js +30 -26
- package/es/FormModal/index.js +34 -30
- package/es/Grid/index.js +6 -3
- package/es/Header/index.js +65 -49
- package/es/Highlighter/FullFeatured.js +51 -41
- package/es/Highlighter/SyntaxHighlighter/index.js +30 -19
- package/es/Highlighter/index.js +29 -19
- package/es/Icon/icons/DiscordIcon.js +3 -2
- package/es/Icon/index.js +16 -13
- package/es/Image/ImageGallery.js +5 -3
- package/es/Image/Preview.js +5 -3
- package/es/Image/index.js +38 -34
- package/es/Image/usePreview.js +37 -33
- package/es/Img/index.js +2 -2
- package/es/Input/index.js +3 -3
- package/es/Layout/index.js +63 -35
- package/es/List/ListItem/index.js +67 -53
- package/es/Markdown/CodeBlock.js +16 -10
- package/es/Markdown/Typography.js +6 -3
- package/es/Markdown/index.js +22 -18
- package/es/MaterialFileTypeIcon/index.js +20 -17
- package/es/MaterialFileTypeIcon/utils.d.ts +2 -2
- package/es/Mermaid/FullFeatured.js +45 -35
- package/es/Mermaid/index.js +26 -17
- package/es/Mermaid/useMermaid.d.ts +1 -2
- package/es/Mermaid/useMermaid.js +5 -3
- package/es/Modal/index.js +60 -48
- package/es/SearchBar/index.js +51 -47
- package/es/SelectWithImg/index.js +40 -34
- package/es/SideNav/index.js +22 -15
- package/es/SliderWithInput/index.js +38 -35
- package/es/Snippet/index.js +15 -10
- package/es/SortableList/DragHandle.js +3 -3
- package/es/SortableList/SortableItem.js +19 -16
- package/es/SortableList/SortableOverlay.js +5 -3
- package/es/SortableList/index.js +23 -15
- package/es/Swatches/index.js +20 -18
- package/es/TabsNav/index.js +3 -2
- package/es/Tag/index.js +12 -7
- package/es/ThemeProvider/Meta.js +58 -53
- package/es/ThemeProvider/index.js +23 -17
- package/es/ThemeSwitch/index.js +19 -15
- package/es/Toc/TocMobile.js +52 -47
- package/es/Toc/index.js +13 -8
- package/es/Tooltip/index.js +3 -2
- package/es/Video/index.js +47 -41
- package/es/awesome/AuroraBackground/index.js +18 -11
- package/es/awesome/Features/Item.js +45 -37
- package/es/awesome/Features/index.js +4 -5
- package/es/awesome/GaussianBackground/index.js +13 -8
- package/es/awesome/Giscus/index.js +15 -13
- package/es/awesome/GradientButton/index.js +9 -5
- package/es/awesome/GridBackground/Grid.js +61 -49
- package/es/awesome/GridBackground/GridShowcase.js +28 -24
- package/es/awesome/GridBackground/index.js +33 -27
- package/es/awesome/Hero/index.js +74 -63
- package/es/awesome/Spline/ParentSize.js +8 -7
- package/es/awesome/Spline/index.js +13 -10
- package/es/awesome/Spotlight/index.js +3 -2
- package/es/awesome/SpotlightCard/SpotlightCardItem.js +8 -5
- package/es/awesome/SpotlightCard/index.js +12 -9
- package/es/brand/BrandLoading/index.js +3 -2
- package/es/brand/LobeChat/index.js +38 -29
- package/es/brand/LobeChatText/index.js +13 -8
- package/es/brand/LobeHub/index.js +38 -29
- package/es/brand/LobeHubText/index.js +9 -4
- package/es/brand/Logo3d/index.js +3 -2
- package/es/brand/LogoFlat/index.js +49 -44
- package/es/brand/LogoMono/index.js +53 -48
- package/es/brand/LogoThree/Loading.js +11 -9
- package/es/brand/LogoThree/LogoSpline.js +12 -10
- package/es/brand/LogoThree/index.js +25 -23
- package/es/brand/components/Divider.js +6 -4
- package/es/chat/BackBottom/index.js +6 -4
- package/es/chat/ChatHeader/ChatHeaderTitle.js +31 -22
- package/es/chat/ChatHeader/index.js +42 -35
- package/es/chat/ChatInputArea/ChatInputActionBar.js +21 -16
- package/es/chat/ChatInputArea/ChatInputArea.js +23 -19
- package/es/chat/ChatInputArea/ChatInputAreaInner.js +3 -2
- package/es/chat/ChatInputArea/SendButton.js +51 -36
- package/es/chat/ChatItem/components/Actions.js +5 -3
- package/es/chat/ChatItem/components/Avatar.js +21 -17
- package/es/chat/ChatItem/components/BorderSpacing.js +2 -1
- package/es/chat/ChatItem/components/ErrorContent.js +11 -9
- package/es/chat/ChatItem/components/Loading.js +12 -10
- package/es/chat/ChatItem/components/MessageContent.js +10 -6
- package/es/chat/ChatItem/components/Title.js +8 -3
- package/es/chat/ChatItem/index.js +53 -47
- package/es/chat/ChatList/ActionsBar.js +3 -2
- package/es/chat/ChatList/HistoryDivider.js +11 -6
- package/es/chat/ChatList/Item.js +12 -14
- package/es/chat/ChatList/index.js +29 -25
- package/es/chat/EditableMessage/index.js +32 -26
- package/es/chat/EditableMessageList/index.js +76 -72
- package/es/chat/MessageInput/index.js +43 -35
- package/es/chat/MessageModal/index.js +51 -41
- package/es/chat/TokenTag/index.js +11 -7
- package/es/components/ControlInput.js +22 -18
- package/es/hooks/useHighlight.d.ts +1 -1
- package/es/mdx/Callout/index.js +19 -13
- package/es/mdx/Cards/Card.js +59 -46
- package/es/mdx/Cards/index.js +6 -3
- package/es/mdx/FileTree/File.js +11 -5
- package/es/mdx/FileTree/Folder.js +22 -13
- package/es/mdx/FileTree/index.js +6 -3
- package/es/mdx/Mdx/index.js +9 -7
- package/es/mdx/Steps/index.js +6 -3
- package/es/mdx/Tabs/Tab.js +8 -3
- package/es/mdx/Tabs/index.js +21 -17
- package/es/mdx/mdxComponents/CodeBlock.js +14 -9
- package/es/mdx/mdxComponents/Image.js +2 -2
- package/es/mdx/mdxComponents/Link.js +3 -2
- package/es/mdx/mdxComponents/Pre.js +14 -7
- package/es/mdx/mdxComponents/Video.js +2 -2
- package/es/mobile/MobileChatInputArea/SendButton.js +4 -3
- package/es/mobile/MobileChatInputArea/index.js +79 -69
- package/es/mobile/MobileNavBar/MobileNavBarTitle.js +37 -26
- package/es/mobile/MobileNavBar/index.js +48 -41
- package/es/mobile/MobileSafeArea/index.js +3 -2
- package/es/mobile/MobileTabBar/index.js +35 -29
- package/es/storybook/StoryBook/index.js +26 -19
- package/package.json +1 -90
|
@@ -5,6 +5,8 @@ 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";
|
|
8
10
|
var ScaleRow = /*#__PURE__*/memo(function (_ref) {
|
|
9
11
|
var name = _ref.name,
|
|
10
12
|
title = _ref.title,
|
|
@@ -37,45 +39,47 @@ var ScaleRow = /*#__PURE__*/memo(function (_ref) {
|
|
|
37
39
|
break;
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
|
-
return /*#__PURE__*/
|
|
41
|
-
size: 2
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
|
65
79
|
}
|
|
66
|
-
}
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
}));
|
|
80
|
+
})
|
|
81
|
+
}, index);
|
|
82
|
+
})]
|
|
83
|
+
});
|
|
80
84
|
});
|
|
81
85
|
export default ScaleRow;
|
package/es/ColorScales/index.js
CHANGED
|
@@ -5,72 +5,74 @@ 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";
|
|
8
10
|
var ColorScales = /*#__PURE__*/memo(function (_ref) {
|
|
9
11
|
var name = _ref.name,
|
|
10
12
|
scale = _ref.scale,
|
|
11
13
|
midHighLight = _ref.midHighLight;
|
|
12
14
|
var _useStyles = useStyles(),
|
|
13
15
|
styles = _useStyles.styles;
|
|
14
|
-
return /*#__PURE__*/
|
|
16
|
+
return /*#__PURE__*/_jsx(Flexbox, {
|
|
15
17
|
align: 'center',
|
|
16
18
|
flex: 1,
|
|
17
19
|
horizontal: true,
|
|
18
|
-
justify: 'center'
|
|
19
|
-
|
|
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',
|
|
20
|
+
justify: 'center',
|
|
21
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
49
22
|
style: {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
+
});
|
|
75
77
|
});
|
|
76
78
|
export default ColorScales;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { createContext, memo, useContext } from 'react';
|
|
2
2
|
import { genCdnUrl } from "../utils/genCdnUrl";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
4
|
export var ConfigContext = /*#__PURE__*/createContext(null);
|
|
4
5
|
var ConfigProvider = /*#__PURE__*/memo(function (_ref) {
|
|
5
6
|
var children = _ref.children,
|
|
6
7
|
config = _ref.config;
|
|
7
|
-
return /*#__PURE__*/
|
|
8
|
-
value: config
|
|
9
|
-
|
|
8
|
+
return /*#__PURE__*/_jsx(ConfigContext.Provider, {
|
|
9
|
+
value: config,
|
|
10
|
+
children: children
|
|
11
|
+
});
|
|
10
12
|
});
|
|
11
13
|
|
|
12
14
|
// useCdnFn
|
package/es/ContextMenu/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import { Dropdown } from 'antd';
|
|
5
5
|
import { memo } from 'react';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
7
|
var ContextMenu = /*#__PURE__*/memo(function (props) {
|
|
7
|
-
return /*#__PURE__*/
|
|
8
|
+
return /*#__PURE__*/_jsx(Dropdown, _objectSpread({
|
|
8
9
|
trigger: ['contextMenu']
|
|
9
10
|
}, props));
|
|
10
11
|
});
|
package/es/CopyButton/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
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,6 +10,7 @@ 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";
|
|
13
14
|
var CopyButton = /*#__PURE__*/memo(function (_ref) {
|
|
14
15
|
var active = _ref.active,
|
|
15
16
|
content = _ref.content,
|
|
@@ -26,12 +27,12 @@ var CopyButton = /*#__PURE__*/memo(function (_ref) {
|
|
|
26
27
|
copied = _useCopied.copied,
|
|
27
28
|
setCopied = _useCopied.setCopied;
|
|
28
29
|
var Icon = icon || Copy;
|
|
29
|
-
return /*#__PURE__*/
|
|
30
|
+
return /*#__PURE__*/_jsx(ActionIcon, _objectSpread(_objectSpread({
|
|
30
31
|
glass: glass,
|
|
31
32
|
placement: placement,
|
|
32
33
|
size: size,
|
|
33
34
|
title: 'Copy'
|
|
34
|
-
}, rest, {
|
|
35
|
+
}, rest), {}, {
|
|
35
36
|
active: active || copied,
|
|
36
37
|
icon: copied ? Check : Icon,
|
|
37
38
|
onClick: ( /*#__PURE__*/function () {
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
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";
|
|
7
8
|
var DraggablePanelBody = /*#__PURE__*/memo(function (_ref) {
|
|
8
9
|
var className = _ref.className,
|
|
9
10
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
10
11
|
var _useStyles = useStyles(),
|
|
11
12
|
cx = _useStyles.cx,
|
|
12
13
|
styles = _useStyles.styles;
|
|
13
|
-
return /*#__PURE__*/
|
|
14
|
+
return /*#__PURE__*/_jsx(Flexbox, _objectSpread({
|
|
14
15
|
className: cx(styles.body, className),
|
|
15
16
|
flex: 1
|
|
16
17
|
}, rest));
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
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";
|
|
7
8
|
var DraggablePanelContainer = /*#__PURE__*/memo(function (_ref) {
|
|
8
9
|
var className = _ref.className,
|
|
9
10
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
10
11
|
var _useStyles = useStyles(),
|
|
11
12
|
cx = _useStyles.cx,
|
|
12
13
|
styles = _useStyles.styles;
|
|
13
|
-
return /*#__PURE__*/
|
|
14
|
+
return /*#__PURE__*/_jsx(Flexbox, _objectSpread({
|
|
14
15
|
className: cx(styles.container, className)
|
|
15
16
|
}, rest));
|
|
16
17
|
});
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
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";
|
|
7
8
|
var DraggablePanelFooter = /*#__PURE__*/memo(function (_ref) {
|
|
8
9
|
var className = _ref.className,
|
|
9
10
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
10
11
|
var _useStyles = useStyles(),
|
|
11
12
|
cx = _useStyles.cx,
|
|
12
13
|
styles = _useStyles.styles;
|
|
13
|
-
return /*#__PURE__*/
|
|
14
|
+
return /*#__PURE__*/_jsx(Flexbox, _objectSpread({
|
|
14
15
|
align: 'center',
|
|
15
16
|
className: cx(styles.footer, className),
|
|
16
17
|
flex: 'none',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
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,6 +8,8 @@ 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";
|
|
11
13
|
var DraggablePanelHeader = /*#__PURE__*/memo(function (props) {
|
|
12
14
|
var pin = props.pin,
|
|
13
15
|
setPin = props.setPin,
|
|
@@ -27,7 +29,7 @@ var DraggablePanelHeader = /*#__PURE__*/memo(function (props) {
|
|
|
27
29
|
_useControlledState2 = _slicedToArray(_useControlledState, 2),
|
|
28
30
|
isPinned = _useControlledState2[0],
|
|
29
31
|
setIsPinned = _useControlledState2[1];
|
|
30
|
-
var panelIcon = /*#__PURE__*/
|
|
32
|
+
var panelIcon = /*#__PURE__*/_jsx(ActionIcon, {
|
|
31
33
|
icon: PanelLeft,
|
|
32
34
|
onClick: function onClick() {
|
|
33
35
|
return setExpand === null || setExpand === void 0 ? void 0 : setExpand(false);
|
|
@@ -37,7 +39,7 @@ var DraggablePanelHeader = /*#__PURE__*/memo(function (props) {
|
|
|
37
39
|
fontSize: 14
|
|
38
40
|
}
|
|
39
41
|
});
|
|
40
|
-
var pinIcon = /*#__PURE__*/
|
|
42
|
+
var pinIcon = /*#__PURE__*/_jsx(ActionIcon, {
|
|
41
43
|
active: pin,
|
|
42
44
|
icon: pin ? Pin : PinOff,
|
|
43
45
|
onClick: function onClick() {
|
|
@@ -48,13 +50,15 @@ var DraggablePanelHeader = /*#__PURE__*/memo(function (props) {
|
|
|
48
50
|
fontSize: 14
|
|
49
51
|
}
|
|
50
52
|
});
|
|
51
|
-
return /*#__PURE__*/
|
|
53
|
+
return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
|
|
52
54
|
align: 'center',
|
|
53
55
|
className: cx(styles.header, className),
|
|
54
56
|
flex: 'none',
|
|
55
57
|
gap: 8,
|
|
56
58
|
horizontal: true,
|
|
57
59
|
justify: 'space-between'
|
|
58
|
-
}, rest),
|
|
60
|
+
}, rest), {}, {
|
|
61
|
+
children: [position === 'left' ? panelIcon : pinIcon, title, position === 'left' ? pinIcon : panelIcon]
|
|
62
|
+
}));
|
|
59
63
|
});
|
|
60
64
|
export default DraggablePanelHeader;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
4
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
@@ -13,6 +12,8 @@ import { Center } from 'react-layout-kit';
|
|
|
13
12
|
import useControlledState from 'use-merge-value';
|
|
14
13
|
import { useStyles } from "./style";
|
|
15
14
|
import { reversePlacement } from "./utils";
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
17
|
var DEFAULT_HEIGHT = 180;
|
|
17
18
|
var DEFAULT_WIDTH = 280;
|
|
18
19
|
var DraggablePanel = /*#__PURE__*/memo(function (_ref) {
|
|
@@ -171,31 +172,34 @@ var DraggablePanel = /*#__PURE__*/memo(function (_ref) {
|
|
|
171
172
|
}, [styles, internalPlacement]),
|
|
172
173
|
Arrow = _useMemo.Arrow,
|
|
173
174
|
arrowPlacement = _useMemo.className;
|
|
174
|
-
var handler = /*#__PURE__*/
|
|
175
|
+
var handler = /*#__PURE__*/_jsx(Center
|
|
175
176
|
// @ts-ignore
|
|
176
177
|
, {
|
|
177
178
|
className: cx(styles["toggle".concat(arrowPlacement)], classNames.handle),
|
|
178
179
|
style: {
|
|
179
180
|
opacity: isExpand ? pin ? undefined : 0 : showHandlerWhenUnexpand ? 1 : 0
|
|
180
|
-
}
|
|
181
|
-
}, /*#__PURE__*/React.createElement(Center, {
|
|
182
|
-
onClick: function onClick() {
|
|
183
|
-
setIsExpand(!isExpand);
|
|
184
181
|
},
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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
|
+
});
|
|
195
199
|
var inner =
|
|
196
200
|
/*#__PURE__*/
|
|
197
201
|
// @ts-ignore
|
|
198
|
-
|
|
202
|
+
_jsx(Resizable, _objectSpread(_objectSpread({}, sizeProps), {}, {
|
|
199
203
|
className: cx(styles.panel, classNames.content),
|
|
200
204
|
enable: canResizing ? resizing : undefined,
|
|
201
205
|
handleClasses: resizeHandleClassNames,
|
|
@@ -219,18 +223,21 @@ var DraggablePanel = /*#__PURE__*/memo(function (_ref) {
|
|
|
219
223
|
},
|
|
220
224
|
style: _objectSpread({
|
|
221
225
|
transition: isResizing ? 'unset' : undefined
|
|
222
|
-
}, style)
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
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", {
|
|
228
234
|
className: cx(styles.container,
|
|
229
235
|
// @ts-ignore
|
|
230
236
|
styles[mode === 'fixed' ? 'fixed' : "".concat(internalPlacement, "Float")], className),
|
|
231
237
|
dir: dir,
|
|
232
238
|
ref: ref,
|
|
233
|
-
style: isExpand ? _defineProperty({}, "border".concat(arrowPlacement, "Width"), 1) : {}
|
|
234
|
-
|
|
239
|
+
style: isExpand ? _defineProperty({}, "border".concat(arrowPlacement, "Width"), 1) : {},
|
|
240
|
+
children: [expandable && showExpand && handler, destroyOnClose ? isExpand && inner : inner]
|
|
241
|
+
});
|
|
235
242
|
});
|
|
236
243
|
export default DraggablePanel;
|
package/es/EditableText/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
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,6 +10,8 @@ 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";
|
|
13
15
|
var EditableText = /*#__PURE__*/memo(function (_ref) {
|
|
14
16
|
var value = _ref.value,
|
|
15
17
|
_ref$showEditIcon = _ref.showEditIcon,
|
|
@@ -25,23 +27,24 @@ var EditableText = /*#__PURE__*/memo(function (_ref) {
|
|
|
25
27
|
_useControlledState2 = _slicedToArray(_useControlledState, 2),
|
|
26
28
|
edited = _useControlledState2[0],
|
|
27
29
|
setEdited = _useControlledState2[1];
|
|
28
|
-
return edited ? /*#__PURE__*/
|
|
30
|
+
return edited ? /*#__PURE__*/_jsx(ControlInput, _objectSpread({
|
|
29
31
|
onChange: onChange,
|
|
30
32
|
onChangeEnd: function onChangeEnd() {
|
|
31
33
|
setEdited(false);
|
|
32
34
|
},
|
|
33
35
|
value: value
|
|
34
|
-
}, rest)) : /*#__PURE__*/
|
|
36
|
+
}, rest)) : /*#__PURE__*/_jsxs(Flexbox, {
|
|
35
37
|
gap: 8,
|
|
36
|
-
horizontal: true
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
+
});
|
|
46
49
|
});
|
|
47
50
|
export default EditableText;
|