@agentscope-ai/design 1.0.7 → 1.0.9
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/_readme.txt +1 -0
- package/lib/antd/themes/bailianTheme.json +1 -1
- package/lib/antd/themes/generateThemeByToken.d.ts +1 -1
- package/lib/antd/themes/generateThemeByToken.js +1 -1
- 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 +10 -7
- package/lib/components/commonComponents/Breadcrumb/index.style.d.ts +1 -107
- package/lib/components/commonComponents/Breadcrumb/index.style.js +32 -60
- package/lib/components/commonComponents/Button/index.js +27 -5
- 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 +16 -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 +11 -8
- 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/Empty/svg/Illustrate.js +2 -2
- 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 +19 -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 +36 -31
- 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/VarRender.d.ts +6 -0
- package/lib/components/commonComponents/PromptsEditor/VarRender.js +84 -0
- package/lib/components/commonComponents/PromptsEditor/VarSelectInput.d.ts +6 -0
- package/lib/components/commonComponents/PromptsEditor/VarSelectInput.js +60 -0
- package/lib/components/commonComponents/PromptsEditor/demo/basic.d.ts +1 -0
- package/lib/components/commonComponents/PromptsEditor/demo/basic.js +30 -0
- package/lib/components/commonComponents/PromptsEditor/index.d.ts +42 -0
- package/lib/components/commonComponents/PromptsEditor/index.js +134 -0
- 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 +91 -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 +13 -10
- 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/index.js +10 -6
- package/lib/components/commonComponents/Table/index.style.d.ts +1 -52
- package/lib/components/commonComponents/Table/index.style.js +18 -32
- package/lib/components/commonComponents/Tabs/index.js +35 -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/demo/demo2.js +0 -1
- package/lib/components/commonComponents/Tag/demo/demo3.js +0 -2
- package/lib/components/commonComponents/Tag/index.js +14 -10
- 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 -13
- 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/index.d.ts +3 -2
- package/lib/index.js +10 -5
- package/lib/libs/env/index.js +1 -1
- package/lib/libs/newCreateStyle/index.d.ts +7 -0
- package/lib/libs/newCreateStyle/index.js +26 -0
- package/llms/index.llms.txt +43 -43
- package/package.json +11 -8
- 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/lib/components/commonComponents/Popconfirm/demo/{demo.d.ts → demo1.d.ts} +0 -0
|
@@ -1,72 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
display: 'flex',
|
|
28
|
-
alignItems: 'center',
|
|
29
|
-
justifyContent: 'center'
|
|
30
|
-
}, "span:not([title*=\"Unfold line\"])", {
|
|
31
|
-
height: '30px !important'
|
|
32
|
-
})), '.cm-line', {
|
|
33
|
-
height: '24px !important',
|
|
34
|
-
lineHeight: '24px !important'
|
|
35
|
-
}), '.cm-lineNumbers .cm-gutterElement', {
|
|
36
|
-
padding: '0px 4px 0px 12px !important'
|
|
37
|
-
}), '.cm-activeLine, .cm-activeLineGutter', {
|
|
38
|
-
backgroundColor: "var(--".concat(antPrefix, "-color-fill-secondary) !important")
|
|
39
|
-
}), '.cm-button', {
|
|
40
|
-
backgroundImage: 'none !important',
|
|
41
|
-
background: "var(--".concat(antPrefix, "-color-bg-base) !important"),
|
|
42
|
-
border: "1px solid var(--".concat(antPrefix, "-color-border-secondary) !important"),
|
|
43
|
-
borderRadius: '4px !important',
|
|
44
|
-
'&:hover': {
|
|
45
|
-
color: "var(--".concat(antPrefix, "-color-text-secondary)"),
|
|
46
|
-
cursor: 'pointer'
|
|
47
|
-
}
|
|
48
|
-
}), '.cm-search', {
|
|
49
|
-
background: "var(--".concat(antPrefix, "-color-fill-secondary) !important")
|
|
50
|
-
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, '.cm-panel.cm-search label', {
|
|
51
|
-
display: 'inline-flex',
|
|
52
|
-
alignItems: 'center'
|
|
53
|
-
}), '.cm-panel.cm-search [name=close]', {
|
|
54
|
-
right: '8px !important',
|
|
55
|
-
background: 'none !important',
|
|
56
|
-
fontSize: '16px !important',
|
|
57
|
-
color: "var(--".concat(antPrefix, "-color-text-tertiary) !important")
|
|
58
|
-
}), '.cm-textfield', {
|
|
59
|
-
borderRadius: '4px'
|
|
60
|
-
}), '.cm-panel.cm-search input[type=checkbox]', {
|
|
61
|
-
border: "1px solid var(--".concat(antPrefix, "-color-border-secondary) !important")
|
|
62
|
-
}), '.cm-focused', {
|
|
63
|
-
outline: 'none !important'
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
var useIndexStyle = createStyle(function (_ref2) {
|
|
67
|
-
var css = _ref2.css,
|
|
68
|
-
params = _objectWithoutProperties(_ref2, _excluded);
|
|
69
|
-
var result = css(getIndexStyleData(params));
|
|
70
|
-
return result;
|
|
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/newCreateStyle";
|
|
4
|
+
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-code-block {\n width: 100%;\n}\n\n.cm-theme {\n border: none !important;\n border-radius: 0 !important;\n}\n\n.cm-gutters {\n border-right: none !important;\n background-color: var(--", "-color-bg-base) !important;\n}\n\n.cm-editor {\n background-color: var(--", "-color-bg-base) !important;\n}\n\n.cm-gutterElement:not(:first-child) {\n color: var(--", "-color-text-tertiary);\n height: 24px !important;\n line-height: 24px !important;\n display: flex;\n align-items: center;\n justify-content: center;\n \n span:not([title*=\"Unfold line\"]) {\n height: 30px !important;\n }\n}\n\n.cm-line {\n height: 24px !important;\n line-height: 24px !important;\n}\n\n.cm-lineNumbers .cm-gutterElement {\n padding: 0px 4px 0px 12px !important;\n}\n\n.cm-activeLine,\n.cm-activeLineGutter {\n background-color: var(--", "-color-fill-secondary) !important;\n}\n\n.cm-button {\n background-image: none !important;\n background: var(--", "-color-bg-base) !important;\n border: 1px solid var(--", "-color-border-secondary) !important;\n border-radius: 4px !important;\n \n &:hover {\n color: var(--", "-color-text-secondary);\n cursor: pointer;\n }\n}\n\n.cm-search {\n background: var(--", "-color-fill-secondary) !important;\n}\n\n.cm-panel.cm-search label {\n display: inline-flex;\n align-items: center;\n}\n\n.cm-panel.cm-search [name=close] {\n right: 8px !important;\n background: none !important;\n font-size: 16px !important;\n color: var(--", "-color-text-tertiary) !important;\n}\n\n.cm-textfield {\n border-radius: 4px;\n}\n\n.cm-panel.cm-search input[type=checkbox] {\n border: 1px solid var(--", "-color-border-secondary) !important;\n}\n\n.cm-focused {\n outline: none !important;\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.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
|
+
});
|
|
@@ -5,10 +5,14 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
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
|
import { Collapse as AntdCollapse } from 'antd';
|
|
8
|
-
import
|
|
8
|
+
import { useStyle } from "./index.style";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
12
|
var Collapse = function Collapse(props) {
|
|
11
|
-
|
|
12
|
-
return /*#__PURE__*/
|
|
13
|
+
var Style = useStyle();
|
|
14
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
15
|
+
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(AntdCollapse, _objectSpread({}, props))]
|
|
16
|
+
});
|
|
13
17
|
};
|
|
14
18
|
export default Collapse;
|
|
@@ -1,57 +1 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
[x: string]: {
|
|
3
|
-
[x: string]: string | {
|
|
4
|
-
color: string;
|
|
5
|
-
backgroundColor: string;
|
|
6
|
-
borderTop: string;
|
|
7
|
-
borderBottom?: undefined;
|
|
8
|
-
} | {
|
|
9
|
-
[x: string]: string | {
|
|
10
|
-
[x: string]: string | number | {
|
|
11
|
-
width: number;
|
|
12
|
-
height: number;
|
|
13
|
-
padding: number;
|
|
14
|
-
justifyContent: string;
|
|
15
|
-
marginRight: number;
|
|
16
|
-
fontSize?: undefined;
|
|
17
|
-
display?: undefined;
|
|
18
|
-
alignItems?: undefined;
|
|
19
|
-
marginLeft?: undefined;
|
|
20
|
-
} | {
|
|
21
|
-
fontSize: number;
|
|
22
|
-
width?: undefined;
|
|
23
|
-
height?: undefined;
|
|
24
|
-
padding?: undefined;
|
|
25
|
-
justifyContent?: undefined;
|
|
26
|
-
marginRight?: undefined;
|
|
27
|
-
display?: undefined;
|
|
28
|
-
alignItems?: undefined;
|
|
29
|
-
marginLeft?: undefined;
|
|
30
|
-
} | {
|
|
31
|
-
height: number;
|
|
32
|
-
display: string;
|
|
33
|
-
alignItems: string;
|
|
34
|
-
marginLeft: number;
|
|
35
|
-
width?: undefined;
|
|
36
|
-
padding?: undefined;
|
|
37
|
-
justifyContent?: undefined;
|
|
38
|
-
marginRight?: undefined;
|
|
39
|
-
fontSize?: undefined;
|
|
40
|
-
};
|
|
41
|
-
color: string;
|
|
42
|
-
fontWeight: number;
|
|
43
|
-
lineHeight: string;
|
|
44
|
-
alignItems: string;
|
|
45
|
-
};
|
|
46
|
-
borderBottom: string;
|
|
47
|
-
color?: undefined;
|
|
48
|
-
backgroundColor?: undefined;
|
|
49
|
-
borderTop?: undefined;
|
|
50
|
-
};
|
|
51
|
-
backgroundColor: string;
|
|
52
|
-
border: string;
|
|
53
|
-
borderRadius: string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
|
|
57
|
-
export default useIndexStyle;
|
|
1
|
+
export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,47 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
height: 32,
|
|
36
|
-
display: 'flex',
|
|
37
|
-
alignItems: 'center',
|
|
38
|
-
marginLeft: 8
|
|
39
|
-
}))));
|
|
40
|
-
}
|
|
41
|
-
var useIndexStyle = createStyle(function (_ref2) {
|
|
42
|
-
var css = _ref2.css,
|
|
43
|
-
params = _objectWithoutProperties(_ref2, _excluded);
|
|
44
|
-
var result = css(getIndexStyleData(params));
|
|
45
|
-
return result;
|
|
46
|
-
});
|
|
47
|
-
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/newCreateStyle";
|
|
4
|
+
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-collapse {\n background-color: var(--", "-color-fill-tertiary);\n border: 1px solid var(--", "-color-border-secondary);\n border-radius: var(--", "-border-radius);\n \n .", "-collapse-content {\n color: var(--", "-color-text);\n background-color: var(--", "-color-bg-base);\n border-top: 1px solid var(--", "-color-border-secondary);\n }\n \n & > .", "-collapse-item {\n border-bottom: 1px solid var(--", "-color-border-secondary);\n \n & > .", "-collapse-header {\n color: var(--", "-color-text);\n font-weight: 500;\n line-height: 24px;\n align-items: center;\n \n .", "-collapse-expand-icon {\n width: 32px;\n height: 32px;\n padding: 0;\n justify-content: center;\n margin-right: 8px;\n }\n \n .", "-collapse-arrow {\n font-size: 15px;\n }\n \n .", "-collapse-extra {\n height: 32px;\n display: flex;\n align-items: center;\n margin-left: 8px;\n }\n }\n }\n}\n"])), function (p) {
|
|
5
|
+
return p.antPrefix;
|
|
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.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
|
+
}, function (p) {
|
|
27
|
+
return p.antPrefix;
|
|
28
|
+
}, function (p) {
|
|
29
|
+
return p.antPrefix;
|
|
30
|
+
}, function (p) {
|
|
31
|
+
return p.antPrefix;
|
|
32
|
+
}, function (p) {
|
|
33
|
+
return p.antPrefix;
|
|
34
|
+
});
|
|
@@ -33,6 +33,16 @@ export interface CollapsePanelProps {
|
|
|
33
33
|
* @default false
|
|
34
34
|
*/
|
|
35
35
|
defaultExpanded?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* @description 语义化的classNames
|
|
38
|
+
* @descriptionEn Semantic classNames
|
|
39
|
+
*/
|
|
40
|
+
classNames?: Partial<Record<'wrapper' | 'header' | 'content', string>>;
|
|
41
|
+
/**
|
|
42
|
+
* @description 语义化的styles
|
|
43
|
+
* @descriptionEn Semantic styles
|
|
44
|
+
*/
|
|
45
|
+
styles?: Partial<Record<'wrapper' | 'header' | 'content', React.CSSProperties>>;
|
|
36
46
|
}
|
|
37
47
|
declare const CollapsePanel: (props: CollapsePanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
48
|
export default CollapsePanel;
|
|
@@ -1,3 +1,9 @@
|
|
|
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 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
|
+
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
|
+
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
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
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); }
|
|
1
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
9
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -6,11 +12,14 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
6
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
13
|
import { getCommonConfig } from "../../..";
|
|
8
14
|
import { SparkDownLine, SparkUpLine } from '@agentscope-ai/icons';
|
|
15
|
+
import classNames from 'classnames';
|
|
9
16
|
import { useEffect, useRef, useState } from 'react';
|
|
10
|
-
import
|
|
17
|
+
import { useStyle } from "./index.style";
|
|
11
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
19
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
21
|
var CollapsePanel = function CollapsePanel(props) {
|
|
22
|
+
var _props$classNames, _props$styles, _props$classNames2, _props$styles2, _props$classNames3, _props$styles3;
|
|
14
23
|
var collapsedHeight = props.collapsedHeight,
|
|
15
24
|
expandedHeight = props.expandedHeight,
|
|
16
25
|
_props$title = props.title,
|
|
@@ -35,10 +44,7 @@ var CollapsePanel = function CollapsePanel(props) {
|
|
|
35
44
|
var commonConfig = getCommonConfig();
|
|
36
45
|
var sparkPrefix = commonConfig.sparkPrefix,
|
|
37
46
|
antPrefix = commonConfig.antPrefix;
|
|
38
|
-
|
|
39
|
-
sparkPrefix: sparkPrefix,
|
|
40
|
-
antPrefix: antPrefix
|
|
41
|
-
});
|
|
47
|
+
var Style = useStyle();
|
|
42
48
|
useEffect(function () {
|
|
43
49
|
if (contentRef.current) {
|
|
44
50
|
if (isExpanded && expandedHeight) {
|
|
@@ -71,47 +77,53 @@ var CollapsePanel = function CollapsePanel(props) {
|
|
|
71
77
|
var handleMouseLeave = function handleMouseLeave() {
|
|
72
78
|
setIsHovered(true);
|
|
73
79
|
};
|
|
74
|
-
return /*#__PURE__*/_jsxs(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
80
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
81
|
+
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsxs("div", {
|
|
82
|
+
className: classNames("".concat(sparkPrefix, "-collapse-panel"), {
|
|
83
|
+
collapsible: !isExpanded && expandOnPanelClick
|
|
84
|
+
}, (_props$classNames = props.classNames) === null || _props$classNames === void 0 ? void 0 : _props$classNames.wrapper),
|
|
85
|
+
style: (_props$styles = props.styles) === null || _props$styles === void 0 ? void 0 : _props$styles.wrapper,
|
|
86
|
+
onClick: expandOnPanelClick ? handlePanelClick : undefined,
|
|
87
|
+
onMouseEnter: expandOnPanelClick ? handleMouseEnter : undefined,
|
|
88
|
+
onMouseLeave: expandOnPanelClick ? handleMouseLeave : undefined,
|
|
89
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
90
|
+
className: classNames("".concat(sparkPrefix, "-collapse-panel-header"), (_props$classNames2 = props.classNames) === null || _props$classNames2 === void 0 ? void 0 : _props$classNames2.header),
|
|
91
|
+
style: (_props$styles2 = props.styles) === null || _props$styles2 === void 0 ? void 0 : _props$styles2.header,
|
|
92
|
+
onClick: handleHeaderClick,
|
|
93
|
+
children: [/*#__PURE__*/_jsxs("span", {
|
|
94
|
+
className: "".concat(sparkPrefix, "-collapse-panel-title"),
|
|
95
|
+
children: [title, expandedHeight && /*#__PURE__*/_jsxs("div", {
|
|
96
|
+
className: "".concat(sparkPrefix, "-collapse-panel-icon-wrapper"),
|
|
97
|
+
children: [!isExpanded && isHovered && expandOnPanelClick && /*#__PURE__*/_jsx(SparkDownLine, {
|
|
98
|
+
style: {
|
|
99
|
+
fontSize: '18px'
|
|
100
|
+
}
|
|
101
|
+
}), isExpanded && isHovered && expandOnPanelClick && /*#__PURE__*/_jsx(SparkUpLine, {
|
|
102
|
+
style: {
|
|
103
|
+
fontSize: '18px'
|
|
104
|
+
}
|
|
105
|
+
})]
|
|
94
106
|
})]
|
|
107
|
+
}), extra && /*#__PURE__*/_jsx("div", {
|
|
108
|
+
className: "".concat(sparkPrefix, "-collapse-panel-extra"),
|
|
109
|
+
onClick: function onClick(e) {
|
|
110
|
+
e.stopPropagation();
|
|
111
|
+
e.preventDefault();
|
|
112
|
+
},
|
|
113
|
+
children: extra
|
|
114
|
+
})]
|
|
115
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
116
|
+
className: classNames("".concat(sparkPrefix, "-collapse-panel-content"), _defineProperty({}, "".concat(sparkPrefix, "-collapse-panel-expanded"), isExpanded), (_props$classNames3 = props.classNames) === null || _props$classNames3 === void 0 ? void 0 : _props$classNames3.content),
|
|
117
|
+
style: _objectSpread({
|
|
118
|
+
height: contentHeight
|
|
119
|
+
}, (_props$styles3 = props.styles) === null || _props$styles3 === void 0 ? void 0 : _props$styles3.content),
|
|
120
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
121
|
+
ref: contentRef,
|
|
122
|
+
className: "".concat("".concat(sparkPrefix, "-collapse-panel-contentWrapper"), " ", isExpanded && expandedHeight ? 'scrollable' : ''),
|
|
123
|
+
children: children
|
|
124
|
+
}), !isExpanded && expandedHeight && /*#__PURE__*/_jsx("div", {
|
|
125
|
+
className: "".concat(sparkPrefix, "-collapse-panel-mask")
|
|
95
126
|
})]
|
|
96
|
-
}), extra && /*#__PURE__*/_jsx("div", {
|
|
97
|
-
className: "".concat(sparkPrefix, "-collapse-panel-extra"),
|
|
98
|
-
onClick: function onClick(e) {
|
|
99
|
-
e.stopPropagation();
|
|
100
|
-
e.preventDefault();
|
|
101
|
-
},
|
|
102
|
-
children: extra
|
|
103
|
-
})]
|
|
104
|
-
}), /*#__PURE__*/_jsxs("div", {
|
|
105
|
-
className: "".concat("".concat(sparkPrefix, "-collapse-panel-content"), " ", isExpanded ? "".concat(sparkPrefix, "-collapse-panel-expanded") : ''),
|
|
106
|
-
style: {
|
|
107
|
-
height: contentHeight
|
|
108
|
-
},
|
|
109
|
-
children: [/*#__PURE__*/_jsx("div", {
|
|
110
|
-
ref: contentRef,
|
|
111
|
-
className: "".concat("".concat(sparkPrefix, "-collapse-panel-contentWrapper"), " ", isExpanded && expandedHeight ? 'scrollable' : ''),
|
|
112
|
-
children: children
|
|
113
|
-
}), !isExpanded && expandedHeight && /*#__PURE__*/_jsx("div", {
|
|
114
|
-
className: "".concat(sparkPrefix, "-collapse-panel-mask")
|
|
115
127
|
})]
|
|
116
128
|
})]
|
|
117
129
|
});
|