@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/progress/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { a as k } from "../chunk/
|
|
1
|
+
import { jsxs as C, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as P, useContext as $ } from "react";
|
|
3
|
+
import { a as k } from "../chunk/C9oo3EJI.js";
|
|
4
4
|
import { u as N } from "../chunk/BFTV6myl.js";
|
|
5
5
|
import S from "@unicom-cloud/utils/class-name";
|
|
6
6
|
import { o as T } from "../chunk/BKKEev13.js";
|
|
7
|
-
import
|
|
7
|
+
import c from "./CircleProgress.js";
|
|
8
8
|
import W from "./LineProgess.js";
|
|
9
9
|
import { StepProgress as b } from "./StepProgress.js";
|
|
10
10
|
const j = {
|
|
@@ -14,37 +14,37 @@ const j = {
|
|
|
14
14
|
percent: 0,
|
|
15
15
|
size: "default"
|
|
16
16
|
};
|
|
17
|
-
function z(f,
|
|
18
|
-
const { getPrefixCls:
|
|
17
|
+
function z(f, h) {
|
|
18
|
+
const { getPrefixCls: a, componentConfig: l, rtl: d } = $(k), t = N(
|
|
19
19
|
f,
|
|
20
20
|
j,
|
|
21
21
|
l == null ? void 0 : l.Progress
|
|
22
22
|
), {
|
|
23
23
|
className: u,
|
|
24
24
|
style: x,
|
|
25
|
-
size:
|
|
25
|
+
size: n,
|
|
26
26
|
width: o,
|
|
27
|
-
strokeWidth:
|
|
27
|
+
strokeWidth: m,
|
|
28
28
|
steps: g,
|
|
29
|
-
percent:
|
|
30
|
-
...
|
|
31
|
-
} = t, r = g && t.type !== "circle" ? "steps" : t.type, s =
|
|
32
|
-
return
|
|
29
|
+
percent: w,
|
|
30
|
+
...y
|
|
31
|
+
} = t, r = g && t.type !== "circle" ? "steps" : t.type, s = a == null ? void 0 : a("progress"), e = "status" in t ? t.status : w >= 100 ? "success" : "normal", p = { width: o };
|
|
32
|
+
return n === "mini" && r === "line" && (p.width = o || 16, p.height = o || 16), /* @__PURE__ */ C(
|
|
33
33
|
"div",
|
|
34
34
|
{
|
|
35
|
-
ref:
|
|
35
|
+
ref: h,
|
|
36
36
|
className: S(
|
|
37
37
|
s,
|
|
38
38
|
`${s}-${r}`,
|
|
39
|
-
`${s}-${
|
|
39
|
+
`${s}-${n}`,
|
|
40
40
|
{
|
|
41
41
|
[`${s}-is-${e}`]: e !== "normal",
|
|
42
42
|
[`${s}-rtl`]: d
|
|
43
43
|
},
|
|
44
44
|
u
|
|
45
45
|
),
|
|
46
|
-
style: { ...
|
|
47
|
-
...T(
|
|
46
|
+
style: { ...p, ...x },
|
|
47
|
+
...T(y, [
|
|
48
48
|
"type",
|
|
49
49
|
"animation",
|
|
50
50
|
"status",
|
|
@@ -67,7 +67,7 @@ function z(f, c) {
|
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
69
|
r === "circle" && /* @__PURE__ */ i(
|
|
70
|
-
|
|
70
|
+
c,
|
|
71
71
|
{
|
|
72
72
|
width: t.width,
|
|
73
73
|
...t,
|
|
@@ -76,14 +76,14 @@ function z(f, c) {
|
|
|
76
76
|
prefixCls: s
|
|
77
77
|
}
|
|
78
78
|
),
|
|
79
|
-
r === "line" && (
|
|
80
|
-
|
|
79
|
+
r === "line" && (n === "mini" ? /* @__PURE__ */ i(
|
|
80
|
+
c,
|
|
81
81
|
{
|
|
82
82
|
pathStrokeColor: t.trailColor,
|
|
83
83
|
...t,
|
|
84
|
-
pathStrokeWidth:
|
|
84
|
+
pathStrokeWidth: m || 4,
|
|
85
85
|
width: o || 16,
|
|
86
|
-
strokeWidth:
|
|
86
|
+
strokeWidth: m || 4,
|
|
87
87
|
prefixCls: s,
|
|
88
88
|
status: e
|
|
89
89
|
}
|
|
@@ -92,7 +92,7 @@ function z(f, c) {
|
|
|
92
92
|
}
|
|
93
93
|
);
|
|
94
94
|
}
|
|
95
|
-
const R =
|
|
95
|
+
const R = P(z);
|
|
96
96
|
R.displayName = "Progress";
|
|
97
97
|
export {
|
|
98
98
|
R as default
|
package/radio/Group.js
CHANGED
|
@@ -2,13 +2,13 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "lodash/isArray";
|
|
3
3
|
import "lodash/isPlainObject";
|
|
4
4
|
import "react";
|
|
5
|
-
import "../chunk/
|
|
5
|
+
import "../chunk/C9oo3EJI.js";
|
|
6
6
|
import "../chunk/BFTV6myl.js";
|
|
7
7
|
import "../chunk/CXPOj2uy.js";
|
|
8
8
|
import "@unicom-cloud/utils/class-name";
|
|
9
9
|
import "../utils/constant.js";
|
|
10
10
|
import "../chunk/ClqoGc3r.js";
|
|
11
|
-
import { x as C, g as f, e as l } from "../chunk/
|
|
11
|
+
import { x as C, g as f, e as l } from "../chunk/BmulTYLW.js";
|
|
12
12
|
export {
|
|
13
13
|
C as ClearRadioGroupContext,
|
|
14
14
|
f as RadioGroupContext,
|
package/radio/GroupBlock.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import "../chunk/
|
|
3
|
+
import "../chunk/C9oo3EJI.js";
|
|
4
4
|
import "../chunk/BFTV6myl.js";
|
|
5
|
-
import { f as a } from "../chunk/
|
|
5
|
+
import { f as a } from "../chunk/BmulTYLW.js";
|
|
6
6
|
import "@unicom-cloud/utils/class-name";
|
|
7
7
|
export {
|
|
8
8
|
a as default
|
package/radio/Radio.js
CHANGED
|
@@ -2,12 +2,12 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "lodash/isFunction";
|
|
3
3
|
import "lodash/isNil";
|
|
4
4
|
import "react";
|
|
5
|
-
import "../chunk/
|
|
5
|
+
import "../chunk/C9oo3EJI.js";
|
|
6
6
|
import "../chunk/BFTV6myl.js";
|
|
7
7
|
import "../chunk/CXPOj2uy.js";
|
|
8
8
|
import "@unicom-cloud/utils/class-name";
|
|
9
9
|
import "../chunk/BKKEev13.js";
|
|
10
|
-
import { e as R, f, g as G, R as l } from "../chunk/
|
|
10
|
+
import { e as R, f, g as G, R as l } from "../chunk/BmulTYLW.js";
|
|
11
11
|
export {
|
|
12
12
|
R as RadioGroup,
|
|
13
13
|
f as RadioGroupBlock,
|
package/radio/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as a } from "../chunk/
|
|
2
|
-
import { x as e, e as p, f as d, g as i } from "../chunk/
|
|
1
|
+
import { R as a } from "../chunk/BmulTYLW.js";
|
|
2
|
+
import { x as e, e as p, f as d, g as i } from "../chunk/BmulTYLW.js";
|
|
3
3
|
export {
|
|
4
4
|
e as ClearRadioGroupContext,
|
|
5
5
|
p as RadioGroup,
|
package/rate/index.js
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
1
|
import { jsx as o, jsxs as Y } from "react/jsx-runtime";
|
|
2
2
|
import Z from "@unicom-cloud/icons/IconUiFaceFrownFill";
|
|
3
|
-
import
|
|
3
|
+
import U from "@unicom-cloud/icons/IconUiFaceMehFill";
|
|
4
4
|
import x from "@unicom-cloud/icons/IconUiFaceSmileFill";
|
|
5
5
|
import tt from "@unicom-cloud/icons/IconUiStarFill";
|
|
6
6
|
import { times as et, divide as rt } from "@unicom-cloud/utils/math";
|
|
7
|
-
import
|
|
8
|
-
import { a as at } from "../chunk/
|
|
7
|
+
import _, { useContext as ot, useState as y } from "react";
|
|
8
|
+
import { a as at } from "../chunk/C9oo3EJI.js";
|
|
9
9
|
import { u as st } from "../chunk/BFTV6myl.js";
|
|
10
10
|
import ct from "../tooltip/index.js";
|
|
11
|
-
import
|
|
11
|
+
import S from "@unicom-cloud/utils/class-name";
|
|
12
12
|
import { o as lt } from "../chunk/BKKEev13.js";
|
|
13
13
|
const it = {
|
|
14
14
|
character: /* @__PURE__ */ o(tt, {}),
|
|
15
15
|
count: 5
|
|
16
16
|
};
|
|
17
|
-
function nt(
|
|
18
|
-
const { getPrefixCls:
|
|
19
|
-
|
|
17
|
+
function nt(j, g) {
|
|
18
|
+
const { getPrefixCls: m, componentConfig: f, rtl: z } = ot(at), F = st(
|
|
19
|
+
j,
|
|
20
20
|
it,
|
|
21
|
-
|
|
21
|
+
f == null ? void 0 : f.Rate
|
|
22
22
|
), {
|
|
23
23
|
style: D = {},
|
|
24
24
|
className: L,
|
|
25
25
|
defaultValue: T,
|
|
26
|
-
character:
|
|
27
|
-
count:
|
|
28
|
-
value:
|
|
29
|
-
tooltips:
|
|
26
|
+
character: p,
|
|
27
|
+
count: I,
|
|
28
|
+
value: M,
|
|
29
|
+
tooltips: b,
|
|
30
30
|
allowHalf: a,
|
|
31
31
|
allowClear: W,
|
|
32
|
-
readonly:
|
|
33
|
-
disabled:
|
|
34
|
-
grading:
|
|
32
|
+
readonly: u,
|
|
33
|
+
disabled: d,
|
|
34
|
+
grading: w,
|
|
35
35
|
onChange: c,
|
|
36
36
|
onHoverChange: l,
|
|
37
37
|
...q
|
|
38
|
-
} =
|
|
38
|
+
} = F, [B, P] = y(T || M || 0), [h, R] = y(0), [$, V] = y(), r = m == null ? void 0 : m("rate"), G = S(
|
|
39
39
|
r,
|
|
40
40
|
{
|
|
41
|
-
[`${r}-readonly`]:
|
|
42
|
-
[`${r}-disabled`]:
|
|
41
|
+
[`${r}-readonly`]: u,
|
|
42
|
+
[`${r}-disabled`]: d,
|
|
43
43
|
[`${r}-rtl`]: z
|
|
44
44
|
},
|
|
45
45
|
L
|
|
46
|
-
), n = "value" in
|
|
47
|
-
|
|
48
|
-
},
|
|
46
|
+
), n = "value" in F ? M : B, A = () => {
|
|
47
|
+
h && (R(0), l == null || l(0));
|
|
48
|
+
}, C = (t, s) => {
|
|
49
49
|
const e = s && a ? t + 0.5 : t + 1;
|
|
50
|
-
e !==
|
|
51
|
-
},
|
|
50
|
+
e !== h && (R(e), l == null || l(e));
|
|
51
|
+
}, k = (t, s) => {
|
|
52
52
|
const e = s && a ? t + 0.5 : t + 1;
|
|
53
|
-
|
|
53
|
+
V(!0), e !== n ? (P(e), c == null || c(e)) : W && (P(0), c == null || c(0), A());
|
|
54
54
|
}, H = (t) => {
|
|
55
|
-
const s = a ? et(+rt(n || 0, 0.5).toFixed(0), 0.5) : Math.round(n), e =
|
|
56
|
-
let i = typeof
|
|
57
|
-
|
|
58
|
-
const J =
|
|
55
|
+
const s = a ? et(+rt(n || 0, 0.5).toFixed(0), 0.5) : Math.round(n), e = h || s;
|
|
56
|
+
let i = typeof p == "function" ? p(t) : p;
|
|
57
|
+
w && (e <= 2 ? i = /* @__PURE__ */ o(Z, {}) : e <= 3 ? i = /* @__PURE__ */ o(U, {}) : i = /* @__PURE__ */ o(x, {}), e <= t && (i = /* @__PURE__ */ o(U, {})));
|
|
58
|
+
const J = S(`${r}-character`, {
|
|
59
59
|
[`${r}-character-half`]: a && t + 0.5 === e,
|
|
60
60
|
[`${r}-character-full`]: t + 1 <= e,
|
|
61
|
-
[`${r}-character-scale`]:
|
|
62
|
-
}), K =
|
|
63
|
-
onMouseEnter:
|
|
64
|
-
onClick:
|
|
65
|
-
}, O =
|
|
66
|
-
onMouseEnter:
|
|
67
|
-
onClick:
|
|
68
|
-
},
|
|
69
|
-
function
|
|
61
|
+
[`${r}-character-scale`]: $ && t + 1 < n
|
|
62
|
+
}), K = u || d ? {} : {
|
|
63
|
+
onMouseEnter: C.bind(this, t, !0),
|
|
64
|
+
onClick: k.bind(this, t, !0)
|
|
65
|
+
}, O = u || d ? {} : {
|
|
66
|
+
onMouseEnter: C.bind(this, t, !1),
|
|
67
|
+
onClick: k.bind(this, t, !1)
|
|
68
|
+
}, v = b && b[t], Q = v ? ct : _.Fragment, X = v ? { content: v } : {};
|
|
69
|
+
function N(E) {
|
|
70
70
|
return {
|
|
71
71
|
role: "radio",
|
|
72
|
-
"aria-checked": t + (
|
|
73
|
-
"aria-setsize":
|
|
74
|
-
"aria-posinset": t + (
|
|
72
|
+
"aria-checked": t + (E ? 0.5 : 1) <= e,
|
|
73
|
+
"aria-setsize": I,
|
|
74
|
+
"aria-posinset": t + (E ? 0.5 : 1)
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
return /* @__PURE__ */ o(Q, { ...X, children: /* @__PURE__ */ Y(
|
|
78
78
|
"div",
|
|
79
79
|
{
|
|
80
80
|
className: J,
|
|
81
|
-
style:
|
|
81
|
+
style: $ ? { animationDelay: `${50 * t}ms` } : {},
|
|
82
82
|
onAnimationEnd: () => {
|
|
83
|
-
|
|
83
|
+
$ && t + 1 >= n - 1 && V(!1);
|
|
84
84
|
},
|
|
85
|
-
...a ? {} :
|
|
85
|
+
...a ? {} : N(),
|
|
86
86
|
children: [
|
|
87
87
|
/* @__PURE__ */ o(
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
90
90
|
className: `${r}-character-left`,
|
|
91
91
|
...K,
|
|
92
|
-
...a ?
|
|
92
|
+
...a ? N(!0) : {},
|
|
93
93
|
children: i
|
|
94
94
|
}
|
|
95
95
|
),
|
|
@@ -98,7 +98,7 @@ function nt(S, _) {
|
|
|
98
98
|
{
|
|
99
99
|
className: `${r}-character-right`,
|
|
100
100
|
...O,
|
|
101
|
-
...a ?
|
|
101
|
+
...a ? N() : {},
|
|
102
102
|
children: i
|
|
103
103
|
}
|
|
104
104
|
)
|
|
@@ -109,18 +109,18 @@ function nt(S, _) {
|
|
|
109
109
|
return /* @__PURE__ */ o(
|
|
110
110
|
"div",
|
|
111
111
|
{
|
|
112
|
-
ref:
|
|
112
|
+
ref: g,
|
|
113
113
|
...lt(q, ["error"]),
|
|
114
114
|
style: D,
|
|
115
115
|
className: G,
|
|
116
|
-
onMouseLeave:
|
|
117
|
-
children: /* @__PURE__ */ o("div", { className: `${r}-inner`, children: Array.apply(null, Array(
|
|
116
|
+
onMouseLeave: A,
|
|
117
|
+
children: /* @__PURE__ */ o("div", { className: `${r}-inner`, children: Array.apply(null, Array(w ? 5 : I)).map(
|
|
118
118
|
(t, s) => H(s)
|
|
119
119
|
) })
|
|
120
120
|
}
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
|
-
const mt =
|
|
123
|
+
const mt = _.forwardRef(nt);
|
|
124
124
|
mt.displayName = "Rate";
|
|
125
125
|
export {
|
|
126
126
|
mt as default
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { jsx as e, jsxs as F } from "react/jsx-runtime";
|
|
2
|
+
import H from "@unicom-cloud/icons/IconUiCaretDown";
|
|
3
|
+
import h from "@unicom-cloud/icons/IconUiCaretLeft";
|
|
4
|
+
import z from "@unicom-cloud/icons/IconUiCaretRight";
|
|
5
|
+
import L from "@unicom-cloud/icons/IconUiCaretUp";
|
|
6
|
+
import M from "@unicom-cloud/icons/IconUiDragDot";
|
|
7
|
+
import P from "@unicom-cloud/icons/IconUiDragDotVertical";
|
|
8
8
|
import g from "lodash/isFunction";
|
|
9
9
|
import { useContext as V, useRef as q, useEffect as A } from "react";
|
|
10
|
-
import { a as B } from "../chunk/
|
|
10
|
+
import { a as B } from "../chunk/C9oo3EJI.js";
|
|
11
11
|
import o from "@unicom-cloud/utils/class-name";
|
|
12
12
|
import "../chunk/ClM74To2.js";
|
|
13
13
|
import { o as G } from "../chunk/BKKEev13.js";
|
|
14
14
|
import { r as J } from "../chunk/CIRG541s.js";
|
|
15
|
-
import { isPlainObject as
|
|
16
|
-
function ce(
|
|
15
|
+
import { isPlainObject as I } from "@unicom-cloud/utils/is";
|
|
16
|
+
function ce(D) {
|
|
17
17
|
const {
|
|
18
|
-
className:
|
|
19
|
-
direction:
|
|
20
|
-
icon:
|
|
21
|
-
onMouseDown:
|
|
18
|
+
className: U,
|
|
19
|
+
direction: b,
|
|
20
|
+
icon: R,
|
|
21
|
+
onMouseDown: T,
|
|
22
22
|
onResize: a,
|
|
23
|
-
children:
|
|
23
|
+
children: C,
|
|
24
24
|
collapsible: n = {},
|
|
25
25
|
resizable: l = !0,
|
|
26
26
|
renderChildren: c,
|
|
27
|
-
...
|
|
28
|
-
} =
|
|
27
|
+
...k
|
|
28
|
+
} = D, { getPrefixCls: m, rtl: v } = V(B), r = m == null ? void 0 : m("resizebox-trigger"), t = b === "horizontal", y = v && !t, x = o(
|
|
29
29
|
r,
|
|
30
30
|
`${r}-${t ? "horizontal" : "vertical"}`,
|
|
31
31
|
{ [`${r}-not-resizable`]: !l },
|
|
32
|
-
{ [`${r}-rtl`]:
|
|
33
|
-
|
|
34
|
-
),
|
|
32
|
+
{ [`${r}-rtl`]: v },
|
|
33
|
+
U
|
|
34
|
+
), p = q(), N = y ? [/* @__PURE__ */ e(z, {}, "prev"), /* @__PURE__ */ e(h, {}, "next")] : [/* @__PURE__ */ e(h, {}, "prev"), /* @__PURE__ */ e(z, {}, "next")], i = I(n.prev) ? {
|
|
35
35
|
...n.prev,
|
|
36
|
-
icon: n.prev.icon || (t ? /* @__PURE__ */ e(
|
|
37
|
-
} : {}, s =
|
|
36
|
+
icon: n.prev.icon || (t ? /* @__PURE__ */ e(L, {}) : N[0])
|
|
37
|
+
} : {}, s = I(n.next) ? {
|
|
38
38
|
...n.next,
|
|
39
|
-
icon: n.next.icon || (t ? /* @__PURE__ */ e(
|
|
39
|
+
icon: n.next.icon || (t ? /* @__PURE__ */ e(H, {}) : N[1])
|
|
40
40
|
} : {}, j = () => i.icon && !i.collapsed || s.collapsed ? /* @__PURE__ */ e(
|
|
41
41
|
"span",
|
|
42
42
|
{
|
|
@@ -51,27 +51,27 @@ function ce(I) {
|
|
|
51
51
|
onClick: s.onClick,
|
|
52
52
|
children: s.icon
|
|
53
53
|
}
|
|
54
|
-
) : /* @__PURE__ */ e("span", { className: o(`${r}-icon-empty`) }),
|
|
55
|
-
p,
|
|
54
|
+
) : /* @__PURE__ */ e("span", { className: o(`${r}-icon-empty`) }), E = () => l ? /* @__PURE__ */ e("span", { className: `${r}-icon`, children: R || (t ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(P, {})) }) : /* @__PURE__ */ e("span", { className: o(`${r}-icon-empty`) }), f = j(), d = E(), u = w(), $ = () => /* @__PURE__ */ F("div", { className: `${r}-icon-wrapper`, children: [
|
|
56
55
|
f,
|
|
57
|
-
d
|
|
56
|
+
d,
|
|
57
|
+
u
|
|
58
58
|
] });
|
|
59
59
|
return l ? (A(() => {
|
|
60
60
|
if (!g(a)) return;
|
|
61
|
-
const
|
|
61
|
+
const O = J([p.current], a);
|
|
62
62
|
return () => {
|
|
63
|
-
|
|
63
|
+
O();
|
|
64
64
|
};
|
|
65
|
-
}, [
|
|
65
|
+
}, [p.current, a]), /* @__PURE__ */ e(
|
|
66
66
|
"div",
|
|
67
67
|
{
|
|
68
|
-
ref:
|
|
69
|
-
...G(
|
|
68
|
+
ref: p,
|
|
69
|
+
...G(k, ["style"]),
|
|
70
70
|
className: x,
|
|
71
|
-
onMouseDown:
|
|
72
|
-
children: g(c) ? c(
|
|
71
|
+
onMouseDown: T,
|
|
72
|
+
children: g(c) ? c(f, d, u) : C || $()
|
|
73
73
|
}
|
|
74
|
-
)) : /* @__PURE__ */ e("div", { className: x, children: g(c) ? c(
|
|
74
|
+
)) : /* @__PURE__ */ e("div", { className: x, children: g(c) ? c(f, d, u) : C || $() });
|
|
75
75
|
}
|
|
76
76
|
export {
|
|
77
77
|
ce as default
|
package/resize-box/Split.js
CHANGED
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as ce, useContext as ae, useState as
|
|
3
|
-
import { a as
|
|
4
|
-
import { u as
|
|
5
|
-
import
|
|
6
|
-
import { on as
|
|
1
|
+
import { jsx as y, jsxs as ie } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ce, useContext as ae, useState as W, useRef as T, useImperativeHandle as fe, useEffect as ue } from "react";
|
|
3
|
+
import { a as me } from "../chunk/C9oo3EJI.js";
|
|
4
|
+
import { u as le } from "../chunk/B2yFlXke.js";
|
|
5
|
+
import C from "@unicom-cloud/utils/class-name";
|
|
6
|
+
import { on as m, off as l } from "../utils/dom.js";
|
|
7
7
|
import de from "./ResizeTrigger.js";
|
|
8
|
-
const
|
|
9
|
-
function ge(n,
|
|
8
|
+
const H = "horizontal", A = "vertical";
|
|
9
|
+
function ge(n, L) {
|
|
10
10
|
const {
|
|
11
|
-
style:
|
|
12
|
-
className:
|
|
13
|
-
component:
|
|
14
|
-
direction:
|
|
15
|
-
icon:
|
|
11
|
+
style: V,
|
|
12
|
+
className: j,
|
|
13
|
+
component: B = "div",
|
|
14
|
+
direction: I = "horizontal",
|
|
15
|
+
icon: _,
|
|
16
16
|
size: d = 0.5,
|
|
17
17
|
min: v,
|
|
18
|
-
max:
|
|
19
|
-
panes:
|
|
20
|
-
disabled:
|
|
21
|
-
trigger:
|
|
22
|
-
} = n, { getPrefixCls:
|
|
18
|
+
max: R,
|
|
19
|
+
panes: Z,
|
|
20
|
+
disabled: k,
|
|
21
|
+
trigger: q
|
|
22
|
+
} = n, { getPrefixCls: x, rtl: p } = ae(me), s = x == null ? void 0 : x("resizebox-split"), g = I.includes(H), E = I.includes("reverse"), G = g && p, O = !g, J = C(
|
|
23
23
|
s,
|
|
24
|
-
`${s}-${g ?
|
|
25
|
-
{ [`${s}-rtl`]:
|
|
26
|
-
|
|
27
|
-
), [K, Q] =
|
|
24
|
+
`${s}-${g ? H : A}`,
|
|
25
|
+
{ [`${s}-rtl`]: p },
|
|
26
|
+
j
|
|
27
|
+
), [K, Q] = Z, i = typeof d == "string", [c, F] = W(parseFloat(d)), [M, U] = W(0), t = T({
|
|
28
28
|
startX: 0,
|
|
29
29
|
startY: 0,
|
|
30
30
|
startWidth: 0,
|
|
31
31
|
startHeight: 0,
|
|
32
32
|
startOffset: 0,
|
|
33
33
|
moving: !1
|
|
34
|
-
}), w =
|
|
35
|
-
fe(
|
|
36
|
-
function
|
|
34
|
+
}), w = T(), N = T([]);
|
|
35
|
+
fe(L, () => w.current, []);
|
|
36
|
+
function z(e, o) {
|
|
37
37
|
return parseFloat(e) / parseFloat(o);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
const
|
|
41
|
-
let
|
|
42
|
-
|
|
43
|
-
let u = i ? o + (f - r) *
|
|
44
|
-
e * o + (f - r) *
|
|
39
|
+
function b(e, o, r, f) {
|
|
40
|
+
const D = typeof v == "string" ? z(parseFloat(v), e) : v || 0, P = typeof R == "string" ? z(parseFloat(R), e) : R || 1;
|
|
41
|
+
let $ = E ? -1 : 1;
|
|
42
|
+
$ *= G ? -1 : 1;
|
|
43
|
+
let u = i ? o + (f - r) * $ : z(
|
|
44
|
+
e * o + (f - r) * $,
|
|
45
45
|
e
|
|
46
46
|
);
|
|
47
|
-
const re = i ?
|
|
47
|
+
const re = i ? D * e : D, se = i ? P * e : P;
|
|
48
48
|
return u = Math.max(u, re), u = Math.min(u, se), u;
|
|
49
49
|
}
|
|
50
50
|
function ee(e) {
|
|
51
51
|
var o, r, f;
|
|
52
|
-
(o = n.onMovingStart) == null || o.call(n), t.current.moving = !0, t.current.startX = e.pageX, t.current.startY = e.pageY, t.current.startWidth = (r = w.current) == null ? void 0 : r.offsetWidth, t.current.startHeight = (f = w.current) == null ? void 0 : f.offsetHeight, t.current.startOffset = c,
|
|
52
|
+
(o = n.onMovingStart) == null || o.call(n), t.current.moving = !0, t.current.startX = e.pageX, t.current.startY = e.pageY, t.current.startWidth = (r = w.current) == null ? void 0 : r.offsetWidth, t.current.startHeight = (f = w.current) == null ? void 0 : f.offsetHeight, t.current.startOffset = c, m(window, "mousemove", h), m(window, "touchmove", h), m(window, "mouseup", a), m(window, "touchend", a), m(window, "contextmenu", a), document.body.style.cursor = O ? "row-resize" : "col-resize";
|
|
53
53
|
}
|
|
54
54
|
function h(e) {
|
|
55
55
|
var o;
|
|
56
56
|
if (t.current.moving) {
|
|
57
|
-
const r = g ?
|
|
57
|
+
const r = g ? b(
|
|
58
58
|
t.current.startWidth,
|
|
59
59
|
t.current.startOffset,
|
|
60
60
|
t.current.startX,
|
|
61
61
|
e.pageX
|
|
62
|
-
) :
|
|
62
|
+
) : b(
|
|
63
63
|
t.current.startHeight,
|
|
64
64
|
t.current.startOffset,
|
|
65
65
|
t.current.startY,
|
|
66
66
|
e.pageY
|
|
67
67
|
);
|
|
68
|
-
|
|
68
|
+
F(r), (o = n.onMoving) == null || o.call(n, e, i ? `${r}px` : r);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
function a() {
|
|
72
72
|
var e;
|
|
73
|
-
t.current.moving = !1,
|
|
73
|
+
t.current.moving = !1, l(window, "mousemove", h), l(window, "touchmove", h), l(window, "mouseup", a), l(window, "touchend", a), l(window, "contextmenu", a), document.body.style.cursor = "default", (e = n.onMovingEnd) == null || e.call(n);
|
|
74
74
|
}
|
|
75
75
|
function te(e) {
|
|
76
|
-
const { contentRect: o } = e[0], r = o[
|
|
76
|
+
const { contentRect: o } = e[0], r = o[O ? "height" : "width"];
|
|
77
77
|
U(r);
|
|
78
78
|
}
|
|
79
79
|
function ne() {
|
|
80
80
|
const e = i ? "px" : "%";
|
|
81
|
-
return c ? `calc(${i ? c : c * 100}${e} - ${
|
|
81
|
+
return c ? `calc(${i ? c : c * 100}${e} - ${M / 2}px)` : `0${e}`;
|
|
82
82
|
}
|
|
83
83
|
ue(() => {
|
|
84
84
|
var e;
|
|
85
|
-
(e = n.onPaneResize) == null || e.call(n,
|
|
86
|
-
}, [c,
|
|
85
|
+
(e = n.onPaneResize) == null || e.call(n, N.current);
|
|
86
|
+
}, [c, M]), le(() => {
|
|
87
87
|
const e = parseFloat(d);
|
|
88
|
-
c !== e &&
|
|
88
|
+
c !== e && F(e);
|
|
89
89
|
}, [d]);
|
|
90
|
-
const oe =
|
|
90
|
+
const oe = B, S = /* @__PURE__ */ y(
|
|
91
91
|
"div",
|
|
92
92
|
{
|
|
93
|
-
className:
|
|
93
|
+
className: C(`${s}-pane`, "first-pane"),
|
|
94
94
|
style: { flexBasis: ne() },
|
|
95
95
|
ref: (e) => {
|
|
96
|
-
|
|
96
|
+
N.current[0] = e;
|
|
97
97
|
},
|
|
98
98
|
children: K
|
|
99
99
|
}
|
|
100
|
-
),
|
|
100
|
+
), X = /* @__PURE__ */ y(
|
|
101
101
|
"div",
|
|
102
102
|
{
|
|
103
|
-
className:
|
|
103
|
+
className: C(`${s}-pane`, "second-pane"),
|
|
104
104
|
ref: (e) => {
|
|
105
|
-
|
|
105
|
+
N.current[1] = e;
|
|
106
106
|
},
|
|
107
107
|
children: Q
|
|
108
108
|
}
|
|
109
|
-
),
|
|
110
|
-
return /* @__PURE__ */ ie(oe, { style:
|
|
111
|
-
|
|
112
|
-
!
|
|
109
|
+
), Y = E ? [X, S] : [S, X];
|
|
110
|
+
return /* @__PURE__ */ ie(oe, { style: V, className: J, ref: w, children: [
|
|
111
|
+
Y[0],
|
|
112
|
+
!k && /* @__PURE__ */ y(
|
|
113
113
|
de,
|
|
114
114
|
{
|
|
115
115
|
className: `${s}-trigger`,
|
|
116
|
-
direction:
|
|
117
|
-
icon:
|
|
116
|
+
direction: O ? H : A,
|
|
117
|
+
icon: _,
|
|
118
118
|
onMouseDown: ee,
|
|
119
119
|
onResize: te,
|
|
120
|
-
children:
|
|
120
|
+
children: q
|
|
121
121
|
}
|
|
122
122
|
),
|
|
123
|
-
|
|
123
|
+
Y[1]
|
|
124
124
|
] });
|
|
125
125
|
}
|
|
126
126
|
const we = ce(ge);
|