@lobehub/ui 1.72.6 → 1.72.7
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/ChatInputArea/index.js +1 -1
- package/es/ChatItem/components/MessageContent.js +1 -1
- package/es/ChatItem/style.js +1 -1
- package/es/EditableMessage/index.d.ts +1 -0
- package/es/EditableMessage/index.js +3 -0
- package/es/MessageInput/index.d.ts +1 -0
- package/es/MessageInput/index.js +5 -7
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ var ChatInputArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
31
31
|
_ref$defaultValue = _ref.defaultValue,
|
|
32
32
|
defaultValue = _ref$defaultValue === void 0 ? '' : _ref$defaultValue,
|
|
33
33
|
_ref$loading = _ref.loading,
|
|
34
|
-
loading = _ref$loading === void 0 ?
|
|
34
|
+
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
35
35
|
disabled = _ref.disabled,
|
|
36
36
|
onInputChange = _ref.onInputChange,
|
|
37
37
|
_onPressEnter = _ref.onPressEnter,
|
|
@@ -24,7 +24,7 @@ var Loading = /*#__PURE__*/memo(function (_ref) {
|
|
|
24
24
|
styles = _useStyles.styles;
|
|
25
25
|
var content = /*#__PURE__*/_jsx(EditableMessage, {
|
|
26
26
|
classNames: {
|
|
27
|
-
|
|
27
|
+
textarea: styles.editingInput
|
|
28
28
|
},
|
|
29
29
|
editButtonSize: 'small',
|
|
30
30
|
editing: editing,
|
package/es/ChatItem/style.js
CHANGED
|
@@ -24,7 +24,7 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
24
24
|
avatarGroupContainer: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: ", "px;\n "])), avatarSize),
|
|
25
25
|
container: cx(type === 'pure' && pureContainerStylish, css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n position: relative;\n\n display: flex;\n flex-direction: ", ";\n gap: 12px;\n align-items: flex-start;\n justify-content: revert;\n\n width: 100%;\n padding: 12px;\n\n time {\n display: inline-block;\n white-space: nowrap;\n }\n\n div[role='chat-item-actions'] {\n display: flex;\n }\n\n time,\n div[role='chat-item-actions'] {\n pointer-events: none;\n opacity: 0;\n transition: opacity 200ms ", ";\n }\n\n &:hover {\n time,\n div[role='chat-item-actions'] {\n pointer-events: unset;\n opacity: 1;\n }\n }\n "])), placement === 'left' ? 'row' : 'row-reverse', token.motionEaseOut)),
|
|
26
26
|
editingContainer: cx(css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n padding: 8px 12px 12px;\n border: 1px solid ", ";\n\n &:active,\n &:hover {\n border-color: ", ";\n }\n "])), token.colorBorderSecondary, token.colorBorder), type === 'pure' && css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: ", "px;\n "])), token.colorFillQuaternary, token.borderRadius)),
|
|
27
|
-
editingInput: css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n min-
|
|
27
|
+
editingInput: css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n min-width: 800px !important;\n "]))),
|
|
28
28
|
loading: css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n position: absolute;\n right: ", ";\n bottom: 0;\n left: ", ";\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n width: 16px;\n height: 16px;\n\n color: ", ";\n\n background: ", ";\n border-radius: 50%;\n "])), placement === 'left' ? '-4px' : 'unset', placement === 'right' ? '-4px' : 'unset', token.colorBgLayout, token.colorPrimary),
|
|
29
29
|
message: cx(typeStylish, css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n position: relative;\n "])))),
|
|
30
30
|
messageContainer: css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: ", ";\n "])), placement === 'left' ? 'flex-start' : 'flex-end'),
|
|
@@ -43,6 +43,9 @@ var EditableMessage = /*#__PURE__*/memo(function (_ref) {
|
|
|
43
43
|
setExpand = _useControlledState4[1];
|
|
44
44
|
var input = /*#__PURE__*/_jsx(MessageInput, {
|
|
45
45
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.input,
|
|
46
|
+
classNames: {
|
|
47
|
+
textarea: classNames === null || classNames === void 0 ? void 0 : classNames.textarea
|
|
48
|
+
},
|
|
46
49
|
defaultValue: value,
|
|
47
50
|
editButtonSize: editButtonSize,
|
|
48
51
|
height: height,
|
package/es/MessageInput/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["text", "type", "onCancel", "defaultValue", "onConfirm", "renderButtons", "textareaStyle", "textareaClassname", "placeholder", "
|
|
4
|
+
var _excluded = ["text", "type", "onCancel", "defaultValue", "onConfirm", "renderButtons", "textareaStyle", "textareaClassname", "placeholder", "style", "editButtonSize", "classNames"];
|
|
5
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
7
|
import { Button } from 'antd';
|
|
@@ -24,11 +24,10 @@ var MessageInput = /*#__PURE__*/memo(function (_ref) {
|
|
|
24
24
|
textareaClassname = _ref.textareaClassname,
|
|
25
25
|
_ref$placeholder = _ref.placeholder,
|
|
26
26
|
placeholder = _ref$placeholder === void 0 ? 'Type something...' : _ref$placeholder,
|
|
27
|
-
_ref$height = _ref.height,
|
|
28
|
-
height = _ref$height === void 0 ? 'fit-content' : _ref$height,
|
|
29
27
|
style = _ref.style,
|
|
30
28
|
_ref$editButtonSize = _ref.editButtonSize,
|
|
31
29
|
editButtonSize = _ref$editButtonSize === void 0 ? 'middle' : _ref$editButtonSize,
|
|
30
|
+
classNames = _ref.classNames,
|
|
32
31
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
33
32
|
var _useState = useState(defaultValue || ''),
|
|
34
33
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -45,7 +44,9 @@ var MessageInput = /*#__PURE__*/memo(function (_ref) {
|
|
|
45
44
|
}, style)
|
|
46
45
|
}, props), {}, {
|
|
47
46
|
children: [/*#__PURE__*/_jsx(TextArea, {
|
|
47
|
+
autoSize: true,
|
|
48
48
|
className: cx(styles, textareaClassname),
|
|
49
|
+
classNames: classNames,
|
|
49
50
|
onBlur: function onBlur(e) {
|
|
50
51
|
return setRole(e.target.value);
|
|
51
52
|
},
|
|
@@ -54,10 +55,7 @@ var MessageInput = /*#__PURE__*/memo(function (_ref) {
|
|
|
54
55
|
},
|
|
55
56
|
placeholder: placeholder,
|
|
56
57
|
resize: false,
|
|
57
|
-
style:
|
|
58
|
-
height: height,
|
|
59
|
-
minHeight: '100%'
|
|
60
|
-
}, textareaStyle),
|
|
58
|
+
style: textareaStyle,
|
|
61
59
|
type: type,
|
|
62
60
|
value: temporarySystemRole
|
|
63
61
|
}), /*#__PURE__*/_jsx(Flexbox, {
|