@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
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import g from "@unicom-cloud/icons/IconUiMore";
|
|
3
|
+
import n from "@unicom-cloud/utils/class-name";
|
|
4
|
+
import { TriggerForToolbar as F } from "../image/TriggerForToolbar.js";
|
|
5
|
+
function x(r) {
|
|
6
|
+
const { title: a, description: l, actions: t } = r, i = a || l, e = t && t.length;
|
|
7
|
+
return [i || e, i, e];
|
|
8
|
+
}
|
|
9
|
+
const j = (r) => {
|
|
10
|
+
const { style: a, className: l, title: t, description: i, actions: e, prefixCls: s, simple: m } = r, [$, N, d] = x({
|
|
11
|
+
title: t,
|
|
12
|
+
description: i,
|
|
13
|
+
actions: e
|
|
14
|
+
});
|
|
15
|
+
if (!$)
|
|
16
|
+
return null;
|
|
17
|
+
const c = `${s}-footer`, f = n(c, l, {
|
|
18
|
+
[`${c}-with-actions`]: d
|
|
19
|
+
}), u = () => {
|
|
20
|
+
const h = /* @__PURE__ */ o("div", { className: `${s}-actions-list`, children: e.map((v, w) => /* @__PURE__ */ o("div", { className: `${s}-actions-item`, children: v }, `${w}`)) });
|
|
21
|
+
return m ? /* @__PURE__ */ o("div", { className: `${s}-actions-list`, children: /* @__PURE__ */ o(F, { prefixCls: s, popup: () => h, children: /* @__PURE__ */ o(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
className: n(
|
|
25
|
+
`${s}-actions-item`,
|
|
26
|
+
`${s}-actions-item-trigger`
|
|
27
|
+
),
|
|
28
|
+
children: /* @__PURE__ */ o("span", { children: /* @__PURE__ */ o(g, {}) })
|
|
29
|
+
}
|
|
30
|
+
) }) }) : h;
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ p("div", { className: f, style: a, children: [
|
|
33
|
+
N && /* @__PURE__ */ p("div", { className: n(`${c}-block`, `${s}-caption`), children: [
|
|
34
|
+
t && /* @__PURE__ */ o("div", { className: `${s}-caption-title`, title: t, children: t }),
|
|
35
|
+
i && !m && /* @__PURE__ */ o(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: `${s}-caption-description`,
|
|
39
|
+
title: i,
|
|
40
|
+
children: i
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
] }),
|
|
44
|
+
d && /* @__PURE__ */ o("div", { className: n(`${c}-block`, `${s}-actions`), children: u() })
|
|
45
|
+
] });
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
j as I,
|
|
49
|
+
x as u
|
|
50
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { c as u } from "./BJ9_azwQ.js";
|
|
3
3
|
import { useRef as f, useMemo as s, isValidElement as a, cloneElement as l } from "react";
|
|
4
|
-
import { s as E } from "./
|
|
5
|
-
import { f as R, c as x } from "./
|
|
4
|
+
import { s as E } from "./ClM74To2.js";
|
|
5
|
+
import { f as R, c as x } from "./BZ3igxQN.js";
|
|
6
6
|
function O(r) {
|
|
7
7
|
const { children: e, ...i } = r, o = f(), t = f(), c = s(() => r.nodeRef === void 0 && E(e) && a(e) ? (t.current = !0, l(e, {
|
|
8
8
|
ref: (n) => {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import M from "lodash/
|
|
3
|
-
|
|
4
|
-
const a = (t) => (i) => Math.pow(i, t), n = (t) => (i) => 1 - Math.abs(Math.pow(i - 1, t)), r = (t) => (i) => i < 0.5 ? a(t)(i * 2) / 2 : n(t)(i * 2 - 1) / 2 + 0.5, q = (t) => t, y = a(2), b = n(2), g = r(2), F = a(3), P = n(3), k = r(3), w = a(4), T = n(4), v = r(4), A = a(5), D = n(5), S = r(5), U = (t) => 1 + Math.sin(Math.PI / 2 * t - Math.PI / 2), x = (t) => Math.sin(Math.PI / 2 * t), $ = (t) => (1 + Math.sin(Math.PI * t - Math.PI / 2)) / 2, u = (t) => t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? (t -= 1.5 / 2.75, 7.5625 * t * t + 0.75) : t < 2.5 / 2.75 ? (t -= 2.25 / 2.75, 7.5625 * t * t + 0.9375) : (t -= 2.625 / 2.75, 7.5625 * t * t + 0.984375), l = (t) => 1 - u(1 - t), B = (t) => t < 0.5 ? l(t * 2) * 0.5 : u(t * 2 - 1) * 0.5 + 0.5, d = {
|
|
1
|
+
import O from "lodash/isFunction";
|
|
2
|
+
import M from "lodash/isString";
|
|
3
|
+
const a = (t) => (i) => Math.pow(i, t), n = (t) => (i) => 1 - Math.abs(Math.pow(i - 1, t)), r = (t) => (i) => i < 0.5 ? a(t)(i * 2) / 2 : n(t)(i * 2 - 1) / 2 + 0.5, q = (t) => t, y = a(2), b = n(2), g = r(2), F = a(3), P = n(3), k = r(3), w = a(4), S = n(4), T = r(4), v = a(5), A = n(5), D = r(5), U = (t) => 1 + Math.sin(Math.PI / 2 * t - Math.PI / 2), x = (t) => Math.sin(Math.PI / 2 * t), B = (t) => (1 + Math.sin(Math.PI * t - Math.PI / 2)) / 2, u = (t) => t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? (t -= 1.5 / 2.75, 7.5625 * t * t + 0.75) : t < 2.5 / 2.75 ? (t -= 2.25 / 2.75, 7.5625 * t * t + 0.9375) : (t -= 2.625 / 2.75, 7.5625 * t * t + 0.984375), l = (t) => 1 - u(1 - t), $ = (t) => t < 0.5 ? l(t * 2) * 0.5 : u(t * 2 - 1) * 0.5 + 0.5, d = {
|
|
5
4
|
linear: q,
|
|
6
5
|
quadIn: y,
|
|
7
6
|
quadOut: b,
|
|
@@ -10,19 +9,19 @@ const a = (t) => (i) => Math.pow(i, t), n = (t) => (i) => 1 - Math.abs(Math.pow(
|
|
|
10
9
|
cubicOut: P,
|
|
11
10
|
cubicInOut: k,
|
|
12
11
|
quartIn: w,
|
|
13
|
-
quartOut:
|
|
14
|
-
quartInOut:
|
|
15
|
-
quintIn:
|
|
16
|
-
quintOut:
|
|
17
|
-
quintInOut:
|
|
12
|
+
quartOut: S,
|
|
13
|
+
quartInOut: T,
|
|
14
|
+
quintIn: v,
|
|
15
|
+
quintOut: A,
|
|
16
|
+
quintInOut: D,
|
|
18
17
|
sineIn: U,
|
|
19
18
|
sineOut: x,
|
|
20
|
-
sineInOut:
|
|
19
|
+
sineInOut: B,
|
|
21
20
|
bounceOut: u,
|
|
22
21
|
bounceIn: l,
|
|
23
|
-
bounceInOut:
|
|
22
|
+
bounceInOut: $
|
|
24
23
|
};
|
|
25
|
-
class
|
|
24
|
+
class C {
|
|
26
25
|
constructor(i) {
|
|
27
26
|
const {
|
|
28
27
|
from: e,
|
|
@@ -31,15 +30,15 @@ class E {
|
|
|
31
30
|
delay: c,
|
|
32
31
|
easing: o,
|
|
33
32
|
onStart: f,
|
|
34
|
-
onUpdate:
|
|
35
|
-
onFinish:
|
|
33
|
+
onUpdate: I,
|
|
34
|
+
onFinish: p
|
|
36
35
|
} = i;
|
|
37
36
|
for (let h in e)
|
|
38
37
|
s[h] === void 0 && (s[h] = e[h]);
|
|
39
38
|
for (let h in s)
|
|
40
39
|
e[h] === void 0 && (e[h] = s[h]);
|
|
41
|
-
this.from = e, this.to = s, this.duration = m || 500, this.delay = c || 0,
|
|
42
|
-
}, this.onFinish =
|
|
40
|
+
this.from = e, this.to = s, this.duration = m || 500, this.delay = c || 0, O(o) ? this.easing = o : M(o) && (this.easing = d[o]), this.easing || (this.easing = d.linear), this.onStart = f, this.onUpdate = I || function() {
|
|
41
|
+
}, this.onFinish = p, this.startTime = Date.now() + this.delay, this.started = !1, this.finished = !1, this.timer = null, this.keys = {};
|
|
43
42
|
}
|
|
44
43
|
update() {
|
|
45
44
|
var i, e;
|
|
@@ -66,9 +65,9 @@ class E {
|
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
67
|
export {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
C as I,
|
|
69
|
+
T as b,
|
|
70
|
+
D as f,
|
|
71
|
+
S as q,
|
|
72
|
+
d as x
|
|
74
73
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ht = Object.defineProperty;
|
|
2
2
|
var vt = (a, t, o) => t in a ? ht(a, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : a[t] = o;
|
|
3
3
|
var ye = (a, t, o) => vt(a, typeof t != "symbol" ? t + "" : t, o);
|
|
4
|
-
import { jsx as s, jsxs as
|
|
4
|
+
import { jsx as s, jsxs as M } from "react/jsx-runtime";
|
|
5
5
|
import xe from "@unicom-cloud/icons/IconUiClose";
|
|
6
6
|
import bt from "@unicom-cloud/icons/IconUiCopy";
|
|
7
7
|
import yt from "@unicom-cloud/icons/IconUiFullscreen";
|
|
@@ -13,27 +13,27 @@ import St from "@unicom-cloud/icons/IconUiRotateLeft";
|
|
|
13
13
|
import wt from "@unicom-cloud/icons/IconUiRotateRight";
|
|
14
14
|
import Pt from "@unicom-cloud/icons/IconUiZoomIn";
|
|
15
15
|
import Lt from "@unicom-cloud/icons/IconUiZoomOut";
|
|
16
|
-
import
|
|
17
|
-
import { useState as g, forwardRef as
|
|
18
|
-
import { a as
|
|
16
|
+
import Nt from "lodash/isUndefined";
|
|
17
|
+
import { useState as g, forwardRef as zt, useContext as ke, useRef as x, useMemo as Ce, useImperativeHandle as At, useCallback as Mt, useEffect as v } from "react";
|
|
18
|
+
import { a as Tt, b as Et } from "./CQvM33Vg.js";
|
|
19
19
|
import "lodash/isEqualWith";
|
|
20
|
-
import { u as
|
|
21
|
-
import "./
|
|
22
|
-
import {
|
|
20
|
+
import { u as Ot } from "./CXPOj2uy.js";
|
|
21
|
+
import "./ClM74To2.js";
|
|
22
|
+
import { ArrowDown as $t, ArrowUp as Ut, ArrowLeft as Rt, ArrowRight as Yt, Esc as Dt } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
23
23
|
import "lodash/isNumber";
|
|
24
24
|
import "lodash/merge";
|
|
25
|
-
import { isServerRendering as
|
|
26
|
-
import "./
|
|
25
|
+
import { isServerRendering as Xt, on as J, off as Q } from "../utils/dom.js";
|
|
26
|
+
import "./B4WG1mhs.js";
|
|
27
27
|
import { u as Vt } from "./BFTV6myl.js";
|
|
28
28
|
import { u as Bt } from "./DU1RCDfh.js";
|
|
29
|
-
import { f as Ft } from "./
|
|
30
|
-
import "
|
|
29
|
+
import { f as Ft } from "./BZ3igxQN.js";
|
|
30
|
+
import "@unicom-cloud/utils/constant";
|
|
31
31
|
import { u as Wt } from "./a3hR6zLw.js";
|
|
32
32
|
import "lodash/debounce";
|
|
33
33
|
import Zt from "../portal/index.js";
|
|
34
|
-
import { P as Ie } from "./
|
|
35
|
-
import
|
|
36
|
-
import
|
|
34
|
+
import { P as Ie } from "./NPajzdOv.js";
|
|
35
|
+
import Se from "@unicom-cloud/utils/class-name";
|
|
36
|
+
import jt from "@unicom-cloud/utils/clipboard-copy";
|
|
37
37
|
import { r as Ht } from "./CIRG541s.js";
|
|
38
38
|
import Gt from "../image/ImagePreviewArrow.js";
|
|
39
39
|
import _t from "../image/ImagePreviewToolbar.js";
|
|
@@ -153,32 +153,32 @@ function oo(a, t) {
|
|
|
153
153
|
setCurrentIndex: m,
|
|
154
154
|
infinite: f,
|
|
155
155
|
previewPropsMap: te
|
|
156
|
-
} = ke(qt), Pe = o ? te.get(i) : {},
|
|
156
|
+
} = ke(qt), Pe = o ? te.get(i) : {}, T = Vt(
|
|
157
157
|
a,
|
|
158
158
|
to,
|
|
159
159
|
Pe
|
|
160
160
|
), {
|
|
161
161
|
className: Le,
|
|
162
|
-
style:
|
|
163
|
-
src:
|
|
164
|
-
defaultVisible:
|
|
165
|
-
maskClosable:
|
|
166
|
-
closable:
|
|
167
|
-
breakPoint:
|
|
168
|
-
actions:
|
|
162
|
+
style: Ne,
|
|
163
|
+
src: ze,
|
|
164
|
+
defaultVisible: Ae,
|
|
165
|
+
maskClosable: Me,
|
|
166
|
+
closable: Te,
|
|
167
|
+
breakPoint: Ee,
|
|
168
|
+
actions: Oe,
|
|
169
169
|
actionsLayout: $e,
|
|
170
170
|
getPopupContainer: S,
|
|
171
|
-
onVisibleChange:
|
|
172
|
-
scales:
|
|
171
|
+
onVisibleChange: E,
|
|
172
|
+
scales: O,
|
|
173
173
|
escToExit: oe,
|
|
174
174
|
imgAttributes: Ue = {},
|
|
175
175
|
imageRender: $,
|
|
176
176
|
extra: Re = null,
|
|
177
177
|
resetTranslate: ne
|
|
178
|
-
} =
|
|
179
|
-
defaultValue:
|
|
180
|
-
value:
|
|
181
|
-
}), re = ke(
|
|
178
|
+
} = T, w = o ? n.get(i) : ze, [U, Ye] = g(w), [l, De] = Ot(!1, {
|
|
179
|
+
defaultValue: Ae,
|
|
180
|
+
value: T.visible
|
|
181
|
+
}), re = ke(Tt), { getPrefixCls: Xe, locale: C, rtl: Ve } = re, ie = Xe("image"), u = `${ie}-preview`, Be = Se(
|
|
182
182
|
u,
|
|
183
183
|
{
|
|
184
184
|
[`${u}-hide`]: !l,
|
|
@@ -190,7 +190,7 @@ function oo(a, t) {
|
|
|
190
190
|
pageY: 0,
|
|
191
191
|
originX: 0,
|
|
192
192
|
originY: 0
|
|
193
|
-
}), { isLoading: We, isLoaded: Ze, setStatus: Y } = eo("loading"), [je, He] = g(!1), [p,
|
|
193
|
+
}), { isLoading: We, isLoaded: Ze, setStatus: Y } = eo("loading"), [je, He] = g(!1), [p, D] = g({ x: 0, y: 0 }), [c, X] = g(1), [ae, ce] = g(!1), [L, V] = g(0), [h, le] = g(!1), y = Ce(() => new Qt(O), []), {
|
|
194
194
|
onLoad: B,
|
|
195
195
|
onError: F,
|
|
196
196
|
onMouseDown: W,
|
|
@@ -199,20 +199,20 @@ function oo(a, t) {
|
|
|
199
199
|
...qe
|
|
200
200
|
} = Ue, me = !f && i <= 0, fe = !f && i >= n.size - 1;
|
|
201
201
|
function Z() {
|
|
202
|
-
|
|
202
|
+
D({ x: 0, y: 0 }), X(1), V(0);
|
|
203
203
|
}
|
|
204
|
-
|
|
204
|
+
At(t, () => ({
|
|
205
205
|
reset: Z,
|
|
206
206
|
getRootDOMNode: () => se.current
|
|
207
207
|
}));
|
|
208
|
-
const [
|
|
208
|
+
const [N, Ke] = g(), ue = Mt(() => N, [N]);
|
|
209
209
|
v(() => {
|
|
210
210
|
const e = S == null ? void 0 : S(), r = Ft(e) || document.body;
|
|
211
211
|
Ke(r);
|
|
212
212
|
}, [S]), Bt(ue, { hidden: l });
|
|
213
213
|
const Je = Ce(
|
|
214
|
-
() => !
|
|
215
|
-
[
|
|
214
|
+
() => !Xt && N === document.body,
|
|
215
|
+
[N]
|
|
216
216
|
);
|
|
217
217
|
function de(e) {
|
|
218
218
|
const r = n.size;
|
|
@@ -234,45 +234,45 @@ function oo(a, t) {
|
|
|
234
234
|
!ae && ce(!0), G.current && clearTimeout(G.current), G.current = setTimeout(() => {
|
|
235
235
|
ce(!1);
|
|
236
236
|
}, 1e3);
|
|
237
|
-
},
|
|
238
|
-
c !== e && (
|
|
237
|
+
}, z = (e) => {
|
|
238
|
+
c !== e && (X(e), tt());
|
|
239
239
|
};
|
|
240
240
|
function _() {
|
|
241
241
|
const e = y.getNextScale(c, "zoomIn");
|
|
242
|
-
|
|
242
|
+
z(e);
|
|
243
243
|
}
|
|
244
244
|
function q() {
|
|
245
245
|
const e = y.getNextScale(c, "zoomOut");
|
|
246
|
-
|
|
246
|
+
z(e);
|
|
247
247
|
}
|
|
248
248
|
function ot(e) {
|
|
249
249
|
e.deltaY > 0 ? c >= y.minScale && q() : c <= y.maxScale && _();
|
|
250
250
|
}
|
|
251
251
|
function nt() {
|
|
252
|
-
|
|
252
|
+
z(1);
|
|
253
253
|
}
|
|
254
254
|
function rt() {
|
|
255
255
|
const e = b.current.getBoundingClientRect(), r = P.current.getBoundingClientRect(), d = e.height / (r.height / c), k = e.width / (r.width / c), K = Math.max(d, k);
|
|
256
|
-
|
|
256
|
+
z(K);
|
|
257
257
|
}
|
|
258
258
|
function pe(e) {
|
|
259
|
-
e.target === e.currentTarget &&
|
|
259
|
+
e.target === e.currentTarget && Me && A();
|
|
260
260
|
}
|
|
261
261
|
function it() {
|
|
262
262
|
jt(U);
|
|
263
263
|
}
|
|
264
264
|
function ge() {
|
|
265
|
-
|
|
265
|
+
A();
|
|
266
266
|
}
|
|
267
267
|
function st(e) {
|
|
268
|
-
|
|
268
|
+
A();
|
|
269
269
|
}
|
|
270
|
-
function
|
|
271
|
-
l && (
|
|
270
|
+
function A() {
|
|
271
|
+
l && (E == null || E(!1, l), Nt(T.visible) && De(!1));
|
|
272
272
|
}
|
|
273
273
|
function at(e) {
|
|
274
274
|
if (e && e.length) {
|
|
275
|
-
const d = e[0].contentRect.width <
|
|
275
|
+
const d = e[0].contentRect.width < Ee;
|
|
276
276
|
He(d);
|
|
277
277
|
}
|
|
278
278
|
}
|
|
@@ -286,7 +286,7 @@ function oo(a, t) {
|
|
|
286
286
|
p.y,
|
|
287
287
|
c
|
|
288
288
|
);
|
|
289
|
-
(d !== p.x || k !== p.y) &&
|
|
289
|
+
(d !== p.x || k !== p.y) && D({
|
|
290
290
|
x: d,
|
|
291
291
|
y: k
|
|
292
292
|
});
|
|
@@ -295,7 +295,7 @@ function oo(a, t) {
|
|
|
295
295
|
if (l && h) {
|
|
296
296
|
(r = e.preventDefault) == null || r.call(e);
|
|
297
297
|
const { originX: d, originY: k, pageX: K, pageY: dt } = I.current, pt = d + (e.pageX - K) / c, gt = k + (e.pageY - dt) / c;
|
|
298
|
-
|
|
298
|
+
D({
|
|
299
299
|
x: pt,
|
|
300
300
|
y: gt
|
|
301
301
|
});
|
|
@@ -327,13 +327,13 @@ function oo(a, t) {
|
|
|
327
327
|
}, [l]), v(() => {
|
|
328
328
|
Ye(w), Y(w ? "loading" : "loaded"), Z();
|
|
329
329
|
}, [w]), Wt(() => {
|
|
330
|
-
y.updateScale(
|
|
331
|
-
}, [
|
|
330
|
+
y.updateScale(O), X(1);
|
|
331
|
+
}, [O]), v(() => {
|
|
332
332
|
const e = (r) => {
|
|
333
333
|
if (r)
|
|
334
334
|
switch (r.key) {
|
|
335
|
-
case
|
|
336
|
-
oe &&
|
|
335
|
+
case Dt.key:
|
|
336
|
+
oe && A();
|
|
337
337
|
break;
|
|
338
338
|
case Yt.key:
|
|
339
339
|
H();
|
|
@@ -452,17 +452,17 @@ function oo(a, t) {
|
|
|
452
452
|
return ($ == null ? void 0 : $(e)) ?? e;
|
|
453
453
|
};
|
|
454
454
|
return /* @__PURE__ */ s(Zt, { visible: l, forceRender: !1, getContainer: ue, children: /* @__PURE__ */ s(
|
|
455
|
-
|
|
455
|
+
Et,
|
|
456
456
|
{
|
|
457
457
|
...re,
|
|
458
458
|
childrenName: "ImagePreview",
|
|
459
459
|
getPopupContainer: () => b.current,
|
|
460
|
-
children: /* @__PURE__ */
|
|
460
|
+
children: /* @__PURE__ */ M(
|
|
461
461
|
"div",
|
|
462
462
|
{
|
|
463
463
|
className: Be,
|
|
464
464
|
style: {
|
|
465
|
-
...
|
|
465
|
+
...Ne || {},
|
|
466
466
|
...Je ? {} : { zIndex: "inherit", position: "absolute" }
|
|
467
467
|
},
|
|
468
468
|
ref: se,
|
|
@@ -485,14 +485,14 @@ function oo(a, t) {
|
|
|
485
485
|
children: /* @__PURE__ */ s("div", { className: `${u}-mask`, onClick: st })
|
|
486
486
|
}
|
|
487
487
|
),
|
|
488
|
-
l && /* @__PURE__ */
|
|
488
|
+
l && /* @__PURE__ */ M(
|
|
489
489
|
"div",
|
|
490
490
|
{
|
|
491
491
|
ref: b,
|
|
492
492
|
className: `${u}-wrapper`,
|
|
493
493
|
onClick: pe,
|
|
494
494
|
children: [
|
|
495
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ M(
|
|
496
496
|
"div",
|
|
497
497
|
{
|
|
498
498
|
ref: Fe,
|
|
@@ -513,7 +513,7 @@ function oo(a, t) {
|
|
|
513
513
|
appear: !0,
|
|
514
514
|
classNames: "fadeImage",
|
|
515
515
|
unmountOnExit: !0,
|
|
516
|
-
children: /* @__PURE__ */
|
|
516
|
+
children: /* @__PURE__ */ M("div", { className: `${u}-scale-value`, children: [
|
|
517
517
|
(c * 100).toFixed(0),
|
|
518
518
|
"%"
|
|
519
519
|
] })
|
|
@@ -524,13 +524,13 @@ function oo(a, t) {
|
|
|
524
524
|
{
|
|
525
525
|
prefixCls: ie,
|
|
526
526
|
previewPrefixCls: u,
|
|
527
|
-
actions:
|
|
527
|
+
actions: Oe,
|
|
528
528
|
actionsLayout: $e,
|
|
529
529
|
defaultActions: ft,
|
|
530
530
|
simple: je
|
|
531
531
|
}
|
|
532
532
|
),
|
|
533
|
-
|
|
533
|
+
Te && /* @__PURE__ */ s(
|
|
534
534
|
"div",
|
|
535
535
|
{
|
|
536
536
|
className: `${u}-close-btn`,
|
|
@@ -560,7 +560,7 @@ function oo(a, t) {
|
|
|
560
560
|
}
|
|
561
561
|
) });
|
|
562
562
|
}
|
|
563
|
-
const no =
|
|
563
|
+
const no = zt(
|
|
564
564
|
oo
|
|
565
565
|
);
|
|
566
566
|
no.displayName = "ImagePreview";
|