@unicom-cloud/ui 0.8.78 → 0.8.80
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 +3 -3
- package/Alert.js +3 -3
- package/AutoComplete.js +5 -5
- package/BackTop.js +5 -5
- package/Badge.js +3 -3
- package/Breadcrumb.js +4 -4
- package/Button.js +2 -2
- package/Calendar.js +4 -4
- package/Card.js +2 -2
- package/Carousel.js +2 -2
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +3 -3
- package/Comment.js +2 -2
- package/ConfigProvider.js +1 -1
- package/Copy.js +4 -4
- package/DatePicker.js +1 -1
- package/Descriptions.js +2 -2
- package/Divider.js +2 -2
- package/Draggable.js +2 -2
- package/Dropdown.js +5 -5
- package/Empty.js +2 -2
- package/Icon.js +9 -5
- package/IconHover.js +2 -2
- package/Image.js +1 -1
- package/InputNumber.js +3 -3
- package/Layout.js +2 -2
- package/Link.js +3 -3
- package/List.js +4 -4
- package/Mentions.js +5 -5
- package/Menu.js +1 -1
- package/Message.js +3 -3
- package/Modal.js +1 -1
- package/Notice.js +9 -8
- package/Notification.js +3 -3
- package/OverflowEllipsis.js +2 -2
- package/PageHeader.js +3 -3
- package/Pagination.js +1 -1
- package/Popconfirm.js +3 -3
- package/Popover.js +3 -3
- package/Progress.js +2 -2
- package/Radio.js +1 -1
- package/Rate.js +3 -3
- package/ResizeBox.js +3 -3
- package/Result.js +2 -2
- package/Select.js +1 -1
- package/SelectView.js +5 -6
- package/Skeleton.js +2 -2
- package/Slider.js +4 -4
- package/Space.js +2 -2
- package/SpeechSynthesis.js +18 -20
- package/Spin.js +3 -3
- package/Statistic.js +3 -3
- package/Steps.js +2 -2
- package/Switch.js +7 -8
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +3 -3
- package/Tooltip.js +3 -3
- package/Transfer.js +4 -4
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +9 -10
- package/Typography.js +1 -1
- package/affix/index.js +17 -17
- package/alert/index.js +13 -13
- package/anchor/Anchor.js +40 -40
- package/anchor/Link.js +14 -14
- package/anchor/util.js +2 -2
- package/auto-complete/index.js +5 -5
- package/avatar/Avatar.js +17 -17
- package/avatar/Group.js +13 -13
- package/back-top/index.js +18 -18
- package/badge/Count.js +13 -13
- package/badge/index.js +21 -21
- package/breadcrumb/Item.js +25 -25
- package/breadcrumb/index.js +12 -12
- package/button/Group.js +6 -6
- package/button/index.js +30 -30
- package/calendar/Month.js +2 -2
- package/calendar/Year.js +1 -1
- package/calendar/index.js +4 -4
- package/card/Grid.js +13 -13
- package/card/Meta.js +13 -13
- package/card/index.js +29 -29
- package/carousel/Arrow.js +6 -6
- package/carousel/Indicator.js +27 -27
- package/carousel/index.js +24 -24
- package/cascader/Cascader.js +8 -8
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +4 -4
- package/checkbox/Group.js +4 -4
- package/checkbox/GroupBlock.js +3 -3
- package/checkbox/index.js +2 -2
- package/chunk/{ZrBrCzQX.js → B4WG1mhs.js} +6 -7
- package/chunk/{CjqvxJml.js → BG7YGUsx.js} +32 -32
- package/chunk/BYdIoY50.js +17 -0
- package/chunk/{Cc_-i0o_.js → BZ3igxQN.js} +6 -7
- package/chunk/{uEGHykhe.js → BZ9g7J4R.js} +1 -1
- package/chunk/BsUZRQDT.js +23 -0
- package/chunk/{CBgu99gQ.js → C5X4hOkx.js} +130 -130
- package/chunk/{B0n0iRhF.js → CCKr5jj1.js} +1 -1
- package/chunk/{CNcLypMY.js → CQvM33Vg.js} +190 -189
- package/chunk/CXPOj2uy.js +19 -0
- package/chunk/{DAAff-FT.js → ClM74To2.js} +9 -10
- package/chunk/{RS6OAxzv.js → D-ap9qEk.js} +2 -2
- package/chunk/{Cwm8LL5p.js → D73Vr7fa.js} +7197 -7202
- package/chunk/{tpmioyz1.js → DEiyXzBZ.js} +28 -28
- package/chunk/{CplLA01W.js → DEuVgCzp.js} +45 -52
- package/chunk/{BPQXH_5i.js → DYspELhF.js} +43 -43
- package/chunk/DxYoPlum.js +50 -0
- package/chunk/{BpYX5PN4.js → NPajzdOv.js} +2 -2
- package/chunk/{BBkdXHrJ.js → rT6qmv-Y.js} +1 -1
- package/chunk/{BhBEMwvI.js → uKZyjtff.js} +20 -21
- package/chunk/{BC5fEyWK.js → yLRv5RIK.js} +61 -61
- package/chunk/{C_4I3haT.js → yhU2zeeu.js} +96 -96
- package/collapse/Collapse.js +4 -4
- package/collapse/Item.js +4 -4
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +22 -22
- package/color-picker/InputAlpha.js +1 -1
- package/color-picker/InputHex.js +1 -1
- package/color-picker/InputRgb.js +1 -1
- package/color-picker/Palette.js +1 -1
- package/color-picker/Panel.js +4 -4
- package/color-picker/index.js +3 -3
- package/comment/index.js +18 -18
- package/config-provider/ConfigProvider.js +2 -2
- package/config-provider/context.js +2 -2
- package/config-provider/index.js +2 -2
- package/copy/index.js +23 -23
- package/date-picker/Picker.js +41 -41
- package/date-picker/PickerRange.js +3 -3
- package/date-picker/index.js +1 -1
- package/descriptions/index.js +28 -28
- package/divider/index.js +15 -15
- package/draggable/Item.js +11 -11
- package/draggable/index.js +15 -15
- package/drawer/Drawer.js +31 -31
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +22 -22
- package/empty/index.js +2 -2
- package/form/Control.js +46 -46
- package/form/Form.js +12 -12
- package/form/FormItem.js +12 -12
- package/form/FormLabel.js +11 -11
- package/form/context.js +7 -6
- package/form/promisify.js +9 -10
- package/form/store.js +1 -1
- package/form/util.js +1 -1
- package/grid/Col.js +38 -38
- package/grid/Row.js +15 -15
- package/grid/grid-item.js +17 -17
- package/grid/grid.js +28 -28
- package/hooks/index.js +6 -6
- package/hooks/useInView.js +1 -1
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useKeyboardEvent.js +1 -1
- package/hooks/useMergeValue.js +1 -1
- package/hooks/useOverrideRef.js +1 -1
- package/hooks/usePrefersColorSchemeDark.js +1 -1
- package/hooks/useVerificationCode.js +30 -30
- package/icon/index.js +20 -16
- package/icon-hover/index.js +2 -2
- package/image/Image.js +22 -22
- package/image/ImageFooter.js +2 -2
- package/image/ImagePreview.js +11 -11
- package/image/ImagePreviewArrow.js +16 -16
- package/image/ImagePreviewGroup.js +2 -2
- package/image/ImagePreviewToolbar.js +7 -7
- package/image/TriggerForToolbar.js +7 -7
- package/image/index.js +1 -1
- package/index.js +539 -572
- package/input/Group.js +10 -10
- package/input/Input.js +213 -214
- package/input/InputElement.js +10 -11
- package/input/Password.js +4 -4
- package/input/Search.js +3 -3
- package/input/Textarea.js +7 -8
- package/input/useComposition.js +6 -6
- package/input-number/index.js +3 -3
- package/input-tag/InputTag.js +110 -111
- package/layout/Content.js +4 -4
- package/layout/Footer.js +6 -6
- package/layout/Header.js +8 -8
- package/layout/Sider.js +29 -29
- package/layout/index.js +16 -16
- package/link/index.js +27 -27
- package/list/Item.js +5 -5
- package/list/Meta.js +11 -11
- package/list/index.js +4 -4
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/mentions/index.js +5 -5
- package/menu/Item.js +11 -11
- package/menu/ItemGroup.js +8 -8
- package/menu/Menu.js +5 -5
- package/menu/OverflowWrap.js +2 -2
- package/menu/index.js +2 -2
- package/message/index.js +3 -3
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +7 -7
- package/modal/index.js +1 -1
- package/notice/index.js +9 -8
- package/notification/index.js +3 -3
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +6 -6
- package/overflow-ellipsis/index.js +27 -27
- package/package.json +1 -1
- package/page-header/index.js +3 -3
- package/pagination/PageItem.js +7 -7
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +3 -3
- package/pagination/Pagination.js +4 -4
- package/pagination/index.js +1 -1
- package/picker/Input.js +7 -7
- package/picker/InputRange.js +77 -77
- package/popconfirm/index.js +11 -11
- package/popover/index.js +21 -21
- package/progress/CircleProgress.js +14 -14
- package/progress/LineProgess.js +14 -14
- package/progress/StepProgress.js +9 -9
- package/progress/index.js +26 -26
- package/radio/Group.js +4 -4
- package/radio/GroupBlock.js +3 -3
- package/radio/Radio.js +4 -4
- package/radio/index.js +2 -2
- package/rate/index.js +16 -16
- package/resize-box/ResizeTrigger.js +27 -28
- package/resize-box/Split.js +21 -21
- package/resize-box/SplitGroup.js +40 -40
- package/resize-box/index.js +23 -23
- package/result/index.js +29 -29
- package/select/Option.js +2 -2
- package/select/Select.js +11 -12
- package/select/index.js +2 -2
- package/select/util.js +5 -5
- package/select-view/Core.js +104 -106
- package/select-view/index.js +22 -23
- package/skeleton/Image.js +14 -14
- package/skeleton/Text.js +16 -16
- package/skeleton/index.js +11 -11
- package/slider/Button.js +4 -4
- package/slider/Dot.js +9 -9
- package/slider/Input.js +20 -20
- package/slider/Tick.js +14 -14
- package/slider/index.js +103 -103
- package/slider/util.js +3 -3
- package/space/index.js +14 -14
- package/speech-synthesis/index.js +26 -28
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +16 -16
- package/statistic/Countdown.js +17 -17
- package/statistic/index.js +40 -40
- package/steps/Step.js +8 -8
- package/steps/index.js +17 -17
- package/switch/index.js +32 -33
- package/table/Table.js +5 -5
- package/table/index.js +1 -1
- package/tabs/Tab.js +4 -4
- package/tabs/TabContent.js +3 -3
- package/tabs/TabPane.js +11 -11
- package/tabs/index.js +2 -2
- package/tabs/util.js +1 -1
- package/tag/index.js +16 -16
- package/time-picker/Picker.js +50 -50
- package/time-picker/TimeColumn.js +8 -8
- package/time-picker/TimePicker.js +32 -32
- package/time-picker/util.js +5 -5
- package/timeline/Item.js +15 -15
- package/timeline/Timeline.js +24 -24
- package/tooltip/index.js +23 -23
- package/transfer/Item.js +4 -4
- package/transfer/List.js +4 -4
- package/transfer/index.js +4 -4
- package/tree/Animation.js +3 -3
- package/tree/Node.js +3 -3
- package/tree/NodeList.js +2 -2
- package/tree/Tree.js +4 -4
- package/tree/index.js +1 -1
- package/tree-select/List.js +2 -2
- package/tree-select/Select.js +8 -9
- package/tree-select/index.js +2 -2
- package/trigger/getPopupStyle.js +18 -19
- package/trigger/index.js +32 -33
- package/types/button/index.d.ts +2 -2
- package/types/color-picker/colors.d.ts +1 -1
- package/types/date-picker/util.d.ts +1 -1
- package/types/icon/index.d.ts +3 -1
- package/types/index.d.ts +1 -1
- package/types/menu/context.d.ts +1 -1
- package/typography/Base.js +33 -35
- package/typography/EditContent.js +16 -16
- package/typography/Ellipsis.js +25 -26
- package/typography/Operations.js +1 -1
- package/typography/Paragraph.js +8 -8
- package/typography/Typography.js +7 -7
- package/typography/index.js +1 -1
- package/upload/TriggerNode.js +8 -8
- package/upload/Upload.js +64 -65
- package/upload/Uploader.js +12 -12
- package/upload/request.js +13 -12
- package/upload/request_.js +5 -6
- package/utils/PqbCSSTransition.js +1 -1
- package/utils/caseName.js +4 -3
- package/utils/className.js +4 -3
- package/utils/constant.js +3 -3
- package/utils/contextHolder.js +1 -1
- package/utils/copy.js +5 -4
- package/utils/fileToURL.js +4 -3
- package/utils/index.js +262 -299
- package/utils/is.js +78 -115
- package/utils/keyboardCode.js +4 -26
- package/utils/math.js +10 -32
- package/utils/react19Adapter.js +1 -1
- package/utils/reactDOM.js +1 -1
- package/utils/saveAs.js +4 -3
- package/utils/screenfull.js +4 -3
- package/utils/scrollIntoView.js +1 -1
- package/utils/setDarkTheme.js +1 -1
- package/utils/tree.js +7 -83
- package/utils/tween.js +1 -1
- package/utils/validate.js +1 -1
- package/verification-code/VerificationCode.js +25 -25
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +1 -1
- package/watermark/Watermark.js +8 -8
- package/chunk/ATwvJ8j2.js +0 -6
- package/chunk/BFmckYou.js +0 -25
- package/chunk/Bl7BnD1R.js +0 -119
- package/chunk/Bmvhjhzq.js +0 -24
- package/chunk/BrOW642m.js +0 -130
- package/chunk/C0pRaDCf.js +0 -96
- package/chunk/CBzE-PUr.js +0 -23
- package/chunk/CUFsOxJ2.js +0 -10
- package/chunk/Ce1j9KTi.js +0 -6
- package/chunk/D0Dlbc2g.js +0 -41
- package/chunk/DRTWRsgI.js +0 -34
- package/chunk/DeV0v__J.js +0 -20
- package/chunk/DohlrJ4S.js +0 -50
- package/chunk/XTEsYGuF.js +0 -17
- package/chunk/yl4BU7Sd.js +0 -1068
package/tree-select/Select.js
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "
|
|
2
|
+
import "@unicom-cloud/utils/is";
|
|
3
3
|
import "lodash/debounce";
|
|
4
4
|
import "lodash/isArray";
|
|
5
5
|
import "lodash/isFunction";
|
|
6
6
|
import "lodash/isNil";
|
|
7
7
|
import "react";
|
|
8
|
-
import "../chunk/
|
|
8
|
+
import "../chunk/CQvM33Vg.js";
|
|
9
9
|
import "../chunk/B4YRLi8r.js";
|
|
10
10
|
import "../chunk/oopARUrq.js";
|
|
11
11
|
import "../chunk/BFTV6myl.js";
|
|
12
|
-
import "../chunk/
|
|
12
|
+
import "../chunk/CXPOj2uy.js";
|
|
13
13
|
import "../select-view/index.js";
|
|
14
|
-
import { v as
|
|
14
|
+
import { v as h, t as j } from "../chunk/D73Vr7fa.js";
|
|
15
15
|
import "../tree/util.js";
|
|
16
16
|
import "../trigger/index.js";
|
|
17
|
-
import "
|
|
18
|
-
import "../chunk/
|
|
17
|
+
import "@unicom-cloud/utils/class-name";
|
|
18
|
+
import "../chunk/ClM74To2.js";
|
|
19
19
|
import "./interface.js";
|
|
20
20
|
import "./util.js";
|
|
21
|
-
import "lodash/isPlainObject.js";
|
|
22
21
|
export {
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
h as TreeSelectTreeNode,
|
|
23
|
+
j as default
|
|
25
24
|
};
|
package/tree-select/index.js
CHANGED
package/trigger/getPopupStyle.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { isServerRendering as C } from "../utils/dom.js";
|
|
2
|
-
import "../chunk/
|
|
3
|
-
import "
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const { position: i } = o, { width: c, height: p, left: g, right: m, top: M, bottom: N } = n.getBoundingClientRect(), t = o.boundaryDistance || {}, k = "left" in t && t.left || L, r = "top" in t && t.top || L;
|
|
2
|
+
import "../chunk/ClM74To2.js";
|
|
3
|
+
import { isArray as X } from "@unicom-cloud/utils/is";
|
|
4
|
+
const A = 0, v = (n, o) => {
|
|
5
|
+
const { position: i } = o, { width: c, height: p, left: g, right: m, top: M, bottom: N } = n.getBoundingClientRect(), t = o.boundaryDistance || {}, k = "left" in t && t.left || A, r = "top" in t && t.top || A;
|
|
7
6
|
let l, f, s, h;
|
|
8
7
|
return ["bottom", "bl", "br"].indexOf(i) > -1 ? (s = M, h = N) : (s = M - r, h = N - r), ["right", "rt", "rb"].indexOf(i) > -1 ? (l = g, f = m) : (l = g - k, f = m - k), {
|
|
9
8
|
width: c,
|
|
@@ -61,12 +60,12 @@ const x = function(n, o, i) {
|
|
|
61
60
|
};
|
|
62
61
|
}, j = (n) => {
|
|
63
62
|
var m, M;
|
|
64
|
-
const o = n || {}, i = "left" in o ? o.left : "right" in o ? o.right :
|
|
63
|
+
const o = n || {}, i = "left" in o ? o.left : "right" in o ? o.right : A, c = "top" in o ? o.top : "bottom" in o ? o.bottom : A, p = (((m = document.documentElement) == null ? void 0 : m.clientHeight) || window.innerHeight) - (c || A), g = (((M = document.documentElement) == null ? void 0 : M.clientWidth) || window.innerWidth) - (i || A);
|
|
65
64
|
return {
|
|
66
65
|
windowHeight: p,
|
|
67
66
|
windowWidth: g
|
|
68
67
|
};
|
|
69
|
-
},
|
|
68
|
+
}, K = (n, o, i, c, p) => {
|
|
70
69
|
const {
|
|
71
70
|
autoAlignPopupWidth: g,
|
|
72
71
|
autoAlignPopupMinWidth: m,
|
|
@@ -86,7 +85,7 @@ const x = function(n, o, i) {
|
|
|
86
85
|
boundaryDistance: k,
|
|
87
86
|
position: n.position
|
|
88
87
|
}
|
|
89
|
-
), P = $(n.popupAlign, n.showArrow),
|
|
88
|
+
), P = $(n.popupAlign, n.showArrow), z = P.left || 0, H = P.right || 0, R = P.top || 0, B = P.bottom || 0;
|
|
90
89
|
g && (N == null ? void 0 : N.width) === void 0 && (o.style.width = `${i.offsetWidth}px`), m && (o.style.minWidth = `${i.offsetWidth}px`);
|
|
91
90
|
const e = I(o);
|
|
92
91
|
let d = n.position;
|
|
@@ -94,7 +93,7 @@ const x = function(n, o, i) {
|
|
|
94
93
|
if (!n.autoFitPosition)
|
|
95
94
|
return;
|
|
96
95
|
const { windowHeight: D, windowWidth: O } = j(k);
|
|
97
|
-
let
|
|
96
|
+
let L = !1;
|
|
98
97
|
const a = {
|
|
99
98
|
left: l - r.left,
|
|
100
99
|
top: f - r.top
|
|
@@ -120,22 +119,22 @@ const x = function(n, o, i) {
|
|
|
120
119
|
))), W === "top" && a.top > E && (r.top < D - r.bottom ? (t.top = Math.min(
|
|
121
120
|
f + h + (R || 0),
|
|
122
121
|
a.top + D - e.height
|
|
123
|
-
),
|
|
122
|
+
), L = !0) : t.top = a.top), W === "bottom" && E - a.top + e.height > D && (D - r.bottom < r.top ? (t.top = Math.max(
|
|
124
123
|
f - e.height - (B || 0),
|
|
125
124
|
a.top
|
|
126
|
-
),
|
|
125
|
+
), L = !0) : t.top = a.top + D - e.height), W === "left" && a.left > _ && (r.left < O - r.right ? (t.left = Math.min(
|
|
127
126
|
s + l + H,
|
|
128
127
|
a.left + O - e.width
|
|
129
|
-
),
|
|
130
|
-
l - e.width -
|
|
128
|
+
), L = !0) : t.left = a.left), W === "right" && _ - a.left + e.width > O && (O - r.right < r.left ? (t.left = Math.max(
|
|
129
|
+
l - e.width - z,
|
|
131
130
|
a.left
|
|
132
|
-
),
|
|
131
|
+
), L = !0) : t.left = a.left + O - e.width), t.left < 0)
|
|
133
132
|
t.left = 0;
|
|
134
133
|
else {
|
|
135
134
|
const V = c.scrollWidth - e.width;
|
|
136
135
|
t.left = Math.min(V, t.left);
|
|
137
136
|
}
|
|
138
|
-
return
|
|
137
|
+
return L;
|
|
139
138
|
}, T = P.horizontalOffset || 0, S = P.verticalOffset || 0;
|
|
140
139
|
let w = l - Number(t.left) + s / 2, y = f - Number(t.top) + h / 2;
|
|
141
140
|
switch (n.position) {
|
|
@@ -160,14 +159,14 @@ const x = function(n, o, i) {
|
|
|
160
159
|
t.top = h + f + B, t.left = l + s - e.width, u("bottom") && (d = "tr"), t.left += T, w = l - Number(t.left) + Math.max(s / 2, s - 50), b.left = x(12, e.width - 12, w);
|
|
161
160
|
break;
|
|
162
161
|
case "left": {
|
|
163
|
-
t.top = f + h / 2 - e.height / 2, t.left = l - e.width -
|
|
162
|
+
t.top = f + h / 2 - e.height / 2, t.left = l - e.width - z, u("left") && (d = "right"), t.top += S, y = f - Number(t.top) + h / 2, b.top = x(12, e.height - 12, y);
|
|
164
163
|
break;
|
|
165
164
|
}
|
|
166
165
|
case "lt":
|
|
167
|
-
t.top = f, t.left = l - e.width -
|
|
166
|
+
t.top = f, t.left = l - e.width - z, u("left") && (d = "rt"), t.top += S, y = f - Number(t.top) + Math.min(h / 2, 50), b.top = x(12, e.height - 12, y);
|
|
168
167
|
break;
|
|
169
168
|
case "lb":
|
|
170
|
-
t.top = f + h - e.height, t.left = l - e.width -
|
|
169
|
+
t.top = f + h - e.height, t.left = l - e.width - z, u("left") && (d = "rb"), t.top += S, y = f - Number(t.top) + Math.max(h / 2, h - 50), b.top = x(12, e.height - 12, y);
|
|
171
170
|
break;
|
|
172
171
|
case "right": {
|
|
173
172
|
t.top = f + h / 2 - e.height / 2, t.left = s + l + H, u("right") && (d = "left"), t.top += S, y = f - Number(t.top) + h / 2, b.top = x(12, e.height - 12, y);
|
|
@@ -187,6 +186,6 @@ const x = function(n, o, i) {
|
|
|
187
186
|
};
|
|
188
187
|
};
|
|
189
188
|
export {
|
|
190
|
-
|
|
189
|
+
K as default,
|
|
191
190
|
v as getBoundingClientRect
|
|
192
191
|
};
|
package/trigger/index.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { jsx as D, jsxs as
|
|
1
|
+
import { jsx as D, jsxs as $e } from "react/jsx-runtime";
|
|
2
2
|
import { c as ut } from "../chunk/BJ9_azwQ.js";
|
|
3
3
|
import ct from "lodash/isArray";
|
|
4
4
|
import M from "lodash/isFunction";
|
|
5
5
|
import { forwardRef as lt, useContext as pt, useRef as R, useState as at, Children as He, useCallback as be, cloneElement as Ie, useImperativeHandle as ft, useLayoutEffect as dt, useEffect as g, Fragment as mt } from "react";
|
|
6
6
|
import { createPortal as gt } from "react-dom";
|
|
7
|
-
import { a as yt } from "../chunk/
|
|
8
|
-
import
|
|
7
|
+
import { a as yt } from "../chunk/CQvM33Vg.js";
|
|
8
|
+
import te from "@unicom-cloud/utils/class-name";
|
|
9
9
|
import { on as oe, off as ne, getScrollElements as Tt, isScrollElement as Ct, contains as Le } from "../utils/dom.js";
|
|
10
|
-
import { s as ht } from "../chunk/
|
|
11
|
-
import {
|
|
10
|
+
import { s as ht } from "../chunk/ClM74To2.js";
|
|
11
|
+
import { Esc as Be } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
12
12
|
import { m as Et } from "../chunk/DH7HTOV_.js";
|
|
13
13
|
import { a as Dt } from "../chunk/ClqoGc3r.js";
|
|
14
|
-
import { c as wt, f as Pt } from "../chunk/
|
|
14
|
+
import { c as wt, f as Pt } from "../chunk/BZ3igxQN.js";
|
|
15
15
|
import { r as re } from "../chunk/CIRG541s.js";
|
|
16
16
|
import Ve from "../utils/throttleByRaf.js";
|
|
17
17
|
import xt, { getBoundingClientRect as Mt } from "./getPopupStyle.js";
|
|
18
|
-
import "
|
|
19
|
-
import ie from "lodash/isPlainObject.js";
|
|
18
|
+
import { isPlainObject as ie } from "@unicom-cloud/utils/is";
|
|
20
19
|
function St(d, I) {
|
|
21
20
|
if (!d)
|
|
22
21
|
return {};
|
|
@@ -28,7 +27,7 @@ function St(d, I) {
|
|
|
28
27
|
right: Y
|
|
29
28
|
};
|
|
30
29
|
}
|
|
31
|
-
const
|
|
30
|
+
const jt = [
|
|
32
31
|
"onClick",
|
|
33
32
|
"onMouseEnter",
|
|
34
33
|
"onMouseLeave",
|
|
@@ -65,7 +64,7 @@ const vt = {
|
|
|
65
64
|
autoFitPosition: !0,
|
|
66
65
|
updateOnScroll: !0
|
|
67
66
|
};
|
|
68
|
-
function
|
|
67
|
+
function Nt(d, I) {
|
|
69
68
|
var Se, Oe;
|
|
70
69
|
const y = pt(yt), { getPrefixCls: S, zIndex: T, rtl: Y } = y, i = l(d), {
|
|
71
70
|
children: se,
|
|
@@ -109,7 +108,7 @@ function $t(d, I) {
|
|
|
109
108
|
// 保存当前节点到弹出容器间的所有滚动元素
|
|
110
109
|
delayTimeoutID: -1,
|
|
111
110
|
updatePositionTimeoutID: -1
|
|
112
|
-
}), [X,
|
|
111
|
+
}), [X, N] = at({ popupVisible: !1, popupStyle: {} }), U = i.popupVisible, Ye = X.popupVisible, u = U ?? Ye, c = {}, j = {
|
|
113
112
|
onMouseDown() {
|
|
114
113
|
n.current.hasPopupMouseDown = !0, setTimeout(() => {
|
|
115
114
|
n.current.hasPopupMouseDown = !1;
|
|
@@ -119,11 +118,11 @@ function $t(d, I) {
|
|
|
119
118
|
V() && !O ? (c.onMouseEnter = qe, c.onMouseLeave = Ee, J() && (c.onClick = De), Ae && (c.onMouseMove = Ge), We() || (j.onMouseEnter = Je, j.onMouseLeave = Ze)) : (c.onMouseEnter = P("onMouseEnter"), c.onMouseLeave = P("onMouseLeave")), me() && !O ? (c.onContextMenu = et, c.onClick = De) : c.onContextMenu = P("onContextMenu"), de() && !O ? c.onClick = tt : c.onClick = c.onClick || P("onClick"), G() && !O ? (c.onFocus = ot, ge() && (c.onBlur = nt)) : (c.onFocus = P("onFocus"), c.onBlur = P("onBlur")), O ? c.onKeyDown = P("onKeyDown") : c.onKeyDown = Ue;
|
|
120
119
|
const L = z(), B = He.only(ue());
|
|
121
120
|
L.props.className && (c.className = L.props.className), h && u && (c.className = c.className ? `${c.className} ${h}-open` : `${h}-open`), G() && (c.tabIndex = O ? -1 : 0);
|
|
122
|
-
const
|
|
123
|
-
|
|
121
|
+
const $ = S("trigger"), Ke = te(
|
|
122
|
+
$,
|
|
124
123
|
h,
|
|
125
|
-
`${
|
|
126
|
-
{ [`${
|
|
124
|
+
`${$}-position-${ze}`,
|
|
125
|
+
{ [`${$}-rtl`]: Y },
|
|
127
126
|
ke
|
|
128
127
|
);
|
|
129
128
|
function l(e) {
|
|
@@ -213,9 +212,9 @@ function $t(d, I) {
|
|
|
213
212
|
transformOrigin: x[e]
|
|
214
213
|
};
|
|
215
214
|
if (r === "slideDynamicOrigin") {
|
|
216
|
-
let
|
|
217
|
-
return ["top", "tl", "tr"].indexOf(e) > -1 && (
|
|
218
|
-
transformOrigin:
|
|
215
|
+
let Ne = "0% 0%";
|
|
216
|
+
return ["top", "tl", "tr"].indexOf(e) > -1 && (Ne = "100% 100%"), {
|
|
217
|
+
transformOrigin: Ne
|
|
219
218
|
};
|
|
220
219
|
}
|
|
221
220
|
return {};
|
|
@@ -259,7 +258,7 @@ function $t(d, I) {
|
|
|
259
258
|
}
|
|
260
259
|
function E(e) {
|
|
261
260
|
const t = Z();
|
|
262
|
-
|
|
261
|
+
N((o) => {
|
|
263
262
|
const r = { ...o };
|
|
264
263
|
return r.popupStyle = t, r;
|
|
265
264
|
}), M(e) && setTimeout(() => {
|
|
@@ -277,7 +276,7 @@ function $t(d, I) {
|
|
|
277
276
|
}
|
|
278
277
|
n.current.updatePositionTimeoutID = setTimeout(() => {
|
|
279
278
|
const o = Z();
|
|
280
|
-
|
|
279
|
+
N((r) => {
|
|
281
280
|
const s = { ...r };
|
|
282
281
|
return s.popupStyle = o, s;
|
|
283
282
|
}), M(t) && setTimeout(() => {
|
|
@@ -290,7 +289,7 @@ function $t(d, I) {
|
|
|
290
289
|
const r = l(["onVisibleChange", "popupVisible"]);
|
|
291
290
|
e !== u ? Ce(t, () => {
|
|
292
291
|
var s;
|
|
293
|
-
(s = r.onVisibleChange) == null || s.call(r, e), "popupVisible" in r ? o == null || o() : (
|
|
292
|
+
(s = r.onVisibleChange) == null || s.call(r, e), "popupVisible" in r ? o == null || o() : (N((p) => {
|
|
294
293
|
const x = { ...p };
|
|
295
294
|
return x.popupVisible = !!e, x;
|
|
296
295
|
}), setTimeout(e ? () => {
|
|
@@ -498,11 +497,11 @@ function $t(d, I) {
|
|
|
498
497
|
return u && (oe(o, "mousedown", he, r), oe(window, "resize", q)), () => {
|
|
499
498
|
ne(o, "mousedown", he, r), ne(window, "resize", q);
|
|
500
499
|
};
|
|
501
|
-
}, [u]), g(() => ("defaultPopupVisible" in i &&
|
|
500
|
+
}, [u]), g(() => ("defaultPopupVisible" in i && N((e) => {
|
|
502
501
|
const t = { ...e };
|
|
503
502
|
return t.popupVisible = !!(i != null && i.defaultPopupVisible), t;
|
|
504
503
|
}), () => {
|
|
505
|
-
}), []), g(() => ("popupVisible" in i &&
|
|
504
|
+
}), []), g(() => ("popupVisible" in i && N((e) => {
|
|
506
505
|
const t = { ...e };
|
|
507
506
|
return t.popupVisible = !!U, t;
|
|
508
507
|
}), () => {
|
|
@@ -542,13 +541,13 @@ function $t(d, I) {
|
|
|
542
541
|
},
|
|
543
542
|
onExited: () => {
|
|
544
543
|
const e = a.current;
|
|
545
|
-
e && (e.style.display = "none", ce && (n.current.triggerDestoried = !0),
|
|
544
|
+
e && (e.style.display = "none", ce && (n.current.triggerDestoried = !0), N((t) => {
|
|
546
545
|
const o = { ...t };
|
|
547
546
|
return o.popupStyle = {}, o;
|
|
548
547
|
}), W == null || W(e));
|
|
549
548
|
},
|
|
550
549
|
nodeRef: a,
|
|
551
|
-
children: /* @__PURE__ */
|
|
550
|
+
children: /* @__PURE__ */ $e(
|
|
552
551
|
"span",
|
|
553
552
|
{
|
|
554
553
|
ref: a,
|
|
@@ -577,7 +576,7 @@ function $t(d, I) {
|
|
|
577
576
|
"div",
|
|
578
577
|
{
|
|
579
578
|
ref: ae,
|
|
580
|
-
className: te(`${
|
|
579
|
+
className: te(`${$}-arrow-container`, {
|
|
581
580
|
[`${h}-arrow-container`]: h
|
|
582
581
|
}),
|
|
583
582
|
children: /* @__PURE__ */ D(
|
|
@@ -586,7 +585,7 @@ function $t(d, I) {
|
|
|
586
585
|
ref: fe,
|
|
587
586
|
...C,
|
|
588
587
|
className: te(
|
|
589
|
-
`${
|
|
588
|
+
`${$}-arrow`,
|
|
590
589
|
{
|
|
591
590
|
[`${h}-arrow`]: h
|
|
592
591
|
},
|
|
@@ -608,20 +607,20 @@ function $t(d, I) {
|
|
|
608
607
|
if (M(e)) {
|
|
609
608
|
const t = e(H());
|
|
610
609
|
t && (_ = gt(
|
|
611
|
-
/* @__PURE__ */ D("div", { ref: v, className: `${
|
|
610
|
+
/* @__PURE__ */ D("div", { ref: v, className: `${$}-container`, children: st }),
|
|
612
611
|
t
|
|
613
612
|
// popupVisible ? 1 : 0,
|
|
614
613
|
));
|
|
615
614
|
}
|
|
616
615
|
}
|
|
617
|
-
return pe && (_ = /* @__PURE__ */
|
|
616
|
+
return pe && (_ = /* @__PURE__ */ $e(mt, { children: [
|
|
618
617
|
it,
|
|
619
618
|
_
|
|
620
619
|
] })), _;
|
|
621
620
|
}
|
|
622
|
-
const
|
|
623
|
-
|
|
621
|
+
const $t = lt(Nt);
|
|
622
|
+
$t.displayName = "Trigger";
|
|
624
623
|
export {
|
|
625
|
-
|
|
626
|
-
|
|
624
|
+
jt as EventsByTriggerNeed,
|
|
625
|
+
$t as default
|
|
627
626
|
};
|
package/types/button/index.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import Group from './Group';
|
|
|
3
3
|
import type { ButtonProps } from './interface';
|
|
4
4
|
declare const ForwardRefButton: React.ForwardRefExoticComponent<Partial<{
|
|
5
5
|
htmlType?: "button" | "submit" | "reset";
|
|
6
|
-
} & import("./interface").BaseButtonProps & Omit<React.ButtonHTMLAttributes<any>, "className" | "
|
|
6
|
+
} & import("./interface").BaseButtonProps & Omit<React.ButtonHTMLAttributes<any>, "className" | "onClick" | "type"> & {
|
|
7
7
|
href: string;
|
|
8
8
|
target?: string;
|
|
9
9
|
anchorProps?: React.HTMLProps<HTMLAnchorElement>;
|
|
10
|
-
} & Omit<React.AnchorHTMLAttributes<any>, "className" | "
|
|
10
|
+
} & Omit<React.AnchorHTMLAttributes<any>, "className" | "onClick" | "type">> & React.RefAttributes<unknown>>;
|
|
11
11
|
declare const ButtonComponent: typeof ForwardRefButton & {
|
|
12
12
|
__PQB_BUTTON: boolean;
|
|
13
13
|
Group: typeof Group;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const colors: FlatArray<string[], 0 | 1 |
|
|
1
|
+
export declare const colors: FlatArray<string[], 0 | 1 | -1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20>[];
|
|
2
2
|
export default colors;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
|
2
2
|
export declare function isTimeArrayChange(prevTime: Dayjs[], nextTime: Dayjs[]): boolean;
|
|
3
|
-
export declare function getAvailableDayjsLength(value: any):
|
|
3
|
+
export declare function getAvailableDayjsLength(value: any): 1 | 0 | 2;
|
|
4
4
|
export declare function isDisabledDate(cellDate: any, disabledDate: any, mode: any): boolean;
|
|
5
5
|
type WeekStartType = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
6
6
|
export declare function getDefaultWeekStart(dayjsLocale: string): WeekStartType;
|
package/types/icon/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import IconContext from '@unicom-cloud/icons/context';
|
|
2
|
+
import useIconProps from '@unicom-cloud/icons/useProps';
|
|
1
3
|
import React, { CSSProperties, SVGAttributes } from 'react';
|
|
2
4
|
import addFromIconFontCn from './addFromIconFontCn';
|
|
3
5
|
export interface IconProps extends Omit<SVGAttributes<SVGElement>, 'className'> {
|
|
@@ -15,5 +17,5 @@ export interface CustomIconComponentProps {
|
|
|
15
17
|
viewBox?: string;
|
|
16
18
|
}
|
|
17
19
|
declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<unknown>>;
|
|
18
|
-
export { addFromIconFontCn };
|
|
20
|
+
export { addFromIconFontCn, IconContext, useIconProps };
|
|
19
21
|
export default Icon;
|
package/types/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export { default as Dropdown, DropdownButton } from './dropdown';
|
|
|
26
26
|
export { default as Empty } from './empty';
|
|
27
27
|
export { default as Form, FormControl, FormItem, FormList, FormProvider, useForm, useFormContext, useFormState, useWatch, } from './form';
|
|
28
28
|
export { Col, default as Grid, GridItem, Row } from './grid';
|
|
29
|
-
export { addFromIconFontCn, default as Icon } from './icon';
|
|
29
|
+
export { addFromIconFontCn, default as Icon, IconContext, useIconProps, } from './icon';
|
|
30
30
|
export { default as Image, ImagePreview, ImagePreviewGroup } from './image';
|
|
31
31
|
export { default as Input, InputGroup, InputPassword, InputSearch, InputTextArea, TextArea, } from './input';
|
|
32
32
|
export { default as InputNumber } from './input-number';
|
package/types/menu/context.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type HotkeyInfo = {
|
|
|
5
5
|
type: 'sibling' | 'generation' | 'enter';
|
|
6
6
|
};
|
|
7
7
|
export type ResetHotkeyInfo = (activeKey?: string) => void;
|
|
8
|
-
declare const MenuContext: import("react").Context<Pick<MenuProps, "
|
|
8
|
+
declare const MenuContext: import("react").Context<Pick<MenuProps, "collapse" | "icons" | "mode" | "triggerProps" | "inDropdown" | "tooltipProps" | "theme" | "levelIndent" | "selectedKeys" | "openKeys" | "autoScrollIntoView" | "scrollConfig"> & {
|
|
9
9
|
id?: string;
|
|
10
10
|
prefixCls?: string;
|
|
11
11
|
onClickMenuItem?: (key: string, e: any) => void;
|
package/typography/Base.js
CHANGED
|
@@ -1,51 +1,49 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a, jsxs as ie, Fragment as re } from "react/jsx-runtime";
|
|
2
2
|
import le from "lodash/merge";
|
|
3
|
-
import R, { forwardRef as
|
|
4
|
-
import { a as de } from "../chunk/
|
|
5
|
-
import { u as fe } from "../chunk/
|
|
3
|
+
import R, { forwardRef as ae, useContext as ce, useRef as W, useState as q, useEffect as pe, useImperativeHandle as me } from "react";
|
|
4
|
+
import { a as de } from "../chunk/CQvM33Vg.js";
|
|
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
|
|
10
|
-
import "../chunk/
|
|
9
|
+
import F from "@unicom-cloud/utils/class-name";
|
|
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
13
|
import { r as Ce } from "../chunk/CIRG541s.js";
|
|
14
14
|
import Te from "../utils/throttleByRaf.js";
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
15
|
+
import Ne from "./EditContent.js";
|
|
16
|
+
import Se from "./Operations.js";
|
|
17
|
+
import be from "./useCssEllipsis.js";
|
|
18
18
|
import we, { MEASURE_STATUS as O } from "./useEllipsis.js";
|
|
19
|
-
import "
|
|
20
|
-
import C from "lodash/isPlainObject.js";
|
|
21
|
-
import L from "lodash/isUndefined.js";
|
|
19
|
+
import { isPlainObject as C, isUndefined as L } from "@unicom-cloud/utils/is";
|
|
22
20
|
function $e(n, f) {
|
|
23
21
|
const {
|
|
24
|
-
type:
|
|
25
|
-
bold:
|
|
22
|
+
type: c,
|
|
23
|
+
bold: b,
|
|
26
24
|
disabled: T,
|
|
27
25
|
mark: u,
|
|
28
|
-
underline:
|
|
26
|
+
underline: N,
|
|
29
27
|
delete: p,
|
|
30
28
|
code: w
|
|
31
29
|
} = n, l = [], h = [];
|
|
32
|
-
return
|
|
30
|
+
return c && h.push(`${f}-${c}`), T && h.push(`${f}-disabled`), b && l.push("b"), N && l.push("u"), p && l.push("del"), w && l.push("code"), u && l.push("mark"), {
|
|
33
31
|
component: l,
|
|
34
32
|
className: h
|
|
35
33
|
};
|
|
36
34
|
}
|
|
37
35
|
function ke(n, f) {
|
|
38
36
|
const {
|
|
39
|
-
componentType:
|
|
40
|
-
style:
|
|
37
|
+
componentType: c,
|
|
38
|
+
style: b,
|
|
41
39
|
className: T,
|
|
42
40
|
children: u,
|
|
43
|
-
editable:
|
|
41
|
+
editable: N,
|
|
44
42
|
ellipsis: p,
|
|
45
43
|
heading: w,
|
|
46
44
|
blockquote: l,
|
|
47
45
|
...h
|
|
48
|
-
} = n, _ =
|
|
46
|
+
} = n, _ = ce(de), { getPrefixCls: V, rtl: A } = _, i = V("typography"), I = W(), { component: S, className: M } = $e(n, i), [H, U] = q(!1), [G, J] = q(0), $ = C(N) ? N : {}, K = "editing" in $ ? $.editing : H, e = p ? {
|
|
49
47
|
rows: 1,
|
|
50
48
|
ellipsisStr: "...",
|
|
51
49
|
cssEllipsis: !1,
|
|
@@ -53,7 +51,7 @@ function ke(n, f) {
|
|
|
53
51
|
} : {}, Q = e.wrapper || R.Fragment, [r, X] = fe(!1, {
|
|
54
52
|
defaultValue: e.defaultExpanded,
|
|
55
53
|
value: e.expanded
|
|
56
|
-
}), { simpleEllipsis: k, ellipsisStyle: Y } =
|
|
54
|
+
}), { simpleEllipsis: k, ellipsisStyle: Y } = be(e), z = (t, o) => {
|
|
57
55
|
const s = L(e.ellipsisStr) ? "..." : e.ellipsisStr, d = !L(e.suffix) && e.suffix;
|
|
58
56
|
return /* @__PURE__ */ ie(Q, { children: [
|
|
59
57
|
t,
|
|
@@ -71,7 +69,7 @@ function ke(n, f) {
|
|
|
71
69
|
}), ee = Te((t) => {
|
|
72
70
|
const { contentRect: o } = t == null ? void 0 : t[0];
|
|
73
71
|
if (o) {
|
|
74
|
-
const s =
|
|
72
|
+
const s = S.includes("code") ? o.width - 18 : o.width;
|
|
75
73
|
[
|
|
76
74
|
O.NO_NEED_ELLIPSIS,
|
|
77
75
|
O.MEASURE_END
|
|
@@ -85,8 +83,8 @@ function ke(n, f) {
|
|
|
85
83
|
};
|
|
86
84
|
}, [j.current]);
|
|
87
85
|
function te(t) {
|
|
88
|
-
return /* @__PURE__ */
|
|
89
|
-
|
|
86
|
+
return /* @__PURE__ */ a(re, { children: /* @__PURE__ */ a(
|
|
87
|
+
Se,
|
|
90
88
|
{
|
|
91
89
|
...n,
|
|
92
90
|
setEditing: U,
|
|
@@ -117,12 +115,12 @@ function ke(n, f) {
|
|
|
117
115
|
}), g;
|
|
118
116
|
}
|
|
119
117
|
let E;
|
|
120
|
-
|
|
118
|
+
c === "Paragraph" ? E = l ? "blockquote" : "div" : c === "Title" ? E = `h${w}` : c === "Text" && (E = p ? "div" : "span");
|
|
121
119
|
function se() {
|
|
122
120
|
const t = ge(R.Children.toArray(u)), o = e.showTooltip, s = C(e.showTooltip) && e.showTooltip.type === "popover" ? "popover" : "tooltip", d = C(e.showTooltip) ? e.showTooltip.props || {} : {}, g = s === "popover" ? he : Ee, y = {
|
|
123
|
-
style:
|
|
121
|
+
style: b,
|
|
124
122
|
...m && !o && !r ? { title: t } : {}
|
|
125
|
-
}, v = m && o && !r, x = /* @__PURE__ */
|
|
123
|
+
}, v = m && o && !r, x = /* @__PURE__ */ a(
|
|
126
124
|
E,
|
|
127
125
|
{
|
|
128
126
|
ref: I,
|
|
@@ -153,21 +151,21 @@ function ke(n, f) {
|
|
|
153
151
|
children: k && D !== O.INIT && !r && m ? B(
|
|
154
152
|
// CSS folding style, need to wrap the text separately.
|
|
155
153
|
z(
|
|
156
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ a("span", { style: Y, children: u }),
|
|
157
155
|
m
|
|
158
156
|
),
|
|
159
|
-
|
|
157
|
+
S.length ? S : ["span"],
|
|
160
158
|
n,
|
|
161
159
|
// The simple-ellipsis class ensures that the ReactNode after the text is displayed correctly (no line breaks)
|
|
162
160
|
// Need to act on the immediate parent node of the text
|
|
163
161
|
{ className: `${i}-simple-ellipsis` }
|
|
164
|
-
) : B(Z,
|
|
162
|
+
) : B(Z, S, n)
|
|
165
163
|
}
|
|
166
164
|
);
|
|
167
|
-
return v ? /* @__PURE__ */
|
|
165
|
+
return v ? /* @__PURE__ */ a(g, { content: t, ...d, children: /* @__PURE__ */ a("span", { children: x }) }) : x;
|
|
168
166
|
}
|
|
169
|
-
return K ? /* @__PURE__ */
|
|
170
|
-
|
|
167
|
+
return K ? /* @__PURE__ */ a(
|
|
168
|
+
Ne,
|
|
171
169
|
{
|
|
172
170
|
ref: f,
|
|
173
171
|
...n,
|
|
@@ -184,7 +182,7 @@ function ke(n, f) {
|
|
|
184
182
|
}
|
|
185
183
|
) : se();
|
|
186
184
|
}
|
|
187
|
-
const
|
|
185
|
+
const He = ae(ke);
|
|
188
186
|
export {
|
|
189
|
-
|
|
187
|
+
He as default
|
|
190
188
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as g, useRef as x, useEffect as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { m as
|
|
6
|
-
function R(
|
|
7
|
-
const { prefixCls: o, children: f, setEditing: l, editableConfig: e, style: d } =
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g, useRef as x, useEffect as N } from "react";
|
|
3
|
+
import $ from "../input/Input.js";
|
|
4
|
+
import v from "@unicom-cloud/utils/class-name";
|
|
5
|
+
import { m as y } from "../chunk/B5RFT17G.js";
|
|
6
|
+
function R(s, i) {
|
|
7
|
+
const { prefixCls: o, children: f, setEditing: l, editableConfig: e, style: d } = s, p = v(
|
|
8
8
|
`${o}-typography`,
|
|
9
9
|
`${o}-edit-content`,
|
|
10
|
-
|
|
11
|
-
),
|
|
12
|
-
|
|
10
|
+
s.className
|
|
11
|
+
), c = y(f), t = x(null);
|
|
12
|
+
N(() => {
|
|
13
13
|
var n, r;
|
|
14
14
|
if (t.current && ((r = (n = t.current).focus) == null || r.call(n)), t.current && t.current.dom) {
|
|
15
|
-
const { length:
|
|
16
|
-
t.current.dom.setSelectionRange(
|
|
15
|
+
const { length: a } = t.current.dom.value;
|
|
16
|
+
t.current.dom.setSelectionRange(a, a);
|
|
17
17
|
}
|
|
18
18
|
}, []);
|
|
19
19
|
function u() {
|
|
20
20
|
var n;
|
|
21
|
-
l(!1), (n = e.onEnd) == null || n.call(e,
|
|
21
|
+
l(!1), (n = e.onEnd) == null || n.call(e, c);
|
|
22
22
|
}
|
|
23
23
|
function E(n) {
|
|
24
24
|
var r;
|
|
@@ -27,13 +27,13 @@ function R(c, i) {
|
|
|
27
27
|
function h() {
|
|
28
28
|
u();
|
|
29
29
|
}
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
|
|
30
|
+
return /* @__PURE__ */ m("div", { className: p, style: d, ref: i, children: /* @__PURE__ */ m(
|
|
31
|
+
$.TextArea,
|
|
32
32
|
{
|
|
33
33
|
className: `${o}-edit-content-textarea`,
|
|
34
34
|
onBlur: h,
|
|
35
35
|
ref: t,
|
|
36
|
-
value:
|
|
36
|
+
value: c,
|
|
37
37
|
autoSize: !0,
|
|
38
38
|
onChange: E,
|
|
39
39
|
onPressEnter: u
|