@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/chunk/CN4zXU4b.js DELETED
@@ -1,877 +0,0 @@
1
- import { jsx as u, jsxs as et } from "react/jsx-runtime";
2
- import ft from "lodash/isFunction";
3
- import kt from "lodash/isPlainObject";
4
- import F, { useContext as nt, useRef as j, useState as wt, useEffect as Y, useMemo as at, useCallback as ce, useImperativeHandle as le } from "react";
5
- import "./C6Kfwj0f.js";
6
- import { a as mt, I as pt } from "./Dr0iXIXO.js";
7
- import se from "../hooks/useId.js";
8
- import fe from "../hooks/useMergeProps.js";
9
- import de from "../hooks/useMergeValue.js";
10
- import M from "@unicom-cloud/utils/class-name";
11
- import dt from "../utils/omit.js";
12
- import ue from "@unicom-cloud/icons/IconUiPlus";
13
- import Tt from "lodash/isNumber";
14
- import he from "lodash/throttle";
15
- import { on as st, off as At } from "../utils/dom.js";
16
- import { Enter as Yt } from "../utils/keyCode.js";
17
- import { setTransformStyle as me } from "../utils/style.js";
18
- import jt from "@unicom-cloud/icons/IconUiDown";
19
- import Ut from "lodash/isNull";
20
- import pe from "../Dropdown.js";
21
- import "./RnTpOC5-.js";
22
- import "../Trigger.js";
23
- import "../Tooltip.js";
24
- import { M as Mt } from "./CLzbve11.js";
25
- import ge from "lodash/isEqualWith";
26
- import be from "../utils/throttleByRaf.js";
27
- import Et from "@unicom-cloud/icons/IconUiLeft";
28
- import Bt from "@unicom-cloud/icons/IconUiRight";
29
- import ve from "@unicom-cloud/icons/IconUiUp";
30
- import $e from "@unicom-cloud/icons/IconUiClose";
31
- function ye(e) {
32
- const {
33
- animation: r,
34
- activeTab: o,
35
- prefixCls: n,
36
- paneChildren: a,
37
- direction: s,
38
- lazyload: i,
39
- destroyOnHide: y
40
- } = e, h = a.findIndex((l) => l.key === o), b = nt(Rt), { rtl: w } = nt(mt);
41
- if (a.every((l) => (l == null ? void 0 : l.props) && (!("children" in l.props) || l.props.children === null)))
42
- return null;
43
- const f = M(`${n}-content-inner`, {
44
- [`${n}-animation`]: r
45
- });
46
- return /* @__PURE__ */ u("div", { className: `${n}-content ${n}-content-${s}`, children: /* @__PURE__ */ u(
47
- "div",
48
- {
49
- className: f,
50
- style: w ? { marginRight: `-${h * 100}%` } : { marginLeft: `-${h * 100}%` },
51
- children: a.map((l, x) => {
52
- const { tabpane: v, tab: $ } = b.getIdPrefix(x), d = "destroyOnHide" in l.props ? l.props.destroyOnHide : y, c = l.key === o;
53
- return /* @__PURE__ */ u(
54
- "div",
55
- {
56
- className: M(`${n}-content-item`, {
57
- [`${n}-content-item-active`]: c
58
- }),
59
- role: "tabpanel",
60
- id: v,
61
- "aria-hidden": c ? void 0 : !0,
62
- tabIndex: c ? 0 : -1,
63
- "aria-labelledby": $,
64
- children: h !== x && d ? null : F.cloneElement(l, {
65
- lazyload: i,
66
- isActive: c
67
- })
68
- },
69
- l.key
70
- );
71
- })
72
- }
73
- ) });
74
- }
75
- function Te(e, r) {
76
- const o = j(!1), { getPrefixCls: n } = nt(mt), { children: a, className: s, style: i, lazyload: y, isActive: h, ...b } = e, w = n("tabs");
77
- return o.current = y ? o.current || h : !0, o.current && /* @__PURE__ */ u(
78
- "div",
79
- {
80
- ref: r,
81
- ...dt(b, ["destroyOnHide", "title", "closable"]),
82
- className: M(`${w}-pane`, s),
83
- style: i,
84
- children: a
85
- }
86
- );
87
- }
88
- const Ct = F.forwardRef(Te);
89
- Ct.displayName = "TabPane";
90
- Ct.isTabPane = !0;
91
- function it() {
92
- const e = j(), [r, o] = wt({
93
- height: 0,
94
- width: 0
95
- });
96
- return Y(() => {
97
- e.current && o({
98
- height: e.current.offsetHeight,
99
- width: e.current.offsetWidth,
100
- domRect: e.current.getBoundingClientRect()
101
- });
102
- }, []), [e, r, o];
103
- }
104
- function we(e) {
105
- const {
106
- headerWrapperRef: r,
107
- headerOffset: o,
108
- align: n,
109
- isScrollable: a,
110
- direction: s,
111
- onScroll: i
112
- } = e;
113
- function y(d, c) {
114
- let T = 0;
115
- s === "vertical" ? T = o + c : T = n === "left" ? o + d : o - d, i == null || i(T);
116
- }
117
- const h = j("x");
118
- function b(d) {
119
- if (!a)
120
- return;
121
- d.preventDefault();
122
- const { deltaX: c, deltaY: T } = d;
123
- let N = 0;
124
- const I = Math.abs(c), P = Math.abs(T);
125
- I === P ? N = h.current === "x" ? c : T : I > P ? (N = c, h.current = "x") : (N = T, h.current = "y"), y(N, N);
126
- }
127
- const w = j({
128
- clientX: 0,
129
- clientY: 0
130
- }), f = (d) => d && d.touches && d.touches.length && d.touches[0], l = (d) => {
131
- d.cancelable && d.preventDefault();
132
- const c = f(d);
133
- if (!c)
134
- return;
135
- const { clientX: T, clientY: N } = w.current, I = c.clientX - T, P = c.clientY - N;
136
- y(-I, -P);
137
- }, x = () => {
138
- At(document.documentElement, "touchmove", l), At(document.documentElement, "touchend", x);
139
- }, v = (d) => {
140
- if (!a)
141
- return;
142
- const c = f(d);
143
- c && (w.current = {
144
- clientX: c.clientX,
145
- clientY: c.clientY
146
- }, st(document.documentElement, "touchmove", l, { passive: !1 }), st(window, "touchend", x, { passive: !1 }));
147
- }, $ = j(null);
148
- $.current = { onWheel: b, onTouchStart: v }, Y(() => {
149
- st(
150
- r.current,
151
- "wheel",
152
- (d) => {
153
- $.current.onWheel(d);
154
- },
155
- { passive: !1 }
156
- ), st(
157
- r.current,
158
- "touchstart",
159
- (d) => {
160
- $.current.onTouchStart(d);
161
- },
162
- { passive: !0 }
163
- );
164
- }, [r.current]);
165
- }
166
- const St = (e, r) => {
167
- const o = e.getBoundingClientRect(), n = r.getBoundingClientRect(), a = r.offsetWidth / n.width, s = r.offsetHeight / n.height;
168
- return {
169
- left: (o.left - n.left) * a,
170
- top: (o.top - n.top) * s,
171
- right: (o.right - n.right) * a,
172
- bottom: (o.bottom - n.bottom) * s
173
- };
174
- }, xe = (e, r) => {
175
- const o = e.scrollLeft, n = e.scrollTop;
176
- r === "horizontal" && o && e.scrollTo({ left: -1 * o }), r === "vertical" && n && e.scrollTo({ top: -1 * n });
177
- }, zt = ({ onPressEnter: e }) => ({
178
- onKeyDown: (r) => {
179
- r.key === Yt.key && e(r);
180
- }
181
- });
182
- function ke(e) {
183
- const {
184
- prefixCls: r,
185
- currentOffset: o,
186
- headerSize: n,
187
- headerWrapperSize: a,
188
- getTitleRef: s,
189
- paneChildren: i,
190
- direction: y,
191
- icon: h
192
- } = e, b = i.map((v) => v.key), w = y === "vertical" ? n.height : n.width, f = y === "vertical" ? a.height : a.width, l = at(() => {
193
- const v = {}, $ = a.domRect;
194
- return b.map((d) => {
195
- const c = s(d);
196
- if (!c)
197
- return;
198
- const T = c.getBoundingClientRect();
199
- v[d] = {
200
- left: T.left - $.left,
201
- right: T.left - $.left + T.width,
202
- top: T.top - $.top,
203
- bottom: T.top - $.top + T.height
204
- };
205
- }), v;
206
- }, [b.join(","), w, f]), x = at(() => {
207
- let v = -1, $ = -1;
208
- for (const d in l) {
209
- const { left: c, right: T } = l[d];
210
- if (c >= o && T - o <= f && v === -1 && (v = b.indexOf(d), $ = v), c >= o && T - o > f) {
211
- $ = b.indexOf(d);
212
- break;
213
- }
214
- }
215
- return [v, $];
216
- }, [l, b.join(","), o]);
217
- return Ut(h) ? null : /* @__PURE__ */ u(
218
- pe,
219
- {
220
- trigger: "click",
221
- droplist: /* @__PURE__ */ u(Mt, { onClickMenuItem: e.onClickTab, children: i.map((v, $) => {
222
- if ($ < x[0] || $ >= x[1])
223
- return /* @__PURE__ */ u(Mt.Item, { disabled: v.disabled, children: v.props.title }, v.key);
224
- }) }),
225
- children: /* @__PURE__ */ u(
226
- pt,
227
- {
228
- role: "button",
229
- "aria-label": "expand tabs",
230
- prefix: `${r}-dropdown`,
231
- className: `${r}-dropdown-icon`,
232
- children: h || /* @__PURE__ */ u(jt, {})
233
- }
234
- )
235
- }
236
- );
237
- }
238
- const Ce = (e, r, o) => {
239
- let n = { left: "", width: "", top: "", height: "" };
240
- if (r) {
241
- const a = St(r, o);
242
- e === "vertical" ? n = {
243
- top: `${a.top}px`,
244
- height: `${r.offsetHeight}px`,
245
- left: "",
246
- width: ""
247
- } : n = {
248
- left: `${a.left}px`,
249
- width: `${r.offsetWidth}px`,
250
- top: "",
251
- height: ""
252
- };
253
- }
254
- return n;
255
- }, Se = ({
256
- prefixCls: e,
257
- animation: r,
258
- disabled: o,
259
- direction: n,
260
- getTitleRef: a,
261
- activeTab: s,
262
- getHeaderRef: i,
263
- inkBarSize: y
264
- }) => {
265
- const h = j(), b = j();
266
- return Y(() => {
267
- const w = be(() => {
268
- const f = a(s), l = Ce(
269
- n,
270
- f,
271
- i("headerRef").current
272
- );
273
- l && !ge(b.current, l) && (b.current = l, h.current && Object.keys(l).forEach((x) => {
274
- h.current.style[x] = l[x];
275
- }));
276
- });
277
- return w(), () => {
278
- var f;
279
- (f = w.cancel) == null || f.call(w);
280
- };
281
- }), /* @__PURE__ */ u(
282
- "div",
283
- {
284
- className: M(`${e}-header-ink`, {
285
- [`${e}-header-ink-no-animation`]: !r,
286
- [`${e}-header-ink-disabled`]: o,
287
- [`${e}-header-ink-custom`]: y
288
- }),
289
- ref: h,
290
- children: y && /* @__PURE__ */ u("div", { style: y, className: `${e}-header-ink-inner` })
291
- }
292
- );
293
- }, Pe = {
294
- prev: "left",
295
- next: "right"
296
- }, Re = {
297
- prev: "up",
298
- next: "down"
299
- }, Lt = (e) => {
300
- const {
301
- direction: r,
302
- headerSize: o,
303
- headerWrapperSize: n,
304
- prefixCls: a,
305
- iconPos: s,
306
- currentOffset: i,
307
- align: y,
308
- rtl: h,
309
- icon: b
310
- } = e, { height: w, width: f } = n, { height: l, width: x } = o, v = l - w, $ = x - f, d = {
311
- up: /* @__PURE__ */ u(ve, {}),
312
- down: /* @__PURE__ */ u(jt, {}),
313
- left: h ? /* @__PURE__ */ u(Bt, {}) : /* @__PURE__ */ u(Et, {}),
314
- right: h ? /* @__PURE__ */ u(Et, {}) : /* @__PURE__ */ u(Bt, {})
315
- }, c = (H) => {
316
- var m;
317
- H !== e.currentOffset && ((m = e == null ? void 0 : e.onChange) == null || m.call(e, H));
318
- }, T = (H, m) => {
319
- H.preventDefault();
320
- let C;
321
- y === "left" ? C = m === "left" ? i - f : i + f : C = m === "left" ? i + f : i - f, c(C);
322
- }, N = (H, m) => {
323
- H.preventDefault();
324
- let C;
325
- if (m === "up")
326
- C = i - w;
327
- else if (C = i + w, C >= l)
328
- return;
329
- c(C);
330
- }, I = at(() => y === "left" ? i <= 0 : r === "vertical" ? i >= v : i >= $, [y, r, i, $, i]), P = at(() => y === "left" ? r === "vertical" ? i >= v : i >= $ : i <= 0, [y, r, v, $, i]);
331
- if (Ut(b))
332
- return null;
333
- const E = r === "horizontal" ? Pe[s] : Re[s], K = s === "prev" ? I : P, _ = M(`${a}-${E}-icon`, {
334
- [`${a}-nav-icon-disabled`]: K
335
- }), U = r === "vertical" ? N : T;
336
- return /* @__PURE__ */ u(
337
- pt,
338
- {
339
- disabled: K,
340
- className: _,
341
- prefix: a,
342
- onClick: (H) => U(H, E),
343
- children: b || d[E]
344
- }
345
- );
346
- }, Ne = ({
347
- prefixCls: e,
348
- onDeleteTab: r,
349
- tabKey: o,
350
- isActive: n,
351
- onClickTab: a,
352
- disabled: s = !1,
353
- title: i,
354
- editable: y,
355
- renderTitle: h,
356
- deleteIcon: b,
357
- deleteButton: w,
358
- getIdPrefix: f,
359
- index: l
360
- }, x) => {
361
- const v = ft(h) ? h : (c) => c, $ = (c) => {
362
- c.stopPropagation(), !s && r();
363
- }, d = (c) => {
364
- s || a(c);
365
- };
366
- return v(
367
- /* @__PURE__ */ et(
368
- "div",
369
- {
370
- ref: x,
371
- className: M(`${e}-header-title`, {
372
- [`${e}-header-title-active`]: n,
373
- [`${e}-header-title-editable`]: y,
374
- [`${e}-header-title-disabled`]: s
375
- }),
376
- role: "tab",
377
- "aria-selected": n,
378
- tabIndex: s ? -1 : 0,
379
- "aria-disabled": s || void 0,
380
- id: f(l).tab,
381
- "aria-controls": f(l).tabpane,
382
- onClick: d,
383
- onKeyDown: (c) => {
384
- c.key === Yt.key && d(c);
385
- },
386
- children: [
387
- /* @__PURE__ */ u("span", { className: `${e}-header-title-text`, children: i }),
388
- y && /* @__PURE__ */ u(
389
- "span",
390
- {
391
- role: "button",
392
- "aria-label": "remove tab",
393
- "aria-disabled": s || void 0,
394
- tabIndex: s ? -1 : 0,
395
- className: `${e}-close-icon`,
396
- ...zt({ onPressEnter: $ }),
397
- onClick: $,
398
- children: w || /* @__PURE__ */ u(pt, { prefix: e, children: b || /* @__PURE__ */ u($e, {}) })
399
- }
400
- )
401
- ]
402
- },
403
- o
404
- ),
405
- {
406
- key: o,
407
- isActive: n,
408
- disabled: s,
409
- editable: y
410
- }
411
- );
412
- }, Ie = F.forwardRef(Ne), Pt = "vertical", ut = "right", ht = "left", Xt = {
413
- delete: !0,
414
- add: !0
415
- }, He = ({
416
- direction: e,
417
- align: r = ht,
418
- headerOffset: o
419
- }) => {
420
- let n = `translateX(${-o}px)`;
421
- return r === ut && (n = `translateX(${o}px)`), e === Pt && (n = `translateY(${-o}px)`), me(n);
422
- }, De = ({
423
- direction: e,
424
- align: r = ht,
425
- headerDom: o,
426
- headerWrapperDom: n
427
- }) => {
428
- const a = St(o, n);
429
- return e === Pt ? -a.top : r === ut ? a.right : -a.left;
430
- }, xt = F.forwardRef((e, r) => {
431
- const o = nt(Rt), { rtl: n } = nt(mt), a = { ...e, ...o }, [s, i, y] = it(), [h, b, w] = it(), [f, l, x] = it(), [v, $, d] = it(), [c, T, N] = it(), I = j({}), [P, E] = wt(0), [K, _] = wt(!0), {
432
- paneChildren: U,
433
- editable: H,
434
- prefixCls: m,
435
- onAddTab: C,
436
- direction: S,
437
- type: D = "line",
438
- overflow: O = "scroll",
439
- activeTab: ot,
440
- showAddButton: Kt,
441
- size: _t = "default",
442
- style: Ft,
443
- tabPosition: Gt,
444
- className: qt,
445
- extra: Nt,
446
- animation: Jt,
447
- icons: R,
448
- deleteButton: Qt,
449
- addButton: Zt,
450
- renderTabTitle: te,
451
- scrollAfterEdit: It,
452
- scrollPosition: B = "auto",
453
- inkBarSize: ee
454
- } = a, Ht = kt(It) ? { ...Xt, ...It } : Xt, [ne, oe] = n ? [ut, ht] : [ht, ut], G = D === "capsule" ? oe : ne, z = at(() => {
455
- const t = l.height - $.height - T.height, p = l.width - $.width - T.width;
456
- return a.direction === "vertical" ? t < b.height : p < b.width;
457
- }, [
458
- a.direction,
459
- l,
460
- $,
461
- b,
462
- T
463
- ]), re = () => {
464
- if (f.current) {
465
- const t = f.current;
466
- x({
467
- height: t.offsetHeight,
468
- width: t.offsetWidth
469
- });
470
- }
471
- }, ct = (t) => he((p) => {
472
- re();
473
- const g = p[0] && p[0].target;
474
- g && t({
475
- height: g.offsetHeight,
476
- width: g.offsetWidth,
477
- domRect: g.getBoundingClientRect()
478
- });
479
- }, 200), q = ct(y), J = ct(w), Q = ct(d), Z = ct(N), gt = ce(
480
- (t) => {
481
- const p = S === Pt ? b.height - i.height : b.width - i.width;
482
- let g = t;
483
- return g = Math.min(p, g), g = Math.max(g, 0), g;
484
- },
485
- [S, b, i]
486
- ), bt = (t) => {
487
- const p = gt(t);
488
- p !== P && E(p);
489
- };
490
- Y(() => () => {
491
- var t, p, g, k;
492
- (t = J == null ? void 0 : J.cancel) == null || t.call(J), (p = q == null ? void 0 : q.cancel) == null || p.call(q), (g = Q == null ? void 0 : Q.cancel) == null || g.call(Q), (k = Z == null ? void 0 : Z.cancel) == null || k.call(Z);
493
- }, []), Y(() => {
494
- if (!K) {
495
- _(!0);
496
- return;
497
- }
498
- const t = () => {
499
- const g = I.current[ot];
500
- if (!g || !z)
501
- return 0;
502
- const k = St(g, s.current), L = De({
503
- direction: S,
504
- align: G,
505
- headerDom: h.current,
506
- headerWrapperDom: s.current
507
- });
508
- if (S === "vertical") {
509
- let X = L, W = B;
510
- const A = L + k.top, V = L + k.bottom;
511
- return W === "auto" && (W = k.top < 0 ? "start" : k.bottom > 0 ? "end" : B), W === "start" ? X = A : W === "end" ? X = V : W === "center" ? X = A - (k.top - k.bottom) / 2 : Tt(W) && (X = Math.max(A - W, V)), X;
512
- }
513
- if (G === "right") {
514
- const X = L - k.left, W = L - k.right;
515
- let A = B, V = L;
516
- return B === "auto" && (A = k.left < 0 ? "start" : k.right > 0 ? "end" : B), A === "start" ? V = X : A === "end" ? V = W : A === "center" ? V = X + (k.left - k.right) / 2 : Tt(A) && (V = Math.min(X + A, W)), V;
517
- }
518
- let rt = L, tt = B;
519
- const yt = L + k.left, Wt = L + k.right;
520
- return B === "auto" && (tt = k.left < 0 ? "start" : k.right > 0 ? "end" : B), tt === "start" ? rt = yt : tt === "end" ? rt = Wt : tt === "center" ? rt = yt - (k.left - k.right) / 2 : Tt(tt) && (rt = Math.max(yt - tt, Wt)), rt;
521
- };
522
- xe(s.current, S);
523
- let p = t();
524
- p = gt(p), E(p);
525
- }, [
526
- ot,
527
- S,
528
- O,
529
- z,
530
- D,
531
- gt,
532
- B
533
- ]);
534
- const ie = He({
535
- direction: S,
536
- align: G,
537
- headerOffset: P
538
- }), vt = z && O === "dropdown" && S !== "vertical", $t = z && !vt, lt = H && (D === "card" || D === "card-gutter" || D === "line"), ae = (t) => {
539
- var p;
540
- (p = a.onDeleteTab) == null || p.call(a, t.key), _(Ht.delete);
541
- }, Dt = () => {
542
- C == null || C(), _(Ht.add);
543
- };
544
- Y(() => {
545
- let t;
546
- return c.current && (t = new ResizeObserver(Z), t.observe(c.current)), () => {
547
- var p, g;
548
- c.current && ((p = t == null ? void 0 : t.unobserve) == null || p.call(t, c.current)), (g = t == null ? void 0 : t.disconnect) == null || g.call(t), t = null;
549
- };
550
- }, [c.current]), Y(() => {
551
- let t;
552
- return s.current && (t = new ResizeObserver(q), t.observe(s.current)), () => {
553
- var p, g;
554
- s.current && ((p = t == null ? void 0 : t.unobserve) == null || p.call(t, s.current)), (g = t == null ? void 0 : t.disconnect) == null || g.call(t), t = null;
555
- };
556
- }, [s.current]), Y(() => {
557
- let t;
558
- return h.current && (t = new ResizeObserver(J), t.observe(h.current)), () => {
559
- var p, g;
560
- h.current && ((p = t == null ? void 0 : t.unobserve) == null || p.call(t, h.current)), (g = t == null ? void 0 : t.disconnect) == null || g.call(t), t = null;
561
- };
562
- }, [h.current]), Y(() => {
563
- let t;
564
- return v.current && (t = new ResizeObserver(Q), t.observe(v.current)), () => {
565
- var p, g;
566
- v.current && ((p = t == null ? void 0 : t.unobserve) == null || p.call(t, v.current)), (g = t == null ? void 0 : t.disconnect) == null || g.call(t), t = null;
567
- };
568
- }, [v.current]);
569
- const Ot = (t) => t && Kt && /* @__PURE__ */ u(
570
- "div",
571
- {
572
- className: `${m}-add-icon`,
573
- "aria-label": "add tab",
574
- tabIndex: 0,
575
- role: "button",
576
- ref: c,
577
- onClick: Dt,
578
- ...zt({ onPressEnter: Dt }),
579
- children: Zt || /* @__PURE__ */ u(pt, { prefix: `${m}-add`, children: /* @__PURE__ */ u("span", { className: `${m}-add`, children: (R == null ? void 0 : R.add) || /* @__PURE__ */ u(ue, {}) }) })
580
- }
581
- );
582
- return we({
583
- headerWrapperRef: s,
584
- headerOffset: P,
585
- align: G,
586
- direction: S,
587
- isScrollable: z,
588
- onScroll(t) {
589
- bt(t);
590
- }
591
- }), /* @__PURE__ */ u(
592
- "div",
593
- {
594
- className: M(
595
- `${m}-header-nav`,
596
- `${m}-header-nav-${S}`,
597
- `${m}-header-nav-${Gt}`,
598
- `${m}-header-size-${_t}`,
599
- `${m}-header-nav-${D}`,
600
- { [`${m}-header-nav-sticky`]: a.headerSticky },
601
- // 潘启宝添加
602
- qt
603
- ),
604
- style: { ...Ft, ...a.headerSticky },
605
- ref: r,
606
- children: /* @__PURE__ */ et(
607
- "div",
608
- {
609
- className: M(`${m}-header-scroll`, {
610
- [`${m}-header-overflow-scroll`]: $t,
611
- [`${m}-header-overflow-dropdown`]: vt
612
- }),
613
- ref: f,
614
- children: [
615
- $t && /* @__PURE__ */ u(
616
- Lt,
617
- {
618
- iconPos: "prev",
619
- rtl: n,
620
- icon: R == null ? void 0 : R.prev,
621
- prefixCls: m,
622
- currentOffset: P,
623
- headerSize: b,
624
- headerWrapperSize: i,
625
- direction: S,
626
- align: G,
627
- onChange: bt
628
- }
629
- ),
630
- /* @__PURE__ */ et("div", { className: `${m}-header-wrapper`, ref: s, children: [
631
- /* @__PURE__ */ et(
632
- "div",
633
- {
634
- className: M(`${m}-header`, {
635
- [`${m}-header-no-padding`]: !e.headerPadding && S === "horizontal" && ["line", "text"].indexOf(D) > -1
636
- }),
637
- ref: h,
638
- style: ie,
639
- children: [
640
- U.map((t, p) => /* @__PURE__ */ u(
641
- Ie,
642
- {
643
- ref: (g) => {
644
- I.current[t.key] = g;
645
- },
646
- tabKey: t.key,
647
- ...t.props,
648
- prefixCls: m,
649
- onDeleteTab: () => ae(t),
650
- renderTitle: e.children || te,
651
- onClickTab: () => {
652
- var g;
653
- (g = a.onClickTab) == null || g.call(a, t.key);
654
- },
655
- isActive: ot === t.key,
656
- editable: lt && t.props.closable !== !1,
657
- deleteIcon: R == null ? void 0 : R.delete,
658
- deleteButton: Qt,
659
- getIdPrefix: o.getIdPrefix,
660
- index: p
661
- },
662
- p
663
- )),
664
- D === "line" && /* @__PURE__ */ u(
665
- Se,
666
- {
667
- disabled: !!U.find(
668
- (t) => t && t.props && t.props.disabled && t.key === ot
669
- ),
670
- prefixCls: m,
671
- animation: Jt,
672
- direction: S,
673
- getTitleRef: (t) => I.current[t],
674
- activeTab: ot,
675
- getHeaderRef: () => h,
676
- inkBarSize: ee
677
- }
678
- )
679
- ]
680
- }
681
- ),
682
- !z && Ot(lt)
683
- ] }),
684
- $t && /* @__PURE__ */ u(
685
- Lt,
686
- {
687
- prefixCls: m,
688
- rtl: n,
689
- iconPos: "next",
690
- icon: R == null ? void 0 : R.next,
691
- currentOffset: P,
692
- headerSize: b,
693
- headerWrapperSize: i,
694
- direction: S,
695
- align: G,
696
- onChange: bt
697
- }
698
- ),
699
- vt && /* @__PURE__ */ u(
700
- ke,
701
- {
702
- onClickTab: a.onClickTab,
703
- paneChildren: U,
704
- prefixCls: m,
705
- currentOffset: P,
706
- headerSize: b,
707
- icon: R == null ? void 0 : R.dropdown,
708
- headerWrapperSize: i,
709
- getTitleRef: (t) => I.current[t],
710
- direction: S
711
- }
712
- ),
713
- (lt && z || Nt) && /* @__PURE__ */ et("div", { className: `${m}-header-extra`, ref: v, children: [
714
- z && Ot(lt),
715
- Nt
716
- ] })
717
- ]
718
- }
719
- )
720
- }
721
- );
722
- });
723
- xt.displayName = "TabHeader";
724
- const Oe = ["mini", "small", "default", "large"], We = (e) => {
725
- const { children: r } = e, o = [];
726
- return F.Children.forEach(r, (n) => {
727
- n && n.type && n.type.isTabPane && o.push(n);
728
- }), o;
729
- }, Ae = (e) => {
730
- const { direction: r, tabPosition: o, animation: n } = e;
731
- return r === "vertical" || o === "left" || o === "right" ? !1 : kt(n) ? "tabPane" in n ? n.tabPane : !1 : n;
732
- }, Me = {
733
- tabPosition: "top",
734
- type: "line",
735
- overflow: "scroll",
736
- showAddButton: !0,
737
- lazyload: !0,
738
- headerPadding: !0,
739
- scrollPosition: "auto"
740
- }, Rt = F.createContext({});
741
- function Ee(e, r) {
742
- const {
743
- getPrefixCls: o,
744
- size: n,
745
- componentConfig: a,
746
- rtl: s
747
- } = nt(mt), i = fe(
748
- e,
749
- Me,
750
- a == null ? void 0 : a.Tabs
751
- ), y = We(i), h = j(null), [b, w] = de(
752
- y[0] && y[0].key,
753
- {
754
- defaultValue: "defaultActiveTab" in i ? i.defaultActiveTab : void 0,
755
- value: "activeTab" in i ? i.activeTab : void 0
756
- }
757
- ), f = o("tabs"), l = i.size || (Oe.indexOf(n) > -1 ? n : "default"), {
758
- animation: x,
759
- className: v,
760
- direction: $,
761
- style: d,
762
- type: c,
763
- justify: T,
764
- destroyOnHide: N,
765
- lazyload: I,
766
- headerSticky: P,
767
- // 潘启宝添加
768
- onChange: E,
769
- onClickTab: K,
770
- onDeleteTab: _,
771
- renderTabHeader: U,
772
- ...H
773
- } = i, m = se(`${f}-`), C = $ === "vertical" ? "left" : i.tabPosition, S = {
774
- animation: kt(x) && "inkBar" in x ? x.inkBar : !0,
775
- activeTab: b,
776
- tabPosition: C,
777
- direction: ["left", "right"].indexOf(C) > -1 ? "vertical" : "horizontal",
778
- paneChildren: y,
779
- onClickTab: (O) => {
780
- ft(K) && K(O), O !== b && ("activeTab" in i || w(O), ft(E) && E(O));
781
- },
782
- onDeleteTab: _,
783
- prefixCls: f
784
- };
785
- le(r, () => h, []);
786
- const D = /* @__PURE__ */ u(
787
- ye,
788
- {
789
- direction: ["left", "right"].indexOf(C) > -1 ? "vertical" : "horizontal",
790
- animation: Ae(i),
791
- activeTab: b,
792
- paneChildren: y,
793
- prefixCls: f,
794
- destroyOnHide: N,
795
- lazyload: I
796
- }
797
- );
798
- return /* @__PURE__ */ u(
799
- "div",
800
- {
801
- ...dt(H, [
802
- "headerPadding",
803
- "tabPosition",
804
- "defaultActiveTab",
805
- "showAddButton",
806
- "extra",
807
- "onAddTab",
808
- "activeTab",
809
- "overflow",
810
- "editable",
811
- "renderTabTitle",
812
- "addButton",
813
- "deleteButton",
814
- "icons",
815
- "children",
816
- "size",
817
- "type",
818
- "scrollPosition",
819
- "offsetAlign"
820
- ]),
821
- style: d,
822
- className: M(
823
- f,
824
- `${f}-${["left", "right"].indexOf(C) > -1 ? "vertical" : "horizontal"}`,
825
- `${f}-${c}`,
826
- !!P && `${f}-sticky`,
827
- // 潘启宝添加
828
- `${f}-${C}`,
829
- `${f}-size-${l}`,
830
- {
831
- [`${f}-justify`]: T,
832
- [`${f}-rtl`]: s
833
- },
834
- v
835
- ),
836
- ref: h,
837
- children: /* @__PURE__ */ et(
838
- Rt.Provider,
839
- {
840
- value: {
841
- ...S,
842
- getIdPrefix: (O) => ({
843
- tab: m && `${m}-tab-${O}`,
844
- tabpane: m && `${m}-panel-${O}`
845
- })
846
- },
847
- children: [
848
- C === "bottom" && D,
849
- ft(U) ? U(
850
- {
851
- ...dt(i, ["children", "style", "className"]),
852
- size: l,
853
- ...S
854
- },
855
- xt
856
- ) : /* @__PURE__ */ u(
857
- xt,
858
- {
859
- ...dt(i, ["children", "style", "className"]),
860
- size: l
861
- }
862
- ),
863
- C !== "bottom" && D
864
- ]
865
- }
866
- )
867
- }
868
- );
869
- }
870
- const Be = F.forwardRef(
871
- Ee
872
- ), Vt = Be;
873
- Vt.displayName = "Tabs";
874
- Vt.TabPane = Ct;
875
- export {
876
- Vt as T
877
- };