listpage-next 0.0.62 → 0.0.64

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.
@@ -17,5 +17,4 @@ export interface InfiniteListProps<DataType = any> {
17
17
  pageSize?: number;
18
18
  rowKey?: string;
19
19
  }
20
- declare const InfiniteList: <DataType = any>(props: InfiniteListProps<DataType>) => import("react/jsx-runtime").JSX.Element;
21
- export default InfiniteList;
20
+ export declare const InfiniteList: <DataType = any>(props: InfiniteListProps<DataType>) => import("react/jsx-runtime").JSX.Element;
@@ -120,5 +120,4 @@ const ListContainer = styled_components(List)`
120
120
  }
121
121
  }
122
122
  `;
123
- const components_InfiniteList = InfiniteList;
124
- export { components_InfiniteList as default };
123
+ export { InfiniteList };
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Avatar, Button, List } from "antd";
3
- import InfiniteList from "../components/InfiniteList/index.js";
3
+ import { InfiniteList } from "../components/InfiniteList/index.js";
4
4
  const request = async ({ current, pageSize })=>{
5
5
  const fakeDataUrl = `https://660d2bd96ddfa2943b33731c.mockapi.io/api/users?page=${current}&limit=${pageSize}`;
6
6
  const response = await fetch(fakeDataUrl);
@@ -1,3 +1,7 @@
1
- import { Fragment, jsx } from "react/jsx-runtime";
2
- const Demo8 = ()=>/*#__PURE__*/ jsx(Fragment, {});
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { ChatGuidance } from "../features/ChatClient/index.js";
3
+ const Demo8 = ()=>/*#__PURE__*/ jsx(ChatGuidance, {
4
+ skill: "深入研究",
5
+ greetingText: "搜索海量信息,生成研究报告"
6
+ });
3
7
  export { Demo8 };
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ export interface ChatGuidanceProps {
3
+ greetingText?: string;
4
+ skill?: string;
5
+ extra?: React.ReactNode;
6
+ value?: string;
7
+ onChange?: (value: string) => void;
8
+ }
9
+ export declare const ChatGuidance: (props: ChatGuidanceProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,44 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import "react";
3
+ import { Button, Divider, Input } from "antd";
4
+ import { useControllableValue } from "ahooks";
5
+ import { ChatInputBottom, ChatInputContent, ChatInputPanel, GreetingText } from "./styles.js";
6
+ const ChatGuidance = (props)=>{
7
+ const { greetingText, extra } = props;
8
+ const [value, onChange] = useControllableValue(props);
9
+ const disabled = !value;
10
+ return /*#__PURE__*/ jsxs("div", {
11
+ children: [
12
+ /*#__PURE__*/ jsx(GreetingText, {
13
+ children: greetingText
14
+ }),
15
+ /*#__PURE__*/ jsxs(ChatInputPanel, {
16
+ children: [
17
+ /*#__PURE__*/ jsx(ChatInputContent, {
18
+ children: /*#__PURE__*/ jsx(Input.TextArea, {
19
+ value: value,
20
+ onChange: (e)=>onChange(e.target.value),
21
+ autoSize: false
22
+ })
23
+ }),
24
+ /*#__PURE__*/ jsxs(ChatInputBottom, {
25
+ children: [
26
+ extra,
27
+ extra && /*#__PURE__*/ jsx(Divider, {
28
+ variant: "solid",
29
+ size: "large",
30
+ type: "vertical"
31
+ }),
32
+ /*#__PURE__*/ jsx(Button, {
33
+ type: "primary",
34
+ disabled: disabled,
35
+ children: "发送"
36
+ })
37
+ ]
38
+ })
39
+ ]
40
+ })
41
+ ]
42
+ });
43
+ };
44
+ export { ChatGuidance };
@@ -0,0 +1,5 @@
1
+ export declare const GreetingText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
+ export declare const ChatInputPanel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export declare const ChatInputContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
+ export declare const SkillTag: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("antd").TagProps & import("react").RefAttributes<HTMLSpanElement>, never>> & string & Omit<import("antd").TagType, keyof import("react").Component<any, {}, any>>;
5
+ export declare const ChatInputBottom: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -0,0 +1,71 @@
1
+ import { Tag } from "antd";
2
+ import styled_components from "styled-components";
3
+ const GreetingText = styled_components.div`
4
+ font-size: 32px;
5
+ margin-bottom: 32px;
6
+ min-height: 45px;
7
+
8
+ font-family: Montserrat;
9
+ position: relative;
10
+
11
+ color: #000000d9;
12
+ font-weight: 600;
13
+
14
+ margin-bottom: 32px;
15
+ text-align: center;
16
+ `;
17
+ const ChatInputPanel = styled_components.div`
18
+ position: relative;
19
+ max-height: 300px;
20
+ min-height: 140px;
21
+ padding: 12px;
22
+ border-radius: 20px;
23
+ border: 1px solid rgb(107, 164, 238);
24
+ box-shadow: 0 0 20px 0 #c8efff80;
25
+ gap: 12px;
26
+
27
+ bottom-height: 36px;
28
+ display: flex;
29
+ flex-direction: column;
30
+ `;
31
+ const ChatInputContent = styled_components.div`
32
+ outline: none;
33
+ border: none;
34
+ flex-grow: 1;
35
+ max-height: 220px;
36
+ flex-shrink: 1;
37
+ overflow: auto;
38
+ &:focus-visible {
39
+ outline: none;
40
+ }
41
+
42
+ .ant-input {
43
+ border: none;
44
+ outline: none;
45
+ &:hover {
46
+ border: none;
47
+ outline: none;
48
+ box-shadow: none;
49
+ }
50
+ min-height: 100px;
51
+ max-height: 220px;
52
+ resize: none;
53
+ }
54
+ `;
55
+ const SkillTag = styled_components(Tag)`
56
+ color: #0057ff;
57
+ margin-right: 4px;
58
+ padding: 2px 8px;
59
+ font-weight: 600;
60
+ line-height: 150%;
61
+
62
+ cursor: pointer;
63
+ `;
64
+ const ChatInputBottom = styled_components.div`
65
+ display: flex;
66
+ justify-content: flex-end;
67
+ align-items: center;
68
+
69
+ flex-shrink: 0;
70
+ `;
71
+ export { ChatInputBottom, ChatInputContent, ChatInputPanel, GreetingText, SkillTag };
@@ -3,7 +3,7 @@ import { useRef } from "react";
3
3
  import { Avatar, Button, Dropdown, Tooltip, Typography } from "antd";
4
4
  import { useHover } from "ahooks";
5
5
  import { ClockCircleOutlined, MessageOutlined, MoreOutlined } from "@ant-design/icons";
6
- import InfiniteList from "../../../../components/InfiniteList/index.js";
6
+ import { InfiniteList } from "../../../../components/InfiniteList/index.js";
7
7
  import { HeaderContainer, HeaderTitle, HistoryConversationContainer, ListContainer, ListItemContainer, ListText } from "./styles.js";
8
8
  const HistoryConversation = (props)=>{
9
9
  const { request, activeKey, rowKey = "id", onDelete, onRename, onSelect } = props;
@@ -8,7 +8,6 @@ const HeaderContainer = styled_components.div`
8
8
  display: flex;
9
9
  justify-content: space-between;
10
10
  align-items: center;
11
-
12
11
  padding: 8px;
13
12
  `;
14
13
  const HeaderTitle = styled_components.div`
@@ -18,14 +17,13 @@ const HeaderTitle = styled_components.div`
18
17
  font-size: 12px;
19
18
  font-weight: 600;
20
19
  min-width: 0;
21
- colro: #0000004d;
20
+ color: #0000004d;
22
21
  line-height: 20px;
23
22
  height: 20px;
24
23
  `;
25
24
  const ListContainer = styled_components.div`
26
25
  flex: 1;
27
26
  overflow: hidden;
28
-
29
27
  padding: 8px;
30
28
  `;
31
29
  const ListItemContainer = styled_components.div`
@@ -10,6 +10,7 @@ const FakeButtonStyle = styled.div`
10
10
  &:hover {
11
11
  background-color: #0000000a;
12
12
  }
13
+ color: #000000;
13
14
  display: flex;
14
15
  align-items: center;
15
16
  padding: 8px;
@@ -1 +1,2 @@
1
1
  export * from './components/Layout';
2
+ export * from './components/ChatGuidance';
@@ -1 +1,2 @@
1
1
  export * from "./components/Layout/index.js";
2
+ export * from "./components/ChatGuidance/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "listpage-next",
3
- "version": "0.0.62",
3
+ "version": "0.0.64",
4
4
  "description": "A React component library for creating filter forms with Ant Design",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",