@unicom-cloud/ui 0.8.78 → 0.8.80
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 +18 -18
- 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/{CjqvxJml.js → BG7YGUsx.js} +32 -32
- 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/{Cwm8LL5p.js → D73Vr7fa.js} +7197 -7202
- 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/{BhBEMwvI.js → uKZyjtff.js} +20 -21
- 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 +539 -572
- 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 +40 -40
- package/steps/Step.js +8 -8
- package/steps/index.js +17 -17
- 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 +5 -5
- 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 +25 -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 +262 -299
- 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
package/anchor/Anchor.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsxs as mt, jsx as w } from "react/jsx-runtime";
|
|
2
|
-
import { compute as
|
|
3
|
-
import { p as
|
|
2
|
+
import { compute as dt } from "../utils/computeScrollIntoView.js";
|
|
3
|
+
import { p as pt } from "../chunk/Coz3rCng.js";
|
|
4
4
|
import D from "lodash/isFunction";
|
|
5
5
|
import P from "lodash/isNumber";
|
|
6
6
|
import gt from "lodash/throttle";
|
|
7
|
-
import { forwardRef as ht, useContext as Ct, useRef as x, useState as xt, useEffect as
|
|
7
|
+
import { forwardRef as ht, useContext as Ct, useRef as x, useState as xt, useEffect as N, useCallback as S, useImperativeHandle as kt } from "react";
|
|
8
8
|
import yt from "../affix/index.js";
|
|
9
|
-
import { a as Lt } from "../chunk/
|
|
9
|
+
import { a as Lt } from "../chunk/CQvM33Vg.js";
|
|
10
10
|
import { u as Rt } from "../chunk/oopARUrq.js";
|
|
11
11
|
import { u as wt } from "../chunk/BFTV6myl.js";
|
|
12
|
-
import { u as
|
|
13
|
-
import
|
|
14
|
-
import { on as
|
|
15
|
-
import { l as
|
|
16
|
-
import
|
|
12
|
+
import { u as Nt } from "../chunk/Duezix3m.js";
|
|
13
|
+
import St from "@unicom-cloud/utils/class-name";
|
|
14
|
+
import { on as $t, off as At } from "../utils/dom.js";
|
|
15
|
+
import { l as Tt } from "../chunk/ClM74To2.js";
|
|
16
|
+
import vt from "./context.js";
|
|
17
17
|
import bt from "./Link.js";
|
|
18
18
|
import { findNode as M, getContainerElement as Pt, getContainer as Mt, getScrollParent as Et, slide as Ft } from "./util.js";
|
|
19
19
|
const It = {
|
|
@@ -23,10 +23,10 @@ const It = {
|
|
|
23
23
|
boundary: "start"
|
|
24
24
|
};
|
|
25
25
|
function Ht(q, G) {
|
|
26
|
-
const { getPrefixCls: J, componentConfig:
|
|
26
|
+
const { getPrefixCls: J, componentConfig: $, rtl: E } = Ct(Lt), K = wt(
|
|
27
27
|
q,
|
|
28
28
|
It,
|
|
29
|
-
|
|
29
|
+
$ == null ? void 0 : $.Anchor
|
|
30
30
|
), {
|
|
31
31
|
className: Q,
|
|
32
32
|
style: X,
|
|
@@ -39,26 +39,26 @@ function Ht(q, G) {
|
|
|
39
39
|
offsetTop: nt,
|
|
40
40
|
hash: F = !0,
|
|
41
41
|
boundary: i = "start",
|
|
42
|
-
targetOffset:
|
|
42
|
+
targetOffset: A,
|
|
43
43
|
children: rt,
|
|
44
44
|
direction: y = "vertical",
|
|
45
45
|
onSelect: I,
|
|
46
|
-
onChange:
|
|
46
|
+
onChange: T,
|
|
47
47
|
...ot
|
|
48
|
-
} = K, f = J("anchor"), it =
|
|
48
|
+
} = K, f = J("anchor"), it = St(f, Q, {
|
|
49
49
|
[`${f}-lineless`]: k,
|
|
50
50
|
[`${f}-rtl`]: E,
|
|
51
51
|
[`${f}-horizontal`]: y === "horizontal"
|
|
52
|
-
}), s = x(null),
|
|
52
|
+
}), s = x(null), d = x(null), a = x(/* @__PURE__ */ new Map()), v = x(!1), p = x(null), [st, H] = xt(0), [o, ct] = Nt(""), lt = Rt();
|
|
53
53
|
function O() {
|
|
54
54
|
let t = Mt(m);
|
|
55
55
|
return m || (t = Et(s.current)), t;
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
N(() => {
|
|
58
58
|
const t = O();
|
|
59
|
-
|
|
59
|
+
p.current = t;
|
|
60
60
|
}, [m]);
|
|
61
|
-
const ft =
|
|
61
|
+
const ft = S(() => O(), [m]);
|
|
62
62
|
kt(
|
|
63
63
|
G,
|
|
64
64
|
() => ({
|
|
@@ -73,7 +73,7 @@ function Ht(q, G) {
|
|
|
73
73
|
function at(t) {
|
|
74
74
|
a.current.delete(t), H(Math.random());
|
|
75
75
|
}
|
|
76
|
-
const L =
|
|
76
|
+
const L = S(
|
|
77
77
|
(t) => {
|
|
78
78
|
if (!t || !s.current)
|
|
79
79
|
return;
|
|
@@ -82,39 +82,39 @@ function Ht(q, G) {
|
|
|
82
82
|
n && z(t, n);
|
|
83
83
|
}
|
|
84
84
|
const e = a.current.get(t);
|
|
85
|
-
e && t !== o && (
|
|
85
|
+
e && t !== o && (pt(e, {
|
|
86
86
|
behavior: "auto",
|
|
87
87
|
block: "nearest",
|
|
88
88
|
scrollMode: "if-needed",
|
|
89
89
|
boundary: s.current
|
|
90
90
|
}), ct(t).then(() => {
|
|
91
|
-
D(
|
|
91
|
+
D(T) && T(t, o);
|
|
92
92
|
}));
|
|
93
93
|
},
|
|
94
|
-
[o,
|
|
95
|
-
), B =
|
|
94
|
+
[o, T]
|
|
95
|
+
), B = S(() => {
|
|
96
96
|
let t;
|
|
97
|
-
const e = P(i) ? i : 0, n =
|
|
97
|
+
const e = P(i) ? i : 0, n = p.current, h = Pt(n).getBoundingClientRect(), R = document.documentElement.clientHeight;
|
|
98
98
|
return [...a.current.keys()].some((b) => {
|
|
99
99
|
const c = M(document, b);
|
|
100
100
|
let u = !1;
|
|
101
101
|
if (c) {
|
|
102
102
|
const { top: r, height: C } = c.getBoundingClientRect();
|
|
103
|
-
if (
|
|
104
|
-
const l =
|
|
103
|
+
if (Tt(n)) {
|
|
104
|
+
const l = A ?? R / 2;
|
|
105
105
|
u = r >= e && r <= l || r <= e && r + C >= l;
|
|
106
106
|
} else {
|
|
107
|
-
const l = r - h.top - e, j =
|
|
107
|
+
const l = r - h.top - e, j = A ?? h.height / 2;
|
|
108
108
|
u = l >= 0 && l <= j || l <= 0 && l + C >= j;
|
|
109
109
|
}
|
|
110
110
|
u && (t = c);
|
|
111
111
|
}
|
|
112
112
|
return u;
|
|
113
113
|
}), t;
|
|
114
|
-
}, [i,
|
|
114
|
+
}, [i, A]), g = S(
|
|
115
115
|
gt(
|
|
116
116
|
(t) => {
|
|
117
|
-
if (
|
|
117
|
+
if (v.current)
|
|
118
118
|
return;
|
|
119
119
|
const e = B();
|
|
120
120
|
if (e && e.id) {
|
|
@@ -133,21 +133,21 @@ function Ht(q, G) {
|
|
|
133
133
|
const e = M(document, t);
|
|
134
134
|
if (!e)
|
|
135
135
|
return;
|
|
136
|
-
const n = P(i) ? "start" : i, W = P(i) ? i : 0, h =
|
|
136
|
+
const n = P(i) ? "start" : i, W = P(i) ? i : 0, h = dt(e, { block: n });
|
|
137
137
|
if (!h.length)
|
|
138
138
|
return;
|
|
139
139
|
let R = !1;
|
|
140
140
|
const b = h.map(({ el: c, top: u }) => new Promise((r) => {
|
|
141
141
|
if (!R) {
|
|
142
|
-
c ===
|
|
142
|
+
c === p.current && (R = !0);
|
|
143
143
|
const C = u - W;
|
|
144
144
|
return Y ? Ft(c, C, r) : (F || (c.scrollTop = C), r(null));
|
|
145
145
|
}
|
|
146
146
|
r(null);
|
|
147
147
|
}));
|
|
148
|
-
|
|
148
|
+
v.current = !0, Promise.all(b).then(() => {
|
|
149
149
|
setTimeout(() => {
|
|
150
|
-
|
|
150
|
+
v.current = !1;
|
|
151
151
|
}, 27);
|
|
152
152
|
});
|
|
153
153
|
} catch (e) {
|
|
@@ -157,19 +157,19 @@ function Ht(q, G) {
|
|
|
157
157
|
function ut(t, e) {
|
|
158
158
|
F || t.preventDefault(), L(e), U(e), D(I) && I(e, o);
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
N(() => {
|
|
161
161
|
const t = decodeURIComponent(location.hash);
|
|
162
162
|
t ? (L(t), U(t)) : g(null);
|
|
163
|
-
}, []),
|
|
164
|
-
|
|
165
|
-
}), [m, g]),
|
|
163
|
+
}, []), N(() => (lt || g(null), $t(p.current, "scroll", g), () => {
|
|
164
|
+
At(p.current, "scroll", g);
|
|
165
|
+
}), [m, g]), N(() => {
|
|
166
166
|
const t = a.current.get(o);
|
|
167
|
-
t && !k &&
|
|
167
|
+
t && !k && d.current && (y === "horizontal" ? (d.current.style.left = `${t.offsetLeft}px`, d.current.style.width = `${t.clientWidth}px`) : d.current.style.top = `${t.offsetTop}px`);
|
|
168
168
|
}, [o, k, y, E, st]);
|
|
169
169
|
const V = /* @__PURE__ */ mt("div", { className: it, style: X, ref: s, ...ot, children: [
|
|
170
|
-
!k && o && /* @__PURE__ */ w("div", { className: `${f}-line-slider`, ref:
|
|
170
|
+
!k && o && /* @__PURE__ */ w("div", { className: `${f}-line-slider`, ref: d }),
|
|
171
171
|
/* @__PURE__ */ w(
|
|
172
|
-
|
|
172
|
+
vt.Provider,
|
|
173
173
|
{
|
|
174
174
|
value: {
|
|
175
175
|
direction: y,
|
package/anchor/Link.js
CHANGED
|
@@ -3,10 +3,10 @@ import R from "lodash/isNull";
|
|
|
3
3
|
import g from "lodash/isPlainObject";
|
|
4
4
|
import E from "lodash/isString";
|
|
5
5
|
import L from "lodash/isUndefined";
|
|
6
|
-
import O, { forwardRef as
|
|
7
|
-
import { a as
|
|
8
|
-
import { u as
|
|
9
|
-
import
|
|
6
|
+
import O, { forwardRef as $, useContext as f, useRef as b, useImperativeHandle as v, useEffect as w, isValidElement as I } from "react";
|
|
7
|
+
import { a as M } from "../chunk/CQvM33Vg.js";
|
|
8
|
+
import { u as S } from "../chunk/BFTV6myl.js";
|
|
9
|
+
import z from "@unicom-cloud/utils/class-name";
|
|
10
10
|
import D from "./context.js";
|
|
11
11
|
const p = "AnchorLink", H = {
|
|
12
12
|
href: "#"
|
|
@@ -15,7 +15,7 @@ function U(o) {
|
|
|
15
15
|
return g(o) && Object.prototype.hasOwnProperty.call(o, "displayName");
|
|
16
16
|
}
|
|
17
17
|
function V(o, u) {
|
|
18
|
-
const { getPrefixCls: d, componentConfig: n } = f(
|
|
18
|
+
const { getPrefixCls: d, componentConfig: n } = f(M), { className: h, style: N, href: r, title: t, children: m, ...x } = S(
|
|
19
19
|
o,
|
|
20
20
|
H,
|
|
21
21
|
n == null ? void 0 : n["Anchor.Link"]
|
|
@@ -25,27 +25,27 @@ function V(o, u) {
|
|
|
25
25
|
[`${c}-active`]: y === r
|
|
26
26
|
},
|
|
27
27
|
h
|
|
28
|
-
), l =
|
|
29
|
-
return
|
|
28
|
+
), l = b(null);
|
|
29
|
+
return v(u, () => l.current, []), w(() => (s == null || s(r, l.current), () => {
|
|
30
30
|
i == null || i(r);
|
|
31
31
|
}), [r]), /* @__PURE__ */ j("div", { className: P, style: N, ref: l, ...x, children: [
|
|
32
|
-
!L(
|
|
32
|
+
!L(t) && !R(t) && /* @__PURE__ */ k(
|
|
33
33
|
"a",
|
|
34
34
|
{
|
|
35
35
|
className: `${c}-title`,
|
|
36
|
-
title: E(
|
|
36
|
+
title: E(t) ? t : "",
|
|
37
37
|
href: r,
|
|
38
38
|
"data-href": r,
|
|
39
|
-
onClick: (
|
|
40
|
-
a == null || a(
|
|
39
|
+
onClick: (e) => {
|
|
40
|
+
a == null || a(e, r);
|
|
41
41
|
},
|
|
42
|
-
children:
|
|
42
|
+
children: t
|
|
43
43
|
}
|
|
44
44
|
),
|
|
45
|
-
m && A !== "horizontal" && O.Children.map(m, (
|
|
45
|
+
m && A !== "horizontal" && O.Children.map(m, (e) => I(e) && U(e.type) && e.type.displayName === p && e)
|
|
46
46
|
] });
|
|
47
47
|
}
|
|
48
|
-
const Y =
|
|
48
|
+
const Y = $(V);
|
|
49
49
|
Y.displayName = p;
|
|
50
50
|
export {
|
|
51
51
|
Y as default
|
package/anchor/util.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as l, q as u } from "../chunk/uKZyjtff.js";
|
|
2
2
|
import i from "lodash/isString";
|
|
3
|
-
import { l as c } from "../chunk/
|
|
3
|
+
import { l as c } from "../chunk/ClM74To2.js";
|
|
4
4
|
function d(o, n) {
|
|
5
5
|
const r = i(n) && n[0] === "#" ? `[id='${n.replace("#", "")}']` : n;
|
|
6
6
|
try {
|
package/auto-complete/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "@unicom-cloud/icons/IconUiLoading";
|
|
3
3
|
import "react";
|
|
4
|
-
import "../chunk/
|
|
4
|
+
import "../chunk/CQvM33Vg.js";
|
|
5
5
|
import "../chunk/BFTV6myl.js";
|
|
6
|
-
import "../chunk/
|
|
6
|
+
import "../chunk/CXPOj2uy.js";
|
|
7
7
|
import "../input/Input.js";
|
|
8
|
-
import { A as x } from "../chunk/
|
|
9
|
-
import "
|
|
10
|
-
import "
|
|
8
|
+
import { A as x } from "../chunk/D73Vr7fa.js";
|
|
9
|
+
import "@unicom-cloud/utils/class-name";
|
|
10
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
11
11
|
import "../chunk/BKKEev13.js";
|
|
12
12
|
import "../chunk/ClqoGc3r.js";
|
|
13
13
|
export {
|
package/avatar/Avatar.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { jsxs as W, jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import j from "lodash/isNumber";
|
|
3
|
-
import y, { forwardRef as E, useContext as
|
|
4
|
-
import { a as D } from "../chunk/
|
|
5
|
-
import
|
|
3
|
+
import y, { forwardRef as E, useContext as N, useRef as $, useImperativeHandle as H, useEffect as T } from "react";
|
|
4
|
+
import { a as D } from "../chunk/CQvM33Vg.js";
|
|
5
|
+
import L from "@unicom-cloud/utils/class-name";
|
|
6
6
|
import M from "./context.js";
|
|
7
7
|
const O = {
|
|
8
8
|
shape: "circle",
|
|
9
9
|
autoFixFontSize: !0,
|
|
10
10
|
triggerType: "button"
|
|
11
11
|
}, V = E(
|
|
12
|
-
(
|
|
13
|
-
const { getPrefixCls:
|
|
12
|
+
(n, v) => {
|
|
13
|
+
const { getPrefixCls: C, componentConfig: c, rtl: z } = N(D), t = C("avatar"), u = N(M), F = {
|
|
14
14
|
...O,
|
|
15
15
|
...c == null ? void 0 : c.Avatar,
|
|
16
16
|
...u,
|
|
17
|
-
...
|
|
17
|
+
...n
|
|
18
18
|
}, {
|
|
19
19
|
className: R,
|
|
20
20
|
shape: S,
|
|
21
21
|
size: e,
|
|
22
|
-
children:
|
|
22
|
+
children: s,
|
|
23
23
|
autoFixFontSize: b,
|
|
24
24
|
triggerIcon: l,
|
|
25
|
-
triggerIconStyle:
|
|
25
|
+
triggerIconStyle: o,
|
|
26
26
|
triggerType: g,
|
|
27
27
|
onClick: A,
|
|
28
28
|
...I
|
|
29
|
-
} = F, r = { ...u.style, ...
|
|
29
|
+
} = F, r = { ...u.style, ...n.style }, a = $(), f = $();
|
|
30
30
|
function P() {
|
|
31
|
-
if (
|
|
32
|
-
const w =
|
|
33
|
-
h && x < 1 && (
|
|
31
|
+
if (a.current) {
|
|
32
|
+
const w = a.current.clientWidth, h = n.size || f.current.offsetWidth, x = h / (w + 8);
|
|
33
|
+
h && x < 1 && (a.current.style.transform = `scale(${x}) translateX(-50%)`);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
const k = L(
|
|
@@ -41,14 +41,14 @@ const O = {
|
|
|
41
41
|
[`${t}-rtl`]: z
|
|
42
42
|
},
|
|
43
43
|
R
|
|
44
|
-
),
|
|
45
|
-
return g === "button" && (!
|
|
44
|
+
), i = y.Children.toArray(s), d = i.length === 1 && y.isValidElement(i[0]) && (i[0].type === "img" || i[0].type === "picture"), p = o || {};
|
|
45
|
+
return g === "button" && (!o || o && !o.color) && (r != null && r.backgroundColor) && (p.color = r.backgroundColor), H(v, () => ({
|
|
46
46
|
getRootDOMNode() {
|
|
47
47
|
return f.current;
|
|
48
48
|
}
|
|
49
49
|
})), T(() => {
|
|
50
50
|
b && P();
|
|
51
|
-
}, [e,
|
|
51
|
+
}, [e, s]), /* @__PURE__ */ W(
|
|
52
52
|
"div",
|
|
53
53
|
{
|
|
54
54
|
ref: f,
|
|
@@ -62,8 +62,8 @@ const O = {
|
|
|
62
62
|
},
|
|
63
63
|
className: k,
|
|
64
64
|
children: [
|
|
65
|
-
d ? /* @__PURE__ */ m("span", { className: `${t}-image`, children:
|
|
66
|
-
!d && /* @__PURE__ */ m("span", { ref:
|
|
65
|
+
d ? /* @__PURE__ */ m("span", { className: `${t}-image`, children: s }) : null,
|
|
66
|
+
!d && /* @__PURE__ */ m("span", { ref: a, className: `${t}-text`, children: s }),
|
|
67
67
|
l && /* @__PURE__ */ m(
|
|
68
68
|
"div",
|
|
69
69
|
{
|
package/avatar/Group.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as o, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { a as j } from "../chunk/
|
|
2
|
+
import $ from "lodash/isNumber";
|
|
3
|
+
import I, { forwardRef as R, useContext as b } from "react";
|
|
4
|
+
import { a as j } from "../chunk/CQvM33Vg.js";
|
|
5
5
|
import { u as T } from "../chunk/BFTV6myl.js";
|
|
6
6
|
import k from "../popover/index.js";
|
|
7
|
-
import
|
|
7
|
+
import q from "@unicom-cloud/utils/class-name";
|
|
8
8
|
import w from "./Avatar.js";
|
|
9
9
|
import v from "./context.js";
|
|
10
10
|
const L = {
|
|
@@ -23,10 +23,10 @@ function M(d, f) {
|
|
|
23
23
|
size: e,
|
|
24
24
|
shape: c,
|
|
25
25
|
autoFixFontSize: m,
|
|
26
|
-
zIndexAscend:
|
|
26
|
+
zIndexAscend: N,
|
|
27
27
|
maxCount: r,
|
|
28
|
-
maxStyle:
|
|
29
|
-
maxPopoverTriggerProps:
|
|
28
|
+
maxStyle: A,
|
|
29
|
+
maxPopoverTriggerProps: y,
|
|
30
30
|
...z
|
|
31
31
|
} = g, a = h("avatar-group"), F = q(
|
|
32
32
|
a,
|
|
@@ -34,20 +34,20 @@ function M(d, f) {
|
|
|
34
34
|
[`${a}-rtl`]: l
|
|
35
35
|
},
|
|
36
36
|
x
|
|
37
|
-
), s =
|
|
37
|
+
), s = I.Children.toArray(P), u = s.length;
|
|
38
38
|
let n = s;
|
|
39
|
-
if (
|
|
39
|
+
if ($(r) && r >= 0 && u > r) {
|
|
40
40
|
const p = s.slice(r);
|
|
41
41
|
n = s.slice(0, r), n.push(
|
|
42
42
|
/* @__PURE__ */ o(
|
|
43
43
|
w,
|
|
44
44
|
{
|
|
45
|
-
style:
|
|
45
|
+
style: A,
|
|
46
46
|
className: `${a}-max-count-avatar`,
|
|
47
47
|
children: /* @__PURE__ */ _(
|
|
48
48
|
k,
|
|
49
49
|
{
|
|
50
|
-
triggerProps:
|
|
50
|
+
triggerProps: y,
|
|
51
51
|
content: /* @__PURE__ */ o(v.Provider, { value: { size: e, shape: c, autoFixFontSize: m }, children: /* @__PURE__ */ o("div", { className: `${a}-popover`, children: p }) }),
|
|
52
52
|
children: [
|
|
53
53
|
"+",
|
|
@@ -62,7 +62,7 @@ function M(d, f) {
|
|
|
62
62
|
}
|
|
63
63
|
return /* @__PURE__ */ o("div", { ref: f, style: C, className: F, ...z, children: n.map((p, t) => {
|
|
64
64
|
const G = l ? t === n.length - 1 : t === 0, S = {
|
|
65
|
-
zIndex:
|
|
65
|
+
zIndex: N ? t + 1 : u - t,
|
|
66
66
|
marginLeft: e ? G ? 0 : -e / 4 : ""
|
|
67
67
|
};
|
|
68
68
|
return /* @__PURE__ */ o(
|
|
@@ -75,7 +75,7 @@ function M(d, f) {
|
|
|
75
75
|
);
|
|
76
76
|
}) });
|
|
77
77
|
}
|
|
78
|
-
const B =
|
|
78
|
+
const B = R(M);
|
|
79
79
|
B.displayName = "AvatarGroup";
|
|
80
80
|
export {
|
|
81
81
|
B as default
|
package/back-top/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import x from "@unicom-cloud/icons/IconUiToTop";
|
|
3
|
-
import { q as
|
|
4
|
-
import B, { forwardRef as E, useRef as
|
|
5
|
-
import { a as H } from "../chunk/
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { P as
|
|
9
|
-
import
|
|
3
|
+
import { q as C, I as y } from "../chunk/uKZyjtff.js";
|
|
4
|
+
import B, { forwardRef as E, useRef as N, useContext as P, useState as R, useEffect as S } from "react";
|
|
5
|
+
import { a as H } from "../chunk/CQvM33Vg.js";
|
|
6
|
+
import { u as I } from "../chunk/BYdIoY50.js";
|
|
7
|
+
import { u as $ } from "../chunk/BFTV6myl.js";
|
|
8
|
+
import { P as q } from "../chunk/NPajzdOv.js";
|
|
9
|
+
import D from "@unicom-cloud/utils/class-name";
|
|
10
10
|
import { on as K, off as U } from "../utils/dom.js";
|
|
11
11
|
import { a as j } from "../chunk/ClqoGc3r.js";
|
|
12
12
|
import A from "../utils/throttleByRaf.js";
|
|
13
13
|
function M(d, c) {
|
|
14
|
-
c || (c =
|
|
14
|
+
c || (c = N());
|
|
15
15
|
const g = {
|
|
16
16
|
visibleHeight: 400,
|
|
17
17
|
tween: !0,
|
|
18
|
-
easing:
|
|
18
|
+
easing: C,
|
|
19
19
|
duration: 400,
|
|
20
20
|
target: () => window
|
|
21
|
-
}, { getPrefixCls: T, componentConfig:
|
|
21
|
+
}, { getPrefixCls: T, componentConfig: a, rtl: b } = P(H), w = I(), t = $(
|
|
22
22
|
d,
|
|
23
23
|
g,
|
|
24
|
-
|
|
25
|
-
),
|
|
24
|
+
a == null ? void 0 : a.BackTop
|
|
25
|
+
), l = T("backtop"), [h, v] = R(!1), m = (e) => e === window ? document.documentElement : e;
|
|
26
26
|
S(() => {
|
|
27
27
|
var r;
|
|
28
28
|
const e = (r = t.target) == null ? void 0 : r.call(t), o = A(() => {
|
|
@@ -37,7 +37,7 @@ function M(d, c) {
|
|
|
37
37
|
const f = () => {
|
|
38
38
|
var s, n, u;
|
|
39
39
|
const e = (s = t.target) == null ? void 0 : s.call(t), o = m(e), r = o.scrollTop;
|
|
40
|
-
((n = window.getComputedStyle(o)) == null ? void 0 : n.scrollBehavior) === "smooth" || t.tween === !1 ? o.scrollTo(0, 0) : new
|
|
40
|
+
((n = window.getComputedStyle(o)) == null ? void 0 : n.scrollBehavior) === "smooth" || t.tween === !1 ? o.scrollTo(0, 0) : new y({
|
|
41
41
|
from: { scrollTop: r },
|
|
42
42
|
to: { scrollTop: 0 },
|
|
43
43
|
easing: t.easing,
|
|
@@ -52,9 +52,9 @@ function M(d, c) {
|
|
|
52
52
|
{
|
|
53
53
|
...j(t),
|
|
54
54
|
ref: c,
|
|
55
|
-
className:
|
|
56
|
-
`${
|
|
57
|
-
{ [`${
|
|
55
|
+
className: D(
|
|
56
|
+
`${l}`,
|
|
57
|
+
{ [`${l}-rtl`]: b },
|
|
58
58
|
t.className
|
|
59
59
|
),
|
|
60
60
|
style: t.style,
|
|
@@ -63,13 +63,13 @@ function M(d, c) {
|
|
|
63
63
|
onPressEnter: f
|
|
64
64
|
}),
|
|
65
65
|
children: /* @__PURE__ */ i(
|
|
66
|
-
|
|
66
|
+
q,
|
|
67
67
|
{
|
|
68
68
|
in: h,
|
|
69
69
|
timeout: 100,
|
|
70
70
|
classNames: "fadeIn",
|
|
71
71
|
unmountOnExit: !0,
|
|
72
|
-
children: t.children || /* @__PURE__ */ i("button", { className: `${
|
|
72
|
+
children: t.children || /* @__PURE__ */ i("button", { className: `${l}-button`, children: /* @__PURE__ */ i(x, {}) })
|
|
73
73
|
}
|
|
74
74
|
)
|
|
75
75
|
}
|
package/badge/Count.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as u } from "react";
|
|
3
3
|
import { u as d } from "../chunk/VSe_Wq1g.js";
|
|
4
|
-
import { P as
|
|
5
|
-
import
|
|
6
|
-
function
|
|
7
|
-
const [
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
|
|
4
|
+
import { P as p } from "../chunk/NPajzdOv.js";
|
|
5
|
+
import f from "@unicom-cloud/utils/class-name";
|
|
6
|
+
function P({ prefixCls: t, maxCount: s, count: e, className: a, style: n }) {
|
|
7
|
+
const [o, m] = u(!1), i = d(e), l = e !== i;
|
|
8
|
+
return /* @__PURE__ */ r(
|
|
9
|
+
p,
|
|
10
10
|
{
|
|
11
11
|
classNames: "badge-zoom",
|
|
12
12
|
in: e > 0,
|
|
@@ -15,15 +15,15 @@ function S({ prefixCls: s, maxCount: r, count: e, className: n, style: o }) {
|
|
|
15
15
|
mountOnEnter: !0,
|
|
16
16
|
unmountOnExit: !0,
|
|
17
17
|
onEntered: () => {
|
|
18
|
-
|
|
18
|
+
m(!0);
|
|
19
19
|
},
|
|
20
|
-
children: /* @__PURE__ */
|
|
20
|
+
children: /* @__PURE__ */ r("span", { className: a, style: n, children: /* @__PURE__ */ r(
|
|
21
21
|
"span",
|
|
22
22
|
{
|
|
23
|
-
className:
|
|
24
|
-
[`${
|
|
23
|
+
className: f({
|
|
24
|
+
[`${t}-number-text`]: o && l
|
|
25
25
|
}),
|
|
26
|
-
children:
|
|
26
|
+
children: s && e > s ? `${s}+` : e
|
|
27
27
|
},
|
|
28
28
|
e
|
|
29
29
|
) })
|
|
@@ -31,5 +31,5 @@ function S({ prefixCls: s, maxCount: r, count: e, className: n, style: o }) {
|
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
33
|
export {
|
|
34
|
-
|
|
34
|
+
P as default
|
|
35
35
|
};
|