@unicom-cloud/ui 0.8.81 → 0.8.83
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/Input.js +11 -10
- 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/B6r8jPCd.js +6 -0
- package/chunk/{DLBfXSnU.js → BmulTYLW.js} +2880 -2878
- package/chunk/C9oo3EJI.js +692 -0
- package/chunk/{C5X4hOkx.js → CVSWh4ZZ.js} +80 -80
- package/chunk/DILUZgXW.js +1464 -0
- package/chunk/DSRHFFrc.js +53 -0
- package/chunk/{yLRv5RIK.js → DdJVL_4g.js} +181 -181
- package/chunk/{DYspELhF.js → DlHiTTJO.js} +223 -223
- package/chunk/{BG7YGUsx.js → R-uQJib2.js} +119 -119
- package/chunk/{DEiyXzBZ.js → ev6oHWqY.js} +63 -63
- package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
- 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 -3
- 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/form/context.js +1 -1
- 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 +498 -493
- package/input/Button.js +11 -0
- package/input/Group.js +8 -8
- package/input/Input.js +488 -434
- 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/index.js +9 -8
- 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 +2 -2
- package/types/input/Button.d.ts +5 -0
- package/types/input/Input.d.ts +4 -1
- package/types/input/interface.d.ts +7 -0
- package/types/picker/Input.d.ts +2 -2
- package/types/space/index.d.ts +2 -1
- package/types/utils/index.d.ts +1 -0
- package/types/utils/names.d.ts +1 -1
- package/types/utils/setTheme.d.ts +2 -0
- package/typography/Base.js +53 -53
- package/typography/Ellipsis.js +10 -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/upload/request.js +1 -1
- package/upload/request_.js +1 -1
- package/utils/constant.js +1 -1
- package/utils/contextHolder.js +3 -3
- package/utils/dom.js +1 -1
- package/utils/index.js +116 -114
- package/utils/names.js +1 -1
- package/utils/setDarkTheme.js +23 -22
- package/utils/setPrimaryColor.js +22 -16
- package/utils/setTheme.js +9 -0
- 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/D0ZWT7db.js +0 -5
- package/chunk/yhU2zeeu.js +0 -1461
- /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
|
@@ -6,7 +6,7 @@ import "lodash/isArray";
|
|
|
6
6
|
import "lodash/isPlainObject";
|
|
7
7
|
import "lodash/isUndefined";
|
|
8
8
|
import "react";
|
|
9
|
-
import "../chunk/
|
|
9
|
+
import "../chunk/C9oo3EJI.js";
|
|
10
10
|
import "../chunk/BFTV6myl.js";
|
|
11
11
|
import "../chunk/VSe_Wq1g.js";
|
|
12
12
|
import "../chunk/a3hR6zLw.js";
|
|
@@ -17,7 +17,7 @@ import "../chunk/tamGhTJp.js";
|
|
|
17
17
|
import "../chunk/ClqoGc3r.js";
|
|
18
18
|
import "./context.js";
|
|
19
19
|
import "../chunk/CC---6jO.js";
|
|
20
|
-
import { P as q } from "../chunk/
|
|
20
|
+
import { P as q } from "../chunk/DILUZgXW.js";
|
|
21
21
|
import "./util.js";
|
|
22
22
|
export {
|
|
23
23
|
q as default
|
package/date-picker/index.js
CHANGED
|
@@ -1,50 +1,49 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { P as
|
|
5
|
-
function
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
return
|
|
2
|
+
import { forwardRef as s, useRef as d, useImperativeHandle as p } from "react";
|
|
3
|
+
import u from "./Picker.js";
|
|
4
|
+
import { P as f, M as l, D as y, Y as N, W, Q as $ } from "../chunk/DILUZgXW.js";
|
|
5
|
+
function i(m, t) {
|
|
6
|
+
function k(P, n) {
|
|
7
|
+
const o = d();
|
|
8
|
+
return p(n, () => ({
|
|
9
9
|
focus() {
|
|
10
10
|
var e, a;
|
|
11
|
-
(a = (e =
|
|
11
|
+
(a = (e = o.current) == null ? void 0 : e.focus) == null || a.call(e);
|
|
12
12
|
},
|
|
13
13
|
blur() {
|
|
14
14
|
var e, a;
|
|
15
|
-
(a = (e =
|
|
15
|
+
(a = (e = o.current) == null ? void 0 : e.blur) == null || a.call(e);
|
|
16
16
|
}
|
|
17
|
-
})), /* @__PURE__ */ r(
|
|
17
|
+
})), /* @__PURE__ */ r(u, { ...P, ref: o, picker: m, mode: t.mode });
|
|
18
18
|
}
|
|
19
|
-
return
|
|
19
|
+
return k.displayName = t.displayName, s(k);
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const c = i(/* @__PURE__ */ r(y, {}), {
|
|
22
22
|
displayName: "DatePicker",
|
|
23
23
|
mode: "date"
|
|
24
|
-
}), h =
|
|
24
|
+
}), h = i(/* @__PURE__ */ r(l, {}), {
|
|
25
25
|
displayName: "MonthPicker",
|
|
26
26
|
mode: "month"
|
|
27
|
-
}),
|
|
27
|
+
}), M = i(/* @__PURE__ */ r(N, {}), {
|
|
28
28
|
displayName: "YearPicker",
|
|
29
29
|
mode: "year"
|
|
30
|
-
}),
|
|
30
|
+
}), Q = i(/* @__PURE__ */ r(W, {}), {
|
|
31
31
|
displayName: "WeekPicker",
|
|
32
32
|
mode: "week"
|
|
33
|
-
}),
|
|
33
|
+
}), Y = i(/* @__PURE__ */ r($, {}), {
|
|
34
34
|
displayName: "QuarterPicker",
|
|
35
35
|
mode: "quarter"
|
|
36
|
-
}), R = u, g = Object.assign(W, {
|
|
37
|
-
MonthPicker: h,
|
|
38
|
-
YearPicker: D,
|
|
39
|
-
WeekPicker: M,
|
|
40
|
-
QuarterPicker: Q,
|
|
41
|
-
RangePicker: R
|
|
42
36
|
});
|
|
37
|
+
c.MonthPicker = h;
|
|
38
|
+
c.YearPicker = M;
|
|
39
|
+
c.WeekPicker = Q;
|
|
40
|
+
c.QuarterPicker = Y;
|
|
41
|
+
c.RangePicker = f;
|
|
43
42
|
export {
|
|
44
43
|
h as MonthPicker,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
Y as QuarterPicker,
|
|
45
|
+
f as RangePicker,
|
|
46
|
+
Q as WeekPicker,
|
|
47
|
+
M as YearPicker,
|
|
48
|
+
c as default
|
|
50
49
|
};
|
package/descriptions/index.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import I from "lodash/isArray";
|
|
3
3
|
import V from "lodash/isNumber";
|
|
4
4
|
import q from "lodash/isPlainObject";
|
|
5
5
|
import { useContext as B, useState as G, useRef as J, useEffect as K, Fragment as x } from "react";
|
|
6
|
-
import { a as Q } from "../chunk/
|
|
6
|
+
import { a as Q } from "../chunk/C9oo3EJI.js";
|
|
7
7
|
import { u as U } from "../chunk/BFTV6myl.js";
|
|
8
8
|
import W from "@unicom-cloud/utils/class-name";
|
|
9
|
-
import { responsiveObserve as
|
|
10
|
-
const
|
|
9
|
+
import { responsiveObserve as k, responsiveArray as z } from "../utils/responsiveObserve.js";
|
|
10
|
+
const P = (f) => I(f) ? f.reduce((p, m) => p + (m.span || 1), 0) : 0, X = {
|
|
11
11
|
layout: "horizontal",
|
|
12
12
|
column: 3,
|
|
13
13
|
tableLayout: "auto"
|
|
14
14
|
};
|
|
15
15
|
function Y(f) {
|
|
16
16
|
const {
|
|
17
|
-
getPrefixCls:
|
|
18
|
-
componentConfig:
|
|
19
|
-
rtl:
|
|
17
|
+
getPrefixCls: p,
|
|
18
|
+
componentConfig: m,
|
|
19
|
+
rtl: w,
|
|
20
20
|
size: d
|
|
21
|
-
} = B(Q),
|
|
21
|
+
} = B(Q), D = U(
|
|
22
22
|
f,
|
|
23
23
|
X,
|
|
24
|
-
|
|
24
|
+
m == null ? void 0 : m.Descriptions
|
|
25
25
|
), {
|
|
26
|
-
style:
|
|
27
|
-
className:
|
|
28
|
-
column:
|
|
26
|
+
style: L,
|
|
27
|
+
className: O,
|
|
28
|
+
column: u,
|
|
29
29
|
title: v,
|
|
30
30
|
data: b,
|
|
31
|
-
border:
|
|
31
|
+
border: j,
|
|
32
32
|
labelStyle: y,
|
|
33
33
|
valueStyle: $,
|
|
34
34
|
colon: N,
|
|
35
|
-
layout:
|
|
36
|
-
size:
|
|
37
|
-
tableLayout:
|
|
38
|
-
} =
|
|
39
|
-
K(() => (
|
|
40
|
-
for (let t = 0; t <
|
|
41
|
-
const e =
|
|
35
|
+
layout: h,
|
|
36
|
+
size: S,
|
|
37
|
+
tableLayout: C
|
|
38
|
+
} = D, s = p == null ? void 0 : p("descriptions"), [A, E] = G(), g = J(null);
|
|
39
|
+
K(() => (g.current = k.subscribe((n) => {
|
|
40
|
+
for (let t = 0; t < z.length; t++) {
|
|
41
|
+
const e = z[t];
|
|
42
42
|
if (n[e]) {
|
|
43
43
|
E(e);
|
|
44
44
|
break;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}), () => {
|
|
48
|
-
|
|
48
|
+
k.unsubscribe(g.current);
|
|
49
49
|
}), []);
|
|
50
50
|
let a = 3;
|
|
51
|
-
q(
|
|
51
|
+
q(u) && (a = u[A] || 3), V(u) && u > 0 && (a = u);
|
|
52
52
|
const o = [];
|
|
53
|
-
if (
|
|
53
|
+
if (I(b) && b.length > 0 && a) {
|
|
54
54
|
b.forEach((e) => {
|
|
55
|
-
const i = o[o.length - 1], l =
|
|
55
|
+
const i = o[o.length - 1], l = P(i);
|
|
56
56
|
l === 0 ? o.push([
|
|
57
57
|
{
|
|
58
58
|
...e,
|
|
@@ -68,7 +68,7 @@ function Y(f) {
|
|
|
68
68
|
span: e.span ? e.span + l > a ? a - l : e.span : 1
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
|
-
const n = o[o.length - 1], t =
|
|
71
|
+
const n = o[o.length - 1], t = P(n);
|
|
72
72
|
t < a && (n[n.length - 1].span = n[n.length - 1].span + a - t);
|
|
73
73
|
}
|
|
74
74
|
function F(n, t) {
|
|
@@ -159,20 +159,20 @@ function Y(f) {
|
|
|
159
159
|
}) }, t);
|
|
160
160
|
}
|
|
161
161
|
function R(n, t) {
|
|
162
|
-
return
|
|
162
|
+
return h === "inline-vertical" || h === "inline-horizontal" ? M(n, t) : h === "vertical" ? F(n, t) : H(n, t);
|
|
163
163
|
}
|
|
164
164
|
const T = W(
|
|
165
165
|
s,
|
|
166
166
|
{
|
|
167
|
-
[`${s}-border`]:
|
|
168
|
-
[`${s}-layout-${
|
|
169
|
-
[`${s}-size-${
|
|
170
|
-
[`${s}-table-layout-fixed`]:
|
|
171
|
-
[`${s}-rtl`]:
|
|
167
|
+
[`${s}-border`]: j,
|
|
168
|
+
[`${s}-layout-${h}`]: h,
|
|
169
|
+
[`${s}-size-${S || d}`]: S || d,
|
|
170
|
+
[`${s}-table-layout-fixed`]: C === "fixed",
|
|
171
|
+
[`${s}-rtl`]: w
|
|
172
172
|
},
|
|
173
|
-
|
|
173
|
+
O
|
|
174
174
|
);
|
|
175
|
-
return /* @__PURE__ */ c("div", { className: T, style:
|
|
175
|
+
return /* @__PURE__ */ c("div", { className: T, style: L, children: [
|
|
176
176
|
v && /* @__PURE__ */ r("div", { className: `${s}-title`, children: v }),
|
|
177
177
|
/* @__PURE__ */ r("div", { className: `${s}-body`, children: /* @__PURE__ */ r("table", { className: `${s}-table`, cellPadding: 0, cellSpacing: 0, children: /* @__PURE__ */ r("tbody", { children: o.map((n, t) => R(n, t)) }) }) })
|
|
178
178
|
] });
|
package/divider/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { a as
|
|
2
|
+
import { forwardRef as $, useContext as u } from "react";
|
|
3
|
+
import { a as x } from "../chunk/C9oo3EJI.js";
|
|
4
4
|
import { u as N } from "../chunk/BFTV6myl.js";
|
|
5
5
|
import h from "@unicom-cloud/utils/class-name";
|
|
6
6
|
const v = {
|
|
7
7
|
type: "horizontal",
|
|
8
8
|
orientation: "center"
|
|
9
9
|
};
|
|
10
|
-
function
|
|
11
|
-
const { getPrefixCls:
|
|
12
|
-
|
|
10
|
+
function y(n, l) {
|
|
11
|
+
const { getPrefixCls: o, componentConfig: r } = u(x), m = N(
|
|
12
|
+
n,
|
|
13
13
|
v,
|
|
14
14
|
r == null ? void 0 : r.Divider
|
|
15
|
-
), { children: e, style: c, className: p, type:
|
|
15
|
+
), { children: e, style: c, className: p, type: a, orientation: s, ...d } = m, t = o == null ? void 0 : o("divider"), f = h(
|
|
16
16
|
t,
|
|
17
|
-
`${t}-${
|
|
17
|
+
`${t}-${a}`,
|
|
18
18
|
{
|
|
19
19
|
[`${t}-with-text`]: e,
|
|
20
20
|
[`${t}-with-text-${s}`]: e && s
|
|
@@ -25,16 +25,16 @@ function C(a, n) {
|
|
|
25
25
|
"div",
|
|
26
26
|
{
|
|
27
27
|
role: "separator",
|
|
28
|
-
ref:
|
|
28
|
+
ref: l,
|
|
29
29
|
className: f,
|
|
30
30
|
style: c,
|
|
31
31
|
...d,
|
|
32
|
-
children: e &&
|
|
32
|
+
children: e && a === "horizontal" ? /* @__PURE__ */ i("span", { className: `${t}-text ${t}-text-${s}`, children: e }) : null
|
|
33
33
|
}
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
|
-
const
|
|
37
|
-
|
|
36
|
+
const D = $(y);
|
|
37
|
+
D.displayName = "Divider";
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
D as default
|
|
40
40
|
};
|
package/draggable/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import x, { useContext as I, useState as
|
|
3
|
-
import { a as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
function R(
|
|
7
|
-
const { getPrefixCls:
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import x, { useContext as I, useState as D } from "react";
|
|
3
|
+
import { a as N } from "../chunk/C9oo3EJI.js";
|
|
4
|
+
import h from "@unicom-cloud/utils/class-name";
|
|
5
|
+
import v from "./Item.js";
|
|
6
|
+
function R(c) {
|
|
7
|
+
const { getPrefixCls: t } = I(N), a = t == null ? void 0 : t("draggable"), {
|
|
8
8
|
className: i,
|
|
9
|
-
children:
|
|
10
|
-
direction:
|
|
11
|
-
onIndexChange:
|
|
12
|
-
itemWrapperStyle:
|
|
13
|
-
} =
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
|
|
9
|
+
children: p,
|
|
10
|
+
direction: d = "vertical",
|
|
11
|
+
onIndexChange: e,
|
|
12
|
+
itemWrapperStyle: f
|
|
13
|
+
} = c, [u, n] = D(null);
|
|
14
|
+
return /* @__PURE__ */ m("div", { className: h(a, i), children: x.Children.map(p, (g, r) => /* @__PURE__ */ m(
|
|
15
|
+
v,
|
|
16
16
|
{
|
|
17
|
-
style:
|
|
18
|
-
prefixCls:
|
|
19
|
-
direction:
|
|
20
|
-
onDragStart: () =>
|
|
21
|
-
onDragEnd: () =>
|
|
22
|
-
onDrop: (
|
|
23
|
-
const
|
|
24
|
-
|
|
17
|
+
style: f,
|
|
18
|
+
prefixCls: a,
|
|
19
|
+
direction: d,
|
|
20
|
+
onDragStart: () => n(r),
|
|
21
|
+
onDragEnd: () => n(null),
|
|
22
|
+
onDrop: (C, o) => {
|
|
23
|
+
const s = u, l = o === "left" || o === "top" ? r : r + 1;
|
|
24
|
+
s !== l && (e == null || e(l, s));
|
|
25
25
|
},
|
|
26
|
-
children:
|
|
26
|
+
children: g
|
|
27
27
|
}
|
|
28
28
|
)) });
|
|
29
29
|
}
|
package/drawer/Drawer.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as v, Fragment as ge, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import Ie from "@unicom-cloud/icons/IconUiClose";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { a as Se, I as Oe, b as
|
|
3
|
+
import $e from "lodash/isFunction";
|
|
4
|
+
import Be, { useContext as Pe, useRef as U, useState as u, useCallback as Ee, useMemo as De, useImperativeHandle as Re, useEffect as _ } from "react";
|
|
5
|
+
import A from "../button/index.js";
|
|
6
|
+
import { a as Se, I as Oe, b as J } from "../chunk/C9oo3EJI.js";
|
|
7
7
|
import { u as Te } from "../chunk/BFTV6myl.js";
|
|
8
8
|
import { u as ze } from "../chunk/DU1RCDfh.js";
|
|
9
9
|
import Fe from "../portal/index.js";
|
|
10
|
-
import { P as
|
|
10
|
+
import { P as Q } from "../chunk/NPajzdOv.js";
|
|
11
11
|
import g from "@unicom-cloud/utils/class-name";
|
|
12
12
|
import { isServerRendering as je, contains as He } from "../utils/dom.js";
|
|
13
13
|
import { Esc as Me } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
@@ -24,12 +24,12 @@ const We = {
|
|
|
24
24
|
mountOnEnter: !0,
|
|
25
25
|
getPopupContainer: () => document.body
|
|
26
26
|
};
|
|
27
|
-
function qe(
|
|
28
|
-
var
|
|
29
|
-
const
|
|
30
|
-
|
|
27
|
+
function qe(V, X) {
|
|
28
|
+
var O, T, z, F, j, H, M, Z, L, W, q, G;
|
|
29
|
+
const m = Pe(Se), { locale: i, getPrefixCls: p, componentConfig: f, rtl: Y } = m, t = Te(
|
|
30
|
+
V,
|
|
31
31
|
We,
|
|
32
|
-
|
|
32
|
+
f == null ? void 0 : f.Drawer
|
|
33
33
|
), {
|
|
34
34
|
style: ee,
|
|
35
35
|
className: te,
|
|
@@ -38,74 +38,74 @@ function qe(Q, V) {
|
|
|
38
38
|
maskStyle: re,
|
|
39
39
|
headerStyle: se,
|
|
40
40
|
bodyStyle: ie,
|
|
41
|
-
title:
|
|
42
|
-
footer:
|
|
41
|
+
title: h,
|
|
42
|
+
footer: a,
|
|
43
43
|
okText: le,
|
|
44
44
|
cancelText: ae,
|
|
45
45
|
width: ce,
|
|
46
46
|
height: de,
|
|
47
|
-
placement:
|
|
48
|
-
mask:
|
|
47
|
+
placement: d,
|
|
48
|
+
mask: x,
|
|
49
49
|
visible: r,
|
|
50
50
|
closable: ue,
|
|
51
51
|
maskClosable: me,
|
|
52
52
|
confirmLoading: pe,
|
|
53
|
-
mountOnEnter:
|
|
54
|
-
unmountOnExit:
|
|
55
|
-
afterOpen:
|
|
56
|
-
afterClose:
|
|
57
|
-
getPopupContainer:
|
|
53
|
+
mountOnEnter: C,
|
|
54
|
+
unmountOnExit: I,
|
|
55
|
+
afterOpen: k,
|
|
56
|
+
afterClose: y,
|
|
57
|
+
getPopupContainer: c,
|
|
58
58
|
escToExit: fe,
|
|
59
|
-
getChildrenPopupContainer:
|
|
59
|
+
getChildrenPopupContainer: $,
|
|
60
60
|
okButtonProps: he,
|
|
61
61
|
cancelButtonProps: xe,
|
|
62
|
-
zIndex:
|
|
63
|
-
closeIcon:
|
|
62
|
+
zIndex: B,
|
|
63
|
+
closeIcon: P,
|
|
64
64
|
...Ce
|
|
65
|
-
} = t,
|
|
66
|
-
((
|
|
67
|
-
|
|
65
|
+
} = t, l = U(null), E = U(null), [ke, ye] = u(!1), [N, Ne] = u(), o = p == null ? void 0 : p("drawer"), [D, b] = u(!1), [Ke, R] = u(!1), S = /* @__PURE__ */ v(ge, { children: [
|
|
66
|
+
((O = t.cancelButton) == null ? void 0 : O.visible) !== !1 && /* @__PURE__ */ n(
|
|
67
|
+
A,
|
|
68
68
|
{
|
|
69
69
|
onClick: t.onCancel,
|
|
70
70
|
...xe,
|
|
71
|
-
...(
|
|
72
|
-
children: ((
|
|
71
|
+
...(T = t.cancelButton) == null ? void 0 : T.props,
|
|
72
|
+
children: ((F = (z = t.cancelButton) == null ? void 0 : z.props) == null ? void 0 : F.children) || ((j = t.cancelButton) == null ? void 0 : j.label) || ((H = t.cancelButton) == null ? void 0 : H.text) || ae || (i == null ? void 0 : i.Drawer.cancelText)
|
|
73
73
|
}
|
|
74
74
|
),
|
|
75
|
-
((
|
|
76
|
-
|
|
75
|
+
((M = t.okButton) == null ? void 0 : M.visible) !== !1 && /* @__PURE__ */ n(
|
|
76
|
+
A,
|
|
77
77
|
{
|
|
78
78
|
type: "primary",
|
|
79
79
|
loading: pe,
|
|
80
80
|
onClick: t.onOk,
|
|
81
81
|
...he,
|
|
82
|
-
...(
|
|
83
|
-
children: ((
|
|
82
|
+
...(Z = t.okButton) == null ? void 0 : Z.props,
|
|
83
|
+
children: ((W = (L = t.okButton) == null ? void 0 : L.props) == null ? void 0 : W.children) || ((q = t.okButton) == null ? void 0 : q.label) || ((G = t.okButton) == null ? void 0 : G.text) || le || (i == null ? void 0 : i.Drawer.okText)
|
|
84
84
|
}
|
|
85
85
|
)
|
|
86
|
-
] }),
|
|
87
|
-
const e =
|
|
86
|
+
] }), w = Ee(() => {
|
|
87
|
+
const e = c == null ? void 0 : c();
|
|
88
88
|
return Le(e) || document.body;
|
|
89
|
-
}, [
|
|
89
|
+
}, [c]), be = De(() => !je && w() === document.body, [
|
|
90
90
|
ke,
|
|
91
|
-
|
|
91
|
+
w()
|
|
92
92
|
// 潘启宝修改于2024年11月 4日 星期一 21时22分11秒 CST
|
|
93
93
|
]);
|
|
94
|
-
ze(
|
|
94
|
+
ze(w, { hidden: (r || D) && x }), Re(X, () => l.current), _(() => {
|
|
95
95
|
r && t.getPopupContainer && ye(!0);
|
|
96
|
-
}, []),
|
|
96
|
+
}, []), _(() => {
|
|
97
97
|
var e, s;
|
|
98
|
-
r && He(document.body,
|
|
98
|
+
r && He(document.body, l.current) && ((s = (e = l.current) == null ? void 0 : e.focus) == null || s.call(e));
|
|
99
99
|
}, [r]);
|
|
100
|
-
const
|
|
100
|
+
const we = () => {
|
|
101
101
|
var e;
|
|
102
|
-
if (r &&
|
|
103
|
-
const s = +((e = window.getComputedStyle(
|
|
102
|
+
if (r && N === void 0 && l.current) {
|
|
103
|
+
const s = +((e = window.getComputedStyle(l.current, null)) == null ? void 0 : e.zIndex);
|
|
104
104
|
isNaN(s) || Ne(s + 1);
|
|
105
105
|
}
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
ue && (
|
|
106
|
+
}, ve = /* @__PURE__ */ v("div", { className: `${o}-scroll`, tabIndex: -1, children: [
|
|
107
|
+
h !== null && /* @__PURE__ */ n("div", { className: `${o}-header`, style: se, children: /* @__PURE__ */ n("div", { className: `${o}-header-title`, children: h }) }),
|
|
108
|
+
ue && (P !== void 0 ? /* @__PURE__ */ n("span", { onClick: t.onCancel, className: `${o}-close-icon`, children: P }) : /* @__PURE__ */ n(
|
|
109
109
|
Oe,
|
|
110
110
|
{
|
|
111
111
|
onClick: t.onCancel,
|
|
@@ -117,61 +117,61 @@ function qe(Q, V) {
|
|
|
117
117
|
"div",
|
|
118
118
|
{
|
|
119
119
|
ref: (e) => {
|
|
120
|
-
|
|
120
|
+
E.current = e, we();
|
|
121
121
|
},
|
|
122
122
|
style: ie,
|
|
123
123
|
className: g(`${o}-content`, {
|
|
124
|
-
[`${o}-content-nofooter`]:
|
|
125
|
-
[`${o}-content-noheader`]:
|
|
124
|
+
[`${o}-content-nofooter`]: a === null,
|
|
125
|
+
[`${o}-content-noheader`]: h === null
|
|
126
126
|
}),
|
|
127
127
|
children: /* @__PURE__ */ n(
|
|
128
|
-
|
|
128
|
+
J,
|
|
129
129
|
{
|
|
130
|
-
...
|
|
130
|
+
...m,
|
|
131
131
|
childrenName: "Drawer",
|
|
132
|
-
zIndex:
|
|
133
|
-
getPopupContainer: (e) => typeof
|
|
132
|
+
zIndex: N || 1050,
|
|
133
|
+
getPopupContainer: (e) => typeof $ == "function" ? $(e) : E.current,
|
|
134
134
|
children: ne
|
|
135
135
|
}
|
|
136
136
|
)
|
|
137
137
|
}
|
|
138
138
|
),
|
|
139
|
-
|
|
139
|
+
a !== null && /* @__PURE__ */ n("div", { className: `${o}-footer`, children: $e(a) ? a(S) : a || S })
|
|
140
140
|
] });
|
|
141
141
|
return /* @__PURE__ */ n(
|
|
142
142
|
Fe,
|
|
143
143
|
{
|
|
144
|
-
forceRender: !
|
|
144
|
+
forceRender: !C,
|
|
145
145
|
visible: r,
|
|
146
|
-
getContainer:
|
|
147
|
-
children: /* @__PURE__ */
|
|
146
|
+
getContainer: c,
|
|
147
|
+
children: /* @__PURE__ */ v(
|
|
148
148
|
"div",
|
|
149
149
|
{
|
|
150
150
|
...Ze(Ce, ["onCancel", "onOk"]),
|
|
151
|
-
ref:
|
|
151
|
+
ref: l,
|
|
152
152
|
onKeyDown: (e) => {
|
|
153
|
-
var
|
|
154
|
-
e.key === Me.key && fe && r && ((
|
|
153
|
+
var K;
|
|
154
|
+
e.key === Me.key && fe && r && ((K = t.onCancel) == null || K.call(t, e));
|
|
155
155
|
},
|
|
156
156
|
className: g(
|
|
157
157
|
`${o}-wrapper`,
|
|
158
158
|
{
|
|
159
|
-
[`${o}-no-mask`]: !
|
|
159
|
+
[`${o}-no-mask`]: !x,
|
|
160
160
|
[`${o}-wrapper-hide`]: !r
|
|
161
161
|
},
|
|
162
162
|
oe
|
|
163
163
|
),
|
|
164
|
-
style: be ? { position: "fixed", zIndex:
|
|
164
|
+
style: be ? { position: "fixed", zIndex: B } : { zIndex: B || "inherit", position: "absolute" },
|
|
165
165
|
children: [
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
x ? /* @__PURE__ */ n(
|
|
167
|
+
Q,
|
|
168
168
|
{
|
|
169
169
|
in: r,
|
|
170
170
|
appear: !0,
|
|
171
171
|
timeout: 300,
|
|
172
172
|
classNames: "fadeInStandard",
|
|
173
|
-
mountOnEnter:
|
|
174
|
-
unmountOnExit:
|
|
173
|
+
mountOnEnter: C,
|
|
174
|
+
unmountOnExit: I,
|
|
175
175
|
children: /* @__PURE__ */ n(
|
|
176
176
|
"div",
|
|
177
177
|
{
|
|
@@ -179,14 +179,14 @@ function qe(Q, V) {
|
|
|
179
179
|
style: re,
|
|
180
180
|
onClick: (e) => {
|
|
181
181
|
var s;
|
|
182
|
-
!
|
|
182
|
+
!D && me && ((s = t.onCancel) == null || s.call(t, e));
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
)
|
|
186
186
|
}
|
|
187
187
|
) : null,
|
|
188
188
|
/* @__PURE__ */ n(
|
|
189
|
-
|
|
189
|
+
Q,
|
|
190
190
|
{
|
|
191
191
|
in: r,
|
|
192
192
|
appear: !0,
|
|
@@ -196,37 +196,37 @@ function qe(Q, V) {
|
|
|
196
196
|
bottom: "slideBottom",
|
|
197
197
|
left: "slideLeft",
|
|
198
198
|
right: "slideRight"
|
|
199
|
-
}[
|
|
200
|
-
mountOnEnter:
|
|
201
|
-
unmountOnExit:
|
|
199
|
+
}[d],
|
|
200
|
+
mountOnEnter: C,
|
|
201
|
+
unmountOnExit: I,
|
|
202
202
|
onEnter: (e) => {
|
|
203
|
-
e && (e.parentNode.style.display = "block",
|
|
203
|
+
e && (e.parentNode.style.display = "block", b(!1));
|
|
204
204
|
},
|
|
205
205
|
onEntered: () => {
|
|
206
|
-
|
|
206
|
+
R(!0), k == null || k();
|
|
207
207
|
},
|
|
208
208
|
onExit: () => {
|
|
209
|
-
|
|
209
|
+
R(!1), b(!0);
|
|
210
210
|
},
|
|
211
211
|
onExited: (e) => {
|
|
212
|
-
e && (
|
|
212
|
+
e && (b(!1), e.parentNode.style.display = "", y == null || y());
|
|
213
213
|
},
|
|
214
214
|
children: /* @__PURE__ */ n(
|
|
215
215
|
"div",
|
|
216
216
|
{
|
|
217
217
|
className: g(o, te, { [`${o}-rtl`]: Y }),
|
|
218
218
|
style: Object.assign(
|
|
219
|
-
|
|
220
|
-
{ [
|
|
219
|
+
d === "left" || d === "right" ? { width: ce } : { height: de },
|
|
220
|
+
{ [d]: 0 },
|
|
221
221
|
ee
|
|
222
222
|
),
|
|
223
223
|
children: /* @__PURE__ */ n("div", { className: `${o}-inner`, children: /* @__PURE__ */ n(
|
|
224
|
-
|
|
224
|
+
J,
|
|
225
225
|
{
|
|
226
|
-
...
|
|
226
|
+
...m,
|
|
227
227
|
childrenName: "Drawer",
|
|
228
|
-
zIndex:
|
|
229
|
-
children:
|
|
228
|
+
zIndex: N || 1050,
|
|
229
|
+
children: ve
|
|
230
230
|
}
|
|
231
231
|
) })
|
|
232
232
|
}
|
|
@@ -239,7 +239,7 @@ function qe(Q, V) {
|
|
|
239
239
|
}
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
|
-
const Ge =
|
|
242
|
+
const Ge = Be.forwardRef(qe);
|
|
243
243
|
Ge.displayName = "Drawer";
|
|
244
244
|
export {
|
|
245
245
|
Ge as default
|
package/dropdown/Button.js
CHANGED
|
@@ -3,7 +3,7 @@ import "@unicom-cloud/icons/IconUiMore";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import { DropdownButton as f } from "./index.js";
|
|
5
5
|
import "../button/index.js";
|
|
6
|
-
import "../chunk/
|
|
6
|
+
import "../chunk/C9oo3EJI.js";
|
|
7
7
|
import "../chunk/BFTV6myl.js";
|
|
8
8
|
import "../chunk/ClqoGc3r.js";
|
|
9
9
|
export {
|