@agentscope-ai/design 1.0.4 → 1.0.5

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 (77) hide show
  1. package/README.md +5 -6
  2. package/dist/antd/styles/breadcrumb.style.d.ts +18 -0
  3. package/dist/antd/styles/breadcrumb.style.js +15 -0
  4. package/dist/antd/styles/index.style.js +3 -2
  5. package/dist/antd/styles/select.style.d.ts +15 -0
  6. package/dist/antd/styles/select.style.js +7 -2
  7. package/dist/antd/themes/bailianDarkTheme.json +6 -1
  8. package/dist/antd/themes/bailianTheme.json +6 -1
  9. package/dist/antd/themes/carbonDarkTheme.json +6 -1
  10. package/dist/antd/themes/carbonTheme.json +6 -1
  11. package/dist/components/commonComponents/AlertDialog/index.js +58 -55
  12. package/dist/components/commonComponents/AlertDialog/index.style.d.ts +17 -0
  13. package/dist/components/commonComponents/AlertDialog/index.style.js +30 -0
  14. package/dist/components/commonComponents/Breadcrumb/demo/demo1.d.ts +3 -0
  15. package/dist/components/commonComponents/Breadcrumb/demo/demo1.js +23 -0
  16. package/dist/components/commonComponents/Button/index.d.ts +3 -0
  17. package/dist/components/commonComponents/Button/index.js +36 -23
  18. package/dist/components/commonComponents/Drawer/index.js +7 -0
  19. package/dist/components/commonComponents/Drawer/index.style.d.ts +9 -0
  20. package/dist/components/commonComponents/Drawer/index.style.js +4 -2
  21. package/dist/components/commonComponents/Empty/index.js +12 -6
  22. package/dist/components/commonComponents/Empty/index.style.d.ts +4 -19
  23. package/dist/components/commonComponents/Empty/index.style.js +3 -4
  24. package/dist/components/commonComponents/FloatButton/demo/demo1.d.ts +3 -0
  25. package/dist/components/commonComponents/FloatButton/demo/demo1.js +11 -0
  26. package/dist/components/commonComponents/FloatButton/demo/demo2.d.ts +3 -0
  27. package/dist/components/commonComponents/FloatButton/demo/demo2.js +11 -0
  28. package/dist/components/commonComponents/Form/index.js +2 -2
  29. package/dist/components/commonComponents/Form/index.style.d.ts +4 -2
  30. package/dist/components/commonComponents/Form/index.style.js +3 -3
  31. package/dist/components/commonComponents/HelpIcon/demo/index.js +1 -0
  32. package/dist/components/commonComponents/HelpIcon/index.js +6 -1
  33. package/dist/components/commonComponents/HelpIcon/index.style.d.ts +4 -0
  34. package/dist/components/commonComponents/HelpIcon/index.style.js +5 -2
  35. package/dist/components/commonComponents/IconButton/demo/demo1.js +5 -14
  36. package/dist/components/commonComponents/IconButton/demo/demo2.js +5 -5
  37. package/dist/components/commonComponents/IconButton/demo/demo3.js +5 -5
  38. package/dist/components/commonComponents/IconButton/demo/demo4.js +5 -5
  39. package/dist/components/commonComponents/IconButton/index.js +4 -0
  40. package/dist/components/commonComponents/IconButton/index.style.d.ts +16 -0
  41. package/dist/components/commonComponents/IconButton/index.style.js +25 -0
  42. package/dist/components/commonComponents/Input/index.js +10 -1
  43. package/dist/components/commonComponents/Input/index.style.d.ts +7 -0
  44. package/dist/components/commonComponents/Input/index.style.js +7 -3
  45. package/dist/components/commonComponents/Message/{demo.js → demo/demo1.js} +1 -1
  46. package/dist/components/commonComponents/Message/demo/demo2.js +66 -0
  47. package/dist/components/commonComponents/Message/index.d.ts +11 -2
  48. package/dist/components/commonComponents/Message/index.js +49 -1
  49. package/dist/components/commonComponents/Modal/index.js +19 -1
  50. package/dist/components/commonComponents/Modal/index.style.d.ts +33 -2
  51. package/dist/components/commonComponents/Modal/index.style.js +24 -10
  52. package/dist/components/commonComponents/Pagination/demo/demo1.js +3 -1
  53. package/dist/components/commonComponents/Pagination/demo/demo2.js +2 -1
  54. package/dist/components/commonComponents/Slider/demo/demo1.js +1 -1
  55. package/dist/components/commonComponents/Slider/demo/demo2.js +1 -1
  56. package/dist/components/commonComponents/Slider/demo/demo3.d.ts +3 -0
  57. package/dist/components/commonComponents/Slider/demo/demo3.js +44 -0
  58. package/dist/components/commonComponents/Slider/index.d.ts +11 -0
  59. package/dist/components/commonComponents/Slider/index.js +27 -0
  60. package/dist/components/commonComponents/Slider/index.style.d.ts +7 -0
  61. package/dist/components/commonComponents/Slider/index.style.js +22 -0
  62. package/dist/components/commonComponents/Slider/slider.input.d.ts +18 -0
  63. package/dist/components/commonComponents/Slider/slider.input.js +73 -0
  64. package/dist/components/commonComponents/Tag/demo1.d.ts +2 -0
  65. package/dist/components/commonComponents/Tag/{demo.js → demo1.js} +3 -0
  66. package/dist/components/commonComponents/Tag/demo2.d.ts +2 -0
  67. package/dist/components/commonComponents/Tag/demo2.js +40 -0
  68. package/dist/components/commonComponents/Tag/index.style.d.ts +11 -0
  69. package/dist/components/commonComponents/Tag/index.style.js +5 -1
  70. package/dist/index.d.ts +3 -2
  71. package/dist/index.js +3 -3
  72. package/dist/libs/env/index.d.ts +1 -5
  73. package/dist/libs/env/index.js +11 -2
  74. package/dist/libs/region/index.d.ts +1 -1
  75. package/package.json +13 -7
  76. /package/dist/components/commonComponents/Message/{demo.d.ts → demo/demo1.d.ts} +0 -0
  77. /package/dist/components/commonComponents/{Tag/demo.d.ts → Message/demo/demo2.d.ts} +0 -0
@@ -25,6 +25,9 @@ export default (function () {
25
25
  }), /*#__PURE__*/_jsx(Tag, {
26
26
  color: "mauve",
27
27
  children: "mauve"
28
+ }), /*#__PURE__*/_jsx(Tag, {
29
+ color: "transparent",
30
+ children: "transparent"
28
31
  })]
29
32
  });
30
33
  });
@@ -0,0 +1,2 @@
1
+ declare const _default: () => import("react/jsx-runtime").JSX.Element;
2
+ export default _default;
@@ -0,0 +1,40 @@
1
+ import { Tag } from "../../..";
2
+ import { Flex } from 'antd';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { jsxs as _jsxs } from "react/jsx-runtime";
5
+ export default (function () {
6
+ return /*#__PURE__*/_jsxs(Flex, {
7
+ align: "center",
8
+ vertical: true,
9
+ gap: 50,
10
+ children: [/*#__PURE__*/_jsx(Tag, {
11
+ size: "small",
12
+ color: "purple",
13
+ children: "purple"
14
+ }), /*#__PURE__*/_jsx(Tag, {
15
+ size: "small",
16
+ color: "pink",
17
+ children: "pink"
18
+ }), /*#__PURE__*/_jsx(Tag, {
19
+ size: "small",
20
+ color: "yellow",
21
+ children: "yellow"
22
+ }), /*#__PURE__*/_jsx(Tag, {
23
+ size: "small",
24
+ color: "teal",
25
+ children: "teal"
26
+ }), /*#__PURE__*/_jsx(Tag, {
27
+ size: "small",
28
+ color: "blue",
29
+ children: "blue"
30
+ }), /*#__PURE__*/_jsx(Tag, {
31
+ size: "small",
32
+ color: "mauve",
33
+ children: "mauve"
34
+ }), /*#__PURE__*/_jsx(Tag, {
35
+ size: "small",
36
+ color: "transparent",
37
+ children: "transparent"
38
+ })]
39
+ });
40
+ });
@@ -6,6 +6,7 @@ export declare function getIndexStyleData(params: any): {
6
6
  padding?: undefined;
7
7
  color?: undefined;
8
8
  background?: undefined;
9
+ borderColor?: undefined;
9
10
  } | {
10
11
  fontSize: string;
11
12
  lineHeight: string;
@@ -13,6 +14,7 @@ export declare function getIndexStyleData(params: any): {
13
14
  fontWeight?: undefined;
14
15
  color?: undefined;
15
16
  background?: undefined;
17
+ borderColor?: undefined;
16
18
  } | {
17
19
  color: string;
18
20
  background: string;
@@ -20,6 +22,15 @@ export declare function getIndexStyleData(params: any): {
20
22
  fontSize?: undefined;
21
23
  lineHeight?: undefined;
22
24
  padding?: undefined;
25
+ borderColor?: undefined;
26
+ } | {
27
+ color: string;
28
+ background: string;
29
+ borderColor: string;
30
+ fontWeight?: undefined;
31
+ fontSize?: undefined;
32
+ lineHeight?: undefined;
33
+ padding?: undefined;
23
34
  };
24
35
  };
25
36
  declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
@@ -9,7 +9,7 @@ import createStyle from "../../../libs/createStyle";
9
9
  export function getIndexStyleData(params) {
10
10
  var antPrefix = params.antPrefix,
11
11
  sparkPrefix = params.sparkPrefix;
12
- return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(sparkPrefix, "-tag"), {
12
+ return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(sparkPrefix, "-tag"), {
13
13
  fontWeight: 500
14
14
  }), ".".concat(sparkPrefix, "-tag-small"), {
15
15
  fontSize: '12px',
@@ -37,6 +37,10 @@ export function getIndexStyleData(params) {
37
37
  }), ".".concat(sparkPrefix, "-tag-mauve"), {
38
38
  color: "var(--".concat(antPrefix, "-color-mauve)"),
39
39
  background: "var(--".concat(antPrefix, "-color-mauve-bg)")
40
+ }), ".".concat(sparkPrefix, "-tag-transparent"), {
41
+ color: "var(--".concat(antPrefix, "-color-text-tertiary)"),
42
+ background: 'transparent',
43
+ borderColor: "var(--".concat(antPrefix, "-color-border-secondary)")
40
44
  });
41
45
  }
42
46
  var useIndexStyle = createStyle(function (_ref2) {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 通用组件
3
3
  */
4
- export { Alert, Badge, Checkbox, InputNumber, Progress, Radio, Select, Skeleton, Slider, type AlertProps, type BadgeProps, type CheckboxProps, type DrawerProps, type InputNumberProps, type NotificationArgsProps, type PopoverProps, type ProgressProps, type RadioProps, type SelectProps, type SkeletonProps, type TagProps, } from 'antd';
4
+ export { Alert, Badge, Checkbox, InputNumber, Progress, Radio, Select, Skeleton, type AlertProps, type BadgeProps, type CheckboxProps, type DrawerProps, type InputNumberProps, type NotificationArgsProps, type PopoverProps, type ProgressProps, type RadioProps, type SelectProps, type SkeletonProps, type TagProps, } from 'antd';
5
5
  export { default as AlertDialog, type AlertDialogProps, } from './components/commonComponents/AlertDialog';
6
6
  export { default as Avatar } from './components/commonComponents/Avatar';
7
7
  export { default as Button, type SparkButtonProps as ButtonProps, } from './components/commonComponents/Button';
@@ -26,12 +26,13 @@ export { default as Popconfirm, type SparkPopconfirmProps as PopconfirmProps, }
26
26
  export { default as Popover } from './components/commonComponents/Popover';
27
27
  export { default as RadioButton, type SparkRadioButtonProps as RadioButtonProps, } from './components/commonComponents/RadioButton';
28
28
  export { default as SlateEditor } from './components/commonComponents/SlateEditor';
29
+ export { default as Slider, type SliderInputProps, } from './components/commonComponents/Slider';
30
+ export { default as SliderSelector } from './components/commonComponents/SliderSelector';
29
31
  export { default as Spinner } from './components/commonComponents/Spinner';
30
32
  export { default as Switch, type SparkSwitchProps as SwitchProps, } from './components/commonComponents/Switch';
31
33
  export { default as Tabs, type SparkTabsProps as TabsProps, } from './components/commonComponents/Tabs';
32
34
  export { default as Tag } from './components/commonComponents/Tag';
33
35
  export { default as Tooltip, type SparkTooltipProps as TooltipProps, } from './components/commonComponents/Tooltip';
34
- export { default as SliderSelector } from './components/commonComponents/SliderSelector';
35
36
  export { default as staticRenderer } from './libs/staticRenderer';
36
37
  /**
37
38
  * hooks
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 通用组件
3
3
  */
4
- export { Alert, Badge, Checkbox, InputNumber, Progress, Radio, Select, Skeleton, Slider } from 'antd';
4
+ export { Alert, Badge, Checkbox, InputNumber, Progress, Radio, Select, Skeleton } from 'antd';
5
5
  export { default as AlertDialog } from "./components/commonComponents/AlertDialog";
6
6
  export { default as Avatar } from "./components/commonComponents/Avatar";
7
7
  export { default as Button } from "./components/commonComponents/Button";
@@ -26,13 +26,13 @@ export { default as Popconfirm } from "./components/commonComponents/Popconfirm"
26
26
  export { default as Popover } from "./components/commonComponents/Popover";
27
27
  export { default as RadioButton } from "./components/commonComponents/RadioButton";
28
28
  export { default as SlateEditor } from "./components/commonComponents/SlateEditor";
29
+ export { default as Slider } from "./components/commonComponents/Slider";
30
+ export { default as SliderSelector } from "./components/commonComponents/SliderSelector";
29
31
  export { default as Spinner } from "./components/commonComponents/Spinner";
30
32
  export { default as Switch } from "./components/commonComponents/Switch";
31
33
  export { default as Tabs } from "./components/commonComponents/Tabs";
32
34
  export { default as Tag } from "./components/commonComponents/Tag";
33
35
  export { default as Tooltip } from "./components/commonComponents/Tooltip";
34
- // export { default as Slider } from './components/commonComponents/Slider';
35
- export { default as SliderSelector } from "./components/commonComponents/SliderSelector";
36
36
  export { default as staticRenderer } from "./libs/staticRenderer";
37
37
 
38
38
  /**
@@ -1,8 +1,4 @@
1
- /**
2
- * 获取当前环境语言,例如zh-CN或者en-US
3
- * @returns {string}
4
- */
5
- export declare function getLang(): any;
1
+ export declare function getLang(): "zh-CN" | "en-US";
6
2
  /**
7
3
  * 当前是否是中文语言环境
8
4
  * @returns {boolean}
@@ -2,9 +2,18 @@
2
2
  * 获取当前环境语言,例如zh-CN或者en-US
3
3
  * @returns {string}
4
4
  */
5
+ import Cookies from 'js-cookie';
5
6
  export function getLang() {
6
- var _window$ALIYUN_CONSOL, _window$g_config;
7
- return ((_window$ALIYUN_CONSOL = window.ALIYUN_CONSOLE_CONFIG) === null || _window$ALIYUN_CONSOL === void 0 ? void 0 : _window$ALIYUN_CONSOL.LOCALE) || ((_window$g_config = window.g_config) === null || _window$g_config === void 0 || (_window$g_config = _window$g_config.userPreference) === null || _window$g_config === void 0 ? void 0 : _window$g_config.language) || 'zh-CN';
7
+ // 优先级:cookie > 环境变量 > 默认值
8
+ if (location.host.includes('console.aliyun.com')) {
9
+ return 'zh-CN';
10
+ }
11
+ if (Cookies.get('aliyun_lang')) {
12
+ return Cookies.get('aliyun_lang') === 'en' ? 'en-US' : 'zh-CN';
13
+ } else {
14
+ var _window$g_config;
15
+ return (_window$g_config = window.g_config) !== null && _window$g_config !== void 0 && (_window$g_config = _window$g_config.userPreference) !== null && _window$g_config !== void 0 && _window$g_config.language || location.host.includes('alibabacloud') ? 'en-US' : 'zh-CN';
16
+ }
8
17
  }
9
18
 
10
19
  /**
@@ -1,2 +1,2 @@
1
1
  /** 获取regionId对应的名称 */
2
- export declare function getRegionName(regionId: string, lang?: any): any;
2
+ export declare function getRegionName(regionId: string, lang?: string): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentscope-ai/design",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Basic components for the best experience of LLM",
5
5
  "license": "MIT",
6
6
  "sideEffects": [
@@ -27,6 +27,7 @@
27
27
  "docs:build": "dumi build",
28
28
  "docs:preview": "dumi preview",
29
29
  "docsMD:build": "node docMD.js",
30
+ "docs:syncYuque": "node syncYuque.js",
30
31
  "doctor": "father doctor",
31
32
  "lint": "npm run lint:es && npm run lint:css",
32
33
  "lint:css": "stylelint --fix \"{src,test}/**/*.{css,less}\"",
@@ -59,6 +60,10 @@
59
60
  "prettier --parser=typescript --write"
60
61
  ]
61
62
  },
63
+ "overrides": {
64
+ "@ant-design/icons": "@agentscope-ai/icons-override-antd",
65
+ "@ant-design/icons-svg": "@agentscope-ai/icons-svg-override-antd"
66
+ },
62
67
  "dependencies": {
63
68
  "@codemirror/lang-cpp": "^6.0.2",
64
69
  "@codemirror/lang-css": "^6.3.1",
@@ -78,6 +83,7 @@
78
83
  "ahooks": "^3.7.8",
79
84
  "dayjs": "^1.11.7",
80
85
  "dompurify": "^2.3.8",
86
+ "js-cookie": "^3.0.5",
81
87
  "lodash-es": "^4.17.21",
82
88
  "query-string": "^7.1.3",
83
89
  "slate": "0.91.4",
@@ -86,6 +92,7 @@
86
92
  "stylis": "^4.3.6"
87
93
  },
88
94
  "devDependencies": {
95
+ "@agentscope-ai/icons": "^1.0.0",
89
96
  "@ali/dumi-plugin-api-parser": "1.0.0",
90
97
  "@commitlint/cli": "^17.1.2",
91
98
  "@commitlint/config-conventional": "^17.1.0",
@@ -105,7 +112,7 @@
105
112
  "@vitest/coverage-istanbul": "2.1.4",
106
113
  "@vitest/ui": "2.1.4",
107
114
  "ahooks": "^3.8.1",
108
- "antd": "^5.21.0",
115
+ "antd": "^5.23.0",
109
116
  "classnames": "^2.5.1",
110
117
  "conventional-changelog-cli": "^5.0.0",
111
118
  "debug": "^4.3.7",
@@ -146,6 +153,9 @@
146
153
  "react": ">=16.9.0",
147
154
  "react-dom": ">=16.9.0"
148
155
  },
156
+ "optionalDependencies": {
157
+ "@agentscope-ai/icons": "^1.0.0"
158
+ },
149
159
  "engines": {
150
160
  "pnpm": "9"
151
161
  },
@@ -165,9 +175,5 @@
165
175
  "design",
166
176
  "components",
167
177
  "llm"
168
- ],
169
- "overrides": {
170
- "@ant-design/icons": "@agentscope-ai/icons-override-antd",
171
- "@ant-design/icons-svg": "@agentscope-ai/icons-svg-override-antd"
172
- }
178
+ ]
173
179
  }