@unicom-cloud/ui 0.8.62 → 0.8.64
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 +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 +4 -4
- package/Comment.js +1 -1
- package/ConfigProvider.js +2 -2
- package/Copy.js +1 -1
- package/DatePicker.js +1026 -1016
- package/Descriptions.js +10 -10
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Drawer.js +1 -1
- package/Dropdown.js +26 -25
- package/Empty.js +1 -1
- package/Form.js +2 -2
- package/Grid.js +2 -2
- package/Icon.js +2 -1
- package/IconHover.js +1 -1
- package/Image.js +4 -1
- package/Input.js +11 -2
- package/InputNumber.js +2 -2
- package/InputTag.js +1 -1
- package/Layout.js +24 -20
- package/Link.js +1 -1
- package/List.js +4 -3
- package/Mentions.js +3 -3
- package/Menu.js +7 -2
- package/Message.js +4 -3
- package/Modal.js +1 -1
- package/Notice.js +1 -1
- package/Notification.js +4 -3
- 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 +4 -2
- package/Rate.js +1 -1
- package/ResizeBox.js +66 -64
- package/Result.js +1 -1
- package/Select.js +4 -1
- package/SelectView.js +3 -3
- package/Skeleton.js +1 -1
- package/Slider.js +2 -2
- package/Space.js +50 -46
- package/Spin.js +1 -1
- package/Statistic.js +28 -27
- package/Steps.js +40 -38
- package/Switch.js +2 -2
- package/Table.js +7 -4
- package/Tabs.js +6 -2
- package/Tag.js +1 -1
- package/TimePicker.js +37 -36
- package/Timeline.js +4 -2
- package/Tooltip.js +1 -1
- package/Transfer.js +3 -3
- package/Tree.js +1 -1
- package/TreeSelect.js +3 -1
- package/Trigger.js +2 -2
- package/Typography.js +6 -2
- package/Upload.js +5 -4
- package/VerificationCode.js +1 -1
- package/Watermark.js +1 -1
- package/chunk/{CHyuuVxl.js → -IELMT_x.js} +1 -1
- package/chunk/{CV1kLw5Z.js → B5GDq8NJ.js} +8 -6
- package/chunk/{qpd2axxs.js → B68hRpYG.js} +2 -2
- package/chunk/{B8SZFOjt.js → BCxoi4Kf.js} +22 -20
- package/chunk/{DRp7voqz.js → BHnRi7Xh.js} +3 -3
- package/chunk/{C6fEFlPt.js → BJSjbYSN.js} +2 -2
- package/chunk/{BlNFmhNa.js → BSBJlVZH.js} +3 -3
- package/chunk/{yESVS-qX.js → BfHNSLva.js} +3 -3
- package/chunk/{B4-WpgY2.js → BtIG250j.js} +7 -4
- package/chunk/{Dtm4BmKB.js → BwSpYGK-.js} +1 -1
- package/chunk/{KchYsivk.js → CA69nxbj.js} +1 -1
- package/chunk/{D3VMG9V1.js → CAhODOfT.js} +3 -2
- package/chunk/{tOFzwzpT.js → CAiaqaWc.js} +1 -1
- package/chunk/{Wum88vrW.js → CBgwLBAC.js} +40 -38
- package/chunk/{Bp3XomF8.js → CLBavO5c.js} +23 -20
- package/chunk/{CT1lZ7ss.js → CTF5o0OX.js} +1 -1
- package/chunk/{C4eJ9vCf.js → CYQ1EE4h.js} +2 -2
- package/chunk/{DRQ1v6Ux.js → CZfGDXaB.js} +1 -1
- package/chunk/{B0oDiPqE.js → CtUTlwlQ.js} +1 -1
- package/chunk/{DGasAUHE.js → CxpFYX4B.js} +11 -11
- package/chunk/{BnqeQYIZ.js → D-oHJail.js} +59 -55
- package/chunk/{CazXy0r4.js → D01b7bWX.js} +50 -45
- package/chunk/{C8o-VGyc.js → DPJEIBKZ.js} +3 -3
- package/chunk/{-Z968QpN.js → DQ561AmR.js} +3 -3
- package/chunk/{CDJ1EnJ2.js → QlYCEvCX.js} +1 -1
- package/chunk/{AqH9yP_J.js → Yvz-hPQB.js} +2 -2
- package/chunk/{nbEvdwT0.js → _m8hLSsx.js} +4 -2
- package/chunk/{CJnshq6A.js → oR9TkA35.js} +2 -2
- package/chunk/{BXWxA-tS.js → pq-36BDW.js} +5 -3
- package/chunk/{mfn4EgmQ.js → tW_FgNSv.js} +1 -1
- package/index.js +540 -472
- package/locale/zh-CN.js +8 -0
- package/package.json +1 -1
- package/types/calendar/hook/useCellClassName.d.ts +2 -1
- package/types/checkbox/IconCheck.d.ts +2 -1
- package/types/color-picker/hooks/useColorPicker.d.ts +3 -8
- package/types/date-picker/hook/useCellClassName.d.ts +2 -1
- package/types/date-picker/index.d.ts +7 -0
- package/types/date-picker/panel/Footer.d.ts +2 -1
- package/types/dropdown/index.d.ts +1 -0
- package/types/form/IconSymbol.d.ts +2 -1
- package/types/form/useForm.d.ts +2 -1
- package/types/icon/addFromIconFontCn.d.ts +2 -1
- package/types/icon/index.d.ts +2 -0
- package/types/image/Image.d.ts +1 -0
- package/types/image/index.d.ts +2 -1
- package/types/image/util/getFixTranslate.d.ts +2 -1
- package/types/image/util/hook/useImageStatus.d.ts +2 -2
- package/types/image/util/hook/useShowFooter.d.ts +2 -2
- package/types/index.d.ts +25 -25
- package/types/input/Input.d.ts +1 -0
- package/types/input/index.d.ts +1 -0
- package/types/input/useComposition.d.ts +2 -1
- package/types/input-number/useSelectionRange.d.ts +2 -1
- package/types/layout/index.d.ts +1 -0
- package/types/list/index.d.ts +1 -0
- package/types/locale/interface.d.ts +1 -0
- package/types/locale/zh-CN.d.ts +14 -0
- package/types/menu/Indent.d.ts +2 -1
- package/types/menu/Menu.d.ts +1 -0
- package/types/menu/index.d.ts +1 -0
- package/types/message/index.d.ts +2 -0
- package/types/notification/index.d.ts +2 -0
- package/types/overflow-ellipsis/OverflowItem.d.ts +2 -2
- package/types/overflow-ellipsis/index.d.ts +2 -2
- package/types/radio/Radio.d.ts +2 -0
- package/types/radio/index.d.ts +2 -1
- package/types/resize-box/ResizeTrigger.d.ts +2 -1
- package/types/resize-box/index.d.ts +1 -0
- package/types/result/403.d.ts +2 -1
- package/types/result/404.d.ts +2 -1
- package/types/result/500.d.ts +2 -1
- package/types/select/Select.d.ts +1 -1
- package/types/select/index.d.ts +1 -0
- package/types/skeleton/Image.d.ts +2 -1
- package/types/skeleton/Text.d.ts +2 -1
- package/types/slider/hook/useLegalValue.d.ts +2 -1
- package/types/space/index.d.ts +4 -1
- package/types/space/toArray.d.ts +2 -1
- package/types/speech-synthesis/index.d.ts +2 -1
- package/types/spin/DotLoading.d.ts +2 -1
- package/types/statistic/index.d.ts +1 -0
- package/types/steps/index.d.ts +1 -0
- package/types/table/hook/useComponent.d.ts +2 -1
- package/types/table/hook/useExpand.d.ts +2 -1
- package/types/table/hook/useRowSelection.d.ts +2 -1
- package/types/table/hook/useSorter.d.ts +2 -1
- package/types/table/index.d.ts +2 -1
- package/types/table/summary/index.d.ts +3 -0
- package/types/tabs/Tab.d.ts +1 -0
- package/types/tabs/TabContent.d.ts +2 -2
- package/types/tabs/hook/useDomSize.d.ts +2 -1
- package/types/tabs/hook/useHeaderScroll.d.ts +2 -1
- package/types/tabs/index.d.ts +1 -0
- package/types/tabs/tab-header/DropdownIcon.d.ts +2 -1
- package/types/time-picker/TimeColumn.d.ts +2 -2
- package/types/time-picker/index.d.ts +5 -0
- package/types/timeline/Timeline.d.ts +1 -0
- package/types/timeline/index.d.ts +1 -0
- package/types/tree-select/Select.d.ts +5 -0
- package/types/tree-select/hook/useTreeData.d.ts +2 -1
- package/types/tree-select/index.d.ts +2 -1
- package/types/typography/Operations.d.ts +2 -1
- package/types/typography/index.d.ts +1 -0
- package/types/upload/Upload.d.ts +2 -1
- package/types/upload/index.d.ts +2 -3
- package/types/utils/fillNBSP.d.ts +2 -1
- package/types/utils/getHighlightText.d.ts +2 -1
- package/types/utils/getHotkeyHandler.d.ts +2 -1
- package/types/utils/getStringLength.d.ts +2 -1
- package/types/utils/include.d.ts +2 -1
- package/types/utils/is.d.ts +2 -0
- package/types/utils/mergeProps.d.ts +2 -1
- package/types/utils/mergedToString.d.ts +2 -1
- package/types/utils/omit.d.ts +2 -1
- package/types/utils/pick.d.ts +2 -1
- package/types/utils/throttleByRaf.d.ts +2 -1
- package/types/utils/throttleByRafV2.d.ts +2 -1
- package/types/utils/warning.d.ts +2 -1
- package/types/verification-code/VerificationCode.d.ts +2 -1
- package/utils/CSSTransition.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/dayjs.js +50 -49
- package/utils/index.js +161 -148
- package/utils/is.js +125 -112
package/ResizeBox.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as m, jsxs as
|
|
1
|
+
import { jsx as m, jsxs as ut } from "react/jsx-runtime";
|
|
2
2
|
import vt from "lodash/isNumber";
|
|
3
|
-
import
|
|
4
|
-
import { d as mt } from "./chunk/
|
|
5
|
-
import { useMergeProps as
|
|
3
|
+
import Bt, { useContext as ft, useRef as F, useEffect as lt, forwardRef as Ct, useState as ct, useImperativeHandle as zt } from "react";
|
|
4
|
+
import { d as mt } from "./chunk/B5GDq8NJ.js";
|
|
5
|
+
import { useMergeProps as Wt } from "./hooks/useMergeProps.js";
|
|
6
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";
|
|
@@ -31,7 +31,7 @@ function Nt(r) {
|
|
|
31
31
|
resizable: X = !0,
|
|
32
32
|
renderChildren: I,
|
|
33
33
|
...Q
|
|
34
|
-
} = r, { getPrefixCls: rt, rtl: M } =
|
|
34
|
+
} = r, { getPrefixCls: rt, rtl: M } = ft(mt), d = rt("resizebox-trigger"), D = g === "horizontal", N = M && !D, T = P(
|
|
35
35
|
d,
|
|
36
36
|
`${d}-${D ? "horizontal" : "vertical"}`,
|
|
37
37
|
{ [`${d}-not-resizable`]: !X },
|
|
@@ -57,9 +57,9 @@ function Nt(r) {
|
|
|
57
57
|
onClick: E.onClick,
|
|
58
58
|
children: E.icon
|
|
59
59
|
}
|
|
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(),
|
|
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(), u = w(), h = tt(), V = () => /* @__PURE__ */ ut("div", { className: `${d}-icon-wrapper`, children: [
|
|
61
61
|
O,
|
|
62
|
-
|
|
62
|
+
u,
|
|
63
63
|
h
|
|
64
64
|
] });
|
|
65
65
|
return X ? (lt(() => {
|
|
@@ -75,9 +75,9 @@ function Nt(r) {
|
|
|
75
75
|
...Mt(Q, ["style"]),
|
|
76
76
|
className: T,
|
|
77
77
|
onMouseDown: J,
|
|
78
|
-
children: wt(I) ? I(O,
|
|
78
|
+
children: wt(I) ? I(O, u, h) : K || V()
|
|
79
79
|
}
|
|
80
|
-
)) : /* @__PURE__ */ m("div", { className: T, children: wt(I) ? I(O,
|
|
80
|
+
)) : /* @__PURE__ */ m("div", { className: T, children: wt(I) ? I(O, u, h) : K || V() });
|
|
81
81
|
}
|
|
82
82
|
const dt = "horizontal", Pt = "vertical";
|
|
83
83
|
function Lt(r, ot) {
|
|
@@ -93,12 +93,12 @@ function Lt(r, ot) {
|
|
|
93
93
|
panes: Q,
|
|
94
94
|
disabled: rt,
|
|
95
95
|
trigger: M
|
|
96
|
-
} = r, { getPrefixCls: d, rtl: D } =
|
|
96
|
+
} = r, { getPrefixCls: d, rtl: D } = ft(mt), N = d("resizebox-split"), T = x.includes(dt), l = x.includes("reverse"), k = T && D, b = !T, E = P(
|
|
97
97
|
N,
|
|
98
98
|
`${N}-${T ? dt : Pt}`,
|
|
99
99
|
{ [`${N}-rtl`]: D },
|
|
100
100
|
q
|
|
101
|
-
), [U, tt] = Q, w = typeof z == "string", [O,
|
|
101
|
+
), [U, tt] = Q, w = typeof z == "string", [O, u] = ct(parseFloat(z)), [h, V] = ct(0), i = F({
|
|
102
102
|
startX: 0,
|
|
103
103
|
startY: 0,
|
|
104
104
|
startWidth: 0,
|
|
@@ -110,16 +110,16 @@ function Lt(r, ot) {
|
|
|
110
110
|
function L(t, e) {
|
|
111
111
|
return parseFloat(t) / parseFloat(e);
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function B(t, e, n, o) {
|
|
114
114
|
const s = typeof X == "string" ? L(parseFloat(X), t) : X || 0, a = typeof I == "string" ? L(parseFloat(I), t) : I || 1;
|
|
115
|
-
let
|
|
116
|
-
|
|
117
|
-
let A = w ? e + (o - n) *
|
|
118
|
-
t * e + (o - n) *
|
|
115
|
+
let f = l ? -1 : 1;
|
|
116
|
+
f *= k ? -1 : 1;
|
|
117
|
+
let A = w ? e + (o - n) * f : L(
|
|
118
|
+
t * e + (o - n) * f,
|
|
119
119
|
t
|
|
120
120
|
);
|
|
121
|
-
const nt = w ? s * t : s,
|
|
122
|
-
return A = Math.max(A, nt), A = Math.min(A,
|
|
121
|
+
const nt = w ? s * t : s, W = w ? a * t : a;
|
|
122
|
+
return A = Math.max(A, nt), A = Math.min(A, W), A;
|
|
123
123
|
}
|
|
124
124
|
function G(t) {
|
|
125
125
|
var e, n, o;
|
|
@@ -128,18 +128,18 @@ function Lt(r, ot) {
|
|
|
128
128
|
function j(t) {
|
|
129
129
|
var e;
|
|
130
130
|
if (i.current.moving) {
|
|
131
|
-
const n = T ?
|
|
131
|
+
const n = T ? B(
|
|
132
132
|
i.current.startWidth,
|
|
133
133
|
i.current.startOffset,
|
|
134
134
|
i.current.startX,
|
|
135
135
|
t.pageX
|
|
136
|
-
) :
|
|
136
|
+
) : B(
|
|
137
137
|
i.current.startHeight,
|
|
138
138
|
i.current.startOffset,
|
|
139
139
|
i.current.startY,
|
|
140
140
|
t.pageY
|
|
141
141
|
);
|
|
142
|
-
|
|
142
|
+
u(n), (e = r.onMoving) == null || e.call(r, t, w ? `${n}px` : n);
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
function Z() {
|
|
@@ -159,7 +159,7 @@ function Lt(r, ot) {
|
|
|
159
159
|
(t = r.onPaneResize) == null || t.call(r, _.current);
|
|
160
160
|
}, [O, h]), Vt(() => {
|
|
161
161
|
const t = parseFloat(z);
|
|
162
|
-
O !== t &&
|
|
162
|
+
O !== t && u(t);
|
|
163
163
|
}, [z]);
|
|
164
164
|
const v = J, p = /* @__PURE__ */ m(
|
|
165
165
|
"div",
|
|
@@ -181,7 +181,7 @@ function Lt(r, ot) {
|
|
|
181
181
|
children: tt
|
|
182
182
|
}
|
|
183
183
|
), S = l ? [R, p] : [p, R];
|
|
184
|
-
return /* @__PURE__ */
|
|
184
|
+
return /* @__PURE__ */ ut(v, { style: g, className: E, ref: H, children: [
|
|
185
185
|
S[0],
|
|
186
186
|
!rt && /* @__PURE__ */ m(
|
|
187
187
|
Nt,
|
|
@@ -209,7 +209,7 @@ function Gt(r, ot) {
|
|
|
209
209
|
direction: K = "horizontal",
|
|
210
210
|
icon: z,
|
|
211
211
|
...X
|
|
212
|
-
} = r, { getPrefixCls: I, rtl: Q } =
|
|
212
|
+
} = r, { getPrefixCls: I, rtl: Q } = ft(mt), rt = 1 / g.length, M = F(), d = F(
|
|
213
213
|
new Array(g.length).fill({
|
|
214
214
|
moving: !1,
|
|
215
215
|
startOffset: 0,
|
|
@@ -221,11 +221,11 @@ function Gt(r, ot) {
|
|
|
221
221
|
new Array(g.length).fill(0)
|
|
222
222
|
), [w, O] = ct(
|
|
223
223
|
new Array(Math.max(g.length - 1, 0)).fill({ prev: !1, next: !1 })
|
|
224
|
-
),
|
|
225
|
-
|
|
226
|
-
`${
|
|
227
|
-
{ [`${
|
|
228
|
-
{ [`${
|
|
224
|
+
), u = I("resizebox-split-group"), h = K === ht, V = h && Q, i = !h, H = P(
|
|
225
|
+
u,
|
|
226
|
+
`${u}-${h ? ht : Dt}`,
|
|
227
|
+
{ [`${u}-moving`]: b },
|
|
228
|
+
{ [`${u}-rtl`]: Q },
|
|
229
229
|
J
|
|
230
230
|
), _ = x, L = () => {
|
|
231
231
|
let t = [];
|
|
@@ -235,7 +235,7 @@ function Gt(r, ot) {
|
|
|
235
235
|
});
|
|
236
236
|
const e = t.filter((s) => !s), o = (1 - t.reduce((s, a) => (s || 0) + (a || 0), 0)) / e.length;
|
|
237
237
|
return t = t.map((s) => St(s) ? o : s), t;
|
|
238
|
-
},
|
|
238
|
+
}, B = (t) => {
|
|
239
239
|
const e = U[t - 1] || 0, n = U[t];
|
|
240
240
|
return `calc(${l[t] * 100}% - ${(e + n) / 2}px)`;
|
|
241
241
|
};
|
|
@@ -250,17 +250,17 @@ function Gt(r, ot) {
|
|
|
250
250
|
const e = Math.min(t + 1, g.length - 1), n = l[t] + l[e], o = G(g[t].min) || 0;
|
|
251
251
|
let s = G(g[t].max) || n;
|
|
252
252
|
const a = G(g[e].min) || 0;
|
|
253
|
-
let
|
|
254
|
-
return s = Math.min(n - a, s),
|
|
253
|
+
let f = G(g[e].max) || n;
|
|
254
|
+
return s = Math.min(n - a, s), f = Math.min(n - o, f), {
|
|
255
255
|
currentMin: o,
|
|
256
256
|
currentMax: s,
|
|
257
257
|
nextMin: a,
|
|
258
|
-
nextMax:
|
|
258
|
+
nextMax: f
|
|
259
259
|
};
|
|
260
260
|
}, Z = (t, e, n) => {
|
|
261
|
-
const o = N.current, s = o + 1, a = [...l],
|
|
262
|
-
let Y = t + G(`${(n - e) *
|
|
263
|
-
return Y = Math.max(
|
|
261
|
+
const o = N.current, s = o + 1, a = [...l], f = V ? -1 : 1, et = l[o], A = l[s], nt = et + A, { currentMin: W, currentMax: C } = j(o);
|
|
262
|
+
let Y = t + G(`${(n - e) * f}px`);
|
|
263
|
+
return Y = Math.max(W, Y), Y = Math.min(C, Y), a[o] = Y, a[s] = nt - Y, a;
|
|
264
264
|
};
|
|
265
265
|
function it(t, e) {
|
|
266
266
|
const { contentRect: n } = t[0], o = n[i ? "height" : "width"], s = [...U];
|
|
@@ -295,7 +295,7 @@ function Gt(r, ot) {
|
|
|
295
295
|
k(a), T.current = a, (s = r == null ? void 0 : r.onMoving) == null || s.call(
|
|
296
296
|
r,
|
|
297
297
|
t,
|
|
298
|
-
a.map((
|
|
298
|
+
a.map((f) => `${f * o}px`),
|
|
299
299
|
e
|
|
300
300
|
);
|
|
301
301
|
}
|
|
@@ -307,9 +307,9 @@ function Gt(r, ot) {
|
|
|
307
307
|
}
|
|
308
308
|
function S(t, e, n, o) {
|
|
309
309
|
var yt, $t;
|
|
310
|
-
const s = e + 1, a = [...l],
|
|
310
|
+
const s = e + 1, a = [...l], f = l[e], et = l[s], A = f + et, nt = h ? M.current.offsetWidth : M.current.offsetHeight, { currentMin: W, nextMin: C } = j(e);
|
|
311
311
|
let Y = T.current[e], at = T.current[s], gt = w[e][n];
|
|
312
|
-
n === "prev" ? (et !== C || at === C) && (Y =
|
|
312
|
+
n === "prev" ? (et !== C || at === C) && (Y = W, at = A - W, gt = !0) : (f !== W || Y === W) && (Y = A - C, at = C, gt = !0), a[e] = Y, a[s] = at, (yt = r == null ? void 0 : r.onMoving) == null || yt.call(
|
|
313
313
|
r,
|
|
314
314
|
t,
|
|
315
315
|
a.map((Xt) => `${Xt * nt}px`),
|
|
@@ -322,8 +322,8 @@ function Gt(r, ot) {
|
|
|
322
322
|
}, [JSON.stringify(g.map((t) => t.size))]), zt(ot, () => M.current, []), lt(() => {
|
|
323
323
|
const t = [];
|
|
324
324
|
l.forEach((e, n) => {
|
|
325
|
-
const o = { prev: !1, next: !1 }, s = n + 1, { currentMin: a, nextMin:
|
|
326
|
-
e === a ? o.prev = !0 : l[s] ===
|
|
325
|
+
const o = { prev: !1, next: !1 }, s = n + 1, { currentMin: a, nextMin: f } = j(n);
|
|
326
|
+
e === a ? o.prev = !0 : l[s] === f && (o.next = !0), t.push(o);
|
|
327
327
|
}), O(t);
|
|
328
328
|
}, [l]), /* @__PURE__ */ m(
|
|
329
329
|
_,
|
|
@@ -343,14 +343,14 @@ function Gt(r, ot) {
|
|
|
343
343
|
disabled: o,
|
|
344
344
|
trigger: s,
|
|
345
345
|
resizable: a = !0,
|
|
346
|
-
collapsible:
|
|
347
|
-
} = t, { hasPrev: et, hasNext: A } = c(e), nt = st(
|
|
348
|
-
return /* @__PURE__ */
|
|
346
|
+
collapsible: f = {}
|
|
347
|
+
} = t, { hasPrev: et, hasNext: A } = c(e), nt = st(f) && st(f.prev) ? f.prev : {}, W = st(f) && st(f.next) ? f.next : {};
|
|
348
|
+
return /* @__PURE__ */ ut(Bt.Fragment, { children: [
|
|
349
349
|
/* @__PURE__ */ m(
|
|
350
350
|
"div",
|
|
351
351
|
{
|
|
352
|
-
className: `${
|
|
353
|
-
style: { flexBasis:
|
|
352
|
+
className: `${u}-pane`,
|
|
353
|
+
style: { flexBasis: B(e) },
|
|
354
354
|
ref: (C) => D.current[e] = C,
|
|
355
355
|
children: n
|
|
356
356
|
}
|
|
@@ -358,7 +358,7 @@ function Gt(r, ot) {
|
|
|
358
358
|
!o && e !== g.length - 1 && /* @__PURE__ */ m(
|
|
359
359
|
Nt,
|
|
360
360
|
{
|
|
361
|
-
className: `${
|
|
361
|
+
className: `${u}-trigger`,
|
|
362
362
|
direction: i ? ht : Dt,
|
|
363
363
|
icon: z,
|
|
364
364
|
onResize: (C) => it(C, e),
|
|
@@ -370,8 +370,8 @@ function Gt(r, ot) {
|
|
|
370
370
|
collapsed: w[e].prev
|
|
371
371
|
} : void 0,
|
|
372
372
|
next: A ? {
|
|
373
|
-
onClick: (C) => S(C, e, "next",
|
|
374
|
-
icon:
|
|
373
|
+
onClick: (C) => S(C, e, "next", W.onClick),
|
|
374
|
+
icon: W.icon,
|
|
375
375
|
collapsed: w[e].next
|
|
376
376
|
} : void 0
|
|
377
377
|
},
|
|
@@ -407,7 +407,7 @@ const At = "left", pt = "right", xt = "top", Rt = "bottom", jt = [
|
|
|
407
407
|
}
|
|
408
408
|
};
|
|
409
409
|
function Jt(r, ot) {
|
|
410
|
-
const { getPrefixCls: g, componentConfig: q, rtl: J } =
|
|
410
|
+
const { getPrefixCls: g, componentConfig: q, rtl: J } = ft(mt), x = Wt(
|
|
411
411
|
r,
|
|
412
412
|
Zt,
|
|
413
413
|
q == null ? void 0 : q.ResizeBox
|
|
@@ -422,7 +422,7 @@ function Jt(r, ot) {
|
|
|
422
422
|
width: d,
|
|
423
423
|
height: D,
|
|
424
424
|
...N
|
|
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 }),
|
|
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 }), u = F({
|
|
426
426
|
startX: 0,
|
|
427
427
|
startY: 0,
|
|
428
428
|
startWidth: 0,
|
|
@@ -456,25 +456,25 @@ function Jt(r, ot) {
|
|
|
456
456
|
}
|
|
457
457
|
function _(c, v) {
|
|
458
458
|
var e, n, o;
|
|
459
|
-
(e = x.onMovingStart) == null || e.call(x),
|
|
460
|
-
const { top: p, left: R, right: S, bottom: t } =
|
|
461
|
-
|
|
459
|
+
(e = x.onMovingStart) == null || e.call(x), u.current.moving = !0, u.current.startX = v.pageX, u.current.startY = v.pageY, u.current.direction = c;
|
|
460
|
+
const { top: p, left: R, right: S, bottom: t } = u.current.padding;
|
|
461
|
+
u.current.startWidth = i(
|
|
462
462
|
(n = h.current) == null ? void 0 : n.clientWidth,
|
|
463
463
|
R + S
|
|
464
|
-
),
|
|
464
|
+
), u.current.startHeight = i(
|
|
465
465
|
(o = h.current) == null ? void 0 : o.clientHeight,
|
|
466
466
|
p + t
|
|
467
|
-
), y(window, "mousemove", L), y(window, "touchmove", L), y(window, "mouseup",
|
|
467
|
+
), y(window, "mousemove", L), y(window, "touchmove", L), y(window, "mouseup", B), y(window, "touchend", B), y(window, "contextmenu", B), H(
|
|
468
468
|
V(c) ? "row-resize" : "col-resize"
|
|
469
469
|
);
|
|
470
470
|
}
|
|
471
471
|
function L(c) {
|
|
472
472
|
var s;
|
|
473
|
-
if (!
|
|
474
|
-
const { startX: v, startY: p, startWidth: R, startHeight: S } =
|
|
473
|
+
if (!u.current.moving) return !1;
|
|
474
|
+
const { startX: v, startY: p, startWidth: R, startHeight: S } = u.current;
|
|
475
475
|
let t = R, e = S;
|
|
476
476
|
const n = c.pageX - v, o = c.pageY - p;
|
|
477
|
-
switch (
|
|
477
|
+
switch (u.current.direction) {
|
|
478
478
|
case At:
|
|
479
479
|
t = R - n, tt(t);
|
|
480
480
|
break;
|
|
@@ -493,16 +493,16 @@ function Jt(r, ot) {
|
|
|
493
493
|
height: e
|
|
494
494
|
});
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function B() {
|
|
497
497
|
var c;
|
|
498
|
-
|
|
498
|
+
u.current.moving = !1, G(), H(), (c = x.onMovingEnd) == null || c.call(x);
|
|
499
499
|
}
|
|
500
500
|
function G() {
|
|
501
|
-
$(window, "mousemove", L), $(window, "touchmove", L), $(window, "mouseup",
|
|
501
|
+
$(window, "mousemove", L), $(window, "touchmove", L), $(window, "mouseup", B), $(window, "touchend", B), $(window, "contextmenu", B);
|
|
502
502
|
}
|
|
503
503
|
function j(c, v) {
|
|
504
504
|
const p = V(c), { contentRect: R } = v[0], S = `${c.slice(0, 1).toUpperCase()}${c.slice(1)}`, t = R[p ? "height" : "width"];
|
|
505
|
-
|
|
505
|
+
u.current.padding[c] = t, E((e) => ({
|
|
506
506
|
...e,
|
|
507
507
|
[`padding${S}`]: t
|
|
508
508
|
}));
|
|
@@ -513,7 +513,7 @@ function Jt(r, ot) {
|
|
|
513
513
|
...vt(U) ? { width: U } : {},
|
|
514
514
|
...vt(w) ? { height: w } : {}
|
|
515
515
|
};
|
|
516
|
-
return /* @__PURE__ */
|
|
516
|
+
return /* @__PURE__ */ ut(
|
|
517
517
|
X,
|
|
518
518
|
{
|
|
519
519
|
...Mt(N, ["onMovingStart", "onMoving", "onMovingEnd"]),
|
|
@@ -550,5 +550,7 @@ Ot.Split = Et;
|
|
|
550
550
|
Ot.SplitGroup = Ht;
|
|
551
551
|
Ot.displayName = "ResizeBox";
|
|
552
552
|
export {
|
|
553
|
+
Et as ResizeBoxSplit,
|
|
554
|
+
Ht as ResizeBoxSplitGroup,
|
|
553
555
|
Ot as default
|
|
554
556
|
};
|
package/Result.js
CHANGED
|
@@ -4,7 +4,7 @@ import p from "@unicom-cloud/icons/IconUiClose";
|
|
|
4
4
|
import u from "@unicom-cloud/icons/IconUiExclamation";
|
|
5
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/
|
|
7
|
+
import { d as R } from "./chunk/B5GDq8NJ.js";
|
|
8
8
|
import { useMergeProps as $ } from "./hooks/useMergeProps.js";
|
|
9
9
|
import { y as m } from "./chunk/BzPkh4Zv.js";
|
|
10
10
|
function N() {
|
package/Select.js
CHANGED
package/SelectView.js
CHANGED
|
@@ -9,11 +9,11 @@ import ro from "@unicom-cloud/icons/IconUiLoading";
|
|
|
9
9
|
import no from "@unicom-cloud/icons/IconUiSearch";
|
|
10
10
|
import so from "lodash/isFunction";
|
|
11
11
|
import $e from "lodash/isUndefined";
|
|
12
|
-
import { d as ao, I as lo } from "./chunk/
|
|
12
|
+
import { d as ao, I as lo } from "./chunk/B5GDq8NJ.js";
|
|
13
13
|
import { useForceUpdate as co } from "./hooks/useForceUpdate.js";
|
|
14
14
|
import { usePersistCallback as io } from "./hooks/usePersistCallback.js";
|
|
15
|
-
import { I as uo } from "./chunk/
|
|
16
|
-
import { I as fo } from "./chunk/
|
|
15
|
+
import { I as uo } from "./chunk/DPJEIBKZ.js";
|
|
16
|
+
import { I as fo } from "./chunk/BwSpYGK-.js";
|
|
17
17
|
import po from "./Popover.js";
|
|
18
18
|
import Te from "./Tag.js";
|
|
19
19
|
import ye from "./utils/fillNBSP.js";
|
package/Skeleton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n, jsxs as P } from "react/jsx-runtime";
|
|
2
2
|
import k from "lodash/isPlainObject";
|
|
3
3
|
import v, { forwardRef as w, useContext as S } from "react";
|
|
4
|
-
import { d as j } from "./chunk/
|
|
4
|
+
import { d as j } from "./chunk/B5GDq8NJ.js";
|
|
5
5
|
import { useMergeProps as b } from "./hooks/useMergeProps.js";
|
|
6
6
|
import { y as p } from "./chunk/BzPkh4Zv.js";
|
|
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 E from "lodash/isFunction";
|
|
5
5
|
import re from "lodash/isPlainObject";
|
|
6
6
|
import _, { useState as Se, useContext as Le, useMemo as Z, useRef as S, useEffect as Ee, createElement as De, useCallback as H, forwardRef as st } from "react";
|
|
7
|
-
import { d as Be } from "./chunk/
|
|
7
|
+
import { d as Be } from "./chunk/B5GDq8NJ.js";
|
|
8
8
|
import { useMergeProps as at } from "./hooks/useMergeProps.js";
|
|
9
9
|
import { useMergeValue as Fe } from "./hooks/useMergeValue.js";
|
|
10
10
|
import { useUpdateEffect as ut } from "./hooks/useUpdateEffect.js";
|
|
@@ -15,7 +15,7 @@ import ne from "lodash/isNumber";
|
|
|
15
15
|
import ct from "lodash/isString";
|
|
16
16
|
import { useKeyboardEvent as 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/D01b7bWX.js";
|
|
19
19
|
import { G as dt } from "./chunk/Cqyp4qni.js";
|
|
20
20
|
import gt from "lodash/isUndefined";
|
|
21
21
|
const pt = { maxWidth: 350 }, ht = {
|
package/Space.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { d as F } from "./chunk/
|
|
1
|
+
import { jsx as l, jsxs as M } from "react/jsx-runtime";
|
|
2
|
+
import P from "lodash/isArray";
|
|
3
|
+
import b from "lodash/isNumber";
|
|
4
|
+
import v, { forwardRef as j, useContext as k } from "react";
|
|
5
|
+
import { d as F } from "./chunk/B5GDq8NJ.js";
|
|
6
6
|
import { useMergeProps as D } from "./hooks/useMergeProps.js";
|
|
7
7
|
import { y as E } from "./chunk/BzPkh4Zv.js";
|
|
8
8
|
import { isFragment as H } from "react-is";
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
return
|
|
12
|
-
H(
|
|
13
|
-
}),
|
|
9
|
+
function N(c) {
|
|
10
|
+
let e = [];
|
|
11
|
+
return v.Children.forEach(c, (n) => {
|
|
12
|
+
H(n) && n.props ? e = e.concat(N(n.props.children)) : n != null && e.push(n);
|
|
13
|
+
}), e;
|
|
14
14
|
}
|
|
15
15
|
const O = {
|
|
16
16
|
size: "small",
|
|
17
17
|
direction: "horizontal"
|
|
18
18
|
};
|
|
19
|
-
function
|
|
20
|
-
const { getPrefixCls:
|
|
19
|
+
function V(c, e) {
|
|
20
|
+
const { getPrefixCls: n, componentConfig: p, rtl: y } = k(F), C = D(
|
|
21
21
|
c,
|
|
22
22
|
O,
|
|
23
|
-
|
|
23
|
+
p == null ? void 0 : p.Space
|
|
24
24
|
), {
|
|
25
|
-
className:
|
|
26
|
-
style:
|
|
27
|
-
children:
|
|
25
|
+
className: x,
|
|
26
|
+
style: w,
|
|
27
|
+
children: B,
|
|
28
28
|
size: s,
|
|
29
29
|
direction: m,
|
|
30
|
-
align:
|
|
31
|
-
wrap:
|
|
32
|
-
split:
|
|
33
|
-
...
|
|
34
|
-
} =
|
|
35
|
-
|
|
30
|
+
align: L,
|
|
31
|
+
wrap: f,
|
|
32
|
+
split: u,
|
|
33
|
+
...R
|
|
34
|
+
} = C, i = n("space"), $ = L || (m === "horizontal" ? "center" : ""), z = E(
|
|
35
|
+
i,
|
|
36
36
|
{
|
|
37
|
-
[`${
|
|
38
|
-
[`${
|
|
39
|
-
[`${
|
|
40
|
-
[`${
|
|
37
|
+
[`${i}-${m}`]: m,
|
|
38
|
+
[`${i}-align-${$}`]: $,
|
|
39
|
+
[`${i}-wrap`]: f,
|
|
40
|
+
[`${i}-rtl`]: y
|
|
41
41
|
},
|
|
42
|
-
|
|
42
|
+
x
|
|
43
43
|
);
|
|
44
|
-
function
|
|
45
|
-
if (
|
|
44
|
+
function g(r) {
|
|
45
|
+
if (b(r))
|
|
46
46
|
return r;
|
|
47
47
|
switch (r) {
|
|
48
48
|
case "mini":
|
|
@@ -57,36 +57,40 @@ function q(c, i) {
|
|
|
57
57
|
return 8;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
const h =
|
|
61
|
-
function
|
|
60
|
+
const h = N(B);
|
|
61
|
+
function A(r) {
|
|
62
62
|
const o = h.length === r + 1, a = y ? "marginLeft" : "marginRight";
|
|
63
63
|
if (typeof s == "string" || typeof s == "number") {
|
|
64
|
-
const t =
|
|
65
|
-
return
|
|
64
|
+
const t = g(s);
|
|
65
|
+
return f ? o ? { marginBottom: t } : {
|
|
66
66
|
[`${a}`]: t,
|
|
67
67
|
marginBottom: t
|
|
68
68
|
} : o ? {} : {
|
|
69
69
|
[m === "vertical" ? "marginBottom" : a]: t
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
if (
|
|
73
|
-
const t =
|
|
74
|
-
return
|
|
72
|
+
if (P(s)) {
|
|
73
|
+
const t = g(s[0]), d = g(s[1]);
|
|
74
|
+
return f ? o ? { marginBottom: d } : {
|
|
75
75
|
[`${a}`]: t,
|
|
76
|
-
marginBottom:
|
|
77
|
-
} : m === "vertical" ? { marginBottom:
|
|
76
|
+
marginBottom: d
|
|
77
|
+
} : m === "vertical" ? { marginBottom: d } : { [`${a}`]: t };
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
return /* @__PURE__ */
|
|
81
|
-
const a = (r == null ? void 0 : r.key) || o, t =
|
|
82
|
-
return /* @__PURE__ */
|
|
83
|
-
t && /* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
80
|
+
return /* @__PURE__ */ l("div", { ref: e, className: z, style: w, ...R, children: h.map((r, o) => {
|
|
81
|
+
const a = (r == null ? void 0 : r.key) || o, t = u != null && o > 0;
|
|
82
|
+
return /* @__PURE__ */ M(v.Fragment, { children: [
|
|
83
|
+
t && /* @__PURE__ */ l("div", { className: `${i}-item-split`, children: u }),
|
|
84
|
+
/* @__PURE__ */ l("div", { className: `${i}-item`, style: A(o), children: r })
|
|
85
85
|
] }, a);
|
|
86
86
|
}) });
|
|
87
87
|
}
|
|
88
|
-
const
|
|
89
|
-
|
|
88
|
+
const S = j(V);
|
|
89
|
+
S.displayName = "Space";
|
|
90
|
+
function W(c, e) {
|
|
91
|
+
return /* @__PURE__ */ l(S, { ref: e, direction: "vertical", children: c.children });
|
|
92
|
+
}
|
|
90
93
|
export {
|
|
91
|
-
|
|
94
|
+
W as SpaceVertical,
|
|
95
|
+
S as default
|
|
92
96
|
};
|
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 { d as L } from "./chunk/
|
|
5
|
+
import { d as L } from "./chunk/B5GDq8NJ.js";
|
|
6
6
|
import { useMergeProps as H } from "./hooks/useMergeProps.js";
|
|
7
7
|
import { y as v } from "./chunk/BzPkh4Zv.js";
|
|
8
8
|
import { isEmptyReactNode as M } from "./utils/is.js";
|