@unicom-cloud/ui 0.8.98 → 0.8.99
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/Badge.js +53 -7
- package/LiquidFill.js +59 -2
- package/Marquee.js +61 -0
- package/QrCode.js +13 -9
- package/Segmented.js +11 -0
- package/Space.js +14 -6
- package/Splitter.js +7 -0
- package/Tour.js +13 -9
- package/badge/index.js +177 -84
- package/collapse/Collapse.js +54 -48
- package/components/common/space/index.js +90 -106
- package/index.js +356 -353
- package/liquid-fill/index.js +255 -2
- package/marquee/index.js +282 -0
- package/menu/Item.js +17 -16
- package/package.json +1 -1
- package/qr-code/index.js +53 -36
- package/rate/index.js +8 -8
- package/segmented/index.js +217 -0
- package/space/index.js +28 -29
- package/splitter/index.js +117 -0
- package/splitter/interface.js +1 -0
- package/style.css +1 -1
- package/tour/index.js +110 -88
- package/types/common/hooks/useMergeProps.d.ts +1 -1
- package/types/common/space/index.d.ts +6 -5
- package/types/common/space/interface.d.ts +29 -16
- package/types/pc/badge/index.d.ts +4 -4
- package/types/pc/badge/interface.d.ts +26 -0
- package/types/pc/collapse/interface.d.ts +4 -0
- package/types/pc/config-provider/interface.d.ts +7 -1
- package/types/pc/date-picker/RangePicker.d.ts +1 -1
- package/types/pc/index.d.ts +10 -4
- package/types/pc/liquid-fill/index.d.ts +114 -1
- package/types/pc/marquee/index.d.ts +61 -0
- package/types/pc/menu/context.d.ts +1 -1
- package/types/pc/qr-code/index.d.ts +1 -1
- package/types/pc/rate/index.d.ts +2 -2
- package/types/pc/segmented/index.d.ts +8 -0
- package/types/pc/segmented/interface.d.ts +88 -0
- package/types/pc/space/index.d.ts +3 -1
- package/types/pc/space/interface.d.ts +6 -10
- package/types/pc/splitter/index.d.ts +4 -0
- package/types/pc/splitter/interface.d.ts +70 -0
- package/types/pc/tour/index.d.ts +6 -1
- package/types/pc/utils/names.d.ts +18 -0
- package/typography/Ellipsis.js +1 -1
- package/utils/names.js +12 -0
- package/version/index.js +1 -1
- package/_virtual/_commonjsHelpers.js +0 -6
- package/_virtual/index.js +0 -7
- package/_virtual/index2.js +0 -4
- package/liquid-fill/LiquidFill.js +0 -226
- package/liquid-fill/LiquidFill2.js +0 -3
- package/space-/index.js +0 -93
- package/types/common/utils/color.d.ts +0 -1
- package/types/common/utils/computeScrollIntoView.d.ts +0 -1
- package/types/common/utils/index.d.ts +0 -45
- package/types/common/utils/math.d.ts +0 -1
- package/types/common/utils/reactTransitionGroup.d.ts +0 -1
- package/types/common/utils/tree.d.ts +0 -1
- package/types/common/utils/tween.d.ts +0 -1
- package/types/common/utils/uuid.d.ts +0 -1
- package/types/common/utils/validate.d.ts +0 -1
- package/types/pc/liquid-fill/LiquidFill.d.ts +0 -115
- package/types/pc/liquid-fill/LiquidFill2.d.ts +0 -1
- package/types/pc/space-/index.d.ts +0 -6
- package/types/pc/space-/interface.d.ts +0 -38
- /package/{space- → components/common/space}/toArray.js +0 -0
- /package/{space- → segmented}/interface.js +0 -0
- /package/types/{pc/space- → common/space}/toArray.d.ts +0 -0
package/tour/index.js
CHANGED
|
@@ -1,32 +1,38 @@
|
|
|
1
|
-
import { jsxs as d, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { createPortal as pt } from "react-dom";
|
|
1
|
+
import { jsxs as d, Fragment as pt, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import lt from "@unicom-cloud/icons/IconUiClose";
|
|
3
|
+
import { useContext as ct, useState as C, useRef as F, useEffect as h } from "react";
|
|
4
|
+
import { createPortal as mt } from "react-dom";
|
|
6
5
|
import D from "../button/index.js";
|
|
7
6
|
import "../config-provider/ConfigProvider.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import "lodash/isEqualWith";
|
|
8
|
+
import "../components/common/utils/is.js";
|
|
9
|
+
import { Escape as at, ArrowRight as ft, ArrowLeft as dt } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
10
|
+
import "lodash/isNumber";
|
|
11
|
+
import "lodash/merge";
|
|
12
|
+
import { on as ht, off as ut } from "../components/common/utils/dom.js";
|
|
13
|
+
import "../components/common/hooks/useIntersectionObserver.js";
|
|
14
|
+
import gt from "../components/common/hooks/useMergeProps.js";
|
|
15
|
+
import "../components/common/utils/reactDOM.js";
|
|
16
|
+
import "@unicom-cloud/utils/constant";
|
|
17
|
+
import "lodash/debounce";
|
|
18
|
+
import wt from "../icon-hover/index.js";
|
|
19
|
+
import R from "../space/index.js";
|
|
10
20
|
import "@unicom-cloud/utils/case-name";
|
|
11
|
-
import
|
|
21
|
+
import u from "@unicom-cloud/utils/class-name";
|
|
12
22
|
import "../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
13
23
|
import "@unicom-cloud/utils/constant/ui";
|
|
14
24
|
import "../utils/contextHolder.js";
|
|
15
25
|
import "@unicom-cloud/utils/dayjs";
|
|
16
26
|
import "@unicom-cloud/utils/clipboard-copy";
|
|
17
27
|
import "../components/common/utils/dayjs.js";
|
|
18
|
-
import { on as mt, off as at } from "../components/common/utils/dom.js";
|
|
19
28
|
import "@unicom-cloud/utils/file/fileToURL";
|
|
20
29
|
import "lodash/escapeRegExp";
|
|
21
30
|
import "lodash/isArray";
|
|
22
|
-
import "lodash/isNumber";
|
|
23
31
|
import "lodash/isString";
|
|
24
|
-
import { intersectionObserver as
|
|
25
|
-
import "../components/common/utils/is.js";
|
|
32
|
+
import { intersectionObserver as vt } from "../components/common/utils/intersectionObserver.js";
|
|
26
33
|
import "lodash/camelCase";
|
|
27
34
|
import "lodash/capitalize";
|
|
28
35
|
import "lodash/cloneDeep";
|
|
29
|
-
import "lodash/debounce";
|
|
30
36
|
import "lodash/get";
|
|
31
37
|
import "lodash/has";
|
|
32
38
|
import "lodash/kebabCase";
|
|
@@ -40,14 +46,13 @@ import "lodash/uniq";
|
|
|
40
46
|
import "lodash/upperFirst";
|
|
41
47
|
import "@unicom-cloud/utils/math";
|
|
42
48
|
import "lodash/isPlainObject";
|
|
43
|
-
import { mutationObserver as
|
|
49
|
+
import { mutationObserver as bt } from "../components/common/utils/mutationObserver.js";
|
|
44
50
|
import "../dist/react-transition-group/src/CSSTransition.js";
|
|
45
51
|
import "../dist/react-transition-group/src/ReplaceTransition.js";
|
|
46
52
|
import "../dist/react-transition-group/src/SwitchTransition.js";
|
|
47
53
|
import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
48
54
|
import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
49
|
-
import "../components/common/utils/
|
|
50
|
-
import { resizeObserver as ht } from "../components/common/utils/resizeObserver.js";
|
|
55
|
+
import { resizeObserver as yt } from "../components/common/utils/resizeObserver.js";
|
|
51
56
|
import "@unicom-cloud/utils/file/saveAs";
|
|
52
57
|
import "@unicom-cloud/utils/screenfull";
|
|
53
58
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
@@ -55,62 +60,79 @@ import "@unicom-cloud/utils/tree";
|
|
|
55
60
|
import "@unicom-cloud/utils/is";
|
|
56
61
|
import "uuid";
|
|
57
62
|
import "../dist/validate/src/index.js";
|
|
58
|
-
import
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
import $t from "../config-provider/context.js";
|
|
64
|
+
const xt = {
|
|
65
|
+
steps: [],
|
|
66
|
+
open: !1,
|
|
67
|
+
mask: !0,
|
|
68
|
+
maskClosable: !0,
|
|
69
|
+
type: "default",
|
|
70
|
+
placement: "bottom",
|
|
71
|
+
arrow: !0,
|
|
72
|
+
closable: !0,
|
|
73
|
+
zIndex: 1e3,
|
|
74
|
+
current: 0
|
|
75
|
+
};
|
|
76
|
+
function je(L) {
|
|
77
|
+
const { getPrefixCls: X, componentConfig: Y, rtl: kt } = ct($t), K = gt(
|
|
78
|
+
L,
|
|
79
|
+
xt,
|
|
80
|
+
Y?.Tour
|
|
81
|
+
);
|
|
62
82
|
let {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
83
|
+
style: U,
|
|
84
|
+
className: _,
|
|
85
|
+
steps: n,
|
|
86
|
+
open: N,
|
|
87
|
+
onClose: G,
|
|
88
|
+
mask: J,
|
|
89
|
+
maskClosable: Q,
|
|
90
|
+
type: g,
|
|
91
|
+
placement: w,
|
|
92
|
+
arrow: V,
|
|
93
|
+
closable: Z,
|
|
94
|
+
zIndex: P,
|
|
95
|
+
current: S,
|
|
96
|
+
onFinish: tt,
|
|
75
97
|
onStepChange: O,
|
|
76
|
-
...
|
|
77
|
-
} =
|
|
78
|
-
const o = X?.("tour"), [r, H] = C(S), [e, j] = C(null), [W,
|
|
98
|
+
...Ct
|
|
99
|
+
} = K;
|
|
100
|
+
const o = X?.("tour"), [r, H] = C(S), [e, j] = C(null), [W, et] = C(w), [f, I] = C(N), M = F(null), c = F(null), E = `0 0 0 ${Math.max(window.innerWidth, window.innerHeight)}px var(--pqb-mask-bg-color),0 0 15px 0 var(--pqb-mask-bg-color)`, p = typeof n[r]?.target == "string" ? document.querySelector(n[r].target) : n[r]?.target, v = () => {
|
|
79
101
|
let t;
|
|
80
|
-
if (
|
|
102
|
+
if (p ? t = p.getBoundingClientRect() : t = new DOMRect(
|
|
81
103
|
window.innerWidth / 2 - (c.current?.offsetWidth ?? 0) / 2,
|
|
82
104
|
window.innerHeight / 2 - (c.current?.offsetHeight ?? 0) / 2,
|
|
83
105
|
c.current?.offsetWidth,
|
|
84
106
|
c.current?.offsetHeight
|
|
85
|
-
), j(t),
|
|
107
|
+
), j(t), p) {
|
|
86
108
|
const i = c.current;
|
|
87
|
-
if (!i) return
|
|
88
|
-
const m = i.offsetWidth, a = i.offsetHeight,
|
|
89
|
-
let
|
|
90
|
-
return
|
|
109
|
+
if (!i) return w;
|
|
110
|
+
const m = i.offsetWidth, a = i.offsetHeight, b = 10, y = t.top - a - b > 0, $ = t.bottom + a + b < window.innerHeight, x = t.left - m - b > 0, k = t.right + m + b < window.innerWidth;
|
|
111
|
+
let l = n[r]?.placement || w;
|
|
112
|
+
return l === "top" && !y ? l = $ ? "bottom" : x ? "left" : k ? "right" : "bottom" : l === "bottom" && !$ ? l = y ? "top" : x ? "left" : k ? "right" : "top" : l === "left" && !x ? l = k ? "right" : y ? "top" : $ ? "bottom" : "right" : l === "right" && !k && (l = x ? "left" : y ? "top" : $ ? "bottom" : "left"), et(l), l;
|
|
91
113
|
}
|
|
92
|
-
return
|
|
93
|
-
},
|
|
94
|
-
I(!1),
|
|
114
|
+
return w;
|
|
115
|
+
}, z = () => {
|
|
116
|
+
I(!1), G?.();
|
|
95
117
|
}, T = () => {
|
|
96
118
|
if (r < n.length - 1) {
|
|
97
119
|
const t = r + 1;
|
|
98
120
|
H(t), O?.(t);
|
|
99
121
|
} else
|
|
100
|
-
|
|
122
|
+
ot();
|
|
101
123
|
}, q = () => {
|
|
102
124
|
if (r > 0) {
|
|
103
125
|
const t = r - 1;
|
|
104
126
|
H(t), O?.(t);
|
|
105
127
|
}
|
|
106
|
-
},
|
|
107
|
-
I(!1),
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
},
|
|
128
|
+
}, ot = () => {
|
|
129
|
+
I(!1), tt?.();
|
|
130
|
+
}, rt = (t) => {
|
|
131
|
+
Q && t.target === M.current && z();
|
|
132
|
+
}, it = () => {
|
|
111
133
|
if (!e || !c.current)
|
|
112
134
|
return { top: 0, left: 0 };
|
|
113
|
-
if (!
|
|
135
|
+
if (!p) return {
|
|
114
136
|
top: e.top,
|
|
115
137
|
left: e.left
|
|
116
138
|
};
|
|
@@ -152,37 +174,37 @@ function Pe(L) {
|
|
|
152
174
|
j(null);
|
|
153
175
|
return;
|
|
154
176
|
}
|
|
155
|
-
|
|
156
|
-
}, [f, r, n.length,
|
|
177
|
+
v();
|
|
178
|
+
}, [f, r, n.length, p]), h(() => {
|
|
157
179
|
function t(i) {
|
|
158
|
-
f && (i.key ===
|
|
180
|
+
f && (i.key === at.key ? z() : i.key === ft.key ? T() : i.key === dt.key && q());
|
|
159
181
|
}
|
|
160
|
-
return
|
|
161
|
-
|
|
182
|
+
return ht(window, "keydown", t), () => {
|
|
183
|
+
ut(window, "keydown", t);
|
|
162
184
|
};
|
|
163
185
|
}, [f, r, n.length]), h(() => {
|
|
164
|
-
const t =
|
|
165
|
-
|
|
166
|
-
}), i =
|
|
167
|
-
|
|
168
|
-
}), m =
|
|
169
|
-
|
|
186
|
+
const t = yt([document.body, p], () => {
|
|
187
|
+
v();
|
|
188
|
+
}), i = vt([p], () => {
|
|
189
|
+
v();
|
|
190
|
+
}), m = bt([p], () => {
|
|
191
|
+
v();
|
|
170
192
|
});
|
|
171
193
|
return () => {
|
|
172
194
|
t(), i(), m();
|
|
173
195
|
};
|
|
174
|
-
}, [
|
|
196
|
+
}, [p]), !f || !n.length || r >= n.length)
|
|
175
197
|
return null;
|
|
176
|
-
const A = n[r],
|
|
177
|
-
return
|
|
178
|
-
/* @__PURE__ */ d(
|
|
198
|
+
const A = n[r], nt = r > 0, st = r < n.length - 1, B = it();
|
|
199
|
+
return mt(
|
|
200
|
+
/* @__PURE__ */ d(pt, { children: [
|
|
179
201
|
/* @__PURE__ */ s(
|
|
180
202
|
"div",
|
|
181
203
|
{
|
|
182
|
-
ref:
|
|
183
|
-
className: `${o}-mask`,
|
|
184
|
-
style: { zIndex: P },
|
|
185
|
-
onClick:
|
|
204
|
+
ref: M,
|
|
205
|
+
className: u(`${o}-mask`, _),
|
|
206
|
+
style: { ...U, zIndex: P },
|
|
207
|
+
onClick: rt
|
|
186
208
|
}
|
|
187
209
|
),
|
|
188
210
|
e && /* @__PURE__ */ s(
|
|
@@ -197,7 +219,7 @@ function Pe(L) {
|
|
|
197
219
|
height: e.height,
|
|
198
220
|
zIndex: P + 1,
|
|
199
221
|
pointerEvents: "none",
|
|
200
|
-
boxShadow:
|
|
222
|
+
boxShadow: J ? E : void 0
|
|
201
223
|
}
|
|
202
224
|
}
|
|
203
225
|
),
|
|
@@ -205,9 +227,9 @@ function Pe(L) {
|
|
|
205
227
|
"div",
|
|
206
228
|
{
|
|
207
229
|
ref: c,
|
|
208
|
-
className:
|
|
230
|
+
className: u(
|
|
209
231
|
`${o}-popover`,
|
|
210
|
-
`${o}-popover-${
|
|
232
|
+
`${o}-popover-${g}`,
|
|
211
233
|
`${o}-popover-${W}`
|
|
212
234
|
),
|
|
213
235
|
style: {
|
|
@@ -215,46 +237,46 @@ function Pe(L) {
|
|
|
215
237
|
top: `${B.top + window.scrollY}px`,
|
|
216
238
|
left: `${B.left + window.scrollX}px`,
|
|
217
239
|
zIndex: P + 2,
|
|
218
|
-
boxShadow:
|
|
240
|
+
boxShadow: p ? void 0 : E
|
|
219
241
|
},
|
|
220
242
|
children: [
|
|
221
|
-
|
|
243
|
+
V && p && /* @__PURE__ */ s(
|
|
222
244
|
"div",
|
|
223
245
|
{
|
|
224
|
-
className:
|
|
246
|
+
className: u(
|
|
225
247
|
`${o}-arrow`,
|
|
226
248
|
`${o}-arrow-${W}`
|
|
227
249
|
)
|
|
228
250
|
}
|
|
229
251
|
),
|
|
230
252
|
/* @__PURE__ */ d("div", { className: `${o}-content`, children: [
|
|
231
|
-
|
|
253
|
+
Z && /* @__PURE__ */ s(wt, { className: `${o}-close`, onClick: z, children: /* @__PURE__ */ s(lt, {}) }),
|
|
232
254
|
/* @__PURE__ */ s("div", { className: `${o}-header`, children: /* @__PURE__ */ s("div", { className: `${o}-title`, children: A.title }) }),
|
|
233
255
|
/* @__PURE__ */ s("div", { className: `${o}-body`, children: /* @__PURE__ */ s("div", { className: `${o}-description`, children: A.description }) }),
|
|
234
256
|
/* @__PURE__ */ d(
|
|
235
|
-
|
|
257
|
+
R,
|
|
236
258
|
{
|
|
237
259
|
className: `${o}-footer`,
|
|
238
260
|
justifyContent: "space-between",
|
|
239
261
|
alignItems: "center",
|
|
240
262
|
children: [
|
|
241
|
-
/* @__PURE__ */ s(
|
|
263
|
+
/* @__PURE__ */ s(R, { className: `${o}-indicator`, children: n.map((t, i) => /* @__PURE__ */ s(
|
|
242
264
|
"div",
|
|
243
265
|
{
|
|
244
|
-
className:
|
|
266
|
+
className: u(
|
|
245
267
|
`${o}-dot`,
|
|
246
268
|
i === r && `${o}-dot-active`
|
|
247
269
|
)
|
|
248
270
|
},
|
|
249
271
|
i
|
|
250
272
|
)) }),
|
|
251
|
-
/* @__PURE__ */ d(
|
|
252
|
-
|
|
273
|
+
/* @__PURE__ */ d(R, { children: [
|
|
274
|
+
nt && /* @__PURE__ */ s(
|
|
253
275
|
D,
|
|
254
276
|
{
|
|
255
277
|
className: `${o}-prev-btn`,
|
|
256
278
|
size: "mini",
|
|
257
|
-
type:
|
|
279
|
+
type: g === "primary" ? "secondary" : "primary",
|
|
258
280
|
onClick: q,
|
|
259
281
|
children: "上一步"
|
|
260
282
|
}
|
|
@@ -262,14 +284,14 @@ function Pe(L) {
|
|
|
262
284
|
/* @__PURE__ */ s(
|
|
263
285
|
D,
|
|
264
286
|
{
|
|
265
|
-
className:
|
|
287
|
+
className: u(
|
|
266
288
|
`${o}-next-btn`,
|
|
267
|
-
`${o}-next-btn-${
|
|
289
|
+
`${o}-next-btn-${g}`
|
|
268
290
|
),
|
|
269
291
|
size: "mini",
|
|
270
|
-
type:
|
|
292
|
+
type: g === "primary" ? "primary" : "secondary",
|
|
271
293
|
onClick: T,
|
|
272
|
-
children:
|
|
294
|
+
children: st ? "下一步" : "完成"
|
|
273
295
|
}
|
|
274
296
|
)
|
|
275
297
|
] })
|
|
@@ -285,5 +307,5 @@ function Pe(L) {
|
|
|
285
307
|
);
|
|
286
308
|
}
|
|
287
309
|
export {
|
|
288
|
-
|
|
310
|
+
je as default
|
|
289
311
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface MergePropsOptions {
|
|
2
2
|
_ignorePropsFromGlobal?: boolean;
|
|
3
3
|
}
|
|
4
|
-
declare function useMergeProps<PropsType
|
|
4
|
+
declare function useMergeProps<PropsType extends Record<string, any>>(componentProps: PropsType & MergePropsOptions, defaultProps: Partial<PropsType>, globalComponentConfig?: Partial<PropsType> | undefined): PropsType;
|
|
5
5
|
export default useMergeProps;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare const SpaceVertical: import("react").ForwardRefExoticComponent<
|
|
1
|
+
import { SpaceGap, SpaceProps } from './interface';
|
|
2
|
+
declare const Space: React.ForwardRefExoticComponent<SpaceProps & React.RefAttributes<unknown>> & {
|
|
3
|
+
Vertical: typeof SpaceVertical;
|
|
4
|
+
};
|
|
5
|
+
declare const SpaceVertical: import("react").ForwardRefExoticComponent<SpaceProps & import("react").RefAttributes<unknown>>;
|
|
6
6
|
export { SpaceVertical };
|
|
7
7
|
export default Space;
|
|
8
|
+
export type { SpaceGap, SpaceProps };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
export type SpaceGap = 'mini' | 'small' | 'medium' | 'large' | number;
|
|
3
|
+
export type AlignItemsProps = 'start' | 'end' | 'center' | 'baseline';
|
|
3
4
|
/**
|
|
4
5
|
* @title Space
|
|
5
6
|
*/
|
|
@@ -7,20 +8,34 @@ export interface SpaceProps {
|
|
|
7
8
|
style?: CSSProperties;
|
|
8
9
|
className?: string | string[];
|
|
9
10
|
/**
|
|
10
|
-
* @zh
|
|
11
|
+
* @zh 交叉轴方向对齐方式
|
|
12
|
+
* @en Alignment of items
|
|
13
|
+
*/
|
|
14
|
+
align?: AlignItemsProps;
|
|
15
|
+
/**
|
|
16
|
+
* @zh 属性 align 的别名
|
|
11
17
|
*/
|
|
12
|
-
|
|
18
|
+
alignItems?: AlignItemsProps;
|
|
13
19
|
/**
|
|
14
|
-
* @zh
|
|
15
|
-
* @en
|
|
20
|
+
* @zh 主轴方向上对齐方式
|
|
21
|
+
* @en Alignment of items
|
|
22
|
+
*/
|
|
23
|
+
justifyContent?: 'start' | 'end' | 'center' | 'baseline' | 'space-between';
|
|
24
|
+
/**
|
|
25
|
+
* @zh 方向
|
|
26
|
+
* @en The direction
|
|
16
27
|
* @defaultValue horizontal
|
|
17
28
|
*/
|
|
18
29
|
direction?: 'vertical' | 'horizontal';
|
|
19
30
|
/**
|
|
20
|
-
* @zh
|
|
21
|
-
* @en The space
|
|
31
|
+
* @zh 尺寸。
|
|
32
|
+
* @en The space size.
|
|
22
33
|
* @defaultValue small
|
|
23
34
|
*/
|
|
35
|
+
size?: SpaceGap | SpaceGap[];
|
|
36
|
+
/**
|
|
37
|
+
* @zh 属性 size 的别名
|
|
38
|
+
*/
|
|
24
39
|
gap?: SpaceGap | SpaceGap[];
|
|
25
40
|
/**
|
|
26
41
|
* @zh 环绕类型的间距,用于折行的场景。
|
|
@@ -28,19 +43,17 @@ export interface SpaceProps {
|
|
|
28
43
|
*/
|
|
29
44
|
wrap?: boolean;
|
|
30
45
|
/**
|
|
31
|
-
* @zh
|
|
32
|
-
* @en
|
|
46
|
+
* @zh 设置分隔符
|
|
47
|
+
* @en Set separator
|
|
33
48
|
*/
|
|
34
|
-
|
|
49
|
+
split?: ReactNode;
|
|
35
50
|
/**
|
|
36
|
-
* @zh
|
|
37
|
-
* @en Alignment of items
|
|
38
|
-
* @defaultValue direction === 'horizontal' 时默认值为 'center';
|
|
51
|
+
* @zh 包裹元素
|
|
39
52
|
*/
|
|
40
|
-
|
|
53
|
+
children?: ReactNode;
|
|
41
54
|
/**
|
|
42
|
-
* @zh
|
|
43
|
-
* @en
|
|
55
|
+
* @zh 是否启用RTL模式
|
|
56
|
+
* @en Whether to enable RTL mode
|
|
44
57
|
*/
|
|
45
|
-
|
|
58
|
+
rtl?: boolean;
|
|
46
59
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Count from './Count';
|
|
2
2
|
import { BadgeProps } from './interface';
|
|
3
|
-
declare const
|
|
4
|
-
declare const BADGE_COLORS:
|
|
5
|
-
declare const BADGE_STATUS:
|
|
3
|
+
declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<unknown>>;
|
|
4
|
+
declare const BADGE_COLORS: readonly ["red", "orangered", "orange", "gold", "lime", "green", "cyan", "primary", "purple", "magenta", "gray"];
|
|
5
|
+
declare const BADGE_STATUS: readonly ["default", "processing", "success", "warning", "error"];
|
|
6
6
|
export { BADGE_COLORS, BADGE_STATUS, Count as BadgeCount };
|
|
7
|
-
export default
|
|
7
|
+
export default Badge;
|
|
8
8
|
export type { BadgeProps };
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import { CSSProperties, HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { Omit } from '../utils/type';
|
|
3
|
+
/**
|
|
4
|
+
* @title Ribbon
|
|
5
|
+
*/
|
|
6
|
+
export interface RibbonProps {
|
|
7
|
+
/**
|
|
8
|
+
* @zh 缎带徽标的文本
|
|
9
|
+
* @en Text of the ribbon badge
|
|
10
|
+
*/
|
|
11
|
+
text?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* @zh 缎带徽标的放置位置
|
|
14
|
+
* @en Placement of the ribbon badge
|
|
15
|
+
* @defaultValue 'end'
|
|
16
|
+
*/
|
|
17
|
+
placement?: 'start' | 'end';
|
|
18
|
+
/**
|
|
19
|
+
* @zh 缎带徽标的颜色
|
|
20
|
+
* @en Color of the ribbon badge
|
|
21
|
+
*/
|
|
22
|
+
color?: string;
|
|
23
|
+
}
|
|
3
24
|
/**
|
|
4
25
|
* @title Badge
|
|
5
26
|
*/
|
|
@@ -62,5 +83,10 @@ export interface BadgeProps extends Omit<HTMLAttributes<HTMLElement>, 'className
|
|
|
62
83
|
* @en Set badge as a status dot
|
|
63
84
|
*/
|
|
64
85
|
status?: 'default' | 'processing' | 'success' | 'warning' | 'error';
|
|
86
|
+
/**
|
|
87
|
+
* @zh 缎带徽标配置
|
|
88
|
+
* @en Ribbon badge configuration
|
|
89
|
+
*/
|
|
90
|
+
ribbon?: RibbonProps;
|
|
65
91
|
children?: ReactNode;
|
|
66
92
|
}
|
|
@@ -59,6 +59,10 @@ export interface CollapseProps {
|
|
|
59
59
|
* @en Callback when the active panel changes
|
|
60
60
|
*/
|
|
61
61
|
onChange?: (key: string, keys: string[], e: any) => void;
|
|
62
|
+
/**
|
|
63
|
+
* @zh 是否反转头部区域和内容区域的背景色(潘启宝添加)
|
|
64
|
+
*/
|
|
65
|
+
invertHeaderContentBackgrounds?: boolean;
|
|
62
66
|
}
|
|
63
67
|
/**
|
|
64
68
|
* @title Collapse.Item
|
|
@@ -63,8 +63,11 @@ import { TreeProps } from '../tree/interface';
|
|
|
63
63
|
import { TriggerProps } from '../trigger/interface';
|
|
64
64
|
import { Omit } from '../utils/type';
|
|
65
65
|
import { ColorPickerProps } from '../color-picker';
|
|
66
|
-
import { LiquidFillProps } from '../liquid-fill
|
|
66
|
+
import { LiquidFillProps } from '../liquid-fill';
|
|
67
|
+
import type { MarqueeProps } from '../marquee';
|
|
67
68
|
import { QRCodeProps } from '../qr-code';
|
|
69
|
+
import type { SegmentedProps } from '../segmented/interface';
|
|
70
|
+
import { SplitterProps } from '../splitter/interface';
|
|
68
71
|
import { TourProps } from '../tour';
|
|
69
72
|
import { TypographyEllipsisProps } from '../typography';
|
|
70
73
|
import { UploadProps } from '../upload/interface';
|
|
@@ -152,6 +155,9 @@ export type ComponentConfig = {
|
|
|
152
155
|
QRCode?: QRCodeProps;
|
|
153
156
|
LiquidFill?: LiquidFillProps;
|
|
154
157
|
Tour?: TourProps;
|
|
158
|
+
Marquee?: MarqueeProps;
|
|
159
|
+
Segmented?: SegmentedProps;
|
|
160
|
+
Splitter?: SplitterProps;
|
|
155
161
|
};
|
|
156
162
|
/**
|
|
157
163
|
* @title ConfigProvider
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RangePickerHandle } from './interface';
|
|
2
|
-
declare const PickerComponent: import("react").ForwardRefExoticComponent<import("./interface").BaseRangePickerProps & import("components/common/utils").Omit<import("./interface").PickerProps, "onChange" | "onSelect" | "onOk" | "inputProps" | "defaultPickerValue" | "pickerValue" | "onPickerValueChange"> & import("react").RefAttributes<RangePickerHandle>>;
|
|
2
|
+
declare const PickerComponent: import("react").ForwardRefExoticComponent<import("./interface").BaseRangePickerProps & import("components/common/utils/type").Omit<import("./interface").PickerProps, "onChange" | "onSelect" | "onOk" | "inputProps" | "defaultPickerValue" | "pickerValue" | "onPickerValueChange"> & import("react").RefAttributes<RangePickerHandle>>;
|
|
3
3
|
export default PickerComponent;
|
package/types/pc/index.d.ts
CHANGED
|
@@ -83,8 +83,11 @@ export type { InputProps, TextAreaProps } from './input/interface';
|
|
|
83
83
|
export type { ContentProps, FooterProps, HeaderProps, LayoutProps, SiderProps, } from './layout/interface';
|
|
84
84
|
export type { LinkProps } from './link/interface';
|
|
85
85
|
export { default as LiquidFill } from './liquid-fill';
|
|
86
|
+
export type { LiquidFillProps } from './liquid-fill';
|
|
86
87
|
export type { ListItemMetaProps, ListItemProps, ListProps, } from './list/interface';
|
|
87
88
|
export { default as Loading } from './loading';
|
|
89
|
+
export { default as Marquee } from './marquee';
|
|
90
|
+
export type { MarqueeProps } from './marquee';
|
|
88
91
|
export type { MentionsProps } from './mentions/interface';
|
|
89
92
|
export type { MenuItemGroupProps, MenuItemProps, MenuProps, MenuSubMenuProps, } from './menu/interface';
|
|
90
93
|
export type { MessageHookReturnType, MessageProps } from './message/interface';
|
|
@@ -96,6 +99,7 @@ export type { PopconfirmProps } from './popconfirm/interface';
|
|
|
96
99
|
export type { PopoverProps } from './popover/interface';
|
|
97
100
|
export type { ProgressProps } from './progress/interface';
|
|
98
101
|
export { default as QRCode } from './qr-code';
|
|
102
|
+
export type { QRCodeProps } from './qr-code';
|
|
99
103
|
export { default as Radio, RadioGroup, RadioGroupBlock, RadioGroupContext, } from './radio';
|
|
100
104
|
export type { RadioGroupProps, RadioProps } from './radio/interface';
|
|
101
105
|
export { default as Rate } from './rate';
|
|
@@ -104,16 +108,17 @@ export { default as ResizeBox, ResizeBoxSplit, ResizeBoxSplitGroup, } from './re
|
|
|
104
108
|
export type { ResizeBoxProps } from './resize-box/interface';
|
|
105
109
|
export { default as Result } from './result';
|
|
106
110
|
export type { ResultProps } from './result/interface';
|
|
111
|
+
export { default as Segmented } from './segmented';
|
|
112
|
+
export type { SegmentedProps } from './segmented/interface';
|
|
107
113
|
export { default as Select, SelectOption, SelectOptionGroup } from './select';
|
|
108
114
|
export type { OptGroupProps as SelectOptionGroupProps, OptionProps as SelectOptionProps, SelectProps, } from './select/interface';
|
|
109
115
|
export { default as Skeleton } from './skeleton';
|
|
110
116
|
export type { SkeletonImageProps, SkeletonProps, SkeletonTextProps, } from './skeleton/interface';
|
|
111
117
|
export { default as Slider } from './slider';
|
|
112
118
|
export type { SliderProps } from './slider/interface';
|
|
113
|
-
export { default as Space,
|
|
114
|
-
|
|
115
|
-
export type { SpaceProps
|
|
116
|
-
export type { SpaceProps } from './space/interface';
|
|
119
|
+
export { default as Space, default as Space_, // 历史原因,要兼容一些项目的名字
|
|
120
|
+
SpaceVertical, SpaceVertical as SpaceVertical_, } from './space';
|
|
121
|
+
export type { SpaceGap, SpaceProps } from './space/interface';
|
|
117
122
|
export { default as SpeechSynthesis } from './speech-synthesis';
|
|
118
123
|
export { default as Spin } from './spin';
|
|
119
124
|
export type { SpinProps } from './spin/interface';
|
|
@@ -138,6 +143,7 @@ export type { TimelineItemProps, TimelineProps } from './timeline/interface';
|
|
|
138
143
|
export { default as Tooltip } from './tooltip';
|
|
139
144
|
export type { TooltipProps } from './tooltip/interface';
|
|
140
145
|
export { default as Tour } from './tour';
|
|
146
|
+
export type { TourProps } from './tour';
|
|
141
147
|
export { default as Transfer } from './transfer';
|
|
142
148
|
export type { TransferItemProps, TransferProps } from './transfer/interface';
|
|
143
149
|
export { default as Tree, TreeNode } from './tree';
|