@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
|
@@ -2,7 +2,7 @@ import { jsx as u, jsxs as ee } from "react/jsx-runtime";
|
|
|
2
2
|
import fe from "lodash/isFunction";
|
|
3
3
|
import ke from "lodash/isPlainObject";
|
|
4
4
|
import te, { useContext as ie, useRef as V, useState as we, useEffect as L, useMemo as ae, useCallback as at, useImperativeHandle as ct } from "react";
|
|
5
|
-
import { a as Oe, I as me } from "./
|
|
5
|
+
import { a as Oe, I as me } from "./C9oo3EJI.js";
|
|
6
6
|
import { u as st } from "./B4YRLi8r.js";
|
|
7
7
|
import { u as lt } from "./BFTV6myl.js";
|
|
8
8
|
import { u as dt } from "./CXPOj2uy.js";
|
|
@@ -19,7 +19,7 @@ import { setTransformStyle as pt } from "../utils/style.js";
|
|
|
19
19
|
import Ye from "@unicom-cloud/icons/IconUiDown";
|
|
20
20
|
import je from "lodash/isNull";
|
|
21
21
|
import bt from "../dropdown/index.js";
|
|
22
|
-
import { M as Ae } from "./
|
|
22
|
+
import { M as Ae } from "./CVSWh4ZZ.js";
|
|
23
23
|
import gt from "lodash/isEqualWith";
|
|
24
24
|
import vt from "../utils/throttleByRaf.js";
|
|
25
25
|
import Me from "@unicom-cloud/icons/IconUiLeft";
|
|
@@ -30,14 +30,14 @@ import { Enter as Tt } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
|
30
30
|
function wt(e) {
|
|
31
31
|
const {
|
|
32
32
|
animation: s,
|
|
33
|
-
activeTab:
|
|
33
|
+
activeTab: o,
|
|
34
34
|
prefixCls: n,
|
|
35
|
-
paneChildren:
|
|
35
|
+
paneChildren: i,
|
|
36
36
|
direction: b,
|
|
37
37
|
lazyload: t,
|
|
38
38
|
destroyOnHide: v
|
|
39
|
-
} = e, g =
|
|
40
|
-
if (
|
|
39
|
+
} = e, g = i.findIndex((c) => c.key === o), m = ie(Ne), { rtl: w } = ie(Oe);
|
|
40
|
+
if (i.every((c) => (c == null ? void 0 : c.props) && (!("children" in c.props) || c.props.children === null)))
|
|
41
41
|
return null;
|
|
42
42
|
const l = X(`${n}-content-inner`, {
|
|
43
43
|
[`${n}-animation`]: s
|
|
@@ -47,22 +47,22 @@ function wt(e) {
|
|
|
47
47
|
{
|
|
48
48
|
className: l,
|
|
49
49
|
style: w ? { marginRight: `-${g * 100}%` } : { marginLeft: `-${g * 100}%` },
|
|
50
|
-
children:
|
|
51
|
-
const { tabpane: h, tab: p } = m.getIdPrefix(x), d = "destroyOnHide" in c.props ? c.props.destroyOnHide : v,
|
|
50
|
+
children: i.map((c, x) => {
|
|
51
|
+
const { tabpane: h, tab: p } = m.getIdPrefix(x), d = "destroyOnHide" in c.props ? c.props.destroyOnHide : v, a = c.key === o;
|
|
52
52
|
return /* @__PURE__ */ u(
|
|
53
53
|
"div",
|
|
54
54
|
{
|
|
55
55
|
className: X(`${n}-content-item`, {
|
|
56
|
-
[`${n}-content-item-active`]:
|
|
56
|
+
[`${n}-content-item-active`]: a
|
|
57
57
|
}),
|
|
58
58
|
role: "tabpanel",
|
|
59
59
|
id: h,
|
|
60
|
-
"aria-hidden":
|
|
61
|
-
tabIndex:
|
|
60
|
+
"aria-hidden": a ? void 0 : !0,
|
|
61
|
+
tabIndex: a ? 0 : -1,
|
|
62
62
|
"aria-labelledby": p,
|
|
63
63
|
children: g !== x && d ? null : te.cloneElement(c, {
|
|
64
64
|
lazyload: t,
|
|
65
|
-
isActive:
|
|
65
|
+
isActive: a
|
|
66
66
|
})
|
|
67
67
|
},
|
|
68
68
|
c.key
|
|
@@ -72,60 +72,60 @@ function wt(e) {
|
|
|
72
72
|
) });
|
|
73
73
|
}
|
|
74
74
|
function oe() {
|
|
75
|
-
const e = V(), [s,
|
|
75
|
+
const e = V(), [s, o] = we({
|
|
76
76
|
height: 0,
|
|
77
77
|
width: 0
|
|
78
78
|
});
|
|
79
79
|
return L(() => {
|
|
80
|
-
e.current &&
|
|
80
|
+
e.current && o({
|
|
81
81
|
height: e.current.offsetHeight,
|
|
82
82
|
width: e.current.offsetWidth,
|
|
83
83
|
domRect: e.current.getBoundingClientRect()
|
|
84
84
|
});
|
|
85
|
-
}, []), [e, s,
|
|
85
|
+
}, []), [e, s, o];
|
|
86
86
|
}
|
|
87
87
|
function xt(e) {
|
|
88
88
|
const {
|
|
89
89
|
headerWrapperRef: s,
|
|
90
|
-
headerOffset:
|
|
90
|
+
headerOffset: o,
|
|
91
91
|
align: n,
|
|
92
|
-
isScrollable:
|
|
92
|
+
isScrollable: i,
|
|
93
93
|
direction: b,
|
|
94
94
|
onScroll: t
|
|
95
95
|
} = e;
|
|
96
|
-
function v(d,
|
|
96
|
+
function v(d, a) {
|
|
97
97
|
let $ = 0;
|
|
98
|
-
b === "vertical" ? $ =
|
|
98
|
+
b === "vertical" ? $ = o + a : $ = n === "left" ? o + d : o - d, t == null || t($);
|
|
99
99
|
}
|
|
100
100
|
const g = V("x");
|
|
101
101
|
function m(d) {
|
|
102
|
-
if (!
|
|
102
|
+
if (!i)
|
|
103
103
|
return;
|
|
104
104
|
d.preventDefault();
|
|
105
|
-
const { deltaX:
|
|
106
|
-
let
|
|
107
|
-
const I = Math.abs(
|
|
108
|
-
I === S ?
|
|
105
|
+
const { deltaX: a, deltaY: $ } = d;
|
|
106
|
+
let P = 0;
|
|
107
|
+
const I = Math.abs(a), S = Math.abs($);
|
|
108
|
+
I === S ? P = g.current === "x" ? a : $ : I > S ? (P = a, g.current = "x") : (P = $, g.current = "y"), v(P, P);
|
|
109
109
|
}
|
|
110
110
|
const w = V({
|
|
111
111
|
clientX: 0,
|
|
112
112
|
clientY: 0
|
|
113
113
|
}), l = (d) => d && d.touches && d.touches.length && d.touches[0], c = (d) => {
|
|
114
114
|
d.cancelable && d.preventDefault();
|
|
115
|
-
const
|
|
116
|
-
if (!
|
|
115
|
+
const a = l(d);
|
|
116
|
+
if (!a)
|
|
117
117
|
return;
|
|
118
|
-
const { clientX: $, clientY:
|
|
118
|
+
const { clientX: $, clientY: P } = w.current, I = a.clientX - $, S = a.clientY - P;
|
|
119
119
|
v(-I, -S);
|
|
120
120
|
}, x = () => {
|
|
121
121
|
We(document.documentElement, "touchmove", c), We(document.documentElement, "touchend", x);
|
|
122
122
|
}, h = (d) => {
|
|
123
|
-
if (!
|
|
123
|
+
if (!i)
|
|
124
124
|
return;
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
clientX:
|
|
128
|
-
clientY:
|
|
125
|
+
const a = l(d);
|
|
126
|
+
a && (w.current = {
|
|
127
|
+
clientX: a.clientX,
|
|
128
|
+
clientY: a.clientY
|
|
129
129
|
}, le(document.documentElement, "touchmove", c, { passive: !1 }), le(window, "touchend", x, { passive: !1 }));
|
|
130
130
|
}, p = V(null);
|
|
131
131
|
p.current = { onWheel: m, onTouchStart: h }, L(() => {
|
|
@@ -149,20 +149,20 @@ function xt(e) {
|
|
|
149
149
|
function kt(e) {
|
|
150
150
|
const {
|
|
151
151
|
prefixCls: s,
|
|
152
|
-
currentOffset:
|
|
152
|
+
currentOffset: o,
|
|
153
153
|
headerSize: n,
|
|
154
|
-
headerWrapperSize:
|
|
154
|
+
headerWrapperSize: i,
|
|
155
155
|
getTitleRef: b,
|
|
156
156
|
paneChildren: t,
|
|
157
157
|
direction: v,
|
|
158
158
|
icon: g
|
|
159
|
-
} = e, m = t.map((h) => h.key), w = v === "vertical" ? n.height : n.width, l = v === "vertical" ?
|
|
160
|
-
const h = {}, p =
|
|
159
|
+
} = e, m = t.map((h) => h.key), w = v === "vertical" ? n.height : n.width, l = v === "vertical" ? i.height : i.width, c = ae(() => {
|
|
160
|
+
const h = {}, p = i.domRect;
|
|
161
161
|
return m.map((d) => {
|
|
162
|
-
const
|
|
163
|
-
if (!
|
|
162
|
+
const a = b(d);
|
|
163
|
+
if (!a)
|
|
164
164
|
return;
|
|
165
|
-
const $ =
|
|
165
|
+
const $ = a.getBoundingClientRect();
|
|
166
166
|
h[d] = {
|
|
167
167
|
left: $.left - p.left,
|
|
168
168
|
right: $.left - p.left + $.width,
|
|
@@ -173,14 +173,14 @@ function kt(e) {
|
|
|
173
173
|
}, [m.join(","), w, l]), x = ae(() => {
|
|
174
174
|
let h = -1, p = -1;
|
|
175
175
|
for (const d in c) {
|
|
176
|
-
const { left:
|
|
177
|
-
if (
|
|
176
|
+
const { left: a, right: $ } = c[d];
|
|
177
|
+
if (a >= o && $ - o <= l && h === -1 && (h = m.indexOf(d), p = h), a >= o && $ - o > l) {
|
|
178
178
|
p = m.indexOf(d);
|
|
179
179
|
break;
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
return [h, p];
|
|
183
|
-
}, [c, m.join(","),
|
|
183
|
+
}, [c, m.join(","), o]);
|
|
184
184
|
return je(g) ? null : /* @__PURE__ */ u(
|
|
185
185
|
bt,
|
|
186
186
|
{
|
|
@@ -202,17 +202,17 @@ function kt(e) {
|
|
|
202
202
|
}
|
|
203
203
|
);
|
|
204
204
|
}
|
|
205
|
-
const Ot = (e, s,
|
|
205
|
+
const Ot = (e, s, o) => {
|
|
206
206
|
let n = { left: "", width: "", top: "", height: "" };
|
|
207
207
|
if (s) {
|
|
208
|
-
const
|
|
208
|
+
const i = Ce(s, o);
|
|
209
209
|
e === "vertical" ? n = {
|
|
210
|
-
top: `${
|
|
210
|
+
top: `${i.top}px`,
|
|
211
211
|
height: `${s.offsetHeight}px`,
|
|
212
212
|
left: "",
|
|
213
213
|
width: ""
|
|
214
214
|
} : n = {
|
|
215
|
-
left: `${
|
|
215
|
+
left: `${i.left}px`,
|
|
216
216
|
width: `${s.offsetWidth}px`,
|
|
217
217
|
top: "",
|
|
218
218
|
height: ""
|
|
@@ -222,9 +222,9 @@ const Ot = (e, s, a) => {
|
|
|
222
222
|
}, Ct = ({
|
|
223
223
|
prefixCls: e,
|
|
224
224
|
animation: s,
|
|
225
|
-
disabled:
|
|
225
|
+
disabled: o,
|
|
226
226
|
direction: n,
|
|
227
|
-
getTitleRef:
|
|
227
|
+
getTitleRef: i,
|
|
228
228
|
activeTab: b,
|
|
229
229
|
getHeaderRef: t,
|
|
230
230
|
inkBarSize: v
|
|
@@ -233,7 +233,7 @@ const Ot = (e, s, a) => {
|
|
|
233
233
|
return L(() => {
|
|
234
234
|
const w = vt(() => {
|
|
235
235
|
var x;
|
|
236
|
-
const l =
|
|
236
|
+
const l = i(b), c = Ot(
|
|
237
237
|
n,
|
|
238
238
|
l,
|
|
239
239
|
t("headerRef").current
|
|
@@ -251,7 +251,7 @@ const Ot = (e, s, a) => {
|
|
|
251
251
|
{
|
|
252
252
|
className: X(`${e}-header-ink`, {
|
|
253
253
|
[`${e}-header-ink-no-animation`]: !s,
|
|
254
|
-
[`${e}-header-ink-disabled`]:
|
|
254
|
+
[`${e}-header-ink-disabled`]: o,
|
|
255
255
|
[`${e}-header-ink-custom`]: v
|
|
256
256
|
}),
|
|
257
257
|
ref: g,
|
|
@@ -261,62 +261,62 @@ const Ot = (e, s, a) => {
|
|
|
261
261
|
}, St = {
|
|
262
262
|
prev: "left",
|
|
263
263
|
next: "right"
|
|
264
|
-
},
|
|
264
|
+
}, Nt = {
|
|
265
265
|
prev: "up",
|
|
266
266
|
next: "down"
|
|
267
267
|
}, Be = (e) => {
|
|
268
268
|
const {
|
|
269
269
|
direction: s,
|
|
270
|
-
headerSize:
|
|
270
|
+
headerSize: o,
|
|
271
271
|
headerWrapperSize: n,
|
|
272
|
-
prefixCls:
|
|
272
|
+
prefixCls: i,
|
|
273
273
|
iconPos: b,
|
|
274
274
|
currentOffset: t,
|
|
275
275
|
align: v,
|
|
276
276
|
rtl: g,
|
|
277
277
|
icon: m
|
|
278
|
-
} = e, { height: w, width: l } = n, { height: c, width: x } =
|
|
278
|
+
} = e, { height: w, width: l } = n, { height: c, width: x } = o, h = c - w, p = x - l, d = {
|
|
279
279
|
up: /* @__PURE__ */ u($t, {}),
|
|
280
280
|
down: /* @__PURE__ */ u(Ye, {}),
|
|
281
281
|
left: g ? /* @__PURE__ */ u(Ee, {}) : /* @__PURE__ */ u(Me, {}),
|
|
282
282
|
right: g ? /* @__PURE__ */ u(Me, {}) : /* @__PURE__ */ u(Ee, {})
|
|
283
|
-
},
|
|
283
|
+
}, a = (z) => {
|
|
284
284
|
var f;
|
|
285
285
|
z !== e.currentOffset && ((f = e == null ? void 0 : e.onChange) == null || f.call(e, z));
|
|
286
286
|
}, $ = (z, f) => {
|
|
287
287
|
z.preventDefault();
|
|
288
288
|
let O;
|
|
289
|
-
v === "left" ? O = f === "left" ? t - l : t + l : O = f === "left" ? t + l : t - l,
|
|
290
|
-
},
|
|
289
|
+
v === "left" ? O = f === "left" ? t - l : t + l : O = f === "left" ? t + l : t - l, a(O);
|
|
290
|
+
}, P = (z, f) => {
|
|
291
291
|
z.preventDefault();
|
|
292
292
|
let O;
|
|
293
293
|
if (f === "up")
|
|
294
294
|
O = t - w;
|
|
295
295
|
else if (O = t + w, O >= c)
|
|
296
296
|
return;
|
|
297
|
-
|
|
297
|
+
a(O);
|
|
298
298
|
}, I = ae(() => v === "left" ? t <= 0 : s === "vertical" ? t >= h : t >= p, [v, s, t, p, t]), S = ae(() => v === "left" ? s === "vertical" ? t >= h : t >= p : t <= 0, [v, s, h, p, t]);
|
|
299
299
|
if (je(m))
|
|
300
300
|
return null;
|
|
301
|
-
const A = s === "horizontal" ? St[b] :
|
|
302
|
-
[`${
|
|
303
|
-
}), Y = s === "vertical" ?
|
|
301
|
+
const A = s === "horizontal" ? St[b] : Nt[b], _ = b === "prev" ? I : S, F = X(`${i}-${A}-icon`, {
|
|
302
|
+
[`${i}-nav-icon-disabled`]: _
|
|
303
|
+
}), Y = s === "vertical" ? P : $;
|
|
304
304
|
return /* @__PURE__ */ u(
|
|
305
305
|
me,
|
|
306
306
|
{
|
|
307
307
|
disabled: _,
|
|
308
308
|
className: F,
|
|
309
|
-
prefix:
|
|
309
|
+
prefix: i,
|
|
310
310
|
onClick: (z) => Y(z, A),
|
|
311
311
|
children: m || d[A]
|
|
312
312
|
}
|
|
313
313
|
);
|
|
314
|
-
},
|
|
314
|
+
}, Pt = ({
|
|
315
315
|
prefixCls: e,
|
|
316
316
|
onDeleteTab: s,
|
|
317
|
-
tabKey:
|
|
317
|
+
tabKey: o,
|
|
318
318
|
isActive: n,
|
|
319
|
-
onClickTab:
|
|
319
|
+
onClickTab: i,
|
|
320
320
|
disabled: b = !1,
|
|
321
321
|
title: t,
|
|
322
322
|
editable: v,
|
|
@@ -326,10 +326,10 @@ const Ot = (e, s, a) => {
|
|
|
326
326
|
getIdPrefix: l,
|
|
327
327
|
index: c
|
|
328
328
|
}, x) => {
|
|
329
|
-
const h = fe(g) ? g : (
|
|
330
|
-
|
|
331
|
-
}, d = (
|
|
332
|
-
b ||
|
|
329
|
+
const h = fe(g) ? g : (a) => a, p = (a) => {
|
|
330
|
+
a.stopPropagation(), !b && s();
|
|
331
|
+
}, d = (a) => {
|
|
332
|
+
b || i(a);
|
|
333
333
|
};
|
|
334
334
|
return h(
|
|
335
335
|
/* @__PURE__ */ ee(
|
|
@@ -348,8 +348,8 @@ const Ot = (e, s, a) => {
|
|
|
348
348
|
id: l(c).tab,
|
|
349
349
|
"aria-controls": l(c).tabpane,
|
|
350
350
|
onClick: d,
|
|
351
|
-
onKeyDown: (
|
|
352
|
-
|
|
351
|
+
onKeyDown: (a) => {
|
|
352
|
+
a.key === Tt.key && d(a);
|
|
353
353
|
},
|
|
354
354
|
children: [
|
|
355
355
|
/* @__PURE__ */ u("span", { className: `${e}-header-title-text`, children: t }),
|
|
@@ -368,35 +368,35 @@ const Ot = (e, s, a) => {
|
|
|
368
368
|
)
|
|
369
369
|
]
|
|
370
370
|
},
|
|
371
|
-
|
|
371
|
+
o
|
|
372
372
|
),
|
|
373
373
|
{
|
|
374
|
-
key:
|
|
374
|
+
key: o,
|
|
375
375
|
isActive: n,
|
|
376
376
|
disabled: b,
|
|
377
377
|
editable: v
|
|
378
378
|
}
|
|
379
379
|
);
|
|
380
|
-
}, It = te.forwardRef(
|
|
380
|
+
}, It = te.forwardRef(Pt), Se = "vertical", ue = "right", he = "left", Le = {
|
|
381
381
|
delete: !0,
|
|
382
382
|
add: !0
|
|
383
383
|
}, zt = ({
|
|
384
384
|
direction: e,
|
|
385
385
|
align: s = he,
|
|
386
|
-
headerOffset:
|
|
386
|
+
headerOffset: o
|
|
387
387
|
}) => {
|
|
388
|
-
let n = `translateX(${-
|
|
389
|
-
return s === ue && (n = `translateX(${
|
|
388
|
+
let n = `translateX(${-o}px)`;
|
|
389
|
+
return s === ue && (n = `translateX(${o}px)`), e === Se && (n = `translateY(${-o}px)`), pt(n);
|
|
390
390
|
}, Ht = ({
|
|
391
391
|
direction: e,
|
|
392
392
|
align: s = he,
|
|
393
|
-
headerDom:
|
|
393
|
+
headerDom: o,
|
|
394
394
|
headerWrapperDom: n
|
|
395
395
|
}) => {
|
|
396
|
-
const
|
|
397
|
-
return e === Se ? -
|
|
396
|
+
const i = Ce(o, n);
|
|
397
|
+
return e === Se ? -i.top : s === ue ? i.right : -i.left;
|
|
398
398
|
}, xe = te.forwardRef((e, s) => {
|
|
399
|
-
const
|
|
399
|
+
const o = ie(Ne), { rtl: n } = ie(Oe), i = { ...e, ...o }, [b, t, v] = oe(), [g, m, w] = oe(), [l, c, x] = oe(), [h, p, d] = oe(), [a, $, P] = oe(), I = V({}), [S, A] = we(0), [_, F] = we(!0), {
|
|
400
400
|
paneChildren: Y,
|
|
401
401
|
editable: z,
|
|
402
402
|
prefixCls: f,
|
|
@@ -410,20 +410,20 @@ const Ot = (e, s, a) => {
|
|
|
410
410
|
style: Fe,
|
|
411
411
|
tabPosition: Ge,
|
|
412
412
|
className: Ke,
|
|
413
|
-
extra:
|
|
413
|
+
extra: Pe,
|
|
414
414
|
animation: qe,
|
|
415
|
-
icons:
|
|
415
|
+
icons: N,
|
|
416
416
|
deleteButton: Je,
|
|
417
417
|
addButton: Qe,
|
|
418
418
|
renderTabTitle: Ze,
|
|
419
419
|
scrollAfterEdit: Ie,
|
|
420
420
|
scrollPosition: M = "auto",
|
|
421
421
|
inkBarSize: et
|
|
422
|
-
} =
|
|
422
|
+
} = i, ze = ke(Ie) ? { ...Le, ...Ie } : Le, [tt, nt] = n ? [ue, he] : [he, ue], G = H === "capsule" ? nt : tt, j = ae(() => {
|
|
423
423
|
const r = c.height - p.height - $.height, y = c.width - p.width - $.width;
|
|
424
|
-
return
|
|
424
|
+
return i.direction === "vertical" ? r < m.height : y < m.width;
|
|
425
425
|
}, [
|
|
426
|
-
|
|
426
|
+
i.direction,
|
|
427
427
|
c,
|
|
428
428
|
p,
|
|
429
429
|
m,
|
|
@@ -444,7 +444,7 @@ const Ot = (e, s, a) => {
|
|
|
444
444
|
width: T.offsetWidth,
|
|
445
445
|
domRect: T.getBoundingClientRect()
|
|
446
446
|
});
|
|
447
|
-
}, 200), K = ce(v), q = ce(w), J = ce(d), Q = ce(
|
|
447
|
+
}, 200), K = ce(v), q = ce(w), J = ce(d), Q = ce(P), pe = at(
|
|
448
448
|
(r) => {
|
|
449
449
|
const y = C === Se ? m.height - t.height : m.width - t.width;
|
|
450
450
|
let T = r;
|
|
@@ -505,16 +505,16 @@ const Ot = (e, s, a) => {
|
|
|
505
505
|
headerOffset: S
|
|
506
506
|
}), ge = j && R === "dropdown" && C !== "vertical", ve = j && !ge, se = z && (H === "card" || H === "card-gutter" || H === "line"), it = (r) => {
|
|
507
507
|
var y;
|
|
508
|
-
(y =
|
|
508
|
+
(y = i.onDeleteTab) == null || y.call(i, r.key), F(ze.delete);
|
|
509
509
|
}, He = () => {
|
|
510
510
|
O == null || O(), F(ze.add);
|
|
511
511
|
};
|
|
512
512
|
L(() => {
|
|
513
|
-
const r = de([
|
|
513
|
+
const r = de([a.current], Q);
|
|
514
514
|
return () => {
|
|
515
515
|
r();
|
|
516
516
|
};
|
|
517
|
-
}, [
|
|
517
|
+
}, [a.current]), L(() => {
|
|
518
518
|
const r = de([b.current], K);
|
|
519
519
|
return () => {
|
|
520
520
|
r();
|
|
@@ -537,10 +537,10 @@ const Ot = (e, s, a) => {
|
|
|
537
537
|
"aria-label": "add tab",
|
|
538
538
|
tabIndex: 0,
|
|
539
539
|
role: "button",
|
|
540
|
-
ref:
|
|
540
|
+
ref: a,
|
|
541
541
|
onClick: He,
|
|
542
542
|
...Xe({ onPressEnter: He }),
|
|
543
|
-
children: Qe || /* @__PURE__ */ u(me, { prefix: `${f}-add`, children: /* @__PURE__ */ u("span", { className: `${f}-add`, children: (
|
|
543
|
+
children: Qe || /* @__PURE__ */ u(me, { prefix: `${f}-add`, children: /* @__PURE__ */ u("span", { className: `${f}-add`, children: (N == null ? void 0 : N.add) || /* @__PURE__ */ u(ut, {}) }) })
|
|
544
544
|
}
|
|
545
545
|
);
|
|
546
546
|
return xt({
|
|
@@ -561,11 +561,11 @@ const Ot = (e, s, a) => {
|
|
|
561
561
|
`${f}-header-nav-${Ge}`,
|
|
562
562
|
`${f}-header-size-${_e}`,
|
|
563
563
|
`${f}-header-nav-${H}`,
|
|
564
|
-
{ [`${f}-header-nav-sticky`]:
|
|
564
|
+
{ [`${f}-header-nav-sticky`]: i.headerSticky },
|
|
565
565
|
// 潘启宝添加
|
|
566
566
|
Ke
|
|
567
567
|
),
|
|
568
|
-
style: { ...Fe, ...
|
|
568
|
+
style: { ...Fe, ...i.headerSticky },
|
|
569
569
|
ref: s,
|
|
570
570
|
children: /* @__PURE__ */ ee(
|
|
571
571
|
"div",
|
|
@@ -581,7 +581,7 @@ const Ot = (e, s, a) => {
|
|
|
581
581
|
{
|
|
582
582
|
iconPos: "prev",
|
|
583
583
|
rtl: n,
|
|
584
|
-
icon:
|
|
584
|
+
icon: N == null ? void 0 : N.prev,
|
|
585
585
|
prefixCls: f,
|
|
586
586
|
currentOffset: S,
|
|
587
587
|
headerSize: m,
|
|
@@ -614,13 +614,13 @@ const Ot = (e, s, a) => {
|
|
|
614
614
|
renderTitle: e.children || Ze,
|
|
615
615
|
onClickTab: () => {
|
|
616
616
|
var T;
|
|
617
|
-
(T =
|
|
617
|
+
(T = i.onClickTab) == null || T.call(i, r.key);
|
|
618
618
|
},
|
|
619
619
|
isActive: ne === r.key,
|
|
620
620
|
editable: se && r.props.closable !== !1,
|
|
621
|
-
deleteIcon:
|
|
621
|
+
deleteIcon: N == null ? void 0 : N.delete,
|
|
622
622
|
deleteButton: Je,
|
|
623
|
-
getIdPrefix:
|
|
623
|
+
getIdPrefix: o.getIdPrefix,
|
|
624
624
|
index: y
|
|
625
625
|
},
|
|
626
626
|
y
|
|
@@ -651,7 +651,7 @@ const Ot = (e, s, a) => {
|
|
|
651
651
|
prefixCls: f,
|
|
652
652
|
rtl: n,
|
|
653
653
|
iconPos: "next",
|
|
654
|
-
icon:
|
|
654
|
+
icon: N == null ? void 0 : N.next,
|
|
655
655
|
currentOffset: S,
|
|
656
656
|
headerSize: m,
|
|
657
657
|
headerWrapperSize: t,
|
|
@@ -663,20 +663,20 @@ const Ot = (e, s, a) => {
|
|
|
663
663
|
ge && /* @__PURE__ */ u(
|
|
664
664
|
kt,
|
|
665
665
|
{
|
|
666
|
-
onClickTab:
|
|
666
|
+
onClickTab: i.onClickTab,
|
|
667
667
|
paneChildren: Y,
|
|
668
668
|
prefixCls: f,
|
|
669
669
|
currentOffset: S,
|
|
670
670
|
headerSize: m,
|
|
671
|
-
icon:
|
|
671
|
+
icon: N == null ? void 0 : N.dropdown,
|
|
672
672
|
headerWrapperSize: t,
|
|
673
673
|
getTitleRef: (r) => I.current[r],
|
|
674
674
|
direction: C
|
|
675
675
|
}
|
|
676
676
|
),
|
|
677
|
-
(se && j ||
|
|
677
|
+
(se && j || Pe) && /* @__PURE__ */ ee("div", { className: `${f}-header-extra`, ref: h, children: [
|
|
678
678
|
j && Re(se),
|
|
679
|
-
|
|
679
|
+
Pe
|
|
680
680
|
] })
|
|
681
681
|
]
|
|
682
682
|
}
|
|
@@ -686,13 +686,13 @@ const Ot = (e, s, a) => {
|
|
|
686
686
|
});
|
|
687
687
|
xe.displayName = "TabHeader";
|
|
688
688
|
const Rt = ["mini", "small", "default", "large"], Dt = (e) => {
|
|
689
|
-
const { children: s } = e,
|
|
689
|
+
const { children: s } = e, o = [];
|
|
690
690
|
return te.Children.forEach(s, (n) => {
|
|
691
|
-
n && n.type && n.type.isTabPane &&
|
|
692
|
-
}),
|
|
691
|
+
n && n.type && n.type.isTabPane && o.push(n);
|
|
692
|
+
}), o;
|
|
693
693
|
}, Wt = (e) => {
|
|
694
|
-
const { direction: s, tabPosition:
|
|
695
|
-
return s === "vertical" ||
|
|
694
|
+
const { direction: s, tabPosition: o, animation: n } = e;
|
|
695
|
+
return s === "vertical" || o === "left" || o === "right" ? !1 : ke(n) ? "tabPane" in n ? n.tabPane : !1 : n;
|
|
696
696
|
}, At = {
|
|
697
697
|
tabPosition: "top",
|
|
698
698
|
type: "line",
|
|
@@ -701,31 +701,31 @@ const Rt = ["mini", "small", "default", "large"], Dt = (e) => {
|
|
|
701
701
|
lazyload: !0,
|
|
702
702
|
headerPadding: !0,
|
|
703
703
|
scrollPosition: "auto"
|
|
704
|
-
},
|
|
704
|
+
}, Ne = te.createContext({});
|
|
705
705
|
function Mt(e, s) {
|
|
706
706
|
const {
|
|
707
|
-
getPrefixCls:
|
|
707
|
+
getPrefixCls: o,
|
|
708
708
|
size: n,
|
|
709
|
-
componentConfig:
|
|
709
|
+
componentConfig: i,
|
|
710
710
|
rtl: b
|
|
711
711
|
} = ie(Oe), t = lt(
|
|
712
712
|
e,
|
|
713
713
|
At,
|
|
714
|
-
|
|
714
|
+
i == null ? void 0 : i.Tabs
|
|
715
715
|
), v = Dt(t), g = V(null), [m, w] = dt(
|
|
716
716
|
v[0] && v[0].key,
|
|
717
717
|
{
|
|
718
718
|
defaultValue: "defaultActiveTab" in t ? t.defaultActiveTab : void 0,
|
|
719
719
|
value: "activeTab" in t ? t.activeTab : void 0
|
|
720
720
|
}
|
|
721
|
-
), l =
|
|
721
|
+
), l = o == null ? void 0 : o("tabs"), c = t.size || (Rt.indexOf(n) > -1 ? n : "default"), {
|
|
722
722
|
animation: x,
|
|
723
723
|
className: h,
|
|
724
724
|
direction: p,
|
|
725
725
|
style: d,
|
|
726
|
-
type:
|
|
726
|
+
type: a,
|
|
727
727
|
justify: $,
|
|
728
|
-
destroyOnHide:
|
|
728
|
+
destroyOnHide: P,
|
|
729
729
|
lazyload: I,
|
|
730
730
|
headerSticky: S,
|
|
731
731
|
// 潘启宝添加
|
|
@@ -755,7 +755,7 @@ function Mt(e, s) {
|
|
|
755
755
|
activeTab: m,
|
|
756
756
|
paneChildren: v,
|
|
757
757
|
prefixCls: l,
|
|
758
|
-
destroyOnHide:
|
|
758
|
+
destroyOnHide: P,
|
|
759
759
|
lazyload: I
|
|
760
760
|
}
|
|
761
761
|
);
|
|
@@ -786,7 +786,7 @@ function Mt(e, s) {
|
|
|
786
786
|
className: X(
|
|
787
787
|
l,
|
|
788
788
|
`${l}-${["left", "right"].indexOf(O) > -1 ? "vertical" : "horizontal"}`,
|
|
789
|
-
`${l}-${
|
|
789
|
+
`${l}-${a}`,
|
|
790
790
|
!!S && `${l}-sticky`,
|
|
791
791
|
// 潘启宝添加
|
|
792
792
|
`${l}-${O}`,
|
|
@@ -799,7 +799,7 @@ function Mt(e, s) {
|
|
|
799
799
|
),
|
|
800
800
|
ref: g,
|
|
801
801
|
children: /* @__PURE__ */ ee(
|
|
802
|
-
|
|
802
|
+
Ne.Provider,
|
|
803
803
|
{
|
|
804
804
|
value: {
|
|
805
805
|
...C,
|
|
@@ -838,6 +838,6 @@ Ue.displayName = "Tabs";
|
|
|
838
838
|
Ue.TabPane = ft;
|
|
839
839
|
export {
|
|
840
840
|
Ue as T,
|
|
841
|
-
|
|
841
|
+
Ne as a,
|
|
842
842
|
wt as b
|
|
843
843
|
};
|