@agentscope-ai/design 1.0.4 → 1.0.6

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 (81) 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 +35 -28
  8. package/dist/antd/themes/bailianTheme.json +35 -28
  9. package/dist/antd/themes/carbonDarkTheme.json +35 -28
  10. package/dist/antd/themes/carbonTheme.json +35 -28
  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/ConfigProvider/index.d.ts +2 -4
  19. package/dist/components/commonComponents/ConfigProvider/index.js +17 -34
  20. package/dist/components/commonComponents/Drawer/index.js +8 -2
  21. package/dist/components/commonComponents/Drawer/index.style.d.ts +9 -0
  22. package/dist/components/commonComponents/Drawer/index.style.js +4 -2
  23. package/dist/components/commonComponents/Dropdown/index.js +2 -5
  24. package/dist/components/commonComponents/Empty/index.js +12 -6
  25. package/dist/components/commonComponents/Empty/index.style.d.ts +4 -19
  26. package/dist/components/commonComponents/Empty/index.style.js +3 -4
  27. package/dist/components/commonComponents/FloatButton/demo/demo1.d.ts +3 -0
  28. package/dist/components/commonComponents/FloatButton/demo/demo1.js +11 -0
  29. package/dist/components/commonComponents/FloatButton/demo/demo2.d.ts +3 -0
  30. package/dist/components/commonComponents/FloatButton/demo/demo2.js +11 -0
  31. package/dist/components/commonComponents/Form/index.js +2 -2
  32. package/dist/components/commonComponents/Form/index.style.d.ts +4 -2
  33. package/dist/components/commonComponents/Form/index.style.js +3 -3
  34. package/dist/components/commonComponents/HelpIcon/demo/index.js +1 -0
  35. package/dist/components/commonComponents/HelpIcon/index.js +6 -1
  36. package/dist/components/commonComponents/HelpIcon/index.style.d.ts +4 -0
  37. package/dist/components/commonComponents/HelpIcon/index.style.js +5 -2
  38. package/dist/components/commonComponents/IconButton/demo/demo1.js +5 -14
  39. package/dist/components/commonComponents/IconButton/demo/demo2.js +5 -5
  40. package/dist/components/commonComponents/IconButton/demo/demo3.js +5 -5
  41. package/dist/components/commonComponents/IconButton/demo/demo4.js +5 -5
  42. package/dist/components/commonComponents/IconButton/index.js +4 -0
  43. package/dist/components/commonComponents/IconButton/index.style.d.ts +16 -0
  44. package/dist/components/commonComponents/IconButton/index.style.js +25 -0
  45. package/dist/components/commonComponents/Input/index.js +10 -1
  46. package/dist/components/commonComponents/Input/index.style.d.ts +7 -0
  47. package/dist/components/commonComponents/Input/index.style.js +7 -3
  48. package/dist/components/commonComponents/Message/{demo.js → demo/demo1.js} +1 -1
  49. package/dist/components/commonComponents/Message/demo/demo2.js +66 -0
  50. package/dist/components/commonComponents/Message/index.d.ts +11 -2
  51. package/dist/components/commonComponents/Message/index.js +49 -1
  52. package/dist/components/commonComponents/Modal/index.js +26 -5
  53. package/dist/components/commonComponents/Modal/index.style.d.ts +33 -2
  54. package/dist/components/commonComponents/Modal/index.style.js +24 -10
  55. package/dist/components/commonComponents/Pagination/demo/demo1.js +3 -1
  56. package/dist/components/commonComponents/Pagination/demo/demo2.js +2 -1
  57. package/dist/components/commonComponents/Slider/demo/demo1.js +1 -1
  58. package/dist/components/commonComponents/Slider/demo/demo2.js +1 -1
  59. package/dist/components/commonComponents/Slider/demo/demo3.d.ts +3 -0
  60. package/dist/components/commonComponents/Slider/demo/demo3.js +44 -0
  61. package/dist/components/commonComponents/Slider/index.d.ts +11 -0
  62. package/dist/components/commonComponents/Slider/index.js +27 -0
  63. package/dist/components/commonComponents/Slider/index.style.d.ts +7 -0
  64. package/dist/components/commonComponents/Slider/index.style.js +22 -0
  65. package/dist/components/commonComponents/Slider/slider.input.d.ts +18 -0
  66. package/dist/components/commonComponents/Slider/slider.input.js +73 -0
  67. package/dist/components/commonComponents/Tag/demo1.d.ts +2 -0
  68. package/dist/components/commonComponents/Tag/{demo.js → demo1.js} +3 -0
  69. package/dist/components/commonComponents/Tag/demo2.d.ts +2 -0
  70. package/dist/components/commonComponents/Tag/demo2.js +40 -0
  71. package/dist/components/commonComponents/Tag/index.style.d.ts +11 -0
  72. package/dist/components/commonComponents/Tag/index.style.js +5 -1
  73. package/dist/config.d.ts +0 -3
  74. package/dist/index.d.ts +3 -2
  75. package/dist/index.js +3 -3
  76. package/dist/libs/env/index.d.ts +1 -5
  77. package/dist/libs/env/index.js +11 -2
  78. package/dist/libs/region/index.d.ts +1 -1
  79. package/package.json +13 -7
  80. /package/dist/components/commonComponents/Message/{demo.d.ts → demo/demo1.d.ts} +0 -0
  81. /package/dist/components/commonComponents/{Tag/demo.d.ts → Message/demo/demo2.d.ts} +0 -0
package/README.md CHANGED
@@ -1,15 +1,14 @@
1
1
  <div align="center"><a name="readme-top"></a>
2
2
 
3
- <img height="120" src="https://img.alicdn.com/imgextra/i1/O1CN01ipemFb1EzmZI9LiTe_!!6000000000423-55-tps-28-28.svg">
3
+ <img height="120" src="https://img.alicdn.com/imgextra/i1/O1CN01ipemFb1EzmZI9LiTe_!!6000000000423-55-tps-28-28.svg">
4
4
 
5
- <h1>Spark Design</h1>
5
+ <h1>@agentscope-ai/design</h1>
6
6
  </div>
7
- 🎨 Spark Design is a front-end component library for LLM scenarios, used to build excellent LLM product experience, including a series of rich basic components and scenario components with LLM characteristics.
7
+ 🎨 @agentscope-ai/design is a front-end component library for LLM scenarios, used to build excellent LLM product experience, including a series of rich basic components and scenario components with LLM characteristics.
8
8
  <br />
9
9
  <br />
10
10
 
11
- 💬 Spark Chat: A free AI Chat framework for building an excellent LLM Chat experience similar to ChatGPT
12
- 🔀 Spark Flow: A free, open source workflow suite for building low-code, visual AI operation workflows
11
+ 💬 @agentscope-ai/chat: A free AI Chat framework for building an excellent LLM Chat experience similar to ChatGPT
13
12
 
14
13
  ## ✨ Features
15
14
  - <img height="15" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg"> Based on Ant Design, compatible with the Ant Design ecosystem.
@@ -44,7 +43,7 @@ const App = () => {
44
43
  return (
45
44
  <ConfigProvider
46
45
  {...theme} // you can choose from purpleTheme, purpleDarkTheme, carbonTheme and carbonDarkTheme
47
- prefix={prefix} // prefix for Ant Design and Spark Design
46
+ prefix={prefix} // prefix for Ant Design and @agentscope-ai/design
48
47
  iconfont="//at.alicdn.com/t/a/font_4807885_ugexdeaoq7.js" // optional parameter, you can get it from https://www.iconfont.cn/
49
48
  locale={zhCN} // language pack from Ant Design
50
49
  >
@@ -0,0 +1,18 @@
1
+ export declare function getBreadcrumbStyleData(params: any): {
2
+ [x: string]: {
3
+ [x: string]: {
4
+ fontSize: string;
5
+ fontWeight: number;
6
+ lineHeight: string;
7
+ color: string;
8
+ } | {
9
+ color: string;
10
+ fontSize?: undefined;
11
+ fontWeight?: undefined;
12
+ lineHeight?: undefined;
13
+ };
14
+ 'li:last-child': {
15
+ color: string;
16
+ };
17
+ };
18
+ };
@@ -0,0 +1,15 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
+ export function getBreadcrumbStyleData(params) {
6
+ var antPrefix = params.antPrefix;
7
+ return _defineProperty({}, ".".concat(antPrefix, "-breadcrumb"), _defineProperty(_defineProperty({}, ".".concat(antPrefix, "-breadcrumb-link"), {
8
+ fontSize: '14px',
9
+ fontWeight: 500,
10
+ lineHeight: '24px',
11
+ color: "var(--".concat(antPrefix, "-color-text-secondary)")
12
+ }), 'li:last-child', {
13
+ color: "var(--".concat(antPrefix, "-color-text)")
14
+ }));
15
+ }
@@ -8,6 +8,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
8
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
9
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
10
  import createStyle from "../../libs/createStyle";
11
+ import { getBreadcrumbStyleData } from "./breadcrumb.style";
11
12
  import { getButtonStyleData } from "./button.style";
12
13
  import { getDropdownStyleData } from "./dropdown.style";
13
14
  import { getMessageStyleData } from "./message.style";
@@ -21,7 +22,7 @@ import { getTableStyleData } from "./table.style";
21
22
  import { getTooltipStyleData } from "./tooltip.style";
22
23
  export function getIndexStyleData(params) {
23
24
  // const { antPrefix = 'bl-ant', blPrefix = 'bl' } = params;
24
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
25
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
25
26
  // 定义动画关键帧
26
27
  '@keyframes fadeInUp': {
27
28
  '0%': {
@@ -39,7 +40,7 @@ export function getIndexStyleData(params) {
39
40
  transform: 'translateY(32px)',
40
41
  animation: 'fadeInUp 0.4s ease forwards'
41
42
  }
42
- }, getSliderStyleData(params)), getPopoverStyleData(params)), getSelectStyleData(params)), getButtonStyleData(params)), getDropdownStyleData(params)), getTooltipStyleData(params)), getMessageStyleData(params)), getSegmentStyleData(params)), getNotificationStyleData(params)), getTableStyleData(params)), getRadioStyleData(params));
43
+ }, getSliderStyleData(params)), getPopoverStyleData(params)), getSelectStyleData(params)), getButtonStyleData(params)), getDropdownStyleData(params)), getTooltipStyleData(params)), getMessageStyleData(params)), getSegmentStyleData(params)), getNotificationStyleData(params)), getTableStyleData(params)), getRadioStyleData(params)), getBreadcrumbStyleData(params));
43
44
  }
44
45
  var useIndexStyle = createStyle(function (_ref) {
45
46
  var css = _ref.css,
@@ -2,5 +2,20 @@ export declare function getSelectStyleData(params: any): {
2
2
  [x: string]: {
3
3
  border: string;
4
4
  boxShadow: string;
5
+ borderRadius: string;
6
+ borderColor?: undefined;
7
+ color?: undefined;
8
+ } | {
9
+ borderColor: string;
10
+ border?: undefined;
11
+ boxShadow?: undefined;
12
+ borderRadius?: undefined;
13
+ color?: undefined;
14
+ } | {
15
+ color: string;
16
+ border?: undefined;
17
+ boxShadow?: undefined;
18
+ borderRadius?: undefined;
19
+ borderColor?: undefined;
5
20
  };
6
21
  };
@@ -4,8 +4,13 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
4
4
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  export function getSelectStyleData(params) {
6
6
  var antPrefix = params.antPrefix;
7
- return _defineProperty({}, ".".concat(antPrefix, "-select-dropdown"), {
7
+ return _defineProperty(_defineProperty(_defineProperty({}, ".".concat(antPrefix, "-select-dropdown"), {
8
8
  border: "1px solid var(--".concat(antPrefix, "-color-border-secondary)"),
9
- boxShadow: "0px 4px 6px 0px rgba(0, 0, 0, 0.08)"
9
+ boxShadow: "0px 4px 6px 0px rgba(0, 0, 0, 0.08)",
10
+ borderRadius: "var(--".concat(antPrefix, "-border-radius)")
11
+ }), ".".concat(antPrefix, "-select-outlined:not(.").concat(antPrefix, "-select-customize-input) .").concat(antPrefix, "-select-selector"), {
12
+ borderColor: "var(--".concat(antPrefix, "-color-border-secondary)")
13
+ }), ".".concat(antPrefix, "-select .").concat(antPrefix, "-select-arrow"), {
14
+ color: "var(--".concat(antPrefix, "-color-text-secondary)")
10
15
  });
11
16
  }
@@ -3,7 +3,12 @@
3
3
  "cssVar": true,
4
4
  "hashed": false,
5
5
  "token": {
6
+ "borderRadiusXS": 2,
7
+ "borderRadiusSM": 4,
6
8
  "borderRadius": 6,
9
+ "borderRadiusLG": 8,
10
+ "borderRadiusXL": 12,
11
+ "borderRadiusFull": 999,
7
12
  "wireframe": false,
8
13
  "colorPrimaryBg": "#202041",
9
14
  "colorPrimaryBgHover": "#202041",
@@ -59,7 +64,33 @@
59
64
  "colorErrorBorderHover": "rgba(255, 163, 158, 0.2)",
60
65
  "colorLink": "#5551CC",
61
66
  "boxShadow": "0px 4px 6px 0px rgba(255, 255, 255, 0.08)",
62
- "boxShadowSecondary": "0px 12px 24px -16px rgba(255, 255, 255, 0.04),0px 8px 40px 0px rgba(255, 255, 255, 0.06),0px 0px 1px 0px rgba(255, 255, 255, 0.02)"
67
+ "boxShadowSecondary": "0px 12px 24px -16px rgba(255, 255, 255, 0.04),0px 8px 40px 0px rgba(255, 255, 255, 0.06),0px 0px 1px 0px rgba(255, 255, 255, 0.02)",
68
+ "colorTextWhite": "#fff",
69
+ "colorFillDisable": "#8D8C98",
70
+ "colorPurple": "#5551CC",
71
+ "colorPurpleHover": "#8383F0",
72
+ "colorPurpleBg": "rgba(226, 222, 255, 0.2)",
73
+ "colorPink": "#EC4899",
74
+ "colorPinkHover": "#E494BC",
75
+ "colorPinkBg": "rgba(251, 220, 239, 0.2)",
76
+ "colorYellow": "#EAB308",
77
+ "colorYellowHover": "#DBBE62",
78
+ "colorYellowBg": "rgba(255, 250, 184, 0.2)",
79
+ "colorOrange": "#FA8125",
80
+ "colorOrangeHover": "#F7A25F",
81
+ "colorOrangeBg": "rgba(255, 232, 201, 0.2)",
82
+ "colorTeal": "#14B8A6",
83
+ "colorTealHover": "#7BC7BE",
84
+ "colorTealBg": "rgba(200, 244, 233, 0.2)",
85
+ "colorBlue": "#0090FF",
86
+ "colorBlueHover": "#83BFED",
87
+ "colorBlueBg": "rgba(194, 229, 255, 0.2)",
88
+ "colorMauve": "#8E8C99",
89
+ "colorMauveHover": "#BBB8CA",
90
+ "colorMauveBg": "rgba(239, 240, 243, 0.2)",
91
+ "boxShadowTertiary": "0px 12px 32px -16px rgba(255, 255, 255, 0.16),0px 12px 60px 0px rgba(255, 255, 255, 0.08),0px 0px 1px 0px rgba(255, 255, 255, 0.02)",
92
+ "boxShadowTertiaryLeft": "-12px 0px 32px -16px rgba(255, 255, 255, 0.16),-12px 0px 60px 0px rgba(255, 255, 255, 0.08),0px 0px 1px 0px rgba(255, 255, 255, 0.02);",
93
+ "boxShadowInput": "0px 12px 24px -16px rgba(255, 255, 255, 0.08),0px 12px 40px 0px rgba(255, 255, 255, 0.16),0px 0px 1px 0px rgba(255, 255, 255, 0.04)"
63
94
  },
64
95
  "components": {
65
96
  "Alert": {
@@ -130,34 +161,10 @@
130
161
  },
131
162
  "Table": {
132
163
  "cellPaddingInline": 20
164
+ },
165
+ "Form": {
166
+ "itemMarginBottom": 16
133
167
  }
134
- },
135
- "extraCssVariables": {
136
- "color-text-white": "#fff",
137
- "color-fill-disable": "#8D8C98",
138
- "color-purple": "#5551CC",
139
- "color-purple-hover": "#8383F0",
140
- "color-purple-bg": "rgba(226, 222, 255, 0.2)",
141
- "color-pink": "#EC4899",
142
- "color-pink-hover": "#E494BC",
143
- "color-pink-bg": "rgba(251, 220, 239, 0.2)",
144
- "color-yellow": "#EAB308",
145
- "color-yellow-hover": "#DBBE62",
146
- "color-yellow-bg": "rgba(255, 250, 184, 0.2)",
147
- "color-orange": "#FA8125",
148
- "color-orange-hover": "#F7A25F",
149
- "color-orange-bg": "rgba(255, 232, 201, 0.2)",
150
- "color-teal": "#14B8A6",
151
- "color-teal-hover": "#7BC7BE",
152
- "color-teal-bg": "rgba(200, 244, 233, 0.2)",
153
- "color-blue": "#0090FF",
154
- "color-blue-hover": "#83BFED",
155
- "color-blue-bg": "rgba(194, 229, 255, 0.2)",
156
- "color-mauve": "#8E8C99",
157
- "color-mauve-hover": "#BBB8CA",
158
- "color-mauve-bg": "rgba(239, 240, 243, 0.2)",
159
- "box-shadow-tertiary": "0px 12px 32px -16px rgba(255, 255, 255, 0.16),0px 12px 60px 0px rgba(255, 255, 255, 0.08),0px 0px 1px 0px rgba(255, 255, 255, 0.02)",
160
- "box-shadow-tertiary-left": "-12px 0px 32px -16px rgba(255, 255, 255, 0.16),-12px 0px 60px 0px rgba(255, 255, 255, 0.08),0px 0px 1px 0px rgba(255, 255, 255, 0.02);"
161
168
  }
162
169
  },
163
170
  "checkbox": {
@@ -3,7 +3,12 @@
3
3
  "cssVar": true,
4
4
  "hashed": false,
5
5
  "token": {
6
+ "borderRadiusXS": 2,
7
+ "borderRadiusSM": 4,
6
8
  "borderRadius": 6,
9
+ "borderRadiusLG": 8,
10
+ "borderRadiusXL": 12,
11
+ "borderRadiusFull": 999,
7
12
  "wireframe": false,
8
13
  "colorPrimaryBg": "#F2F0FF",
9
14
  "colorPrimaryBgHover": "#F2F0FF",
@@ -59,7 +64,33 @@
59
64
  "colorErrorBorderHover": "#FFA39E",
60
65
  "colorLink": "#615CED",
61
66
  "boxShadow": "0px 4px 6px 0px rgba(0, 0, 0, 0.08)",
62
- "boxShadowSecondary": "0px 12px 24px -16px rgba(0, 0, 0, 0.06),0px 8px 40px 0px rgba(0, 0, 0, 0.12),0px 0px 1px 0px rgba(0, 0, 0, 0.04)"
67
+ "boxShadowSecondary": "0px 12px 24px -16px rgba(0, 0, 0, 0.06),0px 8px 40px 0px rgba(0, 0, 0, 0.12),0px 0px 1px 0px rgba(0, 0, 0, 0.04)",
68
+ "colorTextWhite": "#fff",
69
+ "colorFillDisable": "#DBDAE7",
70
+ "colorPurple": "#615CED",
71
+ "colorPurpleHover": "#8080FF",
72
+ "colorPurpleBg": "rgba(226, 222, 255, 0.8)",
73
+ "colorPink": "#EC4899",
74
+ "colorPinkHover": "#E593BC",
75
+ "colorPinkBg": "rgba(251, 220, 239, 0.8)",
76
+ "colorYellow": "#EAB308",
77
+ "colorYellowHover": "#F1D372",
78
+ "colorYellowBg": "rgba(255, 250, 184, 0.8)",
79
+ "colorOrange": "#FA8125",
80
+ "colorOrangeHover": "#E88C45",
81
+ "colorOrangeBg": "rgba(255, 232, 201, 0.8)",
82
+ "colorTeal": "#14B8A6",
83
+ "colorTealHover": "#5FB3A9",
84
+ "colorTealBg": "rgba(200, 244, 233, 0.8)",
85
+ "colorBlue": "#0090FF",
86
+ "colorBlueHover": "#72BCF5",
87
+ "colorBlueBg": "rgba(194, 229, 255, 0.8)",
88
+ "colorMauve": "#8E8C99",
89
+ "colorMauveHover": "#C0BFC8",
90
+ "colorMauveBg": "rgba(239, 240, 243, 0.8)",
91
+ "boxShadowTertiary": "0px 12px 32px -16px rgba(0, 0, 0, 0.24),0px 12px 60px 0px rgba(0, 0, 0, 0.12),0px 0px 1px 0px rgba(0, 0, 0, 0.04)",
92
+ "boxShadowTertiaryLeft": "-12px 0px 32px -16px rgba(0, 0, 0, 0.24),-12px 0px 60px 0px rgba(0, 0, 0, 0.12),0px 0px 1px 0px rgba(0, 0, 0, 0.04)",
93
+ "boxShadowInput": "0px 12px 24px -16px rgba(54, 54, 73, 0.04),0px 12px 40px 0px rgba(51, 51, 71, 0.08),0px 0px 1px 0px rgba(44, 44, 54, 0.02)"
63
94
  },
64
95
  "components": {
65
96
  "Alert": {
@@ -127,34 +158,10 @@
127
158
  },
128
159
  "Table": {
129
160
  "cellPaddingInline": 20
161
+ },
162
+ "Form": {
163
+ "itemMarginBottom": 16
130
164
  }
131
- },
132
- "extraCssVariables": {
133
- "color-text-white": "#fff",
134
- "color-fill-disable": "#DBDAE7",
135
- "color-purple": "#615CED",
136
- "color-purple-hover": "#8080FF",
137
- "color-purple-bg": "rgba(226, 222, 255, 0.8)",
138
- "color-pink": "#EC4899",
139
- "color-pink-hover": "#E593BC",
140
- "color-pink-bg": "rgba(251, 220, 239, 0.8)",
141
- "color-yellow": "#EAB308",
142
- "color-yellow-hover": "#F1D372",
143
- "color-yellow-bg": "rgba(255, 250, 184, 0.8)",
144
- "color-orange": "#FA8125",
145
- "color-orange-hover": "#E88C45",
146
- "color-orange-bg": "rgba(255, 232, 201, 0.8)",
147
- "color-teal": "#14B8A6",
148
- "color-teal-hover": "#5FB3A9",
149
- "color-teal-bg": "rgba(200, 244, 233, 0.8)",
150
- "color-blue": "#0090FF",
151
- "color-blue-hover": "#72BCF5",
152
- "color-blue-bg": "rgba(194, 229, 255, 0.8)",
153
- "color-mauve": "#8E8C99",
154
- "color-mauve-hover": "#C0BFC8",
155
- "color-mauve-bg": "rgba(239, 240, 243, 0.8)",
156
- "box-shadow-tertiary": "0px 12px 32px -16px rgba(0, 0, 0, 0.24),0px 12px 60px 0px rgba(0, 0, 0, 0.12),0px 0px 1px 0px rgba(0, 0, 0, 0.04)",
157
- "box-shadow-tertiary-left": "-12px 0px 32px -16px rgba(0, 0, 0, 0.24),-12px 0px 60px 0px rgba(0, 0, 0, 0.12),0px 0px 1px 0px rgba(0, 0, 0, 0.04)"
158
165
  }
159
166
  },
160
167
  "checkbox": {
@@ -3,7 +3,12 @@
3
3
  "cssVar": true,
4
4
  "hashed": false,
5
5
  "token": {
6
+ "borderRadiusXS": 2,
7
+ "borderRadiusSM": 4,
6
8
  "borderRadius": 6,
9
+ "borderRadiusLG": 8,
10
+ "borderRadiusXL": 12,
11
+ "borderRadiusFull": 999,
7
12
  "wireframe": false,
8
13
  "colorPrimaryBg": "#181818",
9
14
  "colorPrimaryBgHover": "#2e2e2e",
@@ -59,7 +64,33 @@
59
64
  "colorErrorBorderHover": "rgba(255, 163, 158, 0.2)",
60
65
  "colorLink": "rgba(22, 87, 238, 1)",
61
66
  "boxShadow": "0px 4px 6px 0px rgba(255, 255, 255, 0.08)",
62
- "boxShadowSecondary": "0px 12px 24px -16px rgba(255, 255, 255, 0.06),0px 8px 40px 0px rgba(255, 255, 255, 0.12),0px 0px 1px 0px rgba(255, 255, 255, 0.04)"
67
+ "boxShadowSecondary": "0px 12px 24px -16px rgba(255, 255, 255, 0.06),0px 8px 40px 0px rgba(255, 255, 255, 0.12),0px 0px 1px 0px rgba(255, 255, 255, 0.04)",
68
+ "colorTextWhite": "#fff",
69
+ "colorFillDisable": "rgba(137, 137, 137, 1)",
70
+ "colorPurple": "#5551CC",
71
+ "colorPurpleHover": "#8383F0",
72
+ "colorPurpleBg": "rgba(226, 222, 255, 0.2)",
73
+ "colorPink": "#EC4899",
74
+ "colorPinkHover": "#E494BC",
75
+ "colorPinkBg": "rgba(251, 220, 239, 0.2)",
76
+ "colorYellow": "#EAB308",
77
+ "colorYellowHover": "#DBBE62",
78
+ "colorYellowBg": "rgba(255, 250, 184, 0.2)",
79
+ "colorOrange": "#FA8125",
80
+ "colorOrangeHover": "#F7A25F",
81
+ "colorOrangeBg": "rgba(255, 232, 201, 0.2)",
82
+ "colorTeal": "#14B8A6",
83
+ "colorTealHover": "#7BC7BE",
84
+ "colorTealBg": "rgba(200, 244, 233, 0.2)",
85
+ "colorBlue": "#0090FF",
86
+ "colorBlueHover": "#83BFED",
87
+ "colorBlueBg": "rgba(194, 229, 255, 0.2)",
88
+ "colorMauve": "#8E8C99",
89
+ "colorMauveHover": "#BBB8CA",
90
+ "colorMauveBg": "rgba(239, 240, 243, 0.2)",
91
+ "boxShadowTertiary": "0px 12px 32px -16px rgba(255, 255, 255, 0.24),0px 12px 60px 0px rgba(255, 255, 255, 0.12),0px 0px 1px 0px rgba(255, 255, 255, 0.04)",
92
+ "boxShadowTertiaryLeft": "-12px 0px 32px -16px rgba(255, 255, 255, 0.24),-12px 0px 60px 0px rgba(255, 255, 255, 0.12),0px 0px 1px 0px rgba(255, 255, 255, 0.04)",
93
+ "boxShadowInput": "0px 12px 24px -16px rgba(255, 255, 255, 0.08),0px 12px 40px 0px rgba(255, 255, 255, 0.16),0px 0px 1px 0px rgba(255, 255, 255, 0.04)"
63
94
  },
64
95
  "components": {
65
96
  "Alert": {
@@ -129,34 +160,10 @@
129
160
  },
130
161
  "Table": {
131
162
  "cellPaddingInline": 20
163
+ },
164
+ "Form": {
165
+ "itemMarginBottom": 16
132
166
  }
133
- },
134
- "extraCssVariables": {
135
- "color-text-white": "#fff",
136
- "color-fill-disable": "rgba(137, 137, 137, 1)",
137
- "color-purple": "#5551CC",
138
- "color-purple-hover": "#8383F0",
139
- "color-purple-bg": "rgba(226, 222, 255, 0.2)",
140
- "color-pink": "#EC4899",
141
- "color-pink-hover": "#E494BC",
142
- "color-pink-bg": "rgba(251, 220, 239, 0.2)",
143
- "color-yellow": "#EAB308",
144
- "color-yellow-hover": "#DBBE62",
145
- "color-yellow-bg": "rgba(255, 250, 184, 0.2)",
146
- "color-orange": "#FA8125",
147
- "color-orange-hover": "#F7A25F",
148
- "color-orange-bg": "rgba(255, 232, 201, 0.2)",
149
- "color-teal": "#14B8A6",
150
- "color-teal-hover": "#7BC7BE",
151
- "color-teal-bg": "rgba(200, 244, 233, 0.2)",
152
- "color-blue": "#0090FF",
153
- "color-blue-hover": "#83BFED",
154
- "color-blue-bg": "rgba(194, 229, 255, 0.2)",
155
- "color-mauve": "#8E8C99",
156
- "color-mauve-hover": "#BBB8CA",
157
- "color-mauve-bg": "rgba(239, 240, 243, 0.2)",
158
- "box-shadow-tertiary": "0px 12px 32px -16px rgba(255, 255, 255, 0.24),0px 12px 60px 0px rgba(255, 255, 255, 0.12),0px 0px 1px 0px rgba(255, 255, 255, 0.04)",
159
- "box-shadow-tertiary-left": "-12px 0px 32px -16px rgba(255, 255, 255, 0.24),-12px 0px 60px 0px rgba(255, 255, 255, 0.12),0px 0px 1px 0px rgba(255, 255, 255, 0.04)"
160
167
  }
161
168
  },
162
169
  "checkbox": {
@@ -3,7 +3,12 @@
3
3
  "cssVar": true,
4
4
  "hashed": false,
5
5
  "token": {
6
+ "borderRadiusXS": 2,
7
+ "borderRadiusSM": 4,
6
8
  "borderRadius": 6,
9
+ "borderRadiusLG": 8,
10
+ "borderRadiusXL": 12,
11
+ "borderRadiusFull": 999,
7
12
  "wireframe": false,
8
13
  "colorPrimaryBg": "rgba(244, 244, 247, 1)",
9
14
  "colorPrimaryBgHover": "rgba(239, 239, 244, 1)",
@@ -59,7 +64,33 @@
59
64
  "colorErrorBorderHover": "#FFA39E",
60
65
  "colorLink": "#615CED",
61
66
  "boxShadow": "0px 4px 6px 0px rgba(0, 0, 0, 0.08)",
62
- "boxShadowSecondary": "0px 12px 24px -16px rgba(0, 0, 0, 0.06),0px 8px 40px 0px rgba(0, 0, 0, 0.12),0px 0px 1px 0px rgba(0, 0, 0, 0.04)"
67
+ "boxShadowSecondary": "0px 12px 24px -16px rgba(0, 0, 0, 0.06),0px 8px 40px 0px rgba(0, 0, 0, 0.12),0px 0px 1px 0px rgba(0, 0, 0, 0.04)",
68
+ "colorTextWhite": "#fff",
69
+ "colorFillDisable": "#E8E8EB",
70
+ "colorPurple": "#615CED",
71
+ "colorPurpleHover": "#8080FF",
72
+ "colorPurpleBg": "rgba(226, 222, 255, 0.8)",
73
+ "colorPink": "#EC4899",
74
+ "colorPinkHover": "#E593BC",
75
+ "colorPinkBg": "rgba(251, 220, 239, 0.8)",
76
+ "colorYellow": "#EAB308",
77
+ "colorYellowHover": "#F1D372",
78
+ "colorYellowBg": "rgba(255, 250, 184, 0.8)",
79
+ "colorOrange": "#FA8125",
80
+ "colorOrangeHover": "#E88C45",
81
+ "colorOrangeBg": "rgba(255, 232, 201, 0.8)",
82
+ "colorTeal": "#14B8A6",
83
+ "colorTealHover": "#5FB3A9",
84
+ "colorTealBg": "rgba(200, 244, 233, 0.8)",
85
+ "colorBlue": "#0090FF",
86
+ "colorBlueHover": "#72BCF5",
87
+ "colorBlueBg": "rgba(194, 229, 255, 0.8)",
88
+ "colorMauve": "#8E8C99",
89
+ "colorMauveHover": "#C0BFC8",
90
+ "colorMauveBg": "rgba(239, 240, 243, 0.8)",
91
+ "boxShadowTertiary": "0px 12px 32px -16px rgba(0, 0, 0, 0.24),0px 12px 60px 0px rgba(0, 0, 0, 0.12),0px 0px 1px 0px rgba(0, 0, 0, 0.04)",
92
+ "boxShadowTertiaryLeft": "-12px 0px 32px -16px rgba(0, 0, 0, 0.24),-12px 0px 60px 0px rgba(0, 0, 0, 0.12),0px 0px 1px 0px rgba(0, 0, 0, 0.04)",
93
+ "boxShadowInput": "0px 12px 24px -16px rgba(54, 54, 73, 0.04),0px 12px 40px 0px rgba(51, 51, 71, 0.08),0px 0px 1px 0px rgba(44, 44, 54, 0.02)"
63
94
  },
64
95
  "components": {
65
96
  "Alert": {
@@ -127,34 +158,10 @@
127
158
  },
128
159
  "Table": {
129
160
  "cellPaddingInline": 20
161
+ },
162
+ "Form": {
163
+ "itemMarginBottom": 16
130
164
  }
131
- },
132
- "extraCssVariables": {
133
- "color-text-white": "#fff",
134
- "color-fill-disable": "#E8E8EB",
135
- "color-purple": "#615CED",
136
- "color-purple-hover": "#8080FF",
137
- "color-purple-bg": "rgba(226, 222, 255, 0.8)",
138
- "color-pink": "#EC4899",
139
- "color-pink-hover": "#E593BC",
140
- "color-pink-bg": "rgba(251, 220, 239, 0.8)",
141
- "color-yellow": "#EAB308",
142
- "color-yellow-hover": "#F1D372",
143
- "color-yellow-bg": "rgba(255, 250, 184, 0.8)",
144
- "color-orange": "#FA8125",
145
- "color-orange-hover": "#E88C45",
146
- "color-orange-bg": "rgba(255, 232, 201, 0.8)",
147
- "color-teal": "#14B8A6",
148
- "color-teal-hover": "#5FB3A9",
149
- "color-teal-bg": "rgba(200, 244, 233, 0.8)",
150
- "color-blue": "#0090FF",
151
- "color-blue-hover": "#72BCF5",
152
- "color-blue-bg": "rgba(194, 229, 255, 0.8)",
153
- "color-mauve": "#8E8C99",
154
- "color-mauve-hover": "#C0BFC8",
155
- "color-mauve-bg": "rgba(239, 240, 243, 0.8)",
156
- "box-shadow-tertiary": "0px 12px 32px -16px rgba(0, 0, 0, 0.24),0px 12px 60px 0px rgba(0, 0, 0, 0.12),0px 0px 1px 0px rgba(0, 0, 0, 0.04)",
157
- "box-shadow-tertiary-left": "-12px 0px 32px -16px rgba(0, 0, 0, 0.24),-12px 0px 60px 0px rgba(0, 0, 0, 0.12),0px 0px 1px 0px rgba(0, 0, 0, 0.04)"
158
165
  }
159
166
  },
160
167
  "checkbox": {
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["children", "type", "danger", "title"];
2
+ var _excluded = ["children", "type", "danger", "title", "width", "className"];
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -8,25 +8,19 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
8
8
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
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 $i18n from "../../../i18n";
11
- import { staticRenderer } from "../../..";
12
11
  import { CheckCircleOutlined, CloseCircleOutlined, ExclamationCircleOutlined, InfoCircleOutlined } from "@agentscope-ai/icons-override-antd";
13
12
  import { Flex, Modal } from 'antd';
14
13
  import classNames from 'classnames';
15
- import { uniqueId } from 'lodash-es';
16
14
  import { getCommonConfig } from "../../../config";
15
+ import useIndexStyle from "./index.style";
17
16
  import { jsx as _jsx } from "react/jsx-runtime";
18
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
19
- var AlertDialog = function AlertDialog(props) {
20
- var children = props.children,
21
- _props$type = props.type,
22
- type = _props$type === void 0 ? 'info' : _props$type,
23
- _props$danger = props.danger,
24
- danger = _props$danger === void 0 ? false : _props$danger,
25
- title = props.title,
26
- restProps = _objectWithoutProperties(props, _excluded);
27
- var _getCommonConfig = getCommonConfig(),
28
- antPrefix = _getCommonConfig.antPrefix;
29
- var renderTitle = function renderTitle() {
18
+ var getCommonProps = function getCommonProps(props) {
19
+ var renderTitle = function renderTitle(_ref) {
20
+ var type = _ref.type,
21
+ title = _ref.title;
22
+ var _getCommonConfig = getCommonConfig(),
23
+ antPrefix = _getCommonConfig.antPrefix;
30
24
  switch (type) {
31
25
  case 'success':
32
26
  return /*#__PURE__*/_jsxs(Flex, {
@@ -87,57 +81,66 @@ var AlertDialog = function AlertDialog(props) {
87
81
  });
88
82
  }
89
83
  };
90
- return /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({
91
- width: 400,
92
- transitionName: ""
93
- }, restProps), {}, {
84
+ var children = props.children,
85
+ _props$type = props.type,
86
+ type = _props$type === void 0 ? 'info' : _props$type,
87
+ _props$danger = props.danger,
88
+ danger = _props$danger === void 0 ? false : _props$danger,
89
+ title = props.title,
90
+ _props$width = props.width,
91
+ width = _props$width === void 0 ? 400 : _props$width,
92
+ _props$className = props.className,
93
+ className = _props$className === void 0 ? '' : _props$className,
94
+ restProps = _objectWithoutProperties(props, _excluded);
95
+ return {
96
+ width: width,
97
+ transitionName: '',
98
+ restProps: restProps,
94
99
  closeIcon: null,
95
- title: renderTitle(),
100
+ title: renderTitle({
101
+ type: type,
102
+ title: title
103
+ }),
96
104
  okButtonProps: {
97
105
  danger: type === 'error' || danger
98
106
  },
99
- styles: {
100
- body: {
101
- padding: '12px 0 12px 32px',
102
- fontSize: '14px'
103
- }
104
- },
105
107
  destroyOnClose: true,
106
- getContainer: function getContainer() {
107
- return document.getElementById('root');
108
- },
109
- className: classNames(props.className, 'animate-in'),
110
- children: props.content || children
108
+ className: classNames(className, 'animate-in', "".concat(getCommonConfig().sparkPrefix, "-alert-dialog")),
109
+ content: props.content || children,
110
+ children: children
111
+ };
112
+ };
113
+ var AlertDialog = function AlertDialog(props) {
114
+ var commonProps = getCommonProps(props);
115
+ useIndexStyle();
116
+ return /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({
117
+ width: commonProps.width,
118
+ transitionName: ""
119
+ }, commonProps.restProps), {}, {
120
+ closeIcon: null,
121
+ title: commonProps.title,
122
+ okButtonProps: commonProps.okButtonProps || {},
123
+ destroyOnClose: commonProps.destroyOnClose,
124
+ className: commonProps.className,
125
+ children: commonProps.content || commonProps.children
111
126
  }));
112
127
  };
113
128
  var staticFns = ['success', 'info', 'warning', 'error'];
114
- var _getCommonConfig2 = getCommonConfig(),
115
- sparkPrefix = _getCommonConfig2.sparkPrefix;
116
129
  staticFns.forEach(function (type) {
117
130
  AlertDialog[type] = function (props) {
118
- var id = uniqueId();
119
- staticRenderer.show( /*#__PURE__*/_jsx(AlertDialog, _objectSpread(_objectSpread({}, props), {}, {
120
- type: type,
121
- open: true,
122
- onOk: function onOk(e) {
123
- var _props$onOk;
124
- staticRenderer.hide(id);
125
- (_props$onOk = props.onOk) === null || _props$onOk === void 0 || _props$onOk.call(props, e);
126
- },
127
- onCancel: function onCancel(e) {
128
- var _props$onCancel;
129
- staticRenderer.hide(id);
130
- (_props$onCancel = props.onCancel) === null || _props$onCancel === void 0 || _props$onCancel.call(props, e);
131
- },
132
- onClose: function onClose(e) {
133
- var _props$onClose;
134
- staticRenderer.hide(id);
135
- (_props$onClose = props.onClose) === null || _props$onClose === void 0 || _props$onClose.call(props, e);
136
- },
137
- getContainer: function getContainer() {
138
- return document.querySelector("div[role=".concat(sparkPrefix, "-static").concat(id ? "-".concat(id) : '', "]")) || document.body;
139
- }
140
- })), id);
131
+ var commonProps = getCommonProps(_objectSpread(_objectSpread({}, props), {}, {
132
+ type: type
133
+ }));
134
+ function Content() {
135
+ useIndexStyle();
136
+ return commonProps.content;
137
+ }
138
+
139
+ // @ts-ignore
140
+ return Modal.confirm(_objectSpread(_objectSpread(_objectSpread({}, commonProps), commonProps.restProps), {}, {
141
+ content: /*#__PURE__*/_jsx(Content, {}),
142
+ icon: null
143
+ }));
141
144
  };
142
145
  });
143
146
  export default AlertDialog;
@@ -0,0 +1,17 @@
1
+ export declare function getIndexStyleData(params: any): {
2
+ [x: string]: {
3
+ [x: string]: {
4
+ padding: string;
5
+ fontSize: string;
6
+ color: string;
7
+ maxWidth?: undefined;
8
+ } | {
9
+ maxWidth: string;
10
+ padding?: undefined;
11
+ fontSize?: undefined;
12
+ color?: undefined;
13
+ };
14
+ };
15
+ };
16
+ declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
17
+ export default useIndexStyle;