@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
@@ -0,0 +1,55 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { forwardRef as d, useState as s, useImperativeHandle as k } from "react";
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ import x from "../Modal.js";
7
+ function C(a, l) {
8
+ const [f, t] = s(!0), [e, n] = s(a);
9
+ k(l, () => ({
10
+ update: (o) => {
11
+ n(o);
12
+ },
13
+ close: () => {
14
+ t(!1);
15
+ }
16
+ }));
17
+ function m() {
18
+ var i;
19
+ const o = (i = e.onOk) == null ? void 0 : i.call(e);
20
+ o && o.then && (n((r) => ({
21
+ ...r,
22
+ confirmLoading: !0
23
+ })), o.then(
24
+ () => {
25
+ t(!1);
26
+ },
27
+ (r) => {
28
+ console.error(r), n((c) => ({
29
+ ...c,
30
+ confirmLoading: !1
31
+ }));
32
+ }
33
+ )), o || t(!1);
34
+ }
35
+ function u() {
36
+ var o;
37
+ (o = e.onCancel) == null || o.call(e), t(!1);
38
+ }
39
+ return /* @__PURE__ */ p(
40
+ x,
41
+ {
42
+ unmountOnExit: !0,
43
+ simple: !0,
44
+ ...e,
45
+ visible: f,
46
+ onOk: m,
47
+ onCancel: u,
48
+ children: e.content
49
+ }
50
+ );
51
+ }
52
+ const E = d(C);
53
+ export {
54
+ E as default
55
+ };
@@ -0,0 +1,68 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { useRef as M } from "react";
3
+ import { normalizeConfig as d } from "../Confirm.js";
4
+ import { destroyList as w } from "../config.js";
5
+ import E from "../../utils/contextHolder.js";
6
+ import H from "./Hook.js";
7
+ function z() {
8
+ const t = M(), p = /* @__PURE__ */ m(E, { ref: t });
9
+ let u = 0;
10
+ function s(e) {
11
+ var f;
12
+ u += 1;
13
+ let o, n = { ...e };
14
+ function C() {
15
+ var r;
16
+ (r = e.afterClose) == null || r.call(e), h();
17
+ }
18
+ const a = /* @__PURE__ */ m(
19
+ H,
20
+ {
21
+ ref: (r) => {
22
+ o = r;
23
+ },
24
+ ...d({ ...e }),
25
+ afterClose: C
26
+ },
27
+ u
28
+ );
29
+ (f = t.current) == null || f.addInstance(a);
30
+ function h() {
31
+ var r;
32
+ (r = t.current) == null || r.removeInstance(a);
33
+ }
34
+ function l() {
35
+ o == null || o.close();
36
+ }
37
+ function x(r) {
38
+ n = {
39
+ ...n,
40
+ ...r
41
+ }, o == null || o.update(d({ ...n }));
42
+ }
43
+ return w.push(l), {
44
+ close: l,
45
+ update: x
46
+ };
47
+ }
48
+ function c(e) {
49
+ return s({
50
+ ...e
51
+ });
52
+ }
53
+ const i = {
54
+ confirm: c,
55
+ show: c
56
+ // 潘启宝添加于 2023年10月18日 星期三 10时31分58秒 CST
57
+ };
58
+ return ["info", "success", "warning", "error"].forEach((e) => {
59
+ i[e] = (o) => s({
60
+ ...o,
61
+ isNotice: !0,
62
+ noticeType: e
63
+ });
64
+ }), [i, p];
65
+ }
66
+ export {
67
+ z as default
68
+ };
@@ -0,0 +1,55 @@
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import N from "lodash/isUndefined";
3
+ import { useRef as R } from "react";
4
+ import H from "../Notification.js";
5
+ import I from "../utils/contextHolder.js";
6
+ function b(u = {}) {
7
+ const {
8
+ maxCount: p,
9
+ duration: m = 3e3,
10
+ prefixCls: x,
11
+ getContainer: C
12
+ } = u, i = R(), g = /* @__PURE__ */ l(I, { ref: i }), e = {};
13
+ let d;
14
+ function h(n) {
15
+ let r, f;
16
+ if (i.current) {
17
+ const o = i.current.getContextConfig();
18
+ f = o.rtl, r = o.prefixCls;
19
+ }
20
+ const E = x || r;
21
+ let t = n.position;
22
+ N(n.position) && (t = f ? "topLeft" : "topRight");
23
+ const c = {
24
+ duration: m,
25
+ ...n
26
+ };
27
+ let s;
28
+ if (e[t]) {
29
+ const o = e[t].state.notices;
30
+ o.length >= p ? (s = o[0].id, o.shift(), e[t].add({ ...c, id: s })) : s = e[t].add(c);
31
+ } else
32
+ d = /* @__PURE__ */ l(
33
+ H,
34
+ {
35
+ ref: (o) => {
36
+ e[t] = o, e[t] && (s = e[t].add(c));
37
+ },
38
+ prefixCls: E,
39
+ rtl: f,
40
+ getContainer: C
41
+ }
42
+ ), i.current.addInstance(d);
43
+ return e[t];
44
+ }
45
+ const a = {};
46
+ return ["info", "success", "warning", "error", "normal"].forEach((n) => {
47
+ a[n] = (r) => h({
48
+ ...r,
49
+ type: n
50
+ });
51
+ }), [a, g];
52
+ }
53
+ export {
54
+ b as default
55
+ };
@@ -0,0 +1,34 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { useContext as l, useRef as d, useEffect as u } from "react";
3
+ /* empty css */
4
+ import "../config-provider/ConfigProvider.js";
5
+ import a from "@unicom-cloud/utils/class-name";
6
+ import { ConfigContext as x } from "../config-provider/context.js";
7
+ function s(o) {
8
+ const { getPrefixCls: m } = l(x), e = m("overflow-item"), n = d();
9
+ u(() => {
10
+ let t;
11
+ return n.current && (t = new ResizeObserver((c) => {
12
+ o.onResize(c == null ? void 0 : c[0].target);
13
+ }), t.observe(n.current)), () => {
14
+ var c, f;
15
+ n.current && ((c = t == null ? void 0 : t.unobserve) == null || c.call(t, n.current)), (f = t == null ? void 0 : t.disconnect) == null || f.call(t), t = null;
16
+ };
17
+ }, [n.current]), u(() => (o.onResize(n.current), () => {
18
+ o.unregister(n.current);
19
+ }), []);
20
+ const r = o.hidden;
21
+ return /* @__PURE__ */ i(
22
+ "div",
23
+ {
24
+ ref: n,
25
+ className: a(e, o.className, {
26
+ [`${e}-hidden`]: r
27
+ }),
28
+ children: o.children
29
+ }
30
+ );
31
+ }
32
+ export {
33
+ s as default
34
+ };
package/package.json CHANGED
@@ -1 +1,27 @@
1
- {"name":"@unicom-cloud/ui","version":"0.8.43","dependencies":{"dayjs":"^1.11.11","lodash":"^4.17.21","react":"^18.2.0","react-dom":"^18.2.0","@unicom-cloud/icons":"latest","@unicom-cloud/utils":"latest","@unicom-cloud/scroll-into-view-if-needed":"latest","@unicom-cloud/react-sticky":"latest","@unicom-cloud/react-sortable-hoc":"latest","@unicom-cloud/react-easy-crop":"latest","@unicom-cloud/compute-scroll-into-view":"latest","@unicom-cloud/react-transition-group":"latest"},"peerDependencies":{},"peerDependenciesMeta":{},"main":"index.js","module":"index.js","type":"module","types":"types/index.d.ts","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
1
+ {
2
+ "name": "@unicom-cloud/ui",
3
+ "version": "0.8.45",
4
+ "dependencies": {
5
+ "@unicom-cloud/icons": "latest",
6
+ "@unicom-cloud/utils": "latest",
7
+ "@unicom-cloud/scroll-into-view-if-needed": "latest",
8
+ "@unicom-cloud/react-easy-crop": "latest",
9
+ "@unicom-cloud/compute-scroll-into-view": "latest",
10
+ "@unicom-cloud/react-transition-group": "latest"
11
+ },
12
+ "peerDependencies": {
13
+ "dayjs": "^1.11.10",
14
+ "lodash": "^4.17.21",
15
+ "react": "^18.3.1",
16
+ "react-dom": "^18.3.1"
17
+ },
18
+ "peerDependenciesMeta": {},
19
+ "main": "index.js",
20
+ "module": "index.js",
21
+ "type": "module",
22
+ "types": "types/index.d.ts",
23
+ "publishConfig": {
24
+ "registry": "https://registry.npmjs.org/",
25
+ "access": "public"
26
+ }
27
+ }
@@ -0,0 +1,121 @@
1
+ import { jsx as I } from "react/jsx-runtime";
2
+ import S from "@unicom-cloud/icons/IconUiLeft";
3
+ import j from "@unicom-cloud/icons/IconUiMore";
4
+ import K from "@unicom-cloud/icons/IconUiRight";
5
+ import U, { useContext as N } from "react";
6
+ /* empty css */
7
+ import "../config-provider/ConfigProvider.js";
8
+ import R from "../hooks/useKeyboardEvent.js";
9
+ import E from "@unicom-cloud/utils/class-name";
10
+ import { ConfigContext as k } from "../config-provider/context.js";
11
+ var _ = /* @__PURE__ */ ((t) => (t[t.previous = 0] = "previous", t[t.next = 1] = "next", t))(_ || {});
12
+ function L(t) {
13
+ var m, n, s;
14
+ const { locale: e } = N(k), v = R(), {
15
+ pageNum: i,
16
+ current: b,
17
+ rootPrefixCls: a,
18
+ pageItemStyle: d,
19
+ activePageItemStyle: l,
20
+ itemRender: f
21
+ } = t, x = `${a}-item`, P = b === i, p = E(x, P ? `${x}-active` : "");
22
+ let o = d;
23
+ P && (o = { ...o, ...l });
24
+ const h = P ? { "aria-current": !0 } : {}, C = (r) => {
25
+ const { pageNum: u, onClick: g, disabled: c } = t;
26
+ r.currentTarget.dataset.active !== "true" && (r.stopPropagation(), c || g == null || g(u));
27
+ };
28
+ return /* @__PURE__ */ I(
29
+ "li",
30
+ {
31
+ style: o,
32
+ className: p,
33
+ onClick: C,
34
+ tabIndex: t.disabled ? -1 : 0,
35
+ "aria-label": (s = (n = (m = e == null ? void 0 : e.Pagination) == null ? void 0 : m.currentPage) == null ? void 0 : n.replace) == null ? void 0 : s.call(n, "{0}", i),
36
+ ...v({ onPressEnter: C }),
37
+ ...h,
38
+ children: f ? f(i, "page", i) : i
39
+ }
40
+ );
41
+ }
42
+ function $(t, e) {
43
+ switch (t) {
44
+ case "prev":
45
+ return e && e.prev ? e.prev : /* @__PURE__ */ I(S, {});
46
+ case "next":
47
+ return e && e.next ? e.next : /* @__PURE__ */ I(K, {});
48
+ case "more":
49
+ return e && e.more ? e.more : /* @__PURE__ */ I(j, {});
50
+ default:
51
+ return null;
52
+ }
53
+ }
54
+ const O = (t) => {
55
+ var s, r, u, g, c, y;
56
+ const { locale: e } = N(k), {
57
+ rootPrefixCls: v,
58
+ current: i,
59
+ allPages: b,
60
+ jumpPage: a,
61
+ icons: d,
62
+ disabled: l,
63
+ pageItemStyle: f,
64
+ itemRender: x
65
+ } = t, P = b > 0 ? 1 : 0, p = Math.min(b, Math.max(P, i + a)), o = `${v}-item ${v}-item-jumper`, h = E(o), C = () => {
66
+ var M;
67
+ !l && ((M = t.onClick) == null || M.call(t, p));
68
+ }, m = $("more", d), n = a > 0 ? (u = (r = (s = e == null ? void 0 : e.Pagination) == null ? void 0 : s.nextSomePages) == null ? void 0 : r.replace) == null ? void 0 : u.call(r, "{0}", a) : (y = (c = (g = e == null ? void 0 : e.Pagination) == null ? void 0 : g.prevSomePages) == null ? void 0 : c.replace) == null ? void 0 : y.call(c, "{0}", -a);
69
+ return /* @__PURE__ */ I(
70
+ "li",
71
+ {
72
+ style: f,
73
+ className: h,
74
+ onClick: C,
75
+ "aria-label": n,
76
+ children: x ? x(void 0, "more", m) : m
77
+ }
78
+ );
79
+ }, Q = (t) => {
80
+ const { locale: e, rtl: v } = N(k), i = R(), {
81
+ rootPrefixCls: b,
82
+ current: a,
83
+ allPages: d,
84
+ type: l,
85
+ icons: f,
86
+ disabled: x,
87
+ pageItemStyle: P,
88
+ itemRender: p
89
+ } = t, o = `${b}-item`, [h, C] = v ? ["next", "prev"] : ["prev", "next"], m = $(l === 0 ? h : C, f);
90
+ let n = !1;
91
+ d === 0 ? n = !0 : l === 0 ? n = a <= 1 : n = a === d;
92
+ const s = x || n;
93
+ let r = a + (l === 0 ? -1 : 1);
94
+ r = Math.max(0, Math.min(d, r));
95
+ const u = l === 0 ? "prev" : "next", g = E(o, `${o}-${u}`, {
96
+ [`${o}-disabled`]: s
97
+ }), c = () => {
98
+ var y;
99
+ s || (y = t.onClick) == null || y.call(t, r);
100
+ };
101
+ return /* @__PURE__ */ I(
102
+ "li",
103
+ {
104
+ style: P,
105
+ className: g,
106
+ onClick: c,
107
+ tabIndex: s ? -1 : 0,
108
+ "aria-label": e.Pagination[u],
109
+ ...i({
110
+ onPressEnter: c
111
+ }),
112
+ children: p ? p(void 0, u, m) : m
113
+ }
114
+ );
115
+ }, V = U.memo(L);
116
+ export {
117
+ O as JumpPager,
118
+ Q as StepPager,
119
+ _ as StepType,
120
+ V as default
121
+ };
@@ -0,0 +1,64 @@
1
+ import { jsxs as x, jsx as r, Fragment as F } from "react/jsx-runtime";
2
+ import I from "lodash/isFunction";
3
+ import J from "lodash/isPlainObject";
4
+ import N from "lodash/isUndefined";
5
+ import { useContext as R, useState as T, useRef as w, useEffect as E } from "react";
6
+ /* empty css */
7
+ import "../config-provider/ConfigProvider.js";
8
+ /* empty css */
9
+ /* empty css */
10
+ import z from "../input/Input.js";
11
+ import { ConfigContext as B } from "../config-provider/context.js";
12
+ function L(n) {
13
+ var p, d;
14
+ const P = n.simple ? n.current : void 0, { locale: i } = R(B), [e, u] = T(P), c = w();
15
+ E(() => {
16
+ n.simple && u(n.current);
17
+ }, [n.simple, n.current]);
18
+ const C = (t) => {
19
+ const m = parseInt(t, 10);
20
+ u(isNaN(m) ? void 0 : m);
21
+ }, l = () => {
22
+ const { onPageChange: t, totalPages: m, current: g, simple: h } = n;
23
+ if (N(e))
24
+ return;
25
+ if (e === g) {
26
+ h || u(void 0);
27
+ return;
28
+ }
29
+ let o = isNaN(Number(e)) ? g : Number(e);
30
+ o < 1 ? o = 1 : o > m && (o = m), u(h ? o : void 0), I(t) && t(o);
31
+ }, v = () => {
32
+ const t = c.current.dom;
33
+ String(e) && t && t.setSelectionRange(0, String(e).length);
34
+ }, { rootPrefixCls: b, totalPages: f, simple: s, size: $, disabled: S } = n, a = `${b}-jumper`, j = {
35
+ showJumper: !0,
36
+ ...J(s) ? s : {}
37
+ };
38
+ return /* @__PURE__ */ x("div", { className: `${a}`, children: [
39
+ !s && /* @__PURE__ */ r("span", { className: `${a}-text-goto`, children: (p = i == null ? void 0 : i.Pagination) == null ? void 0 : p.goto }),
40
+ j.showJumper ? /* @__PURE__ */ r(
41
+ z,
42
+ {
43
+ _ignorePropsFromGlobal: !0,
44
+ ref: (t) => c.current = t,
45
+ className: `${a}-input`,
46
+ value: N(e) ? void 0 : e.toString(),
47
+ size: $,
48
+ disabled: S || !f,
49
+ onChange: C,
50
+ onPressEnter: l,
51
+ onFocus: v,
52
+ onBlur: l
53
+ }
54
+ ) : /* @__PURE__ */ r("span", { children: e }),
55
+ !s && /* @__PURE__ */ r("span", { className: `${a}-text-goto-suffix`, children: (d = i == null ? void 0 : i.Pagination) == null ? void 0 : d.page }),
56
+ s && /* @__PURE__ */ x(F, { children: [
57
+ /* @__PURE__ */ r("span", { className: `${a}-separator`, children: "/" }),
58
+ /* @__PURE__ */ r("span", { children: f })
59
+ ] })
60
+ ] });
61
+ }
62
+ export {
63
+ L as default
64
+ };
@@ -0,0 +1,55 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import P, { useRef as d, useContext as C } from "react";
3
+ /* empty css */
4
+ import "../config-provider/ConfigProvider.js";
5
+ /* empty css */
6
+ /* empty css */
7
+ /* empty css */
8
+ /* empty css */
9
+ /* empty css */
10
+ /* empty css */
11
+ import s from "../select/Select.js";
12
+ import { ConfigContext as O } from "../config-provider/context.js";
13
+ const x = () => {
14
+ }, z = s.Option, h = [10, 20, 30, 40, 50];
15
+ function S(m) {
16
+ var p;
17
+ const n = d(null), { locale: o } = C(O), {
18
+ onPageSizeChange: c = x,
19
+ rootPrefixCls: f,
20
+ sizeOptions: e = h,
21
+ pageSize: r = 10,
22
+ size: g,
23
+ selectProps: l,
24
+ disabled: u
25
+ } = m;
26
+ return /* @__PURE__ */ i(
27
+ "div",
28
+ {
29
+ ref: n,
30
+ className: `${f}-option`,
31
+ "aria-label": (p = o == null ? void 0 : o.Pagination) == null ? void 0 : p.pageSize,
32
+ children: /* @__PURE__ */ i(
33
+ s,
34
+ {
35
+ value: e.indexOf(r) !== -1 ? r : e[0],
36
+ onChange: (t) => {
37
+ c(t);
38
+ },
39
+ size: g,
40
+ getPopupContainer: () => n.current,
41
+ disabled: u,
42
+ ...l,
43
+ children: e.map((t) => {
44
+ var a;
45
+ return /* @__PURE__ */ i(z, { value: t, children: `${t} ${(a = o == null ? void 0 : o.Pagination) == null ? void 0 : a.countPerPage}` }, t);
46
+ })
47
+ }
48
+ )
49
+ }
50
+ );
51
+ }
52
+ const B = P.memo(S);
53
+ export {
54
+ B as default
55
+ };