@unicom-cloud/ui 0.8.81 → 0.8.83

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 (280) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +2 -2
  4. package/BackTop.js +2 -2
  5. package/Badge.js +1 -1
  6. package/Breadcrumb.js +2 -2
  7. package/Button.js +1 -1
  8. package/Calendar.js +2 -2
  9. package/Card.js +1 -1
  10. package/Carousel.js +1 -1
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +1 -1
  13. package/Collapse.js +1 -1
  14. package/ColorPicker.js +2 -2
  15. package/Comment.js +1 -1
  16. package/ConfigProvider.js +5 -4
  17. package/Copy.js +1 -1
  18. package/DatePicker.js +7 -7
  19. package/Descriptions.js +1 -1
  20. package/Divider.js +1 -1
  21. package/Draggable.js +1 -1
  22. package/Dropdown.js +1 -1
  23. package/Empty.js +1 -1
  24. package/Icon.js +1 -1
  25. package/IconHover.js +1 -1
  26. package/Image.js +1 -1
  27. package/Input.js +11 -10
  28. package/InputNumber.js +1 -1
  29. package/Layout.js +1 -1
  30. package/Link.js +1 -1
  31. package/List.js +2 -2
  32. package/Mentions.js +2 -2
  33. package/Menu.js +1 -1
  34. package/Message.js +1 -1
  35. package/Modal.js +1 -1
  36. package/Notice.js +1 -1
  37. package/Notification.js +5 -5
  38. package/OverflowEllipsis.js +1 -1
  39. package/PageHeader.js +1 -1
  40. package/Pagination.js +1 -1
  41. package/Popconfirm.js +1 -1
  42. package/Popover.js +1 -1
  43. package/Progress.js +1 -1
  44. package/Radio.js +1 -1
  45. package/Rate.js +1 -1
  46. package/ResizeBox.js +1 -1
  47. package/Result.js +1 -1
  48. package/Select.js +1 -1
  49. package/Skeleton.js +1 -1
  50. package/Slider.js +1 -1
  51. package/Space.js +1 -1
  52. package/SpeechSynthesis.js +1 -1
  53. package/Spin.js +1 -1
  54. package/Statistic.js +2 -2
  55. package/Steps.js +1 -1
  56. package/Switch.js +1 -1
  57. package/Table.js +1 -1
  58. package/Tabs.js +1 -1
  59. package/Tag.js +1 -1
  60. package/Tooltip.js +1 -1
  61. package/Transfer.js +2 -2
  62. package/Tree.js +1 -1
  63. package/TreeSelect.js +1 -1
  64. package/Trigger.js +1 -1
  65. package/Typography.js +1 -1
  66. package/affix/index.js +60 -57
  67. package/alert/index.js +53 -53
  68. package/anchor/Anchor.js +72 -72
  69. package/anchor/Link.js +27 -27
  70. package/anchor/util.js +1 -1
  71. package/auto-complete/index.js +2 -2
  72. package/avatar/Avatar.js +31 -31
  73. package/avatar/Group.js +25 -25
  74. package/back-top/index.js +30 -30
  75. package/badge/index.js +37 -37
  76. package/breadcrumb/index.js +26 -26
  77. package/button/Group.js +7 -7
  78. package/button/index.js +29 -29
  79. package/calendar/index.js +2 -2
  80. package/card/Grid.js +12 -12
  81. package/card/Meta.js +17 -17
  82. package/card/index.js +44 -44
  83. package/carousel/Arrow.js +19 -19
  84. package/carousel/Indicator.js +25 -25
  85. package/carousel/index.js +77 -77
  86. package/cascader/Cascader.js +2 -2
  87. package/cascader/index.js +1 -1
  88. package/cascader/util.js +1 -1
  89. package/checkbox/Checkbox.js +2 -2
  90. package/checkbox/Group.js +2 -2
  91. package/checkbox/GroupBlock.js +2 -2
  92. package/checkbox/index.js +2 -2
  93. package/chunk/B6r8jPCd.js +6 -0
  94. package/chunk/{DLBfXSnU.js → BmulTYLW.js} +2880 -2878
  95. package/chunk/C9oo3EJI.js +692 -0
  96. package/chunk/{C5X4hOkx.js → CVSWh4ZZ.js} +80 -80
  97. package/chunk/DILUZgXW.js +1464 -0
  98. package/chunk/DSRHFFrc.js +53 -0
  99. package/chunk/{yLRv5RIK.js → DdJVL_4g.js} +181 -181
  100. package/chunk/{DYspELhF.js → DlHiTTJO.js} +223 -223
  101. package/chunk/{BG7YGUsx.js → R-uQJib2.js} +119 -119
  102. package/chunk/{DEiyXzBZ.js → ev6oHWqY.js} +63 -63
  103. package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
  104. package/collapse/Collapse.js +2 -2
  105. package/collapse/Item.js +2 -2
  106. package/collapse/index.js +1 -1
  107. package/color-picker/ControlBar.js +36 -36
  108. package/color-picker/InputAlpha.js +11 -11
  109. package/color-picker/InputHex.js +24 -24
  110. package/color-picker/InputRgb.js +23 -23
  111. package/color-picker/Palette.js +18 -18
  112. package/color-picker/Panel.js +2 -2
  113. package/color-picker/index.js +2 -2
  114. package/comment/index.js +31 -31
  115. package/config-provider/ConfigProvider.js +5 -3
  116. package/config-provider/context.js +2 -2
  117. package/config-provider/index.js +4 -3
  118. package/copy/index.js +28 -28
  119. package/date-picker/Picker.js +276 -276
  120. package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
  121. package/date-picker/index.js +26 -27
  122. package/descriptions/index.js +33 -33
  123. package/divider/index.js +12 -12
  124. package/draggable/index.js +23 -23
  125. package/drawer/Drawer.js +81 -81
  126. package/dropdown/Button.js +1 -1
  127. package/dropdown/index.js +56 -56
  128. package/empty/index.js +1 -1
  129. package/form/Form.js +76 -76
  130. package/form/FormItem.js +64 -64
  131. package/form/context.js +1 -1
  132. package/grid/Col.js +53 -53
  133. package/grid/Row.js +34 -34
  134. package/grid/grid-item.js +29 -29
  135. package/grid/grid.js +50 -50
  136. package/icon/index.js +20 -19
  137. package/icon-hover/index.js +1 -1
  138. package/image/Image.js +86 -86
  139. package/image/ImagePreview.js +2 -2
  140. package/image/ImagePreviewArrow.js +22 -22
  141. package/image/ImagePreviewGroup.js +1 -1
  142. package/image/index.js +1 -1
  143. package/index.js +498 -493
  144. package/input/Button.js +11 -0
  145. package/input/Group.js +8 -8
  146. package/input/Input.js +488 -434
  147. package/input/InputElement.js +1 -1
  148. package/input/Password.js +1 -1
  149. package/input/Search.js +1 -1
  150. package/input/Textarea.js +1 -1
  151. package/input/index.js +9 -8
  152. package/input-number/index.js +1 -1
  153. package/input-tag/InputTag.js +40 -40
  154. package/layout/Content.js +7 -7
  155. package/layout/Footer.js +9 -9
  156. package/layout/Header.js +7 -7
  157. package/layout/Sider.js +55 -55
  158. package/layout/index.js +32 -32
  159. package/link/index.js +35 -35
  160. package/list/Item.js +29 -29
  161. package/list/Meta.js +12 -12
  162. package/list/index.js +2 -2
  163. package/mentions/index.js +2 -2
  164. package/menu/Menu.js +2 -2
  165. package/menu/OverflowWrap.js +1 -1
  166. package/menu/index.js +2 -2
  167. package/message/index.js +1 -1
  168. package/message/useMessage.js +1 -1
  169. package/modal/Confirm.js +2 -2
  170. package/modal/Modal.js +2 -2
  171. package/modal/index.js +1 -1
  172. package/notice/index.js +1 -1
  173. package/notification/index.js +5 -5
  174. package/notification/useNotification.js +1 -1
  175. package/overflow-ellipsis/OverflowItem.js +12 -12
  176. package/overflow-ellipsis/index.js +24 -24
  177. package/package.json +1 -1
  178. package/page-header/index.js +38 -38
  179. package/pagination/PageItem.js +16 -16
  180. package/pagination/PageJumper.js +1 -1
  181. package/pagination/PageOption.js +2 -2
  182. package/pagination/Pagination.js +2 -2
  183. package/pagination/index.js +1 -1
  184. package/picker/Input.js +69 -69
  185. package/picker/InputRange.js +111 -111
  186. package/popconfirm/index.js +61 -61
  187. package/popover/index.js +35 -35
  188. package/progress/index.js +22 -22
  189. package/radio/Group.js +2 -2
  190. package/radio/GroupBlock.js +2 -2
  191. package/radio/Radio.js +2 -2
  192. package/radio/index.js +2 -2
  193. package/rate/index.js +49 -49
  194. package/resize-box/ResizeTrigger.js +34 -34
  195. package/resize-box/Split.js +56 -56
  196. package/resize-box/SplitGroup.js +55 -55
  197. package/resize-box/index.js +51 -51
  198. package/result/index.js +41 -41
  199. package/select/Option.js +1 -1
  200. package/select/Select.js +2 -2
  201. package/select/index.js +2 -2
  202. package/select/util.js +1 -1
  203. package/select-view/Core.js +125 -125
  204. package/skeleton/index.js +20 -20
  205. package/slider/Button.js +57 -57
  206. package/slider/index.js +116 -116
  207. package/space/index.js +46 -44
  208. package/speech-synthesis/index.js +1 -1
  209. package/spin/DotLoading.js +10 -10
  210. package/spin/index.js +44 -44
  211. package/statistic/Countdown.js +34 -34
  212. package/statistic/index.js +67 -67
  213. package/steps/index.js +55 -55
  214. package/style.css +1 -1
  215. package/switch/index.js +54 -54
  216. package/table/Table.js +3 -3
  217. package/table/index.js +1 -1
  218. package/tabs/Tab.js +2 -2
  219. package/tabs/TabContent.js +2 -2
  220. package/tabs/TabPane.js +12 -12
  221. package/tabs/index.js +2 -2
  222. package/tag/index.js +45 -45
  223. package/time-picker/Picker.js +76 -76
  224. package/time-picker/TimePicker.js +136 -136
  225. package/time-picker/index.js +8 -8
  226. package/time-picker/util.js +5 -5
  227. package/timeline/Item.js +47 -47
  228. package/timeline/Timeline.js +41 -41
  229. package/tooltip/index.js +29 -29
  230. package/transfer/Item.js +2 -2
  231. package/transfer/List.js +2 -2
  232. package/transfer/index.js +2 -2
  233. package/tree/Animation.js +2 -2
  234. package/tree/Node.js +2 -2
  235. package/tree/NodeList.js +1 -1
  236. package/tree/Tree.js +2 -2
  237. package/tree/index.js +1 -1
  238. package/tree-select/List.js +1 -1
  239. package/tree-select/Select.js +2 -2
  240. package/tree-select/index.js +2 -2
  241. package/trigger/index.js +60 -60
  242. package/types/config-provider/ConfigProvider.d.ts +2 -2
  243. package/types/config-provider/context.d.ts +1 -1
  244. package/types/date-picker/index.d.ts +8 -9
  245. package/types/date-picker/interface.d.ts +9 -9
  246. package/types/index.d.ts +2 -2
  247. package/types/input/Button.d.ts +5 -0
  248. package/types/input/Input.d.ts +4 -1
  249. package/types/input/interface.d.ts +7 -0
  250. package/types/picker/Input.d.ts +2 -2
  251. package/types/space/index.d.ts +2 -1
  252. package/types/utils/index.d.ts +1 -0
  253. package/types/utils/names.d.ts +1 -1
  254. package/types/utils/setTheme.d.ts +2 -0
  255. package/typography/Base.js +53 -53
  256. package/typography/Ellipsis.js +10 -8
  257. package/typography/Operations.js +28 -28
  258. package/typography/Paragraph.js +8 -8
  259. package/typography/Typography.js +7 -7
  260. package/typography/index.js +1 -1
  261. package/upload/TriggerNode.js +47 -47
  262. package/upload/Upload.js +184 -184
  263. package/upload/request.js +1 -1
  264. package/upload/request_.js +1 -1
  265. package/utils/constant.js +1 -1
  266. package/utils/contextHolder.js +3 -3
  267. package/utils/dom.js +1 -1
  268. package/utils/index.js +116 -114
  269. package/utils/names.js +1 -1
  270. package/utils/setDarkTheme.js +23 -22
  271. package/utils/setPrimaryColor.js +22 -16
  272. package/utils/setTheme.js +9 -0
  273. package/utils/tween.js +1 -1
  274. package/verification-code/VerificationCode.js +49 -49
  275. package/version/index.js +1 -1
  276. package/watermark/Watermark.js +24 -24
  277. package/chunk/CQvM33Vg.js +0 -724
  278. package/chunk/D0ZWT7db.js +0 -5
  279. package/chunk/yhU2zeeu.js +0 -1461
  280. /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
package/progress/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { jsxs as w, jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as y, useContext as $ } from "react";
3
- import { a as k } from "../chunk/CQvM33Vg.js";
1
+ import { jsxs as C, jsx as i } from "react/jsx-runtime";
2
+ import { forwardRef as P, useContext as $ } from "react";
3
+ import { a as k } from "../chunk/C9oo3EJI.js";
4
4
  import { u as N } from "../chunk/BFTV6myl.js";
5
5
  import S from "@unicom-cloud/utils/class-name";
6
6
  import { o as T } from "../chunk/BKKEev13.js";
7
- import m from "./CircleProgress.js";
7
+ import c from "./CircleProgress.js";
8
8
  import W from "./LineProgess.js";
9
9
  import { StepProgress as b } from "./StepProgress.js";
10
10
  const j = {
@@ -14,37 +14,37 @@ const j = {
14
14
  percent: 0,
15
15
  size: "default"
16
16
  };
17
- function z(f, c) {
18
- const { getPrefixCls: h, componentConfig: l, rtl: d } = $(k), t = N(
17
+ function z(f, h) {
18
+ const { getPrefixCls: a, componentConfig: l, rtl: d } = $(k), t = N(
19
19
  f,
20
20
  j,
21
21
  l == null ? void 0 : l.Progress
22
22
  ), {
23
23
  className: u,
24
24
  style: x,
25
- size: a,
25
+ size: n,
26
26
  width: o,
27
- strokeWidth: p,
27
+ strokeWidth: m,
28
28
  steps: g,
29
- percent: C,
30
- ...P
31
- } = t, r = g && t.type !== "circle" ? "steps" : t.type, s = h("progress"), e = "status" in t ? t.status : C >= 100 ? "success" : "normal", n = { width: o };
32
- return a === "mini" && r === "line" && (n.width = o || 16, n.height = o || 16), /* @__PURE__ */ w(
29
+ percent: w,
30
+ ...y
31
+ } = t, r = g && t.type !== "circle" ? "steps" : t.type, s = a == null ? void 0 : a("progress"), e = "status" in t ? t.status : w >= 100 ? "success" : "normal", p = { width: o };
32
+ return n === "mini" && r === "line" && (p.width = o || 16, p.height = o || 16), /* @__PURE__ */ C(
33
33
  "div",
34
34
  {
35
- ref: c,
35
+ ref: h,
36
36
  className: S(
37
37
  s,
38
38
  `${s}-${r}`,
39
- `${s}-${a}`,
39
+ `${s}-${n}`,
40
40
  {
41
41
  [`${s}-is-${e}`]: e !== "normal",
42
42
  [`${s}-rtl`]: d
43
43
  },
44
44
  u
45
45
  ),
46
- style: { ...n, ...x },
47
- ...T(P, [
46
+ style: { ...p, ...x },
47
+ ...T(y, [
48
48
  "type",
49
49
  "animation",
50
50
  "status",
@@ -67,7 +67,7 @@ function z(f, c) {
67
67
  }
68
68
  ),
69
69
  r === "circle" && /* @__PURE__ */ i(
70
- m,
70
+ c,
71
71
  {
72
72
  width: t.width,
73
73
  ...t,
@@ -76,14 +76,14 @@ function z(f, c) {
76
76
  prefixCls: s
77
77
  }
78
78
  ),
79
- r === "line" && (a === "mini" ? /* @__PURE__ */ i(
80
- m,
79
+ r === "line" && (n === "mini" ? /* @__PURE__ */ i(
80
+ c,
81
81
  {
82
82
  pathStrokeColor: t.trailColor,
83
83
  ...t,
84
- pathStrokeWidth: p || 4,
84
+ pathStrokeWidth: m || 4,
85
85
  width: o || 16,
86
- strokeWidth: p || 4,
86
+ strokeWidth: m || 4,
87
87
  prefixCls: s,
88
88
  status: e
89
89
  }
@@ -92,7 +92,7 @@ function z(f, c) {
92
92
  }
93
93
  );
94
94
  }
95
- const R = y(z);
95
+ const R = P(z);
96
96
  R.displayName = "Progress";
97
97
  export {
98
98
  R as default
package/radio/Group.js CHANGED
@@ -2,13 +2,13 @@ import "react/jsx-runtime";
2
2
  import "lodash/isArray";
3
3
  import "lodash/isPlainObject";
4
4
  import "react";
5
- import "../chunk/CQvM33Vg.js";
5
+ import "../chunk/C9oo3EJI.js";
6
6
  import "../chunk/BFTV6myl.js";
7
7
  import "../chunk/CXPOj2uy.js";
8
8
  import "@unicom-cloud/utils/class-name";
9
9
  import "../utils/constant.js";
10
10
  import "../chunk/ClqoGc3r.js";
11
- import { x as C, g as f, e as l } from "../chunk/DLBfXSnU.js";
11
+ import { x as C, g as f, e as l } from "../chunk/BmulTYLW.js";
12
12
  export {
13
13
  C as ClearRadioGroupContext,
14
14
  f as RadioGroupContext,
@@ -1,8 +1,8 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import "../chunk/CQvM33Vg.js";
3
+ import "../chunk/C9oo3EJI.js";
4
4
  import "../chunk/BFTV6myl.js";
5
- import { f as a } from "../chunk/DLBfXSnU.js";
5
+ import { f as a } from "../chunk/BmulTYLW.js";
6
6
  import "@unicom-cloud/utils/class-name";
7
7
  export {
8
8
  a as default
package/radio/Radio.js CHANGED
@@ -2,12 +2,12 @@ import "react/jsx-runtime";
2
2
  import "lodash/isFunction";
3
3
  import "lodash/isNil";
4
4
  import "react";
5
- import "../chunk/CQvM33Vg.js";
5
+ import "../chunk/C9oo3EJI.js";
6
6
  import "../chunk/BFTV6myl.js";
7
7
  import "../chunk/CXPOj2uy.js";
8
8
  import "@unicom-cloud/utils/class-name";
9
9
  import "../chunk/BKKEev13.js";
10
- import { e as R, f, g as G, R as l } from "../chunk/DLBfXSnU.js";
10
+ import { e as R, f, g as G, R as l } from "../chunk/BmulTYLW.js";
11
11
  export {
12
12
  R as RadioGroup,
13
13
  f as RadioGroupBlock,
package/radio/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { R as a } from "../chunk/DLBfXSnU.js";
2
- import { x as e, e as p, f as d, g as i } from "../chunk/DLBfXSnU.js";
1
+ import { R as a } from "../chunk/BmulTYLW.js";
2
+ import { x as e, e as p, f as d, g as i } from "../chunk/BmulTYLW.js";
3
3
  export {
4
4
  e as ClearRadioGroupContext,
5
5
  p as RadioGroup,
package/rate/index.js CHANGED
@@ -1,95 +1,95 @@
1
1
  import { jsx as o, jsxs as Y } from "react/jsx-runtime";
2
2
  import Z from "@unicom-cloud/icons/IconUiFaceFrownFill";
3
- import E from "@unicom-cloud/icons/IconUiFaceMehFill";
3
+ import U from "@unicom-cloud/icons/IconUiFaceMehFill";
4
4
  import x from "@unicom-cloud/icons/IconUiFaceSmileFill";
5
5
  import tt from "@unicom-cloud/icons/IconUiStarFill";
6
6
  import { times as et, divide as rt } from "@unicom-cloud/utils/math";
7
- import g, { useContext as ot, useState as N } from "react";
8
- import { a as at } from "../chunk/CQvM33Vg.js";
7
+ import _, { useContext as ot, useState as y } from "react";
8
+ import { a as at } from "../chunk/C9oo3EJI.js";
9
9
  import { u as st } from "../chunk/BFTV6myl.js";
10
10
  import ct from "../tooltip/index.js";
11
- import U from "@unicom-cloud/utils/class-name";
11
+ import S from "@unicom-cloud/utils/class-name";
12
12
  import { o as lt } from "../chunk/BKKEev13.js";
13
13
  const it = {
14
14
  character: /* @__PURE__ */ o(tt, {}),
15
15
  count: 5
16
16
  };
17
- function nt(S, _) {
18
- const { getPrefixCls: j, componentConfig: m, rtl: z } = ot(at), y = st(
19
- S,
17
+ function nt(j, g) {
18
+ const { getPrefixCls: m, componentConfig: f, rtl: z } = ot(at), F = st(
19
+ j,
20
20
  it,
21
- m == null ? void 0 : m.Rate
21
+ f == null ? void 0 : f.Rate
22
22
  ), {
23
23
  style: D = {},
24
24
  className: L,
25
25
  defaultValue: T,
26
- character: f,
27
- count: F,
28
- value: I,
29
- tooltips: P,
26
+ character: p,
27
+ count: I,
28
+ value: M,
29
+ tooltips: b,
30
30
  allowHalf: a,
31
31
  allowClear: W,
32
- readonly: p,
33
- disabled: u,
34
- grading: C,
32
+ readonly: u,
33
+ disabled: d,
34
+ grading: w,
35
35
  onChange: c,
36
36
  onHoverChange: l,
37
37
  ...q
38
- } = y, [B, M] = N(T || I || 0), [d, b] = N(0), [h, w] = N(), r = j("rate"), G = U(
38
+ } = F, [B, P] = y(T || M || 0), [h, R] = y(0), [$, V] = y(), r = m == null ? void 0 : m("rate"), G = S(
39
39
  r,
40
40
  {
41
- [`${r}-readonly`]: p,
42
- [`${r}-disabled`]: u,
41
+ [`${r}-readonly`]: u,
42
+ [`${r}-disabled`]: d,
43
43
  [`${r}-rtl`]: z
44
44
  },
45
45
  L
46
- ), n = "value" in y ? I : B, R = () => {
47
- d && (b(0), l == null || l(0));
48
- }, V = (t, s) => {
46
+ ), n = "value" in F ? M : B, A = () => {
47
+ h && (R(0), l == null || l(0));
48
+ }, C = (t, s) => {
49
49
  const e = s && a ? t + 0.5 : t + 1;
50
- e !== d && (b(e), l == null || l(e));
51
- }, A = (t, s) => {
50
+ e !== h && (R(e), l == null || l(e));
51
+ }, k = (t, s) => {
52
52
  const e = s && a ? t + 0.5 : t + 1;
53
- w(!0), e !== n ? (M(e), c == null || c(e)) : W && (M(0), c == null || c(0), R());
53
+ V(!0), e !== n ? (P(e), c == null || c(e)) : W && (P(0), c == null || c(0), A());
54
54
  }, H = (t) => {
55
- const s = a ? et(+rt(n || 0, 0.5).toFixed(0), 0.5) : Math.round(n), e = d || s;
56
- let i = typeof f == "function" ? f(t) : f;
57
- C && (e <= 2 ? i = /* @__PURE__ */ o(Z, {}) : e <= 3 ? i = /* @__PURE__ */ o(E, {}) : i = /* @__PURE__ */ o(x, {}), e <= t && (i = /* @__PURE__ */ o(E, {})));
58
- const J = U(`${r}-character`, {
55
+ const s = a ? et(+rt(n || 0, 0.5).toFixed(0), 0.5) : Math.round(n), e = h || s;
56
+ let i = typeof p == "function" ? p(t) : p;
57
+ w && (e <= 2 ? i = /* @__PURE__ */ o(Z, {}) : e <= 3 ? i = /* @__PURE__ */ o(U, {}) : i = /* @__PURE__ */ o(x, {}), e <= t && (i = /* @__PURE__ */ o(U, {})));
58
+ const J = S(`${r}-character`, {
59
59
  [`${r}-character-half`]: a && t + 0.5 === e,
60
60
  [`${r}-character-full`]: t + 1 <= e,
61
- [`${r}-character-scale`]: h && t + 1 < n
62
- }), K = p || u ? {} : {
63
- onMouseEnter: V.bind(this, t, !0),
64
- onClick: A.bind(this, t, !0)
65
- }, O = p || u ? {} : {
66
- onMouseEnter: V.bind(this, t, !1),
67
- onClick: A.bind(this, t, !1)
68
- }, $ = P && P[t], Q = $ ? ct : g.Fragment, X = $ ? { content: $ } : {};
69
- function v(k) {
61
+ [`${r}-character-scale`]: $ && t + 1 < n
62
+ }), K = u || d ? {} : {
63
+ onMouseEnter: C.bind(this, t, !0),
64
+ onClick: k.bind(this, t, !0)
65
+ }, O = u || d ? {} : {
66
+ onMouseEnter: C.bind(this, t, !1),
67
+ onClick: k.bind(this, t, !1)
68
+ }, v = b && b[t], Q = v ? ct : _.Fragment, X = v ? { content: v } : {};
69
+ function N(E) {
70
70
  return {
71
71
  role: "radio",
72
- "aria-checked": t + (k ? 0.5 : 1) <= e,
73
- "aria-setsize": F,
74
- "aria-posinset": t + (k ? 0.5 : 1)
72
+ "aria-checked": t + (E ? 0.5 : 1) <= e,
73
+ "aria-setsize": I,
74
+ "aria-posinset": t + (E ? 0.5 : 1)
75
75
  };
76
76
  }
77
77
  return /* @__PURE__ */ o(Q, { ...X, children: /* @__PURE__ */ Y(
78
78
  "div",
79
79
  {
80
80
  className: J,
81
- style: h ? { animationDelay: `${50 * t}ms` } : {},
81
+ style: $ ? { animationDelay: `${50 * t}ms` } : {},
82
82
  onAnimationEnd: () => {
83
- h && t + 1 >= n - 1 && w(!1);
83
+ $ && t + 1 >= n - 1 && V(!1);
84
84
  },
85
- ...a ? {} : v(),
85
+ ...a ? {} : N(),
86
86
  children: [
87
87
  /* @__PURE__ */ o(
88
88
  "div",
89
89
  {
90
90
  className: `${r}-character-left`,
91
91
  ...K,
92
- ...a ? v(!0) : {},
92
+ ...a ? N(!0) : {},
93
93
  children: i
94
94
  }
95
95
  ),
@@ -98,7 +98,7 @@ function nt(S, _) {
98
98
  {
99
99
  className: `${r}-character-right`,
100
100
  ...O,
101
- ...a ? v() : {},
101
+ ...a ? N() : {},
102
102
  children: i
103
103
  }
104
104
  )
@@ -109,18 +109,18 @@ function nt(S, _) {
109
109
  return /* @__PURE__ */ o(
110
110
  "div",
111
111
  {
112
- ref: _,
112
+ ref: g,
113
113
  ...lt(q, ["error"]),
114
114
  style: D,
115
115
  className: G,
116
- onMouseLeave: R,
117
- children: /* @__PURE__ */ o("div", { className: `${r}-inner`, children: Array.apply(null, Array(C ? 5 : F)).map(
116
+ onMouseLeave: A,
117
+ children: /* @__PURE__ */ o("div", { className: `${r}-inner`, children: Array.apply(null, Array(w ? 5 : I)).map(
118
118
  (t, s) => H(s)
119
119
  ) })
120
120
  }
121
121
  );
122
122
  }
123
- const mt = g.forwardRef(nt);
123
+ const mt = _.forwardRef(nt);
124
124
  mt.displayName = "Rate";
125
125
  export {
126
126
  mt as default
@@ -1,42 +1,42 @@
1
- import { jsx as e, jsxs as O } from "react/jsx-runtime";
2
- import F from "@unicom-cloud/icons/IconUiCaretDown";
3
- import $ from "@unicom-cloud/icons/IconUiCaretLeft";
4
- import h from "@unicom-cloud/icons/IconUiCaretRight";
5
- import H from "@unicom-cloud/icons/IconUiCaretUp";
6
- import L from "@unicom-cloud/icons/IconUiDragDot";
7
- import M from "@unicom-cloud/icons/IconUiDragDotVertical";
1
+ import { jsx as e, jsxs as F } from "react/jsx-runtime";
2
+ import H from "@unicom-cloud/icons/IconUiCaretDown";
3
+ import h from "@unicom-cloud/icons/IconUiCaretLeft";
4
+ import z from "@unicom-cloud/icons/IconUiCaretRight";
5
+ import L from "@unicom-cloud/icons/IconUiCaretUp";
6
+ import M from "@unicom-cloud/icons/IconUiDragDot";
7
+ import P from "@unicom-cloud/icons/IconUiDragDotVertical";
8
8
  import g from "lodash/isFunction";
9
9
  import { useContext as V, useRef as q, useEffect as A } from "react";
10
- import { a as B } from "../chunk/CQvM33Vg.js";
10
+ import { a as B } from "../chunk/C9oo3EJI.js";
11
11
  import o from "@unicom-cloud/utils/class-name";
12
12
  import "../chunk/ClM74To2.js";
13
13
  import { o as G } from "../chunk/BKKEev13.js";
14
14
  import { r as J } from "../chunk/CIRG541s.js";
15
- import { isPlainObject as z } from "@unicom-cloud/utils/is";
16
- function ce(I) {
15
+ import { isPlainObject as I } from "@unicom-cloud/utils/is";
16
+ function ce(D) {
17
17
  const {
18
- className: D,
19
- direction: U,
20
- icon: b,
21
- onMouseDown: R,
18
+ className: U,
19
+ direction: b,
20
+ icon: R,
21
+ onMouseDown: T,
22
22
  onResize: a,
23
- children: u,
23
+ children: C,
24
24
  collapsible: n = {},
25
25
  resizable: l = !0,
26
26
  renderChildren: c,
27
- ...T
28
- } = I, { getPrefixCls: k, rtl: C } = V(B), r = k("resizebox-trigger"), t = U === "horizontal", y = C && !t, x = o(
27
+ ...k
28
+ } = D, { getPrefixCls: m, rtl: v } = V(B), r = m == null ? void 0 : m("resizebox-trigger"), t = b === "horizontal", y = v && !t, x = o(
29
29
  r,
30
30
  `${r}-${t ? "horizontal" : "vertical"}`,
31
31
  { [`${r}-not-resizable`]: !l },
32
- { [`${r}-rtl`]: C },
33
- D
34
- ), m = q(), v = y ? [/* @__PURE__ */ e(h, {}, "prev"), /* @__PURE__ */ e($, {}, "next")] : [/* @__PURE__ */ e($, {}, "prev"), /* @__PURE__ */ e(h, {}, "next")], i = z(n.prev) ? {
32
+ { [`${r}-rtl`]: v },
33
+ U
34
+ ), p = q(), N = y ? [/* @__PURE__ */ e(z, {}, "prev"), /* @__PURE__ */ e(h, {}, "next")] : [/* @__PURE__ */ e(h, {}, "prev"), /* @__PURE__ */ e(z, {}, "next")], i = I(n.prev) ? {
35
35
  ...n.prev,
36
- icon: n.prev.icon || (t ? /* @__PURE__ */ e(H, {}) : v[0])
37
- } : {}, s = z(n.next) ? {
36
+ icon: n.prev.icon || (t ? /* @__PURE__ */ e(L, {}) : N[0])
37
+ } : {}, s = I(n.next) ? {
38
38
  ...n.next,
39
- icon: n.next.icon || (t ? /* @__PURE__ */ e(F, {}) : v[1])
39
+ icon: n.next.icon || (t ? /* @__PURE__ */ e(H, {}) : N[1])
40
40
  } : {}, j = () => i.icon && !i.collapsed || s.collapsed ? /* @__PURE__ */ e(
41
41
  "span",
42
42
  {
@@ -51,27 +51,27 @@ function ce(I) {
51
51
  onClick: s.onClick,
52
52
  children: s.icon
53
53
  }
54
- ) : /* @__PURE__ */ e("span", { className: o(`${r}-icon-empty`) }), P = () => l ? /* @__PURE__ */ e("span", { className: `${r}-icon`, children: b || (t ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ e(M, {})) }) : /* @__PURE__ */ e("span", { className: o(`${r}-icon-empty`) }), p = j(), f = P(), d = w(), N = () => /* @__PURE__ */ O("div", { className: `${r}-icon-wrapper`, children: [
55
- p,
54
+ ) : /* @__PURE__ */ e("span", { className: o(`${r}-icon-empty`) }), E = () => l ? /* @__PURE__ */ e("span", { className: `${r}-icon`, children: R || (t ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(P, {})) }) : /* @__PURE__ */ e("span", { className: o(`${r}-icon-empty`) }), f = j(), d = E(), u = w(), $ = () => /* @__PURE__ */ F("div", { className: `${r}-icon-wrapper`, children: [
56
55
  f,
57
- d
56
+ d,
57
+ u
58
58
  ] });
59
59
  return l ? (A(() => {
60
60
  if (!g(a)) return;
61
- const E = J([m.current], a);
61
+ const O = J([p.current], a);
62
62
  return () => {
63
- E();
63
+ O();
64
64
  };
65
- }, [m.current, a]), /* @__PURE__ */ e(
65
+ }, [p.current, a]), /* @__PURE__ */ e(
66
66
  "div",
67
67
  {
68
- ref: m,
69
- ...G(T, ["style"]),
68
+ ref: p,
69
+ ...G(k, ["style"]),
70
70
  className: x,
71
- onMouseDown: R,
72
- children: g(c) ? c(p, f, d) : u || N()
71
+ onMouseDown: T,
72
+ children: g(c) ? c(f, d, u) : C || $()
73
73
  }
74
- )) : /* @__PURE__ */ e("div", { className: x, children: g(c) ? c(p, f, d) : u || N() });
74
+ )) : /* @__PURE__ */ e("div", { className: x, children: g(c) ? c(f, d, u) : C || $() });
75
75
  }
76
76
  export {
77
77
  ce as default
@@ -1,126 +1,126 @@
1
- import { jsx as $, jsxs as ie } from "react/jsx-runtime";
2
- import { forwardRef as ce, useContext as ae, useState as D, useRef as y, useImperativeHandle as fe, useEffect as ue } from "react";
3
- import { a as le } from "../chunk/CQvM33Vg.js";
4
- import { u as me } from "../chunk/B2yFlXke.js";
5
- import T from "@unicom-cloud/utils/class-name";
6
- import { on as l, off as m } from "../utils/dom.js";
1
+ import { jsx as y, jsxs as ie } from "react/jsx-runtime";
2
+ import { forwardRef as ce, useContext as ae, useState as W, useRef as T, useImperativeHandle as fe, useEffect as ue } from "react";
3
+ import { a as me } from "../chunk/C9oo3EJI.js";
4
+ import { u as le } from "../chunk/B2yFlXke.js";
5
+ import C from "@unicom-cloud/utils/class-name";
6
+ import { on as m, off as l } from "../utils/dom.js";
7
7
  import de from "./ResizeTrigger.js";
8
- const C = "horizontal", W = "vertical";
9
- function ge(n, A) {
8
+ const H = "horizontal", A = "vertical";
9
+ function ge(n, L) {
10
10
  const {
11
- style: L,
12
- className: V,
13
- component: j = "div",
14
- direction: H = "horizontal",
15
- icon: B,
11
+ style: V,
12
+ className: j,
13
+ component: B = "div",
14
+ direction: I = "horizontal",
15
+ icon: _,
16
16
  size: d = 0.5,
17
17
  min: v,
18
- max: x,
19
- panes: _,
20
- disabled: Z,
21
- trigger: k
22
- } = n, { getPrefixCls: q, rtl: I } = ae(le), s = q("resizebox-split"), g = H.includes(C), p = H.includes("reverse"), G = g && I, R = !g, J = T(
18
+ max: R,
19
+ panes: Z,
20
+ disabled: k,
21
+ trigger: q
22
+ } = n, { getPrefixCls: x, rtl: p } = ae(me), s = x == null ? void 0 : x("resizebox-split"), g = I.includes(H), E = I.includes("reverse"), G = g && p, O = !g, J = C(
23
23
  s,
24
- `${s}-${g ? C : W}`,
25
- { [`${s}-rtl`]: I },
26
- V
27
- ), [K, Q] = _, i = typeof d == "string", [c, E] = D(parseFloat(d)), [F, U] = D(0), t = y({
24
+ `${s}-${g ? H : A}`,
25
+ { [`${s}-rtl`]: p },
26
+ j
27
+ ), [K, Q] = Z, i = typeof d == "string", [c, F] = W(parseFloat(d)), [M, U] = W(0), t = T({
28
28
  startX: 0,
29
29
  startY: 0,
30
30
  startWidth: 0,
31
31
  startHeight: 0,
32
32
  startOffset: 0,
33
33
  moving: !1
34
- }), w = y(), O = y([]);
35
- fe(A, () => w.current, []);
36
- function N(e, o) {
34
+ }), w = T(), N = T([]);
35
+ fe(L, () => w.current, []);
36
+ function z(e, o) {
37
37
  return parseFloat(e) / parseFloat(o);
38
38
  }
39
- function M(e, o, r, f) {
40
- const X = typeof v == "string" ? N(parseFloat(v), e) : v || 0, Y = typeof x == "string" ? N(parseFloat(x), e) : x || 1;
41
- let z = p ? -1 : 1;
42
- z *= G ? -1 : 1;
43
- let u = i ? o + (f - r) * z : N(
44
- e * o + (f - r) * z,
39
+ function b(e, o, r, f) {
40
+ const D = typeof v == "string" ? z(parseFloat(v), e) : v || 0, P = typeof R == "string" ? z(parseFloat(R), e) : R || 1;
41
+ let $ = E ? -1 : 1;
42
+ $ *= G ? -1 : 1;
43
+ let u = i ? o + (f - r) * $ : z(
44
+ e * o + (f - r) * $,
45
45
  e
46
46
  );
47
- const re = i ? X * e : X, se = i ? Y * e : Y;
47
+ const re = i ? D * e : D, se = i ? P * e : P;
48
48
  return u = Math.max(u, re), u = Math.min(u, se), u;
49
49
  }
50
50
  function ee(e) {
51
51
  var o, r, f;
52
- (o = n.onMovingStart) == null || o.call(n), t.current.moving = !0, t.current.startX = e.pageX, t.current.startY = e.pageY, t.current.startWidth = (r = w.current) == null ? void 0 : r.offsetWidth, t.current.startHeight = (f = w.current) == null ? void 0 : f.offsetHeight, t.current.startOffset = c, l(window, "mousemove", h), l(window, "touchmove", h), l(window, "mouseup", a), l(window, "touchend", a), l(window, "contextmenu", a), document.body.style.cursor = R ? "row-resize" : "col-resize";
52
+ (o = n.onMovingStart) == null || o.call(n), t.current.moving = !0, t.current.startX = e.pageX, t.current.startY = e.pageY, t.current.startWidth = (r = w.current) == null ? void 0 : r.offsetWidth, t.current.startHeight = (f = w.current) == null ? void 0 : f.offsetHeight, t.current.startOffset = c, m(window, "mousemove", h), m(window, "touchmove", h), m(window, "mouseup", a), m(window, "touchend", a), m(window, "contextmenu", a), document.body.style.cursor = O ? "row-resize" : "col-resize";
53
53
  }
54
54
  function h(e) {
55
55
  var o;
56
56
  if (t.current.moving) {
57
- const r = g ? M(
57
+ const r = g ? b(
58
58
  t.current.startWidth,
59
59
  t.current.startOffset,
60
60
  t.current.startX,
61
61
  e.pageX
62
- ) : M(
62
+ ) : b(
63
63
  t.current.startHeight,
64
64
  t.current.startOffset,
65
65
  t.current.startY,
66
66
  e.pageY
67
67
  );
68
- E(r), (o = n.onMoving) == null || o.call(n, e, i ? `${r}px` : r);
68
+ F(r), (o = n.onMoving) == null || o.call(n, e, i ? `${r}px` : r);
69
69
  }
70
70
  }
71
71
  function a() {
72
72
  var e;
73
- t.current.moving = !1, m(window, "mousemove", h), m(window, "touchmove", h), m(window, "mouseup", a), m(window, "touchend", a), m(window, "contextmenu", a), document.body.style.cursor = "default", (e = n.onMovingEnd) == null || e.call(n);
73
+ t.current.moving = !1, l(window, "mousemove", h), l(window, "touchmove", h), l(window, "mouseup", a), l(window, "touchend", a), l(window, "contextmenu", a), document.body.style.cursor = "default", (e = n.onMovingEnd) == null || e.call(n);
74
74
  }
75
75
  function te(e) {
76
- const { contentRect: o } = e[0], r = o[R ? "height" : "width"];
76
+ const { contentRect: o } = e[0], r = o[O ? "height" : "width"];
77
77
  U(r);
78
78
  }
79
79
  function ne() {
80
80
  const e = i ? "px" : "%";
81
- return c ? `calc(${i ? c : c * 100}${e} - ${F / 2}px)` : `0${e}`;
81
+ return c ? `calc(${i ? c : c * 100}${e} - ${M / 2}px)` : `0${e}`;
82
82
  }
83
83
  ue(() => {
84
84
  var e;
85
- (e = n.onPaneResize) == null || e.call(n, O.current);
86
- }, [c, F]), me(() => {
85
+ (e = n.onPaneResize) == null || e.call(n, N.current);
86
+ }, [c, M]), le(() => {
87
87
  const e = parseFloat(d);
88
- c !== e && E(e);
88
+ c !== e && F(e);
89
89
  }, [d]);
90
- const oe = j, b = /* @__PURE__ */ $(
90
+ const oe = B, S = /* @__PURE__ */ y(
91
91
  "div",
92
92
  {
93
- className: T(`${s}-pane`, "first-pane"),
93
+ className: C(`${s}-pane`, "first-pane"),
94
94
  style: { flexBasis: ne() },
95
95
  ref: (e) => {
96
- O.current[0] = e;
96
+ N.current[0] = e;
97
97
  },
98
98
  children: K
99
99
  }
100
- ), P = /* @__PURE__ */ $(
100
+ ), X = /* @__PURE__ */ y(
101
101
  "div",
102
102
  {
103
- className: T(`${s}-pane`, "second-pane"),
103
+ className: C(`${s}-pane`, "second-pane"),
104
104
  ref: (e) => {
105
- O.current[1] = e;
105
+ N.current[1] = e;
106
106
  },
107
107
  children: Q
108
108
  }
109
- ), S = p ? [P, b] : [b, P];
110
- return /* @__PURE__ */ ie(oe, { style: L, className: J, ref: w, children: [
111
- S[0],
112
- !Z && /* @__PURE__ */ $(
109
+ ), Y = E ? [X, S] : [S, X];
110
+ return /* @__PURE__ */ ie(oe, { style: V, className: J, ref: w, children: [
111
+ Y[0],
112
+ !k && /* @__PURE__ */ y(
113
113
  de,
114
114
  {
115
115
  className: `${s}-trigger`,
116
- direction: R ? C : W,
117
- icon: B,
116
+ direction: O ? H : A,
117
+ icon: _,
118
118
  onMouseDown: ee,
119
119
  onResize: te,
120
- children: k
120
+ children: q
121
121
  }
122
122
  ),
123
- S[1]
123
+ Y[1]
124
124
  ] });
125
125
  }
126
126
  const we = ce(ge);