@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/space/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { a as k } from "../chunk/
|
|
1
|
+
import { jsx as s, jsxs as L } from "react/jsx-runtime";
|
|
2
|
+
import M from "lodash/isArray";
|
|
3
|
+
import V from "lodash/isNumber";
|
|
4
|
+
import b, { forwardRef as h, useContext as j } from "react";
|
|
5
|
+
import { a as k } from "../chunk/Cplu5dtQ.js";
|
|
6
6
|
import { u as D } from "../chunk/BFTV6myl.js";
|
|
7
7
|
import F from "@unicom-cloud/utils/class-name";
|
|
8
8
|
import H from "./toArray.js";
|
|
@@ -10,33 +10,33 @@ const O = {
|
|
|
10
10
|
size: "small",
|
|
11
11
|
direction: "horizontal"
|
|
12
12
|
};
|
|
13
|
-
function
|
|
14
|
-
const { getPrefixCls:
|
|
13
|
+
function P(c, m) {
|
|
14
|
+
const { getPrefixCls: l, componentConfig: p, rtl: $ } = j(k), S = D(
|
|
15
15
|
c,
|
|
16
16
|
O,
|
|
17
|
-
|
|
17
|
+
p == null ? void 0 : p.Space
|
|
18
18
|
), {
|
|
19
|
-
className:
|
|
20
|
-
style:
|
|
19
|
+
className: w,
|
|
20
|
+
style: B,
|
|
21
21
|
children: C,
|
|
22
22
|
size: i,
|
|
23
|
-
direction:
|
|
24
|
-
align:
|
|
23
|
+
direction: o,
|
|
24
|
+
align: R,
|
|
25
25
|
wrap: u,
|
|
26
26
|
split: f,
|
|
27
|
-
...
|
|
28
|
-
} =
|
|
27
|
+
...x
|
|
28
|
+
} = S, e = l == null ? void 0 : l("space"), y = R || (o === "horizontal" ? "center" : ""), z = F(
|
|
29
29
|
e,
|
|
30
30
|
{
|
|
31
|
-
[`${e}-${
|
|
32
|
-
[`${e}-align-${
|
|
31
|
+
[`${e}-${o}`]: o,
|
|
32
|
+
[`${e}-align-${y}`]: y,
|
|
33
33
|
[`${e}-wrap`]: u,
|
|
34
|
-
[`${e}-rtl`]:
|
|
34
|
+
[`${e}-rtl`]: $
|
|
35
35
|
},
|
|
36
|
-
|
|
36
|
+
w
|
|
37
37
|
);
|
|
38
|
-
function
|
|
39
|
-
if (
|
|
38
|
+
function g(r) {
|
|
39
|
+
if (V(r))
|
|
40
40
|
return r;
|
|
41
41
|
switch (r) {
|
|
42
42
|
case "mini":
|
|
@@ -51,40 +51,42 @@ function V(c, m) {
|
|
|
51
51
|
return 8;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
const
|
|
55
|
-
function
|
|
56
|
-
const n =
|
|
54
|
+
const N = H(C);
|
|
55
|
+
function A(r) {
|
|
56
|
+
const n = N.length === r + 1, a = $ ? "marginLeft" : "marginRight";
|
|
57
57
|
if (typeof i == "string" || typeof i == "number") {
|
|
58
|
-
const t =
|
|
58
|
+
const t = g(i);
|
|
59
59
|
return u ? n ? { marginBottom: t } : {
|
|
60
|
-
[`${
|
|
60
|
+
[`${a}`]: t,
|
|
61
61
|
marginBottom: t
|
|
62
62
|
} : n ? {} : {
|
|
63
|
-
[
|
|
63
|
+
[o === "vertical" ? "marginBottom" : a]: t
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
if (
|
|
67
|
-
const t =
|
|
68
|
-
return u ? n ? { marginBottom:
|
|
69
|
-
[`${
|
|
70
|
-
marginBottom:
|
|
71
|
-
} :
|
|
66
|
+
if (M(i)) {
|
|
67
|
+
const t = g(i[0]), d = g(i[1]);
|
|
68
|
+
return u ? n ? { marginBottom: d } : {
|
|
69
|
+
[`${a}`]: t,
|
|
70
|
+
marginBottom: d
|
|
71
|
+
} : o === "vertical" ? { marginBottom: d } : { [`${a}`]: t };
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
return /* @__PURE__ */
|
|
75
|
-
const
|
|
76
|
-
return /* @__PURE__ */
|
|
77
|
-
t && /* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
] },
|
|
74
|
+
return /* @__PURE__ */ s("div", { ref: m, className: z, style: B, ...x, children: N.map((r, n) => {
|
|
75
|
+
const a = (r == null ? void 0 : r.key) || n, t = f != null && n > 0;
|
|
76
|
+
return /* @__PURE__ */ L(b.Fragment, { children: [
|
|
77
|
+
t && /* @__PURE__ */ s("div", { className: `${e}-item-split`, children: f }),
|
|
78
|
+
/* @__PURE__ */ s("div", { className: `${e}-item`, style: A(n), children: r })
|
|
79
|
+
] }, a);
|
|
80
80
|
}) });
|
|
81
81
|
}
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
function
|
|
85
|
-
return /* @__PURE__ */
|
|
82
|
+
const v = h(P);
|
|
83
|
+
v.displayName = "Space";
|
|
84
|
+
function q(c, m) {
|
|
85
|
+
return /* @__PURE__ */ s(v, { ref: m, direction: "vertical", children: c.children });
|
|
86
86
|
}
|
|
87
|
+
const E = h(q);
|
|
88
|
+
E.displayName = "SpaceVertical";
|
|
87
89
|
export {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
E as SpaceVertical,
|
|
91
|
+
v as default
|
|
90
92
|
};
|
|
@@ -39,7 +39,7 @@ import "@unicom-cloud/utils/file/saveAs";
|
|
|
39
39
|
import "@unicom-cloud/utils/screenfull";
|
|
40
40
|
import "@unicom-cloud/utils/constant/ui";
|
|
41
41
|
import "@unicom-cloud/utils/tree";
|
|
42
|
-
import "
|
|
42
|
+
import "lodash/isFunction";
|
|
43
43
|
import "uuid";
|
|
44
44
|
import "../chunk/DEuVgCzp.js";
|
|
45
45
|
import g from "@unicom-cloud/icons/IconUiMute";
|
package/spin/DotLoading.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import m from "lodash/isNumber";
|
|
3
3
|
import { useContext as a } from "react";
|
|
4
|
-
import { a as
|
|
5
|
-
function
|
|
6
|
-
const { getPrefixCls:
|
|
4
|
+
import { a as d } from "../chunk/Cplu5dtQ.js";
|
|
5
|
+
function z(t) {
|
|
6
|
+
const { getPrefixCls: e } = a(d), s = `${e == null ? void 0 : e("spin")}-dot`, o = {
|
|
7
7
|
width: t.size,
|
|
8
8
|
height: t.size
|
|
9
|
-
},
|
|
10
|
-
return /* @__PURE__ */
|
|
9
|
+
}, i = t.size ? parseInt(String(t.size)) : 0;
|
|
10
|
+
return /* @__PURE__ */ n(
|
|
11
11
|
"div",
|
|
12
12
|
{
|
|
13
|
-
className: `${
|
|
13
|
+
className: `${s}-list`,
|
|
14
14
|
style: {
|
|
15
15
|
height: t.size,
|
|
16
|
-
width: m(
|
|
16
|
+
width: m(i) && i > 0 ? i * 7 : ""
|
|
17
17
|
},
|
|
18
|
-
children: [...new Array(5)].map((
|
|
18
|
+
children: [...new Array(5)].map((c, r) => /* @__PURE__ */ n("div", { className: s, style: o }, r))
|
|
19
19
|
}
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
z as default
|
|
24
24
|
};
|
package/spin/index.js
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
1
|
+
import { jsx as n, jsxs as d, Fragment as h } from "react/jsx-runtime";
|
|
2
2
|
import E from "@unicom-cloud/icons/IconUiLoading";
|
|
3
3
|
import I from "lodash/debounce";
|
|
4
|
-
import
|
|
5
|
-
import { a as
|
|
6
|
-
import { u as
|
|
7
|
-
import
|
|
8
|
-
import { c as
|
|
9
|
-
import
|
|
10
|
-
function
|
|
11
|
-
const { getPrefixCls:
|
|
12
|
-
style:
|
|
13
|
-
className:
|
|
4
|
+
import y, { useContext as j, useState as w, useCallback as D, useRef as F, useImperativeHandle as H, useEffect as M } from "react";
|
|
5
|
+
import { a as U } from "../chunk/Cplu5dtQ.js";
|
|
6
|
+
import { u as _ } from "../chunk/BFTV6myl.js";
|
|
7
|
+
import $ from "@unicom-cloud/utils/class-name";
|
|
8
|
+
import { c as q } from "../chunk/ClM74To2.js";
|
|
9
|
+
import A from "./DotLoading.js";
|
|
10
|
+
function B(S, v) {
|
|
11
|
+
const { getPrefixCls: t, componentConfig: c } = j(U), L = _(S, {}, c == null ? void 0 : c.Spin), {
|
|
12
|
+
style: b,
|
|
13
|
+
className: x,
|
|
14
14
|
children: r,
|
|
15
|
-
loading:
|
|
16
|
-
size:
|
|
17
|
-
icon:
|
|
18
|
-
element:
|
|
15
|
+
loading: a,
|
|
16
|
+
size: i,
|
|
17
|
+
icon: m,
|
|
18
|
+
element: R,
|
|
19
19
|
tip: o,
|
|
20
|
-
dot:
|
|
20
|
+
dot: z,
|
|
21
21
|
delay: s,
|
|
22
|
-
block:
|
|
22
|
+
block: C = !1,
|
|
23
23
|
...k
|
|
24
|
-
} =
|
|
25
|
-
|
|
24
|
+
} = L, [p, f] = w(s ? !1 : a), l = D(I(f, s), [s]), u = s ? p : a, e = t == null ? void 0 : t("spin"), g = F(null);
|
|
25
|
+
H(v, () => ({
|
|
26
26
|
// 潘启宝添加于 2023年10月23日 星期一 10时52分55秒 CST
|
|
27
|
-
dom:
|
|
28
|
-
loading:
|
|
29
|
-
setLoading:
|
|
27
|
+
dom: g.current,
|
|
28
|
+
loading: p,
|
|
29
|
+
setLoading: f,
|
|
30
30
|
debouncedSetLoading: l
|
|
31
|
-
})),
|
|
31
|
+
})), M(() => (s && l(a), () => {
|
|
32
32
|
l && l.cancel();
|
|
33
|
-
}), [
|
|
34
|
-
const
|
|
35
|
-
className:
|
|
33
|
+
}), [a]);
|
|
34
|
+
const N = /* @__PURE__ */ n("span", { className: `${e}-icon`, children: m ? y.cloneElement(m, {
|
|
35
|
+
className: $(`${e.replace("-spin", "-icon")}-loading`),
|
|
36
36
|
style: {
|
|
37
|
-
fontSize:
|
|
37
|
+
fontSize: i
|
|
38
38
|
}
|
|
39
|
-
}) :
|
|
39
|
+
}) : R || (z ? /* @__PURE__ */ n(A, { size: i }) : /* @__PURE__ */ n(E, { style: { fontSize: i } })) });
|
|
40
40
|
return /* @__PURE__ */ n(
|
|
41
41
|
"div",
|
|
42
42
|
{
|
|
43
|
-
ref:
|
|
44
|
-
className:
|
|
43
|
+
ref: g,
|
|
44
|
+
className: $(
|
|
45
45
|
e,
|
|
46
46
|
{
|
|
47
|
-
[`${e}-block`]:
|
|
48
|
-
[`${e}-loading`]:
|
|
47
|
+
[`${e}-block`]: C,
|
|
48
|
+
[`${e}-loading`]: u,
|
|
49
49
|
[`${e}-with-tip`]: o && !r
|
|
50
50
|
},
|
|
51
|
-
|
|
51
|
+
x
|
|
52
52
|
),
|
|
53
|
-
style:
|
|
53
|
+
style: b,
|
|
54
54
|
...k,
|
|
55
|
-
children:
|
|
56
|
-
|
|
55
|
+
children: q(r) ? /* @__PURE__ */ d(h, { children: [
|
|
56
|
+
N,
|
|
57
57
|
o ? /* @__PURE__ */ n("div", { className: `${e}-tip`, children: o }) : null
|
|
58
|
-
] }) : /* @__PURE__ */
|
|
58
|
+
] }) : /* @__PURE__ */ d(h, { children: [
|
|
59
59
|
/* @__PURE__ */ n("div", { className: `${e}-children`, children: r }),
|
|
60
|
-
|
|
60
|
+
u && /* @__PURE__ */ n(
|
|
61
61
|
"div",
|
|
62
62
|
{
|
|
63
63
|
className: `${e}-loading-layer`,
|
|
64
|
-
style: { fontSize:
|
|
65
|
-
children: /* @__PURE__ */
|
|
66
|
-
|
|
64
|
+
style: { fontSize: i },
|
|
65
|
+
children: /* @__PURE__ */ d("span", { className: `${e}-loading-layer-inner`, children: [
|
|
66
|
+
N,
|
|
67
67
|
o ? /* @__PURE__ */ n("div", { className: `${e}-tip`, children: o }) : null
|
|
68
68
|
] })
|
|
69
69
|
}
|
|
@@ -72,8 +72,8 @@ function A(y, S) {
|
|
|
72
72
|
}
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
|
-
const
|
|
76
|
-
|
|
75
|
+
const G = y.forwardRef(B);
|
|
76
|
+
G.displayName = "Spin";
|
|
77
77
|
export {
|
|
78
|
-
|
|
78
|
+
G as default
|
|
79
79
|
};
|
package/statistic/Countdown.js
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { jsxs as M, jsx as
|
|
1
|
+
import { jsxs as M, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import T from "dayjs";
|
|
3
3
|
import _ from "lodash/isFunction";
|
|
4
|
-
import { forwardRef as E, useContext as F, useState as
|
|
5
|
-
import { a as
|
|
6
|
-
import
|
|
7
|
-
import { g as
|
|
8
|
-
import { getDateString as
|
|
9
|
-
function
|
|
10
|
-
const { getPrefixCls:
|
|
4
|
+
import { forwardRef as E, useContext as F, useState as v, useRef as O, useEffect as b } from "react";
|
|
5
|
+
import { a as k } from "../chunk/Cplu5dtQ.js";
|
|
6
|
+
import q from "@unicom-cloud/utils/class-name";
|
|
7
|
+
import { g as w, a as N } from "../chunk/tamGhTJp.js";
|
|
8
|
+
import { getDateString as h } from "./util.js";
|
|
9
|
+
function z(a, p) {
|
|
10
|
+
const { getPrefixCls: n } = F(k), {
|
|
11
11
|
className: x,
|
|
12
|
-
style:
|
|
13
|
-
title:
|
|
14
|
-
styleValue:
|
|
15
|
-
value:
|
|
16
|
-
onFinish:
|
|
17
|
-
renderFormat:
|
|
12
|
+
style: y,
|
|
13
|
+
title: l,
|
|
14
|
+
styleValue: C,
|
|
15
|
+
value: D,
|
|
16
|
+
onFinish: r,
|
|
17
|
+
renderFormat: c,
|
|
18
18
|
format: e = "HH:mm:ss",
|
|
19
|
-
start:
|
|
20
|
-
} = a, o =
|
|
21
|
-
o.diff(
|
|
22
|
-
), [f, j] =
|
|
23
|
-
|
|
24
|
-
), s = O(null),
|
|
19
|
+
start: S = !0
|
|
20
|
+
} = a, o = w(D, e) || T(), g = w(a.now, e), t = n == null ? void 0 : n("statistic"), [m, $] = v(
|
|
21
|
+
o.diff(g, "millisecond")
|
|
22
|
+
), [f, j] = v(
|
|
23
|
+
h(Math.max(m, 0), e)
|
|
24
|
+
), s = O(null), u = () => {
|
|
25
25
|
clearInterval(s.current), s.current = null;
|
|
26
26
|
}, V = () => {
|
|
27
27
|
s.current = setInterval(() => {
|
|
28
|
-
const H = o.diff(
|
|
29
|
-
|
|
30
|
-
const I =
|
|
28
|
+
const H = o.diff(N()), d = o.diff(N(), "millisecond");
|
|
29
|
+
d <= 0 && (u(), r == null || r());
|
|
30
|
+
const I = h(Math.max(d, 0), e);
|
|
31
31
|
j(I), $(H);
|
|
32
32
|
}, 1e3 / 30);
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
b(() => (!s.current && S && o.valueOf() >= Date.now() && V(), () => {
|
|
35
|
+
u();
|
|
36
36
|
}), [a.start]);
|
|
37
|
-
const R = _(
|
|
37
|
+
const R = _(c) ? c(m, f) : f;
|
|
38
38
|
return /* @__PURE__ */ M(
|
|
39
39
|
"div",
|
|
40
40
|
{
|
|
41
|
-
ref:
|
|
42
|
-
className:
|
|
43
|
-
style:
|
|
41
|
+
ref: p,
|
|
42
|
+
className: q(`${t}`, `${t}-countdown`, x),
|
|
43
|
+
style: y,
|
|
44
44
|
children: [
|
|
45
|
-
|
|
46
|
-
/* @__PURE__ */
|
|
45
|
+
l && /* @__PURE__ */ i("div", { className: `${t}-title`, children: l }),
|
|
46
|
+
/* @__PURE__ */ i("div", { className: `${t}-content`, children: /* @__PURE__ */ i("div", { className: `${t}-value`, style: C, children: R }) })
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
|
-
const
|
|
52
|
-
|
|
51
|
+
const A = E(z);
|
|
52
|
+
A.displayName = "StatisticCountdown";
|
|
53
53
|
export {
|
|
54
|
-
|
|
54
|
+
A as default
|
|
55
55
|
};
|
package/statistic/index.js
CHANGED
|
@@ -1,103 +1,103 @@
|
|
|
1
1
|
import { jsxs as l, Fragment as O, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { I as W, q as z } from "../chunk/uKZyjtff.js";
|
|
3
3
|
import A from "dayjs";
|
|
4
4
|
import B from "lodash/isFunction";
|
|
5
5
|
import c from "lodash/isNumber";
|
|
6
|
-
import { forwardRef as G, useContext as J, useRef as
|
|
7
|
-
import { a as Y } from "../chunk/
|
|
6
|
+
import { forwardRef as G, useContext as J, useRef as y, useState as K, useEffect as Q, useImperativeHandle as T, useMemo as X } from "react";
|
|
7
|
+
import { a as Y } from "../chunk/Cplu5dtQ.js";
|
|
8
8
|
import { u as Z } from "../chunk/BFTV6myl.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { o as
|
|
12
|
-
import
|
|
13
|
-
function
|
|
14
|
-
const
|
|
9
|
+
import tt from "../skeleton/index.js";
|
|
10
|
+
import et from "@unicom-cloud/utils/class-name";
|
|
11
|
+
import { o as rt } from "../chunk/BKKEev13.js";
|
|
12
|
+
import ot from "./Countdown.js";
|
|
13
|
+
function nt(R, U) {
|
|
14
|
+
const V = {
|
|
15
15
|
countFrom: 0,
|
|
16
16
|
countDuration: 2e3
|
|
17
|
-
}, { getPrefixCls:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
}, { getPrefixCls: m, componentConfig: d, rtl: j } = J(Y), t = Z(
|
|
18
|
+
R,
|
|
19
|
+
V,
|
|
20
|
+
d == null ? void 0 : d.Statistic
|
|
21
21
|
), {
|
|
22
|
-
className:
|
|
23
|
-
style:
|
|
24
|
-
title:
|
|
25
|
-
extra:
|
|
26
|
-
groupSeparator:
|
|
22
|
+
className: M,
|
|
23
|
+
style: I,
|
|
24
|
+
title: S,
|
|
25
|
+
extra: $,
|
|
26
|
+
groupSeparator: F,
|
|
27
27
|
precision: s,
|
|
28
|
-
prefix:
|
|
28
|
+
prefix: p,
|
|
29
29
|
suffix: u,
|
|
30
30
|
format: f,
|
|
31
|
-
renderFormat:
|
|
32
|
-
styleValue:
|
|
33
|
-
styleDecimal:
|
|
34
|
-
loading:
|
|
35
|
-
...
|
|
36
|
-
} =
|
|
37
|
-
"value" in
|
|
38
|
-
), r =
|
|
39
|
-
const { countDuration:
|
|
40
|
-
|
|
31
|
+
renderFormat: g,
|
|
32
|
+
styleValue: P,
|
|
33
|
+
styleDecimal: _,
|
|
34
|
+
loading: k,
|
|
35
|
+
...q
|
|
36
|
+
} = t, i = y(), w = y(), [e, v] = K(
|
|
37
|
+
"value" in t ? t.value : void 0
|
|
38
|
+
), r = m == null ? void 0 : m("statistic"), N = (n = t.countFrom, o = t.value) => {
|
|
39
|
+
const { countDuration: h } = t;
|
|
40
|
+
n !== o && (i.current = new W({
|
|
41
41
|
from: {
|
|
42
|
-
value:
|
|
42
|
+
value: n
|
|
43
43
|
},
|
|
44
44
|
to: {
|
|
45
45
|
value: o
|
|
46
46
|
},
|
|
47
|
-
duration:
|
|
47
|
+
duration: h,
|
|
48
48
|
easing: z,
|
|
49
49
|
onUpdate: (L) => {
|
|
50
|
-
|
|
50
|
+
v(L.value.toFixed(s));
|
|
51
51
|
},
|
|
52
52
|
onFinish: () => {
|
|
53
|
-
|
|
53
|
+
v(o);
|
|
54
54
|
}
|
|
55
|
-
}),
|
|
55
|
+
}), i.current.start());
|
|
56
56
|
};
|
|
57
|
-
Q(() => (
|
|
58
|
-
|
|
59
|
-
}), [
|
|
60
|
-
countUp:
|
|
61
|
-
getRootDOMNode: () =>
|
|
57
|
+
Q(() => (t.countUp ? (i.current && i.current.stop(), e !== t.value ? N(Number(e), t.value) : N()) : v(t.value), () => {
|
|
58
|
+
i.current && i.current.stop(), i.current = null;
|
|
59
|
+
}), [t.value]), T(U, () => ({
|
|
60
|
+
countUp: N,
|
|
61
|
+
getRootDOMNode: () => w.current
|
|
62
62
|
}));
|
|
63
|
-
const { int:
|
|
64
|
-
let
|
|
65
|
-
f && (
|
|
66
|
-
let o = String(
|
|
67
|
-
const
|
|
68
|
-
return
|
|
63
|
+
const { int: E, decimal: x } = X(() => {
|
|
64
|
+
let n = e;
|
|
65
|
+
f && (n = A(e).format(f)), c(s) && s >= 0 && (n = Number(e).toFixed(s));
|
|
66
|
+
let o = String(n).split(".")[0];
|
|
67
|
+
const h = String(n).split(".")[1];
|
|
68
|
+
return F && c(Number(e)) && (o = Number(o).toLocaleString("en-US")), {
|
|
69
69
|
int: o,
|
|
70
|
-
decimal:
|
|
70
|
+
decimal: h
|
|
71
71
|
};
|
|
72
|
-
}, [f,
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
}, [f, F, s, e]), H = B(g) ? g : (n, o) => o, b = c(Number(e)), C = /* @__PURE__ */ l(O, { children: [
|
|
73
|
+
p != null ? /* @__PURE__ */ a("span", { className: `${r}-value-prefix`, children: p }) : null,
|
|
74
|
+
H(e, b ? E : e)
|
|
75
75
|
] });
|
|
76
76
|
return /* @__PURE__ */ l(
|
|
77
77
|
"div",
|
|
78
78
|
{
|
|
79
|
-
className:
|
|
80
|
-
style:
|
|
81
|
-
...
|
|
82
|
-
ref:
|
|
79
|
+
className: et(`${r}`, { [`${r}-rtl`]: j }, M),
|
|
80
|
+
style: I,
|
|
81
|
+
...rt(q, ["value", "countUp", "countFrom", "countDuration"]),
|
|
82
|
+
ref: w,
|
|
83
83
|
children: [
|
|
84
|
-
|
|
84
|
+
S && /* @__PURE__ */ a("div", { className: `${r}-title`, children: S }),
|
|
85
85
|
/* @__PURE__ */ l("div", { className: `${r}-content`, children: [
|
|
86
86
|
/* @__PURE__ */ a(
|
|
87
|
-
|
|
87
|
+
tt,
|
|
88
88
|
{
|
|
89
89
|
animation: !0,
|
|
90
|
-
loading: !!
|
|
90
|
+
loading: !!k,
|
|
91
91
|
text: { rows: 1, width: "100%" },
|
|
92
|
-
children: /* @__PURE__ */ l("div", { className: `${r}-value`, style:
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
children: /* @__PURE__ */ l("div", { className: `${r}-value`, style: P, children: [
|
|
93
|
+
b ? /* @__PURE__ */ a("span", { className: `${r}-value-int`, children: C }) : C,
|
|
94
|
+
x !== void 0 || u ? /* @__PURE__ */ l(
|
|
95
95
|
"span",
|
|
96
96
|
{
|
|
97
97
|
className: `${r}-value-decimal`,
|
|
98
|
-
style:
|
|
98
|
+
style: _,
|
|
99
99
|
children: [
|
|
100
|
-
c(Number(
|
|
100
|
+
c(Number(e)) && x !== void 0 && `.${x}`,
|
|
101
101
|
u != null ? /* @__PURE__ */ a("span", { className: `${r}-value-suffix`, children: u }) : null
|
|
102
102
|
]
|
|
103
103
|
}
|
|
@@ -105,16 +105,16 @@ function ie(D, R) {
|
|
|
105
105
|
] })
|
|
106
106
|
}
|
|
107
107
|
),
|
|
108
|
-
|
|
108
|
+
$ && /* @__PURE__ */ a("div", { className: `${r}-extra`, children: $ })
|
|
109
109
|
] })
|
|
110
110
|
]
|
|
111
111
|
}
|
|
112
112
|
);
|
|
113
113
|
}
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
const it = G(nt), D = it;
|
|
115
|
+
D.displayName = "Statistic";
|
|
116
|
+
D.Countdown = ot;
|
|
117
117
|
export {
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
ot as StatisticCountdown,
|
|
119
|
+
D as default
|
|
120
120
|
};
|