@agentscope-ai/design 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/antd/styles/alert.style.d.ts +2 -10
- package/lib/antd/styles/alert.style.js +11 -12
- package/lib/antd/styles/breadcrumb.style.d.ts +2 -18
- package/lib/antd/styles/breadcrumb.style.js +13 -15
- package/lib/antd/styles/button.style.d.ts +2 -80
- package/lib/antd/styles/button.style.js +63 -47
- package/lib/antd/styles/dropdown.style.d.ts +2 -15
- package/lib/antd/styles/dropdown.style.js +27 -16
- package/lib/antd/styles/floatButton.style.d.ts +2 -8
- package/lib/antd/styles/floatButton.style.js +13 -12
- package/lib/antd/styles/index.style.d.ts +4 -18
- package/lib/antd/styles/index.style.js +52 -53
- package/lib/antd/styles/inputNumber.style.d.ts +2 -18
- package/lib/antd/styles/inputNumber.style.js +23 -17
- package/lib/antd/styles/message.style.d.ts +2 -5
- package/lib/antd/styles/message.style.js +9 -10
- package/lib/antd/styles/notification.style.d.ts +2 -46
- package/lib/antd/styles/notification.style.js +31 -29
- package/lib/antd/styles/popover.style.d.ts +2 -13
- package/lib/antd/styles/popover.style.js +15 -14
- package/lib/antd/styles/radio.style.d.ts +2 -24
- package/lib/antd/styles/radio.style.js +29 -18
- package/lib/antd/styles/segment.style.d.ts +2 -7
- package/lib/antd/styles/segment.style.js +11 -12
- package/lib/antd/styles/select.style.d.ts +2 -31
- package/lib/antd/styles/select.style.js +51 -28
- package/lib/antd/styles/slider.style.d.ts +2 -22
- package/lib/antd/styles/slider.style.js +19 -21
- package/lib/antd/styles/table.style.d.ts +2 -5
- package/lib/antd/styles/table.style.js +7 -10
- package/lib/antd/styles/tooltip.style.d.ts +2 -8
- package/lib/antd/styles/tooltip.style.js +13 -11
- package/lib/antd/themes/generateThemeByToken.js +8 -2
- package/lib/components/commonComponents/AlertDialog/demo/demo1.js +13 -79
- package/lib/components/commonComponents/AlertDialog/demo/demo2.js +44 -64
- package/lib/components/commonComponents/AlertDialog/index.d.ts +14 -1
- package/lib/components/commonComponents/AlertDialog/index.js +25 -17
- package/lib/components/commonComponents/AlertDialog/index.style.d.ts +1 -17
- package/lib/components/commonComponents/AlertDialog/index.style.js +16 -30
- package/lib/components/commonComponents/Anchor/demo/demo1.d.ts +0 -4
- package/lib/components/commonComponents/Anchor/demo/demo1.js +3 -4
- package/lib/components/commonComponents/Anchor/demo/demo2.d.ts +0 -4
- package/lib/components/commonComponents/Anchor/demo/demo2.js +3 -5
- package/lib/components/commonComponents/Anchor/index.js +7 -3
- package/lib/components/commonComponents/Anchor/index.style.d.ts +1 -14
- package/lib/components/commonComponents/Anchor/index.style.js +18 -23
- package/lib/components/commonComponents/Avatar/index.js +11 -7
- package/lib/components/commonComponents/Avatar/index.style.d.ts +1 -7
- package/lib/components/commonComponents/Avatar/index.style.js +6 -21
- package/lib/components/commonComponents/Breadcrumb/index.js +9 -6
- package/lib/components/commonComponents/Breadcrumb/index.style.d.ts +1 -117
- package/lib/components/commonComponents/Breadcrumb/index.style.js +32 -61
- package/lib/components/commonComponents/Button/index.d.ts +1 -1
- package/lib/components/commonComponents/Button/index.js +7 -7
- package/lib/components/commonComponents/Card/index.js +23 -20
- package/lib/components/commonComponents/Card/index.style.d.ts +1 -71
- package/lib/components/commonComponents/Card/index.style.js +24 -46
- package/lib/components/commonComponents/Checkbox/index.js +13 -10
- package/lib/components/commonComponents/Checkbox/index.style.d.ts +1 -34
- package/lib/components/commonComponents/Checkbox/index.style.js +50 -38
- package/lib/components/commonComponents/CodeBlock/index.js +15 -13
- package/lib/components/commonComponents/CodeBlock/index.style.d.ts +1 -354
- package/lib/components/commonComponents/CodeBlock/index.style.js +26 -72
- package/lib/components/commonComponents/Collapse/index.js +7 -3
- package/lib/components/commonComponents/Collapse/index.style.d.ts +1 -57
- package/lib/components/commonComponents/Collapse/index.style.js +34 -47
- package/lib/components/commonComponents/CollapsePanel/index.d.ts +10 -0
- package/lib/components/commonComponents/CollapsePanel/index.js +56 -44
- package/lib/components/commonComponents/CollapsePanel/index.style.d.ts +1 -287
- package/lib/components/commonComponents/CollapsePanel/index.style.js +42 -97
- package/lib/components/commonComponents/ConfigProvider/index.js +20 -14
- package/lib/components/commonComponents/DatePicker/index.js +45 -39
- package/lib/components/commonComponents/DatePicker/index.style.d.ts +1 -102
- package/lib/components/commonComponents/DatePicker/index.style.js +66 -61
- package/lib/components/commonComponents/Descriptions/index.js +14 -10
- package/lib/components/commonComponents/Descriptions/index.style.d.ts +1 -17
- package/lib/components/commonComponents/Descriptions/index.style.js +32 -29
- package/lib/components/commonComponents/Drawer/Confirm.d.ts +1 -1
- package/lib/components/commonComponents/Drawer/Confirm.js +26 -24
- package/lib/components/commonComponents/Drawer/index.js +15 -11
- package/lib/components/commonComponents/Drawer/index.style.d.ts +1 -84
- package/lib/components/commonComponents/Drawer/index.style.js +44 -54
- package/lib/components/commonComponents/Dropdown/index.d.ts +1 -2
- package/lib/components/commonComponents/Dropdown/index.js +15 -12
- package/lib/components/commonComponents/Dropdown/index.style.d.ts +1 -78
- package/lib/components/commonComponents/Dropdown/index.style.js +48 -40
- package/lib/components/commonComponents/EllipsisTip/index.js +14 -10
- package/lib/components/commonComponents/EllipsisTip/index.style.d.ts +1 -10
- package/lib/components/commonComponents/EllipsisTip/index.style.js +6 -24
- package/lib/components/commonComponents/Empty/index.js +46 -44
- package/lib/components/commonComponents/Empty/index.style.d.ts +1 -113
- package/lib/components/commonComponents/Empty/index.style.js +22 -51
- package/lib/components/commonComponents/FileIcon/index.js +27 -24
- package/lib/components/commonComponents/FileIcon/index.style.d.ts +1 -61
- package/lib/components/commonComponents/FileIcon/index.style.js +20 -42
- package/lib/components/commonComponents/FloatButton/demo/demo1.js +1 -1
- package/lib/components/commonComponents/FloatButton/demo/demo2.js +1 -1
- package/lib/components/commonComponents/Form/index.js +6 -5
- package/lib/components/commonComponents/Form/index.style.d.ts +1 -53
- package/lib/components/commonComponents/Form/index.style.js +26 -38
- package/lib/components/commonComponents/HelpIcon/index.js +25 -20
- package/lib/components/commonComponents/HelpIcon/index.style.d.ts +1 -16
- package/lib/components/commonComponents/HelpIcon/index.style.js +16 -29
- package/lib/components/commonComponents/IconButton/index.js +15 -11
- package/lib/components/commonComponents/IconButton/index.style.d.ts +1 -11
- package/lib/components/commonComponents/IconButton/index.style.js +10 -24
- package/lib/components/commonComponents/IconFont/index.d.ts +1 -2
- package/lib/components/commonComponents/IconFont/index.js +14 -9
- package/lib/components/commonComponents/IconFont/index.style.d.ts +1 -67
- package/lib/components/commonComponents/IconFont/index.style.js +14 -44
- package/lib/components/commonComponents/Image/index.js +8 -5
- package/lib/components/commonComponents/Image/index.style.d.ts +1 -22
- package/lib/components/commonComponents/Image/index.style.js +16 -30
- package/lib/components/commonComponents/Input/index.js +17 -11
- package/lib/components/commonComponents/Input/index.style.d.ts +1 -70
- package/lib/components/commonComponents/Input/index.style.js +46 -42
- package/lib/components/commonComponents/Modal/index.js +18 -16
- package/lib/components/commonComponents/Modal/index.style.d.ts +1 -111
- package/lib/components/commonComponents/Modal/index.style.js +54 -72
- package/lib/components/commonComponents/Pagination/index.d.ts +1 -1
- package/lib/components/commonComponents/Pagination/index.js +96 -36
- package/lib/components/commonComponents/Pagination/index.style.d.ts +1 -49
- package/lib/components/commonComponents/Pagination/index.style.js +26 -42
- package/lib/components/commonComponents/Popconfirm/demo/demo1.js +13 -0
- package/lib/components/commonComponents/Popconfirm/demo/demo2.d.ts +3 -0
- package/lib/components/commonComponents/Popconfirm/demo/demo2.js +49 -0
- package/lib/components/commonComponents/Popconfirm/index.d.ts +9 -2
- package/lib/components/commonComponents/Popconfirm/index.js +50 -8
- package/lib/components/commonComponents/PromptsEditor/demo/basic.js +5 -4
- package/lib/components/commonComponents/PromptsEditor/index.d.ts +8 -2
- package/lib/components/commonComponents/PromptsEditor/index.js +17 -11
- package/lib/components/commonComponents/RadioButton/index.js +9 -10
- package/lib/components/commonComponents/RadioButton/index.style.d.ts +1 -72
- package/lib/components/commonComponents/RadioButton/index.style.js +52 -63
- package/lib/components/commonComponents/Result/index.style.d.ts +1 -3
- package/lib/components/commonComponents/Result/index.style.js +4 -16
- package/lib/components/commonComponents/Select/demo/demo2.js +0 -1
- package/lib/components/commonComponents/SlateEditor/elements/Var.js +11 -8
- package/lib/components/commonComponents/SlateEditor/elements/index.style.d.ts +1 -14
- package/lib/components/commonComponents/SlateEditor/elements/index.style.js +4 -21
- package/lib/components/commonComponents/SlateEditor/index.js +34 -31
- package/lib/components/commonComponents/SlateEditor/index.style.d.ts +1 -28
- package/lib/components/commonComponents/SlateEditor/index.style.js +4 -36
- package/lib/components/commonComponents/Slider/{slider.input.d.ts → Input/index.d.ts} +1 -1
- package/lib/components/commonComponents/Slider/Input/index.js +93 -0
- package/lib/components/commonComponents/Slider/Input/index.style.d.ts +1 -0
- package/lib/components/commonComponents/Slider/Input/index.style.js +22 -0
- package/lib/components/commonComponents/Slider/demo/demo4.d.ts +3 -0
- package/lib/components/commonComponents/Slider/demo/demo4.js +33 -0
- package/lib/components/commonComponents/Slider/demo/demo5.d.ts +3 -0
- package/lib/components/commonComponents/Slider/demo/demo5.js +34 -0
- package/lib/components/commonComponents/Slider/index.d.ts +2 -2
- package/lib/components/commonComponents/Slider/index.js +11 -7
- package/lib/components/commonComponents/Slider/index.style.d.ts +1 -7
- package/lib/components/commonComponents/Slider/index.style.js +10 -22
- package/lib/components/commonComponents/SliderSelector/index.js +38 -35
- package/lib/components/commonComponents/SliderSelector/index.style.d.ts +1 -38
- package/lib/components/commonComponents/SliderSelector/index.style.js +20 -37
- package/lib/components/commonComponents/Spinner/index.d.ts +4 -4
- package/lib/components/commonComponents/Spinner/index.js +28 -24
- package/lib/components/commonComponents/Spinner/index.style.d.ts +1 -79
- package/lib/components/commonComponents/Spinner/index.style.js +30 -61
- package/lib/components/commonComponents/Statistic/index.js +7 -3
- package/lib/components/commonComponents/Statistic/index.style.d.ts +1 -15
- package/lib/components/commonComponents/Statistic/index.style.js +14 -26
- package/lib/components/commonComponents/Steps/index.js +10 -6
- package/lib/components/commonComponents/Steps/index.style.d.ts +1 -162
- package/lib/components/commonComponents/Steps/index.style.js +68 -78
- package/lib/components/commonComponents/Switch/index.js +14 -11
- package/lib/components/commonComponents/Switch/index.style.d.ts +1 -25
- package/lib/components/commonComponents/Switch/index.style.js +22 -33
- package/lib/components/commonComponents/Table/demo/demo1.js +1 -9
- package/lib/components/commonComponents/Table/demo/demo2.js +1 -9
- package/lib/components/commonComponents/Table/demo/demo3.js +1 -9
- package/lib/components/commonComponents/Table/demo/demo4.js +1 -9
- package/lib/components/commonComponents/Table/index.d.ts +1 -1
- package/lib/components/commonComponents/Table/index.js +11 -7
- package/lib/components/commonComponents/Table/index.style.d.ts +1 -52
- package/lib/components/commonComponents/Table/index.style.js +34 -32
- package/lib/components/commonComponents/Tabs/index.js +37 -29
- package/lib/components/commonComponents/Tabs/index.style.d.ts +1 -55
- package/lib/components/commonComponents/Tabs/index.style.js +38 -44
- package/lib/components/commonComponents/Tag/index.js +13 -9
- package/lib/components/commonComponents/Tag/index.style.d.ts +1 -56
- package/lib/components/commonComponents/Tag/index.style.js +54 -58
- package/lib/components/commonComponents/TimePicker/index.js +36 -30
- package/lib/components/commonComponents/TimePicker/index.style.d.ts +1 -71
- package/lib/components/commonComponents/TimePicker/index.style.js +54 -50
- package/lib/components/commonComponents/Tooltip/index.js +14 -10
- package/lib/components/commonComponents/Tooltip/index.style.d.ts +1 -24
- package/lib/components/commonComponents/Tooltip/index.style.js +26 -32
- package/lib/components/commonComponents/Upload/index.js +15 -9
- package/lib/components/commonComponents/Upload/index.style.d.ts +1 -125
- package/lib/components/commonComponents/Upload/index.style.js +80 -90
- package/lib/components/commonComponents/Video/Control.d.ts +19 -0
- package/lib/components/commonComponents/Video/Control.js +104 -0
- package/lib/components/commonComponents/Video/demo/demo1.d.ts +2 -0
- package/lib/components/commonComponents/Video/demo/demo1.js +12 -0
- package/lib/components/commonComponents/Video/index.d.ts +18 -0
- package/lib/components/commonComponents/Video/index.js +222 -0
- package/lib/components/commonComponents/Video/index.style.d.ts +1 -0
- package/lib/components/commonComponents/Video/index.style.js +40 -0
- package/lib/i18n/strings/en-US.json +3 -1
- package/lib/i18n/strings/zh-CN.json +3 -1
- package/lib/index.d.ts +5 -4
- package/lib/index.js +3 -2
- package/lib/libs/createStyle/index.d.ts +7 -1
- package/lib/libs/createStyle/index.js +24 -72
- package/lib/libs/env/index.js +1 -1
- package/lib/libs/generateCssVars/index.js +1 -1
- package/package.json +3 -3
- package/lib/components/commonComponents/Popconfirm/demo/demo.js +0 -155
- package/lib/components/commonComponents/Slider/slider.input.js +0 -76
- package/lib/components/commonComponents/spark.style.d.ts +0 -45
- package/lib/components/commonComponents/spark.style.js +0 -62
- package/llms/all.llms.txt +0 -4235
- package/llms/components/commonComponents/Alert/index.zh-CN.llms.txt +0 -74
- package/llms/components/commonComponents/Anchor/index.zh-CN.llms.txt +0 -71
- package/llms/components/commonComponents/Avatar/index.zh-CN.llms.txt +0 -61
- package/llms/components/commonComponents/Breadcrumb/index.zh-CN.llms.txt +0 -89
- package/llms/components/commonComponents/Button/index.zh-CN.llms.txt +0 -99
- package/llms/components/commonComponents/Card/index.zh-CN.llms.txt +0 -79
- package/llms/components/commonComponents/Checkbox/index.zh-CN.llms.txt +0 -88
- package/llms/components/commonComponents/CodeBlock/index.zh-CN.llms.txt +0 -34
- package/llms/components/commonComponents/Collapse/index.zh-CN.llms.txt +0 -76
- package/llms/components/commonComponents/CollapsePanel/index.zh-CN.llms.txt +0 -75
- package/llms/components/commonComponents/DatePicker/index.zh-CN.llms.txt +0 -227
- package/llms/components/commonComponents/Descriptions/index.zh-CN.llms.txt +0 -60
- package/llms/components/commonComponents/Drawer/index.zh-CN.llms.txt +0 -87
- package/llms/components/commonComponents/Dropdown/index.zh-CN.llms.txt +0 -87
- package/llms/components/commonComponents/Empty/index.zh-CN.llms.txt +0 -100
- package/llms/components/commonComponents/FloatButton/index.zh-CN.llms.txt +0 -70
- package/llms/components/commonComponents/Form/index.zh-CN.llms.txt +0 -383
- package/llms/components/commonComponents/IconButton/index.zh-CN.llms.txt +0 -68
- package/llms/components/commonComponents/Image/index.zh-CN.llms.txt +0 -118
- package/llms/components/commonComponents/Input/index.zh-CN.llms.txt +0 -168
- package/llms/components/commonComponents/InputNumber/index.zh-CN.llms.txt +0 -66
- package/llms/components/commonComponents/Message/index.zh-CN.llms.txt +0 -114
- package/llms/components/commonComponents/Modal/index.zh-CN.llms.txt +0 -154
- package/llms/components/commonComponents/Notification/index.zh-CN.llms.txt +0 -118
- package/llms/components/commonComponents/Pagination/index.zh-CN.llms.txt +0 -62
- package/llms/components/commonComponents/Popover/index.zh-CN.llms.txt +0 -56
- package/llms/components/commonComponents/Progress/index.zh-CN.llms.txt +0 -64
- package/llms/components/commonComponents/Radio/index.zh-CN.llms.txt +0 -75
- package/llms/components/commonComponents/RadioButton/index.zh-CN.llms.txt +0 -94
- package/llms/components/commonComponents/Result/index.zh-CN.llms.txt +0 -63
- package/llms/components/commonComponents/Select/index.zh-CN.llms.txt +0 -120
- package/llms/components/commonComponents/Skeleton/index.zh-CN.llms.txt +0 -71
- package/llms/components/commonComponents/Slider/index.zh-CN.llms.txt +0 -83
- package/llms/components/commonComponents/Spinner/index.zh-CN.llms.txt +0 -38
- package/llms/components/commonComponents/Statistic/index.zh-CN.llms.txt +0 -77
- package/llms/components/commonComponents/Steps/index.zh-CN.llms.txt +0 -82
- package/llms/components/commonComponents/Switch/index.zh-CN.llms.txt +0 -58
- package/llms/components/commonComponents/Table/index.zh-CN.llms.txt +0 -228
- package/llms/components/commonComponents/Tabs/index.zh-CN.llms.txt +0 -95
- package/llms/components/commonComponents/Tag/index.zh-CN.llms.txt +0 -57
- package/llms/components/commonComponents/TimePicker/index.zh-CN.llms.txt +0 -104
- package/llms/components/commonComponents/Tooltip/index.zh-CN.llms.txt +0 -63
- package/llms/components/commonComponents/Upload/index.zh-CN.llms.txt +0 -105
- package/llms/index.llms.txt +0 -45
- /package/lib/components/commonComponents/Popconfirm/demo/{demo.d.ts → demo1.d.ts} +0 -0
|
@@ -1,72 +1,54 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
color: "var(--".concat(antPrefix, "-color-text)")
|
|
56
|
-
}), "&:hover", {
|
|
57
|
-
background: 'none'
|
|
58
|
-
})))), ".".concat(sparkPrefix, "-show-divider"), _defineProperty({}, ".".concat(antPrefix, "-modal-content"), _defineProperty(_defineProperty({}, ".".concat(antPrefix, "-modal-header"), {
|
|
59
|
-
borderBottom: "1px solid var(--".concat(antPrefix, "-color-border-secondary)")
|
|
60
|
-
}), ".".concat(antPrefix, "-modal-footer"), {
|
|
61
|
-
borderTop: "1px solid var(--".concat(antPrefix, "-color-border-secondary)")
|
|
62
|
-
})));
|
|
63
|
-
}
|
|
64
|
-
var useIndexStyle = function useIndexStyle() {
|
|
65
|
-
createStyle(function (_ref2) {
|
|
66
|
-
var css = _ref2.css,
|
|
67
|
-
params = _objectWithoutProperties(_ref2, _excluded);
|
|
68
|
-
var result = css(getIndexStyleData(params));
|
|
69
|
-
return result;
|
|
70
|
-
})();
|
|
71
|
-
};
|
|
72
|
-
export default useIndexStyle;
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
|
+
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-modal {\n .", "-modal-title {\n min-height: 24px;\n }\n \n .", "-modal-content {\n padding: 0;\n border: 1px solid var(--", "-color-border-secondary);\n \n .", "-modal-header {\n padding: 18px 20px;\n margin-bottom: 0;\n \n .", "-modal-title {\n line-height: 28px;\n \n .", "-modal-title-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n \n .", "-modal-title {\n flex: 1;\n }\n \n .", "-modal-title-close {\n cursor: pointer;\n }\n }\n }\n }\n \n .", "-modal-body {\n padding: 20px;\n color: var(--", "-color-text-secondary);\n }\n \n .", "-modal-footer {\n padding: 16px 20px;\n margin-top: 0;\n \n .", "-modal-footer-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n \n .", "-modal-footer-info {\n font-size: 14px;\n font-weight: normal;\n line-height: 24px;\n color: var(--", "-color-text-tertiary);\n }\n \n .", "-modal-footer-origin-node {\n display: flex;\n gap: 12px;\n }\n }\n }\n \n .", "-modal-close {\n width: 32px;\n height: 32px;\n top: 16px;\n right: 16px;\n \n .", "-modal-close-icon {\n color: var(--", "-color-text);\n }\n \n &:hover {\n background: none;\n }\n }\n }\n}\n\n.", "-show-divider {\n .", "-modal-content {\n .", "-modal-header {\n border-bottom: 1px solid var(--", "-color-border-secondary);\n }\n \n .", "-modal-footer {\n border-top: 1px solid var(--", "-color-border-secondary);\n }\n }\n}\n"])), function (p) {
|
|
5
|
+
return p.sparkPrefix;
|
|
6
|
+
}, function (p) {
|
|
7
|
+
return p.antPrefix;
|
|
8
|
+
}, function (p) {
|
|
9
|
+
return p.antPrefix;
|
|
10
|
+
}, function (p) {
|
|
11
|
+
return p.antPrefix;
|
|
12
|
+
}, function (p) {
|
|
13
|
+
return p.antPrefix;
|
|
14
|
+
}, function (p) {
|
|
15
|
+
return p.antPrefix;
|
|
16
|
+
}, function (p) {
|
|
17
|
+
return p.sparkPrefix;
|
|
18
|
+
}, function (p) {
|
|
19
|
+
return p.sparkPrefix;
|
|
20
|
+
}, function (p) {
|
|
21
|
+
return p.sparkPrefix;
|
|
22
|
+
}, function (p) {
|
|
23
|
+
return p.antPrefix;
|
|
24
|
+
}, function (p) {
|
|
25
|
+
return p.antPrefix;
|
|
26
|
+
}, function (p) {
|
|
27
|
+
return p.antPrefix;
|
|
28
|
+
}, function (p) {
|
|
29
|
+
return p.sparkPrefix;
|
|
30
|
+
}, function (p) {
|
|
31
|
+
return p.sparkPrefix;
|
|
32
|
+
}, function (p) {
|
|
33
|
+
return p.antPrefix;
|
|
34
|
+
}, function (p) {
|
|
35
|
+
return p.sparkPrefix;
|
|
36
|
+
}, function (p) {
|
|
37
|
+
return p.antPrefix;
|
|
38
|
+
}, function (p) {
|
|
39
|
+
return p.antPrefix;
|
|
40
|
+
}, function (p) {
|
|
41
|
+
return p.antPrefix;
|
|
42
|
+
}, function (p) {
|
|
43
|
+
return p.sparkPrefix;
|
|
44
|
+
}, function (p) {
|
|
45
|
+
return p.antPrefix;
|
|
46
|
+
}, function (p) {
|
|
47
|
+
return p.antPrefix;
|
|
48
|
+
}, function (p) {
|
|
49
|
+
return p.antPrefix;
|
|
50
|
+
}, function (p) {
|
|
51
|
+
return p.antPrefix;
|
|
52
|
+
}, function (p) {
|
|
53
|
+
return p.antPrefix;
|
|
54
|
+
});
|
|
@@ -1,38 +1,89 @@
|
|
|
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
1
|
var _excluded = ["hideSwitchButton"];
|
|
3
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; }
|
|
4
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; }
|
|
5
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; }
|
|
6
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
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
|
+
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
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
|
-
// import $i18n from '@/i18n';
|
|
11
10
|
import { getCommonConfig } from "../../../config";
|
|
11
|
+
import $i18n from "../../../i18n";
|
|
12
12
|
import { SparkMoreLine } from '@agentscope-ai/icons';
|
|
13
13
|
import { LeftOutlined, RightOutlined } from "@agentscope-ai/icons-override-antd";
|
|
14
14
|
import { Flex, Pagination } from 'antd';
|
|
15
|
-
import
|
|
15
|
+
import { useStyle } from "./index.style";
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
|
+
var DEFAULT_SHOW_SIZE_CHANGE = {
|
|
20
|
+
options: [{
|
|
21
|
+
label: "10 ".concat($i18n.get({
|
|
22
|
+
id: 'components.commonComponents.Pagination.Items',
|
|
23
|
+
dm: '条'
|
|
24
|
+
}), " / ").concat($i18n.get({
|
|
25
|
+
id: 'components.commonComponents.Pagination.Page',
|
|
26
|
+
dm: '页'
|
|
27
|
+
})),
|
|
28
|
+
value: 10
|
|
29
|
+
}, {
|
|
30
|
+
label: "20 ".concat($i18n.get({
|
|
31
|
+
id: 'components.commonComponents.Pagination.Items',
|
|
32
|
+
dm: '条'
|
|
33
|
+
}), " / ").concat($i18n.get({
|
|
34
|
+
id: 'components.commonComponents.Pagination.Page',
|
|
35
|
+
dm: '页'
|
|
36
|
+
})),
|
|
37
|
+
value: 20
|
|
38
|
+
}, {
|
|
39
|
+
label: "50 ".concat($i18n.get({
|
|
40
|
+
id: 'components.commonComponents.Pagination.Items',
|
|
41
|
+
dm: '条'
|
|
42
|
+
}), " / ").concat($i18n.get({
|
|
43
|
+
id: 'components.commonComponents.Pagination.Page',
|
|
44
|
+
dm: '页'
|
|
45
|
+
})),
|
|
46
|
+
value: 50
|
|
47
|
+
}, {
|
|
48
|
+
label: "100 ".concat($i18n.get({
|
|
49
|
+
id: 'components.commonComponents.Pagination.Items',
|
|
50
|
+
dm: '条'
|
|
51
|
+
}), " / ").concat($i18n.get({
|
|
52
|
+
id: 'components.commonComponents.Pagination.Page',
|
|
53
|
+
dm: '页'
|
|
54
|
+
})),
|
|
55
|
+
value: 100
|
|
56
|
+
}]
|
|
57
|
+
};
|
|
18
58
|
export default (function (props) {
|
|
19
59
|
var _props$hideSwitchButt = props.hideSwitchButton,
|
|
20
60
|
hideSwitchButton = _props$hideSwitchButt === void 0 ? false : _props$hideSwitchButt,
|
|
21
61
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
22
62
|
var _getCommonConfig = getCommonConfig(),
|
|
23
63
|
sparkPrefix = _getCommonConfig.sparkPrefix;
|
|
24
|
-
|
|
64
|
+
var Style = useStyle();
|
|
25
65
|
var mergedItemRender = function mergedItemRender() {
|
|
26
|
-
if (hideSwitchButton || props.itemRender) {
|
|
27
|
-
return props.itemRender;
|
|
28
|
-
}
|
|
29
66
|
var sparkItemRender = function sparkItemRender(_, type, originalElement) {
|
|
67
|
+
// 优先处理省略号替换
|
|
68
|
+
if (type === 'jump-prev' || type === 'jump-next') {
|
|
69
|
+
// 替换省略号为自定义图标
|
|
70
|
+
return /*#__PURE__*/_jsx(SparkMoreLine, {
|
|
71
|
+
className: "".concat(sparkPrefix, "-jump-next-icon")
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
// 如果禁用了切换按钮或者有自定义的itemRender,则不处理上一页下一页按钮
|
|
75
|
+
if (hideSwitchButton || props.itemRender) {
|
|
76
|
+
return originalElement;
|
|
77
|
+
}
|
|
30
78
|
if (type === 'prev') {
|
|
31
79
|
return /*#__PURE__*/_jsx("a", {
|
|
32
80
|
children: /*#__PURE__*/_jsxs(Flex, {
|
|
33
81
|
gap: 8,
|
|
34
82
|
children: [/*#__PURE__*/_jsx(LeftOutlined, {}), ' ', /*#__PURE__*/_jsx("span", {
|
|
35
|
-
children:
|
|
83
|
+
children: $i18n.get({
|
|
84
|
+
id: 'components.commonComponents.Pagination.PreviousPage',
|
|
85
|
+
dm: '上一页'
|
|
86
|
+
})
|
|
36
87
|
})]
|
|
37
88
|
})
|
|
38
89
|
});
|
|
@@ -42,40 +93,49 @@ export default (function (props) {
|
|
|
42
93
|
children: /*#__PURE__*/_jsxs(Flex, {
|
|
43
94
|
gap: 8,
|
|
44
95
|
children: [/*#__PURE__*/_jsx("span", {
|
|
45
|
-
children:
|
|
96
|
+
children: $i18n.get({
|
|
97
|
+
id: 'components.commonComponents.Pagination.NextPage',
|
|
98
|
+
dm: '下一页'
|
|
99
|
+
})
|
|
46
100
|
}), ' ', /*#__PURE__*/_jsx(RightOutlined, {})]
|
|
47
101
|
})
|
|
48
102
|
});
|
|
49
103
|
}
|
|
50
|
-
if (type === 'jump-prev' || type === 'jump-next') {
|
|
51
|
-
// 替换省略号为自定义图标
|
|
52
|
-
return /*#__PURE__*/_jsx(SparkMoreLine, {
|
|
53
|
-
className: "".concat(sparkPrefix, "-jump-next-icon")
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
104
|
return originalElement;
|
|
57
105
|
};
|
|
58
106
|
return sparkItemRender;
|
|
59
107
|
};
|
|
60
|
-
var shouldShowSizeChanger
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
108
|
+
var shouldShowSizeChanger;
|
|
109
|
+
if (restProps.showSizeChanger !== null && restProps.showSizeChanger !== undefined) {
|
|
110
|
+
shouldShowSizeChanger = restProps.showSizeChanger;
|
|
111
|
+
} else {
|
|
112
|
+
shouldShowSizeChanger = restProps.total && restProps.total > 50;
|
|
113
|
+
}
|
|
114
|
+
var getMergedShowSizeChange = function getMergedShowSizeChange() {
|
|
115
|
+
if (props.showSizeChanger === true) {
|
|
116
|
+
// 用户手动设置为 true,使用预置选项
|
|
117
|
+
return DEFAULT_SHOW_SIZE_CHANGE;
|
|
118
|
+
}
|
|
119
|
+
if (props.showSizeChanger === false) {
|
|
120
|
+
// 用户手动设为 false
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
if (_typeof(props.showSizeChanger) === 'object' && props.showSizeChanger) {
|
|
124
|
+
// 用户手动传入的优先
|
|
125
|
+
return props.showSizeChanger;
|
|
126
|
+
}
|
|
127
|
+
if (restProps.total && restProps.total > 50) {
|
|
128
|
+
// 数据量大于 50,使用预置选项
|
|
129
|
+
return DEFAULT_SHOW_SIZE_CHANGE;
|
|
130
|
+
}
|
|
131
|
+
return false;
|
|
132
|
+
};
|
|
133
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
134
|
+
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(Pagination, _objectSpread(_objectSpread({
|
|
135
|
+
itemRender: mergedItemRender()
|
|
136
|
+
}, restProps), {}, {
|
|
137
|
+
showSizeChanger: getMergedShowSizeChange(),
|
|
138
|
+
className: "".concat(sparkPrefix, "-pagination")
|
|
139
|
+
}))]
|
|
140
|
+
});
|
|
81
141
|
});
|
|
@@ -1,49 +1 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
[x: string]: {
|
|
3
|
-
[x: string]: string | {
|
|
4
|
-
fontWeight: number;
|
|
5
|
-
borderColor?: undefined;
|
|
6
|
-
borderRadius?: undefined;
|
|
7
|
-
a?: undefined;
|
|
8
|
-
color?: undefined;
|
|
9
|
-
display?: undefined;
|
|
10
|
-
alignItems?: undefined;
|
|
11
|
-
justifyContent?: undefined;
|
|
12
|
-
} | {
|
|
13
|
-
borderColor: string;
|
|
14
|
-
borderRadius: number;
|
|
15
|
-
a: {
|
|
16
|
-
color: string;
|
|
17
|
-
};
|
|
18
|
-
fontWeight?: undefined;
|
|
19
|
-
color?: undefined;
|
|
20
|
-
display?: undefined;
|
|
21
|
-
alignItems?: undefined;
|
|
22
|
-
justifyContent?: undefined;
|
|
23
|
-
} | {
|
|
24
|
-
color: string;
|
|
25
|
-
fontWeight?: undefined;
|
|
26
|
-
borderColor?: undefined;
|
|
27
|
-
borderRadius?: undefined;
|
|
28
|
-
a?: undefined;
|
|
29
|
-
display?: undefined;
|
|
30
|
-
alignItems?: undefined;
|
|
31
|
-
justifyContent?: undefined;
|
|
32
|
-
} | {
|
|
33
|
-
display: string;
|
|
34
|
-
alignItems: string;
|
|
35
|
-
justifyContent: string;
|
|
36
|
-
fontWeight?: undefined;
|
|
37
|
-
borderColor?: undefined;
|
|
38
|
-
borderRadius?: undefined;
|
|
39
|
-
a?: undefined;
|
|
40
|
-
color?: undefined;
|
|
41
|
-
};
|
|
42
|
-
color: string;
|
|
43
|
-
a: {
|
|
44
|
-
color: string;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
|
|
49
|
-
export default useIndexStyle;
|
|
1
|
+
export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,42 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
display: 'flex',
|
|
28
|
-
alignItems: 'center',
|
|
29
|
-
justifyContent: 'center'
|
|
30
|
-
}), ".".concat(antPrefix, "-pagination-jump-prev"), {
|
|
31
|
-
display: 'flex',
|
|
32
|
-
alignItems: 'center',
|
|
33
|
-
justifyContent: 'center'
|
|
34
|
-
}));
|
|
35
|
-
}
|
|
36
|
-
var useIndexStyle = createStyle(function (_ref2) {
|
|
37
|
-
var css = _ref2.css,
|
|
38
|
-
params = _objectWithoutProperties(_ref2, _excluded);
|
|
39
|
-
var result = css(getIndexStyleData(params));
|
|
40
|
-
return result;
|
|
41
|
-
});
|
|
42
|
-
export default useIndexStyle;
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
|
+
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-pagination {\n color: var(--", "-color-text) !important;\n \n .", "-pagination-total-text {\n font-weight: 500;\n }\n \n .", "-select-selection-item {\n font-weight: 500;\n }\n \n .", "-pagination-item-active.", "-pagination-item {\n border-color: var(--", "-color-border-secondary);\n border-radius: 8px;\n \n a {\n color: var(--", "-color-text) !important;\n }\n }\n \n a {\n color: var(--", "-color-text) !important;\n }\n \n .", "-pagination-jump-next {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .", "-pagination-jump-prev {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n"])), function (p) {
|
|
5
|
+
return p.sparkPrefix;
|
|
6
|
+
}, function (p) {
|
|
7
|
+
return p.sparkPrefix;
|
|
8
|
+
}, function (p) {
|
|
9
|
+
return p.antPrefix;
|
|
10
|
+
}, function (p) {
|
|
11
|
+
return p.antPrefix;
|
|
12
|
+
}, function (p) {
|
|
13
|
+
return p.antPrefix;
|
|
14
|
+
}, function (p) {
|
|
15
|
+
return p.antPrefix;
|
|
16
|
+
}, function (p) {
|
|
17
|
+
return p.antPrefix;
|
|
18
|
+
}, function (p) {
|
|
19
|
+
return p.antPrefix;
|
|
20
|
+
}, function (p) {
|
|
21
|
+
return p.antPrefix;
|
|
22
|
+
}, function (p) {
|
|
23
|
+
return p.antPrefix;
|
|
24
|
+
}, function (p) {
|
|
25
|
+
return p.antPrefix;
|
|
26
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Button, Popconfirm } from "../../../..";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
var App = function App() {
|
|
5
|
+
return /*#__PURE__*/_jsx(Popconfirm, {
|
|
6
|
+
title: "Title here",
|
|
7
|
+
description: "Descriptive content explaining the action or outcome.",
|
|
8
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
9
|
+
children: "Open Popconfirm"
|
|
10
|
+
})
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
export default App;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Button, Popconfirm } from "../../../..";
|
|
2
|
+
import { Flex } from 'antd';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
var App = function App() {
|
|
7
|
+
return /*#__PURE__*/_jsxs(Flex, {
|
|
8
|
+
vertical: true,
|
|
9
|
+
gap: 24,
|
|
10
|
+
children: [/*#__PURE__*/_jsx(Popconfirm, {
|
|
11
|
+
title: "Title here",
|
|
12
|
+
description: "Descriptive content explaining the action or outcome.",
|
|
13
|
+
type: "info",
|
|
14
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
15
|
+
children: "Info"
|
|
16
|
+
})
|
|
17
|
+
}), /*#__PURE__*/_jsx(Popconfirm, {
|
|
18
|
+
title: "Title here",
|
|
19
|
+
description: "Descriptive content explaining the action or outcome.",
|
|
20
|
+
type: "success",
|
|
21
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
22
|
+
children: "Success"
|
|
23
|
+
})
|
|
24
|
+
}), /*#__PURE__*/_jsx(Popconfirm, {
|
|
25
|
+
title: "Title here",
|
|
26
|
+
description: "Descriptive content explaining the action or outcome.",
|
|
27
|
+
type: "warning",
|
|
28
|
+
okText: "Primary Danger",
|
|
29
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
30
|
+
children: "Warning"
|
|
31
|
+
})
|
|
32
|
+
}), /*#__PURE__*/_jsx(Popconfirm, {
|
|
33
|
+
title: "Title here",
|
|
34
|
+
description: "Descriptive content explaining the action or outcome.",
|
|
35
|
+
type: "error",
|
|
36
|
+
okText: "Primary Danger",
|
|
37
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
38
|
+
children: "Error"
|
|
39
|
+
})
|
|
40
|
+
}), /*#__PURE__*/_jsx(Popconfirm, {
|
|
41
|
+
title: "Title here",
|
|
42
|
+
description: "Descriptive content explaining the action or outcome.",
|
|
43
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
44
|
+
children: "Confirm"
|
|
45
|
+
})
|
|
46
|
+
})]
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
export default App;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { PopconfirmProps } from 'antd';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
|
|
3
|
+
export interface SparkPopconfirmProps extends PopconfirmProps {
|
|
4
|
+
/**
|
|
5
|
+
* @description 类型
|
|
6
|
+
* @descriptionEn type of the popconfirm
|
|
7
|
+
* @default 'confirm'
|
|
8
|
+
*/
|
|
9
|
+
type?: 'info' | 'warning' | 'error' | 'success' | 'confirm';
|
|
10
|
+
}
|
|
11
|
+
declare const SparkPopconfirm: React.ForwardRefExoticComponent<SparkPopconfirmProps & React.RefAttributes<any>>;
|
|
4
12
|
export default SparkPopconfirm;
|
|
5
|
-
export type SparkPopconfirmProps = PopconfirmProps;
|
|
@@ -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 = ["icon"];
|
|
2
|
+
var _excluded = ["icon", "type", "okButtonProps"];
|
|
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,22 +8,64 @@ 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 "../../..";
|
|
11
|
-
import { ExclamationCircleOutlined } from
|
|
11
|
+
import { CheckCircleOutlined, CloseCircleOutlined, ExclamationCircleOutlined, InfoCircleOutlined } from '@agentscope-ai/icons-override-antd';
|
|
12
12
|
import { Popconfirm } from 'antd';
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
var SparkPopconfirm = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
16
|
-
var commonConfig = getCommonConfig();
|
|
17
|
-
var antPrefix = commonConfig.antPrefix;
|
|
18
16
|
var icon = props.icon,
|
|
17
|
+
_props$type = props.type,
|
|
18
|
+
type = _props$type === void 0 ? 'confirm' : _props$type,
|
|
19
|
+
okButtonProps = props.okButtonProps,
|
|
19
20
|
rest = _objectWithoutProperties(props, _excluded);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
var _getCommonConfig = getCommonConfig(),
|
|
22
|
+
antPrefix = _getCommonConfig.antPrefix;
|
|
23
|
+
var getMergedIcon = function getMergedIcon() {
|
|
24
|
+
if (icon) return icon;
|
|
25
|
+
if (type === 'confirm') return /*#__PURE__*/_jsx(ExclamationCircleOutlined, {
|
|
26
|
+
style: {
|
|
27
|
+
color: "var(--".concat(antPrefix, "-color-warning)")
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
if (type === 'info') return /*#__PURE__*/_jsx(InfoCircleOutlined, {
|
|
31
|
+
style: {
|
|
32
|
+
color: "var(--".concat(antPrefix, "-color-info)")
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
if (type === 'warning') return /*#__PURE__*/_jsx(ExclamationCircleOutlined, {
|
|
36
|
+
style: {
|
|
37
|
+
color: "var(--".concat(antPrefix, "-color-warning)")
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
if (type === 'error') return /*#__PURE__*/_jsx(CloseCircleOutlined, {
|
|
41
|
+
style: {
|
|
42
|
+
color: "var(--".concat(antPrefix, "-color-error)")
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
if (type === 'success') return /*#__PURE__*/_jsx(CheckCircleOutlined, {
|
|
46
|
+
style: {
|
|
47
|
+
color: "var(--".concat(antPrefix, "-color-success)")
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return /*#__PURE__*/_jsx(ExclamationCircleOutlined, {
|
|
23
51
|
style: {
|
|
24
52
|
color: "var(--".concat(antPrefix, "-color-warning)")
|
|
25
53
|
}
|
|
26
|
-
})
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
var getMergedOkButtonProps = function getMergedOkButtonProps() {
|
|
57
|
+
var innerOkButtonProps = {};
|
|
58
|
+
if (['warning', 'error'].includes(type)) {
|
|
59
|
+
innerOkButtonProps.danger = true;
|
|
60
|
+
}
|
|
61
|
+
return _objectSpread(_objectSpread({}, innerOkButtonProps), okButtonProps || {});
|
|
62
|
+
};
|
|
63
|
+
return /*#__PURE__*/_jsx(Popconfirm, _objectSpread(_objectSpread({}, rest), {}, {
|
|
64
|
+
ref: ref,
|
|
65
|
+
icon: getMergedIcon()
|
|
66
|
+
// @ts-ignore
|
|
67
|
+
,
|
|
68
|
+
okButtonProps: getMergedOkButtonProps()
|
|
27
69
|
}));
|
|
28
70
|
});
|
|
29
71
|
export default SparkPopconfirm;
|
|
@@ -12,10 +12,11 @@ export default function Basic() {
|
|
|
12
12
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13
13
|
value = _useState2[0],
|
|
14
14
|
setValue = _useState2[1];
|
|
15
|
-
return /*#__PURE__*/_jsx(PromptsEditor
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
return /*#__PURE__*/_jsx(PromptsEditor
|
|
16
|
+
// onCreate={() => alert(1)}
|
|
17
|
+
// tipsText={<div>english tips</div>}
|
|
18
|
+
, {
|
|
19
|
+
tipsText: false,
|
|
19
20
|
value: value,
|
|
20
21
|
onChange: setValue,
|
|
21
22
|
maxLength: 5000,
|