@lobehub/ui 1.138.17 → 1.138.19

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.
@@ -69,6 +69,10 @@ var ActionIconGroup = /*#__PURE__*/memo(function (_ref) {
69
69
  });
70
70
  })
71
71
  },
72
+ overlayStyle: {
73
+ maxHeight: '50%',
74
+ overflow: 'auto'
75
+ },
72
76
  trigger: ['click'],
73
77
  children: /*#__PURE__*/_jsx(ActionIcon, {
74
78
  icon: MoreHorizontal,
@@ -4,7 +4,6 @@ import { type ChatInputAreaInnerProps } from '../ChatInputAreaInner';
4
4
  export interface MobileChatInputAreaProps extends ChatInputAreaInnerProps {
5
5
  bottomAddons?: ReactNode;
6
6
  expand?: boolean;
7
- safeArea?: boolean;
8
7
  setExpand?: (expand: boolean) => void;
9
8
  style?: CSSProperties;
10
9
  textAreaLeftAddons?: ReactNode;
@@ -8,7 +8,6 @@ import { rgba } from 'polished';
8
8
  import { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
9
9
  import { Flexbox } from 'react-layout-kit';
10
10
  import ActionIcon from "../../ActionIcon";
11
- import MobileSafeArea from "../../MobileSafeArea";
12
11
  import ChatInputAreaInner from "../ChatInputAreaInner";
13
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
13
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -16,8 +15,8 @@ var useStyles = createStyles(function (_ref) {
16
15
  var css = _ref.css,
17
16
  token = _ref.token;
18
17
  return {
19
- container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-block: 12px 12px;\n background: ", ";\n border-block-start: 1px solid ", ";\n "])), token.colorFillQuaternary, rgba(token.colorBorder, 0.25)),
20
- expand: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n height: 100%;\n background: ", ";\n "])), token.colorBgLayout),
18
+ container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: none;\n padding-block: 12px 12px;\n background: ", ";\n border-block-start: 1px solid ", ";\n "])), token.colorFillQuaternary, rgba(token.colorBorder, 0.25)),
19
+ expand: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n height: 100%;\n "]))),
21
20
  expandButton: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n inset-inline-start: 14px;\n "]))),
22
21
  expandTextArea: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 1;\n "]))),
23
22
  inner: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n height: inherit;\n padding-block: 0;\n padding-inline: 8px;\n "])))
@@ -36,8 +35,7 @@ var MobileChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
36
35
  onSend = _ref2.onSend,
37
36
  onInput = _ref2.onInput,
38
37
  loading = _ref2.loading,
39
- value = _ref2.value,
40
- safeArea = _ref2.safeArea;
38
+ value = _ref2.value;
41
39
  var containerRef = useRef(null);
42
40
  var _useStyles = useStyles(),
43
41
  cx = _useStyles.cx,
@@ -76,69 +74,65 @@ var MobileChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
76
74
  }, [expand, loading]);
77
75
  var showAddons = !expand && !isFocused;
78
76
  return /*#__PURE__*/_jsxs(Flexbox, {
79
- children: [/*#__PURE__*/_jsxs(Flexbox, {
80
- className: cx(styles.container, expand && styles.expand, className),
81
- gap: 12,
82
- style: style,
83
- children: [topAddons && /*#__PURE__*/_jsx(Flexbox, {
84
- style: showAddons ? {} : {
85
- display: 'none'
77
+ className: cx(styles.container, expand && styles.expand, className),
78
+ gap: 12,
79
+ style: style,
80
+ children: [topAddons && /*#__PURE__*/_jsx(Flexbox, {
81
+ style: showAddons ? {} : {
82
+ display: 'none'
83
+ },
84
+ children: topAddons
85
+ }), /*#__PURE__*/_jsxs(Flexbox, {
86
+ className: cx(expand && styles.expand),
87
+ ref: containerRef,
88
+ style: {
89
+ position: 'relative'
90
+ },
91
+ children: [showFullscreen && /*#__PURE__*/_jsx(ActionIcon, {
92
+ active: true,
93
+ className: styles.expandButton,
94
+ icon: expand ? ChevronDown : ChevronUp,
95
+ onClick: function onClick() {
96
+ return setExpand === null || setExpand === void 0 ? void 0 : setExpand(!expand);
86
97
  },
87
- children: topAddons
88
- }), /*#__PURE__*/_jsxs(Flexbox, {
89
- className: cx(expand && styles.expand),
90
- ref: containerRef,
91
- style: {
92
- position: 'relative'
98
+ size: {
99
+ blockSize: 24,
100
+ borderRadius: '50%',
101
+ fontSize: 14
93
102
  },
94
- children: [showFullscreen && /*#__PURE__*/_jsx(ActionIcon, {
95
- active: true,
96
- className: styles.expandButton,
97
- icon: expand ? ChevronDown : ChevronUp,
98
- onClick: function onClick() {
99
- return setExpand === null || setExpand === void 0 ? void 0 : setExpand(!expand);
103
+ style: expand ? {
104
+ top: 6
105
+ } : {}
106
+ }), /*#__PURE__*/_jsx(InnerContainer, {
107
+ children: /*#__PURE__*/_jsx(ChatInputAreaInner, {
108
+ autoSize: expand ? false : {
109
+ maxRows: 6,
110
+ minRows: 0
100
111
  },
101
- size: {
102
- blockSize: 24,
103
- borderRadius: '50%',
104
- fontSize: 14
112
+ className: cx(expand && styles.expandTextArea),
113
+ loading: loading,
114
+ onBlur: function onBlur() {
115
+ return setIsFocused(false);
105
116
  },
106
- style: expand ? {
107
- top: 6
108
- } : {}
109
- }), /*#__PURE__*/_jsx(InnerContainer, {
110
- children: /*#__PURE__*/_jsx(ChatInputAreaInner, {
111
- autoSize: expand ? false : {
112
- maxRows: 6,
113
- minRows: 0
114
- },
115
- className: cx(expand && styles.expandTextArea),
116
- loading: loading,
117
- onBlur: function onBlur() {
118
- return setIsFocused(false);
119
- },
120
- onFocus: function onFocus() {
121
- return setIsFocused(true);
122
- },
123
- onInput: onInput,
124
- onSend: onSend,
125
- ref: ref,
126
- style: {
127
- height: 36,
128
- paddingBlock: 6
129
- },
130
- type: expand ? 'pure' : 'block',
131
- value: value
132
- })
133
- })]
134
- }), bottomAddons && /*#__PURE__*/_jsx(Flexbox, {
135
- style: showAddons ? {} : {
136
- display: 'none'
137
- },
138
- children: bottomAddons
117
+ onFocus: function onFocus() {
118
+ return setIsFocused(true);
119
+ },
120
+ onInput: onInput,
121
+ onSend: onSend,
122
+ ref: ref,
123
+ style: {
124
+ height: 36,
125
+ paddingBlock: 6
126
+ },
127
+ type: expand ? 'pure' : 'block',
128
+ value: value
129
+ })
139
130
  })]
140
- }), safeArea && !isFocused && /*#__PURE__*/_jsx(MobileSafeArea, {
141
- position: 'bottom'
131
+ }), bottomAddons && /*#__PURE__*/_jsx(Flexbox, {
132
+ style: showAddons ? {} : {
133
+ display: 'none'
134
+ },
135
+ children: bottomAddons
142
136
  })]
143
137
  });
144
138
  });
@@ -7,10 +7,10 @@ export var useStyles = createStyles(function (_ref) {
7
7
  token = _ref.token;
8
8
  return {
9
9
  active: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorPrimary),
10
- container: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow: hidden;\n flex: none;\n user-select: none;\n\n width: 100vw;\n\n background: ", ";\n border-block-start: 1px solid ", ";\n "])), token.colorBgLayout, rgba(token.colorBorder, 0.25)),
10
+ container: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n user-select: none;\n\n overflow: hidden;\n flex: none;\n\n width: 100vw;\n\n background: ", ";\n border-block-start: 1px solid ", ";\n "])), token.colorBgLayout, rgba(token.colorBorder, 0.25)),
11
11
  icon: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 24px;\n height: 24px;\n font-size: 24px;\n "]))),
12
12
  inner: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: relative;\n width: 100%;\n height: 48px;\n "]))),
13
- tab: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n cursor: pointer;\n width: 48px;\n height: 48px;\n color: ", ";\n "])), token.colorTextSecondary),
14
- title: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n width: 100%;\n\n font-size: 12px;\n line-height: 1.125em;\n margin-top: -0.125em;\n text-align: center;\n text-overflow: ellipsis;\n white-space: nowrap;\n "])))
13
+ tab: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n cursor: pointer;\n width: 48px;\n height: 48px;\n color: ", ";\n "])), token.colorTextDescription),
14
+ title: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n width: 100%;\n margin-block-start: -0.125em;\n\n font-size: 12px;\n line-height: 1.125em;\n text-align: center;\n text-overflow: ellipsis;\n white-space: nowrap;\n "])))
15
15
  };
16
16
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.138.17",
3
+ "version": "1.138.19",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",