@unicom-cloud/ui 0.8.81 → 0.8.82
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/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/{yLRv5RIK.js → CQI1gsQs.js} +181 -181
- package/chunk/CmMehQON.js +1464 -0
- package/chunk/Cplu5dtQ.js +730 -0
- package/chunk/{C5X4hOkx.js → D0338Pbq.js} +80 -80
- package/chunk/{DYspELhF.js → DXDbeIai.js} +223 -223
- package/chunk/{DEiyXzBZ.js → DfrB26fI.js} +63 -63
- package/chunk/{BG7YGUsx.js → dKvAiKxr.js} +119 -119
- package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
- package/chunk/{DLBfXSnU.js → w221i0nK.js} +2872 -2871
- 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 -4
- 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/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 +410 -408
- package/input/Group.js +8 -8
- package/input/Input.js +322 -322
- 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-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 +1 -1
- package/types/picker/Input.d.ts +2 -2
- package/types/space/index.d.ts +2 -1
- package/types/utils/names.d.ts +1 -1
- package/typography/Base.js +53 -53
- package/typography/Ellipsis.js +9 -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/utils/contextHolder.js +3 -3
- package/utils/index.js +13 -13
- package/utils/names.js +1 -1
- package/utils/setPrimaryColor.js +18 -13
- 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/yhU2zeeu.js +0 -1461
- /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
package/grid/grid.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { a as T } from "../chunk/
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import P from "lodash/get";
|
|
3
|
+
import u, { forwardRef as h, useState as S, useContext as E } from "react";
|
|
4
|
+
import { a as T } from "../chunk/Cplu5dtQ.js";
|
|
5
5
|
import { u as b } from "../chunk/BFTV6myl.js";
|
|
6
6
|
import j from "@unicom-cloud/utils/class-name";
|
|
7
7
|
import { GridDataCollectorContext as B, GridContext as Q } from "./context.js";
|
|
8
|
-
import { u as
|
|
8
|
+
import { u as n } from "../chunk/xAb6ZgqS.js";
|
|
9
9
|
import { setItemVisible as V } from "./util.js";
|
|
10
10
|
const k = {
|
|
11
11
|
collapsed: !1,
|
|
@@ -14,80 +14,80 @@ const k = {
|
|
|
14
14
|
colGap: 0,
|
|
15
15
|
rowGap: 0
|
|
16
16
|
};
|
|
17
|
-
function q(
|
|
18
|
-
const [
|
|
17
|
+
function q(G, x) {
|
|
18
|
+
const [e, i] = S(
|
|
19
19
|
/* @__PURE__ */ new Map()
|
|
20
|
-
), { getPrefixCls:
|
|
21
|
-
|
|
20
|
+
), { getPrefixCls: s, componentConfig: r, rtl: w } = E(T), C = b(
|
|
21
|
+
G,
|
|
22
22
|
k,
|
|
23
|
-
|
|
23
|
+
r == null ? void 0 : r.Grid
|
|
24
24
|
), {
|
|
25
25
|
children: I,
|
|
26
|
-
className:
|
|
27
|
-
style:
|
|
28
|
-
cols:
|
|
29
|
-
colGap:
|
|
26
|
+
className: D,
|
|
27
|
+
style: _,
|
|
28
|
+
cols: v,
|
|
29
|
+
colGap: g,
|
|
30
30
|
rowGap: y,
|
|
31
|
-
collapsed:
|
|
31
|
+
collapsed: c,
|
|
32
32
|
collapsedRows: M
|
|
33
|
-
} = C,
|
|
34
|
-
gap: `${
|
|
35
|
-
gridTemplateColumns: `repeat(${
|
|
36
|
-
},
|
|
37
|
-
[`${
|
|
38
|
-
[`${
|
|
39
|
-
},
|
|
40
|
-
const
|
|
41
|
-
for (const [o,
|
|
42
|
-
|
|
43
|
-
return
|
|
44
|
-
})(),
|
|
45
|
-
cols:
|
|
46
|
-
collapsed:
|
|
33
|
+
} = C, a = n(v, 24), m = n(g, 0), N = {
|
|
34
|
+
gap: `${n(y, 0)}px ${m}px`,
|
|
35
|
+
gridTemplateColumns: `repeat(${a}, minmax(0px, 1fr))`
|
|
36
|
+
}, d = s == null ? void 0 : s("grid"), R = {
|
|
37
|
+
[`${d}`]: !0,
|
|
38
|
+
[`${d}-rtl`]: w
|
|
39
|
+
}, $ = j(R, D), L = (() => {
|
|
40
|
+
const t = [];
|
|
41
|
+
for (const [o, l] of e.entries())
|
|
42
|
+
t[o] = l;
|
|
43
|
+
return t;
|
|
44
|
+
})(), f = V({
|
|
45
|
+
cols: a,
|
|
46
|
+
collapsed: c,
|
|
47
47
|
collapsedRows: M,
|
|
48
|
-
itemDataList:
|
|
48
|
+
itemDataList: L
|
|
49
49
|
});
|
|
50
|
-
return /* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ p(
|
|
51
51
|
"div",
|
|
52
52
|
{
|
|
53
53
|
ref: x,
|
|
54
|
-
className:
|
|
54
|
+
className: $,
|
|
55
55
|
style: {
|
|
56
56
|
...N,
|
|
57
|
-
...
|
|
57
|
+
..._
|
|
58
58
|
},
|
|
59
|
-
children: /* @__PURE__ */
|
|
59
|
+
children: /* @__PURE__ */ p(
|
|
60
60
|
B.Provider,
|
|
61
61
|
{
|
|
62
62
|
value: {
|
|
63
|
-
collectItemData(
|
|
64
|
-
|
|
63
|
+
collectItemData(t, o) {
|
|
64
|
+
e.set(t, o), i(new Map([...e]));
|
|
65
65
|
},
|
|
66
|
-
removeItemData(
|
|
67
|
-
|
|
66
|
+
removeItemData(t) {
|
|
67
|
+
e.delete(t), i(new Map([...e]));
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
|
-
children: /* @__PURE__ */
|
|
70
|
+
children: /* @__PURE__ */ p(
|
|
71
71
|
Q.Provider,
|
|
72
72
|
{
|
|
73
73
|
value: {
|
|
74
|
-
cols:
|
|
75
|
-
colGap:
|
|
76
|
-
collapsed:
|
|
77
|
-
overflow:
|
|
78
|
-
displayIndexList:
|
|
74
|
+
cols: a,
|
|
75
|
+
colGap: m,
|
|
76
|
+
collapsed: c,
|
|
77
|
+
overflow: f.overflow,
|
|
78
|
+
displayIndexList: f.displayIndexList
|
|
79
79
|
},
|
|
80
|
-
children:
|
|
81
|
-
if (
|
|
82
|
-
const
|
|
80
|
+
children: u.Children.map(I, (t, o) => {
|
|
81
|
+
if (t) {
|
|
82
|
+
const l = {
|
|
83
83
|
__index__: o,
|
|
84
|
-
...
|
|
84
|
+
...t.props
|
|
85
85
|
};
|
|
86
|
-
return
|
|
86
|
+
return u.cloneElement(t, l);
|
|
87
87
|
}
|
|
88
88
|
return null;
|
|
89
89
|
}).filter(
|
|
90
|
-
(
|
|
90
|
+
(t) => P(t, "type.__PQB_GRID_ITEM__")
|
|
91
91
|
)
|
|
92
92
|
}
|
|
93
93
|
)
|
package/icon/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
2
|
+
import { default as H } from "@unicom-cloud/icons/context";
|
|
3
|
+
import { default as k } from "@unicom-cloud/icons/useProps";
|
|
4
4
|
import i from "react";
|
|
5
|
-
import { C as
|
|
6
|
-
import
|
|
7
|
-
import { isServerRendering as
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
-
const { src: r, extraProps:
|
|
11
|
-
if (!
|
|
5
|
+
import { C as g } from "../chunk/Cplu5dtQ.js";
|
|
6
|
+
import N from "@unicom-cloud/utils/class-name";
|
|
7
|
+
import { isServerRendering as P } from "../utils/dom.js";
|
|
8
|
+
const C = [];
|
|
9
|
+
function y(u = {}) {
|
|
10
|
+
const { src: r, extraProps: p = {} } = u;
|
|
11
|
+
if (!P && typeof r == "string" && r.length && C.indexOf(r) === -1) {
|
|
12
12
|
const e = document.createElement("script");
|
|
13
|
-
e.setAttribute("src", r), e.setAttribute("data-namespace", r),
|
|
13
|
+
e.setAttribute("src", r), e.setAttribute("data-namespace", r), C.push(r), document.body.appendChild(e);
|
|
14
14
|
}
|
|
15
15
|
function f(e, d) {
|
|
16
16
|
const { type: t, children: n, ...l } = e, o = i.useRef();
|
|
@@ -21,7 +21,7 @@ function P(p = {}) {
|
|
|
21
21
|
{
|
|
22
22
|
type: t,
|
|
23
23
|
...l,
|
|
24
|
-
...
|
|
24
|
+
...p,
|
|
25
25
|
ref: (c) => {
|
|
26
26
|
o.current = c;
|
|
27
27
|
},
|
|
@@ -31,8 +31,9 @@ function P(p = {}) {
|
|
|
31
31
|
}
|
|
32
32
|
return f.displayName = "Iconfont", i.forwardRef(f);
|
|
33
33
|
}
|
|
34
|
-
const m = i.forwardRef(function(r,
|
|
35
|
-
return /* @__PURE__ */ a(
|
|
34
|
+
const m = i.forwardRef(function(r, p) {
|
|
35
|
+
return /* @__PURE__ */ a(g, { children: (e) => {
|
|
36
|
+
var h;
|
|
36
37
|
const { className: d, spin: t, children: n, type: l, ...o } = r, c = {
|
|
37
38
|
...{
|
|
38
39
|
width: "1em",
|
|
@@ -40,7 +41,7 @@ const m = i.forwardRef(function(r, u) {
|
|
|
40
41
|
fill: "currentColor"
|
|
41
42
|
},
|
|
42
43
|
...o
|
|
43
|
-
}, I = e == null ? void 0 : e.getPrefixCls("icon"),
|
|
44
|
+
}, I = (h = e == null ? void 0 : e.getPrefixCls) == null ? void 0 : h.call(e, "icon"), x = N(
|
|
44
45
|
I,
|
|
45
46
|
l,
|
|
46
47
|
{
|
|
@@ -48,14 +49,14 @@ const m = i.forwardRef(function(r, u) {
|
|
|
48
49
|
},
|
|
49
50
|
d
|
|
50
51
|
);
|
|
51
|
-
return c.className =
|
|
52
|
+
return c.className = x, /* @__PURE__ */ a("svg", { ...c, children: n });
|
|
52
53
|
} });
|
|
53
54
|
});
|
|
54
55
|
m.displayName = "Icon";
|
|
55
|
-
m.addFromIconFontCn =
|
|
56
|
+
m.addFromIconFontCn = y;
|
|
56
57
|
export {
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
H as IconContext,
|
|
59
|
+
y as addFromIconFontCn,
|
|
59
60
|
m as default,
|
|
60
|
-
|
|
61
|
+
k as useIconProps
|
|
61
62
|
};
|
package/icon-hover/index.js
CHANGED
package/image/Image.js
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
import { jsx as t, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import Ce from "@unicom-cloud/icons/IconUiImageClose";
|
|
3
3
|
import $e from "@unicom-cloud/icons/IconUiLoading";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import G from "lodash/isNumber";
|
|
5
|
+
import H from "lodash/isPlainObject";
|
|
6
6
|
import Ne from "lodash/isUndefined";
|
|
7
|
-
import Ve, { useContext as
|
|
8
|
-
import { a as xe } from "../chunk/
|
|
7
|
+
import Ve, { useContext as J, useMemo as p, useRef as Q, useEffect as g } from "react";
|
|
8
|
+
import { a as xe } from "../chunk/Cplu5dtQ.js";
|
|
9
9
|
import { u as Le } from "../chunk/CCKr5jj1.js";
|
|
10
10
|
import { u as ye } from "../chunk/BYdIoY50.js";
|
|
11
11
|
import { u as Ee } from "../chunk/BFTV6myl.js";
|
|
12
12
|
import { u as Ge } from "../chunk/CXPOj2uy.js";
|
|
13
|
-
import
|
|
13
|
+
import W from "@unicom-cloud/utils/class-name";
|
|
14
14
|
import { o as Re } from "../chunk/BKKEev13.js";
|
|
15
15
|
import { u as je, I as Se } from "../chunk/DxYoPlum.js";
|
|
16
|
-
import { P as
|
|
16
|
+
import { P as X, u as Ue } from "../chunk/CQI1gsQs.js";
|
|
17
17
|
import Fe from "./ImagePreviewGroup.js";
|
|
18
18
|
import { PreviewGroupContext as Me } from "./previewGroupContext.js";
|
|
19
|
-
let
|
|
19
|
+
let R = 0;
|
|
20
20
|
const Oe = {
|
|
21
21
|
footerPosition: "inner",
|
|
22
22
|
preview: !0
|
|
23
23
|
};
|
|
24
|
-
function ze(
|
|
25
|
-
const { getPrefixCls:
|
|
26
|
-
|
|
24
|
+
function ze(Y, Z) {
|
|
25
|
+
const { getPrefixCls: v, componentConfig: w, rtl: ee } = J(xe), re = Ee(
|
|
26
|
+
Y,
|
|
27
27
|
Oe,
|
|
28
|
-
|
|
28
|
+
w == null ? void 0 : w.Image
|
|
29
29
|
), {
|
|
30
30
|
style: oe,
|
|
31
31
|
className: ie,
|
|
32
32
|
src: i,
|
|
33
|
-
width:
|
|
34
|
-
height:
|
|
35
|
-
title:
|
|
36
|
-
description:
|
|
37
|
-
actions:
|
|
38
|
-
footerPosition:
|
|
39
|
-
simple:
|
|
40
|
-
loader:
|
|
33
|
+
width: S,
|
|
34
|
+
height: U,
|
|
35
|
+
title: h,
|
|
36
|
+
description: F,
|
|
37
|
+
actions: M,
|
|
38
|
+
footerPosition: O,
|
|
39
|
+
simple: z,
|
|
40
|
+
loader: b,
|
|
41
41
|
loaderClassName: te,
|
|
42
42
|
loaderTip: se,
|
|
43
43
|
error: ne,
|
|
44
44
|
preview: a,
|
|
45
|
-
previewProps:
|
|
46
|
-
alt:
|
|
47
|
-
onClick:
|
|
48
|
-
index:
|
|
49
|
-
_index:
|
|
50
|
-
onError:
|
|
51
|
-
onLoad:
|
|
45
|
+
previewProps: I,
|
|
46
|
+
alt: P,
|
|
47
|
+
onClick: C,
|
|
48
|
+
index: $,
|
|
49
|
+
_index: K,
|
|
50
|
+
onError: N,
|
|
51
|
+
onLoad: V,
|
|
52
52
|
lazyload: l,
|
|
53
53
|
...ae
|
|
54
54
|
} = re, le = ye(), {
|
|
@@ -57,42 +57,42 @@ function ze(X, Y) {
|
|
|
57
57
|
registerPreviewUrl: me,
|
|
58
58
|
registerPreviewProps: ue,
|
|
59
59
|
setCurrentIndex: de
|
|
60
|
-
} =
|
|
60
|
+
} = J(Me), o = p(() => H(I) ? I : {}, [I]), fe = p(() => H(l) ? l : {}, [l]), s = p(() => G($) || G(K) ? (R = G($) ? $ : K, R) : R++, []), x = o.src || i, [L] = je({ title: h, description: F, actions: M }), { isLoading: _, isError: y, isLoaded: c, isBeforeLoad: pe, setStatus: u } = Ue("beforeLoad"), d = Q(!1), [k, ge] = Ge(!1, {
|
|
61
61
|
defaultValue: o.defaultVisible,
|
|
62
62
|
value: o.visible
|
|
63
|
-
}),
|
|
63
|
+
}), E = p(() => Re(o, [
|
|
64
64
|
"visible",
|
|
65
65
|
"defaultVisible",
|
|
66
66
|
"src",
|
|
67
67
|
"onVisibleChange"
|
|
68
|
-
]), [o]), e =
|
|
68
|
+
]), [o]), e = v == null ? void 0 : v("image"), ve = !Ne(o.visible), we = W(
|
|
69
69
|
e,
|
|
70
70
|
{
|
|
71
71
|
[`${e}-rtl`]: ee,
|
|
72
|
-
[`${e}-simple`]:
|
|
72
|
+
[`${e}-simple`]: z,
|
|
73
73
|
[`${e}-before-load`]: pe,
|
|
74
|
-
[`${e}-loading`]:
|
|
75
|
-
[`${e}-loading-error`]:
|
|
76
|
-
[`${e}-with-footer-inner`]: c &&
|
|
77
|
-
[`${e}-with-footer-outer`]: c &&
|
|
78
|
-
[`${e}-with-preview`]: c && a && !
|
|
74
|
+
[`${e}-loading`]: _,
|
|
75
|
+
[`${e}-loading-error`]: y,
|
|
76
|
+
[`${e}-with-footer-inner`]: c && L && O === "inner",
|
|
77
|
+
[`${e}-with-footer-outer`]: c && L && O === "outer",
|
|
78
|
+
[`${e}-with-preview`]: c && a && !y && !ve
|
|
79
79
|
},
|
|
80
80
|
ie
|
|
81
|
-
), n =
|
|
81
|
+
), n = Q();
|
|
82
82
|
function he(r) {
|
|
83
|
-
d.current = !0, u("loaded"),
|
|
83
|
+
d.current = !0, u("loaded"), V == null || V(r);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
d.current = !0, u("error"),
|
|
87
|
-
}
|
|
88
|
-
function k(r) {
|
|
89
|
-
a && m ? (de(s), ce(!0)) : a && B(!0), I == null || I(r);
|
|
85
|
+
function be(r) {
|
|
86
|
+
d.current = !0, u("error"), N == null || N(r);
|
|
90
87
|
}
|
|
91
88
|
function B(r) {
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
a && m ? (de(s), ce(!0)) : a && T(!0), C == null || C(r);
|
|
90
|
+
}
|
|
91
|
+
function T(r) {
|
|
92
|
+
var D;
|
|
93
|
+
(D = o == null ? void 0 : o.onVisibleChange) == null || D.call(o, r, k), ge(r);
|
|
94
94
|
}
|
|
95
|
-
const { inView:
|
|
95
|
+
const { inView: q } = Le({
|
|
96
96
|
target: n.current,
|
|
97
97
|
defaultInView: !l,
|
|
98
98
|
...fe
|
|
@@ -100,36 +100,36 @@ function ze(X, Y) {
|
|
|
100
100
|
g(() => {
|
|
101
101
|
d.current = !1, i || u("error");
|
|
102
102
|
}, [i]), g(() => {
|
|
103
|
-
n.current && (
|
|
104
|
-
}, [i,
|
|
103
|
+
n.current && (q ? ((n.current.src || i) && n.current.src !== i && (n.current.src = i), !d.current && !n.current.complete && u("loading")) : u("lazyload"));
|
|
104
|
+
}, [i, q]), g(() => {
|
|
105
105
|
if (!m)
|
|
106
106
|
return;
|
|
107
|
-
const r = ue(s,
|
|
107
|
+
const r = ue(s, E);
|
|
108
108
|
return () => r(s);
|
|
109
|
-
}, [s, m,
|
|
109
|
+
}, [s, m, E]), g(() => {
|
|
110
110
|
if (!m)
|
|
111
111
|
return;
|
|
112
|
-
const r = me(s,
|
|
112
|
+
const r = me(s, x, a);
|
|
113
113
|
return () => r(s);
|
|
114
|
-
}, [s, m,
|
|
115
|
-
const
|
|
114
|
+
}, [s, m, x, a]);
|
|
115
|
+
const Ie = /* @__PURE__ */ f("div", { className: `${e}-error`, children: [
|
|
116
116
|
/* @__PURE__ */ t("div", { className: `${e}-error-icon`, children: /* @__PURE__ */ t(Ce, {}) }),
|
|
117
|
-
|
|
118
|
-
] }),
|
|
117
|
+
P && /* @__PURE__ */ t("div", { className: `${e}-error-alt`, children: P })
|
|
118
|
+
] }), A = /* @__PURE__ */ t("div", { className: W(`${e}-loader`, te), children: /* @__PURE__ */ f("div", { className: `${e}-loader-spin`, children: [
|
|
119
119
|
/* @__PURE__ */ t($e, {}),
|
|
120
120
|
/* @__PURE__ */ t("div", { className: `${e}-loader-spin-text`, children: se ?? "Loading" })
|
|
121
|
-
] }) }),
|
|
122
|
-
if (
|
|
123
|
-
return
|
|
124
|
-
const r =
|
|
125
|
-
return l ||
|
|
121
|
+
] }) }), Pe = () => {
|
|
122
|
+
if (b === !0)
|
|
123
|
+
return A;
|
|
124
|
+
const r = b || A;
|
|
125
|
+
return l || b ? r : null;
|
|
126
126
|
};
|
|
127
127
|
return /* @__PURE__ */ f(
|
|
128
128
|
"div",
|
|
129
129
|
{
|
|
130
130
|
className: we,
|
|
131
|
-
style: Object.assign({ width:
|
|
132
|
-
ref:
|
|
131
|
+
style: Object.assign({ width: S, height: U }, oe),
|
|
132
|
+
ref: Z,
|
|
133
133
|
children: [
|
|
134
134
|
/* @__PURE__ */ t(
|
|
135
135
|
"img",
|
|
@@ -138,40 +138,40 @@ function ze(X, Y) {
|
|
|
138
138
|
className: `${e}-img`,
|
|
139
139
|
tabIndex: 0,
|
|
140
140
|
...le({
|
|
141
|
-
onPressEnter:
|
|
141
|
+
onPressEnter: B
|
|
142
142
|
}),
|
|
143
143
|
...ae,
|
|
144
144
|
...l || i === void 0 ? {} : { src: i },
|
|
145
|
-
title:
|
|
146
|
-
width:
|
|
147
|
-
height:
|
|
145
|
+
title: h,
|
|
146
|
+
width: S,
|
|
147
|
+
height: U,
|
|
148
148
|
onLoad: he,
|
|
149
|
-
onError:
|
|
150
|
-
onClick:
|
|
151
|
-
alt:
|
|
149
|
+
onError: be,
|
|
150
|
+
onClick: B,
|
|
151
|
+
alt: P
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
154
|
!c && /* @__PURE__ */ f("div", { className: `${e}-overlay`, children: [
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
y && (ne || Ie),
|
|
156
|
+
_ && Pe()
|
|
157
157
|
] }),
|
|
158
|
-
c &&
|
|
158
|
+
c && L && /* @__PURE__ */ t(
|
|
159
159
|
Se,
|
|
160
160
|
{
|
|
161
|
-
title:
|
|
162
|
-
description:
|
|
163
|
-
actions:
|
|
161
|
+
title: h,
|
|
162
|
+
description: F,
|
|
163
|
+
actions: M,
|
|
164
164
|
prefixCls: e,
|
|
165
|
-
simple:
|
|
165
|
+
simple: z
|
|
166
166
|
}
|
|
167
167
|
),
|
|
168
168
|
c && a && /* @__PURE__ */ t(
|
|
169
|
-
|
|
169
|
+
X,
|
|
170
170
|
{
|
|
171
|
-
visible:
|
|
172
|
-
src:
|
|
173
|
-
...
|
|
174
|
-
onVisibleChange:
|
|
171
|
+
visible: k,
|
|
172
|
+
src: x,
|
|
173
|
+
...E,
|
|
174
|
+
onVisibleChange: T
|
|
175
175
|
}
|
|
176
176
|
)
|
|
177
177
|
]
|
|
@@ -180,12 +180,12 @@ function ze(X, Y) {
|
|
|
180
180
|
}
|
|
181
181
|
const Ke = Ve.forwardRef(
|
|
182
182
|
ze
|
|
183
|
-
),
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
183
|
+
), j = Ke;
|
|
184
|
+
j.Preview = X;
|
|
185
|
+
j.PreviewGroup = Fe;
|
|
186
|
+
j.displayName = "Image";
|
|
187
187
|
export {
|
|
188
|
-
|
|
188
|
+
X as ImagePreview,
|
|
189
189
|
Fe as ImagePreviewGroup,
|
|
190
|
-
|
|
190
|
+
j as default
|
|
191
191
|
};
|
package/image/ImagePreview.js
CHANGED
|
@@ -12,7 +12,7 @@ import "@unicom-cloud/icons/IconUiZoomIn";
|
|
|
12
12
|
import "@unicom-cloud/icons/IconUiZoomOut";
|
|
13
13
|
import "lodash/isUndefined";
|
|
14
14
|
import "react";
|
|
15
|
-
import "../chunk/
|
|
15
|
+
import "../chunk/Cplu5dtQ.js";
|
|
16
16
|
import "lodash/isEqualWith";
|
|
17
17
|
import "../chunk/CXPOj2uy.js";
|
|
18
18
|
import "../chunk/ClM74To2.js";
|
|
@@ -35,7 +35,7 @@ import "../chunk/CIRG541s.js";
|
|
|
35
35
|
import "./ImagePreviewArrow.js";
|
|
36
36
|
import "./ImagePreviewToolbar.js";
|
|
37
37
|
import "./previewGroupContext.js";
|
|
38
|
-
import { P as M } from "../chunk/
|
|
38
|
+
import { P as M } from "../chunk/CQI1gsQs.js";
|
|
39
39
|
export {
|
|
40
40
|
M as default
|
|
41
41
|
};
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsxs as f, jsx as
|
|
1
|
+
import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import d from "@unicom-cloud/icons/IconUiLeft";
|
|
3
3
|
import p from "@unicom-cloud/icons/IconUiRight";
|
|
4
4
|
import { useContext as w } from "react";
|
|
5
|
-
import { a as u } from "../chunk/
|
|
6
|
-
import
|
|
7
|
-
function j(
|
|
5
|
+
import { a as u } from "../chunk/Cplu5dtQ.js";
|
|
6
|
+
import s from "@unicom-cloud/utils/class-name";
|
|
7
|
+
function j(m) {
|
|
8
8
|
const {
|
|
9
|
-
current:
|
|
10
|
-
previewCount:
|
|
11
|
-
infinite:
|
|
12
|
-
disableLeft:
|
|
9
|
+
current: v,
|
|
10
|
+
previewCount: h,
|
|
11
|
+
infinite: C = !1,
|
|
12
|
+
disableLeft: n,
|
|
13
13
|
disableRight: l,
|
|
14
14
|
onPrev: i,
|
|
15
|
-
onNext:
|
|
16
|
-
} =
|
|
15
|
+
onNext: o
|
|
16
|
+
} = m, { getPrefixCls: t } = w(u), r = t == null ? void 0 : t("image-preview"), c = s(`${r}-arrow`);
|
|
17
17
|
return /* @__PURE__ */ f("div", { className: c, children: [
|
|
18
|
-
/* @__PURE__ */
|
|
18
|
+
/* @__PURE__ */ e(
|
|
19
19
|
"div",
|
|
20
20
|
{
|
|
21
|
-
className:
|
|
22
|
-
[`${
|
|
21
|
+
className: s(`${r}-arrow-left`, {
|
|
22
|
+
[`${r}-arrow-disabled`]: n
|
|
23
23
|
}),
|
|
24
|
-
onClick: (
|
|
25
|
-
|
|
24
|
+
onClick: (a) => {
|
|
25
|
+
a.preventDefault(), !n && (i == null || i());
|
|
26
26
|
},
|
|
27
|
-
children: /* @__PURE__ */
|
|
27
|
+
children: /* @__PURE__ */ e(d, {})
|
|
28
28
|
}
|
|
29
29
|
),
|
|
30
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ e(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
|
-
className:
|
|
34
|
-
[`${
|
|
33
|
+
className: s(`${r}-arrow-right`, {
|
|
34
|
+
[`${r}-arrow-disabled`]: l
|
|
35
35
|
}),
|
|
36
|
-
onClick: (
|
|
37
|
-
|
|
36
|
+
onClick: (a) => {
|
|
37
|
+
a.preventDefault(), !l && (o == null || o());
|
|
38
38
|
},
|
|
39
|
-
children: /* @__PURE__ */
|
|
39
|
+
children: /* @__PURE__ */ e(p, {})
|
|
40
40
|
}
|
|
41
41
|
)
|
|
42
42
|
] });
|
|
@@ -5,7 +5,7 @@ import Q from "lodash/isUndefined";
|
|
|
5
5
|
import a, { forwardRef as T, useMemo as W, useState as X, useRef as g, useEffect as Y, useImperativeHandle as Z } from "react";
|
|
6
6
|
import { u as $ } from "../chunk/oopARUrq.js";
|
|
7
7
|
import { u as x } from "../chunk/CXPOj2uy.js";
|
|
8
|
-
import { P as ee } from "../chunk/
|
|
8
|
+
import { P as ee } from "../chunk/CQI1gsQs.js";
|
|
9
9
|
import { PreviewGroupContext as re } from "./previewGroupContext.js";
|
|
10
10
|
function te(I, C) {
|
|
11
11
|
const {
|
package/image/index.js
CHANGED