@unicom-cloud/ui 0.8.89 → 0.8.91

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 (597) hide show
  1. package/Affix.js +10 -9
  2. package/Alert.js +6 -5
  3. package/Anchor.js +4 -2
  4. package/AutoComplete.js +12 -7
  5. package/Avatar.js +4 -3
  6. package/BackTop.js +12 -10
  7. package/Badge.js +9 -7
  8. package/Breadcrumb.js +10 -8
  9. package/Button.js +9 -8
  10. package/Calendar.js +13 -8
  11. package/Card.js +9 -6
  12. package/Carousel.js +9 -8
  13. package/Cascader.js +2 -2
  14. package/Checkbox.js +8 -6
  15. package/Collapse.js +4 -2
  16. package/ColorPicker.js +18 -4
  17. package/Comment.js +6 -5
  18. package/ConfigProvider.js +6 -5
  19. package/Copy.js +6 -5
  20. package/DatePicker.js +13 -8
  21. package/Descriptions.js +5 -4
  22. package/Details.js +15 -0
  23. package/Development.js +5 -3
  24. package/Divider.js +5 -4
  25. package/Draggable.js +4 -3
  26. package/Dropdown.js +12 -10
  27. package/Empty.js +6 -3
  28. package/Form.js +17 -13
  29. package/Grid.js +10 -8
  30. package/Icon.js +7 -6
  31. package/IconHover.js +4 -2
  32. package/Image.js +5 -5
  33. package/Input.js +17 -12
  34. package/InputNumber.js +7 -5
  35. package/Layout.js +13 -12
  36. package/Link.js +6 -5
  37. package/List.js +9 -7
  38. package/Loading.js +3 -2
  39. package/Mentions.js +7 -5
  40. package/Menu.js +7 -6
  41. package/Message.js +13 -6
  42. package/Modal.js +2 -2
  43. package/Notice.js +10 -7
  44. package/Notification.js +13 -7
  45. package/OverflowEllipsis.js +5 -4
  46. package/PageHeader.js +9 -7
  47. package/Pagination.js +2 -2
  48. package/Popconfirm.js +6 -5
  49. package/Popover.js +6 -5
  50. package/Progress.js +6 -5
  51. package/Radio.js +8 -6
  52. package/Rate.js +6 -5
  53. package/ResizeBox.js +12 -11
  54. package/Result.js +5 -4
  55. package/Select.js +6 -5
  56. package/SelectView.js +2 -2
  57. package/Skeleton.js +6 -5
  58. package/Slider.js +11 -8
  59. package/Space.js +6 -5
  60. package/SpeechSynthesis.js +4 -2
  61. package/Spin.js +6 -5
  62. package/Statistic.js +10 -8
  63. package/Steps.js +9 -8
  64. package/SuspenseFallbackTest.js +3 -2
  65. package/Switch.js +13 -8
  66. package/Table.js +27 -15
  67. package/Tabs.js +5 -5
  68. package/Tag.js +8 -6
  69. package/TimePicker.js +2 -2
  70. package/Tooltip.js +9 -7
  71. package/Transfer.js +8 -6
  72. package/Tree.js +3 -2
  73. package/TreeSelect.js +3 -3
  74. package/Trigger.js +17 -12
  75. package/Typography.js +7 -6
  76. package/Upload.js +6 -5
  77. package/affix/index.js +32 -31
  78. package/alert/index.js +60 -70
  79. package/anchor/Anchor.js +63 -61
  80. package/anchor/Link.js +9 -8
  81. package/anchor/index.js +2 -0
  82. package/anchor/util.js +15 -14
  83. package/auto-complete/index.js +154 -13
  84. package/avatar/Avatar.js +6 -5
  85. package/avatar/Group.js +17 -16
  86. package/avatar/index.js +4 -3
  87. package/back-top/index.js +38 -36
  88. package/badge/Count.js +11 -11
  89. package/badge/index.js +58 -61
  90. package/breadcrumb/Item.js +7 -7
  91. package/breadcrumb/index.js +40 -38
  92. package/button/Group.js +8 -7
  93. package/button/index.js +13 -12
  94. package/calendar/Month.js +140 -10
  95. package/calendar/Year.js +21 -20
  96. package/calendar/header/Panel.js +57 -0
  97. package/calendar/header/index.js +110 -0
  98. package/calendar/hook/useCellClassName.js +41 -0
  99. package/calendar/index.js +171 -12
  100. package/card/Grid.js +12 -11
  101. package/card/Meta.js +14 -13
  102. package/card/index.js +38 -35
  103. package/carousel/Arrow.js +16 -15
  104. package/carousel/Indicator.js +19 -18
  105. package/carousel/index.js +16 -15
  106. package/cascader/Cascader.js +299 -24
  107. package/cascader/base/node.js +142 -0
  108. package/cascader/base/store.js +93 -0
  109. package/cascader/hook/useRefCurrent.js +12 -0
  110. package/cascader/index.js +2 -2
  111. package/cascader/panel/List.js +278 -0
  112. package/cascader/panel/Option.js +33 -0
  113. package/cascader/panel/Search.js +169 -0
  114. package/cascader/util.js +64 -12
  115. package/checkbox/Checkbox.js +125 -17
  116. package/checkbox/Group.js +97 -12
  117. package/checkbox/GroupBlock.js +62 -6
  118. package/checkbox/index.js +7 -6
  119. package/collapse/Collapse.js +88 -13
  120. package/collapse/Item.js +181 -9
  121. package/collapse/index.js +4 -2
  122. package/color-picker/ControlBar.js +21 -20
  123. package/color-picker/InputAlpha.js +10 -9
  124. package/color-picker/InputHex.js +27 -25
  125. package/color-picker/InputRgb.js +27 -24
  126. package/color-picker/Palette.js +16 -14
  127. package/color-picker/Panel.js +269 -15
  128. package/color-picker/colors.js +8 -7
  129. package/color-picker/hooks/useColorPicker.js +128 -0
  130. package/{chunk/k-OUstoD.js → color-picker/hooks/useControlBlock.js} +1 -1
  131. package/color-picker/index.js +160 -13
  132. package/color-picker/utils.js +18 -17
  133. package/comment/index.js +23 -22
  134. package/components/common/development/index.js +32 -0
  135. package/components/common/empty/index.js +17 -0
  136. package/components/common/higher-order/with-speech-synthesis/index.js +61 -0
  137. package/{chunk/DxVvggX2.js → components/common/hooks/useComputedState.js} +2 -2
  138. package/components/common/hooks/useCreate.js +8 -0
  139. package/components/common/hooks/useForceUpdate.js +8 -0
  140. package/{chunk/B4YRLi8r.js → components/common/hooks/useId.js} +5 -5
  141. package/components/common/hooks/useInView.js +31 -0
  142. package/{chunk/B4WG1mhs.js → components/common/hooks/useIntersectionObserver.js} +9 -9
  143. package/components/common/hooks/useInterval.js +18 -0
  144. package/{chunk/oopARUrq.js → components/common/hooks/useIsFirstRender.js} +1 -1
  145. package/components/common/hooks/useIsomorphicLayoutEffect.js +6 -0
  146. package/components/common/hooks/useKeyboardEvent.js +17 -0
  147. package/{chunk/BL9DMeor.js → components/common/hooks/useListenResize.js} +1 -1
  148. package/{chunk/BXAeh0_V.js → components/common/hooks/useMedia.js} +1 -1
  149. package/{chunk/BFTV6myl.js → components/common/hooks/useMergeProps.js} +3 -3
  150. package/{chunk/D5wldVRB.js → components/common/hooks/useMergeValue.js} +8 -8
  151. package/{chunk/zmmqLCF4.js → components/common/hooks/useOnlineStatus.js} +1 -1
  152. package/{chunk/DU1RCDfh.js → components/common/hooks/useOverflowHidden.js} +1 -1
  153. package/components/common/hooks/useOverrideRef.js +14 -0
  154. package/{chunk/BsY85n3_.js → components/common/hooks/usePersistCallback.js} +2 -2
  155. package/{chunk/rT6qmv-Y.js → components/common/hooks/usePrefersColorSchemeDark.js} +5 -5
  156. package/components/common/hooks/usePrevious.js +10 -0
  157. package/components/common/hooks/useRefs.js +10 -0
  158. package/{chunk/CmZzBtA4.js → components/common/hooks/useResizeObserver.js} +4 -4
  159. package/{chunk/hEWZQ8Zi.js → components/common/hooks/useStateCallback.js} +5 -5
  160. package/{chunk/Duezix3m.js → components/common/hooks/useStateWithPromise.js} +6 -6
  161. package/components/common/hooks/useUpdateEffect.js +12 -0
  162. package/components/common/hooks/useWatch.js +11 -0
  163. package/{chunk/CB4jGw4K.js → components/common/hooks/useWindowSize.js} +6 -6
  164. package/components/common/icons/file/index.js +56 -0
  165. package/components/common/space/index.js +110 -0
  166. package/components/common/utils/PqbCSSTransition.js +32 -0
  167. package/{chunk/B6r8jPCd.js → components/common/utils/constant.js} +2 -2
  168. package/components/common/utils/copy.js +7 -0
  169. package/components/common/utils/dayjs.js +193 -0
  170. package/components/common/utils/dom.js +51 -0
  171. package/components/common/utils/fillNBSP.js +7 -0
  172. package/{chunk/B7M-FGia.js → components/common/utils/getHighlightText.js} +11 -10
  173. package/{chunk/Dh7Osrvr.js → components/common/utils/getHotkeyHandler.js} +6 -5
  174. package/{chunk/DKHXj8Kf.js → components/common/utils/getStringLength.js} +3 -2
  175. package/components/common/utils/include.js +10 -0
  176. package/components/common/utils/is.js +126 -0
  177. package/{chunk/DH7HTOV_.js → components/common/utils/mergeProps.js} +3 -2
  178. package/components/common/utils/mergedToString.js +16 -0
  179. package/components/common/utils/omit.js +12 -0
  180. package/components/common/utils/pad.js +18 -0
  181. package/components/common/utils/pick.js +18 -0
  182. package/components/common/utils/react19Adapter.js +3 -0
  183. package/{chunk/BZ3igxQN.js → components/common/utils/reactDOM.js} +13 -13
  184. package/components/common/utils/resizeObserverEffect.js +23 -0
  185. package/components/common/utils/scrollIntoView.js +25 -0
  186. package/components/common/utils/setDarkTheme.js +27 -0
  187. package/components/common/utils/setPrimaryColor.js +30 -0
  188. package/{chunk/DzekwbB4.js → components/common/utils/setTheme.js} +16 -14
  189. package/components/common/utils/style.js +39 -0
  190. package/components/common/utils/throttleByRaf.js +16 -0
  191. package/components/common/utils/warning.js +11 -0
  192. package/config-provider/ConfigProvider.js +56 -13
  193. package/config-provider/context.js +24 -7
  194. package/config-provider/index.js +6 -5
  195. package/copy/index.js +15 -14
  196. package/date-picker/Picker.js +178 -172
  197. package/date-picker/RangePicker.js +585 -22
  198. package/date-picker/hook/useCellClassName.js +60 -0
  199. package/date-picker/index.js +29 -24
  200. package/date-picker/panel/Body.js +88 -0
  201. package/date-picker/panel/Footer.js +71 -0
  202. package/date-picker/panel/Header.js +69 -0
  203. package/date-picker/panel/Shortcut.js +45 -0
  204. package/date-picker/panel/WeekList.js +19 -0
  205. package/date-picker/panel/date/index.js +193 -0
  206. package/date-picker/panel/month/index.js +112 -0
  207. package/date-picker/panel/quarter/index.js +97 -0
  208. package/date-picker/panel/range/index.js +250 -0
  209. package/date-picker/panel/week/index.js +35 -0
  210. package/date-picker/panel/year/index.js +73 -0
  211. package/date-picker/util.js +8 -8
  212. package/descriptions/index.js +24 -23
  213. package/details/index.js +82 -0
  214. package/details/interface.js +1 -0
  215. package/development/index.js +17 -36
  216. package/dist/compute-scroll-into-view/src/index.js +126 -0
  217. package/dist/dom-helpers/addClass.js +10 -0
  218. package/dist/dom-helpers/hasClass.js +8 -0
  219. package/dist/dom-helpers/removeClass.js +18 -0
  220. package/dist/react-transition-group/chunk/CPfP7aNL.js +381 -0
  221. package/dist/react-transition-group/chunk/F6QOOr2H.js +500 -0
  222. package/dist/react-transition-group/src/CSSTransition.js +202 -0
  223. package/dist/react-transition-group/src/ReplaceTransition.js +43 -0
  224. package/dist/react-transition-group/src/SwitchTransition.js +117 -0
  225. package/dist/react-transition-group/src/TransitionGroup.js +160 -0
  226. package/dist/react-transition-group/src/TransitionGroupContext.js +5 -0
  227. package/dist/react-transition-group/src/config.js +6 -0
  228. package/{chunk/Coz3rCng.js → dist/scroll-into-view-if-needed/src/index.js} +5 -5
  229. package/dist/tinycolor/chunk/DGZSWe7E.js +182 -0
  230. package/dist/tinycolor/customize/index.js +12 -0
  231. package/dist/tinycolor/src/conversion.js +143 -0
  232. package/dist/tinycolor/src/css-color-names.js +153 -0
  233. package/dist/tinycolor/src/format-input.js +77 -0
  234. package/dist/tinycolor/src/index.js +388 -0
  235. package/dist/tinycolor/src/util.js +32 -0
  236. package/dist/tween/src/easing.js +43 -0
  237. package/dist/tween/src/tween.js +70 -0
  238. package/dist/validate/chunk/BXTR2LmP.js +49 -0
  239. package/{chunk/DEuVgCzp.js → dist/validate/src/index.js} +91 -151
  240. package/dist/validate/src/util.js +22 -0
  241. package/divider/index.js +15 -14
  242. package/draggable/index.js +17 -16
  243. package/drawer/Drawer.js +41 -39
  244. package/dropdown/Button.js +88 -9
  245. package/dropdown/index.js +85 -163
  246. package/empty/index.js +21 -5
  247. package/form/Control.js +1 -1
  248. package/form/Form.js +159 -14
  249. package/form/FormItem.js +30 -29
  250. package/form/FormList.js +1 -1
  251. package/form/context.js +1 -1
  252. package/form/hook/useContext.js +32 -0
  253. package/form/hook/useForm.js +58 -0
  254. package/form/hook/useState.js +31 -0
  255. package/form/hook/useWatch.js +36 -0
  256. package/form/index.js +29 -106
  257. package/form/promisify.js +1 -1
  258. package/form/store.js +1 -1
  259. package/form/util.js +5 -5
  260. package/grid/Col.js +14 -13
  261. package/grid/{grid.js → Grid.js} +23 -22
  262. package/grid/{grid-item.js → GridItem.js} +23 -22
  263. package/grid/Row.js +19 -18
  264. package/{chunk/xAb6ZgqS.js → grid/hook/useResponsiveState.js} +2 -2
  265. package/grid/index.js +13 -12
  266. package/hooks/index.js +38 -38
  267. package/hooks/use-watermark/utils.js +9 -0
  268. package/hooks/useComputedState.js +2 -2
  269. package/hooks/useCreate.js +2 -2
  270. package/hooks/useForceUpdate.js +2 -2
  271. package/hooks/useId.js +2 -2
  272. package/hooks/useInView.js +2 -2
  273. package/hooks/useIntersectionObserver.js +2 -2
  274. package/hooks/useInterval.js +2 -2
  275. package/hooks/useIsFirstRender.js +2 -2
  276. package/hooks/useIsomorphicLayoutEffect.js +2 -2
  277. package/hooks/useKeyboardEvent.js +2 -2
  278. package/hooks/useListenResize.js +2 -2
  279. package/hooks/useMedia.js +2 -2
  280. package/hooks/useMergeProps.js +2 -2
  281. package/hooks/useMergeValue.js +2 -2
  282. package/hooks/useOnlineStatus.js +2 -2
  283. package/hooks/useOverflowHidden.js +2 -2
  284. package/hooks/useOverrideRef.js +2 -2
  285. package/hooks/usePersistCallback.js +2 -2
  286. package/hooks/usePrefersColorSchemeDark.js +2 -2
  287. package/hooks/usePrevious.js +2 -2
  288. package/hooks/useRefs.js +2 -2
  289. package/hooks/useResizeObserver.js +2 -2
  290. package/hooks/useStateCallback.js +2 -2
  291. package/hooks/useStateWithPromise.js +2 -2
  292. package/hooks/useUpdateEffect.js +2 -2
  293. package/hooks/useVerificationCode.js +21 -21
  294. package/hooks/useWatch.js +2 -2
  295. package/hooks/useWatermark.js +72 -77
  296. package/hooks/useWindowSize.js +2 -2
  297. package/icon/addFromIconFontCn.js +31 -5
  298. package/icon/index.js +22 -48
  299. package/icon-hover/index.js +37 -5
  300. package/icons/file.js +15 -63
  301. package/image/Image.js +37 -33
  302. package/image/ImageFooter.js +44 -6
  303. package/image/ImagePreview.js +480 -34
  304. package/image/ImagePreviewArrow.js +8 -7
  305. package/image/ImagePreviewGroup.js +9 -9
  306. package/image/index.js +3 -3
  307. package/image/util/getFixTranslate.js +7 -0
  308. package/image/util/getScale.js +74 -0
  309. package/image/util/hook/useImageStatus.js +16 -0
  310. package/image/util/hook/useShowFooter.js +7 -0
  311. package/index.js +670 -574
  312. package/input/Button.js +67 -9
  313. package/input/Group.js +9 -8
  314. package/input/Input.js +158 -684
  315. package/input/InputElement.js +33 -33
  316. package/input/Number.js +2 -2
  317. package/input/Password.js +69 -11
  318. package/input/Search.js +68 -11
  319. package/input/Textarea.js +166 -14
  320. package/input/index.js +17 -13
  321. package/input-number/index.js +209 -16
  322. package/input-number/useSelectionRange.js +3 -3
  323. package/input-tag/InputTag.js +78 -72
  324. package/layout/Content.js +7 -6
  325. package/layout/Footer.js +7 -6
  326. package/layout/Header.js +5 -4
  327. package/layout/Sider.js +19 -18
  328. package/layout/index.js +21 -20
  329. package/link/index.js +15 -14
  330. package/list/Item.js +12 -11
  331. package/list/Meta.js +7 -6
  332. package/list/index.js +268 -17
  333. package/loading/index.js +13 -13
  334. package/loading/style/index.module.less.js +4 -0
  335. package/locale/en-US.js +4 -3
  336. package/locale/tr-TR.js +4 -3
  337. package/mentions/index.js +145 -11
  338. package/menu/Item.js +3 -3
  339. package/menu/Menu.js +182 -24
  340. package/menu/OverflowWrap.js +88 -8
  341. package/menu/index.js +9 -9
  342. package/menu/sub-menu/Inline.js +111 -0
  343. package/menu/sub-menu/Pop.js +120 -0
  344. package/menu/sub-menu/index.js +17 -0
  345. package/message/index.js +147 -13
  346. package/message/useMessage.js +57 -5
  347. package/modal/Confirm.js +110 -11
  348. package/modal/Modal.js +440 -20
  349. package/modal/index.js +1 -1
  350. package/modal/use-modal/Hook.js +52 -0
  351. package/modal/use-modal/index.js +68 -0
  352. package/notice/index.js +176 -17
  353. package/notification/index.js +149 -15
  354. package/notification/useNotification.js +52 -4
  355. package/overflow-ellipsis/OverflowItem.js +17 -16
  356. package/overflow-ellipsis/index.js +30 -29
  357. package/package.json +1 -1
  358. package/page-header/index.js +30 -28
  359. package/pagination/PageItem.js +16 -15
  360. package/pagination/PageJumper.js +13 -12
  361. package/pagination/PageOption.js +45 -5
  362. package/pagination/Pagination.js +244 -11
  363. package/pagination/index.js +2 -2
  364. package/picker/Input.js +47 -45
  365. package/picker/InputRange.js +53 -51
  366. package/popconfirm/index.js +10 -9
  367. package/popover/index.js +12 -11
  368. package/portal/Portal.js +7 -7
  369. package/progress/CircleProgress.js +1 -1
  370. package/progress/index.js +32 -31
  371. package/radio/Group.js +94 -14
  372. package/radio/GroupBlock.js +68 -7
  373. package/radio/Radio.js +92 -14
  374. package/radio/index.js +6 -5
  375. package/rate/index.js +31 -30
  376. package/resize-box/ResizeTrigger.js +10 -9
  377. package/resize-box/Split.js +66 -65
  378. package/resize-box/SplitGroup.js +10 -9
  379. package/resize-box/index.js +18 -17
  380. package/result/index.js +33 -32
  381. package/select/OptGroup.js +10 -10
  382. package/select/Option.js +93 -6
  383. package/select/Select.js +548 -24
  384. package/select/index.js +3 -3
  385. package/select/util.js +139 -18
  386. package/select-view/Core.js +23 -21
  387. package/select-view/index.js +7 -7
  388. package/skeleton/index.js +12 -11
  389. package/slider/Button.js +24 -23
  390. package/slider/Input.js +11 -11
  391. package/slider/hook/useInterval.js +73 -0
  392. package/slider/hook/useLegalValue.js +70 -0
  393. package/slider/index.js +220 -345
  394. package/space/index.js +39 -126
  395. package/space-/index.js +17 -16
  396. package/speech-synthesis/index.js +9 -63
  397. package/speech-synthesis/style/index.less.js +1 -0
  398. package/spin/DotLoading.js +10 -9
  399. package/spin/index.js +21 -20
  400. package/statistic/Countdown.js +16 -15
  401. package/statistic/index.js +45 -43
  402. package/statistic/util.js +1 -1
  403. package/steps/index.js +54 -52
  404. package/style.css +1 -1
  405. package/suspense-fallback-test/index.js +6 -5
  406. package/suspense-fallback-test/style/index.less.js +1 -0
  407. package/switch/index.js +43 -38
  408. package/table/Table.js +627 -21
  409. package/table/hook/useColumns.js +141 -0
  410. package/table/hook/useComponent.js +28 -0
  411. package/table/hook/useExpand.js +36 -0
  412. package/table/hook/useRowSelection.js +94 -0
  413. package/table/hook/useSorter.js +54 -0
  414. package/table/hook/useStickyClassNames.js +30 -0
  415. package/table/hook/useStickyOffsets.js +28 -0
  416. package/table/hook/useThResizable.js +39 -0
  417. package/table/index.js +28 -15
  418. package/table/summary/Cell.js +10 -0
  419. package/table/summary/Row.js +25 -0
  420. package/table/summary/context.js +5 -0
  421. package/table/summary/index.js +12 -0
  422. package/table/tbody/Td.js +180 -0
  423. package/table/tbody/Tr.js +165 -0
  424. package/table/tbody/index.js +154 -0
  425. package/table/tfoot/index.js +16 -0
  426. package/table/th-resizable/index.js +46 -0
  427. package/table/thead/Column.js +251 -0
  428. package/table/thead/index.js +129 -0
  429. package/tabs/Tab.js +169 -16
  430. package/tabs/TabContent.js +51 -6
  431. package/tabs/TabPane.js +13 -12
  432. package/tabs/hook/useDomSize.js +17 -0
  433. package/tabs/hook/useHeaderScroll.js +67 -0
  434. package/tabs/index.js +6 -6
  435. package/tabs/tab-header/DropdownIcon.js +66 -0
  436. package/tabs/tab-header/TabInk.js +66 -0
  437. package/tabs/tab-header/TabNavIcon.js +66 -0
  438. package/tabs/tab-header/TabTitle.js +78 -0
  439. package/tabs/tab-header/index.js +331 -0
  440. package/tag/index.js +32 -30
  441. package/time-picker/Picker.js +64 -63
  442. package/time-picker/RangePicker.js +15 -15
  443. package/time-picker/TimeColumn.js +1 -1
  444. package/time-picker/TimePicker.js +42 -41
  445. package/time-picker/index.js +2 -2
  446. package/time-picker/util.js +23 -22
  447. package/timeline/Item.js +4 -3
  448. package/timeline/Timeline.js +12 -11
  449. package/tooltip/index.js +35 -33
  450. package/transfer/Item.js +104 -9
  451. package/transfer/List.js +186 -13
  452. package/transfer/index.js +181 -13
  453. package/tree/Animation.js +100 -9
  454. package/tree/Node.js +212 -13
  455. package/tree/NodeList.js +80 -6
  456. package/tree/Tree.js +591 -17
  457. package/tree/index.js +3 -2
  458. package/tree-select/List.js +122 -6
  459. package/tree-select/Select.js +258 -22
  460. package/tree-select/hook/useKeyCache.js +55 -0
  461. package/tree-select/hook/useStateValue.js +95 -0
  462. package/tree-select/hook/useTreeData.js +13 -0
  463. package/tree-select/index.js +3 -3
  464. package/trigger/getPopupStyle.js +2 -2
  465. package/trigger/index.js +27 -22
  466. package/types/common/space/interface.d.ts +4 -0
  467. package/types/common/utils/dayjs.d.ts +2 -2
  468. package/types/common/utils/is.d.ts +2 -1
  469. package/types/pc/anchor/Anchor.d.ts +1 -0
  470. package/types/pc/anchor/index.d.ts +2 -1
  471. package/types/pc/auto-complete/index.d.ts +6 -0
  472. package/types/pc/avatar/index.d.ts +1 -0
  473. package/types/pc/badge/index.d.ts +5 -3
  474. package/types/pc/breadcrumb/index.d.ts +1 -0
  475. package/types/pc/calendar/index.d.ts +3 -0
  476. package/types/pc/card/index.d.ts +1 -0
  477. package/types/pc/cascader/Cascader.d.ts +1 -1
  478. package/types/pc/collapse/Collapse.d.ts +1 -0
  479. package/types/pc/collapse/index.d.ts +2 -1
  480. package/types/pc/color-picker/index.d.ts +7 -0
  481. package/types/pc/date-picker/index.d.ts +1 -1
  482. package/types/pc/date-picker/interface.d.ts +2 -2
  483. package/types/pc/date-picker/panel/Body.d.ts +1 -1
  484. package/types/pc/details/index.d.ts +4 -0
  485. package/types/pc/details/interface.d.ts +33 -0
  486. package/types/pc/form/hook/useForm.d.ts +1 -1
  487. package/types/pc/form/index.d.ts +1 -1
  488. package/types/pc/grid/index.d.ts +3 -4
  489. package/types/pc/index.d.ts +16 -14
  490. package/types/pc/menu/Indent.d.ts +1 -1
  491. package/types/pc/select/interface.d.ts +3 -3
  492. package/types/pc/space/index.d.ts +2 -2
  493. package/types/pc/steps/index.d.ts +1 -0
  494. package/types/pc/time-picker/index.d.ts +1 -1
  495. package/types/pc/tree/Context.d.ts +1 -1
  496. package/types/pc/tree/interface.d.ts +2 -2
  497. package/types/pc/utils/constant.d.ts +2 -2
  498. package/types/pc/utils/index.d.ts +1 -0
  499. package/types/pc/utils/names.d.ts +402 -85
  500. package/typography/Base.js +43 -42
  501. package/typography/EditContent.js +7 -7
  502. package/typography/Ellipsis.js +195 -24
  503. package/typography/Operations.js +4 -4
  504. package/typography/Paragraph.js +12 -11
  505. package/typography/Typography.js +8 -7
  506. package/typography/index.js +15 -10
  507. package/typography/useEllipsis.js +21 -21
  508. package/upload/TriggerNode.js +9 -8
  509. package/upload/Upload.js +126 -548
  510. package/upload/Uploader.js +11 -11
  511. package/upload/index.js +2 -2
  512. package/upload/list/PictureItem.js +119 -0
  513. package/upload/list/TextItem.js +123 -0
  514. package/upload/list/UploadProgress.js +96 -0
  515. package/upload/list/index.js +140 -0
  516. package/upload/request.js +3 -3
  517. package/upload/request_.js +5 -5
  518. package/utils/PqbCSSTransition.js +3 -3
  519. package/utils/color.js +1 -1
  520. package/utils/computeScrollIntoView.js +4 -126
  521. package/utils/constant.js +9 -9
  522. package/utils/contextHolder.js +29 -4
  523. package/utils/dayjs.js +11 -11
  524. package/utils/dom.js +7 -49
  525. package/utils/fillNBSP.js +3 -3
  526. package/utils/getHighlightText.js +1 -1
  527. package/utils/getHotkeyHandler.js +1 -1
  528. package/utils/getStringLength.js +1 -1
  529. package/utils/include.js +3 -3
  530. package/utils/index.js +284 -272
  531. package/utils/is.js +39 -39
  532. package/utils/mergeProps.js +1 -1
  533. package/utils/mergedToString.js +1 -1
  534. package/utils/names.js +298 -86
  535. package/utils/omit.js +1 -1
  536. package/utils/pad.js +3 -16
  537. package/utils/pick.js +5 -5
  538. package/utils/react19Adapter.js +1 -3
  539. package/utils/reactDOM.js +3 -3
  540. package/utils/reactTransitionGroup.js +12 -8
  541. package/utils/resizeObserverEffect.js +1 -1
  542. package/utils/scrollIntoView.js +1 -1
  543. package/utils/setDarkTheme.js +10 -30
  544. package/utils/setPrimaryColor.js +6 -29
  545. package/utils/setTheme.js +3 -3
  546. package/utils/style.js +4 -37
  547. package/utils/throttleByRaf.js +3 -14
  548. package/utils/throttleByRaf2.js +1 -1
  549. package/utils/tinycolor.js +26 -27
  550. package/utils/tween.js +4 -3
  551. package/utils/validate.js +5 -4
  552. package/utils/warning.js +3 -9
  553. package/verification-code/VerificationCode.js +25 -24
  554. package/version/index.js +1 -1
  555. package/virtual-list/VirtualList.js +280 -392
  556. package/virtual-list/util/algorithm.js +32 -0
  557. package/virtual-list/util/item.js +99 -0
  558. package/watermark/Watermark.js +17 -16
  559. package/chunk/5_U1CBIu.js +0 -8
  560. package/chunk/9TSjT7x_.js +0 -927
  561. package/chunk/B2yFlXke.js +0 -6
  562. package/chunk/B44Hj5ad.js +0 -697
  563. package/chunk/B5RFT17G.js +0 -15
  564. package/chunk/BC2OXILt.js +0 -178
  565. package/chunk/BJ9_azwQ.js +0 -1391
  566. package/chunk/BKKEev13.js +0 -11
  567. package/chunk/BKT9BFf4.js +0 -11
  568. package/chunk/BL8tIaO8.js +0 -649
  569. package/chunk/BNevupAU.js +0 -72
  570. package/chunk/BP4igg_F.js +0 -213
  571. package/chunk/BYdIoY50.js +0 -17
  572. package/chunk/Bg3uJGPu.js +0 -10
  573. package/chunk/BsUZRQDT.js +0 -23
  574. package/chunk/C4OrxKE6.js +0 -18
  575. package/chunk/C7bohPVD.js +0 -185
  576. package/chunk/CC---6jO.js +0 -110
  577. package/chunk/CCKr5jj1.js +0 -31
  578. package/chunk/CIRG541s.js +0 -22
  579. package/chunk/CPCJg6bv.js +0 -570
  580. package/chunk/CQ_WOOmf.js +0 -8
  581. package/chunk/CYhxqVkn.js +0 -9
  582. package/chunk/CftuXmo_.js +0 -6
  583. package/chunk/CgyNQvYg.js +0 -7828
  584. package/chunk/CkEaf5V0.js +0 -473
  585. package/chunk/ClM74To2.js +0 -58
  586. package/chunk/ClqoGc3r.js +0 -17
  587. package/chunk/D-ap9qEk.js +0 -14
  588. package/chunk/DWvmq7az.js +0 -843
  589. package/chunk/DYmI9fFY.js +0 -257
  590. package/chunk/Doi4-DdV.js +0 -1472
  591. package/chunk/DxYoPlum.js +0 -50
  592. package/chunk/NPajzdOv.js +0 -27
  593. package/chunk/VSe_Wq1g.js +0 -10
  594. package/chunk/a3hR6zLw.js +0 -12
  595. package/types/common/assets/hourglass.d.ts +0 -2
  596. /package/types/pc/grid/{grid.d.ts → Grid.d.ts} +0 -0
  597. /package/types/pc/grid/{grid-item.d.ts → GridItem.d.ts} +0 -0
package/chunk/Doi4-DdV.js DELETED
@@ -1,1472 +0,0 @@
1
- import { jsx as o, jsxs as Z, Fragment as ye } from "react/jsx-runtime";
2
- import Mn from "@unicom-cloud/icons/IconUiCalendar";
3
- import Hn from "@unicom-cloud/icons/IconUiCalendarClock";
4
- import { isDayjs as Gt } from "dayjs";
5
- import G from "lodash/isArray";
6
- import Ge from "lodash/isPlainObject";
7
- import _n from "lodash/isUndefined";
8
- import { useContext as ce, useMemo as un, forwardRef as Fn, useRef as Re, useImperativeHandle as Wn, useState as ie, useEffect as Ke } from "react";
9
- import { a as Ye } from "./B44Hj5ad.js";
10
- import { u as Bn } from "./BFTV6myl.js";
11
- import { u as Xt } from "./VSe_Wq1g.js";
12
- import { u as Zt } from "./a3hR6zLw.js";
13
- import zn from "../picker/InputRange.js";
14
- import qn from "../trigger/index.js";
15
- import ge from "@unicom-cloud/utils/class-name";
16
- import { b as Me, a as te, d as Ct, c as Un, g as oe, m as X, k as en, j as Pt, e as Je, h as jn, i as Qn } from "./C7bohPVD.js";
17
- import { a as Kn } from "./ClqoGc3r.js";
18
- import $e from "../date-picker/context.js";
19
- import { F as Jn, S as Gn } from "./CC---6jO.js";
20
- import et from "lodash/merge";
21
- import { getAvailableDayjsLength as Xe, isDisabledDate as Xn, getFormatByIndex as he, getDefaultWeekStart as Zn, getLocaleDayjsValue as yt } from "../date-picker/util.js";
22
- import tn from "@unicom-cloud/icons/IconUiDoubleLeft";
23
- import nn from "@unicom-cloud/icons/IconUiDoubleRight";
24
- import on from "@unicom-cloud/icons/IconUiLeft";
25
- import rn from "@unicom-cloud/icons/IconUiRight";
26
- import { newArray as Ze } from "../utils/constant.js";
27
- import { padStart as dn } from "../utils/pad.js";
28
- import eo from "../time-picker/TimePicker.js";
29
- import { o as to } from "./BKKEev13.js";
30
- function xe(u, n) {
31
- if (u && G(u))
32
- return u[n];
33
- }
34
- function no(u) {
35
- const {
36
- prefixCls: n,
37
- value: d,
38
- rangeValues: a,
39
- valueShowHover: i,
40
- isSameTime: l,
41
- mode: g,
42
- hideNotInViewDates: s
43
- } = u, c = Xe(a), b = Xe(i), P = c !== 2 && b === 2 ? Me(i) : a, Y = c === 2 ? Me(i) : [];
44
- function V(S, v, $) {
45
- if (v && $)
46
- return l(S, v) || l(S, $) || S.isBetween(v, $, null);
47
- }
48
- return function(v, $, z, A) {
49
- const f = xe(P, 0), k = xe(P, 1), R = xe(Y, 0), I = xe(Y, 1), p = !v.isPrev && !v.isNext, N = d && l(v.time, d);
50
- let y = l(v.time, te(z, A));
51
- const L = g !== "week" ? p : !0;
52
- g === "week" && (y = te(z, A).isSame(v.time, "date")), g === "quarter" && (y = te(z, A).isSame(v.time, "quarter"));
53
- function D(T) {
54
- return L && !$ && T && l(v.time, T);
55
- }
56
- const J = D(f), h = D(k), C = D(
57
- xe(a, 0)
58
- ), j = D(
59
- xe(a, 1)
60
- ), _ = D(R), F = D(I);
61
- let W = !1;
62
- J ? W = R && f && R.isBefore(f) && V(f, R, I) : h && (W = I && k && I.isAfter(k) && V(k, R, I));
63
- let w = !1;
64
- return _ ? w = R && f && f.isBefore(R) && V(R, f, k) : F && (w = I && k && k.isAfter(I) && V(I, f, k)), ge(`${n}-cell`, {
65
- [`${n}-cell-disabled`]: $,
66
- [`${n}-cell-hidden`]: s && !p,
67
- [`${n}-cell-in-view`]: p,
68
- [`${n}-cell-today`]: y && p,
69
- [`${n}-cell-selected`]: N || C || j,
70
- [`${n}-cell-selected-start`]: C,
71
- [`${n}-cell-selected-end`]: j,
72
- [`${n}-cell-range-start`]: J,
73
- [`${n}-cell-range-end`]: h,
74
- [`${n}-cell-in-range`]: L && !$ && V(v.time, f, k),
75
- [`${n}-cell-hover-range-start`]: _,
76
- [`${n}-cell-hover-range-end`]: F,
77
- [`${n}-cell-hover-in-range`]: L && !$ && V(v.time, R, I),
78
- [`${n}-cell-range-edge-in-hover-range`]: W,
79
- [`${n}-cell-hover-range-edge-in-range`]: w
80
- });
81
- };
82
- }
83
- function oo(u) {
84
- const { prefixCls: n, weekStart: d, isWeek: a, CALENDAR_LOCALE: i } = u;
85
- let l = [
86
- "sunday",
87
- "monday",
88
- "tuesday",
89
- "wednesday",
90
- "thursday",
91
- "friday",
92
- "saturday"
93
- ];
94
- l = l.slice(d).concat(l.slice(0, d)), a && l.unshift("");
95
- const g = i.week.short;
96
- return /* @__PURE__ */ o("div", { className: `${n}-week-list`, children: l.map((s) => /* @__PURE__ */ o("div", { className: `${n}-week-list-item`, children: s && g[s] }, s)) });
97
- }
98
- function tt(u) {
99
- var f;
100
- const {
101
- prefixCls: n,
102
- isWeek: d,
103
- disabledDate: a,
104
- onSelectDate: i,
105
- dateRender: l,
106
- onMouseEnterCell: g,
107
- onMouseLeaveCell: s,
108
- CALENDAR_LOCALE: c,
109
- rows: b,
110
- showWeekList: P,
111
- isSameTime: Y,
112
- format: V,
113
- mode: S
114
- } = u, { utcOffset: v, timezone: $, weekStart: z } = ce($e), A = no({
115
- ...u,
116
- isSameTime: Y
117
- });
118
- return /* @__PURE__ */ Z(ye, { children: [
119
- P && /* @__PURE__ */ o(
120
- oo,
121
- {
122
- prefixCls: n,
123
- weekStart: z,
124
- isWeek: d,
125
- CALENDAR_LOCALE: c
126
- }
127
- ),
128
- /* @__PURE__ */ o("div", { className: `${n}-body`, children: (f = b == null ? void 0 : b.map) == null ? void 0 : f.call(b, (k, R, I) => /* @__PURE__ */ o(
129
- "div",
130
- {
131
- className: ge(`${n}-row`, {
132
- [`${n}-row-week`]: d
133
- }),
134
- children: k.map((N, y, L) => {
135
- if (N.time) {
136
- const D = Xn(N.time, a, S);
137
- return /* @__PURE__ */ o(
138
- "div",
139
- {
140
- className: A(
141
- N,
142
- D,
143
- v,
144
- $
145
- ),
146
- onMouseEnter: () => g == null ? void 0 : g(N.time, D),
147
- onMouseLeave: () => s == null ? void 0 : s(N.time, D),
148
- onClick: () => !D && i(N.time.format(V), N.time),
149
- children: l ? l(N.time) : /* @__PURE__ */ o("div", { className: `${n}-date`, children: /* @__PURE__ */ o("div", { className: `${n}-date-value`, children: N.name }) })
150
- },
151
- y
152
- );
153
- }
154
- if ("weekOfYear" in N)
155
- return /* @__PURE__ */ o(
156
- "div",
157
- {
158
- className: ge(
159
- `${n}-cell`,
160
- `${n}-cell-week`
161
- ),
162
- children: /* @__PURE__ */ o("div", { className: `${n}-date`, children: /* @__PURE__ */ o("div", { className: `${n}-date-value`, children: N.weekOfYear }) })
163
- },
164
- y
165
- );
166
- })
167
- },
168
- R
169
- )) })
170
- ] });
171
- }
172
- function nt(u) {
173
- const {
174
- prefixCls: n,
175
- title: d,
176
- onPrev: a,
177
- onNext: i,
178
- onSuperPrev: l,
179
- onSuperNext: g,
180
- mode: s,
181
- value: c,
182
- onChangePanel: b,
183
- icons: P = {},
184
- rtl: Y,
185
- DATEPICKER_LOCALE: V
186
- } = u, S = typeof a == "function", v = typeof l == "function", $ = typeof i == "function", z = typeof g == "function", A = (N) => ge(`${n}-header-icon`, {
187
- [`${n}-header-icon-hidden`]: !N
188
- });
189
- function f() {
190
- const { monthBeforeYear: N, monthFormat: y, yearFormat: L } = (V == null ? void 0 : V.Calendar) || {};
191
- if (d)
192
- return d;
193
- if (s === "date" || s === "week") {
194
- const D = /* @__PURE__ */ o(
195
- "span",
196
- {
197
- className: `${n}-header-label`,
198
- onClick: () => b("year"),
199
- children: c.format(L || "YYYY")
200
- },
201
- "year-node"
202
- ), J = /* @__PURE__ */ o(
203
- "span",
204
- {
205
- className: `${n}-header-label`,
206
- onClick: () => b("month"),
207
- children: c.format(y || "MM")
208
- },
209
- "month-node"
210
- );
211
- return N ? [J, D] : [D, J];
212
- }
213
- if (s === "month" || s === "quarter")
214
- return /* @__PURE__ */ o(
215
- "span",
216
- {
217
- className: `${n}-header-label`,
218
- onClick: () => b("year"),
219
- children: c.format(L || "YYYY")
220
- }
221
- );
222
- }
223
- const k = P.prevDouble === null, R = P.prev === null, I = P.next === null, p = P.nextDouble === null;
224
- return /* @__PURE__ */ Z("div", { className: `${n}-header`, children: [
225
- !k && /* @__PURE__ */ o("div", { className: A(v), onClick: l, children: v && (k ? null : P.prevDouble || (Y ? /* @__PURE__ */ o(nn, {}) : /* @__PURE__ */ o(tn, {}))) }),
226
- !R && /* @__PURE__ */ o("div", { className: A(S), onClick: a, children: S && (R ? null : P.prev || (Y ? /* @__PURE__ */ o(rn, {}) : /* @__PURE__ */ o(on, {}))) }),
227
- /* @__PURE__ */ o("div", { className: `${n}-header-value`, children: f() }),
228
- !I && /* @__PURE__ */ o("div", { className: A($), onClick: i, children: $ && (I ? null : P.next || (Y ? /* @__PURE__ */ o(on, {}) : /* @__PURE__ */ o(rn, {}))) }),
229
- !p && /* @__PURE__ */ o("div", { className: A(z), onClick: g, children: z && (p ? null : P.nextDouble || (Y ? /* @__PURE__ */ o(tn, {}) : /* @__PURE__ */ o(nn, {}))) })
230
- ] });
231
- }
232
- function He(u) {
233
- const {
234
- pageShowDate: n,
235
- style: d,
236
- onMouseEnterCell: a,
237
- onMouseLeaveCell: i,
238
- dateRender: l,
239
- disabledDate: g,
240
- value: s,
241
- locale: c,
242
- isRangePicker: b,
243
- onSelect: P,
244
- rangeValues: Y,
245
- onSuperPrev: V,
246
- onSuperNext: S,
247
- format: v,
248
- icons: $,
249
- ...z
250
- } = u, { locale: A, getPrefixCls: f, rtl: k } = ce(Ye), I = et(A.DatePicker, c).Calendar, { utcOffset: p, timezone: N } = ce($e), y = f == null ? void 0 : f("panel-year"), L = ge(y), D = b ? { rangeValues: Y } : { value: s }, J = n ? n.year() : te(p, N).year(), h = Math.floor(J / 10) * 10 - 1, C = Ze(3).map((W) => ""), j = Ze(4).map((W) => C).map((W, w) => W.map((T, q) => ({
251
- name: h + w * 3 + q,
252
- time: Ct(`${h + w * 3 + q}`, "YYYY").endOf("year"),
253
- isPrev: w === 0 && q === 0,
254
- isNext: w === 3 && q === 2
255
- })));
256
- function _() {
257
- return /* @__PURE__ */ o(
258
- tt,
259
- {
260
- ...z,
261
- ...D,
262
- prefixCls: f == null ? void 0 : f("picker"),
263
- rows: j,
264
- onSelectDate: P,
265
- isSameTime: (W, w) => W.isSame(w, "year"),
266
- onMouseEnterCell: a,
267
- onMouseLeaveCell: i,
268
- dateRender: l,
269
- disabledDate: g,
270
- CALENDAR_LOCALE: I,
271
- mode: "year",
272
- format: v
273
- }
274
- );
275
- }
276
- const F = { onSuperPrev: V, onSuperNext: S };
277
- return /* @__PURE__ */ Z("div", { className: L, style: d, children: [
278
- /* @__PURE__ */ o(
279
- nt,
280
- {
281
- prefixCls: f == null ? void 0 : f("picker"),
282
- icons: $,
283
- title: `${j[0][1].name} - ${j[3][2].name}`,
284
- rtl: k,
285
- ...F
286
- }
287
- ),
288
- _()
289
- ] });
290
- }
291
- function Dt(u) {
292
- const {
293
- pageShowDate: n,
294
- style: d,
295
- onMouseEnterCell: a,
296
- onMouseLeaveCell: i,
297
- dateRender: l,
298
- disabledDate: g,
299
- value: s,
300
- locale: c,
301
- isRangePicker: b,
302
- onSelect: P,
303
- rangeValues: Y,
304
- onSuperPrev: V,
305
- onSuperNext: S,
306
- format: v,
307
- getHeaderOperations: $,
308
- setPageShowDate: z,
309
- icons: A,
310
- panelMode: f,
311
- setPanelMode: k,
312
- ...R
313
- } = u, { locale: I, getPrefixCls: p, rtl: N } = ce(Ye), y = et(I.DatePicker, c), L = y.Calendar, D = p == null ? void 0 : p("panel-month"), J = ge(D), h = b ? { rangeValues: Y } : { value: s }, C = n.year(), j = un(() => {
314
- const w = [
315
- "January",
316
- "February",
317
- "March",
318
- "April",
319
- "May",
320
- "June",
321
- "July",
322
- "August",
323
- "September",
324
- "October",
325
- "November",
326
- "December"
327
- ].map((q, re) => ({
328
- name: L.month.short[q],
329
- time: Ct(
330
- `${C}-${dn(re + 1, 2, "0")}`,
331
- "YYYY-MM"
332
- ).endOf("month")
333
- })), T = Array(4);
334
- for (let q = 0; q < 4; q++)
335
- T[q] = w.slice(q * 3, 3 * (q + 1));
336
- return T;
337
- }, [C, L]);
338
- function _() {
339
- return /* @__PURE__ */ o(
340
- tt,
341
- {
342
- ...R,
343
- ...h,
344
- prefixCls: p == null ? void 0 : p("picker"),
345
- rows: j,
346
- onSelectDate: P,
347
- isSameTime: (w, T) => w.isSame(T, "month"),
348
- onMouseEnterCell: a,
349
- onMouseLeaveCell: i,
350
- dateRender: l,
351
- disabledDate: g,
352
- CALENDAR_LOCALE: L,
353
- mode: "month",
354
- format: v
355
- }
356
- );
357
- }
358
- const F = { onSuperPrev: V, onSuperNext: S };
359
- function W(w) {
360
- k(w);
361
- }
362
- return f === "year" ? /* @__PURE__ */ o(
363
- He,
364
- {
365
- ...$(f),
366
- pageShowDate: n,
367
- onSelect: (w, T) => {
368
- k("month"), z(T);
369
- },
370
- disabledDate: g
371
- }
372
- ) : /* @__PURE__ */ Z("div", { className: J, style: d, children: [
373
- /* @__PURE__ */ o(
374
- nt,
375
- {
376
- ...F,
377
- DATEPICKER_LOCALE: y,
378
- icons: A,
379
- prefixCls: p == null ? void 0 : p("picker"),
380
- value: n,
381
- mode: f,
382
- onChangePanel: W,
383
- rtl: N
384
- }
385
- ),
386
- _()
387
- ] });
388
- }
389
- const an = 6 * 7, bt = (u) => ({
390
- year: u.year(),
391
- month: u.month() + 1,
392
- day: u.day(),
393
- name: u.date(),
394
- time: u
395
- }), ro = (u) => ({
396
- ...bt(X.startOf(u, "month")),
397
- days: u.daysInMonth()
398
- });
399
- function ao(u, n) {
400
- const { dayStartOfWeek: d, isWeek: a } = u, i = ro(n), l = Ze(an).map((c, b, P) => ({})), g = i.day - d < 0 ? 7 + (i.day - d) : i.day - d;
401
- l[g] = {
402
- ...i
403
- };
404
- for (let c = 0; c < g; c++)
405
- l[g - c - 1] = {
406
- ...bt(X.subtract(i.time, c + 1, "day")),
407
- isPrev: !0
408
- };
409
- for (let c = 0; c < an - g - 1; c++)
410
- l[g + c + 1] = {
411
- ...bt(X.add(i.time, c + 1, "day")),
412
- isNext: c >= i.days - 1
413
- };
414
- const s = Ze(6).map((c, b, P) => []);
415
- for (let c = 0; c < 6; c++)
416
- if (s[c] = l.slice(c * 7, 7 * (c + 1)), a) {
417
- const b = s[c][0].time, P = [...s[c]];
418
- s[c].unshift({
419
- weekRows: P,
420
- weekOfYear: b.week()
421
- });
422
- }
423
- return s;
424
- }
425
- function Nt(u) {
426
- const {
427
- isWeek: n,
428
- popupVisible: d,
429
- format: a,
430
- pageShowDate: i,
431
- showTime: l,
432
- style: g,
433
- timepickerProps: s,
434
- onMouseEnterCell: c,
435
- onMouseLeaveCell: b,
436
- dateRender: P,
437
- disabledDate: Y,
438
- disabledTime: V,
439
- value: S,
440
- rangeValues: v,
441
- locale: $,
442
- isRangePicker: z,
443
- onSelect: A,
444
- onTimePickerSelect: f,
445
- onPrev: k,
446
- onNext: R,
447
- onSuperPrev: I,
448
- onSuperNext: p,
449
- isSameTime: N,
450
- index: y,
451
- getHeaderOperations: L,
452
- setPageShowDate: D,
453
- timeValue: J,
454
- hideNotInViewDates: h,
455
- icons: C,
456
- isTimePanel: j,
457
- panelMode: _,
458
- setPanelMode: F,
459
- ...W
460
- } = u, { locale: w, getPrefixCls: T, rtl: q } = ce(Ye), { utcOffset: re, timezone: ae, weekStart: fe } = ce($e), le = et(w.DatePicker, $), x = T == null ? void 0 : T(n ? "panel-week" : "panel-date"), O = ge(x), Ie = z ? { rangeValues: v } : { value: S }, ue = Ge(l) && l.format || Un(a), Q = w.dayjsLocale, ne = un(() => ao(
461
- { ...u, dayStartOfWeek: fe },
462
- i.locale(Q)
463
- ), [i.toString(), fe, Q]);
464
- let B;
465
- z ? B = typeof V == "function" ? V(
466
- v[y],
467
- y === 0 ? "start" : "end"
468
- ) : {} : B = typeof V == "function" ? V(oe(S, a)) : {};
469
- function U() {
470
- return /* @__PURE__ */ o(
471
- tt,
472
- {
473
- ...W,
474
- ...Ie,
475
- showWeekList: !0,
476
- isWeek: n,
477
- prefixCls: T == null ? void 0 : T("picker"),
478
- rows: ne,
479
- isSameTime: N || ((E, ke) => E.isSame(ke, "day")),
480
- onSelectDate: A,
481
- onMouseEnterCell: c,
482
- onMouseLeaveCell: b,
483
- dateRender: P,
484
- disabledDate: Y,
485
- CALENDAR_LOCALE: le.Calendar,
486
- mode: n ? "week" : "date",
487
- format: a,
488
- hideNotInViewDates: h
489
- }
490
- );
491
- }
492
- function de() {
493
- const E = Ge(l) ? l : {};
494
- return /* @__PURE__ */ Z("div", { className: `${x}-timepicker`, children: [
495
- /* @__PURE__ */ o("header", { className: `${x}-timepicker-title`, children: le.selectTime }),
496
- /* @__PURE__ */ o(
497
- eo,
498
- {
499
- ...to(s, ["disableConfirm"]),
500
- ...E,
501
- ...B,
502
- hideFooter: !0,
503
- format: ue,
504
- valueShow: J.format(ue),
505
- onSelect: f,
506
- popupVisible: d,
507
- utcOffset: re,
508
- timezone: ae
509
- }
510
- )
511
- ] });
512
- }
513
- const M = {
514
- onPrev: k,
515
- onSuperPrev: I,
516
- onNext: R,
517
- onSuperNext: p,
518
- DATEPICKER_LOCALE: le
519
- };
520
- function pe(E) {
521
- F(E);
522
- }
523
- return _ === "year" ? /* @__PURE__ */ o(
524
- He,
525
- {
526
- ...L(_),
527
- pageShowDate: i,
528
- onSelect: (E, ke) => {
529
- F("month"), D(ke);
530
- },
531
- disabledDate: Y
532
- }
533
- ) : _ === "month" ? /* @__PURE__ */ o(
534
- Dt,
535
- {
536
- ...L(_),
537
- setPageShowDate: D,
538
- pageShowDate: i,
539
- panelMode: _,
540
- getHeaderOperations: L,
541
- onSelect: (E, ke) => {
542
- F("date"), D(ke);
543
- },
544
- disabledDate: Y,
545
- setPanelMode: F
546
- }
547
- ) : /* @__PURE__ */ o("div", { className: O, style: g, children: l && j ? de() : /* @__PURE__ */ Z("div", { className: `${x}-inner`, children: [
548
- /* @__PURE__ */ o(
549
- nt,
550
- {
551
- ...M,
552
- icons: C,
553
- prefixCls: T == null ? void 0 : T("picker"),
554
- value: i,
555
- mode: _,
556
- onChangePanel: pe,
557
- rtl: q
558
- }
559
- ),
560
- U()
561
- ] }) });
562
- }
563
- function sn(u) {
564
- const {
565
- pageShowDate: n,
566
- style: d,
567
- onMouseEnterCell: a,
568
- onMouseLeaveCell: i,
569
- dateRender: l,
570
- disabledDate: g,
571
- value: s,
572
- locale: c,
573
- isRangePicker: b,
574
- onSelect: P,
575
- rangeValues: Y,
576
- onSuperPrev: V,
577
- onSuperNext: S,
578
- format: v,
579
- getHeaderOperations: $,
580
- setPageShowDate: z,
581
- icons: A,
582
- panelMode: f,
583
- setPanelMode: k,
584
- ...R
585
- } = u, { locale: I, getPrefixCls: p, rtl: N } = ce(Ye), y = et(I.DatePicker, c), L = y.Calendar, D = p == null ? void 0 : p("panel-quarter"), J = ge(D), h = b ? { rangeValues: Y } : { value: s }, C = n.year(), j = [
586
- [1, 2, 3, 4].map((w, T, q) => {
587
- var re;
588
- return {
589
- name: ((re = L.quarter) == null ? void 0 : re[`q${w}`]) || `Q${w}`,
590
- // 潘启宝修改 2024年12月23日 星期一 15时21分14秒 CST
591
- time: Ct(`${C}-${dn((w - 1) * 3 + 1, 2, "0")}-01`)
592
- };
593
- })
594
- ];
595
- function _() {
596
- return /* @__PURE__ */ o(
597
- tt,
598
- {
599
- ...R,
600
- ...h,
601
- prefixCls: p == null ? void 0 : p("picker"),
602
- rows: j,
603
- onSelectDate: P,
604
- isSameTime: (w, T) => w.isSame(T, "month"),
605
- onMouseEnterCell: a,
606
- onMouseLeaveCell: i,
607
- dateRender: l,
608
- disabledDate: g,
609
- CALENDAR_LOCALE: L,
610
- mode: "quarter",
611
- format: v
612
- }
613
- );
614
- }
615
- const F = { onSuperPrev: V, onSuperNext: S };
616
- function W(w) {
617
- k(w);
618
- }
619
- return f === "year" ? /* @__PURE__ */ o(
620
- He,
621
- {
622
- ...$(f),
623
- pageShowDate: n,
624
- onSelect: (w, T) => {
625
- k("quarter"), z(T);
626
- },
627
- disabledDate: g
628
- }
629
- ) : /* @__PURE__ */ Z("div", { className: J, style: d, children: [
630
- /* @__PURE__ */ o(
631
- nt,
632
- {
633
- ...F,
634
- icons: A,
635
- prefixCls: p == null ? void 0 : p("picker"),
636
- value: n,
637
- mode: f,
638
- onChangePanel: W,
639
- DATEPICKER_LOCALE: y,
640
- rtl: N
641
- }
642
- ),
643
- /* @__PURE__ */ o("div", { className: `${D}-wrapper`, children: _() })
644
- ] });
645
- }
646
- function cn(u) {
647
- const {
648
- value: n,
649
- isRangePicker: d,
650
- rangeValues: a,
651
- onPrev: i,
652
- onNext: l,
653
- onSuperPrev: g,
654
- onSuperNext: s,
655
- localeName: c,
656
- ...b
657
- } = u, { weekStart: P } = ce($e), Y = d ? { rangeValues: a } : { value: n }, V = { onPrev: i, onNext: l, onSuperPrev: g, onSuperNext: s };
658
- function S(v, $) {
659
- return X.isSameWeek(v, $, P, c);
660
- }
661
- return /* @__PURE__ */ o(
662
- Nt,
663
- {
664
- ...b,
665
- ...Y,
666
- ...V,
667
- isWeek: !0,
668
- isSameTime: S,
669
- isRangePicker: d
670
- }
671
- );
672
- }
673
- function kt(u, n) {
674
- const d = [];
675
- for (let a = u; a < n; a++)
676
- d.push(a);
677
- return d;
678
- }
679
- function so(u) {
680
- const {
681
- mode: n = "date",
682
- showTime: d,
683
- disabledDate: a,
684
- disabledTime: i,
685
- format: l,
686
- dateRender: g,
687
- value: s,
688
- timeValues: c,
689
- icons: b,
690
- locale: P,
691
- pageShowDates: Y,
692
- onMouseEnterCell: V,
693
- onMouseLeaveCell: S,
694
- onTimePickerSelect: v,
695
- onSelectPanel: $,
696
- onPrev: z,
697
- onSuperPrev: A,
698
- onNext: f,
699
- onSuperNext: k,
700
- localeName: R,
701
- popupVisible: I,
702
- timepickerProps: p,
703
- getHeaderOperations: N,
704
- setRangePageShowDates: y,
705
- disabledTimePickerIndex: L,
706
- hideNotInViewDates: D,
707
- isTimePanel: J,
708
- valueShowHover: h,
709
- panelModes: C,
710
- setPanelModes: j
711
- } = u, { getPrefixCls: _ } = ce(Ye), F = _ == null ? void 0 : _("picker-range"), { utcOffset: W, timezone: w } = ce($e), T = Y[0] || te(W, w), q = Y[1] || te(W, w), ae = {
712
- isRangePicker: !0,
713
- rangeValues: oe(s, l),
714
- onMouseEnterCell: V,
715
- onMouseLeaveCell: S,
716
- locale: P,
717
- disabledDate: a,
718
- onSelect: $,
719
- dateRender: g,
720
- getHeaderOperations: N,
721
- icons: b,
722
- valueShowHover: h
723
- }, fe = {
724
- pageShowDate: T,
725
- panelMode: C[0],
726
- setPanelMode: (Q) => j([Q, C[1]]),
727
- format: he(l, 0)
728
- }, le = {
729
- pageShowDate: q,
730
- panelMode: C[1],
731
- setPanelMode: (Q) => j([C[0], Q]),
732
- format: he(l, 1)
733
- };
734
- function x() {
735
- const Q = {
736
- onPrev: z,
737
- onSuperPrev: A
738
- }, ne = {
739
- onNext: f,
740
- onSuperNext: k
741
- }, B = {
742
- ...ae,
743
- localeName: R,
744
- popupVisible: I,
745
- timepickerProps: p,
746
- getHeaderOperations: N,
747
- hideNotInViewDates: D,
748
- isTimePanel: J
749
- };
750
- if (n === "week")
751
- return /* @__PURE__ */ Z(ye, { children: [
752
- /* @__PURE__ */ o(
753
- cn,
754
- {
755
- setPageShowDate: (M) => y([M, M], 0),
756
- ...Q,
757
- ...B,
758
- ...fe
759
- }
760
- ),
761
- /* @__PURE__ */ o(
762
- cn,
763
- {
764
- setPageShowDate: (M) => y([X.subtract(M, 1, "month"), M], 1),
765
- ...ne,
766
- ...B,
767
- ...le
768
- }
769
- )
770
- ] });
771
- const U = {
772
- disabledTime: i,
773
- showTime: d
774
- }, de = {};
775
- if (typeof L == "number" && (de.disabledTime = () => ({
776
- disabledHours: () => kt(0, 24),
777
- disabledMinutes: () => kt(0, 60),
778
- disabledSeconds: () => kt(0, 60)
779
- }), Ge(d))) {
780
- const M = { ...d, defaultValue: void 0 };
781
- de.showTime = {
782
- ...M,
783
- hideDisabledOptions: !1
784
- };
785
- }
786
- return /* @__PURE__ */ Z(ye, { children: [
787
- /* @__PURE__ */ o(
788
- Nt,
789
- {
790
- ...Q,
791
- ...B,
792
- ...U,
793
- ...L === 0 ? de : {},
794
- onTimePickerSelect: (M, pe) => {
795
- v(0, M, pe);
796
- },
797
- index: 0,
798
- setPageShowDate: (M) => y([M, M], 0),
799
- timeValue: c[0],
800
- ...fe
801
- }
802
- ),
803
- /* @__PURE__ */ o(
804
- Nt,
805
- {
806
- ...ne,
807
- ...B,
808
- ...U,
809
- ...L === 1 ? de : {},
810
- onTimePickerSelect: (M, pe) => {
811
- v(1, M, pe);
812
- },
813
- index: 1,
814
- setPageShowDate: (M) => y([X.subtract(M, 1, "month"), M], 1),
815
- timeValue: c[1],
816
- ...le
817
- }
818
- )
819
- ] });
820
- }
821
- function O() {
822
- const Q = {
823
- onSuperPrev: A
824
- }, ne = {
825
- onSuperNext: k
826
- }, B = ae;
827
- return /* @__PURE__ */ Z(ye, { children: [
828
- /* @__PURE__ */ o(
829
- Dt,
830
- {
831
- setPageShowDate: (U) => y([U, U], 0),
832
- ...Q,
833
- ...B,
834
- ...fe
835
- }
836
- ),
837
- /* @__PURE__ */ o(
838
- Dt,
839
- {
840
- setPageShowDate: (U) => y([X.subtract(U, 1, "year"), U], 1),
841
- ...ne,
842
- ...B,
843
- ...le
844
- }
845
- )
846
- ] });
847
- }
848
- function Ie() {
849
- const Q = {
850
- onSuperPrev: A
851
- }, ne = {
852
- onSuperNext: k
853
- }, B = ae;
854
- return /* @__PURE__ */ Z(ye, { children: [
855
- /* @__PURE__ */ o(
856
- He,
857
- {
858
- ...Q,
859
- ...B,
860
- pageShowDate: T
861
- }
862
- ),
863
- /* @__PURE__ */ o(
864
- He,
865
- {
866
- ...ne,
867
- ...B,
868
- pageShowDate: q
869
- }
870
- )
871
- ] });
872
- }
873
- function ue() {
874
- const Q = {
875
- onSuperPrev: A
876
- }, ne = {
877
- onSuperNext: k
878
- }, B = ae;
879
- return /* @__PURE__ */ Z(ye, { children: [
880
- /* @__PURE__ */ o(
881
- sn,
882
- {
883
- setPageShowDate: (U) => y([U, U], 0),
884
- ...Q,
885
- ...B,
886
- ...fe
887
- }
888
- ),
889
- /* @__PURE__ */ o(
890
- sn,
891
- {
892
- setPageShowDate: (U) => y([X.subtract(U, 1, "year"), U], 1),
893
- ...ne,
894
- ...B,
895
- ...le
896
- }
897
- )
898
- ] });
899
- }
900
- return /* @__PURE__ */ o("div", { className: F, children: /* @__PURE__ */ Z("div", { className: `${F}-wrapper`, children: [
901
- (n === "date" || n === "week") && x(),
902
- n === "month" && O(),
903
- n === "year" && Ie(),
904
- n === "quarter" && ue()
905
- ] }) });
906
- }
907
- function io(u) {
908
- const { format: n, showTime: d, mode: a } = u;
909
- let i;
910
- switch (a) {
911
- case "date":
912
- i = d ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
913
- break;
914
- case "month":
915
- i = "YYYY-MM";
916
- break;
917
- case "year":
918
- i = "YYYY";
919
- break;
920
- case "week":
921
- i = "YYYY-wo";
922
- break;
923
- case "quarter":
924
- i = "YYYY-[Q]Q";
925
- break;
926
- default:
927
- i = "YYYY-MM-DD";
928
- }
929
- return n && (i = n), i;
930
- }
931
- const ln = {
932
- allowClear: !0,
933
- unmountOnExit: !0,
934
- position: "bl",
935
- editable: !0,
936
- mode: "date"
937
- }, co = { bottom: 4 }, lo = (u, n) => {
938
- var jt, Qt, Kt, Jt;
939
- const {
940
- getPrefixCls: d,
941
- locale: a,
942
- size: i,
943
- componentConfig: l,
944
- rtl: g
945
- } = ce(Ye);
946
- g && (ln.position = "br");
947
- const s = Bn(
948
- u,
949
- ln,
950
- l == null ? void 0 : l.DatePicker
951
- ), {
952
- allowClear: c,
953
- className: b,
954
- style: P,
955
- placeholder: Y,
956
- getPopupContainer: V,
957
- disabled: S,
958
- position: v,
959
- error: $,
960
- status: z,
961
- unmountOnExit: A,
962
- editable: f,
963
- triggerProps: k,
964
- shortcuts: R,
965
- onSelect: I,
966
- onVisibleChange: p,
967
- value: N,
968
- onChange: y,
969
- icons: L,
970
- disabledDate: D,
971
- disabledTime: J,
972
- mode: h,
973
- showTime: C,
974
- onSelectShortcut: j,
975
- extra: _,
976
- shortcutsPlacementLeft: F,
977
- onOk: W,
978
- defaultPickerValue: w,
979
- pickerValue: T,
980
- panelRender: q,
981
- onPickerValueChange: re,
982
- triggerElement: ae,
983
- clearRangeOnReselect: fe,
984
- separator: le,
985
- utcOffset: x,
986
- timezone: O,
987
- inputProps: Ie
988
- } = s, ue = d == null ? void 0 : d("picker-range"), Q = a == null ? void 0 : a.DatePicker, ne = _n(s.dayStartOfWeek) ? Zn(a == null ? void 0 : a.dayjsLocale) : s.dayStartOfWeek, B = Re(null), U = Re(null), de = Re(null), M = Re(null), pe = Re(null);
989
- Wn(
990
- n,
991
- () => ({
992
- focus(e) {
993
- var t, r;
994
- (r = (t = B.current) == null ? void 0 : t.focus) == null || r.call(t, e);
995
- },
996
- blur() {
997
- It();
998
- }
999
- }),
1000
- []
1001
- );
1002
- const E = ((Qt = (jt = Q.Calendar) == null ? void 0 : jt[h]) == null ? void 0 : Qt.format) || io(s);
1003
- function ke() {
1004
- if (G(S)) {
1005
- if (S[0] && !S[1])
1006
- return 1;
1007
- if (S[1] && !S[0])
1008
- return 0;
1009
- }
1010
- }
1011
- const De = ke(), me = typeof De == "number", mn = me ? 1 ^ De : void 0, [ee, ot] = ie(
1012
- me ? De : 0
1013
- );
1014
- Ke(() => {
1015
- me && ot(De);
1016
- }, [S]);
1017
- const _e = 1 ^ ee, [Fe, be] = ie(), [Tt, We] = ie(), [rt, at] = ie(Sn()), [Se, Ce] = ie(), [fn, Ee] = ie(), [Vt, st] = ie(), [pn, hn] = ie(() => !!s.popupVisible), [it, ct] = ie([h, h]), [lt, Lt] = ie(!1), ve = s.popupVisible ?? pn, Ne = oe(
1018
- N,
1019
- E,
1020
- x,
1021
- O
1022
- ), we = "value" in s ? Ne : rt, K = Vt || Se || we || [], se = Xe(Se || we), Ae = Re(!0), ut = te(), Rt = en(ut, x, O);
1023
- function gn() {
1024
- const e = [], t = Ge(C) && C.defaultValue ? oe(C.defaultValue, C.format || "HH:mm:ss") : [];
1025
- return e[0] = K[0] || t[0] || Rt, e[1] = K[1] || t[1] || Rt, e;
1026
- }
1027
- const Be = gn(), xt = me ? (e) => De === 0 ? e.isAfter(K[1], h) : e.isBefore(K[0], h) : void 0, dt = ae !== void 0, mt = dt || fe;
1028
- function Sn() {
1029
- let e;
1030
- if (s.value ? e = oe(s.value, E, x, O) : e = oe(s.defaultValue, E, x, O), me && (!e || e && !e[_e])) {
1031
- const t = [];
1032
- return t[_e] = te(x, O), t;
1033
- }
1034
- return e;
1035
- }
1036
- const ft = we || oe(w, E) || [ut, ut], [Yt, ze] = ie(
1037
- Te(ft)
1038
- ), qe = Te(
1039
- oe(T, E, x, O)
1040
- ) || Yt, pt = Xt(x), ht = Xt(O);
1041
- Zt(() => {
1042
- if (G(rt) && (pt !== x || O !== ht)) {
1043
- const t = rt.map(
1044
- (r, m, H) => Pt(r, pt, ht)
1045
- ).map(
1046
- (r, m, H) => en(r, x, O)
1047
- );
1048
- at(t);
1049
- }
1050
- }, [x, pt, O, ht]), Zt(() => {
1051
- ze(Te(ft));
1052
- }, [h]), Ke(() => {
1053
- ct([h, h]);
1054
- }, [h]), Ke(() => {
1055
- if (We(void 0), be(void 0), ve) {
1056
- const e = Te(ft);
1057
- Lt(!1), ct([h, h]), ze(e), gt(e), Ce(we), F && de.current && U.current && (de.current.style.maxHeight = `${U.current.clientHeight}px`);
1058
- } else
1059
- Ce(void 0), Ee(void 0), st(void 0), It();
1060
- Ae.current = ve;
1061
- }, [ve]);
1062
- const vn = (Kt = Ne == null ? void 0 : Ne[0]) == null ? void 0 : Kt.format(he(E, 0)), wn = (Jt = Ne == null ? void 0 : Ne[1]) == null ? void 0 : Jt.format(he(E, 1));
1063
- Ke(() => {
1064
- Ce(void 0), Ee(void 0);
1065
- }, [vn, wn]);
1066
- function Oe(e, t = ee) {
1067
- const r = Te(e, t);
1068
- ze(r), gt(r);
1069
- }
1070
- function gt(e) {
1071
- $t([e[0], Yt[0]], h) || re == null || re(
1072
- G(e) ? e.map((t, r) => t && t.format(he(E, r))) : void 0,
1073
- e
1074
- );
1075
- }
1076
- function Te(e, t = ee) {
1077
- const r = t === 0 || $t(e, h);
1078
- if (G(e) && e.length < 2)
1079
- return Ue(
1080
- e[0] || te(x, O),
1081
- h,
1082
- "prev"
1083
- );
1084
- if (G(e) && e.length === 2)
1085
- return e[t] ? Ue(
1086
- e[t],
1087
- h,
1088
- r ? "prev" : "next"
1089
- ) : Ue(
1090
- e[t === 0 ? 1 : 0] || te(x, O),
1091
- h,
1092
- r && !e[t === 0 ? 1 : 0] ? "prev" : "next"
1093
- );
1094
- }
1095
- function $t(e, t) {
1096
- if ((e == null ? void 0 : e.length) === 2 && Wt(e))
1097
- 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);
1098
- }
1099
- function Ue(e = te(x, O), t = h, r = "prev") {
1100
- const m = r === "prev";
1101
- switch (t) {
1102
- case "date":
1103
- case "week":
1104
- return m ? [e, X.add(e, 1, "month")] : [X.subtract(e, 1, "month"), e];
1105
- case "month":
1106
- case "quarter":
1107
- return m ? [e, X.add(e, 1, "year")] : [X.subtract(e, 1, "year"), e];
1108
- case "year":
1109
- return m ? [e, X.add(e, 10, "year")] : [X.subtract(e, 10, "year"), e];
1110
- default:
1111
- return [];
1112
- }
1113
- }
1114
- function St(e) {
1115
- var t, r;
1116
- (r = (t = B.current) == null ? void 0 : t.focus) == null || r.call(t, me ? De : e);
1117
- }
1118
- function It() {
1119
- var e, t;
1120
- (t = (e = B.current) == null ? void 0 : e.blur) == null || t.call(e);
1121
- }
1122
- function je(e) {
1123
- p == null || p(e), hn(e);
1124
- }
1125
- function Pn(e) {
1126
- var r;
1127
- e.stopPropagation();
1128
- let t = [...K];
1129
- me ? t[De] = void 0 : t = void 0, at(t), Ce(t), Mt(t), (r = s.onClear) == null || r.call(s);
1130
- }
1131
- function Et(e, t) {
1132
- if (ot(e), K && K.length && !t) {
1133
- const r = Te(K, e);
1134
- ze(r), gt(r);
1135
- }
1136
- }
1137
- function At(e) {
1138
- const t = typeof xt == "function" ? xt(e) : !1;
1139
- return (typeof D == "function" ? D(e) : !1) || t;
1140
- }
1141
- function Ot(e) {
1142
- return jn(e, E, ee) && !At(oe(e, E));
1143
- }
1144
- function yn(e) {
1145
- const t = [...K || []], r = e.target.value;
1146
- be(r), ve || je(!0), Ot(r) && (t[ee] = oe(r, E), Ce(t), Oe(t), be(void 0));
1147
- }
1148
- function kn() {
1149
- Fe && be(void 0);
1150
- }
1151
- function Mt(e) {
1152
- if (Qn(we, e)) {
1153
- const t = G(e) ? e.map(
1154
- (r, m, H) => yt(
1155
- Pt(r, x, O),
1156
- a == null ? void 0 : a.dayjsLocale
1157
- )
1158
- ) : void 0;
1159
- y == null || y(
1160
- G(t) ? t.map((r, m) => r && r.format(he(E, m))) : void 0,
1161
- t
1162
- );
1163
- }
1164
- }
1165
- function Dn() {
1166
- G(Se) && Se.length ? Fe && !Ot(Fe) ? be(void 0) : se !== 2 ? Qe() : se === 2 && Ve(Se) : ve && je(!1);
1167
- }
1168
- function Ve(e, t) {
1169
- const r = e || K;
1170
- if (!r || !r[0] || !r[1])
1171
- return;
1172
- const m = Me(r);
1173
- at(m), Mt(m), ae === null || t || je(!1);
1174
- }
1175
- function bn() {
1176
- Ve();
1177
- const e = K.map(
1178
- (t, r, m) => yt(t, a == null ? void 0 : a.dayjsLocale)
1179
- );
1180
- W == null || W(
1181
- e.map(
1182
- (t, r) => t && t.format(he(E, r))
1183
- ),
1184
- e
1185
- );
1186
- }
1187
- function Ht() {
1188
- switch (h) {
1189
- case "date":
1190
- case "week":
1191
- return "date";
1192
- case "month":
1193
- return "month";
1194
- case "year":
1195
- return "year";
1196
- default:
1197
- return;
1198
- }
1199
- }
1200
- function _t(e) {
1201
- if (se !== 2)
1202
- return !1;
1203
- const t = Se || we;
1204
- return !!(ee === 0 && e.isAfter(t[1], Ht()) || ee === 1 && e.isBefore(t[0], Ht()));
1205
- }
1206
- function Nn(e, t) {
1207
- const r = _t(t) && Ae.current, m = mt && se === 2 && !me ? [] : [...K], H = dt ? se === 0 || se === 2 ? 0 : 1 : ee, Le = C ? Je(t, Be[H]) : t;
1208
- r ? (m[H] = Le, m[1 ^ H] = void 0) : m[H] = Le;
1209
- const vt = Me(m);
1210
- Ft(vt), be(void 0), We(void 0);
1211
- const wt = Xe(m);
1212
- mt ? se === 0 || se === 2 && !me ? dt ? ot(1) : Qe(!0) : C || Ve(m) : wt <= 1 ? Qe(!0) : se === 2 && Ae.current && !me ? (Ae.current = !1, Qe(!0), !C && !r && Ve(m, !0)) : (Ae.current = !1, !C && !r && Ve(m));
1213
- }
1214
- function Cn(e, t, r) {
1215
- const m = G(K) ? [...K] : [], H = Je(
1216
- m[e] || te(x, O),
1217
- r
1218
- );
1219
- m[e] = H, Ft(m);
1220
- }
1221
- function Ft(e) {
1222
- Ce(e), Ee(void 0);
1223
- const r = Me(e).map(
1224
- (m, H, Le) => yt(
1225
- Pt(m, x, O),
1226
- a == null ? void 0 : a.dayjsLocale
1227
- )
1228
- );
1229
- I == null || I(
1230
- r.map((m, H) => m && m.format(he(E, H))),
1231
- r,
1232
- { type: ee === 1 ? "end" : "start" }
1233
- );
1234
- }
1235
- function Qe(e) {
1236
- Et(_e, e), setTimeout(() => St(_e));
1237
- }
1238
- function Tn(e, t) {
1239
- const r = [...K || []];
1240
- if (!t && (mt ? se === 1 : se !== 0) && !_t(e) && (r[ee] = Je(
1241
- e,
1242
- Be[ee]
1243
- ), Ee(r), be(void 0)), !t) {
1244
- const H = C ? Je(e, Be[ee]) : e;
1245
- We(
1246
- H.locale(a == null ? void 0 : a.dayjsLocale).format(he(E, ee))
1247
- );
1248
- }
1249
- }
1250
- function Vn() {
1251
- Ee(void 0), We(void 0);
1252
- }
1253
- function Wt(e) {
1254
- return e && G(e) && e.length === 2 && Gt(e[0]) && Gt(e[1]);
1255
- }
1256
- function Bt(e) {
1257
- const t = typeof e.value == "function" && e.value();
1258
- return Wt(t);
1259
- }
1260
- function zt() {
1261
- clearTimeout(M.current), clearTimeout(pe.current), M.current = null, pe.current = null;
1262
- }
1263
- function Ln(e) {
1264
- zt(), M.current = setTimeout(() => {
1265
- if (Bt(e)) {
1266
- const t = oe(
1267
- e.value(),
1268
- E,
1269
- x,
1270
- O
1271
- );
1272
- st(t), Oe(t);
1273
- }
1274
- }, 50);
1275
- }
1276
- function Rn() {
1277
- zt(), pe.current = setTimeout(() => {
1278
- st(void 0), Oe(
1279
- Se || we || [
1280
- te(x, O),
1281
- te(x, O)
1282
- ]
1283
- );
1284
- }, 50);
1285
- }
1286
- function xn(e) {
1287
- if (j == null || j(e), Bt(e)) {
1288
- const t = oe(
1289
- e.value(),
1290
- E,
1291
- x,
1292
- O
1293
- );
1294
- Ve(t);
1295
- }
1296
- }
1297
- function Pe(e, t, r = 1) {
1298
- const m = e === "prev" ? 0 : 1;
1299
- let H = [...qe];
1300
- e === "prev" && (H[m] = X.subtract(
1301
- qe[m],
1302
- r,
1303
- t
1304
- )), e === "next" && (H[m] = X.add(
1305
- qe[m],
1306
- r,
1307
- t
1308
- )), H = Ue(
1309
- H[m],
1310
- h,
1311
- e
1312
- ), Oe(H);
1313
- }
1314
- function qt(e = h) {
1315
- if (e === "date" || e === "week")
1316
- return {
1317
- onPrev: () => Pe("prev", "month"),
1318
- onNext: () => Pe("next", "month"),
1319
- onSuperPrev: () => Pe("prev", "year"),
1320
- onSuperNext: () => Pe("next", "year")
1321
- };
1322
- if (e === "month" || e === "quarter")
1323
- return {
1324
- onSuperPrev: () => Pe("prev", "year"),
1325
- onSuperNext: () => Pe("next", "year")
1326
- };
1327
- if (e === "year")
1328
- return {
1329
- onSuperPrev: () => Pe("prev", "year", 10),
1330
- onSuperNext: () => Pe("next", "year", 10)
1331
- };
1332
- }
1333
- function Yn() {
1334
- Lt(!lt);
1335
- }
1336
- function Ut(e) {
1337
- const t = ge(
1338
- `${ue}-container`,
1339
- {
1340
- [`${ue}-panel-only`]: e,
1341
- [`${ue}-container-shortcuts-placement-left`]: G(R) && F,
1342
- [`${ue}-container-rtl`]: g
1343
- },
1344
- e ? b : ""
1345
- ), r = {
1346
- prefixCls: d == null ? void 0 : d("picker"),
1347
- showTime: C,
1348
- shortcuts: R,
1349
- onMouseEnterShortcut: Ln,
1350
- onMouseLeaveShortcut: Rn,
1351
- onSelectShortcut: xn
1352
- }, m = C && it[0] === "date" && it[1] === "date" || _ || G(R) && R.length && !F, H = /* @__PURE__ */ Z(ye, { children: [
1353
- /* @__PURE__ */ o(
1354
- so,
1355
- {
1356
- ...s,
1357
- ...qt(),
1358
- getHeaderOperations: qt,
1359
- setRangePageShowDates: Oe,
1360
- pageShowDates: qe,
1361
- value: K,
1362
- format: E,
1363
- onSelectPanel: Nn,
1364
- onMouseEnterCell: Tn,
1365
- onMouseLeaveCell: Vn,
1366
- disabledDate: (wt) => At(wt),
1367
- disabledTime: J,
1368
- mode: h,
1369
- localeName: a == null ? void 0 : a.dayjsLocale,
1370
- showTime: C,
1371
- timeValues: Vt || Be,
1372
- onTimePickerSelect: Cn,
1373
- popupVisible: ve,
1374
- disabledTimePickerIndex: mn,
1375
- isTimePanel: lt,
1376
- valueShowHover: fn,
1377
- panelModes: it,
1378
- setPanelModes: ct
1379
- }
1380
- ),
1381
- !!m && /* @__PURE__ */ o(
1382
- Jn,
1383
- {
1384
- ...r,
1385
- DATEPICKER_LOCALE: Q,
1386
- disabled: !(G(K) && K[0] && K[1]),
1387
- onClickConfirmBtn: bn,
1388
- extra: _,
1389
- shortcutsPlacementLeft: F,
1390
- onClickSelectTimeBtn: Yn,
1391
- isTimePanel: lt
1392
- }
1393
- )
1394
- ] }), Le = F ? /* @__PURE__ */ Z(ye, { children: [
1395
- /* @__PURE__ */ o(Gn, { ref: de, ...r }),
1396
- /* @__PURE__ */ o("div", { ref: U, className: `${ue}-panel-wrapper`, children: H })
1397
- ] }) : H, vt = typeof q == "function" ? q(Le) : Le;
1398
- return /* @__PURE__ */ o(
1399
- "div",
1400
- {
1401
- className: t,
1402
- onClick: () => St(),
1403
- style: e ? P : {},
1404
- children: vt
1405
- }
1406
- );
1407
- }
1408
- const $n = s.size || i, In = G(Y) ? Y : Q.placeholders[h], En = L && L.inputSuffix === null ? null : L && L.inputSuffix || (C ? /* @__PURE__ */ o(Hn, {}) : /* @__PURE__ */ o(Mn, {})), An = {
1409
- style: P,
1410
- className: b,
1411
- popupVisible: ve,
1412
- format: E,
1413
- disabled: S,
1414
- error: $,
1415
- status: z,
1416
- size: $n,
1417
- onPressEnter: Dn,
1418
- onClear: Pn,
1419
- suffixIcon: En,
1420
- editable: f,
1421
- allowClear: c,
1422
- prefix: s.prefix
1423
- }, On = G(S) ? S[0] && S[1] : S;
1424
- return /* @__PURE__ */ o($e.Provider, { value: { utcOffset: x, timezone: O, weekStart: ne }, children: ae === null ? Ut(!0) : /* @__PURE__ */ o(
1425
- qn,
1426
- {
1427
- popup: Ut,
1428
- trigger: "click",
1429
- clickToClose: !1,
1430
- position: v,
1431
- disabled: On,
1432
- popupAlign: co,
1433
- getPopupContainer: V,
1434
- onVisibleChange: (e) => {
1435
- e && setTimeout(() => {
1436
- St();
1437
- }), je(!!e);
1438
- },
1439
- popupVisible: ve,
1440
- classNames: "slideDynamicOrigin",
1441
- unmountOnExit: A,
1442
- ...k,
1443
- children: ae || /* @__PURE__ */ o(
1444
- zn,
1445
- {
1446
- ...Kn(s),
1447
- ...An,
1448
- inputProps: Ie,
1449
- ref: B,
1450
- placeholder: In,
1451
- value: Se || we,
1452
- onChange: yn,
1453
- inputValue: Tt || Fe,
1454
- changeFocusedInputIndex: Et,
1455
- focusedInputIndex: ee,
1456
- isPlaceholder: !!Tt,
1457
- separator: le,
1458
- onBlur: kn
1459
- }
1460
- )
1461
- }
1462
- ) });
1463
- }, uo = Fn(lo);
1464
- uo.displayName = "RangePicker";
1465
- export {
1466
- Nt as D,
1467
- Dt as M,
1468
- uo as P,
1469
- sn as Q,
1470
- cn as W,
1471
- He as Y
1472
- };