@unicom-cloud/ui 0.8.81 → 0.8.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Affix.js +1 -1
- package/Alert.js +1 -1
- package/AutoComplete.js +2 -2
- package/BackTop.js +2 -2
- package/Badge.js +1 -1
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +2 -2
- package/Card.js +1 -1
- package/Carousel.js +1 -1
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +2 -2
- package/Comment.js +1 -1
- package/ConfigProvider.js +5 -4
- package/Copy.js +1 -1
- package/DatePicker.js +7 -7
- package/Descriptions.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/Input.js +11 -10
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/List.js +2 -2
- package/Mentions.js +2 -2
- package/Menu.js +1 -1
- package/Message.js +1 -1
- package/Modal.js +1 -1
- package/Notice.js +1 -1
- package/Notification.js +5 -5
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Pagination.js +1 -1
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/Select.js +1 -1
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +1 -1
- package/SpeechSynthesis.js +1 -1
- package/Spin.js +1 -1
- package/Statistic.js +2 -2
- package/Steps.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Transfer.js +2 -2
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +1 -1
- package/Typography.js +1 -1
- package/affix/index.js +60 -57
- package/alert/index.js +53 -53
- package/anchor/Anchor.js +72 -72
- package/anchor/Link.js +27 -27
- package/anchor/util.js +1 -1
- package/auto-complete/index.js +2 -2
- package/avatar/Avatar.js +31 -31
- package/avatar/Group.js +25 -25
- package/back-top/index.js +30 -30
- package/badge/index.js +37 -37
- package/breadcrumb/index.js +26 -26
- package/button/Group.js +7 -7
- package/button/index.js +29 -29
- package/calendar/index.js +2 -2
- package/card/Grid.js +12 -12
- package/card/Meta.js +17 -17
- package/card/index.js +44 -44
- package/carousel/Arrow.js +19 -19
- package/carousel/Indicator.js +25 -25
- package/carousel/index.js +77 -77
- package/cascader/Cascader.js +2 -2
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/B6r8jPCd.js +6 -0
- package/chunk/{DLBfXSnU.js → BmulTYLW.js} +2880 -2878
- package/chunk/C9oo3EJI.js +692 -0
- package/chunk/{C5X4hOkx.js → CVSWh4ZZ.js} +80 -80
- package/chunk/DILUZgXW.js +1464 -0
- package/chunk/DSRHFFrc.js +53 -0
- package/chunk/{yLRv5RIK.js → DdJVL_4g.js} +181 -181
- package/chunk/{DYspELhF.js → DlHiTTJO.js} +223 -223
- package/chunk/{BG7YGUsx.js → R-uQJib2.js} +119 -119
- package/chunk/{DEiyXzBZ.js → ev6oHWqY.js} +63 -63
- package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
- package/collapse/Collapse.js +2 -2
- package/collapse/Item.js +2 -2
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +36 -36
- package/color-picker/InputAlpha.js +11 -11
- package/color-picker/InputHex.js +24 -24
- package/color-picker/InputRgb.js +23 -23
- package/color-picker/Palette.js +18 -18
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +2 -2
- package/comment/index.js +31 -31
- package/config-provider/ConfigProvider.js +5 -3
- package/config-provider/context.js +2 -2
- package/config-provider/index.js +4 -3
- package/copy/index.js +28 -28
- package/date-picker/Picker.js +276 -276
- package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
- package/date-picker/index.js +26 -27
- package/descriptions/index.js +33 -33
- package/divider/index.js +12 -12
- package/draggable/index.js +23 -23
- package/drawer/Drawer.js +81 -81
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +56 -56
- package/empty/index.js +1 -1
- package/form/Form.js +76 -76
- package/form/FormItem.js +64 -64
- package/form/context.js +1 -1
- package/grid/Col.js +53 -53
- package/grid/Row.js +34 -34
- package/grid/grid-item.js +29 -29
- package/grid/grid.js +50 -50
- package/icon/index.js +20 -19
- package/icon-hover/index.js +1 -1
- package/image/Image.js +86 -86
- package/image/ImagePreview.js +2 -2
- package/image/ImagePreviewArrow.js +22 -22
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +498 -493
- package/input/Button.js +11 -0
- package/input/Group.js +8 -8
- package/input/Input.js +488 -434
- package/input/InputElement.js +1 -1
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +1 -1
- package/input/index.js +9 -8
- package/input-number/index.js +1 -1
- package/input-tag/InputTag.js +40 -40
- package/layout/Content.js +7 -7
- package/layout/Footer.js +9 -9
- package/layout/Header.js +7 -7
- package/layout/Sider.js +55 -55
- package/layout/index.js +32 -32
- package/link/index.js +35 -35
- package/list/Item.js +29 -29
- package/list/Meta.js +12 -12
- package/list/index.js +2 -2
- package/mentions/index.js +2 -2
- package/menu/Menu.js +2 -2
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +1 -1
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +2 -2
- package/modal/index.js +1 -1
- package/notice/index.js +1 -1
- package/notification/index.js +5 -5
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +12 -12
- package/overflow-ellipsis/index.js +24 -24
- package/package.json +1 -1
- package/page-header/index.js +38 -38
- package/pagination/PageItem.js +16 -16
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +2 -2
- package/pagination/Pagination.js +2 -2
- package/pagination/index.js +1 -1
- package/picker/Input.js +69 -69
- package/picker/InputRange.js +111 -111
- package/popconfirm/index.js +61 -61
- package/popover/index.js +35 -35
- package/progress/index.js +22 -22
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +49 -49
- package/resize-box/ResizeTrigger.js +34 -34
- package/resize-box/Split.js +56 -56
- package/resize-box/SplitGroup.js +55 -55
- package/resize-box/index.js +51 -51
- package/result/index.js +41 -41
- package/select/Option.js +1 -1
- package/select/Select.js +2 -2
- package/select/index.js +2 -2
- package/select/util.js +1 -1
- package/select-view/Core.js +125 -125
- package/skeleton/index.js +20 -20
- package/slider/Button.js +57 -57
- package/slider/index.js +116 -116
- package/space/index.js +46 -44
- package/speech-synthesis/index.js +1 -1
- package/spin/DotLoading.js +10 -10
- package/spin/index.js +44 -44
- package/statistic/Countdown.js +34 -34
- package/statistic/index.js +67 -67
- package/steps/index.js +55 -55
- package/style.css +1 -1
- package/switch/index.js +54 -54
- package/table/Table.js +3 -3
- package/table/index.js +1 -1
- package/tabs/Tab.js +2 -2
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +12 -12
- package/tabs/index.js +2 -2
- package/tag/index.js +45 -45
- package/time-picker/Picker.js +76 -76
- package/time-picker/TimePicker.js +136 -136
- package/time-picker/index.js +8 -8
- package/time-picker/util.js +5 -5
- package/timeline/Item.js +47 -47
- package/timeline/Timeline.js +41 -41
- package/tooltip/index.js +29 -29
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +2 -2
- package/tree/Animation.js +2 -2
- package/tree/Node.js +2 -2
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/List.js +1 -1
- package/tree-select/Select.js +2 -2
- package/tree-select/index.js +2 -2
- package/trigger/index.js +60 -60
- package/types/config-provider/ConfigProvider.d.ts +2 -2
- package/types/config-provider/context.d.ts +1 -1
- package/types/date-picker/index.d.ts +8 -9
- package/types/date-picker/interface.d.ts +9 -9
- package/types/index.d.ts +2 -2
- package/types/input/Button.d.ts +5 -0
- package/types/input/Input.d.ts +4 -1
- package/types/input/interface.d.ts +7 -0
- package/types/picker/Input.d.ts +2 -2
- package/types/space/index.d.ts +2 -1
- package/types/utils/index.d.ts +1 -0
- package/types/utils/names.d.ts +1 -1
- package/types/utils/setTheme.d.ts +2 -0
- package/typography/Base.js +53 -53
- package/typography/Ellipsis.js +10 -8
- package/typography/Operations.js +28 -28
- package/typography/Paragraph.js +8 -8
- package/typography/Typography.js +7 -7
- package/typography/index.js +1 -1
- package/upload/TriggerNode.js +47 -47
- package/upload/Upload.js +184 -184
- package/upload/request.js +1 -1
- package/upload/request_.js +1 -1
- package/utils/constant.js +1 -1
- package/utils/contextHolder.js +3 -3
- package/utils/dom.js +1 -1
- package/utils/index.js +116 -114
- package/utils/names.js +1 -1
- package/utils/setDarkTheme.js +23 -22
- package/utils/setPrimaryColor.js +22 -16
- package/utils/setTheme.js +9 -0
- package/utils/tween.js +1 -1
- package/verification-code/VerificationCode.js +49 -49
- package/version/index.js +1 -1
- package/watermark/Watermark.js +24 -24
- package/chunk/CQvM33Vg.js +0 -724
- package/chunk/D0ZWT7db.js +0 -5
- package/chunk/yhU2zeeu.js +0 -1461
- /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
|
@@ -3,7 +3,7 @@ import Ke from "@unicom-cloud/icons/IconUiMenuFold";
|
|
|
3
3
|
import Re from "@unicom-cloud/icons/IconUiMenuUnfold";
|
|
4
4
|
import _e from "lodash/isPlainObject";
|
|
5
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 "./
|
|
6
|
+
import { a as ge } from "./C9oo3EJI.js";
|
|
7
7
|
import { u as Te } from "./CQ_WOOmf.js";
|
|
8
8
|
import { u as oe } from "./B4YRLi8r.js";
|
|
9
9
|
import { u as Ue } from "./BYdIoY50.js";
|
|
@@ -30,31 +30,31 @@ import Ze from "../dropdown/index.js";
|
|
|
30
30
|
const ee = { height: 0, visibility: "hidden" }, et = (o) => {
|
|
31
31
|
const {
|
|
32
32
|
_key: i,
|
|
33
|
-
children:
|
|
33
|
+
children: w,
|
|
34
34
|
style: m,
|
|
35
|
-
className:
|
|
36
|
-
title:
|
|
35
|
+
className: S,
|
|
36
|
+
title: M,
|
|
37
37
|
level: p,
|
|
38
|
-
forwardedRef:
|
|
39
|
-
selectable:
|
|
38
|
+
forwardedRef: N,
|
|
39
|
+
selectable: b,
|
|
40
40
|
...k
|
|
41
41
|
} = o, {
|
|
42
42
|
id: d,
|
|
43
|
-
prefixCls:
|
|
43
|
+
prefixCls: y,
|
|
44
44
|
levelIndent: f,
|
|
45
45
|
openKeys: x = [],
|
|
46
46
|
selectedKeys: _ = [],
|
|
47
47
|
icons: e,
|
|
48
48
|
onClickSubMenu: r,
|
|
49
49
|
onClickMenuItem: s
|
|
50
|
-
} = A(V), c = `${
|
|
50
|
+
} = A(V), c = `${y}-inline`, a = (x == null ? void 0 : x.indexOf(i)) > -1, g = b && _.indexOf(o._key) > -1 || be(w, _), [v, l] = We(
|
|
51
51
|
a ? { height: "auto" } : ee
|
|
52
|
-
),
|
|
53
|
-
r(i, p, "inline"),
|
|
54
|
-
}, P = oe(`${d}-submenu-inline-`), D = ye(
|
|
52
|
+
), C = (h) => {
|
|
53
|
+
r(i, p, "inline"), b && s(i, h);
|
|
54
|
+
}, P = oe(`${d}-submenu-inline-`), D = ye(w, {
|
|
55
55
|
...Ye(k, Fe),
|
|
56
56
|
level: p + 1,
|
|
57
|
-
selectable:
|
|
57
|
+
selectable: b
|
|
58
58
|
}), K = /* @__PURE__ */ Q(
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
@@ -62,23 +62,23 @@ const ee = { height: 0, visibility: "hidden" }, et = (o) => {
|
|
|
62
62
|
"aria-expanded": a,
|
|
63
63
|
"aria-controls": P,
|
|
64
64
|
className: U(`${c}-header`, {
|
|
65
|
-
[`${
|
|
65
|
+
[`${y}-selected`]: g
|
|
66
66
|
}),
|
|
67
|
-
onClick:
|
|
67
|
+
onClick: C,
|
|
68
68
|
onKeyDown: (h) => {
|
|
69
|
-
h.key === ve.key &&
|
|
69
|
+
h.key === ve.key && C(h);
|
|
70
70
|
},
|
|
71
71
|
children: [
|
|
72
72
|
/* @__PURE__ */ t(
|
|
73
73
|
Me,
|
|
74
74
|
{
|
|
75
75
|
level: p,
|
|
76
|
-
prefixCls:
|
|
76
|
+
prefixCls: y,
|
|
77
77
|
levelIndent: f
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
|
-
/* @__PURE__ */ t("span", { children:
|
|
81
|
-
/* @__PURE__ */ t("span", { className: `${
|
|
80
|
+
/* @__PURE__ */ t("span", { children: M }),
|
|
81
|
+
/* @__PURE__ */ t("span", { className: `${y}-icon-suffix ${a ? "is-open" : ""}`, children: e && e.horizontalArrowDown ? e.horizontalArrowDown : /* @__PURE__ */ t(we, {}) })
|
|
82
82
|
]
|
|
83
83
|
}
|
|
84
84
|
), L = /* @__PURE__ */ t(
|
|
@@ -86,15 +86,15 @@ const ee = { height: 0, visibility: "hidden" }, et = (o) => {
|
|
|
86
86
|
{
|
|
87
87
|
id: P,
|
|
88
88
|
className: U(`${c}-content`),
|
|
89
|
-
style:
|
|
89
|
+
style: v,
|
|
90
90
|
children: D
|
|
91
91
|
}
|
|
92
92
|
);
|
|
93
93
|
return /* @__PURE__ */ Q(
|
|
94
94
|
"div",
|
|
95
95
|
{
|
|
96
|
-
ref:
|
|
97
|
-
className: U(c,
|
|
96
|
+
ref: N,
|
|
97
|
+
className: U(c, S),
|
|
98
98
|
style: m,
|
|
99
99
|
...Y(k, ["key", "popup", "triggerProps"]),
|
|
100
100
|
children: [
|
|
@@ -124,17 +124,17 @@ const ee = { height: 0, visibility: "hidden" }, et = (o) => {
|
|
|
124
124
|
}, tt = (o) => {
|
|
125
125
|
const {
|
|
126
126
|
_key: i,
|
|
127
|
-
children:
|
|
127
|
+
children: w,
|
|
128
128
|
style: m,
|
|
129
|
-
className:
|
|
130
|
-
title:
|
|
129
|
+
className: S,
|
|
130
|
+
title: M,
|
|
131
131
|
level: p,
|
|
132
|
-
selectable:
|
|
133
|
-
forwardedRef:
|
|
132
|
+
selectable: N,
|
|
133
|
+
forwardedRef: b,
|
|
134
134
|
triggerProps: k,
|
|
135
135
|
...d
|
|
136
136
|
} = o, {
|
|
137
|
-
id:
|
|
137
|
+
id: y,
|
|
138
138
|
prefixCls: f,
|
|
139
139
|
mode: x,
|
|
140
140
|
inDropdown: _,
|
|
@@ -144,17 +144,17 @@ const ee = { height: 0, visibility: "hidden" }, et = (o) => {
|
|
|
144
144
|
triggerProps: c,
|
|
145
145
|
onClickSubMenu: a,
|
|
146
146
|
onClickMenuItem: g
|
|
147
|
-
} = A(V), { rtl:
|
|
148
|
-
const $ = s && s.popArrowRight ? s.popArrowRight :
|
|
147
|
+
} = A(V), { rtl: v } = A(ge), l = { ...c, ...k }, [C, P] = fe(!1), D = `${f}-pop`, K = N && r.indexOf(o._key) > -1, L = x === "horizontal" && !_, h = oe(`${y}-submenu-pop-`), z = () => {
|
|
148
|
+
const $ = s && s.popArrowRight ? s.popArrowRight : v ? /* @__PURE__ */ t(Je, {}) : /* @__PURE__ */ t(Xe, {}), u = s && s.horizontalArrowDown ? s.horizontalArrowDown : /* @__PURE__ */ t(we, {});
|
|
149
149
|
return /* @__PURE__ */ t("span", { className: `${f}-icon-suffix`, children: L ? u : $ });
|
|
150
|
-
}, B = be(
|
|
151
|
-
a(i, p, "pop"),
|
|
150
|
+
}, B = be(w, r) || K, H = v ? ["br", "lt"] : ["bl", "rt"], j = ($) => {
|
|
151
|
+
a(i, p, "pop"), N && g(i, $);
|
|
152
152
|
};
|
|
153
153
|
return /* @__PURE__ */ t(
|
|
154
154
|
Ze,
|
|
155
155
|
{
|
|
156
156
|
trigger: "hover",
|
|
157
|
-
popupVisible:
|
|
157
|
+
popupVisible: C,
|
|
158
158
|
onVisibleChange: P,
|
|
159
159
|
droplist: /* @__PURE__ */ t(
|
|
160
160
|
W,
|
|
@@ -164,7 +164,7 @@ const ee = { height: 0, visibility: "hidden" }, et = (o) => {
|
|
|
164
164
|
onClickMenuItem: ($, u) => {
|
|
165
165
|
g($, u), P(!1);
|
|
166
166
|
},
|
|
167
|
-
children:
|
|
167
|
+
children: w
|
|
168
168
|
}
|
|
169
169
|
),
|
|
170
170
|
triggerProps: {
|
|
@@ -186,9 +186,9 @@ const ee = { height: 0, visibility: "hidden" }, et = (o) => {
|
|
|
186
186
|
{
|
|
187
187
|
tabIndex: 0,
|
|
188
188
|
"aria-haspopup": !0,
|
|
189
|
-
"aria-expanded":
|
|
189
|
+
"aria-expanded": C,
|
|
190
190
|
"aria-controls": h,
|
|
191
|
-
ref:
|
|
191
|
+
ref: b,
|
|
192
192
|
style: m,
|
|
193
193
|
className: U(
|
|
194
194
|
D,
|
|
@@ -196,7 +196,7 @@ const ee = { height: 0, visibility: "hidden" }, et = (o) => {
|
|
|
196
196
|
{
|
|
197
197
|
[`${f}-selected`]: B
|
|
198
198
|
},
|
|
199
|
-
|
|
199
|
+
S
|
|
200
200
|
),
|
|
201
201
|
onClick: j,
|
|
202
202
|
onKeyDown: ($) => {
|
|
@@ -213,7 +213,7 @@ const ee = { height: 0, visibility: "hidden" }, et = (o) => {
|
|
|
213
213
|
level: p
|
|
214
214
|
}
|
|
215
215
|
),
|
|
216
|
-
|
|
216
|
+
M,
|
|
217
217
|
z(),
|
|
218
218
|
B && x === "horizontal" ? /* @__PURE__ */ t("div", { className: `${f}-selected-label` }) : null
|
|
219
219
|
]
|
|
@@ -223,10 +223,10 @@ const ee = { height: 0, visibility: "hidden" }, et = (o) => {
|
|
|
223
223
|
);
|
|
224
224
|
};
|
|
225
225
|
function nt(o, i) {
|
|
226
|
-
const { children:
|
|
227
|
-
return ne(() => (
|
|
228
|
-
|
|
229
|
-
}), []), /* @__PURE__ */ t(
|
|
226
|
+
const { children: w, popup: m, level: S } = o, { mode: M, collapse: p, inDropdown: N, collectInlineMenuKeys: b } = A(V), y = !!(typeof m == "function" ? m(S) : m) || p || N || M !== "vertical" ? tt : et;
|
|
227
|
+
return ne(() => (b(o._key), () => {
|
|
228
|
+
b(o._key, !0);
|
|
229
|
+
}), []), /* @__PURE__ */ t(y, { forwardedRef: i, ...o, children: w });
|
|
230
230
|
}
|
|
231
231
|
const ot = he(nt), J = ot;
|
|
232
232
|
J.displayName = "SubMenu";
|
|
@@ -240,22 +240,22 @@ function me(o) {
|
|
|
240
240
|
return isNaN(i) ? 0 : i;
|
|
241
241
|
}
|
|
242
242
|
const st = (o) => {
|
|
243
|
-
const { children: i, ellipsisText:
|
|
243
|
+
const { children: i, ellipsisText: w = "···", onEllipsisChange: m } = o, { prefixCls: S } = A(V), M = te(null), [p, N] = fe(null), b = `${S}-overflow-sub-menu`, k = `${S}-overflow-hidden-menu-item`, d = `${S}-overflow-sub-menu-mirror`, y = (e) => {
|
|
244
244
|
if (e !== p) {
|
|
245
245
|
const r = F.Children.toArray(i), s = e === null;
|
|
246
246
|
m == null || m({
|
|
247
247
|
lastVisibleIndex: s ? r.length - 1 : e,
|
|
248
248
|
overflowNodes: s ? [] : r.slice(e + 1)
|
|
249
|
-
}),
|
|
249
|
+
}), N(e);
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
252
|
function f() {
|
|
253
|
-
if (!
|
|
253
|
+
if (!M.current)
|
|
254
254
|
return;
|
|
255
|
-
const e =
|
|
255
|
+
const e = M.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 v = 0; v < s.length; v++) {
|
|
258
|
+
const l = s[v], C = l.className.split(" "), P = C.indexOf(b) > -1, D = C.indexOf(d) > -1;
|
|
259
259
|
if (P)
|
|
260
260
|
continue;
|
|
261
261
|
const K = de(l) + me(pe(l, "marginLeft")) + me(pe(l, "marginRight"));
|
|
@@ -264,7 +264,7 @@ const st = (o) => {
|
|
|
264
264
|
continue;
|
|
265
265
|
}
|
|
266
266
|
if (a += K, a > r) {
|
|
267
|
-
|
|
267
|
+
y(
|
|
268
268
|
// 判断如果将最后一个菜单项换为 ... 是否会超出宽度
|
|
269
269
|
c - (a - K + g <= r ? 1 : 2)
|
|
270
270
|
);
|
|
@@ -272,30 +272,30 @@ const st = (o) => {
|
|
|
272
272
|
}
|
|
273
273
|
c++;
|
|
274
274
|
}
|
|
275
|
-
|
|
275
|
+
y(null);
|
|
276
276
|
}
|
|
277
277
|
const x = (e, r = !1) => /* @__PURE__ */ t(
|
|
278
278
|
J,
|
|
279
279
|
{
|
|
280
|
-
title: /* @__PURE__ */ t("span", { children:
|
|
281
|
-
className: r ? d :
|
|
280
|
+
title: /* @__PURE__ */ t("span", { children: w }),
|
|
281
|
+
className: r ? d : b,
|
|
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 v;
|
|
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
|
+
(v = c == null ? void 0 : c.props) == null ? void 0 : v.className
|
|
294
294
|
)
|
|
295
295
|
})), a === p + 1)) {
|
|
296
296
|
const l = F.Children.toArray(i).slice(p + 1).map(
|
|
297
|
-
(
|
|
298
|
-
key:
|
|
297
|
+
(C) => F.cloneElement(C, {
|
|
298
|
+
key: C.props._key
|
|
299
299
|
})
|
|
300
300
|
);
|
|
301
301
|
e = x(l);
|
|
@@ -305,28 +305,28 @@ const st = (o) => {
|
|
|
305
305
|
return [r, ...s, e];
|
|
306
306
|
};
|
|
307
307
|
return ne(() => {
|
|
308
|
-
const e = Ve([
|
|
308
|
+
const e = Ve([M.current], f);
|
|
309
309
|
return () => {
|
|
310
310
|
e();
|
|
311
311
|
};
|
|
312
|
-
}, [
|
|
312
|
+
}, [M.current]), /* @__PURE__ */ t("div", { className: `${S}-overflow-wrap`, ref: M, children: _() });
|
|
313
313
|
}, lt = "light", it = {
|
|
314
314
|
mode: "vertical",
|
|
315
315
|
selectable: !0,
|
|
316
316
|
ellipsis: !0
|
|
317
317
|
};
|
|
318
318
|
function ct(o, i) {
|
|
319
|
-
const { getPrefixCls:
|
|
319
|
+
const { getPrefixCls: w, componentConfig: m, rtl: S } = A(ge), M = Le(
|
|
320
320
|
o,
|
|
321
321
|
it,
|
|
322
322
|
m == null ? void 0 : m.Menu
|
|
323
323
|
), {
|
|
324
324
|
style: p,
|
|
325
|
-
children:
|
|
326
|
-
className:
|
|
325
|
+
children: N,
|
|
326
|
+
className: b,
|
|
327
327
|
prefixCls: k,
|
|
328
328
|
mode: d,
|
|
329
|
-
theme:
|
|
329
|
+
theme: y,
|
|
330
330
|
icons: f,
|
|
331
331
|
levelIndent: x,
|
|
332
332
|
collapse: _,
|
|
@@ -336,9 +336,9 @@ function ct(o, i) {
|
|
|
336
336
|
tooltipProps: c,
|
|
337
337
|
ellipsis: a,
|
|
338
338
|
accordion: g,
|
|
339
|
-
autoOpen:
|
|
339
|
+
autoOpen: v,
|
|
340
340
|
autoScrollIntoView: l,
|
|
341
|
-
scrollConfig:
|
|
341
|
+
scrollConfig: C,
|
|
342
342
|
hasCollapseButton: P,
|
|
343
343
|
defaultOpenKeys: D,
|
|
344
344
|
defaultSelectedKeys: K,
|
|
@@ -349,7 +349,7 @@ function ct(o, i) {
|
|
|
349
349
|
onCollapseChange: H,
|
|
350
350
|
onEllipsisChange: j,
|
|
351
351
|
...$
|
|
352
|
-
} =
|
|
352
|
+
} = M, [u, re] = Z([], {
|
|
353
353
|
defaultValue: D,
|
|
354
354
|
value: L
|
|
355
355
|
}), [Ce, Se] = Z([], {
|
|
@@ -357,21 +357,21 @@ function ct(o, i) {
|
|
|
357
357
|
value: h
|
|
358
358
|
}), [q, Ne] = Z(!1, {
|
|
359
359
|
value: _
|
|
360
|
-
}), Ie = A(V), { siderCollapsed: xe } = A(ze), O = k ||
|
|
360
|
+
}), Ie = A(V), { siderCollapsed: xe } = A(ze), O = k || (w == null ? void 0 : w("menu")), G = xe || q || e || d === "popButton", se = y || Ie.theme || lt, T = te([]), le = te([]), Pe = Te(), $e = Ue(), ie = Ae(() => je(N), [N]), Oe = oe(`${O}-`), X = $.id || Oe;
|
|
361
361
|
ne(() => {
|
|
362
362
|
let n = u.filter(
|
|
363
|
-
(
|
|
363
|
+
(I) => T.current.indexOf(I) !== -1
|
|
364
364
|
);
|
|
365
|
-
if (
|
|
366
|
-
const
|
|
365
|
+
if (v) {
|
|
366
|
+
const I = T.current.filter(
|
|
367
367
|
(E) => le.current.indexOf(E) === -1
|
|
368
368
|
);
|
|
369
|
-
n = u.concat(
|
|
369
|
+
n = u.concat(I);
|
|
370
370
|
}
|
|
371
371
|
re(g ? n.slice(0, 1) : n), le.current = T.current.slice();
|
|
372
372
|
}, [T.current.toString()]);
|
|
373
373
|
const ce = d !== "horizontal" && d !== "popButton" && !e && P, Ee = () => {
|
|
374
|
-
const n = ye(
|
|
374
|
+
const n = ye(N, { level: 1 }), I = q ? f && f.collapseActive || /* @__PURE__ */ t(Re, {}) : f && f.collapseDefault || /* @__PURE__ */ t(Ke, {}), E = () => {
|
|
375
375
|
const R = !q;
|
|
376
376
|
Ne(R), H == null || H(R);
|
|
377
377
|
};
|
|
@@ -394,7 +394,7 @@ function ct(o, i) {
|
|
|
394
394
|
className: `${O}-collapse-button`,
|
|
395
395
|
onClick: E,
|
|
396
396
|
...$e({ onPressEnter: E }),
|
|
397
|
-
children:
|
|
397
|
+
children: I
|
|
398
398
|
}
|
|
399
399
|
)
|
|
400
400
|
] });
|
|
@@ -416,9 +416,9 @@ function ct(o, i) {
|
|
|
416
416
|
// 缩起状态自动变成 pop 模式
|
|
417
417
|
[`${O}-pop`]: d === "pop" || G,
|
|
418
418
|
[`${O}-pop-button`]: d === "popButton",
|
|
419
|
-
[`${O}-rtl`]:
|
|
419
|
+
[`${O}-rtl`]: S
|
|
420
420
|
},
|
|
421
|
-
|
|
421
|
+
b
|
|
422
422
|
),
|
|
423
423
|
children: /* @__PURE__ */ t(
|
|
424
424
|
V.Provider,
|
|
@@ -435,23 +435,23 @@ function ct(o, i) {
|
|
|
435
435
|
triggerProps: s,
|
|
436
436
|
tooltipProps: c,
|
|
437
437
|
autoScrollIntoView: l,
|
|
438
|
-
scrollConfig:
|
|
438
|
+
scrollConfig: C,
|
|
439
439
|
// pass props directly
|
|
440
440
|
id: X,
|
|
441
441
|
prefixCls: O,
|
|
442
|
-
collectInlineMenuKeys: (n,
|
|
443
|
-
|
|
442
|
+
collectInlineMenuKeys: (n, I) => {
|
|
443
|
+
I ? T.current = T.current.filter(
|
|
444
444
|
(E) => E !== n
|
|
445
445
|
) : T.current.push(n), Pe();
|
|
446
446
|
},
|
|
447
|
-
onClickMenuItem: (n,
|
|
447
|
+
onClickMenuItem: (n, I) => {
|
|
448
448
|
var E;
|
|
449
|
-
r && Se([n]), B == null || B(n,
|
|
449
|
+
r && Se([n]), B == null || B(n, I, (E = ie[n]) == null ? void 0 : E.keyPath);
|
|
450
450
|
},
|
|
451
|
-
onClickSubMenu: (n,
|
|
451
|
+
onClickSubMenu: (n, I, E) => {
|
|
452
452
|
var ue;
|
|
453
453
|
let R = [...u];
|
|
454
|
-
E === "inline" && ((u == null ? void 0 : u.indexOf(n)) > -1 ? g &&
|
|
454
|
+
E === "inline" && ((u == null ? void 0 : u.indexOf(n)) > -1 ? g && I === 1 ? R = [] : R = u.filter((ke) => ke !== n) : g && I === 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()
|