@unicom-cloud/ui 0.8.106 → 0.8.108
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/App.js +7 -0
- package/BackTop.js +2 -4
- package/Calendar.js +2 -2
- package/ColorPicker.js +15 -14
- package/Constant.js +4 -0
- package/Copy.js +4 -3
- package/Countdown.js +25 -0
- package/Grid.js +8 -10
- package/LiquidFill.js +4 -3
- package/List.js +7 -6
- package/Marquee.js +4 -3
- package/Modal.js +4 -2
- package/PageHeader.js +3 -2
- package/QrCode.js +4 -3
- package/RowCol.js +8 -0
- package/Segmented.js +14 -4
- package/Statistic.js +5 -4
- package/Tour.js +4 -3
- package/Transfer.js +4 -2
- package/anchor/Link.js +1 -1
- package/app/App.js +26 -0
- package/app/context.js +9 -0
- package/app/index.js +9 -0
- package/app/interface.js +1 -0
- package/app/useApp.js +8 -0
- package/avatar/Group.js +1 -1
- package/back-top/index.js +44 -56
- package/button/index.js +52 -51
- package/calendar/Lunar.js +71 -0
- package/calendar/index.js +11 -11
- package/cascader/base/node.js +22 -20
- package/cascader/base/store.js +10 -10
- package/cascader/util.js +29 -27
- package/color-picker/Mode.js +8 -7
- package/color-picker/hooks/useColorPicker.js +56 -55
- package/color-picker/index.js +49 -48
- package/color-picker/utils.js +58 -57
- package/components/common/empty/index.js +2 -2
- package/components/common/flex/index.js +64 -55
- package/components/common/flex/interface.js +6 -6
- package/components/common/hooks/useInterval.js +6 -6
- package/components/common/icons/file/index.js +13 -11
- package/components/common/space/index.js +53 -53
- package/components/common/utils/dayjs.js +114 -126
- package/components/common/utils/is.js +98 -104
- package/components/common/utils/setDir.js +12 -0
- package/components/common/utils/setTheme.js +13 -13
- package/components/common/utils/toArray.js +7 -5
- package/config-provider/ConfigProvider.js +32 -30
- package/constant/index.js +4 -0
- package/copy/index.js +2 -1
- package/countdown/index.js +113 -0
- package/countdown/interface.js +1 -0
- package/countdown/util.js +29 -0
- package/descriptions/index.js +45 -45
- package/divider/index.js +28 -20
- package/dropdown/Button.js +1 -1
- package/empty/index.js +1 -1
- package/flex/index.js +30 -29
- package/form/FormItem.js +126 -122
- package/grid/Grid.js +56 -90
- package/grid/Item.js +44 -65
- package/grid/context.js +2 -6
- package/grid/index.js +6 -8
- package/grid/util.js +6 -44
- package/hooks/useResponsiveState.js +54 -0
- package/index.js +614 -605
- package/input/Button.js +12 -12
- package/input/Group.js +11 -12
- package/input/Input.js +112 -102
- package/input/InputElement.js +25 -24
- package/input/Search.js +24 -24
- package/layout/Sider.js +1 -1
- package/liquid-fill/index.js +4 -3
- package/list/Item.js +21 -21
- package/list/index.js +53 -52
- package/marquee/index.js +20 -19
- package/marquee-/index.js +4 -3
- package/mentions/util.js +9 -8
- package/modal/Confirm.js +17 -17
- package/modal/Modal.js +247 -237
- package/modal/index.js +4 -2
- package/modal/use-modal/index.js +2 -2
- package/package.json +1 -1
- package/page-header/index.js +57 -56
- package/pagination/Pagination.js +89 -92
- package/qr-code/index.js +4 -3
- package/radio/Group.js +1 -1
- package/row-col/Col-.js +88 -0
- package/row-col/Col.js +159 -0
- package/row-col/Row.js +73 -0
- package/row-col/context.js +5 -0
- package/row-col/index.js +11 -0
- package/row-col/interface.js +1 -0
- package/segmented/index.js +257 -206
- package/select/Select.js +191 -191
- package/select/util.js +50 -50
- package/select-view/Core.js +31 -28
- package/space/index.js +15 -13
- package/splitter/SplitBar.js +44 -46
- package/statistic/index.js +56 -55
- package/statistic/interface.js +4 -1
- package/style.css +1 -1
- package/table/Table.js +198 -210
- package/table/hook/useColumns.js +27 -26
- package/table/hook/useStickyClassNames.js +9 -8
- package/table/hook/useThResizable.js +4 -3
- package/table/th-resizable/index.js +2 -2
- package/table/thead/index.js +18 -16
- package/time-picker/util.js +20 -30
- package/timeline/Item.js +1 -1
- package/tour/index.js +4 -3
- package/transfer/index.js +93 -91
- package/trigger/index.js +66 -66
- package/types/common/development/interface.d.ts +3 -3
- package/types/common/flex/index.d.ts +3 -9
- package/types/common/flex/interface.d.ts +15 -4
- package/types/common/space/index.d.ts +3 -5
- package/types/common/space/interface.d.ts +2 -0
- package/types/common/utils/dayjs.d.ts +3 -1
- package/types/common/utils/is.d.ts +3 -4
- package/types/common/utils/setDir.d.ts +2 -0
- package/types/pc/app/App.d.ts +6 -0
- package/types/pc/app/context.d.ts +4 -0
- package/types/pc/app/index.d.ts +5 -0
- package/types/pc/app/interface.d.ts +17 -0
- package/types/pc/app/useApp.d.ts +3 -0
- package/types/pc/back-top/interface.d.ts +4 -17
- package/types/pc/button/interface.d.ts +2 -2
- package/types/pc/calendar/Lunar.d.ts +17 -0
- package/types/pc/calendar/index.d.ts +1 -1
- package/types/pc/config-provider/interface.d.ts +17 -12
- package/types/pc/constant/index.d.ts +1 -0
- package/types/pc/countdown/interface.d.ts +65 -0
- package/types/pc/countdown/util.d.ts +7 -0
- package/types/pc/divider/interface.d.ts +1 -0
- package/types/pc/flex/index.d.ts +8 -6
- package/types/pc/flex/interface.d.ts +3 -10
- package/types/pc/form/FormItem.d.ts +1 -1
- package/types/pc/form/interface.d.ts +1 -1
- package/types/pc/grid/Grid.d.ts +2 -4
- package/types/pc/grid/Item.d.ts +1 -5
- package/types/pc/grid/context.d.ts +4 -15
- package/types/pc/grid/index.d.ts +4 -6
- package/types/pc/grid/interface.d.ts +14 -142
- package/types/pc/grid/util.d.ts +1 -10
- package/types/pc/hooks/useResponsiveState.d.ts +3 -0
- package/types/pc/index.d.ts +10 -4
- package/types/pc/input/Button.d.ts +2 -2
- package/types/pc/list/interface.d.ts +2 -1
- package/types/pc/message/index.d.ts +1 -9
- package/types/pc/message/interface.d.ts +8 -0
- package/types/pc/message/useMessage.d.ts +1 -2
- package/types/pc/modal/Modal.d.ts +1 -0
- package/types/pc/modal/config.d.ts +1 -2
- package/types/pc/modal/index.d.ts +2 -1
- package/types/pc/modal/interface.d.ts +17 -5
- package/types/pc/notification/index.d.ts +2 -9
- package/types/pc/notification/interface.d.ts +7 -0
- package/types/pc/notification/useNotification.d.ts +1 -2
- package/types/pc/pagination/PageOption.d.ts +0 -1
- package/types/pc/pagination/interface.d.ts +5 -6
- package/types/pc/{grid → row-col}/Col-.d.ts +1 -1
- package/types/pc/{grid → row-col}/Col.d.ts +1 -2
- package/types/pc/{grid → row-col}/Row.d.ts +1 -2
- package/types/pc/row-col/context.d.ts +6 -0
- package/types/pc/row-col/index.d.ts +7 -0
- package/types/pc/row-col/interface.d.ts +112 -0
- package/types/pc/segmented/index.d.ts +3 -7
- package/types/pc/segmented/interface.d.ts +38 -5
- package/types/pc/select-view/Core.d.ts +1 -8
- package/types/pc/select-view/index.d.ts +1 -8
- package/types/pc/select-view/interface.d.ts +9 -2
- package/types/pc/space/index.d.ts +5 -7
- package/types/pc/space/interface.d.ts +3 -10
- package/types/pc/statistic/index.d.ts +1 -1
- package/types/pc/statistic/interface.d.ts +1 -49
- package/types/pc/utils/is.d.ts +1 -1
- package/types/pc/utils/names.d.ts +422 -111
- package/types/pc/utils/responsiveObserve.d.ts +8 -8
- package/typography/Ellipsis.js +5 -4
- package/typography/Operations.js +4 -3
- package/utils/dayjs.js +13 -11
- package/utils/index.js +245 -244
- package/utils/is.js +65 -66
- package/utils/names.js +309 -150
- package/utils/responsiveObserve.js +43 -36
- package/version/index.js +1 -1
- package/grid/Col-.js +0 -86
- package/grid/Col.js +0 -169
- package/grid/Row.js +0 -96
- package/grid/hook/useResponsiveState.js +0 -38
- package/statistic/Countdown.js +0 -56
- package/statistic/util.js +0 -33
- package/types/pc/grid/hook/useResponsiveState.d.ts +0 -2
- package/types/pc/statistic/util.d.ts +0 -1
- /package/types/pc/{statistic/Countdown.d.ts → countdown/index.d.ts} +0 -0
package/modal/index.js
CHANGED
package/modal/use-modal/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@unicom-cloud/ui","version":"0.8.
|
|
1
|
+
{"name":"@unicom-cloud/ui","version":"0.8.108","dependencies":{"@unicom-cloud/icons":"latest"},"peerDependencies":{"react":"^18.3.1","react-dom":"^18.3.1","dayjs":"^1.11.10","lodash":"^4.17.21","uuid":"^11.1.0","qrcode.react":"^4.2.0"},"peerDependenciesMeta":{},"type":"module","types":"types/pc/index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
|
package/page-header/index.js
CHANGED
|
@@ -1,68 +1,69 @@
|
|
|
1
|
-
import { jsxs as c, jsx as r, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import D from "
|
|
1
|
+
import { jsxs as c, jsx as r, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
+
import T from "@unicom-cloud/icons/IconUiLeft";
|
|
3
|
+
import W from "@unicom-cloud/icons/IconUiRight";
|
|
4
|
+
import m from "lodash/isArray";
|
|
5
|
+
import j, { useContext as z, useState as K, useRef as U, useImperativeHandle as A, useEffect as D } from "react";
|
|
6
|
+
import F from "../breadcrumb/index.js";
|
|
6
7
|
import "../config-provider/ConfigProvider.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import L from "../components/common/hooks/useKeyboardEvent.js";
|
|
9
|
+
import M from "../components/common/hooks/useMergeProps.js";
|
|
10
|
+
import O from "../icon-hover/index.js";
|
|
10
11
|
import u from "@unicom-cloud/utils/class-name";
|
|
11
|
-
import { omit as
|
|
12
|
-
import { resizeObserver as
|
|
13
|
-
import
|
|
14
|
-
function
|
|
15
|
-
const { getPrefixCls:
|
|
16
|
-
|
|
12
|
+
import { omit as S } from "../components/common/utils/omit.js";
|
|
13
|
+
import { resizeObserver as q } from "../components/common/utils/resizeObserver.js";
|
|
14
|
+
import G from "../config-provider/context.js";
|
|
15
|
+
function g($, b) {
|
|
16
|
+
const { getPrefixCls: v, componentConfig: N, rtl: p } = z(G), a = M(
|
|
17
|
+
$,
|
|
17
18
|
{},
|
|
18
|
-
|
|
19
|
+
N?.PageHeader
|
|
19
20
|
), {
|
|
20
|
-
header:
|
|
21
|
-
title:
|
|
22
|
-
subTitle:
|
|
23
|
-
extra:
|
|
24
|
-
children:
|
|
21
|
+
header: x,
|
|
22
|
+
title: k,
|
|
23
|
+
subTitle: C,
|
|
24
|
+
extra: w,
|
|
25
|
+
children: d,
|
|
25
26
|
backIcon: l,
|
|
26
|
-
footer:
|
|
27
|
-
breadcrumb:
|
|
28
|
-
...
|
|
27
|
+
footer: f,
|
|
28
|
+
breadcrumb: h,
|
|
29
|
+
...P
|
|
29
30
|
} = a;
|
|
30
|
-
let i =
|
|
31
|
-
|
|
32
|
-
let n =
|
|
33
|
-
|
|
34
|
-
let o =
|
|
35
|
-
|
|
36
|
-
let s =
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
getRootDomElement:
|
|
31
|
+
let i = x;
|
|
32
|
+
m(i) && !i.length && (i = null);
|
|
33
|
+
let n = k;
|
|
34
|
+
m(n) && !n.length && (n = null);
|
|
35
|
+
let o = C;
|
|
36
|
+
m(o) && !o.length && (o = null);
|
|
37
|
+
let s = w;
|
|
38
|
+
m(s) && !s.length && (s = null);
|
|
39
|
+
const R = L(), [y, I] = K(!1), t = U(), e = v?.("page-header");
|
|
40
|
+
A(b, () => ({
|
|
41
|
+
getRootDomElement: E
|
|
41
42
|
}), []);
|
|
42
|
-
function
|
|
43
|
+
function E() {
|
|
43
44
|
return t.current;
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
-
t.current &&
|
|
46
|
+
function H() {
|
|
47
|
+
t.current && I(t.current.offsetWidth < 768);
|
|
47
48
|
}
|
|
48
|
-
return
|
|
49
|
-
const
|
|
49
|
+
return D(() => {
|
|
50
|
+
const B = q([t.current], H);
|
|
50
51
|
return () => {
|
|
51
|
-
|
|
52
|
+
B();
|
|
52
53
|
};
|
|
53
54
|
}, [t.current]), /* @__PURE__ */ c(
|
|
54
55
|
"div",
|
|
55
56
|
{
|
|
56
|
-
...
|
|
57
|
+
...S(P, ["onBack"]),
|
|
57
58
|
ref: t,
|
|
58
59
|
className: u(
|
|
59
60
|
`${e}`,
|
|
60
61
|
{
|
|
61
|
-
[`${e}-with-breadcrumb`]:
|
|
62
|
-
[`${e}-with-content`]:
|
|
63
|
-
[`${e}-with-footer`]:
|
|
64
|
-
[`${e}-wrap`]:
|
|
65
|
-
[`${e}-rtl`]:
|
|
62
|
+
[`${e}-with-breadcrumb`]: h,
|
|
63
|
+
[`${e}-with-content`]: d,
|
|
64
|
+
[`${e}-with-footer`]: f,
|
|
65
|
+
[`${e}-wrap`]: y,
|
|
66
|
+
[`${e}-rtl`]: p
|
|
66
67
|
},
|
|
67
68
|
a.className
|
|
68
69
|
),
|
|
@@ -70,7 +71,7 @@ function p(g, $) {
|
|
|
70
71
|
children: [
|
|
71
72
|
!!i && /* @__PURE__ */ r("div", { className: `${e}-header`, children: i }),
|
|
72
73
|
/* @__PURE__ */ c("div", { className: `${e}-head-wrapper`, children: [
|
|
73
|
-
|
|
74
|
+
h && /* @__PURE__ */ r(F, { ...h }),
|
|
74
75
|
/* @__PURE__ */ c("div", { className: `${e}-head`, children: [
|
|
75
76
|
/* @__PURE__ */ c(
|
|
76
77
|
"div",
|
|
@@ -80,21 +81,21 @@ function p(g, $) {
|
|
|
80
81
|
}),
|
|
81
82
|
children: [
|
|
82
83
|
l && /* @__PURE__ */ r(
|
|
83
|
-
|
|
84
|
+
O,
|
|
84
85
|
{
|
|
85
86
|
prefix: e,
|
|
86
87
|
tabIndex: 0,
|
|
87
88
|
role: "button",
|
|
88
89
|
className: `${e}-back`,
|
|
89
90
|
onClick: a.onBack,
|
|
90
|
-
...
|
|
91
|
+
...R({
|
|
91
92
|
onPressEnter: a.onBack
|
|
92
93
|
}),
|
|
93
|
-
children: /* @__PURE__ */ r("span", { className: `${e}-back-icon`, children: l === !0 ?
|
|
94
|
+
children: /* @__PURE__ */ r("span", { className: `${e}-back-icon`, children: l === !0 ? p ? /* @__PURE__ */ r(W, {}) : /* @__PURE__ */ r(T, {}) : l })
|
|
94
95
|
}
|
|
95
96
|
),
|
|
96
97
|
n && /* @__PURE__ */ r("div", { className: `${e}-title`, children: n }),
|
|
97
|
-
o && /* @__PURE__ */ c(
|
|
98
|
+
o && /* @__PURE__ */ c(_, { children: [
|
|
98
99
|
/* @__PURE__ */ r("div", { className: `${e}-divider` }),
|
|
99
100
|
/* @__PURE__ */ r("div", { className: `${e}-sub-title`, children: o })
|
|
100
101
|
] })
|
|
@@ -104,14 +105,14 @@ function p(g, $) {
|
|
|
104
105
|
s && /* @__PURE__ */ r("div", { className: `${e}-head-extra`, children: s })
|
|
105
106
|
] })
|
|
106
107
|
] }),
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
d && /* @__PURE__ */ r("div", { className: `${e}-content`, children: d }),
|
|
109
|
+
f && /* @__PURE__ */ r("div", { className: `${e}-footer`, children: f })
|
|
109
110
|
]
|
|
110
111
|
}
|
|
111
112
|
);
|
|
112
113
|
}
|
|
113
|
-
|
|
114
|
-
const
|
|
114
|
+
g.displayName = "PageHeader";
|
|
115
|
+
const ce = j.forwardRef(g);
|
|
115
116
|
export {
|
|
116
|
-
|
|
117
|
+
ce as default
|
|
117
118
|
};
|
package/pagination/Pagination.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import D, { forwardRef as
|
|
1
|
+
import { jsxs as O, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import D, { forwardRef as we, useContext as Ne, useEffect as W, createElement as P } from "react";
|
|
3
3
|
import "../config-provider/ConfigProvider.js";
|
|
4
4
|
import $e from "../components/common/hooks/useMergeProps.js";
|
|
5
5
|
import q from "../components/common/hooks/useMergeValue.js";
|
|
6
6
|
import ve from "@unicom-cloud/utils/class-name";
|
|
7
7
|
import { pickDataAttributes as be } from "../components/common/utils/pick.js";
|
|
8
|
-
import
|
|
8
|
+
import N, { StepPager as $, JumpPager as E } from "./PageItem.js";
|
|
9
9
|
import G from "./PageJumper.js";
|
|
10
10
|
import Me from "./PageOption.js";
|
|
11
11
|
import { StepType as m } from "./interface.js";
|
|
12
12
|
import je from "../config-provider/context.js";
|
|
13
13
|
const ke = 1, K = 10;
|
|
14
|
-
function
|
|
14
|
+
function R(g = K, d) {
|
|
15
15
|
return Math.ceil(d / g);
|
|
16
16
|
}
|
|
17
17
|
function Je(g, d) {
|
|
@@ -26,109 +26,107 @@ const Ae = {
|
|
|
26
26
|
pageSizeChangeResetCurrent: !0,
|
|
27
27
|
bufferSize: 2
|
|
28
28
|
};
|
|
29
|
-
function
|
|
29
|
+
function Oe(g, d) {
|
|
30
30
|
const {
|
|
31
31
|
getPrefixCls: F,
|
|
32
32
|
size: v,
|
|
33
33
|
locale: b,
|
|
34
34
|
componentConfig: Q,
|
|
35
35
|
rtl: U
|
|
36
|
-
} =
|
|
36
|
+
} = Ne(je), i = $e(
|
|
37
37
|
g,
|
|
38
38
|
Ae,
|
|
39
39
|
Q?.Pagination
|
|
40
40
|
), {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
className: X,
|
|
42
|
+
style: Y,
|
|
43
|
+
pageItemStyle: Z,
|
|
44
|
+
activePageItemStyle: ee,
|
|
45
|
+
showTotal: x,
|
|
46
|
+
sizeOptions: te,
|
|
47
|
+
simple: C,
|
|
48
|
+
mini: ne,
|
|
49
|
+
showJumper: M,
|
|
50
|
+
selectProps: oe,
|
|
51
|
+
icons: ae,
|
|
52
|
+
disabled: z,
|
|
53
|
+
itemRender: re,
|
|
54
|
+
hideOnSinglePage: se,
|
|
55
|
+
total: ie,
|
|
56
|
+
pageSize: le,
|
|
43
57
|
current: I,
|
|
44
|
-
showMore:
|
|
45
|
-
sizeOptions:
|
|
58
|
+
showMore: ue,
|
|
59
|
+
sizeOptions: S,
|
|
46
60
|
pageSizeChangeResetCurrent: T,
|
|
47
|
-
defaultCurrent:
|
|
48
|
-
defaultPageSize:
|
|
49
|
-
|
|
61
|
+
defaultCurrent: ce,
|
|
62
|
+
defaultPageSize: pe,
|
|
63
|
+
showPageOption: ge
|
|
50
64
|
// 潘启宝添加
|
|
51
|
-
} =
|
|
52
|
-
defaultValue:
|
|
65
|
+
} = i, fe = C ? !1 : ge, [e, j] = q(ke, {
|
|
66
|
+
defaultValue: ce,
|
|
53
67
|
value: I
|
|
54
68
|
}), [f, V] = q(
|
|
55
|
-
H(
|
|
69
|
+
H(S),
|
|
56
70
|
{
|
|
57
|
-
defaultValue:
|
|
58
|
-
value:
|
|
71
|
+
defaultValue: pe,
|
|
72
|
+
value: le
|
|
59
73
|
}
|
|
60
|
-
), h =
|
|
61
|
-
I && !
|
|
74
|
+
), h = ie, me = !!ue;
|
|
75
|
+
I && !i.onChange && console.warn(
|
|
62
76
|
"Warning: you have provide current prop for pagination but without onChange handler , this will cause no-change when you change page. "
|
|
63
77
|
);
|
|
64
|
-
function
|
|
65
|
-
const n =
|
|
78
|
+
function he(t, l) {
|
|
79
|
+
const n = R(t, l);
|
|
66
80
|
return e > n ? n : e;
|
|
67
81
|
}
|
|
68
82
|
W(() => {
|
|
69
|
-
if (
|
|
70
|
-
const l = H(
|
|
71
|
-
"pageSize" in
|
|
83
|
+
if (S && !S.includes(f)) {
|
|
84
|
+
const l = H(S);
|
|
85
|
+
"pageSize" in i || V(l);
|
|
72
86
|
}
|
|
73
|
-
}, [
|
|
74
|
-
const t =
|
|
75
|
-
t !== e && !("current" in
|
|
87
|
+
}, [S]), W(() => {
|
|
88
|
+
const t = he(f, h);
|
|
89
|
+
t !== e && !("current" in i) && j(t);
|
|
76
90
|
}, [h, e, f]);
|
|
77
91
|
const B = (t = e, l = f) => {
|
|
78
|
-
const { onChange: n } =
|
|
92
|
+
const { onChange: n } = i;
|
|
79
93
|
n?.(t, l);
|
|
80
|
-
},
|
|
81
|
-
const { onPageSizeChange: l } =
|
|
94
|
+
}, Pe = (t) => {
|
|
95
|
+
const { onPageSizeChange: l } = i, n = R(t, h), a = {
|
|
82
96
|
pageSize: t
|
|
83
97
|
};
|
|
84
|
-
T ? a.current = 1 : a.current = e > n ? n : e, "pageSize" in
|
|
85
|
-
},
|
|
86
|
-
"current" in
|
|
87
|
-
},
|
|
88
|
-
className: ie,
|
|
89
|
-
style: se,
|
|
90
|
-
pageItemStyle: le,
|
|
91
|
-
activePageItemStyle: ue,
|
|
92
|
-
showTotal: S,
|
|
93
|
-
sizeCanChange: ce,
|
|
94
|
-
sizeOptions: pe,
|
|
95
|
-
simple: x,
|
|
96
|
-
mini: ge,
|
|
97
|
-
showJumper: k,
|
|
98
|
-
selectProps: fe,
|
|
99
|
-
icons: me,
|
|
100
|
-
disabled: z,
|
|
101
|
-
itemRender: he,
|
|
102
|
-
hideOnSinglePage: Pe
|
|
103
|
-
} = r, de = r.size || v, o = F?.("pagination"), y = ge ? "mini" : de, Ce = ve(
|
|
98
|
+
T ? a.current = 1 : a.current = e > n ? n : e, "pageSize" in i || V(a.pageSize), !("current" in i) && e !== a.current && j(a.current), l?.(t, a.current), B(T ? 1 : a.current, t);
|
|
99
|
+
}, k = (t) => {
|
|
100
|
+
"current" in i || j(t), B(t);
|
|
101
|
+
}, de = i.size || v, o = F?.("pagination"), y = ne ? "mini" : de, Ce = ve(
|
|
104
102
|
o,
|
|
105
103
|
`${o}-size-${y}`,
|
|
106
104
|
{
|
|
107
|
-
[`${o}-simple`]:
|
|
105
|
+
[`${o}-simple`]: C,
|
|
108
106
|
[`${o}-disabled`]: z,
|
|
109
107
|
[`${o}-rtl`]: U
|
|
110
108
|
},
|
|
111
|
-
|
|
109
|
+
X
|
|
112
110
|
);
|
|
113
111
|
let J;
|
|
114
|
-
const
|
|
115
|
-
if (
|
|
112
|
+
const r = [], s = R(f, h), p = Je(i.bufferSize, s);
|
|
113
|
+
if (se && s <= 1)
|
|
116
114
|
return null;
|
|
117
115
|
const u = {
|
|
118
|
-
onClick:
|
|
116
|
+
onClick: k,
|
|
119
117
|
rootPrefixCls: o,
|
|
120
|
-
simple:
|
|
118
|
+
simple: C,
|
|
121
119
|
current: e,
|
|
122
120
|
allPages: s,
|
|
123
|
-
icons:
|
|
121
|
+
icons: ae,
|
|
124
122
|
disabled: z,
|
|
125
|
-
pageItemStyle:
|
|
126
|
-
activePageItemStyle:
|
|
127
|
-
itemRender:
|
|
123
|
+
pageItemStyle: Z,
|
|
124
|
+
activePageItemStyle: ee,
|
|
125
|
+
itemRender: re
|
|
128
126
|
};
|
|
129
|
-
if (
|
|
127
|
+
if (C) {
|
|
130
128
|
const t = `${o}-item-simple`;
|
|
131
|
-
J = /* @__PURE__ */
|
|
129
|
+
J = /* @__PURE__ */ O("ul", { className: `${o}-list`, children: [
|
|
132
130
|
/* @__PURE__ */ c($, { ...u, type: m.previous }, "previous"),
|
|
133
131
|
/* @__PURE__ */ c("li", { className: `${t}-pager`, children: /* @__PURE__ */ c(
|
|
134
132
|
G,
|
|
@@ -137,9 +135,9 @@ function Ee(g, d) {
|
|
|
137
135
|
rootPrefixCls: o,
|
|
138
136
|
totalPages: s,
|
|
139
137
|
current: e,
|
|
140
|
-
onPageChange:
|
|
138
|
+
onPageChange: k,
|
|
141
139
|
simple: {
|
|
142
|
-
showJumper: typeof
|
|
140
|
+
showJumper: typeof M == "boolean" ? M : !0
|
|
143
141
|
},
|
|
144
142
|
size: y
|
|
145
143
|
}
|
|
@@ -153,14 +151,14 @@ function Ee(g, d) {
|
|
|
153
151
|
s <= 4 + p * 2 || e === t && e === l
|
|
154
152
|
)
|
|
155
153
|
for (let n = 1; n <= s; n++)
|
|
156
|
-
|
|
154
|
+
r.push(/* @__PURE__ */ P(N, { ...u, key: n, pageNum: n }));
|
|
157
155
|
else {
|
|
158
156
|
let n = 1, a = s, L = !0, _ = !0;
|
|
159
157
|
e > t && e < l ? (a = e + p, n = e - p) : e <= t ? (L = !1, n = 1, a = Math.max(t, p + e)) : e >= l && (_ = !1, a = s, n = Math.min(l, e - p));
|
|
160
|
-
for (let
|
|
161
|
-
|
|
158
|
+
for (let w = n; w <= a; w++)
|
|
159
|
+
r.push(/* @__PURE__ */ c(N, { pageNum: w, ...u }, w));
|
|
162
160
|
const ze = /* @__PURE__ */ P(
|
|
163
|
-
|
|
161
|
+
E,
|
|
164
162
|
{
|
|
165
163
|
...u,
|
|
166
164
|
key: n - 1,
|
|
@@ -168,28 +166,28 @@ function Ee(g, d) {
|
|
|
168
166
|
jumpPage: -(p * 2 + 1)
|
|
169
167
|
}
|
|
170
168
|
), Se = /* @__PURE__ */ P(
|
|
171
|
-
|
|
169
|
+
E,
|
|
172
170
|
{
|
|
173
171
|
...u,
|
|
174
172
|
key: a + 1,
|
|
175
173
|
type: m.next,
|
|
176
174
|
jumpPage: p * 2 + 1
|
|
177
175
|
}
|
|
178
|
-
), xe = /* @__PURE__ */ c(
|
|
179
|
-
L && (
|
|
176
|
+
), xe = /* @__PURE__ */ c(N, { pageNum: 1, ...u }, 1), ye = /* @__PURE__ */ P(N, { ...u, key: s, pageNum: s });
|
|
177
|
+
L && (r[0] = D.cloneElement(r[0], {
|
|
180
178
|
className: `${o}-item-after-pre`
|
|
181
|
-
}),
|
|
182
|
-
|
|
179
|
+
}), r.unshift(ze), r.unshift(xe)), _ && (r[r.length - 1] = D.cloneElement(
|
|
180
|
+
r[r.length - 1],
|
|
183
181
|
{
|
|
184
182
|
className: `${o}-item-before-next`
|
|
185
183
|
}
|
|
186
|
-
),
|
|
184
|
+
), r.push(Se), r.push(ye));
|
|
187
185
|
}
|
|
188
|
-
J = /* @__PURE__ */
|
|
186
|
+
J = /* @__PURE__ */ O("ul", { className: `${o}-list`, children: [
|
|
189
187
|
/* @__PURE__ */ P($, { ...u, key: "previous", type: m.previous }),
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
188
|
+
r,
|
|
189
|
+
me && /* @__PURE__ */ P(
|
|
190
|
+
E,
|
|
193
191
|
{
|
|
194
192
|
...u,
|
|
195
193
|
key: s + 1,
|
|
@@ -201,37 +199,36 @@ function Ee(g, d) {
|
|
|
201
199
|
] });
|
|
202
200
|
}
|
|
203
201
|
let A = null;
|
|
204
|
-
return typeof
|
|
202
|
+
return typeof x == "boolean" && x && (A = /* @__PURE__ */ c("div", { className: `${o}-total-text`, children: b?.Pagination?.total?.replace?.("{0}", h) })), typeof x == "function" && (A = /* @__PURE__ */ c("div", { className: `${o}-total-text`, children: x(h, [(e - 1) * f + 1, e * f]) })), /* @__PURE__ */ O(
|
|
205
203
|
"div",
|
|
206
204
|
{
|
|
207
|
-
...be(
|
|
205
|
+
...be(i),
|
|
208
206
|
className: Ce,
|
|
209
|
-
style:
|
|
207
|
+
style: Y,
|
|
210
208
|
ref: d,
|
|
211
209
|
children: [
|
|
212
210
|
A,
|
|
213
211
|
J,
|
|
214
|
-
|
|
212
|
+
fe !== !1 && /* @__PURE__ */ c(
|
|
215
213
|
Me,
|
|
216
214
|
{
|
|
217
215
|
disabled: z,
|
|
218
216
|
rootPrefixCls: o,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
onPageSizeChange: re,
|
|
217
|
+
sizeOptions: te,
|
|
218
|
+
onPageSizeChange: Pe,
|
|
222
219
|
pageSize: f,
|
|
223
220
|
size: y,
|
|
224
|
-
selectProps:
|
|
221
|
+
selectProps: oe
|
|
225
222
|
}
|
|
226
223
|
),
|
|
227
|
-
!
|
|
224
|
+
!C && M && /* @__PURE__ */ c(
|
|
228
225
|
G,
|
|
229
226
|
{
|
|
230
227
|
disabled: z,
|
|
231
228
|
rootPrefixCls: o,
|
|
232
229
|
totalPages: s,
|
|
233
230
|
current: e,
|
|
234
|
-
onPageChange:
|
|
231
|
+
onPageChange: k,
|
|
235
232
|
size: y
|
|
236
233
|
}
|
|
237
234
|
)
|
|
@@ -239,8 +236,8 @@ function Ee(g, d) {
|
|
|
239
236
|
}
|
|
240
237
|
);
|
|
241
238
|
}
|
|
242
|
-
const
|
|
243
|
-
|
|
239
|
+
const Ee = we(Oe);
|
|
240
|
+
Ee.displayName = "Pagination";
|
|
244
241
|
export {
|
|
245
|
-
|
|
242
|
+
Ee as default
|
|
246
243
|
};
|
package/qr-code/index.js
CHANGED
|
@@ -46,7 +46,7 @@ import "../dist/react-transition-group/src/ReplaceTransition.js";
|
|
|
46
46
|
import "../dist/react-transition-group/src/SwitchTransition.js";
|
|
47
47
|
import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
48
48
|
import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
49
|
-
import "
|
|
49
|
+
import "../utils/responsiveObserve.js";
|
|
50
50
|
import "@unicom-cloud/utils/file/saveAs";
|
|
51
51
|
import "@unicom-cloud/utils/screenfull";
|
|
52
52
|
import "@unicom-cloud/utils/tinycolor";
|
|
@@ -55,6 +55,7 @@ import "@unicom-cloud/utils/constant/ui.js";
|
|
|
55
55
|
import "react-is";
|
|
56
56
|
import "@unicom-cloud/utils/tree";
|
|
57
57
|
import "@unicom-cloud/utils/is";
|
|
58
|
+
import "uuid";
|
|
58
59
|
import "../dist/validate/src/index.js";
|
|
59
60
|
import h from "../config-provider/context.js";
|
|
60
61
|
const q = {
|
|
@@ -66,7 +67,7 @@ const q = {
|
|
|
66
67
|
bgColor: "#ffffff",
|
|
67
68
|
marginSize: 0,
|
|
68
69
|
value: "qr-code"
|
|
69
|
-
},
|
|
70
|
+
}, wo = (e) => {
|
|
70
71
|
const { getPrefixCls: s, componentConfig: n } = Q(h), d = R(
|
|
71
72
|
e,
|
|
72
73
|
q,
|
|
@@ -114,5 +115,5 @@ const q = {
|
|
|
114
115
|
);
|
|
115
116
|
};
|
|
116
117
|
export {
|
|
117
|
-
|
|
118
|
+
wo as default
|
|
118
119
|
};
|
package/radio/Group.js
CHANGED
package/row-col/Col-.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx as F } from "react/jsx-runtime";
|
|
2
|
+
import G from "lodash/isArray";
|
|
3
|
+
import H from "lodash/isNumber";
|
|
4
|
+
import T from "lodash/isPlainObject";
|
|
5
|
+
import { forwardRef as q, useContext as j, useMemo as D } from "react";
|
|
6
|
+
import "../config-provider/ConfigProvider.js";
|
|
7
|
+
import { COLS as I } from "../constant/index.js";
|
|
8
|
+
import J from "../components/common/hooks/useMergeProps.js";
|
|
9
|
+
import K from "@unicom-cloud/utils/class-name";
|
|
10
|
+
import { RowContext as Q } from "./context.js";
|
|
11
|
+
import U from "../config-provider/context.js";
|
|
12
|
+
const W = {
|
|
13
|
+
span: I
|
|
14
|
+
};
|
|
15
|
+
function L(i) {
|
|
16
|
+
return typeof i == "string" && /\d+[px|%|em|rem|]{1}/.test(i) ? `0 0 ${i}` : i;
|
|
17
|
+
}
|
|
18
|
+
function X(i, O) {
|
|
19
|
+
const { getPrefixCls: R, componentConfig: v, rtl: w } = j(U), C = J(
|
|
20
|
+
i,
|
|
21
|
+
W,
|
|
22
|
+
v?.Col
|
|
23
|
+
), { gutter: p, div: l } = j(Q), {
|
|
24
|
+
className: M,
|
|
25
|
+
style: N,
|
|
26
|
+
children: V,
|
|
27
|
+
span: k,
|
|
28
|
+
offset: d,
|
|
29
|
+
order: a,
|
|
30
|
+
pull: m,
|
|
31
|
+
push: u,
|
|
32
|
+
xs: c,
|
|
33
|
+
sm: g,
|
|
34
|
+
md: x,
|
|
35
|
+
lg: h,
|
|
36
|
+
xl: y,
|
|
37
|
+
xxl: P,
|
|
38
|
+
xxxl: S,
|
|
39
|
+
flex: e,
|
|
40
|
+
...z
|
|
41
|
+
} = C;
|
|
42
|
+
function A(r, o) {
|
|
43
|
+
const b = { xs: c, sm: g, md: x, lg: h, xl: y, xxl: P, xxxl: S };
|
|
44
|
+
return Object.keys(b).forEach((s) => {
|
|
45
|
+
const t = b[s];
|
|
46
|
+
H(t) ? t >= 0 && (o[`${r}-${s}-${t}`] = !0) : T(t) && (o[`${r}-${s}-${t.span}`] = t.span, o[`${r}-${s}-offset-${t.offset}`] = t.offset, o[`${r}-${s}-order-${t.order}`] = t.order, o[`${r}-${s}-pull-${t.pull}`] = t.pull, o[`${r}-${s}-push-${t.push}`] = t.push);
|
|
47
|
+
}), o;
|
|
48
|
+
}
|
|
49
|
+
const n = R?.("col");
|
|
50
|
+
let $ = {
|
|
51
|
+
[`${n}`]: !l,
|
|
52
|
+
[`${n}-order-${a}`]: a,
|
|
53
|
+
[`${n}-${k}`]: !l && !c && !g && !x && !h && !y && !P && !S,
|
|
54
|
+
[`${n}-offset-${d}`]: d,
|
|
55
|
+
[`${n}-pull-${m}`]: m,
|
|
56
|
+
[`${n}-push-${u}`]: u,
|
|
57
|
+
[`${n}-rtl`]: w
|
|
58
|
+
};
|
|
59
|
+
$ = A(n, $);
|
|
60
|
+
const B = K(e ? n : $, M), f = {};
|
|
61
|
+
if (G(p) && !l) {
|
|
62
|
+
const r = p[0] && p[0] / 2 || 0, o = p[1] && p[1] / 2 || 0;
|
|
63
|
+
r && (f.paddingLeft = r, f.paddingRight = r), o && (f.paddingTop = o, f.paddingBottom = o);
|
|
64
|
+
}
|
|
65
|
+
const E = D(
|
|
66
|
+
() => L(e) ? { flex: L(e) } : {},
|
|
67
|
+
[e]
|
|
68
|
+
);
|
|
69
|
+
return /* @__PURE__ */ F(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
ref: O,
|
|
73
|
+
...z,
|
|
74
|
+
style: {
|
|
75
|
+
...N,
|
|
76
|
+
...f,
|
|
77
|
+
...E
|
|
78
|
+
},
|
|
79
|
+
className: B,
|
|
80
|
+
children: V
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
const Y = q(X);
|
|
85
|
+
Y.displayName = "Col";
|
|
86
|
+
export {
|
|
87
|
+
Y as default
|
|
88
|
+
};
|