@unicom-cloud/ui 0.8.78 → 0.8.80

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 (345) hide show
  1. package/Affix.js +3 -3
  2. package/Alert.js +3 -3
  3. package/AutoComplete.js +5 -5
  4. package/BackTop.js +5 -5
  5. package/Badge.js +3 -3
  6. package/Breadcrumb.js +4 -4
  7. package/Button.js +2 -2
  8. package/Calendar.js +4 -4
  9. package/Card.js +2 -2
  10. package/Carousel.js +2 -2
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +1 -1
  13. package/Collapse.js +1 -1
  14. package/ColorPicker.js +3 -3
  15. package/Comment.js +2 -2
  16. package/ConfigProvider.js +1 -1
  17. package/Copy.js +4 -4
  18. package/DatePicker.js +1 -1
  19. package/Descriptions.js +2 -2
  20. package/Divider.js +2 -2
  21. package/Draggable.js +2 -2
  22. package/Dropdown.js +5 -5
  23. package/Empty.js +2 -2
  24. package/Icon.js +9 -5
  25. package/IconHover.js +2 -2
  26. package/Image.js +1 -1
  27. package/InputNumber.js +3 -3
  28. package/Layout.js +2 -2
  29. package/Link.js +3 -3
  30. package/List.js +4 -4
  31. package/Mentions.js +5 -5
  32. package/Menu.js +1 -1
  33. package/Message.js +3 -3
  34. package/Modal.js +1 -1
  35. package/Notice.js +9 -8
  36. package/Notification.js +3 -3
  37. package/OverflowEllipsis.js +2 -2
  38. package/PageHeader.js +3 -3
  39. package/Pagination.js +1 -1
  40. package/Popconfirm.js +3 -3
  41. package/Popover.js +3 -3
  42. package/Progress.js +2 -2
  43. package/Radio.js +1 -1
  44. package/Rate.js +3 -3
  45. package/ResizeBox.js +3 -3
  46. package/Result.js +2 -2
  47. package/Select.js +1 -1
  48. package/SelectView.js +5 -6
  49. package/Skeleton.js +2 -2
  50. package/Slider.js +4 -4
  51. package/Space.js +2 -2
  52. package/SpeechSynthesis.js +18 -20
  53. package/Spin.js +3 -3
  54. package/Statistic.js +3 -3
  55. package/Steps.js +2 -2
  56. package/Switch.js +7 -8
  57. package/Table.js +1 -1
  58. package/Tabs.js +1 -1
  59. package/Tag.js +3 -3
  60. package/Tooltip.js +3 -3
  61. package/Transfer.js +4 -4
  62. package/Tree.js +1 -1
  63. package/TreeSelect.js +1 -1
  64. package/Trigger.js +9 -10
  65. package/Typography.js +1 -1
  66. package/affix/index.js +17 -17
  67. package/alert/index.js +13 -13
  68. package/anchor/Anchor.js +40 -40
  69. package/anchor/Link.js +14 -14
  70. package/anchor/util.js +2 -2
  71. package/auto-complete/index.js +5 -5
  72. package/avatar/Avatar.js +17 -17
  73. package/avatar/Group.js +13 -13
  74. package/back-top/index.js +18 -18
  75. package/badge/Count.js +13 -13
  76. package/badge/index.js +21 -21
  77. package/breadcrumb/Item.js +25 -25
  78. package/breadcrumb/index.js +12 -12
  79. package/button/Group.js +6 -6
  80. package/button/index.js +30 -30
  81. package/calendar/Month.js +2 -2
  82. package/calendar/Year.js +1 -1
  83. package/calendar/index.js +4 -4
  84. package/card/Grid.js +13 -13
  85. package/card/Meta.js +13 -13
  86. package/card/index.js +29 -29
  87. package/carousel/Arrow.js +6 -6
  88. package/carousel/Indicator.js +27 -27
  89. package/carousel/index.js +24 -24
  90. package/cascader/Cascader.js +8 -8
  91. package/cascader/index.js +1 -1
  92. package/cascader/util.js +1 -1
  93. package/checkbox/Checkbox.js +4 -4
  94. package/checkbox/Group.js +4 -4
  95. package/checkbox/GroupBlock.js +3 -3
  96. package/checkbox/index.js +2 -2
  97. package/chunk/{ZrBrCzQX.js → B4WG1mhs.js} +6 -7
  98. package/chunk/{CjqvxJml.js → BG7YGUsx.js} +32 -32
  99. package/chunk/BYdIoY50.js +17 -0
  100. package/chunk/{Cc_-i0o_.js → BZ3igxQN.js} +6 -7
  101. package/chunk/{uEGHykhe.js → BZ9g7J4R.js} +1 -1
  102. package/chunk/BsUZRQDT.js +23 -0
  103. package/chunk/{CBgu99gQ.js → C5X4hOkx.js} +130 -130
  104. package/chunk/{B0n0iRhF.js → CCKr5jj1.js} +1 -1
  105. package/chunk/{CNcLypMY.js → CQvM33Vg.js} +190 -189
  106. package/chunk/CXPOj2uy.js +19 -0
  107. package/chunk/{DAAff-FT.js → ClM74To2.js} +9 -10
  108. package/chunk/{RS6OAxzv.js → D-ap9qEk.js} +2 -2
  109. package/chunk/{Cwm8LL5p.js → D73Vr7fa.js} +7197 -7202
  110. package/chunk/{tpmioyz1.js → DEiyXzBZ.js} +28 -28
  111. package/chunk/{CplLA01W.js → DEuVgCzp.js} +45 -52
  112. package/chunk/{BPQXH_5i.js → DYspELhF.js} +43 -43
  113. package/chunk/DxYoPlum.js +50 -0
  114. package/chunk/{BpYX5PN4.js → NPajzdOv.js} +2 -2
  115. package/chunk/{BBkdXHrJ.js → rT6qmv-Y.js} +1 -1
  116. package/chunk/{BhBEMwvI.js → uKZyjtff.js} +20 -21
  117. package/chunk/{BC5fEyWK.js → yLRv5RIK.js} +61 -61
  118. package/chunk/{C_4I3haT.js → yhU2zeeu.js} +96 -96
  119. package/collapse/Collapse.js +4 -4
  120. package/collapse/Item.js +4 -4
  121. package/collapse/index.js +1 -1
  122. package/color-picker/ControlBar.js +22 -22
  123. package/color-picker/InputAlpha.js +1 -1
  124. package/color-picker/InputHex.js +1 -1
  125. package/color-picker/InputRgb.js +1 -1
  126. package/color-picker/Palette.js +1 -1
  127. package/color-picker/Panel.js +4 -4
  128. package/color-picker/index.js +3 -3
  129. package/comment/index.js +18 -18
  130. package/config-provider/ConfigProvider.js +2 -2
  131. package/config-provider/context.js +2 -2
  132. package/config-provider/index.js +2 -2
  133. package/copy/index.js +23 -23
  134. package/date-picker/Picker.js +41 -41
  135. package/date-picker/PickerRange.js +3 -3
  136. package/date-picker/index.js +1 -1
  137. package/descriptions/index.js +28 -28
  138. package/divider/index.js +15 -15
  139. package/draggable/Item.js +11 -11
  140. package/draggable/index.js +15 -15
  141. package/drawer/Drawer.js +31 -31
  142. package/dropdown/Button.js +1 -1
  143. package/dropdown/index.js +22 -22
  144. package/empty/index.js +2 -2
  145. package/form/Control.js +46 -46
  146. package/form/Form.js +12 -12
  147. package/form/FormItem.js +12 -12
  148. package/form/FormLabel.js +11 -11
  149. package/form/context.js +7 -6
  150. package/form/promisify.js +9 -10
  151. package/form/store.js +1 -1
  152. package/form/util.js +1 -1
  153. package/grid/Col.js +38 -38
  154. package/grid/Row.js +15 -15
  155. package/grid/grid-item.js +17 -17
  156. package/grid/grid.js +28 -28
  157. package/hooks/index.js +6 -6
  158. package/hooks/useInView.js +1 -1
  159. package/hooks/useIntersectionObserver.js +1 -1
  160. package/hooks/useKeyboardEvent.js +1 -1
  161. package/hooks/useMergeValue.js +1 -1
  162. package/hooks/useOverrideRef.js +1 -1
  163. package/hooks/usePrefersColorSchemeDark.js +1 -1
  164. package/hooks/useVerificationCode.js +30 -30
  165. package/icon/index.js +20 -16
  166. package/icon-hover/index.js +2 -2
  167. package/image/Image.js +22 -22
  168. package/image/ImageFooter.js +2 -2
  169. package/image/ImagePreview.js +11 -11
  170. package/image/ImagePreviewArrow.js +16 -16
  171. package/image/ImagePreviewGroup.js +2 -2
  172. package/image/ImagePreviewToolbar.js +7 -7
  173. package/image/TriggerForToolbar.js +7 -7
  174. package/image/index.js +1 -1
  175. package/index.js +539 -572
  176. package/input/Group.js +10 -10
  177. package/input/Input.js +213 -214
  178. package/input/InputElement.js +10 -11
  179. package/input/Password.js +4 -4
  180. package/input/Search.js +3 -3
  181. package/input/Textarea.js +7 -8
  182. package/input/useComposition.js +6 -6
  183. package/input-number/index.js +3 -3
  184. package/input-tag/InputTag.js +110 -111
  185. package/layout/Content.js +4 -4
  186. package/layout/Footer.js +6 -6
  187. package/layout/Header.js +8 -8
  188. package/layout/Sider.js +29 -29
  189. package/layout/index.js +16 -16
  190. package/link/index.js +27 -27
  191. package/list/Item.js +5 -5
  192. package/list/Meta.js +11 -11
  193. package/list/index.js +4 -4
  194. package/locale/en-US.js +1 -1
  195. package/locale/tr-TR.js +1 -1
  196. package/mentions/index.js +5 -5
  197. package/menu/Item.js +11 -11
  198. package/menu/ItemGroup.js +8 -8
  199. package/menu/Menu.js +5 -5
  200. package/menu/OverflowWrap.js +2 -2
  201. package/menu/index.js +2 -2
  202. package/message/index.js +3 -3
  203. package/message/useMessage.js +1 -1
  204. package/modal/Confirm.js +2 -2
  205. package/modal/Modal.js +7 -7
  206. package/modal/index.js +1 -1
  207. package/notice/index.js +9 -8
  208. package/notification/index.js +3 -3
  209. package/notification/useNotification.js +1 -1
  210. package/overflow-ellipsis/OverflowItem.js +6 -6
  211. package/overflow-ellipsis/index.js +27 -27
  212. package/package.json +1 -1
  213. package/page-header/index.js +3 -3
  214. package/pagination/PageItem.js +7 -7
  215. package/pagination/PageJumper.js +1 -1
  216. package/pagination/PageOption.js +3 -3
  217. package/pagination/Pagination.js +4 -4
  218. package/pagination/index.js +1 -1
  219. package/picker/Input.js +7 -7
  220. package/picker/InputRange.js +77 -77
  221. package/popconfirm/index.js +11 -11
  222. package/popover/index.js +21 -21
  223. package/progress/CircleProgress.js +14 -14
  224. package/progress/LineProgess.js +14 -14
  225. package/progress/StepProgress.js +9 -9
  226. package/progress/index.js +26 -26
  227. package/radio/Group.js +4 -4
  228. package/radio/GroupBlock.js +3 -3
  229. package/radio/Radio.js +4 -4
  230. package/radio/index.js +2 -2
  231. package/rate/index.js +16 -16
  232. package/resize-box/ResizeTrigger.js +27 -28
  233. package/resize-box/Split.js +21 -21
  234. package/resize-box/SplitGroup.js +40 -40
  235. package/resize-box/index.js +23 -23
  236. package/result/index.js +29 -29
  237. package/select/Option.js +2 -2
  238. package/select/Select.js +11 -12
  239. package/select/index.js +2 -2
  240. package/select/util.js +5 -5
  241. package/select-view/Core.js +104 -106
  242. package/select-view/index.js +22 -23
  243. package/skeleton/Image.js +14 -14
  244. package/skeleton/Text.js +16 -16
  245. package/skeleton/index.js +11 -11
  246. package/slider/Button.js +4 -4
  247. package/slider/Dot.js +9 -9
  248. package/slider/Input.js +20 -20
  249. package/slider/Tick.js +14 -14
  250. package/slider/index.js +103 -103
  251. package/slider/util.js +3 -3
  252. package/space/index.js +14 -14
  253. package/speech-synthesis/index.js +26 -28
  254. package/spin/DotLoading.js +1 -1
  255. package/spin/index.js +16 -16
  256. package/statistic/Countdown.js +17 -17
  257. package/statistic/index.js +40 -40
  258. package/steps/Step.js +8 -8
  259. package/steps/index.js +17 -17
  260. package/switch/index.js +32 -33
  261. package/table/Table.js +5 -5
  262. package/table/index.js +1 -1
  263. package/tabs/Tab.js +4 -4
  264. package/tabs/TabContent.js +3 -3
  265. package/tabs/TabPane.js +11 -11
  266. package/tabs/index.js +2 -2
  267. package/tabs/util.js +1 -1
  268. package/tag/index.js +16 -16
  269. package/time-picker/Picker.js +50 -50
  270. package/time-picker/TimeColumn.js +8 -8
  271. package/time-picker/TimePicker.js +32 -32
  272. package/time-picker/util.js +5 -5
  273. package/timeline/Item.js +15 -15
  274. package/timeline/Timeline.js +24 -24
  275. package/tooltip/index.js +23 -23
  276. package/transfer/Item.js +4 -4
  277. package/transfer/List.js +4 -4
  278. package/transfer/index.js +4 -4
  279. package/tree/Animation.js +3 -3
  280. package/tree/Node.js +3 -3
  281. package/tree/NodeList.js +2 -2
  282. package/tree/Tree.js +4 -4
  283. package/tree/index.js +1 -1
  284. package/tree-select/List.js +2 -2
  285. package/tree-select/Select.js +8 -9
  286. package/tree-select/index.js +2 -2
  287. package/trigger/getPopupStyle.js +18 -19
  288. package/trigger/index.js +32 -33
  289. package/types/button/index.d.ts +2 -2
  290. package/types/color-picker/colors.d.ts +1 -1
  291. package/types/date-picker/util.d.ts +1 -1
  292. package/types/icon/index.d.ts +3 -1
  293. package/types/index.d.ts +1 -1
  294. package/types/menu/context.d.ts +1 -1
  295. package/typography/Base.js +33 -35
  296. package/typography/EditContent.js +16 -16
  297. package/typography/Ellipsis.js +25 -26
  298. package/typography/Operations.js +1 -1
  299. package/typography/Paragraph.js +8 -8
  300. package/typography/Typography.js +7 -7
  301. package/typography/index.js +1 -1
  302. package/upload/TriggerNode.js +8 -8
  303. package/upload/Upload.js +64 -65
  304. package/upload/Uploader.js +12 -12
  305. package/upload/request.js +13 -12
  306. package/upload/request_.js +5 -6
  307. package/utils/PqbCSSTransition.js +1 -1
  308. package/utils/caseName.js +4 -3
  309. package/utils/className.js +4 -3
  310. package/utils/constant.js +3 -3
  311. package/utils/contextHolder.js +1 -1
  312. package/utils/copy.js +5 -4
  313. package/utils/fileToURL.js +4 -3
  314. package/utils/index.js +262 -299
  315. package/utils/is.js +78 -115
  316. package/utils/keyboardCode.js +4 -26
  317. package/utils/math.js +10 -32
  318. package/utils/react19Adapter.js +1 -1
  319. package/utils/reactDOM.js +1 -1
  320. package/utils/saveAs.js +4 -3
  321. package/utils/screenfull.js +4 -3
  322. package/utils/scrollIntoView.js +1 -1
  323. package/utils/setDarkTheme.js +1 -1
  324. package/utils/tree.js +7 -83
  325. package/utils/tween.js +1 -1
  326. package/utils/validate.js +1 -1
  327. package/verification-code/VerificationCode.js +25 -25
  328. package/version/index.js +1 -1
  329. package/virtual-list/VirtualList.js +1 -1
  330. package/watermark/Watermark.js +8 -8
  331. package/chunk/ATwvJ8j2.js +0 -6
  332. package/chunk/BFmckYou.js +0 -25
  333. package/chunk/Bl7BnD1R.js +0 -119
  334. package/chunk/Bmvhjhzq.js +0 -24
  335. package/chunk/BrOW642m.js +0 -130
  336. package/chunk/C0pRaDCf.js +0 -96
  337. package/chunk/CBzE-PUr.js +0 -23
  338. package/chunk/CUFsOxJ2.js +0 -10
  339. package/chunk/Ce1j9KTi.js +0 -6
  340. package/chunk/D0Dlbc2g.js +0 -41
  341. package/chunk/DRTWRsgI.js +0 -34
  342. package/chunk/DeV0v__J.js +0 -20
  343. package/chunk/DohlrJ4S.js +0 -50
  344. package/chunk/XTEsYGuF.js +0 -17
  345. package/chunk/yl4BU7Sd.js +0 -1068
package/grid/Row.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsx as g } from "react/jsx-runtime";
2
2
  import { forwardRef as S, useContext as z, useState as G, useRef as H, useEffect as V } from "react";
3
- import { a as B } from "../chunk/CNcLypMY.js";
3
+ import { a as B } from "../chunk/CQvM33Vg.js";
4
4
  import { u as E } from "../chunk/BFTV6myl.js";
5
- import { p as L } from "../chunk/CUFsOxJ2.js";
5
+ import L from "@unicom-cloud/utils/class-name";
6
6
  import { o as M } from "../chunk/BKKEev13.js";
7
7
  import { responsiveObserve as x, responsiveArray as d } from "../utils/responsiveObserve.js";
8
8
  import { RowContext as O } from "./context.js";
@@ -16,7 +16,7 @@ function q(b, A) {
16
16
  b,
17
17
  T,
18
18
  i == null ? void 0 : i["Grid.Row"]
19
- ), { className: w, style: C, children: $, div: n, align: l, justify: m, gutter: r, ...h } = R, [N, P] = G({
19
+ ), { className: w, style: $, children: C, div: a, align: u, justify: m, gutter: r, ...N } = R, [h, P] = G({
20
20
  xs: !0,
21
21
  sm: !0,
22
22
  md: !0,
@@ -34,9 +34,9 @@ function q(b, A) {
34
34
  let e = 0;
35
35
  if (typeof t == "object")
36
36
  for (let f = 0; f < d.length; f++) {
37
- const u = d[f];
38
- if (N[u] && t[u] !== void 0) {
39
- e = t[u];
37
+ const l = d[f];
38
+ if (h[l] && t[l] !== void 0) {
39
+ e = t[l];
40
40
  break;
41
41
  }
42
42
  }
@@ -46,34 +46,34 @@ function q(b, A) {
46
46
  }
47
47
  const s = j("row"), k = L(
48
48
  {
49
- [`${s}`]: !n,
50
- [`${s}-align-${l}`]: l,
49
+ [`${s}`]: !a,
50
+ [`${s}-align-${u}`]: u,
51
51
  [`${s}-justify-${m}`]: m,
52
52
  [`${s}-rtl`]: v
53
53
  },
54
54
  w
55
- ), o = {}, a = y(
55
+ ), o = {}, n = y(
56
56
  Array.isArray(r) ? r[0] : r
57
57
  ), c = y(Array.isArray(r) ? r[1] : 0);
58
- if ((a || c) && !n) {
59
- const t = -a / 2, e = -c / 2;
58
+ if ((n || c) && !a) {
59
+ const t = -n / 2, e = -c / 2;
60
60
  t && (o.marginLeft = t, o.marginRight = t), e && (o.marginTop = e, o.marginBottom = e);
61
61
  }
62
62
  return /* @__PURE__ */ g(
63
63
  "div",
64
64
  {
65
65
  ref: A,
66
- ...M(h, ["gutter"]),
66
+ ...M(N, ["gutter"]),
67
67
  style: {
68
- ...C,
68
+ ...$,
69
69
  ...o
70
70
  },
71
71
  className: k,
72
72
  children: /* @__PURE__ */ g(
73
73
  O.Provider,
74
74
  {
75
- value: { gutter: [a, c], div: n },
76
- children: $
75
+ value: { gutter: [n, c], div: a },
76
+ children: C
77
77
  }
78
78
  )
79
79
  }
package/grid/grid-item.js CHANGED
@@ -2,11 +2,11 @@ import { jsx as Q } from "react/jsx-runtime";
2
2
  import T from "lodash/isFunction";
3
3
  import V from "lodash/isString";
4
4
  import c, { forwardRef as k, useContext as l, useMemo as u, useEffect as q } from "react";
5
- import { a as z } from "../chunk/CNcLypMY.js";
5
+ import { a as z } from "../chunk/CQvM33Vg.js";
6
6
  import { u as A } from "../chunk/BFTV6myl.js";
7
- import { p as H } from "../chunk/CUFsOxJ2.js";
7
+ import H from "@unicom-cloud/utils/class-name";
8
8
  import { GridContext as J, GridDataCollectorContext as K } from "./context.js";
9
- import { u as $ } from "../chunk/xAb6ZgqS.js";
9
+ import { u as I } from "../chunk/xAb6ZgqS.js";
10
10
  import { resolveItemData as L } from "./util.js";
11
11
  const U = {
12
12
  suffix: !1,
@@ -21,31 +21,31 @@ function W(_, g) {
21
21
  ), {
22
22
  children: i,
23
23
  className: y,
24
- style: D,
25
- offset: N,
24
+ style: N,
25
+ offset: D,
26
26
  span: R,
27
- __index__: s
27
+ __index__: o
28
28
  } = f, r = l(J), { collectItemData: E, removeItemData: P } = l(
29
29
  K
30
- ), { colGap: m, cols: d, displayIndexList: p, overflow: x } = r, C = $(N, 0), n = $(R, 1), I = S("grid-item"), w = p == null ? void 0 : p.includes(s), M = {
31
- [`${I}`]: !0,
32
- [`${I}-rtl`]: v
30
+ ), { colGap: m, cols: d, displayIndexList: p, overflow: x } = r, C = I(D, 0), n = I(R, 1), $ = S("grid-item"), w = p == null ? void 0 : p.includes(o), M = {
31
+ [`${$}`]: !0,
32
+ [`${$}-rtl`]: v
33
33
  }, b = H(M, y), e = u(() => L(r.cols, {
34
34
  suffix: !!f.suffix,
35
35
  span: n,
36
36
  offset: C
37
37
  }), [r.cols, f.suffix, n, C]);
38
- q(() => (E(s, e), () => {
39
- P(s);
40
- }), [s, e]);
38
+ q(() => (E(o, e), () => {
39
+ P(o);
40
+ }), [o, e]);
41
41
  const F = u(() => {
42
- const { offset: t, span: o } = e;
42
+ const { offset: t, span: s } = e;
43
43
  return t > 0 ? {
44
- marginLeft: `calc((${`(100% - ${m * (o - 1)}px) / ${o}`} * ${t}) + ${m * t}px)`
44
+ marginLeft: `calc((${`(100% - ${m * (s - 1)}px) / ${s}`} * ${t}) + ${m * t}px)`
45
45
  } : {};
46
46
  }, [e, m]), j = u(() => {
47
- const { suffix: t, span: o } = e;
48
- return t ? `${d - o + 1}` : `span ${o}`;
47
+ const { suffix: t, span: s } = e;
48
+ return t ? `${d - s + 1}` : `span ${s}`;
49
49
  }, [e, d]), B = !w || n === 0 ? { display: "none" } : {}, O = {
50
50
  gridColumn: `${j} / span ${n}`,
51
51
  ...F,
@@ -58,7 +58,7 @@ function W(_, g) {
58
58
  className: b,
59
59
  style: {
60
60
  ...O,
61
- ...D
61
+ ...N
62
62
  },
63
63
  children: T(i) ? i({ overflow: x }) : c.Children.map(i, (t) => t && r.collapsed && c.isValidElement(t) && !V(t.type) ? c.cloneElement(t, {
64
64
  overflow: x,
package/grid/grid.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
- import $ from "lodash/get";
2
+ import L from "lodash/get";
3
3
  import f, { forwardRef as h, useState as S, useContext as E } from "react";
4
- import { a as T } from "../chunk/CNcLypMY.js";
4
+ import { a as T } from "../chunk/CQvM33Vg.js";
5
5
  import { u as b } from "../chunk/BFTV6myl.js";
6
- import { p as j } from "../chunk/CUFsOxJ2.js";
6
+ import j from "@unicom-cloud/utils/class-name";
7
7
  import { GridDataCollectorContext as B, GridContext as Q } from "./context.js";
8
8
  import { u as p } from "../chunk/xAb6ZgqS.js";
9
9
  import { setItemVisible as V } from "./util.js";
@@ -15,12 +15,12 @@ const k = {
15
15
  rowGap: 0
16
16
  };
17
17
  function q(u, x) {
18
- const [e, i] = S(
18
+ const [t, i] = S(
19
19
  /* @__PURE__ */ new Map()
20
- ), { getPrefixCls: G, componentConfig: r, rtl: w } = E(T), C = b(
20
+ ), { getPrefixCls: G, componentConfig: s, rtl: w } = E(T), C = b(
21
21
  u,
22
22
  k,
23
- r == null ? void 0 : r.Grid
23
+ s == null ? void 0 : s.Grid
24
24
  ), {
25
25
  children: I,
26
26
  className: g,
@@ -30,64 +30,64 @@ function q(u, x) {
30
30
  rowGap: y,
31
31
  collapsed: n,
32
32
  collapsedRows: M
33
- } = C, s = p(_, 24), c = p(v, 0), P = {
33
+ } = C, r = p(_, 24), c = p(v, 0), N = {
34
34
  gap: `${p(y, 0)}px ${c}px`,
35
- gridTemplateColumns: `repeat(${s}, minmax(0px, 1fr))`
36
- }, m = G("grid"), R = {
35
+ gridTemplateColumns: `repeat(${r}, minmax(0px, 1fr))`
36
+ }, m = G("grid"), P = {
37
37
  [`${m}`]: !0,
38
38
  [`${m}-rtl`]: w
39
- }, L = j(R, g), N = (() => {
40
- const t = [];
41
- for (const [o, a] of e.entries())
42
- t[o] = a;
43
- return t;
39
+ }, R = j(P, g), $ = (() => {
40
+ const e = [];
41
+ for (const [o, a] of t.entries())
42
+ e[o] = a;
43
+ return e;
44
44
  })(), d = V({
45
- cols: s,
45
+ cols: r,
46
46
  collapsed: n,
47
47
  collapsedRows: M,
48
- itemDataList: N
48
+ itemDataList: $
49
49
  });
50
50
  return /* @__PURE__ */ l(
51
51
  "div",
52
52
  {
53
53
  ref: x,
54
- className: L,
54
+ className: R,
55
55
  style: {
56
- ...P,
56
+ ...N,
57
57
  ...D
58
58
  },
59
59
  children: /* @__PURE__ */ l(
60
60
  B.Provider,
61
61
  {
62
62
  value: {
63
- collectItemData(t, o) {
64
- e.set(t, o), i(new Map([...e]));
63
+ collectItemData(e, o) {
64
+ t.set(e, o), i(new Map([...t]));
65
65
  },
66
- removeItemData(t) {
67
- e.delete(t), i(new Map([...e]));
66
+ removeItemData(e) {
67
+ t.delete(e), i(new Map([...t]));
68
68
  }
69
69
  },
70
70
  children: /* @__PURE__ */ l(
71
71
  Q.Provider,
72
72
  {
73
73
  value: {
74
- cols: s,
74
+ cols: r,
75
75
  colGap: c,
76
76
  collapsed: n,
77
77
  overflow: d.overflow,
78
78
  displayIndexList: d.displayIndexList
79
79
  },
80
- children: f.Children.map(I, (t, o) => {
81
- if (t) {
80
+ children: f.Children.map(I, (e, o) => {
81
+ if (e) {
82
82
  const a = {
83
83
  __index__: o,
84
- ...t.props
84
+ ...e.props
85
85
  };
86
- return f.cloneElement(t, a);
86
+ return f.cloneElement(e, a);
87
87
  }
88
88
  return null;
89
89
  }).filter(
90
- (t) => $(t, "type.__PQB_GRID_ITEM__")
90
+ (e) => L(e, "type.__PQB_GRID_ITEM__")
91
91
  )
92
92
  }
93
93
  )
package/hooks/index.js CHANGED
@@ -4,21 +4,21 @@ import { u as a } from "../chunk/DxVvggX2.js";
4
4
  import { u as m } from "../chunk/5_U1CBIu.js";
5
5
  import { u as x } from "../chunk/CQ_WOOmf.js";
6
6
  import { u as d } from "../chunk/B4YRLi8r.js";
7
- import { u as c } from "../chunk/ZrBrCzQX.js";
7
+ import { u as c } from "../chunk/B4WG1mhs.js";
8
8
  import { u as v } from "../chunk/C4OrxKE6.js";
9
- import { u as I } from "../chunk/B0n0iRhF.js";
9
+ import { u as I } from "../chunk/CCKr5jj1.js";
10
10
  import { u as b } from "../chunk/oopARUrq.js";
11
11
  import { u as P } from "../chunk/B2yFlXke.js";
12
- import { u as h } from "../chunk/XTEsYGuF.js";
12
+ import { u as h } from "../chunk/BYdIoY50.js";
13
13
  import { u as W } from "../chunk/BL9DMeor.js";
14
14
  import { u as z } from "../chunk/BXAeh0_V.js";
15
15
  import { u as M } from "../chunk/BFTV6myl.js";
16
- import { u as g } from "../chunk/DeV0v__J.js";
16
+ import { u as g } from "../chunk/CXPOj2uy.js";
17
17
  import { u as F } from "../chunk/zmmqLCF4.js";
18
18
  import { u as U } from "../chunk/DU1RCDfh.js";
19
- import { u as H } from "../chunk/RS6OAxzv.js";
19
+ import { u as H } from "../chunk/D-ap9qEk.js";
20
20
  import { u as j } from "../chunk/BsY85n3_.js";
21
- import { u as A } from "../chunk/BBkdXHrJ.js";
21
+ import { u as A } from "../chunk/rT6qmv-Y.js";
22
22
  import { u as G } from "../chunk/VSe_Wq1g.js";
23
23
  import { u as N } from "../chunk/Bg3uJGPu.js";
24
24
  import { u as T } from "../chunk/CmZzBtA4.js";
@@ -1,4 +1,4 @@
1
- import { u as f } from "../chunk/B0n0iRhF.js";
1
+ import { u as f } from "../chunk/CCKr5jj1.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { u as f } from "../chunk/ZrBrCzQX.js";
1
+ import { u as f } from "../chunk/B4WG1mhs.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { u as f } from "../chunk/XTEsYGuF.js";
1
+ import { u as f } from "../chunk/BYdIoY50.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { u as f } from "../chunk/DeV0v__J.js";
1
+ import { u as f } from "../chunk/CXPOj2uy.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { u as f } from "../chunk/RS6OAxzv.js";
1
+ import { u as f } from "../chunk/D-ap9qEk.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { u as f } from "../chunk/BBkdXHrJ.js";
1
+ import { u as f } from "../chunk/rT6qmv-Y.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,64 +1,64 @@
1
1
  import h from "lodash/isEqualWith";
2
2
  import { useMemo as d, useEffect as y } from "react";
3
- import { u as D } from "../chunk/DeV0v__J.js";
4
- import { d as V } from "../chunk/DAAff-FT.js";
5
- import { t as E } from "../chunk/BrOW642m.js";
6
- const I = 6;
3
+ import { u as D } from "../chunk/CXPOj2uy.js";
4
+ import { d as V } from "../chunk/ClM74To2.js";
5
+ import { Backspace as k } from "@unicom-cloud/utils/constant/keyboardCode";
6
+ const E = 6;
7
7
  function M(n) {
8
- const [o, m] = D("", n), u = +n.length > 0 ? +n.length : I, l = d(() => {
8
+ const [o, m] = D("", n), u = +n.length > 0 ? +n.length : E, c = d(() => {
9
9
  const t = o ? String(o).split("") : [];
10
- return new Array(u).fill("").map((a, e) => V(t[e]) ? String(t[e]) : "");
10
+ return new Array(u).fill("").map((i, e) => V(t[e]) ? String(t[e]) : "");
11
11
  }, [o, u]), s = () => {
12
- var e, i, c;
12
+ var e, a, l;
13
13
  const t = ((e = n.getInputRefList) == null ? void 0 : e.call(n)) || [];
14
14
  if ((t == null ? void 0 : t.indexOf(document.activeElement)) === -1)
15
15
  return;
16
- const a = l.findIndex((r) => !r);
17
- if (a > -1) {
18
- const r = Math.min(a, t.length - 1);
19
- (c = (i = t[r]) == null ? void 0 : i.focus) == null || c.call(i);
16
+ const i = c.findIndex((r) => !r);
17
+ if (i > -1) {
18
+ const r = Math.min(i, t.length - 1);
19
+ (l = (a = t[r]) == null ? void 0 : a.focus) == null || l.call(a);
20
20
  }
21
21
  };
22
22
  y(() => {
23
23
  s();
24
- }, [JSON.stringify(l)]);
24
+ }, [JSON.stringify(c)]);
25
25
  const f = (t) => {
26
- var a, e;
27
- h(t, o) || (m(t), (a = n.onChange) == null || a.call(n, t), t.length === u && ((e = n.onFinish) == null || e.call(n, t)));
28
- }, g = (t, a) => {
26
+ var i, e;
27
+ h(t, o) || (m(t), (i = n.onChange) == null || i.call(n, t), t.length === u && ((e = n.onFinish) == null || e.call(n, t)));
28
+ }, g = (t, i) => {
29
29
  t.preventDefault();
30
- const i = t.clipboardData.getData("text");
31
- i && f(
32
- l.slice(0, a).concat(i.split("")).join("")
30
+ const a = t.clipboardData.getData("text");
31
+ a && f(
32
+ c.slice(0, i).concat(a.split("")).join("")
33
33
  );
34
34
  };
35
35
  return {
36
36
  value: o,
37
- filledValue: l,
37
+ filledValue: c,
38
38
  setValue: f,
39
39
  getInputProps: (t) => {
40
- const a = String(l[t]);
40
+ const i = String(c[t]);
41
41
  return {
42
42
  key: t,
43
- value: a,
43
+ value: i,
44
44
  onClick: (e) => {
45
- e.preventDefault(), l[t] || s();
45
+ e.preventDefault(), c[t] || s();
46
46
  },
47
47
  onKeyDown: (e) => {
48
- if (e.key === E.key) {
49
- if (l[t + 1]) {
48
+ if (e.key === k.key) {
49
+ if (c[t + 1]) {
50
50
  e.preventDefault();
51
51
  return;
52
52
  }
53
- let i = t;
54
- l[t] || (i -= 1);
55
- const c = [...l];
56
- c[i] = "", f(c.join(""));
53
+ let a = t;
54
+ c[t] || (a -= 1);
55
+ const l = [...c];
56
+ l[a] = "", f(l.join(""));
57
57
  }
58
58
  },
59
59
  onChange: (e) => {
60
- const i = (e == null ? void 0 : e.trim()) || "", c = [...l];
61
- c[t] = i.replace(a, "").split("").pop() || "", f(c.join(""));
60
+ const a = (e == null ? void 0 : e.trim()) || "", l = [...c];
61
+ l[t] = a.replace(i, "").split("").pop() || "", f(l.join(""));
62
62
  },
63
63
  onPaste: (e) => {
64
64
  g(e, t);
package/icon/index.js CHANGED
@@ -1,23 +1,25 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
+ import { default as A } from "@unicom-cloud/icons/context";
3
+ import { default as j } from "@unicom-cloud/icons/useProps";
2
4
  import i from "react";
3
- import { C as g } from "../chunk/CNcLypMY.js";
4
- import { p as x } from "../chunk/CUFsOxJ2.js";
5
- import { isServerRendering as y } from "../utils/dom.js";
6
- const C = [];
5
+ import { C as x } from "../chunk/CQvM33Vg.js";
6
+ import g from "@unicom-cloud/utils/class-name";
7
+ import { isServerRendering as N } from "../utils/dom.js";
8
+ const h = [];
7
9
  function P(p = {}) {
8
10
  const { src: r, extraProps: u = {} } = p;
9
- if (!y && typeof r == "string" && r.length && C.indexOf(r) === -1) {
11
+ if (!N && typeof r == "string" && r.length && h.indexOf(r) === -1) {
10
12
  const e = document.createElement("script");
11
- e.setAttribute("src", r), e.setAttribute("data-namespace", r), C.push(r), document.body.appendChild(e);
13
+ e.setAttribute("src", r), e.setAttribute("data-namespace", r), h.push(r), document.body.appendChild(e);
12
14
  }
13
15
  function f(e, d) {
14
- const { type: n, children: t, ...l } = e, o = i.useRef();
16
+ const { type: t, children: n, ...l } = e, o = i.useRef();
15
17
  i.useImperativeHandle(d, () => o.current);
16
18
  let s;
17
- return n && (s = /* @__PURE__ */ a("use", { xlinkHref: `#${n}` })), t && (s = t), /* @__PURE__ */ a(
19
+ return t && (s = /* @__PURE__ */ a("use", { xlinkHref: `#${t}` })), n && (s = n), /* @__PURE__ */ a(
18
20
  m,
19
21
  {
20
- type: n,
22
+ type: t,
21
23
  ...l,
22
24
  ...u,
23
25
  ref: (c) => {
@@ -30,28 +32,30 @@ function P(p = {}) {
30
32
  return f.displayName = "Iconfont", i.forwardRef(f);
31
33
  }
32
34
  const m = i.forwardRef(function(r, u) {
33
- return /* @__PURE__ */ a(g, { children: (e) => {
34
- const { className: d, spin: n, children: t, type: l, ...o } = r, c = {
35
+ return /* @__PURE__ */ a(x, { children: (e) => {
36
+ const { className: d, spin: t, children: n, type: l, ...o } = r, c = {
35
37
  ...{
36
38
  width: "1em",
37
39
  height: "1em",
38
40
  fill: "currentColor"
39
41
  },
40
42
  ...o
41
- }, h = e == null ? void 0 : e.getPrefixCls("icon"), I = x(
42
- h,
43
+ }, I = e == null ? void 0 : e.getPrefixCls("icon"), C = g(
44
+ I,
43
45
  l,
44
46
  {
45
- [`${h}-loading`]: n
47
+ [`${I}-loading`]: t
46
48
  },
47
49
  d
48
50
  );
49
- return c.className = I, /* @__PURE__ */ a("svg", { ...c, children: t });
51
+ return c.className = C, /* @__PURE__ */ a("svg", { ...c, children: n });
50
52
  } });
51
53
  });
52
54
  m.displayName = "Icon";
53
55
  m.addFromIconFontCn = P;
54
56
  export {
57
+ A as IconContext,
55
58
  P as addFromIconFontCn,
56
- m as default
59
+ m as default,
60
+ j as useIconProps
57
61
  };
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { I as i } from "../chunk/CNcLypMY.js";
4
- import "../chunk/CUFsOxJ2.js";
3
+ import { I as i } from "../chunk/CQvM33Vg.js";
4
+ import "@unicom-cloud/utils/class-name";
5
5
  export {
6
6
  i as default
7
7
  };
package/image/Image.js CHANGED
@@ -5,15 +5,15 @@ import E from "lodash/isNumber";
5
5
  import D from "lodash/isPlainObject";
6
6
  import Ne from "lodash/isUndefined";
7
7
  import Ve, { useContext as H, useMemo as p, useRef as J, useEffect as g } from "react";
8
- import { a as xe } from "../chunk/CNcLypMY.js";
9
- import { u as Le } from "../chunk/B0n0iRhF.js";
10
- import { u as ye } from "../chunk/XTEsYGuF.js";
8
+ import { a as xe } from "../chunk/CQvM33Vg.js";
9
+ import { u as Le } from "../chunk/CCKr5jj1.js";
10
+ import { u as ye } from "../chunk/BYdIoY50.js";
11
11
  import { u as Ee } from "../chunk/BFTV6myl.js";
12
- import { u as Ge } from "../chunk/DeV0v__J.js";
13
- import { p as Q } from "../chunk/CUFsOxJ2.js";
12
+ import { u as Ge } from "../chunk/CXPOj2uy.js";
13
+ import Q from "@unicom-cloud/utils/class-name";
14
14
  import { o as Re } from "../chunk/BKKEev13.js";
15
- import { u as je, I as Se } from "../chunk/DohlrJ4S.js";
16
- import { P as W, u as Ue } from "../chunk/BC5fEyWK.js";
15
+ import { u as je, I as Se } from "../chunk/DxYoPlum.js";
16
+ import { P as W, u as Ue } from "../chunk/yLRv5RIK.js";
17
17
  import Fe from "./ImagePreviewGroup.js";
18
18
  import { PreviewGroupContext as Me } from "./previewGroupContext.js";
19
19
  let G = 0;
@@ -52,12 +52,12 @@ function ze(X, Y) {
52
52
  lazyload: l,
53
53
  ...ae
54
54
  } = re, le = ye(), {
55
- previewGroup: u,
55
+ previewGroup: m,
56
56
  handleVisibleChange: ce,
57
- registerPreviewUrl: ue,
58
- registerPreviewProps: me,
57
+ registerPreviewUrl: me,
58
+ registerPreviewProps: ue,
59
59
  setCurrentIndex: de
60
- } = H(Me), o = p(() => D(P) ? P : {}, [P]), fe = p(() => D(l) ? l : {}, [l]), s = p(() => E(C) || E(z) ? (G = E(C) ? C : z, G) : G++, []), V = o.src || i, [x] = je({ title: w, description: U, actions: F }), { isLoading: K, isError: L, isLoaded: c, isBeforeLoad: pe, setStatus: m } = Ue("beforeLoad"), d = J(!1), [_, ge] = Ge(!1, {
60
+ } = H(Me), o = p(() => D(P) ? P : {}, [P]), fe = p(() => D(l) ? l : {}, [l]), s = p(() => E(C) || E(z) ? (G = E(C) ? C : z, G) : G++, []), V = o.src || i, [x] = je({ title: w, description: U, actions: F }), { isLoading: K, isError: L, isLoaded: c, isBeforeLoad: pe, setStatus: u } = Ue("beforeLoad"), d = J(!1), [_, ge] = Ge(!1, {
61
61
  defaultValue: o.defaultVisible,
62
62
  value: o.visible
63
63
  }), y = p(() => Re(o, [
@@ -80,13 +80,13 @@ function ze(X, Y) {
80
80
  ie
81
81
  ), n = J();
82
82
  function he(r) {
83
- d.current = !0, m("loaded"), N == null || N(r);
83
+ d.current = !0, u("loaded"), N == null || N(r);
84
84
  }
85
85
  function Pe(r) {
86
- d.current = !0, m("error"), $ == null || $(r);
86
+ d.current = !0, u("error"), $ == null || $(r);
87
87
  }
88
88
  function k(r) {
89
- a && u ? (de(s), ce(!0)) : a && B(!0), I == null || I(r);
89
+ a && m ? (de(s), ce(!0)) : a && B(!0), I == null || I(r);
90
90
  }
91
91
  function B(r) {
92
92
  var A;
@@ -98,20 +98,20 @@ function ze(X, Y) {
98
98
  ...fe
99
99
  });
100
100
  g(() => {
101
- d.current = !1, i || m("error");
101
+ d.current = !1, i || u("error");
102
102
  }, [i]), g(() => {
103
- n.current && (T ? ((n.current.src || i) && n.current.src !== i && (n.current.src = i), !d.current && !n.current.complete && m("loading")) : m("lazyload"));
103
+ n.current && (T ? ((n.current.src || i) && n.current.src !== i && (n.current.src = i), !d.current && !n.current.complete && u("loading")) : u("lazyload"));
104
104
  }, [i, T]), g(() => {
105
- if (!u)
105
+ if (!m)
106
106
  return;
107
- const r = me(s, y);
107
+ const r = ue(s, y);
108
108
  return () => r(s);
109
- }, [s, u, y]), g(() => {
110
- if (!u)
109
+ }, [s, m, y]), g(() => {
110
+ if (!m)
111
111
  return;
112
- const r = ue(s, V, a);
112
+ const r = me(s, V, a);
113
113
  return () => r(s);
114
- }, [s, u, V, a]);
114
+ }, [s, m, V, a]);
115
115
  const be = /* @__PURE__ */ f("div", { className: `${e}-error`, children: [
116
116
  /* @__PURE__ */ t("div", { className: `${e}-error-icon`, children: /* @__PURE__ */ t(Ce, {}) }),
117
117
  b && /* @__PURE__ */ t("div", { className: `${e}-error-alt`, children: b })
@@ -1,8 +1,8 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@unicom-cloud/icons/IconUiMore";
3
- import "../chunk/CUFsOxJ2.js";
3
+ import "@unicom-cloud/utils/class-name";
4
4
  import "./TriggerForToolbar.js";
5
- import { I as e } from "../chunk/DohlrJ4S.js";
5
+ import { I as e } from "../chunk/DxYoPlum.js";
6
6
  export {
7
7
  e as ImageFooter
8
8
  };
@@ -12,30 +12,30 @@ import "@unicom-cloud/icons/IconUiZoomIn";
12
12
  import "@unicom-cloud/icons/IconUiZoomOut";
13
13
  import "lodash/isUndefined";
14
14
  import "react";
15
- import "../chunk/CNcLypMY.js";
15
+ import "../chunk/CQvM33Vg.js";
16
16
  import "lodash/isEqualWith";
17
- import "../chunk/DeV0v__J.js";
18
- import "../chunk/DAAff-FT.js";
19
- import "../chunk/BrOW642m.js";
17
+ import "../chunk/CXPOj2uy.js";
18
+ import "../chunk/ClM74To2.js";
19
+ import "@unicom-cloud/utils/constant/keyboardCode";
20
20
  import "lodash/isNumber";
21
21
  import "lodash/merge";
22
22
  import "../utils/dom.js";
23
- import "../chunk/ZrBrCzQX.js";
23
+ import "../chunk/B4WG1mhs.js";
24
24
  import "../chunk/BFTV6myl.js";
25
25
  import "../chunk/DU1RCDfh.js";
26
- import "../chunk/Cc_-i0o_.js";
27
- import "../chunk/Ce1j9KTi.js";
26
+ import "../chunk/BZ3igxQN.js";
27
+ import "@unicom-cloud/utils/constant";
28
28
  import "../chunk/a3hR6zLw.js";
29
29
  import "lodash/debounce";
30
30
  import "../portal/index.js";
31
- import "../chunk/BpYX5PN4.js";
32
- import "../chunk/CUFsOxJ2.js";
33
- import "../chunk/D0Dlbc2g.js";
31
+ import "../chunk/NPajzdOv.js";
32
+ import "@unicom-cloud/utils/class-name";
33
+ import "@unicom-cloud/utils/clipboard-copy";
34
34
  import "../chunk/CIRG541s.js";
35
35
  import "./ImagePreviewArrow.js";
36
36
  import "./ImagePreviewToolbar.js";
37
37
  import "./previewGroupContext.js";
38
- import { P as M } from "../chunk/BC5fEyWK.js";
38
+ import { P as M } from "../chunk/yLRv5RIK.js";
39
39
  export {
40
40
  M as default
41
41
  };