@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/list/Item.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as n, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import m, { useContext as L } from "react";
|
|
3
3
|
import "../config-provider/ConfigProvider.js";
|
|
4
4
|
import M from "../components/common/hooks/useMergeProps.js";
|
|
5
5
|
import P from "@unicom-cloud/utils/class-name";
|
|
6
|
-
import
|
|
6
|
+
import p from "./Meta.js";
|
|
7
7
|
import R from "../config-provider/context.js";
|
|
8
8
|
const j = {
|
|
9
9
|
actionLayout: "horizontal"
|
|
10
10
|
};
|
|
11
|
-
function w(
|
|
12
|
-
const { getPrefixCls:
|
|
13
|
-
|
|
11
|
+
function w(d, h) {
|
|
12
|
+
const { getPrefixCls: u, componentConfig: C } = L(R), x = M(
|
|
13
|
+
d,
|
|
14
14
|
j,
|
|
15
|
-
|
|
16
|
-
), { children: N, className: $, actions: e, extra:
|
|
17
|
-
|
|
18
|
-
t && t.type && t.type ===
|
|
15
|
+
C?.ListItem
|
|
16
|
+
), { children: N, className: $, actions: e, extra: a, actionLayout: i, ...g } = x, o = `${u?.("list")}-item`, r = [], s = [];
|
|
17
|
+
m.Children.forEach(N, (t) => {
|
|
18
|
+
t && t.type && t.type === p ? r.push(t) : s.push(t);
|
|
19
19
|
});
|
|
20
|
-
const v = s.length ? /* @__PURE__ */ n("div", { className: `${o}-content`, children: s }) : null, y =
|
|
21
|
-
return /* @__PURE__ */
|
|
20
|
+
const v = s.length ? /* @__PURE__ */ n("div", { className: `${o}-content`, children: s }) : null, y = a ? /* @__PURE__ */ n("div", { className: `${o}-extra-content`, children: a }) : null, c = e && e.length ? /* @__PURE__ */ n("div", { className: `${o}-action`, children: e.map((t, I) => /* @__PURE__ */ n("li", { children: t }, `${o}-action-${I}`)) }) : null;
|
|
21
|
+
return /* @__PURE__ */ l(
|
|
22
22
|
"div",
|
|
23
23
|
{
|
|
24
24
|
role: "listitem",
|
|
25
|
-
ref:
|
|
25
|
+
ref: h,
|
|
26
26
|
className: P(o, $),
|
|
27
27
|
...g,
|
|
28
28
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
29
|
+
/* @__PURE__ */ l("div", { className: `${o}-main`, children: [
|
|
30
|
+
r,
|
|
31
31
|
v,
|
|
32
|
-
|
|
32
|
+
i === "vertical" ? c : null
|
|
33
33
|
] }),
|
|
34
|
-
|
|
34
|
+
i === "horizontal" ? c : null,
|
|
35
35
|
y
|
|
36
36
|
]
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
|
-
const z =
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
const z = m.forwardRef(w), f = z;
|
|
41
|
+
f.displayName = "ListItem";
|
|
42
|
+
f.Meta = p;
|
|
43
43
|
export {
|
|
44
|
-
|
|
44
|
+
f as default
|
|
45
45
|
};
|
package/list/index.js
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
import { jsx as c, jsxs as N, Fragment as Rt } from "react/jsx-runtime";
|
|
2
2
|
import Y, { useContext as jt, useRef as h, useState as j, useImperativeHandle as xt, useCallback as Dt, createElement as Ft } from "react";
|
|
3
|
+
import Mt from "lodash/isArray";
|
|
3
4
|
import At from "lodash/throttle";
|
|
4
5
|
import "../config-provider/ConfigProvider.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import Tt from "../spin/index.js";
|
|
6
|
+
import Ht from "../components/common/hooks/useMergeProps.js";
|
|
7
|
+
import Tt from "../pagination/Pagination.js";
|
|
8
|
+
import J from "../row-col/index.js";
|
|
9
|
+
import Bt from "../spin/index.js";
|
|
10
10
|
import x from "@unicom-cloud/utils/class-name";
|
|
11
|
-
import { omit as
|
|
12
|
-
import { pickDataAttributes as
|
|
13
|
-
import { scrollIntoView as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
|
|
11
|
+
import { omit as Vt } from "../components/common/utils/omit.js";
|
|
12
|
+
import { pickDataAttributes as _t } from "../components/common/utils/pick.js";
|
|
13
|
+
import { scrollIntoView as kt } from "../components/common/utils/scrollIntoViewIfNeeded.js";
|
|
14
|
+
import Gt from "../virtual-list/VirtualList.js";
|
|
15
|
+
import Ot from "./Item.js";
|
|
16
|
+
import Ut from "../config-provider/context.js";
|
|
17
|
+
import K from "../row-col/Col.js";
|
|
18
|
+
const Q = 10, X = 1, Wt = ["small", "default", "large"], Zt = {
|
|
18
19
|
split: !0,
|
|
19
20
|
bordered: !0,
|
|
20
21
|
defaultCurrent: 1,
|
|
21
22
|
offsetBottom: 0,
|
|
22
23
|
throttleDelay: 500
|
|
23
24
|
};
|
|
24
|
-
function
|
|
25
|
+
function qt(et, D) {
|
|
25
26
|
const {
|
|
26
27
|
getPrefixCls: rt,
|
|
27
28
|
loadingElement: ot,
|
|
28
29
|
size: F,
|
|
29
30
|
renderEmpty: nt,
|
|
30
31
|
componentConfig: lt,
|
|
31
|
-
rtl:
|
|
32
|
-
} = jt(
|
|
32
|
+
rtl: M
|
|
33
|
+
} = jt(Ut), p = Ht(
|
|
33
34
|
et,
|
|
34
|
-
|
|
35
|
+
Zt,
|
|
35
36
|
lt?.List
|
|
36
37
|
), {
|
|
37
38
|
style: st,
|
|
@@ -41,15 +42,15 @@ function Zt(et, D) {
|
|
|
41
42
|
children: L = [],
|
|
42
43
|
dataSource: g = [],
|
|
43
44
|
size: ut,
|
|
44
|
-
footer:
|
|
45
|
+
footer: A,
|
|
45
46
|
header: H,
|
|
46
47
|
pagination: r,
|
|
47
48
|
bordered: mt,
|
|
48
49
|
split: pt,
|
|
49
50
|
render: P,
|
|
50
51
|
grid: u,
|
|
51
|
-
loading:
|
|
52
|
-
hoverable:
|
|
52
|
+
loading: ft,
|
|
53
|
+
hoverable: dt,
|
|
53
54
|
scrollLoading: C,
|
|
54
55
|
paginationInFooter: T,
|
|
55
56
|
offsetBottom: gt,
|
|
@@ -59,7 +60,7 @@ function Zt(et, D) {
|
|
|
59
60
|
listRef: St,
|
|
60
61
|
onReachBottom: y,
|
|
61
62
|
onListScroll: S
|
|
62
|
-
} = p, $t = ut || (
|
|
63
|
+
} = p, $t = ut || (Wt.indexOf(F) > -1 ? F : "default"), t = rt?.("list"), I = h(null), v = h(null), f = h(null), w = h(null), z = h(!0), [Nt, Lt] = j(
|
|
63
64
|
r && typeof r == "object" && (r.pageSize || r.defaultPageSize) || Q
|
|
64
65
|
), [Pt, yt] = j(
|
|
65
66
|
r && typeof r == "object" && (r.current || r.defaultCurrent) || X
|
|
@@ -71,8 +72,8 @@ function Zt(et, D) {
|
|
|
71
72
|
v.current.scrollTo({ index: o, options: n });
|
|
72
73
|
else if (w.current) {
|
|
73
74
|
const a = w.current.children[o];
|
|
74
|
-
a &&
|
|
75
|
-
boundary:
|
|
75
|
+
a && kt(a, {
|
|
76
|
+
boundary: f.current,
|
|
76
77
|
...n
|
|
77
78
|
});
|
|
78
79
|
}
|
|
@@ -98,12 +99,12 @@ function Zt(et, D) {
|
|
|
98
99
|
const _ = !!(S || y), k = Dt(
|
|
99
100
|
At(() => {
|
|
100
101
|
if (S) {
|
|
101
|
-
S(
|
|
102
|
+
S(f.current);
|
|
102
103
|
return;
|
|
103
104
|
}
|
|
104
|
-
if (!
|
|
105
|
+
if (!f.current)
|
|
105
106
|
return;
|
|
106
|
-
const { scrollTop: o, scrollHeight: n, clientHeight: a } =
|
|
107
|
+
const { scrollTop: o, scrollHeight: n, clientHeight: a } = f.current, s = n - (o + a);
|
|
107
108
|
Math.abs(s) < gt + 1 ? z.current && (It(E + 1), y?.(E + 1), z.current = !1) : z.current = !0;
|
|
108
109
|
}, B),
|
|
109
110
|
[B, E, S, y]
|
|
@@ -124,39 +125,39 @@ function Zt(et, D) {
|
|
|
124
125
|
column: Et,
|
|
125
126
|
...O
|
|
126
127
|
} = u, R = Et || Math.floor(24 / u.span), bt = O.span || Math.floor(24 / R);
|
|
127
|
-
let
|
|
128
|
-
for (;
|
|
129
|
-
const U =
|
|
128
|
+
let d = 0;
|
|
129
|
+
for (; d < l.length; ) {
|
|
130
|
+
const U = d + R, W = ~~(d / R);
|
|
130
131
|
e.push(
|
|
131
132
|
/* @__PURE__ */ c(
|
|
132
|
-
|
|
133
|
+
J,
|
|
133
134
|
{
|
|
134
135
|
className: `${t}-row`,
|
|
135
136
|
gutter: $,
|
|
136
137
|
justify: wt,
|
|
137
138
|
align: zt,
|
|
138
|
-
children: l.slice(
|
|
139
|
-
|
|
139
|
+
children: l.slice(d, U).map((Z, q) => /* @__PURE__ */ c(
|
|
140
|
+
K,
|
|
140
141
|
{
|
|
141
142
|
className: `${t}-row-col`,
|
|
142
143
|
...O,
|
|
143
144
|
span: bt,
|
|
144
|
-
children: i ? i(Z,
|
|
145
|
+
children: i ? i(Z, d + q) : Z
|
|
145
146
|
},
|
|
146
147
|
`${W}_${q}`
|
|
147
148
|
))
|
|
148
149
|
},
|
|
149
150
|
W
|
|
150
151
|
)
|
|
151
|
-
),
|
|
152
|
+
), d = U;
|
|
152
153
|
}
|
|
153
154
|
return e;
|
|
154
155
|
}
|
|
155
|
-
return /* @__PURE__ */ c(
|
|
156
|
-
|
|
156
|
+
return /* @__PURE__ */ c(J, { className: `${t}-row`, gutter: u.gutter, children: l.map((e, $) => /* @__PURE__ */ Ft(
|
|
157
|
+
K,
|
|
157
158
|
{
|
|
158
159
|
className: `${t}-row-col`,
|
|
159
|
-
...
|
|
160
|
+
...Vt(u, ["gutter"]),
|
|
160
161
|
key: $
|
|
161
162
|
},
|
|
162
163
|
i ? i(e, $) : e
|
|
@@ -164,8 +165,8 @@ function Zt(et, D) {
|
|
|
164
165
|
};
|
|
165
166
|
return g.length > 0 && P ? u ? a(g, P) : n(g, P) : V > 0 ? u ? a(L) : n(L) : C ? null : Ct || nt("List");
|
|
166
167
|
}, G = () => {
|
|
167
|
-
const o = vt(), n = b && b.threshold !== null &&
|
|
168
|
-
|
|
168
|
+
const o = vt(), n = b && b.threshold !== null && Mt(o), a = r ? /* @__PURE__ */ c(
|
|
169
|
+
Tt,
|
|
169
170
|
{
|
|
170
171
|
...m,
|
|
171
172
|
className: x(
|
|
@@ -183,14 +184,14 @@ function Zt(et, D) {
|
|
|
183
184
|
style: it,
|
|
184
185
|
className: x(
|
|
185
186
|
`${t}-wrapper`,
|
|
186
|
-
{ [`${t}-wrapper-rtl`]:
|
|
187
|
+
{ [`${t}-wrapper-rtl`]: M },
|
|
187
188
|
ct
|
|
188
189
|
),
|
|
189
190
|
children: [
|
|
190
191
|
/* @__PURE__ */ N(
|
|
191
192
|
"div",
|
|
192
193
|
{
|
|
193
|
-
...
|
|
194
|
+
..._t(p),
|
|
194
195
|
style: st,
|
|
195
196
|
className: x(
|
|
196
197
|
t,
|
|
@@ -198,23 +199,23 @@ function Zt(et, D) {
|
|
|
198
199
|
{
|
|
199
200
|
[`${t}-no-border`]: !mt,
|
|
200
201
|
[`${t}-no-split`]: !pt,
|
|
201
|
-
[`${t}-hoverable`]:
|
|
202
|
-
[`${t}-rtl`]:
|
|
202
|
+
[`${t}-hoverable`]: dt,
|
|
203
|
+
[`${t}-rtl`]: M
|
|
203
204
|
},
|
|
204
205
|
at
|
|
205
206
|
),
|
|
206
207
|
ref: (e) => {
|
|
207
|
-
n || (
|
|
208
|
+
n || (f.current = e);
|
|
208
209
|
},
|
|
209
210
|
onScroll: !n && _ ? k : void 0,
|
|
210
211
|
children: [
|
|
211
212
|
H ? /* @__PURE__ */ c("div", { className: `${t}-header`, children: H }) : null,
|
|
212
213
|
n ? /* @__PURE__ */ c(Rt, { children: /* @__PURE__ */ c(
|
|
213
|
-
|
|
214
|
+
Gt,
|
|
214
215
|
{
|
|
215
216
|
role: "list",
|
|
216
217
|
ref: (e) => {
|
|
217
|
-
e && (v.current = e,
|
|
218
|
+
e && (v.current = e, f.current = e.dom);
|
|
218
219
|
},
|
|
219
220
|
className: `${t}-content ${t}-virtual`,
|
|
220
221
|
data: l ? o.concat(l) : o,
|
|
@@ -235,8 +236,8 @@ function Zt(et, D) {
|
|
|
235
236
|
]
|
|
236
237
|
}
|
|
237
238
|
),
|
|
238
|
-
|
|
239
|
-
|
|
239
|
+
A || s ? /* @__PURE__ */ N("div", { className: `${t}-footer`, children: [
|
|
240
|
+
A,
|
|
240
241
|
s
|
|
241
242
|
] }) : null
|
|
242
243
|
]
|
|
@@ -248,21 +249,21 @@ function Zt(et, D) {
|
|
|
248
249
|
);
|
|
249
250
|
};
|
|
250
251
|
return "loading" in p ? /* @__PURE__ */ c(
|
|
251
|
-
|
|
252
|
+
Bt,
|
|
252
253
|
{
|
|
253
254
|
style: { display: "block" },
|
|
254
|
-
loading:
|
|
255
|
+
loading: ft,
|
|
255
256
|
element: ot,
|
|
256
257
|
children: G()
|
|
257
258
|
}
|
|
258
259
|
) : G();
|
|
259
260
|
}
|
|
260
261
|
const tt = Y.forwardRef(
|
|
261
|
-
|
|
262
|
+
qt
|
|
262
263
|
);
|
|
263
264
|
tt.displayName = "List";
|
|
264
|
-
tt.Item =
|
|
265
|
+
tt.Item = Ot;
|
|
265
266
|
export {
|
|
266
|
-
|
|
267
|
+
Ot as ListItem,
|
|
267
268
|
tt as default
|
|
268
269
|
};
|
package/marquee/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import "@unicom-cloud/utils/constant";
|
|
|
14
14
|
import "lodash/debounce";
|
|
15
15
|
import "@unicom-cloud/utils/date";
|
|
16
16
|
import "@unicom-cloud/utils/case-name";
|
|
17
|
-
import
|
|
17
|
+
import mt from "@unicom-cloud/utils/class-name";
|
|
18
18
|
import "@unicom-cloud/utils/constant/ui";
|
|
19
19
|
import "../utils/contextHolder.js";
|
|
20
20
|
import "@unicom-cloud/utils/clipboard-copy";
|
|
@@ -45,8 +45,8 @@ import "../dist/react-transition-group/src/ReplaceTransition.js";
|
|
|
45
45
|
import "../dist/react-transition-group/src/SwitchTransition.js";
|
|
46
46
|
import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
47
47
|
import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
48
|
-
import { resizeObserver as
|
|
49
|
-
import "
|
|
48
|
+
import { resizeObserver as lt } from "../components/common/utils/resizeObserver.js";
|
|
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 { isPlainObject as pt } from "@unicom-cloud/utils/is";
|
|
58
|
+
import "uuid";
|
|
58
59
|
import "../dist/validate/src/index.js";
|
|
59
60
|
import ct from "../config-provider/context.js";
|
|
60
61
|
const o = {
|
|
@@ -67,7 +68,7 @@ const o = {
|
|
|
67
68
|
delay: 0.0227,
|
|
68
69
|
// 设置非 0 为了解决 onAnimationEnd={onFinish} 立即被调用的问题
|
|
69
70
|
loop: 0
|
|
70
|
-
},
|
|
71
|
+
}, Ce = it(
|
|
71
72
|
function(E, I) {
|
|
72
73
|
const { getPrefixCls: z, componentConfig: V } = ot(ct), i = z?.("marquee"), t = z?.("marquee-var"), _ = st(
|
|
73
74
|
E,
|
|
@@ -76,7 +77,7 @@ const o = {
|
|
|
76
77
|
), {
|
|
77
78
|
style: F,
|
|
78
79
|
className: D,
|
|
79
|
-
autoFill:
|
|
80
|
+
autoFill: m = o.autoFill,
|
|
80
81
|
play: c = o.play,
|
|
81
82
|
pauseOnHover: v = o.pauseOnHover,
|
|
82
83
|
pauseOnClick: M = o.pauseOnClick,
|
|
@@ -95,29 +96,29 @@ const o = {
|
|
|
95
96
|
{ size: L ? 50 : 20, color: "#fff" },
|
|
96
97
|
r
|
|
97
98
|
));
|
|
98
|
-
const [k, Q] = C(0), [$, T] = C(0), [y, U] = C(1), [N, X] = C(!1), Y = j(null),
|
|
99
|
-
if (u.current &&
|
|
100
|
-
const n =
|
|
99
|
+
const [k, Q] = C(0), [$, T] = C(0), [y, U] = C(1), [N, X] = C(!1), Y = j(null), l = I || Y, u = j(null), d = A(() => {
|
|
100
|
+
if (u.current && l.current) {
|
|
101
|
+
const n = l.current.getBoundingClientRect(), f = u.current.getBoundingClientRect();
|
|
101
102
|
let a = n.width, p = f.width;
|
|
102
103
|
(e === "up" || e === "down") && (a = n.height, p = f.height), U(
|
|
103
|
-
|
|
104
|
+
m && a && p ? Math.max(2, Math.ceil(a / p)) : 1
|
|
104
105
|
), Q(a), T(p);
|
|
105
106
|
}
|
|
106
|
-
}, [
|
|
107
|
+
}, [m, l, e]);
|
|
107
108
|
O(() => {
|
|
108
109
|
if (!N) return;
|
|
109
110
|
d();
|
|
110
|
-
const n =
|
|
111
|
-
[
|
|
111
|
+
const n = lt(
|
|
112
|
+
[l.current, u.current],
|
|
112
113
|
d
|
|
113
114
|
);
|
|
114
115
|
return () => {
|
|
115
116
|
n();
|
|
116
117
|
};
|
|
117
|
-
}, [d,
|
|
118
|
+
}, [d, l, u, N]), O(() => (d(), () => {
|
|
118
119
|
}), [d, g]), O(() => (X(!0), w && w(), () => {
|
|
119
120
|
}), [w]);
|
|
120
|
-
const P = h(() => $ ?
|
|
121
|
+
const P = h(() => $ ? m ? $ * y / q : Math.max(k, $) / q : 0, [m, k, $, y, q]), Z = h(
|
|
121
122
|
() => ({
|
|
122
123
|
...F,
|
|
123
124
|
[`--${t}-pause-on-hover`]: !c || v ? "paused" : "running",
|
|
@@ -139,9 +140,9 @@ const o = {
|
|
|
139
140
|
[`--${t}-duration`]: `${P}s`,
|
|
140
141
|
[`--${t}-delay`]: `${W}s`,
|
|
141
142
|
[`--${t}-iteration-count`]: x ? `${x}` : "infinite",
|
|
142
|
-
[`--${t}-min-width`]:
|
|
143
|
+
[`--${t}-min-width`]: m ? "auto" : "100%"
|
|
143
144
|
}),
|
|
144
|
-
[t, c, e, P, W, x,
|
|
145
|
+
[t, c, e, P, W, x, m]
|
|
145
146
|
), R = h(
|
|
146
147
|
() => ({
|
|
147
148
|
[`--${t}-transform`]: e === "up" ? "rotate(90deg)" : e === "down" ? "rotate(-90deg)" : "none"
|
|
@@ -162,9 +163,9 @@ const o = {
|
|
|
162
163
|
return N ? /* @__PURE__ */ s(rt, { children: /* @__PURE__ */ H(
|
|
163
164
|
"div",
|
|
164
165
|
{
|
|
165
|
-
ref:
|
|
166
|
+
ref: l,
|
|
166
167
|
style: Z,
|
|
167
|
-
className:
|
|
168
|
+
className: mt(i, `${i}-${e}`, D),
|
|
168
169
|
children: [
|
|
169
170
|
!!r && /* @__PURE__ */ s("div", { style: tt, className: `${i}-overlay` }),
|
|
170
171
|
/* @__PURE__ */ H(
|
|
@@ -202,5 +203,5 @@ const o = {
|
|
|
202
203
|
}
|
|
203
204
|
);
|
|
204
205
|
export {
|
|
205
|
-
|
|
206
|
+
Ce as default
|
|
206
207
|
};
|
package/marquee-/index.js
CHANGED
|
@@ -46,7 +46,7 @@ import "../dist/react-transition-group/src/SwitchTransition.js";
|
|
|
46
46
|
import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
47
47
|
import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
48
48
|
import { resizeObserver as et } from "../components/common/utils/resizeObserver.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 { isPlainObject as q } from "@unicom-cloud/utils/is";
|
|
58
|
+
import "uuid";
|
|
58
59
|
import "../dist/validate/src/index.js";
|
|
59
60
|
import rt from "../config-provider/context.js";
|
|
60
61
|
const ot = {
|
|
@@ -62,7 +63,7 @@ const ot = {
|
|
|
62
63
|
direction: "left",
|
|
63
64
|
pauseOnHover: !1,
|
|
64
65
|
loop: 0
|
|
65
|
-
},
|
|
66
|
+
}, pe = (R) => {
|
|
66
67
|
const { getPrefixCls: L, componentConfig: D } = V(rt), s = L?.("marquee"), E = _(
|
|
67
68
|
R,
|
|
68
69
|
ot,
|
|
@@ -256,5 +257,5 @@ const ot = {
|
|
|
256
257
|
);
|
|
257
258
|
};
|
|
258
259
|
export {
|
|
259
|
-
|
|
260
|
+
pe as default
|
|
260
261
|
};
|
package/mentions/util.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import i from "lodash/isArray";
|
|
2
|
+
function u(n, { split: e }) {
|
|
2
3
|
return !e || n.indexOf(e) === -1;
|
|
3
4
|
}
|
|
4
5
|
function a({
|
|
@@ -7,12 +8,12 @@ function a({
|
|
|
7
8
|
}) {
|
|
8
9
|
return n.slice(0, e);
|
|
9
10
|
}
|
|
10
|
-
function
|
|
11
|
-
return (
|
|
11
|
+
function f(n, e = "") {
|
|
12
|
+
return (i(e) ? e : [e]).reduce(
|
|
12
13
|
(t, r) => {
|
|
13
|
-
const
|
|
14
|
-
return
|
|
15
|
-
location:
|
|
14
|
+
const o = n.lastIndexOf(r);
|
|
15
|
+
return o > t.location ? {
|
|
16
|
+
location: o,
|
|
16
17
|
prefix: r
|
|
17
18
|
} : t;
|
|
18
19
|
},
|
|
@@ -21,6 +22,6 @@ function s(n, e = "") {
|
|
|
21
22
|
}
|
|
22
23
|
export {
|
|
23
24
|
a as getBeforeSelectionText,
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
f as getLastMeasureIndex,
|
|
26
|
+
u as isValidSearch
|
|
26
27
|
};
|
package/modal/Confirm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as r, jsxs as P } from "react/jsx-runtime";
|
|
2
|
+
import x from "@unicom-cloud/icons/IconUiCheckCircleFill";
|
|
3
3
|
import y from "@unicom-cloud/icons/IconUiCloseCircleFill";
|
|
4
4
|
import u from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
5
5
|
import F from "@unicom-cloud/icons/IconUiInfoCircleFill";
|
|
@@ -8,42 +8,42 @@ import M from "../config-provider/ConfigProvider.js";
|
|
|
8
8
|
import N from "./Modal.js";
|
|
9
9
|
import { destroyList as f, getConfigProviderProps as O, getModalConfig as U } from "./config.js";
|
|
10
10
|
function w(e) {
|
|
11
|
-
const {
|
|
12
|
-
return /* @__PURE__ */
|
|
11
|
+
const { simple: n } = U();
|
|
12
|
+
return /* @__PURE__ */ r(N, { simple: n, ...e, children: e.content });
|
|
13
13
|
}
|
|
14
14
|
const p = (e) => {
|
|
15
|
-
let
|
|
16
|
-
if (!
|
|
17
|
-
if (
|
|
18
|
-
if (
|
|
15
|
+
let n = e.icon;
|
|
16
|
+
if (!n) {
|
|
17
|
+
if (n !== null) {
|
|
18
|
+
if (n = /* @__PURE__ */ r(u, {}), e.isNotice)
|
|
19
19
|
switch (e.noticeType) {
|
|
20
20
|
case "info":
|
|
21
|
-
|
|
21
|
+
n = /* @__PURE__ */ r(F, {});
|
|
22
22
|
break;
|
|
23
23
|
case "success":
|
|
24
|
-
|
|
24
|
+
n = /* @__PURE__ */ r(x, {});
|
|
25
25
|
break;
|
|
26
26
|
case "warning":
|
|
27
|
-
|
|
27
|
+
n = /* @__PURE__ */ r(u, {});
|
|
28
28
|
break;
|
|
29
29
|
case "error":
|
|
30
|
-
|
|
30
|
+
n = /* @__PURE__ */ r(y, {});
|
|
31
31
|
break;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
return e.noticeType === "show" && (
|
|
36
|
-
|
|
35
|
+
return e.noticeType === "show" && (n = e.icon), e.isNotice && (e.hideCancel = !0), e.title = n === null && e.title === null ? null : /* @__PURE__ */ P("span", { children: [
|
|
36
|
+
n,
|
|
37
37
|
e.title
|
|
38
38
|
] }), e;
|
|
39
39
|
};
|
|
40
|
-
function D(e,
|
|
40
|
+
function D(e, n) {
|
|
41
41
|
let i;
|
|
42
42
|
const l = document.createElement("div");
|
|
43
43
|
l.className = "pqb-modal-root", document.body.appendChild(l);
|
|
44
44
|
const C = O();
|
|
45
45
|
function h(t) {
|
|
46
|
-
const c = /* @__PURE__ */
|
|
46
|
+
const c = /* @__PURE__ */ r(M, { ...C, childrenName: "ModalConfirm", children: /* @__PURE__ */ r(
|
|
47
47
|
w,
|
|
48
48
|
{
|
|
49
49
|
getPopupContainer: () => l,
|
|
@@ -53,7 +53,7 @@ function D(e, r) {
|
|
|
53
53
|
) });
|
|
54
54
|
i ||= I(l), i.render(c);
|
|
55
55
|
}
|
|
56
|
-
const s =
|
|
56
|
+
const s = n || h;
|
|
57
57
|
let o = {
|
|
58
58
|
...e,
|
|
59
59
|
visible: !1
|