@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/card/index.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { a as k } from "../chunk/
|
|
2
|
+
import d, { useContext as P } from "react";
|
|
3
|
+
import { a as k } from "../chunk/C9oo3EJI.js";
|
|
4
4
|
import { u as q } from "../chunk/BFTV6myl.js";
|
|
5
5
|
import A from "../spin/index.js";
|
|
6
|
-
import
|
|
6
|
+
import u from "@unicom-cloud/utils/class-name";
|
|
7
7
|
import C from "./Grid.js";
|
|
8
|
-
import
|
|
8
|
+
import N from "./Meta.js";
|
|
9
9
|
const B = {
|
|
10
10
|
size: "default",
|
|
11
11
|
bordered: !0
|
|
12
12
|
};
|
|
13
|
-
function D(
|
|
14
|
-
const { getPrefixCls:
|
|
15
|
-
|
|
13
|
+
function D(v, y) {
|
|
14
|
+
const { getPrefixCls: o, loadingElement: b, componentConfig: s, rtl: x } = P(k), g = q(
|
|
15
|
+
v,
|
|
16
16
|
B,
|
|
17
17
|
s == null ? void 0 : s.Card
|
|
18
18
|
), {
|
|
19
19
|
className: M,
|
|
20
20
|
children: z,
|
|
21
|
-
bordered:
|
|
22
|
-
loading:
|
|
23
|
-
hoverable:
|
|
24
|
-
size:
|
|
21
|
+
bordered: R,
|
|
22
|
+
loading: m,
|
|
23
|
+
hoverable: S,
|
|
24
|
+
size: j,
|
|
25
25
|
title: t,
|
|
26
|
-
extra:
|
|
27
|
-
cover:
|
|
28
|
-
actions:
|
|
29
|
-
headerStyle:
|
|
30
|
-
bodyStyle:
|
|
31
|
-
...
|
|
32
|
-
} =
|
|
26
|
+
extra: i,
|
|
27
|
+
cover: p,
|
|
28
|
+
actions: n,
|
|
29
|
+
headerStyle: w,
|
|
30
|
+
bodyStyle: E,
|
|
31
|
+
...G
|
|
32
|
+
} = g, e = o == null ? void 0 : o("card"), h = n && n.length ? /* @__PURE__ */ a("div", { className: `${e}-actions`, children: /* @__PURE__ */ a("div", { className: `${e}-actions-right`, children: n.map((r, L) => /* @__PURE__ */ a(
|
|
33
33
|
"span",
|
|
34
34
|
{
|
|
35
35
|
className: `${e}-actions-item`,
|
|
36
36
|
children: r
|
|
37
37
|
},
|
|
38
|
-
`action-${
|
|
38
|
+
`action-${L}`
|
|
39
39
|
)) }) }) : null;
|
|
40
|
-
let f = !1,
|
|
41
|
-
const
|
|
40
|
+
let f = !1, $ = !1;
|
|
41
|
+
const F = d.Children.map(
|
|
42
42
|
z,
|
|
43
43
|
(r) => {
|
|
44
44
|
if (r && r.type) {
|
|
45
45
|
if (r.type === C)
|
|
46
46
|
f = !0;
|
|
47
|
-
else if (r.type ===
|
|
48
|
-
return
|
|
47
|
+
else if (r.type === N)
|
|
48
|
+
return $ = !0, d.cloneElement(r, { actionList: h });
|
|
49
49
|
}
|
|
50
50
|
return r;
|
|
51
51
|
}
|
|
@@ -53,47 +53,47 @@ function D(N, v) {
|
|
|
53
53
|
return /* @__PURE__ */ l(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
|
-
...
|
|
57
|
-
ref:
|
|
58
|
-
className:
|
|
56
|
+
...G,
|
|
57
|
+
ref: y,
|
|
58
|
+
className: u(
|
|
59
59
|
e,
|
|
60
|
-
`${e}-size-${
|
|
60
|
+
`${e}-size-${j}`,
|
|
61
61
|
{
|
|
62
|
-
[`${e}-loading`]:
|
|
63
|
-
[`${e}-bordered`]:
|
|
64
|
-
[`${e}-hoverable`]:
|
|
62
|
+
[`${e}-loading`]: m,
|
|
63
|
+
[`${e}-bordered`]: R,
|
|
64
|
+
[`${e}-hoverable`]: S,
|
|
65
65
|
[`${e}-contain-grid`]: f,
|
|
66
|
-
[`${e}-rtl`]:
|
|
66
|
+
[`${e}-rtl`]: x
|
|
67
67
|
},
|
|
68
68
|
M
|
|
69
69
|
),
|
|
70
70
|
children: [
|
|
71
|
-
t ||
|
|
71
|
+
t || i ? /* @__PURE__ */ l(
|
|
72
72
|
"div",
|
|
73
73
|
{
|
|
74
|
-
className:
|
|
74
|
+
className: u(`${e}-header`, {
|
|
75
75
|
[`${e}-header-no-title`]: !t
|
|
76
76
|
}),
|
|
77
|
-
style:
|
|
77
|
+
style: w,
|
|
78
78
|
children: [
|
|
79
79
|
t && /* @__PURE__ */ a("div", { className: `${e}-header-title`, children: t }),
|
|
80
|
-
|
|
80
|
+
i && /* @__PURE__ */ a("div", { className: `${e}-header-extra`, children: i })
|
|
81
81
|
]
|
|
82
82
|
}
|
|
83
83
|
) : null,
|
|
84
|
-
|
|
85
|
-
/* @__PURE__ */ l("div", { className: `${e}-body`, style:
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
p ? /* @__PURE__ */ a("div", { className: `${e}-cover`, children: p }) : null,
|
|
85
|
+
/* @__PURE__ */ l("div", { className: `${e}-body`, style: E, children: [
|
|
86
|
+
m ? b || /* @__PURE__ */ a(A, {}) : F,
|
|
87
|
+
$ ? null : h
|
|
88
88
|
] })
|
|
89
89
|
]
|
|
90
90
|
}
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
|
-
const H =
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
const H = d.forwardRef(D), c = H;
|
|
94
|
+
c.Meta = N;
|
|
95
|
+
c.Grid = C;
|
|
96
|
+
c.displayName = "Card";
|
|
97
97
|
export {
|
|
98
|
-
|
|
98
|
+
c as default
|
|
99
99
|
};
|
package/carousel/Arrow.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { jsx as r, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import v from "@unicom-cloud/icons/IconUiDown";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { a as N } from "../chunk/
|
|
3
|
+
import u from "@unicom-cloud/icons/IconUiLeft";
|
|
4
|
+
import x from "@unicom-cloud/icons/IconUiRight";
|
|
5
|
+
import b from "@unicom-cloud/icons/IconUiUp";
|
|
6
|
+
import C, { useContext as y } from "react";
|
|
7
|
+
import { a as N } from "../chunk/C9oo3EJI.js";
|
|
8
8
|
import { u as $ } from "../chunk/BYdIoY50.js";
|
|
9
9
|
import I from "@unicom-cloud/utils/class-name";
|
|
10
|
-
function
|
|
10
|
+
function U(i, l) {
|
|
11
11
|
const {
|
|
12
|
-
className:
|
|
12
|
+
className: m,
|
|
13
13
|
direction: t = "horizontal",
|
|
14
|
-
showArrow:
|
|
15
|
-
prev:
|
|
14
|
+
showArrow: p = "always",
|
|
15
|
+
prev: a,
|
|
16
16
|
next: s,
|
|
17
17
|
icons: o
|
|
18
|
-
} = i,
|
|
18
|
+
} = i, c = $(), { getPrefixCls: n } = y(N), e = n == null ? void 0 : n("carousel"), f = I(
|
|
19
19
|
`${e}-arrow`,
|
|
20
20
|
{
|
|
21
|
-
[`${e}-arrow-hover`]:
|
|
21
|
+
[`${e}-arrow-hover`]: p === "hover"
|
|
22
22
|
},
|
|
23
|
-
|
|
24
|
-
), w = o && Object.prototype.hasOwnProperty.call(o, "prev") ? o.prev : t === "horizontal" ? /* @__PURE__ */ r(
|
|
25
|
-
return /* @__PURE__ */ h("div", { ref:
|
|
23
|
+
m
|
|
24
|
+
), w = o && Object.prototype.hasOwnProperty.call(o, "prev") ? o.prev : t === "horizontal" ? /* @__PURE__ */ r(u, {}) : /* @__PURE__ */ r(b, {}), d = o && Object.prototype.hasOwnProperty.call(o, "next") ? o.next : t === "horizontal" ? /* @__PURE__ */ r(x, {}) : /* @__PURE__ */ r(v, {});
|
|
25
|
+
return /* @__PURE__ */ h("div", { ref: l, className: f, children: [
|
|
26
26
|
/* @__PURE__ */ r(
|
|
27
27
|
"div",
|
|
28
28
|
{
|
|
29
29
|
className: `${e}-arrow-${t === "vertical" ? "top" : "left"}`,
|
|
30
|
-
onClick:
|
|
30
|
+
onClick: a,
|
|
31
31
|
role: "button",
|
|
32
32
|
tabIndex: 0,
|
|
33
|
-
...
|
|
33
|
+
...c({ onPressEnter: a }),
|
|
34
34
|
children: w
|
|
35
35
|
}
|
|
36
36
|
),
|
|
@@ -41,14 +41,14 @@ function P(i, c) {
|
|
|
41
41
|
onClick: s,
|
|
42
42
|
role: "button",
|
|
43
43
|
tabIndex: 0,
|
|
44
|
-
...
|
|
44
|
+
...c({ onPressEnter: s }),
|
|
45
45
|
children: d
|
|
46
46
|
}
|
|
47
47
|
)
|
|
48
48
|
] });
|
|
49
49
|
}
|
|
50
|
-
const K =
|
|
51
|
-
|
|
50
|
+
const K = C.forwardRef(
|
|
51
|
+
U
|
|
52
52
|
);
|
|
53
53
|
export {
|
|
54
54
|
K as default
|
package/carousel/Indicator.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import N, { useContext as h } from "react";
|
|
3
|
-
import { a as I } from "../chunk/
|
|
4
|
-
import
|
|
5
|
-
function w(f,
|
|
6
|
-
const { getPrefixCls:
|
|
3
|
+
import { a as I } from "../chunk/C9oo3EJI.js";
|
|
4
|
+
import l from "@unicom-cloud/utils/class-name";
|
|
5
|
+
function w(f, p) {
|
|
6
|
+
const { getPrefixCls: a } = h(I), {
|
|
7
7
|
className: u,
|
|
8
8
|
type: i = "line",
|
|
9
|
-
count:
|
|
9
|
+
count: n = 2,
|
|
10
10
|
activeIndex: s = 0,
|
|
11
11
|
position: x = "bottom",
|
|
12
|
-
trigger:
|
|
13
|
-
onSelectIndex:
|
|
14
|
-
} = f, e =
|
|
12
|
+
trigger: $ = "click",
|
|
13
|
+
onSelectIndex: d
|
|
14
|
+
} = f, e = a == null ? void 0 : a("carousel-indicator"), r = [];
|
|
15
15
|
if (i === "slider") {
|
|
16
|
-
const t = 100 /
|
|
17
|
-
|
|
18
|
-
/* @__PURE__ */
|
|
16
|
+
const t = 100 / n;
|
|
17
|
+
r.push(
|
|
18
|
+
/* @__PURE__ */ c(
|
|
19
19
|
"span",
|
|
20
20
|
{
|
|
21
21
|
style: { width: `${t}%`, left: `${s * t}%` },
|
|
22
|
-
className:
|
|
22
|
+
className: l(`${e}-item`, `${e}-item-active`)
|
|
23
23
|
},
|
|
24
24
|
0
|
|
25
25
|
)
|
|
26
26
|
);
|
|
27
27
|
} else
|
|
28
|
-
for (let t = 0; t <
|
|
29
|
-
|
|
30
|
-
/* @__PURE__ */
|
|
28
|
+
for (let t = 0; t < n; t++)
|
|
29
|
+
r.push(
|
|
30
|
+
/* @__PURE__ */ c(
|
|
31
31
|
"span",
|
|
32
32
|
{
|
|
33
33
|
"data-index": t,
|
|
34
|
-
className:
|
|
34
|
+
className: l(`${e}-item`, {
|
|
35
35
|
[`${e}-item-active`]: t === s
|
|
36
36
|
})
|
|
37
37
|
},
|
|
38
38
|
t
|
|
39
39
|
)
|
|
40
40
|
);
|
|
41
|
-
const
|
|
42
|
-
ref:
|
|
43
|
-
className:
|
|
41
|
+
const g = {
|
|
42
|
+
ref: p,
|
|
43
|
+
className: l(
|
|
44
44
|
e,
|
|
45
45
|
`${e}-${i}`,
|
|
46
46
|
`${e}-${x}`,
|
|
47
47
|
u
|
|
48
48
|
),
|
|
49
|
-
[
|
|
49
|
+
[$ === "click" ? "onClick" : "onMouseMove"]: (t) => {
|
|
50
50
|
if (t.preventDefault(), i === "slider") {
|
|
51
51
|
if (t.target === t.currentTarget) {
|
|
52
|
-
const { x: o, width:
|
|
53
|
-
|
|
52
|
+
const { x: o, width: C } = t.currentTarget.getBoundingClientRect(), m = ~~((t.nativeEvent.clientX - o) / C * n);
|
|
53
|
+
m !== s && d(m);
|
|
54
54
|
}
|
|
55
55
|
} else {
|
|
56
56
|
const o = t.target.getAttribute("data-index");
|
|
57
|
-
o && +o !== s &&
|
|
57
|
+
o && +o !== s && d(+o);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ c("div", { ...g, children: r });
|
|
62
62
|
}
|
|
63
63
|
const y = N.forwardRef(w);
|
|
64
64
|
export {
|
package/carousel/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as ye, jsx as I } from "react/jsx-runtime";
|
|
2
|
-
import P, { useContext as
|
|
3
|
-
import { a as Ie } from "../chunk/
|
|
2
|
+
import P, { useContext as Ne, useRef as z, useState as m, useEffect as O, useImperativeHandle as xe } from "react";
|
|
3
|
+
import { a as Ie } from "../chunk/C9oo3EJI.js";
|
|
4
4
|
import { u as Ce } from "../chunk/C4OrxKE6.js";
|
|
5
5
|
import { u as Pe } from "../chunk/BFTV6myl.js";
|
|
6
6
|
import C from "@unicom-cloud/utils/class-name";
|
|
@@ -19,30 +19,30 @@ const we = 3e3, Ae = {
|
|
|
19
19
|
moveSpeed: 500,
|
|
20
20
|
timingFunc: "cubic-bezier(0.34, 0.69, 0.1, 1)"
|
|
21
21
|
};
|
|
22
|
-
function Ee(
|
|
23
|
-
const { getPrefixCls:
|
|
24
|
-
|
|
22
|
+
function Ee(G, V) {
|
|
23
|
+
const { getPrefixCls: $, componentConfig: b, rtl: _ } = Ne(Ie), h = Pe(
|
|
24
|
+
G,
|
|
25
25
|
Ae,
|
|
26
|
-
|
|
26
|
+
b == null ? void 0 : b.Carousel
|
|
27
27
|
), {
|
|
28
28
|
style: J,
|
|
29
29
|
className: K,
|
|
30
30
|
children: Q,
|
|
31
31
|
currentIndex: y,
|
|
32
|
-
animation:
|
|
32
|
+
animation: N,
|
|
33
33
|
trigger: ee,
|
|
34
|
-
direction:
|
|
35
|
-
moveSpeed:
|
|
36
|
-
timingFunc:
|
|
37
|
-
indicatorType:
|
|
38
|
-
indicatorPosition:
|
|
34
|
+
direction: T,
|
|
35
|
+
moveSpeed: W,
|
|
36
|
+
timingFunc: k,
|
|
37
|
+
indicatorType: U,
|
|
38
|
+
indicatorPosition: S,
|
|
39
39
|
indicatorClassName: te,
|
|
40
|
-
showArrow:
|
|
40
|
+
showArrow: Y,
|
|
41
41
|
miniRender: re,
|
|
42
42
|
arrowClassName: ne,
|
|
43
43
|
carousel: ie,
|
|
44
44
|
icons: oe,
|
|
45
|
-
onChange:
|
|
45
|
+
onChange: w,
|
|
46
46
|
...se
|
|
47
47
|
} = h;
|
|
48
48
|
let o = h.autoPlay;
|
|
@@ -52,17 +52,17 @@ function Ee(B, O) {
|
|
|
52
52
|
!0,
|
|
53
53
|
"[Pqb Carousel] The 'autoPlaySpeed' property will be removed in the next major version, please use 'autoPlay.interval' instead."
|
|
54
54
|
));
|
|
55
|
-
const
|
|
55
|
+
const Z = P.Children.toArray(Q).filter(
|
|
56
56
|
(e) => P.isValidElement(e)
|
|
57
|
-
), d =
|
|
58
|
-
typeof y == "number" ?
|
|
59
|
-
), [le, ce] = m(
|
|
57
|
+
), d = Z.length, p = z(null), f = z(null), x = z(null), [A, ae] = m(
|
|
58
|
+
typeof y == "number" ? v(y) : 0
|
|
59
|
+
), [le, ce] = m(A), [ue, q] = m(!1), [E, X] = m(!1), [M, de] = m(
|
|
60
60
|
null
|
|
61
|
-
), [
|
|
61
|
+
), [B, R] = m({
|
|
62
62
|
sliderWrapper: null,
|
|
63
63
|
indicatorWrapper: null
|
|
64
|
-
}), s = typeof y == "number" ?
|
|
65
|
-
|
|
64
|
+
}), s = typeof y == "number" ? v(y) : A, j = v(s - 1), D = v(s + 1), me = typeof o == "object" && o.interval ? o.interval : we;
|
|
65
|
+
O(() => () => x.current && clearTimeout(x.current), []), O(() => {
|
|
66
66
|
c({
|
|
67
67
|
targetIndex: s
|
|
68
68
|
});
|
|
@@ -70,24 +70,24 @@ function Ee(B, O) {
|
|
|
70
70
|
const pe = Ce(
|
|
71
71
|
() => {
|
|
72
72
|
c({
|
|
73
|
-
targetIndex:
|
|
73
|
+
targetIndex: D
|
|
74
74
|
});
|
|
75
75
|
},
|
|
76
76
|
o && !ue && d > 1 ? me : null
|
|
77
77
|
);
|
|
78
|
-
|
|
78
|
+
xe(ie, () => ({
|
|
79
79
|
dom: p.current,
|
|
80
80
|
getRootDOMNode: () => p.current,
|
|
81
81
|
goto: ({ index: e, isNegative: t, isManual: r, resetAutoPlayInterval: i }) => {
|
|
82
82
|
c({
|
|
83
|
-
targetIndex:
|
|
83
|
+
targetIndex: v(e),
|
|
84
84
|
isNegative: t,
|
|
85
85
|
isManual: r,
|
|
86
86
|
resetAutoPlayInterval: i
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
}));
|
|
90
|
-
function
|
|
90
|
+
function v(e) {
|
|
91
91
|
const t = +e;
|
|
92
92
|
return typeof t == "number" && !isNaN(t) ? (t + d) % d : e;
|
|
93
93
|
}
|
|
@@ -97,21 +97,21 @@ function Ee(B, O) {
|
|
|
97
97
|
isManual: r = !1,
|
|
98
98
|
resetAutoPlayInterval: i = !1
|
|
99
99
|
}) {
|
|
100
|
-
!
|
|
101
|
-
|
|
102
|
-
},
|
|
100
|
+
!E && e !== s && (X(!0), ae(e), ce(A), de(t ? "negative" : "positive"), w == null || w(e, s, r), o && i && pe(), x.current = setTimeout(() => {
|
|
101
|
+
X(!1), x.current = null;
|
|
102
|
+
}, W));
|
|
103
103
|
}
|
|
104
104
|
function fe() {
|
|
105
|
-
if (
|
|
105
|
+
if (N === "card") {
|
|
106
106
|
if (f.current) {
|
|
107
107
|
const e = f.current.children[0];
|
|
108
108
|
if (!e)
|
|
109
109
|
return;
|
|
110
|
-
if (
|
|
111
|
-
const t = f.current.clientWidth, r = e.clientWidth, i = (t - r) / 2, a = 200, l = t / 2, u = r,
|
|
112
|
-
|
|
110
|
+
if (T === "horizontal") {
|
|
111
|
+
const t = f.current.clientWidth, r = e.clientWidth, i = (t - r) / 2, a = 200, l = t / 2, u = r, g = l + 50 >= u ? a * 4 : a * l / (u - l);
|
|
112
|
+
R({
|
|
113
113
|
sliderWrapper: {
|
|
114
|
-
perspective:
|
|
114
|
+
perspective: g
|
|
115
115
|
},
|
|
116
116
|
indicatorWrapper: {
|
|
117
117
|
width: "auto",
|
|
@@ -120,10 +120,10 @@ function Ee(B, O) {
|
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
122
|
} else {
|
|
123
|
-
const t = f.current.clientHeight, r = e.clientHeight, i = (t - r) / 2, a = 200, l = t / 2, u = r,
|
|
124
|
-
|
|
123
|
+
const t = f.current.clientHeight, r = e.clientHeight, i = (t - r) / 2, a = 200, l = t / 2, u = r, g = l + 50 >= u ? a * 4 : a * l / (u - l);
|
|
124
|
+
R({
|
|
125
125
|
sliderWrapper: {
|
|
126
|
-
perspective:
|
|
126
|
+
perspective: g
|
|
127
127
|
},
|
|
128
128
|
indicatorWrapper: {
|
|
129
129
|
height: "auto",
|
|
@@ -134,37 +134,37 @@ function Ee(B, O) {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
} else
|
|
137
|
-
|
|
137
|
+
R({
|
|
138
138
|
sliderWrapper: null,
|
|
139
139
|
indicatorWrapper: null
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
-
const n =
|
|
142
|
+
const n = $ == null ? void 0 : $("carousel"), ve = C(
|
|
143
143
|
n,
|
|
144
|
-
`${n}-indicator-position-${
|
|
144
|
+
`${n}-indicator-position-${S}`,
|
|
145
145
|
{
|
|
146
|
-
[`${n}-rtl`]:
|
|
146
|
+
[`${n}-rtl`]: _
|
|
147
147
|
},
|
|
148
148
|
K
|
|
149
|
-
),
|
|
149
|
+
), ge = Object.assign(
|
|
150
150
|
{},
|
|
151
151
|
o && (typeof o != "object" || o.hoverToPause !== !1) ? {
|
|
152
|
-
onMouseEnter: () =>
|
|
153
|
-
onMouseLeave: () =>
|
|
152
|
+
onMouseEnter: () => q(!0),
|
|
153
|
+
onMouseLeave: () => q(!1)
|
|
154
154
|
} : null
|
|
155
155
|
);
|
|
156
|
-
let [
|
|
156
|
+
let [H, L] = [
|
|
157
157
|
() => c({
|
|
158
|
-
targetIndex:
|
|
158
|
+
targetIndex: j,
|
|
159
159
|
isNegative: !0,
|
|
160
160
|
isManual: !0
|
|
161
161
|
}),
|
|
162
162
|
() => c({
|
|
163
|
-
targetIndex:
|
|
163
|
+
targetIndex: D,
|
|
164
164
|
isManual: !0
|
|
165
165
|
})
|
|
166
166
|
];
|
|
167
|
-
return
|
|
167
|
+
return _ && ([H, L] = [L, H]), O(() => {
|
|
168
168
|
const e = be([p.current], fe);
|
|
169
169
|
return () => {
|
|
170
170
|
e();
|
|
@@ -173,56 +173,56 @@ function Ee(B, O) {
|
|
|
173
173
|
"div",
|
|
174
174
|
{
|
|
175
175
|
ref: (e) => {
|
|
176
|
-
|
|
176
|
+
V = e, p.current = V;
|
|
177
177
|
},
|
|
178
|
-
className:
|
|
178
|
+
className: ve,
|
|
179
179
|
style: J,
|
|
180
180
|
...$e(se, ["autoplay", "autoPlaySpeed"]),
|
|
181
|
-
...
|
|
181
|
+
...ge,
|
|
182
182
|
children: [
|
|
183
183
|
/* @__PURE__ */ I(
|
|
184
184
|
"div",
|
|
185
185
|
{
|
|
186
186
|
ref: f,
|
|
187
|
-
style:
|
|
187
|
+
style: B.sliderWrapper,
|
|
188
188
|
className: C(
|
|
189
|
-
`${n}-${
|
|
190
|
-
`${n}-${
|
|
189
|
+
`${n}-${N}`,
|
|
190
|
+
`${n}-${T}`,
|
|
191
191
|
{
|
|
192
|
-
[`${n}-negative`]:
|
|
192
|
+
[`${n}-negative`]: M === "negative"
|
|
193
193
|
}
|
|
194
194
|
),
|
|
195
|
-
children:
|
|
196
|
-
const r = t === s, i = t ===
|
|
195
|
+
children: Z.map((e, t) => {
|
|
196
|
+
const r = t === s, i = t === j, a = t === D;
|
|
197
197
|
if (!(!re || r || i || a))
|
|
198
198
|
return null;
|
|
199
199
|
const {
|
|
200
200
|
style: u,
|
|
201
|
-
className:
|
|
202
|
-
onClick:
|
|
201
|
+
className: g,
|
|
202
|
+
onClick: F
|
|
203
203
|
} = e.props;
|
|
204
204
|
return P.cloneElement(e, {
|
|
205
205
|
"aria-hidden": !r,
|
|
206
206
|
style: Object.assign(
|
|
207
207
|
{
|
|
208
|
-
transitionTimingFunction:
|
|
209
|
-
transitionDuration: `${
|
|
210
|
-
animationTimingFunction:
|
|
211
|
-
animationDuration: `${
|
|
208
|
+
transitionTimingFunction: k,
|
|
209
|
+
transitionDuration: `${W}ms`,
|
|
210
|
+
animationTimingFunction: k,
|
|
211
|
+
animationDuration: `${W}ms`
|
|
212
212
|
},
|
|
213
213
|
u
|
|
214
214
|
),
|
|
215
|
-
className: C(
|
|
215
|
+
className: C(g, {
|
|
216
216
|
[`${n}-item-prev`]: i,
|
|
217
217
|
[`${n}-item-next`]: a,
|
|
218
218
|
[`${n}-item-current`]: r,
|
|
219
|
-
[`${n}-item-slide-in`]:
|
|
220
|
-
[`${n}-item-slide-out`]:
|
|
219
|
+
[`${n}-item-slide-in`]: N === "slide" && M && E && r,
|
|
220
|
+
[`${n}-item-slide-out`]: N === "slide" && M && E && t === le
|
|
221
221
|
}),
|
|
222
222
|
onClick: (he) => {
|
|
223
|
-
|
|
223
|
+
F == null || F(he), c({
|
|
224
224
|
targetIndex: t,
|
|
225
|
-
isNegative: t ===
|
|
225
|
+
isNegative: t === j,
|
|
226
226
|
isManual: !0
|
|
227
227
|
});
|
|
228
228
|
}
|
|
@@ -230,22 +230,22 @@ function Ee(B, O) {
|
|
|
230
230
|
})
|
|
231
231
|
}
|
|
232
232
|
),
|
|
233
|
-
|
|
233
|
+
U !== "never" && d > 1 && /* @__PURE__ */ I(
|
|
234
234
|
"div",
|
|
235
235
|
{
|
|
236
|
-
style:
|
|
236
|
+
style: B.indicatorWrapper,
|
|
237
237
|
className: C(
|
|
238
238
|
`${n}-indicator-wrapper`,
|
|
239
|
-
`${n}-indicator-wrapper-${
|
|
239
|
+
`${n}-indicator-wrapper-${S}`
|
|
240
240
|
),
|
|
241
241
|
children: /* @__PURE__ */ I(
|
|
242
242
|
Se,
|
|
243
243
|
{
|
|
244
244
|
className: te,
|
|
245
|
-
type:
|
|
245
|
+
type: U,
|
|
246
246
|
count: d,
|
|
247
247
|
activeIndex: s,
|
|
248
|
-
position:
|
|
248
|
+
position: S,
|
|
249
249
|
trigger: ee,
|
|
250
250
|
onSelectIndex: (e) => c({
|
|
251
251
|
targetIndex: e,
|
|
@@ -256,15 +256,15 @@ function Ee(B, O) {
|
|
|
256
256
|
)
|
|
257
257
|
}
|
|
258
258
|
),
|
|
259
|
-
|
|
259
|
+
Y !== "never" && d > 1 && /* @__PURE__ */ I(
|
|
260
260
|
We,
|
|
261
261
|
{
|
|
262
262
|
className: ne,
|
|
263
|
-
direction:
|
|
264
|
-
showArrow:
|
|
263
|
+
direction: T,
|
|
264
|
+
showArrow: Y,
|
|
265
265
|
icons: oe,
|
|
266
|
-
prev:
|
|
267
|
-
next:
|
|
266
|
+
prev: H,
|
|
267
|
+
next: L
|
|
268
268
|
}
|
|
269
269
|
)
|
|
270
270
|
]
|
package/cascader/Cascader.js
CHANGED
|
@@ -9,7 +9,7 @@ import "lodash/isFunction";
|
|
|
9
9
|
import "lodash/isPlainObject";
|
|
10
10
|
import "lodash/isString";
|
|
11
11
|
import "react";
|
|
12
|
-
import "../chunk/
|
|
12
|
+
import "../chunk/C9oo3EJI.js";
|
|
13
13
|
import "../chunk/CQ_WOOmf.js";
|
|
14
14
|
import "../chunk/B4YRLi8r.js";
|
|
15
15
|
import "../chunk/BFTV6myl.js";
|
|
@@ -19,7 +19,7 @@ import "../select-view/index.js";
|
|
|
19
19
|
import "../trigger/index.js";
|
|
20
20
|
import "@unicom-cloud/utils/class-name";
|
|
21
21
|
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
22
|
-
import { X as k, a as n } from "../chunk/
|
|
22
|
+
import { X as k, a as n } from "../chunk/BmulTYLW.js";
|
|
23
23
|
export {
|
|
24
24
|
k as DefaultFieldNames,
|
|
25
25
|
n as default
|
package/cascader/index.js
CHANGED
package/cascader/util.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as s, D as t, B as o, V as r, U as l, H as u, W as S, I as V, Q as m, J as f, K as g } from "../chunk/
|
|
1
|
+
import { F as s, D as t, B as o, V as r, U as l, H as u, W as S, I as V, Q as m, J as f, K as g } from "../chunk/BmulTYLW.js";
|
|
2
2
|
export {
|
|
3
3
|
s as PANEL_MODE,
|
|
4
4
|
t as SHOW_CHILD,
|