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