@agentscope-ai/design 1.0.31 → 1.0.32-beta.1777272505407

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.
Files changed (74) hide show
  1. package/lib/components/commonComponents/FileIcon/demo/demo.js +26 -7
  2. package/lib/components/commonComponents/FileIcon/icons/folder-gray.svg +1 -0
  3. package/lib/components/commonComponents/FileIcon/icons/folder.svg +1 -0
  4. package/lib/components/commonComponents/FileIcon/index.d.ts +4 -0
  5. package/lib/components/commonComponents/FileIcon/index.js +20 -6
  6. package/lib/components/commonComponents/Table/demo/demo1.js +1 -1
  7. package/lib/components/commonComponents/Table/index.js +12 -2
  8. package/lib/libs/env/index.d.ts +1 -1
  9. package/llms/all.llms.txt +4532 -0
  10. package/llms/components/commonComponents/Alert/index.zh-CN.llms.txt +32 -0
  11. package/llms/components/commonComponents/AlertDialog/index.zh-CN.llms.txt +171 -0
  12. package/llms/components/commonComponents/Anchor/index.zh-CN.llms.txt +51 -0
  13. package/llms/components/commonComponents/Audio/index.zh-CN.llms.txt +7 -0
  14. package/llms/components/commonComponents/Avatar/index.zh-CN.llms.txt +37 -0
  15. package/llms/components/commonComponents/Breadcrumb/index.zh-CN.llms.txt +117 -0
  16. package/llms/components/commonComponents/Button/index.zh-CN.llms.txt +54 -0
  17. package/llms/components/commonComponents/Card/index.zh-CN.llms.txt +61 -0
  18. package/llms/components/commonComponents/Cascader/index.zh-CN.llms.txt +74 -0
  19. package/llms/components/commonComponents/Checkbox/index.zh-CN.llms.txt +69 -0
  20. package/llms/components/commonComponents/CodeBlock/index.zh-CN.llms.txt +14 -0
  21. package/llms/components/commonComponents/Collapse/index.zh-CN.llms.txt +56 -0
  22. package/llms/components/commonComponents/CollapsePanel/index.zh-CN.llms.txt +69 -0
  23. package/llms/components/commonComponents/DatePicker/index.zh-CN.llms.txt +221 -0
  24. package/llms/components/commonComponents/Descriptions/index.zh-CN.llms.txt +37 -0
  25. package/llms/components/commonComponents/Drawer/index.zh-CN.llms.txt +62 -0
  26. package/llms/components/commonComponents/Dropdown/index.zh-CN.llms.txt +149 -0
  27. package/llms/components/commonComponents/Empty/index.zh-CN.llms.txt +42 -0
  28. package/llms/components/commonComponents/FileIcon/index.zh-CN.llms.txt +32 -0
  29. package/llms/components/commonComponents/FloatButton/index.zh-CN.llms.txt +51 -0
  30. package/llms/components/commonComponents/Form/index.zh-CN.llms.txt +558 -0
  31. package/llms/components/commonComponents/HelpIcon/index.zh-CN.llms.txt +6 -0
  32. package/llms/components/commonComponents/IconButton/index.zh-CN.llms.txt +45 -0
  33. package/llms/components/commonComponents/Image/index.zh-CN.llms.txt +165 -0
  34. package/llms/components/commonComponents/Input/index.zh-CN.llms.txt +133 -0
  35. package/llms/components/commonComponents/InputNumber/index.zh-CN.llms.txt +51 -0
  36. package/llms/components/commonComponents/InputSearch/index.zh-CN.llms.txt +6 -0
  37. package/llms/components/commonComponents/MediaPreview/index.zh-CN.llms.txt +21 -0
  38. package/llms/components/commonComponents/Message/index.zh-CN.llms.txt +98 -0
  39. package/llms/components/commonComponents/Modal/index.zh-CN.llms.txt +168 -0
  40. package/llms/components/commonComponents/Notification/index.zh-CN.llms.txt +94 -0
  41. package/llms/components/commonComponents/Pagination/index.zh-CN.llms.txt +45 -0
  42. package/llms/components/commonComponents/Popconfirm/index.zh-CN.llms.txt +55 -0
  43. package/llms/components/commonComponents/Popover/index.zh-CN.llms.txt +43 -0
  44. package/llms/components/commonComponents/Progress/index.zh-CN.llms.txt +50 -0
  45. package/llms/components/commonComponents/PromptsEditor/index.zh-CN.llms.txt +13 -0
  46. package/llms/components/commonComponents/Radio/index.zh-CN.llms.txt +66 -0
  47. package/llms/components/commonComponents/RadioButton/index.zh-CN.llms.txt +73 -0
  48. package/llms/components/commonComponents/Result/index.zh-CN.llms.txt +10 -0
  49. package/llms/components/commonComponents/Select/index.zh-CN.llms.txt +96 -0
  50. package/llms/components/commonComponents/Skeleton/index.zh-CN.llms.txt +59 -0
  51. package/llms/components/commonComponents/Slider/index.zh-CN.llms.txt +62 -0
  52. package/llms/components/commonComponents/Spinner/index.zh-CN.llms.txt +15 -0
  53. package/llms/components/commonComponents/Statistic/index.zh-CN.llms.txt +58 -0
  54. package/llms/components/commonComponents/Steps/index.zh-CN.llms.txt +57 -0
  55. package/llms/components/commonComponents/Switch/index.zh-CN.llms.txt +39 -0
  56. package/llms/components/commonComponents/Table/index.zh-CN.llms.txt +254 -0
  57. package/llms/components/commonComponents/Tabs/index.zh-CN.llms.txt +69 -0
  58. package/llms/components/commonComponents/Tag/index.zh-CN.llms.txt +33 -0
  59. package/llms/components/commonComponents/TimePicker/index.zh-CN.llms.txt +111 -0
  60. package/llms/components/commonComponents/Tooltip/index.zh-CN.llms.txt +45 -0
  61. package/llms/components/commonComponents/Upload/index.zh-CN.llms.txt +95 -0
  62. package/llms/components/commonComponents/Video/index.zh-CN.llms.txt +11 -0
  63. package/llms/docs/changelog/index.zh-CN.llms.txt +98 -0
  64. package/llms/docs/guide/fromAntd.zh-CN.llms.txt +156 -0
  65. package/llms/docs/guide/fromScratch.zh-CN.llms.txt +83 -0
  66. package/llms/docs/guide/iconfont.zh-CN.llms.txt +69 -0
  67. package/llms/docs/guide/overview.zh-CN.llms.txt +51 -0
  68. package/llms/docs/guide/sparkIcons.zh-CN.llms.txt +25 -0
  69. package/llms/docs/guide/theme.zh-CN.llms.txt +61 -0
  70. package/llms/docs/guide/tokens&variables.zh-CN.llms.txt +434 -0
  71. package/llms/docs/guide/vibe-coding.zh-CN.llms.txt +28 -0
  72. package/llms/docs/icons/iconLibrary.zh-CN.llms.txt +308 -0
  73. package/llms/index.llms.txt +56 -0
  74. package/package.json +1 -1
@@ -4,23 +4,42 @@ import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import { jsxs as _jsxs } from "react/jsx-runtime";
5
5
  export default function () {
6
6
  var list = ['common', 'epub', 'excel', 'html', 'image', 'md', 'mobi', 'pdf', 'ppt', 'txt', 'web', 'word'];
7
+ var folderList = ['folder', 'folderGray'];
7
8
  return /*#__PURE__*/_jsxs("div", {
8
- children: [/*#__PURE__*/_jsx(Space, {
9
- children: list.map(function (t) {
9
+ children: [/*#__PURE__*/_jsxs(Space, {
10
+ children: [list.map(function (t) {
10
11
  return /*#__PURE__*/_jsx(FileIcon, {
11
12
  type: t
12
13
  }, t);
13
- })
14
- }), /*#__PURE__*/_jsx("div", {}), /*#__PURE__*/_jsx(Space, {
14
+ }), folderList.map(function (t) {
15
+ return /*#__PURE__*/_jsx(FileIcon, {
16
+ type: t,
17
+ width: 45,
18
+ height: 40
19
+ }, t);
20
+ })]
21
+ }), /*#__PURE__*/_jsx("div", {}), /*#__PURE__*/_jsxs(Space, {
15
22
  wrap: true,
16
- children: list.map(function (t) {
23
+ style: {
24
+ marginBottom: 8
25
+ },
26
+ children: [list.map(function (t) {
17
27
  return /*#__PURE__*/_jsx(FileCard, {
18
28
  name: t,
19
29
  size: 1000,
20
30
  type: t
21
31
  }, t);
22
- })
23
- }), /*#__PURE__*/_jsx("div", {}), /*#__PURE__*/_jsx(FileCard, {
32
+ }), folderList.map(function (t) {
33
+ return /*#__PURE__*/_jsx(FileCard, {
34
+ name: t,
35
+ size: 1000,
36
+ type: t,
37
+ width: 150,
38
+ iconWidth: 45,
39
+ iconHeight: 40
40
+ }, t);
41
+ })]
42
+ }), /*#__PURE__*/_jsx(FileCard, {
24
43
  name: 'pdf',
25
44
  size: 1000,
26
45
  type: 'pdf',
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="32" height="28" viewBox="0 0 32 28"><defs><clipPath id="master_svg0_409_23873"><rect x="0" y="0" width="32" height="28" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_409_23873)"><path d="M3.36026,0C1.00291,0.162909,0.13785701,2.0024199,0,2.9018199L0,24.639999C0.454927,27.1651,2.2574,27.9321,3.1017799,28L28.6397,28C31.3279,27.6742,32,25.8958,32,25.0473L32,5.5999999C31.6278,3.0341799,29.6047,2.4606099,28.6397,2.49455L18.662399,2.49455C18.207399,2.53527,17.783501,2.34182,17.628401,2.24L16.4394,1.06909C15.7363,0.213818,14.7334,0,14.3199,0L3.36026,0Z" fill="#BEC2D3" fill-opacity="1" style="mix-blend-mode:passthrough"/><rect x="2.8945300579071045" y="4.276370048522949" width="26.365100860595703" height="17.105499267578125" rx="3" fill="#FFFFFF" fill-opacity="1" style="mix-blend-mode:passthrough"/><path d="M0,6L32,6L32,25C32,26.6569,30.6569,28,29,28L3,28C1.34315,28,0,26.6569,0,25L0,6Z" fill="#D5D9EB" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="32" height="28" viewBox="0 0 32 28"><defs><clipPath id="master_svg0_409_23883"><rect x="0" y="0" width="32" height="28" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_409_23883)"><path d="M3.36026,0C1.00291,0.162909,0.13785701,2.0024199,0,2.9018199L0,24.639999C0.454927,27.1651,2.2574,27.9321,3.1017799,28L28.6397,28C31.3279,27.6742,32,25.8958,32,25.0473L32,5.5999999C31.6278,3.0341799,29.6047,2.4606099,28.6397,2.49455L18.662399,2.49455C18.207399,2.53527,17.783501,2.34182,17.628401,2.24L16.4394,1.06909C15.7363,0.213818,14.7334,0,14.3199,0L3.36026,0Z" fill="#FEAE0D" fill-opacity="1" style="mix-blend-mode:passthrough"/><rect x="2.8945300579071045" y="4.276370048522949" width="26.365100860595703" height="17.105499267578125" rx="3" fill="#FEF9ED" fill-opacity="1" style="mix-blend-mode:passthrough"/><path d="M0,6L32,6L32,25C32,26.6569,30.6569,28,29,28L3,28C1.34315,28,0,26.6569,0,25L0,6Z" fill="#FFD44A" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></svg>
@@ -5,9 +5,13 @@ export interface SparkFileIconProps {
5
5
  type: string;
6
6
  size?: number;
7
7
  style?: React.CSSProperties;
8
+ width?: number;
9
+ height?: number;
8
10
  }
9
11
  export interface SparkFileCardProps {
10
12
  iconSize?: number;
13
+ iconWidth?: number;
14
+ iconHeight?: number;
11
15
  src?: string;
12
16
  type: string;
13
17
  name: string;
@@ -20,6 +20,8 @@ import web from "./icons/web.svg";
20
20
  import word from "./icons/word.svg";
21
21
  import video from "./icons/video.svg";
22
22
  import audio from "./icons/audio.svg";
23
+ import folder from "./icons/folder.svg";
24
+ import folderGray from "./icons/folder-gray.svg";
23
25
  import { useStyle } from "./index.style";
24
26
  import { jsx as _jsx } from "react/jsx-runtime";
25
27
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -38,7 +40,9 @@ var maps = {
38
40
  web: web,
39
41
  word: word,
40
42
  video: video,
41
- audio: audio
43
+ audio: audio,
44
+ folder: folder,
45
+ folderGray: folderGray
42
46
  };
43
47
  function getSize(size) {
44
48
  var retSize = size;
@@ -57,7 +61,11 @@ export function FileCard(props) {
57
61
  var _props$width = props.width,
58
62
  width = _props$width === void 0 ? 140 : _props$width,
59
63
  _props$iconSize = props.iconSize,
60
- iconSize = _props$iconSize === void 0 ? 32 : _props$iconSize;
64
+ iconSize = _props$iconSize === void 0 ? 32 : _props$iconSize,
65
+ _props$iconWidth = props.iconWidth,
66
+ iconWidth = _props$iconWidth === void 0 ? iconSize : _props$iconWidth,
67
+ _props$iconHeight = props.iconHeight,
68
+ iconHeight = _props$iconHeight === void 0 ? iconSize : _props$iconHeight;
61
69
  return /*#__PURE__*/_jsxs(_Fragment, {
62
70
  children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsxs("div", {
63
71
  className: "".concat(sparkPrefix, "-file-card"),
@@ -67,7 +75,9 @@ export function FileCard(props) {
67
75
  children: [/*#__PURE__*/_jsx(FileIcon, {
68
76
  type: props.type,
69
77
  size: iconSize,
70
- src: props.src
78
+ src: props.src,
79
+ width: iconWidth || iconSize,
80
+ height: iconHeight || iconSize
71
81
  }), /*#__PURE__*/_jsxs("div", {
72
82
  className: "".concat(sparkPrefix, "-file-card-info"),
73
83
  children: [/*#__PURE__*/_jsx("div", {
@@ -92,12 +102,16 @@ export default function FileIcon(props) {
92
102
  type = _props$type === void 0 ? 'common' : _props$type,
93
103
  src = props.src,
94
104
  _props$style = props.style,
95
- style = _props$style === void 0 ? {} : _props$style;
105
+ style = _props$style === void 0 ? {} : _props$style,
106
+ _props$width2 = props.width,
107
+ width = _props$width2 === void 0 ? 40 : _props$width2,
108
+ _props$height = props.height,
109
+ height = _props$height === void 0 ? 40 : _props$height;
96
110
  return /*#__PURE__*/_jsx("img", {
97
111
  style: _objectSpread({
98
112
  display: 'block',
99
- width: size,
100
- height: size
113
+ width: width || size,
114
+ height: height || size
101
115
  }, style),
102
116
  src: src || maps[type] || 'common'
103
117
  });
@@ -106,7 +106,7 @@ var App = function App() {
106
106
  });
107
107
  return /*#__PURE__*/_jsx(Table, {
108
108
  columns: columns,
109
- dataSource: data,
109
+ dataSource: [],
110
110
  pagination: {
111
111
  pageSize: 10
112
112
  }
@@ -9,10 +9,11 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
9
9
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
10
  import { getCommonConfig } from "../../../config";
11
11
  import { SparkSortLine } from '@agentscope-ai/icons';
12
- import { Table as AntdTable } from 'antd';
12
+ import { Table as AntdTable, Flex } from 'antd';
13
13
  import classNames from 'classnames';
14
14
  import { useStyle as usePaginationStyle } from "../Pagination/index.style";
15
15
  import { useStyle } from "./index.style";
16
+ import { Empty } from "../../..";
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
17
18
  import { Fragment as _Fragment } from "react/jsx-runtime";
18
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -39,7 +40,16 @@ export default function Table(props) {
39
40
  return /*#__PURE__*/_jsxs(_Fragment, {
40
41
  children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(PaginationStyle, {}), /*#__PURE__*/_jsx(AntdTable, _objectSpread({
41
42
  className: classNames("".concat(sparkPrefix, "-table")),
42
- columns: columns
43
+ columns: columns,
44
+ locale: {
45
+ emptyText: /*#__PURE__*/_jsx(Flex, {
46
+ vertical: true,
47
+ align: "center",
48
+ children: /*#__PURE__*/_jsx(Empty, {
49
+ type: "noData"
50
+ })
51
+ })
52
+ }
43
53
  }, restProps))]
44
54
  });
45
55
  }
@@ -1,4 +1,4 @@
1
- export declare function getLang(): "en-US" | "zh-CN";
1
+ export declare function getLang(): "zh-CN" | "en-US";
2
2
  /**
3
3
  * 当前是否是中文语言环境
4
4
  * @returns {boolean}