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