@agentscope-ai/design 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) 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/generateThemeByToken.js +8 -2
  34. package/lib/components/commonComponents/AlertDialog/demo/demo1.js +13 -79
  35. package/lib/components/commonComponents/AlertDialog/demo/demo2.js +44 -64
  36. package/lib/components/commonComponents/AlertDialog/index.d.ts +14 -1
  37. package/lib/components/commonComponents/AlertDialog/index.js +25 -17
  38. package/lib/components/commonComponents/AlertDialog/index.style.d.ts +1 -17
  39. package/lib/components/commonComponents/AlertDialog/index.style.js +16 -30
  40. package/lib/components/commonComponents/Anchor/demo/demo1.d.ts +0 -4
  41. package/lib/components/commonComponents/Anchor/demo/demo1.js +3 -4
  42. package/lib/components/commonComponents/Anchor/demo/demo2.d.ts +0 -4
  43. package/lib/components/commonComponents/Anchor/demo/demo2.js +3 -5
  44. package/lib/components/commonComponents/Anchor/index.js +7 -3
  45. package/lib/components/commonComponents/Anchor/index.style.d.ts +1 -14
  46. package/lib/components/commonComponents/Anchor/index.style.js +18 -23
  47. package/lib/components/commonComponents/Avatar/index.js +11 -7
  48. package/lib/components/commonComponents/Avatar/index.style.d.ts +1 -7
  49. package/lib/components/commonComponents/Avatar/index.style.js +6 -21
  50. package/lib/components/commonComponents/Breadcrumb/index.js +9 -6
  51. package/lib/components/commonComponents/Breadcrumb/index.style.d.ts +1 -117
  52. package/lib/components/commonComponents/Breadcrumb/index.style.js +32 -61
  53. package/lib/components/commonComponents/Button/index.d.ts +1 -1
  54. package/lib/components/commonComponents/Button/index.js +7 -7
  55. package/lib/components/commonComponents/Card/index.js +23 -20
  56. package/lib/components/commonComponents/Card/index.style.d.ts +1 -71
  57. package/lib/components/commonComponents/Card/index.style.js +24 -46
  58. package/lib/components/commonComponents/Checkbox/index.js +13 -10
  59. package/lib/components/commonComponents/Checkbox/index.style.d.ts +1 -34
  60. package/lib/components/commonComponents/Checkbox/index.style.js +50 -38
  61. package/lib/components/commonComponents/CodeBlock/index.js +15 -13
  62. package/lib/components/commonComponents/CodeBlock/index.style.d.ts +1 -354
  63. package/lib/components/commonComponents/CodeBlock/index.style.js +26 -72
  64. package/lib/components/commonComponents/Collapse/index.js +7 -3
  65. package/lib/components/commonComponents/Collapse/index.style.d.ts +1 -57
  66. package/lib/components/commonComponents/Collapse/index.style.js +34 -47
  67. package/lib/components/commonComponents/CollapsePanel/index.d.ts +10 -0
  68. package/lib/components/commonComponents/CollapsePanel/index.js +56 -44
  69. package/lib/components/commonComponents/CollapsePanel/index.style.d.ts +1 -287
  70. package/lib/components/commonComponents/CollapsePanel/index.style.js +42 -97
  71. package/lib/components/commonComponents/ConfigProvider/index.js +20 -14
  72. package/lib/components/commonComponents/DatePicker/index.js +45 -39
  73. package/lib/components/commonComponents/DatePicker/index.style.d.ts +1 -102
  74. package/lib/components/commonComponents/DatePicker/index.style.js +66 -61
  75. package/lib/components/commonComponents/Descriptions/index.js +14 -10
  76. package/lib/components/commonComponents/Descriptions/index.style.d.ts +1 -17
  77. package/lib/components/commonComponents/Descriptions/index.style.js +32 -29
  78. package/lib/components/commonComponents/Drawer/Confirm.d.ts +1 -1
  79. package/lib/components/commonComponents/Drawer/Confirm.js +26 -24
  80. package/lib/components/commonComponents/Drawer/index.js +15 -11
  81. package/lib/components/commonComponents/Drawer/index.style.d.ts +1 -84
  82. package/lib/components/commonComponents/Drawer/index.style.js +44 -54
  83. package/lib/components/commonComponents/Dropdown/index.d.ts +1 -2
  84. package/lib/components/commonComponents/Dropdown/index.js +15 -12
  85. package/lib/components/commonComponents/Dropdown/index.style.d.ts +1 -78
  86. package/lib/components/commonComponents/Dropdown/index.style.js +48 -40
  87. package/lib/components/commonComponents/EllipsisTip/index.js +14 -10
  88. package/lib/components/commonComponents/EllipsisTip/index.style.d.ts +1 -10
  89. package/lib/components/commonComponents/EllipsisTip/index.style.js +6 -24
  90. package/lib/components/commonComponents/Empty/index.js +46 -44
  91. package/lib/components/commonComponents/Empty/index.style.d.ts +1 -113
  92. package/lib/components/commonComponents/Empty/index.style.js +22 -51
  93. package/lib/components/commonComponents/FileIcon/index.js +27 -24
  94. package/lib/components/commonComponents/FileIcon/index.style.d.ts +1 -61
  95. package/lib/components/commonComponents/FileIcon/index.style.js +20 -42
  96. package/lib/components/commonComponents/FloatButton/demo/demo1.js +1 -1
  97. package/lib/components/commonComponents/FloatButton/demo/demo2.js +1 -1
  98. package/lib/components/commonComponents/Form/index.js +6 -5
  99. package/lib/components/commonComponents/Form/index.style.d.ts +1 -53
  100. package/lib/components/commonComponents/Form/index.style.js +26 -38
  101. package/lib/components/commonComponents/HelpIcon/index.js +25 -20
  102. package/lib/components/commonComponents/HelpIcon/index.style.d.ts +1 -16
  103. package/lib/components/commonComponents/HelpIcon/index.style.js +16 -29
  104. package/lib/components/commonComponents/IconButton/index.js +15 -11
  105. package/lib/components/commonComponents/IconButton/index.style.d.ts +1 -11
  106. package/lib/components/commonComponents/IconButton/index.style.js +10 -24
  107. package/lib/components/commonComponents/IconFont/index.d.ts +1 -2
  108. package/lib/components/commonComponents/IconFont/index.js +14 -9
  109. package/lib/components/commonComponents/IconFont/index.style.d.ts +1 -67
  110. package/lib/components/commonComponents/IconFont/index.style.js +14 -44
  111. package/lib/components/commonComponents/Image/index.js +8 -5
  112. package/lib/components/commonComponents/Image/index.style.d.ts +1 -22
  113. package/lib/components/commonComponents/Image/index.style.js +16 -30
  114. package/lib/components/commonComponents/Input/index.js +17 -11
  115. package/lib/components/commonComponents/Input/index.style.d.ts +1 -70
  116. package/lib/components/commonComponents/Input/index.style.js +46 -42
  117. package/lib/components/commonComponents/Modal/index.js +18 -16
  118. package/lib/components/commonComponents/Modal/index.style.d.ts +1 -111
  119. package/lib/components/commonComponents/Modal/index.style.js +54 -72
  120. package/lib/components/commonComponents/Pagination/index.d.ts +1 -1
  121. package/lib/components/commonComponents/Pagination/index.js +96 -36
  122. package/lib/components/commonComponents/Pagination/index.style.d.ts +1 -49
  123. package/lib/components/commonComponents/Pagination/index.style.js +26 -42
  124. package/lib/components/commonComponents/Popconfirm/demo/demo1.js +13 -0
  125. package/lib/components/commonComponents/Popconfirm/demo/demo2.d.ts +3 -0
  126. package/lib/components/commonComponents/Popconfirm/demo/demo2.js +49 -0
  127. package/lib/components/commonComponents/Popconfirm/index.d.ts +9 -2
  128. package/lib/components/commonComponents/Popconfirm/index.js +50 -8
  129. package/lib/components/commonComponents/PromptsEditor/demo/basic.js +5 -4
  130. package/lib/components/commonComponents/PromptsEditor/index.d.ts +8 -2
  131. package/lib/components/commonComponents/PromptsEditor/index.js +17 -11
  132. package/lib/components/commonComponents/RadioButton/index.js +9 -10
  133. package/lib/components/commonComponents/RadioButton/index.style.d.ts +1 -72
  134. package/lib/components/commonComponents/RadioButton/index.style.js +52 -63
  135. package/lib/components/commonComponents/Result/index.style.d.ts +1 -3
  136. package/lib/components/commonComponents/Result/index.style.js +4 -16
  137. package/lib/components/commonComponents/Select/demo/demo2.js +0 -1
  138. package/lib/components/commonComponents/SlateEditor/elements/Var.js +11 -8
  139. package/lib/components/commonComponents/SlateEditor/elements/index.style.d.ts +1 -14
  140. package/lib/components/commonComponents/SlateEditor/elements/index.style.js +4 -21
  141. package/lib/components/commonComponents/SlateEditor/index.js +34 -31
  142. package/lib/components/commonComponents/SlateEditor/index.style.d.ts +1 -28
  143. package/lib/components/commonComponents/SlateEditor/index.style.js +4 -36
  144. package/lib/components/commonComponents/Slider/{slider.input.d.ts → Input/index.d.ts} +1 -1
  145. package/lib/components/commonComponents/Slider/Input/index.js +93 -0
  146. package/lib/components/commonComponents/Slider/Input/index.style.d.ts +1 -0
  147. package/lib/components/commonComponents/Slider/Input/index.style.js +22 -0
  148. package/lib/components/commonComponents/Slider/demo/demo4.d.ts +3 -0
  149. package/lib/components/commonComponents/Slider/demo/demo4.js +33 -0
  150. package/lib/components/commonComponents/Slider/demo/demo5.d.ts +3 -0
  151. package/lib/components/commonComponents/Slider/demo/demo5.js +34 -0
  152. package/lib/components/commonComponents/Slider/index.d.ts +2 -2
  153. package/lib/components/commonComponents/Slider/index.js +11 -7
  154. package/lib/components/commonComponents/Slider/index.style.d.ts +1 -7
  155. package/lib/components/commonComponents/Slider/index.style.js +10 -22
  156. package/lib/components/commonComponents/SliderSelector/index.js +38 -35
  157. package/lib/components/commonComponents/SliderSelector/index.style.d.ts +1 -38
  158. package/lib/components/commonComponents/SliderSelector/index.style.js +20 -37
  159. package/lib/components/commonComponents/Spinner/index.d.ts +4 -4
  160. package/lib/components/commonComponents/Spinner/index.js +28 -24
  161. package/lib/components/commonComponents/Spinner/index.style.d.ts +1 -79
  162. package/lib/components/commonComponents/Spinner/index.style.js +30 -61
  163. package/lib/components/commonComponents/Statistic/index.js +7 -3
  164. package/lib/components/commonComponents/Statistic/index.style.d.ts +1 -15
  165. package/lib/components/commonComponents/Statistic/index.style.js +14 -26
  166. package/lib/components/commonComponents/Steps/index.js +10 -6
  167. package/lib/components/commonComponents/Steps/index.style.d.ts +1 -162
  168. package/lib/components/commonComponents/Steps/index.style.js +68 -78
  169. package/lib/components/commonComponents/Switch/index.js +14 -11
  170. package/lib/components/commonComponents/Switch/index.style.d.ts +1 -25
  171. package/lib/components/commonComponents/Switch/index.style.js +22 -33
  172. package/lib/components/commonComponents/Table/demo/demo1.js +1 -9
  173. package/lib/components/commonComponents/Table/demo/demo2.js +1 -9
  174. package/lib/components/commonComponents/Table/demo/demo3.js +1 -9
  175. package/lib/components/commonComponents/Table/demo/demo4.js +1 -9
  176. package/lib/components/commonComponents/Table/index.d.ts +1 -1
  177. package/lib/components/commonComponents/Table/index.js +11 -7
  178. package/lib/components/commonComponents/Table/index.style.d.ts +1 -52
  179. package/lib/components/commonComponents/Table/index.style.js +34 -32
  180. package/lib/components/commonComponents/Tabs/index.js +37 -29
  181. package/lib/components/commonComponents/Tabs/index.style.d.ts +1 -55
  182. package/lib/components/commonComponents/Tabs/index.style.js +38 -44
  183. package/lib/components/commonComponents/Tag/index.js +13 -9
  184. package/lib/components/commonComponents/Tag/index.style.d.ts +1 -56
  185. package/lib/components/commonComponents/Tag/index.style.js +54 -58
  186. package/lib/components/commonComponents/TimePicker/index.js +36 -30
  187. package/lib/components/commonComponents/TimePicker/index.style.d.ts +1 -71
  188. package/lib/components/commonComponents/TimePicker/index.style.js +54 -50
  189. package/lib/components/commonComponents/Tooltip/index.js +14 -10
  190. package/lib/components/commonComponents/Tooltip/index.style.d.ts +1 -24
  191. package/lib/components/commonComponents/Tooltip/index.style.js +26 -32
  192. package/lib/components/commonComponents/Upload/index.js +15 -9
  193. package/lib/components/commonComponents/Upload/index.style.d.ts +1 -125
  194. package/lib/components/commonComponents/Upload/index.style.js +80 -90
  195. package/lib/components/commonComponents/Video/Control.d.ts +19 -0
  196. package/lib/components/commonComponents/Video/Control.js +104 -0
  197. package/lib/components/commonComponents/Video/demo/demo1.d.ts +2 -0
  198. package/lib/components/commonComponents/Video/demo/demo1.js +12 -0
  199. package/lib/components/commonComponents/Video/index.d.ts +18 -0
  200. package/lib/components/commonComponents/Video/index.js +222 -0
  201. package/lib/components/commonComponents/Video/index.style.d.ts +1 -0
  202. package/lib/components/commonComponents/Video/index.style.js +40 -0
  203. package/lib/i18n/strings/en-US.json +3 -1
  204. package/lib/i18n/strings/zh-CN.json +3 -1
  205. package/lib/index.d.ts +5 -4
  206. package/lib/index.js +3 -2
  207. package/lib/libs/createStyle/index.d.ts +7 -1
  208. package/lib/libs/createStyle/index.js +24 -72
  209. package/lib/libs/env/index.js +1 -1
  210. package/lib/libs/generateCssVars/index.js +1 -1
  211. package/package.json +3 -3
  212. package/lib/components/commonComponents/Popconfirm/demo/demo.js +0 -155
  213. package/lib/components/commonComponents/Slider/slider.input.js +0 -76
  214. package/lib/components/commonComponents/spark.style.d.ts +0 -45
  215. package/lib/components/commonComponents/spark.style.js +0 -62
  216. package/llms/all.llms.txt +0 -4235
  217. package/llms/components/commonComponents/Alert/index.zh-CN.llms.txt +0 -74
  218. package/llms/components/commonComponents/Anchor/index.zh-CN.llms.txt +0 -71
  219. package/llms/components/commonComponents/Avatar/index.zh-CN.llms.txt +0 -61
  220. package/llms/components/commonComponents/Breadcrumb/index.zh-CN.llms.txt +0 -89
  221. package/llms/components/commonComponents/Button/index.zh-CN.llms.txt +0 -99
  222. package/llms/components/commonComponents/Card/index.zh-CN.llms.txt +0 -79
  223. package/llms/components/commonComponents/Checkbox/index.zh-CN.llms.txt +0 -88
  224. package/llms/components/commonComponents/CodeBlock/index.zh-CN.llms.txt +0 -34
  225. package/llms/components/commonComponents/Collapse/index.zh-CN.llms.txt +0 -76
  226. package/llms/components/commonComponents/CollapsePanel/index.zh-CN.llms.txt +0 -75
  227. package/llms/components/commonComponents/DatePicker/index.zh-CN.llms.txt +0 -227
  228. package/llms/components/commonComponents/Descriptions/index.zh-CN.llms.txt +0 -60
  229. package/llms/components/commonComponents/Drawer/index.zh-CN.llms.txt +0 -87
  230. package/llms/components/commonComponents/Dropdown/index.zh-CN.llms.txt +0 -87
  231. package/llms/components/commonComponents/Empty/index.zh-CN.llms.txt +0 -100
  232. package/llms/components/commonComponents/FloatButton/index.zh-CN.llms.txt +0 -70
  233. package/llms/components/commonComponents/Form/index.zh-CN.llms.txt +0 -383
  234. package/llms/components/commonComponents/IconButton/index.zh-CN.llms.txt +0 -68
  235. package/llms/components/commonComponents/Image/index.zh-CN.llms.txt +0 -118
  236. package/llms/components/commonComponents/Input/index.zh-CN.llms.txt +0 -168
  237. package/llms/components/commonComponents/InputNumber/index.zh-CN.llms.txt +0 -66
  238. package/llms/components/commonComponents/Message/index.zh-CN.llms.txt +0 -114
  239. package/llms/components/commonComponents/Modal/index.zh-CN.llms.txt +0 -154
  240. package/llms/components/commonComponents/Notification/index.zh-CN.llms.txt +0 -118
  241. package/llms/components/commonComponents/Pagination/index.zh-CN.llms.txt +0 -62
  242. package/llms/components/commonComponents/Popover/index.zh-CN.llms.txt +0 -56
  243. package/llms/components/commonComponents/Progress/index.zh-CN.llms.txt +0 -64
  244. package/llms/components/commonComponents/Radio/index.zh-CN.llms.txt +0 -75
  245. package/llms/components/commonComponents/RadioButton/index.zh-CN.llms.txt +0 -94
  246. package/llms/components/commonComponents/Result/index.zh-CN.llms.txt +0 -63
  247. package/llms/components/commonComponents/Select/index.zh-CN.llms.txt +0 -120
  248. package/llms/components/commonComponents/Skeleton/index.zh-CN.llms.txt +0 -71
  249. package/llms/components/commonComponents/Slider/index.zh-CN.llms.txt +0 -83
  250. package/llms/components/commonComponents/Spinner/index.zh-CN.llms.txt +0 -38
  251. package/llms/components/commonComponents/Statistic/index.zh-CN.llms.txt +0 -77
  252. package/llms/components/commonComponents/Steps/index.zh-CN.llms.txt +0 -82
  253. package/llms/components/commonComponents/Switch/index.zh-CN.llms.txt +0 -58
  254. package/llms/components/commonComponents/Table/index.zh-CN.llms.txt +0 -228
  255. package/llms/components/commonComponents/Tabs/index.zh-CN.llms.txt +0 -95
  256. package/llms/components/commonComponents/Tag/index.zh-CN.llms.txt +0 -57
  257. package/llms/components/commonComponents/TimePicker/index.zh-CN.llms.txt +0 -104
  258. package/llms/components/commonComponents/Tooltip/index.zh-CN.llms.txt +0 -63
  259. package/llms/components/commonComponents/Upload/index.zh-CN.llms.txt +0 -105
  260. package/llms/index.llms.txt +0 -45
  261. /package/lib/components/commonComponents/Popconfirm/demo/{demo.d.ts → demo1.d.ts} +0 -0
@@ -1,155 +0,0 @@
1
- import { Button, ConfigProvider, Popconfirm } from "../../../..";
2
- import React from 'react';
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- import { jsxs as _jsxs } from "react/jsx-runtime";
5
- var text = 'Are you sure to delete this task?';
6
- var description = 'Delete the task';
7
- var ButtonWidth = 80;
8
- var App = function App() {
9
- return /*#__PURE__*/_jsx(ConfigProvider, {
10
- button: {
11
- style: {
12
- width: ButtonWidth,
13
- margin: 4
14
- }
15
- },
16
- children: /*#__PURE__*/_jsxs("div", {
17
- className: "demo",
18
- children: [/*#__PURE__*/_jsxs("div", {
19
- style: {
20
- marginInlineStart: ButtonWidth,
21
- whiteSpace: 'nowrap'
22
- },
23
- children: [/*#__PURE__*/_jsx(Popconfirm, {
24
- placement: "topLeft",
25
- title: text,
26
- description: description,
27
- okText: "Yes",
28
- cancelText: "No",
29
- children: /*#__PURE__*/_jsx(Button, {
30
- children: "TL"
31
- })
32
- }), /*#__PURE__*/_jsx(Popconfirm, {
33
- placement: "top",
34
- title: text,
35
- description: description,
36
- okText: "Yes",
37
- cancelText: "No",
38
- children: /*#__PURE__*/_jsx(Button, {
39
- children: "Top"
40
- })
41
- }), /*#__PURE__*/_jsx(Popconfirm, {
42
- placement: "topRight",
43
- title: text,
44
- description: description,
45
- okText: "Yes",
46
- cancelText: "No",
47
- children: /*#__PURE__*/_jsx(Button, {
48
- children: "TR"
49
- })
50
- })]
51
- }), /*#__PURE__*/_jsxs("div", {
52
- style: {
53
- width: ButtonWidth,
54
- float: 'inline-start'
55
- },
56
- children: [/*#__PURE__*/_jsx(Popconfirm, {
57
- placement: "leftTop",
58
- title: text,
59
- description: description,
60
- okText: "Yes",
61
- cancelText: "No",
62
- children: /*#__PURE__*/_jsx(Button, {
63
- children: "LT"
64
- })
65
- }), /*#__PURE__*/_jsx(Popconfirm, {
66
- placement: "left",
67
- title: text,
68
- description: description,
69
- okText: "Yes",
70
- cancelText: "No",
71
- children: /*#__PURE__*/_jsx(Button, {
72
- children: "Left"
73
- })
74
- }), /*#__PURE__*/_jsx(Popconfirm, {
75
- placement: "leftBottom",
76
- title: text,
77
- description: description,
78
- okText: "Yes",
79
- cancelText: "No",
80
- children: /*#__PURE__*/_jsx(Button, {
81
- children: "LB"
82
- })
83
- })]
84
- }), /*#__PURE__*/_jsxs("div", {
85
- style: {
86
- width: ButtonWidth,
87
- marginInlineStart: ButtonWidth * 4 + 24
88
- },
89
- children: [/*#__PURE__*/_jsx(Popconfirm, {
90
- placement: "rightTop",
91
- title: text,
92
- description: description,
93
- okText: "Yes",
94
- cancelText: "No",
95
- children: /*#__PURE__*/_jsx(Button, {
96
- children: "RT"
97
- })
98
- }), /*#__PURE__*/_jsx(Popconfirm, {
99
- placement: "right",
100
- title: text,
101
- description: description,
102
- okText: "Yes",
103
- cancelText: "No",
104
- children: /*#__PURE__*/_jsx(Button, {
105
- children: "Right"
106
- })
107
- }), /*#__PURE__*/_jsx(Popconfirm, {
108
- placement: "rightBottom",
109
- title: text,
110
- description: description,
111
- okText: "Yes",
112
- cancelText: "No",
113
- children: /*#__PURE__*/_jsx(Button, {
114
- children: "RB"
115
- })
116
- })]
117
- }), /*#__PURE__*/_jsxs("div", {
118
- style: {
119
- marginInlineStart: ButtonWidth,
120
- clear: 'both',
121
- whiteSpace: 'nowrap'
122
- },
123
- children: [/*#__PURE__*/_jsx(Popconfirm, {
124
- placement: "bottomLeft",
125
- title: text,
126
- description: description,
127
- okText: "Yes",
128
- cancelText: "No",
129
- children: /*#__PURE__*/_jsx(Button, {
130
- children: "BL"
131
- })
132
- }), /*#__PURE__*/_jsx(Popconfirm, {
133
- placement: "bottom",
134
- title: text,
135
- description: description,
136
- okText: "Yes",
137
- cancelText: "No",
138
- children: /*#__PURE__*/_jsx(Button, {
139
- children: "Bottom"
140
- })
141
- }), /*#__PURE__*/_jsx(Popconfirm, {
142
- placement: "bottomRight",
143
- title: text,
144
- description: description,
145
- okText: "Yes",
146
- cancelText: "No",
147
- children: /*#__PURE__*/_jsx(Button, {
148
- children: "BR"
149
- })
150
- })]
151
- })]
152
- })
153
- });
154
- };
155
- export default App;
@@ -1,76 +0,0 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["styles", "classNames"];
3
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
- 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
- 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
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
12
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
13
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
- 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; }
15
- 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; }
16
- import { Flex, InputNumber } from 'antd';
17
- import { useEffect, useState } from 'react';
18
- import { SparkSliderBasic } from "./index";
19
- import useIndexStyle from "./index.style";
20
- import { jsx as _jsx } from "react/jsx-runtime";
21
- import { jsxs as _jsxs } from "react/jsx-runtime";
22
- export default function SliderSelector(props) {
23
- var _props$styles, _props$classNames, _props$styles2, _props$classNames2;
24
- var styles = props.styles,
25
- classNames = props.classNames,
26
- restProps = _objectWithoutProperties(props, _excluded);
27
- var _useState = useState(props.value),
28
- _useState2 = _slicedToArray(_useState, 2),
29
- inputValue = _useState2[0],
30
- setInputValue = _useState2[1];
31
- useEffect(function () {
32
- setInputValue(props.value);
33
- }, [props.value]);
34
- useIndexStyle();
35
- var _onChange = function onChange(newValue) {
36
- setInputValue(newValue);
37
- };
38
- return /*#__PURE__*/_jsxs(Flex, {
39
- gap: 12,
40
- style: (_props$styles = props.styles) === null || _props$styles === void 0 ? void 0 : _props$styles.wrapper,
41
- className: (_props$classNames = props.classNames) === null || _props$classNames === void 0 ? void 0 : _props$classNames.wrapper,
42
- children: [/*#__PURE__*/_jsx(Flex, {
43
- align: "center",
44
- style: {
45
- flex: 1
46
- },
47
- children: /*#__PURE__*/_jsx(SparkSliderBasic, _objectSpread(_objectSpread({}, restProps), {}, {
48
- style: _objectSpread(_objectSpread({}, styles === null || styles === void 0 ? void 0 : styles.slider), {}, {
49
- width: '100%'
50
- }),
51
- className: classNames === null || classNames === void 0 ? void 0 : classNames.slider,
52
- onChange: function onChange(value) {
53
- var _props$onChange;
54
- _onChange(value);
55
- (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, value);
56
- },
57
- value: typeof inputValue === 'number' ? inputValue : 0
58
- }, props.sliderProps))
59
- }), /*#__PURE__*/_jsx(Flex, {
60
- align: "center",
61
- children: /*#__PURE__*/_jsx(InputNumber, _objectSpread({
62
- style: _objectSpread({}, (_props$styles2 = props.styles) === null || _props$styles2 === void 0 ? void 0 : _props$styles2.inputNumber),
63
- className: (_props$classNames2 = props.classNames) === null || _props$classNames2 === void 0 ? void 0 : _props$classNames2.inputNumber,
64
- min: props.min,
65
- max: props.max,
66
- value: inputValue,
67
- onChange: function onChange(value) {
68
- var _props$onChange2;
69
- _onChange(value);
70
- (_props$onChange2 = props.onChange) === null || _props$onChange2 === void 0 || _props$onChange2.call(props, value);
71
- },
72
- disabled: props.disabled
73
- }, props.inputNumberProps))
74
- })]
75
- });
76
- }
@@ -1,45 +0,0 @@
1
- export declare function getSparkStyleData(params: any): {
2
- /** ----------------------------滚动条样式 begin---------------------------- */
3
- '::-webkit-scrollbar': {
4
- width: any;
5
- height: any;
6
- };
7
- '::-webkit-scrollbar-thumb': {
8
- background: any;
9
- borderRadius: any;
10
- '&:hover': {
11
- background: any;
12
- };
13
- };
14
- '.rc-virtual-list-scrollbar': {
15
- width: string;
16
- '.rc-virtual-list-scrollbar-thumb': {
17
- backgroundColor: string;
18
- borderRadius: string;
19
- '&:hover': {
20
- background: string;
21
- };
22
- };
23
- };
24
- /** ----------------------------滚动条样式 end---------------------------- */
25
- a: {
26
- textDecoration: string;
27
- };
28
- '@keyframes fadeInUp': {
29
- '0%': {
30
- opacity: number;
31
- transform: string;
32
- };
33
- '100%': {
34
- opacity: number;
35
- transform: string; /** ----------------------------滚动条样式 end---------------------------- */
36
- };
37
- };
38
- '.animate-in': {
39
- opacity: number;
40
- transform: string;
41
- animation: string;
42
- };
43
- };
44
- declare const useSparkStyle: (props?: {}) => import("../../config").CommonConfig;
45
- export default useSparkStyle;
@@ -1,62 +0,0 @@
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 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; }
6
- 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; }
7
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
- 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); }
10
- import createStyle from "../../libs/createStyle";
11
- import { getIndexStyleData } from "../../antd/styles/index.style";
12
- export function getSparkStyleData(params) {
13
- var _params$scrollbarSize = params.scrollbarSize,
14
- scrollbarSize = _params$scrollbarSize === void 0 ? '4px' : _params$scrollbarSize,
15
- _params$scrollbarColo = params.scrollbarColor,
16
- scrollbarColor = _params$scrollbarColo === void 0 ? '#cdd0dc' : _params$scrollbarColo,
17
- _params$scrollbarHove = params.scrollbarHoverColor,
18
- scrollbarHoverColor = _params$scrollbarHove === void 0 ? '#c6c7d3' : _params$scrollbarHove,
19
- _params$scrollbarBord = params.scrollbarBorderRadius,
20
- scrollbarBorderRadius = _params$scrollbarBord === void 0 ? '2px' : _params$scrollbarBord;
21
- return _objectSpread(_objectSpread({}, getIndexStyleData(params)), {}, {
22
- /** ----------------------------滚动条样式 begin---------------------------- */
23
-
24
- '::-webkit-scrollbar': {
25
- // 用于垂直滚动条的宽度
26
- width: scrollbarSize,
27
- // 用于水平滚动条的高度
28
- height: scrollbarSize
29
- },
30
- /* 自定义滚动条的滑块(thumb) */
31
- '::-webkit-scrollbar-thumb': {
32
- background: scrollbarColor,
33
- borderRadius: scrollbarBorderRadius,
34
- '&:hover': {
35
- background: scrollbarHoverColor
36
- }
37
- },
38
- // antd select组件中的滚动条样式
39
- '.rc-virtual-list-scrollbar': {
40
- width: "".concat(scrollbarSize, " !important"),
41
- '.rc-virtual-list-scrollbar-thumb': {
42
- backgroundColor: "".concat(scrollbarColor, " !important"),
43
- borderRadius: "".concat(scrollbarBorderRadius, " !important"),
44
- '&:hover': {
45
- background: "".concat(scrollbarHoverColor, " !important")
46
- }
47
- }
48
- },
49
- /** ----------------------------滚动条样式 end---------------------------- */
50
-
51
- a: {
52
- textDecoration: 'none'
53
- }
54
- });
55
- }
56
- var useSparkStyle = createStyle(function (_ref) {
57
- var css = _ref.css,
58
- params = _objectWithoutProperties(_ref, _excluded);
59
- var result = css(getSparkStyleData(params));
60
- return result;
61
- });
62
- export default useSparkStyle;