@unicom-cloud/ui 0.8.101 → 0.8.103
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 +6 -5
- package/LiquidFill.js +6 -5
- package/List.js +1 -1
- package/Marquee.js +6 -5
- package/QrCode.js +6 -5
- package/Tooltip.js +3 -4
- package/Tour.js +6 -5
- 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/space/index.js +24 -24
- 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 +4 -3
- 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 +53 -44
- 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 +6 -5
- package/liquid-fill/interface.js +1 -0
- package/list/index.js +1 -1
- package/marquee/index.js +141 -223
- package/marquee/interface.js +1 -0
- package/marquee-/index.js +260 -0
- package/marquee-/interface.js +1 -0
- package/menu/Item.js +9 -9
- package/package.json +1 -1
- package/qr-code/index.js +6 -5
- 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 +6 -5
- package/table/th-resizable/index.js +13 -12
- package/time-picker/util.js +8 -8
- package/tooltip/index.js +1 -2
- package/tour/index.js +6 -5
- package/tour/interface.js +1 -0
- 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/config-provider/interface.d.ts +8 -8
- 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 +3 -2
- package/types/pc/grid/hook/useResponsiveState.d.ts +2 -2
- package/types/pc/grid/interface.d.ts +13 -7
- 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/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 +2 -45
- package/types/pc/tour/interface.d.ts +46 -0
- 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/responsiveObserve.d.ts +8 -4
- 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 +6 -5
- package/typography/Operations.js +6 -5
- 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/responsiveObserve.js +32 -25
- 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
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";
|
|
@@ -46,15 +45,17 @@ import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
|
46
45
|
import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
47
46
|
import "../components/common/utils/reactDOM.js";
|
|
48
47
|
import { resizeObserver as it } from "../components/common/utils/resizeObserver.js";
|
|
48
|
+
import "uuid";
|
|
49
49
|
import "@unicom-cloud/utils/file/saveAs";
|
|
50
50
|
import "@unicom-cloud/utils/screenfull";
|
|
51
|
+
import "@unicom-cloud/utils/tinycolor";
|
|
52
|
+
import "@unicom-cloud/utils/ui-color";
|
|
51
53
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
52
54
|
import "lodash/isPlainObject";
|
|
53
55
|
import { throttleByRaf as nt } from "../components/common/utils/throttleByRaf.js";
|
|
54
56
|
import "react-is";
|
|
55
57
|
import "@unicom-cloud/utils/tree";
|
|
56
58
|
import { isPlainObject as b, isFunction as st } from "@unicom-cloud/utils/is";
|
|
57
|
-
import "uuid";
|
|
58
59
|
import "../dist/validate/src/index.js";
|
|
59
60
|
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
60
61
|
import lt from "../config-provider/context.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";
|
|
@@ -45,16 +44,18 @@ import "../dist/react-transition-group/src/SwitchTransition.js";
|
|
|
45
44
|
import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
46
45
|
import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
47
46
|
import "../components/common/utils/reactDOM.js";
|
|
47
|
+
import "uuid";
|
|
48
48
|
import "@unicom-cloud/utils/file/saveAs";
|
|
49
49
|
import "@unicom-cloud/utils/screenfull";
|
|
50
|
+
import "@unicom-cloud/utils/tinycolor";
|
|
51
|
+
import "@unicom-cloud/utils/ui-color";
|
|
50
52
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
51
53
|
import "react-is";
|
|
52
54
|
import "@unicom-cloud/utils/tree";
|
|
53
55
|
import { isFunction as K } from "@unicom-cloud/utils/is";
|
|
54
|
-
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
|
};
|
package/upload/request.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import "@unicom-cloud/utils/constant/ui";
|
|
2
1
|
import { NOOP as c } from "../components/common/utils/constant.js";
|
|
3
|
-
function d(
|
|
4
|
-
const
|
|
5
|
-
if (!
|
|
6
|
-
return
|
|
2
|
+
function d(o) {
|
|
3
|
+
const n = o.responseText || o.response;
|
|
4
|
+
if (!n)
|
|
5
|
+
return n;
|
|
7
6
|
try {
|
|
8
|
-
return JSON.parse(
|
|
7
|
+
return JSON.parse(n);
|
|
9
8
|
} catch {
|
|
10
|
-
return
|
|
9
|
+
return n;
|
|
11
10
|
}
|
|
12
11
|
}
|
|
13
|
-
const
|
|
12
|
+
const q = function(o) {
|
|
14
13
|
const {
|
|
15
|
-
onProgress:
|
|
14
|
+
onProgress: n = c,
|
|
16
15
|
onError: s = c,
|
|
17
16
|
onSuccess: l = c,
|
|
18
17
|
action: m,
|
|
@@ -22,14 +21,14 @@ const x = function(n) {
|
|
|
22
21
|
file: f,
|
|
23
22
|
data: w = {},
|
|
24
23
|
withCredentials: O = !1
|
|
25
|
-
} =
|
|
24
|
+
} = o;
|
|
26
25
|
function p(t) {
|
|
27
26
|
return typeof t == "function" ? t(f) : t;
|
|
28
27
|
}
|
|
29
28
|
const y = p(g), i = p(w), e = new XMLHttpRequest();
|
|
30
|
-
|
|
29
|
+
n && e.upload && (e.upload.onprogress = function(t) {
|
|
31
30
|
let a;
|
|
32
|
-
t.total > 0 && (a = t.loaded / t.total * 100),
|
|
31
|
+
t.total > 0 && (a = t.loaded / t.total * 100), n(parseInt(a, 10), t);
|
|
33
32
|
}), e.onerror = function(a) {
|
|
34
33
|
s(a);
|
|
35
34
|
}, e.onload = function() {
|
|
@@ -48,5 +47,5 @@ const x = function(n) {
|
|
|
48
47
|
};
|
|
49
48
|
};
|
|
50
49
|
export {
|
|
51
|
-
|
|
50
|
+
q as default
|
|
52
51
|
};
|
package/upload/request_.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import P from "axios";
|
|
2
|
-
import "@unicom-cloud/utils/constant/ui";
|
|
3
2
|
import { NOOP as e } from "../components/common/utils/constant.js";
|
|
4
3
|
import "../components/common/utils/is.js";
|
|
5
4
|
import { isPlainObject as x, isFunction as y } from "@unicom-cloud/utils/is";
|
|
6
|
-
const
|
|
5
|
+
const N = (f) => {
|
|
7
6
|
const {
|
|
8
7
|
onProgress: m = e,
|
|
9
8
|
onError: n = e,
|
|
@@ -59,5 +58,5 @@ const q = (f) => {
|
|
|
59
58
|
};
|
|
60
59
|
};
|
|
61
60
|
export {
|
|
62
|
-
|
|
61
|
+
N as default
|
|
63
62
|
};
|
package/utils/constant.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { pick as r } from "../components/common/utils/pick.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { NOOP as p } from "../components/common/utils/constant.js";
|
|
3
|
+
import { UI_PC_KEY as _, UI_PC_THEME_DARK_CLASS_NAME as c } from "@unicom-cloud/utils/constant/ui";
|
|
4
4
|
function n(o) {
|
|
5
5
|
return Array.from(new Array(o));
|
|
6
6
|
}
|
|
@@ -17,9 +17,9 @@ function t(o) {
|
|
|
17
17
|
]);
|
|
18
18
|
}
|
|
19
19
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
p as NOOP,
|
|
21
|
+
_ as UI_PC_KEY,
|
|
22
|
+
c as UI_PC_THEME_DARK_CLASS_NAME,
|
|
23
23
|
n as newArray,
|
|
24
24
|
t as pickTriggerPropsFromRest
|
|
25
25
|
};
|
package/utils/dayjs.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { dayjs as
|
|
1
|
+
import { dayjs as t, dayjs as o, getDayjsValue as s, getNow as i, getSortedDayjsArray as r, getTimeFormat as g, getValueWithTime as m, isDayjsArrayChange as y, isDayjsChange as d, isValidTimeString as j, methods as l, timezoneToOffset as n, toLocal as T, toTimezone as f } from "../components/common/utils/dayjs.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
o as
|
|
3
|
+
t as dayjs,
|
|
4
|
+
o as default,
|
|
5
|
+
s as getDayjsValue,
|
|
5
6
|
i as getNow,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
r as getSortedDayjsArray,
|
|
8
|
+
g as getTimeFormat,
|
|
9
|
+
m as getValueWithTime,
|
|
10
|
+
y as isDayjsArrayChange,
|
|
11
|
+
d as isDayjsChange,
|
|
11
12
|
j as isValidTimeString,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
l as methods,
|
|
14
|
+
n as timezoneToOffset,
|
|
15
|
+
T as toLocal,
|
|
16
|
+
f as toTimezone
|
|
16
17
|
};
|