@unicom-cloud/ui 0.8.66 → 0.8.68

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 (708) hide show
  1. package/Affix.js +15 -124
  2. package/Alert.js +13 -110
  3. package/Anchor.js +2 -2
  4. package/AutoComplete.js +15 -146
  5. package/Avatar.js +4 -154
  6. package/BackTop.js +14 -83
  7. package/Badge.js +12 -176
  8. package/Breadcrumb.js +12 -138
  9. package/Button.js +12 -149
  10. package/Calendar.js +12 -569
  11. package/Card.js +10 -136
  12. package/Carousel.js +13 -380
  13. package/Cascader.js +2 -2
  14. package/Checkbox.js +2 -2
  15. package/Collapse.js +2 -2
  16. package/ColorPicker.js +14 -582
  17. package/Comment.js +10 -71
  18. package/ConfigProvider.js +5 -6
  19. package/Copy.js +12 -60
  20. package/DatePicker.js +11 -2042
  21. package/Descriptions.js +11 -176
  22. package/Divider.js +7 -38
  23. package/Draggable.js +7 -89
  24. package/Drawer.js +2 -2
  25. package/Dropdown.js +15 -199
  26. package/Empty.js +3 -3
  27. package/Form.js +16 -1416
  28. package/Grid.js +9 -252
  29. package/Icon.js +7 -55
  30. package/IconHover.js +2 -2
  31. package/Image.js +6 -5
  32. package/Input.js +11 -10
  33. package/InputNumber.js +9 -7
  34. package/InputTag.js +2 -2
  35. package/Layout.js +16 -56
  36. package/Link.js +9 -60
  37. package/List.js +18 -312
  38. package/Loading.js +4 -59
  39. package/Mentions.js +12 -163
  40. package/Menu.js +8 -7
  41. package/Message.js +9 -7
  42. package/Modal.js +2 -2
  43. package/Notice.js +13 -3
  44. package/Notification.js +10 -7
  45. package/OverflowEllipsis.js +8 -96
  46. package/PageHeader.js +13 -113
  47. package/Pagination.js +2 -2
  48. package/Picker.js +4 -3
  49. package/Popconfirm.js +13 -128
  50. package/Popover.js +10 -76
  51. package/Portal.js +5 -33
  52. package/Progress.js +11 -363
  53. package/Radio.js +5 -6
  54. package/Rate.js +14 -125
  55. package/ResizeBox.js +16 -555
  56. package/Result.js +14 -1434
  57. package/Select.js +4 -3
  58. package/SelectView.js +9 -406
  59. package/Skeleton.js +11 -94
  60. package/Slider.js +21 -773
  61. package/Space.js +11 -94
  62. package/SpeechSynthesis.js +48 -57
  63. package/Spin.js +11 -94
  64. package/Statistic.js +15 -192
  65. package/Steps.js +11 -148
  66. package/SuspenseFallbackTest.js +3 -10
  67. package/Switch.js +13 -114
  68. package/Table.js +16 -2032
  69. package/Tabs.js +4 -4
  70. package/Tag.js +13 -134
  71. package/TimePicker.js +7 -274
  72. package/Timeline.js +4 -4
  73. package/Tooltip.js +12 -136
  74. package/Transfer.js +14 -449
  75. package/Tree.js +4 -2
  76. package/TreeSelect.js +3 -4
  77. package/Trigger.js +21 -882
  78. package/Typography.js +10 -6
  79. package/Upload.js +4 -4
  80. package/VerificationCode.js +2 -2
  81. package/VirtualList.js +2 -2
  82. package/Watermark.js +2 -2
  83. package/affix/index.js +126 -0
  84. package/alert/index.js +112 -0
  85. package/alert/interface.js +1 -0
  86. package/anchor/Anchor.js +198 -0
  87. package/anchor/Link.js +52 -0
  88. package/anchor/context.js +14 -0
  89. package/anchor/index.js +4 -0
  90. package/anchor/interface.js +1 -0
  91. package/anchor/util.js +50 -0
  92. package/auto-complete/index.js +149 -0
  93. package/auto-complete/interface.js +1 -0
  94. package/avatar/Avatar.js +83 -0
  95. package/avatar/Group.js +82 -0
  96. package/avatar/context.js +5 -0
  97. package/avatar/index.js +7 -0
  98. package/avatar/interface.js +1 -0
  99. package/back-top/index.js +85 -0
  100. package/back-top/interface.js +1 -0
  101. package/badge/Count.js +35 -0
  102. package/badge/index.js +151 -0
  103. package/badge/interface.js +1 -0
  104. package/breadcrumb/Item.js +67 -0
  105. package/breadcrumb/index.js +81 -0
  106. package/breadcrumb/interface.js +1 -0
  107. package/button/Group.js +13 -0
  108. package/button/index.js +146 -0
  109. package/button/interface.js +1 -0
  110. package/calendar/Month.js +12 -0
  111. package/calendar/WeekList.js +24 -0
  112. package/calendar/Year.js +74 -0
  113. package/calendar/index.js +320 -0
  114. package/calendar/interface.js +1 -0
  115. package/card/Grid.js +25 -0
  116. package/card/Meta.js +30 -0
  117. package/card/index.js +99 -0
  118. package/card/interface.js +1 -0
  119. package/carousel/Arrow.js +55 -0
  120. package/carousel/Indicator.js +66 -0
  121. package/carousel/index.js +278 -0
  122. package/carousel/interface.js +1 -0
  123. package/cascader/Cascader.js +26 -0
  124. package/cascader/index.js +4 -0
  125. package/cascader/interface.js +1 -0
  126. package/cascader/util.js +14 -0
  127. package/checkbox/Checkbox.js +16 -0
  128. package/checkbox/Group.js +14 -0
  129. package/checkbox/IconCheck.js +19 -0
  130. package/checkbox/index.js +4 -0
  131. package/checkbox/interface.js +1 -0
  132. package/checkbox/useCheckbox.js +45 -0
  133. package/chunk/5_U1CBIu.js +8 -0
  134. package/chunk/{B8QV6E2b.js → AwZqeapI.js} +5 -5
  135. package/chunk/B2yFlXke.js +6 -0
  136. package/chunk/B4JiMp8I.js +764 -0
  137. package/chunk/B4YRLi8r.js +11 -0
  138. package/chunk/B5RFT17G.js +15 -0
  139. package/chunk/{BnSVm1YC.js → B6X4lnd0.js} +1 -1
  140. package/chunk/B7M-FGia.js +41 -0
  141. package/chunk/BBkdXHrJ.js +24 -0
  142. package/chunk/BDB0LByj.js +98 -0
  143. package/chunk/BFTV6myl.js +19 -0
  144. package/chunk/BJ1soa2K.js +178 -0
  145. package/chunk/BKKEev13.js +11 -0
  146. package/chunk/BKT9BFf4.js +11 -0
  147. package/chunk/BSCrLtfQ.js +10 -0
  148. package/chunk/{CPvvjMwZ.js → BSaQv6mx.js} +46 -43
  149. package/chunk/BXAeh0_V.js +16 -0
  150. package/chunk/Bfq4YEcr.js +23 -0
  151. package/chunk/Bg3uJGPu.js +10 -0
  152. package/chunk/{jhQQCFMn.js → Bi4UkwOR.js} +138 -126
  153. package/chunk/BibHFOCF.js +34 -0
  154. package/chunk/Biupwn8l.js +24 -0
  155. package/chunk/BjpUSKM3.js +629 -0
  156. package/chunk/{D_-UD4vO.js → Bl7BnD1R.js} +9 -9
  157. package/chunk/BrOW642m.js +130 -0
  158. package/chunk/BsY85n3_.js +14 -0
  159. package/chunk/C48SmsN-.js +38 -0
  160. package/chunk/C4OrxKE6.js +18 -0
  161. package/chunk/C98ks5S8.js +473 -0
  162. package/chunk/CC---6jO.js +110 -0
  163. package/chunk/{DUeHQKtx.js → CCv-5KFt.js} +78 -78
  164. package/chunk/{CZOP_ZHJ.js → CD3AUpzo.js} +24 -24
  165. package/chunk/CIRG541s.js +22 -0
  166. package/chunk/CKyu68pu.js +312 -0
  167. package/chunk/CQ_WOOmf.js +8 -0
  168. package/chunk/{CANaGbGR.js → CVYWxu00.js} +54 -53
  169. package/chunk/CYhxqVkn.js +9 -0
  170. package/chunk/CbLaCJmG.js +26 -0
  171. package/chunk/CdaT1b_F.js +20 -0
  172. package/chunk/Ce1j9KTi.js +6 -0
  173. package/chunk/CftuXmo_.js +6 -0
  174. package/chunk/CgurXnoy.js +569 -0
  175. package/chunk/Clo26EcR.js +34 -0
  176. package/chunk/ClqoGc3r.js +17 -0
  177. package/chunk/CmZzBtA4.js +16 -0
  178. package/chunk/CpGBWmuz.js +1461 -0
  179. package/chunk/CzQObzKd.js +1817 -0
  180. package/chunk/D-TPB2Do.js +56 -0
  181. package/chunk/D090jlwP.js +38 -0
  182. package/chunk/D0ZWT7db.js +5 -0
  183. package/chunk/DH7HTOV_.js +11 -0
  184. package/chunk/DKHXj8Kf.js +9 -0
  185. package/chunk/Dh7Osrvr.js +27 -0
  186. package/chunk/DonYzv30.js +14 -0
  187. package/chunk/DpoumMDw.js +50 -0
  188. package/chunk/Duezix3m.js +25 -0
  189. package/chunk/DxVvggX2.js +11 -0
  190. package/chunk/DzVH9IBy.js +1413 -0
  191. package/chunk/{CwhPMMWy.js → Ey4YJCkX.js} +7 -7
  192. package/chunk/JPPo5nY_.js +9 -0
  193. package/chunk/SSK90wgo.js +209 -0
  194. package/chunk/{CSC_V_25.js → URXCKjXr.js} +8 -8
  195. package/chunk/VSe_Wq1g.js +10 -0
  196. package/chunk/XTEsYGuF.js +17 -0
  197. package/chunk/b1e8awfs.js +31 -0
  198. package/chunk/hEWZQ8Zi.js +16 -0
  199. package/chunk/k-OUstoD.js +58 -0
  200. package/chunk/ll867Bf3.js +730 -0
  201. package/chunk/oopARUrq.js +10 -0
  202. package/chunk/tamGhTJp.js +186 -0
  203. package/chunk/{4-gvEY5y.js → uKZyjtff.js} +28 -28
  204. package/chunk/vmgkWLYf.js +843 -0
  205. package/chunk/yl4BU7Sd.js +1068 -0
  206. package/chunk/zmmqLCF4.js +20 -0
  207. package/collapse/Collapse.js +15 -0
  208. package/collapse/Item.js +11 -0
  209. package/collapse/index.js +4 -0
  210. package/collapse/interface.js +1 -0
  211. package/color-picker/ControlBar.js +63 -0
  212. package/color-picker/InputAlpha.js +22 -0
  213. package/color-picker/InputHex.js +55 -0
  214. package/color-picker/InputRgb.js +61 -0
  215. package/color-picker/Mode.js +10 -0
  216. package/color-picker/Palette.js +34 -0
  217. package/color-picker/Panel.js +268 -0
  218. package/color-picker/colors.js +37 -0
  219. package/color-picker/index.js +270 -0
  220. package/color-picker/interface.js +4 -0
  221. package/color-picker/utils.js +89 -0
  222. package/comment/index.js +73 -0
  223. package/comment/interface.js +1 -0
  224. package/config-provider/ConfigProvider.js +15 -0
  225. package/config-provider/context.js +8 -0
  226. package/config-provider/index.js +8 -0
  227. package/config-provider/interface.js +1 -0
  228. package/copy/index.js +63 -0
  229. package/copy/interface.js +1 -0
  230. package/date-picker/Picker.js +410 -0
  231. package/date-picker/PickerRange.js +24 -0
  232. package/date-picker/context.js +5 -0
  233. package/date-picker/index.js +50 -0
  234. package/date-picker/interface.js +1 -0
  235. package/date-picker/util.js +76 -0
  236. package/descriptions/index.js +178 -0
  237. package/descriptions/interface.js +1 -0
  238. package/divider/index.js +40 -0
  239. package/divider/interface.js +1 -0
  240. package/draggable/Item.js +67 -0
  241. package/draggable/index.js +32 -0
  242. package/draggable/interface.js +1 -0
  243. package/{chunk/BFipyA67.js → drawer/Drawer.js} +39 -39
  244. package/drawer/index.js +4 -0
  245. package/drawer/interface.js +1 -0
  246. package/dropdown/Button.js +11 -0
  247. package/dropdown/index.js +201 -0
  248. package/dropdown/interface.js +1 -0
  249. package/empty/index.js +9 -0
  250. package/empty/interface.js +1 -0
  251. package/form/Control.js +262 -0
  252. package/form/Form.js +160 -0
  253. package/form/FormItem.js +239 -0
  254. package/form/FormLabel.js +54 -0
  255. package/form/FormList.js +100 -0
  256. package/form/FormProvider.js +48 -0
  257. package/form/IconSymbol.js +20 -0
  258. package/form/context.js +43 -0
  259. package/form/index.js +107 -0
  260. package/form/interface.js +11 -0
  261. package/form/promisify.js +32 -0
  262. package/form/store.js +360 -0
  263. package/form/useForm.js +53 -0
  264. package/form/util.js +75 -0
  265. package/grid/Col.js +85 -0
  266. package/grid/Row.js +86 -0
  267. package/grid/context.js +9 -0
  268. package/grid/grid-item.js +75 -0
  269. package/grid/grid.js +103 -0
  270. package/grid/index.js +15 -0
  271. package/grid/interface.js +1 -0
  272. package/grid/util.js +51 -0
  273. package/hooks/index.js +51 -47
  274. package/hooks/useComputedState.js +2 -10
  275. package/hooks/useCreate.js +2 -7
  276. package/hooks/useForceUpdate.js +2 -7
  277. package/hooks/useId.js +2 -10
  278. package/hooks/useInView.js +2 -30
  279. package/hooks/useIntersectionObserver.js +2 -23
  280. package/hooks/useInterval.js +2 -17
  281. package/hooks/useIsFirstRender.js +2 -9
  282. package/hooks/useIsomorphicLayoutEffect.js +2 -5
  283. package/hooks/useKeyboardEvent.js +2 -16
  284. package/hooks/useMedia.js +2 -15
  285. package/hooks/useMergeProps.js +2 -18
  286. package/hooks/useMergeValue.js +2 -19
  287. package/hooks/useOnlineStatus.js +4 -0
  288. package/hooks/useOverflowHidden.js +2 -25
  289. package/hooks/useOverrideRef.js +2 -13
  290. package/hooks/usePersistCallback.js +2 -13
  291. package/hooks/usePrefersColorSchemeDark.js +4 -0
  292. package/hooks/usePrevious.js +2 -9
  293. package/hooks/useRefs.js +2 -9
  294. package/hooks/useResizeObserver.js +2 -15
  295. package/hooks/useStateCallback.js +2 -15
  296. package/hooks/useStateWithPromise.js +2 -24
  297. package/hooks/useUpdateEffect.js +2 -9
  298. package/hooks/useVerificationCode.js +73 -0
  299. package/hooks/useWatch.js +2 -10
  300. package/hooks/{use-watermark.js → useWatermark.js} +2 -1
  301. package/hooks/useWindowSize.js +2 -20
  302. package/icon/addFromIconFontCn.js +7 -0
  303. package/icon/index.js +57 -0
  304. package/icon-hover/index.js +7 -0
  305. package/image/Image.js +191 -0
  306. package/image/ImageFooter.js +8 -0
  307. package/image/ImagePreview.js +41 -0
  308. package/image/ImagePreviewArrow.js +46 -0
  309. package/image/ImagePreviewGroup.js +125 -0
  310. package/image/ImagePreviewToolbar.js +99 -0
  311. package/image/TriggerForToolbar.js +10 -0
  312. package/image/index.js +8 -0
  313. package/image/interface.js +1 -0
  314. package/image/previewGroupContext.js +17 -0
  315. package/index.js +604 -585
  316. package/input/Group.js +18 -0
  317. package/input/Input.js +688 -0
  318. package/input/InputElement.js +235 -0
  319. package/input/Number.js +4 -0
  320. package/input/Password.js +13 -0
  321. package/input/Search.js +14 -0
  322. package/input/Tag.js +4 -0
  323. package/input/Textarea.js +16 -0
  324. package/input/autoSizeTextAreaHeight.js +65 -0
  325. package/input/index.js +15 -0
  326. package/input/interface.js +1 -0
  327. package/input/useComposition.js +39 -0
  328. package/input-number/decimal.js +154 -0
  329. package/input-number/index.js +18 -0
  330. package/input-number/interface.js +1 -0
  331. package/input-number/useSelectionRange.js +26 -0
  332. package/input-number/util.js +57 -0
  333. package/{chunk/C6QWSzsM.js → input-tag/InputTag.js} +97 -89
  334. package/input-tag/index.js +4 -0
  335. package/input-tag/interface.js +1 -0
  336. package/layout/Content.js +13 -0
  337. package/layout/Footer.js +13 -0
  338. package/layout/Header.js +13 -0
  339. package/{chunk/CssIjN1g.js → layout/Sider.js} +12 -12
  340. package/layout/index.js +43 -0
  341. package/layout/interface.js +1 -0
  342. package/link/index.js +62 -0
  343. package/link/interface.js +1 -0
  344. package/list/Item.js +44 -0
  345. package/list/Meta.js +19 -0
  346. package/list/index.js +269 -0
  347. package/list/interface.js +1 -0
  348. package/loading/index.js +61 -0
  349. package/locale/en-US.js +4 -2
  350. package/locale/interface.js +1 -4
  351. package/locale/ja-JP.js +3 -1
  352. package/locale/tr-TR.js +1 -1
  353. package/locale/zh-CN.js +3 -1
  354. package/locale/zh-HK.js +3 -1
  355. package/locale/zh-TW.js +3 -1
  356. package/mentions/index.js +146 -0
  357. package/mentions/interface.js +1 -0
  358. package/mentions/util.js +26 -0
  359. package/menu/Indent.js +17 -0
  360. package/menu/Item.js +125 -0
  361. package/menu/ItemGroup.js +39 -0
  362. package/menu/Menu.js +26 -0
  363. package/menu/OverflowWrap.js +10 -0
  364. package/menu/context.js +5 -0
  365. package/menu/index.js +11 -0
  366. package/menu/interface.js +1 -0
  367. package/menu/util.js +80 -0
  368. package/message/index.js +14 -0
  369. package/message/interface.js +1 -0
  370. package/message/useMessage.js +7 -0
  371. package/modal/Confirm.js +13 -0
  372. package/modal/Modal.js +21 -0
  373. package/modal/config.js +25 -0
  374. package/modal/index.js +4 -0
  375. package/modal/interface.js +1 -0
  376. package/notice/index.js +24 -0
  377. package/notification/index.js +16 -0
  378. package/notification/interface.js +1 -0
  379. package/notification/useNotification.js +6 -0
  380. package/notification/withNotification.js +49 -0
  381. package/overflow-ellipsis/OverflowItem.js +35 -0
  382. package/overflow-ellipsis/index.js +74 -0
  383. package/package.json +1 -1
  384. package/page-header/index.js +115 -0
  385. package/page-header/interface.js +1 -0
  386. package/pagination/PageItem.js +119 -0
  387. package/pagination/PageJumper.js +60 -0
  388. package/pagination/PageOption.js +47 -0
  389. package/pagination/Pagination.js +245 -0
  390. package/pagination/index.js +4 -0
  391. package/pagination/interface.js +1 -0
  392. package/picker/Input.js +130 -0
  393. package/picker/InputRange.js +158 -0
  394. package/picker/index.js +6 -0
  395. package/popconfirm/index.js +130 -0
  396. package/popconfirm/interface.js +1 -0
  397. package/popover/index.js +78 -0
  398. package/popover/interface.js +1 -0
  399. package/portal/Portal.js +15 -0
  400. package/portal/index.js +17 -0
  401. package/progress/CircleProgress.js +117 -0
  402. package/progress/LineProgess.js +103 -0
  403. package/progress/StepProgress.js +74 -0
  404. package/progress/index.js +99 -0
  405. package/progress/interface.js +1 -0
  406. package/radio/Group.js +16 -0
  407. package/radio/Radio.js +15 -0
  408. package/radio/index.js +8 -0
  409. package/radio/interface.js +1 -0
  410. package/rate/index.js +127 -0
  411. package/rate/interface.js +1 -0
  412. package/resize-box/ResizeTrigger.js +78 -0
  413. package/resize-box/Split.js +130 -0
  414. package/resize-box/SplitGroup.js +202 -0
  415. package/resize-box/index.js +182 -0
  416. package/resize-box/interface.js +1 -0
  417. package/result/403.js +695 -0
  418. package/result/404.js +513 -0
  419. package/result/500.js +166 -0
  420. package/result/index.js +77 -0
  421. package/result/interface.js +1 -0
  422. package/select/OptGroup.js +20 -0
  423. package/select/Option.js +95 -0
  424. package/select/Select.js +549 -0
  425. package/select/index.js +8 -0
  426. package/select/interface.js +1 -0
  427. package/select/util.js +141 -0
  428. package/select-view/Core.js +370 -0
  429. package/select-view/index.js +67 -0
  430. package/select-view/interface.js +1 -0
  431. package/skeleton/Image.js +24 -0
  432. package/skeleton/Text.js +27 -0
  433. package/skeleton/index.js +57 -0
  434. package/skeleton/interface.js +1 -0
  435. package/slider/Button.js +159 -0
  436. package/slider/Dot.js +43 -0
  437. package/slider/Input.js +75 -0
  438. package/slider/Mark.js +28 -0
  439. package/slider/Tick.js +44 -0
  440. package/slider/index.js +429 -0
  441. package/slider/interface.js +1 -0
  442. package/slider/util.js +63 -0
  443. package/space/index.js +90 -0
  444. package/space/interface.js +1 -0
  445. package/space/toArray.js +11 -0
  446. package/speech-synthesis/index.js +109 -0
  447. package/spin/DotLoading.js +24 -0
  448. package/spin/index.js +79 -0
  449. package/spin/interface.js +1 -0
  450. package/statistic/Countdown.js +55 -0
  451. package/statistic/index.js +120 -0
  452. package/statistic/interface.js +1 -0
  453. package/statistic/util.js +33 -0
  454. package/steps/Step.js +68 -0
  455. package/steps/index.js +89 -0
  456. package/steps/interface.js +1 -0
  457. package/style.css +1 -1
  458. package/suspense-fallback-test/index.js +12 -0
  459. package/switch/index.js +116 -0
  460. package/switch/interface.js +1 -0
  461. package/table/ColGroup.js +59 -0
  462. package/table/Table.js +24 -0
  463. package/table/constant.js +42 -0
  464. package/table/index.js +103 -0
  465. package/table/interface.js +1 -0
  466. package/table/util.js +121 -0
  467. package/tabs/Tab.js +18 -0
  468. package/tabs/TabContent.js +8 -0
  469. package/tabs/TabPane.js +24 -0
  470. package/tabs/index.js +9 -0
  471. package/tabs/interface.js +1 -0
  472. package/tabs/util.js +22 -0
  473. package/tag/index.js +136 -0
  474. package/tag/interface.js +1 -0
  475. package/time-picker/Picker.js +219 -0
  476. package/time-picker/RangePicker.js +56 -0
  477. package/time-picker/TimeColumn.js +65 -0
  478. package/time-picker/TimePicker.js +240 -0
  479. package/time-picker/context.js +5 -0
  480. package/time-picker/index.js +20 -0
  481. package/time-picker/interface.js +1 -0
  482. package/time-picker/util.js +43 -0
  483. package/timeline/Item.js +92 -0
  484. package/timeline/Timeline.js +79 -0
  485. package/timeline/index.js +6 -0
  486. package/timeline/interface.js +1 -0
  487. package/tooltip/index.js +140 -0
  488. package/tooltip/interface.js +1 -0
  489. package/transfer/Item.js +106 -0
  490. package/transfer/List.js +186 -0
  491. package/transfer/index.js +182 -0
  492. package/transfer/interface.js +1 -0
  493. package/tree/Animation.js +11 -0
  494. package/tree/Context.js +5 -0
  495. package/tree/Node.js +16 -0
  496. package/tree/NodeList.js +82 -0
  497. package/tree/Tree.js +580 -0
  498. package/tree/index.js +6 -0
  499. package/tree/interface.js +1 -0
  500. package/tree/util.js +76 -0
  501. package/tree-select/List.js +124 -0
  502. package/tree-select/Select.js +395 -0
  503. package/tree-select/index.js +6 -0
  504. package/tree-select/interface.js +13 -0
  505. package/tree-select/util.js +9 -0
  506. package/trigger/getPopupStyle.js +192 -0
  507. package/trigger/index.js +626 -0
  508. package/trigger/interface.js +1 -0
  509. package/types/anchor/util.d.ts +1 -1
  510. package/types/button/index.d.ts +2 -2
  511. package/types/color-picker/ControlBar.d.ts +12 -5
  512. package/types/color-picker/Mode.d.ts +7 -0
  513. package/types/color-picker/Panel.d.ts +10 -2
  514. package/types/color-picker/hooks/useColorPicker.d.ts +15 -13
  515. package/types/color-picker/hooks/useControlBlock.d.ts +10 -3
  516. package/types/color-picker/index.d.ts +1 -1
  517. package/types/color-picker/interface.d.ts +19 -7
  518. package/types/color-picker/utils.d.ts +23 -0
  519. package/types/form/Control.d.ts +2 -1
  520. package/types/form/FormItem.d.ts +1 -1
  521. package/types/form/store.d.ts +0 -1
  522. package/types/hooks/index.d.ts +2 -0
  523. package/types/hooks/useComputedState.d.ts +1 -4
  524. package/types/hooks/useCreate.d.ts +1 -2
  525. package/types/hooks/useForceUpdate.d.ts +1 -2
  526. package/types/hooks/useId.d.ts +1 -2
  527. package/types/hooks/useInView.d.ts +1 -11
  528. package/types/hooks/useIntersectionObserver.d.ts +1 -7
  529. package/types/hooks/useInterval.d.ts +1 -2
  530. package/types/hooks/useIsFirstRender.d.ts +1 -2
  531. package/types/hooks/useIsomorphicLayoutEffect.d.ts +1 -3
  532. package/types/hooks/useKeyboardEvent.d.ts +1 -8
  533. package/types/hooks/useMedia.d.ts +1 -2
  534. package/types/hooks/useMergeProps.d.ts +1 -5
  535. package/types/hooks/useMergeValue.d.ts +1 -6
  536. package/types/hooks/useOnlineStatus.d.ts +1 -0
  537. package/types/hooks/useOverflowHidden.d.ts +1 -5
  538. package/types/hooks/useOverrideRef.d.ts +1 -6
  539. package/types/hooks/usePersistCallback.d.ts +1 -2
  540. package/types/hooks/usePrefersColorSchemeDark.d.ts +1 -0
  541. package/types/hooks/usePrevious.d.ts +1 -3
  542. package/types/hooks/useRefs.d.ts +1 -2
  543. package/types/hooks/useResizeObserver.d.ts +1 -6
  544. package/types/hooks/useStateCallback.d.ts +1 -5
  545. package/types/hooks/useStateWithPromise.d.ts +1 -2
  546. package/types/hooks/useUpdateEffect.d.ts +1 -3
  547. package/types/hooks/useWatch.d.ts +1 -3
  548. package/types/hooks/useWindowSize.d.ts +1 -5
  549. package/types/image/interface.d.ts +1 -0
  550. package/types/index.d.ts +156 -86
  551. package/types/input/Input.d.ts +1 -1
  552. package/types/input/Textarea.d.ts +2 -2
  553. package/types/locale/en-US.d.ts +2 -0
  554. package/types/locale/interface.d.ts +1 -2
  555. package/types/locale/ja-JP.d.ts +2 -0
  556. package/types/locale/zh-CN.d.ts +2 -0
  557. package/types/locale/zh-HK.d.ts +2 -0
  558. package/types/locale/zh-TW.d.ts +2 -0
  559. package/types/menu/context.d.ts +1 -1
  560. package/types/message/index.d.ts +14 -14
  561. package/types/message/interface.d.ts +2 -0
  562. package/types/modal/config.d.ts +0 -1
  563. package/types/modal/interface.d.ts +0 -1
  564. package/types/notice/index.d.ts +2 -27
  565. package/types/notification/index.d.ts +15 -16
  566. package/types/notification/interface.d.ts +2 -0
  567. package/types/notification/withNotification.d.ts +2 -0
  568. package/types/select/util.d.ts +1 -2
  569. package/types/select-view/interface.d.ts +2 -1
  570. package/types/speech-synthesis/index.d.ts +1 -1
  571. package/types/table/constant.d.ts +2 -0
  572. package/types/table/hook/useThResizable.d.ts +7 -0
  573. package/types/table/index.d.ts +10 -1
  574. package/types/table/style/index.d.ts +1 -0
  575. package/types/table/th-resizable/index.d.ts +2 -0
  576. package/types/table/thead/Column.d.ts +1 -2
  577. package/types/tree/Tree.d.ts +12 -67
  578. package/types/tree-select/Select.d.ts +2 -2
  579. package/types/trigger/index.d.ts +2 -120
  580. package/types/trigger/interface.d.ts +2 -1
  581. package/types/utils/CSSTransition.d.ts +2 -3
  582. package/types/utils/caseName.d.ts +1 -1
  583. package/types/utils/className.d.ts +1 -1
  584. package/types/utils/constant.d.ts +2 -2
  585. package/types/utils/copy.d.ts +1 -1
  586. package/types/utils/dayjs.d.ts +1 -21
  587. package/types/utils/dom.d.ts +1 -6
  588. package/types/utils/fileToURL.d.ts +1 -1
  589. package/types/utils/fillNBSP.d.ts +1 -1
  590. package/types/utils/getHighlightText.d.ts +1 -5
  591. package/types/utils/getHotkeyHandler.d.ts +1 -8
  592. package/types/utils/getStringLength.d.ts +1 -1
  593. package/types/utils/include.d.ts +1 -1
  594. package/types/utils/index.d.ts +3 -4
  595. package/types/utils/is.d.ts +1 -16
  596. package/types/utils/keyboardCode.d.ts +3 -0
  597. package/types/utils/lodash.d.ts +1 -17
  598. package/types/utils/mergeProps.d.ts +1 -1
  599. package/types/utils/mergedToString.d.ts +1 -1
  600. package/types/utils/omit.d.ts +1 -1
  601. package/types/utils/pad.d.ts +1 -2
  602. package/types/utils/pick.d.ts +2 -4
  603. package/types/utils/reactDOM.d.ts +1 -7
  604. package/types/utils/resizeObserverEffect.d.ts +2 -0
  605. package/types/utils/saveAs.d.ts +1 -1
  606. package/types/utils/screenfull.d.ts +2 -0
  607. package/types/utils/scrollIntoView.d.ts +1 -2
  608. package/types/utils/style.d.ts +1 -3
  609. package/types/utils/throttleByRaf.d.ts +1 -5
  610. package/types/utils/throttleByRaf2.d.ts +1 -0
  611. package/types/utils/warning.d.ts +1 -2
  612. package/types/version/index.d.ts +1 -1
  613. package/typography/Base.js +189 -0
  614. package/typography/EditContent.js +46 -0
  615. package/typography/Ellipsis.js +124 -0
  616. package/typography/Operations.js +78 -0
  617. package/typography/Paragraph.js +24 -0
  618. package/typography/Text.js +11 -0
  619. package/typography/Title.js +12 -0
  620. package/typography/Typography.js +13 -0
  621. package/typography/index.js +278 -0
  622. package/typography/interface.js +1 -0
  623. package/typography/useCssEllipsis.js +37 -0
  624. package/typography/useEllipsis.js +150 -0
  625. package/upload/TriggerNode.js +116 -0
  626. package/upload/Upload.js +627 -0
  627. package/upload/Uploader.js +206 -0
  628. package/upload/index.js +8 -0
  629. package/upload/interface.js +9 -0
  630. package/upload/request.js +51 -0
  631. package/upload/request_.js +64 -0
  632. package/upload/util.js +61 -0
  633. package/utils/CSSTransition.js +2 -6
  634. package/utils/className.js +2 -2
  635. package/utils/constant.js +8 -9
  636. package/utils/contextHolder.js +1 -1
  637. package/utils/copy.js +1 -1
  638. package/utils/dayjs.js +14 -173
  639. package/utils/dom.js +35 -31
  640. package/utils/fillNBSP.js +2 -4
  641. package/utils/getHighlightText.js +2 -38
  642. package/utils/getHotkeyHandler.js +2 -25
  643. package/utils/getStringLength.js +2 -7
  644. package/utils/include.js +2 -7
  645. package/utils/index.js +239 -242
  646. package/utils/is.js +116 -156
  647. package/utils/keyboardCode.js +27 -0
  648. package/utils/mergeProps.js +2 -9
  649. package/utils/mergedToString.js +2 -13
  650. package/utils/omit.js +2 -9
  651. package/utils/pick.js +4 -15
  652. package/utils/reactDOM.js +3 -54
  653. package/utils/resizeObserverEffect.js +4 -0
  654. package/utils/saveAs.js +1 -1
  655. package/utils/screenfull.js +4 -0
  656. package/utils/scrollIntoView.js +2 -21
  657. package/utils/style.js +2 -1
  658. package/utils/throttleByRaf.js +13 -12
  659. package/utils/throttleByRaf2.js +5 -0
  660. package/utils/warning.js +2 -1
  661. package/{chunk/BHgJ5Y3T.js → verification-code/VerificationCode.js} +24 -23
  662. package/verification-code/index.js +4 -0
  663. package/verification-code/interface.js +1 -0
  664. package/{Version.js → version/index.js} +1 -1
  665. package/virtual-list/Filler.js +31 -0
  666. package/virtual-list/VirtualList.js +493 -0
  667. package/virtual-list/index.js +4 -0
  668. package/{chunk/Bc7t9jkb.js → watermark/Watermark.js} +17 -16
  669. package/watermark/index.js +4 -0
  670. package/watermark/interface.js +1 -0
  671. package/NotificationBase.js +0 -53
  672. package/chunk/-zpSUpGE.js +0 -1501
  673. package/chunk/BAWsPQBM.js +0 -11
  674. package/chunk/BIT0j3HT.js +0 -269
  675. package/chunk/BbLKnaNO.js +0 -871
  676. package/chunk/Bfhv56O2.js +0 -638
  677. package/chunk/Bh23P4l7.js +0 -162
  678. package/chunk/C2lIz2F9.js +0 -60
  679. package/chunk/CHnFKgbk.js +0 -445
  680. package/chunk/CLBavO5c.js +0 -912
  681. package/chunk/CVkHTbic.js +0 -995
  682. package/chunk/CcV4wQB1.js +0 -968
  683. package/chunk/CeGEvXby.js +0 -278
  684. package/chunk/D3NFxdmG.js +0 -518
  685. package/chunk/DApXtulb.js +0 -1102
  686. package/chunk/DNAigumg.js +0 -166
  687. package/chunk/DPByB1ab.js +0 -698
  688. package/chunk/DQAot004.js +0 -824
  689. package/chunk/DTBtQQ2H.js +0 -334
  690. package/chunk/DV1Ab_cG.js +0 -284
  691. package/chunk/DnvO8A0Z.js +0 -518
  692. package/chunk/Du-bw6qA.js +0 -224
  693. package/chunk/dBnNCOIU.js +0 -778
  694. package/chunk/it8qlDZ3.js +0 -1032
  695. package/chunk/te_43YrB.js +0 -776
  696. package/chunk/znkyQ-HR.js +0 -243
  697. package/hooks/use-verification-code.js +0 -73
  698. package/types/notification-base/index.d.ts +0 -15
  699. package/types/notification-base/style/index.d.ts +0 -2
  700. package/types/style/index.d.ts +0 -1
  701. package/types/trigger/Portal.d.ts +0 -7
  702. package/types/utils/keyCode.d.ts +0 -45
  703. package/types/utils/raf.d.ts +0 -3
  704. package/types/utils/throttleByRafV2.d.ts +0 -5
  705. package/utils/keyCode.js +0 -12
  706. package/utils/raf.js +0 -19
  707. package/utils/throttleByRafV2.js +0 -16
  708. /package/{chunk/l0sNRNKZ.js → affix/interface.js} +0 -0
package/Slider.js CHANGED
@@ -1,775 +1,23 @@
1
- import { jsx as I, jsxs as ge } from "react/jsx-runtime";
2
- import { i as pe, o as we, u as oe, d as Re } from "./chunk/DApXtulb.js";
3
- import he from "lodash/isArray";
4
- import E from "lodash/isFunction";
5
- import re from "lodash/isPlainObject";
6
- import _, { useState as Se, useContext as Le, useMemo as Z, useRef as S, useEffect as Ee, createElement as De, useCallback as H, forwardRef as st } from "react";
7
- import { d as Be } from "./chunk/-zpSUpGE.js";
8
- import { useMergeProps as at } from "./hooks/useMergeProps.js";
9
- import { useMergeValue as Fe } from "./hooks/useMergeValue.js";
10
- import { useUpdateEffect as ut } from "./hooks/useUpdateEffect.js";
11
- import { y as Y } from "./chunk/BAWsPQBM.js";
12
- import { on as U, off as W } from "./utils/dom.js";
13
- import lt from "./utils/omit.js";
14
- import ne from "lodash/isNumber";
15
- import ct from "lodash/isString";
16
- import { useKeyboardEvent as ft } from "./hooks/useKeyboardEvent.js";
17
- import mt from "./Trigger.js";
18
- import { a as Te } from "./chunk/CcV4wQB1.js";
19
- import { G as dt } from "./chunk/CSC_V_25.js";
20
- import gt from "lodash/isUndefined";
21
- const pt = { maxWidth: 350 }, ht = {
22
- enter: 300,
23
- exit: 100
24
- }, vt = {
25
- left: 12,
26
- right: 12,
27
- top: 12,
28
- bottom: 12
29
- }, wt = function(e) {
30
- const {
31
- style: o,
32
- disabled: n,
33
- prefixCls: r,
34
- value: s,
35
- vertical: d,
36
- tooltipVisible: N,
37
- tooltipPosition: m,
38
- formatTooltip: b,
39
- getTooltipContainer: c,
40
- onMoving: V,
41
- onMoveEnd: h,
42
- onMoveBegin: f
43
- } = e, t = ft(), [g, w] = Se(!1), [v, i] = Fe(!1, {
44
- value: N
45
- }), { getPrefixCls: u } = Le(Be), M = Z(
46
- () => m || (d ? "right" : "top"),
47
- [m, d]
48
- ), T = S(null), K = S(!1), z = S(!1), P = S(null);
49
- function ae(C) {
50
- C.stopPropagation(), !n && (ie(C), w(!0), U(window, "mousemove", L), U(window, "touchmove", L), U(window, "mouseup", R), U(window, "touchend", R), U(window, "contextmenu", R));
51
- }
52
- function O() {
53
- K.current = !0, G(), v || (T.current = setTimeout(() => {
54
- j(!0);
55
- }, 50));
56
- }
57
- function D() {
58
- K.current = !1, z.current || (G(), T.current = setTimeout(() => {
59
- j(!1);
60
- }, 200));
61
- }
62
- function ie(C) {
63
- var B;
64
- C.preventDefault();
65
- const k = document.activeElement;
66
- (B = k == null ? void 0 : k.blur) == null || B.call(k), E(f) && f();
67
- }
68
- function L(C) {
69
- z.current = !0, C.type === "touchstart" && (C.clientY = C.touches[0].clientY, C.clientX = C.touches[0].clientX), E(V) && V(C.clientX, C.clientY);
70
- }
71
- function R() {
72
- z.current = !1, w(!1), ue(), j(K.current), E(h) && h();
73
- }
74
- function ue() {
75
- G(), W(window, "mousemove", L), W(window, "touchmove", L), W(window, "mouseup", R), W(window, "touchend", R), W(window, "contextmenu", R);
76
- }
77
- function G() {
78
- T.current && (clearTimeout(T.current), T.current = null);
79
- }
80
- function j(C) {
81
- if (z.current) return;
82
- const k = "tooltipVisible" in e ? N : C;
83
- i(k);
84
- }
85
- function le() {
86
- K.current = !0, G();
87
- }
88
- const x = Z(() => E(b) ? b(s) : s, [b, s]);
89
- function ee(C) {
90
- const k = u("tooltip");
91
- return /* @__PURE__ */ I(
92
- "div",
93
- {
94
- className: Y(
95
- `${k}-content`,
96
- `${k}-content-${C}`
97
- ),
98
- onMouseLeave: D,
99
- onMouseEnter: le,
100
- onClick: (B) => {
101
- B.stopPropagation();
102
- },
103
- children: /* @__PURE__ */ I("div", { className: `${k}-content-inner`, children: x })
104
- }
105
- );
106
- }
107
- return Ee(() => {
108
- P && P.current && P.current.updatePopupPosition();
109
- }, [s]), /* @__PURE__ */ I(
110
- mt,
111
- {
112
- style: pt,
113
- classNames: "zoomInFadeOut",
114
- duration: ht,
115
- showArrow: !0,
116
- popupAlign: vt,
117
- ref: P,
118
- popup: () => ee(M),
119
- popupVisible: v,
120
- disabled: N === !1,
121
- getPopupContainer: c,
122
- position: M,
123
- childrenPrefix: u("tooltip"),
124
- children: /* @__PURE__ */ I(
125
- "div",
126
- {
127
- className: Y(`${r}-button`, {
128
- [`${r}-button-active`]: g
129
- }),
130
- onMouseDown: ae,
131
- onMouseEnter: O,
132
- onMouseLeave: D,
133
- style: o,
134
- role: "slider",
135
- "aria-valuemax": e.maxValue,
136
- "aria-valuemin": e.minValue,
137
- "aria-valuenow": s,
138
- "aria-disabled": !!n,
139
- tabIndex: n ? -1 : 0,
140
- "aria-valuetext": ct(x) || ne(x) ? String(x) : void 0,
141
- ...t({
142
- onArrowRight: (C) => {
143
- var k;
144
- C.preventDefault(), (k = e.onArrowEvent) == null || k.call(e, "addition");
145
- },
146
- onArrowUp: (C) => {
147
- var k;
148
- C.preventDefault(), (k = e.onArrowEvent) == null || k.call(e, "addition");
149
- },
150
- onArrowLeft: (C) => {
151
- var k;
152
- C.preventDefault(), (k = e.onArrowEvent) == null || k.call(e, "subtraction");
153
- },
154
- onArrowDown: (C) => {
155
- var k;
156
- C.preventDefault(), (k = e.onArrowEvent) == null || k.call(e, "subtraction");
157
- }
158
- })
159
- }
160
- )
161
- }
162
- );
163
- }, bt = _.memo(wt);
164
- function Vt(e) {
165
- const o = `${e}`.split(".")[1];
166
- return o && o.length || 0;
167
- }
168
- function X(e) {
169
- return `${e * 100}%`;
170
- }
171
- function Mt(e, o) {
172
- const n = Number(e);
173
- if (!isNaN(n)) {
174
- const [r, s] = o;
175
- return Re(pe(n, r), pe(s, r));
176
- }
177
- return 0;
178
- }
179
- function je(e, o) {
180
- const n = Number(e);
181
- return o.sort((r, s) => r - s), n >= o[0] && n <= o[1];
182
- }
183
- function de(e) {
184
- return e || e === 0;
185
- }
186
- function Ct(e) {
187
- const o = parseFloat(e), n = o > 1 ? (o / 100).toFixed(2) : o, r = parseFloat(n);
188
- if (!isNaN(r) && r >= 0 && r <= 1)
189
- return r;
190
- }
191
- function Q(e, o) {
192
- const n = o.find(
193
- (r) => e >= r.begin && e <= r.end
194
- );
195
- if (n) {
196
- const { beginOffset: r, begin: s, end: d, endOffset: N } = n, m = Mt(e, [s, d]), b = pe(N, r), c = we(m, b);
197
- return oe(r, c);
198
- }
199
- }
200
- function ve(e) {
201
- const o = e.slice(0);
202
- return o.sort((n, r) => n - r), o;
203
- }
204
- function xt(e) {
205
- return e.some((o, n) => o > e[n + 1]);
206
- }
207
- function kt(e, o) {
208
- let n = o.indexOf(e);
209
- return n === -1 ? (n = ve(o.concat(e)).indexOf(e), [
210
- Math.max(n - 1, 0),
211
- Math.min(n, o.length - 1)
212
- ]) : [n, n + 1];
213
- }
214
- const Nt = function(e) {
215
- const {
216
- data: o = [],
217
- valueRange: n = [],
218
- vertical: r,
219
- prefixCls: s,
220
- reverse: d,
221
- intervalConfigs: N
222
- } = e;
223
- return o.length ? /* @__PURE__ */ I("div", { className: `${s}-dots`, children: o.map(({ key: m, content: b }) => {
224
- const c = X(Q(+m, N));
225
- return /* @__PURE__ */ I(
226
- "div",
227
- {
228
- className: `${s}-dot-wrapper`,
229
- style: {
230
- ...r ? { [d ? "top" : "bottom"]: c } : { [d ? "right" : "left"]: c }
231
- },
232
- onMouseDown: (V) => {
233
- V.stopPropagation(), E(e.onMouseDown) && e.onMouseDown(parseFloat(m));
234
- },
235
- children: re(b) && b.dot ? b.dot : /* @__PURE__ */ I(
236
- "div",
237
- {
238
- className: Y(`${s}-dot`, {
239
- [`${s}-dot-active`]: je(m, n)
240
- })
241
- }
242
- )
243
- },
244
- m
245
- );
246
- }) }) : null;
247
- }, It = _.memo(Nt), yt = function(e) {
248
- const {
249
- value: o,
250
- range: n,
251
- min: r,
252
- max: s,
253
- step: d,
254
- disabled: N,
255
- prefixCls: m,
256
- onChange: b,
257
- extra: c = []
258
- } = e, V = {
259
- min: r,
260
- max: s,
261
- step: d,
262
- disabled: N
263
- }, [h, f] = Se(o), t = c[0], g = n ? c[1] : c[0];
264
- Ee(() => {
265
- f(o);
266
- }, [o]);
267
- const w = (i) => {
268
- b == null || b(i);
269
- }, v = () => {
270
- f([...o].sort((i, u) => i - u));
271
- };
272
- return /* @__PURE__ */ ge(
273
- "div",
274
- {
275
- className: Y(`${m}-input`, {
276
- [`${m}-input-group`]: n
277
- }),
278
- onBlur: v,
279
- children: [
280
- n && [
281
- /* @__PURE__ */ De(
282
- Te,
283
- {
284
- hideControl: !0,
285
- ...t,
286
- ...V,
287
- value: h[0],
288
- key: 0,
289
- onChange: (i, u) => {
290
- var M;
291
- isNaN(i) && i !== i || (w([i, h[1]]), (M = t == null ? void 0 : t.onChange) == null || M.call(t, i, u));
292
- }
293
- }
294
- ),
295
- /* @__PURE__ */ I("div", { className: `${m}-input-range`, children: /* @__PURE__ */ I("span", { className: `${m}-input-range-content` }) }, 1)
296
- ],
297
- /* @__PURE__ */ De(
298
- Te,
299
- {
300
- hideControl: !0,
301
- ...g,
302
- ...V,
303
- key: 2,
304
- value: h[1],
305
- onChange: (i, u) => {
306
- var M;
307
- isNaN(i) && i !== i || (w([h[0], i]), (M = g == null ? void 0 : g.onChange) == null || M.call(g, i, u));
308
- }
309
- }
310
- )
311
- ]
312
- }
313
- );
314
- }, $t = _.memo(yt), Ot = function(e) {
315
- const { data: o = [], vertical: n, prefixCls: r, reverse: s, intervalConfigs: d } = e;
316
- return o.length ? /* @__PURE__ */ I("div", { className: `${r}-marks`, children: o.map(({ key: N, content: m }) => {
317
- const b = X(Q(+N, d));
318
- let c = null;
319
- return re(m) && de(m.text) ? c = m.text : de(m) && (c = m), de(c) && /* @__PURE__ */ I(
320
- "div",
321
- {
322
- className: `${r}-marks-text`,
323
- "aria-hidden": !0,
324
- style: n ? { [s ? "top" : "bottom"]: b } : { [s ? "right" : "left"]: b },
325
- onMouseDown: (V) => {
326
- V.stopPropagation(), E(e.onMouseDown) && e.onMouseDown(parseFloat(N));
327
- },
328
- children: c
329
- },
330
- N
331
- );
332
- }) }) : null;
333
- }, Pt = _.memo(Ot);
334
- function At(e) {
335
- const {
336
- min: o,
337
- max: n,
338
- valueRange: r,
339
- prefixCls: s,
340
- vertical: d,
341
- reverse: N,
342
- intervalConfigs: m
343
- } = e, b = /* @__PURE__ */ new Map(), c = (h) => {
344
- const { step: f, begin: t, end: g } = h, w = Math.floor((g - t) / f);
345
- for (let v = 0; v <= w; v++) {
346
- const i = oe(v * f, t);
347
- if (i <= o || i >= n) continue;
348
- const u = X(Q(i, m));
349
- b.set(u, {
350
- offset: u,
351
- isActive: je(i, r)
352
- });
353
- }
354
- }, V = Z(() => {
355
- var h;
356
- return b.clear(), (h = m == null ? void 0 : m.forEach) == null || h.call(m, (f) => c(f)), Array.from(b.values());
357
- }, [m]);
358
- return /* @__PURE__ */ I("div", { className: `${s}-ticks`, children: V.map((h, f) => /* @__PURE__ */ I(
359
- "div",
360
- {
361
- className: Y(`${s}-tick`, {
362
- [`${s}-tick-active`]: h.isActive
363
- }),
364
- style: d ? { [N ? "top" : "bottom"]: h.offset } : { [N ? "right" : "left"]: h.offset }
365
- },
366
- f
367
- )) });
368
- }
369
- const Dt = _.memo(At);
370
- function Tt(e) {
371
- if (e.length < 2)
372
- return [];
373
- const o = [];
374
- for (let n = 1; n < e.length; n++) {
375
- const r = e[n - 1], s = e[n];
376
- o.push([r, s]);
377
- }
378
- return o;
379
- }
380
- function Rt(e) {
381
- const { marks: o = {}, getIntervalConfig: n, max: r, min: s } = e, { markIntervals: d, markList: N } = Z(() => {
382
- const b = Object.keys(o).filter((f) => ne(+f) && +f >= s && +f <= r).sort((f, t) => +f > +t ? 1 : -1), c = b.map((f) => ({ key: f, content: o[f] }));
383
- let V = b.map((f) => +f);
384
- return V.length === 0 ? V = [s, r] : (V[0] > s && (V.unshift(s), c.unshift({ key: `${s}`, content: "" })), V.slice(-1)[0] < r && (V.push(r), c.push({ key: `${r}`, content: "" }))), { markIntervals: Tt(V), markList: c };
385
- }, [o, s, r]);
386
- return {
387
- intervalConfigs: Z(() => {
388
- if (!E(n))
389
- return [
390
- {
391
- begin: s,
392
- end: r,
393
- step: e.step,
394
- beginOffset: 0,
395
- endOffset: 1,
396
- width: 1
397
- }
398
- ];
399
- const b = ([t, g], w) => {
400
- const v = { step: e.step, width: 0 }, i = n([t, g], w) || {}, u = i.step, M = Ct(i.width);
401
- return ne(u) && u && (v.step = u), ne(M) && M && (v.width = M), v;
402
- };
403
- let c = 1, V = r - s;
404
- const h = d.map(([t, g], w) => {
405
- const v = b([t, g], w);
406
- let i = v.width;
407
- if (i) {
408
- i = Math.min(c, i);
409
- const u = g - t;
410
- V -= u, c -= i;
411
- }
412
- return { width: i, step: v.step };
413
- });
414
- if (h.every(({ width: t }) => t) && c) {
415
- const t = h[d.length - 1];
416
- t.width += c;
417
- }
418
- const f = [];
419
- return d.forEach(([t, g], w) => {
420
- const { step: v, width: i } = h[w], u = {
421
- begin: t,
422
- end: g,
423
- step: v,
424
- beginOffset: 0,
425
- endOffset: 0,
426
- width: i
427
- };
428
- u.width || (u.width = c * ((g - t) / V));
429
- const M = f.length - 1;
430
- f[M] && (u.beginOffset = f[M].endOffset), u.endOffset = Math.min(1, u.beginOffset + u.width), f.push(u);
431
- }), f;
432
- }, [n, d, r, s, e.step]),
433
- markList: N
434
- };
435
- }
436
- function St(e) {
437
- const { isRange: o, min: n, max: r, onlyMarkValue: s, intervalConfigs: d, marks: N } = e, m = H(
438
- (t) => {
439
- const g = d.find((w) => t >= w.begin && t <= w.end);
440
- if (g) {
441
- const { begin: w, step: v } = g, i = t - w, u = Math.round(i / v), M = Vt(v), T = parseFloat(
442
- we(v, u).toFixed(M)
443
- );
444
- return oe(w, T);
445
- }
446
- return t;
447
- },
448
- [d]
449
- ), b = H(
450
- (t) => {
451
- if (!re(N) || dt(N))
452
- return console.warn("marks must be an object when onlyMarkValue is true"), n;
453
- if (N[t])
454
- return t;
455
- const g = Object.keys(N), w = g.map((i) => Math.abs(t - parseFloat(i))), v = w.indexOf(Math.min.apply(null, w));
456
- return parseFloat(g[v]);
457
- },
458
- [N, n]
459
- ), c = H(
460
- (t) => gt(t) || t <= n ? n : t >= r ? r : s ? b(t) : m(t),
461
- [b, m, r, n, s]
462
- ), V = H(
463
- (t) => c(t) === t,
464
- [c]
465
- ), h = H(
466
- (t) => {
467
- let [g, w] = [n, n];
468
- if (o) {
469
- if (he(t))
470
- return g = c(t[0]), t.map((v) => c(v));
471
- console.error("value must be an array when range is true");
472
- } else ne(t) ? w = c(t) : console.error("value must be a number when range is false");
473
- return [g, w];
474
- },
475
- [c, o, n]
476
- ), f = H(
477
- (t, g) => {
478
- const w = g === "subtraction" ? -1 : 1;
479
- let v = oe(t, w * e.step);
480
- if (e.onlyMarkValue) {
481
- const i = Object.keys(e.marks), u = i.findIndex((M) => Number(M) === t);
482
- v = i[u + w] !== void 0 ? Number(i[u + w]) : t;
483
- }
484
- return v;
485
- },
486
- [e.marks, e.onlyMarkValue, e.step]
487
- );
488
- return {
489
- getLegalRangeValue: h,
490
- getLegalValue: c,
491
- isLegalValue: V,
492
- getNextMarkValue: f
493
- };
494
- }
495
- const Lt = {
496
- max: 100,
497
- min: 0,
498
- step: 1
499
- };
500
- function Et(e, o) {
501
- const { getPrefixCls: n, componentConfig: r, rtl: s } = Le(Be), d = at(
502
- e,
503
- Lt,
504
- r == null ? void 0 : r.Slider
505
- ), {
506
- className: N,
507
- style: m,
508
- tooltipVisible: b,
509
- tooltipPosition: c,
510
- disabled: V,
511
- min: h,
512
- max: f,
513
- range: t,
514
- step: g,
515
- showTicks: w,
516
- marks: v,
517
- onlyMarkValue: i,
518
- vertical: u,
519
- showInput: M,
520
- reverse: T,
521
- getIntervalConfig: K,
522
- ...z
523
- } = d, P = !!t, ae = re(t) ? { ...t } : { draggableBar: !1 }, O = s ? !T : T, { intervalConfigs: D, markList: ie } = Rt({
524
- min: h,
525
- max: f,
526
- onlyMarkValue: i,
527
- step: g,
528
- marks: v,
529
- getIntervalConfig: K
530
- }), { getLegalValue: L, getLegalRangeValue: R, isLegalValue: ue, getNextMarkValue: G } = St({
531
- isRange: P,
532
- min: h,
533
- max: f,
534
- onlyMarkValue: i,
535
- step: g,
536
- intervalConfigs: D,
537
- marks: v
538
- }), [j, le] = Fe(
539
- P ? [h, h] : h,
540
- {
541
- defaultValue: d.defaultValue,
542
- value: d.value
543
- }
544
- );
545
- let x = R(j);
546
- const ee = S(x), C = S(xt(x));
547
- ut(() => {
548
- ee.current = R(j);
549
- }, [j, R]), C.current && (x = ve(x));
550
- const k = x[x.length - 1], B = x[0], ce = M && !i && (!P || x.length < 3), We = Z(() => ce && (he(M) || re(M)) ? he(M) ? [...M] : [{ ...M }, { ...M }] : [], [ce, M]), $ = n("slider"), be = S(null), Ve = S({
551
- left: 0,
552
- height: 0,
553
- top: 0,
554
- width: 0
555
- }), Me = S(!1), Ce = S(0);
556
- function xe(l) {
557
- const a = ve(l);
558
- return P ? a : a[a.length - 1];
559
- }
560
- function Xe(l) {
561
- const a = l.map((p) => L(p));
562
- return ee.current = a, a;
563
- }
564
- function J(l, a) {
565
- const p = Xe(l), y = xe(p);
566
- le(y), a === "inputValueChange" ? C.current = p.some((A, q) => A > p[q]) : C.current = !1, E(d.onChange) && d.onChange(y);
567
- }
568
- function se() {
569
- if (E(d.onAfterChange)) {
570
- const l = xe(ee.current);
571
- d.onAfterChange(l);
572
- }
573
- }
574
- function Ye(l) {
575
- let [a, p] = [x[0], x[x.length - 1]];
576
- return a > p && ([a, p] = [p, a]), P ? l >= a && l <= p : l <= p;
577
- }
578
- function fe(l, a) {
579
- const { left: p, top: y, width: A, height: q } = Ve.current;
580
- let F = A, ye = O ? p + A - l : l - p;
581
- if (u && (F = q, ye = O ? a - y : y + q - a), F <= 0)
582
- return 0;
583
- let te = Math.max(Re(ye, F), 0);
584
- te = Math.min(1, te);
585
- const _e = D.find((Ae) => te >= Ae.beginOffset && te <= Ae.endOffset), {
586
- begin: $e,
587
- beginOffset: Oe,
588
- step: Pe,
589
- endOffset: et,
590
- end: tt
591
- } = _e, nt = te - Oe, ot = et - Oe, rt = nt / ot * (tt - $e), it = Math.round(rt / Pe);
592
- return oe($e, we(it, Pe));
593
- }
594
- function Ke(l) {
595
- let [a, p] = l;
596
- a > p && ([a, p] = [p, a]);
597
- const y = X(a), A = X(1 - p);
598
- return u ? {
599
- [O ? "top" : "bottom"]: y,
600
- [O ? "bottom" : "top"]: A
601
- } : {
602
- [O ? "right" : "left"]: y,
603
- [O ? "left" : "right"]: A
604
- };
605
- }
606
- function ze(l) {
607
- return u ? { [O ? "top" : "bottom"]: X(l) } : { [O ? "right" : "left"]: X(l) };
608
- }
609
- function Ge() {
610
- const l = {
611
- getTooltipContainer: d.getTooltipContainer,
612
- formatTooltip: d.formatTooltip
613
- };
614
- return "tooltipPosition" in d && (l.tooltipPosition = c), "tooltipVisible" in d && (l.tooltipVisible = b), l;
615
- }
616
- function ke() {
617
- Ve.current = be.current.getBoundingClientRect();
618
- }
619
- function Je(l) {
620
- ke();
621
- const a = fe(l.clientX, l.clientY);
622
- ae.draggableBar && Ye(a) ? (Ce.current = L(a), U(window, "mousemove", Ne), U(window, "mouseup", Ie)) : me(a);
623
- }
624
- function me(l) {
625
- if (V) return;
626
- const a = L(l), [p, y] = kt(a, x), A = x[p], q = x[y], F = x.slice(0);
627
- P && q - a > a - A ? (F[p] = a, J(F, "jumpToClick")) : (F[y] = a, J(F, "jumpToClick")), se();
628
- }
629
- function qe(l) {
630
- J(l, "inputValueChange"), se();
631
- }
632
- function He(l, a, p) {
633
- Me.current = !0;
634
- const y = x.slice(0);
635
- y[p] = fe(l, a), J(y, "mousemove");
636
- }
637
- function Qe() {
638
- Me.current = !1, se();
639
- }
640
- function Ze(l, a) {
641
- if (V) return;
642
- const p = x.slice(0);
643
- p[a] = G(x[a], l), J(p);
644
- }
645
- function Ne(l) {
646
- const p = L(fe(l.clientX, l.clientY)) - Ce.current, y = x.map((A) => A + p);
647
- y.every((A) => ue(A)) && J(y, "mousemove");
648
- }
649
- function Ie() {
650
- W(window, "mousemove", Ne), W(window, "mouseup", Ie), se();
651
- }
652
- return /* @__PURE__ */ I(
653
- "div",
654
- {
655
- ...lt(z, [
656
- "defaultValue",
657
- "value",
658
- "onChange",
659
- "getTooltipContainer",
660
- "formatTooltip",
661
- "onAfterChange"
662
- ]),
663
- className: Y(
664
- $,
665
- {
666
- [`${$}-vertical`]: u,
667
- [`${$}-with-marks`]: v,
668
- [`${$}-reverse`]: O,
669
- [`${$}-rtl`]: s
670
- },
671
- N
672
- ),
673
- style: m,
674
- ref: o,
675
- children: /* @__PURE__ */ ge("div", { className: `${$}-wrapper`, children: [
676
- /* @__PURE__ */ ge(
677
- "div",
678
- {
679
- ref: be,
680
- className: Y(`${$}-road`, {
681
- [`${$}-road-disabled`]: V,
682
- [`${$}-road-vertical`]: u
683
- }),
684
- onMouseDown: Je,
685
- children: [
686
- /* @__PURE__ */ I(
687
- "div",
688
- {
689
- className: `${$}-bar`,
690
- style: Ke([
691
- Q(B, D),
692
- Q(k, D)
693
- ])
694
- }
695
- ),
696
- w && /* @__PURE__ */ I(
697
- Dt,
698
- {
699
- intervalConfigs: D,
700
- min: h,
701
- max: f,
702
- valueRange: [B, k],
703
- prefixCls: $,
704
- vertical: u,
705
- reverse: O
706
- }
707
- ),
708
- /* @__PURE__ */ I(
709
- It,
710
- {
711
- data: ie,
712
- intervalConfigs: D,
713
- valueRange: [B, k],
714
- vertical: u,
715
- prefixCls: $,
716
- reverse: O,
717
- onMouseDown: me
718
- }
719
- ),
720
- /* @__PURE__ */ I(
721
- Pt,
722
- {
723
- data: ie,
724
- intervalConfigs: D,
725
- vertical: u,
726
- prefixCls: $,
727
- reverse: O,
728
- onMouseDown: me
729
- }
730
- ),
731
- x.map((l, a) => !P && a !== x.length - 1 ? null : /* @__PURE__ */ I(
732
- bt,
733
- {
734
- style: ze(Q(l, D)),
735
- disabled: V,
736
- prefixCls: $,
737
- value: l,
738
- maxValue: f,
739
- minValue: h,
740
- vertical: u,
741
- ...Ge(),
742
- onMoveBegin: ke,
743
- onMoving: (p, y) => He(p, y, a),
744
- onMoveEnd: Qe,
745
- onArrowEvent: (p) => Ze(p, a)
746
- },
747
- a
748
- ))
749
- ]
750
- }
751
- ),
752
- ce && /* @__PURE__ */ I(
753
- $t,
754
- {
755
- min: h,
756
- max: f,
757
- step: g,
758
- value: x,
759
- range: P,
760
- disabled: V,
761
- prefixCls: $,
762
- onChange: qe,
763
- extra: We
764
- }
765
- )
766
- ] })
767
- }
768
- );
769
- }
770
- const Ue = st(Et);
771
- Ue.displayName = "Slider";
772
- const rn = _.memo(Ue);
1
+ import "react/jsx-runtime";
2
+ import "./chunk/BibHFOCF.js";
3
+ import "lodash/isArray";
4
+ import "lodash/isFunction";
5
+ import "lodash/isPlainObject";
6
+ import "react";
7
+ import "./chunk/ll867Bf3.js";
8
+ import "./chunk/BFTV6myl.js";
9
+ import "./chunk/CdaT1b_F.js";
10
+ import "./chunk/BSCrLtfQ.js";
11
+ import "./chunk/JPPo5nY_.js";
12
+ import "./utils/dom.js";
13
+ import "./chunk/BKKEev13.js";
14
+ import "./slider/Button.js";
15
+ import "./slider/Dot.js";
16
+ import "./slider/Input.js";
17
+ import "./slider/Mark.js";
18
+ import "./slider/Tick.js";
19
+ import { default as s } from "./slider/index.js";
20
+ import "./slider/util.js";
773
21
  export {
774
- rn as default
22
+ s as default
775
23
  };