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