@unicom-cloud/ui 0.8.81 → 0.8.82
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 +1 -1
- package/AutoComplete.js +2 -2
- package/BackTop.js +2 -2
- package/Badge.js +1 -1
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +2 -2
- 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 +2 -2
- package/Comment.js +1 -1
- package/ConfigProvider.js +5 -4
- package/Copy.js +1 -1
- package/DatePicker.js +7 -7
- package/Descriptions.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/List.js +2 -2
- package/Mentions.js +2 -2
- package/Menu.js +1 -1
- package/Message.js +1 -1
- package/Modal.js +1 -1
- package/Notice.js +1 -1
- package/Notification.js +5 -5
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Pagination.js +1 -1
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/Select.js +1 -1
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +1 -1
- package/SpeechSynthesis.js +1 -1
- package/Spin.js +1 -1
- package/Statistic.js +2 -2
- package/Steps.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Transfer.js +2 -2
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +1 -1
- package/Typography.js +1 -1
- package/affix/index.js +60 -57
- package/alert/index.js +53 -53
- package/anchor/Anchor.js +72 -72
- package/anchor/Link.js +27 -27
- package/anchor/util.js +1 -1
- package/auto-complete/index.js +2 -2
- package/avatar/Avatar.js +31 -31
- package/avatar/Group.js +25 -25
- package/back-top/index.js +30 -30
- package/badge/index.js +37 -37
- package/breadcrumb/index.js +26 -26
- package/button/Group.js +7 -7
- package/button/index.js +29 -29
- package/calendar/index.js +2 -2
- package/card/Grid.js +12 -12
- package/card/Meta.js +17 -17
- package/card/index.js +44 -44
- package/carousel/Arrow.js +19 -19
- package/carousel/Indicator.js +25 -25
- package/carousel/index.js +77 -77
- package/cascader/Cascader.js +2 -2
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/{yLRv5RIK.js → CQI1gsQs.js} +181 -181
- package/chunk/CmMehQON.js +1464 -0
- package/chunk/Cplu5dtQ.js +730 -0
- package/chunk/{C5X4hOkx.js → D0338Pbq.js} +80 -80
- package/chunk/{DYspELhF.js → DXDbeIai.js} +223 -223
- package/chunk/{DEiyXzBZ.js → DfrB26fI.js} +63 -63
- package/chunk/{BG7YGUsx.js → dKvAiKxr.js} +119 -119
- package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
- package/chunk/{DLBfXSnU.js → w221i0nK.js} +2872 -2871
- package/collapse/Collapse.js +2 -2
- package/collapse/Item.js +2 -2
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +36 -36
- package/color-picker/InputAlpha.js +11 -11
- package/color-picker/InputHex.js +24 -24
- package/color-picker/InputRgb.js +23 -23
- package/color-picker/Palette.js +18 -18
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +2 -2
- package/comment/index.js +31 -31
- package/config-provider/ConfigProvider.js +5 -4
- package/config-provider/context.js +2 -2
- package/config-provider/index.js +4 -3
- package/copy/index.js +28 -28
- package/date-picker/Picker.js +276 -276
- package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
- package/date-picker/index.js +26 -27
- package/descriptions/index.js +33 -33
- package/divider/index.js +12 -12
- package/draggable/index.js +23 -23
- package/drawer/Drawer.js +81 -81
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +56 -56
- package/empty/index.js +1 -1
- package/form/Form.js +76 -76
- package/form/FormItem.js +64 -64
- package/grid/Col.js +53 -53
- package/grid/Row.js +34 -34
- package/grid/grid-item.js +29 -29
- package/grid/grid.js +50 -50
- package/icon/index.js +20 -19
- package/icon-hover/index.js +1 -1
- package/image/Image.js +86 -86
- package/image/ImagePreview.js +2 -2
- package/image/ImagePreviewArrow.js +22 -22
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +410 -408
- package/input/Group.js +8 -8
- package/input/Input.js +322 -322
- package/input/InputElement.js +1 -1
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +1 -1
- package/input-number/index.js +1 -1
- package/input-tag/InputTag.js +40 -40
- package/layout/Content.js +7 -7
- package/layout/Footer.js +9 -9
- package/layout/Header.js +7 -7
- package/layout/Sider.js +55 -55
- package/layout/index.js +32 -32
- package/link/index.js +35 -35
- package/list/Item.js +29 -29
- package/list/Meta.js +12 -12
- package/list/index.js +2 -2
- package/mentions/index.js +2 -2
- package/menu/Menu.js +2 -2
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +1 -1
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +2 -2
- package/modal/index.js +1 -1
- package/notice/index.js +1 -1
- package/notification/index.js +5 -5
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +12 -12
- package/overflow-ellipsis/index.js +24 -24
- package/package.json +1 -1
- package/page-header/index.js +38 -38
- package/pagination/PageItem.js +16 -16
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +2 -2
- package/pagination/Pagination.js +2 -2
- package/pagination/index.js +1 -1
- package/picker/Input.js +69 -69
- package/picker/InputRange.js +111 -111
- package/popconfirm/index.js +61 -61
- package/popover/index.js +35 -35
- package/progress/index.js +22 -22
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +49 -49
- package/resize-box/ResizeTrigger.js +34 -34
- package/resize-box/Split.js +56 -56
- package/resize-box/SplitGroup.js +55 -55
- package/resize-box/index.js +51 -51
- package/result/index.js +41 -41
- package/select/Option.js +1 -1
- package/select/Select.js +2 -2
- package/select/index.js +2 -2
- package/select/util.js +1 -1
- package/select-view/Core.js +125 -125
- package/skeleton/index.js +20 -20
- package/slider/Button.js +57 -57
- package/slider/index.js +116 -116
- package/space/index.js +46 -44
- package/speech-synthesis/index.js +1 -1
- package/spin/DotLoading.js +10 -10
- package/spin/index.js +44 -44
- package/statistic/Countdown.js +34 -34
- package/statistic/index.js +67 -67
- package/steps/index.js +55 -55
- package/style.css +1 -1
- package/switch/index.js +54 -54
- package/table/Table.js +3 -3
- package/table/index.js +1 -1
- package/tabs/Tab.js +2 -2
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +12 -12
- package/tabs/index.js +2 -2
- package/tag/index.js +45 -45
- package/time-picker/Picker.js +76 -76
- package/time-picker/TimePicker.js +136 -136
- package/time-picker/index.js +8 -8
- package/time-picker/util.js +5 -5
- package/timeline/Item.js +47 -47
- package/timeline/Timeline.js +41 -41
- package/tooltip/index.js +29 -29
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +2 -2
- package/tree/Animation.js +2 -2
- package/tree/Node.js +2 -2
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/List.js +1 -1
- package/tree-select/Select.js +2 -2
- package/tree-select/index.js +2 -2
- package/trigger/index.js +60 -60
- package/types/config-provider/ConfigProvider.d.ts +2 -2
- package/types/config-provider/context.d.ts +1 -1
- package/types/date-picker/index.d.ts +8 -9
- package/types/date-picker/interface.d.ts +9 -9
- package/types/index.d.ts +1 -1
- package/types/picker/Input.d.ts +2 -2
- package/types/space/index.d.ts +2 -1
- package/types/utils/names.d.ts +1 -1
- package/typography/Base.js +53 -53
- package/typography/Ellipsis.js +9 -8
- package/typography/Operations.js +28 -28
- package/typography/Paragraph.js +8 -8
- package/typography/Typography.js +7 -7
- package/typography/index.js +1 -1
- package/upload/TriggerNode.js +47 -47
- package/upload/Upload.js +184 -184
- package/utils/contextHolder.js +3 -3
- package/utils/index.js +13 -13
- package/utils/names.js +1 -1
- package/utils/setPrimaryColor.js +18 -13
- package/utils/tween.js +1 -1
- package/verification-code/VerificationCode.js +49 -49
- package/version/index.js +1 -1
- package/watermark/Watermark.js +24 -24
- package/chunk/CQvM33Vg.js +0 -724
- package/chunk/yhU2zeeu.js +0 -1461
- /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
package/resize-box/SplitGroup.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as D, jsxs as wt } from "react/jsx-runtime";
|
|
2
2
|
import dt from "lodash/isFunction";
|
|
3
3
|
import Mt from "lodash/isNumber";
|
|
4
4
|
import S from "lodash/isPlainObject";
|
|
5
5
|
import Ot from "lodash/isString";
|
|
6
|
-
import
|
|
7
|
-
import Ct, { forwardRef as xt, useContext as St, useRef as z, useState as b, useEffect as
|
|
8
|
-
import { a as
|
|
9
|
-
import
|
|
10
|
-
import { on as
|
|
11
|
-
import { o as
|
|
6
|
+
import L from "lodash/isUndefined";
|
|
7
|
+
import Ct, { forwardRef as xt, useContext as St, useRef as z, useState as b, useEffect as Y, useImperativeHandle as zt } from "react";
|
|
8
|
+
import { a as Rt } from "../chunk/Cplu5dtQ.js";
|
|
9
|
+
import Nt from "@unicom-cloud/utils/class-name";
|
|
10
|
+
import { on as R, off as N } from "../utils/dom.js";
|
|
11
|
+
import { o as Pt } from "../chunk/BKKEev13.js";
|
|
12
12
|
import pt from "./ResizeTrigger.js";
|
|
13
|
-
const
|
|
14
|
-
function Tt(c,
|
|
13
|
+
const j = "horizontal", _ = "vertical";
|
|
14
|
+
function Tt(c, J) {
|
|
15
15
|
const {
|
|
16
16
|
panes: f,
|
|
17
|
-
style:
|
|
18
|
-
className:
|
|
19
|
-
component:
|
|
20
|
-
direction:
|
|
21
|
-
icon:
|
|
22
|
-
...
|
|
23
|
-
} = c, { getPrefixCls:
|
|
17
|
+
style: U,
|
|
18
|
+
className: Z,
|
|
19
|
+
component: q = "div",
|
|
20
|
+
direction: K = "horizontal",
|
|
21
|
+
icon: Q,
|
|
22
|
+
...tt
|
|
23
|
+
} = c, { getPrefixCls: y, rtl: k } = St(Rt), et = 1 / f.length, g = z(), A = z(
|
|
24
24
|
new Array(f.length).fill({
|
|
25
25
|
moving: !1,
|
|
26
26
|
startOffset: 0,
|
|
27
27
|
startPosition: 0
|
|
28
28
|
})
|
|
29
|
-
), nt = z([]),
|
|
29
|
+
), nt = z([]), P = z(0), p = z([]), [l, E] = b(
|
|
30
30
|
new Array(f.length).fill(et)
|
|
31
|
-
), [ot,
|
|
31
|
+
), [ot, F] = b(!1), [I, rt] = b(
|
|
32
32
|
new Array(f.length).fill(0)
|
|
33
33
|
), [w, st] = b(
|
|
34
34
|
new Array(Math.max(f.length - 1, 0)).fill({ prev: !1, next: !1 })
|
|
35
|
-
), d =
|
|
35
|
+
), d = y == null ? void 0 : y("resizebox-split-group"), v = K === j, ct = v && k, H = !v, it = Nt(
|
|
36
36
|
d,
|
|
37
|
-
`${d}-${v ?
|
|
37
|
+
`${d}-${v ? j : _}`,
|
|
38
38
|
{ [`${d}-moving`]: ot },
|
|
39
|
-
{ [`${d}-rtl`]:
|
|
40
|
-
|
|
41
|
-
), at =
|
|
39
|
+
{ [`${d}-rtl`]: k },
|
|
40
|
+
Z
|
|
41
|
+
), at = q, ft = () => {
|
|
42
42
|
let t = [];
|
|
43
43
|
f.forEach((o) => {
|
|
44
44
|
const { size: s } = o;
|
|
45
|
-
|
|
45
|
+
L(s) ? t.push(void 0) : t.push(M(s));
|
|
46
46
|
});
|
|
47
47
|
const e = t.filter((o) => !o), r = (1 - t.reduce((o, s) => (o || 0) + (s || 0), 0)) / e.length;
|
|
48
|
-
return t = t.map((o) =>
|
|
48
|
+
return t = t.map((o) => L(o) ? r : o), t;
|
|
49
49
|
}, lt = (t) => {
|
|
50
|
-
const e =
|
|
50
|
+
const e = I[t - 1] || 0, n = I[t];
|
|
51
51
|
return `calc(${l[t] * 100}% - ${(e + n) / 2}px)`;
|
|
52
52
|
};
|
|
53
53
|
function M(t) {
|
|
@@ -57,7 +57,7 @@ function Tt(c, _) {
|
|
|
57
57
|
const n = Ot(t) ? parseFloat(t) / e : t;
|
|
58
58
|
return Math.min(n, 1);
|
|
59
59
|
}
|
|
60
|
-
const
|
|
60
|
+
const X = (t) => {
|
|
61
61
|
const e = Math.min(t + 1, f.length - 1), n = l[t] + l[e], r = M(f[t].min) || 0;
|
|
62
62
|
let o = M(f[t].max) || n;
|
|
63
63
|
const s = M(f[e].min) || 0;
|
|
@@ -69,12 +69,12 @@ function Tt(c, _) {
|
|
|
69
69
|
nextMax: i
|
|
70
70
|
};
|
|
71
71
|
}, ut = (t, e, n) => {
|
|
72
|
-
const r =
|
|
72
|
+
const r = P.current, o = r + 1, s = [...l], i = ct ? -1 : 1, h = l[r], C = l[o], x = h + C, { currentMin: m, currentMax: a } = X(r);
|
|
73
73
|
let u = t + M(`${(n - e) * i}px`);
|
|
74
74
|
return u = Math.max(m, u), u = Math.min(a, u), s[r] = u, s[o] = x - u, s;
|
|
75
75
|
};
|
|
76
76
|
function mt(t, e) {
|
|
77
|
-
const { contentRect: n } = t[0], r = n[
|
|
77
|
+
const { contentRect: n } = t[0], r = n[H ? "height" : "width"], o = [...I];
|
|
78
78
|
o[e] = r, rt(o);
|
|
79
79
|
}
|
|
80
80
|
const gt = (t) => {
|
|
@@ -90,20 +90,20 @@ function Tt(c, _) {
|
|
|
90
90
|
};
|
|
91
91
|
function vt(t, e) {
|
|
92
92
|
var r;
|
|
93
|
-
(r = c.onMovingStart) == null || r.call(c, e),
|
|
94
|
-
const n =
|
|
95
|
-
n.moving = !0, n.startOffset = l[e], n.startPosition = v ? t.pageX : t.pageY,
|
|
93
|
+
(r = c.onMovingStart) == null || r.call(c, e), P.current = e;
|
|
94
|
+
const n = A.current[e];
|
|
95
|
+
n.moving = !0, n.startOffset = l[e], n.startPosition = v ? t.pageX : t.pageY, F(!0), R(window, "mousemove", T), R(window, "touchmove", T), R(window, "mouseup", O), R(window, "touchend", O), R(window, "contextmenu", O), document.body.style.cursor = H ? "row-resize" : "col-resize";
|
|
96
96
|
}
|
|
97
97
|
function T(t) {
|
|
98
98
|
var o;
|
|
99
|
-
const e =
|
|
99
|
+
const e = P.current, n = A.current[e], r = v ? g.current.offsetWidth : g.current.offsetHeight;
|
|
100
100
|
if (n.moving) {
|
|
101
101
|
const s = ut(
|
|
102
102
|
n.startOffset,
|
|
103
103
|
n.startPosition,
|
|
104
104
|
v ? t.pageX : t.pageY
|
|
105
105
|
);
|
|
106
|
-
|
|
106
|
+
E(s), p.current = s, (o = c == null ? void 0 : c.onMoving) == null || o.call(
|
|
107
107
|
c,
|
|
108
108
|
t,
|
|
109
109
|
s.map((i) => `${i * r}px`),
|
|
@@ -113,39 +113,39 @@ function Tt(c, _) {
|
|
|
113
113
|
}
|
|
114
114
|
function O() {
|
|
115
115
|
var e;
|
|
116
|
-
const t =
|
|
117
|
-
|
|
116
|
+
const t = P.current;
|
|
117
|
+
A.current[t].moving = !1, F(!1), N(window, "mousemove", T), N(window, "touchmove", T), N(window, "mouseup", O), N(window, "touchend", O), N(window, "contextmenu", O), document.body.style.cursor = "default", (e = c.onMovingEnd) == null || e.call(c, t);
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
var
|
|
121
|
-
const o = e + 1, s = [...l], i = l[e], h = l[o], C = i + h, x = v ? g.current.offsetWidth : g.current.offsetHeight, { currentMin: m, nextMin: a } =
|
|
122
|
-
let u = p.current[e], $ = p.current[o],
|
|
123
|
-
n === "prev" ? (h !== a || $ === a) && (u = m, $ = C - m,
|
|
119
|
+
function G(t, e, n, r) {
|
|
120
|
+
var V, W;
|
|
121
|
+
const o = e + 1, s = [...l], i = l[e], h = l[o], C = i + h, x = v ? g.current.offsetWidth : g.current.offsetHeight, { currentMin: m, nextMin: a } = X(e);
|
|
122
|
+
let u = p.current[e], $ = p.current[o], B = w[e][n];
|
|
123
|
+
n === "prev" ? (h !== a || $ === a) && (u = m, $ = C - m, B = !0) : (i !== m || u === m) && (u = C - a, $ = a, B = !0), s[e] = u, s[o] = $, (V = c == null ? void 0 : c.onMoving) == null || V.call(
|
|
124
124
|
c,
|
|
125
125
|
t,
|
|
126
126
|
s.map((ht) => `${ht * x}px`),
|
|
127
127
|
e
|
|
128
|
-
), (
|
|
128
|
+
), (W = c.onMovingEnd) == null || W.call(c, e), E(s), dt(r) && r(t, e, n, B);
|
|
129
129
|
}
|
|
130
|
-
return
|
|
130
|
+
return Y(() => {
|
|
131
131
|
const t = ft();
|
|
132
|
-
|
|
133
|
-
}, [JSON.stringify(f.map((t) => t.size))]), zt(
|
|
132
|
+
E(t), p.current = t;
|
|
133
|
+
}, [JSON.stringify(f.map((t) => t.size))]), zt(J, () => g.current, []), Y(() => {
|
|
134
134
|
const t = [];
|
|
135
135
|
l.forEach((e, n) => {
|
|
136
|
-
const r = { prev: !1, next: !1 }, o = n + 1, { currentMin: s, nextMin: i } =
|
|
136
|
+
const r = { prev: !1, next: !1 }, o = n + 1, { currentMin: s, nextMin: i } = X(n);
|
|
137
137
|
e === s ? r.prev = !0 : l[o] === i && (r.next = !0), t.push(r);
|
|
138
138
|
}), st(t);
|
|
139
|
-
}, [l]), /* @__PURE__ */
|
|
139
|
+
}, [l]), /* @__PURE__ */ D(
|
|
140
140
|
at,
|
|
141
141
|
{
|
|
142
|
-
...
|
|
142
|
+
...Pt(tt, [
|
|
143
143
|
"onMovingStart",
|
|
144
144
|
"onPaneResize",
|
|
145
145
|
"onMoving",
|
|
146
146
|
"onMovingEnd"
|
|
147
147
|
]),
|
|
148
|
-
style:
|
|
148
|
+
style: U,
|
|
149
149
|
className: it,
|
|
150
150
|
ref: g,
|
|
151
151
|
children: f.map((t, e) => {
|
|
@@ -157,7 +157,7 @@ function Tt(c, _) {
|
|
|
157
157
|
collapsible: i = {}
|
|
158
158
|
} = t, { hasPrev: h, hasNext: C } = gt(e), x = S(i) && S(i.prev) ? i.prev : {}, m = S(i) && S(i.next) ? i.next : {};
|
|
159
159
|
return /* @__PURE__ */ wt(Ct.Fragment, { children: [
|
|
160
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ D(
|
|
161
161
|
"div",
|
|
162
162
|
{
|
|
163
163
|
className: `${d}-pane`,
|
|
@@ -166,22 +166,22 @@ function Tt(c, _) {
|
|
|
166
166
|
children: n
|
|
167
167
|
}
|
|
168
168
|
),
|
|
169
|
-
!r && e !== f.length - 1 && /* @__PURE__ */
|
|
169
|
+
!r && e !== f.length - 1 && /* @__PURE__ */ D(
|
|
170
170
|
pt,
|
|
171
171
|
{
|
|
172
172
|
className: `${d}-trigger`,
|
|
173
|
-
direction:
|
|
174
|
-
icon:
|
|
173
|
+
direction: H ? j : _,
|
|
174
|
+
icon: Q,
|
|
175
175
|
onResize: (a) => mt(a, e),
|
|
176
176
|
onMouseDown: (a) => vt(a, e),
|
|
177
177
|
collapsible: {
|
|
178
178
|
prev: h ? {
|
|
179
|
-
onClick: (a) =>
|
|
179
|
+
onClick: (a) => G(a, e, "prev", x.onClick),
|
|
180
180
|
icon: x.icon,
|
|
181
181
|
collapsed: w[e].prev
|
|
182
182
|
} : void 0,
|
|
183
183
|
next: C ? {
|
|
184
|
-
onClick: (a) =>
|
|
184
|
+
onClick: (a) => G(a, e, "next", m.onClick),
|
|
185
185
|
icon: m.icon,
|
|
186
186
|
collapsed: w[e].next
|
|
187
187
|
} : void 0
|
package/resize-box/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsxs as ot, jsx as rt } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as nt, useContext as st, useState as it, useRef as
|
|
4
|
-
import { a as at } from "../chunk/
|
|
2
|
+
import E from "lodash/isNumber";
|
|
3
|
+
import { forwardRef as nt, useContext as st, useState as it, useRef as W, useImperativeHandle as ct } from "react";
|
|
4
|
+
import { a as at } from "../chunk/Cplu5dtQ.js";
|
|
5
5
|
import { u as ut } from "../chunk/BFTV6myl.js";
|
|
6
|
-
import { u as
|
|
6
|
+
import { u as $ } from "../chunk/CXPOj2uy.js";
|
|
7
7
|
import mt from "@unicom-cloud/utils/class-name";
|
|
8
8
|
import { on as g, off as l } from "../utils/dom.js";
|
|
9
9
|
import { o as dt } from "../chunk/BKKEev13.js";
|
|
10
10
|
import gt from "./ResizeTrigger.js";
|
|
11
11
|
import lt from "./Split.js";
|
|
12
12
|
import ft from "./SplitGroup.js";
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
z,
|
|
13
|
+
const X = "left", b = "right", y = "top", x = "bottom", pt = [
|
|
14
|
+
X,
|
|
16
15
|
b,
|
|
16
|
+
y,
|
|
17
17
|
x
|
|
18
18
|
], ht = {
|
|
19
19
|
component: "div",
|
|
@@ -30,28 +30,28 @@ const $ = "left", z = "right", b = "top", x = "bottom", pt = [
|
|
|
30
30
|
return f;
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
|
-
function vt(f,
|
|
34
|
-
const { getPrefixCls:
|
|
33
|
+
function vt(f, Y) {
|
|
34
|
+
const { getPrefixCls: w, componentConfig: v, rtl: I } = st(at), r = ut(
|
|
35
35
|
f,
|
|
36
36
|
ht,
|
|
37
|
-
|
|
37
|
+
v == null ? void 0 : v.ResizeBox
|
|
38
38
|
), {
|
|
39
|
-
style:
|
|
40
|
-
className:
|
|
41
|
-
component:
|
|
39
|
+
style: k,
|
|
40
|
+
className: G,
|
|
41
|
+
component: _,
|
|
42
42
|
directions: C,
|
|
43
|
-
resizeIcons:
|
|
44
|
-
children:
|
|
43
|
+
resizeIcons: A,
|
|
44
|
+
children: P,
|
|
45
45
|
resizeTriggers: j,
|
|
46
46
|
width: F,
|
|
47
47
|
height: q,
|
|
48
48
|
...K
|
|
49
|
-
} = r, L =
|
|
49
|
+
} = r, L = I ? C.map((t) => wt(t)) : C, R = w == null ? void 0 : w("resizebox"), U = mt(R, { [`${R}-rtl`]: I }, G), [V, J] = it({}), [N, S] = $(void 0, { value: F }), [H, M] = $(void 0, { value: q }), o = W({
|
|
50
50
|
startX: 0,
|
|
51
51
|
startY: 0,
|
|
52
52
|
startWidth: 0,
|
|
53
53
|
startHeight: 0,
|
|
54
|
-
direction:
|
|
54
|
+
direction: b,
|
|
55
55
|
moving: !1,
|
|
56
56
|
padding: {
|
|
57
57
|
top: 0,
|
|
@@ -59,18 +59,18 @@ function vt(f, X) {
|
|
|
59
59
|
left: 0,
|
|
60
60
|
right: 0
|
|
61
61
|
}
|
|
62
|
-
}), p =
|
|
63
|
-
ct(
|
|
64
|
-
function
|
|
65
|
-
return [
|
|
62
|
+
}), p = W();
|
|
63
|
+
ct(Y, () => p.current, []);
|
|
64
|
+
function z(t) {
|
|
65
|
+
return [y, x].indexOf(t) > -1;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function O(t, e) {
|
|
68
68
|
if (t === 0)
|
|
69
69
|
return 0;
|
|
70
70
|
const n = t - e;
|
|
71
71
|
return n <= 0 ? 0 : n;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function D(t) {
|
|
74
74
|
const e = "data-pqb-origin-cursor";
|
|
75
75
|
if (t)
|
|
76
76
|
document.body.setAttribute(e, document.body.style.cursor), document.body.style.cursor = t;
|
|
@@ -83,51 +83,51 @@ function vt(f, X) {
|
|
|
83
83
|
var i, m, d;
|
|
84
84
|
(i = r.onMovingStart) == null || i.call(r), o.current.moving = !0, o.current.startX = e.pageX, o.current.startY = e.pageY, o.current.direction = t;
|
|
85
85
|
const { top: n, left: c, right: a, bottom: s } = o.current.padding;
|
|
86
|
-
o.current.startWidth =
|
|
86
|
+
o.current.startWidth = O(
|
|
87
87
|
(m = p.current) == null ? void 0 : m.clientWidth,
|
|
88
88
|
c + a
|
|
89
|
-
), o.current.startHeight =
|
|
89
|
+
), o.current.startHeight = O(
|
|
90
90
|
(d = p.current) == null ? void 0 : d.clientHeight,
|
|
91
91
|
n + s
|
|
92
|
-
), g(window, "mousemove", h), g(window, "touchmove", h), g(window, "mouseup", u), g(window, "touchend", u), g(window, "contextmenu", u),
|
|
93
|
-
|
|
92
|
+
), g(window, "mousemove", h), g(window, "touchmove", h), g(window, "mouseup", u), g(window, "touchend", u), g(window, "contextmenu", u), D(
|
|
93
|
+
z(t) ? "row-resize" : "col-resize"
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
96
|
function h(t) {
|
|
97
|
-
var
|
|
97
|
+
var B;
|
|
98
98
|
if (!o.current.moving)
|
|
99
99
|
return !1;
|
|
100
100
|
const { startX: e, startY: n, startWidth: c, startHeight: a } = o.current;
|
|
101
101
|
let s = c, i = a;
|
|
102
102
|
const m = t.pageX - e, d = t.pageY - n;
|
|
103
103
|
switch (o.current.direction) {
|
|
104
|
-
case
|
|
105
|
-
s = c - m,
|
|
106
|
-
break;
|
|
107
|
-
case z:
|
|
108
|
-
s = c + m, N(s);
|
|
104
|
+
case X:
|
|
105
|
+
s = c - m, S(s);
|
|
109
106
|
break;
|
|
110
107
|
case b:
|
|
111
|
-
|
|
108
|
+
s = c + m, S(s);
|
|
109
|
+
break;
|
|
110
|
+
case y:
|
|
111
|
+
i = a - d, M(i);
|
|
112
112
|
break;
|
|
113
113
|
case x:
|
|
114
|
-
i = a + d,
|
|
114
|
+
i = a + d, M(i);
|
|
115
115
|
break;
|
|
116
116
|
}
|
|
117
|
-
(
|
|
117
|
+
(B = r.onMoving) == null || B.call(r, t, {
|
|
118
118
|
width: s,
|
|
119
119
|
height: i
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
function u() {
|
|
123
123
|
var t;
|
|
124
|
-
o.current.moving = !1, Z(),
|
|
124
|
+
o.current.moving = !1, Z(), D(), (t = r.onMovingEnd) == null || t.call(r);
|
|
125
125
|
}
|
|
126
126
|
function Z() {
|
|
127
127
|
l(window, "mousemove", h), l(window, "touchmove", h), l(window, "mouseup", u), l(window, "touchend", u), l(window, "contextmenu", u);
|
|
128
128
|
}
|
|
129
129
|
function tt(t, e) {
|
|
130
|
-
const n =
|
|
130
|
+
const n = z(t), { contentRect: c } = e[0], a = `${t.slice(0, 1).toUpperCase()}${t.slice(1)}`, s = c[n ? "height" : "width"];
|
|
131
131
|
o.current.padding[t] = s, J((i) => ({
|
|
132
132
|
...i,
|
|
133
133
|
[`padding${a}`]: s
|
|
@@ -135,27 +135,27 @@ function vt(f, X) {
|
|
|
135
135
|
}
|
|
136
136
|
const et = {
|
|
137
137
|
...V,
|
|
138
|
-
...
|
|
139
|
-
...
|
|
140
|
-
...
|
|
138
|
+
...k || {},
|
|
139
|
+
...E(N) ? { width: N } : {},
|
|
140
|
+
...E(H) ? { height: H } : {}
|
|
141
141
|
};
|
|
142
142
|
return /* @__PURE__ */ ot(
|
|
143
|
-
|
|
143
|
+
_,
|
|
144
144
|
{
|
|
145
145
|
...dt(K, ["onMovingStart", "onMoving", "onMovingEnd"]),
|
|
146
146
|
style: et,
|
|
147
147
|
className: U,
|
|
148
148
|
ref: p,
|
|
149
149
|
children: [
|
|
150
|
-
|
|
150
|
+
P,
|
|
151
151
|
L.map((t) => {
|
|
152
152
|
if (pt.indexOf(t) !== -1)
|
|
153
153
|
return /* @__PURE__ */ rt(
|
|
154
154
|
gt,
|
|
155
155
|
{
|
|
156
|
-
className: `${
|
|
157
|
-
direction:
|
|
158
|
-
icon:
|
|
156
|
+
className: `${R}-direction-${t}`,
|
|
157
|
+
direction: z(t) ? "horizontal" : "vertical",
|
|
158
|
+
icon: A[t],
|
|
159
159
|
onMouseDown: (e) => {
|
|
160
160
|
Q(t, e);
|
|
161
161
|
},
|
|
@@ -171,12 +171,12 @@ function vt(f, X) {
|
|
|
171
171
|
}
|
|
172
172
|
);
|
|
173
173
|
}
|
|
174
|
-
const Rt = nt(vt),
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
174
|
+
const Rt = nt(vt), T = Rt;
|
|
175
|
+
T.Split = lt;
|
|
176
|
+
T.SplitGroup = ft;
|
|
177
|
+
T.displayName = "ResizeBox";
|
|
178
178
|
export {
|
|
179
179
|
lt as ResizeBoxSplit,
|
|
180
180
|
ft as ResizeBoxSplitGroup,
|
|
181
|
-
|
|
181
|
+
T as default
|
|
182
182
|
};
|
package/result/index.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { forwardRef as U, useContext as
|
|
7
|
-
import { a as
|
|
8
|
-
import { u as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
const
|
|
14
|
-
success: /* @__PURE__ */ s(
|
|
15
|
-
info: /* @__PURE__ */ s(
|
|
16
|
-
warning: /* @__PURE__ */ s(
|
|
17
|
-
error: /* @__PURE__ */ s(
|
|
18
|
-
404: /* @__PURE__ */ s(
|
|
19
|
-
403: /* @__PURE__ */ s(
|
|
20
|
-
500: /* @__PURE__ */ s(
|
|
21
|
-
},
|
|
1
|
+
import { jsxs as x, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import v from "@unicom-cloud/icons/IconUiCheck";
|
|
3
|
+
import R from "@unicom-cloud/icons/IconUiClose";
|
|
4
|
+
import g from "@unicom-cloud/icons/IconUiExclamation";
|
|
5
|
+
import C from "@unicom-cloud/icons/IconUiInfo";
|
|
6
|
+
import { forwardRef as U, useContext as b } from "react";
|
|
7
|
+
import { a as j } from "../chunk/Cplu5dtQ.js";
|
|
8
|
+
import { u as w } from "../chunk/BFTV6myl.js";
|
|
9
|
+
import f from "@unicom-cloud/utils/class-name";
|
|
10
|
+
import y from "./403.js";
|
|
11
|
+
import k from "./404.js";
|
|
12
|
+
import E from "./500.js";
|
|
13
|
+
const M = {
|
|
14
|
+
success: /* @__PURE__ */ s(v, {}),
|
|
15
|
+
info: /* @__PURE__ */ s(C, {}),
|
|
16
|
+
warning: /* @__PURE__ */ s(g, {}),
|
|
17
|
+
error: /* @__PURE__ */ s(R, {}),
|
|
18
|
+
404: /* @__PURE__ */ s(k, {}),
|
|
19
|
+
403: /* @__PURE__ */ s(y, {}),
|
|
20
|
+
500: /* @__PURE__ */ s(E, {})
|
|
21
|
+
}, P = {
|
|
22
22
|
status: "info"
|
|
23
23
|
};
|
|
24
|
-
function T(
|
|
25
|
-
const { getPrefixCls:
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
function T(p, u) {
|
|
25
|
+
const { getPrefixCls: r, componentConfig: e, rtl: d } = b(j), i = w(
|
|
26
|
+
p,
|
|
27
|
+
P,
|
|
28
28
|
e == null ? void 0 : e.Result
|
|
29
29
|
), {
|
|
30
30
|
className: $,
|
|
31
31
|
style: N,
|
|
32
32
|
status: t,
|
|
33
|
-
title:
|
|
34
|
-
subTitle:
|
|
35
|
-
extra:
|
|
36
|
-
children:
|
|
37
|
-
icon:
|
|
38
|
-
...
|
|
39
|
-
} =
|
|
40
|
-
return /* @__PURE__ */
|
|
33
|
+
title: c,
|
|
34
|
+
subTitle: n,
|
|
35
|
+
extra: a,
|
|
36
|
+
children: m,
|
|
37
|
+
icon: I,
|
|
38
|
+
...h
|
|
39
|
+
} = i, o = r == null ? void 0 : r("result"), l = "icon" in i ? I : M[t];
|
|
40
|
+
return /* @__PURE__ */ x(
|
|
41
41
|
"div",
|
|
42
42
|
{
|
|
43
|
-
ref:
|
|
44
|
-
className:
|
|
43
|
+
ref: u,
|
|
44
|
+
className: f(
|
|
45
45
|
o,
|
|
46
46
|
{
|
|
47
47
|
[`${o}-is-${t}`]: t,
|
|
@@ -50,22 +50,22 @@ function T(f, p) {
|
|
|
50
50
|
$
|
|
51
51
|
),
|
|
52
52
|
style: N,
|
|
53
|
-
...
|
|
53
|
+
...h,
|
|
54
54
|
children: [
|
|
55
55
|
l && /* @__PURE__ */ s("div", { className: `${o}-icon`, children: /* @__PURE__ */ s(
|
|
56
56
|
"span",
|
|
57
57
|
{
|
|
58
|
-
className:
|
|
58
|
+
className: f(`${o}-icon-tip`, {
|
|
59
59
|
[`${o}-icon-${t}`]: t,
|
|
60
60
|
[`${o}-icon-custom`]: t === null
|
|
61
61
|
}),
|
|
62
62
|
children: l
|
|
63
63
|
}
|
|
64
64
|
) }),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
c && /* @__PURE__ */ s("div", { className: `${o}-title`, children: c }),
|
|
66
|
+
n && /* @__PURE__ */ s("div", { className: `${o}-subtitle`, children: n }),
|
|
67
|
+
a && /* @__PURE__ */ s("div", { className: `${o}-extra`, children: a }),
|
|
68
|
+
m && /* @__PURE__ */ s("div", { className: `${o}-content`, children: m })
|
|
69
69
|
]
|
|
70
70
|
}
|
|
71
71
|
);
|
package/select/Option.js
CHANGED
package/select/Select.js
CHANGED
|
@@ -2,8 +2,8 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "lodash/isArray";
|
|
3
3
|
import "lodash/isFunction";
|
|
4
4
|
import "react";
|
|
5
|
-
import { O as h, S as j } from "../chunk/
|
|
6
|
-
import "../chunk/
|
|
5
|
+
import { O as h, S as j } from "../chunk/w221i0nK.js";
|
|
6
|
+
import "../chunk/Cplu5dtQ.js";
|
|
7
7
|
import "../chunk/B4YRLi8r.js";
|
|
8
8
|
import "../chunk/BFTV6myl.js";
|
|
9
9
|
import "../chunk/CXPOj2uy.js";
|
package/select/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as o } from "../chunk/
|
|
2
|
-
import { O as r } from "../chunk/
|
|
1
|
+
import { S as o } from "../chunk/w221i0nK.js";
|
|
2
|
+
import { O as r } from "../chunk/w221i0nK.js";
|
|
3
3
|
import { default as f } from "./OptGroup.js";
|
|
4
4
|
export {
|
|
5
5
|
r as SelectOption,
|
package/select/util.js
CHANGED
|
@@ -9,7 +9,7 @@ import "lodash/isString";
|
|
|
9
9
|
import "react";
|
|
10
10
|
import "../chunk/CftuXmo_.js";
|
|
11
11
|
import "../chunk/B7M-FGia.js";
|
|
12
|
-
import { a5 as c, a6 as d, a7 as v, a8 as E, a9 as O, aa as S } from "../chunk/
|
|
12
|
+
import { a5 as c, a6 as d, a7 as v, a8 as E, a9 as O, aa as S } from "../chunk/w221i0nK.js";
|
|
13
13
|
export {
|
|
14
14
|
c as flatChildren,
|
|
15
15
|
d as getValidValue,
|