@unicom-cloud/ui 0.8.99 → 0.8.101

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 (293) hide show
  1. package/Anchor.js +3 -1
  2. package/Badge.js +7 -6
  3. package/Copy.js +49 -2
  4. package/Details.js +13 -2
  5. package/Divider.js +3 -2
  6. package/Flex.js +22 -0
  7. package/Grid.js +1 -1
  8. package/LiquidFill.js +3 -2
  9. package/Loading.js +16 -3
  10. package/Marquee.js +3 -2
  11. package/QrCode.js +3 -2
  12. package/Space.js +3 -3
  13. package/Splitter.js +5 -5
  14. package/SuspenseFallbackTest.js +2 -4
  15. package/Tag.js +3 -2
  16. package/Tour.js +3 -2
  17. package/alert/index.js +61 -64
  18. package/anchor/index.js +5 -3
  19. package/back-top/index.js +32 -33
  20. package/badge/index.js +19 -18
  21. package/calendar/index.js +85 -84
  22. package/components/common/development/index.js +44 -29
  23. package/components/common/empty/index.js +35 -23
  24. package/components/common/flex/index.js +64 -0
  25. package/components/common/flex/interface.js +9 -0
  26. package/components/common/higher-order/with-speech-synthesis/index.js +79 -55
  27. package/components/common/space/index.js +71 -91
  28. package/components/common/suspense-fallback-test/index.js +16 -0
  29. package/components/common/utils/toArray.js +12 -0
  30. package/copy/index.js +83 -35
  31. package/details/index.js +102 -62
  32. package/divider/index.js +27 -21
  33. package/empty/index.js +13 -13
  34. package/flex/index.js +47 -0
  35. package/flex/interface.js +1 -0
  36. package/grid/{GridItem.js → Item.js} +15 -15
  37. package/grid/index.js +1 -1
  38. package/icon/interface.js +1 -0
  39. package/icon-hover/interface.js +1 -0
  40. package/index.js +610 -599
  41. package/input/Button.js +39 -34
  42. package/input/Textarea.js +108 -104
  43. package/liquid-fill/index.js +3 -2
  44. package/loading/index.js +72 -53
  45. package/loading/interface.js +1 -0
  46. package/marquee/index.js +3 -2
  47. package/modal/Modal.js +73 -74
  48. package/package.json +1 -1
  49. package/portal/interface.js +1 -0
  50. package/qr-code/index.js +3 -2
  51. package/segmented/index.js +113 -105
  52. package/space/index.js +41 -35
  53. package/speech-synthesis/interface.js +1 -0
  54. package/spin/index.js +75 -62
  55. package/splitter/Panel.js +39 -0
  56. package/splitter/SplitBar.js +157 -0
  57. package/splitter/Splitter.js +135 -0
  58. package/splitter/hooks/useEvent.js +12 -0
  59. package/splitter/hooks/useItems.js +26 -0
  60. package/splitter/hooks/useResizable.js +26 -0
  61. package/splitter/hooks/useResize.js +68 -0
  62. package/splitter/hooks/useSizes.js +60 -0
  63. package/splitter/index.js +6 -115
  64. package/style.css +1 -1
  65. package/suspense-fallback-test/index.js +2 -11
  66. package/suspense-fallback-test/interface.js +1 -0
  67. package/table/Table.js +38 -38
  68. package/table/hook/useThResizable.js +72 -26
  69. package/table/tbody/Td.js +80 -77
  70. package/table/th-resizable/index.js +92 -35
  71. package/tag/index.js +42 -41
  72. package/tooltip/index.js +89 -82
  73. package/tour/index.js +5 -6
  74. package/trigger/index.js +67 -70
  75. package/types/common/development/index.d.ts +7 -1
  76. package/types/common/development/interface.d.ts +22 -0
  77. package/types/common/empty/index.d.ts +2 -1
  78. package/types/common/flex/index.d.ts +14 -0
  79. package/types/common/flex/interface.d.ts +62 -0
  80. package/types/common/higher-order/with-speech-synthesis/index.d.ts +6 -1
  81. package/types/common/higher-order/with-speech-synthesis/interface.d.ts +13 -0
  82. package/types/common/space/index.d.ts +4 -3
  83. package/types/common/space/interface.d.ts +10 -18
  84. package/types/common/suspense-fallback-test/index.d.ts +7 -0
  85. package/types/common/suspense-fallback-test/interface.d.ts +1 -0
  86. package/types/common/utils/PqbCSSTransition.d.ts +1 -1
  87. package/types/common/utils/toArray.d.ts +13 -0
  88. package/types/pc/affix/interface.d.ts +0 -2
  89. package/types/pc/alert/index.d.ts +3 -2
  90. package/types/pc/alert/interface.d.ts +7 -1
  91. package/types/pc/anchor/index.d.ts +2 -1
  92. package/types/pc/anchor/interface.d.ts +0 -2
  93. package/types/pc/auto-complete/interface.d.ts +0 -6
  94. package/types/pc/avatar/interface.d.ts +0 -4
  95. package/types/pc/badge/Count.d.ts +1 -1
  96. package/types/pc/breadcrumb/Item.d.ts +1 -1
  97. package/types/pc/breadcrumb/interface.d.ts +0 -3
  98. package/types/pc/calendar/Month.d.ts +1 -1
  99. package/types/pc/calendar/WeekList.d.ts +1 -1
  100. package/types/pc/calendar/Year.d.ts +1 -1
  101. package/types/pc/calendar/header/Panel.d.ts +1 -1
  102. package/types/pc/calendar/header/index.d.ts +1 -1
  103. package/types/pc/calendar/index.d.ts +1 -1
  104. package/types/pc/calendar/interface.d.ts +2 -1
  105. package/types/pc/carousel/interface.d.ts +2 -6
  106. package/types/pc/cascader/interface.d.ts +7 -19
  107. package/types/pc/cascader/panel/List.d.ts +1 -1
  108. package/types/pc/cascader/panel/Option.d.ts +1 -1
  109. package/types/pc/cascader/panel/Search.d.ts +1 -1
  110. package/types/pc/checkbox/Group.d.ts +2 -2
  111. package/types/pc/checkbox/GroupBlock.d.ts +1 -1
  112. package/types/pc/checkbox/IconCheck.d.ts +1 -1
  113. package/types/pc/checkbox/interface.d.ts +0 -1
  114. package/types/pc/collapse/interface.d.ts +0 -2
  115. package/types/pc/color-picker/InputRgb.d.ts +1 -1
  116. package/types/pc/color-picker/Palette.d.ts +1 -1
  117. package/types/pc/color-picker/interface.d.ts +0 -2
  118. package/types/pc/config-provider/ConfigProvider.d.ts +1 -1
  119. package/types/pc/config-provider/interface.d.ts +17 -17
  120. package/types/pc/copy/index.d.ts +1 -1
  121. package/types/pc/copy/interface.d.ts +2 -1
  122. package/types/pc/date-picker/interface.d.ts +0 -17
  123. package/types/pc/date-picker/panel/Body.d.ts +1 -1
  124. package/types/pc/date-picker/panel/Footer.d.ts +1 -1
  125. package/types/pc/date-picker/panel/Header.d.ts +1 -1
  126. package/types/pc/date-picker/panel/WeekList.d.ts +1 -1
  127. package/types/pc/date-picker/panel/date/index.d.ts +1 -1
  128. package/types/pc/date-picker/panel/month/index.d.ts +1 -1
  129. package/types/pc/date-picker/panel/quarter/index.d.ts +1 -1
  130. package/types/pc/date-picker/panel/range/index.d.ts +1 -1
  131. package/types/pc/date-picker/panel/week/index.d.ts +1 -1
  132. package/types/pc/date-picker/panel/year/index.d.ts +1 -1
  133. package/types/pc/descriptions/index.d.ts +1 -1
  134. package/types/pc/descriptions/interface.d.ts +0 -1
  135. package/types/pc/details/index.d.ts +3 -2
  136. package/types/pc/details/interface.d.ts +16 -0
  137. package/types/pc/development/index.d.ts +2 -1
  138. package/types/pc/development/interface.d.ts +15 -0
  139. package/types/pc/divider/index.d.ts +7 -2
  140. package/types/pc/draggable/Item.d.ts +1 -1
  141. package/types/pc/draggable/index.d.ts +1 -1
  142. package/types/pc/drawer/interface.d.ts +0 -7
  143. package/types/pc/dropdown/interface.d.ts +0 -1
  144. package/types/pc/flex/index.d.ts +9 -0
  145. package/types/pc/flex/interface.d.ts +16 -0
  146. package/types/pc/form/Control.d.ts +1 -1
  147. package/types/pc/form/FormList.d.ts +1 -1
  148. package/types/pc/form/IconSymbol.d.ts +1 -1
  149. package/types/pc/form/interface.d.ts +9 -22
  150. package/types/pc/form/util.d.ts +1 -1
  151. package/types/pc/grid/index.d.ts +3 -3
  152. package/types/pc/grid/interface.d.ts +1 -6
  153. package/types/pc/icon/addFromIconFontCn.d.ts +1 -7
  154. package/types/pc/icon/index.d.ts +2 -7
  155. package/types/pc/icon/interface.d.ts +13 -0
  156. package/types/pc/icon-hover/index.d.ts +2 -8
  157. package/types/pc/icon-hover/interface.d.ts +8 -0
  158. package/types/pc/image/ImageFooter.d.ts +1 -1
  159. package/types/pc/image/ImagePreviewArrow.d.ts +1 -1
  160. package/types/pc/image/TriggerForToolbar.d.ts +1 -1
  161. package/types/pc/image/interface.d.ts +0 -13
  162. package/types/pc/index.d.ts +63 -50
  163. package/types/pc/input/Textarea.d.ts +2 -6
  164. package/types/pc/input/interface.d.ts +5 -13
  165. package/types/pc/input-number/interface.d.ts +0 -4
  166. package/types/pc/input-tag/interface.d.ts +0 -13
  167. package/types/pc/layout/interface.d.ts +0 -1
  168. package/types/pc/link/interface.d.ts +0 -1
  169. package/types/pc/list/interface.d.ts +0 -4
  170. package/types/pc/loading/index.d.ts +4 -3
  171. package/types/pc/loading/interface.d.ts +6 -0
  172. package/types/pc/menu/Indent.d.ts +1 -1
  173. package/types/pc/menu/OverflowWrap.d.ts +1 -1
  174. package/types/pc/menu/interface.d.ts +0 -8
  175. package/types/pc/menu/sub-menu/Inline.d.ts +1 -1
  176. package/types/pc/menu/sub-menu/Pop.d.ts +1 -1
  177. package/types/pc/message/interface.d.ts +0 -2
  178. package/types/pc/modal/interface.d.ts +0 -5
  179. package/types/pc/notification/interface.d.ts +0 -1
  180. package/types/pc/overflow-ellipsis/OverflowItem.d.ts +1 -1
  181. package/types/pc/overflow-ellipsis/index.d.ts +1 -1
  182. package/types/pc/pagination/PageItem.d.ts +3 -3
  183. package/types/pc/pagination/PageJumper.d.ts +1 -1
  184. package/types/pc/pagination/PageOption.d.ts +1 -1
  185. package/types/pc/pagination/interface.d.ts +0 -2
  186. package/types/pc/popconfirm/interface.d.ts +8 -10
  187. package/types/pc/popover/interface.d.ts +0 -1
  188. package/types/pc/portal/Portal.d.ts +2 -6
  189. package/types/pc/portal/index.d.ts +2 -9
  190. package/types/pc/portal/interface.d.ts +14 -0
  191. package/types/pc/progress/CircleProgress.d.ts +1 -1
  192. package/types/pc/progress/LineProgess.d.ts +1 -1
  193. package/types/pc/progress/StepProgress.d.ts +1 -1
  194. package/types/pc/progress/interface.d.ts +0 -3
  195. package/types/pc/radio/Group.d.ts +2 -2
  196. package/types/pc/radio/GroupBlock.d.ts +1 -1
  197. package/types/pc/radio/Radio.d.ts +1 -1
  198. package/types/pc/resize-box/ResizeTrigger.d.ts +1 -1
  199. package/types/pc/resize-box/interface.d.ts +1 -7
  200. package/types/pc/result/403.d.ts +1 -1
  201. package/types/pc/result/404.d.ts +1 -1
  202. package/types/pc/result/500.d.ts +1 -1
  203. package/types/pc/segmented/interface.d.ts +6 -6
  204. package/types/pc/select/interface.d.ts +0 -12
  205. package/types/pc/select-view/interface.d.ts +0 -7
  206. package/types/pc/skeleton/Image.d.ts +1 -1
  207. package/types/pc/skeleton/Text.d.ts +2 -1
  208. package/types/pc/slider/Button.d.ts +1 -1
  209. package/types/pc/slider/Input.d.ts +1 -1
  210. package/types/pc/slider/Tick.d.ts +1 -1
  211. package/types/pc/slider/interface.d.ts +0 -4
  212. package/types/pc/space/index.d.ts +7 -5
  213. package/types/pc/speech-synthesis/index.d.ts +3 -1
  214. package/types/pc/speech-synthesis/interface.d.ts +7 -0
  215. package/types/pc/spin/DotLoading.d.ts +1 -1
  216. package/types/pc/spin/interface.d.ts +4 -1
  217. package/types/pc/splitter/Panel.d.ts +8 -0
  218. package/types/pc/splitter/SplitBar.d.ts +21 -0
  219. package/types/pc/splitter/Splitter.d.ts +4 -0
  220. package/types/pc/splitter/hooks/useEvent.d.ts +3 -0
  221. package/types/pc/splitter/hooks/useItems.d.ts +10 -0
  222. package/types/pc/splitter/hooks/useResizable.d.ts +8 -0
  223. package/types/pc/splitter/hooks/useResize.d.ts +4 -0
  224. package/types/pc/splitter/hooks/useSizes.d.ts +5 -0
  225. package/types/pc/splitter/index.d.ts +8 -3
  226. package/types/pc/splitter/interface.d.ts +181 -38
  227. package/types/pc/statistic/interface.d.ts +0 -4
  228. package/types/pc/steps/interface.d.ts +0 -3
  229. package/types/pc/suspense-fallback-test/index.d.ts +2 -3
  230. package/types/pc/suspense-fallback-test/interface.d.ts +2 -0
  231. package/types/pc/table/ColGroup.d.ts +1 -1
  232. package/types/pc/table/hook/useThResizable.d.ts +2 -2
  233. package/types/pc/table/interface.d.ts +4 -15
  234. package/types/pc/table/summary/Cell.d.ts +1 -1
  235. package/types/pc/table/summary/Row.d.ts +1 -1
  236. package/types/pc/table/tbody/Td.d.ts +1 -1
  237. package/types/pc/table/tbody/index.d.ts +1 -1
  238. package/types/pc/table/tfoot/index.d.ts +1 -1
  239. package/types/pc/table/th-resizable/index.d.ts +1 -1
  240. package/types/pc/table/thead/Column.d.ts +1 -1
  241. package/types/pc/table/thead/index.d.ts +1 -1
  242. package/types/pc/tabs/TabContent.d.ts +1 -1
  243. package/types/pc/tabs/interface.d.ts +0 -7
  244. package/types/pc/tabs/tab-header/DropdownIcon.d.ts +1 -1
  245. package/types/pc/tabs/tab-header/TabInk.d.ts +1 -1
  246. package/types/pc/tabs/tab-header/TabNavIcon.d.ts +1 -1
  247. package/types/pc/tag/index.d.ts +2 -0
  248. package/types/pc/tag/interface.d.ts +0 -1
  249. package/types/pc/time-picker/Picker.d.ts +1 -1
  250. package/types/pc/time-picker/RangePicker.d.ts +1 -1
  251. package/types/pc/time-picker/TimeColumn.d.ts +1 -1
  252. package/types/pc/time-picker/TimePicker.d.ts +1 -1
  253. package/types/pc/time-picker/index.d.ts +1 -1
  254. package/types/pc/time-picker/interface.d.ts +0 -7
  255. package/types/pc/tooltip/interface.d.ts +4 -1
  256. package/types/pc/transfer/Item.d.ts +1 -1
  257. package/types/pc/transfer/List.d.ts +1 -1
  258. package/types/pc/transfer/interface.d.ts +2 -9
  259. package/types/pc/tree/Animation.d.ts +1 -1
  260. package/types/pc/tree/interface.d.ts +2 -8
  261. package/types/pc/tree-select/interface.d.ts +0 -8
  262. package/types/pc/trigger/interface.d.ts +0 -5
  263. package/types/pc/typography/EditContent.d.ts +2 -1
  264. package/types/pc/typography/Operations.d.ts +1 -1
  265. package/types/pc/typography/interface.d.ts +45 -30
  266. package/types/pc/upload/interface.d.ts +6 -11
  267. package/types/pc/upload/list/index.d.ts +1 -1
  268. package/types/pc/utils/index.d.ts +1 -0
  269. package/types/pc/utils/names.d.ts +6 -0
  270. package/types/pc/utils/toArray.d.ts +3 -0
  271. package/types/pc/verification-code/VerificationCode.d.ts +1 -1
  272. package/types/pc/verification-code/interface.d.ts +0 -2
  273. package/types/pc/virtual-list/VirtualList.d.ts +2 -38
  274. package/types/pc/virtual-list/index.d.ts +2 -1
  275. package/types/pc/virtual-list/interface.d.ts +56 -0
  276. package/types/pc/watermark/Watermark.d.ts +1 -1
  277. package/types/pc/watermark/interface.d.ts +0 -2
  278. package/typography/Base.js +73 -73
  279. package/typography/EditContent.js +43 -33
  280. package/typography/Ellipsis.js +117 -184
  281. package/typography/Operations.js +97 -49
  282. package/typography/useCssEllipsis.js +7 -6
  283. package/utils/index.js +117 -115
  284. package/utils/names.js +4 -0
  285. package/utils/toArray.js +5 -0
  286. package/version/index.js +1 -1
  287. package/virtual-list/interface.js +1 -0
  288. package/components/common/space/toArray.js +0 -11
  289. package/loading/style/index.module.less.js +0 -4
  290. package/types/common/space/toArray.d.ts +0 -3
  291. package/types/pc/suspense-fallback-test/style/index.d.ts +0 -1
  292. /package/{suspense-fallback-test/style/index.less.js → development/interface.js} +0 -0
  293. /package/types/pc/grid/{GridItem.d.ts → Item.d.ts} +0 -0
@@ -1,38 +1,35 @@
1
- import { jsxs as C, jsx as o } from "react/jsx-runtime";
2
- import { forwardRef as G, useContext as I, useRef as v, useState as N, useMemo as P, useEffect as M, useCallback as J } from "react";
1
+ import { jsxs as g, Fragment as K, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as Q, useContext as U, useRef as v, useState as R, useMemo as V, useEffect as S, useCallback as X } from "react";
3
3
  import "../config-provider/ConfigProvider.js";
4
- import K from "../components/common/hooks/useMergeProps.js";
5
- import Q from "../components/common/hooks/useMergeValue.js";
6
- import "lodash/isEqualWith";
7
- import "../components/common/utils/is.js";
8
- import "@unicom-cloud/utils/constant/keyboardCode";
9
- import "lodash/isNumber";
10
- import "lodash/merge";
11
- import { isServerRendering as U } from "../components/common/utils/dom.js";
12
- import "../components/common/hooks/useIntersectionObserver.js";
13
- import "../components/common/utils/reactDOM.js";
14
- import "@unicom-cloud/utils/constant";
15
- import "lodash/debounce";
4
+ import Y from "../copy/index.js";
5
+ import Z from "../components/common/hooks/useMergeProps.js";
6
+ import tt from "../components/common/hooks/useMergeValue.js";
7
+ import et from "../tooltip/index.js";
16
8
  import "@unicom-cloud/utils/case-name";
17
- import p from "@unicom-cloud/utils/class-name";
9
+ import n from "@unicom-cloud/utils/class-name";
18
10
  import "../dist/tinycolor/chunk/BOzCVdr0.js";
19
11
  import "@unicom-cloud/utils/constant/ui";
20
12
  import "../utils/contextHolder.js";
21
13
  import "@unicom-cloud/utils/dayjs";
22
14
  import "@unicom-cloud/utils/clipboard-copy";
23
15
  import "../components/common/utils/dayjs.js";
16
+ import { isServerRendering as rt } from "../components/common/utils/dom.js";
24
17
  import "@unicom-cloud/utils/file/fileToURL";
25
18
  import "lodash/escapeRegExp";
26
19
  import "lodash/isArray";
20
+ import "lodash/isNumber";
27
21
  import "lodash/isString";
28
22
  import "lodash/isFunction";
29
23
  import "lodash/throttle";
24
+ import "../components/common/utils/is.js";
30
25
  import "lodash/camelCase";
31
26
  import "lodash/capitalize";
32
27
  import "lodash/cloneDeep";
28
+ import "lodash/debounce";
33
29
  import "lodash/get";
34
30
  import "lodash/has";
35
31
  import "lodash/kebabCase";
32
+ import "lodash/merge";
36
33
  import "lodash/mergeWith";
37
34
  import "lodash/set";
38
35
  import "lodash/setWith";
@@ -41,173 +38,109 @@ import "lodash/startCase";
41
38
  import "lodash/uniq";
42
39
  import "lodash/upperFirst";
43
40
  import "@unicom-cloud/utils/math";
44
- import "lodash/isPlainObject";
41
+ import { mergedToString as ot } from "../components/common/utils/mergedToString.js";
45
42
  import "../dist/react-transition-group/src/CSSTransition.js";
46
43
  import "../dist/react-transition-group/src/ReplaceTransition.js";
47
44
  import "../dist/react-transition-group/src/SwitchTransition.js";
48
45
  import "../dist/react-transition-group/chunk/CPfP7aNL.js";
49
46
  import "../dist/react-transition-group/src/TransitionGroup.js";
50
- import { resizeObserver as X } from "../components/common/utils/resizeObserver.js";
47
+ import "../components/common/utils/reactDOM.js";
48
+ import { resizeObserver as it } from "../components/common/utils/resizeObserver.js";
51
49
  import "@unicom-cloud/utils/file/saveAs";
52
50
  import "@unicom-cloud/utils/screenfull";
53
51
  import "@unicom-cloud/utils/constant/ui.js";
54
- import { throttleByRaf as Y } from "../components/common/utils/throttleByRaf.js";
52
+ import "lodash/isPlainObject";
53
+ import { throttleByRaf as nt } from "../components/common/utils/throttleByRaf.js";
54
+ import "react-is";
55
55
  import "@unicom-cloud/utils/tree";
56
- import { isPlainObject as T } from "@unicom-cloud/utils/is";
56
+ import { isPlainObject as b, isFunction as st } from "@unicom-cloud/utils/is";
57
57
  import "uuid";
58
58
  import "../dist/validate/src/index.js";
59
- import "../affix/index.js";
60
- import "../alert/index.js";
61
- import "../anchor/Anchor.js";
62
- import "../auto-complete/index.js";
63
- import "../avatar/index.js";
64
- import "../back-top/index.js";
65
- import "../badge/index.js";
66
- import "../breadcrumb/index.js";
67
- import "../button/index.js";
68
- import "../calendar/index.js";
69
- import "../card/index.js";
70
- import "../carousel/index.js";
71
- import "../cascader/Cascader.js";
72
- import "../checkbox/Checkbox.js";
73
- import "../checkbox/Group.js";
74
- import "../collapse/Collapse.js";
75
- import "../comment/index.js";
76
- import "../copy/index.js";
77
- import "../date-picker/index.js";
78
- import "../descriptions/index.js";
79
- import "../details/index.js";
80
- import "../development/index.js";
81
- import "../divider/index.js";
82
- import "../drawer/Drawer.js";
83
- import "../dropdown/index.js";
84
- import "../empty/index.js";
85
- import "../form/index.js";
86
- import "../grid/index.js";
87
- import "../icon/index.js";
88
- import "../icons/file.js";
89
- import "../image/Image.js";
90
- import "../input/Input.js";
91
- import "../input-number/index.js";
92
- import "../input-tag/InputTag.js";
93
- import "../layout/index.js";
94
- import "../link/index.js";
95
- import "../list/index.js";
96
- import "../mentions/index.js";
97
- import "../menu/Menu.js";
98
- import "../message/index.js";
99
- import "../modal/Modal.js";
100
- import "../notification/index.js";
101
- import "../page-header/index.js";
102
- import "../pagination/Pagination.js";
103
- import "../popconfirm/index.js";
104
- import "../popover/index.js";
105
- import "../portal/index.js";
106
- import "../progress/index.js";
107
- import "../color-picker/index.js";
108
- import "../icon-hover/index.js";
109
- import "../loading/index.js";
110
- import "qrcode.react";
111
- import "../radio/Radio.js";
112
- import "../radio/Group.js";
113
- import "../rate/index.js";
114
- import "../resize-box/index.js";
115
- import "../result/index.js";
116
- import "../segmented/index.js";
117
- import "../select/Select.js";
118
- import "../skeleton/index.js";
119
- import "../slider/index.js";
120
- import "../space/index.js";
121
- import "../speech-synthesis/index.js";
122
- import "../spin/index.js";
123
- import "../statistic/index.js";
124
- import "../steps/index.js";
125
- import "../suspense-fallback-test/index.js";
126
- import "../switch/index.js";
127
- import "../table/index.js";
128
- import "../tabs/Tab.js";
129
- import "../tag/index.js";
130
- import "../time-picker/index.js";
131
- import "../timeline/Timeline.js";
132
- import Z from "../tooltip/index.js";
133
- import "@unicom-cloud/icons/IconUiClose";
134
- import "react-dom";
135
- import "../transfer/index.js";
136
- import "../tree/Tree.js";
137
- import "../tree-select/Select.js";
138
- import "../trigger/index.js";
139
- import "./index.js";
140
- import "../upload/Upload.js";
141
- import "../verification-code/VerificationCode.js";
142
- import "../virtual-list/VirtualList.js";
143
- import "../watermark/Watermark.js";
144
- import tt from "../config-provider/context.js";
145
- const rt = {
59
+ import "@unicom-cloud/utils/constant/keyboardCode";
60
+ import lt from "../config-provider/context.js";
61
+ const pt = {
146
62
  rows: 1,
147
63
  expandable: !0,
148
64
  defaultExpanded: !1
149
- }, ot = (z, it) => {
150
- const $ = I(tt), h = K(
151
- z,
152
- rt,
153
- $.componentConfig?.["Typography.Ellipsis"]
65
+ }, at = (j, mt) => {
66
+ const C = U(lt), N = Z(
67
+ j,
68
+ pt,
69
+ C.componentConfig?.["Typography.Ellipsis"]
154
70
  ), {
155
- className: V,
156
- style: j,
157
- rows: n,
158
- disabled: y,
71
+ className: A,
72
+ style: L,
73
+ rows: l,
74
+ disabled: w,
159
75
  showTooltip: c,
160
- children: s,
161
- expandable: f,
162
- expandRender: O,
163
- onExpand: E,
164
- onEllipsis: R
165
- } = h, { locale: w } = $, A = U ? !1 : /^((?!chrome|android).)*safari/i.test(navigator?.userAgent ?? ""), L = v(null), m = v(null), [g, S] = N(""), [D, b] = N(!1), l = v(null), a = v(null), [r, W] = Q(!1, {
166
- defaultValue: h.defaultExpanded,
167
- value: h.expanded
168
- }), [e, k] = N(!1), u = P(() => T(f) ? !f.single && n === 1 : n === 1, [n, f]), d = P(() => T(c) ? {
76
+ children: y,
77
+ // 潘启宝修改
78
+ expandable: d,
79
+ expandRender: P,
80
+ onExpand: W,
81
+ onEllipsis: k,
82
+ copyable: f
83
+ // 潘启宝添加
84
+ } = N, { locale: B } = C, D = rt ? !1 : /^((?!chrome|android).)*safari/i.test(navigator?.userAgent ?? ""), F = v(null), s = v(null), [O, H] = R(""), [_, E] = R(!1), p = v(null), a = v(null), [e, T] = tt(!1, {
85
+ defaultValue: N.defaultExpanded,
86
+ value: N.expanded
87
+ }), [i, M] = R(!1), x = V(() => b(d) ? !d.single && l === 1 : l === 1, [l, d]), h = V(() => b(c) ? {
169
88
  tooltip: !0,
170
89
  tooltipProps: c
171
90
  } : {
172
91
  tooltip: !!c,
173
92
  tooltipProps: c
174
93
  }, [c]);
175
- M(() => {
176
- if (m.current) {
177
- const i = m.current.textContent;
178
- i && S(i);
94
+ S(() => {
95
+ if (s.current) {
96
+ const o = s.current.textContent;
97
+ o && H(o);
179
98
  }
180
- }, [s, m]);
181
- const t = $.getPrefixCls?.("ellipsis"), H = () => O ? O(r) : /* @__PURE__ */ o("span", { className: `${t}-action-text`, children: r ? w?.Typography.fold : w?.Typography.unfold }), x = () => f && e ? /* @__PURE__ */ o(
99
+ }, [y, s]);
100
+ const t = C.getPrefixCls?.("ellipsis"), u = /* @__PURE__ */ g(K, { children: [
101
+ !!f && // 潘启宝添加
102
+ /* @__PURE__ */ r(
103
+ Y,
104
+ {
105
+ ...b(f) ? f : {},
106
+ text: () => {
107
+ let m = (b(f) ? f : {}).text;
108
+ return st(m) && (m = m()), m || (m = ot(y)), m;
109
+ },
110
+ className: `${t}-action-text-copy`
111
+ }
112
+ ),
113
+ y
114
+ ] }), q = () => P ? P(e) : /* @__PURE__ */ r("span", { className: `${t}-action-text`, children: e ? B?.Typography?.fold : B?.Typography?.unfold }), $ = () => d && i ? /* @__PURE__ */ r(
182
115
  "div",
183
116
  {
184
- className: p(`${t}-action`, {
185
- [`${t}-action-collapsed`]: !r
117
+ className: n(`${t}-action`, {
118
+ [`${t}-action-collapsed`]: !e
186
119
  }),
187
- onClick: (i) => {
188
- r ? (W(!1), E?.(!1, i)) : (W(!0), b(!1), E?.(!0, i));
120
+ onClick: (o) => {
121
+ e ? (T(!1), W?.(!1, o)) : (T(!0), E(!1), W?.(!0, o));
189
122
  },
190
- children: H()
123
+ children: q()
191
124
  }
192
- ) : null, _ = J(
193
- Y(() => {
194
- a.current && l.current && ((u ? a.current.offsetWidth > l.current.offsetWidth : a.current.offsetHeight > l.current.offsetHeight) ? e === !1 && (k(!0), R?.(!0)) : e === !0 && (k(!1), R?.(!1)));
125
+ ) : null, G = X(
126
+ nt(() => {
127
+ a.current && p.current && ((x ? a.current.offsetWidth > p.current.offsetWidth : a.current.offsetHeight > p.current.offsetHeight) ? i === !1 && (M(!0), k?.(!0)) : i === !0 && (M(!1), k?.(!1)));
195
128
  }),
196
- [e, u]
129
+ [i, x]
197
130
  );
198
- M(() => {
199
- const i = X(
200
- [l.current, a.current],
201
- _
131
+ S(() => {
132
+ const o = it(
133
+ [p.current, a.current],
134
+ G
202
135
  );
203
136
  return () => {
204
- i();
137
+ o();
205
138
  };
206
- }, [l.current, a.current]);
207
- const q = () => y ? null : /* @__PURE__ */ o(
139
+ }, [p.current, a.current]);
140
+ const I = () => w ? null : /* @__PURE__ */ r(
208
141
  "div",
209
142
  {
210
- className: u ? p(`${t}-content-mirror`, `${t}-single`) : p(
143
+ className: x ? n(`${t}-content-mirror`, `${t}-single`) : n(
211
144
  `${t}-content-mirror`,
212
145
  `${t}-multiple`,
213
146
  `${t}-collapsed`
@@ -215,75 +148,75 @@ const rt = {
215
148
  style: {
216
149
  WebkitBoxOrient: "vertical",
217
150
  MozBoxOrient: "vertical",
218
- WebkitLineClamp: n
151
+ WebkitLineClamp: l
219
152
  },
220
- ref: l,
221
- children: /* @__PURE__ */ o("span", { ref: a, className: `${t}-text`, children: s })
153
+ ref: p,
154
+ children: /* @__PURE__ */ r("span", { ref: a, className: `${t}-text`, children: u })
222
155
  }
223
- ), B = () => u ? /* @__PURE__ */ o("div", { className: p(`${t}-content`, `${t}-single`), children: /* @__PURE__ */ o("span", { ref: m, className: `${t}-text`, children: s }) }) : A ? /* @__PURE__ */ C(
156
+ ), z = () => x ? /* @__PURE__ */ r("div", { className: n(`${t}-content`, `${t}-single`), children: /* @__PURE__ */ r("span", { ref: s, className: `${t}-text`, children: u }) }) : D ? /* @__PURE__ */ g(
224
157
  "div",
225
158
  {
226
- className: p(`${t}-content`, `${t}-multiple`),
227
- title: !d.tooltip && e && !r ? g : void 0,
159
+ className: n(`${t}-content`, `${t}-multiple`),
160
+ title: !h.tooltip && i && !e ? O : void 0,
228
161
  children: [
229
- !r && x(),
230
- /* @__PURE__ */ o(
162
+ !e && $(),
163
+ /* @__PURE__ */ r(
231
164
  "span",
232
165
  {
233
- ref: m,
234
- className: p(`${t}-text`, {
235
- [`${t}-collapsed`]: !r
166
+ ref: s,
167
+ className: n(`${t}-text`, {
168
+ [`${t}-collapsed`]: !e
236
169
  }),
237
170
  style: {
238
171
  WebkitBoxOrient: "vertical",
239
172
  MozBoxOrient: "vertical",
240
- WebkitLineClamp: n
173
+ WebkitLineClamp: l
241
174
  },
242
- children: s
175
+ children: u
243
176
  }
244
177
  ),
245
- r && x()
178
+ e && $()
246
179
  ]
247
180
  }
248
- ) : /* @__PURE__ */ C(
181
+ ) : /* @__PURE__ */ g(
249
182
  "div",
250
183
  {
251
- className: p(`${t}-content`, `${t}-multiple`, {
252
- [`${t}-collapsed`]: !r
184
+ className: n(`${t}-content`, `${t}-multiple`, {
185
+ [`${t}-collapsed`]: !e
253
186
  }),
254
187
  style: {
255
188
  WebkitBoxOrient: "vertical",
256
189
  MozBoxOrient: "vertical",
257
- WebkitLineClamp: n
190
+ WebkitLineClamp: l
258
191
  },
259
- title: !d.tooltip && e && !r ? g : void 0,
192
+ title: !h.tooltip && i && !e ? O : void 0,
260
193
  children: [
261
- !r && x(),
262
- /* @__PURE__ */ o("span", { ref: m, className: `${t}-text`, children: s }),
263
- r && x()
194
+ !e && $(),
195
+ /* @__PURE__ */ r("span", { ref: s, className: `${t}-text`, children: u }),
196
+ e && $()
264
197
  ]
265
198
  }
266
- ), F = () => y ? /* @__PURE__ */ o("div", { className: `${t}-content`, children: /* @__PURE__ */ o("span", { ref: m, className: `${t}-text`, children: s }) }) : d.tooltip ? /* @__PURE__ */ o(
267
- Z,
199
+ ), J = () => w ? /* @__PURE__ */ r("div", { className: `${t}-content`, children: /* @__PURE__ */ r("span", { ref: s, className: `${t}-text`, children: u }) }) : h.tooltip ? /* @__PURE__ */ r(
200
+ et,
268
201
  {
269
- content: g,
270
- popupVisible: D,
271
- disabled: !e || r,
202
+ content: O,
203
+ popupVisible: _,
204
+ disabled: !i || e,
272
205
  triggerProps: {
273
206
  mouseEnterDelay: 100
274
207
  },
275
- onVisibleChange: (i) => {
276
- i ? e && !r && b(!0) : b(!1);
208
+ onVisibleChange: (o) => {
209
+ o ? i && !e && E(!0) : E(!1);
277
210
  },
278
- ...d.tooltipProps,
279
- children: B()
211
+ ...h.tooltipProps,
212
+ children: z()
280
213
  }
281
- ) : B();
282
- return /* @__PURE__ */ C("div", { ref: L, className: p(t, V), style: j, children: [
283
- q(),
284
- F()
214
+ ) : z();
215
+ return /* @__PURE__ */ g("div", { ref: F, className: n(t, A), style: L, children: [
216
+ I(),
217
+ J()
285
218
  ] });
286
- }, Ho = G(ot);
219
+ }, $e = Q(at);
287
220
  export {
288
- Ho as default
221
+ $e as default
289
222
  };
@@ -1,76 +1,124 @@
1
- import { jsx as t, jsxs as v, Fragment as I } from "react/jsx-runtime";
2
- import S from "@unicom-cloud/icons/IconUiEdit";
3
- import $ from "lodash/isArray";
4
- import s from "lodash/isPlainObject";
5
- import { useEffect as O } from "react";
6
- import w from "../copy/index.js";
7
- import A from "../components/common/hooks/useKeyboardEvent.js";
8
- import F from "../tooltip/index.js";
9
- import { mergedToString as x } from "../components/common/utils/mergedToString.js";
10
- function J(g) {
1
+ import { jsx as r, jsxs as I, Fragment as S } from "react/jsx-runtime";
2
+ import $ from "@unicom-cloud/icons/IconUiEdit";
3
+ import v from "lodash/isArray";
4
+ import n from "lodash/isPlainObject";
5
+ import { useEffect as F } from "react";
6
+ import O from "../copy/index.js";
7
+ import w from "../components/common/hooks/useKeyboardEvent.js";
8
+ import A from "../tooltip/index.js";
9
+ import "@unicom-cloud/utils/case-name";
10
+ import "@unicom-cloud/utils/class-name";
11
+ import "../dist/tinycolor/chunk/BOzCVdr0.js";
12
+ import "@unicom-cloud/utils/constant/ui";
13
+ import "../utils/contextHolder.js";
14
+ import "@unicom-cloud/utils/dayjs";
15
+ import "@unicom-cloud/utils/clipboard-copy";
16
+ import "../components/common/utils/dayjs.js";
17
+ import "../components/common/utils/dom.js";
18
+ import "@unicom-cloud/utils/file/fileToURL";
19
+ import "lodash/escapeRegExp";
20
+ import "lodash/isNumber";
21
+ import "lodash/isString";
22
+ import "lodash/isFunction";
23
+ import "lodash/throttle";
24
+ import "../components/common/utils/is.js";
25
+ import "lodash/camelCase";
26
+ import "lodash/capitalize";
27
+ import "lodash/cloneDeep";
28
+ import "lodash/debounce";
29
+ import "lodash/get";
30
+ import "lodash/has";
31
+ import "lodash/kebabCase";
32
+ import "lodash/merge";
33
+ import "lodash/mergeWith";
34
+ import "lodash/set";
35
+ import "lodash/setWith";
36
+ import "lodash/snakeCase";
37
+ import "lodash/startCase";
38
+ import "lodash/uniq";
39
+ import "lodash/upperFirst";
40
+ import "@unicom-cloud/utils/math";
41
+ import { mergedToString as g } from "../components/common/utils/mergedToString.js";
42
+ import "../dist/react-transition-group/src/CSSTransition.js";
43
+ import "../dist/react-transition-group/src/ReplaceTransition.js";
44
+ import "../dist/react-transition-group/src/SwitchTransition.js";
45
+ import "../dist/react-transition-group/chunk/CPfP7aNL.js";
46
+ import "../dist/react-transition-group/src/TransitionGroup.js";
47
+ import "../components/common/utils/reactDOM.js";
48
+ import "@unicom-cloud/utils/file/saveAs";
49
+ import "@unicom-cloud/utils/screenfull";
50
+ import "@unicom-cloud/utils/constant/ui.js";
51
+ import "react-is";
52
+ import "@unicom-cloud/utils/tree";
53
+ import { isFunction as K } from "@unicom-cloud/utils/is";
54
+ import "uuid";
55
+ import "../dist/validate/src/index.js";
56
+ import "@unicom-cloud/utils/constant/keyboardCode";
57
+ function zo(u) {
11
58
  const {
12
- children: l,
13
- copyable: n,
14
- editable: r,
15
- ellipsis: a,
59
+ children: s,
60
+ copyable: i,
61
+ editable: p,
62
+ ellipsis: l,
16
63
  expanding: E,
17
- setEditing: u,
18
- onClickExpand: c,
19
- forceShowExpand: b,
20
- isEllipsis: h,
21
- currentContext: C = {}
22
- } = g, d = A(), { getPrefixCls: P, locale: o } = C, i = P?.("typography"), p = s(a) ? a : {}, m = s(r) ? r : {}, f = $(p.expandNodes) ? p.expandNodes : [o?.Typography?.fold, o?.Typography?.unfold], y = (j) => {
23
- m.onStart?.(x(l), j), u(!0);
24
- }, e = s(n) ? { ...n } : {};
25
- e.text === void 0 && (e.text = x(l));
26
- const T = !!n && /* @__PURE__ */ t(
27
- w,
64
+ setEditing: b,
65
+ onClickExpand: a,
66
+ forceShowExpand: h,
67
+ isEllipsis: C,
68
+ currentContext: T = {}
69
+ } = u, c = w(), { getPrefixCls: N, locale: t } = T, e = N?.("typography"), d = n(i) ? i : {}, m = n(l) ? l : {}, f = n(p) ? p : {}, x = v(m.expandNodes) ? m.expandNodes : [t?.Typography?.fold, t?.Typography?.unfold], y = (o) => {
70
+ f.onStart?.(g(s), o), b(!0);
71
+ }, P = !!i && /* @__PURE__ */ r(
72
+ O,
28
73
  {
29
- ...e,
30
- className: `${i}-operation-copy`,
31
- tooltipProps: e.tooltipProps
74
+ ...d,
75
+ text: () => {
76
+ let o = d.text;
77
+ return K(o) && (o = o()), o || (o = g(s)), o;
78
+ },
79
+ className: `${e}-operation-copy`
32
80
  }
33
- ), N = r && /* @__PURE__ */ t(
34
- F,
81
+ ), k = p && /* @__PURE__ */ r(
82
+ A,
35
83
  {
36
- content: o?.Typography?.edit,
37
- ...m.tooltipProps,
38
- children: /* @__PURE__ */ t(
84
+ content: t?.Typography?.edit,
85
+ ...f.tooltipProps,
86
+ children: /* @__PURE__ */ r(
39
87
  "span",
40
88
  {
41
89
  tabIndex: 0,
42
- "aria-label": o?.Typography?.edit,
90
+ "aria-label": t?.Typography?.edit,
43
91
  role: "button",
44
- className: `${i}-operation-edit`,
92
+ className: `${e}-operation-edit`,
45
93
  onClick: y,
46
- ...d({
94
+ ...c({
47
95
  onPressEnter: y
48
96
  }),
49
- children: /* @__PURE__ */ t(S, {})
97
+ children: /* @__PURE__ */ r($, {})
50
98
  }
51
99
  )
52
100
  }
53
- ), k = b || p.expandable && h ? /* @__PURE__ */ t(
101
+ ), j = h || m.expandable && C ? /* @__PURE__ */ r(
54
102
  "a",
55
103
  {
56
- className: `${i}-operation-expand`,
57
- onClick: c,
104
+ className: `${e}-operation-expand`,
105
+ onClick: a,
58
106
  role: "button",
59
107
  tabIndex: 0,
60
- "aria-label": o?.Typography?.unfold,
61
- ...d({
62
- onPressEnter: c
108
+ "aria-label": t?.Typography?.unfold,
109
+ ...c({
110
+ onPressEnter: a
63
111
  }),
64
- children: E ? f[0] : f[1]
112
+ children: E ? x[0] : x[1]
65
113
  }
66
114
  ) : null;
67
- return O(() => () => {
68
- }, []), /* @__PURE__ */ v(I, { children: [
115
+ return F(() => () => {
116
+ }, []), /* @__PURE__ */ I(S, { children: [
117
+ j,
69
118
  k,
70
- N,
71
- T
119
+ P
72
120
  ] });
73
121
  }
74
122
  export {
75
- J as default
123
+ zo as default
76
124
  };
@@ -1,8 +1,9 @@
1
- import p from "lodash/isUndefined";
2
- import { useMemo as u } from "react";
1
+ import { useMemo as p } from "react";
2
+ import "../components/common/utils/is.js";
3
+ import { isUndefined as u } from "@unicom-cloud/utils/is";
3
4
  const w = (e, t) => {
4
5
  if (typeof window < "u" && window.CSS && window.CSS.supports)
5
- return p(t) ? window.CSS.supports(e) : window.CSS.supports(e, t);
6
+ return u(t) ? window.CSS.supports(e) : window.CSS.supports(e, t);
6
7
  if (typeof document < "u" && document.createElement) {
7
8
  const i = document.createElement("div");
8
9
  return i.setAttribute("style", `${e}:${t};`), typeof i.style[e] < "u";
@@ -14,8 +15,8 @@ const w = (e, t) => {
14
15
  }, f = () => Object.entries(d).every(
15
16
  ([e, t]) => w(e, t)
16
17
  );
17
- function S(e) {
18
- const { cssEllipsis: t, ellipsisStr: i = "...", suffix: s, rows: o } = e, n = u(() => !t || o > 1 && !f() ? !1 : i === "..." && !s, [i, t, o, s]), r = {
18
+ function a(e) {
19
+ const { cssEllipsis: t, ellipsisStr: i = "...", suffix: s, rows: o } = e, n = p(() => !t || o > 1 && !f() ? !1 : i === "..." && !s, [i, t, o, s]), r = {
19
20
  textOverflow: "ellipsis",
20
21
  whiteSpace: "nowrap",
21
22
  overflow: "hidden"
@@ -33,5 +34,5 @@ function S(e) {
33
34
  };
34
35
  }
35
36
  export {
36
- S as default
37
+ a as default
37
38
  };