@alifd/chat 0.3.37-beta.0 → 0.3.37-beta.10
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/form/index.d.ts +23 -0
- package/es/form/index.js +33 -0
- package/es/form/main.scss +5 -0
- package/es/form/style.d.ts +1 -0
- package/es/form/style.js +1 -0
- package/es/form/types.d.ts +518 -0
- package/es/html-render/github-markdown-css.css +1168 -0
- package/es/html-render/index.js +1 -3
- package/es/html-render/main.scss +21 -1
- package/es/html-render/utils.d.ts +2 -0
- package/es/html-render/utils.js +2 -0
- package/es/icon/icon.css +363 -0
- package/es/index.js +1 -1
- package/es/markdown/index.js +4 -1
- package/es/markdown/types.d.ts +5 -0
- package/es/reference/index.js +4 -1
- package/es/tool-status/index.js +6 -3
- package/es/tool-status/main.scss +17 -8
- package/es/tool-status/types.d.ts +8 -0
- package/lib/form/index.d.ts +23 -0
- package/lib/form/index.js +35 -0
- package/lib/form/main.scss +5 -0
- package/lib/form/style.d.ts +1 -0
- package/lib/form/style.js +3 -0
- package/lib/form/types.d.ts +518 -0
- package/lib/form/types.js +2 -0
- package/lib/html-render/github-markdown-css.css +1168 -0
- package/lib/html-render/index.js +1 -3
- package/lib/html-render/main.scss +21 -1
- package/lib/html-render/utils.d.ts +2 -0
- package/lib/html-render/utils.js +5 -0
- package/lib/icon/icon.css +363 -0
- package/lib/index.js +1 -1
- package/lib/markdown/index.js +4 -1
- package/lib/markdown/types.d.ts +5 -0
- package/lib/reference/index.js +4 -1
- package/lib/tool-status/index.js +6 -3
- package/lib/tool-status/main.scss +17 -8
- package/lib/tool-status/types.d.ts +8 -0
- package/package.json +3 -2
- package/es/ai-loading/__docs__/demo/basic/index.d.ts +0 -8
- package/es/ai-loading/__docs__/demo/basic/index.js +0 -16
- package/es/balloon/__docs__/demo/basic/index.d.ts +0 -9
- package/es/balloon/__docs__/demo/basic/index.js +0 -16
- package/es/button/__docs__/demo/size/index.d.ts +0 -8
- package/es/button/__docs__/demo/size/index.js +0 -115
- package/es/card/__docs__/demo/basic/index.d.ts +0 -11
- package/es/card/__docs__/demo/basic/index.js +0 -39
- package/es/card/__docs__/demo/demo-legal-affairs/index.d.ts +0 -13
- package/es/card/__docs__/demo/demo-legal-affairs/index.js +0 -130
- package/es/card-loading/__docs__/demo/basic/index.d.ts +0 -8
- package/es/card-loading/__docs__/demo/basic/index.js +0 -13
- package/es/checkbox-group/__docs__/demo/basic/index.d.ts +0 -6
- package/es/checkbox-group/__docs__/demo/basic/index.js +0 -26
- package/es/date-picker/__docs__/demo/basic/index.d.ts +0 -8
- package/es/date-picker/__docs__/demo/basic/index.js +0 -13
- package/es/drawer/__docs__/demo/basic/index.d.ts +0 -9
- package/es/drawer/__docs__/demo/basic/index.js +0 -30
- package/es/feedback/__docs__/demo/basic/index.d.ts +0 -8
- package/es/feedback/__docs__/demo/basic/index.js +0 -12
- package/es/feedback/__docs__/demo/size/index.d.ts +0 -8
- package/es/feedback/__docs__/demo/size/index.js +0 -25
- package/es/flip/__docs__/demo/basic/index.d.ts +0 -8
- package/es/flip/__docs__/demo/basic/index.js +0 -23
- package/es/float-button/__docs__/demo/basic/index.d.ts +0 -7
- package/es/float-button/__docs__/demo/basic/index.js +0 -104
- package/es/html-render/__docs__/demo/basic/index.js +0 -95
- package/es/icon/__docs__/demo/basic/index.d.ts +0 -8
- package/es/icon/__docs__/demo/basic/index.js +0 -17
- package/es/image-preview/__docs__/demo/basic/index.d.ts +0 -8
- package/es/image-preview/__docs__/demo/basic/index.js +0 -14
- package/es/img/__docs__/demo/basic/index.d.ts +0 -8
- package/es/img/__docs__/demo/basic/index.js +0 -44
- package/es/input/__docs__/demo/basic/index.d.ts +0 -1
- package/es/input/__docs__/demo/basic/index.js +0 -12
- package/es/list/__docs__/demo/basic/index.d.ts +0 -8
- package/es/list/__docs__/demo/basic/index.js +0 -37
- package/es/loading/__docs__/demo/basic/index.d.ts +0 -8
- package/es/loading/__docs__/demo/basic/index.js +0 -34
- package/es/markdown/__docs__/demo/baisc/index.d.ts +0 -1
- package/es/markdown/__docs__/demo/baisc/index.js +0 -243
- package/es/message/__docs__/demo/basic/index.d.ts +0 -9
- package/es/message/__docs__/demo/basic/index.js +0 -25
- package/es/origin/__docs__/demo/basic/index.d.ts +0 -8
- package/es/origin/__docs__/demo/basic/index.js +0 -13
- package/es/person-picker/__docs__/demo/basic/index.d.ts +0 -8
- package/es/person-picker/__docs__/demo/basic/index.js +0 -13
- package/es/radio-group/__docs__/demo/basic/index.d.ts +0 -6
- package/es/radio-group/__docs__/demo/basic/index.js +0 -26
- package/es/recommend/__docs__/demo/basic/index.d.ts +0 -8
- package/es/recommend/__docs__/demo/basic/index.js +0 -51
- package/es/reference/__docs__/demo/basic/index.d.ts +0 -8
- package/es/reference/__docs__/demo/basic/index.js +0 -83
- package/es/rich-text-input/__docs__/demo/basic/index.d.ts +0 -8
- package/es/rich-text-input/__docs__/demo/basic/index.js +0 -19
- package/es/select/__docs__/demo/basic/index.d.ts +0 -1
- package/es/select/__docs__/demo/basic/index.js +0 -22
- package/es/step/__docs__/demo/basic/index.d.ts +0 -8
- package/es/step/__docs__/demo/basic/index.js +0 -29
- package/es/stop-generate/__docs__/demo/basic/index.d.ts +0 -8
- package/es/stop-generate/__docs__/demo/basic/index.js +0 -53
- package/es/tag/__docs__/demo/basic/index.d.ts +0 -8
- package/es/tag/__docs__/demo/basic/index.js +0 -16
- package/es/text/__docs__/demo/basic/index.d.ts +0 -21
- package/es/text/__docs__/demo/basic/index.js +0 -44
- package/es/time-picker/__docs__/demo/basic/index.d.ts +0 -8
- package/es/time-picker/__docs__/demo/basic/index.js +0 -13
- package/es/tool-status/__docs__/demo/basic/index.d.ts +0 -8
- package/es/tool-status/__docs__/demo/basic/index.js +0 -53
- package/lib/ai-loading/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/ai-loading/__docs__/demo/basic/index.js +0 -19
- package/lib/balloon/__docs__/demo/basic/index.d.ts +0 -9
- package/lib/balloon/__docs__/demo/basic/index.js +0 -19
- package/lib/button/__docs__/demo/size/index.d.ts +0 -8
- package/lib/button/__docs__/demo/size/index.js +0 -118
- package/lib/card/__docs__/demo/basic/index.d.ts +0 -11
- package/lib/card/__docs__/demo/basic/index.js +0 -42
- package/lib/card/__docs__/demo/demo-legal-affairs/index.d.ts +0 -13
- package/lib/card/__docs__/demo/demo-legal-affairs/index.js +0 -133
- package/lib/card-loading/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/card-loading/__docs__/demo/basic/index.js +0 -16
- package/lib/checkbox-group/__docs__/demo/basic/index.d.ts +0 -6
- package/lib/checkbox-group/__docs__/demo/basic/index.js +0 -29
- package/lib/date-picker/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/date-picker/__docs__/demo/basic/index.js +0 -16
- package/lib/drawer/__docs__/demo/basic/index.d.ts +0 -9
- package/lib/drawer/__docs__/demo/basic/index.js +0 -33
- package/lib/feedback/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/feedback/__docs__/demo/basic/index.js +0 -15
- package/lib/feedback/__docs__/demo/size/index.d.ts +0 -8
- package/lib/feedback/__docs__/demo/size/index.js +0 -28
- package/lib/flip/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/flip/__docs__/demo/basic/index.js +0 -26
- package/lib/float-button/__docs__/demo/basic/index.d.ts +0 -7
- package/lib/float-button/__docs__/demo/basic/index.js +0 -107
- package/lib/html-render/__docs__/demo/basic/index.d.ts +0 -1
- package/lib/html-render/__docs__/demo/basic/index.js +0 -98
- package/lib/icon/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/icon/__docs__/demo/basic/index.js +0 -20
- package/lib/image-preview/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/image-preview/__docs__/demo/basic/index.js +0 -17
- package/lib/img/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/img/__docs__/demo/basic/index.js +0 -47
- package/lib/input/__docs__/demo/basic/index.d.ts +0 -1
- package/lib/input/__docs__/demo/basic/index.js +0 -15
- package/lib/list/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/list/__docs__/demo/basic/index.js +0 -40
- package/lib/loading/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/loading/__docs__/demo/basic/index.js +0 -37
- package/lib/markdown/__docs__/demo/baisc/index.d.ts +0 -1
- package/lib/markdown/__docs__/demo/baisc/index.js +0 -246
- package/lib/message/__docs__/demo/basic/index.d.ts +0 -9
- package/lib/message/__docs__/demo/basic/index.js +0 -28
- package/lib/origin/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/origin/__docs__/demo/basic/index.js +0 -16
- package/lib/person-picker/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/person-picker/__docs__/demo/basic/index.js +0 -16
- package/lib/radio-group/__docs__/demo/basic/index.d.ts +0 -6
- package/lib/radio-group/__docs__/demo/basic/index.js +0 -29
- package/lib/recommend/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/recommend/__docs__/demo/basic/index.js +0 -54
- package/lib/reference/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/reference/__docs__/demo/basic/index.js +0 -86
- package/lib/rich-text-input/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/rich-text-input/__docs__/demo/basic/index.js +0 -22
- package/lib/select/__docs__/demo/basic/index.d.ts +0 -1
- package/lib/select/__docs__/demo/basic/index.js +0 -25
- package/lib/step/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/step/__docs__/demo/basic/index.js +0 -32
- package/lib/stop-generate/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/stop-generate/__docs__/demo/basic/index.js +0 -56
- package/lib/tag/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/tag/__docs__/demo/basic/index.js +0 -19
- package/lib/text/__docs__/demo/basic/index.d.ts +0 -21
- package/lib/text/__docs__/demo/basic/index.js +0 -47
- package/lib/time-picker/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/time-picker/__docs__/demo/basic/index.js +0 -16
- package/lib/tool-status/__docs__/demo/basic/index.d.ts +0 -8
- package/lib/tool-status/__docs__/demo/basic/index.js +0 -56
- /package/es/{html-render/__docs__/demo/basic/index.d.ts → form/types.js} +0 -0
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @demo 基础用法
|
|
3
|
-
* @en Basic
|
|
4
|
-
* @order 1
|
|
5
|
-
*/
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import ReactDOM from 'react-dom';
|
|
8
|
-
import { RadioGroup } from '@alifd/chat';
|
|
9
|
-
import '@alifd/chat/es/radio-group/style';
|
|
10
|
-
const options1 = [
|
|
11
|
-
{ label: '苹果', value: 'Apple', description: '很好吃的苹果' },
|
|
12
|
-
{ label: '梨', value: 'Pear', description: '鲜嫩多汁' },
|
|
13
|
-
{ label: '超级无敌好吃的来自意大利的桔子', value: 'Orange', description: '这是一个很长的文案,来描述同样很好吃的桔子' }
|
|
14
|
-
];
|
|
15
|
-
const options2 = [
|
|
16
|
-
{ label: '因公', value: 'Company' },
|
|
17
|
-
{ label: '因私', value: 'Personal' },
|
|
18
|
-
];
|
|
19
|
-
const onChange = (value) => {
|
|
20
|
-
console.log(value);
|
|
21
|
-
};
|
|
22
|
-
ReactDOM.render(React.createElement("div", null,
|
|
23
|
-
React.createElement("div", { style: { maxWidth: 400 } },
|
|
24
|
-
React.createElement(RadioGroup, { options: options1, value: "Pear", onChange: onChange })),
|
|
25
|
-
React.createElement("div", { style: { maxWidth: 400, marginTop: 40 } },
|
|
26
|
-
React.createElement(RadioGroup, { options: options2, onChange: onChange }))), mountNode);
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @demo 基本使用
|
|
3
|
-
* @en Basic
|
|
4
|
-
* @order 1
|
|
5
|
-
* @remarks recommend 猜你想问组件的基本用法。
|
|
6
|
-
* - Basic usage of `recommend`
|
|
7
|
-
*/
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import ReactDOM from 'react-dom';
|
|
10
|
-
import { Recommend } from '@alifd/chat';
|
|
11
|
-
import '@alifd/chat/es/recommend/style';
|
|
12
|
-
ReactDOM.render(React.createElement("div", { className: "origin-basic-demo" },
|
|
13
|
-
React.createElement("div", { style: {
|
|
14
|
-
width: '500px',
|
|
15
|
-
} },
|
|
16
|
-
React.createElement(Recommend, { defaultExpanded: false, recommendList: [
|
|
17
|
-
{
|
|
18
|
-
name: '上证指数(000001)股票价格_行情_走势图 - 东方财富',
|
|
19
|
-
title: '上证指数(000001)股票价格_行情_走势图 - 东方财富',
|
|
20
|
-
url: 'https://quote.eastmoney.com/zs000001.html',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: '今日股市_今天中国股票金融市场行情_英为财情Investing.com',
|
|
24
|
-
title: '今日股市_今天中国股票金融市场行情_英为财情Investing.com',
|
|
25
|
-
url: 'https://m.cn.investing.com/markets/china',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: '今日股市_今天中国股票金融市场行情_英为财情Investing.com',
|
|
29
|
-
title: '今日股市_今天中国股票金融市场行情_英为财情Investing.com',
|
|
30
|
-
url: 'https://m.cn.investing.com/markets/china',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: '今日股市_今天中国股票金融市场行情_英为财情Investing.com',
|
|
34
|
-
title: '今日股市_今天中国股票金融市场行情_英为财情Investing.com',
|
|
35
|
-
url: 'https://m.cn.investing.com/markets/china',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name: '今日股市_今天中国股票金融市场行情_英为财情Investing.com',
|
|
39
|
-
title: '今日股市_今天中国股票金融市场行情_英为财情Investing.com',
|
|
40
|
-
url: 'https://m.cn.investing.com/markets/china',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: '今日股市_今天中国股票金融市场行情_英为财情Investing.com',
|
|
44
|
-
title: '今日股市_今天中国股票金融市场行情_英为财情Investing.com',
|
|
45
|
-
url: 'https://m.cn.investing.com/markets/china',
|
|
46
|
-
},
|
|
47
|
-
], onToggle: onToggle => {
|
|
48
|
-
console.log('onToggle:', onToggle);
|
|
49
|
-
}, onItemClick: (item, index) => {
|
|
50
|
-
console.log('onItemClick:', item, index);
|
|
51
|
-
} }))), mountNode);
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @demo 基本使用
|
|
3
|
-
* @en Basic
|
|
4
|
-
* @order 1
|
|
5
|
-
* @remarks StopGenerate 组件的基本用法。
|
|
6
|
-
* - Basic usage of `StopGenerateP`
|
|
7
|
-
*/
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import ReactDOM from 'react-dom';
|
|
10
|
-
import { Reference } from '@alifd/chat';
|
|
11
|
-
import '@alifd/chat/es/reference/style';
|
|
12
|
-
const testList = [
|
|
13
|
-
{
|
|
14
|
-
"sourceCode": "google_search",
|
|
15
|
-
"name": "上证指数(000001)股票价格_行情_走势图 - 东方财富",
|
|
16
|
-
"title": "上证指数(000001)股票价格_行情_走势图 - 东方财富",
|
|
17
|
-
"url": "https://quote.eastmoney.com/zs000001.html",
|
|
18
|
-
"sourceIcon": "https://img.alicdn.com/imgextra/i1/O1CN018RqHSQ1ujUKQaHXSf_!!6000000006073-2-tps-32-32.png",
|
|
19
|
-
"modifyTime": "2024-12-31 12:00:00",
|
|
20
|
-
"content": "上证指数(000001)股票价格_行情_走势图 - 东方财富详细描述上证指数(000001)股票价格_行情_走势图 - 东方财富详细描述上证指数(000001)股票价格_行情_走势图 - 东方财富详细描述上证指数(000001)股票价格_行情_走势图 - 东方财富详细描述上证指数(000001)股票价格_行情_走势图 - 东方财富详细描述"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"sourceCode": "google_search",
|
|
24
|
-
"name": "今日股市_今天中国股票金融市场行情_英为财情Investing.com今日股市_今天中国股票金融市场行情_英为财情Investing.com今日股市_今天中国股票金融市场行情_英为财情Investing.com",
|
|
25
|
-
"title": "今日股市_今天中国股票金融市场行情_英为财情Investing.com",
|
|
26
|
-
"url": "https://m.cn.investing.com/markets/china",
|
|
27
|
-
"sourceIcon": "https://img.alicdn.com/imgextra/i3/O1CN01qByVMl24oCXEdCCBD_!!6000000007437-55-tps-28-16.svg",
|
|
28
|
-
"content": "今日股市_今天中国股票金融市场行情_英为财情Investing.co详细描述今日股市_今天中国股票金融市场行情_英为财情Investing.co详细描述今日股市_今天中国股票金融市场行情_英为财情Investing.co详细描述今日股市_今天中国股票金融市场行情_英为财情Investing.co详细描述今日股市_今天中国股票金融市场行情_英为财情Investing.co详细描述"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"sourceCode": "google_search",
|
|
32
|
-
"name": "今日股市_今天中国股票金融市场行情_英为财情Investing.com",
|
|
33
|
-
"title": "今日股市_今天中国股票金融市场行情_英为财情Investing.com",
|
|
34
|
-
"url": "https://m.cn.investing.com/markets/china",
|
|
35
|
-
"sourceIcon": "https://img.alicdn.com/imgextra/i4/O1CN01K1YBme1jne9cQqQHM_!!6000000004593-0-tps-2960-660.jpg",
|
|
36
|
-
"modifyTime": "2024-12-31 12:00:00",
|
|
37
|
-
"content": "上证指数(000001)股票价格_行情_走势图 - 东方财富详细描述上证指数(000001)股票价格_行情_走势图 - 东方财富详细描述上证指数(000001)股票价格_行情_走势图 - 东方财富详细描述上证指数(000001)股票价格_行情_走势图 - 东方财富详细描述上证指数(000001)股票价格_行情_走势图 - 东方财富详细描述"
|
|
38
|
-
},
|
|
39
|
-
];
|
|
40
|
-
// 小蜜-知识卡片使用场景:点击头部 + 展开按钮,都进行展开和关闭,点击内容区域不需要响应
|
|
41
|
-
// 搜索-知识卡片使用场景
|
|
42
|
-
// 点击头部,打开详情面板;
|
|
43
|
-
// 点击展开按钮,进行面板展开和关闭;
|
|
44
|
-
// 点击内容区域,打开详情面板
|
|
45
|
-
// 搜索-引用信息使用场景
|
|
46
|
-
ReactDOM.render(React.createElement("div", { className: "origin-basic-demo" },
|
|
47
|
-
React.createElement("div", { style: {
|
|
48
|
-
width: '500px'
|
|
49
|
-
} },
|
|
50
|
-
React.createElement(Reference, { defaultExpanded: false, header: {
|
|
51
|
-
icon: 'success',
|
|
52
|
-
title: '参考来源'
|
|
53
|
-
}, listItems: testList, onItemClick: (item, index) => {
|
|
54
|
-
console.log('onItemClick:', item, index);
|
|
55
|
-
}, onHeaderClose: () => {
|
|
56
|
-
console.log('Reference onClose');
|
|
57
|
-
}, onContentClick: () => {
|
|
58
|
-
console.log('Reference onDetailClick');
|
|
59
|
-
} }),
|
|
60
|
-
React.createElement(Reference, { defaultExpanded: false, header: {
|
|
61
|
-
icon: 'success',
|
|
62
|
-
title: '参考来源'
|
|
63
|
-
}, listItems: testList, onHeaderClick: (expanded) => {
|
|
64
|
-
console.log('onHeaderClick', expanded);
|
|
65
|
-
}, onItemClick: (item, index) => {
|
|
66
|
-
console.log('onItemClick:', item, index);
|
|
67
|
-
}, onHeaderClose: () => {
|
|
68
|
-
console.log('Reference onClose');
|
|
69
|
-
}, onContentClick: () => {
|
|
70
|
-
console.log('Reference onDetailClick');
|
|
71
|
-
} }),
|
|
72
|
-
React.createElement(Reference, { defaultExpanded: false, mode: 'detail', header: {
|
|
73
|
-
icon: 'close',
|
|
74
|
-
title: '参考来源'
|
|
75
|
-
}, listItems: testList, onHeaderClick: (expanded) => {
|
|
76
|
-
console.log('onHeaderClick', expanded);
|
|
77
|
-
}, onItemClick: (item, index) => {
|
|
78
|
-
console.log('onItemClick:', item, index);
|
|
79
|
-
}, onHeaderClose: () => {
|
|
80
|
-
console.log('Reference onClose');
|
|
81
|
-
}, onContentClick: () => {
|
|
82
|
-
console.log('Reference onDetailClick');
|
|
83
|
-
} }))), mountNode);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @demo 基本使用
|
|
3
|
-
* @en Basic
|
|
4
|
-
* @order 1
|
|
5
|
-
* @remarks <RichTextInput></RichTextInput> 组件的基本用法。
|
|
6
|
-
* - Basic usage of `RichTextInput`
|
|
7
|
-
*/
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import ReactDOM from 'react-dom';
|
|
10
|
-
import { RichTextInput } from '@alifd/chat';
|
|
11
|
-
import '@alifd/chat/es/rich-text-input/style';
|
|
12
|
-
ReactDOM.render(React.createElement("div", { className: "origin-basic-demo" },
|
|
13
|
-
React.createElement(RichTextInput, { placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9", onChange: value => {
|
|
14
|
-
console.log('onChange:', value);
|
|
15
|
-
}, header: React.createElement("div", null, "\u8FD9\u662F\u5934\u90E8"), footer: React.createElement("div", null, "\u8FD9\u662F\u5C3E\u90E8"), enableQuerySug: true, querySugList: [
|
|
16
|
-
{ label: '相关问题1', value: '相关问题1' },
|
|
17
|
-
{ label: '相关问题2', value: '相关问题2' },
|
|
18
|
-
{ label: '相关问题3', value: '相关问题3' },
|
|
19
|
-
] })), mountNode);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@alifd/chat/es/select/style';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom';
|
|
3
|
-
import { Select } from '@alifd/chat';
|
|
4
|
-
import '@alifd/chat/es/select/style';
|
|
5
|
-
const onChange = (v) => {
|
|
6
|
-
console.log(v);
|
|
7
|
-
};
|
|
8
|
-
const options = [
|
|
9
|
-
{ label: '选项1', value: 'option1' },
|
|
10
|
-
{ label: '选项2', value: 'option2' },
|
|
11
|
-
{ label: '选项3', value: 'option3', disabled: true },
|
|
12
|
-
{ label: '选项4', value: 'option4' },
|
|
13
|
-
];
|
|
14
|
-
ReactDOM.render(React.createElement("div", null,
|
|
15
|
-
React.createElement(Select, { display: "select", dataSource: options, defaultValue: "option1", onChange: onChange }),
|
|
16
|
-
React.createElement("div", { style: { marginTop: '16px' } },
|
|
17
|
-
React.createElement(Select, { mode: "multiple", display: "button", onChange: (v) => {
|
|
18
|
-
console.log('button mode change:', v);
|
|
19
|
-
}, dataSource: options, value: ['option1', 'option3'] }))), mountNode);
|
|
20
|
-
// flex: 1 0 calc(33.33% - 6px);
|
|
21
|
-
// color: var(--btn-pure-normal-color, #333333);
|
|
22
|
-
// margin-right: 8px;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @demo 基本使用
|
|
3
|
-
* @en Basic
|
|
4
|
-
* @order 1
|
|
5
|
-
* @remarks Step 组件的基本用法。
|
|
6
|
-
* - Basic usage of `Step`
|
|
7
|
-
*/
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import ReactDOM from 'react-dom';
|
|
10
|
-
import { Step } from '@alifd/chat';
|
|
11
|
-
import '@alifd/chat/es/step/style';
|
|
12
|
-
ReactDOM.render(React.createElement(Step, { stepsList: [
|
|
13
|
-
{
|
|
14
|
-
title: '01-18 10:44',
|
|
15
|
-
content: '您的快件代签收(A2小邮局),如有疑问请电联快递员【曾庆贺17682329687】',
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
title: '01-18 10:44',
|
|
19
|
-
content: '快件离开【华东航空枢纽(杭州)】,已发往【杭州西湖金色水岸电】的路上',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
title: '01-18 10:44',
|
|
23
|
-
content: '已揽件',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
title: '01-18 10:44',
|
|
27
|
-
content: '已揽件',
|
|
28
|
-
},
|
|
29
|
-
], current: 1, defaultCollapsed: true, collapsedSteps: 1 }), mountNode);
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @demo 基本使用
|
|
3
|
-
* @en Basic
|
|
4
|
-
* @order 1
|
|
5
|
-
* @remarks StopGenerate 组件的基本用法。
|
|
6
|
-
* - Basic usage of `StopGenerateP`
|
|
7
|
-
*/
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import ReactDOM from 'react-dom';
|
|
10
|
-
import { StopGenerate } from '@alifd/chat';
|
|
11
|
-
import '@alifd/chat/es/stop-generate/style';
|
|
12
|
-
ReactDOM.render(React.createElement("div", { className: "origin-basic-demo" },
|
|
13
|
-
React.createElement("div", { style: {
|
|
14
|
-
width: '500px'
|
|
15
|
-
} },
|
|
16
|
-
React.createElement(StopGenerate, { stopText: '\u505C\u6B62\u751F\u6210\u81EA\u5B9A\u4E49', stopIcon: '', stoppedText: '\u5C0F\u871C\u5DF2\u505C\u6B62\u751F\u6210\u81EA\u5B9A', onStop: () => {
|
|
17
|
-
console.log('StopGenerate onStop');
|
|
18
|
-
} }),
|
|
19
|
-
React.createElement(StopGenerate
|
|
20
|
-
// stopText='停止生成'
|
|
21
|
-
// stopIcon=''
|
|
22
|
-
// @ts-ignore
|
|
23
|
-
, {
|
|
24
|
-
// stopText='停止生成'
|
|
25
|
-
// stopIcon=''
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
status: 'stopped',
|
|
28
|
-
// stoppedText='小蜜已停止生成'
|
|
29
|
-
onStop: () => {
|
|
30
|
-
console.log('StopGenerate onStop');
|
|
31
|
-
} }),
|
|
32
|
-
React.createElement(StopGenerate
|
|
33
|
-
// stopText='停止生成'
|
|
34
|
-
, {
|
|
35
|
-
// stopText='停止生成'
|
|
36
|
-
show: false,
|
|
37
|
-
// @ts-ignore
|
|
38
|
-
status: 'stopped',
|
|
39
|
-
// stoppedText='小蜜已停止生成'
|
|
40
|
-
onStop: () => {
|
|
41
|
-
console.log('StopGenerate onStop');
|
|
42
|
-
} }),
|
|
43
|
-
React.createElement(StopGenerate
|
|
44
|
-
// stopText='停止生成'
|
|
45
|
-
// show={false}
|
|
46
|
-
// @ts-ignore
|
|
47
|
-
, {
|
|
48
|
-
// stopText='停止生成'
|
|
49
|
-
// show={false}
|
|
50
|
-
// @ts-ignore
|
|
51
|
-
status: 'stopped', stoppedText: '\u5C0F\u871C\u5DF2\u505C\u6B62\u751F\u6210\u81EA\u5B9A\u4E49\u53C2\u6570', onStop: () => {
|
|
52
|
-
console.log('StopGenerate onStop');
|
|
53
|
-
} }))), mountNode);
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @component 标签
|
|
3
|
-
* @en Tag
|
|
4
|
-
* @type 通用 - General
|
|
5
|
-
* @remarks 同 Next Tag - Same as Next.Tag
|
|
6
|
-
* @when Tag
|
|
7
|
-
*/
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import ReactDOM from 'react-dom';
|
|
10
|
-
import { Tag } from '@alifd/chat';
|
|
11
|
-
import '@alifd/chat/es/tag/style';
|
|
12
|
-
ReactDOM.render(React.createElement("div", null,
|
|
13
|
-
React.createElement(Tag, { type: 'normal', color: 'blue' }, "\u84DD\u8272"),
|
|
14
|
-
React.createElement(Tag, { type: 'normal' }, "\u4E0D\u4F20\u989C\u8272normal"),
|
|
15
|
-
React.createElement(Tag, { type: 'primary' }, "\u4E0D\u4F20\u989C\u8272primary"),
|
|
16
|
-
React.createElement(Tag, { type: 'primary', color: 'green' }, "\u7EFF\u8272")), mountNode);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @demo 文本组件
|
|
3
|
-
* @en Text Component
|
|
4
|
-
* @order 1
|
|
5
|
-
* @remarks
|
|
6
|
-
* - `maxLine`: 控制文本的最大行数。
|
|
7
|
-
* - `triggerType`: 定义触发方式,支持 `click` 和 `hover`。
|
|
8
|
-
* - `locale`: 自定义展开和收起文本。
|
|
9
|
-
* - `showTrigger`: 是否显示触发按钮。
|
|
10
|
-
* - `renderTrigger`: 自定义触发按钮的渲染。
|
|
11
|
-
* - `className`: 自定义样式类。
|
|
12
|
-
*
|
|
13
|
-
* - `maxLine`: Controls the maximum number of lines for the text.
|
|
14
|
-
* - `triggerType`: Defines the trigger type, supporting `click` and `hover`.
|
|
15
|
-
* - `locale`: Customizes the expand and collapse text.
|
|
16
|
-
* - `showTrigger`: Determines whether to show the trigger button.
|
|
17
|
-
* - `renderTrigger`: Customizes the rendering of the trigger button.
|
|
18
|
-
* - `className`: Custom CSS class.
|
|
19
|
-
*/
|
|
20
|
-
import '@alifd/chat/es/text/style';
|
|
21
|
-
import '@alifd/chat/es/icon/style';
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @demo 文本组件
|
|
3
|
-
* @en Text Component
|
|
4
|
-
* @order 1
|
|
5
|
-
* @remarks
|
|
6
|
-
* - `maxLine`: 控制文本的最大行数。
|
|
7
|
-
* - `triggerType`: 定义触发方式,支持 `click` 和 `hover`。
|
|
8
|
-
* - `locale`: 自定义展开和收起文本。
|
|
9
|
-
* - `showTrigger`: 是否显示触发按钮。
|
|
10
|
-
* - `renderTrigger`: 自定义触发按钮的渲染。
|
|
11
|
-
* - `className`: 自定义样式类。
|
|
12
|
-
*
|
|
13
|
-
* - `maxLine`: Controls the maximum number of lines for the text.
|
|
14
|
-
* - `triggerType`: Defines the trigger type, supporting `click` and `hover`.
|
|
15
|
-
* - `locale`: Customizes the expand and collapse text.
|
|
16
|
-
* - `showTrigger`: Determines whether to show the trigger button.
|
|
17
|
-
* - `renderTrigger`: Customizes the rendering of the trigger button.
|
|
18
|
-
* - `className`: Custom CSS class.
|
|
19
|
-
*/
|
|
20
|
-
import React from 'react';
|
|
21
|
-
import ReactDOM from 'react-dom';
|
|
22
|
-
import { Text, Icon } from '@alifd/chat';
|
|
23
|
-
import '@alifd/chat/es/text/style';
|
|
24
|
-
import '@alifd/chat/es/icon/style';
|
|
25
|
-
ReactDOM.render(React.createElement("div", null,
|
|
26
|
-
React.createElement("div", null,
|
|
27
|
-
React.createElement(Text, { maxLine: 2, triggerType: "click", locale: { collapseText: '收起', expandText: '展开' }, showTrigger: true, className: "custom-text-class", renderTrigger: (visible, onVisibleChange) => {
|
|
28
|
-
if (visible) {
|
|
29
|
-
return '';
|
|
30
|
-
}
|
|
31
|
-
return React.createElement("span", { className: 'expend-container' },
|
|
32
|
-
React.createElement(Icon, { className: 'item-icon-expend', type: 'arrow-down', size: 'small', onClick: () => {
|
|
33
|
-
onVisibleChange(!visible);
|
|
34
|
-
} }));
|
|
35
|
-
} },
|
|
36
|
-
"\u6D59\u6C5F\u7701/\u676D\u5DDE\u5E02/\u4F59\u676D\u533A/\u4F59\u676D\u8857\u9053\u540C\u57CE\u5370\u8C61\u82B1\u82D1\u5317\u533A2\u5E622\u5355\u51431104\u5BA4/\u6D59\u6C5F\u7701/\u676D\u5DDE\u5E02/\u4F59\u676D\u533A/\u4F59\u676D\u8857\u9053\u540C\u57CE\u5370\u8C61\u82B1\u82D1\u5317\u533A2\u5E622\u5355\u51431104\u5BA4",
|
|
37
|
-
React.createElement(Icon, { className: 'item-icon-copy', type: 'copy', size: 'small', onClick: () => {
|
|
38
|
-
console.log('onCopy value:');
|
|
39
|
-
// copy?.(value?.text);
|
|
40
|
-
} }))),
|
|
41
|
-
React.createElement("div", null,
|
|
42
|
-
React.createElement(Text, { maxLine: 3, triggerType: "click", locale: { collapseText: '收起', expandText: '展开' }, showTrigger: true, className: "custom-text-class", renderTrigger: (visible, onVisibleChange) => (React.createElement("button", { onClick: () => onVisibleChange(!visible) }, visible ? '收起' : '展开')) },
|
|
43
|
-
"\u8FD9\u662F\u4E00\u4E2A\u5F88\u77ED\u7684\u6D4B\u8BD5\u6587\u672C",
|
|
44
|
-
React.createElement("span", { style: { color: 'pink' } }, " \u4F60\u597D\u5440 ")))), mountNode);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @demo 时间选择器
|
|
3
|
-
* @en Size
|
|
4
|
-
* @order 1
|
|
5
|
-
* @remarks 可以通过设置 `size` 属性控制按钮的尺寸,可选值为 `large` `medium` `small`,其中默认值为 `medium`。
|
|
6
|
-
* - The size of a Button is controlled by a `size` attribute, supporting `large`, `medium`, `small`, the default value is `medium`.
|
|
7
|
-
*/
|
|
8
|
-
import '@alifd/chat/es/time-picker/style';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @demo 时间选择器
|
|
3
|
-
* @en Size
|
|
4
|
-
* @order 1
|
|
5
|
-
* @remarks 可以通过设置 `size` 属性控制按钮的尺寸,可选值为 `large` `medium` `small`,其中默认值为 `medium`。
|
|
6
|
-
* - The size of a Button is controlled by a `size` attribute, supporting `large`, `medium`, `small`, the default value is `medium`.
|
|
7
|
-
*/
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import ReactDOM from 'react-dom';
|
|
10
|
-
import { TimePicker } from '@alifd/chat';
|
|
11
|
-
import '@alifd/chat/es/time-picker/style';
|
|
12
|
-
ReactDOM.render(React.createElement("div", null,
|
|
13
|
-
React.createElement(TimePicker, { mode: "dingtalk", minuteStep: 15, value: new Date() })), mountNode);
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @demo 基本使用
|
|
3
|
-
* @en Basic
|
|
4
|
-
* @order 1
|
|
5
|
-
* @remarks ToolStatus 组件的基本用法。
|
|
6
|
-
* - Basic usage of `ToolStatus`
|
|
7
|
-
*/
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import ReactDOM from 'react-dom';
|
|
10
|
-
import { ToolStatus } from '@alifd/chat';
|
|
11
|
-
import '@alifd/chat/es/tool-status/style';
|
|
12
|
-
const testList = [
|
|
13
|
-
{
|
|
14
|
-
selected: true,
|
|
15
|
-
status: 'completed',
|
|
16
|
-
result: "展示工具结果啦啦啦",
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
selected: false,
|
|
20
|
-
status: 'running',
|
|
21
|
-
result: "展示工具结果啦啦啦",
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
selected: true,
|
|
25
|
-
status: 'failed',
|
|
26
|
-
name: "工具1",
|
|
27
|
-
fullWidth: true,
|
|
28
|
-
result: "展示工具结果啦啦啦",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
selected: false,
|
|
32
|
-
status: 'auth',
|
|
33
|
-
name: "工具3",
|
|
34
|
-
result: "展示工具结果啦啦啦",
|
|
35
|
-
authInfo: {
|
|
36
|
-
content: '等待授权',
|
|
37
|
-
onAuthClick: (data) => console.log('auth clicked:', data)
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
selected: false,
|
|
42
|
-
status: 'started',
|
|
43
|
-
result: "展示工具结果啦啦啦"
|
|
44
|
-
},
|
|
45
|
-
];
|
|
46
|
-
ReactDOM.render(React.createElement("div", { className: "origin-basic-demo" },
|
|
47
|
-
React.createElement("div", { style: {
|
|
48
|
-
width: '500px'
|
|
49
|
-
} }, testList === null || testList === void 0 ? void 0 : testList.map((v, index) => {
|
|
50
|
-
return React.createElement(ToolStatus, Object.assign({}, v, { key: index, onToolClick: (data) => {
|
|
51
|
-
console.log('onToolClick:', data);
|
|
52
|
-
} }));
|
|
53
|
-
}))), mountNode);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @demo 基本使用
|
|
4
|
-
* @en Basic
|
|
5
|
-
* @order 1
|
|
6
|
-
* @remarks ai-loading 加载动画组件的基本用法。
|
|
7
|
-
* - Basic usage of `ai-loading`
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
const tslib_1 = require("tslib");
|
|
11
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
12
|
-
const react_dom_1 = tslib_1.__importDefault(require("react-dom"));
|
|
13
|
-
const chat_1 = require("@alifd/chat");
|
|
14
|
-
require("@alifd/chat/es/ai-loading/style");
|
|
15
|
-
react_dom_1.default.render(react_1.default.createElement("div", { className: "origin-basic-demo" },
|
|
16
|
-
react_1.default.createElement("div", { style: {
|
|
17
|
-
width: '500px',
|
|
18
|
-
} },
|
|
19
|
-
react_1.default.createElement(chat_1.AILoading, null))), mountNode);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @demo 类型
|
|
4
|
-
* @en Style Type
|
|
5
|
-
* @order 0
|
|
6
|
-
* @remarks 常见气泡使用类型
|
|
7
|
-
* - Common types of Balloon.
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
const tslib_1 = require("tslib");
|
|
11
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
12
|
-
const react_dom_1 = tslib_1.__importDefault(require("react-dom"));
|
|
13
|
-
const chat_1 = require("@alifd/chat");
|
|
14
|
-
require("@alifd/chat/es/button/style");
|
|
15
|
-
require("@alifd/chat/es/balloon/style");
|
|
16
|
-
const Demo = () => (react_1.default.createElement("div", { className: "balloon-container" },
|
|
17
|
-
react_1.default.createElement(chat_1.Balloon, { v2: true, triggerType: "click", title: "Balloon Title", trigger: react_1.default.createElement(chat_1.Button, { type: "secondary", size: "medium" }, "Default"), align: "br" }, "First performed around 1600, Hamlet tells the story of a prince whose duty to revenge his father's death entangles him in philosophical problems he can't solve."),
|
|
18
|
-
react_1.default.createElement(chat_1.Balloon, { v2: true, type: "primary", triggerType: "click", title: "Balloon Title", trigger: react_1.default.createElement(chat_1.Button, { type: "primary", size: "medium" }, "Primary"), align: "br", closable: false }, "First performed around 1600, Hamlet tells the story of a prince whose duty to revenge his father's death entangles him in philosophical problems he can't solve.")));
|
|
19
|
-
react_dom_1.default.render(react_1.default.createElement(Demo, null), mountNode);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @demo 按钮尺寸
|
|
3
|
-
* @en Size
|
|
4
|
-
* @order 1
|
|
5
|
-
* @remarks 可以通过设置 `size` 属性控制按钮的尺寸,可选值为 `large` `medium` `small`,其中默认值为 `medium`。
|
|
6
|
-
* - The size of a Button is controlled by a `size` attribute, supporting `large`, `medium`, `small`, the default value is `medium`.
|
|
7
|
-
*/
|
|
8
|
-
import '@alifd/chat/es/button/style';
|