@agentscope-ai/design 1.0.9 → 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.js +1 -1
- package/lib/antd/styles/breadcrumb.style.js +1 -1
- package/lib/antd/styles/button.style.js +1 -1
- package/lib/antd/styles/dropdown.style.js +1 -1
- package/lib/antd/styles/floatButton.style.js +1 -1
- package/lib/antd/styles/index.style.js +1 -1
- package/lib/antd/styles/inputNumber.style.js +1 -1
- package/lib/antd/styles/message.style.js +1 -1
- package/lib/antd/styles/notification.style.js +1 -1
- package/lib/antd/styles/popover.style.js +1 -1
- package/lib/antd/styles/radio.style.js +1 -1
- package/lib/antd/styles/segment.style.js +1 -1
- package/lib/antd/styles/select.style.js +1 -1
- package/lib/antd/styles/slider.style.js +1 -1
- package/lib/antd/styles/table.style.js +1 -1
- package/lib/antd/styles/tooltip.style.js +1 -1
- package/lib/antd/themes/bailianTheme.json +1 -1
- package/lib/antd/themes/generateThemeByToken.js +7 -1
- package/lib/components/commonComponents/AlertDialog/index.style.js +1 -1
- package/lib/components/commonComponents/Anchor/index.style.js +1 -1
- package/lib/components/commonComponents/Avatar/index.style.js +1 -1
- package/lib/components/commonComponents/Breadcrumb/index.style.js +1 -1
- 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.style.js +1 -1
- package/lib/components/commonComponents/Checkbox/index.style.js +1 -1
- package/lib/components/commonComponents/CodeBlock/index.js +2 -1
- package/lib/components/commonComponents/CodeBlock/index.style.js +1 -1
- package/lib/components/commonComponents/Collapse/index.style.js +1 -1
- package/lib/components/commonComponents/CollapsePanel/index.style.js +1 -1
- package/lib/components/commonComponents/ConfigProvider/index.js +10 -7
- package/lib/components/commonComponents/DatePicker/index.style.js +1 -1
- package/lib/components/commonComponents/Descriptions/index.style.js +1 -1
- package/lib/components/commonComponents/Drawer/index.style.js +1 -1
- package/lib/components/commonComponents/Dropdown/index.style.js +1 -1
- package/lib/components/commonComponents/EllipsisTip/index.style.js +1 -1
- package/lib/components/commonComponents/Empty/index.style.js +1 -1
- package/lib/components/commonComponents/FileIcon/index.style.js +1 -1
- package/lib/components/commonComponents/Form/index.style.js +1 -1
- package/lib/components/commonComponents/HelpIcon/index.style.js +1 -1
- package/lib/components/commonComponents/IconButton/index.style.js +1 -1
- package/lib/components/commonComponents/IconFont/index.style.js +1 -1
- package/lib/components/commonComponents/Image/index.style.js +1 -1
- package/lib/components/commonComponents/Input/index.style.js +1 -1
- package/lib/components/commonComponents/Modal/index.js +0 -1
- package/lib/components/commonComponents/Modal/index.style.js +1 -1
- package/lib/components/commonComponents/Pagination/index.js +75 -20
- package/lib/components/commonComponents/Pagination/index.style.js +1 -1
- 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 +16 -10
- package/lib/components/commonComponents/RadioButton/index.style.js +1 -1
- package/lib/components/commonComponents/Result/index.style.js +1 -1
- package/lib/components/commonComponents/SlateEditor/elements/index.style.js +1 -1
- package/lib/components/commonComponents/SlateEditor/index.style.js +1 -1
- package/lib/components/commonComponents/Slider/Input/index.js +6 -4
- package/lib/components/commonComponents/Slider/Input/index.style.js +2 -2
- package/lib/components/commonComponents/Slider/index.style.js +1 -1
- package/lib/components/commonComponents/SliderSelector/index.style.js +1 -1
- package/lib/components/commonComponents/Spinner/index.style.js +1 -1
- package/lib/components/commonComponents/Statistic/index.style.js +1 -1
- package/lib/components/commonComponents/Steps/index.style.js +1 -1
- package/lib/components/commonComponents/Switch/index.js +3 -3
- package/lib/components/commonComponents/Switch/index.style.js +1 -1
- 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 +1 -1
- package/lib/components/commonComponents/Table/index.style.js +18 -2
- package/lib/components/commonComponents/Tabs/index.js +3 -1
- package/lib/components/commonComponents/Tabs/index.style.js +1 -1
- package/lib/components/commonComponents/Tag/index.style.js +1 -1
- package/lib/components/commonComponents/TimePicker/index.style.js +1 -1
- package/lib/components/commonComponents/Tooltip/index.style.js +1 -1
- package/lib/components/commonComponents/Upload/index.style.js +1 -1
- 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 +2 -1
- package/lib/index.js +1 -0
- package/lib/libs/createStyle/index.d.ts +7 -1
- package/lib/libs/createStyle/index.js +24 -72
- package/lib/libs/generateCssVars/index.js +1 -1
- package/package.json +1 -1
- package/lib/libs/newCreateStyle/index.d.ts +0 -7
- package/lib/libs/newCreateStyle/index.js +0 -26
- 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
|
@@ -1,14 +1,14 @@
|
|
|
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';
|
|
@@ -16,6 +16,45 @@ 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
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
|
+
};
|
|
19
58
|
export default (function (props) {
|
|
20
59
|
var _props$hideSwitchButt = props.hideSwitchButton,
|
|
21
60
|
hideSwitchButton = _props$hideSwitchButt === void 0 ? false : _props$hideSwitchButt,
|
|
@@ -41,7 +80,10 @@ export default (function (props) {
|
|
|
41
80
|
children: /*#__PURE__*/_jsxs(Flex, {
|
|
42
81
|
gap: 8,
|
|
43
82
|
children: [/*#__PURE__*/_jsx(LeftOutlined, {}), ' ', /*#__PURE__*/_jsx("span", {
|
|
44
|
-
children:
|
|
83
|
+
children: $i18n.get({
|
|
84
|
+
id: 'components.commonComponents.Pagination.PreviousPage',
|
|
85
|
+
dm: '上一页'
|
|
86
|
+
})
|
|
45
87
|
})]
|
|
46
88
|
})
|
|
47
89
|
});
|
|
@@ -51,7 +93,10 @@ export default (function (props) {
|
|
|
51
93
|
children: /*#__PURE__*/_jsxs(Flex, {
|
|
52
94
|
gap: 8,
|
|
53
95
|
children: [/*#__PURE__*/_jsx("span", {
|
|
54
|
-
children:
|
|
96
|
+
children: $i18n.get({
|
|
97
|
+
id: 'components.commonComponents.Pagination.NextPage',
|
|
98
|
+
dm: '下一页'
|
|
99
|
+
})
|
|
55
100
|
}), ' ', /*#__PURE__*/_jsx(RightOutlined, {})]
|
|
56
101
|
})
|
|
57
102
|
});
|
|
@@ -60,26 +105,36 @@ export default (function (props) {
|
|
|
60
105
|
};
|
|
61
106
|
return sparkItemRender;
|
|
62
107
|
};
|
|
63
|
-
var shouldShowSizeChanger
|
|
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
|
+
};
|
|
64
133
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
65
134
|
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(Pagination, _objectSpread(_objectSpread({
|
|
66
135
|
itemRender: mergedItemRender()
|
|
67
136
|
}, restProps), {}, {
|
|
68
|
-
showSizeChanger:
|
|
69
|
-
options: [{
|
|
70
|
-
label: '10 Items / Pages',
|
|
71
|
-
value: 10
|
|
72
|
-
}, {
|
|
73
|
-
label: '20 Items / Pages',
|
|
74
|
-
value: 20
|
|
75
|
-
}, {
|
|
76
|
-
label: '50 Items / Pages',
|
|
77
|
-
value: 50
|
|
78
|
-
}, {
|
|
79
|
-
label: '100 Items / Pages',
|
|
80
|
-
value: 100
|
|
81
|
-
}]
|
|
82
|
-
} : false,
|
|
137
|
+
showSizeChanger: getMergedShowSizeChange(),
|
|
83
138
|
className: "".concat(sparkPrefix, "-pagination")
|
|
84
139
|
}))]
|
|
85
140
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
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
5
|
return p.sparkPrefix;
|
|
6
6
|
}, function (p) {
|
|
@@ -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,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export interface PromptsEditorProps {
|
|
2
3
|
/**
|
|
3
4
|
* @description 可以输入内容的最大长度
|
|
@@ -36,7 +37,12 @@ export interface PromptsEditorProps {
|
|
|
36
37
|
* @descriptionEn Text of the create variable button
|
|
37
38
|
*/
|
|
38
39
|
createBtnText?: string;
|
|
40
|
+
/**
|
|
41
|
+
* @description 提示文本,传入 false 时隐藏提示
|
|
42
|
+
* @descriptionEn Text of the tips, set to false to hide the tips
|
|
43
|
+
*/
|
|
44
|
+
tipsText?: string | React.ReactNode | false;
|
|
39
45
|
}
|
|
40
46
|
export declare const langExtensionsMap: Record<string, any[]>;
|
|
41
|
-
declare const
|
|
42
|
-
export default
|
|
47
|
+
declare const _default: React.MemoExoticComponent<(props: PromptsEditorProps) => import("react/jsx-runtime").JSX.Element>;
|
|
48
|
+
export default _default;
|
|
@@ -22,7 +22,7 @@ import CodeMirror from '@uiw/react-codemirror';
|
|
|
22
22
|
import { ConfigProvider, theme } from 'antd';
|
|
23
23
|
import { createStyles } from 'antd-style';
|
|
24
24
|
import classNames from 'classnames';
|
|
25
|
-
import React, { useEffect, useMemo, useState } from 'react';
|
|
25
|
+
import React, { memo, useEffect, useMemo, useState } from 'react';
|
|
26
26
|
import VarRender from "./VarRender";
|
|
27
27
|
import VarSelectInput from "./VarSelectInput";
|
|
28
28
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -32,7 +32,7 @@ var useStyles = createStyles(function (_ref) {
|
|
|
32
32
|
token = _ref.token;
|
|
33
33
|
return {
|
|
34
34
|
onCreate: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .cm-tooltip li:last-of-type {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 40px;\n border-top: 1px solid ", ";\n border-radius: 0 !important;\n background-color: ", " !important;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 !important;\n }\n\n .cm-tooltip ul {\n margin-bottom: 40px !important;\n }\n\n .cm-tooltip li:first-of-type {\n border-top: none !important;\n }\n "])), token.colorBorderSecondary, token.colorBgContainer),
|
|
35
|
-
cm: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .cm-line {\n color: ", ";\n }\n .cm-line span {\n color: ", ";\n }\n\n .cm-editor {\n position: absolute !important;\n background-color: transparent !important;\n\n top: 0;\n left: 8px;\n right: 0;\n bottom: 30px;\n }\n .cm-focused {\n outline: none;\n }\n\n .cm-content {\n width: 100%;\n padding: 8px 0;\n white-space: break-spaces;\n }\n\n .cm-line {\n line-height: 24px;\n }\n\n .cm-prompt-var {\n font-size: inherit;\n color: ", " !important;\n background-color: ", " !important;\n line-height: 1.7;\n font-weight: 500;\n margin: 0 2px;\n height: 24px;\n display: inline-flex;\n padding: 0 4px;\n border-radius: 4px;\n }\n\n .cm-tooltip {\n position: relative;\n background-color: ", ";\n border: 0;\n border-radius: 4px;\n overflow: hidden;\n box-shadow: 0px 3px 12px 0px rgba(47, 49, 51, 0.12);\n }\n\n .cm-tooltip ul {\n max-height: 17em !important;\n display: flex;\n flex-direction: column;\n }\n\n .cm-tooltip li {\n margin: 4px 8px;\n height: 32px;\n padding: 0 12px !important;\n flex: 0 0 32px;\n display: flex;\n align-items: center;\n }\n\n .cm-tooltip-autocomplete ul li[aria-selected] {\n border-radius: 6px;\n font-weight: 600;\n color: ", ";\n background-color: ", ";\n }\n\n .cm-completionInfo-right {\n display: none;\n }\n\n .cm-completionIcon {\n display: none;\n }\n "])), token.colorTextSecondary, token.colorBlue, token.colorPurple, token.colorPurpleBg, token.colorBgContainer, token.colorText, token.colorFillSecondary),
|
|
35
|
+
cm: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .cm-line {\n color: ", ";\n }\n .cm-line span {\n color: ", ";\n }\n\n .cm-editor {\n position: absolute !important;\n background-color: transparent !important;\n\n top: 0;\n left: 8px;\n right: 0;\n bottom: 30px;\n }\n .cm-focused {\n outline: none;\n }\n\n .cm-content {\n width: 100%;\n padding: 8px 0;\n white-space: break-spaces;\n }\n\n .cm-line {\n line-height: 24px;\n height: auto !important;\n }\n\n .cm-prompt-var {\n font-size: inherit;\n color: ", " !important;\n background-color: ", " !important;\n line-height: 1.7;\n font-weight: 500;\n margin: 0 2px;\n height: 24px;\n display: inline-flex;\n padding: 0 4px;\n border-radius: 4px;\n }\n\n .cm-tooltip {\n position: relative;\n background-color: ", ";\n border: 0;\n border-radius: 4px;\n overflow: hidden;\n box-shadow: 0px 3px 12px 0px rgba(47, 49, 51, 0.12);\n }\n\n .cm-tooltip ul {\n max-height: 17em !important;\n display: flex;\n flex-direction: column;\n }\n\n .cm-tooltip li {\n margin: 4px 8px;\n height: 32px;\n padding: 0 12px !important;\n flex: 0 0 32px;\n display: flex;\n align-items: center;\n }\n\n .cm-tooltip-autocomplete ul li[aria-selected] {\n border-radius: 6px;\n font-weight: 600;\n color: ", ";\n background-color: ", ";\n }\n\n .cm-completionInfo-right {\n display: none;\n }\n\n .cm-completionIcon {\n display: none;\n }\n "])), token.colorTextSecondary, token.colorBlue, token.colorPurple, token.colorPurpleBg, token.colorBgContainer, token.colorText, token.colorFillSecondary),
|
|
36
36
|
root: {
|
|
37
37
|
position: 'relative',
|
|
38
38
|
minHeight: 300,
|
|
@@ -68,7 +68,7 @@ export var langExtensionsMap = {
|
|
|
68
68
|
markdown: [markdown()]
|
|
69
69
|
};
|
|
70
70
|
var empty = [];
|
|
71
|
-
var
|
|
71
|
+
var Editor = function Editor(props) {
|
|
72
72
|
var _useStyles = useStyles(),
|
|
73
73
|
styles = _useStyles.styles;
|
|
74
74
|
var variables = props.variables || empty;
|
|
@@ -103,6 +103,17 @@ var CodeMirrorWrapper = function CodeMirrorWrapper(props) {
|
|
|
103
103
|
setReady(false);
|
|
104
104
|
};
|
|
105
105
|
}, []);
|
|
106
|
+
var tips = React.useMemo(function () {
|
|
107
|
+
if (props.tipsText === false) return /*#__PURE__*/_jsx("div", {
|
|
108
|
+
className: styles.tips
|
|
109
|
+
});
|
|
110
|
+
return props.tipsText ? props.tipsText : /*#__PURE__*/_jsxs("div", {
|
|
111
|
+
className: styles.tips,
|
|
112
|
+
children: ["\u8F93\u5165\"/\"\u5F15\u7528\u53D8\u91CF\uFF0C\u652F\u6301 ", /*#__PURE__*/_jsx(SparkEnterLine, {
|
|
113
|
+
size: 16
|
|
114
|
+
}), " \u56DE\u8F66\u65B0\u589E"]
|
|
115
|
+
});
|
|
116
|
+
}, [props.tipsText]);
|
|
106
117
|
if (!ready) return null;
|
|
107
118
|
return /*#__PURE__*/_jsxs("div", {
|
|
108
119
|
className: styles.root,
|
|
@@ -120,15 +131,10 @@ var CodeMirrorWrapper = function CodeMirrorWrapper(props) {
|
|
|
120
131
|
}
|
|
121
132
|
}, getTheme), /*#__PURE__*/_jsxs("div", {
|
|
122
133
|
className: styles.footer,
|
|
123
|
-
children: [/*#__PURE__*/_jsxs("div", {
|
|
124
|
-
className: styles.tips,
|
|
125
|
-
children: ["\u8F93\u5165\"/\"\u5F15\u7528\u53D8\u91CF\uFF0C\u652F\u6301 ", /*#__PURE__*/_jsx(SparkEnterLine, {
|
|
126
|
-
size: 16
|
|
127
|
-
}), " \u56DE\u8F66\u65B0\u589E"]
|
|
128
|
-
}), props.maxLength ? /*#__PURE__*/_jsxs("div", {
|
|
134
|
+
children: [tips, props.maxLength ? /*#__PURE__*/_jsxs("div", {
|
|
129
135
|
children: [props.value.length, "/", props.maxLength]
|
|
130
136
|
}) : null]
|
|
131
137
|
})]
|
|
132
138
|
});
|
|
133
139
|
};
|
|
134
|
-
export default
|
|
140
|
+
export default /*#__PURE__*/memo(Editor);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
4
|
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-radio-button-wrapper {\n border: none;\n background-color: transparent;\n border-radius: 6px;\n \n &:first-child {\n border-inline-start: initial;\n }\n \n &::before {\n display: none !important;\n }\n \n &:not(:last-child) {\n margin-right: 12px;\n }\n}\n\n.", "-radio-group-ghost {\n .", "-radio-button-wrapper-checked {\n &:not(.", "-radio-button-wrapper-disabled) {\n color: var(--", "-color-primary);\n background-color: var(--", "-color-primary-bg);\n \n .", "-radio-button-wrapper-checked {\n background-color: var(--", "-color-primary-bg);\n }\n }\n \n &.", "-radio-button-wrapper-disabled {\n &:hover {\n background-color: var(--", "-color-fill-tertiary);\n }\n }\n }\n}\n\n.", "-radio-group-bordered {\n .", "-radio-button-wrapper {\n border: var(--", "-line-width) var(--", "-line-type) var(--", "-color-border);\n \n &:not(:first-child) {\n border-inline-start-width: 1px;\n }\n }\n}\n\n.", "-radio-button-wrapper-disabled {\n color: var(--", "-color-text-tertiary);\n background-color: transparent;\n \n &:hover {\n color: var(--", "-color-text-tertiary);\n background-color: transparent;\n }\n}\n\n.", "-radio-button-wrapper-checked.", "-radio-button-wrapper-disabled {\n color: var(--", "-color-text-tertiary);\n background-color: var(--", "-color-fill-tertiary);\n \n &:hover {\n color: var(--", "-color-text-tertiary);\n background-color: var(--", "-color-fill-tertiary);\n }\n}\n"])), function (p) {
|
|
5
5
|
return p.antPrefix;
|
|
6
6
|
}, function (p) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
4
|
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n/* No styles needed for Result component */\n"])));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
3
|
+
import createGlobalStyle from "../../../../libs/createStyle";
|
|
4
4
|
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.spark-editor-var-tag {\n padding: 0 6px;\n line-height: 24px;\n font-size: 12px;\n margin: 0 2px;\n background: rgba(205, 208, 220, 0.2);\n border-radius: 6px;\n height: 24px;\n display: inline-block;\n}\n"])));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
4
|
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.text-editor {\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n border-radius: 5px;\n \n &-content {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n }\n \n .text-editor-content {\n display: flex;\n flex-direction: column;\n gap: 6px;\n \n div[data-slate-node=\"element\"] {\n margin: 0px !important;\n }\n }\n}\n\n/* \u6587\u672C\u65E0\u6CD5\u9009\u4E2D\u7684\u6837\u5F0F */\n.text-editor-user-select-none {\n user-select: none;\n}\n"])));
|
|
@@ -16,17 +16,19 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
16
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
18
|
export default function SliderSelector(props) {
|
|
19
|
-
var _props$sliderProps;
|
|
19
|
+
var _props$sliderProps, _Object$keys;
|
|
20
20
|
var _getCommonConfig = getCommonConfig(),
|
|
21
21
|
sparkPrefix = _getCommonConfig.sparkPrefix;
|
|
22
|
+
console.log('debug sparkPrefix in SliderSelector', sparkPrefix);
|
|
22
23
|
var styles = props.styles,
|
|
23
24
|
classNames = props.classNames,
|
|
24
25
|
sliderProps = props.sliderProps,
|
|
25
26
|
inputNumberProps = props.inputNumberProps,
|
|
26
27
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
27
28
|
var Style = useStyle();
|
|
28
|
-
var
|
|
29
|
-
var
|
|
29
|
+
var originalMarks = props.marks || ((_props$sliderProps = props.sliderProps) === null || _props$sliderProps === void 0 ? void 0 : _props$sliderProps.marks) || null;
|
|
30
|
+
var mergedMarks = originalMarks || _defineProperty(_defineProperty({}, props.min, props.min), props.max, props.max);
|
|
31
|
+
var hasMarks = originalMarks && ((_Object$keys = Object.keys(originalMarks)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) > 0;
|
|
30
32
|
var onNumberChange = function onNumberChange(val) {
|
|
31
33
|
/**InputNumber为受控组件,会导致min和max失效,所以需要手动处理 */
|
|
32
34
|
var numVal = typeof val === 'string' ? parseFloat(val) : val;
|
|
@@ -45,7 +47,7 @@ export default function SliderSelector(props) {
|
|
|
45
47
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
46
48
|
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsxs("div", {
|
|
47
49
|
style: styles === null || styles === void 0 ? void 0 : styles.wrapper,
|
|
48
|
-
className: classnames("".concat(sparkPrefix, "-slider-
|
|
50
|
+
className: classnames("".concat(sparkPrefix, "-slider-input"), _defineProperty({}, "".concat(sparkPrefix, "-slider-input-has-marks"), hasMarks), classNames === null || classNames === void 0 ? void 0 : classNames.wrapper),
|
|
49
51
|
onMouseUp: function onMouseUp() {
|
|
50
52
|
var _props$onBlur;
|
|
51
53
|
// @ts-ignore
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
4
|
-
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-slider-
|
|
3
|
+
import createGlobalStyle from "../../../../libs/createStyle";
|
|
4
|
+
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-slider-input {\n display: flex;\n gap: 16px;\n height: 32px;\n box-sizing: content-box;\n align-items: center;\n &.", "-slider-input-has-marks {\n padding: 12px;\n }\n .", "-slider {\n flex: 1;\n \n &.", "-slider-horizontal.", "-slider-with-marks {\n margin: 0;\n }\n }\n \n .", "-input-number {\n height: 100%;\n }\n \n .", "-input-number .", "-input-number-outlined {\n margin-top: 16px;\n }\n \n .", "-slider-dot {\n opacity: 0;\n }\n}\n"])), function (p) {
|
|
5
5
|
return p.sparkPrefix;
|
|
6
6
|
}, function (p) {
|
|
7
7
|
return p.sparkPrefix;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
4
|
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-slider.", "-slider.", "-slider-no-marks {\n margin: 0;\n}\n"])), function (p) {
|
|
5
5
|
return p.antPrefix;
|
|
6
6
|
}, function (p) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
4
|
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-slider-selector {\n display: flex;\n gap: 16px;\n height: 32px;\n margin: 12px;\n \n .", "-slider {\n flex: 1;\n \n &.", "-slider-horizontal.", "-slider-with-marks {\n margin: 0;\n }\n }\n \n .", "-input-number {\n flex: 1;\n width: 100%;\n height: 100%;\n }\n \n .", "-input-number .", "-input-number-outlined {\n margin-top: 16px;\n }\n \n .", "-slider-dot {\n opacity: 0;\n }\n}\n"])), function (p) {
|
|
5
5
|
return p.sparkPrefix;
|
|
6
6
|
}, function (p) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
4
|
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n@keyframes loading {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.", "-spinner {\n display: inline-block;\n \n .", "-indicator {\n display: flex;\n justify-content: center;\n align-items: center;\n \n .", "-default-indicator {\n width: 40px;\n height: 40px;\n animation: loading 1s linear infinite;\n }\n }\n \n .", "-title {\n margin-top: 12px;\n font-weight: 400;\n font-size: 14px;\n color: var(--", "-color-text);\n }\n}\n\n.", "-spinner-overlay {\n position: relative;\n display: inline-block;\n \n .", "-spinner-content.", "-spinning {\n position: relative;\n opacity: 0.3;\n }\n \n .", "-spinner {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n z-index: 4;\n }\n}\n\n/* \n.", "-spinner-mask {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n z-index: 4;\n}\n\n.", "-indicator {\n margin-bottom: 8px;\n}\n\n.", "-title {\n color: var(--", "-color-text);\n}\n*/\n"])), function (p) {
|
|
5
5
|
return p.sparkPrefix;
|
|
6
6
|
}, function (p) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
4
|
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-statistic {\n .", "-statistic-title {\n color: var(--", "-color-text-tertiary);\n line-height: 24px;\n margin-bottom: 0;\n }\n \n .", "-statistic-content {\n color: var(--", "-color-text);\n line-height: 36px;\n }\n}\n"])), function (p) {
|
|
5
5
|
return p.antPrefix;
|
|
6
6
|
}, function (p) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
4
|
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-steps {\n .", "-steps-item-container {\n display: flex;\n flex-direction: row;\n }\n \n .", "-steps-item:not(.", "-steps-item-active):not(.", "-steps-item-process) {\n .", "-steps-item-container {\n &:hover {\n .", "-steps-item-icon {\n border-color: transparent !important;\n }\n }\n }\n }\n \n .", "-steps-item-icon {\n font-size: 14px;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--", "-color-border-secondary);\n }\n \n .", "-steps-item-finish {\n .", "-steps-item-icon {\n height: 20px !important;\n }\n \n .", "-steps-icon {\n max-width: 20px;\n max-height: 20px;\n font-size: 16px !important;\n line-height: 20px !important;\n top: -0.5px !important;\n \n .", "-finish-icon {\n background-color: var(--", "-color-primary-bg);\n border-radius: 50%;\n font-size: 16px !important;\n width: 20px;\n height: 20px;\n color: var(--", "-color-primary);\n }\n }\n }\n \n .", "-steps-item-title {\n padding-inline-end: 8px;\n line-height: 20px;\n color: var(--", "-color-text) !important;\n font-size: 14px;\n font-weight: 500;\n \n &::after {\n background-color: var(--", "-color-border-secondary) !important;\n height: 1px;\n background: var(--", "-color-border-secondary);\n }\n }\n \n .", "-steps-item-description {\n font-size: 12px;\n line-height: 20px;\n color: var(--", "-color-text-tertiary) !important;\n }\n \n .", "-steps-item-wait {\n .", "-steps-item-icon {\n background-color: var(--", "-color-primary-bg);\n }\n }\n \n &.", "-steps-horizontal:not(.", "-steps-label-vertical) {\n .", "-steps-item {\n padding-inline-start: 8px;\n }\n }\n}\n\n.", "-steps-vertical {\n display: flex;\n min-height: 182px;\n align-items: center;\n justify-content: center;\n \n .", "-steps-item {\n .", "-steps-item-icon {\n margin-inline-end: 9px !important;\n }\n }\n \n .", "-steps-item-tail::after {\n width: 1px !important;\n background-color: var(--", "-color-border-secondary) !important;\n }\n}\n"])), function (p) {
|
|
5
5
|
return p.sparkPrefix;
|
|
6
6
|
}, function (p) {
|
|
@@ -8,7 +8,6 @@ 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 { Flex, Switch } from 'antd';
|
|
11
|
-
import classNames from 'classnames';
|
|
12
11
|
import { getCommonConfig } from "../../../config";
|
|
13
12
|
import { useStyle } from "./index.style";
|
|
14
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -25,9 +24,10 @@ export default (function (props) {
|
|
|
25
24
|
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsxs(Flex, {
|
|
26
25
|
align: "center",
|
|
27
26
|
gap: 8,
|
|
27
|
+
className: className,
|
|
28
28
|
children: [/*#__PURE__*/_jsx(Switch, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
29
|
-
className:
|
|
30
|
-
})), /*#__PURE__*/_jsx("span", {
|
|
29
|
+
className: "".concat(sparkPrefix, "-switch")
|
|
30
|
+
})), label && /*#__PURE__*/_jsx("span", {
|
|
31
31
|
className: "".concat(sparkPrefix, "-switch-label"),
|
|
32
32
|
children: label
|
|
33
33
|
})]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
4
|
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-switch {\n background: var(--", "-color-primary-bg);\n background-image: none !important;\n \n &.", "-switch-checked {\n background: var(--", "-color-primary);\n }\n \n &.", "-switch-disabled {\n opacity: 1;\n background: var(--", "-color-fill-disable);\n \n &.", "-switch-checked {\n background: var(--", "-color-primary-border-hover);\n }\n }\n}\n\n.", "-switch-label {\n font-size: 14px;\n font-weight: 500;\n}\n"])), function (p) {
|
|
5
5
|
return p.sparkPrefix;
|
|
6
6
|
}, function (p) {
|
|
@@ -25,15 +25,7 @@ var App = function App() {
|
|
|
25
25
|
var columns = [{
|
|
26
26
|
title: 'Title',
|
|
27
27
|
dataIndex: 'title',
|
|
28
|
-
key: 'title'
|
|
29
|
-
render: function render(text) {
|
|
30
|
-
return /*#__PURE__*/_jsx("span", {
|
|
31
|
-
style: {
|
|
32
|
-
fontWeight: 500
|
|
33
|
-
},
|
|
34
|
-
children: text
|
|
35
|
-
});
|
|
36
|
-
}
|
|
28
|
+
key: 'title'
|
|
37
29
|
}, {
|
|
38
30
|
title: 'Content',
|
|
39
31
|
dataIndex: 'content',
|
|
@@ -31,15 +31,7 @@ var App = function App() {
|
|
|
31
31
|
var columns = [{
|
|
32
32
|
title: 'Title',
|
|
33
33
|
dataIndex: 'title',
|
|
34
|
-
key: 'title'
|
|
35
|
-
render: function render(text) {
|
|
36
|
-
return /*#__PURE__*/_jsx("span", {
|
|
37
|
-
style: {
|
|
38
|
-
fontWeight: 500
|
|
39
|
-
},
|
|
40
|
-
children: text
|
|
41
|
-
});
|
|
42
|
-
}
|
|
34
|
+
key: 'title'
|
|
43
35
|
}, {
|
|
44
36
|
title: 'Content',
|
|
45
37
|
dataIndex: 'content',
|
|
@@ -31,15 +31,7 @@ var App = function App() {
|
|
|
31
31
|
var columns = [{
|
|
32
32
|
title: 'Title',
|
|
33
33
|
dataIndex: 'title',
|
|
34
|
-
key: 'title'
|
|
35
|
-
render: function render(text) {
|
|
36
|
-
return /*#__PURE__*/_jsx("span", {
|
|
37
|
-
style: {
|
|
38
|
-
fontWeight: 500
|
|
39
|
-
},
|
|
40
|
-
children: text
|
|
41
|
-
});
|
|
42
|
-
}
|
|
34
|
+
key: 'title'
|
|
43
35
|
}, {
|
|
44
36
|
title: 'Content',
|
|
45
37
|
dataIndex: 'content',
|
|
@@ -33,15 +33,7 @@ var App = function App() {
|
|
|
33
33
|
}, {
|
|
34
34
|
title: 'Title',
|
|
35
35
|
dataIndex: 'title',
|
|
36
|
-
key: 'title'
|
|
37
|
-
render: function render(text) {
|
|
38
|
-
return /*#__PURE__*/_jsx("span", {
|
|
39
|
-
style: {
|
|
40
|
-
fontWeight: 500
|
|
41
|
-
},
|
|
42
|
-
children: text
|
|
43
|
-
});
|
|
44
|
-
}
|
|
36
|
+
key: 'title'
|
|
45
37
|
}, {
|
|
46
38
|
title: 'Content',
|
|
47
39
|
dataIndex: 'content',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TableProps } from 'antd';
|
|
2
|
-
export default function
|
|
2
|
+
export default function Table<T = any>(props: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,7 +15,7 @@ import { useStyle } from "./index.style";
|
|
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
16
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
17
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
-
export default function
|
|
18
|
+
export default function Table(props) {
|
|
19
19
|
var _columns;
|
|
20
20
|
var commonConfig = getCommonConfig();
|
|
21
21
|
var sparkPrefix = commonConfig.sparkPrefix;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
4
|
-
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-table {\n &.", "-table-wrapper {\n .", "-table-container {\n .", "-table-thead > tr > th {\n padding: 8px 20px;\n font-weight: 400;\n color: var(--", "-color-text-secondary);\n }\n \n table > thead > tr:first-child > *:first-child {\n border-start-start-radius: 0;\n }\n \n table > thead > tr:first-child > *:last-child {\n border-start-end-radius: 0;\n }\n \n .", "-table-thead > tr > th:not(:last-child):not(.
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
|
+
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-table {\n &.", "-table-wrapper {\n .", "-table-container {\n .", "-table-thead > tr > th {\n padding: 8px 20px;\n font-weight: 400;\n color: var(--", "-color-text-secondary);\n }\n \n table > thead > tr:first-child > *:first-child {\n border-start-start-radius: 0;\n }\n \n table > thead > tr:first-child > *:last-child {\n border-start-end-radius: 0;\n }\n \n .", "-table-thead > tr > th:not(:last-child):not(.", "-table-selection-column):not(.", "-table-row-expand-icon-cell):not([colspan])::before {\n display: none;\n }\n \n .", "-table-tbody > tr > td {\n padding: 16px 20px;\n }\n \n .", "-table-tbody > tr {\n & > td:not(.", "-table-selection-column):first-child,\n & > td.", "-table-selection-column + td:not(\n .", "-table-selection-column) {\n font-weight: 500;\n }\n }\n }\n \n .", "-table-small {\n .", "-table-tbody > tr > td {\n padding: 8px 20px;\n }\n }\n }\n}\n"])), function (p) {
|
|
5
5
|
return p.sparkPrefix;
|
|
6
6
|
}, function (p) {
|
|
7
7
|
return p.antPrefix;
|
|
@@ -15,4 +15,20 @@ export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _t
|
|
|
15
15
|
return p.antPrefix;
|
|
16
16
|
}, function (p) {
|
|
17
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;
|
|
18
34
|
});
|
|
@@ -69,7 +69,9 @@ var SparkTabs = function SparkTabs(props) {
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
72
|
-
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(Tabs, _objectSpread({},
|
|
72
|
+
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(Tabs, _objectSpread(_objectSpread({}, props), {}, {
|
|
73
|
+
type: type
|
|
74
|
+
}))]
|
|
73
75
|
});
|
|
74
76
|
};
|
|
75
77
|
SparkTabs.TabPane = Tabs.TabPane;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
4
|
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-tabs {\n .", "-tabs-tab.", "-tabs-tab-active .", "-tabs-tab-btn {\n color: var(--", "-color-text);\n font-weight: 500;\n }\n \n .", "-tabs-tab .", "-tabs-tab-btn {\n color: var(--", "-color-text);\n font-weight: 400;\n }\n \n .", "-tabs-ink-bar {\n background: var(--", "-color-primary);\n }\n}\n\n.", "-tabs-nav::before {\n display: none !important;\n}\n\n.", "-segmented-item {\n &::after {\n background: none !important;\n opacity: 1 !important;\n }\n \n .", "-segmented-item-label {\n font-weight: 500;\n color: var(--", "-color-text);\n }\n}\n\n.", "-segmented-tab-bar {\n margin-bottom: 16px;\n background: var(--", "-color-fill-tertiary);\n align-self: baseline;\n \n &.", "-segmented-tab-bar-centered {\n align-self: center;\n }\n}\n"])), function (p) {
|
|
5
5
|
return p.antPrefix;
|
|
6
6
|
}, function (p) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
4
|
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-tag {\n font-weight: 500;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n \n .", "-tag-close-icon {\n margin-left: 0;\n }\n}\n\n.", "-tag-small {\n height: 20px;\n font-size: 12px;\n padding: 0 4px;\n}\n\n.", "-tag-middle {\n height: 24px;\n font-size: 14px;\n padding: 0 6px;\n}\n\n.", "-tag-purple {\n color: var(--", "-color-purple);\n background: var(--", "-color-purple-bg);\n}\n\n.", "-tag-pink {\n color: var(--", "-color-pink);\n background: var(--", "-color-pink-bg);\n}\n\n.", "-tag-yellow {\n color: var(--", "-color-yellow);\n background: var(--", "-color-yellow-bg);\n}\n\n.", "-tag-teal {\n color: var(--", "-color-teal);\n background: var(--", "-color-teal-bg);\n}\n\n.", "-tag-blue {\n color: var(--", "-color-blue);\n background: var(--", "-color-blue-bg);\n}\n\n.", "-tag-mauve {\n color: var(--", "-color-mauve);\n background: var(--", "-color-mauve-bg);\n}\n\n.", "-tag-transparent {\n color: var(--", "-color-text-tertiary);\n background: transparent;\n border-color: var(--", "-color-border-secondary);\n}\n"])), function (p) {
|
|
5
5
|
return p.sparkPrefix;
|
|
6
6
|
}, function (p) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
4
|
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-picker {\n border-color: var(--", "-color-border-secondary);\n background-color: var(--", "-color-bg-base);\n \n &.", "-picker-disabled {\n color: var(--", "-color-text-quaternary);\n border-color: var(--", "-color-border-secondary) !important;\n background-color: var(--", "-color-fill-tertiary) !important;\n \n .", "-picker-suffix {\n color: var(--", "-color-text-quaternary) !important;\n }\n }\n \n .", "-picker-suffix {\n margin-left: 8px;\n color: var(--", "-color-text-tertiary) !important;\n }\n \n .", "-picker-clear {\n margin-right: 3px;\n }\n \n .", "-picker-range-separator {\n display: flex;\n \n .", "-picker-separator {\n width: 8px;\n height: 1px;\n background: var(--", "-color-text-tertiary);\n \n .anticon {\n display: none;\n }\n }\n }\n}\n\n.", "-picker-dropdown {\n .", "-picker-panel-container {\n border: 1px solid var(--", "-color-border-secondary);\n }\n \n .", "-picker-range-arrow {\n display: none !important;\n }\n \n .", "-picker-time-panel-column > li.", "-picker-time-panel-cell-selected {\n .", "-picker-time-panel-cell-inner {\n background: var(--", "-color-primary-bg);\n }\n }\n \n .", "-picker-now-btn {\n color: var(--", "-color-primary);\n }\n}\n"])), function (p) {
|
|
5
5
|
return p.sparkPrefix;
|
|
6
6
|
}, function (p) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
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/
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
4
|
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n/* \u9ED8\u8BA4\u6DF1\u8272 */\n.", "-tooltip-content {\n .", "-tooltip-inner {\n border: 1px solid transparent;\n padding: 6px 12px;\n background: var(--", "-color-text-base);\n color: var(--", "-color-bg-base);\n }\n}\n\n/* \u6D45\u8272\u6A21\u5F0F */\n.", "-tooltip-light {\n .", "-tooltip-content .", "-tooltip-inner {\n background: var(--", "-color-bg-base);\n color: var(--", "-color-text);\n }\n \n .", "-tooltip-arrow {\n &::after {\n background: var(--", "-color-bg-base);\n }\n }\n}\n"])), function (p) {
|
|
5
5
|
return p.antPrefix;
|
|
6
6
|
}, function (p) {
|