@unicom-cloud/ui 0.8.81 → 0.8.82
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/Alert.js +1 -1
- package/AutoComplete.js +2 -2
- package/BackTop.js +2 -2
- package/Badge.js +1 -1
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +2 -2
- package/Card.js +1 -1
- package/Carousel.js +1 -1
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +2 -2
- package/Comment.js +1 -1
- package/ConfigProvider.js +5 -4
- package/Copy.js +1 -1
- package/DatePicker.js +7 -7
- package/Descriptions.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/List.js +2 -2
- package/Mentions.js +2 -2
- package/Menu.js +1 -1
- package/Message.js +1 -1
- package/Modal.js +1 -1
- package/Notice.js +1 -1
- package/Notification.js +5 -5
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Pagination.js +1 -1
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/Select.js +1 -1
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +1 -1
- package/SpeechSynthesis.js +1 -1
- package/Spin.js +1 -1
- package/Statistic.js +2 -2
- package/Steps.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Transfer.js +2 -2
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +1 -1
- package/Typography.js +1 -1
- package/affix/index.js +60 -57
- package/alert/index.js +53 -53
- package/anchor/Anchor.js +72 -72
- package/anchor/Link.js +27 -27
- package/anchor/util.js +1 -1
- package/auto-complete/index.js +2 -2
- package/avatar/Avatar.js +31 -31
- package/avatar/Group.js +25 -25
- package/back-top/index.js +30 -30
- package/badge/index.js +37 -37
- package/breadcrumb/index.js +26 -26
- package/button/Group.js +7 -7
- package/button/index.js +29 -29
- package/calendar/index.js +2 -2
- package/card/Grid.js +12 -12
- package/card/Meta.js +17 -17
- package/card/index.js +44 -44
- package/carousel/Arrow.js +19 -19
- package/carousel/Indicator.js +25 -25
- package/carousel/index.js +77 -77
- package/cascader/Cascader.js +2 -2
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/{yLRv5RIK.js → CQI1gsQs.js} +181 -181
- package/chunk/CmMehQON.js +1464 -0
- package/chunk/Cplu5dtQ.js +730 -0
- package/chunk/{C5X4hOkx.js → D0338Pbq.js} +80 -80
- package/chunk/{DYspELhF.js → DXDbeIai.js} +223 -223
- package/chunk/{DEiyXzBZ.js → DfrB26fI.js} +63 -63
- package/chunk/{BG7YGUsx.js → dKvAiKxr.js} +119 -119
- package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
- package/chunk/{DLBfXSnU.js → w221i0nK.js} +2872 -2871
- package/collapse/Collapse.js +2 -2
- package/collapse/Item.js +2 -2
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +36 -36
- package/color-picker/InputAlpha.js +11 -11
- package/color-picker/InputHex.js +24 -24
- package/color-picker/InputRgb.js +23 -23
- package/color-picker/Palette.js +18 -18
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +2 -2
- package/comment/index.js +31 -31
- package/config-provider/ConfigProvider.js +5 -4
- package/config-provider/context.js +2 -2
- package/config-provider/index.js +4 -3
- package/copy/index.js +28 -28
- package/date-picker/Picker.js +276 -276
- package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
- package/date-picker/index.js +26 -27
- package/descriptions/index.js +33 -33
- package/divider/index.js +12 -12
- package/draggable/index.js +23 -23
- package/drawer/Drawer.js +81 -81
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +56 -56
- package/empty/index.js +1 -1
- package/form/Form.js +76 -76
- package/form/FormItem.js +64 -64
- package/grid/Col.js +53 -53
- package/grid/Row.js +34 -34
- package/grid/grid-item.js +29 -29
- package/grid/grid.js +50 -50
- package/icon/index.js +20 -19
- package/icon-hover/index.js +1 -1
- package/image/Image.js +86 -86
- package/image/ImagePreview.js +2 -2
- package/image/ImagePreviewArrow.js +22 -22
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +410 -408
- package/input/Group.js +8 -8
- package/input/Input.js +322 -322
- package/input/InputElement.js +1 -1
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +1 -1
- package/input-number/index.js +1 -1
- package/input-tag/InputTag.js +40 -40
- package/layout/Content.js +7 -7
- package/layout/Footer.js +9 -9
- package/layout/Header.js +7 -7
- package/layout/Sider.js +55 -55
- package/layout/index.js +32 -32
- package/link/index.js +35 -35
- package/list/Item.js +29 -29
- package/list/Meta.js +12 -12
- package/list/index.js +2 -2
- package/mentions/index.js +2 -2
- package/menu/Menu.js +2 -2
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +1 -1
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +2 -2
- package/modal/index.js +1 -1
- package/notice/index.js +1 -1
- package/notification/index.js +5 -5
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +12 -12
- package/overflow-ellipsis/index.js +24 -24
- package/package.json +1 -1
- package/page-header/index.js +38 -38
- package/pagination/PageItem.js +16 -16
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +2 -2
- package/pagination/Pagination.js +2 -2
- package/pagination/index.js +1 -1
- package/picker/Input.js +69 -69
- package/picker/InputRange.js +111 -111
- package/popconfirm/index.js +61 -61
- package/popover/index.js +35 -35
- package/progress/index.js +22 -22
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +49 -49
- package/resize-box/ResizeTrigger.js +34 -34
- package/resize-box/Split.js +56 -56
- package/resize-box/SplitGroup.js +55 -55
- package/resize-box/index.js +51 -51
- package/result/index.js +41 -41
- package/select/Option.js +1 -1
- package/select/Select.js +2 -2
- package/select/index.js +2 -2
- package/select/util.js +1 -1
- package/select-view/Core.js +125 -125
- package/skeleton/index.js +20 -20
- package/slider/Button.js +57 -57
- package/slider/index.js +116 -116
- package/space/index.js +46 -44
- package/speech-synthesis/index.js +1 -1
- package/spin/DotLoading.js +10 -10
- package/spin/index.js +44 -44
- package/statistic/Countdown.js +34 -34
- package/statistic/index.js +67 -67
- package/steps/index.js +55 -55
- package/style.css +1 -1
- package/switch/index.js +54 -54
- package/table/Table.js +3 -3
- package/table/index.js +1 -1
- package/tabs/Tab.js +2 -2
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +12 -12
- package/tabs/index.js +2 -2
- package/tag/index.js +45 -45
- package/time-picker/Picker.js +76 -76
- package/time-picker/TimePicker.js +136 -136
- package/time-picker/index.js +8 -8
- package/time-picker/util.js +5 -5
- package/timeline/Item.js +47 -47
- package/timeline/Timeline.js +41 -41
- package/tooltip/index.js +29 -29
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +2 -2
- package/tree/Animation.js +2 -2
- package/tree/Node.js +2 -2
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/List.js +1 -1
- package/tree-select/Select.js +2 -2
- package/tree-select/index.js +2 -2
- package/trigger/index.js +60 -60
- package/types/config-provider/ConfigProvider.d.ts +2 -2
- package/types/config-provider/context.d.ts +1 -1
- package/types/date-picker/index.d.ts +8 -9
- package/types/date-picker/interface.d.ts +9 -9
- package/types/index.d.ts +1 -1
- package/types/picker/Input.d.ts +2 -2
- package/types/space/index.d.ts +2 -1
- package/types/utils/names.d.ts +1 -1
- package/typography/Base.js +53 -53
- package/typography/Ellipsis.js +9 -8
- package/typography/Operations.js +28 -28
- package/typography/Paragraph.js +8 -8
- package/typography/Typography.js +7 -7
- package/typography/index.js +1 -1
- package/upload/TriggerNode.js +47 -47
- package/upload/Upload.js +184 -184
- package/utils/contextHolder.js +3 -3
- package/utils/index.js +13 -13
- package/utils/names.js +1 -1
- package/utils/setPrimaryColor.js +18 -13
- package/utils/tween.js +1 -1
- package/verification-code/VerificationCode.js +49 -49
- package/version/index.js +1 -1
- package/watermark/Watermark.js +24 -24
- package/chunk/CQvM33Vg.js +0 -724
- package/chunk/yhU2zeeu.js +0 -1461
- /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
package/time-picker/Picker.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
2
|
import De from "@unicom-cloud/icons/IconUiClockCircle";
|
|
3
3
|
import { isDayjs as Se } from "dayjs";
|
|
4
4
|
import l from "lodash/isArray";
|
|
5
5
|
import Te, { useContext as je, useState as I, useRef as we } from "react";
|
|
6
|
-
import { a as Ae } from "../chunk/
|
|
6
|
+
import { a as Ae } from "../chunk/Cplu5dtQ.js";
|
|
7
7
|
import { u as Ee } from "../chunk/BFTV6myl.js";
|
|
8
|
-
import { u as
|
|
8
|
+
import { u as Z } from "../chunk/VSe_Wq1g.js";
|
|
9
9
|
import { u as He } from "../chunk/a3hR6zLw.js";
|
|
10
10
|
import Ne from "../picker/Input.js";
|
|
11
11
|
import ze from "../picker/InputRange.js";
|
|
12
12
|
import Oe from "../trigger/index.js";
|
|
13
13
|
import Fe from "@unicom-cloud/utils/class-name";
|
|
14
|
-
import { g as S, j as f, k as
|
|
14
|
+
import { g as S, j as f, k as _, h as O, b as Re, i as Ue, f as $e } from "../chunk/tamGhTJp.js";
|
|
15
15
|
import { a as Le } from "../chunk/ClqoGc3r.js";
|
|
16
16
|
import Me from "./context.js";
|
|
17
17
|
import { getFormatTime as qe } from "./util.js";
|
|
18
18
|
function Be(T) {
|
|
19
19
|
return T.format || "HH:mm:ss";
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const ee = {
|
|
22
22
|
allowClear: !0,
|
|
23
23
|
position: "bl",
|
|
24
24
|
format: "HH:mm:ss",
|
|
@@ -26,68 +26,68 @@ const _ = {
|
|
|
26
26
|
order: !0,
|
|
27
27
|
scrollSticky: !0
|
|
28
28
|
}, Ge = { bottom: 4 }, lo = (T) => {
|
|
29
|
-
var
|
|
30
|
-
const { locale: p, getPrefixCls:
|
|
31
|
-
oe && (
|
|
29
|
+
var Q, W;
|
|
30
|
+
const { locale: p, getPrefixCls: j, componentConfig: w, rtl: oe } = je(Ae);
|
|
31
|
+
oe && (ee.position = "br");
|
|
32
32
|
const t = Ee(
|
|
33
33
|
T,
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
ee,
|
|
35
|
+
w == null ? void 0 : w.TimePicker
|
|
36
36
|
), {
|
|
37
37
|
allowClear: te = !0,
|
|
38
|
-
className:
|
|
38
|
+
className: F,
|
|
39
39
|
disableConfirm: ie,
|
|
40
|
-
style:
|
|
41
|
-
placeholder:
|
|
40
|
+
style: R,
|
|
41
|
+
placeholder: A,
|
|
42
42
|
getPopupContainer: re,
|
|
43
|
-
disabled:
|
|
43
|
+
disabled: U,
|
|
44
44
|
position: ne,
|
|
45
45
|
isRangePicker: m,
|
|
46
46
|
picker: se,
|
|
47
47
|
error: ae,
|
|
48
48
|
status: ue,
|
|
49
|
-
triggerElement:
|
|
49
|
+
triggerElement: $,
|
|
50
50
|
triggerProps: le,
|
|
51
51
|
value: ce,
|
|
52
52
|
onChange: u,
|
|
53
|
-
icons:
|
|
53
|
+
icons: L,
|
|
54
54
|
size: fe,
|
|
55
55
|
editable: pe,
|
|
56
56
|
unmountOnExit: me,
|
|
57
57
|
order: de,
|
|
58
58
|
utcOffset: r,
|
|
59
59
|
timezone: n
|
|
60
|
-
} = t, s = Be(t), ge =
|
|
60
|
+
} = t, s = Be(t), ge = j == null ? void 0 : j("timepicker");
|
|
61
61
|
function Ve() {
|
|
62
62
|
let e;
|
|
63
63
|
return t.value ? e = S(t.value, s, r, n) : t.defaultValue && (e = S(t.defaultValue, s, r, n)), e;
|
|
64
64
|
}
|
|
65
|
-
const [
|
|
65
|
+
const [M, q] = I(!1), [d, B] = I(Ve()), [i, P] = I(), [v, g] = I(), [y, he] = I(0), c = "value" in t ? S(ce, s, r, n) : d, E = "popupVisible" in t ? t.popupVisible : M, b = Z(r), x = Z(n);
|
|
66
66
|
He(() => {
|
|
67
|
-
if (d && (
|
|
68
|
-
const e = l(d) ? d.map((a) => f(a,
|
|
69
|
-
|
|
67
|
+
if (d && (b !== r || n !== x)) {
|
|
68
|
+
const e = l(d) ? d.map((a) => f(a, b, x)) : f(d, b, x), o = l(e) ? e.map((a) => _(a, r, n)) : _(e, r, n);
|
|
69
|
+
B(o);
|
|
70
70
|
}
|
|
71
|
-
}, [r,
|
|
72
|
-
const
|
|
73
|
-
function
|
|
71
|
+
}, [r, b, n, x]);
|
|
72
|
+
const H = we(null);
|
|
73
|
+
function N(e) {
|
|
74
74
|
var o, a;
|
|
75
|
-
(a = (o =
|
|
75
|
+
(a = (o = H.current) == null ? void 0 : o.focus) == null || a.call(o, e);
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
|
|
77
|
+
function z(e) {
|
|
78
|
+
he(e), setTimeout(() => N(e));
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function Pe(e) {
|
|
81
81
|
e ? C(e, () => {
|
|
82
|
-
setTimeout(() =>
|
|
82
|
+
setTimeout(() => N());
|
|
83
83
|
}) : C(!1);
|
|
84
84
|
}
|
|
85
85
|
function C(e, o) {
|
|
86
|
-
|
|
86
|
+
q(e), g(void 0), o == null || o(), e || P(void 0);
|
|
87
87
|
}
|
|
88
88
|
function k(e) {
|
|
89
89
|
const o = m && de && l(e) ? Re(e.map((a) => qe(a))) : e;
|
|
90
|
-
|
|
90
|
+
B(o), P(void 0), g(void 0), ve(o), ie || C(!1);
|
|
91
91
|
}
|
|
92
92
|
function ve(e) {
|
|
93
93
|
l(e) && Ue(c, e) && (u == null || u(
|
|
@@ -98,117 +98,117 @@ const _ = {
|
|
|
98
98
|
f(e, r, n)
|
|
99
99
|
));
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function G(e) {
|
|
102
102
|
const o = m ? l(i) && i.length ? i : c : i || c;
|
|
103
|
-
return /* @__PURE__ */
|
|
103
|
+
return /* @__PURE__ */ h(
|
|
104
104
|
"div",
|
|
105
105
|
{
|
|
106
|
-
className: Fe(`${ge}-container`, e ?
|
|
107
|
-
style: e ?
|
|
108
|
-
onClick: () =>
|
|
106
|
+
className: Fe(`${ge}-container`, e ? F : ""),
|
|
107
|
+
style: e ? R : {},
|
|
108
|
+
onClick: () => N(),
|
|
109
109
|
children: Te.cloneElement(se, {
|
|
110
110
|
...t,
|
|
111
111
|
format: s,
|
|
112
112
|
inputValue: v,
|
|
113
113
|
setInputValue: g,
|
|
114
114
|
onConfirmValue: k,
|
|
115
|
-
setValueShow:
|
|
115
|
+
setValueShow: P,
|
|
116
116
|
valueShow: o,
|
|
117
117
|
value: c,
|
|
118
|
-
popupVisible:
|
|
119
|
-
focusedInputIndex:
|
|
120
|
-
changeFocusedInputIndex:
|
|
118
|
+
popupVisible: E,
|
|
119
|
+
focusedInputIndex: y,
|
|
120
|
+
changeFocusedInputIndex: z
|
|
121
121
|
})
|
|
122
122
|
}
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function J(e) {
|
|
126
126
|
const o = e.target.value;
|
|
127
|
-
|
|
127
|
+
M || q(!0), g(o), Ce(o);
|
|
128
128
|
}
|
|
129
129
|
function Ce(e) {
|
|
130
|
-
var a,
|
|
130
|
+
var a, X;
|
|
131
131
|
const o = S(e, s);
|
|
132
132
|
if (m) {
|
|
133
133
|
const V = [
|
|
134
134
|
...l(i) ? i : d || []
|
|
135
135
|
];
|
|
136
|
-
if (
|
|
137
|
-
V[
|
|
138
|
-
const
|
|
136
|
+
if (O(e, s)) {
|
|
137
|
+
V[y] = o;
|
|
138
|
+
const Y = V.map(
|
|
139
139
|
(D) => f(D, r, n)
|
|
140
140
|
);
|
|
141
141
|
(a = t.onSelect) == null || a.call(
|
|
142
142
|
t,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
),
|
|
143
|
+
Y.map((D) => D && D.format(s)),
|
|
144
|
+
Y
|
|
145
|
+
), P(V), g(void 0);
|
|
146
146
|
}
|
|
147
|
-
} else if (
|
|
147
|
+
} else if (O(e, s)) {
|
|
148
148
|
const V = f(o, r, n);
|
|
149
|
-
(
|
|
149
|
+
(X = t.onSelect) == null || X.call(t, V.format(s), V), P(o), g(void 0);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
function Ie() {
|
|
153
|
-
m ? l(i) && i.length ? v && !
|
|
153
|
+
m ? l(i) && i.length ? v && !O(v, s) ? C(!1) : i[0] === void 0 || i[1] === void 0 ? z(y === 0 ? 1 : 0) : i.length === 2 && k(i) : C(!1) : k(i || c);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function ye(e) {
|
|
156
156
|
var o;
|
|
157
157
|
e.stopPropagation(), k(void 0), u == null || u(void 0, void 0), (o = t.onClear) == null || o.call(t);
|
|
158
158
|
}
|
|
159
|
-
const
|
|
160
|
-
style:
|
|
161
|
-
className:
|
|
162
|
-
popupVisible:
|
|
159
|
+
const be = m && l(A) ? A : (Q = p == null ? void 0 : p.TimePicker) == null ? void 0 : Q.placeholders, xe = A || ((W = p == null ? void 0 : p.TimePicker) == null ? void 0 : W.placeholder), ke = L && L.inputSuffix || /* @__PURE__ */ h(De, {}), K = {
|
|
160
|
+
style: R,
|
|
161
|
+
className: F,
|
|
162
|
+
popupVisible: E,
|
|
163
163
|
format: s,
|
|
164
|
-
disabled:
|
|
164
|
+
disabled: U,
|
|
165
165
|
error: ae,
|
|
166
166
|
status: ue,
|
|
167
167
|
size: fe,
|
|
168
168
|
onPressEnter: Ie,
|
|
169
|
-
onClear:
|
|
169
|
+
onClear: ye,
|
|
170
170
|
suffixIcon: ke,
|
|
171
171
|
editable: pe,
|
|
172
172
|
allowClear: te,
|
|
173
173
|
prefix: t.prefix,
|
|
174
174
|
...Le(t)
|
|
175
175
|
};
|
|
176
|
-
return /* @__PURE__ */
|
|
176
|
+
return /* @__PURE__ */ h(Me.Provider, { value: { utcOffset: r, timezone: n }, children: $ === null ? G(!0) : /* @__PURE__ */ h(
|
|
177
177
|
Oe,
|
|
178
178
|
{
|
|
179
|
-
popup: () =>
|
|
179
|
+
popup: () => G(),
|
|
180
180
|
trigger: "click",
|
|
181
181
|
clickToClose: !1,
|
|
182
182
|
position: ne,
|
|
183
|
-
disabled:
|
|
183
|
+
disabled: U,
|
|
184
184
|
popupAlign: Ge,
|
|
185
185
|
getPopupContainer: re,
|
|
186
|
-
onVisibleChange:
|
|
187
|
-
popupVisible:
|
|
186
|
+
onVisibleChange: Pe,
|
|
187
|
+
popupVisible: E,
|
|
188
188
|
classNames: "slideDynamicOrigin",
|
|
189
189
|
unmountOnExit: !!me,
|
|
190
190
|
...le,
|
|
191
|
-
children:
|
|
191
|
+
children: $ || (m ? /* @__PURE__ */ h(
|
|
192
192
|
ze,
|
|
193
193
|
{
|
|
194
|
-
...
|
|
195
|
-
ref:
|
|
196
|
-
placeholder:
|
|
194
|
+
...K,
|
|
195
|
+
ref: H,
|
|
196
|
+
placeholder: be,
|
|
197
197
|
value: l(i) && i.length ? i : c,
|
|
198
|
-
onChange:
|
|
198
|
+
onChange: J,
|
|
199
199
|
inputValue: v,
|
|
200
|
-
changeFocusedInputIndex:
|
|
201
|
-
focusedInputIndex:
|
|
200
|
+
changeFocusedInputIndex: z,
|
|
201
|
+
focusedInputIndex: y
|
|
202
202
|
}
|
|
203
|
-
) : /* @__PURE__ */
|
|
203
|
+
) : /* @__PURE__ */ h(
|
|
204
204
|
Ne,
|
|
205
205
|
{
|
|
206
|
-
...
|
|
207
|
-
ref:
|
|
208
|
-
placeholder:
|
|
206
|
+
...K,
|
|
207
|
+
ref: H,
|
|
208
|
+
placeholder: xe,
|
|
209
209
|
value: i || c,
|
|
210
210
|
inputValue: v,
|
|
211
|
-
onChange:
|
|
211
|
+
onChange: J
|
|
212
212
|
}
|
|
213
213
|
))
|
|
214
214
|
}
|
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import
|
|
4
|
-
import { a as
|
|
5
|
-
import
|
|
6
|
-
import { g as
|
|
1
|
+
import { jsxs as G, Fragment as hn, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as W, useCallback as X } from "react";
|
|
3
|
+
import Y from "../button/index.js";
|
|
4
|
+
import { a as xn } from "../chunk/Cplu5dtQ.js";
|
|
5
|
+
import $n from "@unicom-cloud/utils/class-name";
|
|
6
|
+
import { g as On, a as Z, d as $, j as V } from "../chunk/tamGhTJp.js";
|
|
7
7
|
import { padStart as d } from "../utils/pad.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { getColumnsFromFormat as
|
|
11
|
-
const
|
|
12
|
-
function
|
|
13
|
-
return
|
|
8
|
+
import D from "./TimeColumn.js";
|
|
9
|
+
import vn from "./context.js";
|
|
10
|
+
import { getColumnsFromFormat as z } from "./util.js";
|
|
11
|
+
const bn = ["am", "pm"];
|
|
12
|
+
function Cn(S) {
|
|
13
|
+
return S.use12Hours ?? z(S.format).use12Hours;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Tn(S) {
|
|
16
16
|
const {
|
|
17
17
|
format: O = "HH:mm:ss",
|
|
18
|
-
onSelect:
|
|
19
|
-
popupVisible:
|
|
20
|
-
step:
|
|
18
|
+
onSelect: v,
|
|
19
|
+
popupVisible: nn,
|
|
20
|
+
step: b = {},
|
|
21
21
|
disabledHours: p,
|
|
22
22
|
disabledMinutes: c,
|
|
23
23
|
disabledSeconds: r,
|
|
24
|
-
hideDisabledOptions:
|
|
25
|
-
onConfirmValue:
|
|
26
|
-
isRangePicker:
|
|
27
|
-
confirmBtnDisabled:
|
|
28
|
-
valueShow:
|
|
29
|
-
setValueShow:
|
|
30
|
-
extra:
|
|
31
|
-
disableConfirm:
|
|
32
|
-
hideFooter:
|
|
33
|
-
showNowBtn:
|
|
34
|
-
scrollSticky:
|
|
35
|
-
} =
|
|
36
|
-
(
|
|
37
|
-
const o =
|
|
38
|
-
if (
|
|
39
|
-
for (let i = 0; i < (
|
|
24
|
+
hideDisabledOptions: B,
|
|
25
|
+
onConfirmValue: k,
|
|
26
|
+
isRangePicker: T,
|
|
27
|
+
confirmBtnDisabled: en,
|
|
28
|
+
valueShow: on,
|
|
29
|
+
setValueShow: C,
|
|
30
|
+
extra: J,
|
|
31
|
+
disableConfirm: N,
|
|
32
|
+
hideFooter: tn,
|
|
33
|
+
showNowBtn: K = !0,
|
|
34
|
+
scrollSticky: sn
|
|
35
|
+
} = S, { getPrefixCls: E, locale: H } = W(xn), A = E == null ? void 0 : E("timepicker"), { utcOffset: L, timezone: R } = W(vn), f = On(on, O), g = f && f.hour() >= 12 ? "pm" : "am", a = Cn(S), _ = X(
|
|
36
|
+
(e) => {
|
|
37
|
+
const o = b.hour || 1, n = b.minute || 1, M = b.second || 1, s = [];
|
|
38
|
+
if (e === "hour") {
|
|
39
|
+
for (let i = 0; i < (a ? 12 : 24); i += o)
|
|
40
40
|
s.push(i);
|
|
41
|
-
|
|
41
|
+
a && (s[0] = 12);
|
|
42
42
|
}
|
|
43
|
-
if (
|
|
44
|
-
for (let i = 0; i < 60; i +=
|
|
43
|
+
if (e === "minute")
|
|
44
|
+
for (let i = 0; i < 60; i += n)
|
|
45
45
|
s.push(i);
|
|
46
|
-
if (
|
|
47
|
-
for (let i = 0; i < 60; i +=
|
|
46
|
+
if (e === "second")
|
|
47
|
+
for (let i = 0; i < 60; i += M)
|
|
48
48
|
s.push(i);
|
|
49
49
|
return s;
|
|
50
50
|
},
|
|
51
|
-
[
|
|
52
|
-
),
|
|
51
|
+
[b.hour, b.minute, b.second, a]
|
|
52
|
+
), U = _("hour"), y = _("minute"), h = _("second");
|
|
53
53
|
let t = f && f.hour();
|
|
54
|
-
t =
|
|
55
|
-
const
|
|
56
|
-
(
|
|
57
|
-
switch (
|
|
54
|
+
t = a && t > 12 ? t - 12 : t, a && t === 0 && g === "am" && (t += 12);
|
|
55
|
+
const w = f && f.minute(), Q = f && f.second(), I = X(
|
|
56
|
+
(e) => {
|
|
57
|
+
switch (e) {
|
|
58
58
|
case "hour":
|
|
59
59
|
return typeof p == "function" ? d(
|
|
60
|
-
|
|
60
|
+
U.find((o) => p().indexOf(o) === -1) || 0,
|
|
61
61
|
2,
|
|
62
62
|
"0"
|
|
63
|
-
) : d(
|
|
63
|
+
) : d(U[0], 2, "0");
|
|
64
64
|
case "minute":
|
|
65
65
|
return typeof c == "function" ? d(
|
|
66
|
-
|
|
66
|
+
y.find(
|
|
67
67
|
(o) => c(t).indexOf(o) === -1
|
|
68
68
|
) || 0,
|
|
69
69
|
2,
|
|
70
70
|
"0"
|
|
71
|
-
) : d(
|
|
71
|
+
) : d(y[0], 2, "0");
|
|
72
72
|
case "second":
|
|
73
73
|
return typeof r == "function" ? d(
|
|
74
74
|
h.find(
|
|
75
|
-
(o) => r(t,
|
|
75
|
+
(o) => r(t, w).indexOf(o) === -1
|
|
76
76
|
) || 0,
|
|
77
77
|
2,
|
|
78
78
|
"0"
|
|
@@ -82,159 +82,159 @@ function Me(w) {
|
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
[
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
U,
|
|
86
|
+
y,
|
|
87
87
|
h,
|
|
88
88
|
p,
|
|
89
89
|
c,
|
|
90
90
|
r,
|
|
91
91
|
t,
|
|
92
|
-
|
|
92
|
+
w
|
|
93
93
|
]
|
|
94
94
|
);
|
|
95
|
-
function
|
|
96
|
-
const
|
|
97
|
-
`${
|
|
95
|
+
function rn(e, o) {
|
|
96
|
+
const n = z(O).list.indexOf("A") !== -1, M = f || $(
|
|
97
|
+
`${I("hour")}:${I("minute")}:${I(
|
|
98
98
|
"second"
|
|
99
99
|
)}`,
|
|
100
100
|
"HH:mm:ss"
|
|
101
101
|
);
|
|
102
|
-
let s =
|
|
103
|
-
const
|
|
102
|
+
let s = M.hour(), i = M.minute(), x = M.second();
|
|
103
|
+
const q = n ? g.toUpperCase() : g;
|
|
104
104
|
let m = "HH:mm:ss", u;
|
|
105
|
-
|
|
106
|
-
(
|
|
107
|
-
) ?? 0), typeof r == "function" && r(
|
|
108
|
-
(
|
|
105
|
+
a && (n ? m = `${m} A` : m = `${m} a`), a && (s = s > 12 ? s - 12 : s), o === "hour" && (typeof c == "function" && c(e).includes(i) && (i = y.find(
|
|
106
|
+
(P) => c(e).indexOf(P) === -1
|
|
107
|
+
) ?? 0), typeof r == "function" && r(e, i).includes(x) && (x = h.find(
|
|
108
|
+
(P) => r(e, i).indexOf(P) === -1
|
|
109
109
|
) ?? 0), u = $(
|
|
110
|
-
`${
|
|
110
|
+
`${e}:${i}:${x} ${q}`,
|
|
111
111
|
m,
|
|
112
112
|
"en"
|
|
113
|
-
)), o === "minute" && (typeof r == "function" && r(s,
|
|
114
|
-
(
|
|
113
|
+
)), o === "minute" && (typeof r == "function" && r(s, e).includes(x) && (x = h.find(
|
|
114
|
+
(P) => r(s, e).indexOf(P) === -1
|
|
115
115
|
) ?? 0), u = $(
|
|
116
|
-
`${s}:${
|
|
116
|
+
`${s}:${e}:${x} ${q}`,
|
|
117
117
|
m,
|
|
118
118
|
"en"
|
|
119
119
|
)), o === "second" && (u = $(
|
|
120
|
-
`${s}:${i}:${
|
|
120
|
+
`${s}:${i}:${e} ${q}`,
|
|
121
121
|
m,
|
|
122
122
|
"en"
|
|
123
123
|
)), o === "ampm" && (u = $(
|
|
124
|
-
`${s}:${i}:${x} ${
|
|
124
|
+
`${s}:${i}:${x} ${n ? e.toUpperCase() : e}`,
|
|
125
125
|
m,
|
|
126
126
|
"en"
|
|
127
|
-
)), u = $(u, m).locale($.locale()),
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
),
|
|
127
|
+
)), u = $(u, m).locale($.locale()), v == null || v(
|
|
128
|
+
V(u, L, R).format(O),
|
|
129
|
+
V(u, L, R)
|
|
130
|
+
), T || (C == null || C(u), N && k(u));
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
f &&
|
|
132
|
+
function fn() {
|
|
133
|
+
f && k(f);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
const
|
|
137
|
-
|
|
135
|
+
function cn() {
|
|
136
|
+
const e = Z(), o = Z(L, R);
|
|
137
|
+
v == null || v(e.format(O), e), N ? k == null || k(o) : C == null || C(o);
|
|
138
138
|
}
|
|
139
|
-
const
|
|
140
|
-
prefixCls:
|
|
141
|
-
onHandleSelect:
|
|
142
|
-
popupVisible:
|
|
143
|
-
scrollSticky:
|
|
139
|
+
const F = {
|
|
140
|
+
prefixCls: A,
|
|
141
|
+
onHandleSelect: rn,
|
|
142
|
+
popupVisible: nn,
|
|
143
|
+
scrollSticky: sn
|
|
144
144
|
};
|
|
145
|
-
function
|
|
146
|
-
const o = (
|
|
147
|
-
label: d(`${
|
|
148
|
-
value:
|
|
149
|
-
selected: t !== void 0 && t ===
|
|
150
|
-
disabled: typeof p == "function" && p().indexOf(
|
|
145
|
+
function un() {
|
|
146
|
+
const o = (B && typeof p == "function" ? U.filter((n) => p().indexOf(n) === -1) : U).map((n) => ({
|
|
147
|
+
label: d(`${n}`, 2, "0"),
|
|
148
|
+
value: n,
|
|
149
|
+
selected: t !== void 0 && t === n,
|
|
150
|
+
disabled: typeof p == "function" && p().indexOf(n) !== -1
|
|
151
151
|
}));
|
|
152
|
-
return /* @__PURE__ */
|
|
153
|
-
|
|
152
|
+
return /* @__PURE__ */ l(
|
|
153
|
+
D,
|
|
154
154
|
{
|
|
155
|
-
...
|
|
155
|
+
...F,
|
|
156
156
|
list: o,
|
|
157
157
|
value: t,
|
|
158
158
|
unit: "hour"
|
|
159
159
|
}
|
|
160
160
|
);
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
const o = (
|
|
164
|
-
label: d(`${
|
|
165
|
-
value:
|
|
166
|
-
selected: t !== void 0 &&
|
|
167
|
-
disabled: typeof c == "function" && c(t).indexOf(
|
|
162
|
+
function mn() {
|
|
163
|
+
const o = (B && typeof c == "function" ? y.filter((n) => c(t).indexOf(n) === -1) : y).map((n) => ({
|
|
164
|
+
label: d(`${n}`, 2, "0"),
|
|
165
|
+
value: n,
|
|
166
|
+
selected: t !== void 0 && w === n,
|
|
167
|
+
disabled: typeof c == "function" && c(t).indexOf(n) !== -1
|
|
168
168
|
}));
|
|
169
|
-
return /* @__PURE__ */
|
|
170
|
-
|
|
169
|
+
return /* @__PURE__ */ l(
|
|
170
|
+
D,
|
|
171
171
|
{
|
|
172
|
-
...
|
|
172
|
+
...F,
|
|
173
173
|
list: o,
|
|
174
|
-
value:
|
|
174
|
+
value: w,
|
|
175
175
|
unit: "minute"
|
|
176
176
|
}
|
|
177
177
|
);
|
|
178
178
|
}
|
|
179
|
-
function
|
|
180
|
-
const o = (
|
|
181
|
-
(
|
|
182
|
-
) : h).map((
|
|
183
|
-
label: d(`${
|
|
184
|
-
value:
|
|
185
|
-
selected: t !== void 0 &&
|
|
186
|
-
disabled: typeof r == "function" && r(t,
|
|
179
|
+
function dn() {
|
|
180
|
+
const o = (B && typeof r == "function" ? h.filter(
|
|
181
|
+
(n) => r(t, w).indexOf(n) === -1
|
|
182
|
+
) : h).map((n) => ({
|
|
183
|
+
label: d(`${n}`, 2, "0"),
|
|
184
|
+
value: n,
|
|
185
|
+
selected: t !== void 0 && Q === n,
|
|
186
|
+
disabled: typeof r == "function" && r(t, w).indexOf(n) !== -1
|
|
187
187
|
}));
|
|
188
|
-
return /* @__PURE__ */
|
|
189
|
-
|
|
188
|
+
return /* @__PURE__ */ l(
|
|
189
|
+
D,
|
|
190
190
|
{
|
|
191
|
-
...
|
|
191
|
+
...F,
|
|
192
192
|
list: o,
|
|
193
|
-
value:
|
|
193
|
+
value: Q,
|
|
194
194
|
unit: "second"
|
|
195
195
|
}
|
|
196
196
|
);
|
|
197
197
|
}
|
|
198
|
-
function
|
|
199
|
-
const
|
|
200
|
-
label:
|
|
201
|
-
value:
|
|
202
|
-
selected:
|
|
198
|
+
function an() {
|
|
199
|
+
const e = z(O).list.indexOf("A") !== -1, o = bn.map((n) => ({
|
|
200
|
+
label: e ? n.toUpperCase() : n,
|
|
201
|
+
value: n,
|
|
202
|
+
selected: g === n
|
|
203
203
|
}));
|
|
204
|
-
return /* @__PURE__ */
|
|
205
|
-
|
|
204
|
+
return /* @__PURE__ */ l(
|
|
205
|
+
D,
|
|
206
206
|
{
|
|
207
|
-
...
|
|
207
|
+
...F,
|
|
208
208
|
list: o,
|
|
209
|
-
value:
|
|
209
|
+
value: g,
|
|
210
210
|
unit: "ampm"
|
|
211
211
|
}
|
|
212
212
|
);
|
|
213
213
|
}
|
|
214
|
-
const { list:
|
|
215
|
-
return /* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
-
(
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
214
|
+
const { list: j } = z(O), ln = $n(A), pn = tn || N && T || !T && N && !K;
|
|
215
|
+
return /* @__PURE__ */ G(hn, { children: [
|
|
216
|
+
/* @__PURE__ */ G("div", { className: ln, children: [
|
|
217
|
+
(j.indexOf("H") !== -1 || j.indexOf("h") !== -1) && un(),
|
|
218
|
+
j.indexOf("m") !== -1 && mn(),
|
|
219
|
+
j.indexOf("s") !== -1 && dn(),
|
|
220
|
+
a && an()
|
|
221
221
|
] }),
|
|
222
|
-
|
|
223
|
-
!
|
|
224
|
-
!
|
|
225
|
-
!
|
|
226
|
-
|
|
222
|
+
J && /* @__PURE__ */ l("div", { className: `${A}-footer-extra-wrapper`, children: J }),
|
|
223
|
+
!pn && /* @__PURE__ */ G("div", { className: `${A}-footer-btn-wrapper`, children: [
|
|
224
|
+
!T && K ? /* @__PURE__ */ l(Y, { size: "mini", onClick: cn, children: H == null ? void 0 : H.TimePicker.now }) : /* @__PURE__ */ l("div", {}),
|
|
225
|
+
!N && /* @__PURE__ */ l(
|
|
226
|
+
Y,
|
|
227
227
|
{
|
|
228
228
|
type: "primary",
|
|
229
229
|
size: "mini",
|
|
230
|
-
onClick:
|
|
231
|
-
disabled:
|
|
232
|
-
children:
|
|
230
|
+
onClick: fn,
|
|
231
|
+
disabled: en || !f,
|
|
232
|
+
children: H == null ? void 0 : H.TimePicker.ok
|
|
233
233
|
}
|
|
234
234
|
)
|
|
235
235
|
] })
|
|
236
236
|
] });
|
|
237
237
|
}
|
|
238
238
|
export {
|
|
239
|
-
|
|
239
|
+
Tn as default
|
|
240
240
|
};
|