@unicom-cloud/ui 0.8.61 → 0.8.62
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 +44 -40
- package/Anchor.js +1 -1
- package/AutoComplete.js +4 -4
- package/Avatar.js +1 -1
- package/BackTop.js +7 -7
- package/Badge.js +2 -2
- package/Breadcrumb.js +22 -22
- package/Button.js +2 -2
- package/Calendar.js +106 -104
- package/Card.js +1 -1
- package/Carousel.js +34 -33
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +12 -12
- package/Comment.js +1 -1
- package/ConfigProvider.js +2 -2
- package/Copy.js +16 -16
- package/DatePicker.js +165 -162
- package/Descriptions.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Drawer.js +1 -1
- package/Dropdown.js +9 -9
- package/Empty.js +2 -2
- package/Form.js +60 -54
- package/Grid.js +2 -2
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/Input.js +1 -1
- package/InputNumber.js +6 -6
- package/InputTag.js +1 -1
- package/Layout.js +2 -2
- package/Link.js +14 -14
- 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 +9 -3
- package/Notification.js +2 -2
- package/OverflowEllipsis.js +32 -32
- package/PageHeader.js +23 -22
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +7 -7
- package/Popover.js +1 -1
- package/Progress.js +14 -14
- package/Radio.js +2 -2
- package/Rate.js +43 -40
- package/ResizeBox.js +97 -96
- package/Result.js +15 -15
- package/Select.js +1 -1
- package/SelectView.js +295 -249
- package/Skeleton.js +1 -1
- package/Slider.js +25 -25
- package/Space.js +1 -1
- package/SpeechSynthesis.js +32 -29
- package/Spin.js +2 -2
- package/Statistic.js +1 -1
- package/Steps.js +11 -11
- package/Switch.js +3 -3
- package/Table.js +9 -9
- package/Tabs.js +1 -1
- package/Tag.js +68 -67
- package/TimePicker.js +17 -17
- package/Timeline.js +1 -1
- package/Tooltip.js +1 -1
- package/Transfer.js +47 -46
- package/Tree.js +2 -2
- package/TreeSelect.js +1 -1
- package/Trigger.js +3 -3
- package/Typography.js +1 -1
- package/Upload.js +2 -2
- package/VerificationCode.js +1 -1
- package/Version.js +1 -1
- package/Watermark.js +1 -1
- package/chunk/{V6euPXVB.js → -Z968QpN.js} +257 -251
- package/chunk/{IooeSKJJ.js → AqH9yP_J.js} +19 -19
- package/chunk/{cZiP8FvM.js → B0oDiPqE.js} +1 -1
- package/chunk/{B16KHtX-.js → B4-WpgY2.js} +191 -185
- package/chunk/{CuOl4X0X.js → B8SZFOjt.js} +1 -1
- package/chunk/{CbiWdbr_.js → BXWxA-tS.js} +35 -34
- package/chunk/{DpfUGhi4.js → BlNFmhNa.js} +288 -283
- package/chunk/{C1xMmQIZ.js → BmO1y0vr.js} +34 -34
- package/chunk/{Kbr6FzOG.js → BnqeQYIZ.js} +210 -186
- package/chunk/{BPZ-6HKJ.js → Bp3XomF8.js} +1 -2
- package/chunk/BsWphzcT.js +20 -0
- package/chunk/{RMBPs_Ry.js → C4eJ9vCf.js} +4 -3
- package/chunk/{BNHrEI0Y.js → C6fEFlPt.js} +52 -48
- package/chunk/C8o-VGyc.js +376 -0
- package/chunk/{eK7lxdak.js → CDJ1EnJ2.js} +8 -8
- package/chunk/{C5AQWbC4.js → CHyuuVxl.js} +1 -1
- package/chunk/{B2vORJQ8.js → CJnshq6A.js} +13 -13
- package/chunk/CT1lZ7ss.js +116 -0
- package/chunk/{Bdh4XVuf.js → CV1kLw5Z.js} +290 -281
- package/chunk/{DmUhn9ib.js → CazXy0r4.js} +54 -53
- package/chunk/{BBVjSFnw.js → Cqyp4qni.js} +23 -19
- package/chunk/{BJ_7JTqC.js → D3VMG9V1.js} +1 -1
- package/chunk/{D2HkyI6A.js → DGasAUHE.js} +2 -2
- package/chunk/{YIlBPVAs.js → DRQ1v6Ux.js} +1 -1
- package/chunk/{DhBo0pPJ.js → DRp7voqz.js} +119 -118
- package/chunk/{gIbzjQ-X.js → Dtm4BmKB.js} +2 -2
- package/chunk/{BEDYCG-I.js → KchYsivk.js} +18 -18
- package/chunk/{Cbd50gx8.js → Wum88vrW.js} +33 -33
- package/chunk/{BjSHZA0m.js → mfn4EgmQ.js} +1 -1
- package/chunk/{BYhtrDV3.js → nbEvdwT0.js} +152 -148
- package/chunk/{C1D7T29r.js → qpd2axxs.js} +83 -76
- package/chunk/{BVLwPZis.js → tOFzwzpT.js} +31 -30
- package/chunk/{DSGRHf-1.js → yESVS-qX.js} +157 -156
- package/hooks/useMergeValue.js +1 -1
- package/icons.js +4 -6001
- package/index.js +420 -392
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/cascader/panel/Search.d.ts +1 -1
- package/types/config-provider/interface.d.ts +1 -1
- package/types/form/interface.d.ts +1 -1
- package/types/index.d.ts +1 -1
- package/types/message/index.d.ts +2 -2
- package/types/notification/index.d.ts +2 -2
- package/types/notification-base/index.d.ts +2 -2
- package/types/select/interface.d.ts +1 -0
- package/types/select-view/interface.d.ts +1 -0
- package/types/tree/Context.d.ts +1 -0
- package/types/tree/Tree.d.ts +1 -1
- package/types/tree/index.d.ts +5 -4
- package/types/tree/interface.d.ts +1 -0
- package/types/utils/index.d.ts +1 -0
- package/types/utils/lodash.d.ts +14 -1
- package/types/version/index.d.ts +1 -1
- package/utils/CSSTransition.js +1 -1
- package/utils/caseName.js +2 -18
- package/utils/contextHolder.js +1 -1
- package/utils/index.js +220 -191
- package/utils/is.js +68 -67
- package/utils/lodash.js +32 -6
- package/utils/reactDOM.js +1 -1
- package/chunk/-LZOUh53.js +0 -29
- package/chunk/-jdfq71f.js +0 -23
- package/chunk/B0GOLsj_.js +0 -58
- package/chunk/B7Zsp3gO.js +0 -29
- package/chunk/BDjXkzNj.js +0 -23
- package/chunk/BHn4xgbv.js +0 -209
- package/chunk/BLSiP_gg.js +0 -32
- package/chunk/BMJfSSLX.js +0 -23
- package/chunk/B_nfMl0e.js +0 -116
- package/chunk/BcS17Pzy.js +0 -66
- package/chunk/BdiEwtQO.js +0 -41
- package/chunk/Bpug_KxP.js +0 -34
- package/chunk/C1u_ckwU.js +0 -29
- package/chunk/C43Hv2Bl.js +0 -34
- package/chunk/C9vsih_D.js +0 -29
- package/chunk/CAfR2wLq.js +0 -41
- package/chunk/CAfecMDF.js +0 -46
- package/chunk/CKp4rZnD.js +0 -207
- package/chunk/CV2Aqv9q.js +0 -52
- package/chunk/CYdarMv9.js +0 -32
- package/chunk/C_S5Mdvd.js +0 -379
- package/chunk/CmB-TL7C.js +0 -46
- package/chunk/D-ER56Sf.js +0 -29
- package/chunk/D-aYnb6u.js +0 -41
- package/chunk/D3xQFJcO.js +0 -23
- package/chunk/DJcEys80.js +0 -29
- package/chunk/DLIm6rRJ.js +0 -29
- package/chunk/DOWEHtqM.js +0 -41
- package/chunk/DT37l12z.js +0 -40
- package/chunk/DW-B7npC.js +0 -23
- package/chunk/D_MTFBb0.js +0 -38
- package/chunk/Dx_5J4fO.js +0 -29
- package/chunk/Dy487FZ1.js +0 -118
- package/chunk/Uz-rNulO.js +0 -98
- package/chunk/cDZI_t6o.js +0 -52
- package/chunk/sScV-J56.js +0 -206
- package/chunk/wI2I1qb0.js +0 -23
package/ResizeBox.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as m, jsxs as ft } from "react/jsx-runtime";
|
|
2
2
|
import vt from "lodash/isNumber";
|
|
3
|
-
import Wt, { useContext as
|
|
4
|
-
import { d as
|
|
3
|
+
import Wt, { useContext as ut, useRef as F, useEffect as lt, forwardRef as Ct, useState as ct, useImperativeHandle as zt } from "react";
|
|
4
|
+
import { d as mt } from "./chunk/CV1kLw5Z.js";
|
|
5
5
|
import { useMergeProps as Bt } from "./hooks/useMergeProps.js";
|
|
6
|
-
import { useMergeValue as
|
|
6
|
+
import { useMergeValue as Tt } from "./hooks/useMergeValue.js";
|
|
7
7
|
import { y as P } from "./chunk/BzPkh4Zv.js";
|
|
8
8
|
import { on as y, off as $ } from "./utils/dom.js";
|
|
9
9
|
import Mt from "./utils/omit.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
10
|
+
import Yt from "@unicom-cloud/icons/IconUiCaretDown";
|
|
11
|
+
import It from "@unicom-cloud/icons/IconUiCaretLeft";
|
|
12
|
+
import bt from "@unicom-cloud/icons/IconUiCaretRight";
|
|
13
|
+
import Ft from "@unicom-cloud/icons/IconUiCaretUp";
|
|
14
|
+
import kt from "@unicom-cloud/icons/IconUiDragDot";
|
|
15
|
+
import Ut from "@unicom-cloud/icons/IconUiDragDotVertical";
|
|
15
16
|
import wt from "lodash/isFunction";
|
|
16
17
|
import "./utils/is.js";
|
|
17
18
|
import st from "lodash/isPlainObject";
|
|
@@ -21,44 +22,44 @@ import St from "lodash/isUndefined";
|
|
|
21
22
|
function Nt(r) {
|
|
22
23
|
const {
|
|
23
24
|
className: ot,
|
|
24
|
-
direction:
|
|
25
|
+
direction: g,
|
|
25
26
|
icon: q,
|
|
26
27
|
onMouseDown: J,
|
|
27
28
|
onResize: x,
|
|
28
29
|
children: K,
|
|
29
30
|
collapsible: z = {},
|
|
30
31
|
resizable: X = !0,
|
|
31
|
-
renderChildren:
|
|
32
|
+
renderChildren: I,
|
|
32
33
|
...Q
|
|
33
|
-
} = r, { getPrefixCls: rt, rtl: M } =
|
|
34
|
+
} = r, { getPrefixCls: rt, rtl: M } = ut(mt), d = rt("resizebox-trigger"), D = g === "horizontal", N = M && !D, T = P(
|
|
34
35
|
d,
|
|
35
36
|
`${d}-${D ? "horizontal" : "vertical"}`,
|
|
36
37
|
{ [`${d}-not-resizable`]: !X },
|
|
37
38
|
{ [`${d}-rtl`]: M },
|
|
38
39
|
ot
|
|
39
|
-
), l = F(), k = N ? [/* @__PURE__ */
|
|
40
|
+
), l = F(), k = N ? [/* @__PURE__ */ m(bt, {}, "prev"), /* @__PURE__ */ m(It, {}, "next")] : [/* @__PURE__ */ m(It, {}, "prev"), /* @__PURE__ */ m(bt, {}, "next")], b = st(z.prev) ? {
|
|
40
41
|
...z.prev,
|
|
41
|
-
icon: z.prev.icon || (D ? /* @__PURE__ */
|
|
42
|
+
icon: z.prev.icon || (D ? /* @__PURE__ */ m(Ft, {}) : k[0])
|
|
42
43
|
} : {}, E = st(z.next) ? {
|
|
43
44
|
...z.next,
|
|
44
|
-
icon: z.next.icon || (D ? /* @__PURE__ */
|
|
45
|
-
} : {}, U = () => b.icon && !b.collapsed || E.collapsed ? /* @__PURE__ */
|
|
45
|
+
icon: z.next.icon || (D ? /* @__PURE__ */ m(Yt, {}) : k[1])
|
|
46
|
+
} : {}, U = () => b.icon && !b.collapsed || E.collapsed ? /* @__PURE__ */ m(
|
|
46
47
|
"span",
|
|
47
48
|
{
|
|
48
49
|
className: P(`${d}-icon`, P(`${d}-prev`)),
|
|
49
50
|
onClick: b.onClick,
|
|
50
51
|
children: b.icon
|
|
51
52
|
}
|
|
52
|
-
) : /* @__PURE__ */
|
|
53
|
+
) : /* @__PURE__ */ m("span", { className: P(`${d}-icon-empty`) }), tt = () => E.icon && !E.collapsed || b.collapsed ? /* @__PURE__ */ m(
|
|
53
54
|
"span",
|
|
54
55
|
{
|
|
55
56
|
className: P(`${d}-icon`, P(`${d}-next`)),
|
|
56
57
|
onClick: E.onClick,
|
|
57
58
|
children: E.icon
|
|
58
59
|
}
|
|
59
|
-
) : /* @__PURE__ */
|
|
60
|
+
) : /* @__PURE__ */ m("span", { className: P(`${d}-icon-empty`) }), w = () => X ? /* @__PURE__ */ m("span", { className: `${d}-icon`, children: q || (D ? /* @__PURE__ */ m(kt, {}) : /* @__PURE__ */ m(Ut, {})) }) : /* @__PURE__ */ m("span", { className: P(`${d}-icon-empty`) }), O = U(), f = w(), h = tt(), V = () => /* @__PURE__ */ ft("div", { className: `${d}-icon-wrapper`, children: [
|
|
60
61
|
O,
|
|
61
|
-
|
|
62
|
+
f,
|
|
62
63
|
h
|
|
63
64
|
] });
|
|
64
65
|
return X ? (lt(() => {
|
|
@@ -67,37 +68,37 @@ function Nt(r) {
|
|
|
67
68
|
var H, _;
|
|
68
69
|
l.current && ((H = i == null ? void 0 : i.unobserve) == null || H.call(i, l.current)), (_ = i == null ? void 0 : i.disconnect) == null || _.call(i), i = null;
|
|
69
70
|
};
|
|
70
|
-
}, [l.current]), /* @__PURE__ */
|
|
71
|
+
}, [l.current]), /* @__PURE__ */ m(
|
|
71
72
|
"div",
|
|
72
73
|
{
|
|
73
74
|
ref: l,
|
|
74
75
|
...Mt(Q, ["style"]),
|
|
75
|
-
className:
|
|
76
|
+
className: T,
|
|
76
77
|
onMouseDown: J,
|
|
77
|
-
children: wt(
|
|
78
|
+
children: wt(I) ? I(O, f, h) : K || V()
|
|
78
79
|
}
|
|
79
|
-
)) : /* @__PURE__ */
|
|
80
|
+
)) : /* @__PURE__ */ m("div", { className: T, children: wt(I) ? I(O, f, h) : K || V() });
|
|
80
81
|
}
|
|
81
82
|
const dt = "horizontal", Pt = "vertical";
|
|
82
83
|
function Lt(r, ot) {
|
|
83
84
|
const {
|
|
84
|
-
style:
|
|
85
|
+
style: g,
|
|
85
86
|
className: q,
|
|
86
87
|
component: J = "div",
|
|
87
88
|
direction: x = "horizontal",
|
|
88
89
|
icon: K,
|
|
89
90
|
size: z = 0.5,
|
|
90
91
|
min: X,
|
|
91
|
-
max:
|
|
92
|
+
max: I,
|
|
92
93
|
panes: Q,
|
|
93
94
|
disabled: rt,
|
|
94
95
|
trigger: M
|
|
95
|
-
} = r, { getPrefixCls: d, rtl: D } =
|
|
96
|
+
} = r, { getPrefixCls: d, rtl: D } = ut(mt), N = d("resizebox-split"), T = x.includes(dt), l = x.includes("reverse"), k = T && D, b = !T, E = P(
|
|
96
97
|
N,
|
|
97
|
-
`${N}-${
|
|
98
|
+
`${N}-${T ? dt : Pt}`,
|
|
98
99
|
{ [`${N}-rtl`]: D },
|
|
99
100
|
q
|
|
100
|
-
), [U, tt] = Q, w = typeof z == "string", [O,
|
|
101
|
+
), [U, tt] = Q, w = typeof z == "string", [O, f] = ct(parseFloat(z)), [h, V] = ct(0), i = F({
|
|
101
102
|
startX: 0,
|
|
102
103
|
startY: 0,
|
|
103
104
|
startWidth: 0,
|
|
@@ -110,11 +111,11 @@ function Lt(r, ot) {
|
|
|
110
111
|
return parseFloat(t) / parseFloat(e);
|
|
111
112
|
}
|
|
112
113
|
function W(t, e, n, o) {
|
|
113
|
-
const s = typeof X == "string" ? L(parseFloat(X), t) : X || 0, a = typeof
|
|
114
|
-
let
|
|
115
|
-
|
|
116
|
-
let A = w ? e + (o - n) *
|
|
117
|
-
t * e + (o - n) *
|
|
114
|
+
const s = typeof X == "string" ? L(parseFloat(X), t) : X || 0, a = typeof I == "string" ? L(parseFloat(I), t) : I || 1;
|
|
115
|
+
let u = l ? -1 : 1;
|
|
116
|
+
u *= k ? -1 : 1;
|
|
117
|
+
let A = w ? e + (o - n) * u : L(
|
|
118
|
+
t * e + (o - n) * u,
|
|
118
119
|
t
|
|
119
120
|
);
|
|
120
121
|
const nt = w ? s * t : s, B = w ? a * t : a;
|
|
@@ -127,7 +128,7 @@ function Lt(r, ot) {
|
|
|
127
128
|
function j(t) {
|
|
128
129
|
var e;
|
|
129
130
|
if (i.current.moving) {
|
|
130
|
-
const n =
|
|
131
|
+
const n = T ? W(
|
|
131
132
|
i.current.startWidth,
|
|
132
133
|
i.current.startOffset,
|
|
133
134
|
i.current.startX,
|
|
@@ -138,7 +139,7 @@ function Lt(r, ot) {
|
|
|
138
139
|
i.current.startY,
|
|
139
140
|
t.pageY
|
|
140
141
|
);
|
|
141
|
-
|
|
142
|
+
f(n), (e = r.onMoving) == null || e.call(r, t, w ? `${n}px` : n);
|
|
142
143
|
}
|
|
143
144
|
}
|
|
144
145
|
function Z() {
|
|
@@ -158,9 +159,9 @@ function Lt(r, ot) {
|
|
|
158
159
|
(t = r.onPaneResize) == null || t.call(r, _.current);
|
|
159
160
|
}, [O, h]), Vt(() => {
|
|
160
161
|
const t = parseFloat(z);
|
|
161
|
-
O !== t &&
|
|
162
|
+
O !== t && f(t);
|
|
162
163
|
}, [z]);
|
|
163
|
-
const v = J, p = /* @__PURE__ */
|
|
164
|
+
const v = J, p = /* @__PURE__ */ m(
|
|
164
165
|
"div",
|
|
165
166
|
{
|
|
166
167
|
className: P(`${N}-pane`, "first-pane"),
|
|
@@ -170,7 +171,7 @@ function Lt(r, ot) {
|
|
|
170
171
|
},
|
|
171
172
|
children: U
|
|
172
173
|
}
|
|
173
|
-
), R = /* @__PURE__ */
|
|
174
|
+
), R = /* @__PURE__ */ m(
|
|
174
175
|
"div",
|
|
175
176
|
{
|
|
176
177
|
className: P(`${N}-pane`, "second-pane"),
|
|
@@ -180,9 +181,9 @@ function Lt(r, ot) {
|
|
|
180
181
|
children: tt
|
|
181
182
|
}
|
|
182
183
|
), S = l ? [R, p] : [p, R];
|
|
183
|
-
return /* @__PURE__ */
|
|
184
|
+
return /* @__PURE__ */ ft(v, { style: g, className: E, ref: H, children: [
|
|
184
185
|
S[0],
|
|
185
|
-
!rt && /* @__PURE__ */
|
|
186
|
+
!rt && /* @__PURE__ */ m(
|
|
186
187
|
Nt,
|
|
187
188
|
{
|
|
188
189
|
className: `${N}-trigger`,
|
|
@@ -201,34 +202,34 @@ Et.displayName = "ResizeBoxSplit";
|
|
|
201
202
|
const ht = "horizontal", Dt = "vertical";
|
|
202
203
|
function Gt(r, ot) {
|
|
203
204
|
const {
|
|
204
|
-
panes:
|
|
205
|
+
panes: g,
|
|
205
206
|
style: q,
|
|
206
207
|
className: J,
|
|
207
208
|
component: x = "div",
|
|
208
209
|
direction: K = "horizontal",
|
|
209
210
|
icon: z,
|
|
210
211
|
...X
|
|
211
|
-
} = r, { getPrefixCls:
|
|
212
|
-
new Array(
|
|
212
|
+
} = r, { getPrefixCls: I, rtl: Q } = ut(mt), rt = 1 / g.length, M = F(), d = F(
|
|
213
|
+
new Array(g.length).fill({
|
|
213
214
|
moving: !1,
|
|
214
215
|
startOffset: 0,
|
|
215
216
|
startPosition: 0
|
|
216
217
|
})
|
|
217
|
-
), D = F([]), N = F(0),
|
|
218
|
-
new Array(
|
|
218
|
+
), D = F([]), N = F(0), T = F([]), [l, k] = ct(
|
|
219
|
+
new Array(g.length).fill(rt)
|
|
219
220
|
), [b, E] = ct(!1), [U, tt] = ct(
|
|
220
|
-
new Array(
|
|
221
|
+
new Array(g.length).fill(0)
|
|
221
222
|
), [w, O] = ct(
|
|
222
|
-
new Array(Math.max(
|
|
223
|
-
),
|
|
224
|
-
|
|
225
|
-
`${
|
|
226
|
-
{ [`${
|
|
227
|
-
{ [`${
|
|
223
|
+
new Array(Math.max(g.length - 1, 0)).fill({ prev: !1, next: !1 })
|
|
224
|
+
), f = I("resizebox-split-group"), h = K === ht, V = h && Q, i = !h, H = P(
|
|
225
|
+
f,
|
|
226
|
+
`${f}-${h ? ht : Dt}`,
|
|
227
|
+
{ [`${f}-moving`]: b },
|
|
228
|
+
{ [`${f}-rtl`]: Q },
|
|
228
229
|
J
|
|
229
230
|
), _ = x, L = () => {
|
|
230
231
|
let t = [];
|
|
231
|
-
|
|
232
|
+
g.forEach((s) => {
|
|
232
233
|
const { size: a } = s;
|
|
233
234
|
St(a) ? t.push(void 0) : t.push(G(a));
|
|
234
235
|
});
|
|
@@ -246,19 +247,19 @@ function Gt(r, ot) {
|
|
|
246
247
|
return Math.min(n, 1);
|
|
247
248
|
}
|
|
248
249
|
const j = (t) => {
|
|
249
|
-
const e = Math.min(t + 1,
|
|
250
|
-
let s = G(
|
|
251
|
-
const a = G(
|
|
252
|
-
let
|
|
253
|
-
return s = Math.min(n - a, s),
|
|
250
|
+
const e = Math.min(t + 1, g.length - 1), n = l[t] + l[e], o = G(g[t].min) || 0;
|
|
251
|
+
let s = G(g[t].max) || n;
|
|
252
|
+
const a = G(g[e].min) || 0;
|
|
253
|
+
let u = G(g[e].max) || n;
|
|
254
|
+
return s = Math.min(n - a, s), u = Math.min(n - o, u), {
|
|
254
255
|
currentMin: o,
|
|
255
256
|
currentMax: s,
|
|
256
257
|
nextMin: a,
|
|
257
|
-
nextMax:
|
|
258
|
+
nextMax: u
|
|
258
259
|
};
|
|
259
260
|
}, Z = (t, e, n) => {
|
|
260
|
-
const o = N.current, s = o + 1, a = [...l],
|
|
261
|
-
let Y = t + G(`${(n - e) *
|
|
261
|
+
const o = N.current, s = o + 1, a = [...l], u = V ? -1 : 1, et = l[o], A = l[s], nt = et + A, { currentMin: B, currentMax: C } = j(o);
|
|
262
|
+
let Y = t + G(`${(n - e) * u}px`);
|
|
262
263
|
return Y = Math.max(B, Y), Y = Math.min(C, Y), a[o] = Y, a[s] = nt - Y, a;
|
|
263
264
|
};
|
|
264
265
|
function it(t, e) {
|
|
@@ -266,7 +267,7 @@ function Gt(r, ot) {
|
|
|
266
267
|
s[e] = o, tt(s);
|
|
267
268
|
}
|
|
268
269
|
const c = (t) => {
|
|
269
|
-
let e =
|
|
270
|
+
let e = g[t].collapsible;
|
|
270
271
|
st(e) || (e = e ? { prev: !0, next: !0 } : {});
|
|
271
272
|
const { prev: n, next: o } = e;
|
|
272
273
|
if (!n && !o)
|
|
@@ -291,10 +292,10 @@ function Gt(r, ot) {
|
|
|
291
292
|
n.startPosition,
|
|
292
293
|
h ? t.pageX : t.pageY
|
|
293
294
|
);
|
|
294
|
-
k(a),
|
|
295
|
+
k(a), T.current = a, (s = r == null ? void 0 : r.onMoving) == null || s.call(
|
|
295
296
|
r,
|
|
296
297
|
t,
|
|
297
|
-
a.map((
|
|
298
|
+
a.map((u) => `${u * o}px`),
|
|
298
299
|
e
|
|
299
300
|
);
|
|
300
301
|
}
|
|
@@ -306,25 +307,25 @@ function Gt(r, ot) {
|
|
|
306
307
|
}
|
|
307
308
|
function S(t, e, n, o) {
|
|
308
309
|
var yt, $t;
|
|
309
|
-
const s = e + 1, a = [...l],
|
|
310
|
-
let Y =
|
|
311
|
-
n === "prev" ? (et !== C || at === C) && (Y = B, at = A - B,
|
|
310
|
+
const s = e + 1, a = [...l], u = l[e], et = l[s], A = u + et, nt = h ? M.current.offsetWidth : M.current.offsetHeight, { currentMin: B, nextMin: C } = j(e);
|
|
311
|
+
let Y = T.current[e], at = T.current[s], gt = w[e][n];
|
|
312
|
+
n === "prev" ? (et !== C || at === C) && (Y = B, at = A - B, gt = !0) : (u !== B || Y === B) && (Y = A - C, at = C, gt = !0), a[e] = Y, a[s] = at, (yt = r == null ? void 0 : r.onMoving) == null || yt.call(
|
|
312
313
|
r,
|
|
313
314
|
t,
|
|
314
315
|
a.map((Xt) => `${Xt * nt}px`),
|
|
315
316
|
e
|
|
316
|
-
), ($t = r.onMovingEnd) == null || $t.call(r, e), k(a), wt(o) && o(t, e, n,
|
|
317
|
+
), ($t = r.onMovingEnd) == null || $t.call(r, e), k(a), wt(o) && o(t, e, n, gt);
|
|
317
318
|
}
|
|
318
319
|
return lt(() => {
|
|
319
320
|
const t = L();
|
|
320
|
-
k(t),
|
|
321
|
-
}, [JSON.stringify(
|
|
321
|
+
k(t), T.current = t;
|
|
322
|
+
}, [JSON.stringify(g.map((t) => t.size))]), zt(ot, () => M.current, []), lt(() => {
|
|
322
323
|
const t = [];
|
|
323
324
|
l.forEach((e, n) => {
|
|
324
|
-
const o = { prev: !1, next: !1 }, s = n + 1, { currentMin: a, nextMin:
|
|
325
|
-
e === a ? o.prev = !0 : l[s] ===
|
|
325
|
+
const o = { prev: !1, next: !1 }, s = n + 1, { currentMin: a, nextMin: u } = j(n);
|
|
326
|
+
e === a ? o.prev = !0 : l[s] === u && (o.next = !0), t.push(o);
|
|
326
327
|
}), O(t);
|
|
327
|
-
}, [l]), /* @__PURE__ */
|
|
328
|
+
}, [l]), /* @__PURE__ */ m(
|
|
328
329
|
_,
|
|
329
330
|
{
|
|
330
331
|
...Mt(X, [
|
|
@@ -336,28 +337,28 @@ function Gt(r, ot) {
|
|
|
336
337
|
style: q,
|
|
337
338
|
className: H,
|
|
338
339
|
ref: M,
|
|
339
|
-
children:
|
|
340
|
+
children: g.map((t, e) => {
|
|
340
341
|
const {
|
|
341
342
|
content: n,
|
|
342
343
|
disabled: o,
|
|
343
344
|
trigger: s,
|
|
344
345
|
resizable: a = !0,
|
|
345
|
-
collapsible:
|
|
346
|
-
} = t, { hasPrev: et, hasNext: A } = c(e), nt = st(
|
|
347
|
-
return /* @__PURE__ */
|
|
348
|
-
/* @__PURE__ */
|
|
346
|
+
collapsible: u = {}
|
|
347
|
+
} = t, { hasPrev: et, hasNext: A } = c(e), nt = st(u) && st(u.prev) ? u.prev : {}, B = st(u) && st(u.next) ? u.next : {};
|
|
348
|
+
return /* @__PURE__ */ ft(Wt.Fragment, { children: [
|
|
349
|
+
/* @__PURE__ */ m(
|
|
349
350
|
"div",
|
|
350
351
|
{
|
|
351
|
-
className: `${
|
|
352
|
+
className: `${f}-pane`,
|
|
352
353
|
style: { flexBasis: W(e) },
|
|
353
354
|
ref: (C) => D.current[e] = C,
|
|
354
355
|
children: n
|
|
355
356
|
}
|
|
356
357
|
),
|
|
357
|
-
!o && e !==
|
|
358
|
+
!o && e !== g.length - 1 && /* @__PURE__ */ m(
|
|
358
359
|
Nt,
|
|
359
360
|
{
|
|
360
|
-
className: `${
|
|
361
|
+
className: `${f}-trigger`,
|
|
361
362
|
direction: i ? ht : Dt,
|
|
362
363
|
icon: z,
|
|
363
364
|
onResize: (C) => it(C, e),
|
|
@@ -406,7 +407,7 @@ const At = "left", pt = "right", xt = "top", Rt = "bottom", jt = [
|
|
|
406
407
|
}
|
|
407
408
|
};
|
|
408
409
|
function Jt(r, ot) {
|
|
409
|
-
const { getPrefixCls:
|
|
410
|
+
const { getPrefixCls: g, componentConfig: q, rtl: J } = ut(mt), x = Bt(
|
|
410
411
|
r,
|
|
411
412
|
Zt,
|
|
412
413
|
q == null ? void 0 : q.ResizeBox
|
|
@@ -414,14 +415,14 @@ function Jt(r, ot) {
|
|
|
414
415
|
style: K,
|
|
415
416
|
className: z,
|
|
416
417
|
component: X,
|
|
417
|
-
directions:
|
|
418
|
+
directions: I,
|
|
418
419
|
resizeIcons: Q,
|
|
419
420
|
children: rt,
|
|
420
421
|
resizeTriggers: M,
|
|
421
422
|
width: d,
|
|
422
423
|
height: D,
|
|
423
424
|
...N
|
|
424
|
-
} = x,
|
|
425
|
+
} = x, T = J ? I.map((c) => qt(c)) : I, l = g("resizebox"), k = P(l, { [`${l}-rtl`]: J }, z), [b, E] = ct({}), [U, tt] = Tt(void 0, { value: d }), [w, O] = Tt(void 0, { value: D }), f = F({
|
|
425
426
|
startX: 0,
|
|
426
427
|
startY: 0,
|
|
427
428
|
startWidth: 0,
|
|
@@ -455,12 +456,12 @@ function Jt(r, ot) {
|
|
|
455
456
|
}
|
|
456
457
|
function _(c, v) {
|
|
457
458
|
var e, n, o;
|
|
458
|
-
(e = x.onMovingStart) == null || e.call(x),
|
|
459
|
-
const { top: p, left: R, right: S, bottom: t } =
|
|
460
|
-
|
|
459
|
+
(e = x.onMovingStart) == null || e.call(x), f.current.moving = !0, f.current.startX = v.pageX, f.current.startY = v.pageY, f.current.direction = c;
|
|
460
|
+
const { top: p, left: R, right: S, bottom: t } = f.current.padding;
|
|
461
|
+
f.current.startWidth = i(
|
|
461
462
|
(n = h.current) == null ? void 0 : n.clientWidth,
|
|
462
463
|
R + S
|
|
463
|
-
),
|
|
464
|
+
), f.current.startHeight = i(
|
|
464
465
|
(o = h.current) == null ? void 0 : o.clientHeight,
|
|
465
466
|
p + t
|
|
466
467
|
), y(window, "mousemove", L), y(window, "touchmove", L), y(window, "mouseup", W), y(window, "touchend", W), y(window, "contextmenu", W), H(
|
|
@@ -469,11 +470,11 @@ function Jt(r, ot) {
|
|
|
469
470
|
}
|
|
470
471
|
function L(c) {
|
|
471
472
|
var s;
|
|
472
|
-
if (!
|
|
473
|
-
const { startX: v, startY: p, startWidth: R, startHeight: S } =
|
|
473
|
+
if (!f.current.moving) return !1;
|
|
474
|
+
const { startX: v, startY: p, startWidth: R, startHeight: S } = f.current;
|
|
474
475
|
let t = R, e = S;
|
|
475
476
|
const n = c.pageX - v, o = c.pageY - p;
|
|
476
|
-
switch (
|
|
477
|
+
switch (f.current.direction) {
|
|
477
478
|
case At:
|
|
478
479
|
t = R - n, tt(t);
|
|
479
480
|
break;
|
|
@@ -494,14 +495,14 @@ function Jt(r, ot) {
|
|
|
494
495
|
}
|
|
495
496
|
function W() {
|
|
496
497
|
var c;
|
|
497
|
-
|
|
498
|
+
f.current.moving = !1, G(), H(), (c = x.onMovingEnd) == null || c.call(x);
|
|
498
499
|
}
|
|
499
500
|
function G() {
|
|
500
501
|
$(window, "mousemove", L), $(window, "touchmove", L), $(window, "mouseup", W), $(window, "touchend", W), $(window, "contextmenu", W);
|
|
501
502
|
}
|
|
502
503
|
function j(c, v) {
|
|
503
504
|
const p = V(c), { contentRect: R } = v[0], S = `${c.slice(0, 1).toUpperCase()}${c.slice(1)}`, t = R[p ? "height" : "width"];
|
|
504
|
-
|
|
505
|
+
f.current.padding[c] = t, E((e) => ({
|
|
505
506
|
...e,
|
|
506
507
|
[`padding${S}`]: t
|
|
507
508
|
}));
|
|
@@ -512,7 +513,7 @@ function Jt(r, ot) {
|
|
|
512
513
|
...vt(U) ? { width: U } : {},
|
|
513
514
|
...vt(w) ? { height: w } : {}
|
|
514
515
|
};
|
|
515
|
-
return /* @__PURE__ */
|
|
516
|
+
return /* @__PURE__ */ ft(
|
|
516
517
|
X,
|
|
517
518
|
{
|
|
518
519
|
...Mt(N, ["onMovingStart", "onMoving", "onMovingEnd"]),
|
|
@@ -521,9 +522,9 @@ function Jt(r, ot) {
|
|
|
521
522
|
ref: h,
|
|
522
523
|
children: [
|
|
523
524
|
rt,
|
|
524
|
-
|
|
525
|
+
T.map((c) => {
|
|
525
526
|
if (jt.indexOf(c) !== -1)
|
|
526
|
-
return /* @__PURE__ */
|
|
527
|
+
return /* @__PURE__ */ m(
|
|
527
528
|
Nt,
|
|
528
529
|
{
|
|
529
530
|
className: `${l}-direction-${c}`,
|
package/Result.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import L from "@unicom-cloud/icons/IconUiCheck";
|
|
3
|
+
import p from "@unicom-cloud/icons/IconUiClose";
|
|
4
|
+
import u from "@unicom-cloud/icons/IconUiExclamation";
|
|
5
|
+
import M from "@unicom-cloud/icons/IconUiInfo";
|
|
6
6
|
import { forwardRef as Z, useContext as v } from "react";
|
|
7
|
-
import { d as R } from "./chunk/
|
|
8
|
-
import { useMergeProps as
|
|
7
|
+
import { d as R } from "./chunk/CV1kLw5Z.js";
|
|
8
|
+
import { useMergeProps as $ } from "./hooks/useMergeProps.js";
|
|
9
9
|
import { y as m } from "./chunk/BzPkh4Zv.js";
|
|
10
|
-
function
|
|
10
|
+
function N() {
|
|
11
11
|
return /* @__PURE__ */ t(
|
|
12
12
|
"svg",
|
|
13
13
|
{
|
|
@@ -698,7 +698,7 @@ function $() {
|
|
|
698
698
|
}
|
|
699
699
|
);
|
|
700
700
|
}
|
|
701
|
-
function
|
|
701
|
+
function I() {
|
|
702
702
|
return /* @__PURE__ */ r(
|
|
703
703
|
"svg",
|
|
704
704
|
{
|
|
@@ -1374,14 +1374,14 @@ const k = {
|
|
|
1374
1374
|
info: /* @__PURE__ */ r(M, {}),
|
|
1375
1375
|
warning: /* @__PURE__ */ r(u, {}),
|
|
1376
1376
|
error: /* @__PURE__ */ r(p, {}),
|
|
1377
|
-
404: /* @__PURE__ */ r(
|
|
1378
|
-
403: /* @__PURE__ */ r(
|
|
1377
|
+
404: /* @__PURE__ */ r(I, {}),
|
|
1378
|
+
403: /* @__PURE__ */ r(N, {}),
|
|
1379
1379
|
500: /* @__PURE__ */ r(O, {})
|
|
1380
1380
|
}, U = {
|
|
1381
1381
|
status: "info"
|
|
1382
1382
|
};
|
|
1383
1383
|
function j(f, d) {
|
|
1384
|
-
const { getPrefixCls: x, componentConfig: l, rtl: y } = v(R), h =
|
|
1384
|
+
const { getPrefixCls: x, componentConfig: l, rtl: y } = v(R), h = $(
|
|
1385
1385
|
f,
|
|
1386
1386
|
U,
|
|
1387
1387
|
l == null ? void 0 : l.Result
|
|
@@ -1391,8 +1391,8 @@ function j(f, d) {
|
|
|
1391
1391
|
status: e,
|
|
1392
1392
|
title: n,
|
|
1393
1393
|
subTitle: a,
|
|
1394
|
-
extra:
|
|
1395
|
-
children:
|
|
1394
|
+
extra: g,
|
|
1395
|
+
children: s,
|
|
1396
1396
|
icon: b,
|
|
1397
1397
|
...w
|
|
1398
1398
|
} = h, i = x("result"), c = "icon" in h ? b : k[e];
|
|
@@ -1423,8 +1423,8 @@ function j(f, d) {
|
|
|
1423
1423
|
) }),
|
|
1424
1424
|
n && /* @__PURE__ */ r("div", { className: `${i}-title`, children: n }),
|
|
1425
1425
|
a && /* @__PURE__ */ r("div", { className: `${i}-subtitle`, children: a }),
|
|
1426
|
-
|
|
1427
|
-
|
|
1426
|
+
g && /* @__PURE__ */ r("div", { className: `${i}-extra`, children: g }),
|
|
1427
|
+
s && /* @__PURE__ */ r("div", { className: `${i}-content`, children: s })
|
|
1428
1428
|
]
|
|
1429
1429
|
}
|
|
1430
1430
|
);
|
package/Select.js
CHANGED