@unicom-cloud/ui 0.8.93 → 0.8.94
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/cascader/panel/Option.js +7 -6
- package/cascader/panel/Search.js +17 -16
- package/checkbox/index.js +7 -6
- package/color-picker/Mode.js +7 -6
- package/index.js +171 -171
- package/layout/index.js +11 -9
- 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/table/tbody/Tr.js +3 -2
- package/table/thead/Column.js +3 -2
- package/table/thead/index.js +3 -2
- 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/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/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 +1 -1
- 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 +3 -2
- package/version/index.js +1 -1
package/layout/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as x } from "react/jsx-runtime";
|
|
2
2
|
import p from "lodash/get";
|
|
3
|
-
import u, { forwardRef as
|
|
3
|
+
import u, { forwardRef as _, useContext as g, useState as F } from "react";
|
|
4
4
|
import "../config-provider/ConfigProvider.js";
|
|
5
5
|
import H from "../components/common/hooks/useMergeProps.js";
|
|
6
6
|
import R from "@unicom-cloud/utils/class-name";
|
|
@@ -8,28 +8,29 @@ import h from "./Content.js";
|
|
|
8
8
|
import w from "./Footer.js";
|
|
9
9
|
import M from "./Header.js";
|
|
10
10
|
import $ from "./Sider.js";
|
|
11
|
+
import { SiderContext as K } from "./Sider.js";
|
|
11
12
|
import b from "../config-provider/context.js";
|
|
12
|
-
function j(f,
|
|
13
|
-
const { getPrefixCls: e, componentConfig: r } =
|
|
13
|
+
function j(f, d) {
|
|
14
|
+
const { getPrefixCls: e, componentConfig: r } = g(b), c = H(
|
|
14
15
|
f,
|
|
15
16
|
{},
|
|
16
17
|
r == null ? void 0 : r.Layout
|
|
17
|
-
), { className: y, hasSider: a, children: l, ...C } =
|
|
18
|
+
), { className: y, hasSider: a, children: l, ...C } = c, [n, m] = F([]), i = e == null ? void 0 : e("layout"), S = R(
|
|
18
19
|
i,
|
|
19
20
|
{
|
|
20
21
|
[`${i}-has-sider`]: typeof a == "boolean" ? a : n.length > 0
|
|
21
22
|
},
|
|
22
23
|
y
|
|
23
24
|
);
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
const
|
|
26
|
-
return o &&
|
|
25
|
+
return /* @__PURE__ */ x("section", { ref: d, ...C, className: S, children: u.Children.map(l, (o) => {
|
|
26
|
+
const L = p(o, "type.__PQB_SIGN__") || p(o, "props.sign");
|
|
27
|
+
return o && L === "sider" ? u.cloneElement(o, {
|
|
27
28
|
onSiderMount: (s) => m([...n, s]),
|
|
28
29
|
onSiderUnmount: (s) => m(n.filter((N) => N !== s))
|
|
29
30
|
}) : o;
|
|
30
31
|
}) });
|
|
31
32
|
}
|
|
32
|
-
const B =
|
|
33
|
+
const B = _(j), t = B;
|
|
33
34
|
t.displayName = "Layout";
|
|
34
35
|
t.Sider = $;
|
|
35
36
|
t.Header = M;
|
|
@@ -40,5 +41,6 @@ export {
|
|
|
40
41
|
w as LayoutFooter,
|
|
41
42
|
M as LayoutHeader,
|
|
42
43
|
$ as LayoutSider,
|
|
44
|
+
K as SiderContext,
|
|
43
45
|
t as default
|
|
44
46
|
};
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@unicom-cloud/ui","version":"0.8.
|
|
1
|
+
{"name":"@unicom-cloud/ui","version":"0.8.94","dependencies":{"@unicom-cloud/icons":"latest"},"peerDependencies":{"dayjs":"^1.11.10","lodash":"^4.17.21","react":"^18.3.1","react-dom":"^18.3.1"},"peerDependenciesMeta":{},"type":"module","types":"types/pc/index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
|
package/pagination/PageItem.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
2
|
+
import j from "@unicom-cloud/icons/IconUiLeft";
|
|
3
|
+
import K from "@unicom-cloud/icons/IconUiMore";
|
|
4
|
+
import T from "@unicom-cloud/icons/IconUiRight";
|
|
5
5
|
import U, { useContext as N } from "react";
|
|
6
6
|
import "../config-provider/ConfigProvider.js";
|
|
7
7
|
import R from "../components/common/hooks/useKeyboardEvent.js";
|
|
8
8
|
import E from "@unicom-cloud/utils/class-name";
|
|
9
|
+
import { StepType as S } from "./interface.js";
|
|
9
10
|
import k from "../config-provider/context.js";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const { locale: e } = N(k), v = R(), {
|
|
11
|
+
function _(t) {
|
|
12
|
+
var l, r, s;
|
|
13
|
+
const { locale: e } = N(k), P = R(), {
|
|
14
14
|
pageNum: i,
|
|
15
|
-
current:
|
|
15
|
+
current: v,
|
|
16
16
|
rootPrefixCls: a,
|
|
17
17
|
pageItemStyle: d,
|
|
18
18
|
activePageItemStyle: m,
|
|
19
19
|
itemRender: f
|
|
20
|
-
} = t,
|
|
20
|
+
} = t, p = `${a}-item`, x = v === i, b = E(p, x ? `${p}-active` : "");
|
|
21
21
|
let o = d;
|
|
22
|
-
|
|
23
|
-
const
|
|
22
|
+
x && (o = { ...o, ...m });
|
|
23
|
+
const I = x ? { "aria-current": !0 } : {}, C = (n) => {
|
|
24
24
|
const { pageNum: u, onClick: g, disabled: c } = t;
|
|
25
|
-
|
|
25
|
+
n.currentTarget.dataset.active !== "true" && (n.stopPropagation(), c || g == null || g(u));
|
|
26
26
|
};
|
|
27
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ y(
|
|
28
28
|
"li",
|
|
29
29
|
{
|
|
30
30
|
style: o,
|
|
31
|
-
className:
|
|
32
|
-
onClick:
|
|
31
|
+
className: b,
|
|
32
|
+
onClick: C,
|
|
33
33
|
tabIndex: t.disabled ? -1 : 0,
|
|
34
|
-
"aria-label": (s = (
|
|
35
|
-
...
|
|
36
|
-
...
|
|
34
|
+
"aria-label": (s = (r = (l = e == null ? void 0 : e.Pagination) == null ? void 0 : l.currentPage) == null ? void 0 : r.replace) == null ? void 0 : s.call(r, "{0}", i),
|
|
35
|
+
...P({ onPressEnter: C }),
|
|
36
|
+
...I,
|
|
37
37
|
children: f ? f(i, "page", i) : i
|
|
38
38
|
}
|
|
39
39
|
);
|
|
@@ -41,66 +41,66 @@ function L(t) {
|
|
|
41
41
|
function $(t, e) {
|
|
42
42
|
switch (t) {
|
|
43
43
|
case "prev":
|
|
44
|
-
return e && e.prev ? e.prev : /* @__PURE__ */
|
|
44
|
+
return e && e.prev ? e.prev : /* @__PURE__ */ y(j, {});
|
|
45
45
|
case "next":
|
|
46
|
-
return e && e.next ? e.next : /* @__PURE__ */
|
|
46
|
+
return e && e.next ? e.next : /* @__PURE__ */ y(T, {});
|
|
47
47
|
case "more":
|
|
48
|
-
return e && e.more ? e.more : /* @__PURE__ */
|
|
48
|
+
return e && e.more ? e.more : /* @__PURE__ */ y(K, {});
|
|
49
49
|
default:
|
|
50
50
|
return null;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
const H = (t) => {
|
|
54
|
-
var s,
|
|
54
|
+
var s, n, u, g, c, h;
|
|
55
55
|
const { locale: e } = N(k), {
|
|
56
|
-
rootPrefixCls:
|
|
56
|
+
rootPrefixCls: P,
|
|
57
57
|
current: i,
|
|
58
|
-
allPages:
|
|
58
|
+
allPages: v,
|
|
59
59
|
jumpPage: a,
|
|
60
60
|
icons: d,
|
|
61
61
|
disabled: m,
|
|
62
62
|
pageItemStyle: f,
|
|
63
|
-
itemRender:
|
|
64
|
-
} = t,
|
|
63
|
+
itemRender: p
|
|
64
|
+
} = t, x = v > 0 ? 1 : 0, b = Math.min(v, Math.max(x, i + a)), o = `${P}-item ${P}-item-jumper`, I = E(o), C = () => {
|
|
65
65
|
var M;
|
|
66
|
-
!m && ((M = t.onClick) == null || M.call(t,
|
|
67
|
-
}, l = $("more", d),
|
|
68
|
-
return /* @__PURE__ */
|
|
66
|
+
!m && ((M = t.onClick) == null || M.call(t, b));
|
|
67
|
+
}, l = $("more", d), r = a > 0 ? (u = (n = (s = e == null ? void 0 : e.Pagination) == null ? void 0 : s.nextSomePages) == null ? void 0 : n.replace) == null ? void 0 : u.call(n, "{0}", a) : (h = (c = (g = e == null ? void 0 : e.Pagination) == null ? void 0 : g.prevSomePages) == null ? void 0 : c.replace) == null ? void 0 : h.call(c, "{0}", -a);
|
|
68
|
+
return /* @__PURE__ */ y(
|
|
69
69
|
"li",
|
|
70
70
|
{
|
|
71
71
|
style: f,
|
|
72
|
-
className:
|
|
73
|
-
onClick:
|
|
74
|
-
"aria-label":
|
|
75
|
-
children:
|
|
72
|
+
className: I,
|
|
73
|
+
onClick: C,
|
|
74
|
+
"aria-label": r,
|
|
75
|
+
children: p ? p(void 0, "more", l) : l
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
78
|
}, O = (t) => {
|
|
79
|
-
const { locale: e, rtl:
|
|
80
|
-
rootPrefixCls:
|
|
79
|
+
const { locale: e, rtl: P } = N(k), i = R(), {
|
|
80
|
+
rootPrefixCls: v,
|
|
81
81
|
current: a,
|
|
82
82
|
allPages: d,
|
|
83
83
|
type: m,
|
|
84
84
|
icons: f,
|
|
85
|
-
disabled:
|
|
86
|
-
pageItemStyle:
|
|
87
|
-
itemRender:
|
|
88
|
-
} = t, o = `${
|
|
89
|
-
let
|
|
90
|
-
d === 0 ?
|
|
91
|
-
const s =
|
|
92
|
-
let
|
|
93
|
-
|
|
94
|
-
const u =
|
|
85
|
+
disabled: p,
|
|
86
|
+
pageItemStyle: x,
|
|
87
|
+
itemRender: b
|
|
88
|
+
} = t, o = `${v}-item`, [I, C] = P ? ["next", "prev"] : ["prev", "next"], l = m === S.previous ? $(I, f) : $(C, f);
|
|
89
|
+
let r = !1;
|
|
90
|
+
d === 0 ? r = !0 : m === S.previous ? r = a <= 1 : r = a === d;
|
|
91
|
+
const s = p || r;
|
|
92
|
+
let n = a + (m === S.previous ? -1 : 1);
|
|
93
|
+
n = Math.max(0, Math.min(d, n));
|
|
94
|
+
const u = S.previous === m ? "prev" : "next", g = E(o, `${o}-${u}`, {
|
|
95
95
|
[`${o}-disabled`]: s
|
|
96
96
|
}), c = () => {
|
|
97
|
-
var
|
|
98
|
-
s || (
|
|
97
|
+
var h;
|
|
98
|
+
s || (h = t.onClick) == null || h.call(t, n);
|
|
99
99
|
};
|
|
100
|
-
return /* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ y(
|
|
101
101
|
"li",
|
|
102
102
|
{
|
|
103
|
-
style:
|
|
103
|
+
style: x,
|
|
104
104
|
className: g,
|
|
105
105
|
onClick: c,
|
|
106
106
|
tabIndex: s ? -1 : 0,
|
|
@@ -108,13 +108,12 @@ const H = (t) => {
|
|
|
108
108
|
...i({
|
|
109
109
|
onPressEnter: c
|
|
110
110
|
}),
|
|
111
|
-
children:
|
|
111
|
+
children: b ? b(void 0, u, l) : l
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
|
-
}, Q = U.memo(
|
|
114
|
+
}, Q = U.memo(_);
|
|
115
115
|
export {
|
|
116
116
|
H as JumpPager,
|
|
117
117
|
O as StepPager,
|
|
118
|
-
_ as StepType,
|
|
119
118
|
Q as default
|
|
120
119
|
};
|
package/pagination/Pagination.js
CHANGED
|
@@ -5,9 +5,10 @@ import Me from "../components/common/hooks/useMergeProps.js";
|
|
|
5
5
|
import Q from "../components/common/hooks/useMergeValue.js";
|
|
6
6
|
import je from "@unicom-cloud/utils/class-name";
|
|
7
7
|
import { pickDataAttributes as ke } from "../components/common/utils/pick.js";
|
|
8
|
-
import b, { StepPager as M,
|
|
8
|
+
import b, { StepPager as M, JumpPager as I } from "./PageItem.js";
|
|
9
9
|
import U from "./PageJumper.js";
|
|
10
10
|
import Je from "./PageOption.js";
|
|
11
|
+
import { StepType as m } from "./interface.js";
|
|
11
12
|
import Ae from "../config-provider/context.js";
|
|
12
13
|
const Ee = 1, Y = 10;
|
|
13
14
|
function T(f = Y, d) {
|
package/pagination/interface.js
CHANGED
package/select/Option.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsxs as j, jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import y from "react";
|
|
3
3
|
import E from "../checkbox/Checkbox.js";
|
|
4
|
+
import "../checkbox/Group.js";
|
|
4
5
|
import v from "@unicom-cloud/utils/class-name";
|
|
5
6
|
import { omit as L } from "../components/common/utils/omit.js";
|
|
6
|
-
function P(
|
|
7
|
+
function P(l, N) {
|
|
7
8
|
const {
|
|
8
9
|
style: _,
|
|
9
10
|
className: b,
|
|
@@ -22,22 +23,22 @@ function P(p, N) {
|
|
|
22
23
|
_onMouseLeave: d,
|
|
23
24
|
_onClick: m,
|
|
24
25
|
...o
|
|
25
|
-
} =
|
|
26
|
+
} = l, n = "value" in l ? h : `${C}`, i = "children" in l ? C : `${h}`, s = $ ? O.indexOf(n) !== -1 : O === n, u = {
|
|
26
27
|
style: _,
|
|
27
28
|
className: v(
|
|
28
29
|
`${e}-option`,
|
|
29
30
|
{
|
|
30
31
|
[`${e}-option-selected`]: s,
|
|
31
32
|
[`${e}-option-disabled`]: a,
|
|
32
|
-
[`${e}-option-hover`]:
|
|
33
|
-
[`${e}-option-empty`]: !
|
|
33
|
+
[`${e}-option-hover`]: n === M,
|
|
34
|
+
[`${e}-option-empty`]: !i && i !== 0 || typeof i == "string" && /^\s*$/.test(i),
|
|
34
35
|
[`${e}-option-rtl`]: x
|
|
35
36
|
},
|
|
36
37
|
b
|
|
37
38
|
),
|
|
38
39
|
onMouseEnter: (r) => {
|
|
39
40
|
var t;
|
|
40
|
-
c == null || c(
|
|
41
|
+
c == null || c(n), (t = o.onMouseEnter) == null || t.call(o, r);
|
|
41
42
|
},
|
|
42
43
|
onMouseLeave: (r) => {
|
|
43
44
|
var t;
|
|
@@ -45,7 +46,7 @@ function P(p, N) {
|
|
|
45
46
|
},
|
|
46
47
|
onClick: (r) => {
|
|
47
48
|
var t;
|
|
48
|
-
m == null || m(
|
|
49
|
+
m == null || m(n, a), (t = o.onClick) == null || t.call(o, r);
|
|
49
50
|
},
|
|
50
51
|
...L(o, [
|
|
51
52
|
"_key",
|
|
@@ -55,15 +56,15 @@ function P(p, N) {
|
|
|
55
56
|
"onMouseEnter",
|
|
56
57
|
"onMouseLeave"
|
|
57
58
|
])
|
|
58
|
-
},
|
|
59
|
+
}, p = {
|
|
59
60
|
ref: N,
|
|
60
61
|
role: "option",
|
|
61
62
|
"aria-selected": s
|
|
62
63
|
};
|
|
63
|
-
return w && Object.assign(
|
|
64
|
+
return w && Object.assign(p, { "data-user-created": !0 }), g && Object.assign(p, { "data-user-creating": !0 }), $ ? /* @__PURE__ */ j(
|
|
64
65
|
"li",
|
|
65
66
|
{
|
|
66
|
-
...
|
|
67
|
+
...p,
|
|
67
68
|
className: v(
|
|
68
69
|
`${e}-option-wrapper`,
|
|
69
70
|
{
|
|
@@ -83,10 +84,10 @@ function P(p, N) {
|
|
|
83
84
|
onChange: u.onClick
|
|
84
85
|
}
|
|
85
86
|
),
|
|
86
|
-
/* @__PURE__ */ f("span", { ...u, children:
|
|
87
|
+
/* @__PURE__ */ f("span", { ...u, children: i })
|
|
87
88
|
]
|
|
88
89
|
}
|
|
89
|
-
) : /* @__PURE__ */ f("li", { ...
|
|
90
|
+
) : /* @__PURE__ */ f("li", { ...p, ...u, children: i });
|
|
90
91
|
}
|
|
91
92
|
const R = y.forwardRef(P), S = R;
|
|
92
93
|
S.__PQB_SELECT_OPTION__ = !0;
|
package/select/Select.js
CHANGED
|
@@ -3,6 +3,7 @@ import D from "lodash/isArray";
|
|
|
3
3
|
import Ot from "lodash/isFunction";
|
|
4
4
|
import ht, { useContext as bt, useState as z, useMemo as Pe, useRef as C, useCallback as me, useEffect as V, useImperativeHandle as vt } from "react";
|
|
5
5
|
import yt from "../checkbox/Checkbox.js";
|
|
6
|
+
import "../checkbox/Group.js";
|
|
6
7
|
import "../config-provider/ConfigProvider.js";
|
|
7
8
|
import Ct from "../components/common/hooks/useId.js";
|
|
8
9
|
import Vt from "../components/common/hooks/useMergeProps.js";
|
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/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
|
};
|