@unicom-cloud/ui 0.8.64 → 0.8.65
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 +2 -2
- package/Alert.js +2 -2
- package/Anchor.js +1 -1
- package/AutoComplete.js +4 -4
- package/Avatar.js +2 -2
- package/BackTop.js +2 -2
- package/Badge.js +37 -31
- package/Breadcrumb.js +3 -3
- package/Button.js +82 -71
- package/Calendar.js +4 -4
- package/Card.js +2 -2
- package/Carousel.js +2 -2
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +5 -5
- package/Comment.js +2 -2
- package/ConfigProvider.js +2 -2
- package/Copy.js +3 -3
- package/DatePicker.js +92 -92
- package/Descriptions.js +2 -2
- package/Divider.js +2 -2
- package/Draggable.js +2 -2
- package/Drawer.js +1 -1
- package/Dropdown.js +2 -2
- package/Empty.js +2 -2
- package/Form.js +4 -4
- package/Grid.js +3 -3
- package/Icon.js +2 -2
- package/IconHover.js +2 -2
- package/Image.js +2 -2
- package/Input.js +3 -3
- package/InputNumber.js +3 -3
- package/InputTag.js +1 -1
- package/Layout.js +3 -3
- package/Link.js +2 -2
- package/List.js +30 -30
- package/Mentions.js +4 -4
- package/Menu.js +2 -2
- package/Message.js +2 -2
- package/Modal.js +1 -1
- package/Notice.js +2 -2
- package/Notification.js +2 -2
- package/OverflowEllipsis.js +2 -2
- package/PageHeader.js +2 -2
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +2 -2
- package/Popover.js +2 -2
- package/Progress.js +2 -2
- package/Radio.js +2 -2
- package/Rate.js +2 -2
- package/ResizeBox.js +155 -154
- package/Result.js +2 -2
- package/Select.js +2 -2
- package/SelectView.js +7 -7
- package/Skeleton.js +2 -2
- package/Slider.js +5 -5
- package/Space.js +2 -2
- package/Spin.js +2 -2
- package/Statistic.js +2 -2
- package/Steps.js +2 -2
- package/Switch.js +3 -3
- package/Table.js +5 -5
- package/Tabs.js +4 -4
- package/Tag.js +2 -2
- package/TimePicker.js +4 -4
- package/Timeline.js +2 -2
- package/Tooltip.js +2 -2
- package/Transfer.js +4 -4
- package/Tree.js +1 -1
- package/TreeSelect.js +2 -2
- package/Trigger.js +43 -42
- package/Typography.js +1 -1
- package/Upload.js +4 -5
- package/VerificationCode.js +1 -1
- package/Version.js +5 -3
- package/Watermark.js +1 -1
- package/chunk/{-IELMT_x.js → 1GQdnTJp.js} +2 -2
- package/chunk/BAWsPQBM.js +11 -0
- package/chunk/{BJSjbYSN.js → BS09tn7B.js} +2 -2
- package/chunk/{oR9TkA35.js → BUCEs557.js} +2 -2
- package/chunk/BqGtwxTi.js +777 -0
- package/chunk/{CtUTlwlQ.js → Bqk6yh16.js} +2 -2
- package/chunk/{DPJEIBKZ.js → BqufsN8i.js} +4 -4
- package/chunk/{CA69nxbj.js → BtlvlGQN.js} +2 -2
- package/chunk/{CAhODOfT.js → CF6p9R93.js} +2 -2
- package/chunk/{D-oHJail.js → CGZ0In1p.js} +178 -175
- package/chunk/{BHnRi7Xh.js → CH1UUxsg.js} +4 -4
- package/chunk/{Yvz-hPQB.js → CIlGCedk.js} +3 -3
- package/chunk/{tW_FgNSv.js → CPcm9Cm5.js} +2 -2
- package/chunk/{Cqyp4qni.js → CSC_V_25.js} +45 -45
- package/chunk/{BtIG250j.js → CWgltRVL.js} +40 -40
- package/chunk/{BCxoi4Kf.js → CsbCHnFk.js} +2 -2
- package/chunk/{Cb_oWoGj.js → CwhPMMWy.js} +14 -14
- package/chunk/{QlYCEvCX.js → DG-epQqF.js} +2 -2
- package/chunk/{CxpFYX4B.js → DIx0qmCq.js} +3 -3
- package/chunk/{D01b7bWX.js → DK4KcodH.js} +176 -175
- package/chunk/{CYQ1EE4h.js → DLvMA1OW.js} +2 -2
- package/chunk/{CAiaqaWc.js → DQDkV47j.js} +2 -2
- package/chunk/{BfHNSLva.js → DTjcKyDN.js} +135 -134
- package/chunk/{BmO1y0vr.js → DUeHQKtx.js} +12 -12
- package/chunk/{CZfGDXaB.js → DXZEpA3t.js} +2 -2
- package/chunk/{CTF5o0OX.js → DjtWv6Wn.js} +1 -1
- package/chunk/{B5GDq8NJ.js → DlLL5JQo.js} +99 -96
- package/chunk/{CBgwLBAC.js → Dnycc1qJ.js} +104 -103
- package/chunk/{B68hRpYG.js → DqFhzTWC.js} +3 -3
- package/chunk/{BwSpYGK-.js → Dv_xRzvR.js} +3 -3
- package/chunk/{DQ561AmR.js → Ek8U5CTN.js} +222 -221
- package/chunk/{BSBJlVZH.js → ewRDIDUz.js} +4 -4
- package/chunk/{pq-36BDW.js → tYXLFPVI.js} +3 -3
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useMergeValue.js +2 -2
- package/index.js +378 -374
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/package.json +1 -1
- package/style/variable.less +820 -0
- package/style.css +1 -1
- package/types/badge/index.d.ts +2 -2
- package/types/button/index.d.ts +3 -1
- package/types/config-provider/interface.d.ts +1 -1
- package/types/index.d.ts +5 -5
- package/types/select/interface.d.ts +1 -1
- package/types/tabs/Tab.d.ts +1 -1
- package/types/upload/Upload.d.ts +1 -1
- package/types/version/index.d.ts +2 -0
- package/utils/className.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/copy.js +1 -1
- package/utils/index.js +41 -41
- package/utils/is.js +37 -37
- package/utils/reactDOM.js +3 -3
- package/utils/scrollIntoView.js +1 -1
- package/chunk/BzPkh4Zv.js +0 -11
- package/chunk/_m8hLSsx.js +0 -776
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { z as V, H as b, G as w } from "./
|
|
2
|
-
import c from "lodash/isObject";
|
|
3
|
-
import M from "lodash/isArray";
|
|
4
|
-
import E from "lodash/isEqual";
|
|
5
|
-
import O from "lodash/isBoolean";
|
|
6
|
-
import z from "lodash/isNumber";
|
|
7
|
-
import y from "lodash/isString";
|
|
8
|
-
import S from "lodash/isFunction";
|
|
1
|
+
import { z as V, H as b, G as w } from "./CSC_V_25.js";
|
|
2
|
+
import c from "lodash/isObject.js";
|
|
3
|
+
import M from "lodash/isArray.js";
|
|
4
|
+
import E from "lodash/isEqual.js";
|
|
5
|
+
import O from "lodash/isBoolean.js";
|
|
6
|
+
import z from "lodash/isNumber.js";
|
|
7
|
+
import y from "lodash/isString.js";
|
|
8
|
+
import S from "lodash/isFunction.js";
|
|
9
9
|
var _ = Object.defineProperty, $ = (r, t, e) => t in r ? _(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, o = (r, t, e) => $(r, typeof t != "symbol" ? t + "" : t, e);
|
|
10
10
|
const d = "#{field} is not a #{type} type", k = {
|
|
11
11
|
required: "#{field} is required",
|
|
@@ -128,7 +128,7 @@ class p {
|
|
|
128
128
|
t == null || t(this.error);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
class
|
|
131
|
+
class N extends p {
|
|
132
132
|
constructor(t, e) {
|
|
133
133
|
super(t, {
|
|
134
134
|
...e,
|
|
@@ -187,7 +187,7 @@ class A extends p {
|
|
|
187
187
|
);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
class
|
|
190
|
+
class R extends p {
|
|
191
191
|
constructor(t, e) {
|
|
192
192
|
super(t, {
|
|
193
193
|
...e,
|
|
@@ -210,7 +210,7 @@ class N extends p {
|
|
|
210
210
|
);
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
class
|
|
213
|
+
class A extends p {
|
|
214
214
|
constructor(t, e) {
|
|
215
215
|
super(t, {
|
|
216
216
|
...e,
|
|
@@ -398,7 +398,7 @@ class q {
|
|
|
398
398
|
e.validateMessages
|
|
399
399
|
)
|
|
400
400
|
};
|
|
401
|
-
this.string = new P(t, s), this.number = new K(t, s), this.array = new
|
|
401
|
+
this.string = new P(t, s), this.number = new K(t, s), this.array = new N(t, s), this.object = new D(t, s), this.boolean = new R(t, s), this.type = new G(t, s), this.custom = new A(t, s);
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
404
|
class X {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as $, jsxs as Q, Fragment as Te } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as j, useEffect as X, useCallback as V, createContext as Ce, useContext as ie } from "react";
|
|
3
3
|
import se from "../Button.js";
|
|
4
|
-
import { d as He } from "./
|
|
5
|
-
import { y as ee } from "./
|
|
4
|
+
import { d as He } from "./DlLL5JQo.js";
|
|
5
|
+
import { y as ee } from "./BAWsPQBM.js";
|
|
6
6
|
import { dayjs as g, methods as Y, getDayjsValue as Oe, getNow as re, toLocal as ce } from "../utils/dayjs.js";
|
|
7
7
|
import { padStart as C } from "../utils/pad.js";
|
|
8
8
|
import ge from "lodash/debounce";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Ft = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var g = (r, e, t) =>
|
|
4
|
-
import G, { forwardRef as bt, useContext as nt, createContext as
|
|
2
|
+
var Tt = (r, e, t) => e in r ? Ft(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var g = (r, e, t) => Tt(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import G, { forwardRef as bt, useContext as nt, createContext as qt, useRef as st, useImperativeHandle as xt, Component as Ot, createRef as jt, useEffect as D, useState as Lt } from "react";
|
|
5
5
|
import { jsx as d, jsxs as V } from "react/jsx-runtime";
|
|
6
6
|
import _ from "@unicom-cloud/icons/context";
|
|
7
7
|
import Dt from "lodash/isPlainObject";
|
|
@@ -16,7 +16,7 @@ import zt from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
|
16
16
|
import Bt from "@unicom-cloud/icons/IconUiInfoCircleFill";
|
|
17
17
|
import Vt from "@unicom-cloud/icons/IconUiLoading";
|
|
18
18
|
import Gt from "@unicom-cloud/icons/IconUiEmpty";
|
|
19
|
-
import { y as j } from "./
|
|
19
|
+
import { y as j } from "./BAWsPQBM.js";
|
|
20
20
|
import Jt from "../locale/zh-CN.js";
|
|
21
21
|
import wt from "../NotificationBase.js";
|
|
22
22
|
import { render as $t } from "../utils/reactDOM.js";
|
|
@@ -62,16 +62,16 @@ function ot(r, e, t) {
|
|
|
62
62
|
if (n === s)
|
|
63
63
|
o = 0, i = 0;
|
|
64
64
|
else {
|
|
65
|
-
const
|
|
66
|
-
switch (o = a > 0.5 ?
|
|
65
|
+
const f = n - s;
|
|
66
|
+
switch (o = a > 0.5 ? f / (2 - n - s) : f / (n + s), n) {
|
|
67
67
|
case r:
|
|
68
|
-
i = (e - t) /
|
|
68
|
+
i = (e - t) / f + (e < t ? 6 : 0);
|
|
69
69
|
break;
|
|
70
70
|
case e:
|
|
71
|
-
i = (t - r) /
|
|
71
|
+
i = (t - r) / f + 2;
|
|
72
72
|
break;
|
|
73
73
|
case t:
|
|
74
|
-
i = (r - e) /
|
|
74
|
+
i = (r - e) / f + 4;
|
|
75
75
|
break;
|
|
76
76
|
}
|
|
77
77
|
i /= 6;
|
|
@@ -95,7 +95,7 @@ function X(r, e, t) {
|
|
|
95
95
|
r = w(r, 255), e = w(e, 255), t = w(t, 255);
|
|
96
96
|
const n = Math.max(r, e, t), s = Math.min(r, e, t);
|
|
97
97
|
let i = 0;
|
|
98
|
-
const o = n, a = n - s,
|
|
98
|
+
const o = n, a = n - s, f = n === 0 ? 0 : a / n;
|
|
99
99
|
if (n === s)
|
|
100
100
|
i = 0;
|
|
101
101
|
else {
|
|
@@ -112,11 +112,11 @@ function X(r, e, t) {
|
|
|
112
112
|
}
|
|
113
113
|
i /= 6;
|
|
114
114
|
}
|
|
115
|
-
return { h: i, s:
|
|
115
|
+
return { h: i, s: f, v: o };
|
|
116
116
|
}
|
|
117
117
|
function ne(r, e, t) {
|
|
118
118
|
r = w(r, 360) * 6, e = w(e, 100), t = w(t, 100);
|
|
119
|
-
const n = Math.floor(r), s = r - n, i = t * (1 - e), o = t * (1 - s * e), a = t * (1 - (1 - s) * e),
|
|
119
|
+
const n = Math.floor(r), s = r - n, i = t * (1 - e), o = t * (1 - s * e), a = t * (1 - (1 - s) * e), f = n % 6, l = [t, o, i, i, a, t][f], c = [a, t, t, o, i, i][f], u = [i, i, a, t, t, o][f];
|
|
120
120
|
return { r: l * 255, g: c * 255, b: u * 255 };
|
|
121
121
|
}
|
|
122
122
|
function at(r, e, t, n) {
|
|
@@ -145,8 +145,8 @@ function Ge(r, e, t, n) {
|
|
|
145
145
|
].join("");
|
|
146
146
|
}
|
|
147
147
|
function ie(r, e, t, n) {
|
|
148
|
-
const s = r / 100, i = e / 100, o = t / 100, a = n / 100,
|
|
149
|
-
return { r:
|
|
148
|
+
const s = r / 100, i = e / 100, o = t / 100, a = n / 100, f = 255 * (1 - s) * (1 - a), l = 255 * (1 - i) * (1 - a), c = 255 * (1 - o) * (1 - a);
|
|
149
|
+
return { r: f, g: l, b: c };
|
|
150
150
|
}
|
|
151
151
|
function ct(r, e, t) {
|
|
152
152
|
let n = 1 - r / 255, s = 1 - e / 255, i = 1 - t / 255, o = Math.min(n, s, i);
|
|
@@ -770,14 +770,14 @@ function fe(r, e) {
|
|
|
770
770
|
getPrefixCls: t,
|
|
771
771
|
locale: n,
|
|
772
772
|
componentConfig: s
|
|
773
|
-
} = nt(
|
|
773
|
+
} = nt(q), i = Ct(
|
|
774
774
|
r,
|
|
775
775
|
{},
|
|
776
776
|
s == null ? void 0 : s.Empty
|
|
777
|
-
), { style: o, className: a, description:
|
|
777
|
+
), { style: o, className: a, description: f, icon: l, imgSrc: c, ...u } = i, m = t("empty"), b = j(m, a), p = n.Empty.noData, h = typeof f == "string" ? f : "empty";
|
|
778
778
|
return /* @__PURE__ */ d("div", { ref: e, className: b, style: o, ...u, children: /* @__PURE__ */ V("div", { className: `${m}-wrapper`, children: [
|
|
779
|
-
/* @__PURE__ */ d("div", { className: `${m}-image`, children: c ? /* @__PURE__ */ d("img", { alt:
|
|
780
|
-
/* @__PURE__ */ d("div", { className: `${m}-description`, children:
|
|
779
|
+
/* @__PURE__ */ d("div", { className: `${m}-image`, children: c ? /* @__PURE__ */ d("img", { alt: h, src: c }) : l || /* @__PURE__ */ d(Gt, {}) }),
|
|
780
|
+
/* @__PURE__ */ d("div", { className: `${m}-description`, children: f || p })
|
|
781
781
|
] }) });
|
|
782
782
|
}
|
|
783
783
|
const St = bt(fe);
|
|
@@ -795,7 +795,7 @@ const Rt = {
|
|
|
795
795
|
getPopupContainer: () => document.body,
|
|
796
796
|
size: "default",
|
|
797
797
|
renderEmpty: ue
|
|
798
|
-
},
|
|
798
|
+
}, q = qt({
|
|
799
799
|
getPrefixCls: (r, e) => `${e || "pqb"}-${r}`,
|
|
800
800
|
...Rt
|
|
801
801
|
});
|
|
@@ -807,7 +807,7 @@ function ge(r, e) {
|
|
|
807
807
|
prefix: i,
|
|
808
808
|
size: o = "default",
|
|
809
809
|
...a
|
|
810
|
-
} = r, { getPrefixCls:
|
|
810
|
+
} = r, { getPrefixCls: f } = nt(q), l = f("icon-hover"), c = st();
|
|
811
811
|
return xt(e, () => ({
|
|
812
812
|
getRootDOMNode: () => c.current
|
|
813
813
|
})), /* @__PURE__ */ d(
|
|
@@ -909,14 +909,14 @@ class J extends Ot {
|
|
|
909
909
|
className: i,
|
|
910
910
|
style: o,
|
|
911
911
|
type: a,
|
|
912
|
-
btn:
|
|
912
|
+
btn: f,
|
|
913
913
|
icon: l,
|
|
914
914
|
prefixCls: c,
|
|
915
915
|
closable: u,
|
|
916
916
|
noticeType: m,
|
|
917
917
|
iconPrefix: b,
|
|
918
918
|
rtl: p,
|
|
919
|
-
closeIcon:
|
|
919
|
+
closeIcon: h,
|
|
920
920
|
classPrefixCls: x
|
|
921
921
|
} = this.props, y = j(
|
|
922
922
|
c,
|
|
@@ -941,12 +941,12 @@ class J extends Ot {
|
|
|
941
941
|
children: /* @__PURE__ */ V("div", { className: y, style: o, role: "alert", children: [
|
|
942
942
|
v && this.renderIcon(),
|
|
943
943
|
/* @__PURE__ */ d("span", { className: `${c}-content`, children: n }),
|
|
944
|
-
$ && (
|
|
944
|
+
$ && (h !== void 0 ? /* @__PURE__ */ d(
|
|
945
945
|
"span",
|
|
946
946
|
{
|
|
947
947
|
onClick: this.onClose,
|
|
948
948
|
className: `${c}-close-btn`,
|
|
949
|
-
children:
|
|
949
|
+
children: h
|
|
950
950
|
}
|
|
951
951
|
) : /* @__PURE__ */ d(
|
|
952
952
|
ht,
|
|
@@ -972,14 +972,14 @@ class J extends Ot {
|
|
|
972
972
|
/* @__PURE__ */ V("div", { className: `${c}-right`, children: [
|
|
973
973
|
t && /* @__PURE__ */ d("div", { className: `${c}-title`, children: t }),
|
|
974
974
|
/* @__PURE__ */ d("div", { className: `${c}-content`, children: n }),
|
|
975
|
-
|
|
975
|
+
f && /* @__PURE__ */ d("div", { className: `${c}-btn-wrapper`, children: f })
|
|
976
976
|
] }),
|
|
977
|
-
$ && (
|
|
977
|
+
$ && (h !== void 0 ? /* @__PURE__ */ d(
|
|
978
978
|
"span",
|
|
979
979
|
{
|
|
980
980
|
onClick: this.onClose,
|
|
981
981
|
className: `${c}-close-btn`,
|
|
982
|
-
children:
|
|
982
|
+
children: h
|
|
983
983
|
}
|
|
984
984
|
) : /* @__PURE__ */ d(
|
|
985
985
|
ht,
|
|
@@ -1006,11 +1006,11 @@ g(J, "defaultProps", {
|
|
|
1006
1006
|
showIcon: !0,
|
|
1007
1007
|
noticeType: "message",
|
|
1008
1008
|
duration: 3e3
|
|
1009
|
-
}), g(J, "contextType",
|
|
1009
|
+
}), g(J, "contextType", q);
|
|
1010
1010
|
function me(r = {}) {
|
|
1011
1011
|
const { maxCount: e, duration: t = 3e3, prefixCls: n } = r, s = st(), i = /* @__PURE__ */ d(Ht, { ref: s }), o = {};
|
|
1012
1012
|
let a;
|
|
1013
|
-
function
|
|
1013
|
+
function f(c) {
|
|
1014
1014
|
let u, m;
|
|
1015
1015
|
if (s.current) {
|
|
1016
1016
|
const v = s.current.getContextConfig();
|
|
@@ -1020,32 +1020,32 @@ function me(r = {}) {
|
|
|
1020
1020
|
position: "top",
|
|
1021
1021
|
duration: t,
|
|
1022
1022
|
...c
|
|
1023
|
-
}, { position:
|
|
1023
|
+
}, { position: h, transitionClassNames: x } = p;
|
|
1024
1024
|
let y;
|
|
1025
|
-
if (o[
|
|
1026
|
-
const v = o[
|
|
1027
|
-
v.length >= e ? (y = v[0].id, v.shift(), o[
|
|
1025
|
+
if (o[h]) {
|
|
1026
|
+
const v = o[h].state.notices;
|
|
1027
|
+
v.length >= e ? (y = v[0].id, v.shift(), o[h].add({ ...p, id: y })) : y = o[h].add(p);
|
|
1028
1028
|
} else
|
|
1029
1029
|
a = /* @__PURE__ */ d(
|
|
1030
1030
|
M,
|
|
1031
1031
|
{
|
|
1032
1032
|
transitionClassNames: x,
|
|
1033
1033
|
ref: (v) => {
|
|
1034
|
-
o[
|
|
1034
|
+
o[h] = v, o[h] && (y = o[h].add(p));
|
|
1035
1035
|
},
|
|
1036
1036
|
prefixCls: b,
|
|
1037
1037
|
rtl: m
|
|
1038
1038
|
}
|
|
1039
1039
|
), s.current.addInstance(a);
|
|
1040
1040
|
return () => {
|
|
1041
|
-
o[
|
|
1041
|
+
o[h] && o[h].remove(y);
|
|
1042
1042
|
};
|
|
1043
1043
|
}
|
|
1044
1044
|
const l = {};
|
|
1045
1045
|
return ["info", "success", "warning", "error", "normal"].forEach((c) => {
|
|
1046
1046
|
l[c] = (u) => {
|
|
1047
1047
|
const m = Kt(u) ? { content: u } : u;
|
|
1048
|
-
return
|
|
1048
|
+
return f({
|
|
1049
1049
|
...m,
|
|
1050
1050
|
type: c
|
|
1051
1051
|
});
|
|
@@ -1126,14 +1126,14 @@ class M extends wt {
|
|
|
1126
1126
|
prefixCls: s,
|
|
1127
1127
|
rtl: i,
|
|
1128
1128
|
closable: o
|
|
1129
|
-
} = this.props, { notices: a, position:
|
|
1129
|
+
} = this.props, { notices: a, position: f } = this.state, l = s || ft, c = F(i) ? dt : i, u = F(o) ? ut : o, m = l ? `${l}-message` : "pqb-message", b = {
|
|
1130
1130
|
enter: O(n == null ? void 0 : n.enter) ? n == null ? void 0 : n.enter : 100,
|
|
1131
1131
|
exit: O(n == null ? void 0 : n.exit) ? n == null ? void 0 : n.exit : 300
|
|
1132
1132
|
}, p = j(
|
|
1133
1133
|
`${m}-wrapper`,
|
|
1134
|
-
`${m}-wrapper-${
|
|
1134
|
+
`${m}-wrapper-${f}`
|
|
1135
1135
|
);
|
|
1136
|
-
return /* @__PURE__ */ d("div", { className: p, children: /* @__PURE__ */ d(yt, { component: null, children: a.map((
|
|
1136
|
+
return /* @__PURE__ */ d("div", { className: p, children: /* @__PURE__ */ d(yt, { component: null, children: a.map((h) => /* @__PURE__ */ d(
|
|
1137
1137
|
vt,
|
|
1138
1138
|
{
|
|
1139
1139
|
timeout: b,
|
|
@@ -1146,12 +1146,12 @@ class M extends wt {
|
|
|
1146
1146
|
},
|
|
1147
1147
|
onExited: (x) => {
|
|
1148
1148
|
var y;
|
|
1149
|
-
x && (x.style.height = 0, (y =
|
|
1149
|
+
x && (x.style.height = 0, (y = h.onClose) == null || y.call(h));
|
|
1150
1150
|
},
|
|
1151
1151
|
children: /* @__PURE__ */ d(
|
|
1152
1152
|
J,
|
|
1153
1153
|
{
|
|
1154
|
-
...
|
|
1154
|
+
...h,
|
|
1155
1155
|
prefixCls: m,
|
|
1156
1156
|
classPrefixCls: l,
|
|
1157
1157
|
iconPrefix: l,
|
|
@@ -1162,7 +1162,7 @@ class M extends wt {
|
|
|
1162
1162
|
}
|
|
1163
1163
|
)
|
|
1164
1164
|
},
|
|
1165
|
-
|
|
1165
|
+
h.id
|
|
1166
1166
|
)) }) });
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
@@ -1208,7 +1208,7 @@ function xe(r = {}) {
|
|
|
1208
1208
|
prefixCls: n,
|
|
1209
1209
|
getContainer: s
|
|
1210
1210
|
} = r, i = st(), o = /* @__PURE__ */ d(Ht, { ref: i }), a = {};
|
|
1211
|
-
let
|
|
1211
|
+
let f;
|
|
1212
1212
|
function l(u) {
|
|
1213
1213
|
let m, b;
|
|
1214
1214
|
if (i.current) {
|
|
@@ -1216,29 +1216,29 @@ function xe(r = {}) {
|
|
|
1216
1216
|
b = $.rtl, m = $.prefixCls;
|
|
1217
1217
|
}
|
|
1218
1218
|
const p = n || m;
|
|
1219
|
-
let
|
|
1220
|
-
F(u.position) && (
|
|
1219
|
+
let h = u.position;
|
|
1220
|
+
F(u.position) && (h = b ? "topLeft" : "topRight");
|
|
1221
1221
|
const x = {
|
|
1222
1222
|
duration: t,
|
|
1223
1223
|
...u
|
|
1224
1224
|
};
|
|
1225
1225
|
let y;
|
|
1226
|
-
if (a[
|
|
1227
|
-
const $ = a[
|
|
1228
|
-
$.length >= e ? (y = $[0].id, $.shift(), a[
|
|
1226
|
+
if (a[h]) {
|
|
1227
|
+
const $ = a[h].state.notices;
|
|
1228
|
+
$.length >= e ? (y = $[0].id, $.shift(), a[h].add({ ...x, id: y })) : y = a[h].add(x);
|
|
1229
1229
|
} else
|
|
1230
|
-
|
|
1231
|
-
|
|
1230
|
+
f = /* @__PURE__ */ d(
|
|
1231
|
+
T,
|
|
1232
1232
|
{
|
|
1233
1233
|
ref: ($) => {
|
|
1234
|
-
a[
|
|
1234
|
+
a[h] = $, a[h] && (y = a[h].add(x));
|
|
1235
1235
|
},
|
|
1236
1236
|
prefixCls: p,
|
|
1237
1237
|
rtl: b,
|
|
1238
1238
|
getContainer: s
|
|
1239
1239
|
}
|
|
1240
|
-
), i.current.addInstance(
|
|
1241
|
-
return a[
|
|
1240
|
+
), i.current.addInstance(f);
|
|
1241
|
+
return a[h];
|
|
1242
1242
|
}
|
|
1243
1243
|
const c = {};
|
|
1244
1244
|
return ["info", "success", "warning", "error", "normal"].forEach((u) => {
|
|
@@ -1268,7 +1268,7 @@ const N = class N extends wt {
|
|
|
1268
1268
|
let o = this.state.position;
|
|
1269
1269
|
const a = F(s) ? B : s;
|
|
1270
1270
|
F(o) && (o = a ? "topLeft" : "topRight");
|
|
1271
|
-
const
|
|
1271
|
+
const f = n || mt, l = f ? `${f}-notification` : "pqb-notification";
|
|
1272
1272
|
let c;
|
|
1273
1273
|
o === "topLeft" || o === "bottomLeft" ? c = "slideNoticeLeft" : c = "slideNoticeRight";
|
|
1274
1274
|
const u = j(
|
|
@@ -1283,15 +1283,15 @@ const N = class N extends wt {
|
|
|
1283
1283
|
exit: 300
|
|
1284
1284
|
},
|
|
1285
1285
|
classNames: c,
|
|
1286
|
-
onExit: (
|
|
1287
|
-
|
|
1286
|
+
onExit: (h) => {
|
|
1287
|
+
h && (h.style.height = `${h.scrollHeight}px`);
|
|
1288
1288
|
},
|
|
1289
|
-
onExiting: (
|
|
1290
|
-
|
|
1289
|
+
onExiting: (h) => {
|
|
1290
|
+
h && (h.style.height = 0);
|
|
1291
1291
|
},
|
|
1292
|
-
onExited: (
|
|
1292
|
+
onExited: (h) => {
|
|
1293
1293
|
var x;
|
|
1294
|
-
|
|
1294
|
+
h && (h.style.height = 0, (x = p.onClose) == null || x.call(p));
|
|
1295
1295
|
},
|
|
1296
1296
|
children: /* @__PURE__ */ d(
|
|
1297
1297
|
J,
|
|
@@ -1299,8 +1299,8 @@ const N = class N extends wt {
|
|
|
1299
1299
|
...p,
|
|
1300
1300
|
onClose: this.remove,
|
|
1301
1301
|
prefixCls: l,
|
|
1302
|
-
iconPrefix:
|
|
1303
|
-
classPrefixCls:
|
|
1302
|
+
iconPrefix: f,
|
|
1303
|
+
classPrefixCls: f,
|
|
1304
1304
|
noticeType: "notification",
|
|
1305
1305
|
rtl: a
|
|
1306
1306
|
}
|
|
@@ -1332,7 +1332,7 @@ g(N, "useNotification"), g(N, "success"), g(N, "info"), g(N, "warning"), g(N, "e
|
|
|
1332
1332
|
...t
|
|
1333
1333
|
}, { instance: i, pending: o } = S[n] || {};
|
|
1334
1334
|
if (i || o) {
|
|
1335
|
-
const
|
|
1335
|
+
const f = () => {
|
|
1336
1336
|
const { instance: l } = S[n] || {}, c = l.state.notices, u = c.find((b) => b.id === t.id), m = {
|
|
1337
1337
|
...s,
|
|
1338
1338
|
update: u
|
|
@@ -1342,31 +1342,31 @@ g(N, "useNotification"), g(N, "success"), g(N, "info"), g(N, "warning"), g(N, "e
|
|
|
1342
1342
|
id: u.id
|
|
1343
1343
|
}) : (c.shift(), l.add(m)) : l.add({ ...m }), l;
|
|
1344
1344
|
};
|
|
1345
|
-
return i ?
|
|
1346
|
-
|
|
1345
|
+
return i ? f() : o != null && o.then && o.then(() => {
|
|
1346
|
+
f(), S[n].pending = null;
|
|
1347
1347
|
}), i;
|
|
1348
1348
|
}
|
|
1349
1349
|
const a = document.createElement("div");
|
|
1350
|
-
return (Z || document.body).appendChild(a), S[n] = {}, S[n].pending = new Promise((
|
|
1350
|
+
return (Z || document.body).appendChild(a), S[n] = {}, S[n].pending = new Promise((f) => {
|
|
1351
1351
|
$t(
|
|
1352
1352
|
/* @__PURE__ */ d(
|
|
1353
1353
|
N,
|
|
1354
1354
|
{
|
|
1355
|
-
ref: (l) => (S[n] || (S[n] = {}), S[n].instance = l, l.add(s),
|
|
1355
|
+
ref: (l) => (S[n] || (S[n] = {}), S[n].instance = l, l.add(s), f(null), l)
|
|
1356
1356
|
}
|
|
1357
1357
|
),
|
|
1358
1358
|
a
|
|
1359
1359
|
);
|
|
1360
1360
|
}), S[n].instance;
|
|
1361
1361
|
});
|
|
1362
|
-
let
|
|
1362
|
+
let T = N;
|
|
1363
1363
|
Ce.forEach((r) => {
|
|
1364
|
-
|
|
1364
|
+
T[r] = (e) => T.addInstance({
|
|
1365
1365
|
...e,
|
|
1366
1366
|
type: r
|
|
1367
1367
|
});
|
|
1368
1368
|
});
|
|
1369
|
-
|
|
1369
|
+
T.useNotification = xe;
|
|
1370
1370
|
const ye = {
|
|
1371
1371
|
primaryColor: {
|
|
1372
1372
|
default: "--pqbblue-6",
|
|
@@ -1401,31 +1401,34 @@ function K(r) {
|
|
|
1401
1401
|
we
|
|
1402
1402
|
), {
|
|
1403
1403
|
theme: t,
|
|
1404
|
-
|
|
1404
|
+
themeMode: n,
|
|
1405
1405
|
prefixCls: s,
|
|
1406
1406
|
children: i,
|
|
1407
1407
|
locale: o,
|
|
1408
1408
|
rtl: a,
|
|
1409
|
-
effectGlobalNotice:
|
|
1409
|
+
effectGlobalNotice: f = !0,
|
|
1410
1410
|
effectGlobalModal: l = !0
|
|
1411
1411
|
} = e, c = window.document.body;
|
|
1412
1412
|
D(() => {
|
|
1413
|
-
Dt(t) && Object.entries(ye).forEach(([p,
|
|
1414
|
-
const $ = t
|
|
1415
|
-
if (
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
}
|
|
1413
|
+
t && Dt(t) && Object.entries(ye).forEach(([p, h], x, y) => {
|
|
1414
|
+
const $ = t[p];
|
|
1415
|
+
if (!$) return;
|
|
1416
|
+
const v = new C($);
|
|
1417
|
+
c.style.setProperty(h.default, v.lighten(0).toRgbArrayString()), t[`${p}Hover`] || c.style.setProperty(h.hover, v.lighten(10).toRgbArrayString()), t[`${p}Active`] || c.style.setProperty(h.active, v.lighten(-10).toRgbArrayString());
|
|
1419
1418
|
});
|
|
1420
1419
|
}, [t]), D(() => {
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1420
|
+
const p = ["pqb-theme"];
|
|
1421
|
+
return n ? p.forEach((h) => {
|
|
1422
|
+
c.setAttribute(h, n);
|
|
1423
|
+
}) : p.forEach((h) => {
|
|
1424
|
+
c.removeAttribute(h);
|
|
1425
|
+
}), () => {
|
|
1426
|
+
};
|
|
1424
1427
|
}, [n]), D(() => {
|
|
1425
|
-
|
|
1426
|
-
}, [s, a,
|
|
1427
|
-
function u(p,
|
|
1428
|
-
return `${
|
|
1428
|
+
f && (M.config({ prefixCls: s, rtl: a }), T.config({ prefixCls: s, rtl: a }));
|
|
1429
|
+
}, [s, a, f]);
|
|
1430
|
+
function u(p, h) {
|
|
1431
|
+
return `${h || s}-${p}`;
|
|
1429
1432
|
}
|
|
1430
1433
|
const m = {
|
|
1431
1434
|
...Xt(e, ["children"]),
|
|
@@ -1435,19 +1438,19 @@ function K(r) {
|
|
|
1435
1438
|
l && be({ locale: o, prefixCls: s, rtl: a });
|
|
1436
1439
|
}, [o, s, a, l]);
|
|
1437
1440
|
let b = i;
|
|
1438
|
-
return s && s !== "pqb" && (b = /* @__PURE__ */ d(_.Provider, { value: { prefixCls: s }, children: i })), /* @__PURE__ */ d(
|
|
1441
|
+
return s && s !== "pqb" && (b = /* @__PURE__ */ d(_.Provider, { value: { prefixCls: s }, children: i })), /* @__PURE__ */ d(q.Provider, { value: m, children: b });
|
|
1439
1442
|
}
|
|
1440
|
-
K.ConfigContext =
|
|
1443
|
+
K.ConfigContext = q;
|
|
1441
1444
|
K.displayName = "ConfigProvider";
|
|
1442
|
-
const Ze =
|
|
1445
|
+
const Ze = q.Consumer;
|
|
1443
1446
|
function It(r, e) {
|
|
1444
|
-
const t = nt(
|
|
1445
|
-
function i(
|
|
1446
|
-
s((l) => [...l,
|
|
1447
|
+
const t = nt(q), [n, s] = Lt([]);
|
|
1448
|
+
function i(f) {
|
|
1449
|
+
s((l) => [...l, f]);
|
|
1447
1450
|
}
|
|
1448
|
-
function o(
|
|
1451
|
+
function o(f) {
|
|
1449
1452
|
s(
|
|
1450
|
-
(l) => l.filter((c) =>
|
|
1453
|
+
(l) => l.filter((c) => f !== c)
|
|
1451
1454
|
);
|
|
1452
1455
|
}
|
|
1453
1456
|
function a() {
|
|
@@ -1459,7 +1462,7 @@ function It(r, e) {
|
|
|
1459
1462
|
getContextConfig: a
|
|
1460
1463
|
})), G.Children.map(
|
|
1461
1464
|
n,
|
|
1462
|
-
(
|
|
1465
|
+
(f, l) => G.cloneElement(f, { key: l })
|
|
1463
1466
|
);
|
|
1464
1467
|
}
|
|
1465
1468
|
It.displayName = "ContextHolderElement";
|
|
@@ -1482,10 +1485,10 @@ export {
|
|
|
1482
1485
|
K as a,
|
|
1483
1486
|
Ze as b,
|
|
1484
1487
|
ye as c,
|
|
1485
|
-
|
|
1488
|
+
q as d,
|
|
1486
1489
|
R as e,
|
|
1487
1490
|
C as f,
|
|
1488
|
-
|
|
1491
|
+
T as g,
|
|
1489
1492
|
xe as h,
|
|
1490
1493
|
Xe as i,
|
|
1491
1494
|
Je as j,
|