@unicom-cloud/ui 0.8.101 → 0.8.102
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 +7 -54
- package/Copy.js +5 -4
- package/LiquidFill.js +5 -4
- package/List.js +1 -1
- package/Marquee.js +5 -4
- package/QrCode.js +5 -4
- package/Tooltip.js +3 -4
- package/Tour.js +5 -4
- package/anchor/Anchor.js +12 -12
- package/anchor/util.js +10 -10
- package/back-top/index.js +7 -7
- package/badge/index.js +109 -162
- package/card/index.js +63 -43
- package/color-picker/InputHex.js +3 -4
- package/color-picker/InputRgb.js +7 -8
- package/color-picker/Palette.js +3 -4
- package/color-picker/Panel.js +3 -4
- package/color-picker/colors.js +5 -5
- package/color-picker/hooks/useColorPicker.js +3 -4
- package/color-picker/utils.js +14 -15
- package/components/common/utils/PqbCSSTransition.js +1 -1
- package/components/common/utils/constant.js +6 -3
- package/components/common/utils/reactDOM.js +6 -4
- package/components/common/utils/{scrollIntoView.js → scrollIntoViewIfNeeded.js} +1 -1
- package/components/common/utils/setPrimaryColor.js +18 -18
- package/components/common/utils/setTheme.js +8 -9
- package/copy/index.js +3 -2
- package/dist/scroll-into-view-if-needed/compute/index.js +126 -0
- package/dist/scroll-into-view-if-needed/smooth/index.js +70 -0
- package/dist/scroll-into-view-if-needed/src/index.js +19 -19
- package/form/FormItem.js +69 -65
- package/form/context.js +6 -7
- package/grid/Col-.js +86 -0
- package/grid/Col.js +156 -73
- package/grid/Grid.js +71 -67
- package/grid/Row.js +3 -3
- package/grid/index.js +13 -13
- package/index.js +639 -662
- package/input/Textarea.js +1 -1
- package/input/autoSizeTextAreaHeight.js +7 -7
- package/liquid-fill/index.js +5 -4
- package/list/index.js +1 -1
- package/marquee/index.js +5 -4
- package/menu/Item.js +9 -9
- package/package.json +1 -1
- package/qr-code/index.js +5 -4
- package/splitter/SplitBar.js +81 -79
- package/splitter/Splitter.js +70 -78
- package/splitter/hooks/useResizable.js +9 -18
- package/splitter/hooks/useResize.js +10 -10
- package/splitter/hooks/useSizes.js +28 -28
- package/statistic/index.js +10 -10
- package/style.css +1 -1
- package/table/Table.js +369 -370
- package/table/hook/useThResizable.js +5 -4
- package/table/th-resizable/index.js +12 -11
- package/time-picker/util.js +8 -8
- package/tooltip/index.js +1 -2
- package/tour/index.js +5 -4
- package/tree/NodeList.js +1 -1
- package/types/common/utils/constant.d.ts +1 -0
- package/types/common/utils/scrollIntoViewIfNeeded.d.ts +4 -0
- package/types/common/utils/tree.d.ts +1 -0
- package/types/common/utils/tween.d.ts +1 -0
- package/types/pc/anchor/util.d.ts +1 -1
- package/types/pc/badge/interface.d.ts +2 -0
- package/types/pc/card/interface.d.ts +8 -0
- package/types/pc/color-picker/hooks/useColorPicker.d.ts +7 -2
- package/types/pc/color-picker/utils.d.ts +6 -1
- package/types/pc/form/FormItem.d.ts +1 -1
- package/types/pc/grid/Col-.d.ts +4 -0
- package/types/pc/grid/Col.d.ts +3 -2
- package/types/pc/grid/Grid.d.ts +2 -2
- package/types/pc/grid/Item.d.ts +3 -3
- package/types/pc/grid/Row.d.ts +2 -2
- package/types/pc/grid/hook/useResponsiveState.d.ts +2 -2
- package/types/pc/grid/interface.d.ts +13 -7
- package/types/pc/splitter/SplitBar.d.ts +0 -1
- package/types/pc/splitter/hooks/useResizable.d.ts +0 -1
- package/types/pc/splitter/hooks/useResize.d.ts +1 -2
- package/types/pc/splitter/interface.d.ts +0 -8
- package/types/pc/tour/index.d.ts +1 -1
- package/types/pc/upload/interface.d.ts +1 -0
- package/types/pc/utils/constant.d.ts +1 -2
- package/types/pc/utils/dayjs.d.ts +2 -1
- package/types/pc/utils/index.d.ts +2 -5
- package/types/pc/utils/scrollIntoViewIfNeeded.d.ts +3 -0
- package/types/pc/utils/tree.d.ts +2 -1
- package/types/pc/utils/tween.d.ts +1 -1
- package/typography/Ellipsis.js +5 -4
- package/typography/Operations.js +5 -4
- package/upload/request.js +12 -13
- package/upload/request_.js +2 -3
- package/utils/constant.js +5 -5
- package/utils/dayjs.js +13 -12
- package/utils/index.js +261 -284
- package/utils/scrollIntoViewIfNeeded.js +12 -0
- package/utils/tree.js +11 -9
- package/utils/tween.js +5 -5
- package/version/index.js +1 -1
- package/components/common/utils/convertToDurationBasedOnTimeUnits.js +0 -6
- package/dist/compute-scroll-into-view/src/index.js +0 -126
- package/dist/tinycolor/chunk/BOzCVdr0.js +0 -182
- package/dist/tinycolor/customize/index.js +0 -12
- package/dist/tinycolor/src/conversion.js +0 -143
- package/dist/tinycolor/src/css-color-names.js +0 -153
- package/dist/tinycolor/src/format-input.js +0 -77
- package/dist/tinycolor/src/index.js +0 -388
- package/dist/tinycolor/src/util.js +0 -32
- package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +0 -3
- package/types/common/utils/scrollIntoView.d.ts +0 -4
- package/types/common/utils/tinycolor.d.ts +0 -1
- package/types/pc/utils/color.d.ts +0 -1
- package/types/pc/utils/computeScrollIntoView.d.ts +0 -1
- package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +0 -3
- package/types/pc/utils/scrollIntoView.d.ts +0 -3
- package/types/pc/utils/tinycolor.d.ts +0 -1
- package/utils/color.js +0 -4
- package/utils/computeScrollIntoView.js +0 -6
- package/utils/convertToDurationBasedOnTimeUnits.js +0 -6
- package/utils/scrollIntoView.js +0 -6
- package/utils/tinycolor.js +0 -29
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { useState as b, useEffect as a } from "react";
|
|
2
|
+
import "@unicom-cloud/utils/date";
|
|
2
3
|
import "@unicom-cloud/utils/case-name";
|
|
3
4
|
import "@unicom-cloud/utils/class-name";
|
|
4
|
-
import "../../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
5
5
|
import "@unicom-cloud/utils/constant/ui";
|
|
6
6
|
import "../../utils/contextHolder.js";
|
|
7
|
-
import "@unicom-cloud/utils/dayjs";
|
|
8
7
|
import "@unicom-cloud/utils/clipboard-copy";
|
|
9
8
|
import "../../components/common/utils/dayjs.js";
|
|
10
9
|
import "../../components/common/utils/dom.js";
|
|
@@ -42,6 +41,8 @@ import "../../dist/react-transition-group/src/TransitionGroup.js";
|
|
|
42
41
|
import "../../components/common/utils/reactDOM.js";
|
|
43
42
|
import "@unicom-cloud/utils/file/saveAs";
|
|
44
43
|
import "@unicom-cloud/utils/screenfull";
|
|
44
|
+
import "@unicom-cloud/utils/tinycolor";
|
|
45
|
+
import "@unicom-cloud/utils/ui-color";
|
|
45
46
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
46
47
|
import "react-is";
|
|
47
48
|
import "@unicom-cloud/utils/tree";
|
|
@@ -50,7 +51,7 @@ import "uuid";
|
|
|
50
51
|
import "../../dist/validate/src/index.js";
|
|
51
52
|
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
52
53
|
import z from "../th-resizable/index.js";
|
|
53
|
-
function
|
|
54
|
+
function Ht(f = {}, c = []) {
|
|
54
55
|
const { columns: u } = f ?? {}, [d, m] = b(o(u));
|
|
55
56
|
function h(t, i) {
|
|
56
57
|
return {
|
|
@@ -81,5 +82,5 @@ function Rt(f = {}, c = []) {
|
|
|
81
82
|
};
|
|
82
83
|
}
|
|
83
84
|
export {
|
|
84
|
-
|
|
85
|
+
Ht as default
|
|
85
86
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as h, jsxs as M, Fragment as P } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as s, useContext as X, useEffect as j } from "react";
|
|
3
3
|
import "../../config-provider/ConfigProvider.js";
|
|
4
|
+
import "@unicom-cloud/utils/date";
|
|
4
5
|
import "@unicom-cloud/utils/case-name";
|
|
5
6
|
import z from "@unicom-cloud/utils/class-name";
|
|
6
|
-
import "../../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
7
7
|
import "@unicom-cloud/utils/constant/ui";
|
|
8
8
|
import "../../utils/contextHolder.js";
|
|
9
|
-
import "@unicom-cloud/utils/dayjs";
|
|
10
9
|
import "@unicom-cloud/utils/clipboard-copy";
|
|
11
10
|
import "../../components/common/utils/dayjs.js";
|
|
12
11
|
import { off as g, on as C } from "../../components/common/utils/dom.js";
|
|
@@ -43,6 +42,8 @@ import "../../dist/react-transition-group/src/TransitionGroup.js";
|
|
|
43
42
|
import "../../components/common/utils/reactDOM.js";
|
|
44
43
|
import "@unicom-cloud/utils/file/saveAs";
|
|
45
44
|
import "@unicom-cloud/utils/screenfull";
|
|
45
|
+
import "@unicom-cloud/utils/tinycolor";
|
|
46
|
+
import "@unicom-cloud/utils/ui-color";
|
|
46
47
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
47
48
|
import "react-is";
|
|
48
49
|
import "@unicom-cloud/utils/tree";
|
|
@@ -53,7 +54,7 @@ import "@unicom-cloud/utils/constant/keyboardCode";
|
|
|
53
54
|
import { defaultComponent as D } from "../constant.js";
|
|
54
55
|
/* empty css */
|
|
55
56
|
import F from "../../config-provider/context.js";
|
|
56
|
-
function
|
|
57
|
+
function Ut(b) {
|
|
57
58
|
let {
|
|
58
59
|
className: r,
|
|
59
60
|
children: u,
|
|
@@ -63,27 +64,27 @@ function Bt(b) {
|
|
|
63
64
|
} = b;
|
|
64
65
|
const v = D.header.th, f = s(null), x = s(null), o = s({}), { getPrefixCls: R } = X(F), a = R?.("table-th-resizable");
|
|
65
66
|
function l(t) {
|
|
66
|
-
o.current.boundingClientRect = f.current.getBoundingClientRect(), o.current.pageX = t?.pageX ?? 0,
|
|
67
|
+
o.current.boundingClientRect = f.current.getBoundingClientRect(), o.current.pageX = t?.pageX ?? 0, p(), N();
|
|
67
68
|
}
|
|
68
69
|
function e(t) {
|
|
69
|
-
|
|
70
|
+
p();
|
|
70
71
|
}
|
|
71
72
|
function m(t) {
|
|
72
|
-
let
|
|
73
|
-
|
|
73
|
+
let n = o.current.boundingClientRect.width + ((t?.pageX ?? 0) - o.current.pageX);
|
|
74
|
+
n < 0 || (T(i) && (i.width = n), c?.({
|
|
74
75
|
column: i,
|
|
75
|
-
width:
|
|
76
|
+
width: n,
|
|
76
77
|
widthOrigin: o.current.boundingClientRect.width
|
|
77
78
|
}));
|
|
78
79
|
}
|
|
79
80
|
function N(t) {
|
|
80
81
|
C(document, "mousemove", m), C(document, "mouseup", e);
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
+
function p(t) {
|
|
83
84
|
g(document, "mousemove", m), g(document, "mouseup", e);
|
|
84
85
|
}
|
|
85
86
|
r = z(r, a), j(() => (l(), m(), e(), () => {
|
|
86
|
-
|
|
87
|
+
p();
|
|
87
88
|
}), []);
|
|
88
89
|
let d = u;
|
|
89
90
|
return E(c) && (d = /* @__PURE__ */ M(P, { children: [
|
|
@@ -99,5 +100,5 @@ function Bt(b) {
|
|
|
99
100
|
] })), /* @__PURE__ */ h(v, { ref: f, ...w, className: r, children: d });
|
|
100
101
|
}
|
|
101
102
|
export {
|
|
102
|
-
|
|
103
|
+
Ut as default
|
|
103
104
|
};
|
package/time-picker/util.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Tween as i } from "../dist/tween/src/tween.js";
|
|
2
|
-
import
|
|
2
|
+
import l from "../dist/tween/src/easing.js";
|
|
3
3
|
import { isDayjs as m } from "dayjs";
|
|
4
|
-
import { dayjs as f, methods as
|
|
4
|
+
import { dayjs as f, methods as a } from "../components/common/utils/dayjs.js";
|
|
5
5
|
function y(o) {
|
|
6
6
|
const t = ["H", "h", "m", "s", "a", "A"], s = [];
|
|
7
|
-
let
|
|
7
|
+
let e = !1;
|
|
8
8
|
return t.forEach((r) => {
|
|
9
|
-
o.indexOf(r) !== -1 && (s.push(r), (r === "a" || r === "A") && (
|
|
9
|
+
o.indexOf(r) !== -1 && (s.push(r), (r === "a" || r === "A") && (e = !0));
|
|
10
10
|
}), {
|
|
11
11
|
list: s,
|
|
12
|
-
use12Hours:
|
|
12
|
+
use12Hours: e
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
const c = /* @__PURE__ */ new Map();
|
|
@@ -24,16 +24,16 @@ function h(o, t, s) {
|
|
|
24
24
|
onUpdate: (r) => {
|
|
25
25
|
o.scrollTop = r.scrollTop;
|
|
26
26
|
},
|
|
27
|
-
easing: l
|
|
27
|
+
easing: l.quartInOut
|
|
28
28
|
}).start();
|
|
29
29
|
})
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
32
|
function g(o) {
|
|
33
|
-
const t = f(), s = t.year(),
|
|
33
|
+
const t = f(), s = t.year(), e = t.month(), r = t.date();
|
|
34
34
|
if (m(o)) {
|
|
35
35
|
let n = o;
|
|
36
|
-
return n =
|
|
36
|
+
return n = a.set(n, "year", s), n = a.set(n, "month", e), n = a.set(n, "date", r), n;
|
|
37
37
|
}
|
|
38
38
|
return o;
|
|
39
39
|
}
|
package/tooltip/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
3
|
-
import { TinyColor as F } from "../dist/tinycolor/src/index.js";
|
|
2
|
+
import F from "@unicom-cloud/utils/tinycolor";
|
|
4
3
|
import I from "lodash/isFunction";
|
|
5
4
|
import { forwardRef as S, useContext as j, useRef as z, useImperativeHandle as B, useMemo as W } from "react";
|
|
6
5
|
import "../config-provider/ConfigProvider.js";
|
package/tour/index.js
CHANGED
|
@@ -17,12 +17,11 @@ import "@unicom-cloud/utils/constant";
|
|
|
17
17
|
import "lodash/debounce";
|
|
18
18
|
import wt from "../icon-hover/index.js";
|
|
19
19
|
import R from "../space/index.js";
|
|
20
|
+
import "@unicom-cloud/utils/date";
|
|
20
21
|
import "@unicom-cloud/utils/case-name";
|
|
21
22
|
import u from "@unicom-cloud/utils/class-name";
|
|
22
|
-
import "../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
23
23
|
import "@unicom-cloud/utils/constant/ui";
|
|
24
24
|
import "../utils/contextHolder.js";
|
|
25
|
-
import "@unicom-cloud/utils/dayjs";
|
|
26
25
|
import "@unicom-cloud/utils/clipboard-copy";
|
|
27
26
|
import "../components/common/utils/dayjs.js";
|
|
28
27
|
import "@unicom-cloud/utils/file/fileToURL";
|
|
@@ -55,6 +54,8 @@ import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
|
55
54
|
import { resizeObserver as yt } from "../components/common/utils/resizeObserver.js";
|
|
56
55
|
import "@unicom-cloud/utils/file/saveAs";
|
|
57
56
|
import "@unicom-cloud/utils/screenfull";
|
|
57
|
+
import "@unicom-cloud/utils/tinycolor";
|
|
58
|
+
import "@unicom-cloud/utils/ui-color";
|
|
58
59
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
59
60
|
import "react-is";
|
|
60
61
|
import "@unicom-cloud/utils/tree";
|
|
@@ -74,7 +75,7 @@ const xt = {
|
|
|
74
75
|
zIndex: 1e3,
|
|
75
76
|
current: 0
|
|
76
77
|
};
|
|
77
|
-
function
|
|
78
|
+
function Ee(L) {
|
|
78
79
|
const { getPrefixCls: X, componentConfig: Y, rtl: kt } = ct($t), K = gt(
|
|
79
80
|
L,
|
|
80
81
|
xt,
|
|
@@ -306,5 +307,5 @@ function Me(L) {
|
|
|
306
307
|
);
|
|
307
308
|
}
|
|
308
309
|
export {
|
|
309
|
-
|
|
310
|
+
Ee as default
|
|
310
311
|
};
|
package/tree/NodeList.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as x } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as M, useRef as y, useMemo as p, useImperativeHandle as R, createElement as D } from "react";
|
|
3
|
-
import { scrollIntoView as V } from "../components/common/utils/
|
|
3
|
+
import { scrollIntoView as V } from "../components/common/utils/scrollIntoViewIfNeeded.js";
|
|
4
4
|
import b from "../virtual-list/VirtualList.js";
|
|
5
5
|
import I from "./Node.js";
|
|
6
6
|
function H(n) {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import scrollIntoViewIfNeeded, { compute, Options, scrollIntoViewIfNeededSmooth, smoothScrollIntoViewIfNeeded } from '@unicom-cloud/scroll-into-view-if-needed';
|
|
2
|
+
declare function scrollIntoView(node: HTMLElement, options?: Options): void;
|
|
3
|
+
export { compute, scrollIntoView, scrollIntoViewIfNeeded, scrollIntoViewIfNeededSmooth, smoothScrollIntoViewIfNeeded, };
|
|
4
|
+
export default scrollIntoView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, findNodeBy, getChildWithParentBy, getItemBy, getItemBy2, getItemBy3, getItemByID, getLabelFromDictionaryByValue, searchTree, default as tree, } from '@unicom-cloud/utils/tree';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, easing, default as Tween } from '@unicom-cloud/tween';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function findNode(dom: HTMLElement | Document, selector: string): HTMLElement | null;
|
|
2
|
-
export declare function slide(el: HTMLElement, top: number, cb:
|
|
2
|
+
export declare function slide(el: HTMLElement, top: number, cb: () => void): void;
|
|
3
3
|
export declare function getContainer(targetContainer?: string | HTMLElement | Window): HTMLElement | Window | null;
|
|
4
4
|
export declare function getContainerElement(scrollContainer: HTMLElement | Window): HTMLElement;
|
|
5
5
|
export declare function getScrollParent(element: any): any;
|
|
@@ -6,6 +6,14 @@ import { Omit } from '../utils/type';
|
|
|
6
6
|
export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'className'> {
|
|
7
7
|
style?: CSSProperties;
|
|
8
8
|
className?: string | string[];
|
|
9
|
+
/**
|
|
10
|
+
* @zh 头部 className
|
|
11
|
+
*/
|
|
12
|
+
headerClassName?: string | string[];
|
|
13
|
+
/**
|
|
14
|
+
* @zh 身体部 className
|
|
15
|
+
*/
|
|
16
|
+
bodyClassName?: string | string[];
|
|
9
17
|
children?: ReactNode;
|
|
10
18
|
id?: string;
|
|
11
19
|
/**
|
|
@@ -20,10 +20,15 @@ export declare const useColorPicker: (props: UseColorPickerProps) => {
|
|
|
20
20
|
popupVisible: boolean;
|
|
21
21
|
color: {
|
|
22
22
|
hsv: HSV;
|
|
23
|
-
rgb:
|
|
23
|
+
rgb: {
|
|
24
|
+
r: number;
|
|
25
|
+
g: number;
|
|
26
|
+
b: number;
|
|
27
|
+
a: number | undefined;
|
|
28
|
+
};
|
|
24
29
|
hex: string;
|
|
25
30
|
};
|
|
26
|
-
alpha: number;
|
|
31
|
+
alpha: number | undefined;
|
|
27
32
|
onHsvChange: (_value: HSV) => void;
|
|
28
33
|
onAlphaChange: (_value: number) => void;
|
|
29
34
|
onVisibleChange: (newVisible: any) => void;
|
|
@@ -11,7 +11,12 @@ export declare const formatRgba: (r: number, g: number, b: number, a: number) =>
|
|
|
11
11
|
export declare const formatHex: (r: number, g: number, b: number, a: number) => string;
|
|
12
12
|
export declare const getColorFromHsv: (hsv: HSV) => {
|
|
13
13
|
hsv: HSV;
|
|
14
|
-
rgb:
|
|
14
|
+
rgb: {
|
|
15
|
+
r: number;
|
|
16
|
+
g: number;
|
|
17
|
+
b: number;
|
|
18
|
+
a: number | undefined;
|
|
19
|
+
};
|
|
15
20
|
hex: string;
|
|
16
21
|
};
|
|
17
22
|
export declare const getRandomId: () => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { Row } from '../grid';
|
|
2
3
|
import { FormItemProps, KeyType } from './interface';
|
|
3
|
-
declare const Row: React.ForwardRefExoticComponent<import("..").RowProps & React.RefAttributes<unknown>>;
|
|
4
4
|
declare const _default: <FormData = any, FieldValue = FormData[keyof FormData], FieldKey extends KeyType = keyof FormData>(props: FormItemProps<FormData, FieldValue, FieldKey> & {
|
|
5
5
|
ref?: React.Ref<(typeof Row)["prototype"]>;
|
|
6
6
|
}) => React.ReactElement;
|
package/types/pc/grid/Col.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ColProps } from './interface';
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
3
|
+
declare const Col: React.ForwardRefExoticComponent<ColProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export default Col;
|
|
4
5
|
export type { ColProps };
|
package/types/pc/grid/Grid.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { GridProps } from './interface';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
3
|
+
declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<unknown>>;
|
|
4
|
+
export default Grid;
|
|
5
5
|
export type { GridProps };
|
package/types/pc/grid/Item.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { GridItemProps } from './interface';
|
|
3
|
-
declare const
|
|
4
|
-
declare const
|
|
3
|
+
declare const GridItemForwardRef: React.ForwardRefExoticComponent<GridItemProps & React.RefAttributes<unknown>>;
|
|
4
|
+
declare const GridItem: typeof GridItemForwardRef & {
|
|
5
5
|
__PQB_GRID_ITEM__: boolean;
|
|
6
6
|
};
|
|
7
|
-
export default
|
|
7
|
+
export default GridItem;
|
|
8
8
|
export type { GridItemProps };
|
package/types/pc/grid/Row.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RowProps } from './interface';
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const Row: import("react").ForwardRefExoticComponent<RowProps & import("react").RefAttributes<unknown>>;
|
|
3
|
+
export default Row;
|
|
4
4
|
export type { RowProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const useResponsiveState: (val:
|
|
1
|
+
import { type GridUnitProps } from '../interface';
|
|
2
|
+
export declare const useResponsiveState: (val: GridUnitProps, defaultValue: number, fallbackToXs?: boolean) => number;
|
|
@@ -121,6 +121,7 @@ export interface ColProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNam
|
|
|
121
121
|
*/
|
|
122
122
|
flex?: FlexType;
|
|
123
123
|
}
|
|
124
|
+
export type GridUnitProps = number | ResponsiveValue | undefined;
|
|
124
125
|
/**
|
|
125
126
|
* @title Grid
|
|
126
127
|
*/
|
|
@@ -132,19 +133,24 @@ export interface GridProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNa
|
|
|
132
133
|
* @en Number of columns displayed in each row
|
|
133
134
|
* @defaultValue 24
|
|
134
135
|
*/
|
|
135
|
-
cols?:
|
|
136
|
+
cols?: GridUnitProps;
|
|
136
137
|
/**
|
|
137
|
-
* @zh
|
|
138
|
+
* @zh 间距
|
|
139
|
+
* @defaultValue 0
|
|
140
|
+
*/
|
|
141
|
+
gap?: GridUnitProps | number[];
|
|
142
|
+
/**
|
|
143
|
+
* @zh 行与行之间的间距(优先级高于 gap)
|
|
138
144
|
* @en The space in row-to-row
|
|
139
145
|
* @defaultValue 0
|
|
140
146
|
*/
|
|
141
|
-
rowGap?:
|
|
147
|
+
rowGap?: GridUnitProps;
|
|
142
148
|
/**
|
|
143
|
-
* @zh
|
|
149
|
+
* @zh 列与列之间的间距(优先级高于 gap)
|
|
144
150
|
* @en The space in column-to-column
|
|
145
151
|
* @defaultValue 0
|
|
146
152
|
*/
|
|
147
|
-
colGap?:
|
|
153
|
+
colGap?: GridUnitProps;
|
|
148
154
|
/**
|
|
149
155
|
* @zh 是否折叠
|
|
150
156
|
* @en Whether to collapsed
|
|
@@ -169,13 +175,13 @@ export interface GridItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'cla
|
|
|
169
175
|
* @en Number of grids spanned
|
|
170
176
|
* @defaultValue 1
|
|
171
177
|
*/
|
|
172
|
-
span?:
|
|
178
|
+
span?: GridUnitProps;
|
|
173
179
|
/**
|
|
174
180
|
* @zh 左侧的间隔格数
|
|
175
181
|
* @en Number of grids on the left
|
|
176
182
|
* @defaultValue 0
|
|
177
183
|
*/
|
|
178
|
-
offset?:
|
|
184
|
+
offset?: GridUnitProps;
|
|
179
185
|
/**
|
|
180
186
|
* @zh 是否是后缀元素
|
|
181
187
|
* @en Is it a suffix element
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { ItemType } from './useItems';
|
|
2
|
-
|
|
3
|
-
declare function useResize(items: ItemType[], resizableInfos: ResizableInfo[], percentSizes: number[], containerSize: number | undefined, updateSizes: (sizes: number[]) => void, isRTL: boolean | undefined): readonly [(index: number) => void, (index: number, offset: number) => number[], () => void, (index: number, type: "start" | "end") => number[], number | undefined];
|
|
2
|
+
declare function useResize(items: ItemType[], percentSizes: number[], containerSize: number | undefined, updateSizes: (sizes: number[]) => void, isRTL: boolean | undefined): readonly [(index: number) => void, (index: number, offset: number) => number[], () => void, (index: number, type: "start" | "end") => number[], number | undefined];
|
|
4
3
|
export default useResize;
|
|
@@ -92,12 +92,6 @@ export interface PanelProps {
|
|
|
92
92
|
/** @zh 结束边是否可折叠 */
|
|
93
93
|
end?: boolean;
|
|
94
94
|
};
|
|
95
|
-
/**
|
|
96
|
-
* @zh 是否可调整大小
|
|
97
|
-
* @defaultValue true
|
|
98
|
-
* @en Whether resizable
|
|
99
|
-
*/
|
|
100
|
-
resizable?: boolean;
|
|
101
95
|
/**
|
|
102
96
|
* @zh 默认尺寸(像素或百分比字符串)
|
|
103
97
|
* @en Default size (pixels or percentage string)
|
|
@@ -192,8 +186,6 @@ export interface UseCollapsible {
|
|
|
192
186
|
* 可调整大小信息接口
|
|
193
187
|
*/
|
|
194
188
|
export interface ResizableInfo {
|
|
195
|
-
/** @zh 是否可调整大小 */
|
|
196
|
-
resizable: boolean;
|
|
197
189
|
/** @zh 起始边是否可折叠 */
|
|
198
190
|
startCollapsible: boolean;
|
|
199
191
|
/** @zh 结束边是否可折叠 */
|
package/types/pc/tour/index.d.ts
CHANGED
|
@@ -256,6 +256,7 @@ export interface UploadListProps {
|
|
|
256
256
|
renderUploadItem?: (originNode: ReactNode, file: UploadItem, fileList: UploadItem[]) => ReactNode;
|
|
257
257
|
renderUploadList?: (fileList: UploadItem[], uploadListProps: Omit<UploadListProps, 'renderUploadList'>) => ReactNode;
|
|
258
258
|
prefixCls?: string;
|
|
259
|
+
onChange?: (o: object) => void;
|
|
259
260
|
}
|
|
260
261
|
/**
|
|
261
262
|
* @title UploadItem
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { UI_PC_KEY, UI_PC_THEME_DARK_CLASS_NAME, } from '
|
|
2
|
-
export { NOOP } from '../../common/utils/constant';
|
|
1
|
+
export { NOOP, UI_PC_KEY, UI_PC_THEME_DARK_CLASS_NAME, } from '../../common/utils/constant';
|
|
3
2
|
export declare function newArray(length: number): any[];
|
|
4
3
|
export declare function pickTriggerPropsFromRest(rest: object): Pick<object, never>;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from '../../common/utils/dayjs';
|
|
2
|
+
export { default } from '../../common/utils/dayjs';
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
+
export * from '@unicom-cloud/utils/date';
|
|
1
2
|
export * from './caseName';
|
|
2
3
|
export * from './className';
|
|
3
|
-
export * from './color';
|
|
4
|
-
export * from './computeScrollIntoView';
|
|
5
4
|
export * from './constant';
|
|
6
5
|
export * from './contextHolder';
|
|
7
|
-
export * from './convertToDurationBasedOnTimeUnits';
|
|
8
6
|
export * from './copy';
|
|
9
7
|
export * from './dayjs';
|
|
10
8
|
export * from './dom';
|
|
@@ -33,13 +31,12 @@ export * from './resizeObserver';
|
|
|
33
31
|
export * from './responsiveObserve';
|
|
34
32
|
export * from './saveAs';
|
|
35
33
|
export * from './screenfull';
|
|
36
|
-
export * from './
|
|
34
|
+
export * from './scrollIntoViewIfNeeded';
|
|
37
35
|
export * from './setDarkTheme';
|
|
38
36
|
export * from './setPrimaryColor';
|
|
39
37
|
export * from './setTheme';
|
|
40
38
|
export * from './style';
|
|
41
39
|
export * from './throttleByRaf';
|
|
42
|
-
export * from './tinycolor';
|
|
43
40
|
export * from './toArray';
|
|
44
41
|
export * from './tree';
|
|
45
42
|
export * from './tween';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import scrollIntoView, { compute, scrollIntoViewIfNeeded, scrollIntoViewIfNeededSmooth, smoothScrollIntoViewIfNeeded } from '../../common/utils/scrollIntoViewIfNeeded';
|
|
2
|
+
export { compute, scrollIntoView, scrollIntoViewIfNeeded, scrollIntoViewIfNeededSmooth, smoothScrollIntoViewIfNeeded, };
|
|
3
|
+
export default scrollIntoView;
|
package/types/pc/utils/tree.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from '../../common/utils/tree';
|
|
2
|
+
export { default } from '../../common/utils/tree';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default, easing,
|
|
1
|
+
export { default, easing, Tween } from '../../common/utils/tween';
|
package/typography/Ellipsis.js
CHANGED
|
@@ -5,12 +5,11 @@ import Y from "../copy/index.js";
|
|
|
5
5
|
import Z from "../components/common/hooks/useMergeProps.js";
|
|
6
6
|
import tt from "../components/common/hooks/useMergeValue.js";
|
|
7
7
|
import et from "../tooltip/index.js";
|
|
8
|
+
import "@unicom-cloud/utils/date";
|
|
8
9
|
import "@unicom-cloud/utils/case-name";
|
|
9
10
|
import n from "@unicom-cloud/utils/class-name";
|
|
10
|
-
import "../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
11
11
|
import "@unicom-cloud/utils/constant/ui";
|
|
12
12
|
import "../utils/contextHolder.js";
|
|
13
|
-
import "@unicom-cloud/utils/dayjs";
|
|
14
13
|
import "@unicom-cloud/utils/clipboard-copy";
|
|
15
14
|
import "../components/common/utils/dayjs.js";
|
|
16
15
|
import { isServerRendering as rt } from "../components/common/utils/dom.js";
|
|
@@ -48,6 +47,8 @@ import "../components/common/utils/reactDOM.js";
|
|
|
48
47
|
import { resizeObserver as it } from "../components/common/utils/resizeObserver.js";
|
|
49
48
|
import "@unicom-cloud/utils/file/saveAs";
|
|
50
49
|
import "@unicom-cloud/utils/screenfull";
|
|
50
|
+
import "@unicom-cloud/utils/tinycolor";
|
|
51
|
+
import "@unicom-cloud/utils/ui-color";
|
|
51
52
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
52
53
|
import "lodash/isPlainObject";
|
|
53
54
|
import { throttleByRaf as nt } from "../components/common/utils/throttleByRaf.js";
|
|
@@ -216,7 +217,7 @@ const pt = {
|
|
|
216
217
|
I(),
|
|
217
218
|
J()
|
|
218
219
|
] });
|
|
219
|
-
},
|
|
220
|
+
}, ge = Q(at);
|
|
220
221
|
export {
|
|
221
|
-
|
|
222
|
+
ge as default
|
|
222
223
|
};
|
package/typography/Operations.js
CHANGED
|
@@ -6,12 +6,11 @@ import { useEffect as F } from "react";
|
|
|
6
6
|
import O from "../copy/index.js";
|
|
7
7
|
import w from "../components/common/hooks/useKeyboardEvent.js";
|
|
8
8
|
import A from "../tooltip/index.js";
|
|
9
|
+
import "@unicom-cloud/utils/date";
|
|
9
10
|
import "@unicom-cloud/utils/case-name";
|
|
10
11
|
import "@unicom-cloud/utils/class-name";
|
|
11
|
-
import "../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
12
12
|
import "@unicom-cloud/utils/constant/ui";
|
|
13
13
|
import "../utils/contextHolder.js";
|
|
14
|
-
import "@unicom-cloud/utils/dayjs";
|
|
15
14
|
import "@unicom-cloud/utils/clipboard-copy";
|
|
16
15
|
import "../components/common/utils/dayjs.js";
|
|
17
16
|
import "../components/common/utils/dom.js";
|
|
@@ -47,6 +46,8 @@ import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
|
47
46
|
import "../components/common/utils/reactDOM.js";
|
|
48
47
|
import "@unicom-cloud/utils/file/saveAs";
|
|
49
48
|
import "@unicom-cloud/utils/screenfull";
|
|
49
|
+
import "@unicom-cloud/utils/tinycolor";
|
|
50
|
+
import "@unicom-cloud/utils/ui-color";
|
|
50
51
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
51
52
|
import "react-is";
|
|
52
53
|
import "@unicom-cloud/utils/tree";
|
|
@@ -54,7 +55,7 @@ import { isFunction as K } from "@unicom-cloud/utils/is";
|
|
|
54
55
|
import "uuid";
|
|
55
56
|
import "../dist/validate/src/index.js";
|
|
56
57
|
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
57
|
-
function
|
|
58
|
+
function Bo(u) {
|
|
58
59
|
const {
|
|
59
60
|
children: s,
|
|
60
61
|
copyable: i,
|
|
@@ -120,5 +121,5 @@ function zo(u) {
|
|
|
120
121
|
] });
|
|
121
122
|
}
|
|
122
123
|
export {
|
|
123
|
-
|
|
124
|
+
Bo as default
|
|
124
125
|
};
|