@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
@@ -1,53 +1 @@
1
- export declare function getIndexStyleData(params: any): {
2
- [x: string]: {
3
- [x: string]: {
4
- color: string;
5
- lineHeight: number;
6
- marginTop: number;
7
- fontSize: string;
8
- textAlign?: undefined;
9
- } | {
10
- textAlign: string;
11
- color?: undefined;
12
- lineHeight?: undefined;
13
- marginTop?: undefined;
14
- fontSize?: undefined;
15
- };
16
- fontWeight?: undefined;
17
- whiteSpace?: undefined;
18
- fontSize?: undefined;
19
- lineHeight?: undefined;
20
- color?: undefined;
21
- gap?: undefined;
22
- minHeight?: undefined;
23
- } | {
24
- fontWeight: number;
25
- whiteSpace: string;
26
- fontSize: string;
27
- lineHeight: string;
28
- color: string;
29
- gap: string;
30
- minHeight?: undefined;
31
- } | {
32
- [x: string]: {
33
- marginRight: string;
34
- };
35
- fontWeight?: undefined;
36
- whiteSpace?: undefined;
37
- fontSize?: undefined;
38
- lineHeight?: undefined;
39
- color?: undefined;
40
- gap?: undefined;
41
- minHeight?: undefined;
42
- } | {
43
- minHeight: string;
44
- fontWeight?: undefined;
45
- whiteSpace?: undefined;
46
- fontSize?: undefined;
47
- lineHeight?: undefined;
48
- color?: undefined;
49
- gap?: undefined;
50
- };
51
- };
52
- declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
53
- export default useIndexStyle;
1
+ export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
@@ -1,38 +1,26 @@
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(_defineProperty(_defineProperty({}, ".".concat(sparkPrefix, "-form"), _defineProperty(_defineProperty({}, ".".concat(sparkPrefix, "-required-mark"), {
13
- color: "var(--".concat(antPrefix, "-color-error)"),
14
- lineHeight: 1,
15
- marginTop: 0,
16
- fontSize: '16px'
17
- }), ".".concat(antPrefix, "-form-item .").concat(antPrefix, "-form-item-label"), {
18
- textAlign: 'left'
19
- })), ".".concat(antPrefix, "-form-item .").concat(antPrefix, "-form-item-label > label"), {
20
- fontWeight: 500,
21
- whiteSpace: 'normal',
22
- fontSize: '13px',
23
- lineHeight: '20px',
24
- color: "var(--".concat(antPrefix, "-color-text)"),
25
- gap: '4px'
26
- }), ".".concat(sparkPrefix, "-form-label-margin-small"), _defineProperty({}, ".".concat(antPrefix, "-form-item-label > label"), {
27
- marginRight: '8px'
28
- })), ".".concat(antPrefix, "-col"), {
29
- minHeight: 'unset'
30
- });
31
- }
32
- var useIndexStyle = createStyle(function (_ref2) {
33
- var css = _ref2.css,
34
- params = _objectWithoutProperties(_ref2, _excluded);
35
- var result = css(getIndexStyleData(params));
36
- return result;
37
- });
38
- 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.", "-form {\n .", "-required-mark {\n color: var(--", "-color-error);\n line-height: 1;\n margin-top: 0;\n font-size: 16px;\n }\n \n .", "-form-item .", "-form-item-label {\n text-align: left;\n }\n}\n\n.", "-form-item .", "-form-item-label > label {\n font-weight: 500;\n white-space: normal;\n font-size: 13px;\n line-height: 20px;\n color: var(--", "-color-text);\n gap: 4px;\n}\n\n.", "-form-label-margin-small {\n .", "-form-item-label > label {\n margin-right: 8px;\n }\n}\n\n.", "-col {\n min-height: unset;\n}\n"])), function (p) {
5
+ return p.sparkPrefix;
6
+ }, function (p) {
7
+ return p.sparkPrefix;
8
+ }, function (p) {
9
+ return p.antPrefix;
10
+ }, function (p) {
11
+ return p.antPrefix;
12
+ }, function (p) {
13
+ return p.antPrefix;
14
+ }, function (p) {
15
+ return p.antPrefix;
16
+ }, function (p) {
17
+ return p.antPrefix;
18
+ }, function (p) {
19
+ return p.antPrefix;
20
+ }, function (p) {
21
+ return p.sparkPrefix;
22
+ }, function (p) {
23
+ return p.antPrefix;
24
+ }, function (p) {
25
+ return p.antPrefix;
26
+ });
@@ -5,35 +5,40 @@ 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 { getCommonConfig } from "../../../config";
8
+ import { SparkInfoLine } from '@agentscope-ai/icons';
8
9
  import classNames from 'classnames';
9
10
  import IconButton from "../IconButton";
10
- import useIconFontStyle from "../IconFont/index.style";
11
+ import { useStyle as useIconFontStyle } from "../IconFont/index.style";
11
12
  import Tooltip from "../Tooltip";
12
- import useIndexStyle from "./index.style";
13
+ import { useStyle } from "./index.style";
13
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
+ import { Fragment as _Fragment } from "react/jsx-runtime";
16
+ import { jsxs as _jsxs } from "react/jsx-runtime";
14
17
  export default function HelpIcon(props) {
15
- useIconFontStyle();
16
- useIndexStyle();
18
+ var IconFontStyle = useIconFontStyle();
19
+ var Style = useStyle();
17
20
  var style = props.style,
18
21
  content = props.content,
19
22
  className = props.className,
20
23
  popoverProps = props.popoverProps;
21
24
  var _getCommonConfig = getCommonConfig(),
22
25
  sparkPrefix = _getCommonConfig.sparkPrefix;
23
- return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
24
- title: content,
25
- overlayInnerStyle: {
26
- maxWidth: 376
27
- },
28
- trigger: 'hover',
29
- style: style
30
- }, popoverProps), {}, {
31
- children: /*#__PURE__*/_jsx(IconButton, {
32
- className: classNames("".concat(sparkPrefix, "-help-icon"), className),
33
- icon: "spark-info-line",
34
- shape: "circle",
35
- bordered: false,
36
- size: "small"
37
- })
38
- }));
26
+ return /*#__PURE__*/_jsxs(_Fragment, {
27
+ children: [/*#__PURE__*/_jsx(IconFontStyle, {}), /*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
28
+ title: content,
29
+ overlayInnerStyle: {
30
+ maxWidth: 376
31
+ },
32
+ trigger: 'hover',
33
+ style: style
34
+ }, popoverProps), {}, {
35
+ children: /*#__PURE__*/_jsx(IconButton, {
36
+ className: classNames("".concat(sparkPrefix, "-help-icon"), className),
37
+ icon: /*#__PURE__*/_jsx(SparkInfoLine, {}),
38
+ shape: "circle",
39
+ bordered: false,
40
+ size: "small"
41
+ })
42
+ }))]
43
+ });
39
44
  }
@@ -1,16 +1 @@
1
- export declare function getIndexStyleData(params: any): {
2
- [x: string]: {
3
- color: string;
4
- marginLeft?: undefined;
5
- fontSize?: undefined;
6
- } | {
7
- [x: string]: string | {
8
- margin: number;
9
- };
10
- color: string;
11
- marginLeft: string;
12
- fontSize: string;
13
- };
14
- };
15
- declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
16
- export default useIndexStyle;
1
+ export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
@@ -1,29 +1,16 @@
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 antPrefix = params.antPrefix,
11
- blPrefix = params.blPrefix,
12
- sparkPrefix = params.sparkPrefix;
13
- return _defineProperty(_defineProperty({}, ".".concat(sparkPrefix, "-help-icon"), {
14
- color: "var(--".concat(antPrefix, "-color-text-tertiary)")
15
- }), ".".concat(blPrefix, "-info-icon"), _defineProperty({
16
- color: "var(--".concat(antPrefix, "-color-icon)"),
17
- marginLeft: "var(--".concat(antPrefix, "-margin-xxs)"),
18
- fontSize: '14px'
19
- }, "&.".concat(blPrefix, "-info-icon-no-margin"), {
20
- margin: 0
21
- }));
22
- }
23
- var useIndexStyle = createStyle(function (_ref2) {
24
- var css = _ref2.css,
25
- params = _objectWithoutProperties(_ref2, _excluded);
26
- var result = css(getIndexStyleData(params));
27
- return result;
28
- });
29
- 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.", "-help-icon {\n color: var(--", "-color-text-tertiary);\n}\n\n.", "-info-icon {\n color: var(--", "-color-icon);\n margin-left: var(--", "-margin-xxs);\n font-size: 14px;\n \n &.", "-info-icon-no-margin {\n margin: 0;\n }\n}\n"])), function (p) {
5
+ return p.sparkPrefix;
6
+ }, function (p) {
7
+ return p.antPrefix;
8
+ }, function (p) {
9
+ return p.blPrefix;
10
+ }, function (p) {
11
+ return p.antPrefix;
12
+ }, function (p) {
13
+ return p.antPrefix;
14
+ }, function (p) {
15
+ return p.blPrefix;
16
+ });
@@ -11,8 +11,10 @@ import IconFont from "../IconFont";
11
11
  import { Button, getCommonConfig } from "../../..";
12
12
  import classNames from 'classnames';
13
13
  import { useMemo } from 'react';
14
- import useIndexStyle from "./index.style";
14
+ import { useStyle } from "./index.style";
15
15
  import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { Fragment as _Fragment } from "react/jsx-runtime";
17
+ import { jsxs as _jsxs } from "react/jsx-runtime";
16
18
  export default (function (props) {
17
19
  var className = props.className,
18
20
  iconType = props.iconType,
@@ -21,7 +23,7 @@ export default (function (props) {
21
23
  restProps = _objectWithoutProperties(props, _excluded);
22
24
  var config = getCommonConfig();
23
25
  var iconfont = config.iconfont;
24
- useIndexStyle();
26
+ var Style = useStyle();
25
27
  var icon = useMemo(function () {
26
28
  if (iconType) {
27
29
  return /*#__PURE__*/_jsx(IconFont, {
@@ -37,13 +39,15 @@ export default (function (props) {
37
39
  return props.icon;
38
40
  }
39
41
  }, [props.icon, iconType, iconfont]);
40
- return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
41
- className: classNames(className, "".concat(config.sparkPrefix, "-icon-button")),
42
- style: {
43
- lineHeight: 1
44
- },
45
- type: bordered ? 'default' : 'text'
46
- }, restProps), {}, {
47
- icon: icon
48
- }));
42
+ return /*#__PURE__*/_jsxs(_Fragment, {
43
+ children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
44
+ className: classNames(className, "".concat(config.sparkPrefix, "-icon-button")),
45
+ style: {
46
+ lineHeight: 1
47
+ },
48
+ type: bordered ? 'default' : 'text'
49
+ }, restProps), {}, {
50
+ icon: icon
51
+ }))]
52
+ });
49
53
  });
@@ -1,11 +1 @@
1
- export declare function getIndexStyleData(params: any): {
2
- [x: string]: {
3
- [x: string]: {
4
- display: string;
5
- justifyContent: string;
6
- alignItems: string;
7
- };
8
- };
9
- };
10
- declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
11
- export default useIndexStyle;
1
+ export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
@@ -1,24 +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(sparkPrefix, "-icon-button.").concat(antPrefix, "-btn"), _defineProperty({}, ".".concat(antPrefix, "-btn-icon"), {
13
- display: 'flex',
14
- justifyContent: 'center',
15
- alignItems: 'center'
16
- }));
17
- }
18
- var useIndexStyle = createStyle(function (_ref2) {
19
- var css = _ref2.css,
20
- params = _objectWithoutProperties(_ref2, _excluded);
21
- var result = css(getIndexStyleData(params));
22
- return result;
23
- });
24
- 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.", "-icon-button.", "-btn {\n .", "-btn-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n}\n"])), function (p) {
5
+ return p.sparkPrefix;
6
+ }, function (p) {
7
+ return p.antPrefix;
8
+ }, function (p) {
9
+ return p.antPrefix;
10
+ });
@@ -1,4 +1,3 @@
1
- import { IconFontProps } from '@agentscope-ai/icons-override-antd/lib/components/IconFont';
2
1
  import React, { CSSProperties } from 'react';
3
2
  export interface SparkIconFontProps extends React.HTMLAttributes<HTMLDivElement> {
4
3
  /**
@@ -26,4 +25,4 @@ export interface SparkIconFontProps extends React.HTMLAttributes<HTMLDivElement>
26
25
  */
27
26
  spin?: boolean;
28
27
  }
29
- export default function IconFont(props: SparkIconFontProps): React.FunctionComponentElement<IconFontProps<string>>;
28
+ export default function IconFont(props: SparkIconFontProps): import("react/jsx-runtime").JSX.Element;
@@ -11,7 +11,10 @@ import { getCommonConfig } from "../../../config";
11
11
  import { createFromIconfontCN } from '@agentscope-ai/icons-override-antd';
12
12
  import classNames from 'classnames';
13
13
  import React from 'react';
14
- import useIconFontStyle from "./index.style";
14
+ import { useStyle } from "./index.style";
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { Fragment as _Fragment } from "react/jsx-runtime";
17
+ import { jsxs as _jsxs } from "react/jsx-runtime";
15
18
  var iconFontInstance;
16
19
  function getIconFontInstance(url) {
17
20
  if (!iconFontInstance) {
@@ -33,12 +36,14 @@ export default function IconFont(props) {
33
36
  var _getCommonConfig = getCommonConfig(),
34
37
  sparkPrefix = _getCommonConfig.sparkPrefix,
35
38
  iconfont = _getCommonConfig.iconfont;
36
- useIconFontStyle();
37
- return /*#__PURE__*/React.createElement(getIconFontInstance(iconfont), _objectSpread({
38
- type: type,
39
- style: _objectSpread({
40
- fontSize: size
41
- }, props.style),
42
- className: classNames(isCursorPointer && "".concat(sparkPrefix, "-cursor-pointer"), className, "".concat(sparkPrefix, "-icon"), _defineProperty({}, "".concat(sparkPrefix, "-icon-spin"), spin))
43
- }, rest));
39
+ var Style = useStyle();
40
+ return /*#__PURE__*/_jsxs(_Fragment, {
41
+ children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/React.createElement(getIconFontInstance(iconfont), _objectSpread({
42
+ type: type,
43
+ style: _objectSpread({
44
+ fontSize: size
45
+ }, props.style),
46
+ className: classNames(isCursorPointer && "".concat(sparkPrefix, "-cursor-pointer"), className, "".concat(sparkPrefix, "-icon"), _defineProperty({}, "".concat(sparkPrefix, "-icon-spin"), spin))
47
+ }, rest))]
48
+ });
44
49
  }
@@ -1,67 +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
- alignItems?: undefined;
11
- justifyContent?: undefined;
12
- fontSize?: undefined;
13
- lineHeight?: undefined;
14
- animation?: undefined;
15
- cursor?: undefined;
16
- color?: undefined;
17
- '&:hover'?: undefined;
18
- } | {
19
- display: string;
20
- alignItems: string;
21
- justifyContent: string;
22
- fontSize: string;
23
- lineHeight: number;
24
- '0%'?: undefined;
25
- '100%'?: undefined;
26
- animation?: undefined;
27
- cursor?: undefined;
28
- color?: undefined;
29
- '&:hover'?: undefined;
30
- } | {
31
- animation: string;
32
- '0%'?: undefined;
33
- '100%'?: undefined;
34
- display?: undefined;
35
- alignItems?: undefined;
36
- justifyContent?: undefined;
37
- fontSize?: undefined;
38
- lineHeight?: undefined;
39
- cursor?: undefined;
40
- color?: undefined;
41
- '&:hover'?: undefined;
42
- } | {
43
- cursor: string;
44
- color: string;
45
- '&:hover': {
46
- color: string;
47
- };
48
- '0%'?: undefined;
49
- '100%'?: undefined;
50
- display?: undefined;
51
- alignItems?: undefined;
52
- justifyContent?: undefined;
53
- fontSize?: undefined;
54
- lineHeight?: undefined;
55
- animation?: undefined;
56
- };
57
- '@keyframes spinning': {
58
- '0%': {
59
- transform: string;
60
- };
61
- '100%': {
62
- transform: string;
63
- };
64
- };
65
- };
66
- declare const useIconFontStyle: (props?: {}) => import("../../../config").CommonConfig;
67
- export default useIconFontStyle;
1
+ export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
@@ -1,44 +1,14 @@
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 antPrefix = params.antPrefix,
11
- sparkPrefix = params.sparkPrefix;
12
- return _defineProperty(_defineProperty(_defineProperty({
13
- // @import useIndexStyle from '../../antd/styles/index.style';
14
- '@keyframes spinning': {
15
- '0%': {
16
- transform: 'rotate(0deg)'
17
- },
18
- '100%': {
19
- transform: 'rotate(360deg)'
20
- }
21
- }
22
- }, ".".concat(sparkPrefix, "-icon"), {
23
- display: 'inline-flex',
24
- alignItems: 'center',
25
- justifyContent: 'center',
26
- fontSize: '16px',
27
- lineHeight: 1
28
- }), ".".concat(sparkPrefix, "-icon-spin"), {
29
- animation: 'spinning 1s ease-in-out infinite'
30
- }), ".".concat(sparkPrefix, "-cursor-pointer"), {
31
- cursor: 'pointer',
32
- color: "var(--".concat(antPrefix, "-color-icon)"),
33
- '&:hover': {
34
- color: "var(--".concat(antPrefix, "-color-icon-hover)")
35
- }
36
- });
37
- }
38
- var useIconFontStyle = createStyle(function (_ref2) {
39
- var css = _ref2.css,
40
- params = _objectWithoutProperties(_ref2, _excluded);
41
- var result = css(getIndexStyleData(params));
42
- return result;
43
- });
44
- export default useIconFontStyle;
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 spinning {\n 0% {\n transform: rotate(0deg);\n }\n \n 100% {\n transform: rotate(360deg);\n }\n}\n\n.", "-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n line-height: 1;\n}\n\n.", "-icon-spin {\n animation: spinning 1s ease-in-out infinite;\n}\n\n.", "-cursor-pointer {\n cursor: pointer;\n color: var(--", "-color-icon);\n \n &:hover {\n color: var(--", "-color-icon-hover);\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.antPrefix;
12
+ }, function (p) {
13
+ return p.antPrefix;
14
+ });
@@ -9,11 +9,12 @@ import { getCommonConfig } from "../../../config";
9
9
  import { SparkVisibleLine } from '@agentscope-ai/icons';
10
10
  import { Image as AntdImage } from 'antd';
11
11
  import { useMemo } from 'react';
12
- import useIndexStyle from "./index.style";
12
+ import { useStyle } from "./index.style";
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
15
+ import { Fragment as _Fragment } from "react/jsx-runtime";
15
16
  var Image = function Image(props) {
16
- useIndexStyle();
17
+ var Style = useStyle();
17
18
  var _getCommonConfig = getCommonConfig(),
18
19
  antPrefix = _getCommonConfig.antPrefix;
19
20
  var preview = useMemo(function () {
@@ -38,9 +39,11 @@ var Image = function Image(props) {
38
39
  })
39
40
  }, preview), basePreview);
40
41
  }, [props.preview]);
41
- return /*#__PURE__*/_jsx(AntdImage, _objectSpread({
42
- preview: preview
43
- }, props));
42
+ return /*#__PURE__*/_jsxs(_Fragment, {
43
+ children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(AntdImage, _objectSpread({
44
+ preview: preview
45
+ }, props))]
46
+ });
44
47
  };
45
48
 
46
49
  // 定义接口避免TypeScript内部类型推断
@@ -1,22 +1 @@
1
- export declare function getIndexStyleData(params: any): {
2
- [x: string]: {
3
- [x: string]: string | {
4
- [x: string]: string | {
5
- display: string;
6
- alignItems: string;
7
- fontWeight?: undefined;
8
- lineHeight?: undefined;
9
- } | {
10
- fontWeight: number;
11
- lineHeight: string;
12
- display?: undefined;
13
- alignItems?: undefined;
14
- };
15
- backgroundColor: string;
16
- };
17
- borderRadius: string;
18
- overflow: string;
19
- };
20
- };
21
- declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
22
- export default useIndexStyle;
1
+ export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;