@unicom-cloud/ui 0.8.52 → 0.8.53
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 +41 -40
- package/Alert.js +2 -2
- package/Anchor.js +1 -1
- package/AutoComplete.js +3 -3
- package/Avatar.js +1 -1
- package/BackTop.js +2 -2
- package/Badge.js +2 -2
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +3 -3
- 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 +3 -3
- package/Comment.js +1 -1
- package/ConfigProvider.js +2 -2
- package/Copy.js +1 -1
- package/DatePicker.js +1268 -1233
- package/Descriptions.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Drawer.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Form.js +122 -117
- package/Grid.js +86 -83
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/Input.js +1 -1
- package/InputNumber.js +2 -2
- package/InputTag.js +1 -1
- package/Layout.js +2 -2
- package/Link.js +1 -1
- package/List.js +3 -3
- package/Mentions.js +3 -3
- package/Menu.js +1 -1
- package/Message.js +2 -2
- package/Modal.js +1 -1
- package/Notice.js +1 -1
- package/Notification.js +2 -2
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/Radio.js +2 -2
- package/Rate.js +1 -1
- package/ResizeBox.js +33 -32
- package/Result.js +1 -1
- package/Select.js +1 -1
- package/SelectView.js +142 -141
- package/Skeleton.js +1 -1
- package/Slider.js +2 -2
- package/Space.js +1 -1
- package/Spin.js +1 -1
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/Switch.js +15 -14
- package/Table.js +141 -133
- package/Tabs.js +1 -1
- package/Tag.js +111 -82
- package/TimePicker.js +3 -3
- package/Timeline.js +1 -1
- package/Tooltip.js +1 -1
- package/Transfer.js +3 -3
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +31 -30
- package/Typography.js +25 -25
- package/Upload.js +1 -1
- package/VerificationCode.js +1 -1
- package/Version.js +1 -1
- package/Watermark.js +1 -1
- package/chunk/{CoevJNNj.js → -sV-N67P.js} +1 -1
- package/chunk/{CkIWpIl6.js → 8hWViek4.js} +1 -1
- package/chunk/{Ct7mcZuW.js → B8IzaBdN.js} +1 -1
- package/chunk/{DCe3olyi.js → BEVtQ2QL.js} +101 -99
- package/chunk/{tkU8zIK4.js → BEiJmFHq.js} +1 -1
- package/chunk/{CQvJK4kb.js → BOUZ7hSf.js} +12 -12
- package/chunk/{DMeJAY1S.js → BYMRs7t5.js} +6 -5
- package/chunk/{DWGwYNvC.js → CBaVCRtG.js} +2 -2
- package/chunk/{5PpvDpEt.js → CLU6Le34.js} +2 -2
- package/chunk/{dhljdm11.js → COWsswcW.js} +64 -63
- package/chunk/{B9nYZhXo.js → CRxPui7e.js} +2 -2
- package/chunk/CYyPBcnp.js +970 -0
- package/chunk/{DfvdYCUz.js → CccPQyYX.js} +1 -1
- package/chunk/{DUX5Hw8l.js → CmEyvBdT.js} +3 -3
- package/chunk/{Cku5-xbe.js → Cwp65v9h.js} +47 -46
- package/chunk/{I0bfWb5y.js → CyVLxv_U.js} +95 -93
- package/chunk/{Cw63stMm.js → Cz65nXZD.js} +18 -18
- package/chunk/D3pUE3-b.js +445 -0
- package/chunk/{9AJ-uN8F.js → D6BMh1k4.js} +1 -1
- package/chunk/{BHWpeAbb.js → DGK45cuc.js} +1 -1
- package/chunk/{CfqAfcA3.js → DNyP-r9G.js} +2 -2
- package/chunk/DQ3uFRJD.js +892 -0
- package/chunk/{4XXtB4ZV.js → DY9WA4bf.js} +1 -1
- package/chunk/{DG5zSZDd.js → DdVbiC4t.js} +2 -2
- package/chunk/{n58kSv9T.js → DfMf16uZ.js} +11 -5
- package/chunk/{z7sBNzI4.js → Lyg-9NEt.js} +17 -17
- package/chunk/{BXZYc88i.js → PRN8SqRA.js} +3 -3
- package/chunk/bcn23eHi.js +277 -0
- package/index.js +408 -346
- package/package.json +1 -23
- package/style.css +1 -1
- package/types/color-picker/colors.d.ts +1 -1
- package/types/date-picker/Picker.d.ts +4 -3
- package/types/date-picker/PickerRange.d.ts +3 -7
- package/types/date-picker/interface.d.ts +9 -1
- package/types/grid/index.d.ts +2 -1
- package/types/index.d.ts +1 -0
- package/types/pagination/interface.d.ts +1 -0
- package/types/picker/InputRange.d.ts +1 -1
- package/types/select/Select.d.ts +1 -1
- package/types/tag/interface.d.ts +7 -3
- package/types/utils/CSSTransition.d.ts +2 -1
- package/types/utils/is.d.ts +4 -17
- package/types/version/index.d.ts +1 -1
- package/utils/CSSTransition.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/is.js +102 -104
- package/utils/reactDOM.js +19 -19
- package/chunk/C61BEbHK.js +0 -263
- package/chunk/DXMtLuTP.js +0 -443
- package/chunk/m3_n9fBe.js +0 -961
- package/chunk/uUGMUxt_.js +0 -474
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as $, jsxs as Q, Fragment as Te } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as j, useEffect as X, useCallback as V, createContext as Oe, useContext as se } from "react";
|
|
3
3
|
import ie from "../Button.js";
|
|
4
|
-
import { a as Ce } from "./
|
|
4
|
+
import { a as Ce } from "./Lyg-9NEt.js";
|
|
5
5
|
import ee from "@unicom-cloud/utils/class-name";
|
|
6
6
|
import { dayjs as g, methods as Y, getDayjsValue as He, getNow as re, toLocal as ce } from "../utils/dayjs.js";
|
|
7
7
|
import { padStart as O } from "../utils/pad.js";
|
|
@@ -5,7 +5,7 @@ import _ from "lodash/isNumber";
|
|
|
5
5
|
import ee from "lodash/isPlainObject";
|
|
6
6
|
import Ie from "lodash/isUndefined";
|
|
7
7
|
import xe, { useContext as re, useMemo as R, useRef as oe, useEffect as G } from "react";
|
|
8
|
-
import { a as Ve } from "./
|
|
8
|
+
import { a as Ve } from "./Lyg-9NEt.js";
|
|
9
9
|
import Le from "../hooks/useInView.js";
|
|
10
10
|
import ye from "../hooks/useKeyboardEvent.js";
|
|
11
11
|
import Ee from "../hooks/useMergeProps.js";
|
|
@@ -13,7 +13,7 @@ import Fe from "../hooks/useMergeValue.js";
|
|
|
13
13
|
import h from "@unicom-cloud/utils/class-name";
|
|
14
14
|
import Re from "../utils/omit.js";
|
|
15
15
|
import Ge from "@unicom-cloud/icons/IconUiMore";
|
|
16
|
-
import { T as Ue, P as ie, a as je, b as Me, u as Se } from "./
|
|
16
|
+
import { T as Ue, P as ie, a as je, b as Me, u as Se } from "./PRN8SqRA.js";
|
|
17
17
|
function te(v) {
|
|
18
18
|
const { title: w, description: $, actions: t } = v, a = w || $, l = t && t.length;
|
|
19
19
|
return [a || l, a, l];
|
|
@@ -10,17 +10,17 @@ import me from "lodash/isArray";
|
|
|
10
10
|
import I from "lodash/isEqualWith";
|
|
11
11
|
import $ from "lodash/isFunction";
|
|
12
12
|
import ee from "lodash/isUndefined";
|
|
13
|
-
import { a as q, I as xe } from "./
|
|
13
|
+
import { a as q, I as xe } from "./Lyg-9NEt.js";
|
|
14
14
|
import M from "@unicom-cloud/utils/class-name";
|
|
15
15
|
import { pickDataAttributes as Ne } from "../utils/pick.js";
|
|
16
16
|
import be from "@unicom-cloud/icons/IconUiCaretDown";
|
|
17
17
|
import De from "@unicom-cloud/icons/IconUiDragDotVertical";
|
|
18
18
|
import Ce from "@unicom-cloud/icons/IconUiFile";
|
|
19
19
|
import Pe from "@unicom-cloud/icons/IconUiLoading";
|
|
20
|
-
import { C as Ee } from "./
|
|
20
|
+
import { C as Ee } from "./B8IzaBdN.js";
|
|
21
21
|
import we from "../utils/throttleByRaf.js";
|
|
22
22
|
import Se from "lodash/isNumber";
|
|
23
|
-
import { P as _e } from "./
|
|
23
|
+
import { P as _e } from "./DQ3uFRJD.js";
|
|
24
24
|
import { V as ne } from "./CiEln_Q1.js";
|
|
25
25
|
import Le from "../utils/scrollIntoView.js";
|
|
26
26
|
const z = ye({});
|
|
@@ -256,7 +256,12 @@ function Ie(r, y) {
|
|
|
256
256
|
[`${h}-title-block`]: r.blockNode
|
|
257
257
|
}),
|
|
258
258
|
onClick: (f) => {
|
|
259
|
-
const {
|
|
259
|
+
const {
|
|
260
|
+
onSelect: u,
|
|
261
|
+
onSelect_: P,
|
|
262
|
+
// 潘启宝添加
|
|
263
|
+
actionOnClick: T
|
|
264
|
+
} = e;
|
|
260
265
|
if (!r.disabled) {
|
|
261
266
|
const v = [].concat(T);
|
|
262
267
|
N && v.indexOf("select") > -1 && (u == null || u(a, f)), P == null || P(r), v.indexOf("expand") > -1 && L(), K && v.indexOf("check") > -1 && G(!r.checked, f);
|
|
@@ -274,11 +279,12 @@ function Ie(r, y) {
|
|
|
274
279
|
onDragStart: (f) => {
|
|
275
280
|
var u;
|
|
276
281
|
if (k) {
|
|
277
|
-
f.stopPropagation(), i({ ...t, isDragging: !0 })
|
|
282
|
+
f.stopPropagation(), i({ ...t, isDragging: !0 });
|
|
278
283
|
try {
|
|
279
284
|
f.dataTransfer.setData("text/plain", "");
|
|
280
285
|
} catch {
|
|
281
286
|
}
|
|
287
|
+
(u = e.onNodeDragStart) == null || u.call(e, f, r);
|
|
282
288
|
}
|
|
283
289
|
},
|
|
284
290
|
onDragEnd: (f) => {
|
|
@@ -7,7 +7,7 @@ import he from "@unicom-cloud/utils/tinycolor";
|
|
|
7
7
|
import Ce from "lodash/isPlainObject";
|
|
8
8
|
import D, { forwardRef as Z, useContext as z, createContext as ge, useRef as G, useImperativeHandle as _, Component as xe, createRef as ve, useState as be, useEffect as L } from "react";
|
|
9
9
|
import ee from "../hooks/useMergeProps.js";
|
|
10
|
-
import {
|
|
10
|
+
import { b as te, P as re } from "./DQ3uFRJD.js";
|
|
11
11
|
import T from "lodash/isNumber";
|
|
12
12
|
import I from "lodash/isUndefined";
|
|
13
13
|
import ye from "@unicom-cloud/icons/IconUiCheckCircleFill";
|
|
@@ -89,7 +89,7 @@ function ke(d, m) {
|
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
91
|
const W = D.forwardRef(ke);
|
|
92
|
-
class
|
|
92
|
+
class U extends xe {
|
|
93
93
|
constructor(e) {
|
|
94
94
|
super(e);
|
|
95
95
|
f(this, "context");
|
|
@@ -190,7 +190,7 @@ class j extends xe {
|
|
|
190
190
|
o === "normal" && !n && (b = !1);
|
|
191
191
|
const q = { ...this.context };
|
|
192
192
|
if (x && (q.prefixCls = x), h === "message")
|
|
193
|
-
return y = a, /* @__PURE__ */ c(
|
|
193
|
+
return y = a, /* @__PURE__ */ c(j, { ...q, children: /* @__PURE__ */ c(
|
|
194
194
|
"div",
|
|
195
195
|
{
|
|
196
196
|
style: { textAlign: "center" },
|
|
@@ -220,7 +220,7 @@ class j extends xe {
|
|
|
220
220
|
}
|
|
221
221
|
) });
|
|
222
222
|
if (h === "notification")
|
|
223
|
-
return /* @__PURE__ */ c(
|
|
223
|
+
return /* @__PURE__ */ c(j, { ...q, children: /* @__PURE__ */ c(
|
|
224
224
|
"div",
|
|
225
225
|
{
|
|
226
226
|
ref: this.rootDOMRef,
|
|
@@ -260,12 +260,12 @@ class j extends xe {
|
|
|
260
260
|
) });
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
f(
|
|
263
|
+
f(U, "defaultProps", {
|
|
264
264
|
type: "info",
|
|
265
265
|
showIcon: !0,
|
|
266
266
|
noticeType: "message",
|
|
267
267
|
duration: 3e3
|
|
268
|
-
}), f(
|
|
268
|
+
}), f(U, "contextType", R);
|
|
269
269
|
function le(d, m) {
|
|
270
270
|
const e = z(R), [t, s] = be([]);
|
|
271
271
|
function p(u) {
|
|
@@ -335,7 +335,7 @@ function De(d = {}) {
|
|
|
335
335
|
};
|
|
336
336
|
}), [n, p];
|
|
337
337
|
}
|
|
338
|
-
const
|
|
338
|
+
const Ue = [
|
|
339
339
|
"info",
|
|
340
340
|
"success",
|
|
341
341
|
"error",
|
|
@@ -432,7 +432,7 @@ class $ extends se {
|
|
|
432
432
|
x && (x.style.height = 0, (v = i.onClose) == null || v.call(i));
|
|
433
433
|
},
|
|
434
434
|
children: /* @__PURE__ */ c(
|
|
435
|
-
|
|
435
|
+
U,
|
|
436
436
|
{
|
|
437
437
|
...i,
|
|
438
438
|
prefixCls: h,
|
|
@@ -459,7 +459,7 @@ f($, "useMessage"), f($, "success"), f($, "info"), f($, "warning"), f($, "error"
|
|
|
459
459
|
e == null || e.clear();
|
|
460
460
|
});
|
|
461
461
|
}), f($, "addInstance", fe);
|
|
462
|
-
|
|
462
|
+
Ue.forEach((d) => {
|
|
463
463
|
$[d] = (m) => fe({
|
|
464
464
|
...typeof m == "string" ? { content: m } : m,
|
|
465
465
|
type: d
|
|
@@ -467,7 +467,7 @@ je.forEach((d) => {
|
|
|
467
467
|
});
|
|
468
468
|
$.useMessage = De;
|
|
469
469
|
let me = {};
|
|
470
|
-
function
|
|
470
|
+
function je(d) {
|
|
471
471
|
me = {
|
|
472
472
|
...d
|
|
473
473
|
};
|
|
@@ -577,7 +577,7 @@ const E = class E extends se {
|
|
|
577
577
|
i && (i.style.height = 0, (x = C.onClose) == null || x.call(C));
|
|
578
578
|
},
|
|
579
579
|
children: /* @__PURE__ */ c(
|
|
580
|
-
|
|
580
|
+
U,
|
|
581
581
|
{
|
|
582
582
|
...C,
|
|
583
583
|
onClose: this.remove,
|
|
@@ -677,7 +677,7 @@ const Ae = {
|
|
|
677
677
|
active: "--red-7"
|
|
678
678
|
}
|
|
679
679
|
}, Fe = ie, ze = {};
|
|
680
|
-
function
|
|
680
|
+
function j(d) {
|
|
681
681
|
const m = ee(
|
|
682
682
|
d,
|
|
683
683
|
Fe,
|
|
@@ -713,13 +713,13 @@ function U(d) {
|
|
|
713
713
|
getPrefixCls: a
|
|
714
714
|
};
|
|
715
715
|
L(() => {
|
|
716
|
-
n &&
|
|
716
|
+
n && je({ locale: l, prefixCls: s, rtl: o });
|
|
717
717
|
}, [l, s, o, n]);
|
|
718
718
|
let g = p;
|
|
719
719
|
return s && s !== "pqb" && (g = /* @__PURE__ */ c(S.Provider, { value: { prefixCls: s }, children: p })), /* @__PURE__ */ c(R.Provider, { value: h, children: g });
|
|
720
720
|
}
|
|
721
|
-
|
|
722
|
-
|
|
721
|
+
j.ConfigContext = R;
|
|
722
|
+
j.displayName = "ConfigProvider";
|
|
723
723
|
const gt = R.Consumer;
|
|
724
724
|
export {
|
|
725
725
|
gt as C,
|
|
@@ -728,12 +728,12 @@ export {
|
|
|
728
728
|
$ as M,
|
|
729
729
|
w as N,
|
|
730
730
|
R as a,
|
|
731
|
-
|
|
731
|
+
j as b,
|
|
732
732
|
Ae as c,
|
|
733
733
|
Ct as d,
|
|
734
734
|
ht as e,
|
|
735
735
|
ce as f,
|
|
736
736
|
pt as g,
|
|
737
|
-
|
|
737
|
+
U as h,
|
|
738
738
|
ut as s
|
|
739
739
|
};
|
|
@@ -19,9 +19,9 @@ import Dt from "@unicom-cloud/icons/IconUiRotateLeft";
|
|
|
19
19
|
import Ot from "@unicom-cloud/icons/IconUiRotateRight";
|
|
20
20
|
import Vt from "@unicom-cloud/icons/IconUiZoomIn";
|
|
21
21
|
import Yt from "@unicom-cloud/icons/IconUiZoomOut";
|
|
22
|
-
import { a as qe, b as Ft } from "./
|
|
22
|
+
import { a as qe, b as Ft } from "./Lyg-9NEt.js";
|
|
23
23
|
import "lodash/isEqualWith";
|
|
24
|
-
import "
|
|
24
|
+
import "../utils/is.js";
|
|
25
25
|
import { ArrowDown as Xt, ArrowUp as Bt, ArrowLeft as Gt, ArrowRight as Wt, Esc as Zt } from "../utils/keyCode.js";
|
|
26
26
|
import "lodash/isNumber";
|
|
27
27
|
import "lodash/merge";
|
|
@@ -38,7 +38,7 @@ import Kt from "../hooks/useOverflowHidden.js";
|
|
|
38
38
|
import { findDOMNode as Jt } from "../utils/reactDOM.js";
|
|
39
39
|
import "@unicom-cloud/utils/tween/easing";
|
|
40
40
|
import Qt from "../Portal.js";
|
|
41
|
-
import { P as Ge } from "./
|
|
41
|
+
import { P as Ge } from "./DQ3uFRJD.js";
|
|
42
42
|
import Y from "@unicom-cloud/utils/class-name";
|
|
43
43
|
import en from "@unicom-cloud/icons/IconUiMore";
|
|
44
44
|
import tn from "../Tooltip.js";
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { jsxs as W, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import oe from "@unicom-cloud/icons/IconUiClose";
|
|
3
|
+
import A from "lodash/isArray";
|
|
4
|
+
import { forwardRef as fe, useContext as se, useRef as U, useState as te, useImperativeHandle as ne } from "react";
|
|
5
|
+
import { a as me, I as re } from "./Lyg-9NEt.js";
|
|
6
|
+
import q from "@unicom-cloud/utils/class-name";
|
|
7
|
+
import { Enter as ie, Tab as de } from "../utils/keyCode.js";
|
|
8
|
+
import $e from "../utils/omit.js";
|
|
9
|
+
function ue({
|
|
10
|
+
style: G,
|
|
11
|
+
className: J,
|
|
12
|
+
prefixCls: Q,
|
|
13
|
+
allowClear: V,
|
|
14
|
+
status: X,
|
|
15
|
+
error: $,
|
|
16
|
+
disabled: k,
|
|
17
|
+
placeholder: g,
|
|
18
|
+
format: v,
|
|
19
|
+
size: F,
|
|
20
|
+
onClear: Y,
|
|
21
|
+
editable: Z,
|
|
22
|
+
value: d,
|
|
23
|
+
inputValue: z,
|
|
24
|
+
onPressEnter: y,
|
|
25
|
+
suffixIcon: D,
|
|
26
|
+
prefix: N,
|
|
27
|
+
onChange: w,
|
|
28
|
+
popupVisible: _,
|
|
29
|
+
isPlaceholder: B,
|
|
30
|
+
inputProps: c,
|
|
31
|
+
...x
|
|
32
|
+
}, K) {
|
|
33
|
+
const {
|
|
34
|
+
getPrefixCls: s,
|
|
35
|
+
size: O,
|
|
36
|
+
locale: I,
|
|
37
|
+
rtl: T
|
|
38
|
+
} = se(me), u = U(null), [E, H] = te(!1), P = F || O;
|
|
39
|
+
ne(K, () => ({
|
|
40
|
+
focus() {
|
|
41
|
+
var f, n;
|
|
42
|
+
(n = (f = u.current) == null ? void 0 : f.focus) == null || n.call(f);
|
|
43
|
+
},
|
|
44
|
+
blur() {
|
|
45
|
+
var f, n;
|
|
46
|
+
(n = (f = u.current) == null ? void 0 : f.blur) == null || n.call(f);
|
|
47
|
+
},
|
|
48
|
+
getRootDOMNode: () => u.current
|
|
49
|
+
}));
|
|
50
|
+
function R(f) {
|
|
51
|
+
var b;
|
|
52
|
+
(b = c == null ? void 0 : c.onKeyDown) == null || b.call(c, f), f.key === ie.key && (y == null || y());
|
|
53
|
+
}
|
|
54
|
+
function S(f) {
|
|
55
|
+
var n;
|
|
56
|
+
(n = c == null ? void 0 : c.onChange) == null || n.call(c, f), w == null || w(f);
|
|
57
|
+
}
|
|
58
|
+
let h = "";
|
|
59
|
+
z !== void 0 ? h = z : d && !A(d) && (h = typeof v == "function" ? v(d) : d.locale(I.dayjsLocale).format(v));
|
|
60
|
+
const L = Z ? {} : { readOnly: !0 }, t = Q || s("picker"), C = X || ($ ? "error" : void 0), j = E || _, M = q(
|
|
61
|
+
t,
|
|
62
|
+
`${t}-size-${P}`,
|
|
63
|
+
{
|
|
64
|
+
[`${t}-focused`]: j,
|
|
65
|
+
[`${t}-disabled`]: k,
|
|
66
|
+
[`${t}-has-prefix`]: N,
|
|
67
|
+
[`${t}-${C}`]: C,
|
|
68
|
+
[`${t}-rtl`]: T
|
|
69
|
+
},
|
|
70
|
+
J
|
|
71
|
+
);
|
|
72
|
+
return /* @__PURE__ */ W(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
style: G,
|
|
76
|
+
className: M,
|
|
77
|
+
...$e(x, ["onChange", "onPressEnter"]),
|
|
78
|
+
children: [
|
|
79
|
+
N && /* @__PURE__ */ r("div", { className: `${t}-prefix`, children: N }),
|
|
80
|
+
/* @__PURE__ */ r(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
className: q(`${t}-input`, {
|
|
84
|
+
[`${t}-input-placeholder`]: B
|
|
85
|
+
}),
|
|
86
|
+
children: /* @__PURE__ */ r(
|
|
87
|
+
"input",
|
|
88
|
+
{
|
|
89
|
+
ref: u,
|
|
90
|
+
...c,
|
|
91
|
+
disabled: k,
|
|
92
|
+
placeholder: g,
|
|
93
|
+
className: `${t}-start-time`,
|
|
94
|
+
value: h,
|
|
95
|
+
onKeyDown: R,
|
|
96
|
+
onChange: S,
|
|
97
|
+
...L,
|
|
98
|
+
onFocus: (f) => {
|
|
99
|
+
var n;
|
|
100
|
+
H(!0), (n = c == null ? void 0 : c.onFocus) == null || n.call(c, f);
|
|
101
|
+
},
|
|
102
|
+
onBlur: (f) => {
|
|
103
|
+
var n;
|
|
104
|
+
H(!1), (n = c == null ? void 0 : c.onBlur) == null || n.call(c, f);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
/* @__PURE__ */ W("div", { className: `${t}-suffix`, children: [
|
|
111
|
+
V && h && /* @__PURE__ */ r(
|
|
112
|
+
re,
|
|
113
|
+
{
|
|
114
|
+
prefix: t,
|
|
115
|
+
onClick: Y,
|
|
116
|
+
className: `${t}-clear-icon`,
|
|
117
|
+
children: /* @__PURE__ */ r(oe, {})
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ r("span", { className: `${t}-suffix-icon`, children: D })
|
|
121
|
+
] })
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
const Oe = fe(ue);
|
|
127
|
+
function Ce({
|
|
128
|
+
allowClear: G,
|
|
129
|
+
error: J,
|
|
130
|
+
status: Q,
|
|
131
|
+
style: V,
|
|
132
|
+
className: X,
|
|
133
|
+
disabled: $,
|
|
134
|
+
placeholder: k = [],
|
|
135
|
+
value: g = [],
|
|
136
|
+
popupVisible: v,
|
|
137
|
+
format: F,
|
|
138
|
+
size: Y,
|
|
139
|
+
onClear: Z,
|
|
140
|
+
editable: d,
|
|
141
|
+
inputValue: z,
|
|
142
|
+
onPressEnter: y,
|
|
143
|
+
onPressTab: D,
|
|
144
|
+
onChange: N,
|
|
145
|
+
separator: w,
|
|
146
|
+
suffixIcon: _,
|
|
147
|
+
changeFocusedInputIndex: B,
|
|
148
|
+
focusedInputIndex: c,
|
|
149
|
+
isPlaceholder: x,
|
|
150
|
+
prefix: K,
|
|
151
|
+
inputProps: s = [],
|
|
152
|
+
onBlur: O,
|
|
153
|
+
...I
|
|
154
|
+
}, T) {
|
|
155
|
+
const {
|
|
156
|
+
getPrefixCls: u,
|
|
157
|
+
size: E,
|
|
158
|
+
locale: H,
|
|
159
|
+
rtl: P
|
|
160
|
+
} = se(me), R = U(null), S = U(null), h = U(null), [L, t] = te([!1, !1]), C = A($) ? $[0] : $, j = A($) ? $[1] : $;
|
|
161
|
+
ne(T, () => ({
|
|
162
|
+
focus(e) {
|
|
163
|
+
var o, i;
|
|
164
|
+
(c === 0 && !C || c === 1 && !j) && ((i = (o = ((typeof e == "number" ? e : c) === 0 ? R : S).current) == null ? void 0 : o.focus) == null || i.call(o));
|
|
165
|
+
},
|
|
166
|
+
blur() {
|
|
167
|
+
var e, a, l, o;
|
|
168
|
+
c === 0 && ((a = (e = R.current) == null ? void 0 : e.blur) == null || a.call(e)), c === 1 && ((o = (l = S.current) == null ? void 0 : l.blur) == null || o.call(l));
|
|
169
|
+
},
|
|
170
|
+
getRootDOMNode: () => h.current
|
|
171
|
+
}));
|
|
172
|
+
function M(e, a) {
|
|
173
|
+
var l, o;
|
|
174
|
+
(o = (l = s == null ? void 0 : s[a]) == null ? void 0 : l.onClick) == null || o.call(l, e), c !== a && B(a);
|
|
175
|
+
}
|
|
176
|
+
function f(e, a) {
|
|
177
|
+
var o, i;
|
|
178
|
+
const l = e.key;
|
|
179
|
+
(i = (o = s == null ? void 0 : s[a]) == null ? void 0 : o.onKeyDown) == null || i.call(o, e), l === ie.key && (y == null || y()), l === de.key && (D == null || D(e));
|
|
180
|
+
}
|
|
181
|
+
function n(e, a) {
|
|
182
|
+
var l, o;
|
|
183
|
+
e.stopPropagation(), (o = (l = s == null ? void 0 : s[a]) == null ? void 0 : l.onChange) == null || o.call(l, e), N == null || N(e);
|
|
184
|
+
}
|
|
185
|
+
function b(e, a) {
|
|
186
|
+
var l, o;
|
|
187
|
+
t((i) => (i[a] = !1, [...i])), (o = (l = s == null ? void 0 : s[a]) == null ? void 0 : l.onBlur) == null || o.call(l, e), O == null || O(e);
|
|
188
|
+
}
|
|
189
|
+
function p(e, a) {
|
|
190
|
+
var l, o;
|
|
191
|
+
(a === 0 || a === 1) && (t((i) => (i[a] = !0, [...i])), c !== a && B(a, !0)), (o = (l = s == null ? void 0 : s[a]) == null ? void 0 : l.onFocus) == null || o.call(l, e);
|
|
192
|
+
}
|
|
193
|
+
const m = u("picker"), ye = Y || E, Ne = L[0] || L[1] || !!v, ee = Q || (J ? "error" : void 0), he = q(
|
|
194
|
+
m,
|
|
195
|
+
`${m}-range`,
|
|
196
|
+
`${m}-size-${ye}`,
|
|
197
|
+
{
|
|
198
|
+
[`${m}-focused`]: Ne,
|
|
199
|
+
[`${m}-disabled`]: C && j,
|
|
200
|
+
[`${m}-${ee}`]: ee,
|
|
201
|
+
[`${m}-rtl`]: P,
|
|
202
|
+
[`${m}-has-prefix`]: K
|
|
203
|
+
},
|
|
204
|
+
X
|
|
205
|
+
), ce = (e) => {
|
|
206
|
+
const a = g[e] ? g[e].locale(H.dayjsLocale).format(A(F) ? F[e] : F) : "";
|
|
207
|
+
return z && e === c ? z : a;
|
|
208
|
+
}, le = d ? {} : { readOnly: !0 };
|
|
209
|
+
function ae(e) {
|
|
210
|
+
return q(`${m}-input`, {
|
|
211
|
+
[`${m}-input-active`]: c === e,
|
|
212
|
+
[`${m}-input-placeholder`]: x && c === e
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
return /* @__PURE__ */ W(
|
|
216
|
+
"div",
|
|
217
|
+
{
|
|
218
|
+
style: V,
|
|
219
|
+
ref: h,
|
|
220
|
+
className: he,
|
|
221
|
+
...$e(I, ["onChange", "onPressEnter"]),
|
|
222
|
+
children: [
|
|
223
|
+
K && /* @__PURE__ */ r("div", { className: `${m}-prefix`, children: K }),
|
|
224
|
+
/* @__PURE__ */ r("div", { className: ae(0), children: /* @__PURE__ */ r(
|
|
225
|
+
"input",
|
|
226
|
+
{
|
|
227
|
+
ref: R,
|
|
228
|
+
...s[0],
|
|
229
|
+
disabled: C,
|
|
230
|
+
placeholder: k[0],
|
|
231
|
+
value: ce(0),
|
|
232
|
+
onChange: (e) => n(e, 0),
|
|
233
|
+
onKeyDown: (e) => f(e, 0),
|
|
234
|
+
onClick: (e) => M(e, 0),
|
|
235
|
+
onBlur: (e) => b(e, 0),
|
|
236
|
+
onFocus: (e) => p(e, 0),
|
|
237
|
+
...le
|
|
238
|
+
}
|
|
239
|
+
) }),
|
|
240
|
+
/* @__PURE__ */ r("span", { className: `${m}-separator`, children: w || "-" }),
|
|
241
|
+
/* @__PURE__ */ r("div", { className: ae(1), children: /* @__PURE__ */ r(
|
|
242
|
+
"input",
|
|
243
|
+
{
|
|
244
|
+
ref: S,
|
|
245
|
+
...s[1],
|
|
246
|
+
disabled: j,
|
|
247
|
+
placeholder: k[1],
|
|
248
|
+
value: ce(1),
|
|
249
|
+
onChange: (e) => n(e, 1),
|
|
250
|
+
onKeyDown: (e) => f(e, 1),
|
|
251
|
+
onClick: (e) => M(e, 1),
|
|
252
|
+
onBlur: (e) => b(e, 1),
|
|
253
|
+
onFocus: (e) => p(e, 1),
|
|
254
|
+
...le
|
|
255
|
+
}
|
|
256
|
+
) }),
|
|
257
|
+
/* @__PURE__ */ W("div", { className: `${m}-suffix`, children: [
|
|
258
|
+
G && g.length === 2 && /* @__PURE__ */ r(
|
|
259
|
+
re,
|
|
260
|
+
{
|
|
261
|
+
prefix: m,
|
|
262
|
+
onClick: Z,
|
|
263
|
+
className: `${m}-clear-icon`,
|
|
264
|
+
children: /* @__PURE__ */ r(oe, {})
|
|
265
|
+
}
|
|
266
|
+
),
|
|
267
|
+
/* @__PURE__ */ r("span", { className: `${m}-suffix-icon`, children: _ })
|
|
268
|
+
] })
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
const Re = fe(Ce);
|
|
274
|
+
export {
|
|
275
|
+
Oe as I,
|
|
276
|
+
Re as a
|
|
277
|
+
};
|