@lobehub/ui 1.138.19 → 1.138.21
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.
|
@@ -4,6 +4,7 @@ import { type ChatInputAreaInnerProps } from '../ChatInputAreaInner';
|
|
|
4
4
|
export interface MobileChatInputAreaProps extends ChatInputAreaInnerProps {
|
|
5
5
|
bottomAddons?: ReactNode;
|
|
6
6
|
expand?: boolean;
|
|
7
|
+
safeArea?: boolean;
|
|
7
8
|
setExpand?: (expand: boolean) => void;
|
|
8
9
|
style?: CSSProperties;
|
|
9
10
|
textAreaLeftAddons?: ReactNode;
|
|
@@ -7,6 +7,7 @@ import { ChevronDown, ChevronUp } from 'lucide-react';
|
|
|
7
7
|
import { rgba } from 'polished';
|
|
8
8
|
import { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
|
|
9
9
|
import { Flexbox } from 'react-layout-kit';
|
|
10
|
+
import MobileSafeArea from "../../MobileSafeArea";
|
|
10
11
|
import ActionIcon from "../../ActionIcon";
|
|
11
12
|
import ChatInputAreaInner from "../ChatInputAreaInner";
|
|
12
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -35,7 +36,8 @@ var MobileChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
35
36
|
onSend = _ref2.onSend,
|
|
36
37
|
onInput = _ref2.onInput,
|
|
37
38
|
loading = _ref2.loading,
|
|
38
|
-
value = _ref2.value
|
|
39
|
+
value = _ref2.value,
|
|
40
|
+
safeArea = _ref2.safeArea;
|
|
39
41
|
var containerRef = useRef(null);
|
|
40
42
|
var _useStyles = useStyles(),
|
|
41
43
|
cx = _useStyles.cx,
|
|
@@ -133,6 +135,8 @@ var MobileChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
133
135
|
display: 'none'
|
|
134
136
|
},
|
|
135
137
|
children: bottomAddons
|
|
138
|
+
}), safeArea && !isFocused && /*#__PURE__*/_jsx(MobileSafeArea, {
|
|
139
|
+
position: 'bottom'
|
|
136
140
|
})]
|
|
137
141
|
});
|
|
138
142
|
});
|