@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
package/SelectView.js
CHANGED
|
@@ -1,188 +1,189 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import Ne, { useRef as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { jsx as r, jsxs as R } from "react/jsx-runtime";
|
|
2
|
+
import Ne, { useRef as se, useContext as Ue, useState as ge, useEffect as We, useImperativeHandle as ve, useMemo as ze } from "react";
|
|
3
|
+
import C from "@unicom-cloud/utils/class-name";
|
|
4
|
+
import "./utils/is.js";
|
|
5
5
|
import { pickDataAttributes as je } from "./utils/pick.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
6
|
+
import Ge from "@unicom-cloud/icons/IconUiClose";
|
|
7
|
+
import He from "@unicom-cloud/icons/IconUiDown";
|
|
8
|
+
import Ke from "@unicom-cloud/icons/IconUiLoading";
|
|
9
9
|
import Le from "@unicom-cloud/icons/IconUiSearch";
|
|
10
10
|
import _e from "lodash/isFunction";
|
|
11
11
|
import we from "lodash/isUndefined";
|
|
12
|
-
import { a as Ye, I as qe } from "./chunk/
|
|
12
|
+
import { a as Ye, I as qe } from "./chunk/Lyg-9NEt.js";
|
|
13
13
|
import Je from "./hooks/useForceUpdate.js";
|
|
14
14
|
import Qe from "./hooks/usePersistCallback.js";
|
|
15
|
-
import { I as Xe } from "./chunk/
|
|
16
|
-
import { I as Ze } from "./chunk/
|
|
15
|
+
import { I as Xe } from "./chunk/COWsswcW.js";
|
|
16
|
+
import { I as Ze } from "./chunk/Cwp65v9h.js";
|
|
17
17
|
import eo from "./Tag.js";
|
|
18
18
|
import be from "./utils/fillNBSP.js";
|
|
19
19
|
import oo from "./utils/include.js";
|
|
20
|
-
import { Enter as to, Backspace as
|
|
21
|
-
|
|
20
|
+
import { Enter as to, Backspace as ro } from "./utils/keyCode.js";
|
|
21
|
+
import { isPlainObject as I } from "@unicom-cloud/utils/is";
|
|
22
|
+
const v = {
|
|
22
23
|
BEFORE: 0,
|
|
23
24
|
EDITING: 1,
|
|
24
25
|
NONE: 2
|
|
25
|
-
},
|
|
26
|
+
}, no = 1, so = Ne.forwardRef(function(d, $) {
|
|
26
27
|
const {
|
|
27
|
-
id:
|
|
28
|
-
style:
|
|
28
|
+
id: O,
|
|
29
|
+
style: B,
|
|
29
30
|
className: U,
|
|
30
31
|
size: x,
|
|
31
32
|
bordered: W,
|
|
32
33
|
allowClear: k,
|
|
33
34
|
allowCreate: y,
|
|
34
35
|
status: z,
|
|
35
|
-
loading:
|
|
36
|
+
loading: E,
|
|
36
37
|
disabled: l,
|
|
37
|
-
animation:
|
|
38
|
+
animation: V,
|
|
38
39
|
prefixCls: o,
|
|
39
40
|
suffixIcon: f,
|
|
40
|
-
arrowIcon:
|
|
41
|
-
removeIcon:
|
|
42
|
-
clearIcon:
|
|
43
|
-
placeholder:
|
|
44
|
-
renderText:
|
|
41
|
+
arrowIcon: p,
|
|
42
|
+
removeIcon: P,
|
|
43
|
+
clearIcon: m,
|
|
44
|
+
placeholder: ae,
|
|
45
|
+
renderText: le,
|
|
45
46
|
value: w,
|
|
46
47
|
inputValue: j,
|
|
47
48
|
popupVisible: h,
|
|
48
49
|
maxTagCount: s,
|
|
49
50
|
isMultiple: N,
|
|
50
|
-
isEmptyValue:
|
|
51
|
-
prefix:
|
|
52
|
-
ariaControls:
|
|
53
|
-
renderTag:
|
|
54
|
-
dragToSort:
|
|
51
|
+
isEmptyValue: G,
|
|
52
|
+
prefix: H,
|
|
53
|
+
ariaControls: Ce,
|
|
54
|
+
renderTag: ie,
|
|
55
|
+
dragToSort: ce,
|
|
55
56
|
rtl: Ie,
|
|
56
57
|
htmlDataAttributes: $e,
|
|
57
|
-
onKeyDown:
|
|
58
|
-
onChangeInputValue:
|
|
58
|
+
onKeyDown: K,
|
|
59
|
+
onChangeInputValue: L,
|
|
59
60
|
onPaste: xe,
|
|
60
61
|
onClear: ye,
|
|
61
|
-
onFocus:
|
|
62
|
-
onBlur:
|
|
63
|
-
onRemoveCheckedItem:
|
|
62
|
+
onFocus: _,
|
|
63
|
+
onBlur: Y,
|
|
64
|
+
onRemoveCheckedItem: q,
|
|
64
65
|
onSort: ue,
|
|
65
66
|
...Se
|
|
66
|
-
} = d, S =
|
|
67
|
+
} = d, S = se(null), g = se(null), { size: Te, getPrefixCls: de } = Ue(Ye), [De, fe] = ge(v.NONE), [J, pe] = ge(!1), ke = Je(), T = "showSearch" in d ? d.showSearch : N, c = T || y, A = x || Te, Q = J || h, Ee = I(T) && T.retainInputValue, b = !N && w !== void 0 ? le(w).text : "", X = (e) => {
|
|
67
68
|
e && e.preventDefault();
|
|
68
|
-
},
|
|
69
|
-
const t =
|
|
69
|
+
}, Z = (e) => {
|
|
70
|
+
const t = c ? S.current : g.current;
|
|
70
71
|
t && (e === "focus" ? t.focus() : t.blur());
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
if (
|
|
72
|
+
}, F = (e, t) => {
|
|
73
|
+
c && t.target === g.current || (e === "focus" ? (pe(!0), _ == null || _(t)) : (pe(!1), Y == null || Y(t)));
|
|
74
|
+
}, me = (e) => {
|
|
75
|
+
if (c && e.currentTarget === g.current)
|
|
75
76
|
return;
|
|
76
|
-
e.key === to.key && e.preventDefault(),
|
|
77
|
+
e.key === to.key && e.preventDefault(), K == null || K(e);
|
|
77
78
|
};
|
|
78
79
|
We(() => {
|
|
79
|
-
|
|
80
|
-
}, [h]),
|
|
80
|
+
Z(h ? "focus" : "blur"), c && fe(h ? v.BEFORE : v.NONE);
|
|
81
|
+
}, [h]), ve($, () => ({
|
|
81
82
|
dom: g.current,
|
|
82
83
|
getRootDOMNode: () => g.current,
|
|
83
|
-
focus:
|
|
84
|
-
blur:
|
|
84
|
+
focus: Z.bind(null, "focus"),
|
|
85
|
+
blur: Z.bind(null, "blur"),
|
|
85
86
|
getWidth: () => g.current && g.current.clientWidth
|
|
86
87
|
}));
|
|
87
|
-
const
|
|
88
|
+
const Ve = "arrowIcon" in d ? p === null ? null : /* @__PURE__ */ r("div", { className: `${o}-arrow-icon`, children: p }) : /* @__PURE__ */ r("div", { className: `${o}-arrow-icon`, children: /* @__PURE__ */ r(He, {}) }), Pe = E ? /* @__PURE__ */ r("span", { className: `${o}-loading-icon`, children: /* @__PURE__ */ r(Ke, {}) }) : f ? /* @__PURE__ */ r("span", { className: `${o}-suffix-icon`, children: f }) : d.showSearch && h ? /* @__PURE__ */ r("div", { className: `${o}-search-icon`, children: /* @__PURE__ */ r(Le, {}) }) : Ve, i = {
|
|
88
89
|
paste: xe,
|
|
89
|
-
keyDown:
|
|
90
|
+
keyDown: me,
|
|
90
91
|
focus: (e) => {
|
|
91
|
-
e.stopPropagation(),
|
|
92
|
+
e.stopPropagation(), F("focus", e);
|
|
92
93
|
},
|
|
93
94
|
blur: (e) => {
|
|
94
|
-
e.stopPropagation(),
|
|
95
|
+
e.stopPropagation(), F("blur", e);
|
|
95
96
|
},
|
|
96
97
|
change: (e, t) => {
|
|
97
|
-
fe(
|
|
98
|
+
fe(v.EDITING), L == null || L(e, t);
|
|
98
99
|
}
|
|
99
|
-
},
|
|
100
|
+
}, Ae = () => {
|
|
100
101
|
let e;
|
|
101
102
|
switch (De) {
|
|
102
|
-
case
|
|
103
|
-
e = j || (
|
|
103
|
+
case v.BEFORE:
|
|
104
|
+
e = j || (Ee ? b : "");
|
|
104
105
|
break;
|
|
105
|
-
case
|
|
106
|
+
case v.EDITING:
|
|
106
107
|
e = j || "";
|
|
107
108
|
break;
|
|
108
109
|
default:
|
|
109
110
|
e = b;
|
|
110
111
|
break;
|
|
111
112
|
}
|
|
112
|
-
const t = !!(
|
|
113
|
+
const t = !!(Q && c || G), n = {
|
|
113
114
|
style: { width: "100%" },
|
|
114
115
|
// _inputValue after renderText(value) may be rich text, but the value of <input> cannot be object
|
|
115
116
|
value: t && typeof e != "object" ? e : "",
|
|
116
117
|
// Allow placeholder to display the selected value first when searching
|
|
117
|
-
placeholder:
|
|
118
|
+
placeholder: c && b && typeof b != "object" ? b : ae
|
|
118
119
|
};
|
|
119
|
-
return
|
|
120
|
-
/* @__PURE__ */
|
|
120
|
+
return c ? (n.onPaste = i.paste, n.onKeyDown = i.keyDown, n.onFocus = i.focus, n.onBlur = i.blur, n.onChange = i.change) : (n.tabIndex = -1, n.style.pointerEvents = "none"), /* @__PURE__ */ R("span", { className: `${o}-view-selector`, children: [
|
|
121
|
+
/* @__PURE__ */ r(
|
|
121
122
|
Ze,
|
|
122
123
|
{
|
|
123
124
|
"aria-hidden": !t || void 0,
|
|
124
125
|
ref: S,
|
|
125
126
|
disabled: l,
|
|
126
|
-
className:
|
|
127
|
+
className: C(`${o}-view-input`, {
|
|
127
128
|
[`${o}-hidden`]: !t
|
|
128
129
|
}),
|
|
129
130
|
autoComplete: "off",
|
|
130
|
-
...
|
|
131
|
+
...n
|
|
131
132
|
}
|
|
132
133
|
),
|
|
133
|
-
t ? /* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
134
|
+
t ? /* @__PURE__ */ r("span", { className: `${o}-view-value-mirror`, children: be(n.value ? e : n.placeholder) }) : null,
|
|
135
|
+
/* @__PURE__ */ r(
|
|
135
136
|
"span",
|
|
136
137
|
{
|
|
137
138
|
style: t ? { display: "none" } : {},
|
|
138
139
|
className: `${o}-view-value`,
|
|
139
|
-
children: be(
|
|
140
|
+
children: be(G ? n.placeholder : e)
|
|
140
141
|
}
|
|
141
142
|
)
|
|
142
143
|
] });
|
|
143
|
-
},
|
|
144
|
+
}, ee = Qe(le), Fe = ze(() => {
|
|
144
145
|
if (!N)
|
|
145
146
|
return [];
|
|
146
|
-
const e = we(w) ? [] : [].concat(w), t = [],
|
|
147
|
-
for (let D = 0; D < e.length && !(
|
|
148
|
-
const
|
|
147
|
+
const e = we(w) ? [] : [].concat(w), t = [], n = I(s) ? s.count : s, oe = typeof n == "number";
|
|
148
|
+
for (let D = 0; D < e.length && !(oe && t.length >= n + no); D++) {
|
|
149
|
+
const te = e[D], a = ee(te);
|
|
149
150
|
t.push({
|
|
150
|
-
value:
|
|
151
|
+
value: te,
|
|
151
152
|
label: a.text,
|
|
152
153
|
closable: !a.disabled
|
|
153
154
|
});
|
|
154
155
|
}
|
|
155
156
|
return t;
|
|
156
|
-
}, [w, N, s,
|
|
157
|
-
const e = we(w) ? [] : [].concat(w), t = I(s) ? s.count : s,
|
|
157
|
+
}, [w, N, s, ee]), Re = () => {
|
|
158
|
+
const e = we(w) ? [] : [].concat(w), t = I(s) ? s.count : s, n = (a) => {
|
|
158
159
|
const u = I(s) && _e(s.render) ? s.render(a) : `+${a}...`;
|
|
159
|
-
return
|
|
160
|
+
return ie ? u : /* @__PURE__ */ r(
|
|
160
161
|
eo,
|
|
161
162
|
{
|
|
162
|
-
className:
|
|
163
|
+
className: C(`${de("input-tag")}-tag`, `${o}-tag`),
|
|
163
164
|
children: u
|
|
164
165
|
}
|
|
165
166
|
);
|
|
166
|
-
},
|
|
167
|
+
}, oe = () => {
|
|
167
168
|
for (let a = e.length - 1; a >= 0; a--) {
|
|
168
169
|
const u = e[a];
|
|
169
|
-
if (!
|
|
170
|
+
if (!ee(u).disabled)
|
|
170
171
|
return a;
|
|
171
172
|
}
|
|
172
173
|
return -1;
|
|
173
174
|
}, D = {
|
|
174
|
-
onPaste:
|
|
175
|
-
onKeyDown:
|
|
176
|
-
onFocus:
|
|
177
|
-
onBlur:
|
|
178
|
-
onInputChange:
|
|
179
|
-
onRemove: (a, u,
|
|
180
|
-
const
|
|
181
|
-
let
|
|
182
|
-
|
|
175
|
+
onPaste: i.paste,
|
|
176
|
+
onKeyDown: i.keyDown,
|
|
177
|
+
onFocus: i.focus,
|
|
178
|
+
onBlur: i.blur,
|
|
179
|
+
onInputChange: i.change,
|
|
180
|
+
onRemove: (a, u, re) => {
|
|
181
|
+
const Be = re.key;
|
|
182
|
+
let ne = -1;
|
|
183
|
+
Be === ro.key && (ne = oe()) !== -1 && (a = e[ne], u = ne), s && ke(), q == null || q(a, u, re);
|
|
183
184
|
}
|
|
184
185
|
};
|
|
185
|
-
return /* @__PURE__ */
|
|
186
|
+
return /* @__PURE__ */ r(
|
|
186
187
|
Xe,
|
|
187
188
|
{
|
|
188
189
|
...{
|
|
@@ -193,22 +194,22 @@ const C = {
|
|
|
193
194
|
allowClear: !1,
|
|
194
195
|
labelInValue: !1
|
|
195
196
|
},
|
|
196
|
-
className:
|
|
197
|
+
className: Q ? `${de("input-tag")}-focus` : "",
|
|
197
198
|
ref: S,
|
|
198
199
|
disabled: l,
|
|
199
|
-
dragToSort:
|
|
200
|
+
dragToSort: ce,
|
|
200
201
|
disableInput: !T,
|
|
201
|
-
animation:
|
|
202
|
-
placeholder:
|
|
203
|
-
value:
|
|
202
|
+
animation: V,
|
|
203
|
+
placeholder: ae,
|
|
204
|
+
value: Fe,
|
|
204
205
|
inputValue: j,
|
|
205
|
-
size:
|
|
206
|
+
size: A,
|
|
206
207
|
tagClassName: `${o}-tag`,
|
|
207
|
-
renderTag:
|
|
208
|
-
icon: { removeIcon:
|
|
208
|
+
renderTag: ie,
|
|
209
|
+
icon: { removeIcon: P },
|
|
209
210
|
maxTagCount: s ? {
|
|
210
211
|
count: I(s) ? s.count : s,
|
|
211
|
-
render: t === "responsive" ?
|
|
212
|
+
render: t === "responsive" ? n : () => n(e.length - t),
|
|
212
213
|
popoverProps: { disabled: !0 }
|
|
213
214
|
} : void 0,
|
|
214
215
|
onChange: (a, u) => {
|
|
@@ -217,24 +218,24 @@ const C = {
|
|
|
217
218
|
...D
|
|
218
219
|
}
|
|
219
220
|
);
|
|
220
|
-
}, he = z || (d.error ? "error" : void 0),
|
|
221
|
+
}, he = z || (d.error ? "error" : void 0), Me = !l && !G && k ? /* @__PURE__ */ r(
|
|
221
222
|
qe,
|
|
222
223
|
{
|
|
223
|
-
size:
|
|
224
|
+
size: A,
|
|
224
225
|
className: `${o}-clear-icon`,
|
|
225
226
|
onClick: ye,
|
|
226
|
-
onMouseDown:
|
|
227
|
-
children:
|
|
227
|
+
onMouseDown: X,
|
|
228
|
+
children: m ?? /* @__PURE__ */ r(Ge, {})
|
|
228
229
|
},
|
|
229
230
|
"clearIcon"
|
|
230
|
-
) : null,
|
|
231
|
+
) : null, Oe = C(
|
|
231
232
|
o,
|
|
232
233
|
`${o}-${N ? "multiple" : "single"}`,
|
|
233
234
|
{
|
|
234
235
|
[`${o}-show-search`]: T,
|
|
235
236
|
[`${o}-open`]: h,
|
|
236
|
-
[`${o}-size-${
|
|
237
|
-
[`${o}-focused`]:
|
|
237
|
+
[`${o}-size-${A}`]: A,
|
|
238
|
+
[`${o}-focused`]: Q,
|
|
238
239
|
[`${o}-${he}`]: he,
|
|
239
240
|
[`${o}-disabled`]: l,
|
|
240
241
|
[`${o}-no-border`]: !W,
|
|
@@ -242,7 +243,7 @@ const C = {
|
|
|
242
243
|
},
|
|
243
244
|
U
|
|
244
245
|
);
|
|
245
|
-
return /* @__PURE__ */
|
|
246
|
+
return /* @__PURE__ */ r(
|
|
246
247
|
"div",
|
|
247
248
|
{
|
|
248
249
|
role: "combobox",
|
|
@@ -250,47 +251,47 @@ const C = {
|
|
|
250
251
|
"aria-autocomplete": "list",
|
|
251
252
|
"aria-expanded": h,
|
|
252
253
|
"aria-disabled": l,
|
|
253
|
-
"aria-controls":
|
|
254
|
+
"aria-controls": Ce,
|
|
254
255
|
...oo(Se, ["onClick", "onMouseEnter", "onMouseLeave"]),
|
|
255
256
|
...$e,
|
|
256
257
|
ref: g,
|
|
257
258
|
tabIndex: l ? -1 : 0,
|
|
258
|
-
id:
|
|
259
|
-
style:
|
|
260
|
-
className:
|
|
261
|
-
onKeyDown:
|
|
259
|
+
id: O,
|
|
260
|
+
style: B,
|
|
261
|
+
className: Oe,
|
|
262
|
+
onKeyDown: me,
|
|
262
263
|
onFocus: (e) => {
|
|
263
|
-
!l && !
|
|
264
|
+
!l && !ce && (c ? S.current && S.current.focus() : F("focus", e));
|
|
264
265
|
},
|
|
265
|
-
onBlur: (e) =>
|
|
266
|
+
onBlur: (e) => F("blur", e),
|
|
266
267
|
children: /* @__PURE__ */ R(
|
|
267
268
|
"div",
|
|
268
269
|
{
|
|
269
270
|
title: typeof b == "string" ? b : void 0,
|
|
270
|
-
className:
|
|
271
|
-
[`${o}-view-with-prefix`]:
|
|
271
|
+
className: C(`${o}-view`, {
|
|
272
|
+
[`${o}-view-with-prefix`]: H
|
|
272
273
|
}),
|
|
273
|
-
onClick: (e) => h &&
|
|
274
|
+
onClick: (e) => h && c && e.stopPropagation(),
|
|
274
275
|
children: [
|
|
275
|
-
|
|
276
|
+
H && /* @__PURE__ */ r(
|
|
276
277
|
"div",
|
|
277
278
|
{
|
|
278
279
|
"aria-hidden": "true",
|
|
279
|
-
className:
|
|
280
|
-
onMouseDown: (e) =>
|
|
281
|
-
children:
|
|
280
|
+
className: C(`${o}-prefix`),
|
|
281
|
+
onMouseDown: (e) => J && X(e),
|
|
282
|
+
children: H
|
|
282
283
|
}
|
|
283
284
|
),
|
|
284
|
-
N ? Re() :
|
|
285
|
+
N ? Re() : Ae(),
|
|
285
286
|
/* @__PURE__ */ R(
|
|
286
287
|
"div",
|
|
287
288
|
{
|
|
288
289
|
"aria-hidden": "true",
|
|
289
290
|
className: `${o}-suffix`,
|
|
290
|
-
onMouseDown: (e) =>
|
|
291
|
+
onMouseDown: (e) => J && X(e),
|
|
291
292
|
children: [
|
|
292
|
-
|
|
293
|
-
|
|
293
|
+
Me,
|
|
294
|
+
Pe
|
|
294
295
|
]
|
|
295
296
|
}
|
|
296
297
|
)
|
|
@@ -299,59 +300,59 @@ const C = {
|
|
|
299
300
|
)
|
|
300
301
|
}
|
|
301
302
|
);
|
|
302
|
-
}), ao = (
|
|
303
|
+
}), ao = (M, d) => {
|
|
303
304
|
const {
|
|
304
305
|
prefixCls: $,
|
|
305
|
-
id:
|
|
306
|
-
style:
|
|
306
|
+
id: O,
|
|
307
|
+
style: B,
|
|
307
308
|
className: U,
|
|
308
309
|
addBefore: x,
|
|
309
310
|
rtl: W,
|
|
310
311
|
renderView: k,
|
|
311
312
|
autoWidth: y,
|
|
312
313
|
...z
|
|
313
|
-
} =
|
|
314
|
+
} = M, E = y ? {
|
|
314
315
|
minWidth: 0,
|
|
315
316
|
maxWidth: "100%",
|
|
316
317
|
...I(y) ? y : {}
|
|
317
|
-
} : null, l =
|
|
318
|
-
id:
|
|
319
|
-
style: { ...
|
|
318
|
+
} : null, l = se(null), V = x != null, f = V || !1, p = {
|
|
319
|
+
id: O,
|
|
320
|
+
style: { ...E, width: E ? "auto" : void 0, ...B },
|
|
320
321
|
className: U
|
|
321
|
-
},
|
|
322
|
-
|
|
322
|
+
}, P = je(z);
|
|
323
|
+
ve(
|
|
323
324
|
d,
|
|
324
325
|
() => l.current
|
|
325
326
|
);
|
|
326
|
-
let
|
|
327
|
+
let m = /* @__PURE__ */ r(
|
|
327
328
|
so,
|
|
328
329
|
{
|
|
329
|
-
...
|
|
330
|
+
...M,
|
|
330
331
|
ref: l,
|
|
331
|
-
id: f ? void 0 :
|
|
332
|
-
style: f ? void 0 :
|
|
333
|
-
className: f ? void 0 :
|
|
334
|
-
htmlDataAttributes: f ? {} :
|
|
332
|
+
id: f ? void 0 : p.id,
|
|
333
|
+
style: f ? void 0 : p.style,
|
|
334
|
+
className: f ? void 0 : p.className,
|
|
335
|
+
htmlDataAttributes: f ? {} : P
|
|
335
336
|
}
|
|
336
337
|
);
|
|
337
|
-
return typeof k == "function" && (
|
|
338
|
+
return typeof k == "function" && (m = k(m)), f ? /* @__PURE__ */ R(
|
|
338
339
|
"div",
|
|
339
340
|
{
|
|
340
|
-
...
|
|
341
|
-
...
|
|
342
|
-
className:
|
|
341
|
+
...P,
|
|
342
|
+
...p,
|
|
343
|
+
className: C(
|
|
343
344
|
`${$}-wrapper`,
|
|
344
345
|
{
|
|
345
346
|
[`${$}-wrapper-rtl`]: W
|
|
346
347
|
},
|
|
347
|
-
|
|
348
|
+
p.className
|
|
348
349
|
),
|
|
349
350
|
children: [
|
|
350
|
-
|
|
351
|
-
|
|
351
|
+
V && /* @__PURE__ */ r("div", { className: `${$}-addbefore`, children: x }),
|
|
352
|
+
m
|
|
352
353
|
]
|
|
353
354
|
}
|
|
354
|
-
) :
|
|
355
|
+
) : m;
|
|
355
356
|
}, lo = Ne.forwardRef(
|
|
356
357
|
ao
|
|
357
358
|
);
|
package/Skeleton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n, jsxs as k } from "react/jsx-runtime";
|
|
2
2
|
import y from "lodash/isPlainObject";
|
|
3
3
|
import v, { forwardRef as w, useContext as S } from "react";
|
|
4
|
-
import { a as j } from "./chunk/
|
|
4
|
+
import { a as j } from "./chunk/Lyg-9NEt.js";
|
|
5
5
|
import b from "./hooks/useMergeProps.js";
|
|
6
6
|
import p from "@unicom-cloud/utils/class-name";
|
|
7
7
|
import { pickDataAttributes as A } from "./utils/pick.js";
|
package/Slider.js
CHANGED
|
@@ -4,7 +4,7 @@ import he from "lodash/isArray";
|
|
|
4
4
|
import L from "lodash/isFunction";
|
|
5
5
|
import re from "lodash/isPlainObject";
|
|
6
6
|
import _, { useState as Se, useContext as Ee, useMemo as Z, useRef as S, useEffect as Le, createElement as De, useCallback as H, forwardRef as st } from "react";
|
|
7
|
-
import { a as Be } from "./chunk/
|
|
7
|
+
import { a as Be } from "./chunk/Lyg-9NEt.js";
|
|
8
8
|
import at from "./hooks/useMergeProps.js";
|
|
9
9
|
import Fe from "./hooks/useMergeValue.js";
|
|
10
10
|
import ut from "./hooks/useUpdateEffect.js";
|
|
@@ -15,7 +15,7 @@ import ne from "lodash/isNumber";
|
|
|
15
15
|
import ct from "lodash/isString";
|
|
16
16
|
import ft from "./hooks/useKeyboardEvent.js";
|
|
17
17
|
import mt from "./Trigger.js";
|
|
18
|
-
import { a as Te } from "./chunk/
|
|
18
|
+
import { a as Te } from "./chunk/CyVLxv_U.js";
|
|
19
19
|
import { isEmptyObject as dt } from "@unicom-cloud/utils/is";
|
|
20
20
|
import gt from "lodash/isUndefined";
|
|
21
21
|
const pt = { maxWidth: 350 }, ht = {
|
package/Space.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as d, jsxs as z } from "react/jsx-runtime";
|
|
|
2
2
|
import A from "lodash/isArray";
|
|
3
3
|
import M from "lodash/isNumber";
|
|
4
4
|
import P, { forwardRef as b, useContext as j, Fragment as k } from "react";
|
|
5
|
-
import { a as F } from "./chunk/
|
|
5
|
+
import { a as F } from "./chunk/Lyg-9NEt.js";
|
|
6
6
|
import D from "./hooks/useMergeProps.js";
|
|
7
7
|
import E from "@unicom-cloud/utils/class-name";
|
|
8
8
|
import { isFragment as H } from "react-is";
|
package/Spin.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as i, jsxs as u, Fragment as x } from "react/jsx-runtime";
|
|
|
2
2
|
import E from "@unicom-cloud/icons/IconUiLoading";
|
|
3
3
|
import P from "lodash/debounce";
|
|
4
4
|
import C, { useContext as b, useState as j, useCallback as _, useRef as A, useImperativeHandle as D, useEffect as F } from "react";
|
|
5
|
-
import { a as L } from "./chunk/
|
|
5
|
+
import { a as L } from "./chunk/Lyg-9NEt.js";
|
|
6
6
|
import H from "./hooks/useMergeProps.js";
|
|
7
7
|
import v from "@unicom-cloud/utils/class-name";
|
|
8
8
|
import { isEmptyReactNode as M } from "./utils/is.js";
|
package/Statistic.js
CHANGED
|
@@ -4,7 +4,7 @@ import q from "dayjs";
|
|
|
4
4
|
import L from "lodash/isFunction";
|
|
5
5
|
import M from "lodash/isNumber";
|
|
6
6
|
import { forwardRef as W, useContext as Y, useState as H, useRef as O, useEffect as z, useImperativeHandle as ne, useMemo as re } from "react";
|
|
7
|
-
import { a as A } from "./chunk/
|
|
7
|
+
import { a as A } from "./chunk/Lyg-9NEt.js";
|
|
8
8
|
import oe from "./hooks/useMergeProps.js";
|
|
9
9
|
import ae from "./Skeleton.js";
|
|
10
10
|
import B from "@unicom-cloud/utils/class-name";
|
package/Steps.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as k, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import E, { forwardRef as I, useContext as L } from "react";
|
|
3
|
-
import { a as M } from "./chunk/
|
|
3
|
+
import { a as M } from "./chunk/Lyg-9NEt.js";
|
|
4
4
|
import W from "./hooks/useMergeProps.js";
|
|
5
5
|
import R from "@unicom-cloud/utils/class-name";
|
|
6
6
|
import { pickDataAttributes as q } from "./utils/pick.js";
|
package/Switch.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsxs as d, jsx as r, Fragment as R } from "react/jsx-runtime";
|
|
2
2
|
import q from "@unicom-cloud/icons/IconUiLoading";
|
|
3
|
-
import {
|
|
3
|
+
import { h as A, P as x } from "./chunk/DQ3uFRJD.js";
|
|
4
4
|
import B from "lodash/isArray";
|
|
5
5
|
import { forwardRef as L, useContext as M, useState as O } from "react";
|
|
6
|
-
import { a as Q } from "./chunk/
|
|
6
|
+
import { a as Q } from "./chunk/Lyg-9NEt.js";
|
|
7
7
|
import U from "./hooks/useMergeProps.js";
|
|
8
8
|
import W from "@unicom-cloud/utils/class-name";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import "./utils/is.js";
|
|
10
|
+
import D from "./utils/omit.js";
|
|
11
|
+
import { isPlainObject as G } from "@unicom-cloud/utils/is";
|
|
11
12
|
const J = {
|
|
12
13
|
type: "circle"
|
|
13
14
|
};
|
|
@@ -22,19 +23,19 @@ function K(N, $) {
|
|
|
22
23
|
J,
|
|
23
24
|
a == null ? void 0 : a.Switch
|
|
24
25
|
), {
|
|
25
|
-
className:
|
|
26
|
+
className: P,
|
|
26
27
|
children: t,
|
|
27
|
-
style:
|
|
28
|
+
style: g = {},
|
|
28
29
|
disabled: b,
|
|
29
30
|
size: I,
|
|
30
31
|
loading: l,
|
|
31
32
|
onChange: m,
|
|
32
33
|
type: h,
|
|
33
|
-
checkedText:
|
|
34
|
-
uncheckedText:
|
|
34
|
+
checkedText: v,
|
|
35
|
+
uncheckedText: z,
|
|
35
36
|
checkedIcon: k,
|
|
36
37
|
uncheckedIcon: p,
|
|
37
|
-
...
|
|
38
|
+
...T
|
|
38
39
|
} = i, e = S("switch"), f = I || y, [j, _] = O(
|
|
39
40
|
i.value ?? // 潘启宝添加,接收 FormItem 里传来的数据
|
|
40
41
|
i.defaultChecked
|
|
@@ -50,15 +51,15 @@ function K(N, $) {
|
|
|
50
51
|
[`${e}-loading`]: l,
|
|
51
52
|
[`${e}-rtl`]: w
|
|
52
53
|
},
|
|
53
|
-
|
|
54
|
+
P
|
|
54
55
|
);
|
|
55
|
-
let s =
|
|
56
|
+
let s = v, o = z;
|
|
56
57
|
t && B(t) ? (s = t.find(
|
|
57
58
|
(n) => n.key === "open"
|
|
58
59
|
), o = t.find(
|
|
59
60
|
(n) => n.key === "close"
|
|
60
|
-
)) : t &&
|
|
61
|
-
const H =
|
|
61
|
+
)) : t && G(t) && (t.key === "open" ? s = t : t.key === "close" && (o = t));
|
|
62
|
+
const H = D(T, ["onChange", "checked", "error"]);
|
|
62
63
|
return /* @__PURE__ */ d(
|
|
63
64
|
"button",
|
|
64
65
|
{
|
|
@@ -67,7 +68,7 @@ function K(N, $) {
|
|
|
67
68
|
"aria-checked": !!c,
|
|
68
69
|
tabIndex: l ? -1 : void 0,
|
|
69
70
|
...H,
|
|
70
|
-
style:
|
|
71
|
+
style: g,
|
|
71
72
|
className: F,
|
|
72
73
|
disabled: b,
|
|
73
74
|
onClick: E,
|