@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.
- package/Affix.js +1 -1
- package/Carousel.js +1 -1
- package/LiquidFill.js +4 -0
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/QrCode.js +57 -0
- package/Tour.js +63 -0
- package/Trigger.js +1 -1
- package/_virtual/_commonjsHelpers.js +6 -0
- package/_virtual/index.js +7 -0
- package/_virtual/index2.js +4 -0
- package/affix/index.js +70 -72
- package/alert/index.js +56 -56
- package/anchor/Anchor.js +55 -55
- package/anchor/Link.js +34 -34
- package/anchor/util.js +5 -5
- package/auto-complete/index.js +116 -122
- package/avatar/Avatar.js +33 -33
- package/avatar/Group.js +26 -26
- package/back-top/index.js +58 -61
- package/badge/index.js +46 -46
- package/breadcrumb/Item.js +42 -43
- package/breadcrumb/index.js +47 -47
- package/button/Group.js +6 -6
- package/button/index.js +91 -91
- package/calendar/Month.js +75 -75
- package/calendar/Year.js +35 -35
- package/calendar/header/index.js +25 -25
- package/calendar/index.js +103 -103
- package/card/Grid.js +8 -8
- package/card/Meta.js +16 -16
- package/card/index.js +49 -49
- package/carousel/Arrow.js +19 -19
- package/carousel/Indicator.js +26 -26
- package/carousel/index.js +108 -108
- package/cascader/Cascader.js +178 -191
- package/cascader/base/node.js +133 -136
- package/cascader/base/store.js +82 -85
- package/cascader/panel/List.js +125 -129
- package/cascader/panel/Search.js +79 -81
- package/cascader/util.js +13 -13
- package/checkbox/Checkbox.js +94 -96
- package/checkbox/Group.js +54 -56
- package/checkbox/GroupBlock.js +28 -29
- package/collapse/Collapse.js +45 -45
- package/collapse/Item.js +53 -55
- package/color-picker/ControlBar.js +43 -43
- package/color-picker/InputAlpha.js +12 -12
- package/color-picker/InputHex.js +30 -31
- package/color-picker/InputRgb.js +24 -24
- package/color-picker/Palette.js +18 -18
- package/color-picker/Panel.js +122 -125
- package/color-picker/hooks/useColorPicker.js +85 -88
- package/color-picker/hooks/useControlBlock.js +38 -40
- package/color-picker/index.js +47 -47
- package/comment/index.js +29 -29
- package/components/common/higher-order/with-speech-synthesis/index.js +37 -40
- package/components/common/hooks/useId.js +8 -8
- package/components/common/hooks/useInView.js +16 -16
- package/components/common/hooks/useIntersectionObserver.js +1 -1
- package/components/common/hooks/useKeyboardEvent.js +9 -10
- package/components/common/hooks/useOverflowHidden.js +1 -4
- package/components/common/hooks/usePersistCallback.js +7 -7
- package/components/common/hooks/useStateCallback.js +9 -10
- package/components/common/hooks/useWindowSize.js +8 -8
- package/components/common/space/index.js +9 -7
- package/components/common/utils/convertToDurationBasedOnTimeUnits.js +6 -0
- package/components/common/utils/dom.js +27 -29
- package/components/common/utils/findScrollParent.js +17 -0
- package/components/common/utils/intersectionObserver.js +21 -0
- package/components/common/utils/is.js +99 -109
- package/components/common/utils/mutationObserver.js +19 -0
- package/components/common/utils/reactDOM.js +34 -34
- package/components/common/utils/resizeObserver.js +21 -0
- package/copy/index.js +38 -40
- package/date-picker/Picker.js +290 -295
- package/date-picker/RangePicker.js +367 -372
- package/date-picker/index.js +33 -35
- package/date-picker/panel/Body.js +46 -47
- package/date-picker/panel/Header.js +33 -33
- package/date-picker/panel/Shortcut.js +31 -31
- package/date-picker/panel/date/index.js +85 -85
- package/date-picker/panel/month/index.js +59 -59
- package/date-picker/panel/quarter/index.js +67 -70
- package/date-picker/panel/range/index.js +101 -101
- package/date-picker/panel/year/index.js +39 -39
- package/date-picker/util.js +17 -18
- package/descriptions/index.js +62 -62
- package/details/index.js +53 -55
- package/development/index.js +9 -9
- package/dist/tinycolor/chunk/BOzCVdr0.js +1 -1
- package/dist/validate/src/index.js +5 -5
- package/dist/validate/src/util.js +1 -1
- package/divider/index.js +21 -21
- package/draggable/Item.js +35 -35
- package/draggable/index.js +22 -22
- package/drawer/Drawer.js +142 -147
- package/dropdown/Button.js +48 -48
- package/dropdown/index.js +88 -92
- package/empty/index.js +16 -16
- package/form/Control.js +211 -225
- package/form/Form.js +109 -113
- package/form/FormItem.js +118 -120
- package/form/FormList.js +60 -66
- package/form/FormProvider.js +31 -34
- package/form/hook/useContext.js +17 -19
- package/form/hook/useState.js +22 -23
- package/form/hook/useWatch.js +26 -27
- package/form/promisify.js +14 -18
- package/form/store.js +304 -316
- package/form/util.js +14 -15
- package/grid/Col.js +64 -64
- package/grid/Grid.js +51 -51
- package/grid/GridItem.js +48 -48
- package/grid/Row.js +39 -39
- package/hooks/useVerificationCode.js +41 -43
- package/hooks/useWatermark.js +89 -92
- package/icon/index.js +23 -24
- package/icon-hover/index.js +16 -16
- package/icons/file.js +11 -11
- package/image/Image.js +140 -141
- package/image/ImagePreview.js +252 -255
- package/image/ImagePreviewArrow.js +25 -25
- package/image/ImagePreviewGroup.js +62 -62
- package/image/util/getScale.js +25 -28
- package/index.js +684 -675
- package/input/Button.js +48 -50
- package/input/Group.js +9 -9
- package/input/Input.js +145 -154
- package/input/InputElement.js +108 -115
- package/input/Password.js +38 -38
- package/input/Search.js +51 -55
- package/input/Textarea.js +80 -81
- package/input/useComposition.js +23 -23
- package/input-number/decimal.js +59 -62
- package/input-number/index.js +139 -141
- package/input-tag/InputTag.js +222 -230
- package/layout/Content.js +6 -6
- package/layout/Footer.js +8 -8
- package/layout/Header.js +7 -7
- package/layout/Sider.js +88 -90
- package/layout/index.js +30 -30
- package/link/index.js +45 -46
- package/liquid-fill/LiquidFill.js +226 -0
- package/liquid-fill/LiquidFill2.js +3 -0
- package/liquid-fill/index.js +4 -0
- package/list/Item.js +28 -28
- package/list/Meta.js +12 -12
- package/list/index.js +146 -148
- package/mentions/index.js +75 -76
- package/menu/Item.js +58 -58
- package/menu/Menu.js +125 -127
- package/menu/OverflowWrap.js +39 -40
- package/menu/sub-menu/Inline.js +45 -45
- package/menu/util.js +26 -28
- package/message/index.js +96 -99
- package/message/useMessage.js +26 -27
- package/modal/Confirm.js +47 -49
- package/modal/Modal.js +250 -257
- package/modal/use-modal/Hook.js +26 -28
- package/modal/use-modal/index.js +46 -49
- package/notice/index.js +89 -90
- package/notification/index.js +60 -65
- package/notification/withNotification.js +35 -35
- package/overflow-ellipsis/OverflowItem.js +19 -20
- package/overflow-ellipsis/index.js +45 -46
- package/package.json +1 -1
- package/page-header/index.js +45 -45
- package/pagination/PageItem.js +87 -91
- package/pagination/PageJumper.js +40 -41
- package/pagination/PageOption.js +31 -35
- package/pagination/Pagination.js +162 -163
- package/picker/Input.js +90 -96
- package/picker/InputRange.js +115 -122
- package/popconfirm/index.js +98 -100
- package/popover/index.js +28 -28
- package/portal/Portal.js +10 -11
- package/progress/index.js +36 -36
- package/qr-code/index.js +99 -0
- package/qr-code/interface.js +1 -0
- package/radio/Group.js +48 -48
- package/radio/GroupBlock.js +32 -33
- package/radio/Radio.js +62 -64
- package/rate/index.js +88 -88
- package/resize-box/ResizeTrigger.js +39 -39
- package/resize-box/Split.js +92 -96
- package/resize-box/SplitGroup.js +116 -122
- package/resize-box/index.js +112 -115
- package/result/index.js +44 -44
- package/select/Option.js +53 -56
- package/select/Select.js +365 -381
- package/select/util.js +95 -99
- package/select-view/Core.js +159 -160
- package/skeleton/index.js +23 -23
- package/slider/Button.js +84 -92
- package/slider/Input.js +47 -49
- package/slider/Tick.js +28 -31
- package/slider/index.js +107 -107
- package/space/index.js +26 -26
- package/space-/index.js +51 -51
- package/spin/DotLoading.js +8 -8
- package/spin/index.js +47 -47
- package/statistic/Countdown.js +37 -37
- package/statistic/index.js +58 -58
- package/steps/Step.js +42 -42
- package/steps/index.js +54 -54
- package/style.css +1 -1
- package/switch/index.js +77 -78
- package/table/ColGroup.js +36 -37
- package/table/Table.js +447 -450
- package/table/hook/useExpand.js +24 -24
- package/table/hook/useRowSelection.js +62 -62
- package/table/summary/Row.js +16 -17
- package/table/tbody/Td.js +119 -118
- package/table/tbody/Tr.js +119 -121
- package/table/tbody/index.js +62 -63
- package/table/th-resizable/index.js +30 -30
- package/table/thead/Column.js +148 -148
- package/table/thead/index.js +87 -88
- package/tabs/Tab.js +55 -55
- package/tabs/TabContent.js +8 -8
- package/tabs/TabPane.js +15 -15
- package/tabs/hook/useHeaderScroll.js +36 -36
- package/tabs/tab-header/TabInk.js +31 -33
- package/tabs/tab-header/TabNavIcon.js +34 -35
- package/tabs/tab-header/index.js +192 -195
- package/tag/index.js +94 -97
- package/time-picker/Picker.js +167 -172
- package/time-picker/RangePicker.js +28 -28
- package/time-picker/TimePicker.js +146 -146
- package/timeline/Item.js +46 -46
- package/timeline/Timeline.js +52 -52
- package/tooltip/index.js +89 -95
- package/tour/index.js +289 -0
- package/transfer/Item.js +54 -54
- package/transfer/List.js +134 -136
- package/transfer/index.js +91 -91
- package/tree/Animation.js +49 -52
- package/tree/Node.js +114 -122
- package/tree/NodeList.js +51 -51
- package/tree/Tree.js +386 -393
- package/tree-select/List.js +71 -72
- package/tree-select/Select.js +135 -143
- package/tree-select/hook/useKeyCache.js +39 -39
- package/tree-select/hook/useStateValue.js +12 -12
- package/trigger/getPopupStyle.js +60 -61
- package/trigger/index.js +337 -346
- package/types/common/space/interface.d.ts +1 -1
- package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
- package/types/common/utils/findScrollParent.d.ts +2 -0
- package/types/common/utils/index.d.ts +5 -0
- package/types/common/utils/intersectionObserver.d.ts +2 -0
- package/types/common/utils/mutationObserver.d.ts +2 -0
- package/types/common/utils/resizeObserver.d.ts +2 -0
- package/types/pc/config-provider/interface.d.ts +6 -0
- package/types/pc/index.d.ts +3 -0
- package/types/pc/liquid-fill/LiquidFill.d.ts +115 -0
- package/types/pc/liquid-fill/LiquidFill2.d.ts +1 -0
- package/types/pc/liquid-fill/index.d.ts +2 -0
- package/types/pc/qr-code/index.d.ts +34 -0
- package/types/pc/qr-code/interface.d.ts +39 -0
- package/types/pc/table/interface.d.ts +2 -2
- package/types/pc/tour/index.d.ts +42 -0
- package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
- package/types/pc/utils/findScrollParent.d.ts +2 -0
- package/types/pc/utils/index.d.ts +5 -0
- package/types/pc/utils/intersectionObserver.d.ts +2 -0
- package/types/pc/utils/mutationObserver.d.ts +2 -0
- package/types/pc/utils/names.d.ts +18 -0
- package/types/pc/utils/resizeObserver.d.ts +2 -0
- package/typography/Base.js +79 -81
- package/typography/EditContent.js +30 -33
- package/typography/Ellipsis.js +77 -73
- package/typography/Operations.js +50 -52
- package/typography/Paragraph.js +7 -7
- package/typography/Typography.js +7 -7
- package/typography/useEllipsis.js +105 -106
- package/upload/TriggerNode.js +69 -76
- package/upload/Upload.js +84 -87
- package/upload/Uploader.js +115 -118
- package/upload/list/PictureItem.js +61 -71
- package/upload/list/TextItem.js +61 -67
- package/upload/list/UploadProgress.js +42 -49
- package/upload/list/index.js +48 -49
- package/upload/request_.js +37 -38
- package/upload/util.js +39 -39
- package/utils/convertToDurationBasedOnTimeUnits.js +6 -0
- package/utils/findScrollParent.js +4 -0
- package/utils/index.js +281 -278
- package/utils/intersectionObserver.js +4 -0
- package/utils/mutationObserver.js +4 -0
- package/utils/names.js +12 -0
- package/utils/resizeObserver.js +4 -0
- package/verification-code/VerificationCode.js +50 -51
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +243 -244
- package/virtual-list/util/item.js +3 -4
- package/watermark/Watermark.js +27 -31
- package/components/common/utils/resizeObserverEffect.js +0 -23
- package/types/common/utils/resizeObserverEffect.d.ts +0 -2
- package/types/pc/utils/resizeObserverEffect.d.ts +0 -2
- package/utils/resizeObserverEffect.js +0 -4
package/date-picker/Picker.js
CHANGED
|
@@ -1,230 +1,225 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { isDayjs as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
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
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { getDayjsValue as
|
|
17
|
-
import { omit as
|
|
18
|
-
import { pickDataAttributes as
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import { getDefaultWeekStart as
|
|
23
|
-
import
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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 (
|
|
30
|
+
switch (j.mode || $?.props?.pickerType) {
|
|
32
31
|
case "date":
|
|
33
|
-
|
|
32
|
+
c = s ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
34
33
|
break;
|
|
35
34
|
case "month":
|
|
36
|
-
|
|
35
|
+
c = "YYYY-MM";
|
|
37
36
|
break;
|
|
38
37
|
case "year":
|
|
39
|
-
|
|
38
|
+
c = "YYYY";
|
|
40
39
|
break;
|
|
41
40
|
case "week":
|
|
42
|
-
|
|
41
|
+
c = "gggg-wo";
|
|
43
42
|
break;
|
|
44
43
|
case "quarter":
|
|
45
|
-
|
|
44
|
+
c = "YYYY-[Q]Q";
|
|
46
45
|
break;
|
|
47
46
|
default:
|
|
48
|
-
|
|
47
|
+
c = "YYYY-MM-DD";
|
|
49
48
|
}
|
|
50
|
-
return
|
|
49
|
+
return c;
|
|
51
50
|
}
|
|
52
|
-
const
|
|
51
|
+
const Le = {
|
|
53
52
|
allowClear: !0,
|
|
54
53
|
unmountOnExit: !0,
|
|
55
54
|
position: "bl",
|
|
56
55
|
editable: !0,
|
|
57
56
|
showNowBtn: !0
|
|
58
|
-
},
|
|
59
|
-
var Ce, Ne, je;
|
|
57
|
+
}, qo = { bottom: 4 }, Qo = (j, L) => {
|
|
60
58
|
const {
|
|
61
|
-
getPrefixCls:
|
|
62
|
-
locale:
|
|
63
|
-
size:
|
|
64
|
-
componentConfig:
|
|
65
|
-
rtl:
|
|
66
|
-
} =
|
|
67
|
-
|
|
68
|
-
const r =
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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:
|
|
74
|
-
className:
|
|
75
|
-
style:
|
|
76
|
-
placeholder:
|
|
77
|
-
getPopupContainer:
|
|
78
|
-
disabled:
|
|
79
|
-
position:
|
|
80
|
-
error:
|
|
81
|
-
status:
|
|
82
|
-
unmountOnExit:
|
|
83
|
-
editable:
|
|
84
|
-
triggerProps:
|
|
85
|
-
picker:
|
|
86
|
-
shortcuts:
|
|
87
|
-
onSelect:
|
|
88
|
-
onVisibleChange:
|
|
89
|
-
value:
|
|
90
|
-
onChange:
|
|
91
|
-
icons:
|
|
92
|
-
disabledDate:
|
|
93
|
-
showTime:
|
|
94
|
-
showNowBtn:
|
|
95
|
-
onSelectShortcut:
|
|
96
|
-
extra:
|
|
97
|
-
shortcutsPlacementLeft:
|
|
98
|
-
onOk:
|
|
99
|
-
defaultPickerValue:
|
|
100
|
-
pickerValue:
|
|
101
|
-
onPickerValueChange:
|
|
102
|
-
triggerElement:
|
|
103
|
-
utcOffset:
|
|
104
|
-
timezone:
|
|
105
|
-
panelRender:
|
|
106
|
-
inputProps:
|
|
107
|
-
} = r,
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
110
|
+
J();
|
|
113
111
|
},
|
|
114
112
|
blur() {
|
|
115
|
-
|
|
113
|
+
X();
|
|
116
114
|
}
|
|
117
115
|
}),
|
|
118
116
|
[]
|
|
119
117
|
);
|
|
120
|
-
const
|
|
121
|
-
let
|
|
122
|
-
typeof
|
|
123
|
-
function
|
|
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 =
|
|
123
|
+
return r.value ? e = m(r.value, t, n, a) : e = m(r.defaultValue, t, n, a), e;
|
|
126
124
|
}
|
|
127
|
-
const [
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
) ||
|
|
131
|
-
function
|
|
132
|
-
|
|
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
|
|
136
|
-
|
|
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
|
|
140
|
-
|
|
141
|
-
if (
|
|
142
|
-
const e =
|
|
143
|
-
|
|
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
|
-
}, [
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
}, [
|
|
150
|
-
function
|
|
151
|
-
e ?
|
|
152
|
-
|
|
153
|
-
}) :
|
|
145
|
+
}, [d]);
|
|
146
|
+
function ro(e) {
|
|
147
|
+
e ? V(e, () => {
|
|
148
|
+
J();
|
|
149
|
+
}) : V(!1);
|
|
154
150
|
}
|
|
155
|
-
function
|
|
156
|
-
|
|
151
|
+
function x(e) {
|
|
152
|
+
Ke?.(e.format(t), e);
|
|
157
153
|
}
|
|
158
|
-
function
|
|
159
|
-
|
|
154
|
+
function V(e, o) {
|
|
155
|
+
eo(e), Re?.(e), o?.();
|
|
160
156
|
}
|
|
161
|
-
function
|
|
162
|
-
|
|
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
|
|
166
|
-
const e =
|
|
167
|
-
|
|
160
|
+
function lo() {
|
|
161
|
+
const e = y(h, s?.dayjsLocale);
|
|
162
|
+
Se(), _e?.(e && e.format(t), e);
|
|
168
163
|
}
|
|
169
|
-
function
|
|
170
|
-
|
|
164
|
+
function Se() {
|
|
165
|
+
Y(h), z(h), V(!1);
|
|
171
166
|
}
|
|
172
|
-
function
|
|
173
|
-
if (
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
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
|
-
|
|
175
|
+
A?.(v.format(t), v);
|
|
181
176
|
} else {
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
|
|
177
|
+
const i = y(
|
|
178
|
+
T(o, n, a).locale(s?.dayjsLocale),
|
|
179
|
+
s?.dayjsLocale
|
|
185
180
|
);
|
|
186
|
-
|
|
181
|
+
A?.(i ? i.format(t) : void 0, i), Y(o), z(o), V(!1);
|
|
187
182
|
}
|
|
188
183
|
}
|
|
189
|
-
function
|
|
190
|
-
if (
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
|
|
184
|
+
function z(e) {
|
|
185
|
+
if (zo(e, k)) {
|
|
186
|
+
const o = y(
|
|
187
|
+
T(e, n, a),
|
|
188
|
+
s?.dayjsLocale
|
|
194
189
|
);
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
190
|
+
We?.(
|
|
191
|
+
o ? o.format(t) : void 0,
|
|
192
|
+
o
|
|
198
193
|
);
|
|
199
194
|
}
|
|
200
195
|
}
|
|
201
|
-
function
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
|
|
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
|
-
|
|
203
|
+
A?.(v.format(t), v);
|
|
209
204
|
}
|
|
210
|
-
function
|
|
211
|
-
return typeof e == "string" &&
|
|
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
|
|
214
|
-
const
|
|
215
|
-
if (
|
|
216
|
-
const
|
|
217
|
-
|
|
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
|
|
221
|
-
|
|
215
|
+
function fo() {
|
|
216
|
+
h ? (Se(), X()) : d && V(!1);
|
|
222
217
|
}
|
|
223
|
-
function g(e,
|
|
224
|
-
let
|
|
225
|
-
e === "prev" && (
|
|
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
|
|
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
|
|
247
|
-
const e =
|
|
248
|
-
|
|
249
|
-
|
|
241
|
+
function ye() {
|
|
242
|
+
const e = y(
|
|
243
|
+
N(n, a),
|
|
244
|
+
s?.dayjsLocale
|
|
250
245
|
);
|
|
251
|
-
|
|
246
|
+
x(e), Pe(e.format(t), e, !0);
|
|
252
247
|
}
|
|
253
|
-
function
|
|
254
|
-
if (!
|
|
255
|
-
const
|
|
256
|
-
|
|
257
|
-
typeof
|
|
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
|
|
262
|
-
|
|
256
|
+
function mo() {
|
|
257
|
+
I(void 0);
|
|
263
258
|
}
|
|
264
|
-
function
|
|
265
|
-
if (typeof e.value == "function" &&
|
|
266
|
-
const
|
|
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
|
-
|
|
267
|
+
P(o), x(o), Q(o);
|
|
273
268
|
}
|
|
274
269
|
}
|
|
275
|
-
function
|
|
276
|
-
const e =
|
|
277
|
-
|
|
270
|
+
function go() {
|
|
271
|
+
const e = q || k || N(n, a);
|
|
272
|
+
Q(void 0), P(e), x(e);
|
|
278
273
|
}
|
|
279
|
-
function
|
|
280
|
-
if (
|
|
281
|
-
const
|
|
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
|
-
|
|
282
|
+
Y(o), z(o), V(!1);
|
|
288
283
|
}
|
|
289
284
|
}
|
|
290
|
-
function
|
|
291
|
-
|
|
285
|
+
function So() {
|
|
286
|
+
de(!_);
|
|
292
287
|
}
|
|
293
|
-
function
|
|
294
|
-
const
|
|
295
|
-
`${
|
|
288
|
+
function we(e) {
|
|
289
|
+
const o = Eo(
|
|
290
|
+
`${S}-container`,
|
|
296
291
|
{
|
|
297
|
-
[`${
|
|
298
|
-
[`${
|
|
299
|
-
[`${
|
|
292
|
+
[`${S}-panel-only`]: e,
|
|
293
|
+
[`${S}-container-shortcuts-placement-left`]: xe(H) && w,
|
|
294
|
+
[`${S}-container-rtl`]: ae
|
|
300
295
|
},
|
|
301
|
-
e ?
|
|
302
|
-
),
|
|
303
|
-
prefixCls:
|
|
304
|
-
showTime:
|
|
305
|
-
shortcuts:
|
|
306
|
-
onSelectNow:
|
|
307
|
-
showNowBtn:
|
|
308
|
-
onMouseEnterShortcut:
|
|
309
|
-
onMouseLeaveShortcut:
|
|
310
|
-
onSelectShortcut:
|
|
311
|
-
},
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
...
|
|
315
|
-
getHeaderOperations:
|
|
316
|
-
onSelect:
|
|
317
|
-
onTimePickerSelect:
|
|
318
|
-
onSelectNow:
|
|
319
|
-
popupVisible:
|
|
320
|
-
format:
|
|
321
|
-
value:
|
|
322
|
-
pageShowDate:
|
|
323
|
-
localeName:
|
|
324
|
-
setPageShowDate: (
|
|
325
|
-
|
|
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:
|
|
328
|
-
isTimePanel:
|
|
329
|
-
panelMode:
|
|
330
|
-
setPanelMode:
|
|
331
|
-
onMouseEnterCell:
|
|
332
|
-
onMouseLeaveCell:
|
|
322
|
+
timeValue: G,
|
|
323
|
+
isTimePanel: _,
|
|
324
|
+
panelMode: O,
|
|
325
|
+
setPanelMode: ve,
|
|
326
|
+
onMouseEnterCell: po,
|
|
327
|
+
onMouseLeaveCell: mo
|
|
333
328
|
}),
|
|
334
|
-
!!
|
|
335
|
-
|
|
329
|
+
!!i && /* @__PURE__ */ f(
|
|
330
|
+
Ro,
|
|
336
331
|
{
|
|
337
|
-
...
|
|
338
|
-
DATEPICKER_LOCALE:
|
|
339
|
-
disabled: !
|
|
340
|
-
onClickConfirmBtn:
|
|
341
|
-
extra:
|
|
342
|
-
mode:
|
|
343
|
-
shortcutsPlacementLeft:
|
|
344
|
-
onClickSelectTimeBtn:
|
|
345
|
-
isTimePanel:
|
|
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
|
-
] }),
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
-
/* @__PURE__ */
|
|
351
|
-
] }) :
|
|
352
|
-
return /* @__PURE__ */
|
|
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:
|
|
350
|
+
className: o,
|
|
356
351
|
onClick: () => {
|
|
357
|
-
|
|
352
|
+
J();
|
|
358
353
|
},
|
|
359
|
-
style: e ?
|
|
360
|
-
children:
|
|
354
|
+
style: e ? ie : {},
|
|
355
|
+
children: wo
|
|
361
356
|
}
|
|
362
357
|
);
|
|
363
358
|
}
|
|
364
|
-
const
|
|
365
|
-
style:
|
|
366
|
-
className:
|
|
367
|
-
popupVisible:
|
|
368
|
-
format:
|
|
369
|
-
disabled:
|
|
370
|
-
error:
|
|
371
|
-
status:
|
|
372
|
-
size:
|
|
373
|
-
onPressEnter:
|
|
374
|
-
onClear:
|
|
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:
|
|
377
|
-
editable:
|
|
378
|
-
allowClear:
|
|
371
|
+
suffixIcon: Vo,
|
|
372
|
+
editable: Ae && typeof b != "function",
|
|
373
|
+
allowClear: He
|
|
379
374
|
};
|
|
380
|
-
return /* @__PURE__ */
|
|
381
|
-
|
|
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:
|
|
378
|
+
popup: we,
|
|
384
379
|
trigger: "click",
|
|
385
380
|
clickToClose: !1,
|
|
386
|
-
position:
|
|
387
|
-
disabled:
|
|
388
|
-
popupAlign:
|
|
389
|
-
getPopupContainer:
|
|
390
|
-
onVisibleChange:
|
|
391
|
-
popupVisible:
|
|
381
|
+
position: Ee,
|
|
382
|
+
disabled: le,
|
|
383
|
+
popupAlign: qo,
|
|
384
|
+
getPopupContainer: Ie,
|
|
385
|
+
onVisibleChange: ro,
|
|
386
|
+
popupVisible: d,
|
|
392
387
|
classNames: "slideDynamicOrigin",
|
|
393
|
-
unmountOnExit:
|
|
394
|
-
...
|
|
395
|
-
children:
|
|
396
|
-
|
|
388
|
+
unmountOnExit: $e,
|
|
389
|
+
...Fe,
|
|
390
|
+
children: pe || /* @__PURE__ */ f(
|
|
391
|
+
Mo,
|
|
397
392
|
{
|
|
398
|
-
...
|
|
399
|
-
...
|
|
400
|
-
ref:
|
|
401
|
-
placeholder:
|
|
402
|
-
popupVisible:
|
|
403
|
-
value:
|
|
404
|
-
inputValue:
|
|
405
|
-
prefixCls:
|
|
406
|
-
onChange:
|
|
407
|
-
isPlaceholder: !!
|
|
408
|
-
inputProps:
|
|
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
|
-
},
|
|
408
|
+
}, St = xo(Qo);
|
|
414
409
|
export {
|
|
415
|
-
|
|
410
|
+
St as default
|
|
416
411
|
};
|