@unicom-cloud/ui 0.8.93 → 0.8.95
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/Checkbox.js +5 -4
- package/Layout.js +8 -7
- package/Message.js +1 -1
- package/Notification.js +1 -1
- package/Switch.js +1 -1
- package/Tooltip.js +1 -1
- package/Trigger.js +1 -1
- package/back-top/index.js +8 -8
- package/badge/index.js +11 -11
- package/cascader/panel/List.js +1 -1
- package/cascader/panel/Option.js +7 -6
- package/cascader/panel/Search.js +17 -16
- package/checkbox/index.js +7 -6
- package/collapse/Item.js +1 -1
- package/color-picker/InputHex.js +1 -1
- package/color-picker/InputRgb.js +1 -1
- package/color-picker/Mode.js +7 -6
- package/color-picker/Palette.js +1 -1
- package/color-picker/Panel.js +1 -1
- package/color-picker/colors.js +1 -1
- package/color-picker/hooks/useColorPicker.js +1 -1
- package/color-picker/utils.js +1 -1
- package/components/common/empty/index.js +33 -13
- package/components/common/space/index.js +4 -3
- package/components/common/utils/PqbCSSTransition.js +1 -1
- package/components/common/utils/setPrimaryColor.js +21 -21
- package/components/common/utils/setTheme.js +23 -23
- package/dist/react-transition-group/src/CSSTransition.js +1 -1
- package/dist/react-transition-group/src/SwitchTransition.js +1 -1
- package/dist/tinycolor/chunk/{DGZSWe7E.js → BOzCVdr0.js} +43 -43
- package/dist/tinycolor/customize/index.js +1 -1
- package/dist/tween/src/tween.js +25 -24
- package/index.js +173 -173
- package/input-tag/InputTag.js +1 -1
- package/layout/index.js +11 -9
- package/message/index.js +1 -1
- package/notification/index.js +1 -1
- package/package.json +1 -1
- package/pagination/PageItem.js +52 -53
- package/pagination/Pagination.js +2 -1
- package/pagination/interface.js +4 -1
- package/select/Option.js +12 -11
- package/select/Select.js +1 -0
- package/statistic/index.js +16 -16
- package/style.css +1 -1
- package/switch/index.js +1 -1
- package/table/Table.js +153 -153
- package/table/tbody/Tr.js +3 -2
- package/table/thead/Column.js +3 -2
- package/table/thead/index.js +3 -2
- package/tag/index.js +24 -24
- package/time-picker/util.js +4 -4
- package/tooltip/index.js +1 -1
- package/transfer/Item.js +17 -16
- package/transfer/List.js +12 -11
- package/tree/Node.js +43 -41
- package/tree/Tree.js +215 -211
- package/trigger/index.js +1 -1
- package/types/pc/affix/index.d.ts +1 -1
- package/types/pc/alert/index.d.ts +1 -1
- package/types/pc/anchor/Anchor.d.ts +1 -1
- package/types/pc/anchor/Link.d.ts +1 -1
- package/types/pc/anchor/context.d.ts +1 -1
- package/types/pc/auto-complete/index.d.ts +1 -1
- package/types/pc/avatar/Avatar.d.ts +1 -1
- package/types/pc/avatar/Group.d.ts +1 -1
- package/types/pc/avatar/context.d.ts +1 -1
- package/types/pc/back-top/index.d.ts +1 -1
- package/types/pc/badge/index.d.ts +2 -2
- package/types/pc/badge/interface.d.ts +1 -1
- package/types/pc/breadcrumb/Item.d.ts +1 -1
- package/types/pc/breadcrumb/index.d.ts +1 -1
- package/types/pc/button/Group.d.ts +1 -1
- package/types/pc/button/index.d.ts +1 -1
- package/types/pc/calendar/Month.d.ts +1 -1
- package/types/pc/calendar/Year.d.ts +1 -1
- package/types/pc/calendar/index.d.ts +1 -1
- package/types/pc/card/Grid.d.ts +1 -1
- package/types/pc/card/Meta.d.ts +1 -1
- package/types/pc/card/index.d.ts +1 -1
- package/types/pc/carousel/Arrow.d.ts +1 -1
- package/types/pc/carousel/Indicator.d.ts +1 -1
- package/types/pc/carousel/index.d.ts +2 -2
- package/types/pc/cascader/Cascader.d.ts +1 -1
- package/types/pc/cascader/util.d.ts +1 -1
- package/types/pc/checkbox/Checkbox.d.ts +1 -1
- package/types/pc/checkbox/Group.d.ts +1 -1
- package/types/pc/checkbox/GroupBlock.d.ts +1 -1
- package/types/pc/checkbox/index.d.ts +1 -1
- package/types/pc/collapse/Collapse.d.ts +1 -1
- package/types/pc/collapse/Item.d.ts +1 -1
- package/types/pc/color-picker/InputHex.d.ts +1 -1
- package/types/pc/color-picker/InputRgb.d.ts +1 -1
- package/types/pc/color-picker/Mode.d.ts +1 -1
- package/types/pc/color-picker/Palette.d.ts +1 -1
- package/types/pc/color-picker/index.d.ts +1 -1
- package/types/pc/color-picker/utils.d.ts +1 -1
- package/types/pc/comment/index.d.ts +1 -1
- package/types/pc/config-provider/ConfigProvider.d.ts +3 -2
- package/types/pc/config-provider/context.d.ts +1 -1
- package/types/pc/config-provider/interface.d.ts +1 -1
- package/types/pc/copy/index.d.ts +1 -1
- package/types/pc/date-picker/Picker.d.ts +1 -2
- package/types/pc/date-picker/RangePicker.d.ts +1 -1
- package/types/pc/date-picker/index.d.ts +1 -1
- package/types/pc/descriptions/index.d.ts +1 -1
- package/types/pc/details/index.d.ts +1 -1
- package/types/pc/divider/index.d.ts +1 -1
- package/types/pc/draggable/Item.d.ts +1 -1
- package/types/pc/draggable/index.d.ts +1 -1
- package/types/pc/drawer/Drawer.d.ts +2 -2
- package/types/pc/dropdown/Button.d.ts +1 -1
- package/types/pc/dropdown/index.d.ts +1 -1
- package/types/pc/empty/index.d.ts +1 -1
- package/types/pc/form/Control.d.ts +1 -1
- package/types/pc/form/Form.d.ts +1 -1
- package/types/pc/form/FormLabel.d.ts +1 -1
- package/types/pc/form/FormList.d.ts +1 -1
- package/types/pc/form/FormProvider.d.ts +1 -1
- package/types/pc/form/context.d.ts +1 -1
- package/types/pc/form/hook/useForm.d.ts +1 -1
- package/types/pc/form/index.d.ts +1 -1
- package/types/pc/form/interface.d.ts +2 -2
- package/types/pc/form/store.d.ts +3 -4
- package/types/pc/form/util.d.ts +3 -3
- package/types/pc/grid/Col.d.ts +1 -1
- package/types/pc/grid/Grid.d.ts +1 -1
- package/types/pc/grid/GridItem.d.ts +1 -1
- package/types/pc/grid/Row.d.ts +1 -1
- package/types/pc/grid/context.d.ts +1 -1
- package/types/pc/grid/util.d.ts +1 -1
- package/types/pc/hooks/use-watermark/index.d.ts +1 -1
- package/types/pc/icons/file/index.d.ts +1 -1
- package/types/pc/image/Image.d.ts +1 -1
- package/types/pc/image/ImageFooter.d.ts +1 -1
- package/types/pc/image/ImagePreview.d.ts +1 -1
- package/types/pc/image/ImagePreviewGroup.d.ts +1 -1
- package/types/pc/image/ImagePreviewToolbar.d.ts +1 -1
- package/types/pc/image/index.d.ts +1 -1
- package/types/pc/image/previewGroupContext.d.ts +1 -1
- package/types/pc/input/Button.d.ts +1 -1
- package/types/pc/input/Group.d.ts +1 -1
- package/types/pc/input/Input.d.ts +1 -1
- package/types/pc/input/InputElement.d.ts +1 -1
- package/types/pc/input/Password.d.ts +1 -1
- package/types/pc/input/Search.d.ts +1 -1
- package/types/pc/input/Textarea.d.ts +1 -1
- package/types/pc/input/index.d.ts +1 -1
- package/types/pc/input/useComposition.d.ts +1 -1
- package/types/pc/input-number/index.d.ts +1 -1
- package/types/pc/input-tag/InputTag.d.ts +2 -2
- package/types/pc/input-tag/interface.d.ts +2 -2
- package/types/pc/layout/Content.d.ts +1 -1
- package/types/pc/layout/Footer.d.ts +1 -1
- package/types/pc/layout/Header.d.ts +1 -1
- package/types/pc/layout/Sider.d.ts +1 -1
- package/types/pc/layout/index.d.ts +2 -2
- package/types/pc/link/index.d.ts +1 -1
- package/types/pc/list/Item.d.ts +1 -1
- package/types/pc/list/Meta.d.ts +1 -1
- package/types/pc/list/index.d.ts +2 -2
- package/types/pc/mentions/index.d.ts +1 -1
- package/types/pc/mentions/util.d.ts +1 -1
- package/types/pc/menu/Item.d.ts +1 -1
- package/types/pc/menu/ItemGroup.d.ts +1 -1
- package/types/pc/menu/Menu.d.ts +1 -1
- package/types/pc/menu/OverflowWrap.d.ts +1 -1
- package/types/pc/menu/context.d.ts +2 -2
- package/types/pc/menu/index.d.ts +1 -1
- package/types/pc/menu/interface.d.ts +1 -1
- package/types/pc/message/index.d.ts +2 -2
- package/types/pc/message/useMessage.d.ts +1 -1
- package/types/pc/modal/Modal.d.ts +2 -2
- package/types/pc/modal/config.d.ts +1 -1
- package/types/pc/notification/index.d.ts +2 -2
- package/types/pc/notification/useNotification.d.ts +1 -1
- package/types/pc/page-header/index.d.ts +2 -2
- package/types/pc/pagination/PageItem.d.ts +2 -47
- package/types/pc/pagination/Pagination.d.ts +1 -1
- package/types/pc/pagination/interface.d.ts +47 -0
- package/types/pc/popconfirm/index.d.ts +1 -1
- package/types/pc/popover/index.d.ts +1 -1
- package/types/pc/popover/interface.d.ts +1 -1
- package/types/pc/progress/CircleProgress.d.ts +1 -1
- package/types/pc/progress/index.d.ts +1 -1
- package/types/pc/radio/Group.d.ts +1 -1
- package/types/pc/radio/GroupBlock.d.ts +1 -1
- package/types/pc/radio/Radio.d.ts +1 -1
- package/types/pc/radio/index.d.ts +1 -1
- package/types/pc/rate/index.d.ts +1 -1
- package/types/pc/resize-box/Split.d.ts +1 -1
- package/types/pc/resize-box/SplitGroup.d.ts +1 -1
- package/types/pc/resize-box/index.d.ts +1 -1
- package/types/pc/result/index.d.ts +1 -1
- package/types/pc/select/OptGroup.d.ts +1 -1
- package/types/pc/select/Option.d.ts +1 -1
- package/types/pc/select/Select.d.ts +3 -2
- package/types/pc/select/index.d.ts +1 -1
- package/types/pc/select/util.d.ts +1 -1
- package/types/pc/select-view/Core.d.ts +1 -1
- package/types/pc/select-view/index.d.ts +1 -1
- package/types/pc/skeleton/Image.d.ts +1 -1
- package/types/pc/skeleton/Text.d.ts +1 -1
- package/types/pc/skeleton/index.d.ts +1 -1
- package/types/pc/slider/Button.d.ts +1 -1
- package/types/pc/slider/hook/useInterval.d.ts +1 -1
- package/types/pc/slider/index.d.ts +1 -1
- package/types/pc/space/index.d.ts +1 -1
- package/types/pc/space-/index.d.ts +1 -1
- package/types/pc/spin/index.d.ts +1 -1
- package/types/pc/statistic/Countdown.d.ts +1 -1
- package/types/pc/statistic/index.d.ts +2 -2
- package/types/pc/steps/Step.d.ts +1 -1
- package/types/pc/steps/index.d.ts +1 -1
- package/types/pc/switch/index.d.ts +2 -2
- package/types/pc/table/ColGroup.d.ts +1 -1
- package/types/pc/table/Table.d.ts +1 -1
- package/types/pc/table/constant.d.ts +1 -1
- package/types/pc/table/interface.d.ts +1 -1
- package/types/pc/table/util.d.ts +1 -1
- package/types/pc/tabs/Tab.d.ts +1 -1
- package/types/pc/tabs/TabPane.d.ts +1 -1
- package/types/pc/tabs/index.d.ts +1 -1
- package/types/pc/tabs/tab-header/TabNavIcon.d.ts +1 -1
- package/types/pc/tabs/tab-header/index.d.ts +1 -1
- package/types/pc/tag/index.d.ts +1 -1
- package/types/pc/time-picker/Picker.d.ts +1 -1
- package/types/pc/time-picker/RangePicker.d.ts +1 -1
- package/types/pc/time-picker/TimePicker.d.ts +1 -1
- package/types/pc/time-picker/index.d.ts +1 -1
- package/types/pc/timeline/Item.d.ts +1 -1
- package/types/pc/timeline/Timeline.d.ts +1 -1
- package/types/pc/timeline/index.d.ts +1 -1
- package/types/pc/tooltip/index.d.ts +2 -2
- package/types/pc/transfer/Item.d.ts +1 -1
- package/types/pc/transfer/List.d.ts +1 -1
- package/types/pc/transfer/index.d.ts +1 -1
- package/types/pc/tree/Animation.d.ts +1 -1
- package/types/pc/tree/Context.d.ts +1 -1
- package/types/pc/tree/Node.d.ts +1 -1
- package/types/pc/tree/Tree.d.ts +1 -1
- package/types/pc/tree/index.d.ts +2 -2
- package/types/pc/tree/interface.d.ts +19 -3
- package/types/pc/tree/util.d.ts +1 -1
- package/types/pc/tree-select/List.d.ts +1 -1
- package/types/pc/trigger/getPopupStyle.d.ts +1 -1
- package/types/pc/trigger/index.d.ts +2 -2
- package/types/pc/typography/EditContent.d.ts +1 -1
- package/types/pc/typography/Ellipsis.d.ts +1 -1
- package/types/pc/typography/Operations.d.ts +1 -1
- package/types/pc/typography/Paragraph.d.ts +1 -1
- package/types/pc/typography/Title.d.ts +1 -1
- package/types/pc/typography/Typography.d.ts +1 -1
- package/types/pc/typography/useCssEllipsis.d.ts +1 -1
- package/types/pc/typography/useEllipsis.d.ts +1 -1
- package/types/pc/upload/TriggerNode.d.ts +1 -1
- package/types/pc/upload/Upload.d.ts +2 -2
- package/types/pc/upload/Uploader.d.ts +1 -1
- package/types/pc/upload/request.d.ts +1 -1
- package/types/pc/upload/util.d.ts +1 -1
- package/types/pc/verification-code/VerificationCode.d.ts +1 -1
- package/types/pc/verification-code/index.d.ts +1 -1
- package/types/pc/watermark/Watermark.d.ts +1 -1
- package/types/pc/watermark/index.d.ts +2 -2
- package/typography/Ellipsis.js +7 -5
- package/upload/list/index.js +1 -1
- package/utils/color.js +1 -1
- package/utils/index.js +2 -2
- package/utils/reactTransitionGroup.js +1 -1
- package/utils/tinycolor.js +1 -1
- package/version/index.js +1 -1
- /package/dist/react-transition-group/chunk/{CPfP7aNL.js → C6QwjD4L.js} +0 -0
package/table/tbody/Tr.js
CHANGED
|
@@ -5,6 +5,7 @@ import ve from "@unicom-cloud/icons/IconUiPlus";
|
|
|
5
5
|
import Ie from "lodash/isArray";
|
|
6
6
|
import Se from "lodash/isString";
|
|
7
7
|
import Ke from "../../checkbox/Checkbox.js";
|
|
8
|
+
import "../../checkbox/Group.js";
|
|
8
9
|
import "../../config-provider/ConfigProvider.js";
|
|
9
10
|
import Pe from "../../radio/Radio.js";
|
|
10
11
|
import "../../radio/Group.js";
|
|
@@ -159,7 +160,7 @@ function ze(I, V) {
|
|
|
159
160
|
);
|
|
160
161
|
}));
|
|
161
162
|
}
|
|
162
|
-
const
|
|
163
|
+
const cn = ge(ze);
|
|
163
164
|
export {
|
|
164
|
-
|
|
165
|
+
cn as default
|
|
165
166
|
};
|
package/table/thead/Column.js
CHANGED
|
@@ -9,6 +9,7 @@ import E from "lodash/isPlainObject";
|
|
|
9
9
|
import De from "lodash/isString";
|
|
10
10
|
import H from "../../button/index.js";
|
|
11
11
|
import Pe from "../../checkbox/Checkbox.js";
|
|
12
|
+
import "../../checkbox/Group.js";
|
|
12
13
|
import "../../config-provider/ConfigProvider.js";
|
|
13
14
|
import ke from "../../components/common/hooks/useMergeValue.js";
|
|
14
15
|
import we from "../../radio/Radio.js";
|
|
@@ -22,7 +23,7 @@ function Ue(x, i) {
|
|
|
22
23
|
return x === "ascend" ? i == null ? void 0 : i.Table.sortAscend : x === "descend" ? i == null ? void 0 : i.Table.sortDescend : i == null ? void 0 : i.Table.cancelSort;
|
|
23
24
|
}
|
|
24
25
|
const je = { bottom: 0 };
|
|
25
|
-
function
|
|
26
|
+
function st(x) {
|
|
26
27
|
const {
|
|
27
28
|
onSort: i,
|
|
28
29
|
onFilter: O,
|
|
@@ -247,5 +248,5 @@ function ot(x) {
|
|
|
247
248
|
);
|
|
248
249
|
}
|
|
249
250
|
export {
|
|
250
|
-
|
|
251
|
+
st as default
|
|
251
252
|
};
|
package/table/thead/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as c, jsxs as re } from "react/jsx-runtime";
|
|
2
2
|
import ne, { useContext as ie, useMemo as oe, createElement as L } from "react";
|
|
3
3
|
import ae from "../../checkbox/Checkbox.js";
|
|
4
|
+
import "../../checkbox/Group.js";
|
|
4
5
|
import "../../config-provider/ConfigProvider.js";
|
|
5
6
|
import { INTERNAL_SELECTION_KEY as le, INTERNAL_EXPAND_KEY as de } from "../constant.js";
|
|
6
7
|
import ce from "../hook/useComponent.js";
|
|
7
8
|
import p from "@unicom-cloud/utils/class-name";
|
|
8
9
|
import pe from "./Column.js";
|
|
9
10
|
import he from "../../config-provider/context.js";
|
|
10
|
-
function
|
|
11
|
+
function Re(R) {
|
|
11
12
|
const {
|
|
12
13
|
activeSorters: j,
|
|
13
14
|
expandedRowRender: Y,
|
|
@@ -125,5 +126,5 @@ function we(R) {
|
|
|
125
126
|
}) });
|
|
126
127
|
}
|
|
127
128
|
export {
|
|
128
|
-
|
|
129
|
+
Re as default
|
|
129
130
|
};
|
package/tag/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as s, jsxs as _, Fragment as J } from "react/jsx-runtime";
|
|
2
2
|
import Q from "@unicom-cloud/icons/IconUiClose";
|
|
3
3
|
import W from "@unicom-cloud/icons/IconUiLoading";
|
|
4
|
-
import
|
|
5
|
-
import { forwardRef as X, useContext as Y, useState as
|
|
4
|
+
import N from "lodash/isPlainObject";
|
|
5
|
+
import { forwardRef as X, useContext as Y, useState as b } from "react";
|
|
6
6
|
import "../config-provider/ConfigProvider.js";
|
|
7
7
|
import Z from "../components/common/hooks/useKeyboardEvent.js";
|
|
8
8
|
import S from "../components/common/hooks/useMergeProps.js";
|
|
@@ -20,7 +20,7 @@ const te = [
|
|
|
20
20
|
"green",
|
|
21
21
|
"cyan",
|
|
22
22
|
"blue",
|
|
23
|
-
"
|
|
23
|
+
"primary",
|
|
24
24
|
"purple",
|
|
25
25
|
"magenta",
|
|
26
26
|
"gray"
|
|
@@ -29,31 +29,31 @@ const te = [
|
|
|
29
29
|
};
|
|
30
30
|
function se(j, z) {
|
|
31
31
|
var T;
|
|
32
|
-
const { getPrefixCls: d, componentConfig:
|
|
32
|
+
const { getPrefixCls: d, componentConfig: p, rtl: H } = Y(re), L = Z(), r = S(
|
|
33
33
|
j,
|
|
34
34
|
ce,
|
|
35
|
-
|
|
35
|
+
p == null ? void 0 : p.Tag
|
|
36
36
|
), {
|
|
37
37
|
className: w,
|
|
38
38
|
style: K,
|
|
39
39
|
children: x,
|
|
40
40
|
color: t,
|
|
41
41
|
closable: e,
|
|
42
|
-
checkable:
|
|
42
|
+
checkable: l,
|
|
43
43
|
defaultChecked: R,
|
|
44
44
|
size: I,
|
|
45
45
|
onClose: f,
|
|
46
46
|
onCheck: h,
|
|
47
47
|
icon: O,
|
|
48
|
-
closeIcon:
|
|
48
|
+
closeIcon: g,
|
|
49
49
|
bordered: U,
|
|
50
50
|
__closeIconProps: V,
|
|
51
|
-
...
|
|
52
|
-
} = r, o = d == null ? void 0 : d("tag"), [
|
|
51
|
+
...F
|
|
52
|
+
} = r, o = d == null ? void 0 : d("tag"), [M, P] = b(
|
|
53
53
|
"visible" in r ? r.visible : !0
|
|
54
|
-
), [
|
|
54
|
+
), [q, A] = b(
|
|
55
55
|
"checked" in r ? r.checked : R
|
|
56
|
-
), [
|
|
56
|
+
), [u, k] = b(), y = "checked" in r ? r.checked : q, B = "visible" in r ? r.visible : M;
|
|
57
57
|
function C(n) {
|
|
58
58
|
const i = f == null ? void 0 : f(n);
|
|
59
59
|
i && i.then ? (k(!0), i.then(() => {
|
|
@@ -66,13 +66,13 @@ function se(j, z) {
|
|
|
66
66
|
const n = !y;
|
|
67
67
|
"checked" in r || A(n), h == null || h(n);
|
|
68
68
|
}
|
|
69
|
-
const m = t && te.indexOf(t) !== -1 ? t : "", $ =
|
|
69
|
+
const m = t && te.indexOf(t) !== -1 ? t : "", $ = l ? y : !0, G = ne(
|
|
70
70
|
o,
|
|
71
71
|
{
|
|
72
|
-
[`${o}-loading`]:
|
|
72
|
+
[`${o}-loading`]: u,
|
|
73
73
|
[`${o}-hide`]: !B,
|
|
74
74
|
[`${o}-${m}`]: m,
|
|
75
|
-
[`${o}-checkable`]:
|
|
75
|
+
[`${o}-checkable`]: l,
|
|
76
76
|
[`${o}-checked`]: $,
|
|
77
77
|
[`${o}-size-${I}`]: I,
|
|
78
78
|
[`${o}-bordered`]: U,
|
|
@@ -84,29 +84,29 @@ function se(j, z) {
|
|
|
84
84
|
...K
|
|
85
85
|
};
|
|
86
86
|
t && !m && $ && (c.backgroundColor || (c.backgroundColor = t), c.borderColor || (c.borderColor = t));
|
|
87
|
-
const E = ie(
|
|
88
|
-
|
|
89
|
-
let
|
|
87
|
+
const E = ie(F, ["visible"]);
|
|
88
|
+
l && (E.onClick = D);
|
|
89
|
+
let v = /* @__PURE__ */ s(
|
|
90
90
|
ee,
|
|
91
91
|
{
|
|
92
92
|
prefix: o,
|
|
93
93
|
className: `${o}-close-btn`,
|
|
94
94
|
onClick: (n) => {
|
|
95
|
-
|
|
95
|
+
N(e == null ? void 0 : e.popconfirm) || C(n);
|
|
96
96
|
},
|
|
97
97
|
role: "button",
|
|
98
98
|
tabIndex: 0,
|
|
99
99
|
...L({
|
|
100
100
|
onPressEnter(n) {
|
|
101
|
-
|
|
101
|
+
N(e == null ? void 0 : e.popconfirm) || C(n);
|
|
102
102
|
}
|
|
103
103
|
}),
|
|
104
104
|
"aria-label": "Close",
|
|
105
105
|
...V,
|
|
106
|
-
children:
|
|
106
|
+
children: g !== void 0 ? g : /* @__PURE__ */ s(Q, {})
|
|
107
107
|
}
|
|
108
108
|
);
|
|
109
|
-
return
|
|
109
|
+
return N(e == null ? void 0 : e.popconfirm) && (v = /* @__PURE__ */ s(
|
|
110
110
|
oe,
|
|
111
111
|
{
|
|
112
112
|
...e == null ? void 0 : e.popconfirm,
|
|
@@ -122,13 +122,13 @@ function se(j, z) {
|
|
|
122
122
|
var i, a;
|
|
123
123
|
C(n), (a = (i = e == null ? void 0 : e.popconfirm) == null ? void 0 : i.onOk) == null || a.call(i, n);
|
|
124
124
|
},
|
|
125
|
-
children:
|
|
125
|
+
children: v
|
|
126
126
|
}
|
|
127
127
|
)), /* @__PURE__ */ _("div", { ref: z, style: c, className: G, ...E, children: [
|
|
128
128
|
O && /* @__PURE__ */ s("span", { className: `${o}-icon`, children: O }),
|
|
129
129
|
/* @__PURE__ */ s("span", { className: `${o}-content`, children: x }),
|
|
130
|
-
!!e && !
|
|
131
|
-
|
|
130
|
+
!!e && !u && g !== null && v,
|
|
131
|
+
u && /* @__PURE__ */ s("span", { className: `${o}-loading-icon`, children: /* @__PURE__ */ s(W, {}) })
|
|
132
132
|
] });
|
|
133
133
|
}
|
|
134
134
|
const ae = X(se);
|
package/time-picker/util.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Tween as i } from "../dist/tween/src/tween.js";
|
|
|
2
2
|
import { quartInOut as l } from "../dist/tween/src/easing.js";
|
|
3
3
|
import { isDayjs as m } from "dayjs";
|
|
4
4
|
import { dayjs as f, methods as e } from "../components/common/utils/dayjs.js";
|
|
5
|
-
function
|
|
5
|
+
function h(o) {
|
|
6
6
|
const t = ["H", "h", "m", "s", "a", "A"], s = [];
|
|
7
7
|
let a = !1;
|
|
8
8
|
return t.forEach((r) => {
|
|
@@ -13,7 +13,7 @@ function y(o) {
|
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
const c = /* @__PURE__ */ new Map();
|
|
16
|
-
function
|
|
16
|
+
function y(o, t, s) {
|
|
17
17
|
c.get(o) && cancelAnimationFrame(c.get(o)), s <= 0 && (o.scrollTop = t), c.set(
|
|
18
18
|
o,
|
|
19
19
|
requestAnimationFrame(() => {
|
|
@@ -38,7 +38,7 @@ function g(o) {
|
|
|
38
38
|
return o;
|
|
39
39
|
}
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
h as getColumnsFromFormat,
|
|
42
42
|
g as getFormatTime,
|
|
43
|
-
|
|
43
|
+
y as scrollTo
|
|
44
44
|
};
|
package/tooltip/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import "../dist/tinycolor/chunk/
|
|
2
|
+
import "../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
3
3
|
import { TinyColor as I } from "../dist/tinycolor/src/index.js";
|
|
4
4
|
import S from "lodash/isFunction";
|
|
5
5
|
import { forwardRef as j, useContext as z, useRef as B, useImperativeHandle as W, useMemo as q } from "react";
|
package/transfer/Item.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { jsxs as I, jsx as
|
|
1
|
+
import { jsxs as I, jsx as r, Fragment as F } from "react/jsx-runtime";
|
|
2
2
|
import H from "@unicom-cloud/icons/IconUiClose";
|
|
3
3
|
import V from "@unicom-cloud/icons/IconUiDragDotVertical";
|
|
4
4
|
import { useRef as P, useState as h, useEffect as T } from "react";
|
|
5
5
|
import q from "../checkbox/Checkbox.js";
|
|
6
|
+
import "../checkbox/Group.js";
|
|
6
7
|
import z from "../components/common/hooks/useKeyboardEvent.js";
|
|
7
8
|
import A from "../icon-hover/index.js";
|
|
8
9
|
import G from "@unicom-cloud/utils/class-name";
|
|
9
|
-
function
|
|
10
|
+
function oe(w) {
|
|
10
11
|
const {
|
|
11
12
|
className: E,
|
|
12
13
|
prefixCls: O,
|
|
@@ -20,16 +21,16 @@ function te(w) {
|
|
|
20
21
|
onItemSelect: j,
|
|
21
22
|
onItemRemove: C,
|
|
22
23
|
onDragStart: d,
|
|
23
|
-
onDragEnd:
|
|
24
|
-
onDragLeave:
|
|
24
|
+
onDragEnd: m,
|
|
25
|
+
onDragLeave: g,
|
|
25
26
|
onDragOver: p,
|
|
26
27
|
onDrop: f
|
|
27
|
-
} = w, U = z(), o = `${O}-view-item`, y = P(null), u = P(null), [
|
|
28
|
+
} = w, U = z(), o = `${O}-view-item`, y = P(null), u = P(null), [a, n] = h("none"), [D, s] = h(!1), [b, N] = h(0), i = K || t.disabled, k = v && !i, Y = S.indexOf(t.key) > -1, x = $ ? $(t) : t.value;
|
|
28
29
|
return T(() => () => {
|
|
29
30
|
u.current && clearTimeout(u.current);
|
|
30
31
|
}, []), T(() => {
|
|
31
|
-
|
|
32
|
-
}, [
|
|
32
|
+
a === "dragged" && (u.current = setTimeout(() => n("none"), 1e3));
|
|
33
|
+
}, [a]), /* @__PURE__ */ I(
|
|
33
34
|
"li",
|
|
34
35
|
{
|
|
35
36
|
ref: y,
|
|
@@ -40,7 +41,7 @@ function te(w) {
|
|
|
40
41
|
[`${o}-draggable`]: k,
|
|
41
42
|
[`${o}-gap-top`]: D && b < 0,
|
|
42
43
|
[`${o}-gap-bottom`]: D && b > 0,
|
|
43
|
-
[`${o}-${
|
|
44
|
+
[`${o}-${a}`]: a !== "none"
|
|
44
45
|
},
|
|
45
46
|
E
|
|
46
47
|
),
|
|
@@ -54,7 +55,7 @@ function te(w) {
|
|
|
54
55
|
}
|
|
55
56
|
},
|
|
56
57
|
onDragEnd: (e) => {
|
|
57
|
-
e.stopPropagation(), s(!1), n("dragged"),
|
|
58
|
+
e.stopPropagation(), s(!1), n("dragged"), m == null || m(e, t);
|
|
58
59
|
},
|
|
59
60
|
onDragOver: (e) => {
|
|
60
61
|
if (l) {
|
|
@@ -64,16 +65,16 @@ function te(w) {
|
|
|
64
65
|
}
|
|
65
66
|
},
|
|
66
67
|
onDragLeave: (e) => {
|
|
67
|
-
l && (e.stopPropagation(), s(!1),
|
|
68
|
+
l && (e.stopPropagation(), s(!1), g == null || g(e, t));
|
|
68
69
|
},
|
|
69
70
|
onDrop: (e) => {
|
|
70
71
|
l && (e.stopPropagation(), e.preventDefault(), s(!1), N(0), n("none"), f == null || f(e, t, b));
|
|
71
72
|
},
|
|
72
73
|
children: [
|
|
73
|
-
v ? /* @__PURE__ */
|
|
74
|
+
v ? /* @__PURE__ */ r(V, { className: `${o}-icon-drag` }) : null,
|
|
74
75
|
R ? /* @__PURE__ */ I(F, { children: [
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
!i && /* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ r("span", { className: `${o}-content`, children: x }),
|
|
77
|
+
!i && /* @__PURE__ */ r(
|
|
77
78
|
A,
|
|
78
79
|
{
|
|
79
80
|
className: `${o}-icon-remove`,
|
|
@@ -83,10 +84,10 @@ function te(w) {
|
|
|
83
84
|
...U({
|
|
84
85
|
onPressEnter: () => C(t.key)
|
|
85
86
|
}),
|
|
86
|
-
children: /* @__PURE__ */
|
|
87
|
+
children: /* @__PURE__ */ r(H, {})
|
|
87
88
|
}
|
|
88
89
|
)
|
|
89
|
-
] }) : /* @__PURE__ */
|
|
90
|
+
] }) : /* @__PURE__ */ r(
|
|
90
91
|
q,
|
|
91
92
|
{
|
|
92
93
|
className: `${o}-content`,
|
|
@@ -102,5 +103,5 @@ function te(w) {
|
|
|
102
103
|
);
|
|
103
104
|
}
|
|
104
105
|
export {
|
|
105
|
-
|
|
106
|
+
oe as default
|
|
106
107
|
};
|
package/transfer/List.js
CHANGED
|
@@ -2,9 +2,10 @@ import { jsx as r, jsxs as L, Fragment as z } from "react/jsx-runtime";
|
|
|
2
2
|
import ae from "@unicom-cloud/icons/IconUiDelete";
|
|
3
3
|
import ce from "@unicom-cloud/icons/IconUiSearch";
|
|
4
4
|
import B from "lodash/isPlainObject";
|
|
5
|
-
import ie, { useContext as
|
|
5
|
+
import ie, { useContext as me, useState as O, useEffect as de } from "react";
|
|
6
6
|
import fe from "../button/index.js";
|
|
7
7
|
import A from "../checkbox/Checkbox.js";
|
|
8
|
+
import "../checkbox/Group.js";
|
|
8
9
|
import "../config-provider/ConfigProvider.js";
|
|
9
10
|
import he from "../components/common/hooks/useKeyboardEvent.js";
|
|
10
11
|
import pe from "../icon-hover/index.js";
|
|
@@ -19,7 +20,7 @@ const be = (q, G) => {
|
|
|
19
20
|
prefixCls: P,
|
|
20
21
|
className: Q,
|
|
21
22
|
listType: V,
|
|
22
|
-
dataSource:
|
|
23
|
+
dataSource: d,
|
|
23
24
|
selectedKeys: a = [],
|
|
24
25
|
validKeys: f,
|
|
25
26
|
selectedDisabledKeys: g,
|
|
@@ -45,12 +46,12 @@ const be = (q, G) => {
|
|
|
45
46
|
onDragLeave: R,
|
|
46
47
|
onDragOver: $,
|
|
47
48
|
onDrop: S
|
|
48
|
-
} = q, l = `${P}-view`, { locale: w } =
|
|
49
|
-
|
|
49
|
+
} = q, l = `${P}-view`, { locale: w } = me(xe), [p, F] = O(null), [u, te] = O(""), [C, ne] = O(d);
|
|
50
|
+
de(() => {
|
|
50
51
|
ne(
|
|
51
|
-
u ?
|
|
52
|
+
u ? d.filter((n) => E(u, n)) : d
|
|
52
53
|
);
|
|
53
|
-
}, [
|
|
54
|
+
}, [d, u, E]);
|
|
54
55
|
const H = (n, s) => N(
|
|
55
56
|
s ? a.concat(n) : a.filter((e) => e !== n)
|
|
56
57
|
), oe = (n, s) => N(
|
|
@@ -72,14 +73,14 @@ const be = (q, G) => {
|
|
|
72
73
|
}
|
|
73
74
|
), re = () => {
|
|
74
75
|
const n = a.length, s = C.length, e = u ? f.filter(
|
|
75
|
-
(
|
|
76
|
+
(m) => C.find(({ key: le }) => le === m)
|
|
76
77
|
) : f, t = e.filter(
|
|
77
|
-
(
|
|
78
|
+
(m) => a.indexOf(m) > -1
|
|
78
79
|
).length, o = {
|
|
79
80
|
disabled: i,
|
|
80
81
|
checked: t > 0 && t === e.length,
|
|
81
82
|
indeterminate: t > 0 && t < e.length,
|
|
82
|
-
onChange: (
|
|
83
|
+
onChange: (m) => oe(e, m)
|
|
83
84
|
};
|
|
84
85
|
if (typeof h == "function")
|
|
85
86
|
return h({
|
|
@@ -181,8 +182,8 @@ const be = (q, G) => {
|
|
|
181
182
|
c && /* @__PURE__ */ r("div", { className: `${l}-search`, children: U }),
|
|
182
183
|
se()
|
|
183
184
|
] });
|
|
184
|
-
},
|
|
185
|
+
}, Fe = ie.forwardRef(be);
|
|
185
186
|
export {
|
|
186
187
|
be as TransferList,
|
|
187
|
-
|
|
188
|
+
Fe as default
|
|
188
189
|
};
|
package/tree/Node.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { jsxs as w, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { jsxs as w, Fragment as z, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import G from "@unicom-cloud/icons/IconUiCaretDown";
|
|
3
|
+
import J from "@unicom-cloud/icons/IconUiDragDotVertical";
|
|
4
|
+
import K from "@unicom-cloud/icons/IconUiFile";
|
|
5
|
+
import Q from "@unicom-cloud/icons/IconUiLoading";
|
|
6
6
|
import m from "lodash/isFunction";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import W, { forwardRef as X, useContext as _, useRef as Z, useState as ee, useCallback as I } from "react";
|
|
8
|
+
import ne from "../checkbox/Checkbox.js";
|
|
9
|
+
import "../checkbox/Group.js";
|
|
9
10
|
import "../config-provider/ConfigProvider.js";
|
|
10
|
-
import
|
|
11
|
+
import ae from "../icon-hover/index.js";
|
|
11
12
|
import b from "@unicom-cloud/utils/class-name";
|
|
12
|
-
import { throttleByRaf as
|
|
13
|
-
import
|
|
14
|
-
import { TreeContext as
|
|
15
|
-
import
|
|
16
|
-
function
|
|
17
|
-
const n = _(
|
|
13
|
+
import { throttleByRaf as ie } from "../components/common/utils/throttleByRaf.js";
|
|
14
|
+
import oe from "./Animation.js";
|
|
15
|
+
import { TreeContext as te } from "./Context.js";
|
|
16
|
+
import re from "../config-provider/context.js";
|
|
17
|
+
function se(i, U) {
|
|
18
|
+
const n = _(te), { getPrefixCls: $ } = _(re), p = Z(), [t, f] = ee({
|
|
18
19
|
isAllowDrop: !0,
|
|
19
20
|
isDragOver: !1,
|
|
20
21
|
dragPosition: 0,
|
|
@@ -22,7 +23,7 @@ function re(i, U) {
|
|
|
22
23
|
}), {
|
|
23
24
|
_key: h = "",
|
|
24
25
|
title: Y,
|
|
25
|
-
icon:
|
|
26
|
+
icon: x,
|
|
26
27
|
checkable: O,
|
|
27
28
|
selected: F,
|
|
28
29
|
disabled: N,
|
|
@@ -59,12 +60,12 @@ function re(i, U) {
|
|
|
59
60
|
e || (!((s = i.childrenData) != null && s.length) && m(n.loadMore) && !a ? await n.loadMore(i) : y(!a));
|
|
60
61
|
}, [i, y, n.loadMore]), B = () => {
|
|
61
62
|
if (M)
|
|
62
|
-
return "loadingIcon" in c ? c.loadingIcon : /* @__PURE__ */ r(
|
|
63
|
+
return "loadingIcon" in c ? c.loadingIcon : /* @__PURE__ */ r(Q, {});
|
|
63
64
|
let e = null, a = !1;
|
|
64
65
|
if (P)
|
|
65
|
-
v && (e = "switcherIcon" in c ? c.switcherIcon : /* @__PURE__ */ r(
|
|
66
|
+
v && (e = "switcherIcon" in c ? c.switcherIcon : /* @__PURE__ */ r(K, {}), a = !0);
|
|
66
67
|
else {
|
|
67
|
-
const s = v ? /* @__PURE__ */ r("span", { className: `${o}-${d ? "minus" : "plus"}-icon` }) : /* @__PURE__ */ r(
|
|
68
|
+
const s = v ? /* @__PURE__ */ r("span", { className: `${o}-${d ? "minus" : "plus"}-icon` }) : /* @__PURE__ */ r(G, {});
|
|
68
69
|
e = "switcherIcon" in c ? c.switcherIcon : s, a = !v;
|
|
69
70
|
}
|
|
70
71
|
if (e)
|
|
@@ -78,29 +79,36 @@ function re(i, U) {
|
|
|
78
79
|
onClick: A,
|
|
79
80
|
children: e
|
|
80
81
|
}
|
|
81
|
-
), a ? /* @__PURE__ */ r(
|
|
82
|
+
), a ? /* @__PURE__ */ r(ae, { prefix: o, children: e }) : e;
|
|
82
83
|
}, u = I(
|
|
83
|
-
|
|
84
|
+
ie((e) => {
|
|
84
85
|
var R;
|
|
85
|
-
const a =
|
|
86
|
+
const a = p.current;
|
|
86
87
|
if (!a)
|
|
87
88
|
return;
|
|
88
|
-
const s = a.getBoundingClientRect(), g = window.pageYOffset + s.top, D = e.pageY,
|
|
89
|
+
const s = a.getBoundingClientRect(), g = window.pageYOffset + s.top, D = e.pageY, E = s.height / 4, L = D - g, k = L < E ? -1 : L < s.height - E ? 0 : 1, q = n.allowDrop(i, k);
|
|
89
90
|
f({
|
|
90
91
|
...t,
|
|
91
|
-
isAllowDrop:
|
|
92
|
+
isAllowDrop: q,
|
|
92
93
|
isDragOver: !0,
|
|
93
94
|
dragPosition: k
|
|
94
95
|
}), (R = n.onNodeDragOver) == null || R.call(n, e, i, k);
|
|
95
96
|
}),
|
|
96
97
|
[n.onNodeDragOver]
|
|
97
98
|
);
|
|
98
|
-
function
|
|
99
|
+
function C(e, a) {
|
|
99
100
|
var D;
|
|
100
101
|
const { disableCheckbox: s, disabled: g } = i;
|
|
101
102
|
s || g || (D = n.onCheck) == null || D.call(n, e, h, a);
|
|
102
103
|
}
|
|
103
|
-
|
|
104
|
+
function V(e) {
|
|
105
|
+
const { onSelect: a, actionOnClick: s } = n;
|
|
106
|
+
if (i.disabled)
|
|
107
|
+
return;
|
|
108
|
+
const g = [].concat(s);
|
|
109
|
+
T && g.indexOf("select") > -1 && (a == null || a(h, e)), g.indexOf("expand") > -1 && A(), O && g.indexOf("check") > -1 && C(!i.checked, e);
|
|
110
|
+
}
|
|
111
|
+
return /* @__PURE__ */ w(z, { children: [
|
|
104
112
|
/* @__PURE__ */ w(
|
|
105
113
|
"div",
|
|
106
114
|
{
|
|
@@ -131,20 +139,20 @@ function re(i, U) {
|
|
|
131
139
|
}
|
|
132
140
|
),
|
|
133
141
|
O ? /* @__PURE__ */ r(
|
|
134
|
-
|
|
142
|
+
ne,
|
|
135
143
|
{
|
|
136
144
|
disabled: H || N,
|
|
137
145
|
value: h,
|
|
138
146
|
indeterminate: i.indeterminated,
|
|
139
147
|
checked: i.checked,
|
|
140
|
-
onChange:
|
|
148
|
+
onChange: C
|
|
141
149
|
}
|
|
142
150
|
) : null,
|
|
143
151
|
/* @__PURE__ */ w(
|
|
144
152
|
"span",
|
|
145
153
|
{
|
|
146
154
|
"aria-grabbed": t.isDragging,
|
|
147
|
-
ref:
|
|
155
|
+
ref: p,
|
|
148
156
|
className: b(`${o}-title`, {
|
|
149
157
|
[`${o}-title-draggable`]: l,
|
|
150
158
|
[`${o}-title-gap-top`]: t.isDragOver && t.isAllowDrop && t.dragPosition < 0,
|
|
@@ -153,13 +161,7 @@ function re(i, U) {
|
|
|
153
161
|
[`${o}-title-dragging`]: t.isDragging,
|
|
154
162
|
[`${o}-title-block`]: i.blockNode
|
|
155
163
|
}),
|
|
156
|
-
onClick:
|
|
157
|
-
const { onSelect: a, actionOnClick: s } = n;
|
|
158
|
-
if (!i.disabled) {
|
|
159
|
-
const g = [].concat(s);
|
|
160
|
-
T && g.indexOf("select") > -1 && (a == null || a(h, e)), g.indexOf("expand") > -1 && A(), O && g.indexOf("check") > -1 && E(!i.checked, e);
|
|
161
|
-
}
|
|
162
|
-
},
|
|
164
|
+
onClick: V,
|
|
163
165
|
draggable: l,
|
|
164
166
|
onDrop: (e) => {
|
|
165
167
|
var a;
|
|
@@ -193,9 +195,9 @@ function re(i, U) {
|
|
|
193
195
|
l && (e.stopPropagation(), u.cancel(), f({ ...t, isDragOver: !1 }), (a = n.onNodeDragLeave) == null || a.call(n, e, i));
|
|
194
196
|
},
|
|
195
197
|
children: [
|
|
196
|
-
|
|
198
|
+
x && /* @__PURE__ */ r("span", { className: `${o}-icon ${o}-custom-icon`, children: x }),
|
|
197
199
|
/* @__PURE__ */ r("span", { className: `${o}-title-text`, children: m(n.renderTitle) ? n.renderTitle(i) : Y }),
|
|
198
|
-
l && /* @__PURE__ */ r("span", { className: `${o}-icon ${o}-drag-icon`, children: "dragIcon" in c ? c.dragIcon : /* @__PURE__ */ r(
|
|
200
|
+
l && /* @__PURE__ */ r("span", { className: `${o}-icon ${o}-drag-icon`, children: "dragIcon" in c ? c.dragIcon : /* @__PURE__ */ r(J, {}) })
|
|
199
201
|
]
|
|
200
202
|
}
|
|
201
203
|
),
|
|
@@ -203,12 +205,12 @@ function re(i, U) {
|
|
|
203
205
|
]
|
|
204
206
|
}
|
|
205
207
|
),
|
|
206
|
-
n.animation && /* @__PURE__ */ r(
|
|
208
|
+
n.animation && /* @__PURE__ */ r(oe, { ...i })
|
|
207
209
|
] });
|
|
208
210
|
}
|
|
209
|
-
const S =
|
|
211
|
+
const S = X(se);
|
|
210
212
|
S.displayName = "TreeNode";
|
|
211
|
-
const
|
|
213
|
+
const pe = W.memo(S);
|
|
212
214
|
export {
|
|
213
|
-
|
|
215
|
+
pe as default
|
|
214
216
|
};
|