@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.
- package/README.md +5 -6
- package/dist/antd/styles/breadcrumb.style.d.ts +18 -0
- package/dist/antd/styles/breadcrumb.style.js +15 -0
- package/dist/antd/styles/index.style.js +3 -2
- package/dist/antd/styles/select.style.d.ts +15 -0
- package/dist/antd/styles/select.style.js +7 -2
- package/dist/antd/themes/bailianDarkTheme.json +6 -1
- package/dist/antd/themes/bailianTheme.json +6 -1
- package/dist/antd/themes/carbonDarkTheme.json +6 -1
- package/dist/antd/themes/carbonTheme.json +6 -1
- package/dist/components/commonComponents/AlertDialog/index.js +58 -55
- package/dist/components/commonComponents/AlertDialog/index.style.d.ts +17 -0
- package/dist/components/commonComponents/AlertDialog/index.style.js +30 -0
- package/dist/components/commonComponents/Breadcrumb/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Breadcrumb/demo/demo1.js +23 -0
- package/dist/components/commonComponents/Button/index.d.ts +3 -0
- package/dist/components/commonComponents/Button/index.js +36 -23
- package/dist/components/commonComponents/Drawer/index.js +7 -0
- package/dist/components/commonComponents/Drawer/index.style.d.ts +9 -0
- package/dist/components/commonComponents/Drawer/index.style.js +4 -2
- package/dist/components/commonComponents/Empty/index.js +12 -6
- package/dist/components/commonComponents/Empty/index.style.d.ts +4 -19
- package/dist/components/commonComponents/Empty/index.style.js +3 -4
- package/dist/components/commonComponents/FloatButton/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/FloatButton/demo/demo1.js +11 -0
- package/dist/components/commonComponents/FloatButton/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/FloatButton/demo/demo2.js +11 -0
- package/dist/components/commonComponents/Form/index.js +2 -2
- package/dist/components/commonComponents/Form/index.style.d.ts +4 -2
- package/dist/components/commonComponents/Form/index.style.js +3 -3
- package/dist/components/commonComponents/HelpIcon/demo/index.js +1 -0
- package/dist/components/commonComponents/HelpIcon/index.js +6 -1
- package/dist/components/commonComponents/HelpIcon/index.style.d.ts +4 -0
- package/dist/components/commonComponents/HelpIcon/index.style.js +5 -2
- package/dist/components/commonComponents/IconButton/demo/demo1.js +5 -14
- package/dist/components/commonComponents/IconButton/demo/demo2.js +5 -5
- package/dist/components/commonComponents/IconButton/demo/demo3.js +5 -5
- package/dist/components/commonComponents/IconButton/demo/demo4.js +5 -5
- package/dist/components/commonComponents/IconButton/index.js +4 -0
- package/dist/components/commonComponents/IconButton/index.style.d.ts +16 -0
- package/dist/components/commonComponents/IconButton/index.style.js +25 -0
- package/dist/components/commonComponents/Input/index.js +10 -1
- package/dist/components/commonComponents/Input/index.style.d.ts +7 -0
- package/dist/components/commonComponents/Input/index.style.js +7 -3
- package/dist/components/commonComponents/Message/{demo.js → demo/demo1.js} +1 -1
- package/dist/components/commonComponents/Message/demo/demo2.js +66 -0
- package/dist/components/commonComponents/Message/index.d.ts +11 -2
- package/dist/components/commonComponents/Message/index.js +49 -1
- package/dist/components/commonComponents/Modal/index.js +19 -1
- package/dist/components/commonComponents/Modal/index.style.d.ts +33 -2
- package/dist/components/commonComponents/Modal/index.style.js +24 -10
- package/dist/components/commonComponents/Pagination/demo/demo1.js +3 -1
- package/dist/components/commonComponents/Pagination/demo/demo2.js +2 -1
- package/dist/components/commonComponents/Slider/demo/demo1.js +1 -1
- package/dist/components/commonComponents/Slider/demo/demo2.js +1 -1
- package/dist/components/commonComponents/Slider/demo/demo3.d.ts +3 -0
- package/dist/components/commonComponents/Slider/demo/demo3.js +44 -0
- package/dist/components/commonComponents/Slider/index.d.ts +11 -0
- package/dist/components/commonComponents/Slider/index.js +27 -0
- package/dist/components/commonComponents/Slider/index.style.d.ts +7 -0
- package/dist/components/commonComponents/Slider/index.style.js +22 -0
- package/dist/components/commonComponents/Slider/slider.input.d.ts +18 -0
- package/dist/components/commonComponents/Slider/slider.input.js +73 -0
- package/dist/components/commonComponents/Tag/demo1.d.ts +2 -0
- package/dist/components/commonComponents/Tag/{demo.js → demo1.js} +3 -0
- package/dist/components/commonComponents/Tag/demo2.d.ts +2 -0
- package/dist/components/commonComponents/Tag/demo2.js +40 -0
- package/dist/components/commonComponents/Tag/index.style.d.ts +11 -0
- package/dist/components/commonComponents/Tag/index.style.js +5 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -3
- package/dist/libs/env/index.d.ts +1 -5
- package/dist/libs/env/index.js +11 -2
- package/dist/libs/region/index.d.ts +1 -1
- package/package.json +13 -7
- /package/dist/components/commonComponents/Message/{demo.d.ts → demo/demo1.d.ts} +0 -0
- /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
|
|
5
|
+
<h1>@agentscope-ai/design</h1>
|
|
6
6
|
</div>
|
|
7
|
-
🎨
|
|
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
|
-
💬
|
|
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
|
|
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
|
}
|
|
@@ -130,9 +130,13 @@
|
|
|
130
130
|
},
|
|
131
131
|
"Table": {
|
|
132
132
|
"cellPaddingInline": 20
|
|
133
|
+
},
|
|
134
|
+
"Form": {
|
|
135
|
+
"itemMarginBottom": 16
|
|
133
136
|
}
|
|
134
137
|
},
|
|
135
138
|
"extraCssVariables": {
|
|
139
|
+
"border-radius-full": 999,
|
|
136
140
|
"color-text-white": "#fff",
|
|
137
141
|
"color-fill-disable": "#8D8C98",
|
|
138
142
|
"color-purple": "#5551CC",
|
|
@@ -157,7 +161,8 @@
|
|
|
157
161
|
"color-mauve-hover": "#BBB8CA",
|
|
158
162
|
"color-mauve-bg": "rgba(239, 240, 243, 0.2)",
|
|
159
163
|
"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);"
|
|
164
|
+
"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);",
|
|
165
|
+
"box-shadow-input": "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)"
|
|
161
166
|
}
|
|
162
167
|
},
|
|
163
168
|
"checkbox": {
|
|
@@ -127,9 +127,13 @@
|
|
|
127
127
|
},
|
|
128
128
|
"Table": {
|
|
129
129
|
"cellPaddingInline": 20
|
|
130
|
+
},
|
|
131
|
+
"Form": {
|
|
132
|
+
"itemMarginBottom": 16
|
|
130
133
|
}
|
|
131
134
|
},
|
|
132
135
|
"extraCssVariables": {
|
|
136
|
+
"border-radius-full": 999,
|
|
133
137
|
"color-text-white": "#fff",
|
|
134
138
|
"color-fill-disable": "#DBDAE7",
|
|
135
139
|
"color-purple": "#615CED",
|
|
@@ -154,7 +158,8 @@
|
|
|
154
158
|
"color-mauve-hover": "#C0BFC8",
|
|
155
159
|
"color-mauve-bg": "rgba(239, 240, 243, 0.8)",
|
|
156
160
|
"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)"
|
|
161
|
+
"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)",
|
|
162
|
+
"box-shadow-input": "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)"
|
|
158
163
|
}
|
|
159
164
|
},
|
|
160
165
|
"checkbox": {
|
|
@@ -129,9 +129,13 @@
|
|
|
129
129
|
},
|
|
130
130
|
"Table": {
|
|
131
131
|
"cellPaddingInline": 20
|
|
132
|
+
},
|
|
133
|
+
"Form": {
|
|
134
|
+
"itemMarginBottom": 16
|
|
132
135
|
}
|
|
133
136
|
},
|
|
134
137
|
"extraCssVariables": {
|
|
138
|
+
"border-radius-full": 999,
|
|
135
139
|
"color-text-white": "#fff",
|
|
136
140
|
"color-fill-disable": "rgba(137, 137, 137, 1)",
|
|
137
141
|
"color-purple": "#5551CC",
|
|
@@ -156,7 +160,8 @@
|
|
|
156
160
|
"color-mauve-hover": "#BBB8CA",
|
|
157
161
|
"color-mauve-bg": "rgba(239, 240, 243, 0.2)",
|
|
158
162
|
"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)"
|
|
163
|
+
"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)",
|
|
164
|
+
"box-shadow-input": "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)"
|
|
160
165
|
}
|
|
161
166
|
},
|
|
162
167
|
"checkbox": {
|
|
@@ -127,9 +127,13 @@
|
|
|
127
127
|
},
|
|
128
128
|
"Table": {
|
|
129
129
|
"cellPaddingInline": 20
|
|
130
|
+
},
|
|
131
|
+
"Form": {
|
|
132
|
+
"itemMarginBottom": 16
|
|
130
133
|
}
|
|
131
134
|
},
|
|
132
135
|
"extraCssVariables": {
|
|
136
|
+
"border-radius-full": 999,
|
|
133
137
|
"color-text-white": "#fff",
|
|
134
138
|
"color-fill-disable": "#E8E8EB",
|
|
135
139
|
"color-purple": "#615CED",
|
|
@@ -154,7 +158,8 @@
|
|
|
154
158
|
"color-mauve-hover": "#C0BFC8",
|
|
155
159
|
"color-mauve-bg": "rgba(239, 240, 243, 0.8)",
|
|
156
160
|
"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)"
|
|
161
|
+
"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)",
|
|
162
|
+
"box-shadow-input": "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)"
|
|
158
163
|
}
|
|
159
164
|
},
|
|
160
165
|
"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
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var _excluded = ["css"];
|
|
2
|
+
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); }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
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; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
|
+
import createStyle from "../../../libs/createStyle";
|
|
9
|
+
export function getIndexStyleData(params) {
|
|
10
|
+
var sparkPrefix = params.sparkPrefix,
|
|
11
|
+
antPrefix = params.antPrefix;
|
|
12
|
+
return _defineProperty({}, ".".concat(sparkPrefix, "-alert-dialog"), _defineProperty(_defineProperty(_defineProperty({}, ".".concat(antPrefix, "-modal-body"), {
|
|
13
|
+
padding: '0 0 12px 32px',
|
|
14
|
+
fontSize: '14px',
|
|
15
|
+
color: "var(--".concat(antPrefix, "-color-text-secondary)")
|
|
16
|
+
}), ".".concat(antPrefix, "-modal-confirm-content"), {
|
|
17
|
+
padding: '0 0 12px 32px',
|
|
18
|
+
fontSize: '14px',
|
|
19
|
+
color: "var(--".concat(antPrefix, "-color-text-secondary)")
|
|
20
|
+
}), ".".concat(antPrefix, "-modal-confirm-paragraph"), {
|
|
21
|
+
maxWidth: '100%'
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
var useIndexStyle = createStyle(function (_ref2) {
|
|
25
|
+
var css = _ref2.css,
|
|
26
|
+
params = _objectWithoutProperties(_ref2, _excluded);
|
|
27
|
+
var result = css(getIndexStyleData(params));
|
|
28
|
+
return result;
|
|
29
|
+
});
|
|
30
|
+
export default useIndexStyle;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Breadcrumb } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
var App = function App() {
|
|
5
|
+
return /*#__PURE__*/_jsx(Breadcrumb, {
|
|
6
|
+
items: [{
|
|
7
|
+
title: 'Home'
|
|
8
|
+
}, {
|
|
9
|
+
title: /*#__PURE__*/_jsx("a", {
|
|
10
|
+
href: "",
|
|
11
|
+
children: "Application Center"
|
|
12
|
+
})
|
|
13
|
+
}, {
|
|
14
|
+
title: /*#__PURE__*/_jsx("a", {
|
|
15
|
+
href: "",
|
|
16
|
+
children: "Application List"
|
|
17
|
+
})
|
|
18
|
+
}, {
|
|
19
|
+
title: 'An Application'
|
|
20
|
+
}]
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
export default App;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ButtonProps } from 'antd';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
|
+
import { SparkIconFontProps } from '../IconFont';
|
|
3
4
|
export interface SparkButtonProps extends ButtonProps {
|
|
4
5
|
/** 尺寸
|
|
5
6
|
* @default
|
|
@@ -13,6 +14,8 @@ export interface SparkButtonProps extends ButtonProps {
|
|
|
13
14
|
tooltipContent?: string | ReactNode;
|
|
14
15
|
/** 百炼图标iconfont的key,依赖百炼的iconFont,例如bl-icon-add */
|
|
15
16
|
iconType?: string;
|
|
17
|
+
/** 图标大小 */
|
|
18
|
+
iconSize?: SparkIconFontProps['size'];
|
|
16
19
|
}
|
|
17
20
|
declare const Button: React.ForwardRefExoticComponent<SparkButtonProps & React.RefAttributes<any>>;
|
|
18
21
|
export default Button;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
var _excluded = ["iconSize"];
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
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); }
|
|
7
|
-
|
|
7
|
+
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); }
|
|
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
|
+
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
|
+
import { Button as AntdButton, ConfigProvider, theme } from 'antd';
|
|
8
11
|
import React, { forwardRef } from 'react';
|
|
9
12
|
import IconFont from "../IconFont";
|
|
10
13
|
import Popover from "../Popover";
|
|
@@ -12,65 +15,75 @@ import Popover from "../Popover";
|
|
|
12
15
|
// @ts-ignore
|
|
13
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
17
|
var Button = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
18
|
+
var token = theme.useToken();
|
|
19
|
+
var iconSize = props.iconSize,
|
|
20
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
15
21
|
var buttonType = React.useMemo(function () {
|
|
16
22
|
// @ts-ignore
|
|
17
|
-
if (
|
|
23
|
+
if (restProps.type === 'primaryLess') return 'primary';
|
|
18
24
|
// @ts-ignore
|
|
19
|
-
if (
|
|
20
|
-
return
|
|
21
|
-
}, [
|
|
25
|
+
if (restProps.type === 'textCompact') return 'link';
|
|
26
|
+
return restProps.type;
|
|
27
|
+
}, [restProps.type]);
|
|
22
28
|
var icon = React.useMemo(function () {
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
if (restProps.loading && _typeof(restProps.loading) === 'object' && restProps.loading.icon) {
|
|
30
|
+
var _restProps$loading;
|
|
31
|
+
return (_restProps$loading = restProps.loading) === null || _restProps$loading === void 0 ? void 0 : _restProps$loading.icon;
|
|
32
|
+
}
|
|
33
|
+
if (restProps.iconType) return /*#__PURE__*/_jsx(IconFont, {
|
|
34
|
+
type: restProps.iconType,
|
|
35
|
+
size: iconSize !== null && iconSize !== void 0 ? iconSize : restProps.size
|
|
26
36
|
}); // 注意 size 也需要传入下去
|
|
27
|
-
if (
|
|
28
|
-
size:
|
|
37
|
+
if (restProps.icon) return /*#__PURE__*/React.cloneElement(restProps.icon, {
|
|
38
|
+
size: iconSize !== null && iconSize !== void 0 ? iconSize : restProps.size // 注意 size 也需要传入下去
|
|
29
39
|
});
|
|
30
40
|
return null;
|
|
31
|
-
}, [
|
|
32
|
-
var button = /*#__PURE__*/_jsx(AntdButton, _objectSpread(_objectSpread({},
|
|
41
|
+
}, [restProps.iconType, restProps.icon]);
|
|
42
|
+
var button = /*#__PURE__*/_jsx(AntdButton, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
33
43
|
ref: ref,
|
|
34
44
|
type: buttonType,
|
|
35
45
|
icon: icon,
|
|
36
46
|
style: _objectSpread({
|
|
47
|
+
fontWeight: 500,
|
|
37
48
|
lineHeight: 1
|
|
38
|
-
},
|
|
49
|
+
}, restProps.style)
|
|
39
50
|
}));
|
|
40
51
|
|
|
41
52
|
// @ts-ignore
|
|
42
|
-
if (
|
|
53
|
+
if (restProps.type === 'primaryLess') {
|
|
43
54
|
return /*#__PURE__*/_jsx(ConfigProvider, {
|
|
44
55
|
theme: {
|
|
45
56
|
token: {
|
|
46
|
-
colorPrimary:
|
|
47
|
-
colorPrimaryHover:
|
|
57
|
+
colorPrimary: token.token.colorText,
|
|
58
|
+
colorPrimaryHover: token.token.colorTextSecondary,
|
|
59
|
+
colorPrimaryActive: token.token.colorTextBase
|
|
48
60
|
}
|
|
49
61
|
},
|
|
50
62
|
children: /*#__PURE__*/_jsx(Popover, {
|
|
51
|
-
content:
|
|
63
|
+
content: restProps.tooltipContent,
|
|
52
64
|
children: button
|
|
53
65
|
})
|
|
54
66
|
});
|
|
55
67
|
// @ts-ignore
|
|
56
|
-
} else if (
|
|
68
|
+
} else if (restProps.type === 'textCompact') {
|
|
57
69
|
return /*#__PURE__*/_jsx(Popover, {
|
|
58
|
-
content:
|
|
59
|
-
children: /*#__PURE__*/_jsx(AntdButton, _objectSpread(_objectSpread({},
|
|
70
|
+
content: restProps.tooltipContent,
|
|
71
|
+
children: /*#__PURE__*/_jsx(AntdButton, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
60
72
|
ref: ref,
|
|
61
73
|
icon: icon,
|
|
62
74
|
color: "default",
|
|
63
75
|
variant: "link",
|
|
64
76
|
style: _objectSpread({
|
|
77
|
+
fontWeight: 500,
|
|
65
78
|
paddingLeft: 0,
|
|
66
79
|
paddingRight: 0,
|
|
67
80
|
lineHeight: 1
|
|
68
|
-
},
|
|
81
|
+
}, restProps.style)
|
|
69
82
|
}))
|
|
70
83
|
});
|
|
71
84
|
} else {
|
|
72
85
|
return /*#__PURE__*/_jsx(Popover, {
|
|
73
|
-
content:
|
|
86
|
+
content: restProps.tooltipContent,
|
|
74
87
|
children: button
|
|
75
88
|
});
|
|
76
89
|
}
|
|
@@ -8,6 +8,7 @@ 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 { getCommonConfig } from "../../../config";
|
|
11
|
+
import { IconFont } from "../../..";
|
|
11
12
|
import { Drawer } from 'antd';
|
|
12
13
|
import classNames from 'classnames';
|
|
13
14
|
import useIndexStyle from "./index.style";
|
|
@@ -22,6 +23,12 @@ export default (function (props) {
|
|
|
22
23
|
var sparkPrefix = commonConfig.sparkPrefix;
|
|
23
24
|
var variables = commonConfig.variables;
|
|
24
25
|
return /*#__PURE__*/_jsx(Drawer, _objectSpread(_objectSpread({
|
|
26
|
+
closeIcon: /*#__PURE__*/_jsx(IconFont, {
|
|
27
|
+
type: "spark-false-line",
|
|
28
|
+
style: {
|
|
29
|
+
fontSize: 24
|
|
30
|
+
}
|
|
31
|
+
}),
|
|
25
32
|
className: classNames("".concat(sparkPrefix, "-drawer"), className),
|
|
26
33
|
style: _objectSpread(_objectSpread({}, style), variables)
|
|
27
34
|
}, restProps), {}, {
|
|
@@ -7,6 +7,15 @@ export declare function getIndexStyleData(params: any): {
|
|
|
7
7
|
fontWeight: string;
|
|
8
8
|
lineHeight: string;
|
|
9
9
|
color: string;
|
|
10
|
+
width?: undefined;
|
|
11
|
+
height?: undefined;
|
|
12
|
+
} | {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
fontSize?: undefined;
|
|
16
|
+
fontWeight?: undefined;
|
|
17
|
+
lineHeight?: undefined;
|
|
18
|
+
color?: undefined;
|
|
10
19
|
};
|
|
11
20
|
display: string;
|
|
12
21
|
flexDirection: string;
|