@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/slider/index.js CHANGED
@@ -1,47 +1,47 @@
1
1
  import { jsx as R, jsxs as Ve } from "react/jsx-runtime";
2
- import { times as Ce, plus as Z, divide as ze } from "../utils/math.js";
2
+ import { times as Ce, plus as Z, divide as ze } from "@unicom-cloud/utils/math";
3
3
  import _ from "lodash/isArray";
4
4
  import ee from "lodash/isFunction";
5
5
  import te from "lodash/isPlainObject";
6
- import Ge, { useMemo as ne, useCallback as T, forwardRef as He, useContext as Qe, useRef as B } from "react";
7
- import { a as Ze } from "../chunk/CNcLypMY.js";
6
+ import Ge, { useMemo as ne, useCallback as T, forwardRef as He, useContext as Qe, useRef as $ } from "react";
7
+ import { a as Ze } from "../chunk/CQvM33Vg.js";
8
8
  import { u as _e } from "../chunk/BFTV6myl.js";
9
- import { u as et } from "../chunk/DeV0v__J.js";
9
+ import { u as et } from "../chunk/CXPOj2uy.js";
10
10
  import { u as tt } from "../chunk/a3hR6zLw.js";
11
- import { p as ve } from "../chunk/CUFsOxJ2.js";
12
- import { on as we, off as be } from "../utils/dom.js";
11
+ import ve from "@unicom-cloud/utils/class-name";
12
+ import { on as be, off as we } from "../utils/dom.js";
13
13
  import { o as nt } from "../chunk/BKKEev13.js";
14
- import ot from "./Button.js";
15
- import rt from "./Dot.js";
14
+ import rt from "./Button.js";
15
+ import ot from "./Dot.js";
16
16
  import st from "./Input.js";
17
17
  import it from "./Mark.js";
18
18
  import at from "./Tick.js";
19
19
  import U from "lodash/isNumber";
20
20
  import { rateToFloat as lt, getPrecision as ut, needSort as ct, sortNumberArray as ke, getIntervalOffset as Q, formatPercent as F, findNearestIndex as ft } from "./util.js";
21
- import { S as mt } from "../chunk/C0pRaDCf.js";
21
+ import { isEmptyObject as mt } from "@unicom-cloud/utils/is";
22
22
  import gt from "lodash/isUndefined";
23
23
  function dt(m) {
24
24
  if (m.length < 2)
25
25
  return [];
26
26
  const y = [];
27
27
  for (let f = 1; f < m.length; f++) {
28
- const g = m[f - 1], w = m[f];
29
- y.push([g, w]);
28
+ const g = m[f - 1], b = m[f];
29
+ y.push([g, b]);
30
30
  }
31
31
  return y;
32
32
  }
33
33
  function pt(m) {
34
- const { marks: y = {}, getIntervalConfig: f, max: g, min: w } = m, { markIntervals: d, markList: I } = ne(() => {
35
- const x = Object.keys(y).filter((s) => U(+s) && +s >= w && +s <= g).sort((s, e) => +s > +e ? 1 : -1), p = x.map((s) => ({ key: s, content: y[s] }));
34
+ const { marks: y = {}, getIntervalConfig: f, max: g, min: b } = m, { markIntervals: d, markList: I } = ne(() => {
35
+ const x = Object.keys(y).filter((s) => U(+s) && +s >= b && +s <= g).sort((s, e) => +s > +e ? 1 : -1), p = x.map((s) => ({ key: s, content: y[s] }));
36
36
  let v = x.map((s) => +s);
37
- return v.length === 0 ? v = [w, g] : (v[0] > w && (v.unshift(w), p.unshift({ key: `${w}`, content: "" })), v.slice(-1)[0] < g && (v.push(g), p.push({ key: `${g}`, content: "" }))), { markIntervals: dt(v), markList: p };
38
- }, [y, w, g]);
37
+ return v.length === 0 ? v = [b, g] : (v[0] > b && (v.unshift(b), p.unshift({ key: `${b}`, content: "" })), v.slice(-1)[0] < g && (v.push(g), p.push({ key: `${g}`, content: "" }))), { markIntervals: dt(v), markList: p };
38
+ }, [y, b, g]);
39
39
  return {
40
40
  intervalConfigs: ne(() => {
41
41
  if (!ee(f))
42
42
  return [
43
43
  {
44
- begin: w,
44
+ begin: b,
45
45
  end: g,
46
46
  step: m.step,
47
47
  beginOffset: 0,
@@ -50,27 +50,27 @@ function pt(m) {
50
50
  }
51
51
  ];
52
52
  const x = ([e, l], i) => {
53
- const a = { step: m.step, width: 0 }, c = f([e, l], i) || {}, r = c.step, h = lt(c.width);
54
- return U(r) && r && (a.step = r), U(h) && h && (a.width = h), a;
53
+ const a = { step: m.step, width: 0 }, c = f([e, l], i) || {}, o = c.step, h = lt(c.width);
54
+ return U(o) && o && (a.step = o), U(h) && h && (a.width = h), a;
55
55
  };
56
- let p = 1, v = g - w;
57
- const b = d.map(([e, l], i) => {
56
+ let p = 1, v = g - b;
57
+ const w = d.map(([e, l], i) => {
58
58
  const a = x([e, l], i);
59
59
  let c = a.width;
60
60
  if (c) {
61
61
  c = Math.min(p, c);
62
- const r = l - e;
63
- v -= r, p -= c;
62
+ const o = l - e;
63
+ v -= o, p -= c;
64
64
  }
65
65
  return { width: c, step: a.step };
66
66
  });
67
- if (b.every(({ width: e }) => e) && p) {
68
- const e = b[d.length - 1];
67
+ if (w.every(({ width: e }) => e) && p) {
68
+ const e = w[d.length - 1];
69
69
  e.width += p;
70
70
  }
71
71
  const s = [];
72
72
  return d.forEach(([e, l], i) => {
73
- const { step: a, width: c } = b[i], r = {
73
+ const { step: a, width: c } = w[i], o = {
74
74
  begin: e,
75
75
  end: l,
76
76
  step: a,
@@ -78,23 +78,23 @@ function pt(m) {
78
78
  endOffset: 0,
79
79
  width: c
80
80
  };
81
- r.width || (r.width = p * ((l - e) / v));
81
+ o.width || (o.width = p * ((l - e) / v));
82
82
  const h = s.length - 1;
83
- s[h] && (r.beginOffset = s[h].endOffset), r.endOffset = Math.min(1, r.beginOffset + r.width), s.push(r);
83
+ s[h] && (o.beginOffset = s[h].endOffset), o.endOffset = Math.min(1, o.beginOffset + o.width), s.push(o);
84
84
  }), s;
85
- }, [f, d, g, w, m.step]),
85
+ }, [f, d, g, b, m.step]),
86
86
  markList: I
87
87
  };
88
88
  }
89
89
  function ht(m) {
90
- const { isRange: y, min: f, max: g, onlyMarkValue: w, intervalConfigs: d, marks: I } = m, $ = T(
90
+ const { isRange: y, min: f, max: g, onlyMarkValue: b, intervalConfigs: d, marks: I } = m, B = T(
91
91
  (e) => {
92
92
  const l = d.find((i) => e >= i.begin && e <= i.end);
93
93
  if (l) {
94
- const { begin: i, step: a } = l, c = e - i, r = Math.round(c / a), h = ut(a), j = parseFloat(
95
- Ce(a, r).toFixed(h)
94
+ const { begin: i, step: a } = l, c = e - i, o = Math.round(c / a), h = ut(a), A = parseFloat(
95
+ Ce(a, o).toFixed(h)
96
96
  );
97
- return Z(i, j);
97
+ return Z(i, A);
98
98
  }
99
99
  return e;
100
100
  },
@@ -110,12 +110,12 @@ function ht(m) {
110
110
  },
111
111
  [I, f]
112
112
  ), p = T(
113
- (e) => gt(e) || e <= f ? f : e >= g ? g : w ? x(e) : $(e),
114
- [x, $, g, f, w]
113
+ (e) => gt(e) || e <= f ? f : e >= g ? g : b ? x(e) : B(e),
114
+ [x, B, g, f, b]
115
115
  ), v = T(
116
116
  (e) => p(e) === e,
117
117
  [p]
118
- ), b = T(
118
+ ), w = T(
119
119
  (e) => {
120
120
  let [l, i] = [f, f];
121
121
  if (y) {
@@ -131,15 +131,15 @@ function ht(m) {
131
131
  const i = l === "subtraction" ? -1 : 1;
132
132
  let a = Z(e, i * m.step);
133
133
  if (m.onlyMarkValue) {
134
- const c = Object.keys(m.marks), r = c.findIndex((h) => Number(h) === e);
135
- a = c[r + i] !== void 0 ? Number(c[r + i]) : e;
134
+ const c = Object.keys(m.marks), o = c.findIndex((h) => Number(h) === e);
135
+ a = c[o + i] !== void 0 ? Number(c[o + i]) : e;
136
136
  }
137
137
  return a;
138
138
  },
139
139
  [m.marks, m.onlyMarkValue, m.step]
140
140
  );
141
141
  return {
142
- getLegalRangeValue: b,
142
+ getLegalRangeValue: w,
143
143
  getLegalValue: p,
144
144
  isLegalValue: v,
145
145
  getNextMarkValue: s
@@ -151,71 +151,71 @@ const Vt = {
151
151
  step: 1
152
152
  };
153
153
  function vt(m, y) {
154
- const { getPrefixCls: f, componentConfig: g, rtl: w } = Qe(Ze), d = _e(
154
+ const { getPrefixCls: f, componentConfig: g, rtl: b } = Qe(Ze), d = _e(
155
155
  m,
156
156
  Vt,
157
157
  g == null ? void 0 : g.Slider
158
158
  ), {
159
159
  className: I,
160
- style: $,
160
+ style: B,
161
161
  tooltipVisible: x,
162
162
  tooltipPosition: p,
163
163
  disabled: v,
164
- min: b,
164
+ min: w,
165
165
  max: s,
166
166
  range: e,
167
167
  step: l,
168
168
  showTicks: i,
169
169
  marks: a,
170
170
  onlyMarkValue: c,
171
- vertical: r,
171
+ vertical: o,
172
172
  showInput: h,
173
- reverse: j,
173
+ reverse: A,
174
174
  getIntervalConfig: ye,
175
175
  ...Ie
176
- } = d, O = !!e, xe = te(e) ? { ...e } : { draggableBar: !1 }, M = w ? !j : j, { intervalConfigs: P, markList: oe } = pt({
177
- min: b,
176
+ } = d, O = !!e, xe = te(e) ? { ...e } : { draggableBar: !1 }, M = b ? !A : A, { intervalConfigs: P, markList: re } = pt({
177
+ min: w,
178
178
  max: s,
179
179
  step: l,
180
180
  marks: a,
181
181
  getIntervalConfig: ye
182
182
  }), { getLegalValue: E, getLegalRangeValue: W, isLegalValue: Oe, getNextMarkValue: Pe } = ht({
183
183
  isRange: O,
184
- min: b,
184
+ min: w,
185
185
  max: s,
186
186
  onlyMarkValue: c,
187
187
  step: l,
188
188
  intervalConfigs: P,
189
189
  marks: a
190
190
  }), [K, Ne] = et(
191
- O ? [b, b] : b,
191
+ O ? [w, w] : w,
192
192
  {
193
193
  defaultValue: d.defaultValue,
194
194
  value: d.value
195
195
  }
196
196
  );
197
197
  let u = W(K);
198
- const X = B(u), Y = B(ct(u));
198
+ const X = $(u), Y = $(ct(u));
199
199
  tt(() => {
200
200
  X.current = W(K);
201
201
  }, [K, W]), Y.current && (u = ke(u));
202
- const J = u[u.length - 1], q = u[0], z = h && !c && (!O || u.length < 3), Re = ne(() => z && (_(h) || te(h)) ? _(h) ? [...h] : [{ ...h }, { ...h }] : [], [z, h]), k = f("slider"), re = B(null), se = B({
202
+ const J = u[u.length - 1], q = u[0], z = h && !c && (!O || u.length < 3), Re = ne(() => z && (_(h) || te(h)) ? _(h) ? [...h] : [{ ...h }, { ...h }] : [], [z, h]), k = f("slider"), oe = $(null), se = $({
203
203
  left: 0,
204
204
  height: 0,
205
205
  top: 0,
206
206
  width: 0
207
- }), ie = B(!1), ae = B(0);
207
+ }), ie = $(!1), ae = $(0);
208
208
  function le(n) {
209
209
  const t = ke(n);
210
210
  return O ? t : t[t.length - 1];
211
211
  }
212
212
  function Le(n) {
213
- const t = n.map((o) => E(o));
213
+ const t = n.map((r) => E(r));
214
214
  return X.current = t, t;
215
215
  }
216
216
  function L(n, t) {
217
- const o = Le(n), V = le(o);
218
- Ne(V), t === "inputValueChange" ? Y.current = o.some((C, S) => C > o[S]) : Y.current = !1, ee(d.onChange) && d.onChange(V);
217
+ const r = Le(n), V = le(r);
218
+ Ne(V), t === "inputValueChange" ? Y.current = r.some((C, S) => C > r[S]) : Y.current = !1, ee(d.onChange) && d.onChange(V);
219
219
  }
220
220
  function D() {
221
221
  if (ee(d.onAfterChange)) {
@@ -224,30 +224,30 @@ function vt(m, y) {
224
224
  }
225
225
  }
226
226
  function Se(n) {
227
- let [t, o] = [u[0], u[u.length - 1]];
228
- return t > o && ([t, o] = [o, t]), O ? n >= t && n <= o : n <= o;
227
+ let [t, r] = [u[0], u[u.length - 1]];
228
+ return t > r && ([t, r] = [r, t]), O ? n >= t && n <= r : n <= r;
229
229
  }
230
230
  function G(n, t) {
231
- const { left: o, top: V, width: C, height: S } = se.current;
232
- let N = C, me = M ? o + C - n : n - o;
233
- if (r && (N = S, me = M ? t - V : V + S - t), N <= 0)
231
+ const { left: r, top: V, width: C, height: S } = se.current;
232
+ let N = C, me = M ? r + C - n : n - r;
233
+ if (o && (N = S, me = M ? t - V : V + S - t), N <= 0)
234
234
  return 0;
235
- let A = Math.max(ze(me, N), 0);
236
- A = Math.min(1, A);
237
- const Ue = P.find((he) => A >= he.beginOffset && A <= he.endOffset), {
235
+ let j = Math.max(ze(me, N), 0);
236
+ j = Math.min(1, j);
237
+ const Ue = P.find((he) => j >= he.beginOffset && j <= he.endOffset), {
238
238
  begin: ge,
239
239
  beginOffset: de,
240
240
  step: pe,
241
241
  endOffset: We,
242
242
  end: Ke
243
- } = Ue, Xe = A - de, Ye = We - de, Je = Xe / Ye * (Ke - ge), qe = Math.round(Je / pe);
243
+ } = Ue, Xe = j - de, Ye = We - de, Je = Xe / Ye * (Ke - ge), qe = Math.round(Je / pe);
244
244
  return Z(ge, Ce(qe, pe));
245
245
  }
246
246
  function Te(n) {
247
- let [t, o] = n;
248
- t > o && ([t, o] = [o, t]);
249
- const V = F(t), C = F(1 - o);
250
- return r ? {
247
+ let [t, r] = n;
248
+ t > r && ([t, r] = [r, t]);
249
+ const V = F(t), C = F(1 - r);
250
+ return o ? {
251
251
  [M ? "top" : "bottom"]: V,
252
252
  [M ? "bottom" : "top"]: C
253
253
  } : {
@@ -255,10 +255,10 @@ function vt(m, y) {
255
255
  [M ? "left" : "right"]: C
256
256
  };
257
257
  }
258
- function Be(n) {
259
- return r ? { [M ? "top" : "bottom"]: F(n) } : { [M ? "right" : "left"]: F(n) };
258
+ function $e(n) {
259
+ return o ? { [M ? "top" : "bottom"]: F(n) } : { [M ? "right" : "left"]: F(n) };
260
260
  }
261
- function $e() {
261
+ function Be() {
262
262
  const n = {
263
263
  getTooltipContainer: d.getTooltipContainer,
264
264
  formatTooltip: d.formatTooltip
@@ -266,26 +266,26 @@ function vt(m, y) {
266
266
  return "tooltipPosition" in d && (n.tooltipPosition = p), "tooltipVisible" in d && (n.tooltipVisible = x), n;
267
267
  }
268
268
  function ue() {
269
- se.current = re.current.getBoundingClientRect();
269
+ se.current = oe.current.getBoundingClientRect();
270
270
  }
271
- function Ae(n) {
271
+ function je(n) {
272
272
  ue();
273
273
  const t = G(n.clientX, n.clientY);
274
- xe.draggableBar && Se(t) ? (ae.current = E(t), we(window, "mousemove", ce), we(window, "mouseup", fe)) : H(t);
274
+ xe.draggableBar && Se(t) ? (ae.current = E(t), be(window, "mousemove", ce), be(window, "mouseup", fe)) : H(t);
275
275
  }
276
276
  function H(n) {
277
277
  if (v)
278
278
  return;
279
- const t = E(n), [o, V] = ft(t, u), C = u[o], S = u[V], N = u.slice(0);
280
- O && S - t > t - C ? (N[o] = t, L(N, "jumpToClick")) : (N[V] = t, L(N, "jumpToClick")), D();
279
+ const t = E(n), [r, V] = ft(t, u), C = u[r], S = u[V], N = u.slice(0);
280
+ O && S - t > t - C ? (N[r] = t, L(N, "jumpToClick")) : (N[V] = t, L(N, "jumpToClick")), D();
281
281
  }
282
- function je(n) {
282
+ function Ae(n) {
283
283
  L(n, "inputValueChange"), D();
284
284
  }
285
- function Ee(n, t, o) {
285
+ function Ee(n, t, r) {
286
286
  ie.current = !0;
287
287
  const V = u.slice(0);
288
- V[o] = G(n, t), L(V, "mousemove");
288
+ V[r] = G(n, t), L(V, "mousemove");
289
289
  }
290
290
  function De() {
291
291
  ie.current = !1, D();
@@ -293,15 +293,15 @@ function vt(m, y) {
293
293
  function Fe(n, t) {
294
294
  if (v)
295
295
  return;
296
- const o = u.slice(0);
297
- o[t] = Pe(u[t], n), L(o);
296
+ const r = u.slice(0);
297
+ r[t] = Pe(u[t], n), L(r);
298
298
  }
299
299
  function ce(n) {
300
- const o = E(G(n.clientX, n.clientY)) - ae.current, V = u.map((C) => C + o);
300
+ const r = E(G(n.clientX, n.clientY)) - ae.current, V = u.map((C) => C + r);
301
301
  V.every((C) => Oe(C)) && L(V, "mousemove");
302
302
  }
303
303
  function fe() {
304
- be(window, "mousemove", ce), be(window, "mouseup", fe), D();
304
+ we(window, "mousemove", ce), we(window, "mouseup", fe), D();
305
305
  }
306
306
  return /* @__PURE__ */ R(
307
307
  "div",
@@ -317,25 +317,25 @@ function vt(m, y) {
317
317
  className: ve(
318
318
  k,
319
319
  {
320
- [`${k}-vertical`]: r,
320
+ [`${k}-vertical`]: o,
321
321
  [`${k}-with-marks`]: a,
322
322
  [`${k}-reverse`]: M,
323
- [`${k}-rtl`]: w
323
+ [`${k}-rtl`]: b
324
324
  },
325
325
  I
326
326
  ),
327
- style: $,
327
+ style: B,
328
328
  ref: y,
329
329
  children: /* @__PURE__ */ Ve("div", { className: `${k}-wrapper`, children: [
330
330
  /* @__PURE__ */ Ve(
331
331
  "div",
332
332
  {
333
- ref: re,
333
+ ref: oe,
334
334
  className: ve(`${k}-road`, {
335
335
  [`${k}-road-disabled`]: v,
336
- [`${k}-road-vertical`]: r
336
+ [`${k}-road-vertical`]: o
337
337
  }),
338
- onMouseDown: Ae,
338
+ onMouseDown: je,
339
339
  children: [
340
340
  /* @__PURE__ */ R(
341
341
  "div",
@@ -351,21 +351,21 @@ function vt(m, y) {
351
351
  at,
352
352
  {
353
353
  intervalConfigs: P,
354
- min: b,
354
+ min: w,
355
355
  max: s,
356
356
  valueRange: [q, J],
357
357
  prefixCls: k,
358
- vertical: r,
358
+ vertical: o,
359
359
  reverse: M
360
360
  }
361
361
  ),
362
362
  /* @__PURE__ */ R(
363
- rt,
363
+ ot,
364
364
  {
365
- data: oe,
365
+ data: re,
366
366
  intervalConfigs: P,
367
367
  valueRange: [q, J],
368
- vertical: r,
368
+ vertical: o,
369
369
  prefixCls: k,
370
370
  reverse: M,
371
371
  onMouseDown: H
@@ -374,29 +374,29 @@ function vt(m, y) {
374
374
  /* @__PURE__ */ R(
375
375
  it,
376
376
  {
377
- data: oe,
377
+ data: re,
378
378
  intervalConfigs: P,
379
- vertical: r,
379
+ vertical: o,
380
380
  prefixCls: k,
381
381
  reverse: M,
382
382
  onMouseDown: H
383
383
  }
384
384
  ),
385
385
  u.map((n, t) => !O && t !== u.length - 1 ? null : /* @__PURE__ */ R(
386
- ot,
386
+ rt,
387
387
  {
388
- style: Be(Q(n, P)),
388
+ style: $e(Q(n, P)),
389
389
  disabled: v,
390
390
  prefixCls: k,
391
391
  value: n,
392
392
  maxValue: s,
393
- minValue: b,
394
- vertical: r,
395
- ...$e(),
393
+ minValue: w,
394
+ vertical: o,
395
+ ...Be(),
396
396
  onMoveBegin: ue,
397
- onMoving: (o, V) => Ee(o, V, t),
397
+ onMoving: (r, V) => Ee(r, V, t),
398
398
  onMoveEnd: De,
399
- onArrowEvent: (o) => Fe(o, t)
399
+ onArrowEvent: (r) => Fe(r, t)
400
400
  },
401
401
  t
402
402
  ))
@@ -406,14 +406,14 @@ function vt(m, y) {
406
406
  z && /* @__PURE__ */ R(
407
407
  st,
408
408
  {
409
- min: b,
409
+ min: w,
410
410
  max: s,
411
411
  step: l,
412
412
  value: u,
413
413
  range: O,
414
414
  disabled: v,
415
415
  prefixCls: k,
416
- onChange: je,
416
+ onChange: Ae,
417
417
  extra: Re
418
418
  }
419
419
  )
package/slider/util.js CHANGED
@@ -1,4 +1,4 @@
1
- import { minus as s, times as d, plus as m, divide as l } from "../utils/math.js";
1
+ import { minus as i, times as d, plus as m, divide as l } from "@unicom-cloud/utils/math";
2
2
  function I(t) {
3
3
  const n = `${t}`.split(".")[1];
4
4
  return n && n.length || 0;
@@ -10,7 +10,7 @@ function x(t, n) {
10
10
  const e = Number(t);
11
11
  if (n && !isNaN(e)) {
12
12
  const [r, o] = n;
13
- return l(s(e, r), s(o, r));
13
+ return l(i(e, r), i(o, r));
14
14
  }
15
15
  return 0;
16
16
  }
@@ -31,7 +31,7 @@ function h(t, n) {
31
31
  (r) => t >= r.begin && t <= r.end
32
32
  );
33
33
  if (e) {
34
- const { beginOffset: r, begin: o, end: i, endOffset: f } = e, u = x(t, [o, i]), c = s(f, r), a = d(u, c);
34
+ const { beginOffset: r, begin: o, end: s, endOffset: f } = e, c = x(t, [o, s]), u = i(f, r), a = d(c, u);
35
35
  return m(r, a);
36
36
  }
37
37
  }
package/space/index.js CHANGED
@@ -2,16 +2,16 @@ import { jsx as a, jsxs as A } from "react/jsx-runtime";
2
2
  import L from "lodash/isArray";
3
3
  import M from "lodash/isNumber";
4
4
  import P, { forwardRef as b, useContext as j } from "react";
5
- import { a as k } from "../chunk/CNcLypMY.js";
5
+ import { a as k } from "../chunk/CQvM33Vg.js";
6
6
  import { u as D } from "../chunk/BFTV6myl.js";
7
- import { p as F } from "../chunk/CUFsOxJ2.js";
7
+ import F from "@unicom-cloud/utils/class-name";
8
8
  import H from "./toArray.js";
9
9
  const O = {
10
10
  size: "small",
11
11
  direction: "horizontal"
12
12
  };
13
13
  function V(c, m) {
14
- const { getPrefixCls: v, componentConfig: l, rtl: d } = j(k), N = D(
14
+ const { getPrefixCls: N, componentConfig: l, rtl: d } = j(k), v = D(
15
15
  c,
16
16
  O,
17
17
  l == null ? void 0 : l.Space
@@ -22,20 +22,20 @@ function V(c, m) {
22
22
  size: i,
23
23
  direction: s,
24
24
  align: w,
25
- wrap: p,
26
- split: u,
25
+ wrap: u,
26
+ split: f,
27
27
  ...B
28
- } = N, e = v("space"), $ = w || (s === "horizontal" ? "center" : ""), R = F(
28
+ } = v, e = N("space"), $ = w || (s === "horizontal" ? "center" : ""), R = F(
29
29
  e,
30
30
  {
31
31
  [`${e}-${s}`]: s,
32
32
  [`${e}-align-${$}`]: $,
33
- [`${e}-wrap`]: p,
33
+ [`${e}-wrap`]: u,
34
34
  [`${e}-rtl`]: d
35
35
  },
36
36
  S
37
37
  );
38
- function f(r) {
38
+ function p(r) {
39
39
  if (M(r))
40
40
  return r;
41
41
  switch (r) {
@@ -55,8 +55,8 @@ function V(c, m) {
55
55
  function z(r) {
56
56
  const n = y.length === r + 1, o = d ? "marginLeft" : "marginRight";
57
57
  if (typeof i == "string" || typeof i == "number") {
58
- const t = f(i);
59
- return p ? n ? { marginBottom: t } : {
58
+ const t = p(i);
59
+ return u ? n ? { marginBottom: t } : {
60
60
  [`${o}`]: t,
61
61
  marginBottom: t
62
62
  } : n ? {} : {
@@ -64,17 +64,17 @@ function V(c, m) {
64
64
  };
65
65
  }
66
66
  if (L(i)) {
67
- const t = f(i[0]), g = f(i[1]);
68
- return p ? n ? { marginBottom: g } : {
67
+ const t = p(i[0]), g = p(i[1]);
68
+ return u ? n ? { marginBottom: g } : {
69
69
  [`${o}`]: t,
70
70
  marginBottom: g
71
71
  } : s === "vertical" ? { marginBottom: g } : { [`${o}`]: t };
72
72
  }
73
73
  }
74
74
  return /* @__PURE__ */ a("div", { ref: m, className: R, style: x, ...B, children: y.map((r, n) => {
75
- const o = (r == null ? void 0 : r.key) || n, t = u != null && n > 0;
75
+ const o = (r == null ? void 0 : r.key) || n, t = f != null && n > 0;
76
76
  return /* @__PURE__ */ A(P.Fragment, { children: [
77
- t && /* @__PURE__ */ a("div", { className: `${e}-item-split`, children: u }),
77
+ t && /* @__PURE__ */ a("div", { className: `${e}-item-split`, children: f }),
78
78
  /* @__PURE__ */ a("div", { className: `${e}-item`, style: z(n), children: r })
79
79
  ] }, o);
80
80
  }) });