@unicom-cloud/ui 0.8.61 → 0.8.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Affix.js +1 -1
- package/Alert.js +44 -40
- package/Anchor.js +1 -1
- package/AutoComplete.js +4 -4
- package/Avatar.js +1 -1
- package/BackTop.js +7 -7
- package/Badge.js +2 -2
- package/Breadcrumb.js +22 -22
- package/Button.js +2 -2
- package/Calendar.js +106 -104
- package/Card.js +1 -1
- package/Carousel.js +34 -33
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +12 -12
- package/Comment.js +1 -1
- package/ConfigProvider.js +2 -2
- package/Copy.js +16 -16
- package/DatePicker.js +165 -162
- package/Descriptions.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Drawer.js +1 -1
- package/Dropdown.js +9 -9
- package/Empty.js +2 -2
- package/Form.js +60 -54
- package/Grid.js +2 -2
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/Input.js +1 -1
- package/InputNumber.js +6 -6
- package/InputTag.js +1 -1
- package/Layout.js +2 -2
- package/Link.js +14 -14
- package/List.js +3 -3
- package/Mentions.js +3 -3
- package/Menu.js +1 -1
- package/Message.js +2 -2
- package/Modal.js +1 -1
- package/Notice.js +9 -3
- package/Notification.js +2 -2
- package/OverflowEllipsis.js +32 -32
- package/PageHeader.js +23 -22
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +7 -7
- package/Popover.js +1 -1
- package/Progress.js +14 -14
- package/Radio.js +2 -2
- package/Rate.js +43 -40
- package/ResizeBox.js +97 -96
- package/Result.js +15 -15
- package/Select.js +1 -1
- package/SelectView.js +295 -249
- package/Skeleton.js +1 -1
- package/Slider.js +25 -25
- package/Space.js +1 -1
- package/SpeechSynthesis.js +32 -29
- package/Spin.js +2 -2
- package/Statistic.js +1 -1
- package/Steps.js +11 -11
- package/Switch.js +3 -3
- package/Table.js +9 -9
- package/Tabs.js +1 -1
- package/Tag.js +68 -67
- package/TimePicker.js +17 -17
- package/Timeline.js +1 -1
- package/Tooltip.js +1 -1
- package/Transfer.js +47 -46
- package/Tree.js +2 -2
- package/TreeSelect.js +1 -1
- package/Trigger.js +3 -3
- package/Typography.js +1 -1
- package/Upload.js +2 -2
- package/VerificationCode.js +1 -1
- package/Version.js +1 -1
- package/Watermark.js +1 -1
- package/chunk/{V6euPXVB.js → -Z968QpN.js} +257 -251
- package/chunk/{IooeSKJJ.js → AqH9yP_J.js} +19 -19
- package/chunk/{cZiP8FvM.js → B0oDiPqE.js} +1 -1
- package/chunk/{B16KHtX-.js → B4-WpgY2.js} +191 -185
- package/chunk/{CuOl4X0X.js → B8SZFOjt.js} +1 -1
- package/chunk/{CbiWdbr_.js → BXWxA-tS.js} +35 -34
- package/chunk/{DpfUGhi4.js → BlNFmhNa.js} +288 -283
- package/chunk/{C1xMmQIZ.js → BmO1y0vr.js} +34 -34
- package/chunk/{Kbr6FzOG.js → BnqeQYIZ.js} +210 -186
- package/chunk/{BPZ-6HKJ.js → Bp3XomF8.js} +1 -2
- package/chunk/BsWphzcT.js +20 -0
- package/chunk/{RMBPs_Ry.js → C4eJ9vCf.js} +4 -3
- package/chunk/{BNHrEI0Y.js → C6fEFlPt.js} +52 -48
- package/chunk/C8o-VGyc.js +376 -0
- package/chunk/{eK7lxdak.js → CDJ1EnJ2.js} +8 -8
- package/chunk/{C5AQWbC4.js → CHyuuVxl.js} +1 -1
- package/chunk/{B2vORJQ8.js → CJnshq6A.js} +13 -13
- package/chunk/CT1lZ7ss.js +116 -0
- package/chunk/{Bdh4XVuf.js → CV1kLw5Z.js} +290 -281
- package/chunk/{DmUhn9ib.js → CazXy0r4.js} +54 -53
- package/chunk/{BBVjSFnw.js → Cqyp4qni.js} +23 -19
- package/chunk/{BJ_7JTqC.js → D3VMG9V1.js} +1 -1
- package/chunk/{D2HkyI6A.js → DGasAUHE.js} +2 -2
- package/chunk/{YIlBPVAs.js → DRQ1v6Ux.js} +1 -1
- package/chunk/{DhBo0pPJ.js → DRp7voqz.js} +119 -118
- package/chunk/{gIbzjQ-X.js → Dtm4BmKB.js} +2 -2
- package/chunk/{BEDYCG-I.js → KchYsivk.js} +18 -18
- package/chunk/{Cbd50gx8.js → Wum88vrW.js} +33 -33
- package/chunk/{BjSHZA0m.js → mfn4EgmQ.js} +1 -1
- package/chunk/{BYhtrDV3.js → nbEvdwT0.js} +152 -148
- package/chunk/{C1D7T29r.js → qpd2axxs.js} +83 -76
- package/chunk/{BVLwPZis.js → tOFzwzpT.js} +31 -30
- package/chunk/{DSGRHf-1.js → yESVS-qX.js} +157 -156
- package/hooks/useMergeValue.js +1 -1
- package/icons.js +4 -6001
- package/index.js +420 -392
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/cascader/panel/Search.d.ts +1 -1
- package/types/config-provider/interface.d.ts +1 -1
- package/types/form/interface.d.ts +1 -1
- package/types/index.d.ts +1 -1
- package/types/message/index.d.ts +2 -2
- package/types/notification/index.d.ts +2 -2
- package/types/notification-base/index.d.ts +2 -2
- package/types/select/interface.d.ts +1 -0
- package/types/select-view/interface.d.ts +1 -0
- package/types/tree/Context.d.ts +1 -0
- package/types/tree/Tree.d.ts +1 -1
- package/types/tree/index.d.ts +5 -4
- package/types/tree/interface.d.ts +1 -0
- package/types/utils/index.d.ts +1 -0
- package/types/utils/lodash.d.ts +14 -1
- package/types/version/index.d.ts +1 -1
- package/utils/CSSTransition.js +1 -1
- package/utils/caseName.js +2 -18
- package/utils/contextHolder.js +1 -1
- package/utils/index.js +220 -191
- package/utils/is.js +68 -67
- package/utils/lodash.js +32 -6
- package/utils/reactDOM.js +1 -1
- package/chunk/-LZOUh53.js +0 -29
- package/chunk/-jdfq71f.js +0 -23
- package/chunk/B0GOLsj_.js +0 -58
- package/chunk/B7Zsp3gO.js +0 -29
- package/chunk/BDjXkzNj.js +0 -23
- package/chunk/BHn4xgbv.js +0 -209
- package/chunk/BLSiP_gg.js +0 -32
- package/chunk/BMJfSSLX.js +0 -23
- package/chunk/B_nfMl0e.js +0 -116
- package/chunk/BcS17Pzy.js +0 -66
- package/chunk/BdiEwtQO.js +0 -41
- package/chunk/Bpug_KxP.js +0 -34
- package/chunk/C1u_ckwU.js +0 -29
- package/chunk/C43Hv2Bl.js +0 -34
- package/chunk/C9vsih_D.js +0 -29
- package/chunk/CAfR2wLq.js +0 -41
- package/chunk/CAfecMDF.js +0 -46
- package/chunk/CKp4rZnD.js +0 -207
- package/chunk/CV2Aqv9q.js +0 -52
- package/chunk/CYdarMv9.js +0 -32
- package/chunk/C_S5Mdvd.js +0 -379
- package/chunk/CmB-TL7C.js +0 -46
- package/chunk/D-ER56Sf.js +0 -29
- package/chunk/D-aYnb6u.js +0 -41
- package/chunk/D3xQFJcO.js +0 -23
- package/chunk/DJcEys80.js +0 -29
- package/chunk/DLIm6rRJ.js +0 -29
- package/chunk/DOWEHtqM.js +0 -41
- package/chunk/DT37l12z.js +0 -40
- package/chunk/DW-B7npC.js +0 -23
- package/chunk/D_MTFBb0.js +0 -38
- package/chunk/Dx_5J4fO.js +0 -29
- package/chunk/Dy487FZ1.js +0 -118
- package/chunk/Uz-rNulO.js +0 -98
- package/chunk/cDZI_t6o.js +0 -52
- package/chunk/sScV-J56.js +0 -206
- package/chunk/wI2I1qb0.js +0 -23
package/Menu.js
CHANGED
package/Message.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "./chunk/
|
|
2
|
+
import "./chunk/Bp3XomF8.js";
|
|
3
3
|
import "lodash/isNumber";
|
|
4
4
|
import "lodash/isUndefined";
|
|
5
|
-
import { M as d } from "./chunk/
|
|
5
|
+
import { M as d } from "./chunk/CV1kLw5Z.js";
|
|
6
6
|
import "./NotificationBase.js";
|
|
7
7
|
import "./chunk/BzPkh4Zv.js";
|
|
8
8
|
import "./utils/reactDOM.js";
|
package/Modal.js
CHANGED
package/Notice.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "
|
|
2
|
+
import "@unicom-cloud/icons/IconUiCheckCircleFill";
|
|
3
|
+
import "@unicom-cloud/icons/IconUiClose";
|
|
4
|
+
import "@unicom-cloud/icons/IconUiCloseCircleFill";
|
|
5
|
+
import "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
6
|
+
import "@unicom-cloud/icons/IconUiInfoCircleFill";
|
|
7
|
+
import "@unicom-cloud/icons/IconUiLoading";
|
|
8
|
+
import "@unicom-cloud/icons/context";
|
|
3
9
|
import "react";
|
|
4
|
-
import { l as
|
|
10
|
+
import { l as u } from "./chunk/CV1kLw5Z.js";
|
|
5
11
|
import "./chunk/BzPkh4Zv.js";
|
|
6
12
|
export {
|
|
7
|
-
|
|
13
|
+
u as default
|
|
8
14
|
};
|
package/Notification.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "./chunk/
|
|
2
|
+
import "./chunk/Bp3XomF8.js";
|
|
3
3
|
import "lodash/isNumber";
|
|
4
4
|
import "lodash/isUndefined";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
import { g } from "./chunk/
|
|
6
|
+
import { g } from "./chunk/CV1kLw5Z.js";
|
|
7
7
|
import "./NotificationBase.js";
|
|
8
8
|
import "./chunk/BzPkh4Zv.js";
|
|
9
9
|
import "./utils/reactDOM.js";
|
package/OverflowEllipsis.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as C, jsxs as D } from "react/jsx-runtime";
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { d as v } from "./chunk/
|
|
2
|
+
import { useContext as j, useRef as k, useEffect as g, useState as m, useLayoutEffect as P } from "react";
|
|
3
|
+
import { d as v } from "./chunk/CV1kLw5Z.js";
|
|
4
4
|
import { y as E } from "./chunk/BzPkh4Zv.js";
|
|
5
|
-
function
|
|
6
|
-
const { getPrefixCls: x } =
|
|
5
|
+
function _(l) {
|
|
6
|
+
const { getPrefixCls: x } = j(v), i = x("overflow-item"), u = k();
|
|
7
7
|
g(() => {
|
|
8
8
|
let e;
|
|
9
9
|
return u.current && (e = new ResizeObserver((f) => {
|
|
10
10
|
l.onResize(f == null ? void 0 : f[0].target);
|
|
11
11
|
}), e.observe(u.current)), () => {
|
|
12
|
-
var f,
|
|
13
|
-
u.current && ((f = e == null ? void 0 : e.unobserve) == null || f.call(e, u.current)), (
|
|
12
|
+
var f, d;
|
|
13
|
+
u.current && ((f = e == null ? void 0 : e.unobserve) == null || f.call(e, u.current)), (d = e == null ? void 0 : e.disconnect) == null || d.call(e), e = null;
|
|
14
14
|
};
|
|
15
15
|
}, [u.current]), g(() => (l.onResize(u.current), () => {
|
|
16
16
|
l.unregister(u.current);
|
|
@@ -28,62 +28,62 @@ function j(l) {
|
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
30
|
function q(l) {
|
|
31
|
-
const { getPrefixCls: x } =
|
|
31
|
+
const { getPrefixCls: x } = j(v), i = x("overflow"), { items: u, suffixItems: w } = l, e = l.ellipsisNode || (({ ellipsisCount: t }) => `+${t}`), [f, d] = m(), [y, I] = m(), [h, N] = m({}), [R, $] = m({}), W = u.length - y, M = W > 0 ? e({ ellipsisCount: W }) : null;
|
|
32
32
|
P(() => {
|
|
33
33
|
const t = Object.values(h).length;
|
|
34
|
-
let
|
|
35
|
-
Object.keys(h).some((
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
34
|
+
let o = Object.values(R).reduce((c, r) => c + ((r == null ? void 0 : r.width) || 0), 0), n = t;
|
|
35
|
+
Object.keys(h).some((c, r) => {
|
|
36
|
+
const a = h[c];
|
|
37
|
+
if (a && o + a.width > f)
|
|
38
38
|
return n = r, !0;
|
|
39
|
-
|
|
39
|
+
o += (a == null ? void 0 : a.width) || 0;
|
|
40
40
|
}), I(Math.max(n, 0));
|
|
41
41
|
}, [h, f, R]);
|
|
42
|
-
const s =
|
|
42
|
+
const s = k();
|
|
43
43
|
return g(() => {
|
|
44
44
|
let t;
|
|
45
|
-
return s.current && (t = new ResizeObserver((
|
|
45
|
+
return s.current && (t = new ResizeObserver((o) => {
|
|
46
46
|
var n;
|
|
47
|
-
|
|
47
|
+
d(((n = o == null ? void 0 : o[0]) == null ? void 0 : n.target.clientWidth) || 0);
|
|
48
48
|
}), t.observe(s.current)), () => {
|
|
49
|
-
var
|
|
50
|
-
s.current && ((
|
|
49
|
+
var o, n;
|
|
50
|
+
s.current && ((o = t == null ? void 0 : t.unobserve) == null || o.call(t, s.current)), (n = t == null ? void 0 : t.disconnect) == null || n.call(t), t = null;
|
|
51
51
|
};
|
|
52
52
|
}, [s.current]), /* @__PURE__ */ D("div", { ref: s, className: E(i, l.className), children: [
|
|
53
|
-
u.map((t,
|
|
54
|
-
const n = `${(t == null ? void 0 : t.key) ||
|
|
53
|
+
u.map((t, o) => {
|
|
54
|
+
const n = `${(t == null ? void 0 : t.key) || o}_overflow_item_${o}`;
|
|
55
55
|
return /* @__PURE__ */ C(
|
|
56
|
-
|
|
56
|
+
_,
|
|
57
57
|
{
|
|
58
|
-
onResize: (
|
|
59
|
-
N((r) => (r[n] = { node:
|
|
58
|
+
onResize: (c) => {
|
|
59
|
+
N((r) => (r[n] = { node: c, width: c.clientWidth }, r));
|
|
60
60
|
},
|
|
61
61
|
unregister: () => {
|
|
62
|
-
N((
|
|
62
|
+
N((c) => (delete c[n], c));
|
|
63
63
|
},
|
|
64
|
-
hidden: y <
|
|
64
|
+
hidden: y < o + 1,
|
|
65
65
|
children: t
|
|
66
66
|
},
|
|
67
67
|
n
|
|
68
68
|
);
|
|
69
69
|
}),
|
|
70
|
-
[M, ...w].map((t,
|
|
70
|
+
[M, ...w].map((t, o) => {
|
|
71
71
|
if (!t)
|
|
72
72
|
return null;
|
|
73
|
-
const n = `${(t == null ? void 0 : t.key) ||
|
|
73
|
+
const n = `${(t == null ? void 0 : t.key) || o}_overflow_suffix_item`;
|
|
74
74
|
return /* @__PURE__ */ C(
|
|
75
|
-
|
|
75
|
+
_,
|
|
76
76
|
{
|
|
77
77
|
className: `${i}-suffix-item`,
|
|
78
|
-
onResize: (
|
|
79
|
-
|
|
78
|
+
onResize: (c) => {
|
|
79
|
+
$((r) => ({
|
|
80
80
|
...r,
|
|
81
|
-
[`${n}`]: { node:
|
|
81
|
+
[`${n}`]: { node: c, width: c.clientWidth }
|
|
82
82
|
}));
|
|
83
83
|
},
|
|
84
84
|
unregister: () => {
|
|
85
|
-
|
|
86
|
-
...
|
|
85
|
+
$((c) => (delete c[n], {
|
|
86
|
+
...c
|
|
87
87
|
}));
|
|
88
88
|
},
|
|
89
89
|
children: t
|
package/PageHeader.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsxs as s, jsx as r, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import T from "@unicom-cloud/icons/IconUiLeft";
|
|
3
|
+
import W from "@unicom-cloud/icons/IconUiRight";
|
|
3
4
|
import j, { useContext as K, useState as U, useRef as D, useImperativeHandle as F, useEffect as L } from "react";
|
|
4
5
|
import M from "./Breadcrumb.js";
|
|
5
|
-
import { d as S, I as q } from "./chunk/
|
|
6
|
+
import { d as S, I as q } from "./chunk/CV1kLw5Z.js";
|
|
6
7
|
import { useKeyboardEvent as G } from "./hooks/useKeyboardEvent.js";
|
|
7
8
|
import { useMergeProps as J } from "./hooks/useMergeProps.js";
|
|
8
9
|
import { y as N } from "./chunk/BzPkh4Zv.js";
|
|
@@ -16,21 +17,21 @@ function x(y, b) {
|
|
|
16
17
|
header: k,
|
|
17
18
|
title: w,
|
|
18
19
|
subTitle: A,
|
|
19
|
-
extra:
|
|
20
|
-
children:
|
|
20
|
+
extra: R,
|
|
21
|
+
children: f,
|
|
21
22
|
backIcon: d,
|
|
22
|
-
footer:
|
|
23
|
+
footer: u,
|
|
23
24
|
breadcrumb: h,
|
|
24
|
-
...
|
|
25
|
+
...I
|
|
25
26
|
} = n;
|
|
26
27
|
let i = k;
|
|
27
28
|
Array.isArray(i) && !i.length && (i = null);
|
|
28
|
-
let
|
|
29
|
+
let o = w;
|
|
30
|
+
Array.isArray(o) && !o.length && (o = null);
|
|
31
|
+
let c = A;
|
|
29
32
|
Array.isArray(c) && !c.length && (c = null);
|
|
30
|
-
let l =
|
|
33
|
+
let l = R;
|
|
31
34
|
Array.isArray(l) && !l.length && (l = null);
|
|
32
|
-
let o = I;
|
|
33
|
-
Array.isArray(o) && !o.length && (o = null);
|
|
34
35
|
const P = G(), [C, E] = U(!1), a = D(), e = v("page-header");
|
|
35
36
|
F(b, () => ({
|
|
36
37
|
getRootDomElement: H
|
|
@@ -50,14 +51,14 @@ function x(y, b) {
|
|
|
50
51
|
}, [a.current]), /* @__PURE__ */ s(
|
|
51
52
|
"div",
|
|
52
53
|
{
|
|
53
|
-
...Q(
|
|
54
|
+
...Q(I, ["onBack"]),
|
|
54
55
|
ref: a,
|
|
55
56
|
className: N(
|
|
56
57
|
`${e}`,
|
|
57
58
|
{
|
|
58
59
|
[`${e}-with-breadcrumb`]: h,
|
|
59
|
-
[`${e}-with-content`]:
|
|
60
|
-
[`${e}-with-footer`]:
|
|
60
|
+
[`${e}-with-content`]: f,
|
|
61
|
+
[`${e}-with-footer`]: u,
|
|
61
62
|
[`${e}-wrap`]: C,
|
|
62
63
|
[`${e}-rtl`]: p
|
|
63
64
|
},
|
|
@@ -87,28 +88,28 @@ function x(y, b) {
|
|
|
87
88
|
...P({
|
|
88
89
|
onPressEnter: n.onBack
|
|
89
90
|
}),
|
|
90
|
-
children: /* @__PURE__ */ r("span", { className: `${e}-back-icon`, children: d === !0 ? p ? /* @__PURE__ */ r(
|
|
91
|
+
children: /* @__PURE__ */ r("span", { className: `${e}-back-icon`, children: d === !0 ? p ? /* @__PURE__ */ r(W, {}) : /* @__PURE__ */ r(T, {}) : d })
|
|
91
92
|
}
|
|
92
93
|
),
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
o && /* @__PURE__ */ r("div", { className: `${e}-title`, children: o }),
|
|
95
|
+
c && /* @__PURE__ */ s(_, { children: [
|
|
95
96
|
/* @__PURE__ */ r("div", { className: `${e}-divider` }),
|
|
96
|
-
/* @__PURE__ */ r("div", { className: `${e}-sub-title`, children:
|
|
97
|
+
/* @__PURE__ */ r("div", { className: `${e}-sub-title`, children: c })
|
|
97
98
|
] })
|
|
98
99
|
]
|
|
99
100
|
}
|
|
100
101
|
),
|
|
101
|
-
|
|
102
|
+
l && /* @__PURE__ */ r("div", { className: `${e}-head-extra`, children: l })
|
|
102
103
|
] })
|
|
103
104
|
] }),
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
f && /* @__PURE__ */ r("div", { className: `${e}-content`, children: f }),
|
|
106
|
+
u && /* @__PURE__ */ r("div", { className: `${e}-footer`, children: u })
|
|
106
107
|
]
|
|
107
108
|
}
|
|
108
109
|
);
|
|
109
110
|
}
|
|
110
111
|
x.displayName = "PageHeader";
|
|
111
|
-
const
|
|
112
|
+
const ne = j.forwardRef(x);
|
|
112
113
|
export {
|
|
113
|
-
|
|
114
|
+
ne as default
|
|
114
115
|
};
|
package/Pagination.js
CHANGED
package/Picker.js
CHANGED
package/Popconfirm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as t, jsxs as d, Fragment as G } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import J from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
3
3
|
import y from "lodash/isFunction";
|
|
4
4
|
import K from "lodash/isNil";
|
|
5
5
|
import { forwardRef as Q, useContext as X, useState as Y, useImperativeHandle as Z, useEffect as _ } from "react";
|
|
6
6
|
import N from "./Button.js";
|
|
7
|
-
import { d as ee } from "./chunk/
|
|
7
|
+
import { d as ee } from "./chunk/CV1kLw5Z.js";
|
|
8
8
|
import { useMergeProps as oe } from "./hooks/useMergeProps.js";
|
|
9
9
|
import { useMergeValue as ne } from "./hooks/useMergeValue.js";
|
|
10
10
|
import te from "./Tooltip.js";
|
|
@@ -47,16 +47,16 @@ function se(V, h) {
|
|
|
47
47
|
} = e, [u, U] = ne(!1, {
|
|
48
48
|
defaultValue: e.defaultPopupVisible,
|
|
49
49
|
value: e.popupVisible
|
|
50
|
-
}), [g, l] = Y(!1), o = k("popconfirm"), x = !K(s),
|
|
50
|
+
}), [g, l] = Y(!1), o = k("popconfirm"), x = !K(s), T = (n) => {
|
|
51
51
|
"popupVisible" in e || U(n), r && r.onVisibleChange && r.onVisibleChange(n), m == null || m(n);
|
|
52
52
|
}, c = () => {
|
|
53
|
-
|
|
53
|
+
T(!1);
|
|
54
54
|
}, W = (n) => {
|
|
55
55
|
var i;
|
|
56
56
|
c(), (i = e.onCancel) == null || i.call(e, n);
|
|
57
57
|
}, q = (n) => {
|
|
58
|
-
var
|
|
59
|
-
let i = (
|
|
58
|
+
var b;
|
|
59
|
+
let i = (b = e.onOk) == null ? void 0 : b.call(e, n);
|
|
60
60
|
i != null && i.then && (l(!0), i.then(
|
|
61
61
|
() => {
|
|
62
62
|
c();
|
|
@@ -117,7 +117,7 @@ function se(V, h) {
|
|
|
117
117
|
blurToHide: F,
|
|
118
118
|
popupHoverStay: !0,
|
|
119
119
|
triggerProps: r,
|
|
120
|
-
onVisibleChange:
|
|
120
|
+
onVisibleChange: T,
|
|
121
121
|
childrenPrefix: o,
|
|
122
122
|
children: typeof p == "string" ? /* @__PURE__ */ t("span", { children: p }) : p
|
|
123
123
|
}
|
package/Popover.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as j, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import u from "lodash/isFunction";
|
|
3
3
|
import { forwardRef as O, useContext as R } from "react";
|
|
4
|
-
import { d as T } from "./chunk/
|
|
4
|
+
import { d as T } from "./chunk/CV1kLw5Z.js";
|
|
5
5
|
import { useMergeProps as w } from "./hooks/useMergeProps.js";
|
|
6
6
|
import F from "./Tooltip.js";
|
|
7
7
|
import { y as H } from "./chunk/BzPkh4Zv.js";
|
package/Progress.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as t, jsxs as v } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback as N, forwardRef as
|
|
3
|
-
import { d as _ } from "./chunk/
|
|
2
|
+
import { useCallback as N, forwardRef as I, useContext as j } from "react";
|
|
3
|
+
import { d as _ } from "./chunk/CV1kLw5Z.js";
|
|
4
4
|
import { useMergeProps as F } from "./hooks/useMergeProps.js";
|
|
5
5
|
import { y as w } from "./chunk/BzPkh4Zv.js";
|
|
6
6
|
import G from "./utils/omit.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import b from "@unicom-cloud/icons/IconUiCheck";
|
|
8
|
+
import M from "@unicom-cloud/icons/IconUiExclamation";
|
|
9
|
+
import T from "lodash/isFunction";
|
|
10
10
|
import S from "lodash/isPlainObject";
|
|
11
11
|
import { useId as O } from "./hooks/useId.js";
|
|
12
12
|
import U from "./Tooltip.js";
|
|
13
|
-
import
|
|
13
|
+
import z from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
14
14
|
const A = {
|
|
15
15
|
mini: 4,
|
|
16
16
|
small: 3,
|
|
@@ -32,11 +32,11 @@ const A = {
|
|
|
32
32
|
formatText: x
|
|
33
33
|
} = e, f = S(e.color), n = e.width || B[l], u = e.strokeWidth || (l === "mini" ? n / 2 : A[l]), p = (n - u) / 2, c = Math.PI * 2 * p, m = n / 2, o = `${h}-circle`, s = `${o}-svg`, d = N(
|
|
34
34
|
(k) => {
|
|
35
|
-
if (
|
|
35
|
+
if (T(x))
|
|
36
36
|
return x(a);
|
|
37
37
|
switch (k) {
|
|
38
38
|
case "success":
|
|
39
|
-
return /* @__PURE__ */ t(
|
|
39
|
+
return /* @__PURE__ */ t(b, {});
|
|
40
40
|
case "error":
|
|
41
41
|
return /* @__PURE__ */ t(M, {});
|
|
42
42
|
default:
|
|
@@ -100,7 +100,7 @@ const A = {
|
|
|
100
100
|
]
|
|
101
101
|
}
|
|
102
102
|
);
|
|
103
|
-
return l === "mini" && g === "success" && e.type === "circle" && (C = /* @__PURE__ */ t("div", { className: `${o}-wrapper`, style: { width: n, height: n }, children: /* @__PURE__ */ t(
|
|
103
|
+
return l === "mini" && g === "success" && e.type === "circle" && (C = /* @__PURE__ */ t("div", { className: `${o}-wrapper`, style: { width: n, height: n }, children: /* @__PURE__ */ t(b, { style: { fontSize: n - 2, color: y } }) })), l === "mini" && i ? /* @__PURE__ */ t(
|
|
104
104
|
U,
|
|
105
105
|
{
|
|
106
106
|
content: /* @__PURE__ */ t(
|
|
@@ -148,14 +148,14 @@ function E(e) {
|
|
|
148
148
|
size: c = "default",
|
|
149
149
|
status: m = "normal"
|
|
150
150
|
} = e, o = e.strokeWidth || D[c], s = `${a}-${l}`, d = o, $ = m === "success" || m === "error" || i >= 100, y = N(() => {
|
|
151
|
-
if (
|
|
151
|
+
if (T(f))
|
|
152
152
|
return f(i);
|
|
153
153
|
switch (m) {
|
|
154
154
|
case "error":
|
|
155
155
|
return /* @__PURE__ */ v("span", { children: [
|
|
156
156
|
i,
|
|
157
157
|
"% ",
|
|
158
|
-
/* @__PURE__ */ t(
|
|
158
|
+
/* @__PURE__ */ t(z, {})
|
|
159
159
|
] });
|
|
160
160
|
default:
|
|
161
161
|
return `${i}%`;
|
|
@@ -222,14 +222,14 @@ const L = (e) => {
|
|
|
222
222
|
size: n = "default",
|
|
223
223
|
status: u = "normal"
|
|
224
224
|
} = e, p = e.strokeWidth || (n === "small" ? 8 : 4), c = `${l}-${i}`, m = p, o = N(() => {
|
|
225
|
-
if (
|
|
225
|
+
if (T(r))
|
|
226
226
|
return r(a);
|
|
227
227
|
switch (u) {
|
|
228
228
|
case "error":
|
|
229
229
|
return /* @__PURE__ */ v("span", { children: [
|
|
230
230
|
a,
|
|
231
231
|
"% ",
|
|
232
|
-
/* @__PURE__ */ t(
|
|
232
|
+
/* @__PURE__ */ t(z, {})
|
|
233
233
|
] });
|
|
234
234
|
default:
|
|
235
235
|
return `${a}%`;
|
|
@@ -358,7 +358,7 @@ function q(e, l) {
|
|
|
358
358
|
}
|
|
359
359
|
);
|
|
360
360
|
}
|
|
361
|
-
const H =
|
|
361
|
+
const H = I(q);
|
|
362
362
|
H.displayName = "Progress";
|
|
363
363
|
export {
|
|
364
364
|
H as default
|
package/Radio.js
CHANGED
package/Rate.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { jsx as o, jsxs as Y } from "react/jsx-runtime";
|
|
2
|
+
import Z from "@unicom-cloud/icons/IconUiFaceFrownFill";
|
|
3
|
+
import E from "@unicom-cloud/icons/IconUiFaceMehFill";
|
|
4
|
+
import x from "@unicom-cloud/icons/IconUiFaceSmileFill";
|
|
5
|
+
import tt from "@unicom-cloud/icons/IconUiStarFill";
|
|
6
|
+
import { o as rt, d as et } from "./chunk/DApXtulb.js";
|
|
7
|
+
import g, { useContext as ot, useState as v } from "react";
|
|
8
|
+
import { d as at } from "./chunk/CV1kLw5Z.js";
|
|
6
9
|
import { useMergeProps as st } from "./hooks/useMergeProps.js";
|
|
7
10
|
import ct from "./Tooltip.js";
|
|
8
11
|
import { y as U } from "./chunk/BzPkh4Zv.js";
|
|
9
12
|
import lt from "./utils/omit.js";
|
|
10
13
|
const it = {
|
|
11
|
-
character: /* @__PURE__ */
|
|
14
|
+
character: /* @__PURE__ */ o(tt, {}),
|
|
12
15
|
count: 5
|
|
13
16
|
};
|
|
14
17
|
function nt(S, _) {
|
|
15
|
-
const { getPrefixCls: j, componentConfig: m, rtl: z } = at
|
|
18
|
+
const { getPrefixCls: j, componentConfig: m, rtl: z } = ot(at), F = st(
|
|
16
19
|
S,
|
|
17
20
|
it,
|
|
18
21
|
m == null ? void 0 : m.Rate
|
|
@@ -24,54 +27,54 @@ function nt(S, _) {
|
|
|
24
27
|
count: I,
|
|
25
28
|
value: N,
|
|
26
29
|
tooltips: P,
|
|
27
|
-
allowHalf:
|
|
30
|
+
allowHalf: a,
|
|
28
31
|
allowClear: W,
|
|
29
|
-
readonly:
|
|
30
|
-
disabled:
|
|
31
|
-
grading:
|
|
32
|
+
readonly: p,
|
|
33
|
+
disabled: u,
|
|
34
|
+
grading: C,
|
|
32
35
|
onChange: c,
|
|
33
36
|
onHoverChange: l,
|
|
34
37
|
...q
|
|
35
|
-
} = F, [B,
|
|
36
|
-
|
|
38
|
+
} = F, [B, M] = v(T || N || 0), [d, b] = v(0), [h, w] = v(), e = j("rate"), G = U(
|
|
39
|
+
e,
|
|
37
40
|
{
|
|
38
|
-
[`${
|
|
39
|
-
[`${
|
|
40
|
-
[`${
|
|
41
|
+
[`${e}-readonly`]: p,
|
|
42
|
+
[`${e}-disabled`]: u,
|
|
43
|
+
[`${e}-rtl`]: z
|
|
41
44
|
},
|
|
42
45
|
L
|
|
43
46
|
), n = "value" in F ? N : B, R = () => {
|
|
44
|
-
d && (
|
|
47
|
+
d && (b(0), l == null || l(0));
|
|
45
48
|
}, V = (t, s) => {
|
|
46
|
-
const
|
|
47
|
-
|
|
49
|
+
const r = s && a ? t + 0.5 : t + 1;
|
|
50
|
+
r !== d && (b(r), l == null || l(r));
|
|
48
51
|
}, A = (t, s) => {
|
|
49
|
-
const
|
|
50
|
-
w(!0),
|
|
52
|
+
const r = s && a ? t + 0.5 : t + 1;
|
|
53
|
+
w(!0), r !== n ? (M(r), c == null || c(r)) : W && (M(0), c == null || c(0), R());
|
|
51
54
|
}, H = (t) => {
|
|
52
|
-
const s =
|
|
55
|
+
const s = a ? rt(+et(n || 0, 0.5).toFixed(0), 0.5) : Math.round(n), r = d || s;
|
|
53
56
|
let i = typeof f == "function" ? f(t) : f;
|
|
54
|
-
|
|
55
|
-
const J = U(`${
|
|
56
|
-
[`${
|
|
57
|
-
[`${
|
|
58
|
-
[`${
|
|
59
|
-
}), K =
|
|
57
|
+
C && (r <= 2 ? i = /* @__PURE__ */ o(Z, {}) : r <= 3 ? i = /* @__PURE__ */ o(E, {}) : i = /* @__PURE__ */ o(x, {}), r <= t && (i = /* @__PURE__ */ o(E, {})));
|
|
58
|
+
const J = U(`${e}-character`, {
|
|
59
|
+
[`${e}-character-half`]: a && t + 0.5 === r,
|
|
60
|
+
[`${e}-character-full`]: t + 1 <= r,
|
|
61
|
+
[`${e}-character-scale`]: h && t + 1 < n
|
|
62
|
+
}), K = p || u ? {} : {
|
|
60
63
|
onMouseEnter: V.bind(this, t, !0),
|
|
61
64
|
onClick: A.bind(this, t, !0)
|
|
62
|
-
}, O =
|
|
65
|
+
}, O = p || u ? {} : {
|
|
63
66
|
onMouseEnter: V.bind(this, t, !1),
|
|
64
67
|
onClick: A.bind(this, t, !1)
|
|
65
68
|
}, y = P && P[t], Q = y ? ct : g.Fragment, X = y ? { content: y } : {};
|
|
66
69
|
function $(k) {
|
|
67
70
|
return {
|
|
68
71
|
role: "radio",
|
|
69
|
-
"aria-checked": t + (k ? 0.5 : 1) <=
|
|
72
|
+
"aria-checked": t + (k ? 0.5 : 1) <= r,
|
|
70
73
|
"aria-setsize": I,
|
|
71
74
|
"aria-posinset": t + (k ? 0.5 : 1)
|
|
72
75
|
};
|
|
73
76
|
}
|
|
74
|
-
return /* @__PURE__ */
|
|
77
|
+
return /* @__PURE__ */ o(Q, { ...X, children: /* @__PURE__ */ Y(
|
|
75
78
|
"div",
|
|
76
79
|
{
|
|
77
80
|
className: J,
|
|
@@ -79,23 +82,23 @@ function nt(S, _) {
|
|
|
79
82
|
onAnimationEnd: () => {
|
|
80
83
|
h && t + 1 >= n - 1 && w(!1);
|
|
81
84
|
},
|
|
82
|
-
...
|
|
85
|
+
...a ? {} : $(),
|
|
83
86
|
children: [
|
|
84
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ o(
|
|
85
88
|
"div",
|
|
86
89
|
{
|
|
87
|
-
className: `${
|
|
90
|
+
className: `${e}-character-left`,
|
|
88
91
|
...K,
|
|
89
|
-
...
|
|
92
|
+
...a ? $(!0) : {},
|
|
90
93
|
children: i
|
|
91
94
|
}
|
|
92
95
|
),
|
|
93
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ o(
|
|
94
97
|
"div",
|
|
95
98
|
{
|
|
96
|
-
className: `${
|
|
99
|
+
className: `${e}-character-right`,
|
|
97
100
|
...O,
|
|
98
|
-
...
|
|
101
|
+
...a ? $() : {},
|
|
99
102
|
children: i
|
|
100
103
|
}
|
|
101
104
|
)
|
|
@@ -103,7 +106,7 @@ function nt(S, _) {
|
|
|
103
106
|
}
|
|
104
107
|
) }, t);
|
|
105
108
|
};
|
|
106
|
-
return /* @__PURE__ */
|
|
109
|
+
return /* @__PURE__ */ o(
|
|
107
110
|
"div",
|
|
108
111
|
{
|
|
109
112
|
ref: _,
|
|
@@ -111,7 +114,7 @@ function nt(S, _) {
|
|
|
111
114
|
style: D,
|
|
112
115
|
className: G,
|
|
113
116
|
onMouseLeave: R,
|
|
114
|
-
children: /* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ o("div", { className: `${e}-inner`, children: Array.apply(null, Array(C ? 5 : I)).map(
|
|
115
118
|
(t, s) => H(s)
|
|
116
119
|
) })
|
|
117
120
|
}
|