@unicom-cloud/ui 0.8.99 → 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/Anchor.js +3 -1
- package/Badge.js +7 -6
- package/Copy.js +49 -2
- package/Details.js +13 -2
- package/Divider.js +3 -2
- package/Flex.js +22 -0
- package/Grid.js +1 -1
- package/LiquidFill.js +3 -2
- package/Loading.js +16 -3
- package/Marquee.js +3 -2
- package/QrCode.js +3 -2
- package/Space.js +3 -3
- package/Splitter.js +5 -5
- package/SuspenseFallbackTest.js +2 -4
- package/Tag.js +3 -2
- package/Tour.js +3 -2
- package/alert/index.js +61 -64
- package/anchor/index.js +5 -3
- package/back-top/index.js +32 -33
- package/badge/index.js +19 -18
- 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/copy/index.js +83 -35
- package/details/index.js +102 -62
- package/divider/index.js +27 -21
- package/empty/index.js +13 -13
- package/flex/index.js +47 -0
- package/flex/interface.js +1 -0
- package/grid/{GridItem.js → Item.js} +15 -15
- package/grid/index.js +1 -1
- package/icon/interface.js +1 -0
- package/icon-hover/interface.js +1 -0
- package/index.js +610 -599
- package/input/Button.js +39 -34
- package/input/Textarea.js +108 -104
- package/liquid-fill/index.js +3 -2
- package/loading/index.js +72 -53
- package/loading/interface.js +1 -0
- package/marquee/index.js +3 -2
- package/modal/Modal.js +73 -74
- package/package.json +1 -1
- package/portal/interface.js +1 -0
- package/qr-code/index.js +3 -2
- package/segmented/index.js +113 -105
- package/space/index.js +41 -35
- package/speech-synthesis/interface.js +1 -0
- package/spin/index.js +75 -62
- package/splitter/Panel.js +39 -0
- package/splitter/SplitBar.js +157 -0
- package/splitter/Splitter.js +135 -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 +6 -115
- 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/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/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 -3
- 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/affix/interface.d.ts +0 -2
- package/types/pc/alert/index.d.ts +3 -2
- package/types/pc/alert/interface.d.ts +7 -1
- package/types/pc/anchor/index.d.ts +2 -1
- package/types/pc/anchor/interface.d.ts +0 -2
- package/types/pc/auto-complete/interface.d.ts +0 -6
- package/types/pc/avatar/interface.d.ts +0 -4
- package/types/pc/badge/Count.d.ts +1 -1
- package/types/pc/breadcrumb/Item.d.ts +1 -1
- package/types/pc/breadcrumb/interface.d.ts +0 -3
- 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/carousel/interface.d.ts +2 -6
- package/types/pc/cascader/interface.d.ts +7 -19
- 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/checkbox/interface.d.ts +0 -1
- package/types/pc/collapse/interface.d.ts +0 -2
- package/types/pc/color-picker/InputRgb.d.ts +1 -1
- package/types/pc/color-picker/Palette.d.ts +1 -1
- package/types/pc/color-picker/interface.d.ts +0 -2
- package/types/pc/config-provider/ConfigProvider.d.ts +1 -1
- package/types/pc/config-provider/interface.d.ts +17 -17
- package/types/pc/copy/index.d.ts +1 -1
- package/types/pc/copy/interface.d.ts +2 -1
- package/types/pc/date-picker/interface.d.ts +0 -17
- 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/descriptions/interface.d.ts +0 -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/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 +16 -0
- 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/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/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/image/interface.d.ts +0 -13
- package/types/pc/index.d.ts +63 -50
- 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/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/interface.d.ts +0 -8
- 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/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/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/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/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/progress/interface.d.ts +0 -3
- 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/resize-box/interface.d.ts +1 -7
- 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/select/interface.d.ts +0 -12
- package/types/pc/select-view/interface.d.ts +0 -7
- 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/slider/interface.d.ts +0 -4
- package/types/pc/space/index.d.ts +7 -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/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 -3
- 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/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/hook/useThResizable.d.ts +2 -2
- package/types/pc/table/interface.d.ts +4 -15
- 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/interface.d.ts +0 -7
- 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/tag/index.d.ts +2 -0
- package/types/pc/tag/interface.d.ts +0 -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/time-picker/interface.d.ts +0 -7
- package/types/pc/tooltip/interface.d.ts +4 -1
- package/types/pc/transfer/Item.d.ts +1 -1
- package/types/pc/transfer/List.d.ts +1 -1
- package/types/pc/transfer/interface.d.ts +2 -9
- package/types/pc/tree/Animation.d.ts +1 -1
- 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/Operations.d.ts +1 -1
- package/types/pc/typography/interface.d.ts +45 -30
- package/types/pc/upload/interface.d.ts +6 -11
- package/types/pc/upload/list/index.d.ts +1 -1
- 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 +3 -0
- package/types/pc/verification-code/VerificationCode.d.ts +1 -1
- package/types/pc/verification-code/interface.d.ts +0 -2
- 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/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 +5 -0
- package/version/index.js +1 -1
- package/virtual-list/interface.js +1 -0
- package/components/common/space/toArray.js +0 -11
- package/loading/style/index.module.less.js +0 -4
- package/types/common/space/toArray.d.ts +0 -3
- 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
- /package/types/pc/grid/{GridItem.d.ts → Item.d.ts} +0 -0
package/input/Button.js
CHANGED
|
@@ -1,67 +1,72 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import m from "lodash/isPlainObject";
|
|
3
3
|
import A, { useContext as B } from "react";
|
|
4
|
-
import
|
|
4
|
+
import P from "../button/index.js";
|
|
5
5
|
import "../config-provider/ConfigProvider.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
(
|
|
12
|
-
const { getPrefixCls: g } = B(
|
|
6
|
+
import $ from "../components/common/hooks/useMergeValue.js";
|
|
7
|
+
import c from "@unicom-cloud/utils/class-name";
|
|
8
|
+
import j, { formatValue as d } from "./Input.js";
|
|
9
|
+
import z from "../config-provider/context.js";
|
|
10
|
+
const I = A.forwardRef(
|
|
11
|
+
(t, f) => {
|
|
12
|
+
const { getPrefixCls: g } = B(z), {
|
|
13
13
|
className: h,
|
|
14
14
|
style: x,
|
|
15
15
|
placeholder: C,
|
|
16
16
|
disabled: o,
|
|
17
|
-
loading:
|
|
18
|
-
defaultValue:
|
|
17
|
+
loading: O,
|
|
18
|
+
defaultValue: v,
|
|
19
19
|
addAfter: l,
|
|
20
20
|
buttonProps: a,
|
|
21
|
-
label:
|
|
21
|
+
label: b,
|
|
22
22
|
onCallback: L,
|
|
23
|
-
...
|
|
24
|
-
} =
|
|
25
|
-
|
|
23
|
+
...s
|
|
24
|
+
} = t, n = g?.("input-button"), N = {
|
|
25
|
+
error: "danger",
|
|
26
|
+
warning: "warning",
|
|
27
|
+
success: "success"
|
|
28
|
+
}, V = t.status ? N[t.status] : void 0, i = l === void 0 ? /* @__PURE__ */ u(
|
|
29
|
+
P,
|
|
26
30
|
{
|
|
27
31
|
type: "primary",
|
|
28
32
|
disabled: o,
|
|
29
|
-
size:
|
|
33
|
+
size: s.size,
|
|
30
34
|
loadingFixedWidth: !0,
|
|
35
|
+
status: V,
|
|
31
36
|
...a,
|
|
32
|
-
className:
|
|
33
|
-
onClick: (
|
|
34
|
-
L?.(
|
|
37
|
+
className: c(`${n}-btn`, a?.className),
|
|
38
|
+
onClick: (e) => {
|
|
39
|
+
L?.(k), t.onClick?.(e), a?.onClick?.(e);
|
|
35
40
|
},
|
|
36
|
-
children:
|
|
41
|
+
children: b ?? "确定"
|
|
37
42
|
}
|
|
38
|
-
) : l,
|
|
39
|
-
defaultValue: "defaultValue" in
|
|
40
|
-
value: "value" in
|
|
43
|
+
) : l, y = m(t.maxLength) ? t.maxLength.length : t.maxLength, r = m(t.maxLength) && t.maxLength.errorOnly ? void 0 : y, [k, M] = $("", {
|
|
44
|
+
defaultValue: "defaultValue" in t ? d(t.defaultValue, r) : void 0,
|
|
45
|
+
value: "value" in t ? d(t.value, r) : void 0
|
|
41
46
|
});
|
|
42
47
|
return /* @__PURE__ */ u(
|
|
43
|
-
|
|
48
|
+
j,
|
|
44
49
|
{
|
|
45
|
-
...
|
|
46
|
-
className:
|
|
50
|
+
...s,
|
|
51
|
+
className: c(
|
|
47
52
|
n,
|
|
48
|
-
|
|
53
|
+
i && `${n}-has-after`,
|
|
49
54
|
h
|
|
50
55
|
),
|
|
51
56
|
style: x,
|
|
52
|
-
ref:
|
|
53
|
-
defaultValue:
|
|
57
|
+
ref: f,
|
|
58
|
+
defaultValue: v,
|
|
54
59
|
placeholder: C,
|
|
55
|
-
addAfter:
|
|
60
|
+
addAfter: i,
|
|
56
61
|
disabled: o,
|
|
57
|
-
onChange: (
|
|
58
|
-
|
|
62
|
+
onChange: (e, w) => {
|
|
63
|
+
M(e), t.onChange?.(e, w);
|
|
59
64
|
}
|
|
60
65
|
}
|
|
61
66
|
);
|
|
62
67
|
}
|
|
63
68
|
);
|
|
64
|
-
|
|
69
|
+
I.displayName = "Input.Button";
|
|
65
70
|
export {
|
|
66
|
-
|
|
71
|
+
I as default
|
|
67
72
|
};
|
package/input/Textarea.js
CHANGED
|
@@ -1,157 +1,161 @@
|
|
|
1
|
-
import { jsx as u, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsx as u, jsxs as D } from "react/jsx-runtime";
|
|
2
|
+
import ee from "@unicom-cloud/icons/IconUiClose";
|
|
3
|
+
import te, { useRef as oe, useState as re, useContext as ne, useImperativeHandle as ae, useMemo as ie } from "react";
|
|
4
4
|
import "../config-provider/ConfigProvider.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
5
|
+
import le from "../components/common/hooks/useIsomorphicLayoutEffect.js";
|
|
6
|
+
import se from "../components/common/hooks/useMergeValue.js";
|
|
7
|
+
import ce from "../icon-hover/index.js";
|
|
8
|
+
import x from "@unicom-cloud/utils/class-name";
|
|
9
9
|
import "../components/common/utils/is.js";
|
|
10
|
-
import { omit as
|
|
11
|
-
import { formatValue as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { isPlainObject as
|
|
16
|
-
const
|
|
10
|
+
import { omit as ue } from "../components/common/utils/omit.js";
|
|
11
|
+
import { formatValue as b } from "./Input.js";
|
|
12
|
+
import me from "./autoSizeTextAreaHeight.js";
|
|
13
|
+
import fe from "./useComposition.js";
|
|
14
|
+
import de from "../config-provider/context.js";
|
|
15
|
+
import { isPlainObject as C, isNil as w } from "@unicom-cloud/utils/is";
|
|
16
|
+
const ge = (e, A) => {
|
|
17
17
|
const {
|
|
18
18
|
className: L,
|
|
19
19
|
style: T,
|
|
20
20
|
wrapperStyle: H,
|
|
21
21
|
placeholder: M,
|
|
22
|
-
disabled:
|
|
23
|
-
error:
|
|
22
|
+
disabled: s,
|
|
23
|
+
error: k,
|
|
24
24
|
maxLength: a,
|
|
25
|
-
showWordLimit:
|
|
25
|
+
showWordLimit: v,
|
|
26
26
|
allowClear: m,
|
|
27
|
-
onChange:
|
|
28
|
-
onClear:
|
|
29
|
-
onKeyDown:
|
|
30
|
-
onPressEnter:
|
|
31
|
-
status:
|
|
32
|
-
clearIcon:
|
|
33
|
-
...
|
|
34
|
-
} =
|
|
35
|
-
defaultValue: "defaultValue" in
|
|
36
|
-
value: "value" in
|
|
27
|
+
onChange: I,
|
|
28
|
+
onClear: E,
|
|
29
|
+
onKeyDown: P,
|
|
30
|
+
onPressEnter: W,
|
|
31
|
+
status: j,
|
|
32
|
+
clearIcon: p,
|
|
33
|
+
...O
|
|
34
|
+
} = e, i = C(a) ? a.length : a, n = C(a) ? a.errorOnly ? void 0 : a.length : a, r = oe(), [f, K] = re({}), [l, U] = se("", {
|
|
35
|
+
defaultValue: "defaultValue" in e ? b(e.defaultValue, n) : void 0,
|
|
36
|
+
value: "value" in e ? b(e.value, n) : void 0
|
|
37
37
|
}), {
|
|
38
|
-
compositionValue:
|
|
39
|
-
compositionHandler:
|
|
40
|
-
valueChangeHandler:
|
|
41
|
-
keyDownHandler:
|
|
42
|
-
triggerValueChangeCallback:
|
|
43
|
-
} =
|
|
44
|
-
value:
|
|
45
|
-
maxLength:
|
|
46
|
-
onChange:
|
|
47
|
-
onKeyDown:
|
|
48
|
-
onPressEnter:
|
|
49
|
-
beforeTriggerValueChangeCallback: (
|
|
50
|
-
!("value" in
|
|
38
|
+
compositionValue: F,
|
|
39
|
+
compositionHandler: d,
|
|
40
|
+
valueChangeHandler: q,
|
|
41
|
+
keyDownHandler: B,
|
|
42
|
+
triggerValueChangeCallback: G
|
|
43
|
+
} = fe({
|
|
44
|
+
value: l,
|
|
45
|
+
maxLength: n,
|
|
46
|
+
onChange: I,
|
|
47
|
+
onKeyDown: P,
|
|
48
|
+
onPressEnter: W,
|
|
49
|
+
beforeTriggerValueChangeCallback: (t) => {
|
|
50
|
+
!("value" in e) && (n === void 0 || t.length <= n) && U(t);
|
|
51
51
|
}
|
|
52
|
-
}),
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
if (
|
|
57
|
-
const
|
|
58
|
-
|
|
52
|
+
}), S = F || l || "", { getPrefixCls: J, rtl: g } = ne(de), o = J?.("textarea"), z = s || e.resize === "none" || C(e.autoSize) && !w(e.autoSize.minRows) && !w(e.autoSize.maxRows) && e.autoSize?.minRows === e.autoSize?.maxRows || !w(e.rows);
|
|
53
|
+
z ? f.resize = "none" : e.resize && (f.resize = e.resize);
|
|
54
|
+
const y = () => {
|
|
55
|
+
if (r.current && r.current.focus) {
|
|
56
|
+
if (r.current.setSelectionRange) {
|
|
57
|
+
const t = r.current.textContent.length;
|
|
58
|
+
r.current.setSelectionRange(t, t);
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
r.current.focus();
|
|
61
61
|
}
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
}, Q = () => {
|
|
63
|
+
if (e.rows)
|
|
64
|
+
return;
|
|
65
|
+
const t = me(
|
|
66
|
+
e.autoSize,
|
|
67
|
+
r.current
|
|
66
68
|
);
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
|
|
69
|
+
t && K(t);
|
|
70
|
+
}, N = (t) => {
|
|
71
|
+
t.stopPropagation(), y(), G("", t), E?.();
|
|
70
72
|
};
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}, [
|
|
73
|
+
le(() => {
|
|
74
|
+
Q();
|
|
75
|
+
}, [S]), ae(
|
|
74
76
|
A,
|
|
75
77
|
() => ({
|
|
76
|
-
dom:
|
|
78
|
+
dom: r.current,
|
|
77
79
|
focus: () => {
|
|
78
|
-
|
|
80
|
+
y();
|
|
79
81
|
},
|
|
80
82
|
blur: () => {
|
|
81
|
-
|
|
83
|
+
r.current?.blur?.();
|
|
82
84
|
},
|
|
83
|
-
getRootDOMNode: () =>
|
|
85
|
+
getRootDOMNode: () => r.current
|
|
84
86
|
}),
|
|
85
87
|
[]
|
|
86
88
|
);
|
|
87
|
-
const c =
|
|
89
|
+
const c = l ? l.length : 0, X = i && v || m, $ = ie(() => !n && i ? c > i : !1, [c, i, n]), R = j || (k || $ ? "error" : void 0), Y = x(
|
|
88
90
|
o,
|
|
89
91
|
{
|
|
90
|
-
[`${o}-${
|
|
92
|
+
[`${o}-${R}`]: R,
|
|
91
93
|
// [`${prefixCls}-error`]: error || lengthError || status === 'error',
|
|
92
|
-
[`${o}-disabled`]:
|
|
93
|
-
[`${o}-rtl`]:
|
|
94
|
+
[`${o}-disabled`]: s,
|
|
95
|
+
[`${o}-rtl`]: g,
|
|
96
|
+
[`${o}-resize-none`]: z
|
|
97
|
+
// 潘启宝添加
|
|
94
98
|
},
|
|
95
99
|
L
|
|
96
|
-
),
|
|
100
|
+
), V = /* @__PURE__ */ u(
|
|
97
101
|
"textarea",
|
|
98
102
|
{
|
|
99
|
-
...
|
|
100
|
-
maxLength:
|
|
101
|
-
ref:
|
|
102
|
-
style: { ...T, ...
|
|
103
|
-
className:
|
|
103
|
+
...ue(O, ["autoSize", "defaultValue"]),
|
|
104
|
+
maxLength: n,
|
|
105
|
+
ref: r,
|
|
106
|
+
style: { ...T, ...f },
|
|
107
|
+
className: Y,
|
|
104
108
|
placeholder: M,
|
|
105
|
-
disabled:
|
|
106
|
-
value:
|
|
107
|
-
onChange:
|
|
108
|
-
onKeyDown:
|
|
109
|
-
onCompositionStart:
|
|
110
|
-
onCompositionUpdate:
|
|
111
|
-
onCompositionEnd:
|
|
109
|
+
disabled: s,
|
|
110
|
+
value: S,
|
|
111
|
+
onChange: q,
|
|
112
|
+
onKeyDown: B,
|
|
113
|
+
onCompositionStart: d,
|
|
114
|
+
onCompositionUpdate: d,
|
|
115
|
+
onCompositionEnd: d
|
|
112
116
|
}
|
|
113
117
|
);
|
|
114
|
-
if (
|
|
115
|
-
const
|
|
116
|
-
return /* @__PURE__ */
|
|
118
|
+
if (X) {
|
|
119
|
+
const t = !s && m && l, [Z, _] = g ? [i, c] : [c, i];
|
|
120
|
+
return /* @__PURE__ */ D(
|
|
117
121
|
"div",
|
|
118
122
|
{
|
|
119
|
-
className:
|
|
123
|
+
className: x(`${o}-wrapper`, {
|
|
120
124
|
[`${o}-clear-wrapper`]: m,
|
|
121
|
-
[`${o}-wrapper-rtl`]:
|
|
125
|
+
[`${o}-wrapper-rtl`]: g
|
|
122
126
|
}),
|
|
123
127
|
style: H,
|
|
124
128
|
children: [
|
|
125
|
-
|
|
126
|
-
|
|
129
|
+
V,
|
|
130
|
+
t ? p !== void 0 ? /* @__PURE__ */ u(
|
|
127
131
|
"span",
|
|
128
132
|
{
|
|
129
133
|
className: `${o}-clear-icon`,
|
|
130
|
-
onClick:
|
|
131
|
-
onMouseDown: (
|
|
132
|
-
|
|
134
|
+
onClick: N,
|
|
135
|
+
onMouseDown: (h) => {
|
|
136
|
+
h.preventDefault();
|
|
133
137
|
},
|
|
134
|
-
children:
|
|
138
|
+
children: p
|
|
135
139
|
}
|
|
136
|
-
) : /* @__PURE__ */ u(
|
|
137
|
-
|
|
140
|
+
) : /* @__PURE__ */ u(ce, { className: `${o}-clear-icon`, children: /* @__PURE__ */ u(
|
|
141
|
+
ee,
|
|
138
142
|
{
|
|
139
|
-
onClick:
|
|
140
|
-
onMouseDown: (
|
|
141
|
-
|
|
143
|
+
onClick: N,
|
|
144
|
+
onMouseDown: (h) => {
|
|
145
|
+
h.preventDefault();
|
|
142
146
|
}
|
|
143
147
|
}
|
|
144
148
|
) }) : null,
|
|
145
|
-
|
|
149
|
+
i && v && /* @__PURE__ */ D(
|
|
146
150
|
"span",
|
|
147
151
|
{
|
|
148
|
-
className:
|
|
149
|
-
[`${o}-word-limit-error`]:
|
|
152
|
+
className: x(`${o}-word-limit`, {
|
|
153
|
+
[`${o}-word-limit-error`]: $
|
|
150
154
|
}),
|
|
151
155
|
children: [
|
|
152
|
-
|
|
156
|
+
Z,
|
|
153
157
|
"/",
|
|
154
|
-
|
|
158
|
+
_
|
|
155
159
|
]
|
|
156
160
|
}
|
|
157
161
|
)
|
|
@@ -159,9 +163,9 @@ const fe = (n, A) => {
|
|
|
159
163
|
}
|
|
160
164
|
);
|
|
161
165
|
}
|
|
162
|
-
return
|
|
163
|
-
},
|
|
164
|
-
|
|
166
|
+
return V;
|
|
167
|
+
}, he = te.forwardRef(ge);
|
|
168
|
+
he.displayName = "TextArea";
|
|
165
169
|
export {
|
|
166
|
-
|
|
170
|
+
he as default
|
|
167
171
|
};
|
package/liquid-fill/index.js
CHANGED
|
@@ -50,6 +50,7 @@ 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 { isNumber as ct } from "@unicom-cloud/utils/is";
|
|
55
56
|
import { v4 as A } from "uuid";
|
|
@@ -72,7 +73,7 @@ const dt = {
|
|
|
72
73
|
decimalPlaces: 0,
|
|
73
74
|
percentFontScale: 0.5,
|
|
74
75
|
waveSpeedVariation: 0.5
|
|
75
|
-
},
|
|
76
|
+
}, ge = (E) => {
|
|
76
77
|
const { getPrefixCls: I, componentConfig: _ } = at(pt), i = I?.("liquid-fill"), H = st(
|
|
77
78
|
E,
|
|
78
79
|
dt,
|
|
@@ -253,5 +254,5 @@ const dt = {
|
|
|
253
254
|
);
|
|
254
255
|
};
|
|
255
256
|
export {
|
|
256
|
-
|
|
257
|
+
ge as default
|
|
257
258
|
};
|
package/loading/index.js
CHANGED
|
@@ -1,61 +1,80 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d, useContext as g, useMemo as u } from "react";
|
|
3
|
+
import "../config-provider/ConfigProvider.js";
|
|
4
|
+
import "lodash/isEqualWith";
|
|
5
|
+
import "../components/common/utils/is.js";
|
|
6
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
7
|
+
import "lodash/isNumber";
|
|
8
|
+
import "lodash/merge";
|
|
9
|
+
import "../components/common/utils/dom.js";
|
|
10
|
+
import "../components/common/hooks/useIntersectionObserver.js";
|
|
11
|
+
import A from "../components/common/hooks/useMergeProps.js";
|
|
12
|
+
import "../components/common/utils/reactDOM.js";
|
|
13
|
+
import "@unicom-cloud/utils/constant";
|
|
14
|
+
import "lodash/debounce";
|
|
15
|
+
import E from "@unicom-cloud/utils/class-name";
|
|
16
|
+
import I from "../config-provider/context.js";
|
|
17
|
+
const v = ["#FF5F57", "#FEBC2E", "#28C840"], e = 50, o = e / 2, S = 4, t = 7, c = 12, T = "0.7s", w = "0.5 0 0.5 1;0.5 0 0.5 1", D = (l, M) => {
|
|
18
|
+
const { getPrefixCls: m, componentConfig: p, rtl: a } = g(I), f = A(
|
|
19
|
+
l,
|
|
20
|
+
{},
|
|
21
|
+
p?.Loading
|
|
22
|
+
), { colors: s = v, style: x, className: $, ...O } = f, n = m?.("mentions"), C = u(
|
|
23
|
+
() => [
|
|
24
|
+
{
|
|
25
|
+
cx: o - c,
|
|
26
|
+
fill: s[0],
|
|
27
|
+
values: `${o + t};${o};${o + t}`
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
cx: o,
|
|
31
|
+
fill: s[1],
|
|
32
|
+
values: `${o - t};${o};${o - t}`
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
cx: o + c,
|
|
36
|
+
fill: s[2],
|
|
37
|
+
values: `${o + t};${o};${o + t}`
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
[s]
|
|
41
|
+
);
|
|
42
|
+
return /* @__PURE__ */ r(
|
|
9
43
|
"svg",
|
|
10
44
|
{
|
|
11
|
-
|
|
45
|
+
style: { ...x },
|
|
46
|
+
className: E(`${n}`, !!a && `${n}-rtl`, $),
|
|
12
47
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
-
width:
|
|
14
|
-
height:
|
|
15
|
-
viewBox:
|
|
48
|
+
width: `${e}px`,
|
|
49
|
+
height: `${e}px`,
|
|
50
|
+
viewBox: `0 0 ${e} ${e}`,
|
|
16
51
|
preserveAspectRatio: "xMidYMid",
|
|
17
|
-
children:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
repeatCount: "indefinite"
|
|
40
|
-
}
|
|
41
|
-
) }),
|
|
42
|
-
/* @__PURE__ */ t("circle", { cx: l + s, cy: e, r: c, fill: i[2], children: /* @__PURE__ */ t(
|
|
43
|
-
"animate",
|
|
44
|
-
{
|
|
45
|
-
attributeName: "cy",
|
|
46
|
-
values: `${e + 7};${e};${e + 7}`,
|
|
47
|
-
dur: n,
|
|
48
|
-
calcMode: "spline",
|
|
49
|
-
keySplines: r,
|
|
50
|
-
begin: "0s",
|
|
51
|
-
repeatCount: "indefinite"
|
|
52
|
-
}
|
|
53
|
-
) })
|
|
54
|
-
]
|
|
52
|
+
children: C.map((i, N) => /* @__PURE__ */ r(
|
|
53
|
+
"circle",
|
|
54
|
+
{
|
|
55
|
+
cx: i.cx,
|
|
56
|
+
cy: o,
|
|
57
|
+
r: S,
|
|
58
|
+
fill: i.fill,
|
|
59
|
+
children: /* @__PURE__ */ r(
|
|
60
|
+
"animate",
|
|
61
|
+
{
|
|
62
|
+
attributeName: "cy",
|
|
63
|
+
values: i.values,
|
|
64
|
+
dur: T,
|
|
65
|
+
calcMode: "spline",
|
|
66
|
+
keySplines: w,
|
|
67
|
+
begin: "0s",
|
|
68
|
+
repeatCount: "indefinite"
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
},
|
|
72
|
+
N
|
|
73
|
+
))
|
|
55
74
|
}
|
|
56
75
|
);
|
|
57
|
-
}
|
|
58
|
-
|
|
76
|
+
}, L = d(D);
|
|
77
|
+
L.displayName = "Loading";
|
|
59
78
|
export {
|
|
60
|
-
|
|
79
|
+
L as default
|
|
61
80
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/marquee/index.js
CHANGED
|
@@ -50,6 +50,7 @@ import { resizeObserver as _ } from "../components/common/utils/resizeObserver.j
|
|
|
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";
|
|
@@ -64,7 +65,7 @@ const et = {
|
|
|
64
65
|
loop: 0,
|
|
65
66
|
// 0表示无限循环
|
|
66
67
|
gradientSize: 50
|
|
67
|
-
},
|
|
68
|
+
}, ae = (q) => {
|
|
68
69
|
const { getPrefixCls: O, componentConfig: P } = U(tt), s = O?.("marquee"), R = V(
|
|
69
70
|
q,
|
|
70
71
|
et,
|
|
@@ -278,5 +279,5 @@ const et = {
|
|
|
278
279
|
);
|
|
279
280
|
};
|
|
280
281
|
export {
|
|
281
|
-
|
|
282
|
+
ae as default
|
|
282
283
|
};
|