@unicom-cloud/ui 0.8.96 → 0.8.98

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 (302) hide show
  1. package/Affix.js +1 -1
  2. package/Carousel.js +1 -1
  3. package/LiquidFill.js +4 -0
  4. package/OverflowEllipsis.js +1 -1
  5. package/PageHeader.js +1 -1
  6. package/QrCode.js +57 -0
  7. package/Tour.js +63 -0
  8. package/Trigger.js +1 -1
  9. package/_virtual/_commonjsHelpers.js +6 -0
  10. package/_virtual/index.js +7 -0
  11. package/_virtual/index2.js +4 -0
  12. package/affix/index.js +70 -72
  13. package/alert/index.js +56 -56
  14. package/anchor/Anchor.js +55 -55
  15. package/anchor/Link.js +34 -34
  16. package/anchor/util.js +5 -5
  17. package/auto-complete/index.js +116 -122
  18. package/avatar/Avatar.js +33 -33
  19. package/avatar/Group.js +26 -26
  20. package/back-top/index.js +58 -61
  21. package/badge/index.js +46 -46
  22. package/breadcrumb/Item.js +42 -43
  23. package/breadcrumb/index.js +47 -47
  24. package/button/Group.js +6 -6
  25. package/button/index.js +91 -91
  26. package/calendar/Month.js +75 -75
  27. package/calendar/Year.js +35 -35
  28. package/calendar/header/index.js +25 -25
  29. package/calendar/index.js +103 -103
  30. package/card/Grid.js +8 -8
  31. package/card/Meta.js +16 -16
  32. package/card/index.js +49 -49
  33. package/carousel/Arrow.js +19 -19
  34. package/carousel/Indicator.js +26 -26
  35. package/carousel/index.js +108 -108
  36. package/cascader/Cascader.js +178 -191
  37. package/cascader/base/node.js +133 -136
  38. package/cascader/base/store.js +82 -85
  39. package/cascader/panel/List.js +125 -129
  40. package/cascader/panel/Search.js +79 -81
  41. package/cascader/util.js +13 -13
  42. package/checkbox/Checkbox.js +94 -96
  43. package/checkbox/Group.js +54 -56
  44. package/checkbox/GroupBlock.js +28 -29
  45. package/collapse/Collapse.js +45 -45
  46. package/collapse/Item.js +53 -55
  47. package/color-picker/ControlBar.js +43 -43
  48. package/color-picker/InputAlpha.js +12 -12
  49. package/color-picker/InputHex.js +30 -31
  50. package/color-picker/InputRgb.js +24 -24
  51. package/color-picker/Palette.js +18 -18
  52. package/color-picker/Panel.js +122 -125
  53. package/color-picker/hooks/useColorPicker.js +85 -88
  54. package/color-picker/hooks/useControlBlock.js +38 -40
  55. package/color-picker/index.js +47 -47
  56. package/comment/index.js +29 -29
  57. package/components/common/higher-order/with-speech-synthesis/index.js +37 -40
  58. package/components/common/hooks/useId.js +8 -8
  59. package/components/common/hooks/useInView.js +16 -16
  60. package/components/common/hooks/useIntersectionObserver.js +1 -1
  61. package/components/common/hooks/useKeyboardEvent.js +9 -10
  62. package/components/common/hooks/useOverflowHidden.js +1 -4
  63. package/components/common/hooks/usePersistCallback.js +7 -7
  64. package/components/common/hooks/useStateCallback.js +9 -10
  65. package/components/common/hooks/useWindowSize.js +8 -8
  66. package/components/common/space/index.js +9 -7
  67. package/components/common/utils/convertToDurationBasedOnTimeUnits.js +6 -0
  68. package/components/common/utils/dom.js +27 -29
  69. package/components/common/utils/findScrollParent.js +17 -0
  70. package/components/common/utils/intersectionObserver.js +21 -0
  71. package/components/common/utils/is.js +99 -109
  72. package/components/common/utils/mutationObserver.js +19 -0
  73. package/components/common/utils/reactDOM.js +34 -34
  74. package/components/common/utils/resizeObserver.js +21 -0
  75. package/copy/index.js +38 -40
  76. package/date-picker/Picker.js +290 -295
  77. package/date-picker/RangePicker.js +367 -372
  78. package/date-picker/index.js +33 -35
  79. package/date-picker/panel/Body.js +46 -47
  80. package/date-picker/panel/Header.js +33 -33
  81. package/date-picker/panel/Shortcut.js +31 -31
  82. package/date-picker/panel/date/index.js +85 -85
  83. package/date-picker/panel/month/index.js +59 -59
  84. package/date-picker/panel/quarter/index.js +67 -70
  85. package/date-picker/panel/range/index.js +101 -101
  86. package/date-picker/panel/year/index.js +39 -39
  87. package/date-picker/util.js +17 -18
  88. package/descriptions/index.js +62 -62
  89. package/details/index.js +53 -55
  90. package/development/index.js +9 -9
  91. package/dist/tinycolor/chunk/BOzCVdr0.js +1 -1
  92. package/dist/validate/src/index.js +5 -5
  93. package/dist/validate/src/util.js +1 -1
  94. package/divider/index.js +21 -21
  95. package/draggable/Item.js +35 -35
  96. package/draggable/index.js +22 -22
  97. package/drawer/Drawer.js +142 -147
  98. package/dropdown/Button.js +48 -48
  99. package/dropdown/index.js +88 -92
  100. package/empty/index.js +16 -16
  101. package/form/Control.js +211 -225
  102. package/form/Form.js +109 -113
  103. package/form/FormItem.js +118 -120
  104. package/form/FormList.js +60 -66
  105. package/form/FormProvider.js +31 -34
  106. package/form/hook/useContext.js +17 -19
  107. package/form/hook/useState.js +22 -23
  108. package/form/hook/useWatch.js +26 -27
  109. package/form/promisify.js +14 -18
  110. package/form/store.js +304 -316
  111. package/form/util.js +14 -15
  112. package/grid/Col.js +64 -64
  113. package/grid/Grid.js +51 -51
  114. package/grid/GridItem.js +48 -48
  115. package/grid/Row.js +39 -39
  116. package/hooks/useVerificationCode.js +41 -43
  117. package/hooks/useWatermark.js +89 -92
  118. package/icon/index.js +23 -24
  119. package/icon-hover/index.js +16 -16
  120. package/icons/file.js +11 -11
  121. package/image/Image.js +140 -141
  122. package/image/ImagePreview.js +252 -255
  123. package/image/ImagePreviewArrow.js +25 -25
  124. package/image/ImagePreviewGroup.js +62 -62
  125. package/image/util/getScale.js +25 -28
  126. package/index.js +684 -675
  127. package/input/Button.js +48 -50
  128. package/input/Group.js +9 -9
  129. package/input/Input.js +145 -154
  130. package/input/InputElement.js +108 -115
  131. package/input/Password.js +38 -38
  132. package/input/Search.js +51 -55
  133. package/input/Textarea.js +80 -81
  134. package/input/useComposition.js +23 -23
  135. package/input-number/decimal.js +59 -62
  136. package/input-number/index.js +139 -141
  137. package/input-tag/InputTag.js +222 -230
  138. package/layout/Content.js +6 -6
  139. package/layout/Footer.js +8 -8
  140. package/layout/Header.js +7 -7
  141. package/layout/Sider.js +88 -90
  142. package/layout/index.js +30 -30
  143. package/link/index.js +45 -46
  144. package/liquid-fill/LiquidFill.js +226 -0
  145. package/liquid-fill/LiquidFill2.js +3 -0
  146. package/liquid-fill/index.js +4 -0
  147. package/list/Item.js +28 -28
  148. package/list/Meta.js +12 -12
  149. package/list/index.js +146 -148
  150. package/mentions/index.js +75 -76
  151. package/menu/Item.js +58 -58
  152. package/menu/Menu.js +125 -127
  153. package/menu/OverflowWrap.js +39 -40
  154. package/menu/sub-menu/Inline.js +45 -45
  155. package/menu/util.js +26 -28
  156. package/message/index.js +96 -99
  157. package/message/useMessage.js +26 -27
  158. package/modal/Confirm.js +47 -49
  159. package/modal/Modal.js +250 -257
  160. package/modal/use-modal/Hook.js +26 -28
  161. package/modal/use-modal/index.js +46 -49
  162. package/notice/index.js +89 -90
  163. package/notification/index.js +60 -65
  164. package/notification/withNotification.js +35 -35
  165. package/overflow-ellipsis/OverflowItem.js +19 -20
  166. package/overflow-ellipsis/index.js +45 -46
  167. package/package.json +1 -1
  168. package/page-header/index.js +45 -45
  169. package/pagination/PageItem.js +87 -91
  170. package/pagination/PageJumper.js +40 -41
  171. package/pagination/PageOption.js +31 -35
  172. package/pagination/Pagination.js +162 -163
  173. package/picker/Input.js +90 -96
  174. package/picker/InputRange.js +115 -122
  175. package/popconfirm/index.js +98 -100
  176. package/popover/index.js +28 -28
  177. package/portal/Portal.js +10 -11
  178. package/progress/index.js +36 -36
  179. package/qr-code/index.js +99 -0
  180. package/qr-code/interface.js +1 -0
  181. package/radio/Group.js +48 -48
  182. package/radio/GroupBlock.js +32 -33
  183. package/radio/Radio.js +62 -64
  184. package/rate/index.js +88 -88
  185. package/resize-box/ResizeTrigger.js +39 -39
  186. package/resize-box/Split.js +92 -96
  187. package/resize-box/SplitGroup.js +116 -122
  188. package/resize-box/index.js +112 -115
  189. package/result/index.js +44 -44
  190. package/select/Option.js +53 -56
  191. package/select/Select.js +365 -381
  192. package/select/util.js +95 -99
  193. package/select-view/Core.js +159 -160
  194. package/skeleton/index.js +23 -23
  195. package/slider/Button.js +84 -92
  196. package/slider/Input.js +47 -49
  197. package/slider/Tick.js +28 -31
  198. package/slider/index.js +107 -107
  199. package/space/index.js +26 -26
  200. package/space-/index.js +51 -51
  201. package/spin/DotLoading.js +8 -8
  202. package/spin/index.js +47 -47
  203. package/statistic/Countdown.js +37 -37
  204. package/statistic/index.js +58 -58
  205. package/steps/Step.js +42 -42
  206. package/steps/index.js +54 -54
  207. package/style.css +1 -1
  208. package/switch/index.js +77 -78
  209. package/table/ColGroup.js +36 -37
  210. package/table/Table.js +447 -450
  211. package/table/hook/useExpand.js +24 -24
  212. package/table/hook/useRowSelection.js +62 -62
  213. package/table/summary/Row.js +16 -17
  214. package/table/tbody/Td.js +119 -118
  215. package/table/tbody/Tr.js +119 -121
  216. package/table/tbody/index.js +62 -63
  217. package/table/th-resizable/index.js +30 -30
  218. package/table/thead/Column.js +148 -148
  219. package/table/thead/index.js +87 -88
  220. package/tabs/Tab.js +55 -55
  221. package/tabs/TabContent.js +8 -8
  222. package/tabs/TabPane.js +15 -15
  223. package/tabs/hook/useHeaderScroll.js +36 -36
  224. package/tabs/tab-header/TabInk.js +31 -33
  225. package/tabs/tab-header/TabNavIcon.js +34 -35
  226. package/tabs/tab-header/index.js +192 -195
  227. package/tag/index.js +94 -97
  228. package/time-picker/Picker.js +167 -172
  229. package/time-picker/RangePicker.js +28 -28
  230. package/time-picker/TimePicker.js +146 -146
  231. package/timeline/Item.js +46 -46
  232. package/timeline/Timeline.js +52 -52
  233. package/tooltip/index.js +89 -95
  234. package/tour/index.js +289 -0
  235. package/transfer/Item.js +54 -54
  236. package/transfer/List.js +134 -136
  237. package/transfer/index.js +91 -91
  238. package/tree/Animation.js +49 -52
  239. package/tree/Node.js +114 -122
  240. package/tree/NodeList.js +51 -51
  241. package/tree/Tree.js +386 -393
  242. package/tree-select/List.js +71 -72
  243. package/tree-select/Select.js +135 -143
  244. package/tree-select/hook/useKeyCache.js +39 -39
  245. package/tree-select/hook/useStateValue.js +12 -12
  246. package/trigger/getPopupStyle.js +60 -61
  247. package/trigger/index.js +337 -346
  248. package/types/common/space/interface.d.ts +1 -1
  249. package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
  250. package/types/common/utils/findScrollParent.d.ts +2 -0
  251. package/types/common/utils/index.d.ts +5 -0
  252. package/types/common/utils/intersectionObserver.d.ts +2 -0
  253. package/types/common/utils/mutationObserver.d.ts +2 -0
  254. package/types/common/utils/resizeObserver.d.ts +2 -0
  255. package/types/pc/config-provider/interface.d.ts +6 -0
  256. package/types/pc/index.d.ts +3 -0
  257. package/types/pc/liquid-fill/LiquidFill.d.ts +115 -0
  258. package/types/pc/liquid-fill/LiquidFill2.d.ts +1 -0
  259. package/types/pc/liquid-fill/index.d.ts +2 -0
  260. package/types/pc/qr-code/index.d.ts +34 -0
  261. package/types/pc/qr-code/interface.d.ts +39 -0
  262. package/types/pc/table/interface.d.ts +2 -2
  263. package/types/pc/tour/index.d.ts +42 -0
  264. package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
  265. package/types/pc/utils/findScrollParent.d.ts +2 -0
  266. package/types/pc/utils/index.d.ts +5 -0
  267. package/types/pc/utils/intersectionObserver.d.ts +2 -0
  268. package/types/pc/utils/mutationObserver.d.ts +2 -0
  269. package/types/pc/utils/names.d.ts +18 -0
  270. package/types/pc/utils/resizeObserver.d.ts +2 -0
  271. package/typography/Base.js +79 -81
  272. package/typography/EditContent.js +30 -33
  273. package/typography/Ellipsis.js +77 -73
  274. package/typography/Operations.js +50 -52
  275. package/typography/Paragraph.js +7 -7
  276. package/typography/Typography.js +7 -7
  277. package/typography/useEllipsis.js +105 -106
  278. package/upload/TriggerNode.js +69 -76
  279. package/upload/Upload.js +84 -87
  280. package/upload/Uploader.js +115 -118
  281. package/upload/list/PictureItem.js +61 -71
  282. package/upload/list/TextItem.js +61 -67
  283. package/upload/list/UploadProgress.js +42 -49
  284. package/upload/list/index.js +48 -49
  285. package/upload/request_.js +37 -38
  286. package/upload/util.js +39 -39
  287. package/utils/convertToDurationBasedOnTimeUnits.js +6 -0
  288. package/utils/findScrollParent.js +4 -0
  289. package/utils/index.js +281 -278
  290. package/utils/intersectionObserver.js +4 -0
  291. package/utils/mutationObserver.js +4 -0
  292. package/utils/names.js +12 -0
  293. package/utils/resizeObserver.js +4 -0
  294. package/verification-code/VerificationCode.js +50 -51
  295. package/version/index.js +1 -1
  296. package/virtual-list/VirtualList.js +243 -244
  297. package/virtual-list/util/item.js +3 -4
  298. package/watermark/Watermark.js +27 -31
  299. package/components/common/utils/resizeObserverEffect.js +0 -23
  300. package/types/common/utils/resizeObserverEffect.d.ts +0 -2
  301. package/types/pc/utils/resizeObserverEffect.d.ts +0 -2
  302. package/utils/resizeObserverEffect.js +0 -4
@@ -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
  };