@unicom-cloud/ui 0.8.81 → 0.8.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Affix.js +1 -1
- package/Alert.js +1 -1
- package/AutoComplete.js +2 -2
- package/BackTop.js +2 -2
- package/Badge.js +1 -1
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +2 -2
- package/Card.js +1 -1
- package/Carousel.js +1 -1
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +2 -2
- package/Comment.js +1 -1
- package/ConfigProvider.js +5 -4
- package/Copy.js +1 -1
- package/DatePicker.js +7 -7
- package/Descriptions.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/Input.js +11 -10
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/List.js +2 -2
- package/Mentions.js +2 -2
- package/Menu.js +1 -1
- package/Message.js +1 -1
- package/Modal.js +1 -1
- package/Notice.js +1 -1
- package/Notification.js +5 -5
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Pagination.js +1 -1
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/Select.js +1 -1
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +1 -1
- package/SpeechSynthesis.js +1 -1
- package/Spin.js +1 -1
- package/Statistic.js +2 -2
- package/Steps.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Transfer.js +2 -2
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +1 -1
- package/Typography.js +1 -1
- package/affix/index.js +60 -57
- package/alert/index.js +53 -53
- package/anchor/Anchor.js +72 -72
- package/anchor/Link.js +27 -27
- package/anchor/util.js +1 -1
- package/auto-complete/index.js +2 -2
- package/avatar/Avatar.js +31 -31
- package/avatar/Group.js +25 -25
- package/back-top/index.js +30 -30
- package/badge/index.js +37 -37
- package/breadcrumb/index.js +26 -26
- package/button/Group.js +7 -7
- package/button/index.js +29 -29
- package/calendar/index.js +2 -2
- package/card/Grid.js +12 -12
- package/card/Meta.js +17 -17
- package/card/index.js +44 -44
- package/carousel/Arrow.js +19 -19
- package/carousel/Indicator.js +25 -25
- package/carousel/index.js +77 -77
- package/cascader/Cascader.js +2 -2
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/B6r8jPCd.js +6 -0
- package/chunk/{DLBfXSnU.js → BmulTYLW.js} +2880 -2878
- package/chunk/C9oo3EJI.js +692 -0
- package/chunk/{C5X4hOkx.js → CVSWh4ZZ.js} +80 -80
- package/chunk/DILUZgXW.js +1464 -0
- package/chunk/DSRHFFrc.js +53 -0
- package/chunk/{yLRv5RIK.js → DdJVL_4g.js} +181 -181
- package/chunk/{DYspELhF.js → DlHiTTJO.js} +223 -223
- package/chunk/{BG7YGUsx.js → R-uQJib2.js} +119 -119
- package/chunk/{DEiyXzBZ.js → ev6oHWqY.js} +63 -63
- package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
- package/collapse/Collapse.js +2 -2
- package/collapse/Item.js +2 -2
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +36 -36
- package/color-picker/InputAlpha.js +11 -11
- package/color-picker/InputHex.js +24 -24
- package/color-picker/InputRgb.js +23 -23
- package/color-picker/Palette.js +18 -18
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +2 -2
- package/comment/index.js +31 -31
- package/config-provider/ConfigProvider.js +5 -3
- package/config-provider/context.js +2 -2
- package/config-provider/index.js +4 -3
- package/copy/index.js +28 -28
- package/date-picker/Picker.js +276 -276
- package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
- package/date-picker/index.js +26 -27
- package/descriptions/index.js +33 -33
- package/divider/index.js +12 -12
- package/draggable/index.js +23 -23
- package/drawer/Drawer.js +81 -81
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +56 -56
- package/empty/index.js +1 -1
- package/form/Form.js +76 -76
- package/form/FormItem.js +64 -64
- package/form/context.js +1 -1
- package/grid/Col.js +53 -53
- package/grid/Row.js +34 -34
- package/grid/grid-item.js +29 -29
- package/grid/grid.js +50 -50
- package/icon/index.js +20 -19
- package/icon-hover/index.js +1 -1
- package/image/Image.js +86 -86
- package/image/ImagePreview.js +2 -2
- package/image/ImagePreviewArrow.js +22 -22
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +498 -493
- package/input/Button.js +11 -0
- package/input/Group.js +8 -8
- package/input/Input.js +488 -434
- package/input/InputElement.js +1 -1
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +1 -1
- package/input/index.js +9 -8
- package/input-number/index.js +1 -1
- package/input-tag/InputTag.js +40 -40
- package/layout/Content.js +7 -7
- package/layout/Footer.js +9 -9
- package/layout/Header.js +7 -7
- package/layout/Sider.js +55 -55
- package/layout/index.js +32 -32
- package/link/index.js +35 -35
- package/list/Item.js +29 -29
- package/list/Meta.js +12 -12
- package/list/index.js +2 -2
- package/mentions/index.js +2 -2
- package/menu/Menu.js +2 -2
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +1 -1
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +2 -2
- package/modal/index.js +1 -1
- package/notice/index.js +1 -1
- package/notification/index.js +5 -5
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +12 -12
- package/overflow-ellipsis/index.js +24 -24
- package/package.json +1 -1
- package/page-header/index.js +38 -38
- package/pagination/PageItem.js +16 -16
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +2 -2
- package/pagination/Pagination.js +2 -2
- package/pagination/index.js +1 -1
- package/picker/Input.js +69 -69
- package/picker/InputRange.js +111 -111
- package/popconfirm/index.js +61 -61
- package/popover/index.js +35 -35
- package/progress/index.js +22 -22
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +49 -49
- package/resize-box/ResizeTrigger.js +34 -34
- package/resize-box/Split.js +56 -56
- package/resize-box/SplitGroup.js +55 -55
- package/resize-box/index.js +51 -51
- package/result/index.js +41 -41
- package/select/Option.js +1 -1
- package/select/Select.js +2 -2
- package/select/index.js +2 -2
- package/select/util.js +1 -1
- package/select-view/Core.js +125 -125
- package/skeleton/index.js +20 -20
- package/slider/Button.js +57 -57
- package/slider/index.js +116 -116
- package/space/index.js +46 -44
- package/speech-synthesis/index.js +1 -1
- package/spin/DotLoading.js +10 -10
- package/spin/index.js +44 -44
- package/statistic/Countdown.js +34 -34
- package/statistic/index.js +67 -67
- package/steps/index.js +55 -55
- package/style.css +1 -1
- package/switch/index.js +54 -54
- package/table/Table.js +3 -3
- package/table/index.js +1 -1
- package/tabs/Tab.js +2 -2
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +12 -12
- package/tabs/index.js +2 -2
- package/tag/index.js +45 -45
- package/time-picker/Picker.js +76 -76
- package/time-picker/TimePicker.js +136 -136
- package/time-picker/index.js +8 -8
- package/time-picker/util.js +5 -5
- package/timeline/Item.js +47 -47
- package/timeline/Timeline.js +41 -41
- package/tooltip/index.js +29 -29
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +2 -2
- package/tree/Animation.js +2 -2
- package/tree/Node.js +2 -2
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/List.js +1 -1
- package/tree-select/Select.js +2 -2
- package/tree-select/index.js +2 -2
- package/trigger/index.js +60 -60
- package/types/config-provider/ConfigProvider.d.ts +2 -2
- package/types/config-provider/context.d.ts +1 -1
- package/types/date-picker/index.d.ts +8 -9
- package/types/date-picker/interface.d.ts +9 -9
- package/types/index.d.ts +2 -2
- package/types/input/Button.d.ts +5 -0
- package/types/input/Input.d.ts +4 -1
- package/types/input/interface.d.ts +7 -0
- package/types/picker/Input.d.ts +2 -2
- package/types/space/index.d.ts +2 -1
- package/types/utils/index.d.ts +1 -0
- package/types/utils/names.d.ts +1 -1
- package/types/utils/setTheme.d.ts +2 -0
- package/typography/Base.js +53 -53
- package/typography/Ellipsis.js +10 -8
- package/typography/Operations.js +28 -28
- package/typography/Paragraph.js +8 -8
- package/typography/Typography.js +7 -7
- package/typography/index.js +1 -1
- package/upload/TriggerNode.js +47 -47
- package/upload/Upload.js +184 -184
- package/upload/request.js +1 -1
- package/upload/request_.js +1 -1
- package/utils/constant.js +1 -1
- package/utils/contextHolder.js +3 -3
- package/utils/dom.js +1 -1
- package/utils/index.js +116 -114
- package/utils/names.js +1 -1
- package/utils/setDarkTheme.js +23 -22
- package/utils/setPrimaryColor.js +22 -16
- package/utils/setTheme.js +9 -0
- package/utils/tween.js +1 -1
- package/verification-code/VerificationCode.js +49 -49
- package/version/index.js +1 -1
- package/watermark/Watermark.js +24 -24
- package/chunk/CQvM33Vg.js +0 -724
- package/chunk/D0ZWT7db.js +0 -5
- package/chunk/yhU2zeeu.js +0 -1461
- /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
|
@@ -0,0 +1,692 @@
|
|
|
1
|
+
import { jsx as i, jsxs as X, Fragment as me } from "react/jsx-runtime";
|
|
2
|
+
import Y from "@unicom-cloud/icons/context";
|
|
3
|
+
import { s as Le } from "./DSRHFFrc.js";
|
|
4
|
+
import { UI_PC_PREFIX as F } from "@unicom-cloud/utils/constant/ui";
|
|
5
|
+
import ue from "lodash/merge";
|
|
6
|
+
import A, { forwardRef as te, useContext as D, createContext as Se, useRef as k, useImperativeHandle as oe, useEffect as _, useState as ze, useMemo as qe } from "react";
|
|
7
|
+
import { u as ne } from "./BFTV6myl.js";
|
|
8
|
+
import { b as xe } from "./BJ9_azwQ.js";
|
|
9
|
+
import H from "lodash/isNumber";
|
|
10
|
+
import j from "lodash/isUndefined";
|
|
11
|
+
import { createRoot as ge } from "react-dom/client";
|
|
12
|
+
import Ge from "@unicom-cloud/icons/IconUiCheckCircleFill";
|
|
13
|
+
import pe from "@unicom-cloud/icons/IconUiClose";
|
|
14
|
+
import Qe from "@unicom-cloud/icons/IconUiCloseCircleFill";
|
|
15
|
+
import Xe from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
16
|
+
import Ae from "@unicom-cloud/icons/IconUiInfoCircleFill";
|
|
17
|
+
import Be from "@unicom-cloud/icons/IconUiLoading";
|
|
18
|
+
import { setConfigProviderProps as Je } from "../modal/config.js";
|
|
19
|
+
import { createPortal as Ke } from "react-dom";
|
|
20
|
+
import { P as he } from "./NPajzdOv.js";
|
|
21
|
+
import S from "@unicom-cloud/utils/class-name";
|
|
22
|
+
import Ve from "@unicom-cloud/icons/IconUiEmpty";
|
|
23
|
+
import We from "../locale/zh-CN.js";
|
|
24
|
+
import Ne from "../notification/withNotification.js";
|
|
25
|
+
import "lodash/isEqualWith";
|
|
26
|
+
import "./ClM74To2.js";
|
|
27
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
28
|
+
import "../utils/dom.js";
|
|
29
|
+
import "./B4WG1mhs.js";
|
|
30
|
+
import "./BZ3igxQN.js";
|
|
31
|
+
import "@unicom-cloud/utils/constant";
|
|
32
|
+
import "lodash/debounce";
|
|
33
|
+
import Ye from "lodash/isString";
|
|
34
|
+
function Ze(e, o) {
|
|
35
|
+
const {
|
|
36
|
+
getPrefixCls: t,
|
|
37
|
+
locale: l,
|
|
38
|
+
componentConfig: f
|
|
39
|
+
} = D(w), n = ne(
|
|
40
|
+
e,
|
|
41
|
+
{},
|
|
42
|
+
f == null ? void 0 : f.Empty
|
|
43
|
+
), { style: s, className: u, description: r, icon: c, imgSrc: d, ...m } = n, C = t == null ? void 0 : t("empty"), N = S(C, u), x = l.Empty.noData, a = typeof r == "string" ? r : "empty";
|
|
44
|
+
return /* @__PURE__ */ i("div", { ref: o, className: N, style: s, ...m, children: /* @__PURE__ */ X("div", { className: `${C}-wrapper`, children: [
|
|
45
|
+
/* @__PURE__ */ i("div", { className: `${C}-image`, children: d ? /* @__PURE__ */ i("img", { alt: a, src: d }) : c || /* @__PURE__ */ i(Ve, {}) }),
|
|
46
|
+
/* @__PURE__ */ i("div", { className: `${C}-description`, children: r || x })
|
|
47
|
+
] }) });
|
|
48
|
+
}
|
|
49
|
+
const ve = te(Ze);
|
|
50
|
+
ve.displayName = "Empty";
|
|
51
|
+
const et = A.memo(ve);
|
|
52
|
+
function tt(e) {
|
|
53
|
+
return /* @__PURE__ */ i(et, {});
|
|
54
|
+
}
|
|
55
|
+
const $e = {
|
|
56
|
+
locale: We,
|
|
57
|
+
prefixCls: F,
|
|
58
|
+
getPrefixCls(e, o) {
|
|
59
|
+
return `${o || F}-${e}`;
|
|
60
|
+
},
|
|
61
|
+
getPopupContainer() {
|
|
62
|
+
return window.document.body;
|
|
63
|
+
},
|
|
64
|
+
size: "default",
|
|
65
|
+
renderEmpty: tt
|
|
66
|
+
}, w = Se({
|
|
67
|
+
...$e
|
|
68
|
+
});
|
|
69
|
+
function ot(e, o) {
|
|
70
|
+
const {
|
|
71
|
+
children: t,
|
|
72
|
+
className: l,
|
|
73
|
+
disabled: f,
|
|
74
|
+
prefix: n,
|
|
75
|
+
size: s = "default",
|
|
76
|
+
...u
|
|
77
|
+
} = e, { getPrefixCls: r } = D(w), c = r == null ? void 0 : r("icon-hover"), d = k();
|
|
78
|
+
return oe(o, () => ({
|
|
79
|
+
getRootDOMNode: () => d.current
|
|
80
|
+
})), /* @__PURE__ */ i(
|
|
81
|
+
"span",
|
|
82
|
+
{
|
|
83
|
+
ref: d,
|
|
84
|
+
className: S(
|
|
85
|
+
c,
|
|
86
|
+
{
|
|
87
|
+
[`${n}-icon-hover`]: n,
|
|
88
|
+
[`${c}-size-${s}`]: s && s !== "default",
|
|
89
|
+
[`${c}-disabled`]: f
|
|
90
|
+
},
|
|
91
|
+
l
|
|
92
|
+
),
|
|
93
|
+
onClick: e.onClick,
|
|
94
|
+
...u,
|
|
95
|
+
children: t
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
const Ce = A.forwardRef(ot), nt = {
|
|
100
|
+
type: "info",
|
|
101
|
+
showIcon: !0,
|
|
102
|
+
noticeType: "message",
|
|
103
|
+
duration: 3e3
|
|
104
|
+
};
|
|
105
|
+
function rt(e, o) {
|
|
106
|
+
const {
|
|
107
|
+
getPrefixCls: t,
|
|
108
|
+
componentConfig: l,
|
|
109
|
+
rtl: f
|
|
110
|
+
} = D(w), n = ne(
|
|
111
|
+
e,
|
|
112
|
+
nt,
|
|
113
|
+
l == null ? void 0 : l.Notice
|
|
114
|
+
), s = D(w), u = t == null ? void 0 : t("notice");
|
|
115
|
+
k();
|
|
116
|
+
const r = k(), c = k(), d = k(), {
|
|
117
|
+
title: m,
|
|
118
|
+
content: C,
|
|
119
|
+
showIcon: N,
|
|
120
|
+
className: x,
|
|
121
|
+
style: a,
|
|
122
|
+
type: p,
|
|
123
|
+
btn: g,
|
|
124
|
+
icon: $,
|
|
125
|
+
prefixCls: h,
|
|
126
|
+
closable: v,
|
|
127
|
+
noticeType: R,
|
|
128
|
+
iconPrefix: ce,
|
|
129
|
+
rtl: Fe = f,
|
|
130
|
+
closeIcon: z,
|
|
131
|
+
classPrefixCls: le
|
|
132
|
+
} = n, He = S(
|
|
133
|
+
h,
|
|
134
|
+
`${h}-${p}`,
|
|
135
|
+
{
|
|
136
|
+
[`${h}-closable`]: v,
|
|
137
|
+
[`${h}-rtl`]: Fe
|
|
138
|
+
},
|
|
139
|
+
x
|
|
140
|
+
);
|
|
141
|
+
let B = "closable" in n ? v : !0, J = N;
|
|
142
|
+
p === "normal" && !$ && (J = !1);
|
|
143
|
+
const ae = { ...s };
|
|
144
|
+
le && (ae.prefixCls = le);
|
|
145
|
+
function Oe() {
|
|
146
|
+
return c.current;
|
|
147
|
+
}
|
|
148
|
+
function K() {
|
|
149
|
+
const { duration: b, onClose: U, id: V } = n;
|
|
150
|
+
b !== 0 && (r.current = window.setTimeout(() => {
|
|
151
|
+
U == null || U(V), O();
|
|
152
|
+
}, b));
|
|
153
|
+
}
|
|
154
|
+
function O() {
|
|
155
|
+
r.current && (window.clearTimeout(r.current), r.current = null);
|
|
156
|
+
}
|
|
157
|
+
function q() {
|
|
158
|
+
var b;
|
|
159
|
+
(b = n.onClose) == null || b.call(n, n.id);
|
|
160
|
+
}
|
|
161
|
+
function fe() {
|
|
162
|
+
const { showIcon: b, icon: U, type: V, iconPrefix: de } = n;
|
|
163
|
+
let I;
|
|
164
|
+
if (U)
|
|
165
|
+
I = U;
|
|
166
|
+
else if (b) {
|
|
167
|
+
switch (V) {
|
|
168
|
+
case "info":
|
|
169
|
+
I = /* @__PURE__ */ i(Ae, {});
|
|
170
|
+
break;
|
|
171
|
+
case "success":
|
|
172
|
+
I = /* @__PURE__ */ i(Ge, {});
|
|
173
|
+
break;
|
|
174
|
+
case "error":
|
|
175
|
+
I = /* @__PURE__ */ i(Qe, {});
|
|
176
|
+
break;
|
|
177
|
+
case "warning":
|
|
178
|
+
I = /* @__PURE__ */ i(Xe, {});
|
|
179
|
+
break;
|
|
180
|
+
case "loading":
|
|
181
|
+
I = /* @__PURE__ */ i(Be, {});
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
I = /* @__PURE__ */ i(
|
|
185
|
+
Y.Provider,
|
|
186
|
+
{
|
|
187
|
+
value: de ? { prefixCls: de } : {},
|
|
188
|
+
children: I
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
return /* @__PURE__ */ i("span", { className: `${h}-icon`, children: I });
|
|
193
|
+
}
|
|
194
|
+
function je() {
|
|
195
|
+
O();
|
|
196
|
+
}
|
|
197
|
+
function De() {
|
|
198
|
+
O(), K();
|
|
199
|
+
}
|
|
200
|
+
oe(o, () => ({
|
|
201
|
+
getRootDOMNode: Oe
|
|
202
|
+
}), []), _(() => {
|
|
203
|
+
const b = d.current;
|
|
204
|
+
return (b && (b == null ? void 0 : b.duration) !== n.duration || n.update) && (O(), K()), d.current = n, () => {
|
|
205
|
+
};
|
|
206
|
+
}, [n.duration, n.update]), _(() => (K(), () => {
|
|
207
|
+
O();
|
|
208
|
+
}), []);
|
|
209
|
+
let T;
|
|
210
|
+
return R === "message" && (B = v, T = /* @__PURE__ */ X(me, { children: [
|
|
211
|
+
J && fe(),
|
|
212
|
+
/* @__PURE__ */ i("span", { className: `${h}-content`, children: C }),
|
|
213
|
+
B && (z !== void 0 ? /* @__PURE__ */ i("span", { onClick: q, className: `${h}-close-btn`, children: z }) : /* @__PURE__ */ i(
|
|
214
|
+
Ce,
|
|
215
|
+
{
|
|
216
|
+
prefix: h,
|
|
217
|
+
className: `${h}-close-btn`,
|
|
218
|
+
onClick: q,
|
|
219
|
+
children: /* @__PURE__ */ i(pe, {})
|
|
220
|
+
}
|
|
221
|
+
))
|
|
222
|
+
] })), R === "notification" && (T = /* @__PURE__ */ X(me, { children: [
|
|
223
|
+
J && /* @__PURE__ */ i("div", { className: `${h}-left`, children: fe() }),
|
|
224
|
+
/* @__PURE__ */ X("div", { className: `${h}-right`, children: [
|
|
225
|
+
m && /* @__PURE__ */ i("div", { className: `${h}-title`, children: m }),
|
|
226
|
+
/* @__PURE__ */ i("div", { className: `${h}-content`, children: C }),
|
|
227
|
+
g && /* @__PURE__ */ i("div", { className: `${h}-btn-wrapper`, children: g })
|
|
228
|
+
] }),
|
|
229
|
+
B && (z !== void 0 ? /* @__PURE__ */ i("span", { onClick: q, className: `${h}-close-btn`, children: z }) : /* @__PURE__ */ i(
|
|
230
|
+
Ce,
|
|
231
|
+
{
|
|
232
|
+
prefix: h,
|
|
233
|
+
className: `${h}-close-btn`,
|
|
234
|
+
onClick: q,
|
|
235
|
+
children: /* @__PURE__ */ i(
|
|
236
|
+
Y.Provider,
|
|
237
|
+
{
|
|
238
|
+
value: ce ? { prefixCls: ce } : {},
|
|
239
|
+
children: /* @__PURE__ */ i(pe, {})
|
|
240
|
+
}
|
|
241
|
+
)
|
|
242
|
+
}
|
|
243
|
+
))
|
|
244
|
+
] })), T && (T = /* @__PURE__ */ i(se, { ...ae, childrenName: "notice", children: /* @__PURE__ */ i(
|
|
245
|
+
"div",
|
|
246
|
+
{
|
|
247
|
+
ref: c,
|
|
248
|
+
className: `${u}-${R}`,
|
|
249
|
+
onMouseEnter: je,
|
|
250
|
+
onMouseLeave: De,
|
|
251
|
+
children: /* @__PURE__ */ i("div", { className: He, style: a, role: "alert", children: T })
|
|
252
|
+
}
|
|
253
|
+
) })), T;
|
|
254
|
+
}
|
|
255
|
+
const be = te(rt);
|
|
256
|
+
function ye(e, o) {
|
|
257
|
+
const t = D(w), [l, f] = ze([]);
|
|
258
|
+
function n(r) {
|
|
259
|
+
f((c) => [...c, r]);
|
|
260
|
+
}
|
|
261
|
+
function s(r) {
|
|
262
|
+
f(
|
|
263
|
+
(c) => c.filter((d) => r !== d)
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
function u() {
|
|
267
|
+
return t;
|
|
268
|
+
}
|
|
269
|
+
return oe(o, () => ({
|
|
270
|
+
addInstance: n,
|
|
271
|
+
removeInstance: s,
|
|
272
|
+
getContextConfig: u
|
|
273
|
+
})), A.Children.map(
|
|
274
|
+
l,
|
|
275
|
+
(r, c) => A.cloneElement(r, { key: c })
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
ye.displayName = "ContextHolderElement";
|
|
279
|
+
const Ie = te(ye);
|
|
280
|
+
function it(e = {}) {
|
|
281
|
+
const {
|
|
282
|
+
maxCount: o,
|
|
283
|
+
duration: t = 3e3,
|
|
284
|
+
prefixCls: l,
|
|
285
|
+
getContainer: f
|
|
286
|
+
} = e, n = k(), s = /* @__PURE__ */ i(Ie, { ref: n }), u = {};
|
|
287
|
+
let r;
|
|
288
|
+
function c(m) {
|
|
289
|
+
let C, N;
|
|
290
|
+
if (n.current) {
|
|
291
|
+
const $ = n.current.getContextConfig();
|
|
292
|
+
N = $.rtl, C = $.prefixCls;
|
|
293
|
+
}
|
|
294
|
+
const x = l || C, a = ie(m.position, N), p = {
|
|
295
|
+
duration: t,
|
|
296
|
+
...m
|
|
297
|
+
}, g = u[a];
|
|
298
|
+
if (g) {
|
|
299
|
+
if (g.notices.length >= o) {
|
|
300
|
+
const $ = g.notices[0];
|
|
301
|
+
p.id = $.id, g.shift();
|
|
302
|
+
}
|
|
303
|
+
g.add({ ...p });
|
|
304
|
+
} else
|
|
305
|
+
r = /* @__PURE__ */ i(
|
|
306
|
+
y,
|
|
307
|
+
{
|
|
308
|
+
...p,
|
|
309
|
+
prefixCls: x,
|
|
310
|
+
rtl: N,
|
|
311
|
+
getContainer: f,
|
|
312
|
+
ref: ($) => {
|
|
313
|
+
u[a] = $;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
), n.current.addInstance(r);
|
|
317
|
+
return u[a];
|
|
318
|
+
}
|
|
319
|
+
const d = {};
|
|
320
|
+
return re.forEach((m) => {
|
|
321
|
+
d[m] = (C) => c({
|
|
322
|
+
...C,
|
|
323
|
+
type: m
|
|
324
|
+
});
|
|
325
|
+
}), [d, s];
|
|
326
|
+
}
|
|
327
|
+
const re = [
|
|
328
|
+
"info",
|
|
329
|
+
"success",
|
|
330
|
+
"error",
|
|
331
|
+
"warning",
|
|
332
|
+
"loading",
|
|
333
|
+
"normal"
|
|
334
|
+
];
|
|
335
|
+
let P = {}, G = [], Ee, Pe, we, Z, L;
|
|
336
|
+
function ie(e, o) {
|
|
337
|
+
return j(e) && (e = o || L ? "topLeft" : "topRight"), e;
|
|
338
|
+
}
|
|
339
|
+
function st(e) {
|
|
340
|
+
const { prefixCls: o, rtl: t, getContainer: l, notices: f } = e, n = j(t) ? L : t, s = ie(e.position, n), u = o || Pe, r = u ? `${u}-notification` : "pqb-notification";
|
|
341
|
+
let c;
|
|
342
|
+
s === "topLeft" || s === "bottomLeft" ? c = "slideNoticeLeft" : c = "slideNoticeRight";
|
|
343
|
+
const d = S(
|
|
344
|
+
`${r}-wrapper`,
|
|
345
|
+
`${r}-wrapper-${s}`,
|
|
346
|
+
{ [`${r}-wrapper-rtl`]: L }
|
|
347
|
+
), m = l == null ? void 0 : l();
|
|
348
|
+
function C(x) {
|
|
349
|
+
const a = f.find((p) => p.id === x);
|
|
350
|
+
a && e.update({
|
|
351
|
+
...a,
|
|
352
|
+
style: { ...a.style, opacity: 0 }
|
|
353
|
+
}), setTimeout(() => {
|
|
354
|
+
e.remove(x);
|
|
355
|
+
}, 200);
|
|
356
|
+
}
|
|
357
|
+
_(() => (e.add(e), () => {
|
|
358
|
+
e.clear();
|
|
359
|
+
}), []);
|
|
360
|
+
const N = /* @__PURE__ */ i("div", { className: d, children: /* @__PURE__ */ i(xe, { component: null, children: f.map((x) => /* @__PURE__ */ i(
|
|
361
|
+
he,
|
|
362
|
+
{
|
|
363
|
+
timeout: {
|
|
364
|
+
enter: 400,
|
|
365
|
+
exit: 300
|
|
366
|
+
},
|
|
367
|
+
classNames: c,
|
|
368
|
+
onExit: (a) => {
|
|
369
|
+
a && (a.style.height = `${a.scrollHeight}px`);
|
|
370
|
+
},
|
|
371
|
+
onExiting: (a) => {
|
|
372
|
+
a && (a.style.height = 0);
|
|
373
|
+
},
|
|
374
|
+
onExited: (a) => {
|
|
375
|
+
var p;
|
|
376
|
+
a && (a.style.height = 0, (p = x.onClose) == null || p.call(x));
|
|
377
|
+
},
|
|
378
|
+
children: /* @__PURE__ */ i(
|
|
379
|
+
be,
|
|
380
|
+
{
|
|
381
|
+
...x,
|
|
382
|
+
onClose: C,
|
|
383
|
+
prefixCls: r,
|
|
384
|
+
iconPrefix: u,
|
|
385
|
+
classPrefixCls: u,
|
|
386
|
+
noticeType: "notification",
|
|
387
|
+
rtl: n
|
|
388
|
+
}
|
|
389
|
+
)
|
|
390
|
+
},
|
|
391
|
+
x.id
|
|
392
|
+
)) }) });
|
|
393
|
+
return m ? Ke(N, m) : N;
|
|
394
|
+
}
|
|
395
|
+
const y = Ne(st);
|
|
396
|
+
y.useNotification = it;
|
|
397
|
+
y.config = (e = {}) => {
|
|
398
|
+
var o;
|
|
399
|
+
H(e.maxCount) && (Ee = e.maxCount), e.prefixCls && (Pe = e.prefixCls), H(e.duration) && (we = e.duration), typeof e.rtl == "boolean" && (L = e.rtl), e.getContainer && ((o = e.getContainer) == null ? void 0 : o.call(e)) !== Z && (Z = e.getContainer(), Object.values(P).forEach(
|
|
400
|
+
(t) => {
|
|
401
|
+
var l;
|
|
402
|
+
return (l = t == null ? void 0 : t.clear) == null ? void 0 : l.call(t);
|
|
403
|
+
}
|
|
404
|
+
), P = {});
|
|
405
|
+
};
|
|
406
|
+
y.clear = () => {
|
|
407
|
+
Object.values(P).forEach((e) => {
|
|
408
|
+
e == null || e.clear();
|
|
409
|
+
});
|
|
410
|
+
};
|
|
411
|
+
y.remove = (e) => {
|
|
412
|
+
Object.values(P).forEach((o) => {
|
|
413
|
+
o == null || o.remove(e);
|
|
414
|
+
});
|
|
415
|
+
};
|
|
416
|
+
y.addInstance = (e) => {
|
|
417
|
+
const o = ie(e.position, L), t = P[o], l = {
|
|
418
|
+
duration: we,
|
|
419
|
+
...e
|
|
420
|
+
};
|
|
421
|
+
if (t) {
|
|
422
|
+
const f = t.notices.find(
|
|
423
|
+
(s) => s.id === e.id
|
|
424
|
+
), n = {
|
|
425
|
+
...l,
|
|
426
|
+
update: f
|
|
427
|
+
};
|
|
428
|
+
t.notices.length >= Ee && (f ? n.id = f.id : t.shift()), t.add({ ...n });
|
|
429
|
+
}
|
|
430
|
+
if (t === null && G.push(e), t === void 0) {
|
|
431
|
+
const f = document.createElement("div");
|
|
432
|
+
(Z || document.body).appendChild(f), ge(f).render(
|
|
433
|
+
/* @__PURE__ */ i(
|
|
434
|
+
y,
|
|
435
|
+
{
|
|
436
|
+
...l,
|
|
437
|
+
ref: (s) => {
|
|
438
|
+
if (s) {
|
|
439
|
+
for (let u = 0; u < G.length; u++)
|
|
440
|
+
s.add(G[u]);
|
|
441
|
+
G = [], P[o] = s;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
)
|
|
446
|
+
), P[o] = null;
|
|
447
|
+
}
|
|
448
|
+
return P[o];
|
|
449
|
+
};
|
|
450
|
+
re.forEach((e) => {
|
|
451
|
+
y[e] = (o) => y.addInstance({
|
|
452
|
+
...o,
|
|
453
|
+
type: e
|
|
454
|
+
});
|
|
455
|
+
});
|
|
456
|
+
function ct(e = {}) {
|
|
457
|
+
const { maxCount: o, duration: t = 3e3, prefixCls: l } = e, f = k(), n = qe(
|
|
458
|
+
() => /* @__PURE__ */ i(Ie, { ref: f }),
|
|
459
|
+
[]
|
|
460
|
+
), s = {};
|
|
461
|
+
let u;
|
|
462
|
+
function r(d) {
|
|
463
|
+
let m, C;
|
|
464
|
+
if (f.current) {
|
|
465
|
+
const v = f.current.getContextConfig();
|
|
466
|
+
C = v.rtl, m = v.prefixCls;
|
|
467
|
+
}
|
|
468
|
+
const N = l || m, x = {
|
|
469
|
+
position: "top",
|
|
470
|
+
duration: t,
|
|
471
|
+
...d
|
|
472
|
+
}, { position: a, transitionClassNames: p } = x;
|
|
473
|
+
let g;
|
|
474
|
+
const $ = s[a];
|
|
475
|
+
if ($) {
|
|
476
|
+
const v = $.notices;
|
|
477
|
+
v.length >= o ? (g = v[0].id, $.shift(), $.add({ ...x, id: g })) : g = $.add(x);
|
|
478
|
+
} else
|
|
479
|
+
u = /* @__PURE__ */ i(
|
|
480
|
+
E,
|
|
481
|
+
{
|
|
482
|
+
...x,
|
|
483
|
+
transitionClassNames: p,
|
|
484
|
+
prefixCls: N,
|
|
485
|
+
rtl: C,
|
|
486
|
+
ref: (v) => {
|
|
487
|
+
s[a] = v;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
), f.current.addInstance(u);
|
|
491
|
+
return () => {
|
|
492
|
+
var v, R;
|
|
493
|
+
(R = (v = s[a]) == null ? void 0 : v.remove) == null || R.call(v, g);
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
const c = {};
|
|
497
|
+
return Re.forEach((d) => {
|
|
498
|
+
c[d] = (m) => {
|
|
499
|
+
const C = Ye(m) ? { content: m } : m;
|
|
500
|
+
return r({
|
|
501
|
+
...C,
|
|
502
|
+
type: d
|
|
503
|
+
});
|
|
504
|
+
};
|
|
505
|
+
}), [c, n];
|
|
506
|
+
}
|
|
507
|
+
const Re = [...re];
|
|
508
|
+
let M = {}, Q = [], ke, Me, _e, ee, Te, Ue;
|
|
509
|
+
function lt(e) {
|
|
510
|
+
const {
|
|
511
|
+
transitionClassNames: o,
|
|
512
|
+
transitionTimeout: t,
|
|
513
|
+
prefixCls: l,
|
|
514
|
+
rtl: f,
|
|
515
|
+
closable: n,
|
|
516
|
+
notices: s,
|
|
517
|
+
position: u
|
|
518
|
+
} = e;
|
|
519
|
+
function r(a) {
|
|
520
|
+
const p = e.notices.find((g) => g.id === a);
|
|
521
|
+
p && e.update({
|
|
522
|
+
...p,
|
|
523
|
+
style: { ...p.style, opacity: 0 }
|
|
524
|
+
}), setTimeout(() => {
|
|
525
|
+
e.remove(a);
|
|
526
|
+
}, 100);
|
|
527
|
+
}
|
|
528
|
+
_(() => (e.add(e), () => {
|
|
529
|
+
e.clear();
|
|
530
|
+
}), []);
|
|
531
|
+
const c = l || Me, d = j(f) ? Te : f, m = j(n) ? Ue : n, C = c ? `${c}-message` : "pqb-message", N = {
|
|
532
|
+
enter: H(t == null ? void 0 : t.enter) ? t == null ? void 0 : t.enter : 100,
|
|
533
|
+
exit: H(t == null ? void 0 : t.exit) ? t == null ? void 0 : t.exit : 300
|
|
534
|
+
}, x = S(
|
|
535
|
+
`${C}-wrapper`,
|
|
536
|
+
`${C}-wrapper-${u}`
|
|
537
|
+
);
|
|
538
|
+
return /* @__PURE__ */ i("div", { className: x, children: /* @__PURE__ */ i(xe, { component: null, children: s.map((a) => /* @__PURE__ */ i(
|
|
539
|
+
he,
|
|
540
|
+
{
|
|
541
|
+
timeout: N,
|
|
542
|
+
classNames: o || "fadeMessage",
|
|
543
|
+
onExit: (p) => {
|
|
544
|
+
p && (p.style.height = `${p.scrollHeight}px`);
|
|
545
|
+
},
|
|
546
|
+
onExiting: (p) => {
|
|
547
|
+
p && (p.style.height = 0);
|
|
548
|
+
},
|
|
549
|
+
onExited: (p) => {
|
|
550
|
+
var g;
|
|
551
|
+
p && (p.style.height = 0, (g = a.onClose) == null || g.call(a));
|
|
552
|
+
},
|
|
553
|
+
children: /* @__PURE__ */ i(
|
|
554
|
+
be,
|
|
555
|
+
{
|
|
556
|
+
...a,
|
|
557
|
+
prefixCls: C,
|
|
558
|
+
classPrefixCls: c,
|
|
559
|
+
iconPrefix: c,
|
|
560
|
+
onClose: r,
|
|
561
|
+
noticeType: "message",
|
|
562
|
+
rtl: d,
|
|
563
|
+
...j(m) ? {} : { closable: m }
|
|
564
|
+
}
|
|
565
|
+
)
|
|
566
|
+
},
|
|
567
|
+
a.id
|
|
568
|
+
)) }) });
|
|
569
|
+
}
|
|
570
|
+
const E = Ne(lt);
|
|
571
|
+
E.config = (e = {}) => {
|
|
572
|
+
var o;
|
|
573
|
+
H(e.maxCount) && (ke = e.maxCount), e.prefixCls && (Me = e.prefixCls), H(e.duration) && (_e = e.duration), typeof e.rtl == "boolean" && (Te = e.rtl), typeof e.closable == "boolean" && (Ue = e.closable), ((o = e.getContainer) == null ? void 0 : o.call(e)) !== ee && (ee = e.getContainer(), Object.values(M).forEach((t) => t == null ? void 0 : t.clear()), M = {});
|
|
574
|
+
};
|
|
575
|
+
E.clear = () => {
|
|
576
|
+
Object.values(M).forEach((e) => {
|
|
577
|
+
e == null || e.clear();
|
|
578
|
+
});
|
|
579
|
+
};
|
|
580
|
+
E.addInstance = (e) => {
|
|
581
|
+
const o = {
|
|
582
|
+
position: "top",
|
|
583
|
+
duration: _e,
|
|
584
|
+
...e
|
|
585
|
+
}, { position: t, transitionClassNames: l, transitionTimeout: f } = o;
|
|
586
|
+
let n;
|
|
587
|
+
const s = M[t];
|
|
588
|
+
if (s) {
|
|
589
|
+
const r = s.notices.find(
|
|
590
|
+
(d) => d.id === e.id
|
|
591
|
+
), c = {
|
|
592
|
+
...o,
|
|
593
|
+
update: r
|
|
594
|
+
};
|
|
595
|
+
s.notices.length >= ke ? r ? s.add({
|
|
596
|
+
...c,
|
|
597
|
+
id: r.id
|
|
598
|
+
}) : (s.shift(), s.add(c)) : n = s.add(c);
|
|
599
|
+
}
|
|
600
|
+
if (s === null && Q.push(e), s === void 0) {
|
|
601
|
+
const r = document.createElement("div");
|
|
602
|
+
(ee || document.body).appendChild(r), ge(r).render(
|
|
603
|
+
/* @__PURE__ */ i(
|
|
604
|
+
E,
|
|
605
|
+
{
|
|
606
|
+
transitionClassNames: l,
|
|
607
|
+
transitionTimeout: f,
|
|
608
|
+
...o,
|
|
609
|
+
ref: (d) => {
|
|
610
|
+
if (d) {
|
|
611
|
+
for (let m = 0; m < Q.length; m++)
|
|
612
|
+
d.add(Q[m]);
|
|
613
|
+
Q = [], M[t] = d;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
)
|
|
618
|
+
), M[t] = null;
|
|
619
|
+
}
|
|
620
|
+
return () => {
|
|
621
|
+
var r, c;
|
|
622
|
+
(c = (r = M[t]) == null ? void 0 : r.remove) == null || c.call(r, n);
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
Re.forEach((e) => {
|
|
626
|
+
E[e] = (o) => {
|
|
627
|
+
const t = typeof o == "string" ? { content: o } : o;
|
|
628
|
+
return E.addInstance({
|
|
629
|
+
...t,
|
|
630
|
+
type: e
|
|
631
|
+
});
|
|
632
|
+
};
|
|
633
|
+
});
|
|
634
|
+
E.useMessage = ct;
|
|
635
|
+
const at = $e;
|
|
636
|
+
let W = {};
|
|
637
|
+
const ft = {};
|
|
638
|
+
function se(e) {
|
|
639
|
+
const o = ne(
|
|
640
|
+
e,
|
|
641
|
+
at,
|
|
642
|
+
ft
|
|
643
|
+
), {
|
|
644
|
+
theme: t,
|
|
645
|
+
prefixCls: l = F,
|
|
646
|
+
locale: f,
|
|
647
|
+
rtl: n,
|
|
648
|
+
effectGlobalNotice: s = !0,
|
|
649
|
+
effectGlobalModal: u = !0
|
|
650
|
+
} = o, {
|
|
651
|
+
children: r,
|
|
652
|
+
isRootConfig: c,
|
|
653
|
+
keepConfig: d,
|
|
654
|
+
// 潘启宝添加
|
|
655
|
+
...m
|
|
656
|
+
} = o;
|
|
657
|
+
(c || d) && (W = ue({}, W, m));
|
|
658
|
+
const C = ue({}, W, m, {
|
|
659
|
+
getPrefixCls: N
|
|
660
|
+
});
|
|
661
|
+
function N(a, p) {
|
|
662
|
+
return `${p || l || F}-${a}`;
|
|
663
|
+
}
|
|
664
|
+
_(() => (Le({ prefix: F, theme: t }), () => {
|
|
665
|
+
}), [t]), _(() => {
|
|
666
|
+
s && (E.config({ prefixCls: l, rtl: n }), y.config({ prefixCls: l, rtl: n }));
|
|
667
|
+
}, [l, n, s]), _(() => {
|
|
668
|
+
u && Je({ locale: f, prefixCls: l, rtl: n });
|
|
669
|
+
}, [f, l, n, u]);
|
|
670
|
+
let x = r;
|
|
671
|
+
return l && l !== F && (x = /* @__PURE__ */ i(Y.Provider, { value: { prefixCls: l }, children: r })), /* @__PURE__ */ i(w.Provider, { value: C, children: x });
|
|
672
|
+
}
|
|
673
|
+
se.ConfigContext = w;
|
|
674
|
+
se.displayName = "ConfigProvider";
|
|
675
|
+
const Qt = w.Consumer;
|
|
676
|
+
export {
|
|
677
|
+
Qt as C,
|
|
678
|
+
et as E,
|
|
679
|
+
Ce as I,
|
|
680
|
+
E as M,
|
|
681
|
+
y as N,
|
|
682
|
+
w as a,
|
|
683
|
+
se as b,
|
|
684
|
+
$e as c,
|
|
685
|
+
it as d,
|
|
686
|
+
Ie as e,
|
|
687
|
+
be as f,
|
|
688
|
+
ie as g,
|
|
689
|
+
Re as m,
|
|
690
|
+
re as n,
|
|
691
|
+
ct as u
|
|
692
|
+
};
|