@unicom-cloud/ui 0.8.77 → 0.8.79
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 +3 -3
- package/Alert.js +3 -3
- package/AutoComplete.js +5 -5
- package/BackTop.js +5 -5
- package/Badge.js +3 -3
- package/Breadcrumb.js +4 -4
- package/Button.js +2 -2
- package/Calendar.js +4 -4
- package/Card.js +2 -2
- package/Carousel.js +2 -2
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +3 -3
- package/Comment.js +2 -2
- package/ConfigProvider.js +1 -1
- package/Copy.js +4 -4
- package/DatePicker.js +1 -1
- package/Descriptions.js +2 -2
- package/Divider.js +2 -2
- package/Draggable.js +2 -2
- package/Dropdown.js +5 -5
- package/Empty.js +2 -2
- package/Icon.js +9 -5
- package/IconHover.js +2 -2
- package/Image.js +1 -1
- package/InputNumber.js +3 -3
- package/Layout.js +2 -2
- package/Link.js +3 -3
- package/List.js +4 -4
- package/Mentions.js +5 -5
- package/Menu.js +1 -1
- package/Message.js +3 -3
- package/Modal.js +1 -1
- package/Notice.js +9 -8
- package/Notification.js +3 -3
- package/OverflowEllipsis.js +2 -2
- package/PageHeader.js +3 -3
- package/Pagination.js +1 -1
- package/Popconfirm.js +3 -3
- package/Popover.js +3 -3
- package/Progress.js +2 -2
- package/Radio.js +1 -1
- package/Rate.js +3 -3
- package/ResizeBox.js +3 -3
- package/Result.js +2 -2
- package/Select.js +1 -1
- package/SelectView.js +5 -6
- package/Skeleton.js +2 -2
- package/Slider.js +4 -4
- package/Space.js +2 -2
- package/SpeechSynthesis.js +18 -20
- package/Spin.js +3 -3
- package/Statistic.js +3 -3
- package/Steps.js +2 -2
- package/Switch.js +7 -8
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +3 -3
- package/Tooltip.js +3 -3
- package/Transfer.js +4 -4
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +9 -10
- package/Typography.js +1 -1
- package/affix/index.js +17 -17
- package/alert/index.js +13 -13
- package/anchor/Anchor.js +40 -40
- package/anchor/Link.js +14 -14
- package/anchor/util.js +2 -2
- package/auto-complete/index.js +5 -5
- package/avatar/Avatar.js +17 -17
- package/avatar/Group.js +13 -13
- package/back-top/index.js +13 -13
- package/badge/Count.js +13 -13
- package/badge/index.js +21 -21
- package/breadcrumb/Item.js +25 -25
- package/breadcrumb/index.js +12 -12
- package/button/Group.js +6 -6
- package/button/index.js +30 -30
- package/calendar/Month.js +2 -2
- package/calendar/Year.js +1 -1
- package/calendar/index.js +4 -4
- package/card/Grid.js +13 -13
- package/card/Meta.js +13 -13
- package/card/index.js +29 -29
- package/carousel/Arrow.js +6 -6
- package/carousel/Indicator.js +27 -27
- package/carousel/index.js +24 -24
- package/cascader/Cascader.js +8 -8
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +4 -4
- package/checkbox/Group.js +4 -4
- package/checkbox/GroupBlock.js +3 -3
- package/checkbox/index.js +2 -2
- package/chunk/{ZrBrCzQX.js → B4WG1mhs.js} +6 -7
- package/chunk/{Cwm8LL5p.js → B4mZh-RK.js} +7245 -7249
- package/chunk/{CjqvxJml.js → BG7YGUsx.js} +32 -32
- package/chunk/{BhBEMwvI.js → BNevupAU.js} +18 -20
- package/chunk/BYdIoY50.js +17 -0
- package/chunk/{Cc_-i0o_.js → BZ3igxQN.js} +6 -7
- package/chunk/{uEGHykhe.js → BZ9g7J4R.js} +1 -1
- package/chunk/BsUZRQDT.js +23 -0
- package/chunk/{CBgu99gQ.js → C5X4hOkx.js} +130 -130
- package/chunk/{B0n0iRhF.js → CCKr5jj1.js} +1 -1
- package/chunk/{CNcLypMY.js → CQvM33Vg.js} +190 -189
- package/chunk/CXPOj2uy.js +19 -0
- package/chunk/{DAAff-FT.js → ClM74To2.js} +9 -10
- package/chunk/{RS6OAxzv.js → D-ap9qEk.js} +2 -2
- package/chunk/{tpmioyz1.js → DEiyXzBZ.js} +28 -28
- package/chunk/{CplLA01W.js → DEuVgCzp.js} +45 -52
- package/chunk/{BPQXH_5i.js → DYspELhF.js} +43 -43
- package/chunk/DxYoPlum.js +50 -0
- package/chunk/{BpYX5PN4.js → NPajzdOv.js} +2 -2
- package/chunk/{BBkdXHrJ.js → rT6qmv-Y.js} +1 -1
- package/chunk/{BC5fEyWK.js → yLRv5RIK.js} +61 -61
- package/chunk/{C_4I3haT.js → yhU2zeeu.js} +96 -96
- package/collapse/Collapse.js +4 -4
- package/collapse/Item.js +4 -4
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +22 -22
- 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 +4 -4
- package/color-picker/index.js +3 -3
- package/comment/index.js +18 -18
- package/config-provider/ConfigProvider.js +2 -2
- package/config-provider/context.js +2 -2
- package/config-provider/index.js +2 -2
- package/copy/index.js +23 -23
- package/date-picker/Picker.js +41 -41
- package/date-picker/PickerRange.js +3 -3
- package/date-picker/index.js +1 -1
- package/descriptions/index.js +28 -28
- package/divider/index.js +15 -15
- package/draggable/Item.js +11 -11
- package/draggable/index.js +15 -15
- package/drawer/Drawer.js +31 -31
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +22 -22
- package/empty/index.js +2 -2
- package/form/Control.js +46 -46
- package/form/Form.js +12 -12
- package/form/FormItem.js +12 -12
- package/form/FormLabel.js +11 -11
- package/form/context.js +7 -6
- package/form/promisify.js +9 -10
- package/form/store.js +1 -1
- package/form/util.js +1 -1
- package/grid/Col.js +38 -38
- package/grid/Row.js +15 -15
- package/grid/grid-item.js +17 -17
- package/grid/grid.js +28 -28
- package/hooks/index.js +6 -6
- package/hooks/useInView.js +1 -1
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useKeyboardEvent.js +1 -1
- package/hooks/useMergeValue.js +1 -1
- package/hooks/useOverrideRef.js +1 -1
- package/hooks/usePrefersColorSchemeDark.js +1 -1
- package/hooks/useVerificationCode.js +30 -30
- package/icon/index.js +20 -16
- package/icon-hover/index.js +2 -2
- package/image/Image.js +22 -22
- package/image/ImageFooter.js +2 -2
- package/image/ImagePreview.js +11 -11
- package/image/ImagePreviewArrow.js +16 -16
- package/image/ImagePreviewGroup.js +2 -2
- package/image/ImagePreviewToolbar.js +7 -7
- package/image/TriggerForToolbar.js +7 -7
- package/image/index.js +1 -1
- package/index.js +547 -580
- package/input/Group.js +10 -10
- package/input/Input.js +213 -214
- package/input/InputElement.js +10 -11
- package/input/Password.js +4 -4
- package/input/Search.js +3 -3
- package/input/Textarea.js +7 -8
- package/input/useComposition.js +6 -6
- package/input-number/index.js +3 -3
- package/input-tag/InputTag.js +110 -111
- package/layout/Content.js +4 -4
- package/layout/Footer.js +6 -6
- package/layout/Header.js +8 -8
- package/layout/Sider.js +29 -29
- package/layout/index.js +16 -16
- package/link/index.js +27 -27
- package/list/Item.js +5 -5
- package/list/Meta.js +11 -11
- package/list/index.js +4 -4
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/mentions/index.js +5 -5
- package/menu/Item.js +11 -11
- package/menu/ItemGroup.js +8 -8
- package/menu/Menu.js +5 -5
- package/menu/OverflowWrap.js +2 -2
- package/menu/index.js +2 -2
- package/message/index.js +3 -3
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +7 -7
- package/modal/index.js +1 -1
- package/notice/index.js +9 -8
- package/notification/index.js +3 -3
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +6 -6
- package/overflow-ellipsis/index.js +27 -27
- package/package.json +1 -1
- package/page-header/index.js +3 -3
- package/pagination/PageItem.js +7 -7
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +3 -3
- package/pagination/Pagination.js +4 -4
- package/pagination/index.js +1 -1
- package/picker/Input.js +7 -7
- package/picker/InputRange.js +77 -77
- package/popconfirm/index.js +11 -11
- package/popover/index.js +21 -21
- package/progress/CircleProgress.js +14 -14
- package/progress/LineProgess.js +14 -14
- package/progress/StepProgress.js +9 -9
- package/progress/index.js +26 -26
- package/radio/Group.js +4 -4
- package/radio/GroupBlock.js +3 -3
- package/radio/Radio.js +4 -4
- package/radio/index.js +2 -2
- package/rate/index.js +16 -16
- package/resize-box/ResizeTrigger.js +27 -28
- package/resize-box/Split.js +21 -21
- package/resize-box/SplitGroup.js +40 -40
- package/resize-box/index.js +23 -23
- package/result/index.js +29 -29
- package/select/Option.js +2 -2
- package/select/Select.js +11 -12
- package/select/index.js +2 -2
- package/select/util.js +5 -5
- package/select-view/Core.js +104 -106
- package/select-view/index.js +22 -23
- package/skeleton/Image.js +14 -14
- package/skeleton/Text.js +16 -16
- package/skeleton/index.js +11 -11
- package/slider/Button.js +4 -4
- package/slider/Dot.js +9 -9
- package/slider/Input.js +20 -20
- package/slider/Tick.js +14 -14
- package/slider/index.js +103 -103
- package/slider/util.js +3 -3
- package/space/index.js +14 -14
- package/speech-synthesis/index.js +26 -28
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +16 -16
- package/statistic/Countdown.js +17 -17
- package/statistic/index.js +32 -32
- package/steps/Step.js +8 -8
- package/steps/index.js +17 -17
- package/style.css +1 -1
- package/switch/index.js +32 -33
- package/table/Table.js +5 -5
- package/table/index.js +1 -1
- package/tabs/Tab.js +4 -4
- package/tabs/TabContent.js +3 -3
- package/tabs/TabPane.js +11 -11
- package/tabs/index.js +2 -2
- package/tabs/util.js +1 -1
- package/tag/index.js +16 -16
- package/time-picker/Picker.js +50 -50
- package/time-picker/TimeColumn.js +8 -8
- package/time-picker/TimePicker.js +32 -32
- package/time-picker/util.js +1 -1
- package/timeline/Item.js +15 -15
- package/timeline/Timeline.js +24 -24
- package/tooltip/index.js +23 -23
- package/transfer/Item.js +4 -4
- package/transfer/List.js +4 -4
- package/transfer/index.js +4 -4
- package/tree/Animation.js +3 -3
- package/tree/Node.js +3 -3
- package/tree/NodeList.js +2 -2
- package/tree/Tree.js +4 -4
- package/tree/index.js +1 -1
- package/tree-select/List.js +2 -2
- package/tree-select/Select.js +8 -9
- package/tree-select/index.js +2 -2
- package/trigger/getPopupStyle.js +18 -19
- package/trigger/index.js +32 -33
- package/types/button/index.d.ts +2 -2
- package/types/color-picker/colors.d.ts +1 -1
- package/types/date-picker/util.d.ts +1 -1
- package/types/icon/index.d.ts +3 -1
- package/types/index.d.ts +1 -1
- package/types/menu/context.d.ts +1 -1
- package/typography/Base.js +33 -35
- package/typography/EditContent.js +16 -16
- package/typography/Ellipsis.js +24 -26
- package/typography/Operations.js +1 -1
- package/typography/Paragraph.js +8 -8
- package/typography/Typography.js +7 -7
- package/typography/index.js +1 -1
- package/upload/TriggerNode.js +8 -8
- package/upload/Upload.js +64 -65
- package/upload/Uploader.js +12 -12
- package/upload/request.js +13 -12
- package/upload/request_.js +5 -6
- package/utils/PqbCSSTransition.js +1 -1
- package/utils/caseName.js +4 -3
- package/utils/className.js +4 -3
- package/utils/constant.js +3 -3
- package/utils/contextHolder.js +1 -1
- package/utils/copy.js +5 -4
- package/utils/fileToURL.js +4 -3
- package/utils/index.js +261 -298
- package/utils/is.js +78 -115
- package/utils/keyboardCode.js +4 -26
- package/utils/math.js +10 -32
- package/utils/react19Adapter.js +1 -1
- package/utils/reactDOM.js +1 -1
- package/utils/saveAs.js +4 -3
- package/utils/screenfull.js +4 -3
- package/utils/scrollIntoView.js +1 -1
- package/utils/setDarkTheme.js +1 -1
- package/utils/tree.js +7 -83
- package/utils/tween.js +1 -1
- package/utils/validate.js +1 -1
- package/verification-code/VerificationCode.js +25 -25
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +1 -1
- package/watermark/Watermark.js +8 -8
- package/chunk/ATwvJ8j2.js +0 -6
- package/chunk/BFmckYou.js +0 -25
- package/chunk/Bl7BnD1R.js +0 -119
- package/chunk/Bmvhjhzq.js +0 -24
- package/chunk/BrOW642m.js +0 -130
- package/chunk/C0pRaDCf.js +0 -96
- package/chunk/CBzE-PUr.js +0 -23
- package/chunk/CUFsOxJ2.js +0 -10
- package/chunk/Ce1j9KTi.js +0 -6
- package/chunk/D0Dlbc2g.js +0 -41
- package/chunk/DRTWRsgI.js +0 -34
- package/chunk/DeV0v__J.js +0 -20
- package/chunk/DohlrJ4S.js +0 -50
- package/chunk/XTEsYGuF.js +0 -17
- package/chunk/yl4BU7Sd.js +0 -1068
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
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
8
|
import { u as re } from "./BFTV6myl.js";
|
|
9
9
|
import { b as ge } from "./BJ9_azwQ.js";
|
|
10
10
|
import j from "lodash/isNumber";
|
|
@@ -13,24 +13,25 @@ import { createRoot as he } from "react-dom/client";
|
|
|
13
13
|
import Ge from "@unicom-cloud/icons/IconUiCheckCircleFill";
|
|
14
14
|
import pe from "@unicom-cloud/icons/IconUiClose";
|
|
15
15
|
import Qe from "@unicom-cloud/icons/IconUiCloseCircleFill";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
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";
|
|
22
26
|
import "lodash/isEqualWith";
|
|
23
|
-
import "./
|
|
27
|
+
import "./ClM74To2.js";
|
|
28
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
24
29
|
import "../utils/dom.js";
|
|
25
|
-
import "./
|
|
26
|
-
import "./
|
|
27
|
-
import "
|
|
30
|
+
import "./B4WG1mhs.js";
|
|
31
|
+
import "./BZ3igxQN.js";
|
|
32
|
+
import "@unicom-cloud/utils/constant";
|
|
28
33
|
import "lodash/debounce";
|
|
29
|
-
import
|
|
30
|
-
import { P as xe } from "./BpYX5PN4.js";
|
|
31
|
-
import ve from "../notification/withNotification.js";
|
|
32
|
-
import Ye from "lodash/isString";
|
|
33
|
-
import { setConfigProviderProps as Ze } from "../modal/config.js";
|
|
34
|
+
import Ze from "lodash/isString";
|
|
34
35
|
const et = {
|
|
35
36
|
primaryColor: {
|
|
36
37
|
default: "--pqbblue-6",
|
|
@@ -59,10 +60,10 @@ const et = {
|
|
|
59
60
|
}
|
|
60
61
|
};
|
|
61
62
|
function tt(e) {
|
|
62
|
-
|
|
63
|
+
Fe(e) && Object.entries(et).forEach(([o, t], c, a) => {
|
|
63
64
|
const r = e[o];
|
|
64
65
|
if (!r) return;
|
|
65
|
-
const i = new
|
|
66
|
+
const i = new Se(r), d = window.document.documentElement;
|
|
66
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());
|
|
67
68
|
});
|
|
68
69
|
}
|
|
@@ -71,30 +72,30 @@ function ot(e, o) {
|
|
|
71
72
|
getPrefixCls: t,
|
|
72
73
|
locale: c,
|
|
73
74
|
componentConfig: a
|
|
74
|
-
} =
|
|
75
|
+
} = U(w), r = re(
|
|
75
76
|
e,
|
|
76
77
|
{},
|
|
77
78
|
a == null ? void 0 : a.Empty
|
|
78
|
-
), { style: i, className: d, description: s, icon: l, imgSrc:
|
|
79
|
-
return /* @__PURE__ */ n("div", { ref: o, className: v, style: i, ...
|
|
80
|
-
/* @__PURE__ */ n("div", { className: `${C}-image`, children:
|
|
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, {}) }),
|
|
81
82
|
/* @__PURE__ */ n("div", { className: `${C}-description`, children: s || g })
|
|
82
83
|
] }) });
|
|
83
84
|
}
|
|
84
|
-
const be =
|
|
85
|
+
const be = te(ot);
|
|
85
86
|
be.displayName = "Empty";
|
|
86
87
|
const rt = Q.memo(be);
|
|
87
88
|
function nt(e) {
|
|
88
89
|
return /* @__PURE__ */ n(rt, {});
|
|
89
90
|
}
|
|
90
91
|
const Ne = {
|
|
91
|
-
locale:
|
|
92
|
-
prefixCls:
|
|
92
|
+
locale: Ye,
|
|
93
|
+
prefixCls: ee,
|
|
93
94
|
getPopupContainer: () => document.body,
|
|
94
95
|
size: "default",
|
|
95
96
|
renderEmpty: nt
|
|
96
|
-
}, w =
|
|
97
|
-
getPrefixCls: (e, o) => `${o ||
|
|
97
|
+
}, w = Le({
|
|
98
|
+
getPrefixCls: (e, o) => `${o || ee}-${e}`,
|
|
98
99
|
...Ne
|
|
99
100
|
});
|
|
100
101
|
function it(e, o) {
|
|
@@ -105,14 +106,14 @@ function it(e, o) {
|
|
|
105
106
|
prefix: r,
|
|
106
107
|
size: i = "default",
|
|
107
108
|
...d
|
|
108
|
-
} = e, { getPrefixCls: s } =
|
|
109
|
-
return
|
|
110
|
-
getRootDOMNode: () =>
|
|
109
|
+
} = e, { getPrefixCls: s } = U(w), l = s("icon-hover"), m = k();
|
|
110
|
+
return oe(o, () => ({
|
|
111
|
+
getRootDOMNode: () => m.current
|
|
111
112
|
})), /* @__PURE__ */ n(
|
|
112
113
|
"span",
|
|
113
114
|
{
|
|
114
|
-
ref:
|
|
115
|
-
className:
|
|
115
|
+
ref: m,
|
|
116
|
+
className: F(
|
|
116
117
|
l,
|
|
117
118
|
{
|
|
118
119
|
[`${r}-icon-hover`]: r,
|
|
@@ -138,14 +139,14 @@ function ct(e, o) {
|
|
|
138
139
|
getPrefixCls: t,
|
|
139
140
|
componentConfig: c,
|
|
140
141
|
rtl: a
|
|
141
|
-
} =
|
|
142
|
+
} = U(w), r = re(
|
|
142
143
|
e,
|
|
143
144
|
st,
|
|
144
145
|
c == null ? void 0 : c.Notice
|
|
145
|
-
), i =
|
|
146
|
+
), i = U(w), d = t("notice");
|
|
146
147
|
k();
|
|
147
|
-
const s = k(), l = k(),
|
|
148
|
-
title:
|
|
148
|
+
const s = k(), l = k(), m = k(), {
|
|
149
|
+
title: u,
|
|
149
150
|
content: C,
|
|
150
151
|
showIcon: v,
|
|
151
152
|
className: g,
|
|
@@ -158,9 +159,9 @@ function ct(e, o) {
|
|
|
158
159
|
noticeType: R,
|
|
159
160
|
iconPrefix: ce,
|
|
160
161
|
rtl: je = a,
|
|
161
|
-
closeIcon:
|
|
162
|
+
closeIcon: S,
|
|
162
163
|
classPrefixCls: le
|
|
163
|
-
} = r, qe =
|
|
164
|
+
} = r, qe = F(
|
|
164
165
|
x,
|
|
165
166
|
`${x}-${p}`,
|
|
166
167
|
{
|
|
@@ -169,35 +170,35 @@ function ct(e, o) {
|
|
|
169
170
|
},
|
|
170
171
|
g
|
|
171
172
|
);
|
|
172
|
-
let
|
|
173
|
-
p === "normal" && !N && (
|
|
173
|
+
let X = "closable" in r ? b : !0, B = v;
|
|
174
|
+
p === "normal" && !N && (B = !1);
|
|
174
175
|
const ae = { ...i };
|
|
175
176
|
le && (ae.prefixCls = le);
|
|
176
177
|
function He() {
|
|
177
178
|
return l.current;
|
|
178
179
|
}
|
|
179
|
-
function
|
|
180
|
-
const { duration:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
},
|
|
180
|
+
function J() {
|
|
181
|
+
const { duration: $, onClose: O, id: K } = r;
|
|
182
|
+
$ !== 0 && (s.current = window.setTimeout(() => {
|
|
183
|
+
O == null || O(K), q();
|
|
184
|
+
}, $));
|
|
184
185
|
}
|
|
185
186
|
function q() {
|
|
186
187
|
s.current && (window.clearTimeout(s.current), s.current = null);
|
|
187
188
|
}
|
|
188
189
|
function L() {
|
|
189
|
-
var
|
|
190
|
-
(
|
|
190
|
+
var $;
|
|
191
|
+
($ = r.onClose) == null || $.call(r, r.id);
|
|
191
192
|
}
|
|
192
193
|
function fe() {
|
|
193
|
-
const { showIcon:
|
|
194
|
+
const { showIcon: $, icon: O, type: K, iconPrefix: de } = r;
|
|
194
195
|
let P;
|
|
195
|
-
if (
|
|
196
|
-
P =
|
|
197
|
-
else if (
|
|
198
|
-
switch (
|
|
196
|
+
if (O)
|
|
197
|
+
P = O;
|
|
198
|
+
else if ($) {
|
|
199
|
+
switch (K) {
|
|
199
200
|
case "info":
|
|
200
|
-
P = /* @__PURE__ */ n(
|
|
201
|
+
P = /* @__PURE__ */ n(Be, {});
|
|
201
202
|
break;
|
|
202
203
|
case "success":
|
|
203
204
|
P = /* @__PURE__ */ n(Ge, {});
|
|
@@ -206,14 +207,14 @@ function ct(e, o) {
|
|
|
206
207
|
P = /* @__PURE__ */ n(Qe, {});
|
|
207
208
|
break;
|
|
208
209
|
case "warning":
|
|
209
|
-
P = /* @__PURE__ */ n(
|
|
210
|
+
P = /* @__PURE__ */ n(Xe, {});
|
|
210
211
|
break;
|
|
211
212
|
case "loading":
|
|
212
|
-
P = /* @__PURE__ */ n(
|
|
213
|
+
P = /* @__PURE__ */ n(Je, {});
|
|
213
214
|
break;
|
|
214
215
|
}
|
|
215
216
|
P = /* @__PURE__ */ n(
|
|
216
|
-
|
|
217
|
+
W.Provider,
|
|
217
218
|
{
|
|
218
219
|
value: de ? { prefixCls: de } : {},
|
|
219
220
|
children: P
|
|
@@ -222,26 +223,26 @@ function ct(e, o) {
|
|
|
222
223
|
}
|
|
223
224
|
return /* @__PURE__ */ n("span", { className: `${x}-icon`, children: P });
|
|
224
225
|
}
|
|
225
|
-
function
|
|
226
|
+
function Ue() {
|
|
226
227
|
q();
|
|
227
228
|
}
|
|
228
|
-
function
|
|
229
|
-
q(),
|
|
229
|
+
function De() {
|
|
230
|
+
q(), J();
|
|
230
231
|
}
|
|
231
|
-
|
|
232
|
+
oe(o, () => ({
|
|
232
233
|
getRootDOMNode: He
|
|
233
|
-
}), []),
|
|
234
|
-
const
|
|
235
|
-
return (
|
|
234
|
+
}), []), _(() => {
|
|
235
|
+
const $ = m.current;
|
|
236
|
+
return ($ && ($ == null ? void 0 : $.duration) !== r.duration || r.update) && (q(), J()), m.current = r, () => {
|
|
236
237
|
};
|
|
237
|
-
}, [r.duration, r.update]),
|
|
238
|
+
}, [r.duration, r.update]), _(() => (J(), () => {
|
|
238
239
|
q();
|
|
239
240
|
}), []);
|
|
240
|
-
let
|
|
241
|
-
return R === "message" && (
|
|
242
|
-
|
|
241
|
+
let T;
|
|
242
|
+
return R === "message" && (X = b, T = /* @__PURE__ */ G(me, { children: [
|
|
243
|
+
B && fe(),
|
|
243
244
|
/* @__PURE__ */ n("span", { className: `${x}-content`, children: C }),
|
|
244
|
-
|
|
245
|
+
X && (S !== void 0 ? /* @__PURE__ */ n("span", { onClick: L, className: `${x}-close-btn`, children: S }) : /* @__PURE__ */ n(
|
|
245
246
|
Ce,
|
|
246
247
|
{
|
|
247
248
|
prefix: x,
|
|
@@ -250,21 +251,21 @@ function ct(e, o) {
|
|
|
250
251
|
children: /* @__PURE__ */ n(pe, {})
|
|
251
252
|
}
|
|
252
253
|
))
|
|
253
|
-
] })), R === "notification" && (
|
|
254
|
-
|
|
254
|
+
] })), R === "notification" && (T = /* @__PURE__ */ G(me, { children: [
|
|
255
|
+
B && /* @__PURE__ */ n("div", { className: `${x}-left`, children: fe() }),
|
|
255
256
|
/* @__PURE__ */ G("div", { className: `${x}-right`, children: [
|
|
256
|
-
|
|
257
|
+
u && /* @__PURE__ */ n("div", { className: `${x}-title`, children: u }),
|
|
257
258
|
/* @__PURE__ */ n("div", { className: `${x}-content`, children: C }),
|
|
258
259
|
h && /* @__PURE__ */ n("div", { className: `${x}-btn-wrapper`, children: h })
|
|
259
260
|
] }),
|
|
260
|
-
|
|
261
|
+
X && (S !== void 0 ? /* @__PURE__ */ n("span", { onClick: L, className: `${x}-close-btn`, children: S }) : /* @__PURE__ */ n(
|
|
261
262
|
Ce,
|
|
262
263
|
{
|
|
263
264
|
prefix: x,
|
|
264
265
|
className: `${x}-close-btn`,
|
|
265
266
|
onClick: L,
|
|
266
267
|
children: /* @__PURE__ */ n(
|
|
267
|
-
|
|
268
|
+
W.Provider,
|
|
268
269
|
{
|
|
269
270
|
value: ce ? { prefixCls: ce } : {},
|
|
270
271
|
children: /* @__PURE__ */ n(pe, {})
|
|
@@ -272,35 +273,59 @@ function ct(e, o) {
|
|
|
272
273
|
)
|
|
273
274
|
}
|
|
274
275
|
))
|
|
275
|
-
] })),
|
|
276
|
+
] })), T && (T = /* @__PURE__ */ n(se, { ...ae, childrenName: "notice", children: /* @__PURE__ */ n(
|
|
276
277
|
"div",
|
|
277
278
|
{
|
|
278
279
|
ref: l,
|
|
279
280
|
className: `${d}-${R}`,
|
|
280
|
-
onMouseEnter:
|
|
281
|
-
onMouseLeave:
|
|
282
|
-
children: /* @__PURE__ */ n("div", { className: qe, style: f, role: "alert", children:
|
|
281
|
+
onMouseEnter: Ue,
|
|
282
|
+
onMouseLeave: De,
|
|
283
|
+
children: /* @__PURE__ */ n("div", { className: qe, style: f, role: "alert", children: T })
|
|
283
284
|
}
|
|
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
|
+
);
|
|
285
309
|
}
|
|
286
|
-
|
|
310
|
+
ye.displayName = "ContextHolderElement";
|
|
311
|
+
const Pe = te(ye);
|
|
287
312
|
function lt(e = {}) {
|
|
288
313
|
const {
|
|
289
314
|
maxCount: o,
|
|
290
315
|
duration: t = 3e3,
|
|
291
316
|
prefixCls: c,
|
|
292
317
|
getContainer: a
|
|
293
|
-
} = e, r = k(), i = /* @__PURE__ */ n(
|
|
318
|
+
} = e, r = k(), i = /* @__PURE__ */ n(Pe, { ref: r }), d = {};
|
|
294
319
|
let s;
|
|
295
|
-
function l(
|
|
320
|
+
function l(u) {
|
|
296
321
|
let C, v;
|
|
297
322
|
if (r.current) {
|
|
298
323
|
const N = r.current.getContextConfig();
|
|
299
324
|
v = N.rtl, C = N.prefixCls;
|
|
300
325
|
}
|
|
301
|
-
const g = c || C, f = ie(
|
|
326
|
+
const g = c || C, f = ie(u.position, v), p = {
|
|
302
327
|
duration: t,
|
|
303
|
-
...
|
|
328
|
+
...u
|
|
304
329
|
}, h = d[f];
|
|
305
330
|
if (h) {
|
|
306
331
|
if (h.notices.length >= o) {
|
|
@@ -310,7 +335,7 @@ function lt(e = {}) {
|
|
|
310
335
|
h.add({ ...p });
|
|
311
336
|
} else
|
|
312
337
|
s = /* @__PURE__ */ n(
|
|
313
|
-
|
|
338
|
+
y,
|
|
314
339
|
{
|
|
315
340
|
...p,
|
|
316
341
|
prefixCls: g,
|
|
@@ -323,13 +348,13 @@ function lt(e = {}) {
|
|
|
323
348
|
), r.current.addInstance(s);
|
|
324
349
|
return d[f];
|
|
325
350
|
}
|
|
326
|
-
const
|
|
327
|
-
return ne.forEach((
|
|
328
|
-
u
|
|
351
|
+
const m = {};
|
|
352
|
+
return ne.forEach((u) => {
|
|
353
|
+
m[u] = (C) => l({
|
|
329
354
|
...C,
|
|
330
|
-
type:
|
|
355
|
+
type: u
|
|
331
356
|
});
|
|
332
|
-
}), [
|
|
357
|
+
}), [m, i];
|
|
333
358
|
}
|
|
334
359
|
const ne = [
|
|
335
360
|
"info",
|
|
@@ -339,19 +364,19 @@ const ne = [
|
|
|
339
364
|
"loading",
|
|
340
365
|
"normal"
|
|
341
366
|
];
|
|
342
|
-
let I = {}, z = [],
|
|
367
|
+
let I = {}, z = [], Ee, Ie, we, Y, D;
|
|
343
368
|
function ie(e, o) {
|
|
344
|
-
return H(e) && (e = o ||
|
|
369
|
+
return H(e) && (e = o || D ? "topLeft" : "topRight"), e;
|
|
345
370
|
}
|
|
346
371
|
function at(e) {
|
|
347
|
-
const { prefixCls: o, rtl: t, getContainer: c, notices: a } = e, r = H(t) ?
|
|
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";
|
|
348
373
|
let l;
|
|
349
374
|
i === "topLeft" || i === "bottomLeft" ? l = "slideNoticeLeft" : l = "slideNoticeRight";
|
|
350
|
-
const
|
|
375
|
+
const m = F(
|
|
351
376
|
`${s}-wrapper`,
|
|
352
377
|
`${s}-wrapper-${i}`,
|
|
353
|
-
{ [`${s}-wrapper-rtl`]:
|
|
354
|
-
),
|
|
378
|
+
{ [`${s}-wrapper-rtl`]: D }
|
|
379
|
+
), u = c == null ? void 0 : c();
|
|
355
380
|
function C(g) {
|
|
356
381
|
const f = a.find((p) => p.id === g);
|
|
357
382
|
f && e.update({
|
|
@@ -361,10 +386,10 @@ function at(e) {
|
|
|
361
386
|
e.remove(g);
|
|
362
387
|
}, 200);
|
|
363
388
|
}
|
|
364
|
-
|
|
389
|
+
_(() => (e.add(e), () => {
|
|
365
390
|
e.clear();
|
|
366
391
|
}), []);
|
|
367
|
-
const v = /* @__PURE__ */ n("div", { className:
|
|
392
|
+
const v = /* @__PURE__ */ n("div", { className: m, children: /* @__PURE__ */ n(ge, { component: null, children: a.map((g) => /* @__PURE__ */ n(
|
|
368
393
|
xe,
|
|
369
394
|
{
|
|
370
395
|
timeout: {
|
|
@@ -383,7 +408,7 @@ function at(e) {
|
|
|
383
408
|
f && (f.style.height = 0, (p = g.onClose) == null || p.call(g));
|
|
384
409
|
},
|
|
385
410
|
children: /* @__PURE__ */ n(
|
|
386
|
-
|
|
411
|
+
$e,
|
|
387
412
|
{
|
|
388
413
|
...g,
|
|
389
414
|
onClose: C,
|
|
@@ -397,32 +422,32 @@ function at(e) {
|
|
|
397
422
|
},
|
|
398
423
|
g.id
|
|
399
424
|
)) }) });
|
|
400
|
-
return
|
|
425
|
+
return u ? Ve(v, u) : v;
|
|
401
426
|
}
|
|
402
|
-
const
|
|
403
|
-
|
|
404
|
-
|
|
427
|
+
const y = ve(at);
|
|
428
|
+
y.useNotification = lt;
|
|
429
|
+
y.config = (e = {}) => {
|
|
405
430
|
var o;
|
|
406
|
-
j(e.maxCount) && (
|
|
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(
|
|
407
432
|
(t) => {
|
|
408
433
|
var c;
|
|
409
434
|
return (c = t == null ? void 0 : t.clear) == null ? void 0 : c.call(t);
|
|
410
435
|
}
|
|
411
436
|
), I = {});
|
|
412
437
|
};
|
|
413
|
-
|
|
438
|
+
y.clear = () => {
|
|
414
439
|
Object.values(I).forEach((e) => {
|
|
415
440
|
e == null || e.clear();
|
|
416
441
|
});
|
|
417
442
|
};
|
|
418
|
-
|
|
443
|
+
y.remove = (e) => {
|
|
419
444
|
Object.values(I).forEach((o) => {
|
|
420
445
|
o == null || o.remove(e);
|
|
421
446
|
});
|
|
422
447
|
};
|
|
423
|
-
|
|
424
|
-
const o = ie(e.position,
|
|
425
|
-
duration:
|
|
448
|
+
y.addInstance = (e) => {
|
|
449
|
+
const o = ie(e.position, D), t = I[o], c = {
|
|
450
|
+
duration: we,
|
|
426
451
|
...e
|
|
427
452
|
};
|
|
428
453
|
if (t) {
|
|
@@ -432,13 +457,13 @@ $.addInstance = (e) => {
|
|
|
432
457
|
...c,
|
|
433
458
|
update: a
|
|
434
459
|
};
|
|
435
|
-
t.notices.length >=
|
|
460
|
+
t.notices.length >= Ee && (a ? r.id = a.id : t.shift()), t.add({ ...r });
|
|
436
461
|
}
|
|
437
462
|
if (t === null && z.push(e), t === void 0) {
|
|
438
463
|
const a = document.createElement("div");
|
|
439
464
|
(Y || document.body).appendChild(a), he(a).render(
|
|
440
465
|
/* @__PURE__ */ n(
|
|
441
|
-
|
|
466
|
+
y,
|
|
442
467
|
{
|
|
443
468
|
...c,
|
|
444
469
|
ref: (i) => {
|
|
@@ -455,27 +480,27 @@ $.addInstance = (e) => {
|
|
|
455
480
|
return I[o];
|
|
456
481
|
};
|
|
457
482
|
ne.forEach((e) => {
|
|
458
|
-
|
|
483
|
+
y[e] = (o) => y.addInstance({
|
|
459
484
|
...o,
|
|
460
485
|
type: e
|
|
461
486
|
});
|
|
462
487
|
});
|
|
463
488
|
function ft(e = {}) {
|
|
464
|
-
const { maxCount: o, duration: t = 3e3, prefixCls: c } = e, a = k(), r =
|
|
465
|
-
() => /* @__PURE__ */ n(
|
|
489
|
+
const { maxCount: o, duration: t = 3e3, prefixCls: c } = e, a = k(), r = Ae(
|
|
490
|
+
() => /* @__PURE__ */ n(Pe, { ref: a }),
|
|
466
491
|
[]
|
|
467
492
|
), i = {};
|
|
468
493
|
let d;
|
|
469
|
-
function s(
|
|
470
|
-
let
|
|
494
|
+
function s(m) {
|
|
495
|
+
let u, C;
|
|
471
496
|
if (a.current) {
|
|
472
497
|
const b = a.current.getContextConfig();
|
|
473
|
-
C = b.rtl,
|
|
498
|
+
C = b.rtl, u = b.prefixCls;
|
|
474
499
|
}
|
|
475
|
-
const v = c ||
|
|
500
|
+
const v = c || u, g = {
|
|
476
501
|
position: "top",
|
|
477
502
|
duration: t,
|
|
478
|
-
...
|
|
503
|
+
...m
|
|
479
504
|
}, { position: f, transitionClassNames: p } = g;
|
|
480
505
|
let h;
|
|
481
506
|
const N = i[f];
|
|
@@ -501,18 +526,18 @@ function ft(e = {}) {
|
|
|
501
526
|
};
|
|
502
527
|
}
|
|
503
528
|
const l = {};
|
|
504
|
-
return
|
|
505
|
-
l[
|
|
506
|
-
const C =
|
|
529
|
+
return Re.forEach((m) => {
|
|
530
|
+
l[m] = (u) => {
|
|
531
|
+
const C = Ze(u) ? { content: u } : u;
|
|
507
532
|
return s({
|
|
508
533
|
...C,
|
|
509
|
-
type:
|
|
534
|
+
type: m
|
|
510
535
|
});
|
|
511
536
|
};
|
|
512
537
|
}), [l, r];
|
|
513
538
|
}
|
|
514
|
-
const
|
|
515
|
-
let M = {}, A = [],
|
|
539
|
+
const Re = [...ne];
|
|
540
|
+
let M = {}, A = [], ke, Me, _e, Z, Te, Oe;
|
|
516
541
|
function dt(e) {
|
|
517
542
|
const {
|
|
518
543
|
transitionClassNames: o,
|
|
@@ -532,13 +557,13 @@ function dt(e) {
|
|
|
532
557
|
e.remove(f);
|
|
533
558
|
}, 100);
|
|
534
559
|
}
|
|
535
|
-
|
|
560
|
+
_(() => (e.add(e), () => {
|
|
536
561
|
e.clear();
|
|
537
562
|
}), []);
|
|
538
|
-
const l = c ||
|
|
563
|
+
const l = c || Me, m = H(a) ? Te : a, u = H(r) ? Oe : r, C = l ? `${l}-message` : "pqb-message", v = {
|
|
539
564
|
enter: j(t == null ? void 0 : t.enter) ? t == null ? void 0 : t.enter : 100,
|
|
540
565
|
exit: j(t == null ? void 0 : t.exit) ? t == null ? void 0 : t.exit : 300
|
|
541
|
-
}, g =
|
|
566
|
+
}, g = F(
|
|
542
567
|
`${C}-wrapper`,
|
|
543
568
|
`${C}-wrapper-${d}`
|
|
544
569
|
);
|
|
@@ -558,7 +583,7 @@ function dt(e) {
|
|
|
558
583
|
p && (p.style.height = 0, (h = f.onClose) == null || h.call(f));
|
|
559
584
|
},
|
|
560
585
|
children: /* @__PURE__ */ n(
|
|
561
|
-
|
|
586
|
+
$e,
|
|
562
587
|
{
|
|
563
588
|
...f,
|
|
564
589
|
prefixCls: C,
|
|
@@ -566,8 +591,8 @@ function dt(e) {
|
|
|
566
591
|
iconPrefix: l,
|
|
567
592
|
onClose: s,
|
|
568
593
|
noticeType: "message",
|
|
569
|
-
rtl:
|
|
570
|
-
...H(
|
|
594
|
+
rtl: m,
|
|
595
|
+
...H(u) ? {} : { closable: u }
|
|
571
596
|
}
|
|
572
597
|
)
|
|
573
598
|
},
|
|
@@ -577,7 +602,7 @@ function dt(e) {
|
|
|
577
602
|
const E = ve(dt);
|
|
578
603
|
E.config = (e = {}) => {
|
|
579
604
|
var o;
|
|
580
|
-
j(e.maxCount) && (
|
|
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 = {});
|
|
581
606
|
};
|
|
582
607
|
E.clear = () => {
|
|
583
608
|
Object.values(M).forEach((e) => {
|
|
@@ -587,19 +612,19 @@ E.clear = () => {
|
|
|
587
612
|
E.addInstance = (e) => {
|
|
588
613
|
const o = {
|
|
589
614
|
position: "top",
|
|
590
|
-
duration:
|
|
615
|
+
duration: _e,
|
|
591
616
|
...e
|
|
592
617
|
}, { position: t, transitionClassNames: c, transitionTimeout: a } = o;
|
|
593
618
|
let r;
|
|
594
619
|
const i = M[t];
|
|
595
620
|
if (i) {
|
|
596
621
|
const s = i.notices.find(
|
|
597
|
-
(
|
|
622
|
+
(m) => m.id === e.id
|
|
598
623
|
), l = {
|
|
599
624
|
...o,
|
|
600
625
|
update: s
|
|
601
626
|
};
|
|
602
|
-
i.notices.length >=
|
|
627
|
+
i.notices.length >= ke ? s ? i.add({
|
|
603
628
|
...l,
|
|
604
629
|
id: s.id
|
|
605
630
|
}) : (i.shift(), i.add(l)) : r = i.add(l);
|
|
@@ -613,11 +638,11 @@ E.addInstance = (e) => {
|
|
|
613
638
|
transitionClassNames: c,
|
|
614
639
|
transitionTimeout: a,
|
|
615
640
|
...o,
|
|
616
|
-
ref: (
|
|
617
|
-
if (
|
|
618
|
-
for (let
|
|
619
|
-
|
|
620
|
-
A = [], M[t] =
|
|
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;
|
|
621
646
|
}
|
|
622
647
|
}
|
|
623
648
|
}
|
|
@@ -629,7 +654,7 @@ E.addInstance = (e) => {
|
|
|
629
654
|
(l = (s = M[t]) == null ? void 0 : s.remove) == null || l.call(s, r);
|
|
630
655
|
};
|
|
631
656
|
};
|
|
632
|
-
|
|
657
|
+
Re.forEach((e) => {
|
|
633
658
|
E[e] = (o) => {
|
|
634
659
|
const t = typeof o == "string" ? { content: o } : o;
|
|
635
660
|
return E.addInstance({
|
|
@@ -639,14 +664,14 @@ Ie.forEach((e) => {
|
|
|
639
664
|
};
|
|
640
665
|
});
|
|
641
666
|
E.useMessage = ft;
|
|
642
|
-
const
|
|
643
|
-
let
|
|
644
|
-
const
|
|
667
|
+
const mt = Ne;
|
|
668
|
+
let V = {};
|
|
669
|
+
const ut = {};
|
|
645
670
|
function se(e) {
|
|
646
671
|
const o = re(
|
|
647
672
|
e,
|
|
648
|
-
|
|
649
|
-
|
|
673
|
+
mt,
|
|
674
|
+
ut
|
|
650
675
|
), {
|
|
651
676
|
theme: t,
|
|
652
677
|
prefixCls: c,
|
|
@@ -657,67 +682,43 @@ function se(e) {
|
|
|
657
682
|
} = o, {
|
|
658
683
|
children: s,
|
|
659
684
|
isRootConfig: l,
|
|
660
|
-
keepConfig:
|
|
685
|
+
keepConfig: m,
|
|
661
686
|
// 潘启宝添加
|
|
662
|
-
...
|
|
687
|
+
...u
|
|
663
688
|
} = o;
|
|
664
|
-
(l ||
|
|
665
|
-
const C =
|
|
689
|
+
(l || m) && (V = ue({}, V, u));
|
|
690
|
+
const C = ue({}, V, u, {
|
|
666
691
|
getPrefixCls: v
|
|
667
692
|
});
|
|
668
693
|
function v(f, p) {
|
|
669
694
|
return `${p || c}-${f}`;
|
|
670
695
|
}
|
|
671
|
-
|
|
672
|
-
}), [t]),
|
|
673
|
-
i && (E.config({ prefixCls: c, rtl: r }),
|
|
674
|
-
}, [c, r, i]),
|
|
675
|
-
d &&
|
|
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 });
|
|
676
701
|
}, [a, c, r, d]);
|
|
677
702
|
let g = s;
|
|
678
|
-
return c && c !==
|
|
703
|
+
return c && c !== ee && (g = /* @__PURE__ */ n(W.Provider, { value: { prefixCls: c }, children: s })), /* @__PURE__ */ n(w.Provider, { value: C, children: g });
|
|
679
704
|
}
|
|
680
705
|
se.ConfigContext = w;
|
|
681
706
|
se.displayName = "ConfigProvider";
|
|
682
707
|
const Jt = w.Consumer;
|
|
683
|
-
function Oe(e, o) {
|
|
684
|
-
const t = D(w), [c, a] = Le([]);
|
|
685
|
-
function r(s) {
|
|
686
|
-
a((l) => [...l, s]);
|
|
687
|
-
}
|
|
688
|
-
function i(s) {
|
|
689
|
-
a(
|
|
690
|
-
(l) => l.filter((u) => s !== u)
|
|
691
|
-
);
|
|
692
|
-
}
|
|
693
|
-
function d() {
|
|
694
|
-
return t;
|
|
695
|
-
}
|
|
696
|
-
return te(o, () => ({
|
|
697
|
-
addInstance: r,
|
|
698
|
-
removeInstance: i,
|
|
699
|
-
getContextConfig: d
|
|
700
|
-
})), Q.Children.map(
|
|
701
|
-
c,
|
|
702
|
-
(s, l) => Q.cloneElement(s, { key: l })
|
|
703
|
-
);
|
|
704
|
-
}
|
|
705
|
-
Oe.displayName = "ContextHolderElement";
|
|
706
|
-
const _e = ee(Oe);
|
|
707
708
|
export {
|
|
708
709
|
Jt as C,
|
|
709
710
|
Ne as D,
|
|
710
711
|
rt as E,
|
|
711
712
|
Ce as I,
|
|
712
713
|
E as M,
|
|
713
|
-
|
|
714
|
+
y as N,
|
|
714
715
|
w as a,
|
|
715
716
|
se as b,
|
|
716
717
|
lt as c,
|
|
717
|
-
|
|
718
|
-
|
|
718
|
+
Pe as d,
|
|
719
|
+
$e as e,
|
|
719
720
|
ie as g,
|
|
720
|
-
|
|
721
|
+
Re as m,
|
|
721
722
|
ne as n,
|
|
722
723
|
ft as u
|
|
723
724
|
};
|