@unicom-cloud/ui 0.8.99 → 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 +7 -6
- package/Copy.js +49 -2
- package/Flex.js +12 -0
- package/Grid.js +1 -1
- package/LiquidFill.js +3 -2
- package/Marquee.js +3 -2
- package/QrCode.js +3 -2
- package/Splitter.js +4 -5
- package/Tag.js +3 -2
- package/Tour.js +3 -2
- package/alert/index.js +38 -39
- package/anchor/index.js +5 -3
- package/badge/index.js +19 -18
- 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 +503 -493
- package/input/Button.js +39 -34
- package/input/Textarea.js +108 -104
- package/liquid-fill/index.js +3 -2
- package/marquee/index.js +3 -2
- package/package.json +1 -1
- package/qr-code/index.js +3 -2
- package/segmented/index.js +112 -104
- 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 +5 -115
- 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 +5 -6
- package/types/common/space/index.d.ts +2 -1
- 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/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 +0 -2
- package/types/pc/color-picker/interface.d.ts +0 -2
- package/types/pc/config-provider/interface.d.ts +13 -17
- package/types/pc/copy/interface.d.ts +2 -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 +6 -2
- 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/list/interface.d.ts +0 -4
- 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/resize-box/interface.d.ts +1 -7
- 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 +1 -0
- 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 -4
- package/types/pc/splitter/interface.d.ts +181 -38
- 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/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 +6 -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 +4 -0
- package/utils/toArray.js +12 -0
- package/version/index.js +1 -1
- /package/types/pc/grid/{GridItem.d.ts → Item.d.ts} +0 -0
package/Anchor.js
CHANGED
package/Badge.js
CHANGED
|
@@ -46,17 +46,18 @@ import "./dist/react-transition-group/src/TransitionGroup.js";
|
|
|
46
46
|
import "@unicom-cloud/utils/file/saveAs";
|
|
47
47
|
import "@unicom-cloud/utils/screenfull";
|
|
48
48
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
49
|
+
import "react-is";
|
|
49
50
|
import "@unicom-cloud/utils/tree";
|
|
50
51
|
import "@unicom-cloud/utils/is";
|
|
51
52
|
import "uuid";
|
|
52
53
|
import "./dist/validate/src/index.js";
|
|
53
54
|
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
54
|
-
import { default as
|
|
55
|
+
import { default as mo } from "./badge/Count.js";
|
|
55
56
|
import "./config-provider/context.js";
|
|
56
|
-
import { BADGE_COLORS as
|
|
57
|
+
import { BADGE_COLORS as io, BADGE_STATUS as eo, default as ao } from "./badge/index.js";
|
|
57
58
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
io as BADGE_COLORS,
|
|
60
|
+
eo as BADGE_STATUS,
|
|
61
|
+
mo as BadgeCount,
|
|
62
|
+
ao as default
|
|
62
63
|
};
|
package/Copy.js
CHANGED
|
@@ -5,11 +5,58 @@ import "react";
|
|
|
5
5
|
import "./config-provider/ConfigProvider.js";
|
|
6
6
|
import "./components/common/hooks/useKeyboardEvent.js";
|
|
7
7
|
import "./tooltip/index.js";
|
|
8
|
+
import "@unicom-cloud/utils/case-name";
|
|
8
9
|
import "@unicom-cloud/utils/class-name";
|
|
10
|
+
import "./dist/tinycolor/chunk/BOzCVdr0.js";
|
|
11
|
+
import "@unicom-cloud/utils/constant/ui";
|
|
12
|
+
import "./utils/contextHolder.js";
|
|
13
|
+
import "@unicom-cloud/utils/dayjs";
|
|
9
14
|
import "@unicom-cloud/utils/clipboard-copy";
|
|
15
|
+
import "./components/common/utils/dayjs.js";
|
|
16
|
+
import "./components/common/utils/dom.js";
|
|
17
|
+
import "@unicom-cloud/utils/file/fileToURL";
|
|
18
|
+
import "lodash/escapeRegExp";
|
|
19
|
+
import "lodash/isArray";
|
|
20
|
+
import "lodash/isNumber";
|
|
21
|
+
import "lodash/isString";
|
|
22
|
+
import "lodash/isFunction";
|
|
23
|
+
import "lodash/throttle";
|
|
24
|
+
import "./components/common/utils/is.js";
|
|
25
|
+
import "lodash/camelCase";
|
|
26
|
+
import "lodash/capitalize";
|
|
27
|
+
import "lodash/cloneDeep";
|
|
28
|
+
import "lodash/debounce";
|
|
29
|
+
import "lodash/get";
|
|
30
|
+
import "lodash/has";
|
|
31
|
+
import "lodash/kebabCase";
|
|
32
|
+
import "lodash/merge";
|
|
33
|
+
import "lodash/mergeWith";
|
|
34
|
+
import "lodash/set";
|
|
35
|
+
import "lodash/setWith";
|
|
36
|
+
import "lodash/snakeCase";
|
|
37
|
+
import "lodash/startCase";
|
|
38
|
+
import "lodash/uniq";
|
|
39
|
+
import "lodash/upperFirst";
|
|
40
|
+
import "@unicom-cloud/utils/math";
|
|
10
41
|
import "./components/common/utils/mergedToString.js";
|
|
42
|
+
import "./dist/react-transition-group/src/CSSTransition.js";
|
|
43
|
+
import "./dist/react-transition-group/src/ReplaceTransition.js";
|
|
44
|
+
import "./dist/react-transition-group/src/SwitchTransition.js";
|
|
45
|
+
import "./dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
46
|
+
import "./dist/react-transition-group/src/TransitionGroup.js";
|
|
47
|
+
import "./components/common/utils/reactDOM.js";
|
|
48
|
+
import "@unicom-cloud/utils/file/saveAs";
|
|
49
|
+
import "@unicom-cloud/utils/screenfull";
|
|
50
|
+
import "@unicom-cloud/utils/constant/ui.js";
|
|
51
|
+
import "lodash/isPlainObject";
|
|
52
|
+
import "react-is";
|
|
53
|
+
import "@unicom-cloud/utils/tree";
|
|
54
|
+
import "@unicom-cloud/utils/is";
|
|
55
|
+
import "uuid";
|
|
56
|
+
import "./dist/validate/src/index.js";
|
|
57
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
11
58
|
import "./config-provider/context.js";
|
|
12
|
-
import { default as
|
|
59
|
+
import { default as eo } from "./copy/index.js";
|
|
13
60
|
export {
|
|
14
|
-
|
|
61
|
+
eo as default
|
|
15
62
|
};
|
package/Flex.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "./config-provider/ConfigProvider.js";
|
|
4
|
+
import "./components/common/hooks/useMergeProps.js";
|
|
5
|
+
import "@unicom-cloud/utils/class-name";
|
|
6
|
+
import "./flex/utils.js";
|
|
7
|
+
import "./config-provider/context.js";
|
|
8
|
+
import { FlexVertical as f, default as x } from "./flex/index.js";
|
|
9
|
+
export {
|
|
10
|
+
f as FlexVertical,
|
|
11
|
+
x as default
|
|
12
|
+
};
|
package/Grid.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as a, default as e } from "./grid/Col.js";
|
|
2
2
|
import "./grid/Grid.js";
|
|
3
|
-
import { default as d } from "./grid/
|
|
3
|
+
import { default as d } from "./grid/Item.js";
|
|
4
4
|
import { default as m, default as u } from "./grid/Row.js";
|
|
5
5
|
import { default as s } from "./grid/index.js";
|
|
6
6
|
export {
|
package/LiquidFill.js
CHANGED
|
@@ -50,12 +50,13 @@ import "./dist/react-transition-group/src/TransitionGroup.js";
|
|
|
50
50
|
import "@unicom-cloud/utils/file/saveAs";
|
|
51
51
|
import "@unicom-cloud/utils/screenfull";
|
|
52
52
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
53
|
+
import "react-is";
|
|
53
54
|
import "@unicom-cloud/utils/tree";
|
|
54
55
|
import "@unicom-cloud/utils/is";
|
|
55
56
|
import "uuid";
|
|
56
57
|
import "./dist/validate/src/index.js";
|
|
57
58
|
import "./config-provider/context.js";
|
|
58
|
-
import { default as
|
|
59
|
+
import { default as eo } from "./liquid-fill/index.js";
|
|
59
60
|
export {
|
|
60
|
-
|
|
61
|
+
eo as default
|
|
61
62
|
};
|
package/Marquee.js
CHANGED
|
@@ -50,12 +50,13 @@ import "./components/common/utils/resizeObserver.js";
|
|
|
50
50
|
import "@unicom-cloud/utils/file/saveAs";
|
|
51
51
|
import "@unicom-cloud/utils/screenfull";
|
|
52
52
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
53
|
+
import "react-is";
|
|
53
54
|
import "@unicom-cloud/utils/tree";
|
|
54
55
|
import "@unicom-cloud/utils/is";
|
|
55
56
|
import "uuid";
|
|
56
57
|
import "./dist/validate/src/index.js";
|
|
57
58
|
import "./config-provider/context.js";
|
|
58
|
-
import { default as
|
|
59
|
+
import { default as eo } from "./marquee/index.js";
|
|
59
60
|
export {
|
|
60
|
-
|
|
61
|
+
eo as default
|
|
61
62
|
};
|
package/QrCode.js
CHANGED
|
@@ -50,12 +50,13 @@ import "./dist/react-transition-group/src/TransitionGroup.js";
|
|
|
50
50
|
import "@unicom-cloud/utils/file/saveAs";
|
|
51
51
|
import "@unicom-cloud/utils/screenfull";
|
|
52
52
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
53
|
+
import "react-is";
|
|
53
54
|
import "@unicom-cloud/utils/tree";
|
|
54
55
|
import "@unicom-cloud/utils/is";
|
|
55
56
|
import "uuid";
|
|
56
57
|
import "./dist/validate/src/index.js";
|
|
57
58
|
import "./config-provider/context.js";
|
|
58
|
-
import { default as
|
|
59
|
+
import { default as eo } from "./qr-code/index.js";
|
|
59
60
|
export {
|
|
60
|
-
|
|
61
|
+
eo as default
|
|
61
62
|
};
|
package/Splitter.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
1
|
+
import "./splitter/Panel.js";
|
|
2
|
+
import "./splitter/Splitter.js";
|
|
3
|
+
import { default as p } from "./splitter/index.js";
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
o as default
|
|
5
|
+
p as default
|
|
7
6
|
};
|
package/Tag.js
CHANGED
|
@@ -11,7 +11,8 @@ import "./popconfirm/index.js";
|
|
|
11
11
|
import "@unicom-cloud/utils/class-name";
|
|
12
12
|
import "./components/common/utils/omit.js";
|
|
13
13
|
import "./config-provider/context.js";
|
|
14
|
-
import { default as
|
|
14
|
+
import { TAG_COLORS as C, default as G } from "./tag/index.js";
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
C as TAG_COLORS,
|
|
17
|
+
G as default
|
|
17
18
|
};
|
package/Tour.js
CHANGED
|
@@ -56,12 +56,13 @@ import "./components/common/utils/resizeObserver.js";
|
|
|
56
56
|
import "@unicom-cloud/utils/file/saveAs";
|
|
57
57
|
import "@unicom-cloud/utils/screenfull";
|
|
58
58
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
59
|
+
import "react-is";
|
|
59
60
|
import "@unicom-cloud/utils/tree";
|
|
60
61
|
import "@unicom-cloud/utils/is";
|
|
61
62
|
import "uuid";
|
|
62
63
|
import "./dist/validate/src/index.js";
|
|
63
64
|
import "./config-provider/context.js";
|
|
64
|
-
import { default as
|
|
65
|
+
import { default as bo } from "./tour/index.js";
|
|
65
66
|
export {
|
|
66
|
-
|
|
67
|
+
bo as default
|
|
67
68
|
};
|
package/alert/index.js
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import j from "@unicom-cloud/icons/IconUiCheckCircleFill";
|
|
3
3
|
import k from "@unicom-cloud/icons/IconUiClose";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { forwardRef as
|
|
4
|
+
import T from "@unicom-cloud/icons/IconUiCloseCircleFill";
|
|
5
|
+
import _ from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
6
|
+
import c from "@unicom-cloud/icons/IconUiInfoCircleFill";
|
|
7
|
+
import { forwardRef as q, useContext as z, useState as H } from "react";
|
|
8
8
|
import "../config-provider/ConfigProvider.js";
|
|
9
9
|
import M from "../components/common/hooks/useMergeProps.js";
|
|
10
10
|
import O from "@unicom-cloud/utils/class-name";
|
|
11
|
-
import { PqbCSSTransition as
|
|
12
|
-
import
|
|
13
|
-
const
|
|
11
|
+
import { PqbCSSTransition as R } from "../components/common/utils/PqbCSSTransition.js";
|
|
12
|
+
import V from "../config-provider/context.js";
|
|
13
|
+
const B = {
|
|
14
14
|
showIcon: !0,
|
|
15
15
|
type: "default"
|
|
16
16
|
};
|
|
17
|
-
function
|
|
18
|
-
n
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
D,
|
|
17
|
+
function D(a, m) {
|
|
18
|
+
const { getPrefixCls: p, componentConfig: f, rtl: d } = z(V), n = M(
|
|
19
|
+
a,
|
|
20
|
+
B,
|
|
22
21
|
f?.Alert
|
|
23
22
|
), {
|
|
24
23
|
style: u,
|
|
25
24
|
className: C,
|
|
26
|
-
action:
|
|
27
|
-
type:
|
|
25
|
+
action: l,
|
|
26
|
+
type: s,
|
|
28
27
|
title: t,
|
|
29
|
-
content:
|
|
28
|
+
content: i,
|
|
30
29
|
icon: N,
|
|
31
30
|
showIcon: b,
|
|
32
31
|
closable: h,
|
|
@@ -36,28 +35,28 @@ function G(m, n) {
|
|
|
36
35
|
closeElement: v,
|
|
37
36
|
banner: w,
|
|
38
37
|
...g
|
|
39
|
-
} =
|
|
40
|
-
default: /* @__PURE__ */ e(
|
|
41
|
-
info: /* @__PURE__ */ e(
|
|
38
|
+
} = n, o = p?.("alert"), [y, U] = H(!0), E = N || {
|
|
39
|
+
default: /* @__PURE__ */ e(c, {}),
|
|
40
|
+
info: /* @__PURE__ */ e(c, {}),
|
|
42
41
|
success: /* @__PURE__ */ e(j, {}),
|
|
43
|
-
warning: /* @__PURE__ */ e(
|
|
44
|
-
error: /* @__PURE__ */ e(
|
|
45
|
-
}[
|
|
46
|
-
function
|
|
42
|
+
warning: /* @__PURE__ */ e(_, {}),
|
|
43
|
+
error: /* @__PURE__ */ e(T, {})
|
|
44
|
+
}[s];
|
|
45
|
+
function F(S) {
|
|
47
46
|
U(!1), I?.(S);
|
|
48
47
|
}
|
|
49
|
-
const
|
|
48
|
+
const P = O(
|
|
50
49
|
o,
|
|
51
|
-
`${o}-${
|
|
50
|
+
`${o}-${s}`,
|
|
52
51
|
{
|
|
53
52
|
[`${o}-with-title`]: t,
|
|
54
53
|
[`${o}-banner`]: w,
|
|
55
54
|
[`${o}-rtl`]: d
|
|
56
55
|
},
|
|
57
56
|
C
|
|
58
|
-
),
|
|
57
|
+
), A = "closeable" in n ? $ : h;
|
|
59
58
|
return /* @__PURE__ */ e(
|
|
60
|
-
|
|
59
|
+
R,
|
|
61
60
|
{
|
|
62
61
|
in: y,
|
|
63
62
|
timeout: 300,
|
|
@@ -66,26 +65,26 @@ function G(m, n) {
|
|
|
66
65
|
onExited: () => {
|
|
67
66
|
x?.();
|
|
68
67
|
},
|
|
69
|
-
children: /* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ r(
|
|
70
69
|
"div",
|
|
71
70
|
{
|
|
72
|
-
ref:
|
|
71
|
+
ref: m,
|
|
73
72
|
style: u,
|
|
74
|
-
className:
|
|
73
|
+
className: P,
|
|
75
74
|
role: "alert",
|
|
76
75
|
...g,
|
|
77
76
|
children: [
|
|
78
|
-
b && /* @__PURE__ */ e("div", { className: `${o}-icon-wrapper`, children:
|
|
79
|
-
/* @__PURE__ */
|
|
77
|
+
b && /* @__PURE__ */ e("div", { className: `${o}-icon-wrapper`, children: E }),
|
|
78
|
+
/* @__PURE__ */ r("div", { className: `${o}-content-wrapper`, children: [
|
|
80
79
|
t && /* @__PURE__ */ e("div", { className: `${o}-title`, children: t }),
|
|
81
|
-
|
|
80
|
+
i && /* @__PURE__ */ e("div", { className: `${o}-content`, children: i })
|
|
82
81
|
] }),
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
l && /* @__PURE__ */ e("div", { className: `${o}-action`, children: l }),
|
|
83
|
+
A && /* @__PURE__ */ e(
|
|
85
84
|
"button",
|
|
86
85
|
{
|
|
87
86
|
type: "button",
|
|
88
|
-
onClick:
|
|
87
|
+
onClick: F,
|
|
89
88
|
className: `${o}-close-btn`,
|
|
90
89
|
children: v || /* @__PURE__ */ e(k, {})
|
|
91
90
|
}
|
|
@@ -96,8 +95,8 @@ function G(m, n) {
|
|
|
96
95
|
}
|
|
97
96
|
);
|
|
98
97
|
}
|
|
99
|
-
const
|
|
100
|
-
|
|
98
|
+
const G = q(D);
|
|
99
|
+
G.displayName = "Alert";
|
|
101
100
|
export {
|
|
102
|
-
|
|
101
|
+
G as default
|
|
103
102
|
};
|
package/anchor/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import r from "./Anchor.js";
|
|
2
|
-
import {
|
|
2
|
+
import { findNode as f } from "./util.js";
|
|
3
|
+
import { default as d } from "./Link.js";
|
|
3
4
|
export {
|
|
4
|
-
|
|
5
|
-
r as default
|
|
5
|
+
d as AnchorLink,
|
|
6
|
+
r as default,
|
|
7
|
+
f as findAnchorLinkNode
|
|
6
8
|
};
|
package/badge/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { forwardRef as z, useContext as H, useRef as O, useImperativeHandle as L
|
|
|
4
4
|
import "../config-provider/ConfigProvider.js";
|
|
5
5
|
import M from "../components/common/hooks/useMergeProps.js";
|
|
6
6
|
import "@unicom-cloud/utils/case-name";
|
|
7
|
-
import
|
|
7
|
+
import n from "@unicom-cloud/utils/class-name";
|
|
8
8
|
import "../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
9
9
|
import "@unicom-cloud/utils/constant/ui";
|
|
10
10
|
import "../utils/contextHolder.js";
|
|
@@ -46,6 +46,7 @@ import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
|
46
46
|
import "@unicom-cloud/utils/file/saveAs";
|
|
47
47
|
import "@unicom-cloud/utils/screenfull";
|
|
48
48
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
49
|
+
import "react-is";
|
|
49
50
|
import "@unicom-cloud/utils/tree";
|
|
50
51
|
import "@unicom-cloud/utils/is";
|
|
51
52
|
import { v4 as F } from "uuid";
|
|
@@ -93,8 +94,8 @@ function Q(P, v) {
|
|
|
93
94
|
status: p,
|
|
94
95
|
children: u,
|
|
95
96
|
...y
|
|
96
|
-
} = T, d = O(null), C = O(F()), t = A?.("badge"),
|
|
97
|
-
h && (
|
|
97
|
+
} = T, d = O(null), C = O(F()), t = A?.("badge"), i = { ...j || {} }, [h, S] = I || [];
|
|
98
|
+
h && (i.marginRight = -h), S && (i.marginTop = S), L(v, () => ({
|
|
98
99
|
dom: d.current
|
|
99
100
|
}));
|
|
100
101
|
const k = () => {
|
|
@@ -102,8 +103,8 @@ function Q(P, v) {
|
|
|
102
103
|
return /* @__PURE__ */ e(
|
|
103
104
|
"span",
|
|
104
105
|
{
|
|
105
|
-
className:
|
|
106
|
-
style:
|
|
106
|
+
className: n(`${t}-custom-dot`, m),
|
|
107
|
+
style: i,
|
|
107
108
|
children: s
|
|
108
109
|
}
|
|
109
110
|
);
|
|
@@ -111,8 +112,8 @@ function Q(P, v) {
|
|
|
111
112
|
return l && !r && !p ? /* @__PURE__ */ e(
|
|
112
113
|
"span",
|
|
113
114
|
{
|
|
114
|
-
className:
|
|
115
|
-
style:
|
|
115
|
+
className: n(`${t}-text`, m),
|
|
116
|
+
style: i,
|
|
116
117
|
children: l
|
|
117
118
|
}
|
|
118
119
|
) : p || r && typeof s == "number" && s <= 0 ? /* @__PURE__ */ c("span", { className: `${t}-status-wrapper`, children: [
|
|
@@ -120,7 +121,7 @@ function Q(P, v) {
|
|
|
120
121
|
/* @__PURE__ */ e(
|
|
121
122
|
"span",
|
|
122
123
|
{
|
|
123
|
-
className:
|
|
124
|
+
className: n(
|
|
124
125
|
`${t}-status-dot`,
|
|
125
126
|
{
|
|
126
127
|
[`${t}-dot-pulse`]: x,
|
|
@@ -129,7 +130,7 @@ function Q(P, v) {
|
|
|
129
130
|
},
|
|
130
131
|
m
|
|
131
132
|
),
|
|
132
|
-
style: { ...a, ...
|
|
133
|
+
style: { ...a, ...i }
|
|
133
134
|
}
|
|
134
135
|
),
|
|
135
136
|
!!l && /* @__PURE__ */ e("span", { className: `${t}-status-text`, children: l })
|
|
@@ -145,7 +146,7 @@ function Q(P, v) {
|
|
|
145
146
|
children: /* @__PURE__ */ e(
|
|
146
147
|
"span",
|
|
147
148
|
{
|
|
148
|
-
className:
|
|
149
|
+
className: n(
|
|
149
150
|
`${t}-dot`,
|
|
150
151
|
{
|
|
151
152
|
[`${t}-dot-pulse`]: x,
|
|
@@ -153,7 +154,7 @@ function Q(P, v) {
|
|
|
153
154
|
},
|
|
154
155
|
m
|
|
155
156
|
),
|
|
156
|
-
style: { ...a, ...
|
|
157
|
+
style: { ...a, ...i }
|
|
157
158
|
}
|
|
158
159
|
)
|
|
159
160
|
}
|
|
@@ -161,8 +162,8 @@ function Q(P, v) {
|
|
|
161
162
|
B,
|
|
162
163
|
{
|
|
163
164
|
prefixCls: t,
|
|
164
|
-
className:
|
|
165
|
-
style: { ...a, ...
|
|
165
|
+
className: n(`${t}-number`, m),
|
|
166
|
+
style: { ...a, ...i },
|
|
166
167
|
maxCount: E,
|
|
167
168
|
count: s
|
|
168
169
|
}
|
|
@@ -173,7 +174,7 @@ function Q(P, v) {
|
|
|
173
174
|
return /* @__PURE__ */ c(
|
|
174
175
|
"div",
|
|
175
176
|
{
|
|
176
|
-
className:
|
|
177
|
+
className: n(
|
|
177
178
|
`${t}-ribbon`,
|
|
178
179
|
`${t}-ribbon-${_}`,
|
|
179
180
|
{
|
|
@@ -205,7 +206,7 @@ function Q(P, v) {
|
|
|
205
206
|
) : /* @__PURE__ */ c(
|
|
206
207
|
"span",
|
|
207
208
|
{
|
|
208
|
-
className:
|
|
209
|
+
className: n(
|
|
209
210
|
t,
|
|
210
211
|
{
|
|
211
212
|
[`${t}-status`]: p,
|
|
@@ -228,7 +229,7 @@ function Q(P, v) {
|
|
|
228
229
|
const D = z(Q);
|
|
229
230
|
D.displayName = "Badge";
|
|
230
231
|
D.Count = B;
|
|
231
|
-
const
|
|
232
|
+
const Xt = f, Yt = [
|
|
232
233
|
"default",
|
|
233
234
|
"processing",
|
|
234
235
|
"success",
|
|
@@ -236,8 +237,8 @@ const Wt = f, Xt = [
|
|
|
236
237
|
"error"
|
|
237
238
|
];
|
|
238
239
|
export {
|
|
239
|
-
|
|
240
|
-
|
|
240
|
+
Xt as BADGE_COLORS,
|
|
241
|
+
Yt as BADGE_STATUS,
|
|
241
242
|
B as BadgeCount,
|
|
242
243
|
D as default
|
|
243
244
|
};
|
package/copy/index.js
CHANGED
|
@@ -1,62 +1,110 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useContext as
|
|
1
|
+
import { jsx as e, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import g from "@unicom-cloud/icons/IconUiCheckCircleFill";
|
|
3
|
+
import T from "@unicom-cloud/icons/IconUiCopy";
|
|
4
|
+
import { useContext as h, useState as b, useRef as P, useEffect as w } from "react";
|
|
5
5
|
import "../config-provider/ConfigProvider.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import k from "@unicom-cloud/utils/
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
import E from "../components/common/hooks/useKeyboardEvent.js";
|
|
7
|
+
import N from "../tooltip/index.js";
|
|
8
|
+
import "@unicom-cloud/utils/case-name";
|
|
9
|
+
import k from "@unicom-cloud/utils/class-name";
|
|
10
|
+
import "../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
11
|
+
import "@unicom-cloud/utils/constant/ui";
|
|
12
|
+
import "../utils/contextHolder.js";
|
|
13
|
+
import "@unicom-cloud/utils/dayjs";
|
|
14
|
+
import I from "@unicom-cloud/utils/clipboard-copy";
|
|
15
|
+
import "../components/common/utils/dayjs.js";
|
|
16
|
+
import "../components/common/utils/dom.js";
|
|
17
|
+
import "@unicom-cloud/utils/file/fileToURL";
|
|
18
|
+
import "lodash/escapeRegExp";
|
|
19
|
+
import "lodash/isArray";
|
|
20
|
+
import "lodash/isNumber";
|
|
21
|
+
import "lodash/isString";
|
|
22
|
+
import "lodash/isFunction";
|
|
23
|
+
import "lodash/throttle";
|
|
24
|
+
import "../components/common/utils/is.js";
|
|
25
|
+
import "lodash/camelCase";
|
|
26
|
+
import "lodash/capitalize";
|
|
27
|
+
import "lodash/cloneDeep";
|
|
28
|
+
import "lodash/debounce";
|
|
29
|
+
import "lodash/get";
|
|
30
|
+
import "lodash/has";
|
|
31
|
+
import "lodash/kebabCase";
|
|
32
|
+
import "lodash/merge";
|
|
33
|
+
import "lodash/mergeWith";
|
|
34
|
+
import "lodash/set";
|
|
35
|
+
import "lodash/setWith";
|
|
36
|
+
import "lodash/snakeCase";
|
|
37
|
+
import "lodash/startCase";
|
|
38
|
+
import "lodash/uniq";
|
|
39
|
+
import "lodash/upperFirst";
|
|
40
|
+
import "@unicom-cloud/utils/math";
|
|
41
|
+
import { mergedToString as j } from "../components/common/utils/mergedToString.js";
|
|
42
|
+
import "../dist/react-transition-group/src/CSSTransition.js";
|
|
43
|
+
import "../dist/react-transition-group/src/ReplaceTransition.js";
|
|
44
|
+
import "../dist/react-transition-group/src/SwitchTransition.js";
|
|
45
|
+
import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
46
|
+
import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
47
|
+
import "../components/common/utils/reactDOM.js";
|
|
48
|
+
import "@unicom-cloud/utils/file/saveAs";
|
|
49
|
+
import "@unicom-cloud/utils/screenfull";
|
|
50
|
+
import "@unicom-cloud/utils/constant/ui.js";
|
|
51
|
+
import "lodash/isPlainObject";
|
|
52
|
+
import "react-is";
|
|
53
|
+
import "@unicom-cloud/utils/tree";
|
|
54
|
+
import { isFunction as v } from "@unicom-cloud/utils/is";
|
|
55
|
+
import "uuid";
|
|
56
|
+
import "../dist/validate/src/index.js";
|
|
57
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
58
|
+
import F from "../config-provider/context.js";
|
|
59
|
+
function S(o) {
|
|
60
|
+
const { children: n } = o, u = E(), C = h(F), { getPrefixCls: d, locale: c, rtl: y } = C, r = d?.("copy"), [i, l] = b(!1), m = P(-1), p = o.tooltips || [
|
|
14
61
|
c?.Typography?.copy,
|
|
15
62
|
c?.Typography?.copied
|
|
16
63
|
];
|
|
17
|
-
let
|
|
18
|
-
o.icon !== null && o.icon !== !1 && (
|
|
19
|
-
function a
|
|
20
|
-
if (
|
|
64
|
+
let s = null;
|
|
65
|
+
o.icon !== null && o.icon !== !1 && (s = i ? /* @__PURE__ */ e(g, {}) : o.icon || /* @__PURE__ */ e(T, {}));
|
|
66
|
+
function f(a) {
|
|
67
|
+
if (a.stopPropagation(), i)
|
|
21
68
|
return;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
69
|
+
let t = o.text;
|
|
70
|
+
v(t) && (t = t()), t || (t = j(n)), I(t), l(!0), o.onCopy?.(t, a), m.current = window.setTimeout(() => {
|
|
71
|
+
l(!1);
|
|
25
72
|
}, 3e3);
|
|
26
73
|
}
|
|
27
|
-
return
|
|
28
|
-
clearTimeout(
|
|
29
|
-
}, []), /* @__PURE__ */
|
|
30
|
-
|
|
74
|
+
return w(() => () => {
|
|
75
|
+
clearTimeout(m.current), m.current = -1;
|
|
76
|
+
}, []), /* @__PURE__ */ e(
|
|
77
|
+
N,
|
|
31
78
|
{
|
|
32
|
-
content:
|
|
79
|
+
content: i ? p[1] : p[0],
|
|
33
80
|
getPopupContainer: () => window.document.body,
|
|
34
81
|
...o.tooltipProps,
|
|
35
|
-
children: /* @__PURE__ */
|
|
82
|
+
children: /* @__PURE__ */ x(
|
|
36
83
|
"span",
|
|
37
84
|
{
|
|
38
|
-
className:
|
|
39
|
-
|
|
40
|
-
!!
|
|
85
|
+
className: k(
|
|
86
|
+
r,
|
|
87
|
+
!!y && `${r}-rtl`,
|
|
88
|
+
!!i && `${r}-copied`,
|
|
41
89
|
o.className
|
|
42
90
|
),
|
|
43
91
|
role: "button",
|
|
44
|
-
"aria-label":
|
|
92
|
+
"aria-label": p[0],
|
|
45
93
|
tabIndex: 0,
|
|
46
|
-
onClick:
|
|
94
|
+
onClick: f,
|
|
47
95
|
...u({
|
|
48
|
-
onPressEnter:
|
|
96
|
+
onPressEnter: f
|
|
49
97
|
}),
|
|
50
98
|
children: [
|
|
51
|
-
|
|
52
|
-
|
|
99
|
+
n,
|
|
100
|
+
s
|
|
53
101
|
]
|
|
54
102
|
}
|
|
55
103
|
)
|
|
56
104
|
}
|
|
57
105
|
);
|
|
58
106
|
}
|
|
59
|
-
|
|
107
|
+
S.displayName = "Copy";
|
|
60
108
|
export {
|
|
61
|
-
|
|
109
|
+
S as default
|
|
62
110
|
};
|