@lobehub/editor 1.4.0 → 1.4.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.
|
@@ -10,13 +10,14 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
10
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
12
|
import { Button, Icon } from '@lobehub/ui';
|
|
13
|
-
import { Dropdown } from 'antd';
|
|
13
|
+
import { Dropdown, Space } from 'antd';
|
|
14
14
|
import { ChevronDownIcon } from 'lucide-react';
|
|
15
15
|
import { memo } from 'react';
|
|
16
16
|
import SendIcon from "./components/SendIcon";
|
|
17
17
|
import StopIcon from "./components/StopIcon";
|
|
18
18
|
import { useStyles } from "./style";
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
21
|
var SendButton = /*#__PURE__*/memo(function (_ref) {
|
|
21
22
|
var _ref$type = _ref.type,
|
|
22
23
|
type = _ref$type === void 0 ? 'primary' : _ref$type,
|
|
@@ -77,24 +78,40 @@ var SendButton = /*#__PURE__*/memo(function (_ref) {
|
|
|
77
78
|
style: style,
|
|
78
79
|
type: type
|
|
79
80
|
}, rest));
|
|
80
|
-
return /*#__PURE__*/
|
|
81
|
+
return /*#__PURE__*/_jsxs(Space.Compact, _objectSpread(_objectSpread({
|
|
81
82
|
className: cx(styles.dropdownButton, disabled && styles.disabled, shape === 'round' && styles.dropdownButtonRound, className),
|
|
82
|
-
|
|
83
|
-
icon: /*#__PURE__*/_jsx(Icon, {
|
|
84
|
-
icon: ChevronDownIcon
|
|
85
|
-
}),
|
|
86
|
-
menu: menu,
|
|
87
|
-
onClick: function onClick(e) {
|
|
88
|
-
e.stopPropagation();
|
|
89
|
-
e.preventDefault();
|
|
90
|
-
if (onSend) onSend(e);
|
|
91
|
-
if (_onClick) _onClick(e);
|
|
92
|
-
},
|
|
93
|
-
placement: 'topRight',
|
|
94
|
-
style: style,
|
|
95
|
-
type: type
|
|
83
|
+
style: style
|
|
96
84
|
}, rest), {}, {
|
|
97
|
-
children:
|
|
85
|
+
children: [/*#__PURE__*/_jsx(Button, _objectSpread({
|
|
86
|
+
className: cx(styles.button, disabled && styles.disabled, className),
|
|
87
|
+
disabled: disabled,
|
|
88
|
+
icon: /*#__PURE__*/_jsx(SendIcon, {}),
|
|
89
|
+
onClick: function onClick(e) {
|
|
90
|
+
e.stopPropagation();
|
|
91
|
+
e.preventDefault();
|
|
92
|
+
if (onSend) onSend(e);
|
|
93
|
+
if (_onClick) _onClick(e);
|
|
94
|
+
},
|
|
95
|
+
shape: shape,
|
|
96
|
+
style: style,
|
|
97
|
+
type: type
|
|
98
|
+
}, rest)), /*#__PURE__*/_jsx(Dropdown, _objectSpread(_objectSpread({
|
|
99
|
+
menu: menu,
|
|
100
|
+
placement: 'topRight'
|
|
101
|
+
}, rest), {}, {
|
|
102
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
103
|
+
className: cx(styles.button, disabled && styles.disabled, className),
|
|
104
|
+
disabled: disabled,
|
|
105
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
106
|
+
icon: ChevronDownIcon
|
|
107
|
+
}),
|
|
108
|
+
shape: shape,
|
|
109
|
+
style: {
|
|
110
|
+
cursor: 'pointer'
|
|
111
|
+
},
|
|
112
|
+
type: type
|
|
113
|
+
})
|
|
114
|
+
}))]
|
|
98
115
|
}));
|
|
99
116
|
});
|
|
100
117
|
SendButton.displayName = 'SendButton';
|
package/package.json
CHANGED