@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
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
var Ft = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var g = (
|
|
4
|
-
import G, { forwardRef as
|
|
2
|
+
var qt = (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) => qt(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import G, { forwardRef as bt, useContext as nt, createContext as Tt, 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
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import _ from "@unicom-cloud/icons/context";
|
|
7
|
+
import Dt from "lodash/isPlainObject";
|
|
8
8
|
import { useMergeProps as Ct } from "../hooks/useMergeProps.js";
|
|
9
|
-
import { _ as yt, P as vt } from "./
|
|
9
|
+
import { _ as yt, P as vt } from "./Bp3XomF8.js";
|
|
10
10
|
import O from "lodash/isNumber";
|
|
11
11
|
import F from "lodash/isUndefined";
|
|
12
|
+
import Ut from "@unicom-cloud/icons/IconUiCheckCircleFill";
|
|
13
|
+
import it from "@unicom-cloud/icons/IconUiClose";
|
|
14
|
+
import Wt from "@unicom-cloud/icons/IconUiCloseCircleFill";
|
|
15
|
+
import zt from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
16
|
+
import Bt from "@unicom-cloud/icons/IconUiInfoCircleFill";
|
|
17
|
+
import Vt from "@unicom-cloud/icons/IconUiLoading";
|
|
18
|
+
import Gt from "@unicom-cloud/icons/IconUiEmpty";
|
|
12
19
|
import { y as j } from "./BzPkh4Zv.js";
|
|
13
20
|
import Jt from "../locale/zh-CN.js";
|
|
14
21
|
import wt from "../NotificationBase.js";
|
|
@@ -16,154 +23,154 @@ import { render as $t } from "../utils/reactDOM.js";
|
|
|
16
23
|
import Kt from "lodash/isString";
|
|
17
24
|
import { createPortal as Qt } from "react-dom";
|
|
18
25
|
import Xt from "../utils/omit.js";
|
|
19
|
-
var Yt = Object.defineProperty, Zt = (
|
|
20
|
-
function w(
|
|
21
|
-
_t(
|
|
22
|
-
const t = te(
|
|
23
|
-
return
|
|
26
|
+
var Yt = Object.defineProperty, Zt = (r, e, t) => e in r ? Yt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, I = (r, e, t) => Zt(r, typeof e != "symbol" ? e + "" : e, t);
|
|
27
|
+
function w(r, e) {
|
|
28
|
+
_t(r) && (r = "100%");
|
|
29
|
+
const t = te(r);
|
|
30
|
+
return r = e === 360 ? r : Math.min(e, Math.max(0, parseFloat(r))), t && (r = parseInt(String(r * e), 10) / 100), Math.abs(r - e) < 1e-6 ? 1 : (e === 360 ? r = (r < 0 ? r % e + e : r % e) / parseFloat(String(e)) : r = r % e / parseFloat(String(e)), r);
|
|
24
31
|
}
|
|
25
|
-
function U(
|
|
26
|
-
return Math.min(1, Math.max(0,
|
|
32
|
+
function U(r) {
|
|
33
|
+
return Math.min(1, Math.max(0, r));
|
|
27
34
|
}
|
|
28
|
-
function _t(
|
|
29
|
-
return typeof
|
|
35
|
+
function _t(r) {
|
|
36
|
+
return typeof r == "string" && r.indexOf(".") !== -1 && parseFloat(r) === 1;
|
|
30
37
|
}
|
|
31
|
-
function te(
|
|
32
|
-
return typeof
|
|
38
|
+
function te(r) {
|
|
39
|
+
return typeof r == "string" && r.indexOf("%") !== -1;
|
|
33
40
|
}
|
|
34
|
-
function Mt(
|
|
35
|
-
return
|
|
41
|
+
function Mt(r) {
|
|
42
|
+
return r = parseFloat(r), (isNaN(r) || r < 0 || r > 1) && (r = 1), r;
|
|
36
43
|
}
|
|
37
|
-
function W(
|
|
38
|
-
return Number(
|
|
44
|
+
function W(r) {
|
|
45
|
+
return Number(r) <= 1 ? `${Number(r) * 100}%` : r;
|
|
39
46
|
}
|
|
40
|
-
function P(
|
|
41
|
-
return
|
|
47
|
+
function P(r) {
|
|
48
|
+
return r.length === 1 ? "0" + r : String(r);
|
|
42
49
|
}
|
|
43
|
-
function ee(
|
|
50
|
+
function ee(r, e, t) {
|
|
44
51
|
return {
|
|
45
|
-
r: w(
|
|
52
|
+
r: w(r, 255) * 255,
|
|
46
53
|
g: w(e, 255) * 255,
|
|
47
54
|
b: w(t, 255) * 255
|
|
48
55
|
};
|
|
49
56
|
}
|
|
50
|
-
function ot(
|
|
51
|
-
|
|
52
|
-
const
|
|
57
|
+
function ot(r, e, t) {
|
|
58
|
+
r = w(r, 255), e = w(e, 255), t = w(t, 255);
|
|
59
|
+
const n = Math.max(r, e, t), s = Math.min(r, e, t);
|
|
53
60
|
let i = 0, o = 0;
|
|
54
|
-
const a = (
|
|
55
|
-
if (
|
|
61
|
+
const a = (n + s) / 2;
|
|
62
|
+
if (n === s)
|
|
56
63
|
o = 0, i = 0;
|
|
57
64
|
else {
|
|
58
|
-
const h =
|
|
59
|
-
switch (o = a > 0.5 ? h / (2 -
|
|
60
|
-
case
|
|
65
|
+
const h = n - s;
|
|
66
|
+
switch (o = a > 0.5 ? h / (2 - n - s) : h / (n + s), n) {
|
|
67
|
+
case r:
|
|
61
68
|
i = (e - t) / h + (e < t ? 6 : 0);
|
|
62
69
|
break;
|
|
63
70
|
case e:
|
|
64
|
-
i = (t -
|
|
71
|
+
i = (t - r) / h + 2;
|
|
65
72
|
break;
|
|
66
73
|
case t:
|
|
67
|
-
i = (
|
|
74
|
+
i = (r - e) / h + 4;
|
|
68
75
|
break;
|
|
69
76
|
}
|
|
70
77
|
i /= 6;
|
|
71
78
|
}
|
|
72
79
|
return { h: i, s: o, l: a };
|
|
73
80
|
}
|
|
74
|
-
function Q(
|
|
75
|
-
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ?
|
|
81
|
+
function Q(r, e, t) {
|
|
82
|
+
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? r + (e - r) * (6 * t) : t < 1 / 2 ? e : t < 2 / 3 ? r + (e - r) * (2 / 3 - t) * 6 : r;
|
|
76
83
|
}
|
|
77
|
-
function
|
|
78
|
-
let
|
|
79
|
-
if (
|
|
80
|
-
s = t, i = t,
|
|
84
|
+
function re(r, e, t) {
|
|
85
|
+
let n, s, i;
|
|
86
|
+
if (r = w(r, 360), e = w(e, 100), t = w(t, 100), e === 0)
|
|
87
|
+
s = t, i = t, n = t;
|
|
81
88
|
else {
|
|
82
89
|
const o = t < 0.5 ? t * (1 + e) : t + e - t * e, a = 2 * t - o;
|
|
83
|
-
|
|
90
|
+
n = Q(a, o, r + 1 / 3), s = Q(a, o, r), i = Q(a, o, r - 1 / 3);
|
|
84
91
|
}
|
|
85
|
-
return { r:
|
|
92
|
+
return { r: n * 255, g: s * 255, b: i * 255 };
|
|
86
93
|
}
|
|
87
|
-
function X(
|
|
88
|
-
|
|
89
|
-
const
|
|
94
|
+
function X(r, e, t) {
|
|
95
|
+
r = w(r, 255), e = w(e, 255), t = w(t, 255);
|
|
96
|
+
const n = Math.max(r, e, t), s = Math.min(r, e, t);
|
|
90
97
|
let i = 0;
|
|
91
|
-
const o =
|
|
92
|
-
if (
|
|
98
|
+
const o = n, a = n - s, h = n === 0 ? 0 : a / n;
|
|
99
|
+
if (n === s)
|
|
93
100
|
i = 0;
|
|
94
101
|
else {
|
|
95
|
-
switch (
|
|
96
|
-
case
|
|
102
|
+
switch (n) {
|
|
103
|
+
case r:
|
|
97
104
|
i = (e - t) / a + (e < t ? 6 : 0);
|
|
98
105
|
break;
|
|
99
106
|
case e:
|
|
100
|
-
i = (t -
|
|
107
|
+
i = (t - r) / a + 2;
|
|
101
108
|
break;
|
|
102
109
|
case t:
|
|
103
|
-
i = (
|
|
110
|
+
i = (r - e) / a + 4;
|
|
104
111
|
break;
|
|
105
112
|
}
|
|
106
113
|
i /= 6;
|
|
107
114
|
}
|
|
108
115
|
return { h: i, s: h, v: o };
|
|
109
116
|
}
|
|
110
|
-
function
|
|
111
|
-
|
|
112
|
-
const
|
|
117
|
+
function ne(r, e, t) {
|
|
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), h = n % 6, l = [t, o, i, i, a, t][h], c = [a, t, t, o, i, i][h], u = [i, i, a, t, t, o][h];
|
|
113
120
|
return { r: l * 255, g: c * 255, b: u * 255 };
|
|
114
121
|
}
|
|
115
|
-
function at(
|
|
122
|
+
function at(r, e, t, n) {
|
|
116
123
|
const s = [
|
|
117
|
-
P(Math.round(
|
|
124
|
+
P(Math.round(r).toString(16)),
|
|
118
125
|
P(Math.round(e).toString(16)),
|
|
119
126
|
P(Math.round(t).toString(16))
|
|
120
127
|
];
|
|
121
|
-
return
|
|
128
|
+
return n && s[0].startsWith(s[0].charAt(1)) && s[1].startsWith(s[1].charAt(1)) && s[2].startsWith(s[2].charAt(1)) ? s[0].charAt(0) + s[1].charAt(0) + s[2].charAt(0) : s.join("");
|
|
122
129
|
}
|
|
123
|
-
function se(
|
|
130
|
+
function se(r, e, t, n, s) {
|
|
124
131
|
const i = [
|
|
125
|
-
P(Math.round(
|
|
132
|
+
P(Math.round(r).toString(16)),
|
|
126
133
|
P(Math.round(e).toString(16)),
|
|
127
134
|
P(Math.round(t).toString(16)),
|
|
128
|
-
P(kt(
|
|
135
|
+
P(kt(n))
|
|
129
136
|
];
|
|
130
137
|
return s && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) && i[3].startsWith(i[3].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) + i[3].charAt(0) : i.join("");
|
|
131
138
|
}
|
|
132
|
-
function
|
|
139
|
+
function Ge(r, e, t, n) {
|
|
133
140
|
return [
|
|
134
|
-
P(kt(
|
|
135
|
-
P(Math.round(
|
|
141
|
+
P(kt(n)),
|
|
142
|
+
P(Math.round(r).toString(16)),
|
|
136
143
|
P(Math.round(e).toString(16)),
|
|
137
144
|
P(Math.round(t).toString(16))
|
|
138
145
|
].join("");
|
|
139
146
|
}
|
|
140
|
-
function ie(
|
|
141
|
-
const s =
|
|
147
|
+
function ie(r, e, t, n) {
|
|
148
|
+
const s = r / 100, i = e / 100, o = t / 100, a = n / 100, h = 255 * (1 - s) * (1 - a), l = 255 * (1 - i) * (1 - a), c = 255 * (1 - o) * (1 - a);
|
|
142
149
|
return { r: h, g: l, b: c };
|
|
143
150
|
}
|
|
144
|
-
function ct(
|
|
145
|
-
let
|
|
146
|
-
return o === 1 ? (
|
|
147
|
-
c: Math.round(
|
|
151
|
+
function ct(r, e, t) {
|
|
152
|
+
let n = 1 - r / 255, s = 1 - e / 255, i = 1 - t / 255, o = Math.min(n, s, i);
|
|
153
|
+
return o === 1 ? (n = 0, s = 0, i = 0) : (n = (n - o) / (1 - o) * 100, s = (s - o) / (1 - o) * 100, i = (i - o) / (1 - o) * 100), o *= 100, {
|
|
154
|
+
c: Math.round(n),
|
|
148
155
|
m: Math.round(s),
|
|
149
156
|
y: Math.round(i),
|
|
150
157
|
k: Math.round(o)
|
|
151
158
|
};
|
|
152
159
|
}
|
|
153
|
-
function kt(
|
|
154
|
-
return Math.round(parseFloat(
|
|
160
|
+
function kt(r) {
|
|
161
|
+
return Math.round(parseFloat(r) * 255).toString(16);
|
|
155
162
|
}
|
|
156
|
-
function lt(
|
|
157
|
-
return R(
|
|
163
|
+
function lt(r) {
|
|
164
|
+
return R(r) / 255;
|
|
158
165
|
}
|
|
159
|
-
function R(
|
|
160
|
-
return parseInt(
|
|
166
|
+
function R(r) {
|
|
167
|
+
return parseInt(r, 16);
|
|
161
168
|
}
|
|
162
|
-
function oe(
|
|
169
|
+
function oe(r) {
|
|
163
170
|
return {
|
|
164
|
-
r:
|
|
165
|
-
g: (
|
|
166
|
-
b:
|
|
171
|
+
r: r >> 16,
|
|
172
|
+
g: (r & 65280) >> 8,
|
|
173
|
+
b: r & 255
|
|
167
174
|
};
|
|
168
175
|
}
|
|
169
176
|
const tt = {
|
|
@@ -316,11 +323,11 @@ const tt = {
|
|
|
316
323
|
yellow: "#ffff00",
|
|
317
324
|
yellowgreen: "#9acd32"
|
|
318
325
|
};
|
|
319
|
-
function ae(
|
|
320
|
-
let e = { r: 0, g: 0, b: 0 }, t = 1,
|
|
321
|
-
return typeof
|
|
326
|
+
function ae(r) {
|
|
327
|
+
let e = { r: 0, g: 0, b: 0 }, t = 1, n = null, s = null, i = null, o = !1, a = !1;
|
|
328
|
+
return typeof r == "string" && (r = he(r)), typeof r == "object" && (k(r.r) && k(r.g) && k(r.b) ? (e = ee(r.r, r.g, r.b), o = !0, a = String(r.r).substr(-1) === "%" ? "prgb" : "rgb") : k(r.h) && k(r.s) && k(r.v) ? (n = W(r.s), s = W(r.v), e = ne(r.h, n, s), o = !0, a = "hsv") : k(r.h) && k(r.s) && k(r.l) ? (n = W(r.s), i = W(r.l), e = re(r.h, n, i), o = !0, a = "hsl") : k(r.c) && k(r.m) && k(r.y) && k(r.k) && (e = ie(r.c, r.m, r.y, r.k), o = !0, a = "cmyk"), Object.prototype.hasOwnProperty.call(r, "a") && (t = r.a)), t = Mt(t), {
|
|
322
329
|
ok: o,
|
|
323
|
-
format:
|
|
330
|
+
format: r.format || a,
|
|
324
331
|
r: Math.min(255, Math.max(e.r, 0)),
|
|
325
332
|
g: Math.min(255, Math.max(e.g, 0)),
|
|
326
333
|
b: Math.min(255, Math.max(e.b, 0)),
|
|
@@ -344,54 +351,54 @@ const ce = "[-\\+]?\\d+%?", le = "[-\\+]?\\d*\\.\\d+%?", H = "(?:" + le + ")|(?:
|
|
|
344
351
|
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
345
352
|
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
346
353
|
};
|
|
347
|
-
function he(
|
|
348
|
-
if (
|
|
354
|
+
function he(r) {
|
|
355
|
+
if (r = r.trim().toLowerCase(), r.length === 0)
|
|
349
356
|
return !1;
|
|
350
357
|
let e = !1;
|
|
351
|
-
if (tt[
|
|
352
|
-
|
|
353
|
-
else if (
|
|
358
|
+
if (tt[r])
|
|
359
|
+
r = tt[r], e = !0;
|
|
360
|
+
else if (r === "transparent")
|
|
354
361
|
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
355
|
-
let t = E.rgb.exec(
|
|
356
|
-
return t ? { r: t[1], g: t[2], b: t[3] } : (t = E.rgba.exec(
|
|
362
|
+
let t = E.rgb.exec(r);
|
|
363
|
+
return t ? { r: t[1], g: t[2], b: t[3] } : (t = E.rgba.exec(r), t ? { r: t[1], g: t[2], b: t[3], a: t[4] } : (t = E.hsl.exec(r), t ? { h: t[1], s: t[2], l: t[3] } : (t = E.hsla.exec(r), t ? { h: t[1], s: t[2], l: t[3], a: t[4] } : (t = E.hsv.exec(r), t ? { h: t[1], s: t[2], v: t[3] } : (t = E.hsva.exec(r), t ? { h: t[1], s: t[2], v: t[3], a: t[4] } : (t = E.cmyk.exec(r), t ? {
|
|
357
364
|
c: t[1],
|
|
358
365
|
m: t[2],
|
|
359
366
|
y: t[3],
|
|
360
367
|
k: t[4]
|
|
361
|
-
} : (t = E.hex8.exec(
|
|
368
|
+
} : (t = E.hex8.exec(r), t ? {
|
|
362
369
|
r: R(t[1]),
|
|
363
370
|
g: R(t[2]),
|
|
364
371
|
b: R(t[3]),
|
|
365
372
|
a: lt(t[4]),
|
|
366
373
|
format: e ? "name" : "hex8"
|
|
367
|
-
} : (t = E.hex6.exec(
|
|
374
|
+
} : (t = E.hex6.exec(r), t ? {
|
|
368
375
|
r: R(t[1]),
|
|
369
376
|
g: R(t[2]),
|
|
370
377
|
b: R(t[3]),
|
|
371
378
|
format: e ? "name" : "hex"
|
|
372
|
-
} : (t = E.hex4.exec(
|
|
379
|
+
} : (t = E.hex4.exec(r), t ? {
|
|
373
380
|
r: R(t[1] + t[1]),
|
|
374
381
|
g: R(t[2] + t[2]),
|
|
375
382
|
b: R(t[3] + t[3]),
|
|
376
383
|
a: lt(t[4] + t[4]),
|
|
377
384
|
format: e ? "name" : "hex8"
|
|
378
|
-
} : (t = E.hex3.exec(
|
|
385
|
+
} : (t = E.hex3.exec(r), t ? {
|
|
379
386
|
r: R(t[1] + t[1]),
|
|
380
387
|
g: R(t[2] + t[2]),
|
|
381
388
|
b: R(t[3] + t[3]),
|
|
382
389
|
format: e ? "name" : "hex"
|
|
383
390
|
} : !1))))))))));
|
|
384
391
|
}
|
|
385
|
-
function k(
|
|
386
|
-
return typeof
|
|
392
|
+
function k(r) {
|
|
393
|
+
return typeof r == "number" ? !Number.isNaN(r) : E.CSS_UNIT.test(r);
|
|
387
394
|
}
|
|
388
395
|
class C {
|
|
389
396
|
constructor(e = "", t = {}) {
|
|
390
397
|
if (I(this, "r"), I(this, "g"), I(this, "b"), I(this, "a"), I(this, "format"), I(this, "originalInput"), I(this, "isValid"), I(this, "gradientType"), I(this, "roundA"), e instanceof C)
|
|
391
398
|
return e;
|
|
392
399
|
typeof e == "number" && (e = oe(e)), this.originalInput = e;
|
|
393
|
-
const
|
|
394
|
-
this.originalInput = e, this.r =
|
|
400
|
+
const n = ae(e);
|
|
401
|
+
this.originalInput = e, this.r = n.r, this.g = n.g, this.b = n.b, this.a = n.a, this.roundA = Math.round(100 * this.a) / 100, this.format = t.format ?? n.format, this.gradientType = t.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = n.ok;
|
|
395
402
|
}
|
|
396
403
|
get ok() {
|
|
397
404
|
return this.isValid;
|
|
@@ -414,9 +421,9 @@ class C {
|
|
|
414
421
|
*/
|
|
415
422
|
getLuminance() {
|
|
416
423
|
const e = this.toRgb();
|
|
417
|
-
let t,
|
|
424
|
+
let t, n, s;
|
|
418
425
|
const i = e.r / 255, o = e.g / 255, a = e.b / 255;
|
|
419
|
-
return i <= 0.03928 ? t = i / 12.92 : t = Math.pow((i + 0.055) / 1.055, 2.4), o <= 0.03928 ?
|
|
426
|
+
return i <= 0.03928 ? t = i / 12.92 : t = Math.pow((i + 0.055) / 1.055, 2.4), o <= 0.03928 ? n = o / 12.92 : n = Math.pow((o + 0.055) / 1.055, 2.4), a <= 0.03928 ? s = a / 12.92 : s = Math.pow((a + 0.055) / 1.055, 2.4), 0.2126 * t + 0.7152 * n + 0.0722 * s;
|
|
420
427
|
}
|
|
421
428
|
/**
|
|
422
429
|
* Returns the alpha value of a color, from 0-1.
|
|
@@ -455,8 +462,8 @@ class C {
|
|
|
455
462
|
* "hsva(xxx, xxx, xxx, xx)".
|
|
456
463
|
*/
|
|
457
464
|
toHsvString() {
|
|
458
|
-
const e = X(this.r, this.g, this.b), t = Math.round(e.h * 360),
|
|
459
|
-
return this.a === 1 ? `hsv(${t}, ${
|
|
465
|
+
const e = X(this.r, this.g, this.b), t = Math.round(e.h * 360), n = Math.round(e.s * 100), s = Math.round(e.v * 100);
|
|
466
|
+
return this.a === 1 ? `hsv(${t}, ${n}%, ${s}%)` : `hsva(${t}, ${n}%, ${s}%, ${this.roundA})`;
|
|
460
467
|
}
|
|
461
468
|
/**
|
|
462
469
|
* Returns the object as a HSLA object.
|
|
@@ -470,8 +477,8 @@ class C {
|
|
|
470
477
|
* "hsla(xxx, xxx, xxx, xx)".
|
|
471
478
|
*/
|
|
472
479
|
toHslString() {
|
|
473
|
-
const e = ot(this.r, this.g, this.b), t = Math.round(e.h * 360),
|
|
474
|
-
return this.a === 1 ? `hsl(${t}, ${
|
|
480
|
+
const e = ot(this.r, this.g, this.b), t = Math.round(e.h * 360), n = Math.round(e.s * 100), s = Math.round(e.l * 100);
|
|
481
|
+
return this.a === 1 ? `hsl(${t}, ${n}%, ${s}%)` : `hsla(${t}, ${n}%, ${s}%, ${this.roundA})`;
|
|
475
482
|
}
|
|
476
483
|
/**
|
|
477
484
|
* Returns the hex value of the color.
|
|
@@ -532,8 +539,8 @@ class C {
|
|
|
532
539
|
* "RGBA(xxx, xxx, xxx, xx)".
|
|
533
540
|
*/
|
|
534
541
|
toRgbString() {
|
|
535
|
-
const e = Math.round(this.r), t = Math.round(this.g),
|
|
536
|
-
return this.a === 1 ? `rgb(${e}, ${t}, ${
|
|
542
|
+
const e = Math.round(this.r), t = Math.round(this.g), n = Math.round(this.b);
|
|
543
|
+
return this.a === 1 ? `rgb(${e}, ${t}, ${n})` : `rgba(${e}, ${t}, ${n}, ${this.roundA})`;
|
|
537
544
|
}
|
|
538
545
|
/**
|
|
539
546
|
* Returns the object as a RGBA object.
|
|
@@ -560,8 +567,8 @@ class C {
|
|
|
560
567
|
};
|
|
561
568
|
}
|
|
562
569
|
toCmykString() {
|
|
563
|
-
const { c: e, m: t, y:
|
|
564
|
-
return `cmyk(${e}, ${t}, ${
|
|
570
|
+
const { c: e, m: t, y: n, k: s } = ct(this.r, this.g, this.b);
|
|
571
|
+
return `cmyk(${e}, ${t}, ${n}, ${s})`;
|
|
565
572
|
}
|
|
566
573
|
/**
|
|
567
574
|
* The 'real' name of the color -if there is one.
|
|
@@ -572,17 +579,17 @@ class C {
|
|
|
572
579
|
if (this.a < 1)
|
|
573
580
|
return !1;
|
|
574
581
|
const e = `#${at(this.r, this.g, this.b, !1)}`;
|
|
575
|
-
for (const [t,
|
|
576
|
-
if (e ===
|
|
582
|
+
for (const [t, n] of Object.entries(tt))
|
|
583
|
+
if (e === n)
|
|
577
584
|
return t;
|
|
578
585
|
return !1;
|
|
579
586
|
}
|
|
580
587
|
toString(e) {
|
|
581
588
|
const t = !!e;
|
|
582
589
|
e = e ?? this.format;
|
|
583
|
-
let
|
|
590
|
+
let n = !1;
|
|
584
591
|
const s = this.a < 1 && this.a >= 0;
|
|
585
|
-
return !t && s && (e.startsWith("hex") || e === "name") ? e === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (e === "rgb" && (
|
|
592
|
+
return !t && s && (e.startsWith("hex") || e === "name") ? e === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (e === "rgb" && (n = this.toRgbString()), e === "prgb" && (n = this.toPercentageRgbString()), (e === "hex" || e === "hex6") && (n = this.toHexString()), e === "hex3" && (n = this.toHexString(!0)), e === "hex4" && (n = this.toHex8String(!0)), e === "hex8" && (n = this.toHex8String()), e === "name" && (n = this.toName()), e === "hsl" && (n = this.toHslString()), e === "hsv" && (n = this.toHsvString()), e === "cmyk" && (n = this.toCmykString()), n || this.toHexString());
|
|
586
593
|
}
|
|
587
594
|
toNumber() {
|
|
588
595
|
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
|
|
@@ -669,26 +676,26 @@ class C {
|
|
|
669
676
|
* Values outside of this range will be wrapped into this range.
|
|
670
677
|
*/
|
|
671
678
|
spin(e) {
|
|
672
|
-
const t = this.toHsl(),
|
|
673
|
-
return t.h =
|
|
679
|
+
const t = this.toHsl(), n = (t.h + e) % 360;
|
|
680
|
+
return t.h = n < 0 ? 360 + n : n, new C(t);
|
|
674
681
|
}
|
|
675
682
|
/**
|
|
676
683
|
* Mix the current color a given amount with another color, from 0 to 100.
|
|
677
684
|
* 0 means no mixing (return current color).
|
|
678
685
|
*/
|
|
679
686
|
mix(e, t = 50) {
|
|
680
|
-
const
|
|
681
|
-
r: (s.r -
|
|
682
|
-
g: (s.g -
|
|
683
|
-
b: (s.b -
|
|
684
|
-
a: (s.a -
|
|
687
|
+
const n = this.toRgb(), s = new C(e).toRgb(), i = t / 100, o = {
|
|
688
|
+
r: (s.r - n.r) * i + n.r,
|
|
689
|
+
g: (s.g - n.g) * i + n.g,
|
|
690
|
+
b: (s.b - n.b) * i + n.b,
|
|
691
|
+
a: (s.a - n.a) * i + n.a
|
|
685
692
|
};
|
|
686
693
|
return new C(o);
|
|
687
694
|
}
|
|
688
695
|
analogous(e = 6, t = 30) {
|
|
689
|
-
const
|
|
690
|
-
for (
|
|
691
|
-
|
|
696
|
+
const n = this.toHsl(), s = 360 / t, i = [this];
|
|
697
|
+
for (n.h = (n.h - (s * e >> 1) + 720) % 360; --e; )
|
|
698
|
+
n.h = (n.h + s) % 360, i.push(new C(n));
|
|
692
699
|
return i;
|
|
693
700
|
}
|
|
694
701
|
/**
|
|
@@ -699,11 +706,11 @@ class C {
|
|
|
699
706
|
return e.h = (e.h + 180) % 360, new C(e);
|
|
700
707
|
}
|
|
701
708
|
monochromatic(e = 6) {
|
|
702
|
-
const t = this.toHsv(), { h:
|
|
709
|
+
const t = this.toHsv(), { h: n } = t, { s } = t;
|
|
703
710
|
let { v: i } = t;
|
|
704
711
|
const o = [], a = 1 / e;
|
|
705
712
|
for (; e--; )
|
|
706
|
-
o.push(new C({ h:
|
|
713
|
+
o.push(new C({ h: n, s, v: i })), i = (i + a) % 1;
|
|
707
714
|
return o;
|
|
708
715
|
}
|
|
709
716
|
splitcomplement() {
|
|
@@ -718,11 +725,11 @@ class C {
|
|
|
718
725
|
* Compute how the color would appear on a background
|
|
719
726
|
*/
|
|
720
727
|
onBackground(e) {
|
|
721
|
-
const t = this.toRgb(),
|
|
728
|
+
const t = this.toRgb(), n = new C(e).toRgb(), s = t.a + n.a * (1 - t.a);
|
|
722
729
|
return new C({
|
|
723
|
-
r: (t.r * t.a +
|
|
724
|
-
g: (t.g * t.a +
|
|
725
|
-
b: (t.b * t.a +
|
|
730
|
+
r: (t.r * t.a + n.r * n.a * (1 - t.a)) / s,
|
|
731
|
+
g: (t.g * t.a + n.g * n.a * (1 - t.a)) / s,
|
|
732
|
+
b: (t.b * t.a + n.b * n.a * (1 - t.a)) / s,
|
|
726
733
|
a: s
|
|
727
734
|
});
|
|
728
735
|
}
|
|
@@ -743,10 +750,10 @@ class C {
|
|
|
743
750
|
* monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...
|
|
744
751
|
*/
|
|
745
752
|
polyad(e) {
|
|
746
|
-
const t = this.toHsl(), { h:
|
|
753
|
+
const t = this.toHsl(), { h: n } = t, s = [this], i = 360 / e;
|
|
747
754
|
for (let o = 1; o < e; o++)
|
|
748
755
|
s.push(
|
|
749
|
-
new C({ h: (
|
|
756
|
+
new C({ h: (n + o * i) % 360, s: t.s, l: t.l })
|
|
750
757
|
);
|
|
751
758
|
return s;
|
|
752
759
|
}
|
|
@@ -758,26 +765,26 @@ class C {
|
|
|
758
765
|
return this.format === "cmyk" || t.format === "cmyk" ? this.toCmykString() === t.toCmykString() : this.toRgbString() === t.toRgbString();
|
|
759
766
|
}
|
|
760
767
|
}
|
|
761
|
-
function fe(
|
|
768
|
+
function fe(r, e) {
|
|
762
769
|
const {
|
|
763
770
|
getPrefixCls: t,
|
|
764
|
-
locale:
|
|
771
|
+
locale: n,
|
|
765
772
|
componentConfig: s
|
|
766
|
-
} =
|
|
767
|
-
|
|
773
|
+
} = nt(T), i = Ct(
|
|
774
|
+
r,
|
|
768
775
|
{},
|
|
769
776
|
s == null ? void 0 : s.Empty
|
|
770
|
-
), { style: o, className: a, description: h, icon: l, imgSrc: c, ...u } = i, m = t("empty"),
|
|
771
|
-
return /* @__PURE__ */ d("div", { ref: e, className:
|
|
772
|
-
/* @__PURE__ */ d("div", { className: `${m}-image`, children: c ? /* @__PURE__ */ d("img", { alt: f, src: c }) : l || /* @__PURE__ */ d(
|
|
773
|
-
/* @__PURE__ */ d("div", { className: `${m}-description`, children: h ||
|
|
777
|
+
), { style: o, className: a, description: h, icon: l, imgSrc: c, ...u } = i, m = t("empty"), b = j(m, a), p = n.Empty.noData, f = typeof h == "string" ? h : "empty";
|
|
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: f, src: c }) : l || /* @__PURE__ */ d(Gt, {}) }),
|
|
780
|
+
/* @__PURE__ */ d("div", { className: `${m}-description`, children: h || p })
|
|
774
781
|
] }) });
|
|
775
782
|
}
|
|
776
|
-
const St =
|
|
783
|
+
const St = bt(fe);
|
|
777
784
|
St.displayName = "Empty";
|
|
778
785
|
const de = G.memo(St);
|
|
779
|
-
function ue(
|
|
780
|
-
switch (
|
|
786
|
+
function ue(r) {
|
|
787
|
+
switch (r) {
|
|
781
788
|
default:
|
|
782
789
|
return /* @__PURE__ */ d(de, {});
|
|
783
790
|
}
|
|
@@ -788,19 +795,19 @@ const Rt = {
|
|
|
788
795
|
getPopupContainer: () => document.body,
|
|
789
796
|
size: "default",
|
|
790
797
|
renderEmpty: ue
|
|
791
|
-
},
|
|
792
|
-
getPrefixCls: (
|
|
798
|
+
}, T = Tt({
|
|
799
|
+
getPrefixCls: (r, e) => `${e || "pqb"}-${r}`,
|
|
793
800
|
...Rt
|
|
794
801
|
});
|
|
795
|
-
function ge(
|
|
802
|
+
function ge(r, e) {
|
|
796
803
|
const {
|
|
797
804
|
children: t,
|
|
798
|
-
className:
|
|
805
|
+
className: n,
|
|
799
806
|
disabled: s,
|
|
800
807
|
prefix: i,
|
|
801
808
|
size: o = "default",
|
|
802
809
|
...a
|
|
803
|
-
} =
|
|
810
|
+
} = r, { getPrefixCls: h } = nt(T), l = h("icon-hover"), c = st();
|
|
804
811
|
return xt(e, () => ({
|
|
805
812
|
getRootDOMNode: () => c.current
|
|
806
813
|
})), /* @__PURE__ */ d(
|
|
@@ -814,9 +821,9 @@ function ge(n, e) {
|
|
|
814
821
|
[`${l}-size-${o}`]: o && o !== "default",
|
|
815
822
|
[`${l}-disabled`]: s
|
|
816
823
|
},
|
|
817
|
-
|
|
824
|
+
n
|
|
818
825
|
),
|
|
819
|
-
onClick:
|
|
826
|
+
onClick: r.onClick,
|
|
820
827
|
...a,
|
|
821
828
|
children: t
|
|
822
829
|
}
|
|
@@ -832,39 +839,39 @@ class J extends Ot {
|
|
|
832
839
|
g(this, "rootDOMRef");
|
|
833
840
|
g(this, "getRootDOMNode", () => this.rootDOMRef.current);
|
|
834
841
|
g(this, "startTimer", () => {
|
|
835
|
-
const { duration: t, onClose:
|
|
842
|
+
const { duration: t, onClose: n, id: s } = this.props;
|
|
836
843
|
t !== 0 && (this.timer = window.setTimeout(() => {
|
|
837
|
-
|
|
844
|
+
n == null || n(s), this.removeTimer();
|
|
838
845
|
}, t));
|
|
839
846
|
});
|
|
840
847
|
g(this, "removeTimer", () => {
|
|
841
848
|
this.timer && (window.clearTimeout(this.timer), this.timer = null);
|
|
842
849
|
});
|
|
843
850
|
g(this, "onClose", () => {
|
|
844
|
-
var t,
|
|
845
|
-
(
|
|
851
|
+
var t, n;
|
|
852
|
+
(n = (t = this.props).onClose) == null || n.call(t, this.props.id);
|
|
846
853
|
});
|
|
847
854
|
g(this, "renderIcon", () => {
|
|
848
|
-
const { showIcon: t, icon:
|
|
855
|
+
const { showIcon: t, icon: n, type: s, prefixCls: i, iconPrefix: o } = this.props;
|
|
849
856
|
let a;
|
|
850
|
-
if (
|
|
851
|
-
a =
|
|
857
|
+
if (n)
|
|
858
|
+
a = n;
|
|
852
859
|
else if (t) {
|
|
853
860
|
switch (s) {
|
|
854
861
|
case "info":
|
|
855
|
-
a = /* @__PURE__ */ d(
|
|
862
|
+
a = /* @__PURE__ */ d(Bt, {});
|
|
856
863
|
break;
|
|
857
864
|
case "success":
|
|
858
|
-
a = /* @__PURE__ */ d(
|
|
865
|
+
a = /* @__PURE__ */ d(Ut, {});
|
|
859
866
|
break;
|
|
860
867
|
case "error":
|
|
861
|
-
a = /* @__PURE__ */ d(
|
|
868
|
+
a = /* @__PURE__ */ d(Wt, {});
|
|
862
869
|
break;
|
|
863
870
|
case "warning":
|
|
864
|
-
a = /* @__PURE__ */ d(
|
|
871
|
+
a = /* @__PURE__ */ d(zt, {});
|
|
865
872
|
break;
|
|
866
873
|
case "loading":
|
|
867
|
-
a = /* @__PURE__ */ d(
|
|
874
|
+
a = /* @__PURE__ */ d(Vt, {});
|
|
868
875
|
break;
|
|
869
876
|
}
|
|
870
877
|
a = /* @__PURE__ */ d(
|
|
@@ -897,7 +904,7 @@ class J extends Ot {
|
|
|
897
904
|
render() {
|
|
898
905
|
const {
|
|
899
906
|
title: t,
|
|
900
|
-
content:
|
|
907
|
+
content: n,
|
|
901
908
|
showIcon: s,
|
|
902
909
|
className: i,
|
|
903
910
|
style: o,
|
|
@@ -907,8 +914,8 @@ class J extends Ot {
|
|
|
907
914
|
prefixCls: c,
|
|
908
915
|
closable: u,
|
|
909
916
|
noticeType: m,
|
|
910
|
-
iconPrefix:
|
|
911
|
-
rtl:
|
|
917
|
+
iconPrefix: b,
|
|
918
|
+
rtl: p,
|
|
912
919
|
closeIcon: f,
|
|
913
920
|
classPrefixCls: x
|
|
914
921
|
} = this.props, y = j(
|
|
@@ -916,7 +923,7 @@ class J extends Ot {
|
|
|
916
923
|
`${c}-${a}`,
|
|
917
924
|
{
|
|
918
925
|
[`${c}-closable`]: u,
|
|
919
|
-
[`${c}-rtl`]:
|
|
926
|
+
[`${c}-rtl`]: p
|
|
920
927
|
},
|
|
921
928
|
i
|
|
922
929
|
);
|
|
@@ -933,7 +940,7 @@ class J extends Ot {
|
|
|
933
940
|
ref: this.rootDOMRef,
|
|
934
941
|
children: /* @__PURE__ */ V("div", { className: y, style: o, role: "alert", children: [
|
|
935
942
|
v && this.renderIcon(),
|
|
936
|
-
/* @__PURE__ */ d("span", { className: `${c}-content`, children:
|
|
943
|
+
/* @__PURE__ */ d("span", { className: `${c}-content`, children: n }),
|
|
937
944
|
$ && (f !== void 0 ? /* @__PURE__ */ d(
|
|
938
945
|
"span",
|
|
939
946
|
{
|
|
@@ -964,7 +971,7 @@ class J extends Ot {
|
|
|
964
971
|
v && /* @__PURE__ */ d("div", { className: `${c}-left`, children: this.renderIcon() }),
|
|
965
972
|
/* @__PURE__ */ V("div", { className: `${c}-right`, children: [
|
|
966
973
|
t && /* @__PURE__ */ d("div", { className: `${c}-title`, children: t }),
|
|
967
|
-
/* @__PURE__ */ d("div", { className: `${c}-content`, children:
|
|
974
|
+
/* @__PURE__ */ d("div", { className: `${c}-content`, children: n }),
|
|
968
975
|
h && /* @__PURE__ */ d("div", { className: `${c}-btn-wrapper`, children: h })
|
|
969
976
|
] }),
|
|
970
977
|
$ && (f !== void 0 ? /* @__PURE__ */ d(
|
|
@@ -983,7 +990,7 @@ class J extends Ot {
|
|
|
983
990
|
children: /* @__PURE__ */ d(
|
|
984
991
|
_.Provider,
|
|
985
992
|
{
|
|
986
|
-
value:
|
|
993
|
+
value: b ? { prefixCls: b } : {},
|
|
987
994
|
children: /* @__PURE__ */ d(it, {})
|
|
988
995
|
}
|
|
989
996
|
)
|
|
@@ -999,9 +1006,9 @@ g(J, "defaultProps", {
|
|
|
999
1006
|
showIcon: !0,
|
|
1000
1007
|
noticeType: "message",
|
|
1001
1008
|
duration: 3e3
|
|
1002
|
-
}), g(J, "contextType",
|
|
1003
|
-
function me(
|
|
1004
|
-
const { maxCount: e, duration: t = 3e3, prefixCls:
|
|
1009
|
+
}), g(J, "contextType", T);
|
|
1010
|
+
function me(r = {}) {
|
|
1011
|
+
const { maxCount: e, duration: t = 3e3, prefixCls: n } = r, s = st(), i = /* @__PURE__ */ d(Ht, { ref: s }), o = {};
|
|
1005
1012
|
let a;
|
|
1006
1013
|
function h(c) {
|
|
1007
1014
|
let u, m;
|
|
@@ -1009,24 +1016,24 @@ function me(n = {}) {
|
|
|
1009
1016
|
const v = s.current.getContextConfig();
|
|
1010
1017
|
m = v.rtl, u = v.prefixCls;
|
|
1011
1018
|
}
|
|
1012
|
-
const
|
|
1019
|
+
const b = n || u, p = {
|
|
1013
1020
|
position: "top",
|
|
1014
1021
|
duration: t,
|
|
1015
1022
|
...c
|
|
1016
|
-
}, { position: f, transitionClassNames: x } =
|
|
1023
|
+
}, { position: f, transitionClassNames: x } = p;
|
|
1017
1024
|
let y;
|
|
1018
1025
|
if (o[f]) {
|
|
1019
1026
|
const v = o[f].state.notices;
|
|
1020
|
-
v.length >= e ? (y = v[0].id, v.shift(), o[f].add({ ...
|
|
1027
|
+
v.length >= e ? (y = v[0].id, v.shift(), o[f].add({ ...p, id: y })) : y = o[f].add(p);
|
|
1021
1028
|
} else
|
|
1022
1029
|
a = /* @__PURE__ */ d(
|
|
1023
1030
|
M,
|
|
1024
1031
|
{
|
|
1025
1032
|
transitionClassNames: x,
|
|
1026
1033
|
ref: (v) => {
|
|
1027
|
-
o[f] = v, o[f] && (y = o[f].add(
|
|
1034
|
+
o[f] = v, o[f] && (y = o[f].add(p));
|
|
1028
1035
|
},
|
|
1029
|
-
prefixCls:
|
|
1036
|
+
prefixCls: b,
|
|
1030
1037
|
rtl: m
|
|
1031
1038
|
}
|
|
1032
1039
|
), s.current.addInstance(a);
|
|
@@ -1045,7 +1052,7 @@ function me(n = {}) {
|
|
|
1045
1052
|
};
|
|
1046
1053
|
}), [l, i];
|
|
1047
1054
|
}
|
|
1048
|
-
const
|
|
1055
|
+
const pe = [
|
|
1049
1056
|
"info",
|
|
1050
1057
|
"success",
|
|
1051
1058
|
"error",
|
|
@@ -1054,24 +1061,24 @@ const be = [
|
|
|
1054
1061
|
"normal"
|
|
1055
1062
|
];
|
|
1056
1063
|
let A = {}, Nt, ft, Et, et, dt, ut;
|
|
1057
|
-
function At(
|
|
1064
|
+
function At(r) {
|
|
1058
1065
|
const e = {
|
|
1059
1066
|
position: "top",
|
|
1060
1067
|
duration: Et,
|
|
1061
|
-
...
|
|
1062
|
-
}, { position: t, transitionClassNames:
|
|
1068
|
+
...r
|
|
1069
|
+
}, { position: t, transitionClassNames: n, transitionTimeout: s } = e;
|
|
1063
1070
|
let i;
|
|
1064
1071
|
const { instance: o, pending: a } = A[t] || {};
|
|
1065
1072
|
if (o || a) {
|
|
1066
1073
|
const l = () => {
|
|
1067
|
-
const { instance: c } = A[t] || {}, u = c.state.notices, m = u.find((
|
|
1074
|
+
const { instance: c } = A[t] || {}, u = c.state.notices, m = u.find((p) => p.id === r.id), b = {
|
|
1068
1075
|
...e,
|
|
1069
1076
|
update: m
|
|
1070
1077
|
};
|
|
1071
1078
|
u.length >= Nt ? m ? c.add({
|
|
1072
|
-
...
|
|
1079
|
+
...b,
|
|
1073
1080
|
id: m.id
|
|
1074
|
-
}) : (u.shift(), c.add(
|
|
1081
|
+
}) : (u.shift(), c.add(b)) : i = c.add(b);
|
|
1075
1082
|
};
|
|
1076
1083
|
o ? l() : a != null && a.then && a.then(() => {
|
|
1077
1084
|
l(), A[t].pending = null;
|
|
@@ -1083,7 +1090,7 @@ function At(n) {
|
|
|
1083
1090
|
/* @__PURE__ */ d(
|
|
1084
1091
|
M,
|
|
1085
1092
|
{
|
|
1086
|
-
transitionClassNames:
|
|
1093
|
+
transitionClassNames: n,
|
|
1087
1094
|
transitionTimeout: s,
|
|
1088
1095
|
ref: (u) => {
|
|
1089
1096
|
A[t] || (A[t] = {}), A[t].instance = u, i = u.add(e), c(null);
|
|
@@ -1103,10 +1110,10 @@ class M extends wt {
|
|
|
1103
1110
|
constructor() {
|
|
1104
1111
|
super(...arguments);
|
|
1105
1112
|
g(this, "remove", (t) => {
|
|
1106
|
-
const
|
|
1107
|
-
|
|
1108
|
-
...
|
|
1109
|
-
style: { ...
|
|
1113
|
+
const n = this.state.notices.find((s) => s.id === t);
|
|
1114
|
+
n && this.update({
|
|
1115
|
+
...n,
|
|
1116
|
+
style: { ...n.style, opacity: 0 }
|
|
1110
1117
|
}), setTimeout(() => {
|
|
1111
1118
|
super.remove(t);
|
|
1112
1119
|
}, 100);
|
|
@@ -1115,21 +1122,21 @@ class M extends wt {
|
|
|
1115
1122
|
render() {
|
|
1116
1123
|
const {
|
|
1117
1124
|
transitionClassNames: t,
|
|
1118
|
-
transitionTimeout:
|
|
1125
|
+
transitionTimeout: n,
|
|
1119
1126
|
prefixCls: s,
|
|
1120
1127
|
rtl: i,
|
|
1121
1128
|
closable: o
|
|
1122
|
-
} = this.props, { notices: a, position: h } = this.state, l = s || ft, c = F(i) ? dt : i, u = F(o) ? ut : o, m = l ? `${l}-message` : "pqb-message",
|
|
1123
|
-
enter: O(
|
|
1124
|
-
exit: O(
|
|
1125
|
-
},
|
|
1129
|
+
} = this.props, { notices: a, position: h } = this.state, l = s || ft, c = F(i) ? dt : i, u = F(o) ? ut : o, m = l ? `${l}-message` : "pqb-message", b = {
|
|
1130
|
+
enter: O(n == null ? void 0 : n.enter) ? n == null ? void 0 : n.enter : 100,
|
|
1131
|
+
exit: O(n == null ? void 0 : n.exit) ? n == null ? void 0 : n.exit : 300
|
|
1132
|
+
}, p = j(
|
|
1126
1133
|
`${m}-wrapper`,
|
|
1127
1134
|
`${m}-wrapper-${h}`
|
|
1128
1135
|
);
|
|
1129
|
-
return /* @__PURE__ */ d("div", { className:
|
|
1136
|
+
return /* @__PURE__ */ d("div", { className: p, children: /* @__PURE__ */ d(yt, { component: null, children: a.map((f) => /* @__PURE__ */ d(
|
|
1130
1137
|
vt,
|
|
1131
1138
|
{
|
|
1132
|
-
timeout:
|
|
1139
|
+
timeout: b,
|
|
1133
1140
|
classNames: t || "fadeMessage",
|
|
1134
1141
|
onExit: (x) => {
|
|
1135
1142
|
x && (x.style.height = `${x.scrollHeight}px`);
|
|
@@ -1160,8 +1167,8 @@ class M extends wt {
|
|
|
1160
1167
|
}
|
|
1161
1168
|
}
|
|
1162
1169
|
g(M, "useMessage"), g(M, "success"), g(M, "info"), g(M, "warning"), g(M, "error"), g(M, "loading"), g(M, "normal"), g(M, "config", (t = {}) => {
|
|
1163
|
-
var
|
|
1164
|
-
O(t.maxCount) && (Nt = t.maxCount), t.prefixCls && (ft = t.prefixCls), O(t.duration) && (Et = t.duration), typeof t.rtl == "boolean" && (dt = t.rtl), typeof t.closable == "boolean" && (ut = t.closable), ((
|
|
1170
|
+
var n;
|
|
1171
|
+
O(t.maxCount) && (Nt = t.maxCount), t.prefixCls && (ft = t.prefixCls), O(t.duration) && (Et = t.duration), typeof t.rtl == "boolean" && (dt = t.rtl), typeof t.closable == "boolean" && (ut = t.closable), ((n = t.getContainer) == null ? void 0 : n.call(t)) !== et && (et = t.getContainer(), Object.values(A).forEach(
|
|
1165
1172
|
({ instance: s }) => s == null ? void 0 : s.clear()
|
|
1166
1173
|
), A = {});
|
|
1167
1174
|
}), g(M, "clear", () => {
|
|
@@ -1169,48 +1176,48 @@ g(M, "useMessage"), g(M, "success"), g(M, "info"), g(M, "warning"), g(M, "error"
|
|
|
1169
1176
|
t == null || t.clear();
|
|
1170
1177
|
});
|
|
1171
1178
|
}), g(M, "addInstance", At);
|
|
1172
|
-
|
|
1173
|
-
M[
|
|
1179
|
+
pe.forEach((r) => {
|
|
1180
|
+
M[r] = (e) => At({
|
|
1174
1181
|
...typeof e == "string" ? { content: e } : e,
|
|
1175
|
-
type:
|
|
1182
|
+
type: r
|
|
1176
1183
|
});
|
|
1177
1184
|
});
|
|
1178
1185
|
M.useMessage = me;
|
|
1179
1186
|
let Pt = {};
|
|
1180
|
-
function
|
|
1187
|
+
function be(r) {
|
|
1181
1188
|
Pt = {
|
|
1182
|
-
...
|
|
1189
|
+
...r
|
|
1183
1190
|
};
|
|
1184
1191
|
}
|
|
1185
|
-
function
|
|
1192
|
+
function Je() {
|
|
1186
1193
|
return Pt;
|
|
1187
1194
|
}
|
|
1188
|
-
let
|
|
1195
|
+
let rt = {
|
|
1189
1196
|
simple: !0
|
|
1190
1197
|
};
|
|
1191
|
-
const
|
|
1192
|
-
|
|
1193
|
-
...
|
|
1194
|
-
...
|
|
1198
|
+
const Ke = (r) => {
|
|
1199
|
+
rt = {
|
|
1200
|
+
...rt,
|
|
1201
|
+
...r
|
|
1195
1202
|
};
|
|
1196
|
-
},
|
|
1197
|
-
function xe(
|
|
1203
|
+
}, Qe = () => rt, Xe = [], Ye = [];
|
|
1204
|
+
function xe(r = {}) {
|
|
1198
1205
|
const {
|
|
1199
1206
|
maxCount: e,
|
|
1200
1207
|
duration: t = 3e3,
|
|
1201
|
-
prefixCls:
|
|
1208
|
+
prefixCls: n,
|
|
1202
1209
|
getContainer: s
|
|
1203
|
-
} =
|
|
1210
|
+
} = r, i = st(), o = /* @__PURE__ */ d(Ht, { ref: i }), a = {};
|
|
1204
1211
|
let h;
|
|
1205
1212
|
function l(u) {
|
|
1206
|
-
let m,
|
|
1213
|
+
let m, b;
|
|
1207
1214
|
if (i.current) {
|
|
1208
1215
|
const $ = i.current.getContextConfig();
|
|
1209
|
-
|
|
1216
|
+
b = $.rtl, m = $.prefixCls;
|
|
1210
1217
|
}
|
|
1211
|
-
const
|
|
1218
|
+
const p = n || m;
|
|
1212
1219
|
let f = u.position;
|
|
1213
|
-
F(u.position) && (f =
|
|
1220
|
+
F(u.position) && (f = b ? "topLeft" : "topRight");
|
|
1214
1221
|
const x = {
|
|
1215
1222
|
duration: t,
|
|
1216
1223
|
...u
|
|
@@ -1221,13 +1228,13 @@ function xe(n = {}) {
|
|
|
1221
1228
|
$.length >= e ? (y = $[0].id, $.shift(), a[f].add({ ...x, id: y })) : y = a[f].add(x);
|
|
1222
1229
|
} else
|
|
1223
1230
|
h = /* @__PURE__ */ d(
|
|
1224
|
-
|
|
1231
|
+
q,
|
|
1225
1232
|
{
|
|
1226
1233
|
ref: ($) => {
|
|
1227
1234
|
a[f] = $, a[f] && (y = a[f].add(x));
|
|
1228
1235
|
},
|
|
1229
|
-
prefixCls:
|
|
1230
|
-
rtl:
|
|
1236
|
+
prefixCls: p,
|
|
1237
|
+
rtl: b,
|
|
1231
1238
|
getContainer: s
|
|
1232
1239
|
}
|
|
1233
1240
|
), i.current.addInstance(h);
|
|
@@ -1242,33 +1249,33 @@ function xe(n = {}) {
|
|
|
1242
1249
|
}), [c, o];
|
|
1243
1250
|
}
|
|
1244
1251
|
const Ce = ["info", "success", "error", "warning", "normal"];
|
|
1245
|
-
let S = {}, gt, mt,
|
|
1252
|
+
let S = {}, gt, mt, pt, Z, B;
|
|
1246
1253
|
const N = class N extends wt {
|
|
1247
1254
|
constructor() {
|
|
1248
1255
|
super(...arguments);
|
|
1249
1256
|
g(this, "remove", (t) => {
|
|
1250
|
-
const
|
|
1251
|
-
|
|
1252
|
-
...
|
|
1253
|
-
style: { ...
|
|
1257
|
+
const n = this.state.notices.find((s) => s.id === t);
|
|
1258
|
+
n && this.update({
|
|
1259
|
+
...n,
|
|
1260
|
+
style: { ...n.style, opacity: 0 }
|
|
1254
1261
|
}), setTimeout(() => {
|
|
1255
1262
|
super.remove(t);
|
|
1256
1263
|
}, 200);
|
|
1257
1264
|
});
|
|
1258
1265
|
}
|
|
1259
1266
|
render() {
|
|
1260
|
-
const { notices: t } = this.state, { prefixCls:
|
|
1267
|
+
const { notices: t } = this.state, { prefixCls: n, rtl: s, getContainer: i } = this.props;
|
|
1261
1268
|
let o = this.state.position;
|
|
1262
1269
|
const a = F(s) ? B : s;
|
|
1263
1270
|
F(o) && (o = a ? "topLeft" : "topRight");
|
|
1264
|
-
const h =
|
|
1271
|
+
const h = n || mt, l = h ? `${h}-notification` : "pqb-notification";
|
|
1265
1272
|
let c;
|
|
1266
1273
|
o === "topLeft" || o === "bottomLeft" ? c = "slideNoticeLeft" : c = "slideNoticeRight";
|
|
1267
1274
|
const u = j(
|
|
1268
1275
|
`${l}-wrapper`,
|
|
1269
1276
|
`${l}-wrapper-${o}`,
|
|
1270
1277
|
{ [`${l}-wrapper-rtl`]: B }
|
|
1271
|
-
), m = i == null ? void 0 : i(),
|
|
1278
|
+
), m = i == null ? void 0 : i(), b = /* @__PURE__ */ d("div", { className: u, children: /* @__PURE__ */ d(yt, { component: null, children: t.map((p) => /* @__PURE__ */ d(
|
|
1272
1279
|
vt,
|
|
1273
1280
|
{
|
|
1274
1281
|
timeout: {
|
|
@@ -1284,12 +1291,12 @@ const N = class N extends wt {
|
|
|
1284
1291
|
},
|
|
1285
1292
|
onExited: (f) => {
|
|
1286
1293
|
var x;
|
|
1287
|
-
f && (f.style.height = 0, (x =
|
|
1294
|
+
f && (f.style.height = 0, (x = p.onClose) == null || x.call(p));
|
|
1288
1295
|
},
|
|
1289
1296
|
children: /* @__PURE__ */ d(
|
|
1290
1297
|
J,
|
|
1291
1298
|
{
|
|
1292
|
-
...
|
|
1299
|
+
...p,
|
|
1293
1300
|
onClose: this.remove,
|
|
1294
1301
|
prefixCls: l,
|
|
1295
1302
|
iconPrefix: h,
|
|
@@ -1299,14 +1306,14 @@ const N = class N extends wt {
|
|
|
1299
1306
|
}
|
|
1300
1307
|
)
|
|
1301
1308
|
},
|
|
1302
|
-
|
|
1309
|
+
p.id
|
|
1303
1310
|
)) }) });
|
|
1304
|
-
return m ? Qt(
|
|
1311
|
+
return m ? Qt(b, m) : b;
|
|
1305
1312
|
}
|
|
1306
1313
|
};
|
|
1307
1314
|
g(N, "useNotification"), g(N, "success"), g(N, "info"), g(N, "warning"), g(N, "error"), g(N, "normal"), g(N, "config", (t = {}) => {
|
|
1308
|
-
var
|
|
1309
|
-
O(t.maxCount) && (gt = t.maxCount), t.prefixCls && (mt = t.prefixCls), O(t.duration) && (
|
|
1315
|
+
var n;
|
|
1316
|
+
O(t.maxCount) && (gt = t.maxCount), t.prefixCls && (mt = t.prefixCls), O(t.duration) && (pt = t.duration), typeof t.rtl == "boolean" && (B = t.rtl), t.getContainer && ((n = t.getContainer) == null ? void 0 : n.call(t)) !== Z && (Z = t.getContainer(), Object.values(S).forEach(
|
|
1310
1317
|
({ instance: s }) => s == null ? void 0 : s.clear()
|
|
1311
1318
|
), S = {});
|
|
1312
1319
|
}), g(N, "clear", () => {
|
|
@@ -1314,19 +1321,19 @@ g(N, "useNotification"), g(N, "success"), g(N, "info"), g(N, "warning"), g(N, "e
|
|
|
1314
1321
|
t == null || t.clear();
|
|
1315
1322
|
});
|
|
1316
1323
|
}), g(N, "remove", (t) => {
|
|
1317
|
-
Object.values(S).forEach(({ instance:
|
|
1318
|
-
|
|
1324
|
+
Object.values(S).forEach(({ instance: n }) => {
|
|
1325
|
+
n == null || n.remove(t);
|
|
1319
1326
|
});
|
|
1320
1327
|
}), g(N, "addInstance", (t) => {
|
|
1321
|
-
let
|
|
1322
|
-
F(t.position) && (
|
|
1328
|
+
let n = t.position;
|
|
1329
|
+
F(t.position) && (n = B ? "topLeft" : "topRight");
|
|
1323
1330
|
const s = {
|
|
1324
|
-
duration:
|
|
1331
|
+
duration: pt,
|
|
1325
1332
|
...t
|
|
1326
|
-
}, { instance: i, pending: o } = S[
|
|
1333
|
+
}, { instance: i, pending: o } = S[n] || {};
|
|
1327
1334
|
if (i || o) {
|
|
1328
1335
|
const h = () => {
|
|
1329
|
-
const { instance: l } = S[
|
|
1336
|
+
const { instance: l } = S[n] || {}, c = l.state.notices, u = c.find((b) => b.id === t.id), m = {
|
|
1330
1337
|
...s,
|
|
1331
1338
|
update: u
|
|
1332
1339
|
};
|
|
@@ -1336,30 +1343,30 @@ g(N, "useNotification"), g(N, "success"), g(N, "info"), g(N, "warning"), g(N, "e
|
|
|
1336
1343
|
}) : (c.shift(), l.add(m)) : l.add({ ...m }), l;
|
|
1337
1344
|
};
|
|
1338
1345
|
return i ? h() : o != null && o.then && o.then(() => {
|
|
1339
|
-
h(), S[
|
|
1346
|
+
h(), S[n].pending = null;
|
|
1340
1347
|
}), i;
|
|
1341
1348
|
}
|
|
1342
1349
|
const a = document.createElement("div");
|
|
1343
|
-
return (Z || document.body).appendChild(a), S[
|
|
1350
|
+
return (Z || document.body).appendChild(a), S[n] = {}, S[n].pending = new Promise((h) => {
|
|
1344
1351
|
$t(
|
|
1345
1352
|
/* @__PURE__ */ d(
|
|
1346
1353
|
N,
|
|
1347
1354
|
{
|
|
1348
|
-
ref: (l) => (S[
|
|
1355
|
+
ref: (l) => (S[n] || (S[n] = {}), S[n].instance = l, l.add(s), h(null), l)
|
|
1349
1356
|
}
|
|
1350
1357
|
),
|
|
1351
1358
|
a
|
|
1352
1359
|
);
|
|
1353
|
-
}), S[
|
|
1360
|
+
}), S[n].instance;
|
|
1354
1361
|
});
|
|
1355
|
-
let
|
|
1356
|
-
Ce.forEach((
|
|
1357
|
-
|
|
1362
|
+
let q = N;
|
|
1363
|
+
Ce.forEach((r) => {
|
|
1364
|
+
q[r] = (e) => q.addInstance({
|
|
1358
1365
|
...e,
|
|
1359
|
-
type:
|
|
1366
|
+
type: r
|
|
1360
1367
|
});
|
|
1361
1368
|
});
|
|
1362
|
-
|
|
1369
|
+
q.useNotification = xe;
|
|
1363
1370
|
const ye = {
|
|
1364
1371
|
primaryColor: {
|
|
1365
1372
|
default: "--pqbblue-6",
|
|
@@ -1387,14 +1394,14 @@ const ye = {
|
|
|
1387
1394
|
active: "--red-7"
|
|
1388
1395
|
}
|
|
1389
1396
|
}, ve = Rt, we = {};
|
|
1390
|
-
function K(
|
|
1397
|
+
function K(r) {
|
|
1391
1398
|
const e = Ct(
|
|
1392
|
-
|
|
1399
|
+
r,
|
|
1393
1400
|
ve,
|
|
1394
1401
|
we
|
|
1395
1402
|
), {
|
|
1396
1403
|
theme: t,
|
|
1397
|
-
|
|
1404
|
+
appearance: n,
|
|
1398
1405
|
prefixCls: s,
|
|
1399
1406
|
children: i,
|
|
1400
1407
|
locale: o,
|
|
@@ -1403,36 +1410,38 @@ function K(n) {
|
|
|
1403
1410
|
effectGlobalModal: l = !0
|
|
1404
1411
|
} = e, c = window.document.body;
|
|
1405
1412
|
D(() => {
|
|
1406
|
-
|
|
1407
|
-
|
|
1413
|
+
Dt(t) && Object.entries(ye).forEach(([p, f], x, y) => {
|
|
1414
|
+
const $ = t == null ? void 0 : t[p];
|
|
1408
1415
|
if ($) {
|
|
1409
|
-
|
|
1410
|
-
c.style.setProperty(f.default, v.lighten(0).toRgbArrayString()), t != null && t[`${
|
|
1416
|
+
const v = new C($);
|
|
1417
|
+
c.style.setProperty(f.default, v.lighten(0).toRgbArrayString()), t != null && t[`${p}Hover`] || c.style.setProperty(f.hover, v.lighten(10).toRgbArrayString()), t != null && t[`${p}Active`] || c.style.setProperty(f.active, v.lighten(-10).toRgbArrayString());
|
|
1411
1418
|
}
|
|
1412
1419
|
});
|
|
1413
1420
|
}, [t]), D(() => {
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1421
|
+
if (n)
|
|
1422
|
+
return n === "dark" ? c.setAttribute("pqb-theme", "dark") : c.removeAttribute("pqb-theme"), () => {
|
|
1423
|
+
};
|
|
1424
|
+
}, [n]), D(() => {
|
|
1425
|
+
h && (M.config({ prefixCls: s, rtl: a }), q.config({ prefixCls: s, rtl: a }));
|
|
1417
1426
|
}, [s, a, h]);
|
|
1418
|
-
function u(
|
|
1419
|
-
return `${f || s}-${
|
|
1427
|
+
function u(p, f) {
|
|
1428
|
+
return `${f || s}-${p}`;
|
|
1420
1429
|
}
|
|
1421
1430
|
const m = {
|
|
1422
1431
|
...Xt(e, ["children"]),
|
|
1423
1432
|
getPrefixCls: u
|
|
1424
1433
|
};
|
|
1425
1434
|
D(() => {
|
|
1426
|
-
l &&
|
|
1435
|
+
l && be({ locale: o, prefixCls: s, rtl: a });
|
|
1427
1436
|
}, [o, s, a, l]);
|
|
1428
|
-
let
|
|
1429
|
-
return s && s !== "pqb" && (
|
|
1437
|
+
let b = i;
|
|
1438
|
+
return s && s !== "pqb" && (b = /* @__PURE__ */ d(_.Provider, { value: { prefixCls: s }, children: i })), /* @__PURE__ */ d(T.Provider, { value: m, children: b });
|
|
1430
1439
|
}
|
|
1431
|
-
K.ConfigContext =
|
|
1440
|
+
K.ConfigContext = T;
|
|
1432
1441
|
K.displayName = "ConfigProvider";
|
|
1433
|
-
const
|
|
1434
|
-
function It(
|
|
1435
|
-
const t =
|
|
1442
|
+
const Ze = T.Consumer;
|
|
1443
|
+
function It(r, e) {
|
|
1444
|
+
const t = nt(T), [n, s] = Lt([]);
|
|
1436
1445
|
function i(h) {
|
|
1437
1446
|
s((l) => [...l, h]);
|
|
1438
1447
|
}
|
|
@@ -1449,39 +1458,39 @@ function It(n, e) {
|
|
|
1449
1458
|
removeInstance: o,
|
|
1450
1459
|
getContextConfig: a
|
|
1451
1460
|
})), G.Children.map(
|
|
1452
|
-
|
|
1461
|
+
n,
|
|
1453
1462
|
(h, l) => G.cloneElement(h, { key: l })
|
|
1454
1463
|
);
|
|
1455
1464
|
}
|
|
1456
1465
|
It.displayName = "ContextHolderElement";
|
|
1457
|
-
const Ht =
|
|
1466
|
+
const Ht = bt(It);
|
|
1458
1467
|
export {
|
|
1459
1468
|
ot as $,
|
|
1460
1469
|
Ht as C,
|
|
1461
1470
|
de as E,
|
|
1462
1471
|
lt as F,
|
|
1463
|
-
|
|
1472
|
+
ne as G,
|
|
1464
1473
|
at as H,
|
|
1465
1474
|
ht as I,
|
|
1466
|
-
|
|
1475
|
+
Ge as J,
|
|
1467
1476
|
M,
|
|
1468
1477
|
kt as N,
|
|
1469
1478
|
ee as O,
|
|
1470
1479
|
se as T,
|
|
1471
1480
|
oe as U,
|
|
1472
|
-
|
|
1481
|
+
re as W,
|
|
1473
1482
|
K as a,
|
|
1474
|
-
|
|
1483
|
+
Ze as b,
|
|
1475
1484
|
ye as c,
|
|
1476
|
-
|
|
1485
|
+
T as d,
|
|
1477
1486
|
R as e,
|
|
1478
1487
|
C as f,
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1488
|
+
q as g,
|
|
1489
|
+
Xe as h,
|
|
1490
|
+
Je as i,
|
|
1491
|
+
Qe as j,
|
|
1492
|
+
Ye as k,
|
|
1484
1493
|
J as l,
|
|
1485
|
-
|
|
1494
|
+
Ke as s,
|
|
1486
1495
|
X as y
|
|
1487
1496
|
};
|