@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,60 +1,60 @@
|
|
|
1
|
-
import { jsxs as Q, jsx as
|
|
1
|
+
import { jsxs as Q, jsx as t, Fragment as De } from "react/jsx-runtime";
|
|
2
2
|
import Ke from "@unicom-cloud/icons/IconUiMenuFold";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import F, { useContext as
|
|
6
|
-
import { a as ge } from "./
|
|
7
|
-
import { u as
|
|
3
|
+
import Re from "@unicom-cloud/icons/IconUiMenuUnfold";
|
|
4
|
+
import _e from "lodash/isPlainObject";
|
|
5
|
+
import F, { useContext as A, useState as fe, forwardRef as he, useEffect as ne, useRef as te, useMemo as Ae } from "react";
|
|
6
|
+
import { a as ge } from "./CQvM33Vg.js";
|
|
7
|
+
import { u as Te } from "./CQ_WOOmf.js";
|
|
8
8
|
import { u as oe } from "./B4YRLi8r.js";
|
|
9
|
-
import { u as Ue } from "./
|
|
9
|
+
import { u as Ue } from "./BYdIoY50.js";
|
|
10
10
|
import { u as Le } from "./BFTV6myl.js";
|
|
11
|
-
import { u as Z } from "./
|
|
11
|
+
import { u as Z } from "./CXPOj2uy.js";
|
|
12
12
|
import { SiderContext as ze } from "../layout/Sider.js";
|
|
13
|
-
import
|
|
13
|
+
import U from "@unicom-cloud/utils/class-name";
|
|
14
14
|
import { o as Y } from "./BKKEev13.js";
|
|
15
15
|
import V from "../menu/context.js";
|
|
16
16
|
import Be from "../menu/Item.js";
|
|
17
17
|
import He from "../menu/ItemGroup.js";
|
|
18
18
|
import { r as Ve } from "./CIRG541s.js";
|
|
19
19
|
import { getStyle as pe } from "../utils/style.js";
|
|
20
|
-
import
|
|
20
|
+
import we from "@unicom-cloud/icons/IconUiDown";
|
|
21
21
|
import { u as We } from "./Duezix3m.js";
|
|
22
|
-
import
|
|
23
|
-
import { isChildrenSelected as be, processChildren as
|
|
24
|
-
import { P as qe } from "./
|
|
25
|
-
import {
|
|
22
|
+
import Me from "../menu/Indent.js";
|
|
23
|
+
import { isChildrenSelected as be, processChildren as ye, PROPS_NEED_TO_BE_PASSED_IN_SUBMENU as Fe, generateInfoMap as je } from "../menu/util.js";
|
|
24
|
+
import { P as qe } from "./NPajzdOv.js";
|
|
25
|
+
import { Enter as ve, ArrowLeft as Ge, ArrowRight as Qe } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
26
26
|
import { p as Ye } from "./ClqoGc3r.js";
|
|
27
27
|
import Je from "@unicom-cloud/icons/IconUiLeft";
|
|
28
28
|
import Xe from "@unicom-cloud/icons/IconUiRight";
|
|
29
29
|
import Ze from "../dropdown/index.js";
|
|
30
|
-
const ee = { height: 0, visibility: "hidden" },
|
|
30
|
+
const ee = { height: 0, visibility: "hidden" }, et = (o) => {
|
|
31
31
|
const {
|
|
32
32
|
_key: i,
|
|
33
|
-
children:
|
|
33
|
+
children: I,
|
|
34
34
|
style: m,
|
|
35
35
|
className: C,
|
|
36
|
-
title:
|
|
36
|
+
title: w,
|
|
37
37
|
level: p,
|
|
38
38
|
forwardedRef: S,
|
|
39
|
-
selectable:
|
|
39
|
+
selectable: M,
|
|
40
40
|
...k
|
|
41
41
|
} = o, {
|
|
42
42
|
id: d,
|
|
43
43
|
prefixCls: b,
|
|
44
44
|
levelIndent: f,
|
|
45
45
|
openKeys: x = [],
|
|
46
|
-
selectedKeys:
|
|
46
|
+
selectedKeys: _ = [],
|
|
47
47
|
icons: e,
|
|
48
48
|
onClickSubMenu: r,
|
|
49
49
|
onClickMenuItem: s
|
|
50
|
-
} =
|
|
50
|
+
} = A(V), c = `${b}-inline`, a = (x == null ? void 0 : x.indexOf(i)) > -1, g = M && _.indexOf(o._key) > -1 || be(I, _), [y, l] = We(
|
|
51
51
|
a ? { height: "auto" } : ee
|
|
52
52
|
), v = (h) => {
|
|
53
|
-
r(i, p, "inline"),
|
|
54
|
-
}, P = oe(`${d}-submenu-inline-`), D =
|
|
53
|
+
r(i, p, "inline"), M && s(i, h);
|
|
54
|
+
}, P = oe(`${d}-submenu-inline-`), D = ye(I, {
|
|
55
55
|
...Ye(k, Fe),
|
|
56
56
|
level: p + 1,
|
|
57
|
-
selectable:
|
|
57
|
+
selectable: M
|
|
58
58
|
}), K = /* @__PURE__ */ Q(
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
@@ -69,24 +69,24 @@ const ee = { height: 0, visibility: "hidden" }, en = (o) => {
|
|
|
69
69
|
h.key === ve.key && v(h);
|
|
70
70
|
},
|
|
71
71
|
children: [
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
|
|
72
|
+
/* @__PURE__ */ t(
|
|
73
|
+
Me,
|
|
74
74
|
{
|
|
75
75
|
level: p,
|
|
76
76
|
prefixCls: b,
|
|
77
77
|
levelIndent: f
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ t("span", { children: w }),
|
|
81
|
+
/* @__PURE__ */ t("span", { className: `${b}-icon-suffix ${a ? "is-open" : ""}`, children: e && e.horizontalArrowDown ? e.horizontalArrowDown : /* @__PURE__ */ t(we, {}) })
|
|
82
82
|
]
|
|
83
83
|
}
|
|
84
|
-
), L = /* @__PURE__ */
|
|
84
|
+
), L = /* @__PURE__ */ t(
|
|
85
85
|
"div",
|
|
86
86
|
{
|
|
87
87
|
id: P,
|
|
88
88
|
className: U(`${c}-content`),
|
|
89
|
-
style:
|
|
89
|
+
style: y,
|
|
90
90
|
children: D
|
|
91
91
|
}
|
|
92
92
|
);
|
|
@@ -99,7 +99,7 @@ const ee = { height: 0, visibility: "hidden" }, en = (o) => {
|
|
|
99
99
|
...Y(k, ["key", "popup", "triggerProps"]),
|
|
100
100
|
children: [
|
|
101
101
|
K,
|
|
102
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ t(
|
|
103
103
|
qe,
|
|
104
104
|
{
|
|
105
105
|
in: a,
|
|
@@ -121,50 +121,50 @@ const ee = { height: 0, visibility: "hidden" }, en = (o) => {
|
|
|
121
121
|
]
|
|
122
122
|
}
|
|
123
123
|
);
|
|
124
|
-
},
|
|
124
|
+
}, tt = (o) => {
|
|
125
125
|
const {
|
|
126
126
|
_key: i,
|
|
127
|
-
children:
|
|
127
|
+
children: I,
|
|
128
128
|
style: m,
|
|
129
129
|
className: C,
|
|
130
|
-
title:
|
|
130
|
+
title: w,
|
|
131
131
|
level: p,
|
|
132
132
|
selectable: S,
|
|
133
|
-
forwardedRef:
|
|
133
|
+
forwardedRef: M,
|
|
134
134
|
triggerProps: k,
|
|
135
135
|
...d
|
|
136
136
|
} = o, {
|
|
137
137
|
id: b,
|
|
138
138
|
prefixCls: f,
|
|
139
139
|
mode: x,
|
|
140
|
-
inDropdown:
|
|
140
|
+
inDropdown: _,
|
|
141
141
|
levelIndent: e,
|
|
142
142
|
selectedKeys: r = [],
|
|
143
143
|
icons: s,
|
|
144
144
|
triggerProps: c,
|
|
145
145
|
onClickSubMenu: a,
|
|
146
146
|
onClickMenuItem: g
|
|
147
|
-
} =
|
|
148
|
-
const
|
|
149
|
-
return /* @__PURE__ */
|
|
150
|
-
}, B = be(
|
|
151
|
-
a(i, p, "pop"), S && g(i,
|
|
147
|
+
} = A(V), { rtl: y } = A(ge), l = { ...c, ...k }, [v, P] = fe(!1), D = `${f}-pop`, K = S && r.indexOf(o._key) > -1, L = x === "horizontal" && !_, h = oe(`${b}-submenu-pop-`), z = () => {
|
|
148
|
+
const $ = s && s.popArrowRight ? s.popArrowRight : y ? /* @__PURE__ */ t(Je, {}) : /* @__PURE__ */ t(Xe, {}), u = s && s.horizontalArrowDown ? s.horizontalArrowDown : /* @__PURE__ */ t(we, {});
|
|
149
|
+
return /* @__PURE__ */ t("span", { className: `${f}-icon-suffix`, children: L ? u : $ });
|
|
150
|
+
}, B = be(I, r) || K, H = y ? ["br", "lt"] : ["bl", "rt"], j = ($) => {
|
|
151
|
+
a(i, p, "pop"), S && g(i, $);
|
|
152
152
|
};
|
|
153
|
-
return /* @__PURE__ */
|
|
153
|
+
return /* @__PURE__ */ t(
|
|
154
154
|
Ze,
|
|
155
155
|
{
|
|
156
156
|
trigger: "hover",
|
|
157
157
|
popupVisible: v,
|
|
158
158
|
onVisibleChange: P,
|
|
159
|
-
droplist: /* @__PURE__ */
|
|
159
|
+
droplist: /* @__PURE__ */ t(
|
|
160
160
|
W,
|
|
161
161
|
{
|
|
162
162
|
id: h,
|
|
163
163
|
selectedKeys: r,
|
|
164
|
-
onClickMenuItem: (
|
|
165
|
-
g(
|
|
164
|
+
onClickMenuItem: ($, u) => {
|
|
165
|
+
g($, u), P(!1);
|
|
166
166
|
},
|
|
167
|
-
children:
|
|
167
|
+
children: I
|
|
168
168
|
}
|
|
169
169
|
),
|
|
170
170
|
triggerProps: {
|
|
@@ -188,7 +188,7 @@ const ee = { height: 0, visibility: "hidden" }, en = (o) => {
|
|
|
188
188
|
"aria-haspopup": !0,
|
|
189
189
|
"aria-expanded": v,
|
|
190
190
|
"aria-controls": h,
|
|
191
|
-
ref:
|
|
191
|
+
ref: M,
|
|
192
192
|
style: m,
|
|
193
193
|
className: U(
|
|
194
194
|
D,
|
|
@@ -199,39 +199,39 @@ const ee = { height: 0, visibility: "hidden" }, en = (o) => {
|
|
|
199
199
|
C
|
|
200
200
|
),
|
|
201
201
|
onClick: j,
|
|
202
|
-
onKeyDown: (
|
|
203
|
-
const u =
|
|
204
|
-
u === ve.key ? j(
|
|
202
|
+
onKeyDown: ($) => {
|
|
203
|
+
const u = $.key;
|
|
204
|
+
u === ve.key ? j($) : u === Ge.key ? P(!1) : u === Qe.key && P(!0);
|
|
205
205
|
},
|
|
206
206
|
...Y(d, ["key", "popup"]),
|
|
207
207
|
children: [
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
|
|
208
|
+
/* @__PURE__ */ t(
|
|
209
|
+
Me,
|
|
210
210
|
{
|
|
211
211
|
prefixCls: f,
|
|
212
212
|
levelIndent: e,
|
|
213
213
|
level: p
|
|
214
214
|
}
|
|
215
215
|
),
|
|
216
|
-
|
|
216
|
+
w,
|
|
217
217
|
z(),
|
|
218
|
-
B && x === "horizontal" ? /* @__PURE__ */
|
|
218
|
+
B && x === "horizontal" ? /* @__PURE__ */ t("div", { className: `${f}-selected-label` }) : null
|
|
219
219
|
]
|
|
220
220
|
}
|
|
221
221
|
)
|
|
222
222
|
}
|
|
223
223
|
);
|
|
224
224
|
};
|
|
225
|
-
function
|
|
226
|
-
const { children:
|
|
227
|
-
return
|
|
228
|
-
|
|
229
|
-
}), []), /* @__PURE__ */
|
|
225
|
+
function nt(o, i) {
|
|
226
|
+
const { children: I, popup: m, level: C } = o, { mode: w, collapse: p, inDropdown: S, collectInlineMenuKeys: M } = A(V), b = !!(typeof m == "function" ? m(C) : m) || p || S || w !== "vertical" ? tt : et;
|
|
227
|
+
return ne(() => (M(o._key), () => {
|
|
228
|
+
M(o._key, !0);
|
|
229
|
+
}), []), /* @__PURE__ */ t(b, { forwardedRef: i, ...o, children: I });
|
|
230
230
|
}
|
|
231
|
-
const
|
|
231
|
+
const ot = he(nt), J = ot;
|
|
232
232
|
J.displayName = "SubMenu";
|
|
233
233
|
J.menuType = "SubMenu";
|
|
234
|
-
const
|
|
234
|
+
const rt = 5;
|
|
235
235
|
function de(o) {
|
|
236
236
|
return o && Math.ceil(+o.getBoundingClientRect().width);
|
|
237
237
|
}
|
|
@@ -239,8 +239,8 @@ function me(o) {
|
|
|
239
239
|
const i = Number(o.replace("px", ""));
|
|
240
240
|
return isNaN(i) ? 0 : i;
|
|
241
241
|
}
|
|
242
|
-
const
|
|
243
|
-
const { children: i, ellipsisText:
|
|
242
|
+
const st = (o) => {
|
|
243
|
+
const { children: i, ellipsisText: I = "···", onEllipsisChange: m } = o, { prefixCls: C } = A(V), w = te(null), [p, S] = fe(null), M = `${C}-overflow-sub-menu`, k = `${C}-overflow-hidden-menu-item`, d = `${C}-overflow-sub-menu-mirror`, b = (e) => {
|
|
244
244
|
if (e !== p) {
|
|
245
245
|
const r = F.Children.toArray(i), s = e === null;
|
|
246
246
|
m == null || m({
|
|
@@ -250,12 +250,12 @@ const sn = (o) => {
|
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
252
|
function f() {
|
|
253
|
-
if (!
|
|
253
|
+
if (!w.current)
|
|
254
254
|
return;
|
|
255
|
-
const e =
|
|
255
|
+
const e = w.current, r = de(e) - rt, s = [].slice.call(e.children);
|
|
256
256
|
let c = 0, a = 0, g = 0;
|
|
257
|
-
for (let
|
|
258
|
-
const l = s[
|
|
257
|
+
for (let y = 0; y < s.length; y++) {
|
|
258
|
+
const l = s[y], v = l.className.split(" "), P = v.indexOf(M) > -1, D = v.indexOf(d) > -1;
|
|
259
259
|
if (P)
|
|
260
260
|
continue;
|
|
261
261
|
const K = de(l) + me(pe(l, "marginLeft")) + me(pe(l, "marginRight"));
|
|
@@ -274,23 +274,23 @@ const sn = (o) => {
|
|
|
274
274
|
}
|
|
275
275
|
b(null);
|
|
276
276
|
}
|
|
277
|
-
const x = (e, r = !1) => /* @__PURE__ */
|
|
277
|
+
const x = (e, r = !1) => /* @__PURE__ */ t(
|
|
278
278
|
J,
|
|
279
279
|
{
|
|
280
|
-
title: /* @__PURE__ */
|
|
281
|
-
className: r ? d :
|
|
280
|
+
title: /* @__PURE__ */ t("span", { children: I }),
|
|
281
|
+
className: r ? d : M,
|
|
282
282
|
children: e
|
|
283
283
|
},
|
|
284
284
|
`pqb-menu-overflow-sub-menu${r ? "-mirror" : ""}`
|
|
285
|
-
),
|
|
285
|
+
), _ = () => {
|
|
286
286
|
let e = null;
|
|
287
287
|
const r = x(null, !0), s = F.Children.map(i, (c, a) => {
|
|
288
|
-
var
|
|
288
|
+
var y;
|
|
289
289
|
let g = c;
|
|
290
290
|
if (p !== null && (a > p && (g = F.cloneElement(c, {
|
|
291
291
|
className: U(
|
|
292
292
|
k,
|
|
293
|
-
(
|
|
293
|
+
(y = c == null ? void 0 : c.props) == null ? void 0 : y.className
|
|
294
294
|
)
|
|
295
295
|
})), a === p + 1)) {
|
|
296
296
|
const l = F.Children.toArray(i).slice(p + 1).map(
|
|
@@ -304,39 +304,39 @@ const sn = (o) => {
|
|
|
304
304
|
}) ?? [];
|
|
305
305
|
return [r, ...s, e];
|
|
306
306
|
};
|
|
307
|
-
return
|
|
308
|
-
const e = Ve([
|
|
307
|
+
return ne(() => {
|
|
308
|
+
const e = Ve([w.current], f);
|
|
309
309
|
return () => {
|
|
310
310
|
e();
|
|
311
311
|
};
|
|
312
|
-
}, [
|
|
313
|
-
},
|
|
312
|
+
}, [w.current]), /* @__PURE__ */ t("div", { className: `${C}-overflow-wrap`, ref: w, children: _() });
|
|
313
|
+
}, lt = "light", it = {
|
|
314
314
|
mode: "vertical",
|
|
315
315
|
selectable: !0,
|
|
316
316
|
ellipsis: !0
|
|
317
317
|
};
|
|
318
|
-
function
|
|
319
|
-
const { getPrefixCls:
|
|
318
|
+
function ct(o, i) {
|
|
319
|
+
const { getPrefixCls: I, componentConfig: m, rtl: C } = A(ge), w = Le(
|
|
320
320
|
o,
|
|
321
|
-
|
|
321
|
+
it,
|
|
322
322
|
m == null ? void 0 : m.Menu
|
|
323
323
|
), {
|
|
324
324
|
style: p,
|
|
325
325
|
children: S,
|
|
326
|
-
className:
|
|
326
|
+
className: M,
|
|
327
327
|
prefixCls: k,
|
|
328
328
|
mode: d,
|
|
329
329
|
theme: b,
|
|
330
330
|
icons: f,
|
|
331
331
|
levelIndent: x,
|
|
332
|
-
collapse:
|
|
332
|
+
collapse: _,
|
|
333
333
|
inDropdown: e,
|
|
334
334
|
selectable: r,
|
|
335
335
|
triggerProps: s,
|
|
336
336
|
tooltipProps: c,
|
|
337
337
|
ellipsis: a,
|
|
338
338
|
accordion: g,
|
|
339
|
-
autoOpen:
|
|
339
|
+
autoOpen: y,
|
|
340
340
|
autoScrollIntoView: l,
|
|
341
341
|
scrollConfig: v,
|
|
342
342
|
hasCollapseButton: P,
|
|
@@ -348,79 +348,79 @@ function an(o, i) {
|
|
|
348
348
|
onClickMenuItem: B,
|
|
349
349
|
onCollapseChange: H,
|
|
350
350
|
onEllipsisChange: j,
|
|
351
|
-
|
|
352
|
-
} =
|
|
351
|
+
...$
|
|
352
|
+
} = w, [u, re] = Z([], {
|
|
353
353
|
defaultValue: D,
|
|
354
354
|
value: L
|
|
355
355
|
}), [Ce, Se] = Z([], {
|
|
356
356
|
defaultValue: K,
|
|
357
357
|
value: h
|
|
358
|
-
}), [q,
|
|
359
|
-
value:
|
|
360
|
-
}),
|
|
361
|
-
|
|
362
|
-
let
|
|
363
|
-
(
|
|
358
|
+
}), [q, Ne] = Z(!1, {
|
|
359
|
+
value: _
|
|
360
|
+
}), Ie = A(V), { siderCollapsed: xe } = A(ze), O = k || I("menu"), G = xe || q || e || d === "popButton", se = b || Ie.theme || lt, T = te([]), le = te([]), Pe = Te(), $e = Ue(), ie = Ae(() => je(S), [S]), Oe = oe(`${O}-`), X = $.id || Oe;
|
|
361
|
+
ne(() => {
|
|
362
|
+
let n = u.filter(
|
|
363
|
+
(N) => T.current.indexOf(N) !== -1
|
|
364
364
|
);
|
|
365
|
-
if (
|
|
366
|
-
const
|
|
365
|
+
if (y) {
|
|
366
|
+
const N = T.current.filter(
|
|
367
367
|
(E) => le.current.indexOf(E) === -1
|
|
368
368
|
);
|
|
369
|
-
|
|
369
|
+
n = u.concat(N);
|
|
370
370
|
}
|
|
371
|
-
re(g ?
|
|
372
|
-
}, [
|
|
371
|
+
re(g ? n.slice(0, 1) : n), le.current = T.current.slice();
|
|
372
|
+
}, [T.current.toString()]);
|
|
373
373
|
const ce = d !== "horizontal" && d !== "popButton" && !e && P, Ee = () => {
|
|
374
|
-
const
|
|
375
|
-
const
|
|
376
|
-
|
|
374
|
+
const n = ye(S, { level: 1 }), N = q ? f && f.collapseActive || /* @__PURE__ */ t(Re, {}) : f && f.collapseDefault || /* @__PURE__ */ t(Ke, {}), E = () => {
|
|
375
|
+
const R = !q;
|
|
376
|
+
Ne(R), H == null || H(R);
|
|
377
377
|
};
|
|
378
378
|
return /* @__PURE__ */ Q(De, { children: [
|
|
379
|
-
/* @__PURE__ */
|
|
380
|
-
|
|
379
|
+
/* @__PURE__ */ t("div", { className: `${O}-inner`, children: d === "horizontal" && a !== !1 ? /* @__PURE__ */ t(
|
|
380
|
+
st,
|
|
381
381
|
{
|
|
382
|
-
ellipsisText:
|
|
382
|
+
ellipsisText: _e(a) ? a.text : "···",
|
|
383
383
|
onEllipsisChange: j,
|
|
384
|
-
children:
|
|
384
|
+
children: n
|
|
385
385
|
}
|
|
386
|
-
) :
|
|
387
|
-
ce && /* @__PURE__ */
|
|
386
|
+
) : n }),
|
|
387
|
+
ce && /* @__PURE__ */ t(
|
|
388
388
|
"div",
|
|
389
389
|
{
|
|
390
390
|
tabIndex: 0,
|
|
391
391
|
role: "button",
|
|
392
392
|
"aria-controls": X,
|
|
393
393
|
"aria-expanded": !q,
|
|
394
|
-
className: `${
|
|
394
|
+
className: `${O}-collapse-button`,
|
|
395
395
|
onClick: E,
|
|
396
|
-
|
|
397
|
-
children:
|
|
396
|
+
...$e({ onPressEnter: E }),
|
|
397
|
+
children: N
|
|
398
398
|
}
|
|
399
399
|
)
|
|
400
400
|
] });
|
|
401
401
|
}, ae = { ...p };
|
|
402
|
-
return G && !e && delete ae.width, /* @__PURE__ */
|
|
402
|
+
return G && !e && delete ae.width, /* @__PURE__ */ t(
|
|
403
403
|
"div",
|
|
404
404
|
{
|
|
405
405
|
id: ce ? X : void 0,
|
|
406
406
|
role: "menu",
|
|
407
|
-
...Y(
|
|
407
|
+
...Y($, ["isMenu"]),
|
|
408
408
|
ref: i,
|
|
409
409
|
style: ae,
|
|
410
410
|
className: U(
|
|
411
|
-
|
|
412
|
-
`${
|
|
413
|
-
`${
|
|
411
|
+
O,
|
|
412
|
+
`${O}-${se}`,
|
|
413
|
+
`${O}-${d === "horizontal" ? "horizontal" : "vertical"}`,
|
|
414
414
|
{
|
|
415
|
-
[`${
|
|
415
|
+
[`${O}-collapse`]: G,
|
|
416
416
|
// 缩起状态自动变成 pop 模式
|
|
417
|
-
[`${
|
|
418
|
-
[`${
|
|
419
|
-
[`${
|
|
417
|
+
[`${O}-pop`]: d === "pop" || G,
|
|
418
|
+
[`${O}-pop-button`]: d === "popButton",
|
|
419
|
+
[`${O}-rtl`]: C
|
|
420
420
|
},
|
|
421
|
-
|
|
421
|
+
M
|
|
422
422
|
),
|
|
423
|
-
children: /* @__PURE__ */
|
|
423
|
+
children: /* @__PURE__ */ t(
|
|
424
424
|
V.Provider,
|
|
425
425
|
{
|
|
426
426
|
value: {
|
|
@@ -438,20 +438,20 @@ function an(o, i) {
|
|
|
438
438
|
scrollConfig: v,
|
|
439
439
|
// pass props directly
|
|
440
440
|
id: X,
|
|
441
|
-
prefixCls:
|
|
442
|
-
collectInlineMenuKeys: (
|
|
443
|
-
|
|
444
|
-
(E) => E !==
|
|
445
|
-
) :
|
|
441
|
+
prefixCls: O,
|
|
442
|
+
collectInlineMenuKeys: (n, N) => {
|
|
443
|
+
N ? T.current = T.current.filter(
|
|
444
|
+
(E) => E !== n
|
|
445
|
+
) : T.current.push(n), Pe();
|
|
446
446
|
},
|
|
447
|
-
onClickMenuItem: (
|
|
447
|
+
onClickMenuItem: (n, N) => {
|
|
448
448
|
var E;
|
|
449
|
-
r && Se([
|
|
449
|
+
r && Se([n]), B == null || B(n, N, (E = ie[n]) == null ? void 0 : E.keyPath);
|
|
450
450
|
},
|
|
451
|
-
onClickSubMenu: (
|
|
451
|
+
onClickSubMenu: (n, N, E) => {
|
|
452
452
|
var ue;
|
|
453
|
-
let
|
|
454
|
-
E === "inline" && ((u == null ? void 0 : u.indexOf(
|
|
453
|
+
let R = [...u];
|
|
454
|
+
E === "inline" && ((u == null ? void 0 : u.indexOf(n)) > -1 ? g && N === 1 ? R = [] : R = u.filter((ke) => ke !== n) : g && N === 1 ? R = [n] : R = u.concat([n])), re(R), z == null || z(n, R, (ue = ie[n]) == null ? void 0 : ue.keyPath);
|
|
455
455
|
}
|
|
456
456
|
},
|
|
457
457
|
children: Ee()
|
|
@@ -460,7 +460,7 @@ function an(o, i) {
|
|
|
460
460
|
}
|
|
461
461
|
);
|
|
462
462
|
}
|
|
463
|
-
const
|
|
463
|
+
const at = he(ct), W = at;
|
|
464
464
|
W.displayName = "Menu";
|
|
465
465
|
W.Item = Be;
|
|
466
466
|
W.SubMenu = J;
|
|
@@ -468,6 +468,6 @@ W.ItemGroup = He;
|
|
|
468
468
|
W.__PQB_MENU__ = !0;
|
|
469
469
|
export {
|
|
470
470
|
W as M,
|
|
471
|
-
|
|
471
|
+
st as O,
|
|
472
472
|
J as S
|
|
473
473
|
};
|