@unicom-cloud/ui 0.8.98 → 0.8.100
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/Anchor.js +3 -1
- package/Badge.js +54 -7
- package/Copy.js +49 -2
- package/Flex.js +12 -0
- package/Grid.js +1 -1
- package/LiquidFill.js +60 -2
- package/Marquee.js +62 -0
- package/QrCode.js +14 -9
- package/Segmented.js +11 -0
- package/Space.js +14 -6
- package/Splitter.js +6 -0
- package/Tag.js +3 -2
- package/Tour.js +14 -9
- package/alert/index.js +38 -39
- package/anchor/index.js +5 -3
- package/badge/index.js +174 -80
- package/collapse/Collapse.js +54 -48
- package/components/common/space/index.js +90 -106
- package/copy/index.js +83 -35
- package/flex/index.js +59 -0
- package/flex/interface.js +34 -0
- package/flex/utils.js +13 -0
- package/grid/{GridItem.js → Item.js} +15 -15
- package/grid/index.js +1 -1
- package/index.js +490 -477
- package/input/Button.js +39 -34
- package/input/Textarea.js +108 -104
- package/liquid-fill/index.js +256 -2
- package/marquee/index.js +283 -0
- package/menu/Item.js +17 -16
- package/package.json +1 -1
- package/qr-code/index.js +54 -36
- package/rate/index.js +8 -8
- package/segmented/index.js +225 -0
- package/space/index.js +28 -29
- package/spin/index.js +75 -62
- package/splitter/Panel.js +39 -0
- package/splitter/SplitBar.js +157 -0
- package/splitter/Splitter.js +139 -0
- package/splitter/hooks/useEvent.js +12 -0
- package/splitter/hooks/useItems.js +26 -0
- package/splitter/hooks/useResizable.js +26 -0
- package/splitter/hooks/useResize.js +68 -0
- package/splitter/hooks/useSizes.js +60 -0
- package/splitter/index.js +7 -0
- package/splitter/interface.js +1 -0
- package/style.css +1 -1
- package/table/Table.js +1 -1
- package/table/hook/useThResizable.js +72 -26
- package/table/tbody/Td.js +80 -77
- package/table/th-resizable/index.js +92 -35
- package/tag/index.js +42 -41
- package/tooltip/index.js +89 -82
- package/tour/index.js +110 -89
- package/types/common/hooks/useMergeProps.d.ts +1 -1
- package/types/common/space/index.d.ts +7 -5
- package/types/common/space/interface.d.ts +29 -16
- package/types/pc/affix/interface.d.ts +0 -2
- package/types/pc/alert/index.d.ts +2 -2
- package/types/pc/anchor/index.d.ts +2 -1
- package/types/pc/anchor/interface.d.ts +0 -2
- package/types/pc/auto-complete/interface.d.ts +0 -6
- package/types/pc/avatar/interface.d.ts +0 -4
- package/types/pc/badge/index.d.ts +4 -4
- package/types/pc/badge/interface.d.ts +26 -0
- package/types/pc/breadcrumb/interface.d.ts +0 -3
- package/types/pc/carousel/interface.d.ts +2 -6
- package/types/pc/cascader/interface.d.ts +6 -18
- package/types/pc/checkbox/interface.d.ts +0 -1
- package/types/pc/collapse/interface.d.ts +4 -2
- package/types/pc/color-picker/interface.d.ts +0 -2
- package/types/pc/config-provider/interface.d.ts +16 -14
- package/types/pc/copy/interface.d.ts +2 -1
- package/types/pc/date-picker/RangePicker.d.ts +1 -1
- package/types/pc/date-picker/interface.d.ts +0 -17
- package/types/pc/descriptions/interface.d.ts +0 -1
- package/types/pc/drawer/interface.d.ts +0 -7
- package/types/pc/dropdown/interface.d.ts +0 -1
- package/types/pc/flex/index.d.ts +9 -0
- package/types/pc/flex/interface.d.ts +61 -0
- package/types/pc/flex/utils.d.ts +9 -0
- package/types/pc/form/interface.d.ts +9 -22
- package/types/pc/form/util.d.ts +1 -1
- package/types/pc/grid/index.d.ts +3 -3
- package/types/pc/grid/interface.d.ts +1 -6
- package/types/pc/image/interface.d.ts +0 -13
- package/types/pc/index.d.ts +16 -6
- package/types/pc/input/Textarea.d.ts +2 -6
- package/types/pc/input/interface.d.ts +5 -13
- package/types/pc/input-number/interface.d.ts +0 -4
- package/types/pc/input-tag/interface.d.ts +0 -13
- package/types/pc/layout/interface.d.ts +0 -1
- package/types/pc/link/interface.d.ts +0 -1
- package/types/pc/liquid-fill/index.d.ts +114 -1
- package/types/pc/list/interface.d.ts +0 -4
- package/types/pc/marquee/index.d.ts +61 -0
- package/types/pc/menu/context.d.ts +1 -1
- package/types/pc/menu/interface.d.ts +0 -8
- package/types/pc/message/interface.d.ts +0 -2
- package/types/pc/modal/interface.d.ts +0 -5
- package/types/pc/notification/interface.d.ts +0 -1
- package/types/pc/pagination/interface.d.ts +0 -2
- package/types/pc/popconfirm/interface.d.ts +8 -10
- package/types/pc/popover/interface.d.ts +0 -1
- package/types/pc/progress/interface.d.ts +0 -3
- package/types/pc/qr-code/index.d.ts +1 -1
- package/types/pc/rate/index.d.ts +2 -2
- package/types/pc/resize-box/interface.d.ts +1 -7
- package/types/pc/segmented/index.d.ts +8 -0
- package/types/pc/segmented/interface.d.ts +88 -0
- package/types/pc/select/interface.d.ts +0 -12
- package/types/pc/select-view/interface.d.ts +0 -7
- package/types/pc/slider/interface.d.ts +0 -4
- package/types/pc/space/index.d.ts +4 -1
- package/types/pc/space/interface.d.ts +6 -10
- package/types/pc/spin/interface.d.ts +4 -1
- package/types/pc/splitter/Panel.d.ts +8 -0
- package/types/pc/splitter/SplitBar.d.ts +21 -0
- package/types/pc/splitter/Splitter.d.ts +4 -0
- package/types/pc/splitter/hooks/useEvent.d.ts +3 -0
- package/types/pc/splitter/hooks/useItems.d.ts +10 -0
- package/types/pc/splitter/hooks/useResizable.d.ts +8 -0
- package/types/pc/splitter/hooks/useResize.d.ts +4 -0
- package/types/pc/splitter/hooks/useSizes.d.ts +5 -0
- package/types/pc/splitter/index.d.ts +8 -0
- package/types/pc/splitter/interface.d.ts +213 -0
- package/types/pc/statistic/interface.d.ts +0 -4
- package/types/pc/steps/interface.d.ts +0 -3
- package/types/pc/table/hook/useThResizable.d.ts +2 -2
- package/types/pc/table/interface.d.ts +4 -15
- package/types/pc/tabs/interface.d.ts +0 -7
- package/types/pc/tag/index.d.ts +2 -0
- package/types/pc/tag/interface.d.ts +0 -1
- package/types/pc/time-picker/interface.d.ts +0 -7
- package/types/pc/tooltip/interface.d.ts +4 -1
- package/types/pc/tour/index.d.ts +6 -1
- package/types/pc/transfer/interface.d.ts +2 -9
- package/types/pc/tree/interface.d.ts +2 -8
- package/types/pc/tree-select/interface.d.ts +0 -8
- package/types/pc/trigger/interface.d.ts +0 -5
- package/types/pc/typography/EditContent.d.ts +2 -1
- package/types/pc/typography/interface.d.ts +45 -30
- package/types/pc/upload/interface.d.ts +6 -11
- package/types/pc/utils/index.d.ts +1 -0
- package/types/pc/utils/names.d.ts +24 -0
- package/types/pc/utils/toArray.d.ts +7 -0
- package/types/pc/verification-code/interface.d.ts +0 -2
- package/types/pc/watermark/interface.d.ts +0 -2
- package/typography/Base.js +73 -73
- package/typography/EditContent.js +43 -33
- package/typography/Ellipsis.js +117 -184
- package/typography/Operations.js +97 -49
- package/typography/useCssEllipsis.js +7 -6
- package/utils/index.js +117 -115
- package/utils/names.js +16 -0
- package/utils/toArray.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/types/pc/grid/{GridItem.d.ts → Item.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,77 +46,92 @@ 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";
|
|
59
|
+
import "react-is";
|
|
54
60
|
import "@unicom-cloud/utils/tree";
|
|
55
61
|
import "@unicom-cloud/utils/is";
|
|
56
62
|
import "uuid";
|
|
57
63
|
import "../dist/validate/src/index.js";
|
|
58
|
-
import
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
import $t from "../config-provider/context.js";
|
|
65
|
+
const xt = {
|
|
66
|
+
steps: [],
|
|
67
|
+
open: !1,
|
|
68
|
+
mask: !0,
|
|
69
|
+
maskClosable: !0,
|
|
70
|
+
type: "default",
|
|
71
|
+
placement: "bottom",
|
|
72
|
+
arrow: !0,
|
|
73
|
+
closable: !0,
|
|
74
|
+
zIndex: 1e3,
|
|
75
|
+
current: 0
|
|
76
|
+
};
|
|
77
|
+
function Me(L) {
|
|
78
|
+
const { getPrefixCls: X, componentConfig: Y, rtl: kt } = ct($t), K = gt(
|
|
79
|
+
L,
|
|
80
|
+
xt,
|
|
81
|
+
Y?.Tour
|
|
82
|
+
), {
|
|
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, V] = C(g), [f, I] = C(N), E = F(null), c = F(null), M = `0 0 0 ${Math.max(window.innerWidth, window.innerHeight)}px var(--pqb-mask-bg-color),0 0 15px 0 var(--pqb-mask-bg-color)`, l = typeof n[r]?.target == "string" ? document.querySelector(n[r].target) : n[r]?.target, w = () => {
|
|
98
|
+
...Ct
|
|
99
|
+
} = K, 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
100
|
let t;
|
|
80
|
-
if (
|
|
101
|
+
if (p ? t = p.getBoundingClientRect() : t = new DOMRect(
|
|
81
102
|
window.innerWidth / 2 - (c.current?.offsetWidth ?? 0) / 2,
|
|
82
103
|
window.innerHeight / 2 - (c.current?.offsetHeight ?? 0) / 2,
|
|
83
104
|
c.current?.offsetWidth,
|
|
84
105
|
c.current?.offsetHeight
|
|
85
|
-
), j(t),
|
|
106
|
+
), j(t), p) {
|
|
86
107
|
const i = c.current;
|
|
87
|
-
if (!i) return
|
|
88
|
-
const m = i.offsetWidth, a = i.offsetHeight,
|
|
89
|
-
let
|
|
90
|
-
return
|
|
108
|
+
if (!i) return w;
|
|
109
|
+
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;
|
|
110
|
+
let l = n[r]?.placement || w;
|
|
111
|
+
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
112
|
}
|
|
92
|
-
return
|
|
93
|
-
},
|
|
94
|
-
I(!1),
|
|
113
|
+
return w;
|
|
114
|
+
}, z = () => {
|
|
115
|
+
I(!1), G?.();
|
|
95
116
|
}, T = () => {
|
|
96
117
|
if (r < n.length - 1) {
|
|
97
118
|
const t = r + 1;
|
|
98
119
|
H(t), O?.(t);
|
|
99
120
|
} else
|
|
100
|
-
|
|
121
|
+
ot();
|
|
101
122
|
}, q = () => {
|
|
102
123
|
if (r > 0) {
|
|
103
124
|
const t = r - 1;
|
|
104
125
|
H(t), O?.(t);
|
|
105
126
|
}
|
|
106
|
-
},
|
|
107
|
-
I(!1),
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
},
|
|
127
|
+
}, ot = () => {
|
|
128
|
+
I(!1), tt?.();
|
|
129
|
+
}, rt = (t) => {
|
|
130
|
+
Q && t.target === M.current && z();
|
|
131
|
+
}, it = () => {
|
|
111
132
|
if (!e || !c.current)
|
|
112
133
|
return { top: 0, left: 0 };
|
|
113
|
-
if (!
|
|
134
|
+
if (!p) return {
|
|
114
135
|
top: e.top,
|
|
115
136
|
left: e.left
|
|
116
137
|
};
|
|
@@ -152,37 +173,37 @@ function Pe(L) {
|
|
|
152
173
|
j(null);
|
|
153
174
|
return;
|
|
154
175
|
}
|
|
155
|
-
|
|
156
|
-
}, [f, r, n.length,
|
|
176
|
+
v();
|
|
177
|
+
}, [f, r, n.length, p]), h(() => {
|
|
157
178
|
function t(i) {
|
|
158
|
-
f && (i.key ===
|
|
179
|
+
f && (i.key === at.key ? z() : i.key === ft.key ? T() : i.key === dt.key && q());
|
|
159
180
|
}
|
|
160
|
-
return
|
|
161
|
-
|
|
181
|
+
return ht(window, "keydown", t), () => {
|
|
182
|
+
ut(window, "keydown", t);
|
|
162
183
|
};
|
|
163
184
|
}, [f, r, n.length]), h(() => {
|
|
164
|
-
const t =
|
|
165
|
-
|
|
166
|
-
}), i =
|
|
167
|
-
|
|
168
|
-
}), m =
|
|
169
|
-
|
|
185
|
+
const t = yt([document.body, p], () => {
|
|
186
|
+
v();
|
|
187
|
+
}), i = vt([p], () => {
|
|
188
|
+
v();
|
|
189
|
+
}), m = bt([p], () => {
|
|
190
|
+
v();
|
|
170
191
|
});
|
|
171
192
|
return () => {
|
|
172
193
|
t(), i(), m();
|
|
173
194
|
};
|
|
174
|
-
}, [
|
|
195
|
+
}, [p]), !f || !n.length || r >= n.length)
|
|
175
196
|
return null;
|
|
176
|
-
const A = n[r],
|
|
177
|
-
return
|
|
178
|
-
/* @__PURE__ */ d(
|
|
197
|
+
const A = n[r], nt = r > 0, st = r < n.length - 1, B = it();
|
|
198
|
+
return mt(
|
|
199
|
+
/* @__PURE__ */ d(pt, { children: [
|
|
179
200
|
/* @__PURE__ */ s(
|
|
180
201
|
"div",
|
|
181
202
|
{
|
|
182
|
-
ref:
|
|
183
|
-
className: `${o}-mask`,
|
|
184
|
-
style: { zIndex: P },
|
|
185
|
-
onClick:
|
|
203
|
+
ref: M,
|
|
204
|
+
className: u(`${o}-mask`, _),
|
|
205
|
+
style: { ...U, zIndex: P },
|
|
206
|
+
onClick: rt
|
|
186
207
|
}
|
|
187
208
|
),
|
|
188
209
|
e && /* @__PURE__ */ s(
|
|
@@ -197,7 +218,7 @@ function Pe(L) {
|
|
|
197
218
|
height: e.height,
|
|
198
219
|
zIndex: P + 1,
|
|
199
220
|
pointerEvents: "none",
|
|
200
|
-
boxShadow:
|
|
221
|
+
boxShadow: J ? E : void 0
|
|
201
222
|
}
|
|
202
223
|
}
|
|
203
224
|
),
|
|
@@ -205,9 +226,9 @@ function Pe(L) {
|
|
|
205
226
|
"div",
|
|
206
227
|
{
|
|
207
228
|
ref: c,
|
|
208
|
-
className:
|
|
229
|
+
className: u(
|
|
209
230
|
`${o}-popover`,
|
|
210
|
-
`${o}-popover-${
|
|
231
|
+
`${o}-popover-${g}`,
|
|
211
232
|
`${o}-popover-${W}`
|
|
212
233
|
),
|
|
213
234
|
style: {
|
|
@@ -215,46 +236,46 @@ function Pe(L) {
|
|
|
215
236
|
top: `${B.top + window.scrollY}px`,
|
|
216
237
|
left: `${B.left + window.scrollX}px`,
|
|
217
238
|
zIndex: P + 2,
|
|
218
|
-
boxShadow:
|
|
239
|
+
boxShadow: p ? void 0 : E
|
|
219
240
|
},
|
|
220
241
|
children: [
|
|
221
|
-
|
|
242
|
+
V && p && /* @__PURE__ */ s(
|
|
222
243
|
"div",
|
|
223
244
|
{
|
|
224
|
-
className:
|
|
245
|
+
className: u(
|
|
225
246
|
`${o}-arrow`,
|
|
226
247
|
`${o}-arrow-${W}`
|
|
227
248
|
)
|
|
228
249
|
}
|
|
229
250
|
),
|
|
230
251
|
/* @__PURE__ */ d("div", { className: `${o}-content`, children: [
|
|
231
|
-
|
|
252
|
+
Z && /* @__PURE__ */ s(wt, { className: `${o}-close`, onClick: z, children: /* @__PURE__ */ s(lt, {}) }),
|
|
232
253
|
/* @__PURE__ */ s("div", { className: `${o}-header`, children: /* @__PURE__ */ s("div", { className: `${o}-title`, children: A.title }) }),
|
|
233
254
|
/* @__PURE__ */ s("div", { className: `${o}-body`, children: /* @__PURE__ */ s("div", { className: `${o}-description`, children: A.description }) }),
|
|
234
255
|
/* @__PURE__ */ d(
|
|
235
|
-
|
|
256
|
+
R,
|
|
236
257
|
{
|
|
237
258
|
className: `${o}-footer`,
|
|
238
259
|
justifyContent: "space-between",
|
|
239
260
|
alignItems: "center",
|
|
240
261
|
children: [
|
|
241
|
-
/* @__PURE__ */ s(
|
|
262
|
+
/* @__PURE__ */ s(R, { className: `${o}-indicator`, children: n.map((t, i) => /* @__PURE__ */ s(
|
|
242
263
|
"div",
|
|
243
264
|
{
|
|
244
|
-
className:
|
|
265
|
+
className: u(
|
|
245
266
|
`${o}-dot`,
|
|
246
267
|
i === r && `${o}-dot-active`
|
|
247
268
|
)
|
|
248
269
|
},
|
|
249
270
|
i
|
|
250
271
|
)) }),
|
|
251
|
-
/* @__PURE__ */ d(
|
|
252
|
-
|
|
272
|
+
/* @__PURE__ */ d(R, { children: [
|
|
273
|
+
nt && /* @__PURE__ */ s(
|
|
253
274
|
D,
|
|
254
275
|
{
|
|
255
276
|
className: `${o}-prev-btn`,
|
|
256
277
|
size: "mini",
|
|
257
|
-
type:
|
|
278
|
+
type: g === "primary" ? "secondary" : "primary",
|
|
258
279
|
onClick: q,
|
|
259
280
|
children: "上一步"
|
|
260
281
|
}
|
|
@@ -262,14 +283,14 @@ function Pe(L) {
|
|
|
262
283
|
/* @__PURE__ */ s(
|
|
263
284
|
D,
|
|
264
285
|
{
|
|
265
|
-
className:
|
|
286
|
+
className: u(
|
|
266
287
|
`${o}-next-btn`,
|
|
267
|
-
`${o}-next-btn-${
|
|
288
|
+
`${o}-next-btn-${g}`
|
|
268
289
|
),
|
|
269
290
|
size: "mini",
|
|
270
|
-
type:
|
|
291
|
+
type: g === "primary" ? "primary" : "secondary",
|
|
271
292
|
onClick: T,
|
|
272
|
-
children:
|
|
293
|
+
children: st ? "下一步" : "完成"
|
|
273
294
|
}
|
|
274
295
|
)
|
|
275
296
|
] })
|
|
@@ -285,5 +306,5 @@ function Pe(L) {
|
|
|
285
306
|
);
|
|
286
307
|
}
|
|
287
308
|
export {
|
|
288
|
-
|
|
309
|
+
Me as default
|
|
289
310
|
};
|
|
@@ -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,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SpaceGap, SpaceProps } from './interface';
|
|
3
|
+
declare const Space: React.ForwardRefExoticComponent<SpaceProps & React.RefAttributes<unknown>> & {
|
|
4
|
+
Vertical: typeof SpaceVertical;
|
|
5
|
+
};
|
|
6
|
+
declare const SpaceVertical: React.ForwardRefExoticComponent<SpaceProps & React.RefAttributes<unknown>>;
|
|
6
7
|
export { SpaceVertical };
|
|
7
8
|
export default Space;
|
|
9
|
+
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
|
}
|
|
@@ -8,14 +8,12 @@ export interface AffixProps {
|
|
|
8
8
|
/**
|
|
9
9
|
* @zh 给 `fixed` 的元素设置 className。
|
|
10
10
|
* @en ClassName of the fixed element.
|
|
11
|
-
* @version 2.8.0
|
|
12
11
|
*/
|
|
13
12
|
affixClassName?: string | string[];
|
|
14
13
|
/**
|
|
15
14
|
* @zh
|
|
16
15
|
* 给 `fixed` 的元素设置 style,注意不要设置 `position` `top` `width` `height`, 因为这几个属性是在元素 fixed 时候用于定位的。
|
|
17
16
|
* @en Style of the fixed elements. Don't set `position` `top` `width` `height` attributes as they are used for positioning when the element is fixed.
|
|
18
|
-
* @version 2.8.0
|
|
19
17
|
*/
|
|
20
18
|
affixStyle?: CSSProperties;
|
|
21
19
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AlertProps } from './interface';
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const Alert: import("react").ForwardRefExoticComponent<AlertProps & import("react").RefAttributes<unknown>>;
|
|
3
|
+
export default Alert;
|
|
4
4
|
export type { AlertProps };
|
|
@@ -15,7 +15,6 @@ export interface AnchorProps {
|
|
|
15
15
|
* @zh 方向
|
|
16
16
|
* @en Direction
|
|
17
17
|
* @defaultValue vertical
|
|
18
|
-
* @version 2.51.0
|
|
19
18
|
*/
|
|
20
19
|
direction?: 'vertical' | 'horizontal';
|
|
21
20
|
/**
|
|
@@ -77,7 +76,6 @@ export interface AnchorProps {
|
|
|
77
76
|
*/
|
|
78
77
|
lineless?: boolean;
|
|
79
78
|
/**
|
|
80
|
-
* @version 2.22.0
|
|
81
79
|
* @zh 容器中基准线的位置相对容器顶部的偏移量,在没有设置的时候,取值为滚动容器高度的一半。当锚点到达或离开基准线的时候会更新锚点的状态。
|
|
82
80
|
* @en The offset of the baseline relative to the top of the container.
|
|
83
81
|
* The value is half of the height of the scrolling container if not specified.
|
|
@@ -57,7 +57,6 @@ export interface AutoCompleteProps extends PartialSelectProps {
|
|
|
57
57
|
/**
|
|
58
58
|
* @zh 状态
|
|
59
59
|
* @en Status
|
|
60
|
-
* @version 2.45.0
|
|
61
60
|
*/
|
|
62
61
|
status?: 'error' | 'warning';
|
|
63
62
|
/**
|
|
@@ -68,14 +67,12 @@ export interface AutoCompleteProps extends PartialSelectProps {
|
|
|
68
67
|
/**
|
|
69
68
|
* @zh 是否处于加载状态。
|
|
70
69
|
* @en Whether the component is loading data.
|
|
71
|
-
* @version 2.10.0
|
|
72
70
|
*/
|
|
73
71
|
loading?: boolean;
|
|
74
72
|
/**
|
|
75
73
|
* @zh 自定义触发元素
|
|
76
74
|
* @en Custom trigger element
|
|
77
75
|
* @defaultValue <Input />
|
|
78
|
-
* @version `() => ReactElement` in 2.31.0
|
|
79
76
|
*/
|
|
80
77
|
triggerElement?: ReactElement | (({ value }: {
|
|
81
78
|
value: any;
|
|
@@ -98,7 +95,6 @@ export interface AutoCompleteProps extends PartialSelectProps {
|
|
|
98
95
|
/**
|
|
99
96
|
* @zh 按下回车键的回调
|
|
100
97
|
* @en Callback when Enter is pressed
|
|
101
|
-
* @version `activeOption` in 2.25.1
|
|
102
98
|
*/
|
|
103
99
|
onPressEnter?: (e: any, activeOption?: OptionInfo) => void;
|
|
104
100
|
/**
|
|
@@ -114,13 +110,11 @@ export interface AutoCompleteProps extends PartialSelectProps {
|
|
|
114
110
|
/**
|
|
115
111
|
* @zh 传递虚拟滚动属性。
|
|
116
112
|
* @en Virtual scroll properties.
|
|
117
|
-
* @version 2.2.0
|
|
118
113
|
*/
|
|
119
114
|
virtualListProps?: AvailableVirtualListProps;
|
|
120
115
|
/**
|
|
121
116
|
* @zh 传递 Input 组件的属性。
|
|
122
117
|
* @en Properties of Input component.
|
|
123
|
-
* @version 2.10.0
|
|
124
118
|
*/
|
|
125
119
|
inputProps?: Partial<InputProps>;
|
|
126
120
|
}
|
|
@@ -71,25 +71,21 @@ export interface AvatarGroupProps {
|
|
|
71
71
|
/**
|
|
72
72
|
* @zh 头像组内的头像 `z-index` 递增,默认是递减。
|
|
73
73
|
* @en Whether `z-index` of the avatars in group are in ascending order. The default is in descending order.
|
|
74
|
-
* @version 2.3.0
|
|
75
74
|
*/
|
|
76
75
|
zIndexAscend?: boolean;
|
|
77
76
|
/**
|
|
78
77
|
* @zh 头像组最多显示的头像数量,多余头像将以 `+x` 的形式展示。
|
|
79
78
|
* @en The maximum number of avatars displayed in the avatar group. The rest of avatars will be displayed as a `+x`.
|
|
80
|
-
* @version 2.4.0
|
|
81
79
|
*/
|
|
82
80
|
maxCount?: number;
|
|
83
81
|
/**
|
|
84
82
|
* @zh 多余头像样式。
|
|
85
83
|
* @en Style for `+x`.
|
|
86
|
-
* @version 2.4.0
|
|
87
84
|
*/
|
|
88
85
|
maxStyle?: CSSProperties;
|
|
89
86
|
/**
|
|
90
87
|
* @zh 多余头像气泡的 `TriggerProps`。
|
|
91
88
|
* @en `TriggerProps` for popover around `+x`.
|
|
92
|
-
* @version 2.4.0
|
|
93
89
|
*/
|
|
94
90
|
maxPopoverTriggerProps?: TriggerProps;
|
|
95
91
|
}
|
|
@@ -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
|
}
|
|
@@ -58,19 +58,16 @@ export interface BreadCrumbItemProps extends CustomHTMLElement {
|
|
|
58
58
|
/**
|
|
59
59
|
* @zh 超链接地址
|
|
60
60
|
* @en href
|
|
61
|
-
* @version 2.40.0
|
|
62
61
|
*/
|
|
63
62
|
href?: string;
|
|
64
63
|
/**
|
|
65
64
|
* @zh 点击回调
|
|
66
65
|
* @en click callback
|
|
67
|
-
* @version 2.40.0
|
|
68
66
|
*/
|
|
69
67
|
onClick?: (e: any) => void;
|
|
70
68
|
/**
|
|
71
69
|
* @zh 标签名,可以是 html 标签或是组件
|
|
72
70
|
* @en Configure the outermost label, which can be an html label or a component
|
|
73
|
-
* @version 2.40.0
|
|
74
71
|
* @defaultValue div
|
|
75
72
|
*/
|
|
76
73
|
tagName?: string | React.FC<any> | React.ComponentClass<any>;
|