@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,46 +1,103 @@
1
- import { jsx as C, jsxs as M } from "react/jsx-runtime";
2
- import X from "lodash/isFunction";
3
- import { useRef as u, useContext as z, useCallback as o, useEffect as E } from "react";
1
+ import { jsx as h, jsxs as M, Fragment as P } from "react/jsx-runtime";
2
+ import { useRef as s, useContext as X, useEffect as j } from "react";
4
3
  import "../../config-provider/ConfigProvider.js";
5
- import T from "@unicom-cloud/utils/class-name";
6
- import { on as b, off as w } from "../../components/common/utils/dom.js";
7
- import { defaultComponent as j } from "../constant.js";
4
+ import "@unicom-cloud/utils/case-name";
5
+ import z from "@unicom-cloud/utils/class-name";
6
+ import "../../dist/tinycolor/chunk/BOzCVdr0.js";
7
+ import "@unicom-cloud/utils/constant/ui";
8
+ import "../../utils/contextHolder.js";
9
+ import "@unicom-cloud/utils/dayjs";
10
+ import "@unicom-cloud/utils/clipboard-copy";
11
+ import "../../components/common/utils/dayjs.js";
12
+ import { off as g, on as C } from "../../components/common/utils/dom.js";
13
+ import "@unicom-cloud/utils/file/fileToURL";
14
+ import "lodash/escapeRegExp";
15
+ import "lodash/isArray";
16
+ import "lodash/isNumber";
17
+ import "lodash/isString";
18
+ import "lodash/isFunction";
19
+ import "lodash/throttle";
20
+ import "../../components/common/utils/is.js";
21
+ import "lodash/camelCase";
22
+ import "lodash/capitalize";
23
+ import "lodash/cloneDeep";
24
+ import "lodash/debounce";
25
+ import "lodash/get";
26
+ import "lodash/has";
27
+ import "lodash/kebabCase";
28
+ import "lodash/merge";
29
+ import "lodash/mergeWith";
30
+ import "lodash/set";
31
+ import "lodash/setWith";
32
+ import "lodash/snakeCase";
33
+ import "lodash/startCase";
34
+ import "lodash/uniq";
35
+ import "lodash/upperFirst";
36
+ import "@unicom-cloud/utils/math";
37
+ import "lodash/isPlainObject";
38
+ import "../../dist/react-transition-group/src/CSSTransition.js";
39
+ import "../../dist/react-transition-group/src/ReplaceTransition.js";
40
+ import "../../dist/react-transition-group/src/SwitchTransition.js";
41
+ import "../../dist/react-transition-group/chunk/CPfP7aNL.js";
42
+ import "../../dist/react-transition-group/src/TransitionGroup.js";
43
+ import "../../components/common/utils/reactDOM.js";
44
+ import "@unicom-cloud/utils/file/saveAs";
45
+ import "@unicom-cloud/utils/screenfull";
46
+ import "@unicom-cloud/utils/constant/ui.js";
47
+ import "react-is";
48
+ import "@unicom-cloud/utils/tree";
49
+ import { isFunction as E, isPlainObject as T } from "@unicom-cloud/utils/is";
50
+ import "uuid";
51
+ import "../../dist/validate/src/index.js";
52
+ import "@unicom-cloud/utils/constant/keyboardCode";
53
+ import { defaultComponent as D } from "../constant.js";
8
54
  /* empty css */
9
- import D from "../../config-provider/context.js";
10
- function A(v) {
11
- let { className: r, children: m, column: a, onResize: l, ...f } = v;
12
- const p = j.header.th, n = u(null), x = u(null), t = u({}), { getPrefixCls: R } = z(D), d = R?.("table-th-resizable");
13
- if (!X(l)) return /* @__PURE__ */ C(p, { ref: n, ...f, className: r, children: m });
14
- const h = o((e) => {
15
- t.current.boundingClientRect = n.current.getBoundingClientRect(), t.current.pageX = e?.pageX ?? 0, N();
16
- }, []), s = o((e) => {
17
- g();
18
- }, []), c = o((e) => {
19
- let i = t.current.boundingClientRect.width + ((e?.pageX ?? 0) - t.current.pageX);
20
- i < 0 || (a.width = i, l?.({
21
- column: a,
22
- width: i,
23
- widthOrigin: t.current.boundingClientRect.width
55
+ import F from "../../config-provider/context.js";
56
+ function Bt(b) {
57
+ let {
58
+ className: r,
59
+ children: u,
60
+ column: i,
61
+ onResize: c,
62
+ ...w
63
+ } = b;
64
+ const v = D.header.th, f = s(null), x = s(null), o = s({}), { getPrefixCls: R } = X(F), a = R?.("table-th-resizable");
65
+ function l(t) {
66
+ o.current.boundingClientRect = f.current.getBoundingClientRect(), o.current.pageX = t?.pageX ?? 0, n(), N();
67
+ }
68
+ function e(t) {
69
+ n();
70
+ }
71
+ function m(t) {
72
+ let p = o.current.boundingClientRect.width + ((t?.pageX ?? 0) - o.current.pageX);
73
+ p < 0 || (T(i) && (i.width = p), c?.({
74
+ column: i,
75
+ width: p,
76
+ widthOrigin: o.current.boundingClientRect.width
24
77
  }));
25
- }, []), N = o((e) => {
26
- b(document, "mousemove", c), b(document, "mouseup", s);
27
- }, []), g = o((e) => {
28
- w(document, "mousemove", c), w(document, "mouseup", s);
29
- }, []);
30
- return r = T(r, d), E(() => (h(), c(), s(), () => {
31
- g();
32
- }), []), /* @__PURE__ */ M(p, { ref: n, ...f, className: r, children: [
33
- m,
34
- /* @__PURE__ */ C(
78
+ }
79
+ function N(t) {
80
+ C(document, "mousemove", m), C(document, "mouseup", e);
81
+ }
82
+ function n(t) {
83
+ g(document, "mousemove", m), g(document, "mouseup", e);
84
+ }
85
+ r = z(r, a), j(() => (l(), m(), e(), () => {
86
+ n();
87
+ }), []);
88
+ let d = u;
89
+ return E(c) && (d = /* @__PURE__ */ M(P, { children: [
90
+ u,
91
+ /* @__PURE__ */ h(
35
92
  "div",
36
93
  {
37
94
  ref: x,
38
- className: `${d}-cursor`,
39
- onMouseDown: h
95
+ className: `${a}-cursor`,
96
+ onMouseDown: l
40
97
  }
41
98
  )
42
- ] });
99
+ ] })), /* @__PURE__ */ h(v, { ref: f, ...w, className: r, children: d });
43
100
  }
44
101
  export {
45
- A as default
102
+ Bt as default
46
103
  };
package/tag/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { jsx as r, jsxs as y, Fragment as B } from "react/jsx-runtime";
2
- import D from "@unicom-cloud/icons/IconUiClose";
3
- import G from "@unicom-cloud/icons/IconUiLoading";
4
- import C from "lodash/isPlainObject";
1
+ import { jsx as r, jsxs as y, Fragment as q } from "react/jsx-runtime";
2
+ import B from "@unicom-cloud/icons/IconUiClose";
3
+ import D from "@unicom-cloud/icons/IconUiLoading";
4
+ import g from "lodash/isPlainObject";
5
5
  import { forwardRef as J, useContext as Q, useState as b } from "react";
6
6
  import "../config-provider/ConfigProvider.js";
7
7
  import W from "../components/common/hooks/useKeyboardEvent.js";
@@ -27,89 +27,89 @@ const ce = [
27
27
  ], se = {
28
28
  size: "default"
29
29
  };
30
- function re(P, I) {
31
- const { getPrefixCls: O, componentConfig: E, rtl: T } = Q(ne), _ = W(), n = X(
32
- P,
30
+ function re(O, P) {
31
+ const { getPrefixCls: I, componentConfig: T, rtl: _ } = Q(ne), E = W(), n = X(
32
+ O,
33
33
  se,
34
- E?.Tag
34
+ T?.Tag
35
35
  ), {
36
- className: j,
37
- style: z,
36
+ className: L,
37
+ style: S,
38
38
  children: k,
39
39
  color: s,
40
40
  closable: c,
41
41
  checkable: t,
42
- defaultChecked: H,
42
+ defaultChecked: j,
43
43
  size: u,
44
- onClose: L,
45
- onCheck: S,
44
+ onClose: z,
45
+ onCheck: H,
46
46
  icon: $,
47
47
  closeIcon: l,
48
- bordered: w,
49
- __closeIconProps: K,
50
- ...R
51
- } = n, e = O?.("tag"), [U, v] = b(
48
+ bordered: R,
49
+ __closeIconProps: w,
50
+ ...K
51
+ } = n, e = I?.("tag"), [U, v] = b(
52
52
  "visible" in n ? n.visible : !0
53
- ), [V, F] = b(
54
- "checked" in n ? n.checked : H
55
- ), [a, m] = b(), x = "checked" in n ? n.checked : V, M = "visible" in n ? n.visible : U;
53
+ ), [V, A] = b(
54
+ "checked" in n ? n.checked : j
55
+ ), [a, m] = b(), x = "checked" in n ? n.checked : V, F = "visible" in n ? n.visible : U;
56
56
  function d(o) {
57
- const g = L?.(o);
58
- g && g.then ? (m(!0), g.then(() => {
57
+ const C = z?.(o);
58
+ C && C.then ? (m(!0), C.then(() => {
59
59
  m(!1), v(!1);
60
60
  }).catch(() => {
61
61
  m(!1);
62
62
  })) : v(!1);
63
63
  }
64
- function q() {
64
+ function G() {
65
65
  const o = !x;
66
- "checked" in n || F(o), S?.(o);
66
+ "checked" in n || A(o), H?.(o);
67
67
  }
68
- const i = s && ce.indexOf(s) !== -1 ? s : "", p = t ? x : !0, A = ee(
68
+ const i = s && ce.indexOf(s) !== -1 ? s : "", p = t ? x : !0, M = ee(
69
69
  e,
70
70
  {
71
71
  [`${e}-loading`]: a,
72
- [`${e}-hide`]: !M,
72
+ [`${e}-hide`]: !F,
73
73
  [`${e}-${i}`]: i,
74
74
  [`${e}-checkable`]: t,
75
75
  [`${e}-checked`]: p,
76
76
  [`${e}-size-${u}`]: u,
77
- [`${e}-bordered`]: w,
77
+ [`${e}-bordered`]: R,
78
78
  [`${e}-custom-color`]: p && s && !i,
79
- [`${e}-rtl`]: T
79
+ [`${e}-rtl`]: _
80
80
  },
81
- j
81
+ L
82
82
  ), f = {
83
- ...z
83
+ ...S
84
84
  };
85
85
  s && !i && p && (f.backgroundColor ||= s, f.borderColor ||= s);
86
- const N = oe(R, ["visible"]);
87
- t && (N.onClick = q);
86
+ const N = oe(K, ["visible"]);
87
+ t && (N.onClick = G);
88
88
  let h = /* @__PURE__ */ r(
89
89
  Y,
90
90
  {
91
91
  prefix: e,
92
92
  className: `${e}-close-btn`,
93
93
  onClick: (o) => {
94
- C(c?.popconfirm) || d(o);
94
+ g(c?.popconfirm) || d(o);
95
95
  },
96
96
  role: "button",
97
97
  tabIndex: 0,
98
- ..._({
98
+ ...E({
99
99
  onPressEnter(o) {
100
- C(c?.popconfirm) || d(o);
100
+ g(c?.popconfirm) || d(o);
101
101
  }
102
102
  }),
103
103
  "aria-label": "Close",
104
- ...K,
105
- children: l !== void 0 ? l : /* @__PURE__ */ r(D, {})
104
+ ...w,
105
+ children: l !== void 0 ? l : /* @__PURE__ */ r(B, {})
106
106
  }
107
107
  );
108
- return C(c?.popconfirm) && (h = /* @__PURE__ */ r(
108
+ return g(c?.popconfirm) && (h = /* @__PURE__ */ r(
109
109
  Z,
110
110
  {
111
111
  ...c?.popconfirm,
112
- title: c?.popconfirm?.title || /* @__PURE__ */ y(B, { children: [
112
+ title: c?.popconfirm?.title || /* @__PURE__ */ y(q, { children: [
113
113
  "确定要关闭 ",
114
114
  k
115
115
  ] }),
@@ -121,15 +121,16 @@ function re(P, I) {
121
121
  },
122
122
  children: h
123
123
  }
124
- )), /* @__PURE__ */ y("div", { ref: I, style: f, className: A, ...N, children: [
124
+ )), /* @__PURE__ */ y("div", { ref: P, style: f, className: M, ...N, children: [
125
125
  $ && /* @__PURE__ */ r("span", { className: `${e}-icon`, children: $ }),
126
126
  /* @__PURE__ */ r("span", { className: `${e}-content`, children: k }),
127
127
  !!c && !a && l !== null && h,
128
- a && /* @__PURE__ */ r("span", { className: `${e}-loading-icon`, children: /* @__PURE__ */ r(G, {}) })
128
+ a && /* @__PURE__ */ r("span", { className: `${e}-loading-icon`, children: /* @__PURE__ */ r(D, {}) })
129
129
  ] });
130
130
  }
131
131
  const ie = J(re);
132
132
  ie.displayName = "Tag";
133
133
  export {
134
+ ce as TAG_COLORS,
134
135
  ie as default
135
136
  };
package/tooltip/index.js CHANGED
@@ -1,69 +1,71 @@
1
1
  import { jsx as p } from "react/jsx-runtime";
2
2
  import "../dist/tinycolor/chunk/BOzCVdr0.js";
3
- import { TinyColor as L } from "../dist/tinycolor/src/index.js";
4
- import F from "lodash/isFunction";
5
- import { forwardRef as I, useContext as S, useRef as j, useImperativeHandle as z, useMemo as B } from "react";
3
+ import { TinyColor as F } from "../dist/tinycolor/src/index.js";
4
+ import I from "lodash/isFunction";
5
+ import { forwardRef as S, useContext as j, useRef as z, useImperativeHandle as B, useMemo as W } from "react";
6
6
  import "../config-provider/ConfigProvider.js";
7
- import W from "../components/common/hooks/useMergeProps.js";
8
- import q, { EventsByTriggerNeed as G } from "../trigger/index.js";
9
- import f from "@unicom-cloud/utils/class-name";
10
- import { isEmptyReactNode as J } from "../components/common/utils/is.js";
11
- import { pickDataAttributes as K, pick as Q } from "../components/common/utils/pick.js";
12
- import U from "../config-provider/context.js";
13
- const X = {
7
+ import q from "../components/common/hooks/useMergeProps.js";
8
+ import G, { EventsByTriggerNeed as J } from "../trigger/index.js";
9
+ import g from "@unicom-cloud/utils/class-name";
10
+ import { isEmptyReactNode as K } from "../components/common/utils/is.js";
11
+ import { pickDataAttributes as Q, pick as U } from "../components/common/utils/pick.js";
12
+ import X from "../config-provider/context.js";
13
+ const Y = {
14
14
  position: "top",
15
15
  trigger: "hover",
16
16
  escToClose: !1,
17
17
  unmountOnExit: !0,
18
18
  blurToHide: !0,
19
19
  popupHoverStay: !0
20
- }, Y = {
20
+ }, Z = {
21
21
  enter: 300,
22
22
  exit: 100
23
- }, Z = {
23
+ }, _ = {
24
24
  left: 12,
25
25
  right: 12,
26
26
  top: 12,
27
27
  bottom: 12
28
28
  };
29
- function _(g, d) {
30
- const { getPrefixCls: P, componentConfig: C } = S(U), n = W(
31
- g,
32
- X,
33
- C?.Tooltip
29
+ function oo(d, P) {
30
+ const { getPrefixCls: C, componentConfig: b } = j(X), n = q(
31
+ d,
32
+ Y,
33
+ b?.Tooltip
34
34
  ), {
35
- style: b,
35
+ style: h,
36
36
  className: l,
37
- children: h,
38
- trigger: x,
39
- escToClose: N,
40
- defaultPopupVisible: y,
37
+ children: x,
38
+ trigger: N,
39
+ escToClose: y,
40
+ defaultPopupVisible: T,
41
41
  position: a,
42
- unmountOnExit: T,
43
- popupVisible: w,
44
- prefixCls: V,
45
- blurToHide: v,
46
- popupHoverStay: $,
47
- disabled: D,
42
+ unmountOnExit: w,
43
+ popupVisible: V,
44
+ prefixCls: v,
45
+ blurToHide: $,
46
+ popupHoverStay: D,
47
+ disabled: E,
48
48
  onVisibleChange: A,
49
49
  triggerProps: u,
50
- childrenPrefix: E,
51
- getPopupContainer: H,
52
- content: i,
53
- mini: O,
54
- color: e,
55
- ...c
56
- } = n, t = j(), R = (s = 0, M) => {
57
- t.current?.updatePopupPosition?.(s, M);
50
+ childrenPrefix: H,
51
+ getPopupContainer: O,
52
+ content: s,
53
+ mini: R,
54
+ color: r,
55
+ pre: c,
56
+ // 潘启宝添加
57
+ ...m
58
+ } = n, t = z(), k = (i = 0, L) => {
59
+ t.current?.updatePopupPosition?.(i, L);
58
60
  };
59
- z(
60
- d,
61
+ B(
62
+ P,
61
63
  () => ({
62
64
  // ...refTrigger.current,
63
- updatePopupPosition: R,
65
+ updatePopupPosition: k,
64
66
  getRootDOMNode: () => t.current?.getRootDOMNode?.(),
65
- setPopupVisible(s) {
66
- t.current?.setPopupVisible?.(s);
67
+ setPopupVisible(i) {
68
+ t.current?.setPopupVisible?.(i);
67
69
  },
68
70
  hide() {
69
71
  t.current?.setPopupVisible?.(!1);
@@ -71,66 +73,71 @@ function _(g, d) {
71
73
  }),
72
74
  []
73
75
  );
74
- const r = V || P?.("tooltip"), o = {
75
- ...Q(c, G),
76
- ...K(c),
76
+ const e = v || C?.("tooltip"), o = {
77
+ ...U(m, J),
78
+ ...Q(m),
77
79
  ...u,
78
- className: f(l, u?.className)
79
- }, m = F(i) ? i() : i;
80
- "popupVisible" in n ? o.popupVisible = w : J(m, !0) && (o.popupVisible = !1), (o.showArrow !== !1 || o.arrowProps) && (o.arrowProps = o.arrowProps || {}, e && (o.arrowProps.style = {
81
- backgroundColor: e,
80
+ className: g(l, u?.className)
81
+ }, f = I(s) ? s() : s;
82
+ "popupVisible" in n ? o.popupVisible = V : K(f, !0) && (o.popupVisible = !1), (o.showArrow !== !1 || o.arrowProps) && (o.arrowProps = o.arrowProps || {}, r && (o.arrowProps.style = {
83
+ backgroundColor: r,
82
84
  ...o.arrowProps.style
83
85
  }));
84
- const k = B(() => e ? new L(e).isLight() ?? !1 : !1, [e]);
86
+ const M = W(() => r ? new F(r).isLight() ?? !1 : !1, [r]);
85
87
  return /* @__PURE__ */ p(
86
- q,
88
+ G,
87
89
  {
88
90
  style: {
89
91
  maxWidth: 350,
90
- ...b
92
+ ...h
91
93
  },
92
94
  className: l,
93
95
  ref: t,
94
96
  classNames: "zoomInFadeOut",
95
- duration: Y,
96
- popup: () => /* @__PURE__ */ p(
97
- "div",
98
- {
99
- style: { backgroundColor: e },
100
- className: f(
101
- `${r}-content`,
102
- `${r}-content-${a}`,
103
- {
104
- [`${r}-mini`]: O,
105
- [`${r}-light-color`]: k
106
- }
107
- ),
108
- role: "tooltip",
109
- children: /* @__PURE__ */ p("div", { className: `${r}-content-inner`, children: m })
110
- }
111
- ),
97
+ duration: Z,
98
+ popup: () => {
99
+ const i = c ? "pre" : "div";
100
+ return /* @__PURE__ */ p(
101
+ "div",
102
+ {
103
+ style: { backgroundColor: r },
104
+ className: g(
105
+ `${e}-content`,
106
+ `${e}-content-${a}`,
107
+ {
108
+ [`${e}-mini`]: R,
109
+ [`${e}-pre`]: c,
110
+ // 潘启宝添加
111
+ [`${e}-light-color`]: M
112
+ }
113
+ ),
114
+ role: "tooltip",
115
+ children: /* @__PURE__ */ p(i, { className: `${e}-content-inner`, children: f })
116
+ }
117
+ );
118
+ },
112
119
  position: a,
113
- disabled: D,
114
- trigger: x,
115
- escToClose: N,
120
+ disabled: E,
121
+ trigger: N,
122
+ escToClose: y,
116
123
  showArrow: !0,
117
- popupAlign: Z,
124
+ popupAlign: _,
118
125
  mouseEnterDelay: 200,
119
126
  mouseLeaveDelay: 200,
120
- unmountOnExit: T,
121
- popupHoverStay: $,
122
- blurToHide: v,
123
- childrenPrefix: E || r,
124
- getPopupContainer: H,
127
+ unmountOnExit: w,
128
+ popupHoverStay: D,
129
+ blurToHide: $,
130
+ childrenPrefix: H || e,
131
+ getPopupContainer: O,
125
132
  onVisibleChange: A,
126
- defaultPopupVisible: y,
133
+ defaultPopupVisible: T,
127
134
  ...o,
128
- children: h
135
+ children: x
129
136
  }
130
137
  );
131
138
  }
132
- const oo = I(_);
133
- oo.displayName = "Tooltip";
139
+ const eo = S(oo);
140
+ eo.displayName = "Tooltip";
134
141
  export {
135
- oo as default
142
+ eo as default
136
143
  };
package/tour/index.js CHANGED
@@ -56,6 +56,7 @@ import { resizeObserver as yt } from "../components/common/utils/resizeObserver.
56
56
  import "@unicom-cloud/utils/file/saveAs";
57
57
  import "@unicom-cloud/utils/screenfull";
58
58
  import "@unicom-cloud/utils/constant/ui.js";
59
+ import "react-is";
59
60
  import "@unicom-cloud/utils/tree";
60
61
  import "@unicom-cloud/utils/is";
61
62
  import "uuid";
@@ -73,13 +74,12 @@ const xt = {
73
74
  zIndex: 1e3,
74
75
  current: 0
75
76
  };
76
- function je(L) {
77
+ function Me(L) {
77
78
  const { getPrefixCls: X, componentConfig: Y, rtl: kt } = ct($t), K = gt(
78
79
  L,
79
80
  xt,
80
81
  Y?.Tour
81
- );
82
- let {
82
+ ), {
83
83
  style: U,
84
84
  className: _,
85
85
  steps: n,
@@ -96,8 +96,7 @@ function je(L) {
96
96
  onFinish: tt,
97
97
  onStepChange: O,
98
98
  ...Ct
99
- } = K;
100
- const o = X?.("tour"), [r, H] = C(S), [e, j] = C(null), [W, et] = C(w), [f, I] = C(N), M = F(null), c = F(null), E = `0 0 0 ${Math.max(window.innerWidth, window.innerHeight)}px var(--pqb-mask-bg-color),0 0 15px 0 var(--pqb-mask-bg-color)`, p = typeof n[r]?.target == "string" ? document.querySelector(n[r].target) : n[r]?.target, v = () => {
99
+ } = K, o = X?.("tour"), [r, H] = C(S), [e, j] = C(null), [W, et] = C(w), [f, I] = C(N), M = F(null), c = F(null), E = `0 0 0 ${Math.max(window.innerWidth, window.innerHeight)}px var(--pqb-mask-bg-color),0 0 15px 0 var(--pqb-mask-bg-color)`, p = typeof n[r]?.target == "string" ? document.querySelector(n[r].target) : n[r]?.target, v = () => {
101
100
  let t;
102
101
  if (p ? t = p.getBoundingClientRect() : t = new DOMRect(
103
102
  window.innerWidth / 2 - (c.current?.offsetWidth ?? 0) / 2,
@@ -307,5 +306,5 @@ function je(L) {
307
306
  );
308
307
  }
309
308
  export {
310
- je as default
309
+ Me as default
311
310
  };