@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,568 @@
1
+ import { jsx as w, jsxs as lt, Fragment as ft } from "react/jsx-runtime";
2
+ import lo from "@unicom-cloud/icons/IconUiCalendar";
3
+ import fo from "@unicom-cloud/icons/IconUiCalendarClock";
4
+ import { isDayjs as mt } from "dayjs";
5
+ import f from "lodash/isArray";
6
+ import mo from "lodash/isPlainObject";
7
+ import po from "lodash/isUndefined";
8
+ import ho, { useContext as go, useRef as A, useState as v, useEffect as te } from "react";
9
+ /* empty css */
10
+ import "../config-provider/ConfigProvider.js";
11
+ import vo from "../hooks/useMergeProps.js";
12
+ import pt from "../hooks/usePrevious.js";
13
+ import dt from "../hooks/useUpdateEffect.js";
14
+ import So from "../picker/InputRange.js";
15
+ import Po from "../Trigger.js";
16
+ import wo from "@unicom-cloud/utils/class-name";
17
+ import { getDayjsValue as V, getNow as I, toTimezone as ht, toLocal as He, methods as C, isDayjsArrayChange as Vo, getSortedDayjsArray as Le, isValidTimeString as Do, getValueWithTime as oe } from "../utils/dayjs.js";
18
+ import { pickDataAttributes as bo } from "../utils/pick.js";
19
+ import yo from "./context.js";
20
+ import xo from "./panel/Footer.js";
21
+ import Io from "./panel/Shortcut.js";
22
+ import Co from "./panel/range/index.js";
23
+ import { getDefaultWeekStart as To, getAvailableDayjsLength as gt, getFormatByIndex as H, getLocaleDayjsValue as Ne } from "./util.js";
24
+ import { ConfigContext as Yo } from "../config-provider/context.js";
25
+ function ko(ne) {
26
+ const { format: j, showTime: S, mode: re } = ne;
27
+ let d;
28
+ switch (re) {
29
+ case "date":
30
+ d = S ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
31
+ break;
32
+ case "month":
33
+ d = "YYYY-MM";
34
+ break;
35
+ case "year":
36
+ d = "YYYY";
37
+ break;
38
+ case "week":
39
+ d = "YYYY-wo";
40
+ break;
41
+ case "quarter":
42
+ d = "YYYY-[Q]Q";
43
+ break;
44
+ default:
45
+ d = "YYYY-MM-DD";
46
+ }
47
+ return j && (d = j), d;
48
+ }
49
+ const vt = {
50
+ allowClear: !0,
51
+ unmountOnExit: !0,
52
+ position: "bl",
53
+ editable: !0,
54
+ mode: "date"
55
+ }, Ho = { bottom: 4 }, St = (ne) => {
56
+ var ct, ut;
57
+ const {
58
+ getPrefixCls: j,
59
+ locale: S,
60
+ size: re,
61
+ componentConfig: d,
62
+ rtl: Re
63
+ } = go(Yo);
64
+ Re && (vt.position = "br");
65
+ const l = vo(
66
+ ne,
67
+ vt,
68
+ d == null ? void 0 : d.DatePicker
69
+ ), {
70
+ allowClear: Pt,
71
+ className: Ae,
72
+ style: je,
73
+ placeholder: Ee,
74
+ getPopupContainer: wt,
75
+ disabled: h,
76
+ position: Vt,
77
+ error: Dt,
78
+ status: bt,
79
+ unmountOnExit: yt,
80
+ editable: xt,
81
+ triggerProps: It,
82
+ shortcuts: U,
83
+ onSelect: ae,
84
+ onVisibleChange: se,
85
+ value: Ct,
86
+ onChange: ie,
87
+ icons: W,
88
+ disabledDate: Fe,
89
+ disabledTime: Tt,
90
+ mode: r,
91
+ showTime: p,
92
+ onSelectShortcut: ce,
93
+ extra: Oe,
94
+ shortcutsPlacementLeft: E,
95
+ onOk: ue,
96
+ defaultPickerValue: Yt,
97
+ pickerValue: kt,
98
+ panelRender: ze,
99
+ onPickerValueChange: le,
100
+ triggerElement: q,
101
+ clearRangeOnReselect: Ht,
102
+ separator: Lt,
103
+ utcOffset: a,
104
+ timezone: s,
105
+ inputProps: Nt
106
+ } = l, F = j("picker-range"), Rt = po(l.dayStartOfWeek) ? To(S.dayjsLocale) : l.dayStartOfWeek, fe = A(null), Me = A(null), Be = A(null), me = A(null), pe = A(null), i = ko(l);
107
+ function At() {
108
+ if (f(h)) {
109
+ if (h[0] && !h[1])
110
+ return 1;
111
+ if (h[1] && !h[0])
112
+ return 0;
113
+ }
114
+ }
115
+ const T = At(), P = typeof T == "number", jt = P ? 1 ^ T : void 0, [m, de] = v(
116
+ P ? T : 0
117
+ );
118
+ te(() => {
119
+ P && de(T);
120
+ }, [h]);
121
+ const _ = 1 ^ m, [Q, Y] = v(), [$e, K] = v(), [he, ge] = v(Mt()), [D, L] = v(), [Et, O] = v(), [Ue, ve] = v(), [Ft, Ot] = v(l.popupVisible), [Se, Pe] = v([r, r]), [we, We] = v(!1), b = "popupVisible" in l ? l.popupVisible : Ft, k = V(
122
+ Ct,
123
+ i,
124
+ a,
125
+ s
126
+ ), y = "value" in l ? k : he, c = Ue || D || y || [], g = gt(D || y), z = A(!0), Ve = I(), qe = ht(Ve, a, s);
127
+ function zt() {
128
+ const e = [], t = mo(p) && p.defaultValue ? V(p.defaultValue, p.format || "HH:mm:ss") : [];
129
+ return e[0] = c[0] || t[0] || qe, e[1] = c[1] || t[1] || qe, e;
130
+ }
131
+ const G = zt(), _e = P ? (e) => T === 0 ? e.isAfter(c[1], r) : e.isBefore(c[0], r) : void 0, De = q !== void 0, be = De || Ht;
132
+ function Mt() {
133
+ let e;
134
+ if (l.value ? e = V(l.value, i, a, s) : e = V(l.defaultValue, i, a, s), P && (!e || e && !e[_])) {
135
+ const t = [];
136
+ return t[_] = I(a, s), t;
137
+ }
138
+ return e;
139
+ }
140
+ const ye = y || V(Yt, i) || [Ve, Ve], [Qe, J] = v(
141
+ N(ye)
142
+ ), X = N(
143
+ V(kt, i, a, s)
144
+ ) || Qe, xe = pt(a), Ie = pt(s);
145
+ dt(() => {
146
+ if (f(he) && (xe !== a || s !== Ie)) {
147
+ const t = he.map(
148
+ (o) => He(o, xe, Ie)
149
+ ).map(
150
+ (o) => ht(o, a, s)
151
+ );
152
+ ge(t);
153
+ }
154
+ }, [a, xe, s, Ie]), dt(() => {
155
+ J(N(ye));
156
+ }, [r]), te(() => {
157
+ Pe([r, r]);
158
+ }, [r]), te(() => {
159
+ if (K(void 0), Y(void 0), b) {
160
+ const e = N(ye);
161
+ We(!1), Pe([r, r]), J(e), Ce(e), L(y), E && (Be.current.style.maxHeight = `${Me.current.clientHeight}px`);
162
+ } else
163
+ L(void 0), O(void 0), ve(void 0), Ut();
164
+ z.current = b;
165
+ }, [b]);
166
+ const Bt = (ct = k == null ? void 0 : k[0]) == null ? void 0 : ct.format(H(i, 0)), $t = (ut = k == null ? void 0 : k[1]) == null ? void 0 : ut.format(H(i, 1));
167
+ te(() => {
168
+ L(void 0), O(void 0);
169
+ }, [Bt, $t]);
170
+ function M(e, t = m) {
171
+ const o = N(e, t);
172
+ J(o), Ce(o);
173
+ }
174
+ function Ce(e) {
175
+ Ke([e[0], Qe[0]], r) || le == null || le(
176
+ f(e) ? e.map((t, o) => t && t.format(H(i, o))) : void 0,
177
+ e
178
+ );
179
+ }
180
+ function N(e, t = m) {
181
+ const o = t === 0 || Ke(e, r);
182
+ if (f(e) && e.length < 2)
183
+ return Z(
184
+ e[0] || I(a, s),
185
+ r,
186
+ "prev"
187
+ );
188
+ if (f(e) && e.length === 2)
189
+ return e[t] ? Z(
190
+ e[t],
191
+ r,
192
+ o ? "prev" : "next"
193
+ ) : Z(
194
+ e[t === 0 ? 1 : 0] || I(a, s),
195
+ r,
196
+ o && !e[t === 0 ? 1 : 0] ? "prev" : "next"
197
+ );
198
+ }
199
+ function Ke(e, t) {
200
+ if (e && e.length === 2 && nt(e))
201
+ return (t === "date" || t === "week") && e[0].isSame(e[1], "month") || (t === "month" || t === "quarter") && e[0].isSame(e[1], "year") || t === "year" && Math.floor(e[0].year() / 10) === Math.floor(e[1].year() / 10);
202
+ }
203
+ function Z(e = I(a, s), t = r, o = "prev") {
204
+ const n = o === "prev";
205
+ switch (t) {
206
+ case "date":
207
+ case "week":
208
+ return n ? [e, C.add(e, 1, "month")] : [C.subtract(e, 1, "month"), e];
209
+ case "month":
210
+ case "quarter":
211
+ return n ? [e, C.add(e, 1, "year")] : [C.subtract(e, 1, "year"), e];
212
+ case "year":
213
+ return n ? [e, C.add(e, 10, "year")] : [C.subtract(e, 10, "year"), e];
214
+ default:
215
+ return [];
216
+ }
217
+ }
218
+ function Te(e) {
219
+ var t, o;
220
+ (o = (t = fe.current) == null ? void 0 : t.focus) == null || o.call(t, P ? T : e);
221
+ }
222
+ function Ut() {
223
+ var e, t;
224
+ (t = (e = fe.current) == null ? void 0 : e.blur) == null || t.call(e);
225
+ }
226
+ function Wt(e) {
227
+ e ? (setTimeout(() => Te()), B(e)) : B(!1);
228
+ }
229
+ function B(e) {
230
+ se == null || se(e), Ot(e);
231
+ }
232
+ function qt(e) {
233
+ var o;
234
+ e.stopPropagation();
235
+ let t = [...c];
236
+ P ? t[T] = void 0 : t = void 0, ge(t), L(t), Ze(t), (o = l.onClear) == null || o.call(l);
237
+ }
238
+ function Ge(e, t) {
239
+ if (de(e), c && c.length && !t) {
240
+ const o = N(c, e);
241
+ J(o), Ce(o);
242
+ }
243
+ }
244
+ function Je(e) {
245
+ const t = typeof _e == "function" ? _e(e) : !1;
246
+ return (typeof Fe == "function" ? Fe(e) : !1) || t;
247
+ }
248
+ function Xe(e) {
249
+ return Do(e, i, m) && !Je(V(e, i));
250
+ }
251
+ function _t(e) {
252
+ const t = [...c || []], o = e.target.value;
253
+ Y(o), b || B(!0), Xe(o) && (t[m] = V(o, i), L(t), M(t), Y(void 0));
254
+ }
255
+ function Qt() {
256
+ Q && Y(void 0);
257
+ }
258
+ function Ze(e) {
259
+ if (Vo(y, e)) {
260
+ const t = f(e) ? e.map(
261
+ (o) => Ne(
262
+ He(o, a, s),
263
+ S.dayjsLocale
264
+ )
265
+ ) : void 0;
266
+ ie == null || ie(
267
+ f(t) ? t.map((o, n) => o && o.format(H(i, n))) : void 0,
268
+ t
269
+ );
270
+ }
271
+ }
272
+ function Kt() {
273
+ f(D) && D.length ? Q && !Xe(Q) ? Y(void 0) : g !== 2 ? ee() : g === 2 && R(D) : b && B(!1);
274
+ }
275
+ function R(e, t) {
276
+ const o = e || c;
277
+ if (!o || !o[0] || !o[1])
278
+ return;
279
+ const n = Le(o);
280
+ ge(n), Ze(n), q !== null && !t && B(!1);
281
+ }
282
+ function Gt() {
283
+ R();
284
+ const e = c.map(
285
+ (t) => Ne(t, S.dayjsLocale)
286
+ );
287
+ ue == null || ue(
288
+ e.map(
289
+ (t, o) => t && t.format(H(i, o))
290
+ ),
291
+ e
292
+ );
293
+ }
294
+ function et() {
295
+ switch (r) {
296
+ case "date":
297
+ case "week":
298
+ return "date";
299
+ case "month":
300
+ return "month";
301
+ case "year":
302
+ return "year";
303
+ default:
304
+ return;
305
+ }
306
+ }
307
+ function tt(e) {
308
+ if (g !== 2)
309
+ return !1;
310
+ const t = D || y;
311
+ return !!(m === 0 && e.isAfter(t[1], et()) || m === 1 && e.isBefore(t[0], et()));
312
+ }
313
+ function Jt(e, t) {
314
+ const o = tt(t) && z.current, n = be && g === 2 && !P ? [] : [...c], u = De ? g === 0 || g === 2 ? 0 : 1 : m, $ = p ? oe(t, G[u]) : t;
315
+ o ? (n[u] = $, n[1 ^ u] = void 0) : n[u] = $;
316
+ const Ye = Le(n);
317
+ ot(Ye), Y(void 0), K(void 0);
318
+ const ke = gt(n);
319
+ be ? g === 0 || g === 2 && !P ? De ? de(1) : ee(!0) : p || R(n) : ke <= 1 ? ee(!0) : g === 2 && z.current && !P ? (z.current = !1, ee(!0), !p && !o && R(n, !0)) : (z.current = !1, !p && !o && R(n));
320
+ }
321
+ function Xt(e, t, o) {
322
+ const n = f(c) ? [...c] : [], u = oe(
323
+ n[e] || I(a, s),
324
+ o
325
+ );
326
+ n[e] = u, ot(n);
327
+ }
328
+ function ot(e) {
329
+ L(e), O(void 0);
330
+ const o = Le(e).map(
331
+ (n) => Ne(He(n, a, s), S.dayjsLocale)
332
+ );
333
+ ae == null || ae(
334
+ o.map((n, u) => n && n.format(H(i, u))),
335
+ o,
336
+ { type: m === 1 ? "end" : "start" }
337
+ );
338
+ }
339
+ function ee(e) {
340
+ Ge(_, e), setTimeout(() => Te(_));
341
+ }
342
+ function Zt(e, t) {
343
+ const o = [...c || []];
344
+ if (!t && (be ? g === 1 : g !== 0) && !tt(e) && (o[m] = oe(
345
+ e,
346
+ G[m]
347
+ ), O(o), Y(void 0)), !t) {
348
+ const u = p ? oe(e, G[m]) : e;
349
+ K(
350
+ u.locale(S.dayjsLocale).format(H(i, m))
351
+ );
352
+ }
353
+ }
354
+ function eo() {
355
+ O(void 0), K(void 0);
356
+ }
357
+ function nt(e) {
358
+ return e && f(e) && e.length === 2 && mt(e[0]) && mt(e[1]);
359
+ }
360
+ function rt(e) {
361
+ const t = typeof e.value == "function" && e.value();
362
+ return nt(t);
363
+ }
364
+ function at() {
365
+ clearTimeout(me.current), clearTimeout(pe.current), me.current = null, pe.current = null;
366
+ }
367
+ function to(e) {
368
+ at(), me.current = setTimeout(() => {
369
+ if (rt(e)) {
370
+ const t = V(
371
+ e.value(),
372
+ i,
373
+ a,
374
+ s
375
+ );
376
+ ve(t), M(t);
377
+ }
378
+ }, 50);
379
+ }
380
+ function oo() {
381
+ at(), pe.current = setTimeout(() => {
382
+ ve(void 0), M(
383
+ D || y || [
384
+ I(a, s),
385
+ I(a, s)
386
+ ]
387
+ );
388
+ }, 50);
389
+ }
390
+ function no(e) {
391
+ if (ce == null || ce(e), rt(e)) {
392
+ const t = V(
393
+ e.value(),
394
+ i,
395
+ a,
396
+ s
397
+ );
398
+ R(t);
399
+ }
400
+ }
401
+ function x(e, t, o = 1) {
402
+ const n = e === "prev" ? 0 : 1;
403
+ let u = [...X];
404
+ e === "prev" && (u[n] = C.subtract(
405
+ X[n],
406
+ o,
407
+ t
408
+ )), e === "next" && (u[n] = C.add(
409
+ X[n],
410
+ o,
411
+ t
412
+ )), u = Z(
413
+ u[n],
414
+ r,
415
+ e
416
+ ), M(u);
417
+ }
418
+ function st(e = r) {
419
+ if (e === "date" || e === "week")
420
+ return {
421
+ onPrev: () => x("prev", "month"),
422
+ onNext: () => x("next", "month"),
423
+ onSuperPrev: () => x("prev", "year"),
424
+ onSuperNext: () => x("next", "year")
425
+ };
426
+ if (e === "month" || e === "quarter")
427
+ return {
428
+ onSuperPrev: () => x("prev", "year"),
429
+ onSuperNext: () => x("next", "year")
430
+ };
431
+ if (e === "year")
432
+ return {
433
+ onSuperPrev: () => x("prev", "year", 10),
434
+ onSuperNext: () => x("next", "year", 10)
435
+ };
436
+ }
437
+ function ro() {
438
+ We(!we);
439
+ }
440
+ function it(e) {
441
+ const t = wo(
442
+ `${F}-container`,
443
+ {
444
+ [`${F}-panel-only`]: e,
445
+ [`${F}-container-shortcuts-placement-left`]: f(U) && E,
446
+ [`${F}-container-rtl`]: Re
447
+ },
448
+ e ? Ae : ""
449
+ ), o = {
450
+ prefixCls: j("picker"),
451
+ showTime: p,
452
+ shortcuts: U,
453
+ onMouseEnterShortcut: to,
454
+ onMouseLeaveShortcut: oo,
455
+ onSelectShortcut: no
456
+ }, n = p && Se[0] === "date" && Se[1] === "date" || Oe || f(U) && U.length && !E, u = /* @__PURE__ */ lt(ft, { children: [
457
+ /* @__PURE__ */ w(
458
+ Co,
459
+ {
460
+ ...l,
461
+ ...st(),
462
+ getHeaderOperations: st,
463
+ setRangePageShowDates: M,
464
+ pageShowDates: X,
465
+ value: c,
466
+ format: i,
467
+ onSelectPanel: Jt,
468
+ onMouseEnterCell: Zt,
469
+ onMouseLeaveCell: eo,
470
+ disabledDate: (ke) => Je(ke),
471
+ disabledTime: Tt,
472
+ mode: r,
473
+ localeName: S.dayjsLocale,
474
+ showTime: p,
475
+ timeValues: Ue || G,
476
+ onTimePickerSelect: Xt,
477
+ popupVisible: b,
478
+ disabledTimePickerIndex: jt,
479
+ isTimePanel: we,
480
+ valueShowHover: Et,
481
+ panelModes: Se,
482
+ setPanelModes: Pe
483
+ }
484
+ ),
485
+ !!n && /* @__PURE__ */ w(
486
+ xo,
487
+ {
488
+ ...o,
489
+ DATEPICKER_LOCALE: S.DatePicker,
490
+ disabled: !(f(c) && c[0] && c[1]),
491
+ onClickConfirmBtn: Gt,
492
+ extra: Oe,
493
+ shortcutsPlacementLeft: E,
494
+ onClickSelectTimeBtn: ro,
495
+ isTimePanel: we
496
+ }
497
+ )
498
+ ] }), $ = E ? /* @__PURE__ */ lt(ft, { children: [
499
+ /* @__PURE__ */ w(Io, { ref: Be, ...o }),
500
+ /* @__PURE__ */ w("div", { ref: Me, className: `${F}-panel-wrapper`, children: u })
501
+ ] }) : u, Ye = typeof ze == "function" ? ze($) : $;
502
+ return /* @__PURE__ */ w(
503
+ "div",
504
+ {
505
+ className: t,
506
+ onClick: () => Te(),
507
+ style: e ? je : {},
508
+ children: Ye
509
+ }
510
+ );
511
+ }
512
+ const ao = l.size || re, so = f(Ee) ? Ee : S.DatePicker.placeholders[r], io = W && W.inputSuffix === null ? null : W && W.inputSuffix || (p ? /* @__PURE__ */ w(fo, {}) : /* @__PURE__ */ w(lo, {})), co = {
513
+ style: je,
514
+ className: Ae,
515
+ popupVisible: b,
516
+ format: i,
517
+ disabled: h,
518
+ error: Dt,
519
+ status: bt,
520
+ size: ao,
521
+ onPressEnter: Kt,
522
+ onClear: qt,
523
+ suffixIcon: io,
524
+ editable: xt,
525
+ allowClear: Pt,
526
+ prefix: l.prefix
527
+ }, uo = f(h) ? h[0] && h[1] : h;
528
+ return /* @__PURE__ */ w(yo.Provider, { value: { utcOffset: a, timezone: s, weekStart: Rt }, children: q === null ? it(!0) : /* @__PURE__ */ w(
529
+ Po,
530
+ {
531
+ popup: it,
532
+ trigger: "click",
533
+ clickToClose: !1,
534
+ position: Vt,
535
+ disabled: uo,
536
+ popupAlign: Ho,
537
+ getPopupContainer: wt,
538
+ onVisibleChange: Wt,
539
+ popupVisible: b,
540
+ classNames: "slideDynamicOrigin",
541
+ unmountOnExit: yt,
542
+ ...It,
543
+ children: q || /* @__PURE__ */ w(
544
+ So,
545
+ {
546
+ ...bo(l),
547
+ ...co,
548
+ inputProps: Nt,
549
+ ref: fe,
550
+ placeholder: so,
551
+ value: D || y,
552
+ onChange: _t,
553
+ inputValue: $e || Q,
554
+ changeFocusedInputIndex: Ge,
555
+ focusedInputIndex: m,
556
+ isPlaceholder: !!$e,
557
+ separator: Lt,
558
+ onBlur: Qt
559
+ }
560
+ )
561
+ }
562
+ ) });
563
+ };
564
+ St.displayName = "RangePicker";
565
+ const on = ho.memo(St);
566
+ export {
567
+ on as default
568
+ };
@@ -0,0 +1,5 @@
1
+ import { createContext as t } from "react";
2
+ const o = t({});
3
+ export {
4
+ o as default
5
+ };
@@ -0,0 +1,58 @@
1
+ import K from "lodash/isArray";
2
+ import { getAvailableDayjsLength as L } from "../util.js";
3
+ import M from "@unicom-cloud/utils/class-name";
4
+ import { getSortedDayjsArray as q, getNow as V } from "../../utils/dayjs.js";
5
+ function l(c, e) {
6
+ if (c && K(c))
7
+ return c[e];
8
+ }
9
+ function Y(c) {
10
+ const {
11
+ prefixCls: e,
12
+ value: p,
13
+ rangeValues: d,
14
+ valueShowHover: v,
15
+ isSameTime: f,
16
+ mode: R,
17
+ hideNotInViewDates: T
18
+ } = c, y = L(d), P = L(v), H = y !== 2 && P === 2 ? q(v) : d, N = y === 2 ? q(v) : [];
19
+ function a(m, n, o) {
20
+ if (n && o)
21
+ return f(m, n) || f(m, o) || m.isBetween(n, o, null);
22
+ }
23
+ return function(n, o, h, $) {
24
+ const r = l(H, 0), t = l(H, 1), s = l(N, 0), i = l(N, 1), u = !n.isPrev && !n.isNext, F = p && f(n.time, p);
25
+ let S = f(n.time, V(h, $));
26
+ const w = R !== "week" ? u : !0;
27
+ R === "week" && (S = V(h, $).isSame(n.time, "date")), R === "quarter" && (S = V(h, $).isSame(n.time, "quarter"));
28
+ function g(B) {
29
+ return w && !o && B && f(n.time, B);
30
+ }
31
+ const A = g(r), C = g(t), G = g(
32
+ l(d, 0)
33
+ ), J = g(
34
+ l(d, 1)
35
+ ), k = g(s), x = g(i);
36
+ let E = !1;
37
+ A ? E = s && r && s.isBefore(r) && a(r, s, i) : C && (E = i && t && i.isAfter(t) && a(t, s, i));
38
+ let I = !1;
39
+ return k ? I = s && r && r.isBefore(s) && a(s, r, t) : x && (I = i && t && t.isAfter(i) && a(i, r, t)), M(`${e}-cell`, {
40
+ [`${e}-cell-disabled`]: o,
41
+ [`${e}-cell-hidden`]: T && !u,
42
+ [`${e}-cell-in-view`]: u,
43
+ [`${e}-cell-today`]: S && u,
44
+ [`${e}-cell-selected`]: F || G || J,
45
+ [`${e}-cell-range-start`]: A,
46
+ [`${e}-cell-range-end`]: C,
47
+ [`${e}-cell-in-range`]: w && !o && a(n.time, r, t),
48
+ [`${e}-cell-hover-range-start`]: k,
49
+ [`${e}-cell-hover-range-end`]: x,
50
+ [`${e}-cell-hover-in-range`]: w && !o && a(n.time, s, i),
51
+ [`${e}-cell-range-edge-in-hover-range`]: E,
52
+ [`${e}-cell-hover-range-edge-in-range`]: I
53
+ });
54
+ };
55
+ }
56
+ export {
57
+ Y as default
58
+ };
@@ -0,0 +1,78 @@
1
+ import { jsxs as O, Fragment as R, jsx as a } from "react/jsx-runtime";
2
+ import A, { useContext as E } from "react";
3
+ import S from "../context.js";
4
+ import W from "../hook/useCellClassName.js";
5
+ import { isDisabledDate as g } from "../util.js";
6
+ import c from "@unicom-cloud/utils/class-name";
7
+ import j from "./WeekList.js";
8
+ function T(n) {
9
+ const {
10
+ prefixCls: t,
11
+ isWeek: d,
12
+ disabledDate: f,
13
+ onSelectDate: u,
14
+ dateRender: o,
15
+ onMouseEnterCell: r,
16
+ onMouseLeaveCell: s,
17
+ CALENDAR_LOCALE: N,
18
+ rows: k,
19
+ showWeekList: h,
20
+ isSameTime: v,
21
+ format: w,
22
+ mode: p
23
+ } = n, { utcOffset: $, timezone: C, weekStart: x } = E(S), D = W({
24
+ ...n,
25
+ isSameTime: v
26
+ });
27
+ function L(m) {
28
+ return m.map((e, l) => {
29
+ if (e.time) {
30
+ const i = g(e.time, f, p), b = () => !i && u(e.time.format(w), e.time);
31
+ return /* @__PURE__ */ a(
32
+ "div",
33
+ {
34
+ className: D(e, i, $, C),
35
+ onMouseEnter: () => r == null ? void 0 : r(e.time, i),
36
+ onMouseLeave: () => s == null ? void 0 : s(e.time, i),
37
+ onClick: b,
38
+ children: o ? A.cloneElement(o(e.time)) : /* @__PURE__ */ a("div", { className: `${t}-date`, children: /* @__PURE__ */ a("div", { className: `${t}-date-value`, children: e.name }) })
39
+ },
40
+ l
41
+ );
42
+ }
43
+ if ("weekOfYear" in e)
44
+ return /* @__PURE__ */ a(
45
+ "div",
46
+ {
47
+ className: c(`${t}-cell`, `${t}-cell-week`),
48
+ children: /* @__PURE__ */ a("div", { className: `${t}-date`, children: /* @__PURE__ */ a("div", { className: `${t}-date-value`, children: e.weekOfYear }) })
49
+ },
50
+ l
51
+ );
52
+ });
53
+ }
54
+ return /* @__PURE__ */ O(R, { children: [
55
+ h && /* @__PURE__ */ a(
56
+ j,
57
+ {
58
+ prefixCls: t,
59
+ weekStart: x,
60
+ isWeek: d,
61
+ CALENDAR_LOCALE: N
62
+ }
63
+ ),
64
+ /* @__PURE__ */ a("div", { className: `${t}-body`, children: k.map((m, e) => /* @__PURE__ */ a(
65
+ "div",
66
+ {
67
+ className: c(`${t}-row`, {
68
+ [`${t}-row-week`]: d
69
+ }),
70
+ children: L(m)
71
+ },
72
+ e
73
+ )) })
74
+ ] });
75
+ }
76
+ export {
77
+ T as default
78
+ };