@lobehub/ui 1.47.0 → 1.48.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.
package/es/ChatHeader/style.js
CHANGED
|
@@ -8,6 +8,6 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
8
8
|
stylish = _ref.stylish,
|
|
9
9
|
cx = _ref.cx;
|
|
10
10
|
return {
|
|
11
|
-
container: cx(stylish.blurStrong, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 10;\n\n grid-area: header;\n align-self: stretch;\n\n width: 100%;\n height: 64px;\n\n background: linear-gradient(\n to bottom,\n ", ",\n ", "\n );\n border-bottom: 1px solid ", ";\n "])), rgba(token.colorBgLayout, 0.8), rgba(token.colorBgLayout, 0.4), token.
|
|
11
|
+
container: cx(stylish.blurStrong, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 10;\n\n grid-area: header;\n align-self: stretch;\n\n width: 100%;\n height: 64px;\n\n background: linear-gradient(\n to bottom,\n ", ",\n ", "\n );\n border-bottom: 1px solid ", ";\n "])), rgba(token.colorBgLayout, 0.8), rgba(token.colorBgLayout, 0.4), token.colorBorder))
|
|
12
12
|
};
|
|
13
13
|
});
|
|
@@ -20,7 +20,7 @@ var DraggablePanel = /*#__PURE__*/memo(function (_ref) {
|
|
|
20
20
|
fullscreen = _ref.fullscreen,
|
|
21
21
|
maxHeight = _ref.maxHeight,
|
|
22
22
|
_ref$pin = _ref.pin,
|
|
23
|
-
pin = _ref$pin === void 0 ?
|
|
23
|
+
pin = _ref$pin === void 0 ? true : _ref$pin,
|
|
24
24
|
_ref$mode = _ref.mode,
|
|
25
25
|
mode = _ref$mode === void 0 ? 'fixed' : _ref$mode,
|
|
26
26
|
children = _ref.children,
|
|
@@ -20,7 +20,7 @@ var EditableMessage = /*#__PURE__*/memo(function (_ref) {
|
|
|
20
20
|
placeholder = _ref$placeholder === void 0 ? 'Type something...' : _ref$placeholder,
|
|
21
21
|
_ref$showEditWhenEmpt = _ref.showEditWhenEmpty,
|
|
22
22
|
showEditWhenEmpty = _ref$showEditWhenEmpt === void 0 ? false : _ref$showEditWhenEmpt,
|
|
23
|
-
|
|
23
|
+
styles = _ref.styles;
|
|
24
24
|
var _useControlledState = useControlledState(false, {
|
|
25
25
|
onChange: onEditingChange,
|
|
26
26
|
value: editing
|
|
@@ -46,7 +46,7 @@ var EditableMessage = /*#__PURE__*/memo(function (_ref) {
|
|
|
46
46
|
setTyping(false);
|
|
47
47
|
},
|
|
48
48
|
placeholder: placeholder,
|
|
49
|
-
style:
|
|
49
|
+
style: styles === null || styles === void 0 ? void 0 : styles.input
|
|
50
50
|
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
51
51
|
children: [/*#__PURE__*/_jsx(MessageModal, {
|
|
52
52
|
editing: isEdit,
|
|
@@ -68,10 +68,10 @@ var EditableMessage = /*#__PURE__*/memo(function (_ref) {
|
|
|
68
68
|
setTyping(false);
|
|
69
69
|
},
|
|
70
70
|
placeholder: placeholder,
|
|
71
|
-
style:
|
|
71
|
+
style: styles === null || styles === void 0 ? void 0 : styles.input
|
|
72
72
|
}) : /*#__PURE__*/_jsx(Markdown, {
|
|
73
73
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.markdown,
|
|
74
|
-
style:
|
|
74
|
+
style: styles === null || styles === void 0 ? void 0 : styles.markdown,
|
|
75
75
|
children: value
|
|
76
76
|
})]
|
|
77
77
|
});
|
package/es/MessageInput/index.js
CHANGED
|
@@ -30,28 +30,30 @@ var MessageInput = /*#__PURE__*/memo(function (_ref) {
|
|
|
30
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
31
31
|
temporarySystemRole = _useState2[0],
|
|
32
32
|
setRole = _useState2[1];
|
|
33
|
-
return /*#__PURE__*/_jsxs(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
33
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
34
|
+
children: [/*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
|
|
35
|
+
gap: 8,
|
|
36
|
+
style: {
|
|
37
|
+
flex: 1,
|
|
38
|
+
width: '100%'
|
|
39
|
+
}
|
|
40
|
+
}, props), {}, {
|
|
41
|
+
children: /*#__PURE__*/_jsx(CodeEditor, {
|
|
42
|
+
className: textareaClassname,
|
|
43
|
+
language: "md",
|
|
44
|
+
onValueChange: function onValueChange(value) {
|
|
45
|
+
setRole(value);
|
|
46
|
+
},
|
|
47
|
+
placeholder: placeholder,
|
|
48
|
+
resize: false,
|
|
49
|
+
style: _objectSpread({
|
|
50
|
+
height: height,
|
|
51
|
+
minHeight: '100%'
|
|
52
|
+
}, textareaStyle),
|
|
53
|
+
type: type,
|
|
54
|
+
value: temporarySystemRole
|
|
55
|
+
})
|
|
56
|
+
})), /*#__PURE__*/_jsx(Flexbox, {
|
|
55
57
|
direction: 'horizontal-reverse',
|
|
56
58
|
gap: 8,
|
|
57
59
|
children: renderButtons ? renderButtons(temporarySystemRole).map(function (buttonProps, index) {
|
|
@@ -63,16 +65,14 @@ var MessageInput = /*#__PURE__*/memo(function (_ref) {
|
|
|
63
65
|
onClick: function onClick() {
|
|
64
66
|
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(temporarySystemRole);
|
|
65
67
|
},
|
|
66
|
-
size: "small",
|
|
67
68
|
type: "primary",
|
|
68
69
|
children: (text === null || text === void 0 ? void 0 : text.confirm) || 'Confirm'
|
|
69
70
|
}), /*#__PURE__*/_jsx(Button, {
|
|
70
71
|
onClick: onCancel,
|
|
71
|
-
size: "small",
|
|
72
72
|
children: (text === null || text === void 0 ? void 0 : text.cancel) || 'Cancel'
|
|
73
73
|
})]
|
|
74
74
|
})
|
|
75
75
|
})]
|
|
76
|
-
})
|
|
76
|
+
});
|
|
77
77
|
});
|
|
78
78
|
export default MessageInput;
|