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