@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
package/input/Button.js CHANGED
@@ -1,67 +1,72 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
- import d from "lodash/isPlainObject";
2
+ import m from "lodash/isPlainObject";
3
3
  import A, { useContext as B } from "react";
4
- import M from "../button/index.js";
4
+ import P from "../button/index.js";
5
5
  import "../config-provider/ConfigProvider.js";
6
- import P from "../components/common/hooks/useMergeValue.js";
7
- import s from "@unicom-cloud/utils/class-name";
8
- import $, { formatValue as f } from "./Input.js";
9
- import j from "../config-provider/context.js";
10
- const z = A.forwardRef(
11
- (e, c) => {
12
- const { getPrefixCls: g } = B(j), {
6
+ import $ from "../components/common/hooks/useMergeValue.js";
7
+ import c from "@unicom-cloud/utils/class-name";
8
+ import j, { formatValue as d } from "./Input.js";
9
+ import z from "../config-provider/context.js";
10
+ const I = A.forwardRef(
11
+ (t, f) => {
12
+ const { getPrefixCls: g } = B(z), {
13
13
  className: h,
14
14
  style: x,
15
15
  placeholder: C,
16
16
  disabled: o,
17
- loading: I,
18
- defaultValue: b,
17
+ loading: O,
18
+ defaultValue: v,
19
19
  addAfter: l,
20
20
  buttonProps: a,
21
- label: v,
21
+ label: b,
22
22
  onCallback: L,
23
- ...i
24
- } = e, n = g?.("input-button"), m = l === void 0 ? /* @__PURE__ */ u(
25
- M,
23
+ ...s
24
+ } = t, n = g?.("input-button"), N = {
25
+ error: "danger",
26
+ warning: "warning",
27
+ success: "success"
28
+ }, V = t.status ? N[t.status] : void 0, i = l === void 0 ? /* @__PURE__ */ u(
29
+ P,
26
30
  {
27
31
  type: "primary",
28
32
  disabled: o,
29
- size: i.size,
33
+ size: s.size,
30
34
  loadingFixedWidth: !0,
35
+ status: V,
31
36
  ...a,
32
- className: s(`${n}-btn`, a?.className),
33
- onClick: (t) => {
34
- L?.(V), e.onClick?.(t), a?.onClick?.(t);
37
+ className: c(`${n}-btn`, a?.className),
38
+ onClick: (e) => {
39
+ L?.(k), t.onClick?.(e), a?.onClick?.(e);
35
40
  },
36
- children: v ?? "确定"
41
+ children: b ?? "确定"
37
42
  }
38
- ) : l, N = d(e.maxLength) ? e.maxLength.length : e.maxLength, r = d(e.maxLength) && e.maxLength.errorOnly ? void 0 : N, [V, y] = P("", {
39
- defaultValue: "defaultValue" in e ? f(e.defaultValue, r) : void 0,
40
- value: "value" in e ? f(e.value, r) : void 0
43
+ ) : l, y = m(t.maxLength) ? t.maxLength.length : t.maxLength, r = m(t.maxLength) && t.maxLength.errorOnly ? void 0 : y, [k, M] = $("", {
44
+ defaultValue: "defaultValue" in t ? d(t.defaultValue, r) : void 0,
45
+ value: "value" in t ? d(t.value, r) : void 0
41
46
  });
42
47
  return /* @__PURE__ */ u(
43
- $,
48
+ j,
44
49
  {
45
- ...i,
46
- className: s(
50
+ ...s,
51
+ className: c(
47
52
  n,
48
- m && `${n}-has-after`,
53
+ i && `${n}-has-after`,
49
54
  h
50
55
  ),
51
56
  style: x,
52
- ref: c,
53
- defaultValue: b,
57
+ ref: f,
58
+ defaultValue: v,
54
59
  placeholder: C,
55
- addAfter: m,
60
+ addAfter: i,
56
61
  disabled: o,
57
- onChange: (t, k) => {
58
- y(t), e.onChange?.(t, k);
62
+ onChange: (e, w) => {
63
+ M(e), t.onChange?.(e, w);
59
64
  }
60
65
  }
61
66
  );
62
67
  }
63
68
  );
64
- z.displayName = "Input.Button";
69
+ I.displayName = "Input.Button";
65
70
  export {
66
- z as default
71
+ I as default
67
72
  };
package/input/Textarea.js CHANGED
@@ -1,157 +1,161 @@
1
- import { jsx as u, jsxs as V } from "react/jsx-runtime";
2
- import Z from "@unicom-cloud/icons/IconUiClose";
3
- import _, { useRef as ee, useState as te, useContext as oe, useImperativeHandle as re, useMemo as ne } from "react";
1
+ import { jsx as u, jsxs as D } from "react/jsx-runtime";
2
+ import ee from "@unicom-cloud/icons/IconUiClose";
3
+ import te, { useRef as oe, useState as re, useContext as ne, useImperativeHandle as ae, useMemo as ie } from "react";
4
4
  import "../config-provider/ConfigProvider.js";
5
- import ae from "../components/common/hooks/useIsomorphicLayoutEffect.js";
6
- import le from "../components/common/hooks/useMergeValue.js";
7
- import se from "../icon-hover/index.js";
8
- import g from "@unicom-cloud/utils/class-name";
5
+ import le from "../components/common/hooks/useIsomorphicLayoutEffect.js";
6
+ import se from "../components/common/hooks/useMergeValue.js";
7
+ import ce from "../icon-hover/index.js";
8
+ import x from "@unicom-cloud/utils/class-name";
9
9
  import "../components/common/utils/is.js";
10
- import { omit as ie } from "../components/common/utils/omit.js";
11
- import { formatValue as D } from "./Input.js";
12
- import ce from "./autoSizeTextAreaHeight.js";
13
- import ue from "./useComposition.js";
14
- import me from "../config-provider/context.js";
15
- import { isPlainObject as b } from "@unicom-cloud/utils/is";
16
- const fe = (n, A) => {
10
+ import { omit as ue } from "../components/common/utils/omit.js";
11
+ import { formatValue as b } from "./Input.js";
12
+ import me from "./autoSizeTextAreaHeight.js";
13
+ import fe from "./useComposition.js";
14
+ import de from "../config-provider/context.js";
15
+ import { isPlainObject as C, isNil as w } from "@unicom-cloud/utils/is";
16
+ const ge = (e, A) => {
17
17
  const {
18
18
  className: L,
19
19
  style: T,
20
20
  wrapperStyle: H,
21
21
  placeholder: M,
22
- disabled: i,
23
- error: R,
22
+ disabled: s,
23
+ error: k,
24
24
  maxLength: a,
25
- showWordLimit: h,
25
+ showWordLimit: v,
26
26
  allowClear: m,
27
- onChange: k,
28
- onClear: I,
29
- onKeyDown: z,
30
- onPressEnter: E,
31
- status: P,
32
- clearIcon: C,
33
- ...W
34
- } = n, l = b(a) ? a.length : a, r = b(a) ? a.errorOnly ? void 0 : a.length : a, t = ee(), [x, j] = te({}), [s, O] = le("", {
35
- defaultValue: "defaultValue" in n ? D(n.defaultValue, r) : void 0,
36
- value: "value" in n ? D(n.value, r) : void 0
27
+ onChange: I,
28
+ onClear: E,
29
+ onKeyDown: P,
30
+ onPressEnter: W,
31
+ status: j,
32
+ clearIcon: p,
33
+ ...O
34
+ } = e, i = C(a) ? a.length : a, n = C(a) ? a.errorOnly ? void 0 : a.length : a, r = oe(), [f, K] = re({}), [l, U] = se("", {
35
+ defaultValue: "defaultValue" in e ? b(e.defaultValue, n) : void 0,
36
+ value: "value" in e ? b(e.value, n) : void 0
37
37
  }), {
38
- compositionValue: K,
39
- compositionHandler: f,
40
- valueChangeHandler: U,
41
- keyDownHandler: F,
42
- triggerValueChangeCallback: q
43
- } = ue({
44
- value: s,
45
- maxLength: r,
46
- onChange: k,
47
- onKeyDown: z,
48
- onPressEnter: E,
49
- beforeTriggerValueChangeCallback: (e) => {
50
- !("value" in n) && (r === void 0 || e.length <= r) && O(e);
38
+ compositionValue: F,
39
+ compositionHandler: d,
40
+ valueChangeHandler: q,
41
+ keyDownHandler: B,
42
+ triggerValueChangeCallback: G
43
+ } = fe({
44
+ value: l,
45
+ maxLength: n,
46
+ onChange: I,
47
+ onKeyDown: P,
48
+ onPressEnter: W,
49
+ beforeTriggerValueChangeCallback: (t) => {
50
+ !("value" in e) && (n === void 0 || t.length <= n) && U(t);
51
51
  }
52
- }), v = K || s || "", { getPrefixCls: B, rtl: d } = oe(me), o = B?.("textarea");
53
- i && (x.resize = "none");
54
- const w = () => {
55
- if (t.current && t.current.focus) {
56
- if (t.current.setSelectionRange) {
57
- const e = t.current.textContent.length;
58
- t.current.setSelectionRange(e, e);
52
+ }), S = F || l || "", { getPrefixCls: J, rtl: g } = ne(de), o = J?.("textarea"), z = s || e.resize === "none" || C(e.autoSize) && !w(e.autoSize.minRows) && !w(e.autoSize.maxRows) && e.autoSize?.minRows === e.autoSize?.maxRows || !w(e.rows);
53
+ z ? f.resize = "none" : e.resize && (f.resize = e.resize);
54
+ const y = () => {
55
+ if (r.current && r.current.focus) {
56
+ if (r.current.setSelectionRange) {
57
+ const t = r.current.textContent.length;
58
+ r.current.setSelectionRange(t, t);
59
59
  }
60
- t.current.focus();
60
+ r.current.focus();
61
61
  }
62
- }, G = () => {
63
- const e = ce(
64
- n.autoSize,
65
- t.current
62
+ }, Q = () => {
63
+ if (e.rows)
64
+ return;
65
+ const t = me(
66
+ e.autoSize,
67
+ r.current
66
68
  );
67
- e && j(e);
68
- }, y = (e) => {
69
- e.stopPropagation(), w(), q("", e), I?.();
69
+ t && K(t);
70
+ }, N = (t) => {
71
+ t.stopPropagation(), y(), G("", t), E?.();
70
72
  };
71
- ae(() => {
72
- G();
73
- }, [v]), re(
73
+ le(() => {
74
+ Q();
75
+ }, [S]), ae(
74
76
  A,
75
77
  () => ({
76
- dom: t.current,
78
+ dom: r.current,
77
79
  focus: () => {
78
- w();
80
+ y();
79
81
  },
80
82
  blur: () => {
81
- t.current?.blur?.();
83
+ r.current?.blur?.();
82
84
  },
83
- getRootDOMNode: () => t.current
85
+ getRootDOMNode: () => r.current
84
86
  }),
85
87
  []
86
88
  );
87
- const c = s ? s.length : 0, J = l && h || m, S = ne(() => !r && l ? c > l : !1, [c, l, r]), $ = P || (R || S ? "error" : void 0), Q = g(
89
+ const c = l ? l.length : 0, X = i && v || m, $ = ie(() => !n && i ? c > i : !1, [c, i, n]), R = j || (k || $ ? "error" : void 0), Y = x(
88
90
  o,
89
91
  {
90
- [`${o}-${$}`]: $,
92
+ [`${o}-${R}`]: R,
91
93
  // [`${prefixCls}-error`]: error || lengthError || status === 'error',
92
- [`${o}-disabled`]: i,
93
- [`${o}-rtl`]: d
94
+ [`${o}-disabled`]: s,
95
+ [`${o}-rtl`]: g,
96
+ [`${o}-resize-none`]: z
97
+ // 潘启宝添加
94
98
  },
95
99
  L
96
- ), N = /* @__PURE__ */ u(
100
+ ), V = /* @__PURE__ */ u(
97
101
  "textarea",
98
102
  {
99
- ...ie(W, ["autoSize", "defaultValue"]),
100
- maxLength: r,
101
- ref: t,
102
- style: { ...T, ...x },
103
- className: Q,
103
+ ...ue(O, ["autoSize", "defaultValue"]),
104
+ maxLength: n,
105
+ ref: r,
106
+ style: { ...T, ...f },
107
+ className: Y,
104
108
  placeholder: M,
105
- disabled: i,
106
- value: v,
107
- onChange: U,
108
- onKeyDown: F,
109
- onCompositionStart: f,
110
- onCompositionUpdate: f,
111
- onCompositionEnd: f
109
+ disabled: s,
110
+ value: S,
111
+ onChange: q,
112
+ onKeyDown: B,
113
+ onCompositionStart: d,
114
+ onCompositionUpdate: d,
115
+ onCompositionEnd: d
112
116
  }
113
117
  );
114
- if (J) {
115
- const e = !i && m && s, [X, Y] = d ? [l, c] : [c, l];
116
- return /* @__PURE__ */ V(
118
+ if (X) {
119
+ const t = !s && m && l, [Z, _] = g ? [i, c] : [c, i];
120
+ return /* @__PURE__ */ D(
117
121
  "div",
118
122
  {
119
- className: g(`${o}-wrapper`, {
123
+ className: x(`${o}-wrapper`, {
120
124
  [`${o}-clear-wrapper`]: m,
121
- [`${o}-wrapper-rtl`]: d
125
+ [`${o}-wrapper-rtl`]: g
122
126
  }),
123
127
  style: H,
124
128
  children: [
125
- N,
126
- e ? C !== void 0 ? /* @__PURE__ */ u(
129
+ V,
130
+ t ? p !== void 0 ? /* @__PURE__ */ u(
127
131
  "span",
128
132
  {
129
133
  className: `${o}-clear-icon`,
130
- onClick: y,
131
- onMouseDown: (p) => {
132
- p.preventDefault();
134
+ onClick: N,
135
+ onMouseDown: (h) => {
136
+ h.preventDefault();
133
137
  },
134
- children: C
138
+ children: p
135
139
  }
136
- ) : /* @__PURE__ */ u(se, { className: `${o}-clear-icon`, children: /* @__PURE__ */ u(
137
- Z,
140
+ ) : /* @__PURE__ */ u(ce, { className: `${o}-clear-icon`, children: /* @__PURE__ */ u(
141
+ ee,
138
142
  {
139
- onClick: y,
140
- onMouseDown: (p) => {
141
- p.preventDefault();
143
+ onClick: N,
144
+ onMouseDown: (h) => {
145
+ h.preventDefault();
142
146
  }
143
147
  }
144
148
  ) }) : null,
145
- l && h && /* @__PURE__ */ V(
149
+ i && v && /* @__PURE__ */ D(
146
150
  "span",
147
151
  {
148
- className: g(`${o}-word-limit`, {
149
- [`${o}-word-limit-error`]: S
152
+ className: x(`${o}-word-limit`, {
153
+ [`${o}-word-limit-error`]: $
150
154
  }),
151
155
  children: [
152
- X,
156
+ Z,
153
157
  "/",
154
- Y
158
+ _
155
159
  ]
156
160
  }
157
161
  )
@@ -159,9 +163,9 @@ const fe = (n, A) => {
159
163
  }
160
164
  );
161
165
  }
162
- return N;
163
- }, de = _.forwardRef(fe);
164
- de.displayName = "TextArea";
166
+ return V;
167
+ }, he = te.forwardRef(ge);
168
+ he.displayName = "TextArea";
165
169
  export {
166
- de as default
170
+ he as default
167
171
  };
@@ -50,6 +50,7 @@ import "../dist/react-transition-group/src/TransitionGroup.js";
50
50
  import "@unicom-cloud/utils/file/saveAs";
51
51
  import "@unicom-cloud/utils/screenfull";
52
52
  import "@unicom-cloud/utils/constant/ui.js";
53
+ import "react-is";
53
54
  import "@unicom-cloud/utils/tree";
54
55
  import { isNumber as ct } from "@unicom-cloud/utils/is";
55
56
  import { v4 as A } from "uuid";
@@ -72,7 +73,7 @@ const dt = {
72
73
  decimalPlaces: 0,
73
74
  percentFontScale: 0.5,
74
75
  waveSpeedVariation: 0.5
75
- }, ve = (E) => {
76
+ }, ge = (E) => {
76
77
  const { getPrefixCls: I, componentConfig: _ } = at(pt), i = I?.("liquid-fill"), H = st(
77
78
  E,
78
79
  dt,
@@ -253,5 +254,5 @@ const dt = {
253
254
  );
254
255
  };
255
256
  export {
256
- ve as default
257
+ ge as default
257
258
  };
package/loading/index.js CHANGED
@@ -1,61 +1,80 @@
1
- import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
- import m from "./style/index.module.less.js";
3
- import u, { useImperativeHandle as f, useEffect as x } from "react";
4
- function $(a, o) {
5
- const d = ["#FF5F57", "#FEBC2E", "#28C840"], i = a.colors || d;
6
- let s = 12, l = 25, e = 25, c = 4, r = "0.5 0 0.5 1;0.5 0 0.5 1", n = "0.7s";
7
- return f(o, () => ({})), x(() => () => {
8
- }, []), /* @__PURE__ */ p(
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as d, useContext as g, useMemo as u } from "react";
3
+ import "../config-provider/ConfigProvider.js";
4
+ import "lodash/isEqualWith";
5
+ import "../components/common/utils/is.js";
6
+ import "@unicom-cloud/utils/constant/keyboardCode";
7
+ import "lodash/isNumber";
8
+ import "lodash/merge";
9
+ import "../components/common/utils/dom.js";
10
+ import "../components/common/hooks/useIntersectionObserver.js";
11
+ import A from "../components/common/hooks/useMergeProps.js";
12
+ import "../components/common/utils/reactDOM.js";
13
+ import "@unicom-cloud/utils/constant";
14
+ import "lodash/debounce";
15
+ import E from "@unicom-cloud/utils/class-name";
16
+ import I from "../config-provider/context.js";
17
+ const v = ["#FF5F57", "#FEBC2E", "#28C840"], e = 50, o = e / 2, S = 4, t = 7, c = 12, T = "0.7s", w = "0.5 0 0.5 1;0.5 0 0.5 1", D = (l, M) => {
18
+ const { getPrefixCls: m, componentConfig: p, rtl: a } = g(I), f = A(
19
+ l,
20
+ {},
21
+ p?.Loading
22
+ ), { colors: s = v, style: x, className: $, ...O } = f, n = m?.("mentions"), C = u(
23
+ () => [
24
+ {
25
+ cx: o - c,
26
+ fill: s[0],
27
+ values: `${o + t};${o};${o + t}`
28
+ },
29
+ {
30
+ cx: o,
31
+ fill: s[1],
32
+ values: `${o - t};${o};${o - t}`
33
+ },
34
+ {
35
+ cx: o + c,
36
+ fill: s[2],
37
+ values: `${o + t};${o};${o + t}`
38
+ }
39
+ ],
40
+ [s]
41
+ );
42
+ return /* @__PURE__ */ r(
9
43
  "svg",
10
44
  {
11
- className: m.module,
45
+ style: { ...x },
46
+ className: E(`${n}`, !!a && `${n}-rtl`, $),
12
47
  xmlns: "http://www.w3.org/2000/svg",
13
- width: "50px",
14
- height: "50px",
15
- viewBox: "0 0 50 50",
48
+ width: `${e}px`,
49
+ height: `${e}px`,
50
+ viewBox: `0 0 ${e} ${e}`,
16
51
  preserveAspectRatio: "xMidYMid",
17
- children: [
18
- /* @__PURE__ */ t("circle", { cx: l - s, cy: e, r: c, fill: i[0], children: /* @__PURE__ */ t(
19
- "animate",
20
- {
21
- attributeName: "cy",
22
- values: `${e + 7};${e};${e + 7}`,
23
- dur: n,
24
- calcMode: "spline",
25
- keySplines: r,
26
- begin: "0s",
27
- repeatCount: "indefinite"
28
- }
29
- ) }),
30
- /* @__PURE__ */ t("circle", { cx: l, cy: e, r: c, fill: i[1], children: /* @__PURE__ */ t(
31
- "animate",
32
- {
33
- attributeName: "cy",
34
- values: `${e - 7};${e};${e - 7}`,
35
- dur: n,
36
- calcMode: "spline",
37
- keySplines: r,
38
- begin: "0s",
39
- repeatCount: "indefinite"
40
- }
41
- ) }),
42
- /* @__PURE__ */ t("circle", { cx: l + s, cy: e, r: c, fill: i[2], children: /* @__PURE__ */ t(
43
- "animate",
44
- {
45
- attributeName: "cy",
46
- values: `${e + 7};${e};${e + 7}`,
47
- dur: n,
48
- calcMode: "spline",
49
- keySplines: r,
50
- begin: "0s",
51
- repeatCount: "indefinite"
52
- }
53
- ) })
54
- ]
52
+ children: C.map((i, N) => /* @__PURE__ */ r(
53
+ "circle",
54
+ {
55
+ cx: i.cx,
56
+ cy: o,
57
+ r: S,
58
+ fill: i.fill,
59
+ children: /* @__PURE__ */ r(
60
+ "animate",
61
+ {
62
+ attributeName: "cy",
63
+ values: i.values,
64
+ dur: T,
65
+ calcMode: "spline",
66
+ keySplines: w,
67
+ begin: "0s",
68
+ repeatCount: "indefinite"
69
+ }
70
+ )
71
+ },
72
+ N
73
+ ))
55
74
  }
56
75
  );
57
- }
58
- const w = u.forwardRef($);
76
+ }, L = d(D);
77
+ L.displayName = "Loading";
59
78
  export {
60
- w as default
79
+ L as default
61
80
  };
@@ -0,0 +1 @@
1
+
package/marquee/index.js CHANGED
@@ -50,6 +50,7 @@ import { resizeObserver as _ } from "../components/common/utils/resizeObserver.j
50
50
  import "@unicom-cloud/utils/file/saveAs";
51
51
  import "@unicom-cloud/utils/screenfull";
52
52
  import "@unicom-cloud/utils/constant/ui.js";
53
+ import "react-is";
53
54
  import "@unicom-cloud/utils/tree";
54
55
  import "@unicom-cloud/utils/is";
55
56
  import "uuid";
@@ -64,7 +65,7 @@ const et = {
64
65
  loop: 0,
65
66
  // 0表示无限循环
66
67
  gradientSize: 50
67
- }, se = (q) => {
68
+ }, ae = (q) => {
68
69
  const { getPrefixCls: O, componentConfig: P } = U(tt), s = O?.("marquee"), R = V(
69
70
  q,
70
71
  et,
@@ -278,5 +279,5 @@ const et = {
278
279
  );
279
280
  };
280
281
  export {
281
- se as default
282
+ ae as default
282
283
  };