@unicom-cloud/ui 0.8.43 → 0.8.45

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 (495) hide show
  1. package/Affix.js +54 -51
  2. package/Alert.js +46 -43
  3. package/Anchor.js +5 -4
  4. package/AutoComplete.js +60 -55
  5. package/Avatar.js +10 -155
  6. package/BackTop.js +41 -38
  7. package/Badge.js +63 -93
  8. package/Breadcrumb.js +63 -118
  9. package/Button.js +105 -109
  10. package/Calendar.js +139 -536
  11. package/Card.js +65 -101
  12. package/Carousel.js +169 -270
  13. package/Cascader.js +9 -8
  14. package/Checkbox.js +4 -3
  15. package/Collapse.js +4 -3
  16. package/ColorPicker.js +95 -546
  17. package/Comment.js +14 -12
  18. package/ConfigProvider.js +6 -5
  19. package/Copy.js +33 -31
  20. package/DatePicker.js +35 -1993
  21. package/Descriptions.js +30 -28
  22. package/Divider.js +8 -6
  23. package/Draggable.js +28 -85
  24. package/Drawer.js +5 -4
  25. package/Dropdown.js +107 -167
  26. package/Empty.js +28 -8
  27. package/Form.js +30 -1418
  28. package/Grid.js +13 -248
  29. package/Icon.js +19 -45
  30. package/IconHover.js +39 -6
  31. package/Image.js +3 -3
  32. package/Input.js +4 -4
  33. package/InputNumber.js +213 -17
  34. package/InputTag.js +5 -4
  35. package/Layout.js +35 -48
  36. package/Link.js +16 -14
  37. package/List.js +191 -228
  38. package/Loading.js +18 -17
  39. package/Mentions.js +99 -115
  40. package/Menu.js +8 -7
  41. package/Message.js +147 -10
  42. package/Modal.js +5 -4
  43. package/Notice.js +196 -13
  44. package/Notification.js +136 -11
  45. package/NotificationBase.js +5 -4
  46. package/OverflowEllipsis.js +48 -71
  47. package/PageHeader.js +52 -52
  48. package/Pagination.js +12 -11
  49. package/Picker.js +6 -4
  50. package/Popconfirm.js +47 -44
  51. package/Popover.js +25 -23
  52. package/Portal.js +12 -32
  53. package/Progress.js +65 -328
  54. package/Radio.js +6 -5
  55. package/Rate.js +48 -45
  56. package/ResizeBox.js +127 -505
  57. package/Result.js +60 -1417
  58. package/Select.js +9 -8
  59. package/SelectView.js +49 -328
  60. package/Skeleton.js +41 -78
  61. package/Slider.js +228 -702
  62. package/Space.js +53 -57
  63. package/Spin.js +57 -72
  64. package/Statistic.js +84 -153
  65. package/Steps.js +64 -123
  66. package/SuspenseFallbackTest.js +4 -3
  67. package/Switch.js +41 -38
  68. package/Table.js +20 -1999
  69. package/Tabs.js +9 -8
  70. package/Tag.js +24 -21
  71. package/TimePicker.js +19 -272
  72. package/Timeline.js +4 -3
  73. package/Tooltip.js +79 -72
  74. package/Transfer.js +138 -402
  75. package/Tree.js +5 -4
  76. package/TreeSelect.js +8 -7
  77. package/Trigger.js +407 -571
  78. package/Typography.js +11 -721
  79. package/Upload.js +9 -8
  80. package/VerificationCode.js +6 -5
  81. package/Version.js +1 -1
  82. package/VirtualList.js +4 -3
  83. package/Watermark.js +3 -2
  84. package/anchor/Anchor.js +193 -0
  85. package/anchor/Link.js +54 -0
  86. package/anchor/context.js +14 -0
  87. package/anchor/util.js +41 -0
  88. package/avatar/Avatar.js +85 -0
  89. package/avatar/Group.js +84 -0
  90. package/avatar/context.js +5 -0
  91. package/badge/Count.js +35 -0
  92. package/breadcrumb/Item.js +67 -0
  93. package/button/Group.js +15 -0
  94. package/calendar/Month.js +142 -0
  95. package/calendar/WeekList.js +24 -0
  96. package/calendar/Year.js +75 -0
  97. package/calendar/header/Panel.js +57 -0
  98. package/calendar/header/index.js +118 -0
  99. package/calendar/hook/useCellClassName.js +41 -0
  100. package/card/Grid.js +27 -0
  101. package/card/Meta.js +32 -0
  102. package/carousel/Arrow.js +57 -0
  103. package/carousel/Indicator.js +68 -0
  104. package/cascader/Cascader.js +300 -0
  105. package/cascader/base/node.js +142 -0
  106. package/cascader/base/store.js +93 -0
  107. package/cascader/hook/useRefCurrent.js +12 -0
  108. package/cascader/panel/List.js +275 -0
  109. package/cascader/panel/Option.js +35 -0
  110. package/cascader/panel/Search.js +171 -0
  111. package/cascader/util.js +66 -0
  112. package/checkbox/Checkbox.js +111 -0
  113. package/checkbox/Group.js +97 -0
  114. package/checkbox/useCheckbox.js +45 -0
  115. package/collapse/Collapse.js +90 -0
  116. package/collapse/Item.js +165 -0
  117. package/color-picker/ControlBar.js +64 -0
  118. package/color-picker/InputAlpha.js +24 -0
  119. package/color-picker/InputHex.js +59 -0
  120. package/color-picker/InputRgb.js +66 -0
  121. package/color-picker/Palette.js +36 -0
  122. package/color-picker/Panel.js +165 -0
  123. package/color-picker/colors.js +37 -0
  124. package/color-picker/hooks/useColorPicker.js +63 -0
  125. package/color-picker/hooks/useControlBlock.js +40 -0
  126. package/config-provider/ConfigProvider.js +94 -0
  127. package/config-provider/context.js +24 -0
  128. package/date-picker/Picker.js +399 -0
  129. package/date-picker/PickerRange.js +568 -0
  130. package/date-picker/context.js +5 -0
  131. package/date-picker/hook/useCellClassName.js +58 -0
  132. package/date-picker/panel/Body.js +78 -0
  133. package/date-picker/panel/Footer.js +71 -0
  134. package/date-picker/panel/Header.js +74 -0
  135. package/date-picker/panel/Shortcut.js +45 -0
  136. package/date-picker/panel/WeekList.js +19 -0
  137. package/date-picker/panel/date/index.js +194 -0
  138. package/date-picker/panel/month/index.js +113 -0
  139. package/date-picker/panel/quarter/index.js +93 -0
  140. package/date-picker/panel/range/index.js +251 -0
  141. package/date-picker/panel/week/index.js +35 -0
  142. package/date-picker/panel/year/index.js +74 -0
  143. package/date-picker/util.js +69 -0
  144. package/draggable/Item.js +66 -0
  145. package/drawer/Drawer.js +226 -0
  146. package/dropdown/Button.js +91 -0
  147. package/form/Control.js +264 -0
  148. package/form/Form.js +156 -0
  149. package/form/FormItem.js +241 -0
  150. package/form/FormLabel.js +54 -0
  151. package/form/FormList.js +96 -0
  152. package/form/FormProvider.js +48 -0
  153. package/form/IconSymbol.js +20 -0
  154. package/form/context.js +43 -0
  155. package/form/hook/useContext.js +32 -0
  156. package/form/hook/useState.js +31 -0
  157. package/form/hook/useWatch.js +36 -0
  158. package/form/interface.js +11 -0
  159. package/form/promisify.js +23 -0
  160. package/form/store.js +354 -0
  161. package/form/useForm.js +53 -0
  162. package/form/util.js +72 -0
  163. package/grid/Col.js +87 -0
  164. package/grid/Row.js +88 -0
  165. package/grid/context.js +9 -0
  166. package/grid/grid-item.js +77 -0
  167. package/grid/grid.js +104 -0
  168. package/grid/hook/useResponsiveState.js +38 -0
  169. package/grid/util.js +51 -0
  170. package/{chunk/I4RV9SKZ.js → hooks/factory/createHTMLMediaHook.js} +35 -43
  171. package/hooks/index.js +246 -4
  172. package/{chunk/BdYAMaw9.js → hooks/misc/hookState.js} +1 -1
  173. package/hooks/misc/parseTimeRanges.js +12 -0
  174. package/{chunk/TXCrI0jN.js → hooks/misc/util.js} +6 -6
  175. package/hooks/use-watermark/utils.js +8 -0
  176. package/hooks/use-watermark.js +71 -76
  177. package/hooks/useAudio.js +3 -3
  178. package/hooks/useBeforeUnload.js +2 -2
  179. package/hooks/useClickAway.js +10 -10
  180. package/hooks/useCounter.js +1 -1
  181. package/hooks/useCreation.js +2 -4
  182. package/hooks/useDrop.js +12 -12
  183. package/hooks/useDropArea.js +5 -5
  184. package/hooks/useEvent.js +6 -6
  185. package/hooks/useEventListener.js +2 -4
  186. package/hooks/useFavicon.js +1 -2
  187. package/hooks/useFullscreen.js +11 -13
  188. package/hooks/useGetSet.js +5 -5
  189. package/hooks/useHash.js +6 -6
  190. package/hooks/useHover.js +6 -6
  191. package/hooks/useHoverDirty.js +7 -7
  192. package/hooks/useIdle.js +17 -17
  193. package/hooks/useIsomorphicLayoutEffect2.js +3 -3
  194. package/hooks/useKey.js +5 -5
  195. package/hooks/useList.js +1 -1
  196. package/hooks/useLocalStorage.js +2 -3
  197. package/hooks/useLocation.js +1 -1
  198. package/hooks/useLockBodyScroll.js +13 -14
  199. package/hooks/useLongPress.js +7 -7
  200. package/hooks/useMeasure.js +3 -3
  201. package/hooks/useMedia.js +4 -4
  202. package/hooks/useMediaDevices.js +10 -10
  203. package/hooks/useMotion.js +11 -11
  204. package/hooks/useMouse.js +9 -9
  205. package/hooks/useMouseWheel.js +7 -7
  206. package/hooks/useNetworkState.js +7 -7
  207. package/hooks/useOrientation.js +10 -11
  208. package/hooks/useOverrideRef.js +14 -0
  209. package/hooks/usePageLeave.js +4 -4
  210. package/hooks/usePermission.js +9 -9
  211. package/hooks/usePersistCallback.js +15 -0
  212. package/hooks/useScroll.js +6 -6
  213. package/hooks/useScrolling.js +7 -7
  214. package/hooks/useSearchParam.js +5 -5
  215. package/hooks/useSessionStorage.js +9 -9
  216. package/hooks/useSize.js +1 -1
  217. package/hooks/useSlider.js +6 -6
  218. package/hooks/useStartTyping.js +4 -4
  219. package/hooks/useStateList.js +4 -5
  220. package/hooks/useStateWithHistory.js +1 -1
  221. package/hooks/useTimeout.js +1 -2
  222. package/hooks/useVibrate.js +5 -5
  223. package/hooks/useVideo.js +3 -3
  224. package/hooks/useWindowScroll.js +13 -13
  225. package/hooks/useWindowSize.js +6 -6
  226. package/icon/addFromIconFontCn.js +33 -0
  227. package/image/Image.js +189 -0
  228. package/image/ImageFooter.js +45 -0
  229. package/image/ImagePreview.js +473 -0
  230. package/image/ImagePreviewArrow.js +40 -0
  231. package/image/ImagePreviewGroup.js +125 -0
  232. package/image/ImagePreviewToolbar.js +98 -0
  233. package/image/TriggerForToolbar.js +10 -0
  234. package/image/previewGroupContext.js +17 -0
  235. package/image/util/getFixTranslate.js +7 -0
  236. package/image/util/getScale.js +72 -0
  237. package/image/util/hook/useImageStatus.js +16 -0
  238. package/image/util/hook/useShowFooter.js +7 -0
  239. package/index.js +440 -395
  240. package/input/Group.js +20 -0
  241. package/input/Input.js +185 -0
  242. package/input/InputElement.js +233 -0
  243. package/input/Number.js +4 -0
  244. package/input/Password.js +72 -0
  245. package/input/Search.js +80 -0
  246. package/input/Tag.js +7 -0
  247. package/input/Textarea.js +168 -0
  248. package/input/autoSizeTextAreaHeight.js +65 -0
  249. package/input/useComposition.js +39 -0
  250. package/input-number/decimal.js +154 -0
  251. package/input-number/useSelectionRange.js +26 -0
  252. package/input-number/util.js +57 -0
  253. package/input-tag/InputTag.js +381 -0
  254. package/layout/Content.js +15 -0
  255. package/layout/Footer.js +15 -0
  256. package/layout/Header.js +15 -0
  257. package/{chunk/B9asjXwm.js → layout/Sider.js} +23 -22
  258. package/list/Item.js +46 -0
  259. package/list/Meta.js +21 -0
  260. package/loading/style/index.module.less.js +4 -0
  261. package/locale/de-DE.js +1 -1
  262. package/mentions/util.js +26 -0
  263. package/menu/Indent.js +17 -0
  264. package/menu/Item.js +125 -0
  265. package/menu/ItemGroup.js +39 -0
  266. package/menu/Menu.js +181 -0
  267. package/menu/OverflowWrap.js +85 -0
  268. package/menu/context.js +5 -0
  269. package/menu/sub-menu/Inline.js +111 -0
  270. package/menu/sub-menu/Pop.js +126 -0
  271. package/menu/sub-menu/index.js +17 -0
  272. package/menu/util.js +80 -0
  273. package/message/useMessage.js +53 -0
  274. package/modal/Confirm.js +98 -0
  275. package/modal/Modal.js +419 -0
  276. package/modal/config.js +25 -0
  277. package/modal/use-modal/Hook.js +55 -0
  278. package/modal/use-modal/index.js +68 -0
  279. package/notification/useNotification.js +55 -0
  280. package/overflow-ellipsis/OverflowItem.js +34 -0
  281. package/package.json +27 -1
  282. package/pagination/PageItem.js +121 -0
  283. package/pagination/PageJumper.js +64 -0
  284. package/pagination/PageOption.js +55 -0
  285. package/pagination/Pagination.js +245 -0
  286. package/picker/Input.js +124 -0
  287. package/picker/InputRange.js +155 -0
  288. package/portal/Portal.js +25 -0
  289. package/progress/CircleProgress.js +117 -0
  290. package/progress/LineProgess.js +103 -0
  291. package/progress/StepProgress.js +74 -0
  292. package/radio/Group.js +91 -0
  293. package/radio/Radio.js +90 -0
  294. package/resize-box/ResizeTrigger.js +78 -0
  295. package/resize-box/Split.js +132 -0
  296. package/resize-box/SplitGroup.js +204 -0
  297. package/result/403.js +695 -0
  298. package/result/404.js +513 -0
  299. package/result/500.js +166 -0
  300. package/select/OptGroup.js +20 -0
  301. package/select/Option.js +97 -0
  302. package/select/Select.js +544 -0
  303. package/select/util.js +140 -0
  304. package/select-view/Core.js +309 -0
  305. package/skeleton/Image.js +24 -0
  306. package/skeleton/Text.js +27 -0
  307. package/slider/Button.js +159 -0
  308. package/slider/Dot.js +43 -0
  309. package/slider/Input.js +75 -0
  310. package/slider/Mark.js +28 -0
  311. package/slider/Tick.js +44 -0
  312. package/slider/hook/useInterval.js +73 -0
  313. package/slider/hook/useLegalValue.js +70 -0
  314. package/slider/util.js +63 -0
  315. package/space/toArray.js +11 -0
  316. package/spin/DotLoading.js +26 -0
  317. package/statistic/Countdown.js +57 -0
  318. package/statistic/util.js +33 -0
  319. package/steps/Step.js +68 -0
  320. package/style.css +1 -1
  321. package/table/ColGroup.js +59 -0
  322. package/table/Table.js +634 -0
  323. package/table/constant.js +5 -0
  324. package/table/hook/useColumns.js +141 -0
  325. package/table/hook/useComponent.js +64 -0
  326. package/table/hook/useExpand.js +36 -0
  327. package/table/hook/useRowSelection.js +92 -0
  328. package/table/hook/useSorter.js +54 -0
  329. package/table/hook/useStickyClassNames.js +30 -0
  330. package/table/hook/useStickyOffsets.js +30 -0
  331. package/table/summary/Cell.js +10 -0
  332. package/table/summary/Row.js +26 -0
  333. package/table/summary/context.js +5 -0
  334. package/table/summary/index.js +10 -0
  335. package/table/tbody/Td.js +160 -0
  336. package/table/tbody/Tr.js +168 -0
  337. package/table/tbody/index.js +156 -0
  338. package/table/tfoot/index.js +16 -0
  339. package/table/thead/Column.js +250 -0
  340. package/table/thead/index.js +131 -0
  341. package/table/util.js +121 -0
  342. package/tabs/Tab.js +170 -0
  343. package/tabs/TabContent.js +54 -0
  344. package/tabs/TabPane.js +26 -0
  345. package/tabs/hook/useDomSize.js +17 -0
  346. package/tabs/hook/useHeaderScroll.js +64 -0
  347. package/tabs/tab-header/DropdownIcon.js +71 -0
  348. package/tabs/tab-header/TabInk.js +65 -0
  349. package/tabs/tab-header/TabNavIcon.js +65 -0
  350. package/tabs/tab-header/TabTitle.js +78 -0
  351. package/tabs/tab-header/index.js +335 -0
  352. package/tabs/util.js +22 -0
  353. package/time-picker/Picker.js +221 -0
  354. package/time-picker/RangePicker.js +56 -0
  355. package/time-picker/TimeColumn.js +65 -0
  356. package/time-picker/TimePicker.js +242 -0
  357. package/time-picker/context.js +5 -0
  358. package/time-picker/util.js +43 -0
  359. package/timeline/Item.js +94 -0
  360. package/timeline/Timeline.js +80 -0
  361. package/transfer/Item.js +107 -0
  362. package/transfer/List.js +192 -0
  363. package/tree/Animation.js +104 -0
  364. package/tree/Context.js +5 -0
  365. package/tree/Node.js +215 -0
  366. package/tree/NodeList.js +84 -0
  367. package/tree/Tree.js +549 -0
  368. package/tree/util.js +76 -0
  369. package/tree-select/List.js +127 -0
  370. package/tree-select/Select.js +260 -0
  371. package/tree-select/hook/useKeyCache.js +56 -0
  372. package/tree-select/hook/useStateValue.js +98 -0
  373. package/tree-select/hook/useTreeData.js +13 -0
  374. package/tree-select/interface.js +13 -0
  375. package/tree-select/util.js +9 -0
  376. package/trigger/Portal.js +14 -0
  377. package/trigger/getPopupStyle.js +190 -0
  378. package/types/badge/Count.d.ts +2 -1
  379. package/types/badge/index.d.ts +2 -2
  380. package/types/button/index.d.ts +2 -2
  381. package/types/carousel/index.d.ts +1 -1
  382. package/types/color-picker/colors.d.ts +1 -1
  383. package/types/color-picker/style/index.d.ts +1 -1
  384. package/types/drawer/Drawer.d.ts +1 -1
  385. package/types/dropdown/interface.d.ts +1 -0
  386. package/types/grid/index.d.ts +1 -0
  387. package/types/hooks/index.d.ts +122 -0
  388. package/types/hooks/use-verification-code/interface.d.ts +1 -1
  389. package/types/hooks/useAsync.d.ts +1 -1
  390. package/types/hooks/useDropArea.d.ts +1 -0
  391. package/types/hooks/useOverrideRef.d.ts +5 -0
  392. package/types/hooks/usePersistCallback.d.ts +1 -0
  393. package/types/hooks/useUpsert.d.ts +1 -1
  394. package/types/icon-hover/index.d.ts +5 -3
  395. package/types/index.d.ts +4 -120
  396. package/types/input-tag/InputTag.d.ts +1 -1
  397. package/types/input-tag/interface.d.ts +1 -1
  398. package/types/link/interface.d.ts +1 -1
  399. package/types/list/index.d.ts +1 -1
  400. package/types/modal/interface.d.ts +1 -0
  401. package/types/notice/index.d.ts +3 -0
  402. package/types/notification/index.d.ts +1 -1
  403. package/types/page-header/index.d.ts +1 -1
  404. package/types/select/Select.d.ts +1 -1
  405. package/types/select-view/Core.d.ts +3 -2
  406. package/types/select-view/index.d.ts +1 -0
  407. package/types/statistic/index.d.ts +1 -1
  408. package/types/switch/index.d.ts +1 -1
  409. package/types/switch/interface.d.ts +1 -1
  410. package/types/table/interface.d.ts +2 -1
  411. package/types/tooltip/index.d.ts +1 -1
  412. package/types/trigger/index.d.ts +12 -8
  413. package/types/trigger/interface.d.ts +1 -0
  414. package/types/typography/Base.d.ts +8 -7
  415. package/types/typography/EditContent.d.ts +3 -2
  416. package/types/typography/Paragraph.d.ts +2 -5
  417. package/types/typography/Text.d.ts +1 -5
  418. package/types/typography/Title.d.ts +2 -5
  419. package/types/upload/TriggerNode.d.ts +5 -3
  420. package/types/upload/list/PictureItem.d.ts +3 -3
  421. package/types/upload/list/TextItem.d.ts +3 -3
  422. package/types/utils/CSSTransition.d.ts +2 -0
  423. package/types/utils/constant.d.ts +1 -1
  424. package/types/utils/is.d.ts +4 -0
  425. package/types/utils/reactDOM.d.ts +3 -1
  426. package/types/utils/warning.d.ts +1 -1
  427. package/types/version/index.d.ts +1 -1
  428. package/typography/Base.js +184 -0
  429. package/typography/EditContent.js +49 -0
  430. package/typography/Ellipsis.js +293 -0
  431. package/typography/Operations.js +78 -0
  432. package/typography/Paragraph.js +26 -0
  433. package/typography/Text.js +11 -0
  434. package/typography/Title.js +12 -0
  435. package/typography/Typography.js +15 -0
  436. package/typography/useCssEllipsis.js +37 -0
  437. package/typography/useEllipsis.js +150 -0
  438. package/upload/TriggerNode.js +118 -0
  439. package/upload/Upload.js +205 -0
  440. package/upload/Uploader.js +205 -0
  441. package/upload/interface.js +9 -0
  442. package/upload/list/PictureItem.js +91 -0
  443. package/upload/list/TextItem.js +99 -0
  444. package/upload/list/UploadProgress.js +97 -0
  445. package/upload/list/index.js +120 -0
  446. package/upload/request.js +51 -0
  447. package/upload/util.js +61 -0
  448. package/utils/CSSTransition.js +27 -0
  449. package/utils/contextHolder.js +29 -4
  450. package/utils/getHighlightText.js +1 -2
  451. package/utils/is.js +81 -68
  452. package/utils/reactDOM.js +33 -22
  453. package/utils/style.js +1 -2
  454. package/utils/warning.js +7 -3
  455. package/verification-code/VerificationCode.js +83 -0
  456. package/virtual-list/Filler.js +31 -0
  457. package/virtual-list/VirtualList.js +378 -0
  458. package/virtual-list/util/algorithm.js +32 -0
  459. package/virtual-list/util/item.js +99 -0
  460. package/{chunk/BCEX3Acw.js → watermark/Watermark.js} +13 -11
  461. package/chunk/B1P8u7kB.js +0 -798
  462. package/chunk/B2ufZjjd.js +0 -1000
  463. package/chunk/B7QOJqps.js +0 -162
  464. package/chunk/BBz3S3zo.js +0 -966
  465. package/chunk/BGzBxiWE.js +0 -517
  466. package/chunk/BNRfcEHj.js +0 -984
  467. package/chunk/BSs6uXmc.js +0 -946
  468. package/chunk/BTjUAV8T.js +0 -277
  469. package/chunk/BYQeEcKe.js +0 -375
  470. package/chunk/Ba4UXIST.js +0 -605
  471. package/chunk/BfaXVcik.js +0 -271
  472. package/chunk/Bs11tCU6.js +0 -240
  473. package/chunk/C7FC7dzS.js +0 -516
  474. package/chunk/CLzbve11.js +0 -694
  475. package/chunk/CN4zXU4b.js +0 -877
  476. package/chunk/CYTPZUHD.js +0 -769
  477. package/chunk/CcCo_dK0.js +0 -335
  478. package/chunk/CoCXcpQd.js +0 -261
  479. package/chunk/D4yH4UKK.js +0 -80
  480. package/chunk/DiSLYN2-.js +0 -167
  481. package/chunk/Dr0iXIXO.js +0 -736
  482. package/chunk/G3-2uJao.js +0 -229
  483. package/chunk/RnTpOC5-.js +0 -1
  484. package/chunk/Z-mtdHUQ.js +0 -226
  485. package/chunk/ZISxNnaR.js +0 -165
  486. package/chunk/aPJXnDSb.js +0 -450
  487. package/chunk/i605JRmI.js +0 -232
  488. package/chunk/l0sNRNKZ.js +0 -1
  489. package/types/form/FormItemTip.d.ts +0 -8
  490. /package/{chunk/C6Kfwj0f.js → loading/style/index.less.js} +0 -0
  491. /package/{chunk/DP2rzg_V.js → suspense-fallback-test/style/index.less.js} +0 -0
  492. /package/types/{Popover → popover}/index.d.ts +0 -0
  493. /package/types/{Popover → popover}/interface.d.ts +0 -0
  494. /package/types/{Popover → popover}/style/index.d.ts +0 -0
  495. /package/{chunk/K6Dvbx-E.js → virtual-list/style/index.less.js} +0 -0
package/ResizeBox.js CHANGED
@@ -1,436 +1,60 @@
1
- import { jsx as m, jsxs as ut } from "react/jsx-runtime";
2
- import "./chunk/C6Kfwj0f.js";
3
- import vt from "lodash/isNumber";
4
- import Wt, { useContext as ft, useRef as k, useEffect as lt, forwardRef as Ct, useState as ct, useImperativeHandle as Nt } from "react";
5
- import { a as mt } from "./chunk/Dr0iXIXO.js";
6
- import Bt from "./hooks/useMergeProps.js";
7
- import Tt from "./hooks/useMergeValue.js";
8
- import E from "@unicom-cloud/utils/class-name";
9
- import { on as $, off as y } from "./utils/dom.js";
10
- import zt from "./utils/omit.js";
11
- import Yt from "@unicom-cloud/icons/IconUiCaretDown";
12
- import It from "@unicom-cloud/icons/IconUiCaretLeft";
13
- import bt from "@unicom-cloud/icons/IconUiCaretRight";
14
- import Ft from "@unicom-cloud/icons/IconUiCaretUp";
15
- import kt from "@unicom-cloud/icons/IconUiDragDot";
16
- import Ut from "@unicom-cloud/icons/IconUiDragDotVertical";
17
- import wt from "lodash/isFunction";
18
- import st from "lodash/isPlainObject";
19
- import Vt from "./hooks/useIsomorphicLayoutEffect.js";
20
- import _t from "lodash/isString";
21
- import St from "lodash/isUndefined";
22
- function Mt(r) {
23
- const {
24
- className: ot,
25
- direction: g,
26
- icon: Z,
27
- onMouseDown: q,
28
- onResize: x,
29
- children: J,
30
- collapsible: N = {},
31
- resizable: W = !0,
32
- renderChildren: b,
33
- ...K
34
- } = r, { getPrefixCls: rt, rtl: z } = ft(mt), d = rt("resizebox-trigger"), H = g === "horizontal", M = z && !H, T = E(
35
- d,
36
- `${d}-${H ? "horizontal" : "vertical"}`,
37
- { [`${d}-not-resizable`]: !W },
38
- { [`${d}-rtl`]: z },
39
- ot
40
- ), f = M ? [/* @__PURE__ */ m(bt, {}, "prev"), /* @__PURE__ */ m(It, {}, "next")] : [/* @__PURE__ */ m(It, {}, "prev"), /* @__PURE__ */ m(bt, {}, "next")], S = st(N.prev) ? {
41
- ...N.prev,
42
- icon: N.prev.icon || (H ? /* @__PURE__ */ m(Ft, {}) : f[0])
43
- } : {}, P = st(N.next) ? {
44
- ...N.next,
45
- icon: N.next.icon || (H ? /* @__PURE__ */ m(Yt, {}) : f[1])
46
- } : {}, Q = () => S.icon && !S.collapsed || P.collapsed ? /* @__PURE__ */ m(
47
- "span",
48
- {
49
- className: E(`${d}-icon`, E(`${d}-prev`)),
50
- onClick: S.onClick,
51
- children: S.icon
52
- }
53
- ) : /* @__PURE__ */ m("span", { className: E(`${d}-icon-empty`) }), U = () => P.icon && !P.collapsed || S.collapsed ? /* @__PURE__ */ m(
54
- "span",
55
- {
56
- className: E(`${d}-icon`, E(`${d}-next`)),
57
- onClick: P.onClick,
58
- children: P.icon
59
- }
60
- ) : /* @__PURE__ */ m("span", { className: E(`${d}-icon-empty`) }), tt = () => W ? /* @__PURE__ */ m("span", { className: `${d}-icon`, children: Z || (H ? /* @__PURE__ */ m(kt, {}) : /* @__PURE__ */ m(Ut, {})) }) : /* @__PURE__ */ m("span", { className: E(`${d}-icon-empty`) }), h = Q(), O = tt(), l = U(), w = () => /* @__PURE__ */ ut("div", { className: `${d}-icon-wrapper`, children: [
61
- h,
62
- O,
63
- l
64
- ] });
65
- if (!W)
66
- return /* @__PURE__ */ m("div", { className: T, children: wt(b) ? b(h, O, l) : J || w() });
67
- const I = k(null);
68
- return lt(() => {
69
- let i;
70
- return I.current && (i = new ResizeObserver(x), i.observe(I.current)), () => {
71
- var A, V;
72
- I.current && ((A = i == null ? void 0 : i.unobserve) == null || A.call(i, I.current)), (V = i == null ? void 0 : i.disconnect) == null || V.call(i), i = null;
73
- };
74
- }, [I.current]), /* @__PURE__ */ m(
75
- "div",
76
- {
77
- ref: I,
78
- ...zt(K, ["style"]),
79
- className: T,
80
- onMouseDown: q,
81
- children: wt(b) ? b(h, O, l) : J || w()
82
- }
83
- );
84
- }
85
- const dt = "horizontal", Pt = "vertical";
86
- function Lt(r, ot) {
87
- const {
88
- style: g,
89
- className: Z,
90
- component: q = "div",
91
- direction: x = "horizontal",
92
- icon: J,
93
- size: N = 0.5,
94
- min: W,
95
- max: b,
96
- panes: K,
97
- disabled: rt,
98
- trigger: z
99
- } = r, { getPrefixCls: d, rtl: H } = ft(mt), M = d("resizebox-split"), T = x.includes(dt), f = x.includes("reverse"), S = T && H, P = !T, Q = E(
100
- M,
101
- `${M}-${T ? dt : Pt}`,
102
- { [`${M}-rtl`]: H },
103
- Z
104
- ), [U, tt] = K, h = typeof N == "string", [O, l] = ct(parseFloat(N)), [w, I] = ct(0), i = k({
105
- startX: 0,
106
- startY: 0,
107
- startWidth: 0,
108
- startHeight: 0,
109
- startOffset: 0,
110
- moving: !1
111
- }), A = k(), V = k([]);
112
- Nt(ot, () => A.current, []);
113
- function _(t, e) {
114
- return parseFloat(t) / parseFloat(e);
115
- }
116
- function B(t, e, n, o) {
117
- const s = typeof W == "string" ? _(parseFloat(W), t) : W || 0, a = typeof b == "string" ? _(parseFloat(b), t) : b || 1;
118
- let u = f ? -1 : 1;
119
- u *= S ? -1 : 1;
120
- let X = h ? e + (o - n) * u : _(
121
- t * e + (o - n) * u,
122
- t
123
- );
124
- const nt = h ? s * t : s, Y = h ? a * t : a;
125
- return X = Math.max(X, nt), X = Math.min(X, Y), X;
126
- }
127
- function L(t) {
128
- var e, n, o;
129
- (e = r.onMovingStart) == null || e.call(r), i.current.moving = !0, i.current.startX = t.pageX, i.current.startY = t.pageY, i.current.startWidth = (n = A.current) == null ? void 0 : n.offsetWidth, i.current.startHeight = (o = A.current) == null ? void 0 : o.offsetHeight, i.current.startOffset = O, $(window, "mousemove", G), $(window, "touchmove", G), $(window, "mouseup", j), $(window, "touchend", j), $(window, "contextmenu", j), document.body.style.cursor = P ? "row-resize" : "col-resize";
130
- }
131
- function G(t) {
132
- var e;
133
- if (i.current.moving) {
134
- const n = T ? B(
135
- i.current.startWidth,
136
- i.current.startOffset,
137
- i.current.startX,
138
- t.pageX
139
- ) : B(
140
- i.current.startHeight,
141
- i.current.startOffset,
142
- i.current.startY,
143
- t.pageY
144
- );
145
- l(n), (e = r.onMoving) == null || e.call(r, t, h ? `${n}px` : n);
146
- }
147
- }
148
- function j() {
149
- var t;
150
- i.current.moving = !1, y(window, "mousemove", G), y(window, "touchmove", G), y(window, "mouseup", j), y(window, "touchend", j), y(window, "contextmenu", j), document.body.style.cursor = "default", (t = r.onMovingEnd) == null || t.call(r);
151
- }
152
- function it(t) {
153
- const { contentRect: e } = t[0], n = e[P ? "height" : "width"];
154
- I(n);
155
- }
156
- function c() {
157
- const t = h ? "px" : "%";
158
- return O ? `calc(${h ? O : O * 100}${t} - ${w / 2}px)` : `0${t}`;
159
- }
160
- lt(() => {
161
- var t;
162
- (t = r.onPaneResize) == null || t.call(r, V.current);
163
- }, [O, w]), Vt(() => {
164
- const t = parseFloat(N);
165
- O !== t && l(t);
166
- }, [N]);
167
- const v = q, p = /* @__PURE__ */ m(
168
- "div",
169
- {
170
- className: E(`${M}-pane`, "first-pane"),
171
- style: { flexBasis: c() },
172
- ref: (t) => {
173
- V.current[0] = t;
174
- },
175
- children: U
176
- }
177
- ), R = /* @__PURE__ */ m(
178
- "div",
179
- {
180
- className: E(`${M}-pane`, "second-pane"),
181
- ref: (t) => {
182
- V.current[1] = t;
183
- },
184
- children: tt
185
- }
186
- ), D = f ? [R, p] : [p, R];
187
- return /* @__PURE__ */ ut(v, { style: g, className: Q, ref: A, children: [
188
- D[0],
189
- !rt && /* @__PURE__ */ m(
190
- Mt,
191
- {
192
- className: `${M}-trigger`,
193
- direction: P ? dt : Pt,
194
- icon: J,
195
- onMouseDown: L,
196
- onResize: it,
197
- children: z
198
- }
199
- ),
200
- D[1]
201
- ] });
202
- }
203
- const Et = Ct(Lt);
204
- Et.displayName = "ResizeBoxSplit";
205
- const ht = "horizontal", Dt = "vertical";
206
- function Gt(r, ot) {
207
- const {
208
- panes: g,
209
- style: Z,
210
- className: q,
211
- component: x = "div",
212
- direction: J = "horizontal",
213
- icon: N,
214
- ...W
215
- } = r, { getPrefixCls: b, rtl: K } = ft(mt), rt = 1 / g.length, z = k(), d = k(
216
- new Array(g.length).fill({
217
- moving: !1,
218
- startOffset: 0,
219
- startPosition: 0
220
- })
221
- ), H = k([]), M = k(0), T = k([]), [f, S] = ct(
222
- new Array(g.length).fill(rt)
223
- ), [P, Q] = ct(!1), [U, tt] = ct(
224
- new Array(g.length).fill(0)
225
- ), [h, O] = ct(
226
- new Array(Math.max(g.length - 1, 0)).fill({ prev: !1, next: !1 })
227
- ), l = b("resizebox-split-group"), w = J === ht, I = w && K, i = !w, A = E(
228
- l,
229
- `${l}-${w ? ht : Dt}`,
230
- { [`${l}-moving`]: P },
231
- { [`${l}-rtl`]: K },
232
- q
233
- ), V = x, _ = () => {
234
- let t = [];
235
- g.forEach((s) => {
236
- const { size: a } = s;
237
- St(a) ? t.push(void 0) : t.push(L(a));
238
- });
239
- const e = t.filter((s) => !s), o = (1 - t.reduce((s, a) => (s || 0) + (a || 0), 0)) / e.length;
240
- return t = t.map((s) => St(s) ? o : s), t;
241
- }, B = (t) => {
242
- const e = U[t - 1] || 0, n = U[t];
243
- return `calc(${f[t] * 100}% - ${(e + n) / 2}px)`;
244
- };
245
- function L(t) {
246
- const e = w ? z.current.offsetWidth : z.current.offsetHeight;
247
- if (!t || vt(t) && t < 0)
248
- return 0;
249
- const n = _t(t) ? parseFloat(t) / e : t;
250
- return Math.min(n, 1);
251
- }
252
- const G = (t) => {
253
- const e = Math.min(t + 1, g.length - 1), n = f[t] + f[e], o = L(g[t].min) || 0;
254
- let s = L(g[t].max) || n;
255
- const a = L(g[e].min) || 0;
256
- let u = L(g[e].max) || n;
257
- return s = Math.min(n - a, s), u = Math.min(n - o, u), {
258
- currentMin: o,
259
- currentMax: s,
260
- nextMin: a,
261
- nextMax: u
262
- };
263
- }, j = (t, e, n) => {
264
- const o = M.current, s = o + 1, a = [...f], u = I ? -1 : 1, et = f[o], X = f[s], nt = et + X, { currentMin: Y, currentMax: C } = G(o);
265
- let F = t + L(`${(n - e) * u}px`);
266
- return F = Math.max(Y, F), F = Math.min(C, F), a[o] = F, a[s] = nt - F, a;
267
- };
268
- function it(t, e) {
269
- const { contentRect: n } = t[0], o = n[i ? "height" : "width"], s = [...U];
270
- s[e] = o, tt(s);
271
- }
272
- const c = (t) => {
273
- let e = g[t].collapsible;
274
- st(e) || (e = e ? { prev: !0, next: !0 } : {});
275
- const { prev: n, next: o } = e;
276
- if (!n && !o)
277
- return {};
278
- if (!h[t])
279
- return {};
280
- const s = !!n || !n && h[t].next, a = !!o || !o && h[t].prev;
281
- return { hasPrev: s, hasNext: a };
282
- };
283
- function v(t, e) {
284
- var o;
285
- (o = r.onMovingStart) == null || o.call(r, e), M.current = e;
286
- const n = d.current[e];
287
- n.moving = !0, n.startOffset = f[e], n.startPosition = w ? t.pageX : t.pageY, Q(!0), $(window, "mousemove", p), $(window, "touchmove", p), $(window, "mouseup", R), $(window, "touchend", R), $(window, "contextmenu", R), document.body.style.cursor = i ? "row-resize" : "col-resize";
288
- }
289
- function p(t) {
290
- var s;
291
- const e = M.current, n = d.current[e], o = w ? z.current.offsetWidth : z.current.offsetHeight;
292
- if (n.moving) {
293
- const a = j(
294
- n.startOffset,
295
- n.startPosition,
296
- w ? t.pageX : t.pageY
297
- );
298
- S(a), T.current = a, (s = r == null ? void 0 : r.onMoving) == null || s.call(
299
- r,
300
- t,
301
- a.map((u) => `${u * o}px`),
302
- e
303
- );
304
- }
305
- }
306
- function R() {
307
- var e;
308
- const t = M.current;
309
- d.current[t].moving = !1, Q(!1), y(window, "mousemove", p), y(window, "touchmove", p), y(window, "mouseup", R), y(window, "touchend", R), y(window, "contextmenu", R), document.body.style.cursor = "default", (e = r.onMovingEnd) == null || e.call(r, t);
310
- }
311
- function D(t, e, n, o) {
312
- var $t, yt;
313
- const s = e + 1, a = [...f], u = f[e], et = f[s], X = u + et, nt = w ? z.current.offsetWidth : z.current.offsetHeight, { currentMin: Y, nextMin: C } = G(e);
314
- let F = T.current[e], at = T.current[s], gt = h[e][n];
315
- n === "prev" ? (et !== C || at === C) && (F = Y, at = X - Y, gt = !0) : (u !== Y || F === Y) && (F = X - C, at = C, gt = !0), a[e] = F, a[s] = at, ($t = r == null ? void 0 : r.onMoving) == null || $t.call(
316
- r,
317
- t,
318
- a.map((Xt) => `${Xt * nt}px`),
319
- e
320
- ), (yt = r.onMovingEnd) == null || yt.call(r, e), S(a), wt(o) && o(t, e, n, gt);
321
- }
322
- return lt(() => {
323
- const t = _();
324
- S(t), T.current = t;
325
- }, [JSON.stringify(g.map((t) => t.size))]), Nt(ot, () => z.current, []), lt(() => {
326
- const t = [];
327
- f.forEach((e, n) => {
328
- const o = { prev: !1, next: !1 }, s = n + 1, { currentMin: a, nextMin: u } = G(n);
329
- e === a ? o.prev = !0 : f[s] === u && (o.next = !0), t.push(o);
330
- }), O(t);
331
- }, [f]), /* @__PURE__ */ m(
332
- V,
333
- {
334
- ...zt(W, [
335
- "onMovingStart",
336
- "onPaneResize",
337
- "onMoving",
338
- "onMovingEnd"
339
- ]),
340
- style: Z,
341
- className: A,
342
- ref: z,
343
- children: g.map((t, e) => {
344
- const {
345
- content: n,
346
- disabled: o,
347
- trigger: s,
348
- resizable: a = !0,
349
- collapsible: u = {}
350
- } = t, { hasPrev: et, hasNext: X } = c(e), nt = st(u) && st(u.prev) ? u.prev : {}, Y = st(u) && st(u.next) ? u.next : {};
351
- return /* @__PURE__ */ ut(Wt.Fragment, { children: [
352
- /* @__PURE__ */ m(
353
- "div",
354
- {
355
- className: `${l}-pane`,
356
- style: { flexBasis: B(e) },
357
- ref: (C) => H.current[e] = C,
358
- children: n
359
- }
360
- ),
361
- !o && e !== g.length - 1 && /* @__PURE__ */ m(
362
- Mt,
363
- {
364
- className: `${l}-trigger`,
365
- direction: i ? ht : Dt,
366
- icon: N,
367
- onResize: (C) => it(C, e),
368
- onMouseDown: (C) => v(C, e),
369
- collapsible: {
370
- prev: et ? {
371
- onClick: (C) => D(C, e, "prev", nt.onClick),
372
- icon: nt.icon,
373
- collapsed: h[e].prev
374
- } : void 0,
375
- next: X ? {
376
- onClick: (C) => D(C, e, "next", Y.onClick),
377
- icon: Y.icon,
378
- collapsed: h[e].next
379
- } : void 0
380
- },
381
- resizable: a,
382
- renderChildren: s
383
- }
384
- )
385
- ] }, e);
386
- })
387
- }
388
- );
389
- }
390
- const Ht = Ct(Gt);
391
- Ht.displayName = "ResizeBoxSplitGroup";
392
- const At = "left", pt = "right", xt = "top", Rt = "bottom", jt = [
393
- At,
394
- pt,
395
- xt,
396
- Rt
397
- ], Zt = {
1
+ import { jsxs as ot, jsx as rt } from "react/jsx-runtime";
2
+ /* empty css */
3
+ /* empty css */
4
+ import E from "lodash/isNumber";
5
+ import { forwardRef as nt, useContext as st, useState as it, useRef as B, useImperativeHandle as ct } from "react";
6
+ import "./config-provider/ConfigProvider.js";
7
+ import at from "./hooks/useMergeProps.js";
8
+ import W from "./hooks/useMergeValue.js";
9
+ import ut from "@unicom-cloud/utils/class-name";
10
+ import { on as g, off as l } from "./utils/dom.js";
11
+ import mt from "./utils/omit.js";
12
+ import dt from "./resize-box/ResizeTrigger.js";
13
+ import gt from "./resize-box/Split.js";
14
+ import lt from "./resize-box/SplitGroup.js";
15
+ import { ConfigContext as ft } from "./config-provider/context.js";
16
+ const $ = "left", b = "right", z = "top", y = "bottom", pt = [
17
+ $,
18
+ b,
19
+ z,
20
+ y
21
+ ], ht = {
398
22
  component: "div",
399
23
  directions: ["right"],
400
24
  resizeIcons: {},
401
25
  resizeTriggers: {}
402
- }, qt = (r) => {
403
- switch (r) {
26
+ }, wt = (f) => {
27
+ switch (f) {
404
28
  case "left":
405
29
  return "right";
406
30
  case "right":
407
31
  return "left";
408
32
  default:
409
- return r;
33
+ return f;
410
34
  }
411
35
  };
412
- function Jt(r, ot) {
413
- const { getPrefixCls: g, componentConfig: Z, rtl: q } = ft(mt), x = Bt(
414
- r,
415
- Zt,
416
- Z == null ? void 0 : Z.ResizeBox
36
+ function vt(f, X) {
37
+ const { getPrefixCls: Y, componentConfig: w, rtl: T } = st(ft), r = at(
38
+ f,
39
+ ht,
40
+ w == null ? void 0 : w.ResizeBox
417
41
  ), {
418
- style: J,
419
- className: N,
420
- component: W,
421
- directions: b,
422
- resizeIcons: K,
423
- children: rt,
424
- resizeTriggers: z,
425
- width: d,
426
- height: H,
427
- ...M
428
- } = x, T = q ? b.map((c) => qt(c)) : b, f = g("resizebox"), S = E(f, { [`${f}-rtl`]: q }, N), [P, Q] = ct({}), [U, tt] = Tt(void 0, { value: d }), [h, O] = Tt(void 0, { value: H }), l = k({
42
+ style: P,
43
+ className: k,
44
+ component: _,
45
+ directions: C,
46
+ resizeIcons: A,
47
+ children: G,
48
+ resizeTriggers: j,
49
+ width: F,
50
+ height: q,
51
+ ...K
52
+ } = r, L = T ? C.map((t) => wt(t)) : C, v = Y("resizebox"), U = ut(v, { [`${v}-rtl`]: T }, k), [V, J] = it({}), [I, N] = W(void 0, { value: F }), [H, M] = W(void 0, { value: q }), o = B({
429
53
  startX: 0,
430
54
  startY: 0,
431
55
  startWidth: 0,
432
56
  startHeight: 0,
433
- direction: pt,
57
+ direction: b,
434
58
  moving: !1,
435
59
  padding: {
436
60
  top: 0,
@@ -438,122 +62,120 @@ function Jt(r, ot) {
438
62
  left: 0,
439
63
  right: 0
440
64
  }
441
- }), w = k();
442
- Nt(ot, () => w.current, []);
443
- function I(c) {
444
- return [xt, Rt].indexOf(c) > -1;
445
- }
446
- function i(c, v) {
447
- if (c === 0)
448
- return 0;
449
- const p = c - v;
450
- return p <= 0 ? 0 : p;
451
- }
452
- function A(c) {
453
- const v = "data-pqb-origin-cursor";
454
- if (c)
455
- document.body.setAttribute(v, document.body.style.cursor), document.body.style.cursor = c;
65
+ }), p = B();
66
+ ct(X, () => p.current, []);
67
+ function R(t) {
68
+ return [z, y].indexOf(t) > -1;
69
+ }
70
+ function O(t, e) {
71
+ if (t === 0) return 0;
72
+ const n = t - e;
73
+ return n <= 0 ? 0 : n;
74
+ }
75
+ function D(t) {
76
+ const e = "data-pqb-origin-cursor";
77
+ if (t)
78
+ document.body.setAttribute(e, document.body.style.cursor), document.body.style.cursor = t;
456
79
  else {
457
- const p = document.body.getAttribute(v);
458
- document.body.style.cursor = p || "", document.body.removeAttribute(v);
80
+ const n = document.body.getAttribute(e);
81
+ document.body.style.cursor = n || "", document.body.removeAttribute(e);
459
82
  }
460
83
  }
461
- function V(c, v) {
462
- var e, n, o;
463
- (e = x.onMovingStart) == null || e.call(x), l.current.moving = !0, l.current.startX = v.pageX, l.current.startY = v.pageY, l.current.direction = c;
464
- const { top: p, left: R, right: D, bottom: t } = l.current.padding;
465
- l.current.startWidth = i(
466
- (n = w.current) == null ? void 0 : n.clientWidth,
467
- R + D
468
- ), l.current.startHeight = i(
469
- (o = w.current) == null ? void 0 : o.clientHeight,
470
- p + t
471
- ), $(window, "mousemove", _), $(window, "touchmove", _), $(window, "mouseup", B), $(window, "touchend", B), $(window, "contextmenu", B), A(
472
- I(c) ? "row-resize" : "col-resize"
84
+ function Q(t, e) {
85
+ var i, m, d;
86
+ (i = r.onMovingStart) == null || i.call(r), o.current.moving = !0, o.current.startX = e.pageX, o.current.startY = e.pageY, o.current.direction = t;
87
+ const { top: n, left: c, right: a, bottom: s } = o.current.padding;
88
+ o.current.startWidth = O(
89
+ (m = p.current) == null ? void 0 : m.clientWidth,
90
+ c + a
91
+ ), o.current.startHeight = O(
92
+ (d = p.current) == null ? void 0 : d.clientHeight,
93
+ n + s
94
+ ), g(window, "mousemove", h), g(window, "touchmove", h), g(window, "mouseup", u), g(window, "touchend", u), g(window, "contextmenu", u), D(
95
+ R(t) ? "row-resize" : "col-resize"
473
96
  );
474
97
  }
475
- function _(c) {
476
- var s;
477
- if (!l.current.moving)
478
- return !1;
479
- const { startX: v, startY: p, startWidth: R, startHeight: D } = l.current;
480
- let t = R, e = D;
481
- const n = c.pageX - v, o = c.pageY - p;
482
- switch (l.current.direction) {
483
- case At:
484
- t = R - n, tt(t);
98
+ function h(t) {
99
+ var S;
100
+ if (!o.current.moving) return !1;
101
+ const { startX: e, startY: n, startWidth: c, startHeight: a } = o.current;
102
+ let s = c, i = a;
103
+ const m = t.pageX - e, d = t.pageY - n;
104
+ switch (o.current.direction) {
105
+ case $:
106
+ s = c - m, N(s);
485
107
  break;
486
- case pt:
487
- t = R + n, tt(t);
108
+ case b:
109
+ s = c + m, N(s);
488
110
  break;
489
- case xt:
490
- e = D - o, O(e);
111
+ case z:
112
+ i = a - d, M(i);
491
113
  break;
492
- case Rt:
493
- e = D + o, O(e);
114
+ case y:
115
+ i = a + d, M(i);
494
116
  break;
495
117
  }
496
- (s = x.onMoving) == null || s.call(x, c, {
497
- width: t,
498
- height: e
118
+ (S = r.onMoving) == null || S.call(r, t, {
119
+ width: s,
120
+ height: i
499
121
  });
500
122
  }
501
- function B() {
502
- var c;
503
- l.current.moving = !1, L(), A(), (c = x.onMovingEnd) == null || c.call(x);
123
+ function u() {
124
+ var t;
125
+ o.current.moving = !1, Z(), D(), (t = r.onMovingEnd) == null || t.call(r);
504
126
  }
505
- function L() {
506
- y(window, "mousemove", _), y(window, "touchmove", _), y(window, "mouseup", B), y(window, "touchend", B), y(window, "contextmenu", B);
127
+ function Z() {
128
+ l(window, "mousemove", h), l(window, "touchmove", h), l(window, "mouseup", u), l(window, "touchend", u), l(window, "contextmenu", u);
507
129
  }
508
- function G(c, v) {
509
- const p = I(c), { contentRect: R } = v[0], D = `${c.slice(0, 1).toUpperCase()}${c.slice(1)}`, t = R[p ? "height" : "width"];
510
- l.current.padding[c] = t, Q((e) => ({
511
- ...e,
512
- [`padding${D}`]: t
130
+ function tt(t, e) {
131
+ const n = R(t), { contentRect: c } = e[0], a = `${t.slice(0, 1).toUpperCase()}${t.slice(1)}`, s = c[n ? "height" : "width"];
132
+ o.current.padding[t] = s, J((i) => ({
133
+ ...i,
134
+ [`padding${a}`]: s
513
135
  }));
514
136
  }
515
- const j = {
516
- ...P,
517
- ...J || {},
518
- ...vt(U) ? { width: U } : {},
519
- ...vt(h) ? { height: h } : {}
137
+ const et = {
138
+ ...V,
139
+ ...P || {},
140
+ ...E(I) ? { width: I } : {},
141
+ ...E(H) ? { height: H } : {}
520
142
  };
521
- return /* @__PURE__ */ ut(
522
- W,
143
+ return /* @__PURE__ */ ot(
144
+ _,
523
145
  {
524
- ...zt(M, ["onMovingStart", "onMoving", "onMovingEnd"]),
525
- style: j,
526
- className: S,
527
- ref: w,
146
+ ...mt(K, ["onMovingStart", "onMoving", "onMovingEnd"]),
147
+ style: et,
148
+ className: U,
149
+ ref: p,
528
150
  children: [
529
- rt,
530
- T.map((c) => {
531
- if (jt.indexOf(c) !== -1)
532
- return /* @__PURE__ */ m(
533
- Mt,
151
+ G,
152
+ L.map((t) => {
153
+ if (pt.indexOf(t) !== -1)
154
+ return /* @__PURE__ */ rt(
155
+ dt,
534
156
  {
535
- className: `${f}-direction-${c}`,
536
- direction: I(c) ? "horizontal" : "vertical",
537
- icon: K[c],
538
- onMouseDown: (v) => {
539
- V(c, v);
157
+ className: `${v}-direction-${t}`,
158
+ direction: R(t) ? "horizontal" : "vertical",
159
+ icon: A[t],
160
+ onMouseDown: (e) => {
161
+ Q(t, e);
540
162
  },
541
- onResize: (v) => {
542
- G(c, v);
163
+ onResize: (e) => {
164
+ tt(t, e);
543
165
  },
544
- children: z[c]
166
+ children: j[t]
545
167
  },
546
- c
168
+ t
547
169
  );
548
170
  })
549
171
  ]
550
172
  }
551
173
  );
552
174
  }
553
- const Kt = Ct(Jt), Ot = Kt;
554
- Ot.Split = Et;
555
- Ot.SplitGroup = Ht;
556
- Ot.displayName = "ResizeBox";
175
+ const Rt = nt(vt), x = Rt;
176
+ x.Split = gt;
177
+ x.SplitGroup = lt;
178
+ x.displayName = "ResizeBox";
557
179
  export {
558
- Ot as default
180
+ x as default
559
181
  };