@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/typography/Ellipsis.js
CHANGED
|
@@ -1,38 +1,35 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as g, Fragment as K, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Q, useContext as U, useRef as v, useState as R, useMemo as V, useEffect as S, useCallback as X } from "react";
|
|
3
3
|
import "../config-provider/ConfigProvider.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import "
|
|
7
|
-
import "../
|
|
8
|
-
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
9
|
-
import "lodash/isNumber";
|
|
10
|
-
import "lodash/merge";
|
|
11
|
-
import { isServerRendering as U } from "../components/common/utils/dom.js";
|
|
12
|
-
import "../components/common/hooks/useIntersectionObserver.js";
|
|
13
|
-
import "../components/common/utils/reactDOM.js";
|
|
14
|
-
import "@unicom-cloud/utils/constant";
|
|
15
|
-
import "lodash/debounce";
|
|
4
|
+
import Y from "../copy/index.js";
|
|
5
|
+
import Z from "../components/common/hooks/useMergeProps.js";
|
|
6
|
+
import tt from "../components/common/hooks/useMergeValue.js";
|
|
7
|
+
import et from "../tooltip/index.js";
|
|
16
8
|
import "@unicom-cloud/utils/case-name";
|
|
17
|
-
import
|
|
9
|
+
import n from "@unicom-cloud/utils/class-name";
|
|
18
10
|
import "../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
19
11
|
import "@unicom-cloud/utils/constant/ui";
|
|
20
12
|
import "../utils/contextHolder.js";
|
|
21
13
|
import "@unicom-cloud/utils/dayjs";
|
|
22
14
|
import "@unicom-cloud/utils/clipboard-copy";
|
|
23
15
|
import "../components/common/utils/dayjs.js";
|
|
16
|
+
import { isServerRendering as rt } from "../components/common/utils/dom.js";
|
|
24
17
|
import "@unicom-cloud/utils/file/fileToURL";
|
|
25
18
|
import "lodash/escapeRegExp";
|
|
26
19
|
import "lodash/isArray";
|
|
20
|
+
import "lodash/isNumber";
|
|
27
21
|
import "lodash/isString";
|
|
28
22
|
import "lodash/isFunction";
|
|
29
23
|
import "lodash/throttle";
|
|
24
|
+
import "../components/common/utils/is.js";
|
|
30
25
|
import "lodash/camelCase";
|
|
31
26
|
import "lodash/capitalize";
|
|
32
27
|
import "lodash/cloneDeep";
|
|
28
|
+
import "lodash/debounce";
|
|
33
29
|
import "lodash/get";
|
|
34
30
|
import "lodash/has";
|
|
35
31
|
import "lodash/kebabCase";
|
|
32
|
+
import "lodash/merge";
|
|
36
33
|
import "lodash/mergeWith";
|
|
37
34
|
import "lodash/set";
|
|
38
35
|
import "lodash/setWith";
|
|
@@ -41,173 +38,109 @@ import "lodash/startCase";
|
|
|
41
38
|
import "lodash/uniq";
|
|
42
39
|
import "lodash/upperFirst";
|
|
43
40
|
import "@unicom-cloud/utils/math";
|
|
44
|
-
import "
|
|
41
|
+
import { mergedToString as ot } from "../components/common/utils/mergedToString.js";
|
|
45
42
|
import "../dist/react-transition-group/src/CSSTransition.js";
|
|
46
43
|
import "../dist/react-transition-group/src/ReplaceTransition.js";
|
|
47
44
|
import "../dist/react-transition-group/src/SwitchTransition.js";
|
|
48
45
|
import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
49
46
|
import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
50
|
-
import
|
|
47
|
+
import "../components/common/utils/reactDOM.js";
|
|
48
|
+
import { resizeObserver as it } from "../components/common/utils/resizeObserver.js";
|
|
51
49
|
import "@unicom-cloud/utils/file/saveAs";
|
|
52
50
|
import "@unicom-cloud/utils/screenfull";
|
|
53
51
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
54
|
-
import
|
|
52
|
+
import "lodash/isPlainObject";
|
|
53
|
+
import { throttleByRaf as nt } from "../components/common/utils/throttleByRaf.js";
|
|
54
|
+
import "react-is";
|
|
55
55
|
import "@unicom-cloud/utils/tree";
|
|
56
|
-
import { isPlainObject as
|
|
56
|
+
import { isPlainObject as b, isFunction as st } from "@unicom-cloud/utils/is";
|
|
57
57
|
import "uuid";
|
|
58
58
|
import "../dist/validate/src/index.js";
|
|
59
|
-
import "
|
|
60
|
-
import "../
|
|
61
|
-
|
|
62
|
-
import "../auto-complete/index.js";
|
|
63
|
-
import "../avatar/index.js";
|
|
64
|
-
import "../back-top/index.js";
|
|
65
|
-
import "../badge/index.js";
|
|
66
|
-
import "../breadcrumb/index.js";
|
|
67
|
-
import "../button/index.js";
|
|
68
|
-
import "../calendar/index.js";
|
|
69
|
-
import "../card/index.js";
|
|
70
|
-
import "../carousel/index.js";
|
|
71
|
-
import "../cascader/Cascader.js";
|
|
72
|
-
import "../checkbox/Checkbox.js";
|
|
73
|
-
import "../checkbox/Group.js";
|
|
74
|
-
import "../collapse/Collapse.js";
|
|
75
|
-
import "../comment/index.js";
|
|
76
|
-
import "../copy/index.js";
|
|
77
|
-
import "../date-picker/index.js";
|
|
78
|
-
import "../descriptions/index.js";
|
|
79
|
-
import "../details/index.js";
|
|
80
|
-
import "../development/index.js";
|
|
81
|
-
import "../divider/index.js";
|
|
82
|
-
import "../drawer/Drawer.js";
|
|
83
|
-
import "../dropdown/index.js";
|
|
84
|
-
import "../empty/index.js";
|
|
85
|
-
import "../form/index.js";
|
|
86
|
-
import "../grid/index.js";
|
|
87
|
-
import "../icon/index.js";
|
|
88
|
-
import "../icons/file.js";
|
|
89
|
-
import "../image/Image.js";
|
|
90
|
-
import "../input/Input.js";
|
|
91
|
-
import "../input-number/index.js";
|
|
92
|
-
import "../input-tag/InputTag.js";
|
|
93
|
-
import "../layout/index.js";
|
|
94
|
-
import "../link/index.js";
|
|
95
|
-
import "../list/index.js";
|
|
96
|
-
import "../mentions/index.js";
|
|
97
|
-
import "../menu/Menu.js";
|
|
98
|
-
import "../message/index.js";
|
|
99
|
-
import "../modal/Modal.js";
|
|
100
|
-
import "../notification/index.js";
|
|
101
|
-
import "../page-header/index.js";
|
|
102
|
-
import "../pagination/Pagination.js";
|
|
103
|
-
import "../popconfirm/index.js";
|
|
104
|
-
import "../popover/index.js";
|
|
105
|
-
import "../portal/index.js";
|
|
106
|
-
import "../progress/index.js";
|
|
107
|
-
import "../color-picker/index.js";
|
|
108
|
-
import "../icon-hover/index.js";
|
|
109
|
-
import "../loading/index.js";
|
|
110
|
-
import "qrcode.react";
|
|
111
|
-
import "../radio/Radio.js";
|
|
112
|
-
import "../radio/Group.js";
|
|
113
|
-
import "../rate/index.js";
|
|
114
|
-
import "../resize-box/index.js";
|
|
115
|
-
import "../result/index.js";
|
|
116
|
-
import "../segmented/index.js";
|
|
117
|
-
import "../select/Select.js";
|
|
118
|
-
import "../skeleton/index.js";
|
|
119
|
-
import "../slider/index.js";
|
|
120
|
-
import "../space/index.js";
|
|
121
|
-
import "../speech-synthesis/index.js";
|
|
122
|
-
import "../spin/index.js";
|
|
123
|
-
import "../statistic/index.js";
|
|
124
|
-
import "../steps/index.js";
|
|
125
|
-
import "../suspense-fallback-test/index.js";
|
|
126
|
-
import "../switch/index.js";
|
|
127
|
-
import "../table/index.js";
|
|
128
|
-
import "../tabs/Tab.js";
|
|
129
|
-
import "../tag/index.js";
|
|
130
|
-
import "../time-picker/index.js";
|
|
131
|
-
import "../timeline/Timeline.js";
|
|
132
|
-
import Z from "../tooltip/index.js";
|
|
133
|
-
import "@unicom-cloud/icons/IconUiClose";
|
|
134
|
-
import "react-dom";
|
|
135
|
-
import "../transfer/index.js";
|
|
136
|
-
import "../tree/Tree.js";
|
|
137
|
-
import "../tree-select/Select.js";
|
|
138
|
-
import "../trigger/index.js";
|
|
139
|
-
import "./index.js";
|
|
140
|
-
import "../upload/Upload.js";
|
|
141
|
-
import "../verification-code/VerificationCode.js";
|
|
142
|
-
import "../virtual-list/VirtualList.js";
|
|
143
|
-
import "../watermark/Watermark.js";
|
|
144
|
-
import tt from "../config-provider/context.js";
|
|
145
|
-
const rt = {
|
|
59
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
60
|
+
import lt from "../config-provider/context.js";
|
|
61
|
+
const pt = {
|
|
146
62
|
rows: 1,
|
|
147
63
|
expandable: !0,
|
|
148
64
|
defaultExpanded: !1
|
|
149
|
-
},
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
65
|
+
}, at = (j, mt) => {
|
|
66
|
+
const C = U(lt), N = Z(
|
|
67
|
+
j,
|
|
68
|
+
pt,
|
|
69
|
+
C.componentConfig?.["Typography.Ellipsis"]
|
|
154
70
|
), {
|
|
155
|
-
className:
|
|
156
|
-
style:
|
|
157
|
-
rows:
|
|
158
|
-
disabled:
|
|
71
|
+
className: A,
|
|
72
|
+
style: L,
|
|
73
|
+
rows: l,
|
|
74
|
+
disabled: w,
|
|
159
75
|
showTooltip: c,
|
|
160
|
-
children:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
76
|
+
children: y,
|
|
77
|
+
// 潘启宝修改
|
|
78
|
+
expandable: d,
|
|
79
|
+
expandRender: P,
|
|
80
|
+
onExpand: W,
|
|
81
|
+
onEllipsis: k,
|
|
82
|
+
copyable: f
|
|
83
|
+
// 潘启宝添加
|
|
84
|
+
} = N, { locale: B } = C, D = rt ? !1 : /^((?!chrome|android).)*safari/i.test(navigator?.userAgent ?? ""), F = v(null), s = v(null), [O, H] = R(""), [_, E] = R(!1), p = v(null), a = v(null), [e, T] = tt(!1, {
|
|
85
|
+
defaultValue: N.defaultExpanded,
|
|
86
|
+
value: N.expanded
|
|
87
|
+
}), [i, M] = R(!1), x = V(() => b(d) ? !d.single && l === 1 : l === 1, [l, d]), h = V(() => b(c) ? {
|
|
169
88
|
tooltip: !0,
|
|
170
89
|
tooltipProps: c
|
|
171
90
|
} : {
|
|
172
91
|
tooltip: !!c,
|
|
173
92
|
tooltipProps: c
|
|
174
93
|
}, [c]);
|
|
175
|
-
|
|
176
|
-
if (
|
|
177
|
-
const
|
|
178
|
-
|
|
94
|
+
S(() => {
|
|
95
|
+
if (s.current) {
|
|
96
|
+
const o = s.current.textContent;
|
|
97
|
+
o && H(o);
|
|
179
98
|
}
|
|
180
|
-
}, [
|
|
181
|
-
const t =
|
|
99
|
+
}, [y, s]);
|
|
100
|
+
const t = C.getPrefixCls?.("ellipsis"), u = /* @__PURE__ */ g(K, { children: [
|
|
101
|
+
!!f && // 潘启宝添加
|
|
102
|
+
/* @__PURE__ */ r(
|
|
103
|
+
Y,
|
|
104
|
+
{
|
|
105
|
+
...b(f) ? f : {},
|
|
106
|
+
text: () => {
|
|
107
|
+
let m = (b(f) ? f : {}).text;
|
|
108
|
+
return st(m) && (m = m()), m || (m = ot(y)), m;
|
|
109
|
+
},
|
|
110
|
+
className: `${t}-action-text-copy`
|
|
111
|
+
}
|
|
112
|
+
),
|
|
113
|
+
y
|
|
114
|
+
] }), q = () => P ? P(e) : /* @__PURE__ */ r("span", { className: `${t}-action-text`, children: e ? B?.Typography?.fold : B?.Typography?.unfold }), $ = () => d && i ? /* @__PURE__ */ r(
|
|
182
115
|
"div",
|
|
183
116
|
{
|
|
184
|
-
className:
|
|
185
|
-
[`${t}-action-collapsed`]: !
|
|
117
|
+
className: n(`${t}-action`, {
|
|
118
|
+
[`${t}-action-collapsed`]: !e
|
|
186
119
|
}),
|
|
187
|
-
onClick: (
|
|
188
|
-
|
|
120
|
+
onClick: (o) => {
|
|
121
|
+
e ? (T(!1), W?.(!1, o)) : (T(!0), E(!1), W?.(!0, o));
|
|
189
122
|
},
|
|
190
|
-
children:
|
|
123
|
+
children: q()
|
|
191
124
|
}
|
|
192
|
-
) : null,
|
|
193
|
-
|
|
194
|
-
a.current &&
|
|
125
|
+
) : null, G = X(
|
|
126
|
+
nt(() => {
|
|
127
|
+
a.current && p.current && ((x ? a.current.offsetWidth > p.current.offsetWidth : a.current.offsetHeight > p.current.offsetHeight) ? i === !1 && (M(!0), k?.(!0)) : i === !0 && (M(!1), k?.(!1)));
|
|
195
128
|
}),
|
|
196
|
-
[
|
|
129
|
+
[i, x]
|
|
197
130
|
);
|
|
198
|
-
|
|
199
|
-
const
|
|
200
|
-
[
|
|
201
|
-
|
|
131
|
+
S(() => {
|
|
132
|
+
const o = it(
|
|
133
|
+
[p.current, a.current],
|
|
134
|
+
G
|
|
202
135
|
);
|
|
203
136
|
return () => {
|
|
204
|
-
|
|
137
|
+
o();
|
|
205
138
|
};
|
|
206
|
-
}, [
|
|
207
|
-
const
|
|
139
|
+
}, [p.current, a.current]);
|
|
140
|
+
const I = () => w ? null : /* @__PURE__ */ r(
|
|
208
141
|
"div",
|
|
209
142
|
{
|
|
210
|
-
className:
|
|
143
|
+
className: x ? n(`${t}-content-mirror`, `${t}-single`) : n(
|
|
211
144
|
`${t}-content-mirror`,
|
|
212
145
|
`${t}-multiple`,
|
|
213
146
|
`${t}-collapsed`
|
|
@@ -215,75 +148,75 @@ const rt = {
|
|
|
215
148
|
style: {
|
|
216
149
|
WebkitBoxOrient: "vertical",
|
|
217
150
|
MozBoxOrient: "vertical",
|
|
218
|
-
WebkitLineClamp:
|
|
151
|
+
WebkitLineClamp: l
|
|
219
152
|
},
|
|
220
|
-
ref:
|
|
221
|
-
children: /* @__PURE__ */
|
|
153
|
+
ref: p,
|
|
154
|
+
children: /* @__PURE__ */ r("span", { ref: a, className: `${t}-text`, children: u })
|
|
222
155
|
}
|
|
223
|
-
),
|
|
156
|
+
), z = () => x ? /* @__PURE__ */ r("div", { className: n(`${t}-content`, `${t}-single`), children: /* @__PURE__ */ r("span", { ref: s, className: `${t}-text`, children: u }) }) : D ? /* @__PURE__ */ g(
|
|
224
157
|
"div",
|
|
225
158
|
{
|
|
226
|
-
className:
|
|
227
|
-
title: !
|
|
159
|
+
className: n(`${t}-content`, `${t}-multiple`),
|
|
160
|
+
title: !h.tooltip && i && !e ? O : void 0,
|
|
228
161
|
children: [
|
|
229
|
-
!
|
|
230
|
-
/* @__PURE__ */
|
|
162
|
+
!e && $(),
|
|
163
|
+
/* @__PURE__ */ r(
|
|
231
164
|
"span",
|
|
232
165
|
{
|
|
233
|
-
ref:
|
|
234
|
-
className:
|
|
235
|
-
[`${t}-collapsed`]: !
|
|
166
|
+
ref: s,
|
|
167
|
+
className: n(`${t}-text`, {
|
|
168
|
+
[`${t}-collapsed`]: !e
|
|
236
169
|
}),
|
|
237
170
|
style: {
|
|
238
171
|
WebkitBoxOrient: "vertical",
|
|
239
172
|
MozBoxOrient: "vertical",
|
|
240
|
-
WebkitLineClamp:
|
|
173
|
+
WebkitLineClamp: l
|
|
241
174
|
},
|
|
242
|
-
children:
|
|
175
|
+
children: u
|
|
243
176
|
}
|
|
244
177
|
),
|
|
245
|
-
|
|
178
|
+
e && $()
|
|
246
179
|
]
|
|
247
180
|
}
|
|
248
|
-
) : /* @__PURE__ */
|
|
181
|
+
) : /* @__PURE__ */ g(
|
|
249
182
|
"div",
|
|
250
183
|
{
|
|
251
|
-
className:
|
|
252
|
-
[`${t}-collapsed`]: !
|
|
184
|
+
className: n(`${t}-content`, `${t}-multiple`, {
|
|
185
|
+
[`${t}-collapsed`]: !e
|
|
253
186
|
}),
|
|
254
187
|
style: {
|
|
255
188
|
WebkitBoxOrient: "vertical",
|
|
256
189
|
MozBoxOrient: "vertical",
|
|
257
|
-
WebkitLineClamp:
|
|
190
|
+
WebkitLineClamp: l
|
|
258
191
|
},
|
|
259
|
-
title: !
|
|
192
|
+
title: !h.tooltip && i && !e ? O : void 0,
|
|
260
193
|
children: [
|
|
261
|
-
!
|
|
262
|
-
/* @__PURE__ */
|
|
263
|
-
|
|
194
|
+
!e && $(),
|
|
195
|
+
/* @__PURE__ */ r("span", { ref: s, className: `${t}-text`, children: u }),
|
|
196
|
+
e && $()
|
|
264
197
|
]
|
|
265
198
|
}
|
|
266
|
-
),
|
|
267
|
-
|
|
199
|
+
), J = () => w ? /* @__PURE__ */ r("div", { className: `${t}-content`, children: /* @__PURE__ */ r("span", { ref: s, className: `${t}-text`, children: u }) }) : h.tooltip ? /* @__PURE__ */ r(
|
|
200
|
+
et,
|
|
268
201
|
{
|
|
269
|
-
content:
|
|
270
|
-
popupVisible:
|
|
271
|
-
disabled: !
|
|
202
|
+
content: O,
|
|
203
|
+
popupVisible: _,
|
|
204
|
+
disabled: !i || e,
|
|
272
205
|
triggerProps: {
|
|
273
206
|
mouseEnterDelay: 100
|
|
274
207
|
},
|
|
275
|
-
onVisibleChange: (
|
|
276
|
-
|
|
208
|
+
onVisibleChange: (o) => {
|
|
209
|
+
o ? i && !e && E(!0) : E(!1);
|
|
277
210
|
},
|
|
278
|
-
...
|
|
279
|
-
children:
|
|
211
|
+
...h.tooltipProps,
|
|
212
|
+
children: z()
|
|
280
213
|
}
|
|
281
|
-
) :
|
|
282
|
-
return /* @__PURE__ */
|
|
283
|
-
|
|
284
|
-
|
|
214
|
+
) : z();
|
|
215
|
+
return /* @__PURE__ */ g("div", { ref: F, className: n(t, A), style: L, children: [
|
|
216
|
+
I(),
|
|
217
|
+
J()
|
|
285
218
|
] });
|
|
286
|
-
},
|
|
219
|
+
}, $e = Q(at);
|
|
287
220
|
export {
|
|
288
|
-
|
|
221
|
+
$e as default
|
|
289
222
|
};
|
package/typography/Operations.js
CHANGED
|
@@ -1,76 +1,124 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { useEffect as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
1
|
+
import { jsx as r, jsxs as I, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import $ from "@unicom-cloud/icons/IconUiEdit";
|
|
3
|
+
import v from "lodash/isArray";
|
|
4
|
+
import n from "lodash/isPlainObject";
|
|
5
|
+
import { useEffect as F } from "react";
|
|
6
|
+
import O from "../copy/index.js";
|
|
7
|
+
import w from "../components/common/hooks/useKeyboardEvent.js";
|
|
8
|
+
import A from "../tooltip/index.js";
|
|
9
|
+
import "@unicom-cloud/utils/case-name";
|
|
10
|
+
import "@unicom-cloud/utils/class-name";
|
|
11
|
+
import "../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
12
|
+
import "@unicom-cloud/utils/constant/ui";
|
|
13
|
+
import "../utils/contextHolder.js";
|
|
14
|
+
import "@unicom-cloud/utils/dayjs";
|
|
15
|
+
import "@unicom-cloud/utils/clipboard-copy";
|
|
16
|
+
import "../components/common/utils/dayjs.js";
|
|
17
|
+
import "../components/common/utils/dom.js";
|
|
18
|
+
import "@unicom-cloud/utils/file/fileToURL";
|
|
19
|
+
import "lodash/escapeRegExp";
|
|
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 g } 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 "react-is";
|
|
52
|
+
import "@unicom-cloud/utils/tree";
|
|
53
|
+
import { isFunction as K } from "@unicom-cloud/utils/is";
|
|
54
|
+
import "uuid";
|
|
55
|
+
import "../dist/validate/src/index.js";
|
|
56
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
57
|
+
function zo(u) {
|
|
11
58
|
const {
|
|
12
|
-
children:
|
|
13
|
-
copyable:
|
|
14
|
-
editable:
|
|
15
|
-
ellipsis:
|
|
59
|
+
children: s,
|
|
60
|
+
copyable: i,
|
|
61
|
+
editable: p,
|
|
62
|
+
ellipsis: l,
|
|
16
63
|
expanding: E,
|
|
17
|
-
setEditing:
|
|
18
|
-
onClickExpand:
|
|
19
|
-
forceShowExpand:
|
|
20
|
-
isEllipsis:
|
|
21
|
-
currentContext:
|
|
22
|
-
} =
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
const T = !!n && /* @__PURE__ */ t(
|
|
27
|
-
w,
|
|
64
|
+
setEditing: b,
|
|
65
|
+
onClickExpand: a,
|
|
66
|
+
forceShowExpand: h,
|
|
67
|
+
isEllipsis: C,
|
|
68
|
+
currentContext: T = {}
|
|
69
|
+
} = u, c = w(), { getPrefixCls: N, locale: t } = T, e = N?.("typography"), d = n(i) ? i : {}, m = n(l) ? l : {}, f = n(p) ? p : {}, x = v(m.expandNodes) ? m.expandNodes : [t?.Typography?.fold, t?.Typography?.unfold], y = (o) => {
|
|
70
|
+
f.onStart?.(g(s), o), b(!0);
|
|
71
|
+
}, P = !!i && /* @__PURE__ */ r(
|
|
72
|
+
O,
|
|
28
73
|
{
|
|
29
|
-
...
|
|
30
|
-
|
|
31
|
-
|
|
74
|
+
...d,
|
|
75
|
+
text: () => {
|
|
76
|
+
let o = d.text;
|
|
77
|
+
return K(o) && (o = o()), o || (o = g(s)), o;
|
|
78
|
+
},
|
|
79
|
+
className: `${e}-operation-copy`
|
|
32
80
|
}
|
|
33
|
-
),
|
|
34
|
-
|
|
81
|
+
), k = p && /* @__PURE__ */ r(
|
|
82
|
+
A,
|
|
35
83
|
{
|
|
36
|
-
content:
|
|
37
|
-
...
|
|
38
|
-
children: /* @__PURE__ */
|
|
84
|
+
content: t?.Typography?.edit,
|
|
85
|
+
...f.tooltipProps,
|
|
86
|
+
children: /* @__PURE__ */ r(
|
|
39
87
|
"span",
|
|
40
88
|
{
|
|
41
89
|
tabIndex: 0,
|
|
42
|
-
"aria-label":
|
|
90
|
+
"aria-label": t?.Typography?.edit,
|
|
43
91
|
role: "button",
|
|
44
|
-
className: `${
|
|
92
|
+
className: `${e}-operation-edit`,
|
|
45
93
|
onClick: y,
|
|
46
|
-
...
|
|
94
|
+
...c({
|
|
47
95
|
onPressEnter: y
|
|
48
96
|
}),
|
|
49
|
-
children: /* @__PURE__ */
|
|
97
|
+
children: /* @__PURE__ */ r($, {})
|
|
50
98
|
}
|
|
51
99
|
)
|
|
52
100
|
}
|
|
53
|
-
),
|
|
101
|
+
), j = h || m.expandable && C ? /* @__PURE__ */ r(
|
|
54
102
|
"a",
|
|
55
103
|
{
|
|
56
|
-
className: `${
|
|
57
|
-
onClick:
|
|
104
|
+
className: `${e}-operation-expand`,
|
|
105
|
+
onClick: a,
|
|
58
106
|
role: "button",
|
|
59
107
|
tabIndex: 0,
|
|
60
|
-
"aria-label":
|
|
61
|
-
...
|
|
62
|
-
onPressEnter:
|
|
108
|
+
"aria-label": t?.Typography?.unfold,
|
|
109
|
+
...c({
|
|
110
|
+
onPressEnter: a
|
|
63
111
|
}),
|
|
64
|
-
children: E ?
|
|
112
|
+
children: E ? x[0] : x[1]
|
|
65
113
|
}
|
|
66
114
|
) : null;
|
|
67
|
-
return
|
|
68
|
-
}, []), /* @__PURE__ */
|
|
115
|
+
return F(() => () => {
|
|
116
|
+
}, []), /* @__PURE__ */ I(S, { children: [
|
|
117
|
+
j,
|
|
69
118
|
k,
|
|
70
|
-
|
|
71
|
-
T
|
|
119
|
+
P
|
|
72
120
|
] });
|
|
73
121
|
}
|
|
74
122
|
export {
|
|
75
|
-
|
|
123
|
+
zo as default
|
|
76
124
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import p from "
|
|
2
|
-
import
|
|
1
|
+
import { useMemo as p } from "react";
|
|
2
|
+
import "../components/common/utils/is.js";
|
|
3
|
+
import { isUndefined as u } from "@unicom-cloud/utils/is";
|
|
3
4
|
const w = (e, t) => {
|
|
4
5
|
if (typeof window < "u" && window.CSS && window.CSS.supports)
|
|
5
|
-
return
|
|
6
|
+
return u(t) ? window.CSS.supports(e) : window.CSS.supports(e, t);
|
|
6
7
|
if (typeof document < "u" && document.createElement) {
|
|
7
8
|
const i = document.createElement("div");
|
|
8
9
|
return i.setAttribute("style", `${e}:${t};`), typeof i.style[e] < "u";
|
|
@@ -14,8 +15,8 @@ const w = (e, t) => {
|
|
|
14
15
|
}, f = () => Object.entries(d).every(
|
|
15
16
|
([e, t]) => w(e, t)
|
|
16
17
|
);
|
|
17
|
-
function
|
|
18
|
-
const { cssEllipsis: t, ellipsisStr: i = "...", suffix: s, rows: o } = e, n =
|
|
18
|
+
function a(e) {
|
|
19
|
+
const { cssEllipsis: t, ellipsisStr: i = "...", suffix: s, rows: o } = e, n = p(() => !t || o > 1 && !f() ? !1 : i === "..." && !s, [i, t, o, s]), r = {
|
|
19
20
|
textOverflow: "ellipsis",
|
|
20
21
|
whiteSpace: "nowrap",
|
|
21
22
|
overflow: "hidden"
|
|
@@ -33,5 +34,5 @@ function S(e) {
|
|
|
33
34
|
};
|
|
34
35
|
}
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
a as default
|
|
37
38
|
};
|