@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
|
@@ -1,43 +1,53 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { mergedToString as
|
|
6
|
-
function
|
|
7
|
-
const { prefixCls:
|
|
8
|
-
`${
|
|
9
|
-
`${
|
|
10
|
-
|
|
11
|
-
),
|
|
12
|
-
|
|
13
|
-
if (
|
|
14
|
-
const { length:
|
|
15
|
-
|
|
2
|
+
import { forwardRef as C, useRef as P, useEffect as x } from "react";
|
|
3
|
+
import u from "../input/Input.js";
|
|
4
|
+
import N from "@unicom-cloud/utils/class-name";
|
|
5
|
+
import { mergedToString as $ } from "../components/common/utils/mergedToString.js";
|
|
6
|
+
function y(c, l) {
|
|
7
|
+
const { prefixCls: o, children: m, setEditing: d, editableConfig: n, style: p } = c, g = N(
|
|
8
|
+
`${o}-typography`,
|
|
9
|
+
`${o}-edit-content`,
|
|
10
|
+
c.className
|
|
11
|
+
), a = $(m), e = P(null);
|
|
12
|
+
x(() => {
|
|
13
|
+
if (e.current?.focus?.(), e.current && "dom" in e.current) {
|
|
14
|
+
const { length: t } = e.current.dom.value;
|
|
15
|
+
e.current.dom.setSelectionRange(t, t);
|
|
16
16
|
}
|
|
17
17
|
}, []);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
const r = () => {
|
|
19
|
+
d?.(!1), n?.onEnd?.(a);
|
|
20
|
+
}, E = (t) => {
|
|
21
|
+
n?.onChange?.(t);
|
|
22
|
+
}, h = () => r(), f = {
|
|
23
|
+
className: `${o}-edit-content-input`,
|
|
24
|
+
value: a,
|
|
25
|
+
onBlur: h,
|
|
26
|
+
onChange: E
|
|
27
|
+
};
|
|
28
|
+
let s;
|
|
29
|
+
return n?.inputProps ? s = /* @__PURE__ */ i(
|
|
30
|
+
u,
|
|
29
31
|
{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
...f,
|
|
33
|
+
ref: e,
|
|
34
|
+
onPressEnter: r,
|
|
35
|
+
...n.inputProps
|
|
36
|
+
}
|
|
37
|
+
) : s = /* @__PURE__ */ i(
|
|
38
|
+
u.TextArea,
|
|
39
|
+
{
|
|
40
|
+
...f,
|
|
41
|
+
ref: e,
|
|
34
42
|
autoSize: !0,
|
|
35
|
-
|
|
36
|
-
|
|
43
|
+
onPressEnter: (t) => {
|
|
44
|
+
t.shiftKey || r();
|
|
45
|
+
},
|
|
46
|
+
...n?.textAreaProps
|
|
37
47
|
}
|
|
38
|
-
) });
|
|
48
|
+
), /* @__PURE__ */ i("div", { className: g, style: p, ref: l, children: s });
|
|
39
49
|
}
|
|
40
|
-
const b =
|
|
50
|
+
const b = C(y);
|
|
41
51
|
export {
|
|
42
52
|
b as default
|
|
43
53
|
};
|
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
|
};
|