@unicom-cloud/ui 0.8.102 → 0.8.104
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/Copy.js +1 -1
- package/LiquidFill.js +1 -1
- package/Marquee.js +2 -2
- package/QrCode.js +1 -1
- package/Spin.js +6 -3
- package/Tour.js +1 -1
- package/badge/Count.js +12 -12
- package/badge/index.js +35 -35
- package/components/common/space/index.js +24 -24
- package/copy/index.js +1 -1
- package/divider/index.js +45 -31
- package/grid/Col.js +32 -32
- package/grid/Row.js +53 -44
- package/liquid-fill/index.js +1 -1
- package/liquid-fill/interface.js +1 -0
- package/marquee/index.js +143 -221
- package/marquee/interface.js +1 -0
- package/marquee-/index.js +260 -0
- package/marquee-/interface.js +1 -0
- package/package.json +1 -1
- package/qr-code/index.js +1 -1
- package/spin/DotLoading.js +3 -3
- package/spin/index.js +70 -57
- package/style.css +1 -1
- package/table/hook/useThResizable.js +1 -1
- package/table/th-resizable/index.js +1 -1
- package/tour/index.js +1 -1
- package/tour/interface.js +1 -0
- package/types/pc/config-provider/interface.d.ts +8 -8
- package/types/pc/divider/interface.d.ts +9 -1
- package/types/pc/grid/Row.d.ts +2 -1
- package/types/pc/index.d.ts +4 -4
- package/types/pc/liquid-fill/index.d.ts +2 -113
- package/types/pc/liquid-fill/interface.d.ts +113 -0
- package/types/pc/marquee/index.d.ts +3 -60
- package/types/pc/marquee/interface.d.ts +95 -0
- package/types/pc/marquee-/index.d.ts +8 -0
- package/types/pc/marquee-/interface.d.ts +56 -0
- package/types/pc/qr-code/index.d.ts +1 -31
- package/types/pc/qr-code/interface.d.ts +26 -33
- package/types/pc/spin/interface.d.ts +2 -3
- package/types/pc/tour/index.d.ts +2 -45
- package/types/pc/tour/interface.d.ts +46 -0
- package/types/pc/utils/responsiveObserve.d.ts +8 -4
- package/typography/Ellipsis.js +1 -1
- package/typography/Operations.js +1 -1
- package/utils/responsiveObserve.js +32 -25
- package/version/index.js +1 -1
package/grid/Col.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as W } from "react/jsx-runtime";
|
|
2
|
+
import X from "lodash/isNil";
|
|
3
3
|
import M from "lodash/isNumber";
|
|
4
4
|
import B from "lodash/isPlainObject";
|
|
5
|
-
import { forwardRef as
|
|
5
|
+
import { forwardRef as Y, useContext as F, useState as Z, useMemo as b, useEffect as _ } from "react";
|
|
6
6
|
import "../config-provider/ConfigProvider.js";
|
|
7
7
|
import ee from "../components/common/hooks/useMergeProps.js";
|
|
8
8
|
import te from "@unicom-cloud/utils/class-name";
|
|
@@ -23,23 +23,23 @@ const ie = (i, E) => {
|
|
|
23
23
|
I?.["Grid.Col"]
|
|
24
24
|
), { gutter: C, div: o } = F(re), {
|
|
25
25
|
className: V,
|
|
26
|
-
style:
|
|
27
|
-
children:
|
|
26
|
+
style: q,
|
|
27
|
+
children: D,
|
|
28
28
|
span: g = 24,
|
|
29
|
-
offset:
|
|
29
|
+
offset: c,
|
|
30
30
|
order: u,
|
|
31
31
|
pull: m,
|
|
32
32
|
push: $,
|
|
33
33
|
xs: v,
|
|
34
|
-
sm:
|
|
35
|
-
md:
|
|
34
|
+
sm: P,
|
|
35
|
+
md: k,
|
|
36
36
|
lg: R,
|
|
37
37
|
xl: S,
|
|
38
38
|
xxl: w,
|
|
39
39
|
xxxl: O,
|
|
40
40
|
flex: j,
|
|
41
|
-
...
|
|
42
|
-
} = T, f = !
|
|
41
|
+
...H
|
|
42
|
+
} = T, f = !X(j), s = G?.("col"), [A, J] = Z({
|
|
43
43
|
xs: !1,
|
|
44
44
|
sm: !1,
|
|
45
45
|
md: !1,
|
|
@@ -47,14 +47,14 @@ const ie = (i, E) => {
|
|
|
47
47
|
xl: !1,
|
|
48
48
|
xxl: !1,
|
|
49
49
|
xxxl: !1
|
|
50
|
-
}), l = b(() => ({ xs: v, sm:
|
|
50
|
+
}), l = b(() => ({ xs: v, sm: P, md: k, lg: R, xl: S, xxl: w, xxxl: O }), [R, k, P, S, v, w, O]), K = b(() => {
|
|
51
51
|
if (f)
|
|
52
52
|
return;
|
|
53
53
|
const e = {
|
|
54
54
|
[`${s}`]: !o,
|
|
55
55
|
[`${s}-order-${u}`]: u,
|
|
56
56
|
[`${s}-${g}`]: !o && Object.values(l).every((r) => !r),
|
|
57
|
-
[`${s}-offset-${
|
|
57
|
+
[`${s}-offset-${c}`]: c,
|
|
58
58
|
[`${s}-pull-${m}`]: m,
|
|
59
59
|
[`${s}-push-${$}`]: $,
|
|
60
60
|
[`${s}-rtl`]: d
|
|
@@ -71,24 +71,24 @@ const ie = (i, E) => {
|
|
|
71
71
|
u,
|
|
72
72
|
g,
|
|
73
73
|
l,
|
|
74
|
-
|
|
74
|
+
c,
|
|
75
75
|
m,
|
|
76
76
|
$,
|
|
77
77
|
d
|
|
78
|
-
]), x = (e) => `${100 / 24 * e}%`,
|
|
78
|
+
]), x = (e) => `${100 / 24 * e}%`, Q = b(() => {
|
|
79
79
|
if (o || f)
|
|
80
80
|
return;
|
|
81
81
|
const e = {
|
|
82
82
|
span: g,
|
|
83
|
-
offset:
|
|
83
|
+
offset: c,
|
|
84
84
|
order: u,
|
|
85
85
|
pull: m,
|
|
86
86
|
push: $
|
|
87
87
|
}, r = y.find((a) => A[a]);
|
|
88
88
|
if (r) {
|
|
89
89
|
const a = y.indexOf(r);
|
|
90
|
-
for (let
|
|
91
|
-
const h = y[
|
|
90
|
+
for (let p = a; p < y.length; p++) {
|
|
91
|
+
const h = y[p], n = l[h];
|
|
92
92
|
if (n !== void 0) {
|
|
93
93
|
if (B(n)) {
|
|
94
94
|
Object.assign(e, n);
|
|
@@ -103,7 +103,7 @@ const ie = (i, E) => {
|
|
|
103
103
|
}
|
|
104
104
|
const t = {}, L = x(e.span);
|
|
105
105
|
t.width = L, t.flex = `0 0 ${L}`;
|
|
106
|
-
const N = (a,
|
|
106
|
+
const N = (a, p, h) => {
|
|
107
107
|
if (d) {
|
|
108
108
|
const n = {
|
|
109
109
|
left: "right",
|
|
@@ -111,9 +111,9 @@ const ie = (i, E) => {
|
|
|
111
111
|
marginLeft: "marginRight",
|
|
112
112
|
marginRight: "marginLeft"
|
|
113
113
|
};
|
|
114
|
-
a[n[
|
|
114
|
+
a[n[p]] = h;
|
|
115
115
|
} else
|
|
116
|
-
a[
|
|
116
|
+
a[p] = h;
|
|
117
117
|
};
|
|
118
118
|
return e.offset && N(
|
|
119
119
|
t,
|
|
@@ -124,14 +124,14 @@ const ie = (i, E) => {
|
|
|
124
124
|
o,
|
|
125
125
|
f,
|
|
126
126
|
g,
|
|
127
|
-
|
|
127
|
+
c,
|
|
128
128
|
u,
|
|
129
129
|
m,
|
|
130
130
|
$,
|
|
131
131
|
A,
|
|
132
132
|
l,
|
|
133
133
|
d
|
|
134
|
-
]),
|
|
134
|
+
]), U = b(() => {
|
|
135
135
|
if (o)
|
|
136
136
|
return;
|
|
137
137
|
const e = {};
|
|
@@ -141,28 +141,28 @@ const ie = (i, E) => {
|
|
|
141
141
|
}
|
|
142
142
|
return e;
|
|
143
143
|
}, [C, o]);
|
|
144
|
-
return
|
|
144
|
+
return _(() => {
|
|
145
145
|
const e = z.subscribe((r) => {
|
|
146
|
-
|
|
146
|
+
J(r);
|
|
147
147
|
});
|
|
148
148
|
return () => {
|
|
149
149
|
z.unsubscribe(e);
|
|
150
150
|
};
|
|
151
|
-
}, []), /* @__PURE__ */
|
|
151
|
+
}, []), /* @__PURE__ */ W(
|
|
152
152
|
"div",
|
|
153
153
|
{
|
|
154
154
|
ref: E,
|
|
155
|
-
...
|
|
155
|
+
...H,
|
|
156
156
|
style: {
|
|
157
|
-
...f ? ne(j) :
|
|
158
|
-
...
|
|
159
|
-
...
|
|
157
|
+
...f ? ne(j) : Q,
|
|
158
|
+
...U,
|
|
159
|
+
...q
|
|
160
160
|
},
|
|
161
|
-
className: te(f ? s :
|
|
162
|
-
children:
|
|
161
|
+
className: te(f ? s : K, V),
|
|
162
|
+
children: D
|
|
163
163
|
}
|
|
164
164
|
);
|
|
165
|
-
}, fe =
|
|
165
|
+
}, fe = Y(ie);
|
|
166
166
|
fe.displayName = "Col";
|
|
167
167
|
export {
|
|
168
168
|
fe as default
|
package/grid/Row.js
CHANGED
|
@@ -1,23 +1,34 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as z, useContext as G, useState as H, useRef as U, useEffect as V } from "react";
|
|
3
3
|
import "../config-provider/ConfigProvider.js";
|
|
4
4
|
import B from "../components/common/hooks/useMergeProps.js";
|
|
5
5
|
import E from "@unicom-cloud/utils/class-name";
|
|
6
|
+
import "../components/common/utils/is.js";
|
|
6
7
|
import { omit as L } from "../components/common/utils/omit.js";
|
|
7
|
-
import { responsiveObserve as
|
|
8
|
+
import { responsiveObserve as x, responsiveArray as y } from "../utils/responsiveObserve.js";
|
|
8
9
|
import { RowContext as M } from "./context.js";
|
|
9
|
-
import
|
|
10
|
-
|
|
10
|
+
import T from "../config-provider/context.js";
|
|
11
|
+
import { isPlainObject as f, isArray as b, isObject as q } from "@unicom-cloud/utils/is";
|
|
12
|
+
const D = {
|
|
11
13
|
gutter: 0,
|
|
12
14
|
align: "start",
|
|
13
15
|
justify: "start"
|
|
14
16
|
};
|
|
15
|
-
function
|
|
16
|
-
const { getPrefixCls:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
), {
|
|
17
|
+
function F(v, C) {
|
|
18
|
+
const { getPrefixCls: R, componentConfig: $, rtl: j } = G(T), w = B(
|
|
19
|
+
v,
|
|
20
|
+
D,
|
|
21
|
+
$?.["Grid.Row"]
|
|
22
|
+
), {
|
|
23
|
+
className: N,
|
|
24
|
+
style: P,
|
|
25
|
+
children: h,
|
|
26
|
+
div: i,
|
|
27
|
+
align: u,
|
|
28
|
+
justify: p,
|
|
29
|
+
gutter: r = 0,
|
|
30
|
+
...A
|
|
31
|
+
} = w, [k, O] = H({
|
|
21
32
|
xs: !0,
|
|
22
33
|
sm: !0,
|
|
23
34
|
md: !0,
|
|
@@ -25,63 +36,61 @@ function q(d, b) {
|
|
|
25
36
|
xl: !0,
|
|
26
37
|
xxl: !0,
|
|
27
38
|
xxxl: !0
|
|
28
|
-
}),
|
|
29
|
-
V(() => (
|
|
30
|
-
(
|
|
39
|
+
}), n = U();
|
|
40
|
+
V(() => (n.current = x.subscribe((t) => {
|
|
41
|
+
(f(r) || Array.isArray(r) && (f(r[0]) || f(r[1]))) && O(t);
|
|
31
42
|
}), () => {
|
|
32
|
-
|
|
43
|
+
n.current && x.unsubscribe(n.current);
|
|
33
44
|
}), []);
|
|
34
|
-
function
|
|
45
|
+
function g(t) {
|
|
35
46
|
let e = 0;
|
|
36
|
-
if (
|
|
37
|
-
for (let c = 0; c <
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
e =
|
|
47
|
+
if (q(t))
|
|
48
|
+
for (let c = 0; c < y.length; c++) {
|
|
49
|
+
const l = y[c];
|
|
50
|
+
if (k[l] && t[l] !== void 0) {
|
|
51
|
+
e = t[l];
|
|
41
52
|
break;
|
|
42
53
|
}
|
|
43
54
|
}
|
|
44
55
|
else
|
|
45
|
-
e =
|
|
56
|
+
e = t;
|
|
46
57
|
return e;
|
|
47
58
|
}
|
|
48
|
-
const s =
|
|
59
|
+
const s = R?.("row"), S = E(
|
|
49
60
|
{
|
|
50
61
|
[`${s}`]: !i,
|
|
51
|
-
[`${s}-align-${
|
|
52
|
-
[`${s}-justify-${
|
|
53
|
-
[`${s}-rtl`]:
|
|
62
|
+
[`${s}-align-${u}`]: u,
|
|
63
|
+
[`${s}-justify-${p}`]: p,
|
|
64
|
+
[`${s}-rtl`]: j
|
|
54
65
|
},
|
|
55
|
-
|
|
56
|
-
), o = {},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const r = -n / 2, e = -a / 2;
|
|
61
|
-
r && (o.marginLeft = r, o.marginRight = r), e && (o.marginTop = e, o.marginBottom = e);
|
|
66
|
+
N
|
|
67
|
+
), o = {}, a = g(b(r) ? r[0] : r), m = g(b(r) ? r[1] : 0);
|
|
68
|
+
if ((a || m) && !i) {
|
|
69
|
+
const t = -a / 2, e = -m / 2;
|
|
70
|
+
t && (o.marginLeft = t, o.marginRight = t), e && (o.marginTop = e, o.marginBottom = e);
|
|
62
71
|
}
|
|
63
|
-
return /* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */ d(
|
|
64
73
|
"div",
|
|
65
74
|
{
|
|
66
|
-
ref:
|
|
67
|
-
...L(
|
|
75
|
+
ref: C,
|
|
76
|
+
...L(A, ["gutter"]),
|
|
68
77
|
style: {
|
|
69
|
-
|
|
78
|
+
...P,
|
|
70
79
|
...o
|
|
71
80
|
},
|
|
72
|
-
className:
|
|
73
|
-
children: /* @__PURE__ */
|
|
81
|
+
className: S,
|
|
82
|
+
children: /* @__PURE__ */ d(
|
|
74
83
|
M.Provider,
|
|
75
84
|
{
|
|
76
|
-
value: { gutter: [
|
|
77
|
-
children:
|
|
85
|
+
value: { gutter: [a, m], div: i },
|
|
86
|
+
children: h
|
|
78
87
|
}
|
|
79
88
|
)
|
|
80
89
|
}
|
|
81
90
|
);
|
|
82
91
|
}
|
|
83
|
-
const
|
|
84
|
-
|
|
92
|
+
const I = z(F);
|
|
93
|
+
I.displayName = "Row";
|
|
85
94
|
export {
|
|
86
|
-
|
|
95
|
+
I as default
|
|
87
96
|
};
|
package/liquid-fill/index.js
CHANGED
|
@@ -46,6 +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 { v4 as A } from "uuid";
|
|
49
50
|
import "@unicom-cloud/utils/file/saveAs";
|
|
50
51
|
import "@unicom-cloud/utils/screenfull";
|
|
51
52
|
import "@unicom-cloud/utils/tinycolor";
|
|
@@ -54,7 +55,6 @@ import "@unicom-cloud/utils/constant/ui.js";
|
|
|
54
55
|
import "react-is";
|
|
55
56
|
import "@unicom-cloud/utils/tree";
|
|
56
57
|
import { isNumber as ct } from "@unicom-cloud/utils/is";
|
|
57
|
-
import { v4 as A } from "uuid";
|
|
58
58
|
import "../dist/validate/src/index.js";
|
|
59
59
|
import pt from "../config-provider/context.js";
|
|
60
60
|
const dt = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|