@unicom-cloud/ui 0.8.80 → 0.8.82
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/Affix.js +1 -1
- package/Alert.js +1 -1
- package/AutoComplete.js +2 -2
- package/BackTop.js +1 -1
- package/Badge.js +1 -1
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +2 -2
- package/Card.js +1 -1
- package/Carousel.js +1 -1
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +2 -2
- package/Comment.js +1 -1
- package/ConfigProvider.js +5 -4
- package/Copy.js +1 -1
- package/DatePicker.js +7 -7
- package/Descriptions.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/List.js +2 -2
- package/Mentions.js +2 -2
- package/Menu.js +1 -1
- package/Message.js +1 -1
- package/Modal.js +1 -1
- package/Notice.js +1 -1
- package/Notification.js +5 -5
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Pagination.js +1 -1
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/Select.js +1 -1
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +1 -1
- package/Spin.js +1 -1
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Transfer.js +2 -2
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +1 -1
- package/Typography.js +1 -1
- package/affix/index.js +60 -57
- package/alert/index.js +53 -53
- package/anchor/Anchor.js +72 -72
- package/anchor/Link.js +27 -27
- package/auto-complete/index.js +2 -2
- package/avatar/Avatar.js +31 -31
- package/avatar/Group.js +25 -25
- package/back-top/index.js +24 -24
- package/badge/index.js +37 -37
- package/breadcrumb/index.js +26 -26
- package/button/Group.js +7 -7
- package/button/index.js +29 -29
- package/calendar/index.js +2 -2
- package/card/Grid.js +12 -12
- package/card/Meta.js +17 -17
- package/card/index.js +44 -44
- package/carousel/Arrow.js +19 -19
- package/carousel/Indicator.js +25 -25
- package/carousel/index.js +77 -77
- package/cascader/Cascader.js +2 -2
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/{yLRv5RIK.js → CQI1gsQs.js} +181 -181
- package/chunk/CmMehQON.js +1464 -0
- package/chunk/Cplu5dtQ.js +730 -0
- package/chunk/{C5X4hOkx.js → D0338Pbq.js} +80 -80
- package/chunk/{DYspELhF.js → DXDbeIai.js} +223 -223
- package/chunk/{DEiyXzBZ.js → DfrB26fI.js} +63 -63
- package/chunk/{BG7YGUsx.js → dKvAiKxr.js} +119 -119
- package/chunk/{D73Vr7fa.js → w221i0nK.js} +2871 -2870
- package/collapse/Collapse.js +2 -2
- package/collapse/Item.js +2 -2
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +36 -36
- package/color-picker/InputAlpha.js +11 -11
- package/color-picker/InputHex.js +24 -24
- package/color-picker/InputRgb.js +23 -23
- package/color-picker/Palette.js +18 -18
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +2 -2
- package/comment/index.js +31 -31
- package/config-provider/ConfigProvider.js +5 -4
- package/config-provider/context.js +2 -2
- package/config-provider/index.js +4 -3
- package/copy/index.js +28 -28
- package/date-picker/Picker.js +276 -276
- package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
- package/date-picker/index.js +26 -27
- package/descriptions/index.js +33 -33
- package/divider/index.js +12 -12
- package/draggable/index.js +23 -23
- package/drawer/Drawer.js +81 -81
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +56 -56
- package/empty/index.js +1 -1
- package/form/Form.js +76 -76
- package/form/FormItem.js +64 -64
- package/grid/Col.js +53 -53
- package/grid/Row.js +34 -34
- package/grid/grid-item.js +29 -29
- package/grid/grid.js +50 -50
- package/icon/index.js +20 -19
- package/icon-hover/index.js +1 -1
- package/image/Image.js +86 -86
- package/image/ImagePreview.js +2 -2
- package/image/ImagePreviewArrow.js +22 -22
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +404 -402
- package/input/Group.js +8 -8
- package/input/Input.js +322 -322
- package/input/InputElement.js +1 -1
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +1 -1
- package/input-number/index.js +1 -1
- package/input-tag/InputTag.js +40 -40
- package/layout/Content.js +7 -7
- package/layout/Footer.js +9 -9
- package/layout/Header.js +7 -7
- package/layout/Sider.js +55 -55
- package/layout/index.js +32 -32
- package/link/index.js +35 -35
- package/list/Item.js +29 -29
- package/list/Meta.js +12 -12
- package/list/index.js +2 -2
- package/mentions/index.js +2 -2
- package/menu/Menu.js +2 -2
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +1 -1
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +2 -2
- package/modal/index.js +1 -1
- package/notice/index.js +1 -1
- package/notification/index.js +5 -5
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +12 -12
- package/overflow-ellipsis/index.js +24 -24
- package/package.json +1 -1
- package/page-header/index.js +38 -38
- package/pagination/PageItem.js +16 -16
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +2 -2
- package/pagination/Pagination.js +2 -2
- package/pagination/index.js +1 -1
- package/picker/Input.js +69 -69
- package/picker/InputRange.js +111 -111
- package/popconfirm/index.js +61 -61
- package/popover/index.js +35 -35
- package/progress/index.js +22 -22
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +49 -49
- package/resize-box/ResizeTrigger.js +34 -34
- package/resize-box/Split.js +56 -56
- package/resize-box/SplitGroup.js +55 -55
- package/resize-box/index.js +51 -51
- package/result/index.js +41 -41
- package/select/Option.js +1 -1
- package/select/Select.js +2 -2
- package/select/index.js +2 -2
- package/select/util.js +1 -1
- package/select-view/Core.js +125 -125
- package/skeleton/index.js +20 -20
- package/slider/Button.js +57 -57
- package/slider/index.js +116 -116
- package/space/index.js +46 -44
- package/spin/DotLoading.js +10 -10
- package/spin/index.js +44 -44
- package/statistic/Countdown.js +34 -34
- package/statistic/index.js +61 -61
- package/steps/index.js +55 -55
- package/style.css +1 -1
- package/switch/index.js +54 -54
- package/table/Table.js +2 -2
- package/table/index.js +1 -1
- package/tabs/Tab.js +2 -2
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +12 -12
- package/tabs/index.js +2 -2
- package/tag/index.js +45 -45
- package/time-picker/Picker.js +76 -76
- package/time-picker/TimePicker.js +136 -136
- package/time-picker/index.js +8 -8
- package/timeline/Item.js +47 -47
- package/timeline/Timeline.js +41 -41
- package/tooltip/index.js +29 -29
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +2 -2
- package/tree/Animation.js +2 -2
- package/tree/Node.js +2 -2
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/List.js +1 -1
- package/tree-select/Select.js +2 -2
- package/tree-select/index.js +2 -2
- package/trigger/index.js +60 -60
- package/types/config-provider/ConfigProvider.d.ts +2 -2
- package/types/config-provider/context.d.ts +1 -1
- package/types/date-picker/index.d.ts +8 -9
- package/types/date-picker/interface.d.ts +9 -9
- package/types/index.d.ts +1 -1
- package/types/picker/Input.d.ts +2 -2
- package/types/space/index.d.ts +2 -1
- package/types/utils/names.d.ts +1 -1
- package/typography/Base.js +53 -53
- package/typography/Ellipsis.js +6 -6
- package/typography/Operations.js +28 -28
- package/typography/Paragraph.js +8 -8
- package/typography/Typography.js +7 -7
- package/typography/index.js +1 -1
- package/upload/TriggerNode.js +47 -47
- package/upload/Upload.js +184 -184
- package/utils/contextHolder.js +3 -3
- package/utils/index.js +1 -1
- package/utils/names.js +1 -1
- package/utils/setPrimaryColor.js +18 -13
- package/verification-code/VerificationCode.js +49 -49
- package/version/index.js +1 -1
- package/watermark/Watermark.js +24 -24
- package/chunk/CQvM33Vg.js +0 -724
- package/chunk/yhU2zeeu.js +0 -1461
- /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
package/typography/Base.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { jsx as a, jsxs as ie, Fragment as re } from "react/jsx-runtime";
|
|
2
2
|
import le from "lodash/merge";
|
|
3
|
-
import
|
|
4
|
-
import { a as de } from "../chunk/
|
|
3
|
+
import O, { forwardRef as ae, useContext as ce, useRef as q, useState as F, useEffect as pe, useImperativeHandle as me } from "react";
|
|
4
|
+
import { a as de } from "../chunk/Cplu5dtQ.js";
|
|
5
5
|
import { u as fe } from "../chunk/CXPOj2uy.js";
|
|
6
6
|
import { u as ue } from "../chunk/a3hR6zLw.js";
|
|
7
7
|
import he from "../popover/index.js";
|
|
8
8
|
import Ee from "../tooltip/index.js";
|
|
9
|
-
import
|
|
9
|
+
import L from "@unicom-cloud/utils/class-name";
|
|
10
10
|
import "../chunk/ClM74To2.js";
|
|
11
11
|
import { m as ge } from "../chunk/B5RFT17G.js";
|
|
12
12
|
import { o as xe } from "../chunk/BKKEev13.js";
|
|
13
|
-
import { r as
|
|
14
|
-
import
|
|
13
|
+
import { r as Te } from "../chunk/CIRG541s.js";
|
|
14
|
+
import Ce from "../utils/throttleByRaf.js";
|
|
15
15
|
import Ne from "./EditContent.js";
|
|
16
16
|
import Se from "./Operations.js";
|
|
17
17
|
import be from "./useCssEllipsis.js";
|
|
18
|
-
import we, { MEASURE_STATUS as
|
|
19
|
-
import { isPlainObject as
|
|
18
|
+
import we, { MEASURE_STATUS as _ } from "./useEllipsis.js";
|
|
19
|
+
import { isPlainObject as T, isUndefined as V } from "@unicom-cloud/utils/is";
|
|
20
20
|
function $e(n, f) {
|
|
21
21
|
const {
|
|
22
22
|
type: c,
|
|
23
23
|
bold: b,
|
|
24
|
-
disabled:
|
|
24
|
+
disabled: C,
|
|
25
25
|
mark: u,
|
|
26
26
|
underline: N,
|
|
27
27
|
delete: p,
|
|
28
28
|
code: w
|
|
29
29
|
} = n, l = [], h = [];
|
|
30
|
-
return c && h.push(`${f}-${c}`),
|
|
30
|
+
return c && h.push(`${f}-${c}`), C && h.push(`${f}-disabled`), b && l.push("b"), N && l.push("u"), p && l.push("del"), w && l.push("code"), u && l.push("mark"), {
|
|
31
31
|
component: l,
|
|
32
32
|
className: h
|
|
33
33
|
};
|
|
@@ -36,62 +36,62 @@ function ke(n, f) {
|
|
|
36
36
|
const {
|
|
37
37
|
componentType: c,
|
|
38
38
|
style: b,
|
|
39
|
-
className:
|
|
39
|
+
className: C,
|
|
40
40
|
children: u,
|
|
41
41
|
editable: N,
|
|
42
42
|
ellipsis: p,
|
|
43
43
|
heading: w,
|
|
44
44
|
blockquote: l,
|
|
45
45
|
...h
|
|
46
|
-
} = n,
|
|
46
|
+
} = n, A = ce(de), { getPrefixCls: $, rtl: I } = A, i = $ == null ? void 0 : $("typography"), M = q(), { component: S, className: U } = $e(n, i), [H, z] = F(!1), [G, J] = F(0), k = T(N) ? N : {}, K = "editing" in k ? k.editing : H, e = p ? {
|
|
47
47
|
rows: 1,
|
|
48
48
|
ellipsisStr: "...",
|
|
49
49
|
cssEllipsis: !1,
|
|
50
|
-
...
|
|
51
|
-
} : {}, Q = e.wrapper ||
|
|
50
|
+
...T(p) ? p : {}
|
|
51
|
+
} : {}, Q = e.wrapper || O.Fragment, [r, X] = fe(!1, {
|
|
52
52
|
defaultValue: e.defaultExpanded,
|
|
53
53
|
value: e.expanded
|
|
54
|
-
}), { simpleEllipsis:
|
|
55
|
-
const s =
|
|
54
|
+
}), { simpleEllipsis: y, ellipsisStyle: Y } = be(e), D = (t, o) => {
|
|
55
|
+
const s = V(e.ellipsisStr) ? "..." : e.ellipsisStr, d = !V(e.suffix) && e.suffix;
|
|
56
56
|
return /* @__PURE__ */ ie(Q, { children: [
|
|
57
57
|
t,
|
|
58
|
-
o && !r && !
|
|
58
|
+
o && !r && !y ? s : "",
|
|
59
59
|
d,
|
|
60
60
|
te(o)
|
|
61
61
|
] });
|
|
62
|
-
}, { ellipsisNode: Z, isEllipsis: m, measureStatus:
|
|
62
|
+
}, { ellipsisNode: Z, isEllipsis: m, measureStatus: j } = we({
|
|
63
63
|
...e,
|
|
64
64
|
children: u,
|
|
65
65
|
expanding: r,
|
|
66
66
|
width: G,
|
|
67
|
-
renderMeasureContent:
|
|
68
|
-
simpleEllipsis:
|
|
69
|
-
}), ee =
|
|
67
|
+
renderMeasureContent: D,
|
|
68
|
+
simpleEllipsis: y || r
|
|
69
|
+
}), ee = Ce((t) => {
|
|
70
70
|
const { contentRect: o } = t == null ? void 0 : t[0];
|
|
71
71
|
if (o) {
|
|
72
72
|
const s = S.includes("code") ? o.width - 18 : o.width;
|
|
73
73
|
[
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
].includes(
|
|
74
|
+
_.NO_NEED_ELLIPSIS,
|
|
75
|
+
_.MEASURE_END
|
|
76
|
+
].includes(j) && J(s);
|
|
77
77
|
}
|
|
78
|
-
}),
|
|
78
|
+
}), B = q(null);
|
|
79
79
|
pe(() => {
|
|
80
|
-
const t =
|
|
80
|
+
const t = Te([B.current], ee);
|
|
81
81
|
return () => {
|
|
82
82
|
t();
|
|
83
83
|
};
|
|
84
|
-
}, [
|
|
84
|
+
}, [B.current]);
|
|
85
85
|
function te(t) {
|
|
86
86
|
return /* @__PURE__ */ a(re, { children: /* @__PURE__ */ a(
|
|
87
87
|
Se,
|
|
88
88
|
{
|
|
89
89
|
...n,
|
|
90
|
-
setEditing:
|
|
90
|
+
setEditing: z,
|
|
91
91
|
onClickExpand: oe,
|
|
92
92
|
expanding: r,
|
|
93
93
|
isEllipsis: t,
|
|
94
|
-
currentContext:
|
|
94
|
+
currentContext: A
|
|
95
95
|
}
|
|
96
96
|
) });
|
|
97
97
|
}
|
|
@@ -102,14 +102,14 @@ function ke(n, f) {
|
|
|
102
102
|
ue(() => {
|
|
103
103
|
var t;
|
|
104
104
|
(t = e.onEllipsis) == null || t.call(e, m);
|
|
105
|
-
}, [m]), me(f, () =>
|
|
106
|
-
function
|
|
105
|
+
}, [m]), me(f, () => M.current);
|
|
106
|
+
function W(t, o, s, d = {}) {
|
|
107
107
|
let g = t;
|
|
108
|
-
return o.forEach((
|
|
109
|
-
const
|
|
110
|
-
g =
|
|
111
|
-
|
|
112
|
-
le({ ...ne },
|
|
108
|
+
return o.forEach((v, P) => {
|
|
109
|
+
const R = { className: `${i}-${v}` }, x = P === 0 ? d : {}, ne = T(s.mark) && s.mark.color ? { style: { backgroundColor: s.mark.color }, ...x } : { ...x };
|
|
110
|
+
g = O.createElement(
|
|
111
|
+
v,
|
|
112
|
+
le({ ...ne }, R),
|
|
113
113
|
g
|
|
114
114
|
);
|
|
115
115
|
}), g;
|
|
@@ -117,20 +117,20 @@ function ke(n, f) {
|
|
|
117
117
|
let E;
|
|
118
118
|
c === "Paragraph" ? E = l ? "blockquote" : "div" : c === "Title" ? E = `h${w}` : c === "Text" && (E = p ? "div" : "span");
|
|
119
119
|
function se() {
|
|
120
|
-
const t = ge(
|
|
120
|
+
const t = ge(O.Children.toArray(u)), o = e.showTooltip, s = T(e.showTooltip) && e.showTooltip.type === "popover" ? "popover" : "tooltip", d = T(e.showTooltip) ? e.showTooltip.props || {} : {}, g = s === "popover" ? he : Ee, P = {
|
|
121
121
|
style: b,
|
|
122
122
|
...m && !o && !r ? { title: t } : {}
|
|
123
|
-
},
|
|
123
|
+
}, R = m && o && !r, x = /* @__PURE__ */ a(
|
|
124
124
|
E,
|
|
125
125
|
{
|
|
126
|
-
ref:
|
|
127
|
-
className:
|
|
126
|
+
ref: M,
|
|
127
|
+
className: L(
|
|
128
128
|
i,
|
|
129
|
-
|
|
130
|
-
{ [`${i}-rtl`]:
|
|
131
|
-
|
|
129
|
+
U,
|
|
130
|
+
{ [`${i}-rtl`]: I },
|
|
131
|
+
C
|
|
132
132
|
),
|
|
133
|
-
...
|
|
133
|
+
...P,
|
|
134
134
|
...xe(h, [
|
|
135
135
|
"spacing",
|
|
136
136
|
"type",
|
|
@@ -148,9 +148,9 @@ function ke(n, f) {
|
|
|
148
148
|
"setEditing",
|
|
149
149
|
"forceShowExpand"
|
|
150
150
|
]),
|
|
151
|
-
children:
|
|
151
|
+
children: y && j !== _.INIT && !r && m ? W(
|
|
152
152
|
// CSS folding style, need to wrap the text separately.
|
|
153
|
-
|
|
153
|
+
D(
|
|
154
154
|
/* @__PURE__ */ a("span", { style: Y, children: u }),
|
|
155
155
|
m
|
|
156
156
|
),
|
|
@@ -159,26 +159,26 @@ function ke(n, f) {
|
|
|
159
159
|
// The simple-ellipsis class ensures that the ReactNode after the text is displayed correctly (no line breaks)
|
|
160
160
|
// Need to act on the immediate parent node of the text
|
|
161
161
|
{ className: `${i}-simple-ellipsis` }
|
|
162
|
-
) :
|
|
162
|
+
) : W(Z, S, n)
|
|
163
163
|
}
|
|
164
164
|
);
|
|
165
|
-
return
|
|
165
|
+
return R ? /* @__PURE__ */ a(g, { content: t, ...d, children: /* @__PURE__ */ a("span", { children: x }) }) : x;
|
|
166
166
|
}
|
|
167
167
|
return K ? /* @__PURE__ */ a(
|
|
168
168
|
Ne,
|
|
169
169
|
{
|
|
170
170
|
ref: f,
|
|
171
171
|
...n,
|
|
172
|
-
className:
|
|
172
|
+
className: L(
|
|
173
173
|
i,
|
|
174
|
-
|
|
175
|
-
{ [`${i}-rtl`]:
|
|
174
|
+
U,
|
|
175
|
+
{ [`${i}-rtl`]: I },
|
|
176
176
|
`${i}-${E}`,
|
|
177
|
-
|
|
177
|
+
C
|
|
178
178
|
),
|
|
179
179
|
prefixCls: i,
|
|
180
|
-
setEditing:
|
|
181
|
-
editableConfig:
|
|
180
|
+
setEditing: z,
|
|
181
|
+
editableConfig: k
|
|
182
182
|
}
|
|
183
183
|
) : se();
|
|
184
184
|
}
|
package/typography/Ellipsis.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import "../chunk/
|
|
3
|
+
import "../chunk/Cplu5dtQ.js";
|
|
4
4
|
import "../chunk/BFTV6myl.js";
|
|
5
5
|
import "../chunk/CXPOj2uy.js";
|
|
6
6
|
import "lodash/isEqualWith";
|
|
@@ -50,7 +50,7 @@ import "../chunk/DEuVgCzp.js";
|
|
|
50
50
|
import "../affix/index.js";
|
|
51
51
|
import "../alert/index.js";
|
|
52
52
|
import "../anchor/Anchor.js";
|
|
53
|
-
import { E as rr } from "../chunk/
|
|
53
|
+
import { E as rr } from "../chunk/w221i0nK.js";
|
|
54
54
|
import "../avatar/index.js";
|
|
55
55
|
import "../back-top/index.js";
|
|
56
56
|
import "../badge/index.js";
|
|
@@ -58,7 +58,7 @@ import "../breadcrumb/index.js";
|
|
|
58
58
|
import "../button/index.js";
|
|
59
59
|
import "../card/index.js";
|
|
60
60
|
import "../carousel/index.js";
|
|
61
|
-
import "../chunk/
|
|
61
|
+
import "../chunk/DfrB26fI.js";
|
|
62
62
|
import "../comment/index.js";
|
|
63
63
|
import "../copy/index.js";
|
|
64
64
|
import "../date-picker/index.js";
|
|
@@ -74,8 +74,8 @@ import "../input/Input.js";
|
|
|
74
74
|
import "../input-tag/InputTag.js";
|
|
75
75
|
import "../layout/index.js";
|
|
76
76
|
import "../link/index.js";
|
|
77
|
-
import "../chunk/
|
|
78
|
-
import "../chunk/
|
|
77
|
+
import "../chunk/D0338Pbq.js";
|
|
78
|
+
import "../chunk/DXDbeIai.js";
|
|
79
79
|
import "../page-header/index.js";
|
|
80
80
|
import "../popconfirm/index.js";
|
|
81
81
|
import "../popover/index.js";
|
|
@@ -94,7 +94,7 @@ import "../statistic/index.js";
|
|
|
94
94
|
import "../steps/index.js";
|
|
95
95
|
import "../suspense-fallback-test/index.js";
|
|
96
96
|
import "../switch/index.js";
|
|
97
|
-
import "../chunk/
|
|
97
|
+
import "../chunk/dKvAiKxr.js";
|
|
98
98
|
import "../tag/index.js";
|
|
99
99
|
import "../time-picker/index.js";
|
|
100
100
|
import "../timeline/Timeline.js";
|
package/typography/Operations.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { jsx as t, jsxs as A, Fragment as F } from "react/jsx-runtime";
|
|
2
2
|
import K from "@unicom-cloud/icons/IconUiEdit";
|
|
3
3
|
import L from "lodash/isArray";
|
|
4
|
-
import
|
|
4
|
+
import d from "lodash/isPlainObject";
|
|
5
5
|
import { useEffect as U } from "react";
|
|
6
6
|
import q from "../copy/index.js";
|
|
7
7
|
import { u as z } from "../chunk/BYdIoY50.js";
|
|
8
8
|
import B from "../tooltip/index.js";
|
|
9
|
-
import { m as
|
|
10
|
-
function X(
|
|
11
|
-
var
|
|
9
|
+
import { m as T } from "../chunk/B5RFT17G.js";
|
|
10
|
+
function X(N) {
|
|
11
|
+
var u, E, g, h, b;
|
|
12
12
|
const {
|
|
13
|
-
children:
|
|
13
|
+
children: m,
|
|
14
14
|
copyable: r,
|
|
15
15
|
editable: i,
|
|
16
|
-
ellipsis:
|
|
17
|
-
expanding:
|
|
18
|
-
setEditing:
|
|
19
|
-
onClickExpand:
|
|
20
|
-
forceShowExpand:
|
|
21
|
-
isEllipsis:
|
|
22
|
-
currentContext:
|
|
23
|
-
} =
|
|
24
|
-
var
|
|
25
|
-
(
|
|
26
|
-
}, e =
|
|
27
|
-
e.text === void 0 && (e.text =
|
|
16
|
+
ellipsis: c,
|
|
17
|
+
expanding: P,
|
|
18
|
+
setEditing: k,
|
|
19
|
+
onClickExpand: l,
|
|
20
|
+
forceShowExpand: j,
|
|
21
|
+
isEllipsis: v,
|
|
22
|
+
currentContext: I = {}
|
|
23
|
+
} = N, f = z(), { getPrefixCls: p, locale: o } = I, s = p == null ? void 0 : p("typography"), a = d(c) ? c : {}, n = d(i) ? i : {}, y = L(a.expandNodes) ? a.expandNodes : [(u = o == null ? void 0 : o.Typography) == null ? void 0 : u.fold, (E = o == null ? void 0 : o.Typography) == null ? void 0 : E.unfold], x = (w) => {
|
|
24
|
+
var C;
|
|
25
|
+
(C = n.onStart) == null || C.call(n, T(m), w), k(!0);
|
|
26
|
+
}, e = d(r) ? { ...r } : {};
|
|
27
|
+
e.text === void 0 && (e.text = T(m));
|
|
28
28
|
const S = !!r && /* @__PURE__ */ t(
|
|
29
29
|
q,
|
|
30
30
|
{
|
|
@@ -35,35 +35,35 @@ function X(P) {
|
|
|
35
35
|
), $ = i && /* @__PURE__ */ t(
|
|
36
36
|
B,
|
|
37
37
|
{
|
|
38
|
-
content: (
|
|
38
|
+
content: (g = o == null ? void 0 : o.Typography) == null ? void 0 : g.edit,
|
|
39
39
|
...n.tooltipProps,
|
|
40
40
|
children: /* @__PURE__ */ t(
|
|
41
41
|
"span",
|
|
42
42
|
{
|
|
43
43
|
tabIndex: 0,
|
|
44
|
-
"aria-label": (
|
|
44
|
+
"aria-label": (h = o == null ? void 0 : o.Typography) == null ? void 0 : h.edit,
|
|
45
45
|
role: "button",
|
|
46
46
|
className: `${s}-operation-edit`,
|
|
47
|
-
onClick:
|
|
48
|
-
...
|
|
49
|
-
onPressEnter:
|
|
47
|
+
onClick: x,
|
|
48
|
+
...f({
|
|
49
|
+
onPressEnter: x
|
|
50
50
|
}),
|
|
51
51
|
children: /* @__PURE__ */ t(K, {})
|
|
52
52
|
}
|
|
53
53
|
)
|
|
54
54
|
}
|
|
55
|
-
), O =
|
|
55
|
+
), O = j || a.expandable && v ? /* @__PURE__ */ t(
|
|
56
56
|
"a",
|
|
57
57
|
{
|
|
58
58
|
className: `${s}-operation-expand`,
|
|
59
|
-
onClick:
|
|
59
|
+
onClick: l,
|
|
60
60
|
role: "button",
|
|
61
61
|
tabIndex: 0,
|
|
62
|
-
"aria-label": (
|
|
63
|
-
...
|
|
64
|
-
onPressEnter:
|
|
62
|
+
"aria-label": (b = o == null ? void 0 : o.Typography) == null ? void 0 : b.unfold,
|
|
63
|
+
...f({
|
|
64
|
+
onPressEnter: l
|
|
65
65
|
}),
|
|
66
|
-
children:
|
|
66
|
+
children: P ? y[0] : y[1]
|
|
67
67
|
}
|
|
68
68
|
) : null;
|
|
69
69
|
return U(() => () => {
|
package/typography/Paragraph.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as p, useContext as c } from "react";
|
|
3
|
-
import { a as f } from "../chunk/
|
|
3
|
+
import { a as f } from "../chunk/Cplu5dtQ.js";
|
|
4
4
|
import i from "@unicom-cloud/utils/class-name";
|
|
5
5
|
import l from "./Base.js";
|
|
6
|
-
function g(
|
|
7
|
-
const { spacing:
|
|
6
|
+
function g(o, r) {
|
|
7
|
+
const { spacing: t = "default", className: s } = o, { getPrefixCls: a } = c(f), e = a == null ? void 0 : a("typography"), m = t === "close" ? i(`${e}-spacing-close`, s) : s;
|
|
8
8
|
return /* @__PURE__ */ n(
|
|
9
9
|
l,
|
|
10
10
|
{
|
|
11
|
-
...
|
|
12
|
-
ref:
|
|
11
|
+
...o,
|
|
12
|
+
ref: r,
|
|
13
13
|
componentType: "Paragraph",
|
|
14
14
|
className: m
|
|
15
15
|
}
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const N = p(
|
|
19
19
|
g
|
|
20
20
|
);
|
|
21
|
-
|
|
21
|
+
N.displayName = "Paragraph";
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
N as default
|
|
24
24
|
};
|
package/typography/Typography.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as c, useContext as l } from "react";
|
|
3
|
-
import { a as
|
|
4
|
-
import
|
|
5
|
-
function
|
|
6
|
-
const { getPrefixCls:
|
|
3
|
+
import { a as y } from "../chunk/Cplu5dtQ.js";
|
|
4
|
+
import f from "@unicom-cloud/utils/class-name";
|
|
5
|
+
function i(a, s) {
|
|
6
|
+
const { getPrefixCls: o } = l(y), t = o == null ? void 0 : o("typography"), { className: r, style: e, children: p } = a, m = f(t, r);
|
|
7
7
|
return /* @__PURE__ */ n("article", { ref: s, style: e, className: m, children: p });
|
|
8
8
|
}
|
|
9
|
-
const
|
|
10
|
-
|
|
9
|
+
const N = c(i);
|
|
10
|
+
N.displayName = "Typography";
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
N as default
|
|
13
13
|
};
|
package/typography/index.js
CHANGED
package/upload/TriggerNode.js
CHANGED
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a, jsxs as x } from "react/jsx-runtime";
|
|
2
2
|
import y from "@unicom-cloud/icons/IconUiPlus";
|
|
3
3
|
import A from "@unicom-cloud/icons/IconUiUpload";
|
|
4
4
|
import C, { forwardRef as G, useContext as K, useState as U, useEffect as L } from "react";
|
|
5
5
|
import O from "../button/index.js";
|
|
6
|
-
import { a as R } from "../chunk/
|
|
6
|
+
import { a as R } from "../chunk/Cplu5dtQ.js";
|
|
7
7
|
import { u as B } from "../chunk/BYdIoY50.js";
|
|
8
8
|
import I from "@unicom-cloud/utils/class-name";
|
|
9
9
|
import { loopDirectory as H, getFiles as S } from "./util.js";
|
|
10
10
|
const V = (e, T) => {
|
|
11
|
-
const k = B(), { locale:
|
|
11
|
+
const k = B(), { locale: t } = K(R), [l, s] = U(!1), [o, f] = U(0), {
|
|
12
12
|
tip: N,
|
|
13
13
|
children: m,
|
|
14
|
-
disabled:
|
|
14
|
+
disabled: d,
|
|
15
15
|
drag: w,
|
|
16
16
|
listType: F,
|
|
17
|
-
prefixCls:
|
|
17
|
+
prefixCls: i,
|
|
18
18
|
accept: E,
|
|
19
19
|
multiple: P
|
|
20
20
|
} = e, $ = {
|
|
21
|
-
disabled:
|
|
21
|
+
disabled: d
|
|
22
22
|
};
|
|
23
23
|
return L(() => {
|
|
24
24
|
f(0);
|
|
25
|
-
}, [
|
|
25
|
+
}, [l]), m === null ? null : /* @__PURE__ */ a(
|
|
26
26
|
"div",
|
|
27
27
|
{
|
|
28
|
-
className: `${
|
|
29
|
-
onClick:
|
|
28
|
+
className: `${i}-trigger`,
|
|
29
|
+
onClick: d ? void 0 : e.onClick,
|
|
30
30
|
...k({
|
|
31
31
|
onPressEnter: () => {
|
|
32
|
-
var
|
|
33
|
-
!
|
|
32
|
+
var r;
|
|
33
|
+
!d && ((r = e.onClick) == null || r.call(e));
|
|
34
34
|
}
|
|
35
35
|
}),
|
|
36
36
|
ref: T,
|
|
37
37
|
onDragEnter: () => {
|
|
38
|
-
f(
|
|
38
|
+
f(o + 1);
|
|
39
39
|
},
|
|
40
|
-
onDragLeave: (
|
|
41
|
-
var
|
|
42
|
-
|
|
40
|
+
onDragLeave: (r) => {
|
|
41
|
+
var n;
|
|
42
|
+
r.preventDefault(), o === 0 ? (s(!1), !d && ((n = e.onDragLeave) == null || n.call(e, r))) : f(o - 1);
|
|
43
43
|
},
|
|
44
|
-
onDrop: (
|
|
45
|
-
var
|
|
46
|
-
if (
|
|
47
|
-
if (
|
|
48
|
-
H(
|
|
49
|
-
var
|
|
50
|
-
(
|
|
44
|
+
onDrop: (r) => {
|
|
45
|
+
var n, b;
|
|
46
|
+
if (r.preventDefault(), !d && e.drag !== !1) {
|
|
47
|
+
if (s(!1), e.directory)
|
|
48
|
+
H(r.dataTransfer.items, E, (u) => {
|
|
49
|
+
var c;
|
|
50
|
+
(c = e.onDragFiles) == null || c.call(e, u);
|
|
51
51
|
});
|
|
52
52
|
else {
|
|
53
|
-
const u = [].slice.call(
|
|
54
|
-
if (
|
|
55
|
-
const h =
|
|
53
|
+
const u = [].slice.call(r.dataTransfer.items || []).reduce((D, g, j) => {
|
|
54
|
+
if (g.webkitGetAsEntry) {
|
|
55
|
+
const h = g.webkitGetAsEntry();
|
|
56
56
|
return h != null && h.isDirectory ? [...D, j] : D;
|
|
57
57
|
}
|
|
58
|
-
}, []),
|
|
59
|
-
v.length > 0 && ((
|
|
58
|
+
}, []), c = [].slice.call(r.dataTransfer.files || []).filter((D, g) => !u.includes(g)), v = S(c, E);
|
|
59
|
+
v.length > 0 && ((n = e.onDragFiles) == null || n.call(e, P ? v : v.slice(0, 1)));
|
|
60
60
|
}
|
|
61
|
-
(b = e.onDrop) == null || b.call(e,
|
|
61
|
+
(b = e.onDrop) == null || b.call(e, r);
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
-
onDragOver: (
|
|
65
|
-
var
|
|
66
|
-
|
|
64
|
+
onDragOver: (r) => {
|
|
65
|
+
var n;
|
|
66
|
+
r.preventDefault(), !d && !l && (s(!0), (n = e.onDragOver) == null || n.call(e, r));
|
|
67
67
|
},
|
|
68
|
-
children: C.isValidElement(m) ? /* @__PURE__ */
|
|
68
|
+
children: C.isValidElement(m) ? /* @__PURE__ */ a(
|
|
69
69
|
"div",
|
|
70
70
|
{
|
|
71
|
-
className: I({ [`${
|
|
71
|
+
className: I({ [`${i}-trigger-custom-active`]: l }),
|
|
72
72
|
children: C.cloneElement(m, $)
|
|
73
73
|
}
|
|
74
|
-
) : F === "picture-card" ? /* @__PURE__ */
|
|
74
|
+
) : F === "picture-card" ? /* @__PURE__ */ a("div", { className: `${i}-trigger-picture-wrapper`, children: /* @__PURE__ */ a(
|
|
75
75
|
"div",
|
|
76
76
|
{
|
|
77
|
-
className: `${
|
|
77
|
+
className: `${i}-trigger-picture`,
|
|
78
78
|
tabIndex: 0,
|
|
79
|
-
"aria-label":
|
|
80
|
-
children: /* @__PURE__ */
|
|
79
|
+
"aria-label": t == null ? void 0 : t.Upload.upload,
|
|
80
|
+
children: /* @__PURE__ */ a("div", { className: `${i}-trigger-picture-text`, children: /* @__PURE__ */ a(y, {}) })
|
|
81
81
|
}
|
|
82
82
|
) }) : w ? /* @__PURE__ */ x(
|
|
83
83
|
"div",
|
|
84
84
|
{
|
|
85
|
-
className: I(`${
|
|
86
|
-
[`${
|
|
85
|
+
className: I(`${i}-trigger-drag`, {
|
|
86
|
+
[`${i}-trigger-drag-active`]: l
|
|
87
87
|
}),
|
|
88
88
|
tabIndex: 0,
|
|
89
|
-
"aria-label":
|
|
89
|
+
"aria-label": t == null ? void 0 : t.Upload.drag,
|
|
90
90
|
children: [
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
N && /* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ a(y, {}),
|
|
92
|
+
/* @__PURE__ */ a("p", { className: `${i}-trigger-drag-text`, children: l ? t == null ? void 0 : t.Upload.dragHover : t == null ? void 0 : t.Upload.drag }),
|
|
93
|
+
N && /* @__PURE__ */ a("div", { className: `${i}-trigger-tip`, children: N })
|
|
94
94
|
]
|
|
95
95
|
}
|
|
96
96
|
) : /* @__PURE__ */ x(
|
|
97
97
|
O,
|
|
98
98
|
{
|
|
99
99
|
...$,
|
|
100
|
-
"aria-label":
|
|
100
|
+
"aria-label": t == null ? void 0 : t.Upload.upload,
|
|
101
101
|
type: "primary",
|
|
102
|
-
className: `${
|
|
102
|
+
className: `${i}-trigger-with-icon`,
|
|
103
103
|
children: [
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
|
|
104
|
+
/* @__PURE__ */ a(A, {}),
|
|
105
|
+
t == null ? void 0 : t.Upload.upload
|
|
106
106
|
]
|
|
107
107
|
}
|
|
108
108
|
)
|