@unicom-cloud/ui 0.8.88 → 0.8.90
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/Anchor.js +4 -2
- package/AutoComplete.js +4 -2
- package/Avatar.js +4 -3
- package/Badge.js +6 -5
- package/Breadcrumb.js +4 -3
- package/Calendar.js +7 -5
- package/Card.js +6 -4
- package/Cascader.js +1 -1
- package/Checkbox.js +4 -4
- package/Collapse.js +3 -2
- package/ColorPicker.js +13 -2
- package/DatePicker.js +8 -8
- package/Form.js +3 -3
- package/Grid.js +10 -8
- package/List.js +1 -1
- package/Mentions.js +1 -1
- package/Pagination.js +1 -1
- package/Radio.js +5 -5
- package/Select.js +1 -1
- package/Table.js +3 -3
- package/TimePicker.js +2 -2
- package/Transfer.js +2 -2
- package/Tree.js +1 -1
- package/TreeSelect.js +3 -3
- package/Typography.js +1 -1
- package/anchor/Anchor.js +30 -29
- package/anchor/index.js +2 -0
- package/auto-complete/index.js +4 -2
- package/avatar/index.js +4 -3
- package/badge/index.js +39 -43
- package/breadcrumb/index.js +18 -17
- package/calendar/Month.js +2 -2
- package/calendar/Year.js +2 -2
- package/calendar/index.js +7 -5
- package/card/index.js +31 -29
- package/cascader/Cascader.js +1 -1
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +6 -6
- package/checkbox/Group.js +1 -1
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +4 -4
- package/chunk/B3LeSidy.js +192 -0
- package/chunk/{CgyNQvYg.js → BbQEqpOn.js} +388 -381
- package/chunk/{BP4igg_F.js → BcCuJQY8.js} +41 -40
- package/chunk/{Doi4-DdV.js → C8Kcc_9d.js} +99 -92
- package/chunk/D-Hw4x_H.js +88 -0
- package/chunk/{BC2OXILt.js → Dc-uXGtN.js} +1 -1
- package/collapse/Collapse.js +255 -13
- package/collapse/Item.js +2 -2
- package/collapse/index.js +4 -2
- package/color-picker/Panel.js +1 -1
- package/color-picker/index.js +13 -2
- package/date-picker/Picker.js +142 -138
- package/date-picker/RangePicker.js +2 -2
- package/date-picker/index.js +22 -22
- package/date-picker/util.js +1 -1
- package/form/Form.js +1 -1
- package/form/index.js +32 -32
- package/grid/index.js +13 -12
- package/image/Image.js +26 -25
- package/index.js +600 -571
- package/list/index.js +1 -1
- package/mentions/index.js +1 -1
- package/package.json +1 -1
- package/pagination/PageOption.js +1 -1
- package/pagination/Pagination.js +1 -1
- package/pagination/index.js +1 -1
- package/radio/Group.js +1 -1
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +4 -4
- package/radio/index.js +4 -4
- package/select/Option.js +1 -1
- package/select/Select.js +1 -1
- package/select/index.js +2 -2
- package/select/util.js +2 -2
- package/space/index.js +58 -56
- package/statistic/Countdown.js +1 -1
- package/steps/index.js +50 -49
- package/style.css +1 -1
- package/table/Table.js +2 -2
- package/table/index.js +3 -3
- package/time-picker/Picker.js +17 -17
- package/time-picker/RangePicker.js +7 -7
- package/time-picker/TimePicker.js +2 -2
- package/time-picker/index.js +2 -2
- package/time-picker/util.js +1 -1
- package/transfer/Item.js +1 -1
- package/transfer/List.js +1 -1
- package/transfer/index.js +2 -2
- package/tree/Animation.js +1 -1
- package/tree/Node.js +1 -1
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +3 -3
- package/tree/index.js +1 -1
- package/tree-select/List.js +1 -1
- package/tree-select/Select.js +1 -1
- package/tree-select/index.js +2 -2
- package/types/common/space/interface.d.ts +4 -0
- package/types/common/utils/dayjs.d.ts +2 -2
- package/types/pc/anchor/Anchor.d.ts +1 -0
- package/types/pc/anchor/index.d.ts +2 -1
- package/types/pc/auto-complete/index.d.ts +6 -0
- package/types/pc/avatar/index.d.ts +1 -0
- package/types/pc/badge/index.d.ts +5 -3
- package/types/pc/breadcrumb/index.d.ts +1 -0
- package/types/pc/calendar/index.d.ts +3 -0
- package/types/pc/card/index.d.ts +1 -0
- package/types/pc/cascader/Cascader.d.ts +1 -1
- package/types/pc/collapse/Collapse.d.ts +1 -0
- package/types/pc/collapse/index.d.ts +2 -1
- package/types/pc/color-picker/index.d.ts +7 -0
- package/types/pc/date-picker/index.d.ts +1 -1
- package/types/pc/date-picker/interface.d.ts +2 -2
- package/types/pc/date-picker/panel/Body.d.ts +1 -1
- package/types/pc/form/hook/useForm.d.ts +1 -1
- package/types/pc/form/index.d.ts +1 -1
- package/types/pc/grid/index.d.ts +3 -4
- package/types/pc/index.d.ts +15 -14
- package/types/pc/menu/Indent.d.ts +1 -1
- package/types/pc/space/index.d.ts +2 -2
- package/types/pc/steps/index.d.ts +1 -0
- package/types/pc/time-picker/index.d.ts +1 -1
- package/types/pc/utils/constant.d.ts +2 -2
- package/types/pc/utils/index.d.ts +1 -0
- package/types/pc/utils/names.d.ts +396 -85
- package/typography/Ellipsis.js +5 -4
- package/typography/index.js +1 -1
- package/utils/constant.js +6 -6
- package/utils/dayjs.js +1 -1
- package/utils/index.js +202 -200
- package/utils/names.js +294 -86
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +117 -116
- package/chunk/C7bohPVD.js +0 -185
- package/chunk/DYmI9fFY.js +0 -257
- /package/grid/{grid.js → Grid.js} +0 -0
- /package/grid/{grid-item.js → GridItem.js} +0 -0
- /package/types/pc/grid/{grid.d.ts → Grid.d.ts} +0 -0
- /package/types/pc/grid/{grid-item.d.ts → GridItem.d.ts} +0 -0
package/date-picker/Picker.js
CHANGED
|
@@ -5,7 +5,7 @@ import { isDayjs as Le } from "dayjs";
|
|
|
5
5
|
import ze from "lodash/isArray";
|
|
6
6
|
import kt from "lodash/isPlainObject";
|
|
7
7
|
import jt from "lodash/isUndefined";
|
|
8
|
-
import Ct, { forwardRef as Nt, useContext as Ht, useRef as
|
|
8
|
+
import Ct, { forwardRef as Nt, useContext as Ht, useRef as ue, useImperativeHandle as Mt, useState as m, useEffect as Tt } from "react";
|
|
9
9
|
import { a as It } from "../chunk/B44Hj5ad.js";
|
|
10
10
|
import { u as Lt } from "../chunk/BFTV6myl.js";
|
|
11
11
|
import { u as Fe } from "../chunk/VSe_Wq1g.js";
|
|
@@ -13,35 +13,39 @@ import { u as zt } from "../chunk/a3hR6zLw.js";
|
|
|
13
13
|
import Ft from "../picker/Input.js";
|
|
14
14
|
import $t from "../trigger/index.js";
|
|
15
15
|
import Ut from "@unicom-cloud/utils/class-name";
|
|
16
|
-
import { g as d, a as
|
|
16
|
+
import { g as d, a as T, j as I, k as Wt, e as le, d as $e, f as Bt, m as Ue } from "../chunk/B3LeSidy.js";
|
|
17
17
|
import { o as Ot } from "../chunk/BKKEev13.js";
|
|
18
18
|
import { a as qt } from "../chunk/ClqoGc3r.js";
|
|
19
19
|
import Qt from "./context.js";
|
|
20
20
|
import { F as Rt, S as Et } from "../chunk/CC---6jO.js";
|
|
21
|
-
import { getDefaultWeekStart as Gt, getLocaleDayjsValue as
|
|
22
|
-
function Jt(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
21
|
+
import { getDefaultWeekStart as Gt, getLocaleDayjsValue as x } from "./util.js";
|
|
22
|
+
function Jt(L) {
|
|
23
|
+
var b;
|
|
24
|
+
const { format: z, picker: y, showTime: o } = L;
|
|
25
|
+
let l;
|
|
26
|
+
if (z)
|
|
27
|
+
l = z;
|
|
28
|
+
else
|
|
29
|
+
switch (L.mode || ((b = y == null ? void 0 : y.props) == null ? void 0 : b.pickerType)) {
|
|
30
|
+
case "date":
|
|
31
|
+
l = o ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
32
|
+
break;
|
|
33
|
+
case "month":
|
|
34
|
+
l = "YYYY-MM";
|
|
35
|
+
break;
|
|
36
|
+
case "year":
|
|
37
|
+
l = "YYYY";
|
|
38
|
+
break;
|
|
39
|
+
case "week":
|
|
40
|
+
l = "gggg-wo";
|
|
41
|
+
break;
|
|
42
|
+
case "quarter":
|
|
43
|
+
l = "YYYY-[Q]Q";
|
|
44
|
+
break;
|
|
45
|
+
default:
|
|
46
|
+
l = "YYYY-MM-DD";
|
|
47
|
+
}
|
|
48
|
+
return l;
|
|
45
49
|
}
|
|
46
50
|
const We = {
|
|
47
51
|
allowClear: !0,
|
|
@@ -49,23 +53,23 @@ const We = {
|
|
|
49
53
|
position: "bl",
|
|
50
54
|
editable: !0,
|
|
51
55
|
showNowBtn: !0
|
|
52
|
-
}, Xt = { bottom: 4 }, Zt = (
|
|
56
|
+
}, Xt = { bottom: 4 }, Zt = (L, z) => {
|
|
53
57
|
var je, Ce, Ne;
|
|
54
58
|
const {
|
|
55
|
-
getPrefixCls:
|
|
59
|
+
getPrefixCls: y,
|
|
56
60
|
locale: o,
|
|
57
|
-
size:
|
|
58
|
-
componentConfig:
|
|
59
|
-
rtl:
|
|
61
|
+
size: l,
|
|
62
|
+
componentConfig: b,
|
|
63
|
+
rtl: q
|
|
60
64
|
} = Ht(It);
|
|
61
|
-
|
|
65
|
+
q && (We.position = "br");
|
|
62
66
|
const r = Lt(
|
|
63
|
-
|
|
67
|
+
L,
|
|
64
68
|
We,
|
|
65
|
-
|
|
69
|
+
b == null ? void 0 : b.DatePicker
|
|
66
70
|
), {
|
|
67
71
|
allowClear: Be,
|
|
68
|
-
className:
|
|
72
|
+
className: ce,
|
|
69
73
|
style: fe,
|
|
70
74
|
placeholder: Oe,
|
|
71
75
|
getPopupContainer: qe,
|
|
@@ -79,124 +83,124 @@ const We = {
|
|
|
79
83
|
picker: me,
|
|
80
84
|
shortcuts: F,
|
|
81
85
|
onSelect: f,
|
|
82
|
-
onVisibleChange:
|
|
86
|
+
onVisibleChange: Q,
|
|
83
87
|
value: Ze,
|
|
84
|
-
onChange:
|
|
88
|
+
onChange: R,
|
|
85
89
|
icons: $,
|
|
86
90
|
disabledDate: de,
|
|
87
|
-
showTime:
|
|
91
|
+
showTime: c,
|
|
88
92
|
showNowBtn: he,
|
|
89
|
-
onSelectShortcut:
|
|
93
|
+
onSelectShortcut: E,
|
|
90
94
|
extra: ve,
|
|
91
|
-
shortcutsPlacementLeft:
|
|
92
|
-
onOk:
|
|
95
|
+
shortcutsPlacementLeft: D,
|
|
96
|
+
onOk: G,
|
|
93
97
|
defaultPickerValue: _e,
|
|
94
98
|
pickerValue: Ae,
|
|
95
|
-
onPickerValueChange:
|
|
99
|
+
onPickerValueChange: J,
|
|
96
100
|
triggerElement: ge,
|
|
97
101
|
utcOffset: a,
|
|
98
102
|
timezone: s,
|
|
99
103
|
panelRender: Ve,
|
|
100
104
|
inputProps: Ke
|
|
101
|
-
} = r,
|
|
105
|
+
} = r, w = y == null ? void 0 : y("picker"), P = o == null ? void 0 : o.DatePicker, et = jt(r.dayStartOfWeek) ? Gt(o == null ? void 0 : o.dayjsLocale) : r.dayStartOfWeek, k = r.mode || me.props.pickerType, X = ue(null), Z = ue(null), _ = ue(null);
|
|
102
106
|
Mt(
|
|
103
|
-
|
|
107
|
+
z,
|
|
104
108
|
() => ({
|
|
105
109
|
focus() {
|
|
106
|
-
|
|
110
|
+
re();
|
|
107
111
|
},
|
|
108
112
|
blur() {
|
|
109
|
-
|
|
113
|
+
ae();
|
|
110
114
|
}
|
|
111
115
|
}),
|
|
112
116
|
[]
|
|
113
117
|
);
|
|
114
|
-
const
|
|
115
|
-
let n =
|
|
116
|
-
typeof n == "function" && (n =
|
|
118
|
+
const j = ((Ce = (je = P == null ? void 0 : P.Calendar) == null ? void 0 : je[k]) == null ? void 0 : Ce.format) || Jt(r);
|
|
119
|
+
let n = j;
|
|
120
|
+
typeof n == "function" && (n = c ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD");
|
|
117
121
|
function tt() {
|
|
118
122
|
let e;
|
|
119
123
|
return r.value ? e = d(r.value, n, a, s) : e = d(r.defaultValue, n, a, s), e;
|
|
120
124
|
}
|
|
121
|
-
const [
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
) ||
|
|
125
|
-
function
|
|
125
|
+
const [A, C] = m(tt()), [ot, nt] = m(r.popupVisible), [K, ye] = m(!1), [we, U] = m(), h = "popupVisible" in r ? r.popupVisible : ot, N = "value" in r ? d(Ze, n, a, s) : A, Pe = N || d(_e, n) || T(), [rt, W] = m(), [ee, H] = m(), [at, te] = m(), [st, S] = m(Pe), oe = d(Ae, n) || st, v = at || ee || N, [B, Se] = m(k), it = kt(c) && d(
|
|
126
|
+
c.defaultValue,
|
|
127
|
+
c.format || "HH:mm:ss"
|
|
128
|
+
) || T(a, s), ne = v || it;
|
|
129
|
+
function re() {
|
|
126
130
|
var e, t;
|
|
127
|
-
(t = (e =
|
|
131
|
+
(t = (e = X.current) == null ? void 0 : e.focus) == null || t.call(e);
|
|
128
132
|
}
|
|
129
|
-
function
|
|
133
|
+
function ae() {
|
|
130
134
|
var e, t;
|
|
131
|
-
(t = (e =
|
|
135
|
+
(t = (e = X.current) == null ? void 0 : e.blur) == null || t.call(e);
|
|
132
136
|
}
|
|
133
|
-
const
|
|
137
|
+
const se = Fe(a), ie = Fe(s);
|
|
134
138
|
zt(() => {
|
|
135
|
-
if (
|
|
136
|
-
const e =
|
|
137
|
-
|
|
139
|
+
if (A && (se !== a || s !== ie)) {
|
|
140
|
+
const e = I(A, se, ie);
|
|
141
|
+
C(Wt(e, a, s));
|
|
138
142
|
}
|
|
139
|
-
}, [a,
|
|
140
|
-
W(void 0), U(void 0), h ? (
|
|
141
|
-
ye(!1), Se(
|
|
143
|
+
}, [a, se, s, ie]), Tt(() => {
|
|
144
|
+
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(() => {
|
|
145
|
+
ye(!1), Se(k), ae();
|
|
142
146
|
}, 100));
|
|
143
147
|
}, [h]);
|
|
144
148
|
function ut(e) {
|
|
145
|
-
e ?
|
|
146
|
-
|
|
147
|
-
}) :
|
|
149
|
+
e ? Y(e, () => {
|
|
150
|
+
re();
|
|
151
|
+
}) : Y(!1);
|
|
148
152
|
}
|
|
149
|
-
function
|
|
150
|
-
|
|
153
|
+
function M(e) {
|
|
154
|
+
J == null || J(e.format(n), e);
|
|
151
155
|
}
|
|
152
|
-
function
|
|
153
|
-
nt(e),
|
|
156
|
+
function Y(e, t) {
|
|
157
|
+
nt(e), Q == null || Q(e), t == null || t();
|
|
154
158
|
}
|
|
155
|
-
function
|
|
159
|
+
function lt(e) {
|
|
156
160
|
var t;
|
|
157
|
-
e.stopPropagation(),
|
|
161
|
+
e.stopPropagation(), C(void 0), H(void 0), O(void 0), (t = r.onClear) == null || t.call(r);
|
|
158
162
|
}
|
|
159
|
-
function
|
|
160
|
-
const e =
|
|
161
|
-
Ye(),
|
|
163
|
+
function ct() {
|
|
164
|
+
const e = x(v, o == null ? void 0 : o.dayjsLocale);
|
|
165
|
+
Ye(), G == null || G(e && e.format(n), e);
|
|
162
166
|
}
|
|
163
167
|
function Ye() {
|
|
164
|
-
|
|
168
|
+
C(v), O(v), Y(!1);
|
|
165
169
|
}
|
|
166
170
|
function be(e, t, u) {
|
|
167
|
-
if (W(void 0), U(void 0),
|
|
168
|
-
const i = u ? t :
|
|
169
|
-
|
|
170
|
-
const V =
|
|
171
|
-
|
|
171
|
+
if (W(void 0), U(void 0), c) {
|
|
172
|
+
const i = u ? t : le(t, ne);
|
|
173
|
+
H(i), S(i);
|
|
174
|
+
const V = x(
|
|
175
|
+
I(i, a, s),
|
|
172
176
|
o == null ? void 0 : o.dayjsLocale
|
|
173
177
|
);
|
|
174
178
|
f == null || f(V.format(n), V);
|
|
175
179
|
} else {
|
|
176
|
-
const i =
|
|
177
|
-
|
|
180
|
+
const i = x(
|
|
181
|
+
I(t, a, s).locale(o == null ? void 0 : o.dayjsLocale),
|
|
178
182
|
o == null ? void 0 : o.dayjsLocale
|
|
179
183
|
);
|
|
180
|
-
f == null || f(i ? i.format(n) : void 0, i),
|
|
184
|
+
f == null || f(i ? i.format(n) : void 0, i), C(t), O(t), Y(!1);
|
|
181
185
|
}
|
|
182
186
|
}
|
|
183
187
|
function O(e) {
|
|
184
|
-
if (Bt(e,
|
|
185
|
-
const t =
|
|
186
|
-
|
|
188
|
+
if (Bt(e, N)) {
|
|
189
|
+
const t = x(
|
|
190
|
+
I(e, a, s),
|
|
187
191
|
o == null ? void 0 : o.dayjsLocale
|
|
188
192
|
);
|
|
189
|
-
|
|
193
|
+
R == null || R(
|
|
190
194
|
t ? t.format(n) : void 0,
|
|
191
195
|
t
|
|
192
196
|
);
|
|
193
197
|
}
|
|
194
198
|
}
|
|
195
199
|
function ft(e, t) {
|
|
196
|
-
const u = v ||
|
|
197
|
-
|
|
198
|
-
const V =
|
|
199
|
-
|
|
200
|
+
const u = v || T(a, s), i = le(u, t);
|
|
201
|
+
H(i);
|
|
202
|
+
const V = x(
|
|
203
|
+
I(i, a, s),
|
|
200
204
|
o == null ? void 0 : o.dayjsLocale
|
|
201
205
|
);
|
|
202
206
|
f == null || f(V.format(n), V);
|
|
@@ -206,19 +210,19 @@ const We = {
|
|
|
206
210
|
}
|
|
207
211
|
function mt(e) {
|
|
208
212
|
const t = e.target.value;
|
|
209
|
-
if (W(t), h ||
|
|
213
|
+
if (W(t), h || Y(!0), pt(t)) {
|
|
210
214
|
const u = d(t, n);
|
|
211
|
-
|
|
215
|
+
H(u), S(u), W(void 0);
|
|
212
216
|
}
|
|
213
217
|
}
|
|
214
218
|
function dt() {
|
|
215
|
-
v ? (Ye(),
|
|
219
|
+
v ? (Ye(), ae()) : h && Y(!1);
|
|
216
220
|
}
|
|
217
221
|
function g(e, t, u = 1) {
|
|
218
222
|
let i;
|
|
219
|
-
e === "prev" && (i = Ue.subtract(
|
|
223
|
+
e === "prev" && (i = Ue.subtract(oe, u, t)), e === "next" && (i = Ue.add(oe, u, t)), M(i), S(i);
|
|
220
224
|
}
|
|
221
|
-
function xe(e =
|
|
225
|
+
function xe(e = k) {
|
|
222
226
|
if (e === "date" || e === "week")
|
|
223
227
|
return {
|
|
224
228
|
onPrev: () => g("prev", "month"),
|
|
@@ -238,17 +242,17 @@ const We = {
|
|
|
238
242
|
};
|
|
239
243
|
}
|
|
240
244
|
function De() {
|
|
241
|
-
const e =
|
|
242
|
-
|
|
245
|
+
const e = x(
|
|
246
|
+
T(a, s),
|
|
243
247
|
o == null ? void 0 : o.dayjsLocale
|
|
244
248
|
);
|
|
245
|
-
|
|
249
|
+
M(e), be(e.format(n), e, !0);
|
|
246
250
|
}
|
|
247
251
|
function ht(e, t) {
|
|
248
252
|
if (!t) {
|
|
249
|
-
const u =
|
|
253
|
+
const u = c ? le(e, ne) : e;
|
|
250
254
|
U(
|
|
251
|
-
typeof
|
|
255
|
+
typeof j == "function" ? j(e) : u.locale(o == null ? void 0 : o.dayjsLocale).format(n)
|
|
252
256
|
);
|
|
253
257
|
}
|
|
254
258
|
}
|
|
@@ -263,46 +267,46 @@ const We = {
|
|
|
263
267
|
a,
|
|
264
268
|
s
|
|
265
269
|
);
|
|
266
|
-
|
|
270
|
+
S(t), M(t), te(t);
|
|
267
271
|
}
|
|
268
272
|
}
|
|
269
273
|
function Vt() {
|
|
270
|
-
const e =
|
|
271
|
-
|
|
274
|
+
const e = ee || N || T(a, s);
|
|
275
|
+
te(void 0), S(e), M(e);
|
|
272
276
|
}
|
|
273
277
|
function yt(e) {
|
|
274
|
-
if (
|
|
278
|
+
if (E == null || E(e), typeof e.value == "function" && Le(e.value())) {
|
|
275
279
|
const t = d(
|
|
276
280
|
e.value(),
|
|
277
281
|
n,
|
|
278
282
|
a,
|
|
279
283
|
s
|
|
280
284
|
);
|
|
281
|
-
|
|
285
|
+
C(t), O(t), Y(!1);
|
|
282
286
|
}
|
|
283
287
|
}
|
|
284
288
|
function wt() {
|
|
285
|
-
ye(!
|
|
289
|
+
ye(!K);
|
|
286
290
|
}
|
|
287
291
|
function ke(e) {
|
|
288
292
|
const t = Ut(
|
|
289
|
-
`${
|
|
293
|
+
`${w}-container`,
|
|
290
294
|
{
|
|
291
|
-
[`${
|
|
292
|
-
[`${
|
|
293
|
-
[`${
|
|
295
|
+
[`${w}-panel-only`]: e,
|
|
296
|
+
[`${w}-container-shortcuts-placement-left`]: ze(F) && D,
|
|
297
|
+
[`${w}-container-rtl`]: q
|
|
294
298
|
},
|
|
295
|
-
e ?
|
|
299
|
+
e ? ce : ""
|
|
296
300
|
), u = {
|
|
297
|
-
prefixCls:
|
|
298
|
-
showTime:
|
|
301
|
+
prefixCls: w,
|
|
302
|
+
showTime: c,
|
|
299
303
|
shortcuts: F,
|
|
300
304
|
onSelectNow: De,
|
|
301
305
|
showNowBtn: he,
|
|
302
306
|
onMouseEnterShortcut: gt,
|
|
303
307
|
onMouseLeaveShortcut: Vt,
|
|
304
308
|
onSelectShortcut: yt
|
|
305
|
-
}, i =
|
|
309
|
+
}, i = c && B === "date" || ve || ze(F) && F.length && !D || !c && B === "date" && he, V = /* @__PURE__ */ Te(Ie, { children: [
|
|
306
310
|
Ct.cloneElement(me, {
|
|
307
311
|
...Ot(r, ["style"]),
|
|
308
312
|
...xe(),
|
|
@@ -313,13 +317,13 @@ const We = {
|
|
|
313
317
|
popupVisible: h,
|
|
314
318
|
format: n,
|
|
315
319
|
value: v,
|
|
316
|
-
pageShowDate:
|
|
320
|
+
pageShowDate: oe,
|
|
317
321
|
localeName: o == null ? void 0 : o.dayjsLocale,
|
|
318
322
|
setPageShowDate: (Me) => {
|
|
319
|
-
|
|
323
|
+
S(Me), M(Me);
|
|
320
324
|
},
|
|
321
|
-
timeValue:
|
|
322
|
-
isTimePanel:
|
|
325
|
+
timeValue: ne,
|
|
326
|
+
isTimePanel: K,
|
|
323
327
|
panelMode: B,
|
|
324
328
|
setPanelMode: Se,
|
|
325
329
|
onMouseEnterCell: ht,
|
|
@@ -329,46 +333,46 @@ const We = {
|
|
|
329
333
|
Rt,
|
|
330
334
|
{
|
|
331
335
|
...u,
|
|
332
|
-
DATEPICKER_LOCALE:
|
|
336
|
+
DATEPICKER_LOCALE: P,
|
|
333
337
|
disabled: !v,
|
|
334
|
-
onClickConfirmBtn:
|
|
338
|
+
onClickConfirmBtn: ct,
|
|
335
339
|
extra: ve,
|
|
336
340
|
mode: B,
|
|
337
|
-
shortcutsPlacementLeft:
|
|
341
|
+
shortcutsPlacementLeft: D,
|
|
338
342
|
onClickSelectTimeBtn: wt,
|
|
339
|
-
isTimePanel:
|
|
343
|
+
isTimePanel: K
|
|
340
344
|
}
|
|
341
345
|
)
|
|
342
|
-
] }), He =
|
|
343
|
-
/* @__PURE__ */ p(Et, { ref:
|
|
344
|
-
/* @__PURE__ */ p("div", { ref:
|
|
346
|
+
] }), He = D ? /* @__PURE__ */ Te(Ie, { children: [
|
|
347
|
+
/* @__PURE__ */ p(Et, { ref: _, ...u }),
|
|
348
|
+
/* @__PURE__ */ p("div", { ref: Z, className: `${w}-panel-wrapper`, children: V })
|
|
345
349
|
] }) : V, bt = typeof Ve == "function" ? Ve(He) : He;
|
|
346
350
|
return /* @__PURE__ */ p(
|
|
347
351
|
"div",
|
|
348
352
|
{
|
|
349
353
|
className: t,
|
|
350
354
|
onClick: () => {
|
|
351
|
-
|
|
355
|
+
re();
|
|
352
356
|
},
|
|
353
357
|
style: e ? fe : {},
|
|
354
358
|
children: bt
|
|
355
359
|
}
|
|
356
360
|
);
|
|
357
361
|
}
|
|
358
|
-
const Pt = r.size ||
|
|
362
|
+
const Pt = r.size || l, St = $ && $.inputSuffix === null ? null : $ && $.inputSuffix || (c ? /* @__PURE__ */ p(Dt, {}) : /* @__PURE__ */ p(xt, {})), Yt = {
|
|
359
363
|
style: fe,
|
|
360
|
-
className:
|
|
364
|
+
className: ce,
|
|
361
365
|
popupVisible: h,
|
|
362
|
-
format:
|
|
366
|
+
format: j,
|
|
363
367
|
disabled: pe,
|
|
364
368
|
error: Re,
|
|
365
369
|
status: Ee,
|
|
366
370
|
size: Pt,
|
|
367
371
|
onPressEnter: dt,
|
|
368
|
-
onClear:
|
|
372
|
+
onClear: lt,
|
|
369
373
|
prefix: r.prefix,
|
|
370
374
|
suffixIcon: St,
|
|
371
|
-
editable: Je && typeof
|
|
375
|
+
editable: Je && typeof j != "function",
|
|
372
376
|
allowClear: Be
|
|
373
377
|
};
|
|
374
378
|
return /* @__PURE__ */ p(Qt.Provider, { value: { utcOffset: a, timezone: s, weekStart: et }, children: ge === null ? ke(!0) : /* @__PURE__ */ p(
|
|
@@ -391,12 +395,12 @@ const We = {
|
|
|
391
395
|
{
|
|
392
396
|
...qt(r),
|
|
393
397
|
...Yt,
|
|
394
|
-
ref:
|
|
395
|
-
placeholder: Oe || ((Ne =
|
|
398
|
+
ref: X,
|
|
399
|
+
placeholder: Oe || ((Ne = P == null ? void 0 : P.placeholder) == null ? void 0 : Ne[k]),
|
|
396
400
|
popupVisible: h,
|
|
397
|
-
value:
|
|
401
|
+
value: ee || N,
|
|
398
402
|
inputValue: we || rt,
|
|
399
|
-
prefixCls:
|
|
403
|
+
prefixCls: w,
|
|
400
404
|
onChange: mt,
|
|
401
405
|
isPlaceholder: !!we,
|
|
402
406
|
inputProps: Ke
|
|
@@ -13,11 +13,11 @@ import "../chunk/a3hR6zLw.js";
|
|
|
13
13
|
import "../picker/InputRange.js";
|
|
14
14
|
import "../trigger/index.js";
|
|
15
15
|
import "@unicom-cloud/utils/class-name";
|
|
16
|
-
import "../chunk/
|
|
16
|
+
import "../chunk/B3LeSidy.js";
|
|
17
17
|
import "../chunk/ClqoGc3r.js";
|
|
18
18
|
import "./context.js";
|
|
19
19
|
import "../chunk/CC---6jO.js";
|
|
20
|
-
import { P as q } from "../chunk/
|
|
20
|
+
import { P as q } from "../chunk/C8Kcc_9d.js";
|
|
21
21
|
import "./util.js";
|
|
22
22
|
export {
|
|
23
23
|
q as default
|
package/date-picker/index.js
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import { P as f, M as l, D as y,
|
|
5
|
-
function i(
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
return
|
|
2
|
+
import { forwardRef as n, useRef as u, useImperativeHandle as d } from "react";
|
|
3
|
+
import p from "./Picker.js";
|
|
4
|
+
import { P as f, M as l, D, Q as y, W as N, Y as W } from "../chunk/C8Kcc_9d.js";
|
|
5
|
+
function i(P, k) {
|
|
6
|
+
function o(s, m) {
|
|
7
|
+
const t = u();
|
|
8
|
+
return d(m, () => ({
|
|
9
9
|
focus() {
|
|
10
10
|
var e, a;
|
|
11
|
-
(a = (e =
|
|
11
|
+
(a = (e = t.current) == null ? void 0 : e.focus) == null || a.call(e);
|
|
12
12
|
},
|
|
13
13
|
blur() {
|
|
14
14
|
var e, a;
|
|
15
|
-
(a = (e =
|
|
15
|
+
(a = (e = t.current) == null ? void 0 : e.blur) == null || a.call(e);
|
|
16
16
|
}
|
|
17
|
-
})), /* @__PURE__ */ r(
|
|
17
|
+
})), /* @__PURE__ */ r(p, { ...s, ref: t, picker: P, mode: k.mode });
|
|
18
18
|
}
|
|
19
|
-
return
|
|
19
|
+
return o.displayName = k.displayName, n(o);
|
|
20
20
|
}
|
|
21
|
-
const c = i(/* @__PURE__ */ r(
|
|
21
|
+
const c = i(/* @__PURE__ */ r(D, {}), {
|
|
22
22
|
displayName: "DatePicker",
|
|
23
23
|
mode: "date"
|
|
24
24
|
}), h = i(/* @__PURE__ */ r(l, {}), {
|
|
25
25
|
displayName: "MonthPicker",
|
|
26
26
|
mode: "month"
|
|
27
|
-
}), M = i(/* @__PURE__ */ r(
|
|
27
|
+
}), M = i(/* @__PURE__ */ r(W, {}), {
|
|
28
28
|
displayName: "YearPicker",
|
|
29
29
|
mode: "year"
|
|
30
|
-
}), Q = i(/* @__PURE__ */ r(
|
|
30
|
+
}), Q = i(/* @__PURE__ */ r(N, {}), {
|
|
31
31
|
displayName: "WeekPicker",
|
|
32
32
|
mode: "week"
|
|
33
|
-
}), Y = i(/* @__PURE__ */ r(
|
|
33
|
+
}), Y = i(/* @__PURE__ */ r(y, {}), {
|
|
34
34
|
displayName: "QuarterPicker",
|
|
35
35
|
mode: "quarter"
|
|
36
36
|
});
|
|
37
37
|
c.MonthPicker = h;
|
|
38
|
-
c.YearPicker = M;
|
|
39
|
-
c.WeekPicker = Q;
|
|
40
38
|
c.QuarterPicker = Y;
|
|
41
39
|
c.RangePicker = f;
|
|
40
|
+
c.WeekPicker = Q;
|
|
41
|
+
c.YearPicker = M;
|
|
42
42
|
export {
|
|
43
|
-
h as
|
|
44
|
-
Y as
|
|
45
|
-
f as
|
|
46
|
-
Q as
|
|
47
|
-
M as
|
|
43
|
+
h as DatePickerMonth,
|
|
44
|
+
Y as DatePickerQuarter,
|
|
45
|
+
f as DatePickerRange,
|
|
46
|
+
Q as DatePickerWeek,
|
|
47
|
+
M as DatePickerYear,
|
|
48
48
|
c as default
|
|
49
49
|
};
|
package/date-picker/util.js
CHANGED
package/form/Form.js
CHANGED
|
@@ -9,7 +9,7 @@ import "../chunk/BFTV6myl.js";
|
|
|
9
9
|
import "@unicom-cloud/utils/class-name";
|
|
10
10
|
import "../chunk/BKKEev13.js";
|
|
11
11
|
import "./context.js";
|
|
12
|
-
import { F } from "../chunk/
|
|
12
|
+
import { F } from "../chunk/BcCuJQY8.js";
|
|
13
13
|
import "./util.js";
|
|
14
14
|
export {
|
|
15
15
|
F as default
|