listpage-next 0.0.87 → 0.0.89

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.
@@ -1,11 +1,17 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { ClientContent } from "../features/ChatClient/index.js";
3
- const Demo8 = ()=>/*#__PURE__*/ jsx(ClientContent, {
4
- style: {
5
- height: 800
6
- },
7
- headerProps: {
8
- defaultTitle: "搜索海量信息,生成研究报告"
9
- }
2
+ import "../features/ChatClient/components/NewConversationButton/index.js";
3
+ import { ChatPage } from "../features/ChatClient/index.js";
4
+ const request = {
5
+ getConversations: async ()=>({
6
+ list: [
7
+ {
8
+ id: '11',
9
+ title: 'xxxxxxx'
10
+ }
11
+ ]
12
+ })
13
+ };
14
+ const Demo8 = ()=>/*#__PURE__*/ jsx(ChatPage, {
15
+ request: request
10
16
  });
11
17
  export { Demo8 };
@@ -34,6 +34,7 @@ const ChatInputContent = styled.div`
34
34
  min-height: 60px;
35
35
  max-height: 220px;
36
36
  resize: none;
37
+ font-size: 16px;
37
38
 
38
39
  background-color: transparent;
39
40
  box-shadow: none;
@@ -8,7 +8,7 @@ const HeaderContainer = styled_components.div`
8
8
  display: flex;
9
9
  justify-content: space-between;
10
10
  align-items: center;
11
- padding: 8px;
11
+ padding: 8px 6px;
12
12
  `;
13
13
  const HeaderTitle = styled_components.div`
14
14
  align-items: center;
@@ -24,7 +24,7 @@ const HeaderTitle = styled_components.div`
24
24
  const ListContainer = styled_components.div`
25
25
  flex: 1;
26
26
  overflow: hidden;
27
- padding: 8px;
27
+ padding: 0 2px;
28
28
  `;
29
29
  const ListItemContainer = styled_components.div`
30
30
  display: flex;
@@ -8,7 +8,6 @@ export interface ChatPageProps<SessionData = any, MessageInfo extends BaseMessag
8
8
  render: ChatRender<MessageInfo>;
9
9
  onClickConversation?: (key: string, item: SessionData) => void;
10
10
  onClickNewConversation?: () => void;
11
- onClickMoreAgent?: () => void;
12
11
  onRenameConversation?: (key: string, item: SessionData) => Promise<void>;
13
12
  onDeleteConversation?: (key: string, item: SessionData) => Promise<void>;
14
13
  }
@@ -2,11 +2,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Sider } from "./Sider.js";
3
3
  import { Logo } from "../Logo/index.js";
4
4
  import { HistoryConversation } from "../HistoryConversation/index.js";
5
- import { NewConversation } from "../NewConversation/index.js";
5
+ import { NewConversationButton } from "../NewConversationButton/index.js";
6
6
  import { ChatClientProvider } from "../../context/index.js";
7
7
  import { Content, Layout } from "./styles.js";
8
8
  const ChatPageComponent = (props)=>{
9
- const { logo, title, children, request, onClickConversation, onClickNewConversation, onClickMoreAgent, onRenameConversation, onDeleteConversation } = props;
9
+ const { logo, title, children, request, onClickConversation, onClickNewConversation, onRenameConversation, onDeleteConversation } = props;
10
10
  return /*#__PURE__*/ jsxs(Layout, {
11
11
  style: {
12
12
  height: '100vh'
@@ -18,9 +18,8 @@ const ChatPageComponent = (props)=>{
18
18
  icon: logo,
19
19
  title: title || '智能对话'
20
20
  }),
21
- /*#__PURE__*/ jsx(NewConversation, {
22
- onClickNew: onClickNewConversation,
23
- onClickMoreAgent: onClickMoreAgent
21
+ /*#__PURE__*/ jsx(NewConversationButton, {
22
+ onClickNew: onClickNewConversation
24
23
  }),
25
24
  /*#__PURE__*/ jsx(HistoryConversation, {
26
25
  request: request.getConversations,
@@ -20,7 +20,8 @@ const Sider = (props)=>{
20
20
  });
21
21
  const styles = collapsed ? {
22
22
  width: 0,
23
- borderRight: 'none'
23
+ borderRight: 'none',
24
+ padding: 0
24
25
  } : {};
25
26
  return /*#__PURE__*/ jsx(SiderContainer, {
26
27
  style: styles,
@@ -33,7 +34,7 @@ const Sider = (props)=>{
33
34
  });
34
35
  };
35
36
  const SiderContainer = styled.div`
36
- width: 260px;
37
+ width: 280px;
37
38
  background: #f3f4f6;
38
39
  border-right: .5px solid #00000014;
39
40
 
@@ -44,5 +45,8 @@ const SiderContainer = styled.div`
44
45
  display: flex;
45
46
  flex-direction: column;
46
47
  flex-shrink: 0;
48
+
49
+ padding: 0 12px;
50
+ box-sizing: border-box;
47
51
  `;
48
52
  export { Sider };
@@ -19,7 +19,7 @@ const Logo = (props)=>{
19
19
  };
20
20
  const LogoContainer = styled.div`
21
21
  height: 36px;
22
- margin: 12px 10px 0 16px;
22
+ margin: 12px 0px 0px 0px;
23
23
  display: flex;
24
24
  gap: 8px;
25
25
  align-items: center;
@@ -1,4 +1,4 @@
1
- export declare const NewConversation: (props: {
1
+ export declare const NewConversationButton: (props: {
2
2
  onClickNew?: () => void;
3
3
  onClickMoreAgent?: () => void;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,38 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { EditTwoTone } from "@ant-design/icons";
3
+ import { styled } from "styled-components";
4
+ const NewConversationContainer = styled.div`
5
+ margin-top: 16px;
6
+ `;
7
+ const NewConversationButtonStyle = styled.div`
8
+ cursor: pointer;
9
+ border: .5px solid rgba(0, 102, 255, .15);
10
+ color: #0057ff;
11
+
12
+ display: flex;
13
+ align-items: center;
14
+ gap: 6px;
15
+
16
+ padding: 8px 6px;
17
+ border-radius: 12px;
18
+ font-size: 14px;
19
+ font-weight: 600;
20
+ background: #0057ff0f;
21
+ height: 40px;
22
+ box-sizing: border-box;
23
+ &:hover {
24
+ background: rgba(0, 102, 255, .1);
25
+ }
26
+ `;
27
+ const NewConversationButton = (props)=>/*#__PURE__*/ jsx(NewConversationContainer, {
28
+ children: /*#__PURE__*/ jsxs(NewConversationButtonStyle, {
29
+ onClick: props.onClickNew,
30
+ children: [
31
+ /*#__PURE__*/ jsx(EditTwoTone, {}),
32
+ /*#__PURE__*/ jsx("span", {
33
+ children: "新对话"
34
+ })
35
+ ]
36
+ })
37
+ });
38
+ export { NewConversationButton };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "listpage-next",
3
- "version": "0.0.87",
3
+ "version": "0.0.89",
4
4
  "description": "A React component library for creating filter forms with Ant Design",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,42 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { EditOutlined } from "@ant-design/icons";
3
- import { Button, Divider } from "antd";
4
- import { styled } from "styled-components";
5
- const NewConversationContainer = styled.div`
6
- padding: 0 12px;
7
- margin-top: 16px;
8
- `;
9
- const FakeButtonStyle = styled.div`
10
- &:hover {
11
- background-color: #0000000a;
12
- }
13
- color: #000000;
14
- display: flex;
15
- align-items: center;
16
- padding: 8px;
17
- border-radius: 8px;
18
- cursor: pointer;
19
-
20
- font-weight: 400;
21
- font-size: 14px;
22
-
23
- margin-top: 8px;
24
- `;
25
- const NewConversation = (props)=>/*#__PURE__*/ jsxs(NewConversationContainer, {
26
- children: [
27
- /*#__PURE__*/ jsx(Button, {
28
- onClick: props.onClickNew,
29
- variant: "outlined",
30
- icon: /*#__PURE__*/ jsx(EditOutlined, {}),
31
- block: true,
32
- color: "blue",
33
- children: "新对话"
34
- }),
35
- /*#__PURE__*/ jsx(FakeButtonStyle, {
36
- onClick: props.onClickMoreAgent,
37
- children: "AI智能体"
38
- }),
39
- /*#__PURE__*/ jsx(Divider, {})
40
- ]
41
- });
42
- export { NewConversation };