@unicom-cloud/ui 0.8.100 → 0.8.101
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/Details.js +13 -2
- package/Divider.js +3 -2
- package/Flex.js +14 -4
- package/Loading.js +16 -3
- package/Space.js +3 -3
- package/Splitter.js +4 -3
- package/SuspenseFallbackTest.js +2 -4
- package/alert/index.js +60 -62
- package/back-top/index.js +32 -33
- package/calendar/index.js +85 -84
- package/components/common/development/index.js +44 -29
- package/components/common/empty/index.js +35 -23
- package/components/common/flex/index.js +64 -0
- package/components/common/flex/interface.js +9 -0
- package/components/common/higher-order/with-speech-synthesis/index.js +79 -55
- package/components/common/space/index.js +71 -91
- package/components/common/suspense-fallback-test/index.js +16 -0
- package/components/common/utils/toArray.js +12 -0
- package/details/index.js +102 -62
- package/divider/index.js +27 -21
- package/empty/index.js +13 -13
- package/flex/index.js +43 -55
- package/flex/interface.js +1 -34
- package/icon/interface.js +1 -0
- package/icon-hover/interface.js +1 -0
- package/index.js +537 -536
- package/loading/index.js +72 -53
- package/loading/interface.js +1 -0
- package/modal/Modal.js +73 -74
- package/package.json +1 -1
- package/portal/interface.js +1 -0
- package/segmented/index.js +47 -47
- package/space/index.js +41 -35
- package/speech-synthesis/interface.js +1 -0
- package/splitter/Splitter.js +85 -89
- package/splitter/hooks/useItems.js +1 -1
- package/splitter/index.js +5 -4
- package/style.css +1 -1
- package/suspense-fallback-test/index.js +2 -11
- package/suspense-fallback-test/interface.js +1 -0
- package/table/Table.js +38 -38
- package/trigger/index.js +67 -70
- package/types/common/development/index.d.ts +7 -1
- package/types/common/development/interface.d.ts +22 -0
- package/types/common/empty/index.d.ts +2 -1
- package/types/common/flex/index.d.ts +14 -0
- package/types/common/flex/interface.d.ts +62 -0
- package/types/common/higher-order/with-speech-synthesis/index.d.ts +6 -1
- package/types/common/higher-order/with-speech-synthesis/interface.d.ts +13 -0
- package/types/common/space/index.d.ts +4 -4
- package/types/common/space/interface.d.ts +10 -18
- package/types/common/suspense-fallback-test/index.d.ts +7 -0
- package/types/common/suspense-fallback-test/interface.d.ts +1 -0
- package/types/common/utils/PqbCSSTransition.d.ts +1 -1
- package/types/common/utils/toArray.d.ts +13 -0
- package/types/pc/alert/index.d.ts +2 -1
- package/types/pc/alert/interface.d.ts +7 -1
- package/types/pc/badge/Count.d.ts +1 -1
- package/types/pc/breadcrumb/Item.d.ts +1 -1
- package/types/pc/calendar/Month.d.ts +1 -1
- package/types/pc/calendar/WeekList.d.ts +1 -1
- package/types/pc/calendar/Year.d.ts +1 -1
- package/types/pc/calendar/header/Panel.d.ts +1 -1
- package/types/pc/calendar/header/index.d.ts +1 -1
- package/types/pc/calendar/index.d.ts +1 -1
- package/types/pc/calendar/interface.d.ts +2 -1
- package/types/pc/cascader/interface.d.ts +1 -1
- package/types/pc/cascader/panel/List.d.ts +1 -1
- package/types/pc/cascader/panel/Option.d.ts +1 -1
- package/types/pc/cascader/panel/Search.d.ts +1 -1
- package/types/pc/checkbox/Group.d.ts +2 -2
- package/types/pc/checkbox/GroupBlock.d.ts +1 -1
- package/types/pc/checkbox/IconCheck.d.ts +1 -1
- package/types/pc/color-picker/InputRgb.d.ts +1 -1
- package/types/pc/color-picker/Palette.d.ts +1 -1
- package/types/pc/config-provider/ConfigProvider.d.ts +1 -1
- package/types/pc/config-provider/interface.d.ts +4 -0
- package/types/pc/copy/index.d.ts +1 -1
- package/types/pc/date-picker/panel/Body.d.ts +1 -1
- package/types/pc/date-picker/panel/Footer.d.ts +1 -1
- package/types/pc/date-picker/panel/Header.d.ts +1 -1
- package/types/pc/date-picker/panel/WeekList.d.ts +1 -1
- package/types/pc/date-picker/panel/date/index.d.ts +1 -1
- package/types/pc/date-picker/panel/month/index.d.ts +1 -1
- package/types/pc/date-picker/panel/quarter/index.d.ts +1 -1
- package/types/pc/date-picker/panel/range/index.d.ts +1 -1
- package/types/pc/date-picker/panel/week/index.d.ts +1 -1
- package/types/pc/date-picker/panel/year/index.d.ts +1 -1
- package/types/pc/descriptions/index.d.ts +1 -1
- package/types/pc/details/index.d.ts +3 -2
- package/types/pc/details/interface.d.ts +16 -0
- package/types/pc/development/index.d.ts +2 -1
- package/types/pc/development/interface.d.ts +15 -0
- package/types/pc/divider/index.d.ts +7 -2
- package/types/pc/draggable/Item.d.ts +1 -1
- package/types/pc/draggable/index.d.ts +1 -1
- package/types/pc/flex/index.d.ts +4 -4
- package/types/pc/flex/interface.d.ts +8 -53
- package/types/pc/form/Control.d.ts +1 -1
- package/types/pc/form/FormList.d.ts +1 -1
- package/types/pc/form/IconSymbol.d.ts +1 -1
- package/types/pc/icon/addFromIconFontCn.d.ts +1 -7
- package/types/pc/icon/index.d.ts +2 -7
- package/types/pc/icon/interface.d.ts +13 -0
- package/types/pc/icon-hover/index.d.ts +2 -8
- package/types/pc/icon-hover/interface.d.ts +8 -0
- package/types/pc/image/ImageFooter.d.ts +1 -1
- package/types/pc/image/ImagePreviewArrow.d.ts +1 -1
- package/types/pc/image/TriggerForToolbar.d.ts +1 -1
- package/types/pc/index.d.ts +60 -51
- package/types/pc/loading/index.d.ts +4 -3
- package/types/pc/loading/interface.d.ts +6 -0
- package/types/pc/menu/Indent.d.ts +1 -1
- package/types/pc/menu/OverflowWrap.d.ts +1 -1
- package/types/pc/menu/sub-menu/Inline.d.ts +1 -1
- package/types/pc/menu/sub-menu/Pop.d.ts +1 -1
- package/types/pc/overflow-ellipsis/OverflowItem.d.ts +1 -1
- package/types/pc/overflow-ellipsis/index.d.ts +1 -1
- package/types/pc/pagination/PageItem.d.ts +3 -3
- package/types/pc/pagination/PageJumper.d.ts +1 -1
- package/types/pc/pagination/PageOption.d.ts +1 -1
- package/types/pc/portal/Portal.d.ts +2 -6
- package/types/pc/portal/index.d.ts +2 -9
- package/types/pc/portal/interface.d.ts +14 -0
- package/types/pc/progress/CircleProgress.d.ts +1 -1
- package/types/pc/progress/LineProgess.d.ts +1 -1
- package/types/pc/progress/StepProgress.d.ts +1 -1
- package/types/pc/radio/Group.d.ts +2 -2
- package/types/pc/radio/GroupBlock.d.ts +1 -1
- package/types/pc/radio/Radio.d.ts +1 -1
- package/types/pc/resize-box/ResizeTrigger.d.ts +1 -1
- package/types/pc/result/403.d.ts +1 -1
- package/types/pc/result/404.d.ts +1 -1
- package/types/pc/result/500.d.ts +1 -1
- package/types/pc/segmented/interface.d.ts +6 -6
- package/types/pc/skeleton/Image.d.ts +1 -1
- package/types/pc/skeleton/Text.d.ts +2 -1
- package/types/pc/slider/Button.d.ts +1 -1
- package/types/pc/slider/Input.d.ts +1 -1
- package/types/pc/slider/Tick.d.ts +1 -1
- package/types/pc/space/index.d.ts +6 -5
- package/types/pc/speech-synthesis/index.d.ts +3 -1
- package/types/pc/speech-synthesis/interface.d.ts +7 -0
- package/types/pc/spin/DotLoading.d.ts +1 -1
- package/types/pc/splitter/index.d.ts +5 -4
- package/types/pc/splitter/interface.d.ts +16 -16
- package/types/pc/suspense-fallback-test/index.d.ts +2 -3
- package/types/pc/suspense-fallback-test/interface.d.ts +2 -0
- package/types/pc/table/ColGroup.d.ts +1 -1
- package/types/pc/table/summary/Cell.d.ts +1 -1
- package/types/pc/table/summary/Row.d.ts +1 -1
- package/types/pc/table/tbody/Td.d.ts +1 -1
- package/types/pc/table/tbody/index.d.ts +1 -1
- package/types/pc/table/tfoot/index.d.ts +1 -1
- package/types/pc/table/th-resizable/index.d.ts +1 -1
- package/types/pc/table/thead/Column.d.ts +1 -1
- package/types/pc/table/thead/index.d.ts +1 -1
- package/types/pc/tabs/TabContent.d.ts +1 -1
- package/types/pc/tabs/tab-header/DropdownIcon.d.ts +1 -1
- package/types/pc/tabs/tab-header/TabInk.d.ts +1 -1
- package/types/pc/tabs/tab-header/TabNavIcon.d.ts +1 -1
- package/types/pc/time-picker/Picker.d.ts +1 -1
- package/types/pc/time-picker/RangePicker.d.ts +1 -1
- package/types/pc/time-picker/TimeColumn.d.ts +1 -1
- package/types/pc/time-picker/TimePicker.d.ts +1 -1
- package/types/pc/time-picker/index.d.ts +1 -1
- package/types/pc/transfer/Item.d.ts +1 -1
- package/types/pc/transfer/List.d.ts +1 -1
- package/types/pc/tree/Animation.d.ts +1 -1
- package/types/pc/typography/Operations.d.ts +1 -1
- package/types/pc/upload/list/index.d.ts +1 -1
- package/types/pc/utils/toArray.d.ts +1 -5
- package/types/pc/verification-code/VerificationCode.d.ts +1 -1
- package/types/pc/virtual-list/VirtualList.d.ts +2 -38
- package/types/pc/virtual-list/index.d.ts +2 -1
- package/types/pc/virtual-list/interface.d.ts +56 -0
- package/types/pc/watermark/Watermark.d.ts +1 -1
- package/utils/index.js +1 -1
- package/utils/toArray.js +3 -10
- package/version/index.js +1 -1
- package/virtual-list/interface.js +1 -0
- package/components/common/space/toArray.js +0 -11
- package/flex/utils.js +0 -13
- package/loading/style/index.module.less.js +0 -4
- package/types/common/space/toArray.d.ts +0 -3
- package/types/pc/flex/utils.d.ts +0 -9
- package/types/pc/suspense-fallback-test/style/index.d.ts +0 -1
- /package/{suspense-fallback-test/style/index.less.js → development/interface.js} +0 -0
|
@@ -1,32 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { UI_COMMON_PREFIX as
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import C from "@unicom-cloud/icons/IconFluentFlatHourglassNotDone";
|
|
3
|
+
import s from "@unicom-cloud/utils/class-name";
|
|
4
|
+
import { UI_COMMON_PREFIX as v } from "@unicom-cloud/utils/constant/ui";
|
|
5
|
+
import { forwardRef as x, useMemo as b } from "react";
|
|
6
|
+
const g = (t, n) => {
|
|
7
|
+
const {
|
|
8
|
+
url: a,
|
|
9
|
+
// 图片地址
|
|
10
|
+
imgClassName: o,
|
|
11
|
+
// 图片自定义类名
|
|
12
|
+
icon: m,
|
|
13
|
+
// 自定义图标
|
|
14
|
+
iconClassName: r,
|
|
15
|
+
// 图标自定义类名
|
|
16
|
+
tip: c,
|
|
17
|
+
// 高优先级提示文字
|
|
18
|
+
label: i = "等待开发",
|
|
19
|
+
// 次要提示文字(默认值)
|
|
20
|
+
labelClassName: p,
|
|
21
|
+
// 文字容器类名
|
|
22
|
+
className: N
|
|
23
|
+
// 外层容器类名
|
|
24
|
+
} = t, e = `${v}-development`, d = b(() => a ? /* @__PURE__ */ l(
|
|
25
|
+
"img",
|
|
26
|
+
{
|
|
27
|
+
className: s(`${e}-img`, o),
|
|
28
|
+
src: a,
|
|
29
|
+
alt: "开发预览图"
|
|
30
|
+
}
|
|
31
|
+
) : m ?? /* @__PURE__ */ l(
|
|
32
|
+
C,
|
|
33
|
+
{
|
|
34
|
+
className: s(`${e}-icon`, r)
|
|
35
|
+
}
|
|
36
|
+
), [a, e, o, m, r]), f = c ?? i;
|
|
37
|
+
return /* @__PURE__ */ u("div", { ref: n, className: s(e, N), children: [
|
|
38
|
+
d,
|
|
39
|
+
/* @__PURE__ */ l("div", { className: s(`${e}-label`, p), children: f })
|
|
27
40
|
] });
|
|
28
|
-
}
|
|
29
|
-
|
|
41
|
+
}, D = x(
|
|
42
|
+
g
|
|
43
|
+
);
|
|
44
|
+
D.displayName = "Development";
|
|
30
45
|
export {
|
|
31
|
-
|
|
46
|
+
D as default
|
|
32
47
|
};
|
|
@@ -1,37 +1,49 @@
|
|
|
1
|
-
import { jsxs as N, jsx as
|
|
1
|
+
import { jsxs as N, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import $ from "@unicom-cloud/icons/IconUiEmpty";
|
|
3
|
-
import { UI_COMMON_PREFIX as
|
|
4
|
-
import { memo as
|
|
5
|
-
import { SpaceVertical as
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
const {
|
|
3
|
+
import { UI_COMMON_PREFIX as g } from "@unicom-cloud/utils/constant/ui";
|
|
4
|
+
import { memo as x, forwardRef as u } from "react";
|
|
5
|
+
import { SpaceVertical as C } from "../space/index.js";
|
|
6
|
+
import r from "@unicom-cloud/utils/class-name";
|
|
7
|
+
const E = (n, c) => {
|
|
8
|
+
const {
|
|
9
|
+
style: a,
|
|
10
|
+
className: p,
|
|
11
|
+
description: i = "无数据",
|
|
12
|
+
// 默认描述文本
|
|
13
|
+
icon: o,
|
|
14
|
+
imgSrc: m,
|
|
15
|
+
prefixCls: l,
|
|
16
|
+
...f
|
|
17
|
+
} = n, e = `${g}-empty`, t = l ?? e, d = typeof i == "string" ? i : "empty", y = () => m ? /* @__PURE__ */ s(
|
|
18
|
+
"img",
|
|
19
|
+
{
|
|
20
|
+
className: r(`${e}-img`, `${t}-img`),
|
|
21
|
+
alt: d,
|
|
22
|
+
src: m,
|
|
23
|
+
loading: "lazy"
|
|
24
|
+
}
|
|
25
|
+
) : o ? /* @__PURE__ */ s("div", { className: r(`${e}-icon`, `${t}-icon`), children: o }) : /* @__PURE__ */ s($, { className: r(`${e}-icon`, `${t}-icon`) });
|
|
9
26
|
return /* @__PURE__ */ N(
|
|
10
|
-
|
|
27
|
+
C,
|
|
11
28
|
{
|
|
12
|
-
ref:
|
|
13
|
-
className:
|
|
29
|
+
ref: c,
|
|
30
|
+
className: r(e, t, p),
|
|
14
31
|
style: a,
|
|
15
32
|
justifyContent: "center",
|
|
16
33
|
alignItems: "center",
|
|
17
34
|
gap: 5,
|
|
18
35
|
...f,
|
|
19
36
|
children: [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{
|
|
23
|
-
className: s(`${e}-img`, `${i}-img`),
|
|
24
|
-
alt: d,
|
|
25
|
-
src: r
|
|
26
|
-
}
|
|
27
|
-
) : o ? /* @__PURE__ */ t("div", { className: s(`${e}-icon`, `${i}-icon`), children: o }) : /* @__PURE__ */ t($, { className: s(`${e}-icon`, `${i}-icon`) }),
|
|
28
|
-
/* @__PURE__ */ t("div", { className: s(`${e}-description`, `${i}-description`), children: m || "无数据" })
|
|
37
|
+
y(),
|
|
38
|
+
/* @__PURE__ */ s("div", { className: r(`${e}-description`, `${t}-description`), children: i })
|
|
29
39
|
]
|
|
30
40
|
}
|
|
31
41
|
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
42
|
+
}, I = x(
|
|
43
|
+
u(E)
|
|
44
|
+
);
|
|
45
|
+
I.displayName = "Empty";
|
|
35
46
|
export {
|
|
36
|
-
|
|
47
|
+
I as Empty,
|
|
48
|
+
I as default
|
|
37
49
|
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { UI_COMMON_PREFIX as j } from "@unicom-cloud/utils/constant/ui";
|
|
3
|
+
import { forwardRef as x, useMemo as C } from "react";
|
|
4
|
+
import I from "../hooks/useMergeProps.js";
|
|
5
|
+
import P from "@unicom-cloud/utils/class-name";
|
|
6
|
+
import "../utils/is.js";
|
|
7
|
+
import { GAP_SIZE_MAP as y } from "./interface.js";
|
|
8
|
+
import { isBoolean as V, isArray as _, isString as A } from "@unicom-cloud/utils/is";
|
|
9
|
+
const O = (o) => A(o) && Object.keys(y).includes(o), m = (o, r, t) => {
|
|
10
|
+
t !== void 0 && (O(t) ? o[r] = y[t] : o[r] = typeof t == "number" ? `${t}px` : t);
|
|
11
|
+
}, S = (o = {}, r, t = "gap") => (r === void 0 || (_(r) ? (m(o, "rowGap", r[0]), m(o, "columnGap", r[1])) : m(o, t, r)), o), b = {
|
|
12
|
+
component: "div",
|
|
13
|
+
gap: "small"
|
|
14
|
+
}, a = x((o, r) => {
|
|
15
|
+
const t = I(o, b, {}), {
|
|
16
|
+
className: g,
|
|
17
|
+
style: c,
|
|
18
|
+
flex: l,
|
|
19
|
+
gap: f,
|
|
20
|
+
children: u,
|
|
21
|
+
direction: e,
|
|
22
|
+
justify: i,
|
|
23
|
+
align: n,
|
|
24
|
+
component: N = "div",
|
|
25
|
+
wrap: s,
|
|
26
|
+
rtl: w,
|
|
27
|
+
...F
|
|
28
|
+
} = t, p = `${j}-flex`, G = C(() => {
|
|
29
|
+
const M = {
|
|
30
|
+
display: "flex",
|
|
31
|
+
...S({}, f),
|
|
32
|
+
...s !== void 0 && {
|
|
33
|
+
flexWrap: V(s) ? s ? "wrap" : "nowrap" : s
|
|
34
|
+
},
|
|
35
|
+
...n && { alignItems: n },
|
|
36
|
+
...i && { justifyContent: i },
|
|
37
|
+
...e && { flexDirection: e },
|
|
38
|
+
...l && { flex: l }
|
|
39
|
+
};
|
|
40
|
+
return { ...c, ...M };
|
|
41
|
+
}, [f, s, n, i, e, l, c]);
|
|
42
|
+
return /* @__PURE__ */ d(
|
|
43
|
+
N,
|
|
44
|
+
{
|
|
45
|
+
ref: r,
|
|
46
|
+
style: G,
|
|
47
|
+
className: P(p, g, {
|
|
48
|
+
[`${p}-rtl`]: w,
|
|
49
|
+
[`${p}-${e}`]: e,
|
|
50
|
+
[`${p}-${i}`]: i,
|
|
51
|
+
[`${p}-${n}`]: n
|
|
52
|
+
}),
|
|
53
|
+
...F,
|
|
54
|
+
children: u
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}), $ = x((o, r) => /* @__PURE__ */ d(a, { ref: r, ...o, direction: "column" }));
|
|
58
|
+
a.Vertical = $;
|
|
59
|
+
a.displayName = "Flex";
|
|
60
|
+
$.displayName = "Flex.Vertical";
|
|
61
|
+
export {
|
|
62
|
+
$ as FlexVertical,
|
|
63
|
+
a as default
|
|
64
|
+
};
|
|
@@ -1,58 +1,82 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const { useButton:
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import P from "@unicom-cloud/icons/IconUiMute";
|
|
3
|
+
import U from "@unicom-cloud/icons/IconUiPauseCircleFill";
|
|
4
|
+
import b from "@unicom-cloud/icons/IconUiPlayCircleFill";
|
|
5
|
+
import N from "@unicom-cloud/icons/IconUiSound";
|
|
6
|
+
import { forwardRef as v, useState as x, useMemo as E, useCallback as c, useImperativeHandle as F, useEffect as M, memo as R } from "react";
|
|
7
|
+
const T = (S) => {
|
|
8
|
+
const d = v((g, C) => {
|
|
9
|
+
const { useButton: I = !0, buttonProps: f = {}, ...s } = g, [l, i] = x(!1), [a, m] = x(
|
|
10
|
+
null
|
|
11
|
+
), e = E(
|
|
12
|
+
() => "speechSynthesis" in window && "SpeechSynthesisUtterance" in window,
|
|
13
|
+
[]
|
|
14
|
+
), o = c(() => {
|
|
15
|
+
e && (window.speechSynthesis.cancel(), i(!1), m(null));
|
|
16
|
+
}, [e]), p = c(() => {
|
|
17
|
+
if (!e) return;
|
|
18
|
+
o();
|
|
19
|
+
const n = s.getText?.() ?? s.text;
|
|
20
|
+
if (!n) return;
|
|
21
|
+
const t = new SpeechSynthesisUtterance(n);
|
|
22
|
+
m(t);
|
|
23
|
+
const r = () => {
|
|
24
|
+
i(!1), m(null);
|
|
25
|
+
};
|
|
26
|
+
t.onstart = () => i(!0), t.onend = r, t.onerror = r, t.onpause = () => i(!1), t.onresume = () => i(!0);
|
|
27
|
+
try {
|
|
28
|
+
window.speechSynthesis.speak(t);
|
|
29
|
+
} catch (y) {
|
|
30
|
+
console.error("Speech synthesis failed:", y), r();
|
|
31
|
+
}
|
|
32
|
+
}, [o, e, s.getText, s.text]), u = c(() => {
|
|
33
|
+
e && a && window.speechSynthesis.pause();
|
|
34
|
+
}, [e, a]), w = c(() => {
|
|
35
|
+
e && a && window.speechSynthesis.resume();
|
|
36
|
+
}, [e, a]), k = c(
|
|
37
|
+
(n) => {
|
|
38
|
+
n.preventDefault(), n.stopPropagation(), l ? u() : p(), f.onClick?.(n);
|
|
39
|
+
},
|
|
40
|
+
[l, u, p, f.onClick]
|
|
41
|
+
);
|
|
42
|
+
if (F(
|
|
43
|
+
C,
|
|
44
|
+
() => ({
|
|
45
|
+
cancel: o,
|
|
46
|
+
speak: p,
|
|
47
|
+
pause: u,
|
|
48
|
+
resume: w
|
|
49
|
+
}),
|
|
50
|
+
[o, p, u, w]
|
|
51
|
+
), M(() => o, [o]), !e)
|
|
52
|
+
return null;
|
|
53
|
+
if (I) {
|
|
54
|
+
const { label: n, text: t, children: r, ...y } = f;
|
|
55
|
+
return /* @__PURE__ */ h(
|
|
56
|
+
S,
|
|
57
|
+
{
|
|
58
|
+
...s,
|
|
59
|
+
type: "text",
|
|
60
|
+
size: "mini",
|
|
61
|
+
icon: l ? /* @__PURE__ */ h(P, {}) : /* @__PURE__ */ h(N, {}),
|
|
62
|
+
...y,
|
|
63
|
+
onClick: k,
|
|
64
|
+
children: n || t || r
|
|
65
|
+
}
|
|
66
|
+
);
|
|
12
67
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}, e.onend = () => {
|
|
26
|
-
t(!1);
|
|
27
|
-
}, window.speechSynthesis?.speak?.(e);
|
|
28
|
-
}
|
|
29
|
-
function a(n) {
|
|
30
|
-
l(), s || S(), c?.onClick?.(n);
|
|
31
|
-
}
|
|
32
|
-
let r;
|
|
33
|
-
if (window.speechSynthesis && window.SpeechSynthesisUtterance)
|
|
34
|
-
if (h) {
|
|
35
|
-
let { label: n, text: e, children: d, ...k } = c ?? {};
|
|
36
|
-
r = /* @__PURE__ */ i(
|
|
37
|
-
u,
|
|
38
|
-
{
|
|
39
|
-
...o,
|
|
40
|
-
type: "text",
|
|
41
|
-
size: "mini",
|
|
42
|
-
icon: s ? /* @__PURE__ */ i(w, {}) : /* @__PURE__ */ i(x, {}),
|
|
43
|
-
...k,
|
|
44
|
-
onClick: a,
|
|
45
|
-
children: n || e || d
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
} else
|
|
49
|
-
r = /* @__PURE__ */ i(s ? y : I, { ...o.iconProps, onClick: a });
|
|
50
|
-
return g(() => () => {
|
|
51
|
-
l();
|
|
52
|
-
}, []), b(m, () => ({})), r;
|
|
53
|
-
}
|
|
54
|
-
return C(P(p));
|
|
55
|
-
}
|
|
68
|
+
return /* @__PURE__ */ h(
|
|
69
|
+
l ? U : b,
|
|
70
|
+
{
|
|
71
|
+
...s.iconProps,
|
|
72
|
+
onClick: k,
|
|
73
|
+
style: { cursor: "pointer" }
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
});
|
|
77
|
+
return d.displayName = `WithSpeechSynthesis(${S.displayName || S.name || "SpeechSynthesis"})`, R(d);
|
|
78
|
+
};
|
|
79
|
+
T.displayName = "withSpeechSynthesis";
|
|
56
80
|
export {
|
|
57
|
-
|
|
81
|
+
T as default
|
|
58
82
|
};
|
|
@@ -1,96 +1,76 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { UI_COMMON_PREFIX as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { jsx as o, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import { UI_COMMON_PREFIX as b } from "@unicom-cloud/utils/constant/ui";
|
|
3
|
+
import O from "lodash/isArray";
|
|
4
|
+
import R from "lodash/isNumber";
|
|
5
|
+
import { forwardRef as f, Fragment as k } from "react";
|
|
6
|
+
import E from "../hooks/useMergeProps.js";
|
|
7
|
+
import F from "@unicom-cloud/utils/class-name";
|
|
8
|
+
import { toArray as L } from "../utils/toArray.js";
|
|
9
|
+
const u = {
|
|
10
|
+
mini: 4,
|
|
11
|
+
small: 8,
|
|
12
|
+
medium: 16,
|
|
13
|
+
large: 24
|
|
14
|
+
}, U = {
|
|
10
15
|
size: "small",
|
|
11
16
|
direction: "horizontal"
|
|
12
|
-
}
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
marginBottom: t
|
|
63
|
-
} : n ? {} : {
|
|
64
|
-
[s === "vertical" ? "marginBottom" : o]: t
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
if (P(i)) {
|
|
68
|
-
const t = f(i[0]), u = f(i[1]);
|
|
69
|
-
return l ? n ? { marginBottom: u } : {
|
|
70
|
-
[`${o}`]: t,
|
|
71
|
-
marginBottom: u
|
|
72
|
-
} : s === "vertical" ? { marginBottom: u } : { [`${o}`]: t };
|
|
73
|
-
}
|
|
17
|
+
}, d = f(
|
|
18
|
+
function(a, y) {
|
|
19
|
+
const $ = E(a, U, {}), {
|
|
20
|
+
className: N,
|
|
21
|
+
style: S,
|
|
22
|
+
children: h,
|
|
23
|
+
gap: G,
|
|
24
|
+
size: x,
|
|
25
|
+
direction: n = "horizontal",
|
|
26
|
+
align: P,
|
|
27
|
+
alignItems: V,
|
|
28
|
+
justifyContent: l,
|
|
29
|
+
wrap: j,
|
|
30
|
+
split: p,
|
|
31
|
+
rtl: w,
|
|
32
|
+
...z
|
|
33
|
+
} = $, e = `${b}-space`, r = G ?? x, m = V ?? P ?? (n === "horizontal" ? "center" : ""), A = F(
|
|
34
|
+
e,
|
|
35
|
+
{
|
|
36
|
+
[`${e}-${n}`]: n,
|
|
37
|
+
[`${e}-justify-content-${l}`]: l,
|
|
38
|
+
[`${e}-align-items-${m}`]: m,
|
|
39
|
+
[`${e}-wrap`]: j,
|
|
40
|
+
[`${e}-rtl`]: w
|
|
41
|
+
},
|
|
42
|
+
N
|
|
43
|
+
), i = (t) => R(t) ? t : u[t] ?? u.small, C = {
|
|
44
|
+
...(() => {
|
|
45
|
+
if (typeof r == "string" || typeof r == "number")
|
|
46
|
+
return {
|
|
47
|
+
gap: `${i(r)}px`
|
|
48
|
+
};
|
|
49
|
+
if (O(r)) {
|
|
50
|
+
const t = i(r[1]), s = i(r[0]);
|
|
51
|
+
return {
|
|
52
|
+
rowGap: `${t}px`,
|
|
53
|
+
columnGap: `${s}px`
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
return {};
|
|
57
|
+
})(),
|
|
58
|
+
...S
|
|
59
|
+
}, v = L(h);
|
|
60
|
+
return /* @__PURE__ */ o("div", { ref: y, className: A, style: C, ...z, children: v.map((t, s) => {
|
|
61
|
+
const I = t?.key ?? s, M = p != null && s > 0;
|
|
62
|
+
return /* @__PURE__ */ _(k, { children: [
|
|
63
|
+
M && /* @__PURE__ */ o("div", { className: `${e}-item-split`, children: p }),
|
|
64
|
+
/* @__PURE__ */ o("div", { className: `${e}-item`, children: t })
|
|
65
|
+
] }, I);
|
|
66
|
+
}) });
|
|
74
67
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
] }, o);
|
|
81
|
-
}) });
|
|
82
|
-
}
|
|
83
|
-
const g = N(
|
|
84
|
-
E
|
|
85
|
-
);
|
|
86
|
-
g.displayName = "Space";
|
|
87
|
-
function H(a, m) {
|
|
88
|
-
return /* @__PURE__ */ c(g, { ref: m, ...a, direction: "vertical", children: a.children });
|
|
89
|
-
}
|
|
90
|
-
const v = N(H);
|
|
91
|
-
v.displayName = "SpaceVertical";
|
|
92
|
-
g.Vertical = v;
|
|
68
|
+
), g = f((c, a) => /* @__PURE__ */ o(d, { ref: a, ...c, direction: "vertical" })), T = Object.assign(d, {
|
|
69
|
+
displayName: "Space",
|
|
70
|
+
Vertical: g
|
|
71
|
+
});
|
|
72
|
+
g.displayName = "Space.Vertical";
|
|
93
73
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
74
|
+
g as SpaceVertical,
|
|
75
|
+
T as default
|
|
96
76
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import e from "react";
|
|
3
|
+
const a = (n, r) => {
|
|
4
|
+
const s = e.useMemo(
|
|
5
|
+
() => e.lazy(
|
|
6
|
+
() => new Promise(() => {
|
|
7
|
+
})
|
|
8
|
+
),
|
|
9
|
+
[]
|
|
10
|
+
);
|
|
11
|
+
return /* @__PURE__ */ o(s, {});
|
|
12
|
+
}, t = e.forwardRef(a);
|
|
13
|
+
t.displayName = "SuspenseFallbackTest";
|
|
14
|
+
export {
|
|
15
|
+
t as default
|
|
16
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import o from "react";
|
|
2
|
+
import { isFragment as a } from "react-is";
|
|
3
|
+
function t(s, p = {}) {
|
|
4
|
+
const e = [];
|
|
5
|
+
return o.Children.forEach(s, (r) => {
|
|
6
|
+
r == null && !p.keepEmpty || (Array.isArray(r) ? e.push(...t(r, p)) : a(r) && "props" in r && r.props ? e.push(...t(r.props.children, p)) : e.push(r));
|
|
7
|
+
}), e;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
t as default,
|
|
11
|
+
t as toArray
|
|
12
|
+
};
|