@agentscope-ai/design 1.0.8 → 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.
Files changed (198) hide show
  1. package/lib/antd/styles/alert.style.d.ts +2 -10
  2. package/lib/antd/styles/alert.style.js +11 -12
  3. package/lib/antd/styles/breadcrumb.style.d.ts +2 -18
  4. package/lib/antd/styles/breadcrumb.style.js +13 -15
  5. package/lib/antd/styles/button.style.d.ts +2 -80
  6. package/lib/antd/styles/button.style.js +63 -47
  7. package/lib/antd/styles/dropdown.style.d.ts +2 -15
  8. package/lib/antd/styles/dropdown.style.js +27 -16
  9. package/lib/antd/styles/floatButton.style.d.ts +2 -8
  10. package/lib/antd/styles/floatButton.style.js +13 -12
  11. package/lib/antd/styles/index.style.d.ts +4 -18
  12. package/lib/antd/styles/index.style.js +52 -53
  13. package/lib/antd/styles/inputNumber.style.d.ts +2 -18
  14. package/lib/antd/styles/inputNumber.style.js +23 -17
  15. package/lib/antd/styles/message.style.d.ts +2 -5
  16. package/lib/antd/styles/message.style.js +9 -10
  17. package/lib/antd/styles/notification.style.d.ts +2 -46
  18. package/lib/antd/styles/notification.style.js +31 -29
  19. package/lib/antd/styles/popover.style.d.ts +2 -13
  20. package/lib/antd/styles/popover.style.js +15 -14
  21. package/lib/antd/styles/radio.style.d.ts +2 -24
  22. package/lib/antd/styles/radio.style.js +29 -18
  23. package/lib/antd/styles/segment.style.d.ts +2 -7
  24. package/lib/antd/styles/segment.style.js +11 -12
  25. package/lib/antd/styles/select.style.d.ts +2 -31
  26. package/lib/antd/styles/select.style.js +51 -28
  27. package/lib/antd/styles/slider.style.d.ts +2 -22
  28. package/lib/antd/styles/slider.style.js +19 -21
  29. package/lib/antd/styles/table.style.d.ts +2 -5
  30. package/lib/antd/styles/table.style.js +7 -10
  31. package/lib/antd/styles/tooltip.style.d.ts +2 -8
  32. package/lib/antd/styles/tooltip.style.js +13 -11
  33. package/lib/antd/themes/bailianTheme.json +1 -1
  34. package/lib/antd/themes/generateThemeByToken.js +1 -1
  35. package/lib/components/commonComponents/AlertDialog/demo/demo1.js +13 -79
  36. package/lib/components/commonComponents/AlertDialog/demo/demo2.js +44 -64
  37. package/lib/components/commonComponents/AlertDialog/index.d.ts +14 -1
  38. package/lib/components/commonComponents/AlertDialog/index.js +25 -17
  39. package/lib/components/commonComponents/AlertDialog/index.style.d.ts +1 -17
  40. package/lib/components/commonComponents/AlertDialog/index.style.js +16 -30
  41. package/lib/components/commonComponents/Anchor/demo/demo1.d.ts +0 -4
  42. package/lib/components/commonComponents/Anchor/demo/demo1.js +3 -4
  43. package/lib/components/commonComponents/Anchor/demo/demo2.d.ts +0 -4
  44. package/lib/components/commonComponents/Anchor/demo/demo2.js +3 -5
  45. package/lib/components/commonComponents/Anchor/index.js +7 -3
  46. package/lib/components/commonComponents/Anchor/index.style.d.ts +1 -14
  47. package/lib/components/commonComponents/Anchor/index.style.js +18 -23
  48. package/lib/components/commonComponents/Avatar/index.js +11 -7
  49. package/lib/components/commonComponents/Avatar/index.style.d.ts +1 -7
  50. package/lib/components/commonComponents/Avatar/index.style.js +6 -21
  51. package/lib/components/commonComponents/Breadcrumb/index.js +9 -6
  52. package/lib/components/commonComponents/Breadcrumb/index.style.d.ts +1 -117
  53. package/lib/components/commonComponents/Breadcrumb/index.style.js +32 -61
  54. package/lib/components/commonComponents/Card/index.js +23 -20
  55. package/lib/components/commonComponents/Card/index.style.d.ts +1 -71
  56. package/lib/components/commonComponents/Card/index.style.js +24 -46
  57. package/lib/components/commonComponents/Checkbox/index.js +13 -10
  58. package/lib/components/commonComponents/Checkbox/index.style.d.ts +1 -34
  59. package/lib/components/commonComponents/Checkbox/index.style.js +50 -38
  60. package/lib/components/commonComponents/CodeBlock/index.js +13 -12
  61. package/lib/components/commonComponents/CodeBlock/index.style.d.ts +1 -354
  62. package/lib/components/commonComponents/CodeBlock/index.style.js +26 -72
  63. package/lib/components/commonComponents/Collapse/index.js +7 -3
  64. package/lib/components/commonComponents/Collapse/index.style.d.ts +1 -57
  65. package/lib/components/commonComponents/Collapse/index.style.js +34 -47
  66. package/lib/components/commonComponents/CollapsePanel/index.d.ts +10 -0
  67. package/lib/components/commonComponents/CollapsePanel/index.js +56 -44
  68. package/lib/components/commonComponents/CollapsePanel/index.style.d.ts +1 -287
  69. package/lib/components/commonComponents/CollapsePanel/index.style.js +42 -97
  70. package/lib/components/commonComponents/ConfigProvider/index.js +11 -8
  71. package/lib/components/commonComponents/DatePicker/index.js +45 -39
  72. package/lib/components/commonComponents/DatePicker/index.style.d.ts +1 -102
  73. package/lib/components/commonComponents/DatePicker/index.style.js +66 -61
  74. package/lib/components/commonComponents/Descriptions/index.js +14 -10
  75. package/lib/components/commonComponents/Descriptions/index.style.d.ts +1 -17
  76. package/lib/components/commonComponents/Descriptions/index.style.js +32 -29
  77. package/lib/components/commonComponents/Drawer/Confirm.d.ts +1 -1
  78. package/lib/components/commonComponents/Drawer/Confirm.js +26 -24
  79. package/lib/components/commonComponents/Drawer/index.js +15 -11
  80. package/lib/components/commonComponents/Drawer/index.style.d.ts +1 -84
  81. package/lib/components/commonComponents/Drawer/index.style.js +44 -54
  82. package/lib/components/commonComponents/Dropdown/index.d.ts +1 -2
  83. package/lib/components/commonComponents/Dropdown/index.js +15 -12
  84. package/lib/components/commonComponents/Dropdown/index.style.d.ts +1 -78
  85. package/lib/components/commonComponents/Dropdown/index.style.js +48 -40
  86. package/lib/components/commonComponents/EllipsisTip/index.js +14 -10
  87. package/lib/components/commonComponents/EllipsisTip/index.style.d.ts +1 -10
  88. package/lib/components/commonComponents/EllipsisTip/index.style.js +6 -24
  89. package/lib/components/commonComponents/Empty/index.js +46 -44
  90. package/lib/components/commonComponents/Empty/index.style.d.ts +1 -113
  91. package/lib/components/commonComponents/Empty/index.style.js +22 -51
  92. package/lib/components/commonComponents/FileIcon/index.js +27 -24
  93. package/lib/components/commonComponents/FileIcon/index.style.d.ts +1 -61
  94. package/lib/components/commonComponents/FileIcon/index.style.js +20 -42
  95. package/lib/components/commonComponents/FloatButton/demo/demo1.js +1 -1
  96. package/lib/components/commonComponents/FloatButton/demo/demo2.js +1 -1
  97. package/lib/components/commonComponents/Form/index.js +6 -5
  98. package/lib/components/commonComponents/Form/index.style.d.ts +1 -53
  99. package/lib/components/commonComponents/Form/index.style.js +26 -38
  100. package/lib/components/commonComponents/HelpIcon/index.js +25 -20
  101. package/lib/components/commonComponents/HelpIcon/index.style.d.ts +1 -16
  102. package/lib/components/commonComponents/HelpIcon/index.style.js +16 -29
  103. package/lib/components/commonComponents/IconButton/index.js +15 -11
  104. package/lib/components/commonComponents/IconButton/index.style.d.ts +1 -11
  105. package/lib/components/commonComponents/IconButton/index.style.js +10 -24
  106. package/lib/components/commonComponents/IconFont/index.d.ts +1 -2
  107. package/lib/components/commonComponents/IconFont/index.js +14 -9
  108. package/lib/components/commonComponents/IconFont/index.style.d.ts +1 -67
  109. package/lib/components/commonComponents/IconFont/index.style.js +14 -44
  110. package/lib/components/commonComponents/Image/index.js +8 -5
  111. package/lib/components/commonComponents/Image/index.style.d.ts +1 -22
  112. package/lib/components/commonComponents/Image/index.style.js +16 -30
  113. package/lib/components/commonComponents/Input/index.js +17 -11
  114. package/lib/components/commonComponents/Input/index.style.d.ts +1 -70
  115. package/lib/components/commonComponents/Input/index.style.js +46 -42
  116. package/lib/components/commonComponents/Modal/index.js +19 -16
  117. package/lib/components/commonComponents/Modal/index.style.d.ts +1 -111
  118. package/lib/components/commonComponents/Modal/index.style.js +54 -72
  119. package/lib/components/commonComponents/Pagination/index.d.ts +1 -1
  120. package/lib/components/commonComponents/Pagination/index.js +36 -31
  121. package/lib/components/commonComponents/Pagination/index.style.d.ts +1 -49
  122. package/lib/components/commonComponents/Pagination/index.style.js +26 -42
  123. package/lib/components/commonComponents/Popconfirm/demo/demo1.js +13 -0
  124. package/lib/components/commonComponents/Popconfirm/demo/demo2.d.ts +3 -0
  125. package/lib/components/commonComponents/Popconfirm/demo/demo2.js +49 -0
  126. package/lib/components/commonComponents/Popconfirm/index.d.ts +9 -2
  127. package/lib/components/commonComponents/Popconfirm/index.js +50 -8
  128. package/lib/components/commonComponents/PromptsEditor/index.js +2 -2
  129. package/lib/components/commonComponents/RadioButton/index.js +9 -10
  130. package/lib/components/commonComponents/RadioButton/index.style.d.ts +1 -72
  131. package/lib/components/commonComponents/RadioButton/index.style.js +52 -63
  132. package/lib/components/commonComponents/Result/index.style.d.ts +1 -3
  133. package/lib/components/commonComponents/Result/index.style.js +4 -16
  134. package/lib/components/commonComponents/Select/demo/demo2.js +0 -1
  135. package/lib/components/commonComponents/SlateEditor/elements/Var.js +11 -8
  136. package/lib/components/commonComponents/SlateEditor/elements/index.style.d.ts +1 -14
  137. package/lib/components/commonComponents/SlateEditor/elements/index.style.js +4 -21
  138. package/lib/components/commonComponents/SlateEditor/index.js +34 -31
  139. package/lib/components/commonComponents/SlateEditor/index.style.d.ts +1 -28
  140. package/lib/components/commonComponents/SlateEditor/index.style.js +4 -36
  141. package/lib/components/commonComponents/Slider/{slider.input.d.ts → Input/index.d.ts} +1 -1
  142. package/lib/components/commonComponents/Slider/Input/index.js +91 -0
  143. package/lib/components/commonComponents/Slider/Input/index.style.d.ts +1 -0
  144. package/lib/components/commonComponents/Slider/Input/index.style.js +22 -0
  145. package/lib/components/commonComponents/Slider/demo/demo4.d.ts +3 -0
  146. package/lib/components/commonComponents/Slider/demo/demo4.js +33 -0
  147. package/lib/components/commonComponents/Slider/demo/demo5.d.ts +3 -0
  148. package/lib/components/commonComponents/Slider/demo/demo5.js +34 -0
  149. package/lib/components/commonComponents/Slider/index.d.ts +2 -2
  150. package/lib/components/commonComponents/Slider/index.js +11 -7
  151. package/lib/components/commonComponents/Slider/index.style.d.ts +1 -7
  152. package/lib/components/commonComponents/Slider/index.style.js +10 -22
  153. package/lib/components/commonComponents/SliderSelector/index.js +38 -35
  154. package/lib/components/commonComponents/SliderSelector/index.style.d.ts +1 -38
  155. package/lib/components/commonComponents/SliderSelector/index.style.js +20 -37
  156. package/lib/components/commonComponents/Spinner/index.d.ts +4 -4
  157. package/lib/components/commonComponents/Spinner/index.js +28 -24
  158. package/lib/components/commonComponents/Spinner/index.style.d.ts +1 -79
  159. package/lib/components/commonComponents/Spinner/index.style.js +30 -61
  160. package/lib/components/commonComponents/Statistic/index.js +7 -3
  161. package/lib/components/commonComponents/Statistic/index.style.d.ts +1 -15
  162. package/lib/components/commonComponents/Statistic/index.style.js +14 -26
  163. package/lib/components/commonComponents/Steps/index.js +10 -6
  164. package/lib/components/commonComponents/Steps/index.style.d.ts +1 -162
  165. package/lib/components/commonComponents/Steps/index.style.js +68 -78
  166. package/lib/components/commonComponents/Switch/index.js +13 -10
  167. package/lib/components/commonComponents/Switch/index.style.d.ts +1 -25
  168. package/lib/components/commonComponents/Switch/index.style.js +22 -33
  169. package/lib/components/commonComponents/Table/index.js +10 -6
  170. package/lib/components/commonComponents/Table/index.style.d.ts +1 -52
  171. package/lib/components/commonComponents/Table/index.style.js +18 -32
  172. package/lib/components/commonComponents/Tabs/index.js +35 -29
  173. package/lib/components/commonComponents/Tabs/index.style.d.ts +1 -55
  174. package/lib/components/commonComponents/Tabs/index.style.js +38 -44
  175. package/lib/components/commonComponents/Tag/index.js +13 -9
  176. package/lib/components/commonComponents/Tag/index.style.d.ts +1 -56
  177. package/lib/components/commonComponents/Tag/index.style.js +54 -58
  178. package/lib/components/commonComponents/TimePicker/index.js +36 -30
  179. package/lib/components/commonComponents/TimePicker/index.style.d.ts +1 -71
  180. package/lib/components/commonComponents/TimePicker/index.style.js +54 -50
  181. package/lib/components/commonComponents/Tooltip/index.js +14 -10
  182. package/lib/components/commonComponents/Tooltip/index.style.d.ts +1 -24
  183. package/lib/components/commonComponents/Tooltip/index.style.js +26 -32
  184. package/lib/components/commonComponents/Upload/index.js +15 -9
  185. package/lib/components/commonComponents/Upload/index.style.d.ts +1 -125
  186. package/lib/components/commonComponents/Upload/index.style.js +80 -90
  187. package/lib/index.d.ts +3 -3
  188. package/lib/index.js +2 -2
  189. package/lib/libs/env/index.js +1 -1
  190. package/lib/libs/newCreateStyle/index.d.ts +7 -0
  191. package/lib/libs/newCreateStyle/index.js +26 -0
  192. package/llms/index.llms.txt +43 -43
  193. package/package.json +3 -3
  194. package/lib/components/commonComponents/Popconfirm/demo/demo.js +0 -155
  195. package/lib/components/commonComponents/Slider/slider.input.js +0 -76
  196. package/lib/components/commonComponents/spark.style.d.ts +0 -45
  197. package/lib/components/commonComponents/spark.style.js +0 -62
  198. /package/lib/components/commonComponents/Popconfirm/demo/{demo.d.ts → demo1.d.ts} +0 -0
@@ -8,17 +8,21 @@ import { getCommonConfig } from "../../..";
8
8
  import { Slider } from 'antd';
9
9
  import classNames from 'classnames';
10
10
  import React from 'react';
11
- import useIndexStyle from "./index.style";
12
- import SliderInput from "./slider.input";
11
+ import { useStyle } from "./index.style";
12
+ import SliderInput from "./Input";
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { Fragment as _Fragment } from "react/jsx-runtime";
15
+ import { jsxs as _jsxs } from "react/jsx-runtime";
14
16
  export var SparkSliderBasic = /*#__PURE__*/React.forwardRef(function (props, ref) {
15
17
  var _getCommonConfig = getCommonConfig(),
16
18
  sparkPrefix = _getCommonConfig.sparkPrefix;
17
- useIndexStyle();
18
- return /*#__PURE__*/_jsx(Slider, _objectSpread(_objectSpread({}, props), {}, {
19
- className: classNames("".concat(sparkPrefix, "-slider"), _defineProperty({}, "".concat(sparkPrefix, "-slider-no-marks"), !Object.keys(props.marks || {}).length), props.className),
20
- ref: ref
21
- }));
19
+ var Style = useStyle();
20
+ return /*#__PURE__*/_jsxs(_Fragment, {
21
+ children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(Slider, _objectSpread(_objectSpread({}, props), {}, {
22
+ className: classNames("".concat(sparkPrefix, "-slider"), _defineProperty({}, "".concat(sparkPrefix, "-slider-no-marks"), !Object.keys(props.marks || {}).length), props.className),
23
+ ref: ref
24
+ }))]
25
+ });
22
26
  });
23
27
  var SparkSlider = SparkSliderBasic;
24
28
  Object.assign(SparkSlider, {
@@ -1,7 +1 @@
1
- export declare function getIndexStyleData(params: any): {
2
- [x: string]: {
3
- margin: number;
4
- };
5
- };
6
- declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
7
- export default useIndexStyle;
1
+ export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
@@ -1,22 +1,10 @@
1
- var _excluded = ["css"];
2
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
- import createStyle from "../../../libs/createStyle";
9
- export function getIndexStyleData(params) {
10
- var sparkPrefix = params.sparkPrefix,
11
- antPrefix = params.antPrefix;
12
- return _defineProperty({}, ".".concat(antPrefix, "-slider.").concat(sparkPrefix, "-slider.").concat(sparkPrefix, "-slider-no-marks"), {
13
- margin: 0
14
- });
15
- }
16
- var useIndexStyle = createStyle(function (_ref2) {
17
- var css = _ref2.css,
18
- params = _objectWithoutProperties(_ref2, _excluded);
19
- var result = css(getIndexStyleData(params));
20
- return result;
21
- });
22
- 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.", "-slider.", "-slider.", "-slider-no-marks {\n margin: 0;\n}\n"])), function (p) {
5
+ return p.antPrefix;
6
+ }, function (p) {
7
+ return p.sparkPrefix;
8
+ }, function (p) {
9
+ return p.sparkPrefix;
10
+ });
@@ -7,13 +7,14 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
7
7
  import { getCommonConfig } from "../../../config";
8
8
  import { InputNumber, Slider } from "../../..";
9
9
  import cls from 'classnames';
10
- import useIndexStyle from "./index.style";
10
+ import { useStyle } from "./index.style";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { Fragment as _Fragment } from "react/jsx-runtime";
13
14
  export default function SliderSelector(props) {
14
15
  var _getCommonConfig = getCommonConfig(),
15
16
  sparkPrefix = _getCommonConfig.sparkPrefix;
16
- useIndexStyle();
17
+ var Style = useStyle();
17
18
  var onNumberChange = function onNumberChange(val) {
18
19
  /**InputNumber为受控组件,会导致min和max失效,所以需要手动处理 */
19
20
  var numVal = typeof val === 'string' ? parseFloat(val) : val;
@@ -29,43 +30,45 @@ export default function SliderSelector(props) {
29
30
  props.onChange(numVal);
30
31
  }
31
32
  };
32
- return /*#__PURE__*/_jsxs("div", {
33
- onMouseUp: function onMouseUp() {
34
- var _props$onBlur;
35
- return (_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 ? void 0 : _props$onBlur.call(props);
36
- },
37
- className: cls("".concat(sparkPrefix, "-slider-selector"), props.className),
38
- children: [/*#__PURE__*/_jsx(Slider, {
39
- disabled: props.disabled,
40
- onChange: onNumberChange,
41
- value: props.value === null ? undefined : props.value,
42
- min: props.min,
43
- max: props.max,
44
- step: props.step,
45
- marks: props.marks || _defineProperty(_defineProperty({}, props.min, props.min), props.max, props.max),
46
- tooltip: {
47
- getPopupContainer: function getPopupContainer(triggerNode) {
48
- return triggerNode;
49
- }
50
- }
51
- }), /*#__PURE__*/_jsx("div", {
52
- style: _objectSpread({
53
- width: '48px'
54
- }, props.inputNumberWrapperStyle),
55
- children: /*#__PURE__*/_jsx(InputNumber, {
33
+ return /*#__PURE__*/_jsxs(_Fragment, {
34
+ children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsxs("div", {
35
+ onMouseUp: function onMouseUp() {
36
+ var _props$onBlur;
37
+ return (_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 ? void 0 : _props$onBlur.call(props);
38
+ },
39
+ className: cls("".concat(sparkPrefix, "-slider-selector"), props.className),
40
+ children: [/*#__PURE__*/_jsx(Slider, {
56
41
  disabled: props.disabled,
57
- controls: false,
42
+ onChange: onNumberChange,
43
+ value: props.value === null ? undefined : props.value,
58
44
  min: props.min,
59
45
  max: props.max,
60
- onBlur: function onBlur() {
61
- var _props$onBlur2;
62
- return (_props$onBlur2 = props.onBlur) === null || _props$onBlur2 === void 0 ? void 0 : _props$onBlur2.call(props);
63
- },
64
46
  step: props.step,
65
- value: props.value,
66
- onChange: onNumberChange,
67
- precision: props.precision
68
- })
47
+ marks: props.marks || _defineProperty(_defineProperty({}, props.min, props.min), props.max, props.max),
48
+ tooltip: {
49
+ getPopupContainer: function getPopupContainer(triggerNode) {
50
+ return triggerNode;
51
+ }
52
+ }
53
+ }), /*#__PURE__*/_jsx("div", {
54
+ style: _objectSpread({
55
+ width: '48px'
56
+ }, props.inputNumberWrapperStyle),
57
+ children: /*#__PURE__*/_jsx(InputNumber, {
58
+ disabled: props.disabled,
59
+ controls: false,
60
+ min: props.min,
61
+ max: props.max,
62
+ onBlur: function onBlur() {
63
+ var _props$onBlur2;
64
+ return (_props$onBlur2 = props.onBlur) === null || _props$onBlur2 === void 0 ? void 0 : _props$onBlur2.call(props);
65
+ },
66
+ step: props.step,
67
+ value: props.value,
68
+ onChange: onNumberChange,
69
+ precision: props.precision
70
+ })
71
+ })]
69
72
  })]
70
73
  });
71
74
  }
@@ -1,38 +1 @@
1
- export declare function getIndexStyleData(params: any): {
2
- [x: string]: {
3
- [x: string]: string | {
4
- [x: string]: number | {
5
- margin: number;
6
- };
7
- flex: number;
8
- width?: undefined;
9
- height?: undefined;
10
- marginTop?: undefined;
11
- opacity?: undefined;
12
- } | {
13
- flex: number;
14
- width: string;
15
- height: string;
16
- marginTop?: undefined;
17
- opacity?: undefined;
18
- } | {
19
- marginTop: number;
20
- flex?: undefined;
21
- width?: undefined;
22
- height?: undefined;
23
- opacity?: undefined;
24
- } | {
25
- opacity: number;
26
- flex?: undefined;
27
- width?: undefined;
28
- height?: undefined;
29
- marginTop?: undefined;
30
- };
31
- display: string;
32
- gap: string;
33
- height: string;
34
- margin: string;
35
- };
36
- };
37
- declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
38
- export default useIndexStyle;
1
+ export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
@@ -1,37 +1,20 @@
1
- var _excluded = ["css"];
2
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
- import createStyle from "../../../libs/createStyle";
9
- export function getIndexStyleData(params) {
10
- var sparkPrefix = params.sparkPrefix,
11
- antPrefix = params.antPrefix;
12
- return _defineProperty({}, ".".concat(sparkPrefix, "-slider-selector"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
13
- display: 'flex',
14
- gap: '16px',
15
- height: '32px',
16
- margin: '12px'
17
- }, ".".concat(antPrefix, "-slider"), _defineProperty({
18
- flex: 1
19
- }, "&.".concat(antPrefix, "-slider-horizontal.").concat(antPrefix, "-slider-with-marks"), {
20
- margin: 0
21
- })), ".".concat(antPrefix, "-input-number"), {
22
- flex: 1,
23
- width: '100%',
24
- height: '100%'
25
- }), "".concat(antPrefix, "-input-number ").concat(antPrefix, "-input-number-outlined"), {
26
- marginTop: 16
27
- }), ".".concat(antPrefix, "-slider-dot"), {
28
- opacity: 0
29
- }));
30
- }
31
- var useIndexStyle = createStyle(function (_ref2) {
32
- var css = _ref2.css,
33
- params = _objectWithoutProperties(_ref2, _excluded);
34
- var result = css(getIndexStyleData(params));
35
- return result;
36
- });
37
- 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.", "-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
+ 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
+ });
@@ -7,8 +7,8 @@ export interface SparkSpinnerProps {
7
7
  */
8
8
  tip?: React.ReactNode;
9
9
  /**
10
- * @description 自定义indicator
11
- * @descriptionEn custom indicator
10
+ * @description 自定义indicator,用于展示progress的百分比和加载文案
11
+ * @descriptionEn custom indicator, used to show the percentage of progress and loading text
12
12
  * @default -
13
13
  */
14
14
  indicator?: React.ReactNode;
@@ -43,8 +43,8 @@ export interface SparkSpinnerProps {
43
43
  */
44
44
  spinning?: boolean;
45
45
  /**
46
- * @description 是否显示进度条
47
- * @descriptionEn show progress bar
46
+ * @description 是否显示进度条,如果为true,不需要手动在children中添加Progress组件
47
+ * @descriptionEn show progress bar, if true, you don't need to manually add Progress component in children
48
48
  * @default false
49
49
  */
50
50
  showProgress?: boolean;
@@ -5,7 +5,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
5
5
  import { getCommonConfig } from "../../../config";
6
6
  import { Progress, theme } from 'antd';
7
7
  import classNames from 'classnames';
8
- import useIndexStyle from "./index.style";
8
+ import { useStyle } from "./index.style";
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
11
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -19,7 +19,7 @@ export default (function (props) {
19
19
  var commonConfig = getCommonConfig();
20
20
  var sparkPrefix = commonConfig.sparkPrefix;
21
21
  var token = theme.useToken();
22
- useIndexStyle();
22
+ var Style = useStyle();
23
23
  var defaultIndicator = /*#__PURE__*/_jsxs("svg", {
24
24
  className: "".concat(sparkPrefix, "-default-indicator"),
25
25
  xmlns: "http://www.w3.org/2000/svg",
@@ -81,14 +81,31 @@ export default (function (props) {
81
81
  })]
82
82
  }) || null;
83
83
  if (children) {
84
- return /*#__PURE__*/_jsxs("div", {
85
- className: classNames("".concat(sparkPrefix, "-spinner-overlay"), className),
84
+ return /*#__PURE__*/_jsxs(_Fragment, {
85
+ children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsxs("div", {
86
+ className: classNames("".concat(sparkPrefix, "-spinner-overlay"), className),
87
+ style: style,
88
+ children: [/*#__PURE__*/_jsx("div", {
89
+ className: classNames("".concat(sparkPrefix, "-spinner-content"), _defineProperty({}, "".concat(sparkPrefix, "-spinning"), spinning)),
90
+ children: children
91
+ }), spinning && /*#__PURE__*/_jsxs("div", {
92
+ className: "".concat(sparkPrefix, "-spinner"),
93
+ children: [/*#__PURE__*/_jsx("div", {
94
+ className: "".concat(sparkPrefix, "-indicator"),
95
+ children: indicator || defaultIndicator
96
+ }), /*#__PURE__*/_jsx("div", {
97
+ className: "".concat(sparkPrefix, "-title"),
98
+ children: tip
99
+ })]
100
+ })]
101
+ })]
102
+ });
103
+ }
104
+ return /*#__PURE__*/_jsxs(_Fragment, {
105
+ children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx("div", {
106
+ className: classNames("".concat(sparkPrefix, "-spinner"), className),
86
107
  style: style,
87
- children: [/*#__PURE__*/_jsx("div", {
88
- className: classNames("".concat(sparkPrefix, "-spinner-content"), _defineProperty({}, "".concat(sparkPrefix, "-spinning"), spinning)),
89
- children: children
90
- }), spinning && /*#__PURE__*/_jsxs("div", {
91
- className: "".concat(sparkPrefix, "-spinner"),
108
+ children: spinning && /*#__PURE__*/_jsxs(_Fragment, {
92
109
  children: [/*#__PURE__*/_jsx("div", {
93
110
  className: "".concat(sparkPrefix, "-indicator"),
94
111
  children: indicator || defaultIndicator
@@ -96,20 +113,7 @@ export default (function (props) {
96
113
  className: "".concat(sparkPrefix, "-title"),
97
114
  children: tip
98
115
  })]
99
- })]
100
- });
101
- }
102
- return /*#__PURE__*/_jsx("div", {
103
- className: classNames("".concat(sparkPrefix, "-spinner"), className),
104
- style: style,
105
- children: spinning && /*#__PURE__*/_jsxs(_Fragment, {
106
- children: [/*#__PURE__*/_jsx("div", {
107
- className: "".concat(sparkPrefix, "-indicator"),
108
- children: indicator || defaultIndicator
109
- }), /*#__PURE__*/_jsx("div", {
110
- className: "".concat(sparkPrefix, "-title"),
111
- children: tip
112
- })]
113
- })
116
+ })
117
+ })]
114
118
  });
115
119
  });
@@ -1,79 +1 @@
1
- export declare function getIndexStyleData(params: any): {
2
- [x: string]: {
3
- '0%': {
4
- transform: string;
5
- };
6
- '100%': {
7
- transform: string;
8
- };
9
- display?: undefined;
10
- position?: undefined;
11
- } | {
12
- [x: string]: string | {
13
- [x: string]: string | {
14
- width: string;
15
- height: string;
16
- animation: string;
17
- };
18
- display: string;
19
- justifyContent: string;
20
- alignItems: string;
21
- marginTop?: undefined;
22
- fontWeight?: undefined;
23
- fontSize?: undefined;
24
- color?: undefined;
25
- } | {
26
- marginTop: string;
27
- fontWeight: number;
28
- fontSize: string;
29
- color: string;
30
- display?: undefined;
31
- justifyContent?: undefined;
32
- alignItems?: undefined;
33
- };
34
- display: string;
35
- '0%'?: undefined;
36
- '100%'?: undefined;
37
- position?: undefined;
38
- } | {
39
- [x: string]: string | {
40
- position: string;
41
- opacity: number;
42
- top?: undefined;
43
- left?: undefined;
44
- width?: undefined;
45
- height?: undefined;
46
- display?: undefined;
47
- justifyContent?: undefined;
48
- alignItems?: undefined;
49
- flexDirection?: undefined;
50
- zIndex?: undefined;
51
- } | {
52
- position: string;
53
- top: number;
54
- left: number;
55
- width: string;
56
- height: string;
57
- display: string;
58
- justifyContent: string;
59
- alignItems: string;
60
- flexDirection: string;
61
- zIndex: number;
62
- opacity?: undefined;
63
- };
64
- position: string;
65
- display: string;
66
- '0%'?: undefined;
67
- '100%'?: undefined;
68
- };
69
- '@keyframes loading': {
70
- '0%': {
71
- transform: string;
72
- };
73
- '100%': {
74
- transform: string;
75
- };
76
- };
77
- };
78
- declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
79
- export default useIndexStyle;
1
+ export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
@@ -1,61 +1,30 @@
1
- var _excluded = ["css"];
2
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
- import createStyle from "../../../libs/createStyle";
9
- export function getIndexStyleData(params) {
10
- var sparkPrefix = params.sparkPrefix,
11
- antPrefix = params.antPrefix;
12
- return _defineProperty(_defineProperty({
13
- '@keyframes loading': {
14
- '0%': {
15
- transform: 'rotate(0deg)'
16
- },
17
- '100%': {
18
- transform: 'rotate(360deg)'
19
- }
20
- }
21
- }, ".".concat(sparkPrefix, "-spinner"), _defineProperty(_defineProperty({
22
- display: 'inline-block'
23
- }, ".".concat(sparkPrefix, "-indicator"), _defineProperty({
24
- display: 'flex',
25
- justifyContent: 'center',
26
- alignItems: 'center'
27
- }, ".".concat(sparkPrefix, "-default-indicator"), {
28
- width: '40px',
29
- height: '40px',
30
- animation: 'loading 1s linear infinite'
31
- })), ".".concat(sparkPrefix, "-title"), {
32
- marginTop: '12px',
33
- fontWeight: 400,
34
- fontSize: '14px',
35
- color: "var(--".concat(antPrefix, "-color-text)")
36
- })), ".".concat(sparkPrefix, "-spinner-overlay"), _defineProperty(_defineProperty({
37
- position: 'relative',
38
- display: 'inline-block'
39
- }, ".".concat(sparkPrefix, "-spinner-content.").concat(sparkPrefix, "-spinning"), {
40
- position: 'relative',
41
- opacity: 0.3
42
- }), ".".concat(sparkPrefix, "-spinner"), {
43
- position: 'absolute',
44
- top: 0,
45
- left: 0,
46
- width: '100%',
47
- height: '100%',
48
- display: 'flex',
49
- justifyContent: 'center',
50
- alignItems: 'center',
51
- flexDirection: 'column',
52
- zIndex: 4
53
- }));
54
- }
55
- var useIndexStyle = createStyle(function (_ref2) {
56
- var css = _ref2.css,
57
- params = _objectWithoutProperties(_ref2, _excluded);
58
- var result = css(getIndexStyleData(params));
59
- return result;
60
- });
61
- 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@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
+ return p.sparkPrefix;
6
+ }, function (p) {
7
+ return p.sparkPrefix;
8
+ }, function (p) {
9
+ return p.sparkPrefix;
10
+ }, function (p) {
11
+ return p.sparkPrefix;
12
+ }, function (p) {
13
+ return p.antPrefix;
14
+ }, function (p) {
15
+ return p.sparkPrefix;
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.sparkPrefix;
24
+ }, function (p) {
25
+ return p.sparkPrefix;
26
+ }, function (p) {
27
+ return p.sparkPrefix;
28
+ }, function (p) {
29
+ return p.antPrefix;
30
+ });
@@ -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 { Statistic as AntdStatistic } from 'antd';
8
- import useIndexStyle from "./index.style";
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 Statistic = function Statistic(props) {
11
- useIndexStyle();
12
- return /*#__PURE__*/_jsx(AntdStatistic, _objectSpread({}, props));
13
+ var Style = useStyle();
14
+ return /*#__PURE__*/_jsxs(_Fragment, {
15
+ children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(AntdStatistic, _objectSpread({}, props))]
16
+ });
13
17
  };
14
18
  export default Statistic;
@@ -1,15 +1 @@
1
- export declare function getIndexStyleData(params: any): {
2
- [x: string]: {
3
- [x: string]: {
4
- color: string;
5
- lineHeight: string;
6
- marginBottom: number;
7
- } | {
8
- color: string;
9
- lineHeight: string;
10
- marginBottom?: undefined;
11
- };
12
- };
13
- };
14
- declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
15
- export default useIndexStyle;
1
+ export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;