@unicom-cloud/ui 0.8.70 → 0.8.71
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 +2 -2
- package/AutoComplete.js +1 -1
- package/BackTop.js +2 -2
- package/Badge.js +2 -2
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +1 -1
- 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 +1 -1
- 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 +2 -2
- package/Empty.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/List.js +1 -1
- package/Mentions.js +1 -1
- package/Menu.js +1 -1
- package/Message.js +2 -2
- package/Modal.js +1 -1
- package/Notice.js +2 -2
- package/Notification.js +2 -2
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.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/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +1 -1
- package/SpeechSynthesis.js +3 -3
- package/Spin.js +1 -1
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/Switch.js +2 -2
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Transfer.js +1 -1
- package/Tree.js +1 -1
- package/Trigger.js +3 -3
- package/affix/index.js +1 -1
- package/alert/index.js +2 -2
- package/anchor/Anchor.js +1 -1
- package/anchor/Link.js +1 -1
- package/auto-complete/index.js +1 -1
- package/avatar/Avatar.js +1 -1
- package/avatar/Group.js +1 -1
- package/back-top/index.js +2 -2
- package/badge/Count.js +1 -1
- package/badge/index.js +2 -2
- 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/index.js +1 -1
- package/chunk/{Cm9BS47C.js → 8V534cS3.js} +3 -3
- package/chunk/{CCv-5KFt.js → BHL-PzAD.js} +149 -152
- package/chunk/{B80D01PB.js → BlElSWJg.js} +2 -2
- package/chunk/{Bh8AO6R8.js → BzPNDYAX.js} +1 -1
- package/chunk/{tIRvN_q7.js → C5X9bDyX.js} +3 -3
- package/chunk/C6AJxF7d.js +1820 -0
- package/chunk/CQTxhsUk.js +170 -0
- package/chunk/{DFf75sXd.js → CUs1AOCZ.js} +2 -2
- package/chunk/{CASwN1hB.js → CZWGeRVA.js} +188 -183
- package/chunk/{C48SmsN-.js → ClaNycDy.js} +27 -18
- package/chunk/{-C2QiGwq.js → D2DSUGNT.js} +1 -1
- package/chunk/{DonYzv30.js → DV7ywe_q.js} +1 -1
- package/chunk/{YUHbzjGj.js → Dm1NCTkX.js} +3 -3
- package/chunk/{CSk3yQDO.js → EHx6bIK_.js} +3 -3
- package/chunk/{iOWILwNv.js → I1dqAgn_.js} +3 -3
- package/chunk/{DzVH9IBy.js → fFjj2KuF.js} +1 -1
- package/chunk/{bgmEVbGy.js → pEI3aB9Z.js} +2 -2
- package/collapse/Collapse.js +2 -2
- package/collapse/Item.js +3 -3
- 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 +1 -1
- package/comment/index.js +1 -1
- package/config-provider/ConfigProvider.js +1 -1
- 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/PickerRange.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 +3 -3
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +2 -2
- package/empty/index.js +1 -1
- package/form/Form.js +1 -1
- package/form/FormItem.js +2 -2
- package/form/util.js +11 -11
- 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/hooks/index.js +1 -1
- package/hooks/useOverrideRef.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 +4 -4
- package/image/ImagePreviewArrow.js +1 -1
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +16 -16
- package/input/Group.js +1 -1
- package/input/Input.js +1 -1
- 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-number/index.js +1 -1
- package/input-tag/InputTag.js +2 -2
- 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 +1 -1
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/mentions/index.js +1 -1
- package/menu/Menu.js +2 -2
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +2 -2
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +4 -4
- package/modal/index.js +1 -1
- package/notice/index.js +2 -2
- package/notification/index.js +2 -2
- 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 +1 -1
- package/pagination/Pagination.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/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-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/speech-synthesis/index.js +39 -39
- 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/switch/index.js +2 -2
- package/table/Table.js +2 -2
- package/table/index.js +3 -3
- 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 +1 -1
- package/tree/Animation.js +3 -3
- package/tree/Node.js +3 -3
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/Select.js +1 -1
- package/trigger/index.js +3 -3
- package/types/locale/en-US.d.ts +12 -12
- package/types/locale/tr-TR.d.ts +12 -12
- package/types/table/interface.d.ts +3 -1
- package/types/utils/react19Adapter.d.ts +1 -0
- package/typography/Base.js +1 -1
- package/typography/Ellipsis.js +11 -11
- package/typography/Paragraph.js +1 -1
- package/typography/Typography.js +1 -1
- package/typography/index.js +11 -11
- package/upload/TriggerNode.js +1 -1
- package/upload/Upload.js +2 -2
- package/upload/Uploader.js +2 -2
- package/utils/CSSTransition.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/index.js +4 -4
- package/utils/react19Adapter.js +3 -0
- package/utils/reactDOM.js +1 -1
- package/verification-code/VerificationCode.js +1 -1
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +1 -1
- package/watermark/Watermark.js +1 -1
- package/chunk/DC-pxreh.js +0 -1817
- package/chunk/DcYqcuGl.js +0 -166
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import z, { forwardRef as X, useContext as D, createContext as _e, useRef as
|
|
1
|
+
import z, { forwardRef as X, useContext as D, createContext as _e, useRef as q, useImperativeHandle as Y, useEffect as I, useMemo as je, useState as He } from "react";
|
|
2
2
|
import { jsx as r, jsxs as A, Fragment as le } from "react/jsx-runtime";
|
|
3
3
|
import Q from "@unicom-cloud/icons/context";
|
|
4
4
|
import { n as De } from "./B4JiMp8I.js";
|
|
5
5
|
import Se from "lodash/isPlainObject";
|
|
6
6
|
import { u as Z } from "./BFTV6myl.js";
|
|
7
|
-
import { b as de, P as me } from "./
|
|
7
|
+
import { b as de, P as me } from "./fFjj2KuF.js";
|
|
8
8
|
import _ from "lodash/isNumber";
|
|
9
9
|
import H from "lodash/isUndefined";
|
|
10
10
|
import { createRoot as ue } from "react-dom/client";
|
|
@@ -22,9 +22,10 @@ import "./D-TPB2Do.js";
|
|
|
22
22
|
import "lodash/merge";
|
|
23
23
|
import "../utils/dom.js";
|
|
24
24
|
import "./Biupwn8l.js";
|
|
25
|
-
import
|
|
25
|
+
import "./ClaNycDy.js";
|
|
26
26
|
import "./Ce1j9KTi.js";
|
|
27
27
|
import "lodash/debounce";
|
|
28
|
+
import { createPortal as Je } from "react-dom";
|
|
28
29
|
import pe from "../notification/withNotification.js";
|
|
29
30
|
import Ke from "lodash/isString";
|
|
30
31
|
import { setConfigProviderProps as Qe } from "../modal/config.js";
|
|
@@ -34,14 +35,14 @@ function We(e, o) {
|
|
|
34
35
|
getPrefixCls: t,
|
|
35
36
|
locale: d,
|
|
36
37
|
componentConfig: c
|
|
37
|
-
} = D(
|
|
38
|
+
} = D(R), i = Z(
|
|
38
39
|
e,
|
|
39
40
|
{},
|
|
40
41
|
c == null ? void 0 : c.Empty
|
|
41
|
-
), { style:
|
|
42
|
-
return /* @__PURE__ */ r("div", { ref: o, className: b, style:
|
|
43
|
-
/* @__PURE__ */ r("div", { className: `${g}-image`, children: f ? /* @__PURE__ */ r("img", { alt: n, src: f }) :
|
|
44
|
-
/* @__PURE__ */ r("div", { className: `${g}-description`, children:
|
|
42
|
+
), { style: a, className: u, description: s, icon: l, imgSrc: f, ...C } = i, g = t("empty"), b = U(g, u), m = d.Empty.noData, n = typeof s == "string" ? s : "empty";
|
|
43
|
+
return /* @__PURE__ */ r("div", { ref: o, className: b, style: a, ...C, children: /* @__PURE__ */ A("div", { className: `${g}-wrapper`, children: [
|
|
44
|
+
/* @__PURE__ */ r("div", { className: `${g}-image`, children: f ? /* @__PURE__ */ r("img", { alt: n, src: f }) : l || /* @__PURE__ */ r(Ge, {}) }),
|
|
45
|
+
/* @__PURE__ */ r("div", { className: `${g}-description`, children: s || m })
|
|
45
46
|
] }) });
|
|
46
47
|
}
|
|
47
48
|
const Ce = X(We);
|
|
@@ -56,7 +57,7 @@ const ge = {
|
|
|
56
57
|
getPopupContainer: () => document.body,
|
|
57
58
|
size: "default",
|
|
58
59
|
renderEmpty: Ye
|
|
59
|
-
},
|
|
60
|
+
}, R = _e({
|
|
60
61
|
getPrefixCls: (e, o) => `${o || "pqb"}-${e}`,
|
|
61
62
|
...ge
|
|
62
63
|
});
|
|
@@ -65,10 +66,10 @@ function Ze(e, o) {
|
|
|
65
66
|
children: t,
|
|
66
67
|
className: d,
|
|
67
68
|
disabled: c,
|
|
68
|
-
prefix:
|
|
69
|
-
size:
|
|
70
|
-
...
|
|
71
|
-
} = e, { getPrefixCls:
|
|
69
|
+
prefix: i,
|
|
70
|
+
size: a = "default",
|
|
71
|
+
...u
|
|
72
|
+
} = e, { getPrefixCls: s } = D(R), l = s("icon-hover"), f = q();
|
|
72
73
|
return Y(o, () => ({
|
|
73
74
|
getRootDOMNode: () => f.current
|
|
74
75
|
})), /* @__PURE__ */ r(
|
|
@@ -76,16 +77,16 @@ function Ze(e, o) {
|
|
|
76
77
|
{
|
|
77
78
|
ref: f,
|
|
78
79
|
className: U(
|
|
79
|
-
|
|
80
|
+
l,
|
|
80
81
|
{
|
|
81
|
-
[`${
|
|
82
|
-
[`${
|
|
83
|
-
[`${
|
|
82
|
+
[`${i}-icon-hover`]: i,
|
|
83
|
+
[`${l}-size-${a}`]: a && a !== "default",
|
|
84
|
+
[`${l}-disabled`]: c
|
|
84
85
|
},
|
|
85
86
|
d
|
|
86
87
|
),
|
|
87
88
|
onClick: e.onClick,
|
|
88
|
-
...
|
|
89
|
+
...u,
|
|
89
90
|
children: t
|
|
90
91
|
}
|
|
91
92
|
);
|
|
@@ -101,62 +102,62 @@ function tt(e, o) {
|
|
|
101
102
|
getPrefixCls: t,
|
|
102
103
|
componentConfig: d,
|
|
103
104
|
rtl: c
|
|
104
|
-
} = D(
|
|
105
|
+
} = D(R), i = Z(
|
|
105
106
|
e,
|
|
106
107
|
et,
|
|
107
108
|
d == null ? void 0 : d.Notice
|
|
108
|
-
),
|
|
109
|
-
|
|
110
|
-
const
|
|
109
|
+
), a = D(R), u = t("notice");
|
|
110
|
+
q();
|
|
111
|
+
const s = q(), l = q(), f = q(), {
|
|
111
112
|
title: C,
|
|
112
113
|
content: g,
|
|
113
114
|
showIcon: b,
|
|
114
|
-
className:
|
|
115
|
+
className: m,
|
|
115
116
|
style: n,
|
|
116
117
|
type: p,
|
|
117
118
|
btn: x,
|
|
118
119
|
icon: v,
|
|
119
120
|
prefixCls: h,
|
|
120
121
|
closable: y,
|
|
121
|
-
noticeType:
|
|
122
|
+
noticeType: M,
|
|
122
123
|
iconPrefix: re,
|
|
123
124
|
rtl: Me = c,
|
|
124
125
|
closeIcon: F,
|
|
125
126
|
classPrefixCls: ne
|
|
126
|
-
} =
|
|
127
|
+
} = i, qe = U(
|
|
127
128
|
h,
|
|
128
129
|
`${h}-${p}`,
|
|
129
130
|
{
|
|
130
131
|
[`${h}-closable`]: y,
|
|
131
132
|
[`${h}-rtl`]: Me
|
|
132
133
|
},
|
|
133
|
-
|
|
134
|
+
m
|
|
134
135
|
);
|
|
135
|
-
let G = "closable" in
|
|
136
|
+
let G = "closable" in i ? y : !0, B = b;
|
|
136
137
|
p === "normal" && !v && (B = !1);
|
|
137
|
-
const ie = { ...
|
|
138
|
+
const ie = { ...a };
|
|
138
139
|
ne && (ie.prefixCls = ne);
|
|
139
140
|
function ke() {
|
|
140
|
-
return
|
|
141
|
+
return l.current;
|
|
141
142
|
}
|
|
142
143
|
function J() {
|
|
143
|
-
const { duration: N, onClose:
|
|
144
|
-
N !== 0 && (
|
|
145
|
-
|
|
144
|
+
const { duration: N, onClose: T, id: K } = i;
|
|
145
|
+
N !== 0 && (s.current = window.setTimeout(() => {
|
|
146
|
+
T == null || T(K), j();
|
|
146
147
|
}, N));
|
|
147
148
|
}
|
|
148
149
|
function j() {
|
|
149
|
-
|
|
150
|
+
s.current && (window.clearTimeout(s.current), s.current = null);
|
|
150
151
|
}
|
|
151
152
|
function L() {
|
|
152
153
|
var N;
|
|
153
|
-
(N =
|
|
154
|
+
(N = i.onClose) == null || N.call(i, i.id);
|
|
154
155
|
}
|
|
155
156
|
function se() {
|
|
156
|
-
const { showIcon: N, icon:
|
|
157
|
+
const { showIcon: N, icon: T, type: K, iconPrefix: ce } = i;
|
|
157
158
|
let P;
|
|
158
|
-
if (
|
|
159
|
-
P =
|
|
159
|
+
if (T)
|
|
160
|
+
P = T;
|
|
160
161
|
else if (N) {
|
|
161
162
|
switch (K) {
|
|
162
163
|
case "info":
|
|
@@ -195,13 +196,13 @@ function tt(e, o) {
|
|
|
195
196
|
getRootDOMNode: ke
|
|
196
197
|
}), []), I(() => {
|
|
197
198
|
const N = f.current;
|
|
198
|
-
return (N && (N == null ? void 0 : N.duration) !==
|
|
199
|
+
return (N && (N == null ? void 0 : N.duration) !== i.duration || i.update) && (j(), J()), f.current = i, () => {
|
|
199
200
|
};
|
|
200
|
-
}, [
|
|
201
|
+
}, [i.duration, i.update]), I(() => (J(), () => {
|
|
201
202
|
j();
|
|
202
203
|
}), []);
|
|
203
|
-
let
|
|
204
|
-
return
|
|
204
|
+
let O;
|
|
205
|
+
return M === "message" && (G = y, O = /* @__PURE__ */ A(le, { children: [
|
|
205
206
|
B && se(),
|
|
206
207
|
/* @__PURE__ */ r("span", { className: `${h}-content`, children: g }),
|
|
207
208
|
G && (F !== void 0 ? /* @__PURE__ */ r("span", { onClick: L, className: `${h}-close-btn`, children: F }) : /* @__PURE__ */ r(
|
|
@@ -213,7 +214,7 @@ function tt(e, o) {
|
|
|
213
214
|
children: /* @__PURE__ */ r(ae, {})
|
|
214
215
|
}
|
|
215
216
|
))
|
|
216
|
-
] })),
|
|
217
|
+
] })), M === "notification" && (O = /* @__PURE__ */ A(le, { children: [
|
|
217
218
|
B && /* @__PURE__ */ r("div", { className: `${h}-left`, children: se() }),
|
|
218
219
|
/* @__PURE__ */ A("div", { className: `${h}-right`, children: [
|
|
219
220
|
C && /* @__PURE__ */ r("div", { className: `${h}-title`, children: C }),
|
|
@@ -235,16 +236,16 @@ function tt(e, o) {
|
|
|
235
236
|
)
|
|
236
237
|
}
|
|
237
238
|
))
|
|
238
|
-
] })),
|
|
239
|
+
] })), O && (O = /* @__PURE__ */ r(oe, { ...ie, children: /* @__PURE__ */ r(
|
|
239
240
|
"div",
|
|
240
241
|
{
|
|
241
|
-
ref:
|
|
242
|
-
className: `${
|
|
242
|
+
ref: l,
|
|
243
|
+
className: `${u}-${M}`,
|
|
243
244
|
onMouseEnter: Oe,
|
|
244
245
|
onMouseLeave: Te,
|
|
245
|
-
children: /* @__PURE__ */ r("div", { className: qe, style: n, role: "alert", children:
|
|
246
|
+
children: /* @__PURE__ */ r("div", { className: qe, style: n, role: "alert", children: O })
|
|
246
247
|
}
|
|
247
|
-
) })),
|
|
248
|
+
) })), O;
|
|
248
249
|
}
|
|
249
250
|
const he = X(tt);
|
|
250
251
|
function ot(e = {}) {
|
|
@@ -253,18 +254,18 @@ function ot(e = {}) {
|
|
|
253
254
|
duration: t = 3e3,
|
|
254
255
|
prefixCls: d,
|
|
255
256
|
getContainer: c
|
|
256
|
-
} = e,
|
|
257
|
-
let
|
|
258
|
-
function
|
|
257
|
+
} = e, i = q(), a = /* @__PURE__ */ r(Re, { ref: i }), u = {};
|
|
258
|
+
let s;
|
|
259
|
+
function l(C) {
|
|
259
260
|
let g, b;
|
|
260
|
-
if (
|
|
261
|
-
const v =
|
|
261
|
+
if (i.current) {
|
|
262
|
+
const v = i.current.getContextConfig();
|
|
262
263
|
b = v.rtl, g = v.prefixCls;
|
|
263
264
|
}
|
|
264
|
-
const
|
|
265
|
+
const m = d || g, n = te(C.position, b), p = {
|
|
265
266
|
duration: t,
|
|
266
267
|
...C
|
|
267
|
-
}, x =
|
|
268
|
+
}, x = u[n];
|
|
268
269
|
if (x) {
|
|
269
270
|
if (x.notices.length >= o) {
|
|
270
271
|
const v = x.notices[0];
|
|
@@ -272,27 +273,27 @@ function ot(e = {}) {
|
|
|
272
273
|
}
|
|
273
274
|
x.add({ ...p });
|
|
274
275
|
} else
|
|
275
|
-
|
|
276
|
+
s = /* @__PURE__ */ r(
|
|
276
277
|
$,
|
|
277
278
|
{
|
|
278
279
|
...p,
|
|
279
|
-
prefixCls:
|
|
280
|
+
prefixCls: m,
|
|
280
281
|
rtl: b,
|
|
281
282
|
getContainer: c,
|
|
282
283
|
ref: (v) => {
|
|
283
|
-
|
|
284
|
+
u[n] = v;
|
|
284
285
|
}
|
|
285
286
|
}
|
|
286
|
-
),
|
|
287
|
-
return
|
|
287
|
+
), i.current.addInstance(s);
|
|
288
|
+
return u[n];
|
|
288
289
|
}
|
|
289
290
|
const f = {};
|
|
290
291
|
return ee.forEach((C) => {
|
|
291
|
-
f[C] = (g) =>
|
|
292
|
+
f[C] = (g) => l({
|
|
292
293
|
...g,
|
|
293
294
|
type: C
|
|
294
295
|
});
|
|
295
|
-
}), [f,
|
|
296
|
+
}), [f, a];
|
|
296
297
|
}
|
|
297
298
|
const ee = [
|
|
298
299
|
"info",
|
|
@@ -302,39 +303,39 @@ const ee = [
|
|
|
302
303
|
"loading",
|
|
303
304
|
"normal"
|
|
304
305
|
];
|
|
305
|
-
let
|
|
306
|
+
let w = {}, xe, be, ve, V, S;
|
|
306
307
|
function te(e, o) {
|
|
307
308
|
return H(e) && (e = o || S ? "topLeft" : "topRight"), e;
|
|
308
309
|
}
|
|
309
310
|
function rt(e) {
|
|
310
|
-
const { prefixCls: o, rtl: t, getContainer: d, notices: c } = e,
|
|
311
|
-
let
|
|
312
|
-
|
|
311
|
+
const { prefixCls: o, rtl: t, getContainer: d, notices: c } = e, i = H(t) ? S : t, a = te(e.position, i), u = o || be, s = u ? `${u}-notification` : "pqb-notification";
|
|
312
|
+
let l;
|
|
313
|
+
a === "topLeft" || a === "bottomLeft" ? l = "slideNoticeLeft" : l = "slideNoticeRight";
|
|
313
314
|
const f = U(
|
|
314
|
-
`${
|
|
315
|
-
`${
|
|
316
|
-
{ [`${
|
|
315
|
+
`${s}-wrapper`,
|
|
316
|
+
`${s}-wrapper-${a}`,
|
|
317
|
+
{ [`${s}-wrapper-rtl`]: S }
|
|
317
318
|
), C = d == null ? void 0 : d();
|
|
318
|
-
function g(
|
|
319
|
-
const n = c.find((p) => p.id ===
|
|
319
|
+
function g(m) {
|
|
320
|
+
const n = c.find((p) => p.id === m);
|
|
320
321
|
n && e.update({
|
|
321
322
|
...n,
|
|
322
323
|
style: { ...n.style, opacity: 0 }
|
|
323
324
|
}), setTimeout(() => {
|
|
324
|
-
e.remove(
|
|
325
|
+
e.remove(m);
|
|
325
326
|
}, 200);
|
|
326
327
|
}
|
|
327
328
|
I(() => (e.add(e), () => {
|
|
328
329
|
e.clear();
|
|
329
330
|
}), []);
|
|
330
|
-
const b = /* @__PURE__ */ r("div", { className: f, children: /* @__PURE__ */ r(de, { component: null, children: c.map((
|
|
331
|
+
const b = /* @__PURE__ */ r("div", { className: f, children: /* @__PURE__ */ r(de, { component: null, children: c.map((m) => /* @__PURE__ */ r(
|
|
331
332
|
me,
|
|
332
333
|
{
|
|
333
334
|
timeout: {
|
|
334
335
|
enter: 400,
|
|
335
336
|
exit: 300
|
|
336
337
|
},
|
|
337
|
-
classNames:
|
|
338
|
+
classNames: l,
|
|
338
339
|
onExit: (n) => {
|
|
339
340
|
n && (n.style.height = `${n.scrollHeight}px`);
|
|
340
341
|
},
|
|
@@ -343,22 +344,22 @@ function rt(e) {
|
|
|
343
344
|
},
|
|
344
345
|
onExited: (n) => {
|
|
345
346
|
var p;
|
|
346
|
-
n && (n.style.height = 0, (p =
|
|
347
|
+
n && (n.style.height = 0, (p = m.onClose) == null || p.call(m));
|
|
347
348
|
},
|
|
348
349
|
children: /* @__PURE__ */ r(
|
|
349
350
|
he,
|
|
350
351
|
{
|
|
351
|
-
...
|
|
352
|
+
...m,
|
|
352
353
|
onClose: g,
|
|
353
|
-
prefixCls:
|
|
354
|
-
iconPrefix:
|
|
355
|
-
classPrefixCls:
|
|
354
|
+
prefixCls: s,
|
|
355
|
+
iconPrefix: u,
|
|
356
|
+
classPrefixCls: u,
|
|
356
357
|
noticeType: "notification",
|
|
357
|
-
rtl:
|
|
358
|
+
rtl: i
|
|
358
359
|
}
|
|
359
360
|
)
|
|
360
361
|
},
|
|
361
|
-
|
|
362
|
+
m.id
|
|
362
363
|
)) }) });
|
|
363
364
|
return C ? Je(b, C) : b;
|
|
364
365
|
}
|
|
@@ -366,49 +367,52 @@ const $ = pe(rt);
|
|
|
366
367
|
$.useNotification = ot;
|
|
367
368
|
$.config = (e = {}) => {
|
|
368
369
|
var o;
|
|
369
|
-
_(e.maxCount) && (xe = e.maxCount), e.prefixCls && (be = e.prefixCls), _(e.duration) && (ve = e.duration), typeof e.rtl == "boolean" && (S = e.rtl), e.getContainer && ((o = e.getContainer) == null ? void 0 : o.call(e)) !== V && (V = e.getContainer(), Object.values(
|
|
370
|
+
_(e.maxCount) && (xe = e.maxCount), e.prefixCls && (be = e.prefixCls), _(e.duration) && (ve = e.duration), typeof e.rtl == "boolean" && (S = e.rtl), e.getContainer && ((o = e.getContainer) == null ? void 0 : o.call(e)) !== V && (V = e.getContainer(), Object.values(w).forEach(
|
|
370
371
|
(t) => {
|
|
371
372
|
var d;
|
|
372
373
|
return (d = t == null ? void 0 : t.clear) == null ? void 0 : d.call(t);
|
|
373
374
|
}
|
|
374
|
-
),
|
|
375
|
+
), w = {});
|
|
375
376
|
};
|
|
376
377
|
$.clear = () => {
|
|
377
|
-
Object.values(
|
|
378
|
+
Object.values(w).forEach((e) => {
|
|
378
379
|
e == null || e.clear();
|
|
379
380
|
});
|
|
380
381
|
};
|
|
381
382
|
$.remove = (e) => {
|
|
382
|
-
Object.values(
|
|
383
|
+
Object.values(w).forEach((o) => {
|
|
383
384
|
o == null || o.remove(e);
|
|
384
385
|
});
|
|
385
386
|
};
|
|
386
387
|
$.addInstance = (e) => {
|
|
387
|
-
const o = te(e.position, S), t =
|
|
388
|
+
const o = te(e.position, S), t = w[o], d = {
|
|
388
389
|
duration: ve,
|
|
389
390
|
...e
|
|
390
391
|
};
|
|
391
392
|
if (t) {
|
|
392
|
-
const
|
|
393
|
-
(
|
|
394
|
-
),
|
|
393
|
+
const c = t.notices.find(
|
|
394
|
+
(a) => a.id === e.id
|
|
395
|
+
), i = {
|
|
395
396
|
...d,
|
|
396
|
-
update:
|
|
397
|
+
update: c
|
|
397
398
|
};
|
|
398
|
-
|
|
399
|
+
t.notices.length >= xe && (c ? i.id = c.id : t.shift()), t.add({ ...i });
|
|
399
400
|
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
401
|
+
if (t === void 0) {
|
|
402
|
+
const c = document.createElement("div");
|
|
403
|
+
(V || document.body).appendChild(c), ue(c).render(
|
|
404
|
+
/* @__PURE__ */ r(
|
|
405
|
+
$,
|
|
406
|
+
{
|
|
407
|
+
...d,
|
|
408
|
+
ref: (a) => {
|
|
409
|
+
w[o] = a;
|
|
410
|
+
}
|
|
408
411
|
}
|
|
409
|
-
|
|
410
|
-
)
|
|
411
|
-
|
|
412
|
+
)
|
|
413
|
+
), w[o] = null;
|
|
414
|
+
}
|
|
415
|
+
return w[o];
|
|
412
416
|
};
|
|
413
417
|
ee.forEach((e) => {
|
|
414
418
|
$[e] = (o) => $.addInstance({
|
|
@@ -417,69 +421,69 @@ ee.forEach((e) => {
|
|
|
417
421
|
});
|
|
418
422
|
});
|
|
419
423
|
function nt(e = {}) {
|
|
420
|
-
const { maxCount: o, duration: t = 3e3, prefixCls: d } = e, c =
|
|
424
|
+
const { maxCount: o, duration: t = 3e3, prefixCls: d } = e, c = q(), i = je(
|
|
421
425
|
() => /* @__PURE__ */ r(Re, { ref: c }),
|
|
422
426
|
[]
|
|
423
|
-
),
|
|
424
|
-
let
|
|
425
|
-
function
|
|
427
|
+
), a = {};
|
|
428
|
+
let u;
|
|
429
|
+
function s(f) {
|
|
426
430
|
let C, g;
|
|
427
431
|
if (c.current) {
|
|
428
432
|
const y = c.current.getContextConfig();
|
|
429
433
|
g = y.rtl, C = y.prefixCls;
|
|
430
434
|
}
|
|
431
|
-
const b = d || C,
|
|
435
|
+
const b = d || C, m = {
|
|
432
436
|
position: "top",
|
|
433
437
|
duration: t,
|
|
434
438
|
...f
|
|
435
|
-
}, { position: n, transitionClassNames: p } =
|
|
439
|
+
}, { position: n, transitionClassNames: p } = m;
|
|
436
440
|
let x;
|
|
437
|
-
const v =
|
|
441
|
+
const v = a[n];
|
|
438
442
|
if (v) {
|
|
439
443
|
const y = v.notices;
|
|
440
|
-
y.length >= o ? (x = y[0].id, v.shift(), v.add({ ...
|
|
444
|
+
y.length >= o ? (x = y[0].id, v.shift(), v.add({ ...m, id: x })) : x = v.add(m);
|
|
441
445
|
} else
|
|
442
|
-
|
|
446
|
+
u = /* @__PURE__ */ r(
|
|
443
447
|
E,
|
|
444
448
|
{
|
|
445
|
-
...
|
|
449
|
+
...m,
|
|
446
450
|
transitionClassNames: p,
|
|
447
451
|
prefixCls: b,
|
|
448
452
|
rtl: g,
|
|
449
453
|
ref: (y) => {
|
|
450
|
-
|
|
454
|
+
a[n] = y;
|
|
451
455
|
}
|
|
452
456
|
}
|
|
453
|
-
), c.current.addInstance(
|
|
457
|
+
), c.current.addInstance(u);
|
|
454
458
|
return () => {
|
|
455
|
-
var y,
|
|
456
|
-
(
|
|
459
|
+
var y, M;
|
|
460
|
+
(M = (y = a[n]) == null ? void 0 : y.remove) == null || M.call(y, x);
|
|
457
461
|
};
|
|
458
462
|
}
|
|
459
|
-
const
|
|
463
|
+
const l = {};
|
|
460
464
|
return ye.forEach((f) => {
|
|
461
|
-
|
|
465
|
+
l[f] = (C) => {
|
|
462
466
|
const g = Ke(C) ? { content: C } : C;
|
|
463
|
-
return
|
|
467
|
+
return s({
|
|
464
468
|
...g,
|
|
465
469
|
type: f
|
|
466
470
|
});
|
|
467
471
|
};
|
|
468
|
-
}), [
|
|
472
|
+
}), [l, i];
|
|
469
473
|
}
|
|
470
474
|
const ye = [...ee];
|
|
471
|
-
let
|
|
475
|
+
let k = {}, Ne, $e, Pe, W, Ee, Ie;
|
|
472
476
|
function it(e) {
|
|
473
477
|
const {
|
|
474
478
|
transitionClassNames: o,
|
|
475
479
|
transitionTimeout: t,
|
|
476
480
|
prefixCls: d,
|
|
477
481
|
rtl: c,
|
|
478
|
-
closable:
|
|
479
|
-
notices:
|
|
480
|
-
position:
|
|
482
|
+
closable: i,
|
|
483
|
+
notices: a,
|
|
484
|
+
position: u
|
|
481
485
|
} = e;
|
|
482
|
-
function
|
|
486
|
+
function s(n) {
|
|
483
487
|
const p = e.notices.find((x) => x.id === n);
|
|
484
488
|
p && e.update({
|
|
485
489
|
...p,
|
|
@@ -491,14 +495,14 @@ function it(e) {
|
|
|
491
495
|
I(() => (e.add(e), () => {
|
|
492
496
|
e.clear();
|
|
493
497
|
}), []);
|
|
494
|
-
const
|
|
498
|
+
const l = d || $e, f = H(c) ? Ee : c, C = H(i) ? Ie : i, g = l ? `${l}-message` : "pqb-message", b = {
|
|
495
499
|
enter: _(t == null ? void 0 : t.enter) ? t == null ? void 0 : t.enter : 100,
|
|
496
500
|
exit: _(t == null ? void 0 : t.exit) ? t == null ? void 0 : t.exit : 300
|
|
497
|
-
},
|
|
501
|
+
}, m = U(
|
|
498
502
|
`${g}-wrapper`,
|
|
499
|
-
`${g}-wrapper-${
|
|
503
|
+
`${g}-wrapper-${u}`
|
|
500
504
|
);
|
|
501
|
-
return /* @__PURE__ */ r("div", { className:
|
|
505
|
+
return /* @__PURE__ */ r("div", { className: m, children: /* @__PURE__ */ r(de, { component: null, children: a.map((n) => /* @__PURE__ */ r(
|
|
502
506
|
me,
|
|
503
507
|
{
|
|
504
508
|
timeout: b,
|
|
@@ -518,9 +522,9 @@ function it(e) {
|
|
|
518
522
|
{
|
|
519
523
|
...n,
|
|
520
524
|
prefixCls: g,
|
|
521
|
-
classPrefixCls:
|
|
522
|
-
iconPrefix:
|
|
523
|
-
onClose:
|
|
525
|
+
classPrefixCls: l,
|
|
526
|
+
iconPrefix: l,
|
|
527
|
+
onClose: s,
|
|
524
528
|
noticeType: "message",
|
|
525
529
|
rtl: f,
|
|
526
530
|
...H(C) ? {} : { closable: C }
|
|
@@ -533,10 +537,10 @@ function it(e) {
|
|
|
533
537
|
const E = pe(it);
|
|
534
538
|
E.config = (e = {}) => {
|
|
535
539
|
var o;
|
|
536
|
-
_(e.maxCount) && (Ne = e.maxCount), e.prefixCls && ($e = e.prefixCls), _(e.duration) && (Pe = e.duration), typeof e.rtl == "boolean" && (Ee = e.rtl), typeof e.closable == "boolean" && (Ie = e.closable), ((o = e.getContainer) == null ? void 0 : o.call(e)) !== W && (W = e.getContainer(), Object.values(
|
|
540
|
+
_(e.maxCount) && (Ne = e.maxCount), e.prefixCls && ($e = e.prefixCls), _(e.duration) && (Pe = e.duration), typeof e.rtl == "boolean" && (Ee = e.rtl), typeof e.closable == "boolean" && (Ie = e.closable), ((o = e.getContainer) == null ? void 0 : o.call(e)) !== W && (W = e.getContainer(), Object.values(k).forEach((t) => t == null ? void 0 : t.clear()), k = {});
|
|
537
541
|
};
|
|
538
542
|
E.clear = () => {
|
|
539
|
-
Object.values(
|
|
543
|
+
Object.values(k).forEach((e) => {
|
|
540
544
|
e == null || e.clear();
|
|
541
545
|
});
|
|
542
546
|
};
|
|
@@ -546,22 +550,23 @@ E.addInstance = (e) => {
|
|
|
546
550
|
duration: Pe,
|
|
547
551
|
...e
|
|
548
552
|
}, { position: t, transitionClassNames: d, transitionTimeout: c } = o;
|
|
549
|
-
let
|
|
550
|
-
const
|
|
551
|
-
if (
|
|
552
|
-
const
|
|
553
|
+
let i;
|
|
554
|
+
const a = k[t];
|
|
555
|
+
if (a) {
|
|
556
|
+
const s = a.notices.find(
|
|
553
557
|
(f) => f.id === e.id
|
|
554
|
-
),
|
|
558
|
+
), l = {
|
|
555
559
|
...o,
|
|
556
|
-
update:
|
|
560
|
+
update: s
|
|
557
561
|
};
|
|
558
|
-
|
|
559
|
-
...
|
|
560
|
-
id:
|
|
561
|
-
}) : (
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
|
|
562
|
+
a.notices.length >= Ne ? s ? a.add({
|
|
563
|
+
...l,
|
|
564
|
+
id: s.id
|
|
565
|
+
}) : (a.shift(), a.add(l)) : i = a.add(l);
|
|
566
|
+
}
|
|
567
|
+
if (a === void 0) {
|
|
568
|
+
const s = document.createElement("div");
|
|
569
|
+
(W || document.body).appendChild(s), ue(s).render(
|
|
565
570
|
/* @__PURE__ */ r(
|
|
566
571
|
E,
|
|
567
572
|
{
|
|
@@ -569,15 +574,15 @@ E.addInstance = (e) => {
|
|
|
569
574
|
transitionTimeout: c,
|
|
570
575
|
...o,
|
|
571
576
|
ref: (f) => {
|
|
572
|
-
|
|
577
|
+
k[t] = f;
|
|
573
578
|
}
|
|
574
579
|
}
|
|
575
580
|
)
|
|
576
|
-
);
|
|
581
|
+
), k[t] = null;
|
|
577
582
|
}
|
|
578
583
|
return () => {
|
|
579
|
-
var
|
|
580
|
-
(
|
|
584
|
+
var s, l;
|
|
585
|
+
(l = (s = k[t]) == null ? void 0 : s.remove) == null || l.call(s, i);
|
|
581
586
|
};
|
|
582
587
|
};
|
|
583
588
|
ye.forEach((e) => {
|
|
@@ -626,78 +631,78 @@ function oe(e) {
|
|
|
626
631
|
theme: t,
|
|
627
632
|
themeMode: d,
|
|
628
633
|
prefixCls: c,
|
|
629
|
-
children:
|
|
630
|
-
locale:
|
|
631
|
-
rtl:
|
|
632
|
-
effectGlobalNotice:
|
|
633
|
-
effectGlobalModal:
|
|
634
|
+
children: i,
|
|
635
|
+
locale: a,
|
|
636
|
+
rtl: u,
|
|
637
|
+
effectGlobalNotice: s = !0,
|
|
638
|
+
effectGlobalModal: l = !0
|
|
634
639
|
} = o, f = window.document.body;
|
|
635
640
|
I(() => {
|
|
636
|
-
t && Se(t) && Object.entries(st).forEach(([
|
|
637
|
-
const v = t[
|
|
641
|
+
t && Se(t) && Object.entries(st).forEach(([m, n], p, x) => {
|
|
642
|
+
const v = t[m];
|
|
638
643
|
if (!v) return;
|
|
639
644
|
const h = new De(v);
|
|
640
|
-
f.style.setProperty(n.default, h.lighten(0).toRgbArrayString()), t[`${
|
|
645
|
+
f.style.setProperty(n.default, h.lighten(0).toRgbArrayString()), t[`${m}Hover`] || f.style.setProperty(n.hover, h.lighten(10).toRgbArrayString()), t[`${m}Active`] || f.style.setProperty(n.active, h.lighten(-10).toRgbArrayString());
|
|
641
646
|
});
|
|
642
647
|
}, [t]), I(() => {
|
|
643
|
-
const
|
|
644
|
-
return d ?
|
|
648
|
+
const m = ["pqb-theme"];
|
|
649
|
+
return d ? m.forEach((n) => {
|
|
645
650
|
f.setAttribute(n, d);
|
|
646
|
-
}) :
|
|
651
|
+
}) : m.forEach((n) => {
|
|
647
652
|
f.removeAttribute(n);
|
|
648
653
|
}), () => {
|
|
649
654
|
};
|
|
650
655
|
}, [d]), I(() => {
|
|
651
|
-
|
|
652
|
-
}, [c,
|
|
653
|
-
function C(
|
|
654
|
-
return `${n || c}-${
|
|
656
|
+
s && (E.config({ prefixCls: c, rtl: u }), $.config({ prefixCls: c, rtl: u }));
|
|
657
|
+
}, [c, u, s]);
|
|
658
|
+
function C(m, n) {
|
|
659
|
+
return `${n || c}-${m}`;
|
|
655
660
|
}
|
|
656
661
|
const g = {
|
|
657
662
|
...Ve(o, ["children"]),
|
|
658
663
|
getPrefixCls: C
|
|
659
664
|
};
|
|
660
665
|
I(() => {
|
|
661
|
-
|
|
662
|
-
}, [
|
|
663
|
-
let b =
|
|
664
|
-
return c && c !== "pqb" && (b = /* @__PURE__ */ r(Q.Provider, { value: { prefixCls: c }, children:
|
|
666
|
+
l && Qe({ locale: a, prefixCls: c, rtl: u });
|
|
667
|
+
}, [a, c, u, l]);
|
|
668
|
+
let b = i;
|
|
669
|
+
return c && c !== "pqb" && (b = /* @__PURE__ */ r(Q.Provider, { value: { prefixCls: c }, children: i })), /* @__PURE__ */ r(R.Provider, { value: g, children: b });
|
|
665
670
|
}
|
|
666
|
-
oe.ConfigContext =
|
|
671
|
+
oe.ConfigContext = R;
|
|
667
672
|
oe.displayName = "ConfigProvider";
|
|
668
|
-
const
|
|
673
|
+
const Lt = R.Consumer;
|
|
669
674
|
function we(e, o) {
|
|
670
|
-
const t = D(
|
|
671
|
-
function s
|
|
672
|
-
c((
|
|
675
|
+
const t = D(R), [d, c] = He([]);
|
|
676
|
+
function i(s) {
|
|
677
|
+
c((l) => [...l, s]);
|
|
673
678
|
}
|
|
674
|
-
function
|
|
679
|
+
function a(s) {
|
|
675
680
|
c(
|
|
676
|
-
(
|
|
681
|
+
(l) => l.filter((f) => s !== f)
|
|
677
682
|
);
|
|
678
683
|
}
|
|
679
|
-
function
|
|
684
|
+
function u() {
|
|
680
685
|
return t;
|
|
681
686
|
}
|
|
682
687
|
return Y(o, () => ({
|
|
683
|
-
addInstance:
|
|
684
|
-
removeInstance:
|
|
685
|
-
getContextConfig:
|
|
688
|
+
addInstance: i,
|
|
689
|
+
removeInstance: a,
|
|
690
|
+
getContextConfig: u
|
|
686
691
|
})), z.Children.map(
|
|
687
692
|
d,
|
|
688
|
-
(
|
|
693
|
+
(s, l) => z.cloneElement(s, { key: l })
|
|
689
694
|
);
|
|
690
695
|
}
|
|
691
696
|
we.displayName = "ContextHolderElement";
|
|
692
697
|
const Re = X(we);
|
|
693
698
|
export {
|
|
694
|
-
|
|
699
|
+
Lt as C,
|
|
695
700
|
ge as D,
|
|
696
701
|
Xe as E,
|
|
697
702
|
fe as I,
|
|
698
703
|
E as M,
|
|
699
704
|
$ as N,
|
|
700
|
-
|
|
705
|
+
R as a,
|
|
701
706
|
oe as b,
|
|
702
707
|
ot as c,
|
|
703
708
|
Re as d,
|