@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
package/Tabs.js
CHANGED
package/Tag.js
CHANGED
|
@@ -3,7 +3,7 @@ import "@unicom-cloud/icons/IconUiClose";
|
|
|
3
3
|
import "@unicom-cloud/icons/IconUiLoading";
|
|
4
4
|
import "lodash/isPlainObject";
|
|
5
5
|
import "react";
|
|
6
|
-
import "./chunk/
|
|
6
|
+
import "./chunk/C9oo3EJI.js";
|
|
7
7
|
import "./chunk/BYdIoY50.js";
|
|
8
8
|
import "./chunk/BFTV6myl.js";
|
|
9
9
|
import "./popconfirm/index.js";
|
package/Tooltip.js
CHANGED
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "./chunk/9TSjT7x_.js";
|
|
3
3
|
import "lodash/isFunction";
|
|
4
4
|
import "react";
|
|
5
|
-
import "./chunk/
|
|
5
|
+
import "./chunk/C9oo3EJI.js";
|
|
6
6
|
import "./chunk/BFTV6myl.js";
|
|
7
7
|
import "./trigger/index.js";
|
|
8
8
|
import "@unicom-cloud/utils/class-name";
|
package/Transfer.js
CHANGED
|
@@ -4,12 +4,12 @@ import "@unicom-cloud/icons/IconUiRight";
|
|
|
4
4
|
import "lodash/isPlainObject";
|
|
5
5
|
import "react";
|
|
6
6
|
import "./button/index.js";
|
|
7
|
-
import "./chunk/
|
|
7
|
+
import "./chunk/C9oo3EJI.js";
|
|
8
8
|
import "./chunk/BFTV6myl.js";
|
|
9
9
|
import "./chunk/CXPOj2uy.js";
|
|
10
10
|
import "@unicom-cloud/utils/class-name";
|
|
11
11
|
import "./chunk/ClqoGc3r.js";
|
|
12
|
-
import { r as x } from "./chunk/
|
|
12
|
+
import { r as x } from "./chunk/BmulTYLW.js";
|
|
13
13
|
export {
|
|
14
14
|
x as default
|
|
15
15
|
};
|
package/Tree.js
CHANGED
package/TreeSelect.js
CHANGED
package/Trigger.js
CHANGED
package/Typography.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as o, w as t } from "./chunk/
|
|
1
|
+
import { E as o, w as t } from "./chunk/BmulTYLW.js";
|
|
2
2
|
import { default as f } from "./typography/Paragraph.js";
|
|
3
3
|
import { default as l } from "./typography/Text.js";
|
|
4
4
|
import { default as T } from "./typography/Title.js";
|
package/affix/index.js
CHANGED
|
@@ -1,57 +1,60 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
import { a as
|
|
7
|
-
import { u as
|
|
1
|
+
import { jsxs as k, jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import N from "lodash/isFunction";
|
|
3
|
+
import q from "lodash/isPlainObject";
|
|
4
|
+
import G from "lodash/isUndefined";
|
|
5
|
+
import { forwardRef as J, useContext as K, useState as Q, useRef as b, useMemo as V, useCallback as X, useEffect as m, useImperativeHandle as Y } from "react";
|
|
6
|
+
import { a as Z } from "../chunk/C9oo3EJI.js";
|
|
7
|
+
import { u as P } from "../chunk/B2yFlXke.js";
|
|
8
8
|
import { u as tt } from "../chunk/BFTV6myl.js";
|
|
9
|
-
import
|
|
10
|
-
import { getScrollElements as et, on as
|
|
9
|
+
import v from "@unicom-cloud/utils/class-name";
|
|
10
|
+
import { getScrollElements as et, on as A, off as p } from "../utils/dom.js";
|
|
11
11
|
import { l as rt } from "../chunk/ClM74To2.js";
|
|
12
12
|
import { r as st } from "../chunk/CIRG541s.js";
|
|
13
13
|
import ot from "../utils/throttleByRaf.js";
|
|
14
|
-
function nt(
|
|
15
|
-
return rt(
|
|
14
|
+
function nt(i) {
|
|
15
|
+
return rt(i) ? {
|
|
16
16
|
top: 0,
|
|
17
17
|
bottom: window.innerHeight
|
|
18
|
-
} :
|
|
18
|
+
} : i instanceof HTMLElement ? i.getBoundingClientRect() : {
|
|
19
|
+
top: 0,
|
|
20
|
+
bottom: 0
|
|
21
|
+
};
|
|
19
22
|
}
|
|
20
23
|
const it = {
|
|
21
24
|
offsetTop: 0
|
|
22
25
|
};
|
|
23
|
-
function ft(
|
|
24
|
-
const { getPrefixCls:
|
|
25
|
-
|
|
26
|
+
function ft(i, H) {
|
|
27
|
+
const { getPrefixCls: d, componentConfig: x, rtl: O } = K(Z), U = tt(
|
|
28
|
+
i,
|
|
26
29
|
it,
|
|
27
|
-
|
|
30
|
+
x == null ? void 0 : x.Affix
|
|
28
31
|
), {
|
|
29
|
-
className:
|
|
30
|
-
style:
|
|
32
|
+
className: _,
|
|
33
|
+
style: B,
|
|
31
34
|
affixClassName: I,
|
|
32
|
-
affixStyle:
|
|
35
|
+
affixStyle: C,
|
|
33
36
|
offsetTop: l,
|
|
34
|
-
offsetBottom:
|
|
35
|
-
target:
|
|
37
|
+
offsetBottom: f,
|
|
38
|
+
target: S,
|
|
36
39
|
targetContainer: a,
|
|
37
40
|
children: j,
|
|
38
|
-
onChange:
|
|
41
|
+
onChange: y,
|
|
39
42
|
...D
|
|
40
|
-
} =
|
|
43
|
+
} = U, [g, T] = Q({
|
|
41
44
|
status: "MEASURE_DONE",
|
|
42
45
|
isFixed: !1,
|
|
43
46
|
sizeStyles: {},
|
|
44
47
|
fixedStyles: {}
|
|
45
|
-
}), { isFixed:
|
|
46
|
-
{ [F]:
|
|
48
|
+
}), { isFixed: R, sizeStyles: L, fixedStyles: W } = g, z = b(R), F = d == null ? void 0 : d("affix"), $ = v(
|
|
49
|
+
{ [F]: R, [`${F}-rtl`]: O },
|
|
47
50
|
I
|
|
48
|
-
), r =
|
|
49
|
-
var n,
|
|
51
|
+
), r = b(null), s = b(null), w = V(() => {
|
|
52
|
+
var n, c;
|
|
50
53
|
let e = null;
|
|
51
|
-
return
|
|
52
|
-
}, [r.current,
|
|
54
|
+
return N(S) ? e = S() : e = ((c = (n = et(r.current)) == null ? void 0 : n.at) == null ? void 0 : c.call(n, -1)) || window, e;
|
|
55
|
+
}, [r.current, S]), t = X(
|
|
53
56
|
ot(() => {
|
|
54
|
-
|
|
57
|
+
T({
|
|
55
58
|
status: "MEASURE_START",
|
|
56
59
|
isFixed: !1,
|
|
57
60
|
fixedStyles: {},
|
|
@@ -60,45 +63,45 @@ function ft(c, v) {
|
|
|
60
63
|
}),
|
|
61
64
|
[]
|
|
62
65
|
);
|
|
63
|
-
return
|
|
66
|
+
return P(() => {
|
|
64
67
|
const { status: e } = g;
|
|
65
68
|
if (e !== "MEASURE_START" || !r.current || !s.current)
|
|
66
69
|
return;
|
|
67
|
-
const n =
|
|
68
|
-
let o = !1,
|
|
69
|
-
n === "top" ? (o =
|
|
70
|
+
const n = G(f) ? "top" : "bottom", c = r.current.getBoundingClientRect(), u = nt(s.current);
|
|
71
|
+
let o = !1, E = {};
|
|
72
|
+
n === "top" ? (o = c.top - u.top < (l || 0), E = o ? {
|
|
70
73
|
position: "fixed",
|
|
71
74
|
top: u.top + (l || 0)
|
|
72
|
-
} : {}) : (o = u.bottom -
|
|
75
|
+
} : {}) : (o = u.bottom - c.bottom < (f || 0), E = o ? {
|
|
73
76
|
position: "fixed",
|
|
74
|
-
bottom: window.innerHeight - u.bottom + (
|
|
77
|
+
bottom: window.innerHeight - u.bottom + (f || 0)
|
|
75
78
|
} : {});
|
|
76
|
-
const
|
|
79
|
+
const M = o ? {
|
|
77
80
|
width: r.current.offsetWidth,
|
|
78
81
|
height: r.current.offsetHeight
|
|
79
82
|
} : {};
|
|
80
|
-
|
|
83
|
+
T({
|
|
81
84
|
status: "MEASURE_DONE",
|
|
82
85
|
isFixed: o,
|
|
83
|
-
sizeStyles:
|
|
84
|
-
fixedStyles: { ...
|
|
85
|
-
}), o !== z.current && (z.current = o,
|
|
86
|
-
}, [g,
|
|
86
|
+
sizeStyles: M,
|
|
87
|
+
fixedStyles: { ...E, ...M }
|
|
88
|
+
}), o !== z.current && (z.current = o, N(y) && y(o));
|
|
89
|
+
}, [g, f, l, y]), m(() => (t(), () => {
|
|
87
90
|
var e;
|
|
88
91
|
(e = t == null ? void 0 : t.cancel) == null || e.call(t);
|
|
89
|
-
}), [
|
|
90
|
-
if (s.current =
|
|
91
|
-
return
|
|
92
|
+
}), [w, a, f, l, t]), m(() => {
|
|
93
|
+
if (s.current = w, s.current)
|
|
94
|
+
return A(s.current, "scroll", t), A(s.current, "resize", t), () => {
|
|
92
95
|
p(s.current, "scroll", t), p(s.current, "resize", t);
|
|
93
96
|
};
|
|
94
|
-
}, [
|
|
95
|
-
const e =
|
|
96
|
-
return s.current !== window && e ? (
|
|
97
|
+
}, [w, t]), m(() => {
|
|
98
|
+
const e = N(a) ? a() : null;
|
|
99
|
+
return s.current !== window && e ? (A(e, "scroll", t), () => {
|
|
97
100
|
p(e, "scroll", t);
|
|
98
101
|
}) : () => {
|
|
99
102
|
p(e, "scroll", t);
|
|
100
103
|
};
|
|
101
|
-
}, [a, t]),
|
|
104
|
+
}, [a, t]), Y(H, () => ({
|
|
102
105
|
updatePosition: t,
|
|
103
106
|
getRootDOMNode: () => r.current
|
|
104
107
|
})), m(() => {
|
|
@@ -106,22 +109,22 @@ function ft(c, v) {
|
|
|
106
109
|
return () => {
|
|
107
110
|
e();
|
|
108
111
|
};
|
|
109
|
-
}, [r.current]), /* @__PURE__ */
|
|
110
|
-
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
+
}, [r.current]), /* @__PURE__ */ k("div", { className: v(_), style: B, ref: r, ...D, children: [
|
|
113
|
+
R && /* @__PURE__ */ h("div", { style: L }),
|
|
114
|
+
/* @__PURE__ */ h(
|
|
112
115
|
"div",
|
|
113
116
|
{
|
|
114
|
-
className:
|
|
117
|
+
className: $,
|
|
115
118
|
style: {
|
|
116
|
-
|
|
117
|
-
...
|
|
119
|
+
...W,
|
|
120
|
+
...q(C) ? C : {}
|
|
118
121
|
},
|
|
119
|
-
children: j || /* @__PURE__ */
|
|
122
|
+
children: j || /* @__PURE__ */ h("span", {})
|
|
120
123
|
}
|
|
121
124
|
)
|
|
122
125
|
] });
|
|
123
126
|
}
|
|
124
|
-
const ct =
|
|
127
|
+
const ct = J(
|
|
125
128
|
ft
|
|
126
129
|
);
|
|
127
130
|
ct.displayName = "Affix";
|
package/alert/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import j from "@unicom-cloud/icons/IconUiCheckCircleFill";
|
|
3
|
+
import k from "@unicom-cloud/icons/IconUiClose";
|
|
4
|
+
import R from "@unicom-cloud/icons/IconUiCloseCircleFill";
|
|
5
|
+
import T from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
6
|
+
import g from "@unicom-cloud/icons/IconUiInfoCircleFill";
|
|
7
7
|
import { forwardRef as q, useRef as z, useContext as H, useState as M } from "react";
|
|
8
|
-
import { a as O } from "../chunk/
|
|
8
|
+
import { a as O } from "../chunk/C9oo3EJI.js";
|
|
9
9
|
import { u as V } from "../chunk/BFTV6myl.js";
|
|
10
10
|
import _ from "@unicom-cloud/utils/class-name";
|
|
11
11
|
import { P as B } from "../chunk/NPajzdOv.js";
|
|
@@ -13,90 +13,90 @@ const D = {
|
|
|
13
13
|
showIcon: !0,
|
|
14
14
|
type: "info"
|
|
15
15
|
};
|
|
16
|
-
function G(
|
|
17
|
-
|
|
18
|
-
const { getPrefixCls:
|
|
19
|
-
|
|
16
|
+
function G(h, c) {
|
|
17
|
+
c || (c = z());
|
|
18
|
+
const { getPrefixCls: o, componentConfig: r, rtl: N } = H(O), a = V(
|
|
19
|
+
h,
|
|
20
20
|
D,
|
|
21
|
-
|
|
21
|
+
r == null ? void 0 : r.Alert
|
|
22
22
|
), {
|
|
23
|
-
style:
|
|
24
|
-
className:
|
|
25
|
-
action:
|
|
26
|
-
type:
|
|
27
|
-
title:
|
|
28
|
-
content:
|
|
23
|
+
style: b,
|
|
24
|
+
className: $,
|
|
25
|
+
action: m,
|
|
26
|
+
type: u = "info",
|
|
27
|
+
title: n,
|
|
28
|
+
content: p,
|
|
29
29
|
icon: f,
|
|
30
|
-
showIcon:
|
|
31
|
-
closable:
|
|
32
|
-
closeable:
|
|
33
|
-
afterClose:
|
|
34
|
-
onClose:
|
|
35
|
-
closeElement:
|
|
30
|
+
showIcon: C,
|
|
31
|
+
closable: I,
|
|
32
|
+
closeable: w,
|
|
33
|
+
afterClose: s,
|
|
34
|
+
onClose: i,
|
|
35
|
+
closeElement: x,
|
|
36
36
|
banner: v,
|
|
37
37
|
...y
|
|
38
|
-
} =
|
|
39
|
-
function
|
|
38
|
+
} = a, e = o == null ? void 0 : o("alert"), [U, A] = M(!0);
|
|
39
|
+
function E(l) {
|
|
40
40
|
if (f)
|
|
41
41
|
return f;
|
|
42
|
-
switch (
|
|
42
|
+
switch (l) {
|
|
43
43
|
case "info":
|
|
44
|
-
return /* @__PURE__ */ t(
|
|
44
|
+
return /* @__PURE__ */ t(g, {});
|
|
45
45
|
case "success":
|
|
46
|
-
return /* @__PURE__ */ t(
|
|
46
|
+
return /* @__PURE__ */ t(j, {});
|
|
47
47
|
case "warning":
|
|
48
|
-
return /* @__PURE__ */ t(
|
|
48
|
+
return /* @__PURE__ */ t(T, {});
|
|
49
49
|
case "error":
|
|
50
|
-
return /* @__PURE__ */ t(
|
|
50
|
+
return /* @__PURE__ */ t(R, {});
|
|
51
51
|
default:
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
|
|
55
|
+
function F(l) {
|
|
56
|
+
A(!1), i == null || i(l);
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const P = _(
|
|
59
59
|
e,
|
|
60
|
-
`${e}-${
|
|
60
|
+
`${e}-${u}`,
|
|
61
61
|
{
|
|
62
|
-
[`${e}-with-title`]:
|
|
62
|
+
[`${e}-with-title`]: n,
|
|
63
63
|
[`${e}-banner`]: v,
|
|
64
|
-
[`${e}-rtl`]:
|
|
64
|
+
[`${e}-rtl`]: N
|
|
65
65
|
},
|
|
66
|
-
|
|
67
|
-
),
|
|
66
|
+
$
|
|
67
|
+
), S = "closeable" in a ? w : I;
|
|
68
68
|
return /* @__PURE__ */ t(
|
|
69
69
|
B,
|
|
70
70
|
{
|
|
71
|
-
in:
|
|
71
|
+
in: U,
|
|
72
72
|
timeout: 300,
|
|
73
73
|
classNames: "zoomInTop",
|
|
74
74
|
unmountOnExit: !0,
|
|
75
75
|
onExited: () => {
|
|
76
|
-
|
|
76
|
+
s == null || s();
|
|
77
77
|
},
|
|
78
|
-
children: /* @__PURE__ */
|
|
78
|
+
children: /* @__PURE__ */ d(
|
|
79
79
|
"div",
|
|
80
80
|
{
|
|
81
|
-
ref:
|
|
82
|
-
style:
|
|
83
|
-
className:
|
|
81
|
+
ref: c,
|
|
82
|
+
style: b,
|
|
83
|
+
className: P,
|
|
84
84
|
role: "alert",
|
|
85
85
|
...y,
|
|
86
86
|
children: [
|
|
87
|
-
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
C && /* @__PURE__ */ t("div", { className: `${e}-icon-wrapper`, children: E(u) }),
|
|
88
|
+
/* @__PURE__ */ d("div", { className: `${e}-content-wrapper`, children: [
|
|
89
|
+
n && /* @__PURE__ */ t("div", { className: `${e}-title`, children: n }),
|
|
90
|
+
p && /* @__PURE__ */ t("div", { className: `${e}-content`, children: p })
|
|
91
91
|
] }),
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
m && /* @__PURE__ */ t("div", { className: `${e}-action`, children: m }),
|
|
93
|
+
S && /* @__PURE__ */ t(
|
|
94
94
|
"button",
|
|
95
95
|
{
|
|
96
96
|
type: "button",
|
|
97
|
-
onClick:
|
|
97
|
+
onClick: F,
|
|
98
98
|
className: `${e}-close-btn`,
|
|
99
|
-
children:
|
|
99
|
+
children: x || /* @__PURE__ */ t(k, {})
|
|
100
100
|
}
|
|
101
101
|
)
|
|
102
102
|
]
|