@unicom-cloud/ui 0.8.95 → 0.8.97

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 (326) hide show
  1. package/Affix.js +1 -1
  2. package/Carousel.js +1 -1
  3. package/LiquidFill.js +4 -0
  4. package/Message.js +1 -1
  5. package/Notification.js +1 -1
  6. package/OverflowEllipsis.js +1 -1
  7. package/PageHeader.js +1 -1
  8. package/QrCode.js +57 -0
  9. package/Switch.js +1 -1
  10. package/Tour.js +63 -0
  11. package/Trigger.js +2 -2
  12. package/_virtual/_commonjsHelpers.js +6 -0
  13. package/_virtual/index.js +7 -0
  14. package/_virtual/index2.js +4 -0
  15. package/affix/index.js +70 -72
  16. package/alert/index.js +52 -51
  17. package/anchor/Anchor.js +55 -55
  18. package/anchor/Link.js +34 -34
  19. package/anchor/util.js +5 -5
  20. package/auto-complete/index.js +116 -122
  21. package/avatar/Avatar.js +33 -33
  22. package/avatar/Group.js +26 -26
  23. package/back-top/index.js +58 -61
  24. package/badge/index.js +46 -46
  25. package/breadcrumb/Item.js +42 -43
  26. package/breadcrumb/index.js +47 -47
  27. package/button/Group.js +6 -6
  28. package/button/index.js +91 -91
  29. package/calendar/Month.js +75 -75
  30. package/calendar/Year.js +35 -35
  31. package/calendar/header/index.js +25 -25
  32. package/calendar/index.js +103 -103
  33. package/card/Grid.js +8 -8
  34. package/card/Meta.js +16 -16
  35. package/card/index.js +49 -49
  36. package/carousel/Arrow.js +19 -19
  37. package/carousel/Indicator.js +26 -26
  38. package/carousel/index.js +108 -108
  39. package/cascader/Cascader.js +178 -191
  40. package/cascader/base/node.js +133 -136
  41. package/cascader/base/store.js +82 -85
  42. package/cascader/panel/List.js +126 -130
  43. package/cascader/panel/Search.js +79 -81
  44. package/cascader/util.js +13 -13
  45. package/checkbox/Checkbox.js +94 -96
  46. package/checkbox/Group.js +54 -56
  47. package/checkbox/GroupBlock.js +28 -29
  48. package/collapse/Collapse.js +45 -45
  49. package/collapse/Item.js +53 -55
  50. package/color-picker/ControlBar.js +43 -43
  51. package/color-picker/InputAlpha.js +12 -12
  52. package/color-picker/InputHex.js +30 -31
  53. package/color-picker/InputRgb.js +24 -24
  54. package/color-picker/Palette.js +18 -18
  55. package/color-picker/Panel.js +122 -125
  56. package/color-picker/hooks/useColorPicker.js +85 -88
  57. package/color-picker/hooks/useControlBlock.js +38 -40
  58. package/color-picker/index.js +47 -47
  59. package/comment/index.js +29 -29
  60. package/components/common/higher-order/with-speech-synthesis/index.js +37 -40
  61. package/components/common/hooks/useForceUpdate.js +6 -2
  62. package/components/common/hooks/useId.js +4 -4
  63. package/components/common/hooks/useInView.js +16 -16
  64. package/components/common/hooks/useIntersectionObserver.js +1 -1
  65. package/components/common/hooks/useKeyboardEvent.js +9 -10
  66. package/components/common/hooks/useOverflowHidden.js +1 -4
  67. package/components/common/hooks/usePersistCallback.js +7 -7
  68. package/components/common/hooks/useStateCallback.js +9 -10
  69. package/components/common/hooks/useWindowSize.js +8 -8
  70. package/components/common/space/index.js +11 -10
  71. package/components/common/utils/PqbCSSTransition.js +1 -1
  72. package/components/common/utils/convertToDurationBasedOnTimeUnits.js +6 -0
  73. package/components/common/utils/dom.js +27 -29
  74. package/components/common/utils/findScrollParent.js +17 -0
  75. package/components/common/utils/intersectionObserver.js +21 -0
  76. package/components/common/utils/is.js +99 -109
  77. package/components/common/utils/mutationObserver.js +19 -0
  78. package/components/common/utils/reactDOM.js +34 -34
  79. package/components/common/utils/resizeObserver.js +21 -0
  80. package/copy/index.js +38 -40
  81. package/date-picker/Picker.js +290 -295
  82. package/date-picker/RangePicker.js +367 -372
  83. package/date-picker/index.js +33 -35
  84. package/date-picker/panel/Body.js +46 -47
  85. package/date-picker/panel/Header.js +33 -33
  86. package/date-picker/panel/Shortcut.js +31 -31
  87. package/date-picker/panel/date/index.js +85 -85
  88. package/date-picker/panel/month/index.js +59 -59
  89. package/date-picker/panel/quarter/index.js +67 -70
  90. package/date-picker/panel/range/index.js +101 -101
  91. package/date-picker/panel/year/index.js +39 -39
  92. package/date-picker/util.js +17 -18
  93. package/descriptions/index.js +62 -62
  94. package/details/index.js +55 -56
  95. package/development/index.js +9 -9
  96. package/dist/react-transition-group/src/CSSTransition.js +1 -1
  97. package/dist/react-transition-group/src/SwitchTransition.js +1 -1
  98. package/dist/tinycolor/chunk/BOzCVdr0.js +1 -1
  99. package/dist/tween/src/tween.js +24 -25
  100. package/dist/validate/src/index.js +5 -5
  101. package/dist/validate/src/util.js +1 -1
  102. package/divider/index.js +21 -21
  103. package/draggable/Item.js +35 -35
  104. package/draggable/index.js +22 -22
  105. package/drawer/Drawer.js +142 -147
  106. package/dropdown/Button.js +48 -48
  107. package/dropdown/index.js +88 -92
  108. package/empty/index.js +16 -16
  109. package/form/Control.js +211 -225
  110. package/form/Form.js +109 -113
  111. package/form/FormItem.js +118 -120
  112. package/form/FormList.js +60 -66
  113. package/form/FormProvider.js +31 -34
  114. package/form/hook/useContext.js +17 -19
  115. package/form/hook/useState.js +22 -23
  116. package/form/hook/useWatch.js +26 -27
  117. package/form/promisify.js +14 -18
  118. package/form/store.js +304 -316
  119. package/form/util.js +14 -15
  120. package/grid/Col.js +64 -64
  121. package/grid/Grid.js +51 -51
  122. package/grid/GridItem.js +48 -48
  123. package/grid/Row.js +39 -39
  124. package/hooks/index.js +50 -52
  125. package/hooks/useVerificationCode.js +41 -43
  126. package/hooks/useWatermark.js +89 -92
  127. package/icon/index.js +23 -24
  128. package/icon-hover/index.js +16 -16
  129. package/icons/file.js +11 -11
  130. package/image/Image.js +140 -141
  131. package/image/ImagePreview.js +252 -255
  132. package/image/ImagePreviewArrow.js +25 -25
  133. package/image/ImagePreviewGroup.js +62 -62
  134. package/image/util/getScale.js +25 -28
  135. package/index.js +682 -679
  136. package/input/Button.js +48 -50
  137. package/input/Group.js +9 -9
  138. package/input/Input.js +145 -154
  139. package/input/InputElement.js +108 -115
  140. package/input/Password.js +38 -38
  141. package/input/Search.js +51 -55
  142. package/input/Textarea.js +80 -81
  143. package/input/useComposition.js +23 -23
  144. package/input-number/decimal.js +59 -62
  145. package/input-number/index.js +139 -141
  146. package/input-tag/InputTag.js +223 -231
  147. package/layout/Content.js +6 -6
  148. package/layout/Footer.js +8 -8
  149. package/layout/Header.js +7 -7
  150. package/layout/Sider.js +88 -90
  151. package/layout/index.js +30 -30
  152. package/link/index.js +45 -46
  153. package/liquid-fill/LiquidFill.js +189 -0
  154. package/liquid-fill/LiquidFill2.js +3 -0
  155. package/liquid-fill/index.js +4 -0
  156. package/liquid-fill/interface.js +1 -0
  157. package/list/Item.js +28 -28
  158. package/list/Meta.js +12 -12
  159. package/list/index.js +146 -148
  160. package/mentions/index.js +75 -76
  161. package/menu/Item.js +58 -58
  162. package/menu/Menu.js +125 -127
  163. package/menu/OverflowWrap.js +39 -40
  164. package/menu/sub-menu/Inline.js +45 -45
  165. package/menu/util.js +26 -28
  166. package/message/index.js +97 -100
  167. package/message/useMessage.js +26 -27
  168. package/modal/Confirm.js +47 -49
  169. package/modal/Modal.js +250 -257
  170. package/modal/use-modal/Hook.js +26 -28
  171. package/modal/use-modal/index.js +46 -49
  172. package/notice/index.js +89 -90
  173. package/notification/index.js +61 -66
  174. package/notification/withNotification.js +35 -35
  175. package/overflow-ellipsis/OverflowItem.js +19 -20
  176. package/overflow-ellipsis/index.js +45 -46
  177. package/package.json +1 -1
  178. package/page-header/index.js +45 -45
  179. package/pagination/PageItem.js +87 -91
  180. package/pagination/PageJumper.js +40 -41
  181. package/pagination/PageOption.js +31 -35
  182. package/pagination/Pagination.js +162 -163
  183. package/picker/Input.js +90 -96
  184. package/picker/InputRange.js +115 -122
  185. package/popconfirm/index.js +98 -100
  186. package/popover/index.js +28 -28
  187. package/portal/Portal.js +10 -11
  188. package/progress/index.js +36 -36
  189. package/qr-code/index.js +99 -0
  190. package/qr-code/interface.js +1 -0
  191. package/radio/Group.js +48 -48
  192. package/radio/GroupBlock.js +32 -33
  193. package/radio/Radio.js +62 -64
  194. package/rate/index.js +88 -88
  195. package/resize-box/ResizeTrigger.js +39 -39
  196. package/resize-box/Split.js +92 -96
  197. package/resize-box/SplitGroup.js +116 -122
  198. package/resize-box/index.js +112 -115
  199. package/result/index.js +44 -44
  200. package/select/Option.js +53 -56
  201. package/select/Select.js +365 -381
  202. package/select/util.js +95 -99
  203. package/select-view/Core.js +159 -160
  204. package/skeleton/index.js +23 -23
  205. package/slider/Button.js +84 -92
  206. package/slider/Input.js +47 -49
  207. package/slider/Tick.js +28 -31
  208. package/slider/index.js +108 -108
  209. package/slider/util.js +1 -1
  210. package/space/index.js +26 -26
  211. package/space-/index.js +51 -51
  212. package/spin/DotLoading.js +8 -8
  213. package/spin/index.js +47 -47
  214. package/statistic/Countdown.js +37 -37
  215. package/statistic/index.js +61 -61
  216. package/steps/Step.js +42 -42
  217. package/steps/index.js +54 -54
  218. package/style.css +1 -1
  219. package/switch/index.js +78 -79
  220. package/table/ColGroup.js +36 -37
  221. package/table/Table.js +447 -450
  222. package/table/hook/useExpand.js +24 -24
  223. package/table/hook/useRowSelection.js +62 -62
  224. package/table/summary/Row.js +16 -17
  225. package/table/tbody/Td.js +119 -118
  226. package/table/tbody/Tr.js +119 -121
  227. package/table/tbody/index.js +62 -63
  228. package/table/th-resizable/index.js +30 -30
  229. package/table/thead/Column.js +148 -148
  230. package/table/thead/index.js +87 -88
  231. package/tabs/Tab.js +55 -55
  232. package/tabs/TabContent.js +8 -8
  233. package/tabs/TabPane.js +15 -15
  234. package/tabs/hook/useHeaderScroll.js +36 -36
  235. package/tabs/tab-header/TabInk.js +31 -33
  236. package/tabs/tab-header/TabNavIcon.js +34 -35
  237. package/tabs/tab-header/index.js +192 -195
  238. package/tag/index.js +94 -97
  239. package/time-picker/Picker.js +167 -172
  240. package/time-picker/RangePicker.js +28 -28
  241. package/time-picker/TimePicker.js +146 -146
  242. package/time-picker/util.js +4 -4
  243. package/timeline/Item.js +46 -46
  244. package/timeline/Timeline.js +52 -52
  245. package/tooltip/index.js +89 -95
  246. package/tour/index.js +289 -0
  247. package/transfer/Item.js +54 -54
  248. package/transfer/List.js +134 -136
  249. package/transfer/index.js +91 -91
  250. package/tree/Animation.js +49 -52
  251. package/tree/Node.js +114 -122
  252. package/tree/NodeList.js +51 -51
  253. package/tree/Tree.js +386 -393
  254. package/tree-select/List.js +71 -72
  255. package/tree-select/Select.js +135 -143
  256. package/tree-select/hook/useKeyCache.js +39 -39
  257. package/tree-select/hook/useStateValue.js +12 -12
  258. package/trigger/getPopupStyle.js +60 -61
  259. package/trigger/index.js +338 -347
  260. package/types/common/space/interface.d.ts +1 -1
  261. package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
  262. package/types/common/utils/findScrollParent.d.ts +2 -0
  263. package/types/common/utils/index.d.ts +5 -0
  264. package/types/common/utils/intersectionObserver.d.ts +2 -0
  265. package/types/common/utils/math.d.ts +1 -1
  266. package/types/common/utils/mutationObserver.d.ts +2 -0
  267. package/types/common/utils/resizeObserver.d.ts +2 -0
  268. package/types/pc/alert/interface.d.ts +2 -2
  269. package/types/pc/details/interface.d.ts +2 -2
  270. package/types/pc/hooks/index.d.ts +0 -1
  271. package/types/pc/index.d.ts +3 -0
  272. package/types/pc/liquid-fill/LiquidFill.d.ts +30 -0
  273. package/types/pc/liquid-fill/LiquidFill2.d.ts +1 -0
  274. package/types/pc/liquid-fill/index.d.ts +4 -0
  275. package/types/pc/liquid-fill/interface.d.ts +0 -0
  276. package/types/pc/qr-code/index.d.ts +34 -0
  277. package/types/pc/qr-code/interface.d.ts +39 -0
  278. package/types/pc/table/interface.d.ts +2 -2
  279. package/types/pc/tour/index.d.ts +42 -0
  280. package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
  281. package/types/pc/utils/findScrollParent.d.ts +2 -0
  282. package/types/pc/utils/index.d.ts +5 -0
  283. package/types/pc/utils/intersectionObserver.d.ts +2 -0
  284. package/types/pc/utils/math.d.ts +1 -1
  285. package/types/pc/utils/mutationObserver.d.ts +2 -0
  286. package/types/pc/utils/names.d.ts +18 -0
  287. package/types/pc/utils/resizeObserver.d.ts +2 -0
  288. package/typography/Base.js +79 -81
  289. package/typography/EditContent.js +30 -33
  290. package/typography/Ellipsis.js +78 -75
  291. package/typography/Operations.js +50 -52
  292. package/typography/Paragraph.js +7 -7
  293. package/typography/Typography.js +7 -7
  294. package/typography/useEllipsis.js +105 -106
  295. package/upload/TriggerNode.js +69 -76
  296. package/upload/Upload.js +84 -87
  297. package/upload/Uploader.js +115 -118
  298. package/upload/list/PictureItem.js +61 -71
  299. package/upload/list/TextItem.js +61 -67
  300. package/upload/list/UploadProgress.js +42 -49
  301. package/upload/list/index.js +49 -50
  302. package/upload/request_.js +37 -38
  303. package/upload/util.js +39 -39
  304. package/utils/convertToDurationBasedOnTimeUnits.js +6 -0
  305. package/utils/findScrollParent.js +4 -0
  306. package/utils/index.js +274 -275
  307. package/utils/intersectionObserver.js +4 -0
  308. package/utils/math.js +7 -11
  309. package/utils/mutationObserver.js +4 -0
  310. package/utils/names.js +12 -0
  311. package/utils/reactTransitionGroup.js +1 -1
  312. package/utils/resizeObserver.js +4 -0
  313. package/verification-code/VerificationCode.js +50 -51
  314. package/version/index.js +1 -1
  315. package/virtual-list/VirtualList.js +243 -244
  316. package/virtual-list/util/item.js +3 -4
  317. package/watermark/Watermark.js +27 -31
  318. package/components/common/hooks/useComputedState.js +0 -11
  319. package/components/common/utils/resizeObserverEffect.js +0 -23
  320. package/hooks/useComputedState.js +0 -4
  321. package/types/common/hooks/useComputedState.d.ts +0 -4
  322. package/types/common/utils/resizeObserverEffect.d.ts +0 -2
  323. package/types/pc/hooks/useComputedState.d.ts +0 -1
  324. package/types/pc/utils/resizeObserverEffect.d.ts +0 -2
  325. package/utils/resizeObserverEffect.js +0 -4
  326. /package/dist/react-transition-group/chunk/{C6QwjD4L.js → CPfP7aNL.js} +0 -0
@@ -1,230 +1,225 @@
1
- import { jsx as p, jsxs as Te, Fragment as Ie } from "react/jsx-runtime";
2
- import xt from "@unicom-cloud/icons/IconUiCalendar";
3
- import Dt from "@unicom-cloud/icons/IconUiCalendarClock";
4
- import { isDayjs as Le } from "dayjs";
5
- import ze from "lodash/isArray";
6
- import kt from "lodash/isPlainObject";
7
- import Ct from "lodash/isUndefined";
8
- import Nt, { forwardRef as jt, useContext as Ht, useRef as ue, useImperativeHandle as Mt, useState as m, useEffect as Tt } from "react";
1
+ import { jsx as f, jsxs as Ye, Fragment as ke } from "react/jsx-runtime";
2
+ import Co from "@unicom-cloud/icons/IconUiCalendar";
3
+ import bo from "@unicom-cloud/icons/IconUiCalendarClock";
4
+ import { isDayjs as De } from "dayjs";
5
+ import xe from "lodash/isArray";
6
+ import Yo from "lodash/isPlainObject";
7
+ import ko from "lodash/isUndefined";
8
+ import Do, { forwardRef as xo, useContext as No, useRef as oe, useImperativeHandle as To, useState as p, useEffect as jo } from "react";
9
9
  import "../config-provider/ConfigProvider.js";
10
- import It from "../components/common/hooks/useMergeProps.js";
11
- import $e from "../components/common/hooks/usePrevious.js";
12
- import Lt from "../components/common/hooks/useUpdateEffect.js";
13
- import zt from "../picker/Input.js";
14
- import $t from "../trigger/index.js";
15
- import Ft from "@unicom-cloud/utils/class-name";
16
- import { getDayjsValue as d, getNow as T, toLocal as I, toTimezone as Ut, getValueWithTime as le, dayjs as Fe, isDayjsChange as Wt, methods as Ue } from "../components/common/utils/dayjs.js";
17
- import { omit as Bt } from "../components/common/utils/omit.js";
18
- import { pickDataAttributes as Ot } from "../components/common/utils/pick.js";
19
- import qt from "./context.js";
20
- import Qt from "./panel/Footer.js";
21
- import Rt from "./panel/Shortcut.js";
22
- import { getDefaultWeekStart as Et, getLocaleDayjsValue as x } from "./util.js";
23
- import Gt from "../config-provider/context.js";
24
- function Jt(L) {
25
- var b;
26
- const { format: z, picker: y, showTime: o } = L;
27
- let l;
28
- if (z)
29
- l = z;
10
+ import Lo from "../components/common/hooks/useMergeProps.js";
11
+ import Ne from "../components/common/hooks/usePrevious.js";
12
+ import Ho from "../components/common/hooks/useUpdateEffect.js";
13
+ import Mo from "../picker/Input.js";
14
+ import Io from "../trigger/index.js";
15
+ import Eo from "@unicom-cloud/utils/class-name";
16
+ import { getDayjsValue as m, getNow as N, toLocal as T, toTimezone as Oo, getValueWithTime as te, dayjs as Te, isDayjsChange as zo, methods as je } from "../components/common/utils/dayjs.js";
17
+ import { omit as $o } from "../components/common/utils/omit.js";
18
+ import { pickDataAttributes as Ao } from "../components/common/utils/pick.js";
19
+ import Fo from "./context.js";
20
+ import Ro from "./panel/Footer.js";
21
+ import Uo from "./panel/Shortcut.js";
22
+ import { getDefaultWeekStart as Wo, getLocaleDayjsValue as y } from "./util.js";
23
+ import Bo from "../config-provider/context.js";
24
+ function _o(j) {
25
+ const { format: L, picker: $, showTime: s } = j;
26
+ let c;
27
+ if (L)
28
+ c = L;
30
29
  else
31
- switch (L.mode || ((b = y == null ? void 0 : y.props) == null ? void 0 : b.pickerType)) {
30
+ switch (j.mode || $?.props?.pickerType) {
32
31
  case "date":
33
- l = o ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
32
+ c = s ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
34
33
  break;
35
34
  case "month":
36
- l = "YYYY-MM";
35
+ c = "YYYY-MM";
37
36
  break;
38
37
  case "year":
39
- l = "YYYY";
38
+ c = "YYYY";
40
39
  break;
41
40
  case "week":
42
- l = "gggg-wo";
41
+ c = "gggg-wo";
43
42
  break;
44
43
  case "quarter":
45
- l = "YYYY-[Q]Q";
44
+ c = "YYYY-[Q]Q";
46
45
  break;
47
46
  default:
48
- l = "YYYY-MM-DD";
47
+ c = "YYYY-MM-DD";
49
48
  }
50
- return l;
49
+ return c;
51
50
  }
52
- const We = {
51
+ const Le = {
53
52
  allowClear: !0,
54
53
  unmountOnExit: !0,
55
54
  position: "bl",
56
55
  editable: !0,
57
56
  showNowBtn: !0
58
- }, Xt = { bottom: 4 }, Zt = (L, z) => {
59
- var Ce, Ne, je;
57
+ }, qo = { bottom: 4 }, Qo = (j, L) => {
60
58
  const {
61
- getPrefixCls: y,
62
- locale: o,
63
- size: l,
64
- componentConfig: b,
65
- rtl: q
66
- } = Ht(Gt);
67
- q && (We.position = "br");
68
- const r = It(
69
- L,
70
- We,
71
- b == null ? void 0 : b.DatePicker
59
+ getPrefixCls: $,
60
+ locale: s,
61
+ size: c,
62
+ componentConfig: ne,
63
+ rtl: ae
64
+ } = No(Bo);
65
+ ae && (Le.position = "br");
66
+ const r = Lo(
67
+ j,
68
+ Le,
69
+ ne?.DatePicker
72
70
  ), {
73
- allowClear: Be,
74
- className: ce,
75
- style: fe,
76
- placeholder: Oe,
77
- getPopupContainer: qe,
78
- disabled: pe,
79
- position: Qe,
80
- error: Re,
81
- status: Ee,
82
- unmountOnExit: Ge,
83
- editable: Je,
84
- triggerProps: Xe,
85
- picker: me,
86
- shortcuts: $,
87
- onSelect: f,
88
- onVisibleChange: Q,
89
- value: Ze,
90
- onChange: R,
91
- icons: F,
92
- disabledDate: de,
93
- showTime: c,
94
- showNowBtn: he,
95
- onSelectShortcut: E,
96
- extra: ve,
97
- shortcutsPlacementLeft: D,
98
- onOk: G,
99
- defaultPickerValue: _e,
100
- pickerValue: Ae,
101
- onPickerValueChange: J,
102
- triggerElement: ge,
103
- utcOffset: a,
104
- timezone: i,
105
- panelRender: Ve,
106
- inputProps: Ke
107
- } = r, w = y == null ? void 0 : y("picker"), P = o == null ? void 0 : o.DatePicker, et = Ct(r.dayStartOfWeek) ? Et(o == null ? void 0 : o.dayjsLocale) : r.dayStartOfWeek, k = r.mode || me.props.pickerType, X = ue(null), Z = ue(null), _ = ue(null);
108
- Mt(
109
- z,
71
+ allowClear: He,
72
+ className: re,
73
+ style: ie,
74
+ placeholder: Me,
75
+ getPopupContainer: Ie,
76
+ disabled: le,
77
+ position: Ee,
78
+ error: Oe,
79
+ status: ze,
80
+ unmountOnExit: $e,
81
+ editable: Ae,
82
+ triggerProps: Fe,
83
+ picker: se,
84
+ shortcuts: H,
85
+ onSelect: A,
86
+ onVisibleChange: Re,
87
+ value: Ue,
88
+ onChange: We,
89
+ icons: M,
90
+ disabledDate: ce,
91
+ showTime: u,
92
+ showNowBtn: ue,
93
+ onSelectShortcut: Be,
94
+ extra: fe,
95
+ shortcutsPlacementLeft: w,
96
+ onOk: _e,
97
+ defaultPickerValue: qe,
98
+ pickerValue: Qe,
99
+ onPickerValueChange: Ke,
100
+ triggerElement: pe,
101
+ utcOffset: n,
102
+ timezone: a,
103
+ panelRender: me,
104
+ inputProps: Ge
105
+ } = r, S = $?.("picker"), F = s?.DatePicker, Je = ko(r.dayStartOfWeek) ? Wo(s?.dayjsLocale) : r.dayStartOfWeek, C = r.mode || se.props.pickerType, R = oe(null), U = oe(null), W = oe(null);
106
+ To(
107
+ L,
110
108
  () => ({
111
109
  focus() {
112
- re();
110
+ J();
113
111
  },
114
112
  blur() {
115
- ae();
113
+ X();
116
114
  }
117
115
  }),
118
116
  []
119
117
  );
120
- const C = ((Ne = (Ce = P == null ? void 0 : P.Calendar) == null ? void 0 : Ce[k]) == null ? void 0 : Ne.format) || Jt(r);
121
- let n = C;
122
- typeof n == "function" && (n = c ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD");
123
- function tt() {
118
+ const b = F?.Calendar?.[C]?.format || _o(r);
119
+ let t = b;
120
+ typeof t == "function" && (t = u ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD");
121
+ function Xe() {
124
122
  let e;
125
- return r.value ? e = d(r.value, n, a, i) : e = d(r.defaultValue, n, a, i), e;
123
+ return r.value ? e = m(r.value, t, n, a) : e = m(r.defaultValue, t, n, a), e;
126
124
  }
127
- const [A, N] = m(tt()), [ot, nt] = m(r.popupVisible), [K, ye] = m(!1), [we, U] = m(), h = "popupVisible" in r ? r.popupVisible : ot, j = "value" in r ? d(Ze, n, a, i) : A, Pe = j || d(_e, n) || T(), [rt, W] = m(), [ee, H] = m(), [at, te] = m(), [it, S] = m(Pe), oe = d(Ae, n) || it, v = at || ee || j, [B, Se] = m(k), st = kt(c) && d(
128
- c.defaultValue,
129
- c.format || "HH:mm:ss"
130
- ) || T(a, i), ne = v || st;
131
- function re() {
132
- var e, t;
133
- (t = (e = X.current) == null ? void 0 : e.focus) == null || t.call(e);
125
+ const [B, Y] = p(Xe()), [Ze, eo] = p(r.popupVisible), [_, de] = p(!1), [he, I] = p(), d = "popupVisible" in r ? r.popupVisible : Ze, k = "value" in r ? m(Ue, t, n, a) : B, ge = k || m(qe, t) || N(), [oo, E] = p(), [q, D] = p(), [to, Q] = p(), [no, P] = p(ge), K = m(Qe, t) || no, h = to || q || k, [O, ve] = p(C), ao = Yo(u) && m(
126
+ u.defaultValue,
127
+ u.format || "HH:mm:ss"
128
+ ) || N(n, a), G = h || ao;
129
+ function J() {
130
+ R.current?.focus?.();
134
131
  }
135
- function ae() {
136
- var e, t;
137
- (t = (e = X.current) == null ? void 0 : e.blur) == null || t.call(e);
132
+ function X() {
133
+ R.current?.blur?.();
138
134
  }
139
- const ie = $e(a), se = $e(i);
140
- Lt(() => {
141
- if (A && (ie !== a || i !== se)) {
142
- const e = I(A, ie, se);
143
- N(Ut(e, a, i));
135
+ const Z = Ne(n), ee = Ne(a);
136
+ Ho(() => {
137
+ if (B && (Z !== n || a !== ee)) {
138
+ const e = T(B, Z, ee);
139
+ Y(Oo(e, n, a));
144
140
  }
145
- }, [a, ie, i, se]), Tt(() => {
146
- W(void 0), U(void 0), h ? (S(Pe), D && _.current && Z.current && (_.current.style.maxHeight = `${Z.current.clientHeight}px`)) : (H(void 0), te(void 0), setTimeout(() => {
147
- ye(!1), Se(k), ae();
141
+ }, [n, Z, a, ee]), jo(() => {
142
+ E(void 0), I(void 0), d ? (P(ge), w && W.current && U.current && (W.current.style.maxHeight = `${U.current.clientHeight}px`)) : (D(void 0), Q(void 0), setTimeout(() => {
143
+ de(!1), ve(C), X();
148
144
  }, 100));
149
- }, [h]);
150
- function ut(e) {
151
- e ? Y(e, () => {
152
- re();
153
- }) : Y(!1);
145
+ }, [d]);
146
+ function ro(e) {
147
+ e ? V(e, () => {
148
+ J();
149
+ }) : V(!1);
154
150
  }
155
- function M(e) {
156
- J == null || J(e.format(n), e);
151
+ function x(e) {
152
+ Ke?.(e.format(t), e);
157
153
  }
158
- function Y(e, t) {
159
- nt(e), Q == null || Q(e), t == null || t();
154
+ function V(e, o) {
155
+ eo(e), Re?.(e), o?.();
160
156
  }
161
- function lt(e) {
162
- var t;
163
- e.stopPropagation(), N(void 0), H(void 0), O(void 0), (t = r.onClear) == null || t.call(r);
157
+ function io(e) {
158
+ e.stopPropagation(), Y(void 0), D(void 0), z(void 0), r.onClear?.();
164
159
  }
165
- function ct() {
166
- const e = x(v, o == null ? void 0 : o.dayjsLocale);
167
- Ye(), G == null || G(e && e.format(n), e);
160
+ function lo() {
161
+ const e = y(h, s?.dayjsLocale);
162
+ Se(), _e?.(e && e.format(t), e);
168
163
  }
169
- function Ye() {
170
- N(v), O(v), Y(!1);
164
+ function Se() {
165
+ Y(h), z(h), V(!1);
171
166
  }
172
- function be(e, t, u) {
173
- if (W(void 0), U(void 0), c) {
174
- const s = u ? t : le(t, ne);
175
- H(s), S(s);
176
- const V = x(
177
- I(s, a, i),
178
- o == null ? void 0 : o.dayjsLocale
167
+ function Pe(e, o, l) {
168
+ if (E(void 0), I(void 0), u) {
169
+ const i = l ? o : te(o, G);
170
+ D(i), P(i);
171
+ const v = y(
172
+ T(i, n, a),
173
+ s?.dayjsLocale
179
174
  );
180
- f == null || f(V.format(n), V);
175
+ A?.(v.format(t), v);
181
176
  } else {
182
- const s = x(
183
- I(t, a, i).locale(o == null ? void 0 : o.dayjsLocale),
184
- o == null ? void 0 : o.dayjsLocale
177
+ const i = y(
178
+ T(o, n, a).locale(s?.dayjsLocale),
179
+ s?.dayjsLocale
185
180
  );
186
- f == null || f(s ? s.format(n) : void 0, s), N(t), O(t), Y(!1);
181
+ A?.(i ? i.format(t) : void 0, i), Y(o), z(o), V(!1);
187
182
  }
188
183
  }
189
- function O(e) {
190
- if (Wt(e, j)) {
191
- const t = x(
192
- I(e, a, i),
193
- o == null ? void 0 : o.dayjsLocale
184
+ function z(e) {
185
+ if (zo(e, k)) {
186
+ const o = y(
187
+ T(e, n, a),
188
+ s?.dayjsLocale
194
189
  );
195
- R == null || R(
196
- t ? t.format(n) : void 0,
197
- t
190
+ We?.(
191
+ o ? o.format(t) : void 0,
192
+ o
198
193
  );
199
194
  }
200
195
  }
201
- function ft(e, t) {
202
- const u = v || T(a, i), s = le(u, t);
203
- H(s);
204
- const V = x(
205
- I(s, a, i),
206
- o == null ? void 0 : o.dayjsLocale
196
+ function so(e, o) {
197
+ const l = h || N(n, a), i = te(l, o);
198
+ D(i);
199
+ const v = y(
200
+ T(i, n, a),
201
+ s?.dayjsLocale
207
202
  );
208
- f == null || f(V.format(n), V);
203
+ A?.(v.format(t), v);
209
204
  }
210
- function pt(e) {
211
- return typeof e == "string" && Fe(e, n).format(n) === e && (typeof de == "function" ? !de(Fe(e, n)) : !0);
205
+ function co(e) {
206
+ return typeof e == "string" && Te(e, t).format(t) === e && (typeof ce == "function" ? !ce(Te(e, t)) : !0);
212
207
  }
213
- function mt(e) {
214
- const t = e.target.value;
215
- if (W(t), h || Y(!0), pt(t)) {
216
- const u = d(t, n);
217
- H(u), S(u), W(void 0);
208
+ function uo(e) {
209
+ const o = e.target.value;
210
+ if (E(o), d || V(!0), co(o)) {
211
+ const l = m(o, t);
212
+ D(l), P(l), E(void 0);
218
213
  }
219
214
  }
220
- function dt() {
221
- v ? (Ye(), ae()) : h && Y(!1);
215
+ function fo() {
216
+ h ? (Se(), X()) : d && V(!1);
222
217
  }
223
- function g(e, t, u = 1) {
224
- let s;
225
- e === "prev" && (s = Ue.subtract(oe, u, t)), e === "next" && (s = Ue.add(oe, u, t)), M(s), S(s);
218
+ function g(e, o, l = 1) {
219
+ let i;
220
+ e === "prev" && (i = je.subtract(K, l, o)), e === "next" && (i = je.add(K, l, o)), x(i), P(i);
226
221
  }
227
- function xe(e = k) {
222
+ function Ve(e = C) {
228
223
  if (e === "date" || e === "week")
229
224
  return {
230
225
  onPrev: () => g("prev", "month"),
@@ -243,174 +238,174 @@ const We = {
243
238
  onSuperNext: () => g("next", "year", 10)
244
239
  };
245
240
  }
246
- function De() {
247
- const e = x(
248
- T(a, i),
249
- o == null ? void 0 : o.dayjsLocale
241
+ function ye() {
242
+ const e = y(
243
+ N(n, a),
244
+ s?.dayjsLocale
250
245
  );
251
- M(e), be(e.format(n), e, !0);
246
+ x(e), Pe(e.format(t), e, !0);
252
247
  }
253
- function ht(e, t) {
254
- if (!t) {
255
- const u = c ? le(e, ne) : e;
256
- U(
257
- typeof C == "function" ? C(e) : u.locale(o == null ? void 0 : o.dayjsLocale).format(n)
248
+ function po(e, o) {
249
+ if (!o) {
250
+ const l = u ? te(e, G) : e;
251
+ I(
252
+ typeof b == "function" ? b(e) : l.locale(s?.dayjsLocale).format(t)
258
253
  );
259
254
  }
260
255
  }
261
- function vt() {
262
- U(void 0);
256
+ function mo() {
257
+ I(void 0);
263
258
  }
264
- function gt(e) {
265
- if (typeof e.value == "function" && Le(e.value())) {
266
- const t = d(
259
+ function ho(e) {
260
+ if (typeof e.value == "function" && De(e.value())) {
261
+ const o = m(
267
262
  e.value(),
263
+ t,
268
264
  n,
269
- a,
270
- i
265
+ a
271
266
  );
272
- S(t), M(t), te(t);
267
+ P(o), x(o), Q(o);
273
268
  }
274
269
  }
275
- function Vt() {
276
- const e = ee || j || T(a, i);
277
- te(void 0), S(e), M(e);
270
+ function go() {
271
+ const e = q || k || N(n, a);
272
+ Q(void 0), P(e), x(e);
278
273
  }
279
- function yt(e) {
280
- if (E == null || E(e), typeof e.value == "function" && Le(e.value())) {
281
- const t = d(
274
+ function vo(e) {
275
+ if (Be?.(e), typeof e.value == "function" && De(e.value())) {
276
+ const o = m(
282
277
  e.value(),
278
+ t,
283
279
  n,
284
- a,
285
- i
280
+ a
286
281
  );
287
- N(t), O(t), Y(!1);
282
+ Y(o), z(o), V(!1);
288
283
  }
289
284
  }
290
- function wt() {
291
- ye(!K);
285
+ function So() {
286
+ de(!_);
292
287
  }
293
- function ke(e) {
294
- const t = Ft(
295
- `${w}-container`,
288
+ function we(e) {
289
+ const o = Eo(
290
+ `${S}-container`,
296
291
  {
297
- [`${w}-panel-only`]: e,
298
- [`${w}-container-shortcuts-placement-left`]: ze($) && D,
299
- [`${w}-container-rtl`]: q
292
+ [`${S}-panel-only`]: e,
293
+ [`${S}-container-shortcuts-placement-left`]: xe(H) && w,
294
+ [`${S}-container-rtl`]: ae
300
295
  },
301
- e ? ce : ""
302
- ), u = {
303
- prefixCls: w,
304
- showTime: c,
305
- shortcuts: $,
306
- onSelectNow: De,
307
- showNowBtn: he,
308
- onMouseEnterShortcut: gt,
309
- onMouseLeaveShortcut: Vt,
310
- onSelectShortcut: yt
311
- }, s = c && B === "date" || ve || ze($) && $.length && !D || !c && B === "date" && he, V = /* @__PURE__ */ Te(Ie, { children: [
312
- Nt.cloneElement(me, {
313
- ...Bt(r, ["style"]),
314
- ...xe(),
315
- getHeaderOperations: xe,
316
- onSelect: be,
317
- onTimePickerSelect: ft,
318
- onSelectNow: De,
319
- popupVisible: h,
320
- format: n,
321
- value: v,
322
- pageShowDate: oe,
323
- localeName: o == null ? void 0 : o.dayjsLocale,
324
- setPageShowDate: (Me) => {
325
- S(Me), M(Me);
296
+ e ? re : ""
297
+ ), l = {
298
+ prefixCls: S,
299
+ showTime: u,
300
+ shortcuts: H,
301
+ onSelectNow: ye,
302
+ showNowBtn: ue,
303
+ onMouseEnterShortcut: ho,
304
+ onMouseLeaveShortcut: go,
305
+ onSelectShortcut: vo
306
+ }, i = u && O === "date" || fe || xe(H) && H.length && !w || !u && O === "date" && ue, v = /* @__PURE__ */ Ye(ke, { children: [
307
+ Do.cloneElement(se, {
308
+ ...$o(r, ["style"]),
309
+ ...Ve(),
310
+ getHeaderOperations: Ve,
311
+ onSelect: Pe,
312
+ onTimePickerSelect: so,
313
+ onSelectNow: ye,
314
+ popupVisible: d,
315
+ format: t,
316
+ value: h,
317
+ pageShowDate: K,
318
+ localeName: s?.dayjsLocale,
319
+ setPageShowDate: (be) => {
320
+ P(be), x(be);
326
321
  },
327
- timeValue: ne,
328
- isTimePanel: K,
329
- panelMode: B,
330
- setPanelMode: Se,
331
- onMouseEnterCell: ht,
332
- onMouseLeaveCell: vt
322
+ timeValue: G,
323
+ isTimePanel: _,
324
+ panelMode: O,
325
+ setPanelMode: ve,
326
+ onMouseEnterCell: po,
327
+ onMouseLeaveCell: mo
333
328
  }),
334
- !!s && /* @__PURE__ */ p(
335
- Qt,
329
+ !!i && /* @__PURE__ */ f(
330
+ Ro,
336
331
  {
337
- ...u,
338
- DATEPICKER_LOCALE: P,
339
- disabled: !v,
340
- onClickConfirmBtn: ct,
341
- extra: ve,
342
- mode: B,
343
- shortcutsPlacementLeft: D,
344
- onClickSelectTimeBtn: wt,
345
- isTimePanel: K
332
+ ...l,
333
+ DATEPICKER_LOCALE: F,
334
+ disabled: !h,
335
+ onClickConfirmBtn: lo,
336
+ extra: fe,
337
+ mode: O,
338
+ shortcutsPlacementLeft: w,
339
+ onClickSelectTimeBtn: So,
340
+ isTimePanel: _
346
341
  }
347
342
  )
348
- ] }), He = D ? /* @__PURE__ */ Te(Ie, { children: [
349
- /* @__PURE__ */ p(Rt, { ref: _, ...u }),
350
- /* @__PURE__ */ p("div", { ref: Z, className: `${w}-panel-wrapper`, children: V })
351
- ] }) : V, bt = typeof Ve == "function" ? Ve(He) : He;
352
- return /* @__PURE__ */ p(
343
+ ] }), Ce = w ? /* @__PURE__ */ Ye(ke, { children: [
344
+ /* @__PURE__ */ f(Uo, { ref: W, ...l }),
345
+ /* @__PURE__ */ f("div", { ref: U, className: `${S}-panel-wrapper`, children: v })
346
+ ] }) : v, wo = typeof me == "function" ? me(Ce) : Ce;
347
+ return /* @__PURE__ */ f(
353
348
  "div",
354
349
  {
355
- className: t,
350
+ className: o,
356
351
  onClick: () => {
357
- re();
352
+ J();
358
353
  },
359
- style: e ? fe : {},
360
- children: bt
354
+ style: e ? ie : {},
355
+ children: wo
361
356
  }
362
357
  );
363
358
  }
364
- const Pt = r.size || l, St = F && F.inputSuffix === null ? null : F && F.inputSuffix || (c ? /* @__PURE__ */ p(Dt, {}) : /* @__PURE__ */ p(xt, {})), Yt = {
365
- style: fe,
366
- className: ce,
367
- popupVisible: h,
368
- format: C,
369
- disabled: pe,
370
- error: Re,
371
- status: Ee,
372
- size: Pt,
373
- onPressEnter: dt,
374
- onClear: lt,
359
+ const Po = r.size || c, Vo = M && M.inputSuffix === null ? null : M && M.inputSuffix || (u ? /* @__PURE__ */ f(bo, {}) : /* @__PURE__ */ f(Co, {})), yo = {
360
+ style: ie,
361
+ className: re,
362
+ popupVisible: d,
363
+ format: b,
364
+ disabled: le,
365
+ error: Oe,
366
+ status: ze,
367
+ size: Po,
368
+ onPressEnter: fo,
369
+ onClear: io,
375
370
  prefix: r.prefix,
376
- suffixIcon: St,
377
- editable: Je && typeof C != "function",
378
- allowClear: Be
371
+ suffixIcon: Vo,
372
+ editable: Ae && typeof b != "function",
373
+ allowClear: He
379
374
  };
380
- return /* @__PURE__ */ p(qt.Provider, { value: { utcOffset: a, timezone: i, weekStart: et }, children: ge === null ? ke(!0) : /* @__PURE__ */ p(
381
- $t,
375
+ return /* @__PURE__ */ f(Fo.Provider, { value: { utcOffset: n, timezone: a, weekStart: Je }, children: pe === null ? we(!0) : /* @__PURE__ */ f(
376
+ Io,
382
377
  {
383
- popup: ke,
378
+ popup: we,
384
379
  trigger: "click",
385
380
  clickToClose: !1,
386
- position: Qe,
387
- disabled: pe,
388
- popupAlign: Xt,
389
- getPopupContainer: qe,
390
- onVisibleChange: ut,
391
- popupVisible: h,
381
+ position: Ee,
382
+ disabled: le,
383
+ popupAlign: qo,
384
+ getPopupContainer: Ie,
385
+ onVisibleChange: ro,
386
+ popupVisible: d,
392
387
  classNames: "slideDynamicOrigin",
393
- unmountOnExit: Ge,
394
- ...Xe,
395
- children: ge || /* @__PURE__ */ p(
396
- zt,
388
+ unmountOnExit: $e,
389
+ ...Fe,
390
+ children: pe || /* @__PURE__ */ f(
391
+ Mo,
397
392
  {
398
- ...Ot(r),
399
- ...Yt,
400
- ref: X,
401
- placeholder: Oe || ((je = P == null ? void 0 : P.placeholder) == null ? void 0 : je[k]),
402
- popupVisible: h,
403
- value: ee || j,
404
- inputValue: we || rt,
405
- prefixCls: w,
406
- onChange: mt,
407
- isPlaceholder: !!we,
408
- inputProps: Ke
393
+ ...Ao(r),
394
+ ...yo,
395
+ ref: R,
396
+ placeholder: Me || F?.placeholder?.[C],
397
+ popupVisible: d,
398
+ value: q || k,
399
+ inputValue: he || oo,
400
+ prefixCls: S,
401
+ onChange: uo,
402
+ isPlaceholder: !!he,
403
+ inputProps: Ge
409
404
  }
410
405
  )
411
406
  }
412
407
  ) });
413
- }, Po = jt(Zt);
408
+ }, St = xo(Qo);
414
409
  export {
415
- Po as default
410
+ St as default
416
411
  };