@rockshin/tao-ui 0.0.40 → 0.0.42
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/README.md +33 -7
- package/THIRD_PARTY_NOTICES.md +34 -0
- package/component-manifest.json +1321 -10
- package/dist/components/affix/affix.css +11 -0
- package/dist/components/affix/affix.d.ts +21 -0
- package/dist/components/affix/affix.js +140 -0
- package/dist/components/app/app-modals.d.ts +2 -0
- package/dist/components/app/app-modals.js +266 -0
- package/dist/components/app/app-notices.d.ts +6 -0
- package/dist/components/app/app-notices.js +334 -0
- package/dist/components/app/app-types.d.ts +154 -0
- package/dist/components/app/app-types.js +0 -0
- package/dist/components/app/app.css +221 -0
- package/dist/components/app/app.d.ts +7 -0
- package/dist/components/app/app.js +69 -0
- package/dist/components/auto-complete/auto-complete.css +35 -0
- package/dist/components/auto-complete/auto-complete.d.ts +47 -0
- package/dist/components/auto-complete/auto-complete.js +106 -0
- package/dist/components/avatar/avatar.css +95 -0
- package/dist/components/avatar/avatar.d.ts +50 -0
- package/dist/components/avatar/avatar.js +159 -0
- package/dist/components/badge/badge.css +165 -0
- package/dist/components/badge/badge.d.ts +48 -0
- package/dist/components/badge/badge.js +412 -0
- package/dist/components/border-beam/border-beam.css +35 -0
- package/dist/components/border-beam/border-beam.d.ts +27 -0
- package/dist/components/border-beam/border-beam.js +215 -0
- package/dist/components/button/button.css +7 -0
- package/dist/components/calendar/calendar.css +176 -0
- package/dist/components/calendar/calendar.d.ts +56 -0
- package/dist/components/calendar/calendar.js +175 -0
- package/dist/components/card/card-tabs.d.ts +43 -0
- package/dist/components/card/card-tabs.js +455 -0
- package/dist/components/card/card.css +401 -0
- package/dist/components/card/card.d.ts +74 -0
- package/dist/components/card/card.js +362 -0
- package/dist/components/carousel/carousel.css +231 -0
- package/dist/components/carousel/carousel.d.ts +35 -0
- package/dist/components/carousel/carousel.js +193 -0
- package/dist/components/cascader/cascader.css +123 -0
- package/dist/components/cascader/cascader.d.ts +58 -0
- package/dist/components/cascader/cascader.js +132 -0
- package/dist/components/checkbox/checkbox.css +7 -0
- package/dist/components/color-picker/color-picker-types.d.ts +78 -0
- package/dist/components/color-picker/color-picker-types.js +0 -0
- package/dist/components/color-picker/color-picker.css +299 -0
- package/dist/components/color-picker/color-picker.d.ts +5 -0
- package/dist/components/color-picker/color-picker.js +974 -0
- package/dist/components/color-picker/color.d.ts +35 -0
- package/dist/components/color-picker/color.js +65 -0
- package/dist/components/date-picker/calendar/calendar-grid.js +4 -11
- package/dist/components/date-picker/calendar/calendar-header.js +76 -69
- package/dist/components/date-picker/calendar/month-grid.js +20 -31
- package/dist/components/date-picker/calendar/time-panel.js +46 -41
- package/dist/components/date-picker/date-picker.css +4 -0
- package/dist/components/date-picker/date-picker.js +4 -4
- package/dist/components/date-picker/range-picker.js +14 -13
- package/dist/components/descriptions/descriptions.css +109 -0
- package/dist/components/descriptions/descriptions.d.ts +49 -0
- package/dist/components/descriptions/descriptions.js +189 -0
- package/dist/components/divider/divider.css +71 -0
- package/dist/components/divider/divider.d.ts +31 -0
- package/dist/components/divider/divider.js +83 -0
- package/dist/components/drawer/drawer.js +199 -184
- package/dist/components/empty/empty.css +35 -0
- package/dist/components/empty/empty.d.ts +25 -0
- package/dist/components/empty/empty.js +278 -0
- package/dist/components/float-button/float-button.css +146 -0
- package/dist/components/float-button/float-button.d.ts +67 -0
- package/dist/components/float-button/float-button.js +347 -0
- package/dist/components/form/form-item.d.ts +1 -1
- package/dist/components/form/form.js +3 -1
- package/dist/components/image/image-icons.d.ts +16 -0
- package/dist/components/image/image-icons.js +63 -0
- package/dist/components/image/image.css +253 -0
- package/dist/components/image/image.d.ts +75 -0
- package/dist/components/image/image.js +818 -0
- package/dist/components/input/input.css +8 -6
- package/dist/components/list/list-pagination.css +127 -0
- package/dist/components/list/list-pagination.d.ts +38 -0
- package/dist/components/list/list-pagination.js +321 -0
- package/dist/components/list/list.css +225 -0
- package/dist/components/list/list.d.ts +77 -0
- package/dist/components/list/list.js +660 -0
- package/dist/components/listy/listy.css +55 -0
- package/dist/components/listy/listy.d.ts +20 -0
- package/dist/components/listy/listy.js +158 -0
- package/dist/components/masonry/masonry.css +13 -0
- package/dist/components/masonry/masonry.d.ts +39 -0
- package/dist/components/masonry/masonry.js +287 -0
- package/dist/components/mentions/mentions.css +172 -0
- package/dist/components/mentions/mentions.d.ts +48 -0
- package/dist/components/mentions/mentions.js +115 -0
- package/dist/components/modal/modal.d.ts +30 -4
- package/dist/components/modal/modal.js +534 -241
- package/dist/components/pagination/pagination.css +10 -0
- package/dist/components/progress/progress.css +187 -0
- package/dist/components/progress/progress.d.ts +66 -0
- package/dist/components/progress/progress.js +567 -0
- package/dist/components/qr-code/qr-code.css +39 -0
- package/dist/components/qr-code/qr-code.d.ts +43 -0
- package/dist/components/qr-code/qr-code.js +286 -0
- package/dist/components/radio/radio.css +7 -0
- package/dist/components/rate/rate.css +97 -0
- package/dist/components/rate/rate.d.ts +17 -0
- package/dist/components/rate/rate.js +172 -0
- package/dist/components/result/result.css +69 -0
- package/dist/components/result/result.d.ts +33 -0
- package/dist/components/result/result.js +320 -0
- package/dist/components/segmented/segmented.css +134 -0
- package/dist/components/segmented/segmented.d.ts +40 -0
- package/dist/components/segmented/segmented.js +169 -0
- package/dist/components/select/mobile-select.d.ts +10 -4
- package/dist/components/select/mobile-select.js +166 -58
- package/dist/components/select/select-tags.js +178 -130
- package/dist/components/select/select-types.d.ts +51 -0
- package/dist/components/select/select.css +70 -10
- package/dist/components/select/select.js +30 -16
- package/dist/components/select/use-select-selection.js +44 -43
- package/dist/components/skeleton/skeleton.css +129 -0
- package/dist/components/skeleton/skeleton.d.ts +78 -0
- package/dist/components/skeleton/skeleton.js +457 -0
- package/dist/components/slider/slider.css +191 -0
- package/dist/components/slider/slider.d.ts +47 -0
- package/dist/components/slider/slider.js +310 -0
- package/dist/components/statistic/statistic.css +34 -0
- package/dist/components/statistic/statistic.d.ts +46 -0
- package/dist/components/statistic/statistic.js +491 -0
- package/dist/components/switch/switch-touch.css +20 -0
- package/dist/components/switch/switch.css +24 -13
- package/dist/components/switch/switch.js +8 -5
- package/dist/components/textarea/textarea.css +1 -1
- package/dist/components/time-picker/time-picker.css +205 -0
- package/dist/components/time-picker/time-picker.d.ts +63 -0
- package/dist/components/time-picker/time-picker.js +356 -0
- package/dist/components/timeline/timeline.css +259 -0
- package/dist/components/timeline/timeline.d.ts +50 -0
- package/dist/components/timeline/timeline.js +140 -0
- package/dist/components/tour/tour.css +151 -0
- package/dist/components/tour/tour.d.ts +45 -0
- package/dist/components/tour/tour.js +575 -0
- package/dist/components/transfer/transfer-list.d.ts +2 -0
- package/dist/components/transfer/transfer-list.js +513 -0
- package/dist/components/transfer/transfer-parts.d.ts +3 -0
- package/dist/components/transfer/transfer-parts.js +163 -0
- package/dist/components/transfer/transfer-types.d.ts +163 -0
- package/dist/components/transfer/transfer-types.js +0 -0
- package/dist/components/transfer/transfer.css +226 -0
- package/dist/components/transfer/transfer.d.ts +13 -0
- package/dist/components/transfer/transfer.js +204 -0
- package/dist/components/tree/tree.css +250 -0
- package/dist/components/tree/tree.d.ts +46 -0
- package/dist/components/tree/tree.js +389 -0
- package/dist/components/tree-select/select-engine.css +231 -0
- package/dist/components/tree-select/select-engine.d.ts +20 -0
- package/dist/components/tree-select/select-engine.js +46 -0
- package/dist/components/tree-select/tree-select.css +25 -0
- package/dist/components/tree-select/tree-select.d.ts +50 -0
- package/dist/components/tree-select/tree-select.js +131 -0
- package/dist/components/upload/upload-types.d.ts +135 -0
- package/dist/components/upload/upload-types.js +0 -0
- package/dist/components/upload/upload.css +177 -0
- package/dist/components/upload/upload.d.ts +12 -0
- package/dist/components/upload/upload.js +455 -0
- package/dist/components/watermark/watermark-context.d.ts +7 -0
- package/dist/components/watermark/watermark-context.js +20 -0
- package/dist/components/watermark/watermark.css +10 -0
- package/dist/components/watermark/watermark.d.ts +38 -0
- package/dist/components/watermark/watermark.js +436 -0
- package/dist/docs/component-docs.d.ts +35 -29
- package/dist/docs/component-docs.js +73 -1
- package/dist/docs/components/affix.doc.d.ts +14 -0
- package/dist/docs/components/affix.doc.js +22 -0
- package/dist/docs/components/app.doc.d.ts +18 -0
- package/dist/docs/components/app.doc.js +42 -0
- package/dist/docs/components/auto-complete.doc.d.ts +18 -0
- package/dist/docs/components/auto-complete.doc.js +49 -0
- package/dist/docs/components/avatar.doc.d.ts +17 -0
- package/dist/docs/components/avatar.doc.js +36 -0
- package/dist/docs/components/badge.doc.d.ts +17 -0
- package/dist/docs/components/badge.doc.js +34 -0
- package/dist/docs/components/border-beam.doc.d.ts +14 -0
- package/dist/docs/components/border-beam.doc.js +22 -0
- package/dist/docs/components/calendar.doc.d.ts +18 -0
- package/dist/docs/components/calendar.doc.js +45 -0
- package/dist/docs/components/card.doc.d.ts +17 -0
- package/dist/docs/components/card.doc.js +39 -0
- package/dist/docs/components/carousel.doc.d.ts +15 -0
- package/dist/docs/components/carousel.doc.js +26 -0
- package/dist/docs/components/cascader.doc.d.ts +18 -0
- package/dist/docs/components/cascader.doc.js +54 -0
- package/dist/docs/components/color-picker.doc.d.ts +18 -0
- package/dist/docs/components/color-picker.doc.js +46 -0
- package/dist/docs/components/descriptions.doc.d.ts +14 -0
- package/dist/docs/components/descriptions.doc.js +26 -0
- package/dist/docs/components/divider.doc.d.ts +17 -0
- package/dist/docs/components/divider.doc.js +34 -0
- package/dist/docs/components/empty.doc.d.ts +18 -0
- package/dist/docs/components/empty.doc.js +40 -0
- package/dist/docs/components/float-button.doc.d.ts +14 -0
- package/dist/docs/components/float-button.doc.js +23 -0
- package/dist/docs/components/form.doc.d.ts +1 -1
- package/dist/docs/components/image.doc.d.ts +15 -0
- package/dist/docs/components/image.doc.js +38 -0
- package/dist/docs/components/list.doc.d.ts +18 -0
- package/dist/docs/components/list.doc.js +43 -0
- package/dist/docs/components/listy.doc.d.ts +18 -0
- package/dist/docs/components/listy.doc.js +40 -0
- package/dist/docs/components/masonry.doc.d.ts +14 -0
- package/dist/docs/components/masonry.doc.js +22 -0
- package/dist/docs/components/mentions.doc.d.ts +18 -0
- package/dist/docs/components/mentions.doc.js +43 -0
- package/dist/docs/components/modal.doc.js +3 -0
- package/dist/docs/components/progress.doc.d.ts +18 -0
- package/dist/docs/components/progress.doc.js +41 -0
- package/dist/docs/components/qr-code.doc.d.ts +18 -0
- package/dist/docs/components/qr-code.doc.js +41 -0
- package/dist/docs/components/rate.doc.d.ts +18 -0
- package/dist/docs/components/rate.doc.js +38 -0
- package/dist/docs/components/result.doc.d.ts +18 -0
- package/dist/docs/components/result.doc.js +42 -0
- package/dist/docs/components/segmented.doc.d.ts +14 -0
- package/dist/docs/components/segmented.doc.js +24 -0
- package/dist/docs/components/skeleton.doc.d.ts +18 -0
- package/dist/docs/components/skeleton.doc.js +42 -0
- package/dist/docs/components/slider.doc.d.ts +18 -0
- package/dist/docs/components/slider.doc.js +41 -0
- package/dist/docs/components/statistic.doc.d.ts +14 -0
- package/dist/docs/components/statistic.doc.js +27 -0
- package/dist/docs/components/time-picker.doc.d.ts +18 -0
- package/dist/docs/components/time-picker.doc.js +45 -0
- package/dist/docs/components/timeline.doc.d.ts +14 -0
- package/dist/docs/components/timeline.doc.js +29 -0
- package/dist/docs/components/tooltip.doc.d.ts +2 -2
- package/dist/docs/components/tour.doc.d.ts +15 -0
- package/dist/docs/components/tour.doc.js +36 -0
- package/dist/docs/components/transfer.doc.d.ts +18 -0
- package/dist/docs/components/transfer.doc.js +48 -0
- package/dist/docs/components/tree-select.doc.d.ts +18 -0
- package/dist/docs/components/tree-select.doc.js +55 -0
- package/dist/docs/components/tree.doc.d.ts +18 -0
- package/dist/docs/components/tree.doc.js +46 -0
- package/dist/docs/components/upload.doc.d.ts +18 -0
- package/dist/docs/components/upload.doc.js +43 -0
- package/dist/docs/components/watermark.doc.d.ts +14 -0
- package/dist/docs/components/watermark.doc.js +22 -0
- package/dist/entries/affix.d.ts +3 -0
- package/dist/entries/affix.js +4 -0
- package/dist/entries/app.d.ts +3 -0
- package/dist/entries/app.js +4 -0
- package/dist/entries/auto-complete.d.ts +4 -0
- package/dist/entries/auto-complete.js +4 -0
- package/dist/entries/avatar.d.ts +3 -0
- package/dist/entries/avatar.js +4 -0
- package/dist/entries/badge.d.ts +3 -0
- package/dist/entries/badge.js +4 -0
- package/dist/entries/border-beam.d.ts +3 -0
- package/dist/entries/border-beam.js +4 -0
- package/dist/entries/calendar.d.ts +3 -0
- package/dist/entries/calendar.js +4 -0
- package/dist/entries/card.d.ts +3 -0
- package/dist/entries/card.js +4 -0
- package/dist/entries/carousel.d.ts +3 -0
- package/dist/entries/carousel.js +4 -0
- package/dist/entries/cascader.d.ts +4 -0
- package/dist/entries/cascader.js +4 -0
- package/dist/entries/color-picker.d.ts +5 -0
- package/dist/entries/color-picker.js +4 -0
- package/dist/entries/descriptions.d.ts +3 -0
- package/dist/entries/descriptions.js +4 -0
- package/dist/entries/divider.d.ts +3 -0
- package/dist/entries/divider.js +4 -0
- package/dist/entries/empty.d.ts +3 -0
- package/dist/entries/empty.js +4 -0
- package/dist/entries/float-button.d.ts +3 -0
- package/dist/entries/float-button.js +4 -0
- package/dist/entries/image.d.ts +3 -0
- package/dist/entries/image.js +4 -0
- package/dist/entries/list.d.ts +3 -0
- package/dist/entries/list.js +4 -0
- package/dist/entries/listy.d.ts +3 -0
- package/dist/entries/listy.js +4 -0
- package/dist/entries/masonry.d.ts +3 -0
- package/dist/entries/masonry.js +4 -0
- package/dist/entries/mentions.d.ts +4 -0
- package/dist/entries/mentions.js +4 -0
- package/dist/entries/progress.d.ts +3 -0
- package/dist/entries/progress.js +4 -0
- package/dist/entries/provider.d.ts +1 -1
- package/dist/entries/provider.js +1 -1
- package/dist/entries/qr-code.d.ts +4 -0
- package/dist/entries/qr-code.js +4 -0
- package/dist/entries/rate.d.ts +3 -0
- package/dist/entries/rate.js +4 -0
- package/dist/entries/result.d.ts +3 -0
- package/dist/entries/result.js +4 -0
- package/dist/entries/segmented.d.ts +3 -0
- package/dist/entries/segmented.js +4 -0
- package/dist/entries/skeleton.d.ts +3 -0
- package/dist/entries/skeleton.js +4 -0
- package/dist/entries/slider.d.ts +3 -0
- package/dist/entries/slider.js +4 -0
- package/dist/entries/statistic.d.ts +3 -0
- package/dist/entries/statistic.js +4 -0
- package/dist/entries/time-picker.d.ts +3 -0
- package/dist/entries/time-picker.js +4 -0
- package/dist/entries/timeline.d.ts +3 -0
- package/dist/entries/timeline.js +4 -0
- package/dist/entries/tour.d.ts +3 -0
- package/dist/entries/tour.js +4 -0
- package/dist/entries/transfer.d.ts +3 -0
- package/dist/entries/transfer.js +4 -0
- package/dist/entries/tree-select.d.ts +4 -0
- package/dist/entries/tree-select.js +4 -0
- package/dist/entries/tree.d.ts +3 -0
- package/dist/entries/tree.js +4 -0
- package/dist/entries/upload.d.ts +4 -0
- package/dist/entries/upload.js +4 -0
- package/dist/entries/util.d.ts +1 -0
- package/dist/entries/util.js +1 -0
- package/dist/entries/watermark.d.ts +3 -0
- package/dist/entries/watermark.js +4 -0
- package/dist/index.d.ts +48 -3
- package/dist/index.js +38 -2
- package/dist/provider/locale.d.ts +59 -0
- package/dist/provider/locale.js +136 -0
- package/dist/provider/tao-provider.d.ts +16 -1
- package/dist/provider/tao-provider.js +104 -87
- package/dist/theme/control.css +10 -0
- package/dist/theme/theme.css +1 -1
- package/dist/utils/breakpoint.d.ts +2 -2
- package/dist/utils/breakpoint.js +3 -1
- package/dist/utils/interop-default.d.ts +2 -0
- package/dist/utils/interop-default.js +4 -0
- package/dist/utils/types.d.ts +7 -0
- package/dist/utils/types.js +0 -0
- package/llms.txt +476 -8
- package/package.json +27 -6
|
@@ -0,0 +1,818 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react-compiler-runtime";
|
|
3
|
+
import _rc_component_image from "@rc-component/image";
|
|
4
|
+
import { isValidElement, useEffect, useRef } from "react";
|
|
5
|
+
import { useTaoInternalConfig } from "../../provider/tao-provider.js";
|
|
6
|
+
import { cx } from "../../utils/semantic.js";
|
|
7
|
+
import { ImageControlIcon } from "./image-icons.js";
|
|
8
|
+
import "./image.css";
|
|
9
|
+
import { interopDefault } from "../../utils/interop-default.js";
|
|
10
|
+
const RcImageComponent = /*#__PURE__*/ interopDefault(_rc_component_image);
|
|
11
|
+
function usePreviewContainer(getContainer) {
|
|
12
|
+
const $ = c(13);
|
|
13
|
+
const { tokenStyle, mode, compact } = useTaoInternalConfig();
|
|
14
|
+
let t0;
|
|
15
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
16
|
+
t0 = [];
|
|
17
|
+
$[0] = t0;
|
|
18
|
+
} else t0 = $[0];
|
|
19
|
+
const containers = useRef(t0);
|
|
20
|
+
let t1;
|
|
21
|
+
let t2;
|
|
22
|
+
if ($[1] !== compact || $[2] !== mode || $[3] !== tokenStyle) {
|
|
23
|
+
t1 = ()=>{
|
|
24
|
+
for (const container of containers.current){
|
|
25
|
+
if ("light" === mode) delete container.dataset.taoTheme;
|
|
26
|
+
else container.dataset.taoTheme = mode;
|
|
27
|
+
if (compact) container.dataset.taoDensity = "compact";
|
|
28
|
+
else delete container.dataset.taoDensity;
|
|
29
|
+
container.removeAttribute("style");
|
|
30
|
+
for (const [key, value] of Object.entries(tokenStyle ?? {}))container.style.setProperty(key, String(value));
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
t2 = [
|
|
34
|
+
tokenStyle,
|
|
35
|
+
mode,
|
|
36
|
+
compact
|
|
37
|
+
];
|
|
38
|
+
$[1] = compact;
|
|
39
|
+
$[2] = mode;
|
|
40
|
+
$[3] = tokenStyle;
|
|
41
|
+
$[4] = t1;
|
|
42
|
+
$[5] = t2;
|
|
43
|
+
} else {
|
|
44
|
+
t1 = $[4];
|
|
45
|
+
t2 = $[5];
|
|
46
|
+
}
|
|
47
|
+
useEffect(t1, t2);
|
|
48
|
+
let t3;
|
|
49
|
+
let t4;
|
|
50
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
51
|
+
t3 = ()=>()=>{
|
|
52
|
+
for (const container_0 of containers.current)container_0.remove();
|
|
53
|
+
containers.current = [];
|
|
54
|
+
};
|
|
55
|
+
t4 = [];
|
|
56
|
+
$[6] = t3;
|
|
57
|
+
$[7] = t4;
|
|
58
|
+
} else {
|
|
59
|
+
t3 = $[6];
|
|
60
|
+
t4 = $[7];
|
|
61
|
+
}
|
|
62
|
+
useEffect(t3, t4);
|
|
63
|
+
if (false === getContainer) return false;
|
|
64
|
+
let t5;
|
|
65
|
+
if ($[8] !== compact || $[9] !== getContainer || $[10] !== mode || $[11] !== tokenStyle) {
|
|
66
|
+
t5 = ()=>{
|
|
67
|
+
const target = "function" == typeof getContainer ? getContainer() : "string" == typeof getContainer ? document.querySelector(getContainer) : getContainer ?? document.body;
|
|
68
|
+
if (!target) return null;
|
|
69
|
+
const existing = containers.current.find((container_1)=>container_1.parentNode === target);
|
|
70
|
+
if (existing) return existing;
|
|
71
|
+
const container_2 = document.createElement("div");
|
|
72
|
+
container_2.dataset.taoImagePopup = "";
|
|
73
|
+
container_2.dataset.taoProvider = "";
|
|
74
|
+
if ("light" !== mode) container_2.dataset.taoTheme = mode;
|
|
75
|
+
if (compact) container_2.dataset.taoDensity = "compact";
|
|
76
|
+
for (const [key_0, value_0] of Object.entries(tokenStyle ?? {}))container_2.style.setProperty(key_0, String(value_0));
|
|
77
|
+
target.appendChild(container_2);
|
|
78
|
+
containers.current.push(container_2);
|
|
79
|
+
return container_2;
|
|
80
|
+
};
|
|
81
|
+
$[8] = compact;
|
|
82
|
+
$[9] = getContainer;
|
|
83
|
+
$[10] = mode;
|
|
84
|
+
$[11] = tokenStyle;
|
|
85
|
+
$[12] = t5;
|
|
86
|
+
} else t5 = $[12];
|
|
87
|
+
return t5;
|
|
88
|
+
}
|
|
89
|
+
function usePreviewOptions(preview) {
|
|
90
|
+
const $ = c(46);
|
|
91
|
+
const { locale } = useTaoInternalConfig();
|
|
92
|
+
let t0;
|
|
93
|
+
if ($[0] !== preview) {
|
|
94
|
+
t0 = "object" == typeof preview ? preview : {};
|
|
95
|
+
$[0] = preview;
|
|
96
|
+
$[1] = t0;
|
|
97
|
+
} else t0 = $[1];
|
|
98
|
+
const raw = t0;
|
|
99
|
+
let getContainer;
|
|
100
|
+
let mask;
|
|
101
|
+
let open;
|
|
102
|
+
let rest;
|
|
103
|
+
let rootClassName;
|
|
104
|
+
let toolbarRender;
|
|
105
|
+
let visible;
|
|
106
|
+
if ($[2] !== raw) {
|
|
107
|
+
const { visible: t1, open: t2, rootClassName: t3, forceRender: _forceRender, destroyOnClose: _destroyOnClose, toolbarRender: t4, mask: t5, getContainer: t6, ...t7 } = raw;
|
|
108
|
+
visible = t1;
|
|
109
|
+
open = t2;
|
|
110
|
+
rootClassName = t3;
|
|
111
|
+
toolbarRender = t4;
|
|
112
|
+
mask = t5;
|
|
113
|
+
getContainer = t6;
|
|
114
|
+
rest = t7;
|
|
115
|
+
$[2] = raw;
|
|
116
|
+
$[3] = getContainer;
|
|
117
|
+
$[4] = mask;
|
|
118
|
+
$[5] = open;
|
|
119
|
+
$[6] = rest;
|
|
120
|
+
$[7] = rootClassName;
|
|
121
|
+
$[8] = toolbarRender;
|
|
122
|
+
$[9] = visible;
|
|
123
|
+
} else {
|
|
124
|
+
getContainer = $[3];
|
|
125
|
+
mask = $[4];
|
|
126
|
+
open = $[5];
|
|
127
|
+
rest = $[6];
|
|
128
|
+
rootClassName = $[7];
|
|
129
|
+
toolbarRender = $[8];
|
|
130
|
+
visible = $[9];
|
|
131
|
+
}
|
|
132
|
+
const container = usePreviewContainer(getContainer);
|
|
133
|
+
let t1;
|
|
134
|
+
if ($[10] !== mask) {
|
|
135
|
+
t1 = "object" != typeof mask || null === mask || /*#__PURE__*/ isValidElement(mask) || Array.isArray(mask) ? void 0 : mask;
|
|
136
|
+
$[10] = mask;
|
|
137
|
+
$[11] = t1;
|
|
138
|
+
} else t1 = $[11];
|
|
139
|
+
const maskConfig = t1;
|
|
140
|
+
let t2;
|
|
141
|
+
if ($[12] !== locale.close) {
|
|
142
|
+
t2 = /*#__PURE__*/ jsx(ImageControlIcon, {
|
|
143
|
+
name: "close",
|
|
144
|
+
label: locale.close
|
|
145
|
+
});
|
|
146
|
+
$[12] = locale.close;
|
|
147
|
+
$[13] = t2;
|
|
148
|
+
} else t2 = $[13];
|
|
149
|
+
let t3;
|
|
150
|
+
if ($[14] !== locale.previous) {
|
|
151
|
+
t3 = /*#__PURE__*/ jsx(ImageControlIcon, {
|
|
152
|
+
name: "prev",
|
|
153
|
+
label: locale.previous
|
|
154
|
+
});
|
|
155
|
+
$[14] = locale.previous;
|
|
156
|
+
$[15] = t3;
|
|
157
|
+
} else t3 = $[15];
|
|
158
|
+
let t4;
|
|
159
|
+
if ($[16] !== locale.next) {
|
|
160
|
+
t4 = /*#__PURE__*/ jsx(ImageControlIcon, {
|
|
161
|
+
name: "next",
|
|
162
|
+
label: locale.next
|
|
163
|
+
});
|
|
164
|
+
$[16] = locale.next;
|
|
165
|
+
$[17] = t4;
|
|
166
|
+
} else t4 = $[17];
|
|
167
|
+
let t10;
|
|
168
|
+
let t5;
|
|
169
|
+
let t6;
|
|
170
|
+
let t7;
|
|
171
|
+
let t8;
|
|
172
|
+
let t9;
|
|
173
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
174
|
+
t5 = /*#__PURE__*/ jsx(ImageControlIcon, {
|
|
175
|
+
name: "rotateLeft"
|
|
176
|
+
});
|
|
177
|
+
t6 = /*#__PURE__*/ jsx(ImageControlIcon, {
|
|
178
|
+
name: "rotateRight"
|
|
179
|
+
});
|
|
180
|
+
t7 = /*#__PURE__*/ jsx(ImageControlIcon, {
|
|
181
|
+
name: "zoomIn"
|
|
182
|
+
});
|
|
183
|
+
t8 = /*#__PURE__*/ jsx(ImageControlIcon, {
|
|
184
|
+
name: "zoomOut"
|
|
185
|
+
});
|
|
186
|
+
t9 = /*#__PURE__*/ jsx(ImageControlIcon, {
|
|
187
|
+
name: "flipX"
|
|
188
|
+
});
|
|
189
|
+
t10 = /*#__PURE__*/ jsx(ImageControlIcon, {
|
|
190
|
+
name: "flipY"
|
|
191
|
+
});
|
|
192
|
+
$[18] = t10;
|
|
193
|
+
$[19] = t5;
|
|
194
|
+
$[20] = t6;
|
|
195
|
+
$[21] = t7;
|
|
196
|
+
$[22] = t8;
|
|
197
|
+
$[23] = t9;
|
|
198
|
+
} else {
|
|
199
|
+
t10 = $[18];
|
|
200
|
+
t5 = $[19];
|
|
201
|
+
t6 = $[20];
|
|
202
|
+
t7 = $[21];
|
|
203
|
+
t8 = $[22];
|
|
204
|
+
t9 = $[23];
|
|
205
|
+
}
|
|
206
|
+
let t11;
|
|
207
|
+
if ($[24] !== raw.icons || $[25] !== t2 || $[26] !== t3 || $[27] !== t4) {
|
|
208
|
+
t11 = {
|
|
209
|
+
close: t2,
|
|
210
|
+
prev: t3,
|
|
211
|
+
next: t4,
|
|
212
|
+
rotateLeft: t5,
|
|
213
|
+
rotateRight: t6,
|
|
214
|
+
zoomIn: t7,
|
|
215
|
+
zoomOut: t8,
|
|
216
|
+
flipX: t9,
|
|
217
|
+
flipY: t10,
|
|
218
|
+
...raw.icons
|
|
219
|
+
};
|
|
220
|
+
$[24] = raw.icons;
|
|
221
|
+
$[25] = t2;
|
|
222
|
+
$[26] = t3;
|
|
223
|
+
$[27] = t4;
|
|
224
|
+
$[28] = t11;
|
|
225
|
+
} else t11 = $[28];
|
|
226
|
+
const icons = t11;
|
|
227
|
+
const t12 = false === preview;
|
|
228
|
+
const t13 = false === mask || maskConfig?.enabled === false;
|
|
229
|
+
const t14 = maskConfig?.blur;
|
|
230
|
+
const t15 = open ?? visible;
|
|
231
|
+
const t16 = maskConfig?.closable ?? true;
|
|
232
|
+
const t17 = raw.actionsRender ?? toolbarRender;
|
|
233
|
+
let t18;
|
|
234
|
+
if ($[29] !== mask) {
|
|
235
|
+
t18 = /*#__PURE__*/ isValidElement(mask) ? {
|
|
236
|
+
cover: mask
|
|
237
|
+
} : {};
|
|
238
|
+
$[29] = mask;
|
|
239
|
+
$[30] = t18;
|
|
240
|
+
} else t18 = $[30];
|
|
241
|
+
let t19;
|
|
242
|
+
if ($[31] !== container || $[32] !== icons || $[33] !== rest || $[34] !== rootClassName || $[35] !== t15 || $[36] !== t16 || $[37] !== t17 || $[38] !== t18) {
|
|
243
|
+
t19 = {
|
|
244
|
+
...rest,
|
|
245
|
+
open: t15,
|
|
246
|
+
rootClassName,
|
|
247
|
+
getContainer: container,
|
|
248
|
+
icons,
|
|
249
|
+
motionName: "tao-image-preview-fade",
|
|
250
|
+
maskClosable: t16,
|
|
251
|
+
actionsRender: t17,
|
|
252
|
+
...t18
|
|
253
|
+
};
|
|
254
|
+
$[31] = container;
|
|
255
|
+
$[32] = icons;
|
|
256
|
+
$[33] = rest;
|
|
257
|
+
$[34] = rootClassName;
|
|
258
|
+
$[35] = t15;
|
|
259
|
+
$[36] = t16;
|
|
260
|
+
$[37] = t17;
|
|
261
|
+
$[38] = t18;
|
|
262
|
+
$[39] = t19;
|
|
263
|
+
} else t19 = $[39];
|
|
264
|
+
let t20;
|
|
265
|
+
if ($[40] !== raw || $[41] !== t12 || $[42] !== t13 || $[43] !== t14 || $[44] !== t19) {
|
|
266
|
+
t20 = {
|
|
267
|
+
disabled: t12,
|
|
268
|
+
raw,
|
|
269
|
+
hiddenMask: t13,
|
|
270
|
+
blurMask: t14,
|
|
271
|
+
config: t19
|
|
272
|
+
};
|
|
273
|
+
$[40] = raw;
|
|
274
|
+
$[41] = t12;
|
|
275
|
+
$[42] = t13;
|
|
276
|
+
$[43] = t14;
|
|
277
|
+
$[44] = t19;
|
|
278
|
+
$[45] = t20;
|
|
279
|
+
} else t20 = $[45];
|
|
280
|
+
return t20;
|
|
281
|
+
}
|
|
282
|
+
function ImageProgress(t0) {
|
|
283
|
+
const $ = c(47);
|
|
284
|
+
const { props, progress, placeholder } = t0;
|
|
285
|
+
let t1;
|
|
286
|
+
if ($[0] !== props) {
|
|
287
|
+
t1 = "function" == typeof props.classNames ? props.classNames({
|
|
288
|
+
props
|
|
289
|
+
}) : props.classNames;
|
|
290
|
+
$[0] = props;
|
|
291
|
+
$[1] = t1;
|
|
292
|
+
} else t1 = $[1];
|
|
293
|
+
const classes = t1;
|
|
294
|
+
let t2;
|
|
295
|
+
if ($[2] !== props) {
|
|
296
|
+
t2 = "function" == typeof props.styles ? props.styles({
|
|
297
|
+
props
|
|
298
|
+
}) : props.styles;
|
|
299
|
+
$[2] = props;
|
|
300
|
+
$[3] = t2;
|
|
301
|
+
} else t2 = $[3];
|
|
302
|
+
const styles = t2;
|
|
303
|
+
const { tokenStyle } = useTaoInternalConfig();
|
|
304
|
+
const cn = classes?.placeholder?.progress;
|
|
305
|
+
const st = styles?.placeholder?.progress;
|
|
306
|
+
let t3;
|
|
307
|
+
if ($[4] !== progress) {
|
|
308
|
+
t3 = "number" == typeof progress?.percent && Number.isFinite(progress.percent);
|
|
309
|
+
$[4] = progress;
|
|
310
|
+
$[5] = t3;
|
|
311
|
+
} else t3 = $[5];
|
|
312
|
+
const hasPercent = t3;
|
|
313
|
+
let t4;
|
|
314
|
+
if ($[6] !== hasPercent || $[7] !== progress) {
|
|
315
|
+
t4 = hasPercent ? Math.max(0, Math.min(100, Math.round(progress.percent))) : 0;
|
|
316
|
+
$[6] = hasPercent;
|
|
317
|
+
$[7] = progress;
|
|
318
|
+
$[8] = t4;
|
|
319
|
+
} else t4 = $[8];
|
|
320
|
+
const percent = t4;
|
|
321
|
+
let t5;
|
|
322
|
+
if ($[9] !== hasPercent || $[10] !== percent) {
|
|
323
|
+
t5 = hasPercent ? {
|
|
324
|
+
role: "progressbar",
|
|
325
|
+
"aria-valuemin": 0,
|
|
326
|
+
"aria-valuemax": 100,
|
|
327
|
+
"aria-valuenow": percent,
|
|
328
|
+
"aria-label": `${percent}%`
|
|
329
|
+
} : {
|
|
330
|
+
role: "status",
|
|
331
|
+
"aria-label": "Loading",
|
|
332
|
+
"aria-busy": true
|
|
333
|
+
};
|
|
334
|
+
$[9] = hasPercent;
|
|
335
|
+
$[10] = percent;
|
|
336
|
+
$[11] = t5;
|
|
337
|
+
} else t5 = $[11];
|
|
338
|
+
const progressAria = t5;
|
|
339
|
+
let t6;
|
|
340
|
+
if ($[12] !== cn?.rail || $[13] !== hasPercent || $[14] !== percent || $[15] !== st?.rail) {
|
|
341
|
+
t6 = hasPercent ? /*#__PURE__*/ jsx("div", {
|
|
342
|
+
"data-tao-image-progress-rail": "",
|
|
343
|
+
className: cn?.rail,
|
|
344
|
+
style: st?.rail,
|
|
345
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
346
|
+
style: {
|
|
347
|
+
transform: `scaleX(${percent / 100})`
|
|
348
|
+
}
|
|
349
|
+
})
|
|
350
|
+
}) : null;
|
|
351
|
+
$[12] = cn?.rail;
|
|
352
|
+
$[13] = hasPercent;
|
|
353
|
+
$[14] = percent;
|
|
354
|
+
$[15] = st?.rail;
|
|
355
|
+
$[16] = t6;
|
|
356
|
+
} else t6 = $[16];
|
|
357
|
+
const bar = t6;
|
|
358
|
+
const t7 = classes?.root;
|
|
359
|
+
const t8 = cn?.root;
|
|
360
|
+
let t9;
|
|
361
|
+
if ($[17] !== props.className || $[18] !== props.rootClassName || $[19] !== t7 || $[20] !== t8) {
|
|
362
|
+
t9 = cx(t7, t8, props.rootClassName, props.className);
|
|
363
|
+
$[17] = props.className;
|
|
364
|
+
$[18] = props.rootClassName;
|
|
365
|
+
$[19] = t7;
|
|
366
|
+
$[20] = t8;
|
|
367
|
+
$[21] = t9;
|
|
368
|
+
} else t9 = $[21];
|
|
369
|
+
const t10 = styles?.root;
|
|
370
|
+
const t11 = st?.root;
|
|
371
|
+
let t12;
|
|
372
|
+
if ($[22] !== props.height || $[23] !== props.style || $[24] !== props.width || $[25] !== props.wrapperStyle || $[26] !== t10 || $[27] !== t11 || $[28] !== tokenStyle) {
|
|
373
|
+
t12 = {
|
|
374
|
+
...tokenStyle,
|
|
375
|
+
width: props.width,
|
|
376
|
+
height: props.height,
|
|
377
|
+
...props.wrapperStyle,
|
|
378
|
+
...t10,
|
|
379
|
+
...props.style,
|
|
380
|
+
...t11
|
|
381
|
+
};
|
|
382
|
+
$[22] = props.height;
|
|
383
|
+
$[23] = props.style;
|
|
384
|
+
$[24] = props.width;
|
|
385
|
+
$[25] = props.wrapperStyle;
|
|
386
|
+
$[26] = t10;
|
|
387
|
+
$[27] = t11;
|
|
388
|
+
$[28] = tokenStyle;
|
|
389
|
+
$[29] = t12;
|
|
390
|
+
} else t12 = $[29];
|
|
391
|
+
const t13 = cn?.content;
|
|
392
|
+
const t14 = st?.content;
|
|
393
|
+
let t15;
|
|
394
|
+
if ($[30] !== bar || $[31] !== cn?.indicator || $[32] !== hasPercent || $[33] !== percent || $[34] !== placeholder || $[35] !== progress || $[36] !== st?.indicator) {
|
|
395
|
+
t15 = placeholder ?? (progress?.render ? progress.render(bar, percent) : /*#__PURE__*/ jsxs(Fragment, {
|
|
396
|
+
children: [
|
|
397
|
+
bar,
|
|
398
|
+
hasPercent && /*#__PURE__*/ jsxs("span", {
|
|
399
|
+
className: cn?.indicator,
|
|
400
|
+
style: st?.indicator,
|
|
401
|
+
children: [
|
|
402
|
+
percent,
|
|
403
|
+
"%"
|
|
404
|
+
]
|
|
405
|
+
})
|
|
406
|
+
]
|
|
407
|
+
}));
|
|
408
|
+
$[30] = bar;
|
|
409
|
+
$[31] = cn?.indicator;
|
|
410
|
+
$[32] = hasPercent;
|
|
411
|
+
$[33] = percent;
|
|
412
|
+
$[34] = placeholder;
|
|
413
|
+
$[35] = progress;
|
|
414
|
+
$[36] = st?.indicator;
|
|
415
|
+
$[37] = t15;
|
|
416
|
+
} else t15 = $[37];
|
|
417
|
+
let t16;
|
|
418
|
+
if ($[38] !== t13 || $[39] !== t14 || $[40] !== t15) {
|
|
419
|
+
t16 = /*#__PURE__*/ jsx("div", {
|
|
420
|
+
"data-tao-image-progress-content": "",
|
|
421
|
+
className: t13,
|
|
422
|
+
style: t14,
|
|
423
|
+
children: t15
|
|
424
|
+
});
|
|
425
|
+
$[38] = t13;
|
|
426
|
+
$[39] = t14;
|
|
427
|
+
$[40] = t15;
|
|
428
|
+
$[41] = t16;
|
|
429
|
+
} else t16 = $[41];
|
|
430
|
+
let t17;
|
|
431
|
+
if ($[42] !== progressAria || $[43] !== t12 || $[44] !== t16 || $[45] !== t9) {
|
|
432
|
+
t17 = /*#__PURE__*/ jsx("div", {
|
|
433
|
+
"data-tao-image-progress": "",
|
|
434
|
+
className: t9,
|
|
435
|
+
style: t12,
|
|
436
|
+
...progressAria,
|
|
437
|
+
children: t16
|
|
438
|
+
});
|
|
439
|
+
$[42] = progressAria;
|
|
440
|
+
$[43] = t12;
|
|
441
|
+
$[44] = t16;
|
|
442
|
+
$[45] = t9;
|
|
443
|
+
$[46] = t17;
|
|
444
|
+
} else t17 = $[46];
|
|
445
|
+
return t17;
|
|
446
|
+
}
|
|
447
|
+
function ImageBase(props) {
|
|
448
|
+
const $ = c(64);
|
|
449
|
+
const { tokenStyle } = useTaoInternalConfig();
|
|
450
|
+
let classNames;
|
|
451
|
+
let placeholder;
|
|
452
|
+
let preview;
|
|
453
|
+
let rest;
|
|
454
|
+
let styles;
|
|
455
|
+
let t0;
|
|
456
|
+
let wrapperStyle;
|
|
457
|
+
if ($[0] !== props) {
|
|
458
|
+
({ preview, wrapperStyle, classNames, styles, placeholder, prefixCls: t0, ...rest } = props);
|
|
459
|
+
$[0] = props;
|
|
460
|
+
$[1] = classNames;
|
|
461
|
+
$[2] = placeholder;
|
|
462
|
+
$[3] = preview;
|
|
463
|
+
$[4] = rest;
|
|
464
|
+
$[5] = styles;
|
|
465
|
+
$[6] = t0;
|
|
466
|
+
$[7] = wrapperStyle;
|
|
467
|
+
} else {
|
|
468
|
+
classNames = $[1];
|
|
469
|
+
placeholder = $[2];
|
|
470
|
+
preview = $[3];
|
|
471
|
+
rest = $[4];
|
|
472
|
+
styles = $[5];
|
|
473
|
+
t0 = $[6];
|
|
474
|
+
wrapperStyle = $[7];
|
|
475
|
+
}
|
|
476
|
+
const prefixCls = void 0 === t0 ? "tao-image" : t0;
|
|
477
|
+
let t1;
|
|
478
|
+
if ($[8] !== classNames || $[9] !== props) {
|
|
479
|
+
t1 = "function" == typeof classNames ? classNames({
|
|
480
|
+
props
|
|
481
|
+
}) : classNames;
|
|
482
|
+
$[8] = classNames;
|
|
483
|
+
$[9] = props;
|
|
484
|
+
$[10] = t1;
|
|
485
|
+
} else t1 = $[10];
|
|
486
|
+
const classes = t1;
|
|
487
|
+
let t2;
|
|
488
|
+
if ($[11] !== props || $[12] !== styles) {
|
|
489
|
+
t2 = "function" == typeof styles ? styles({
|
|
490
|
+
props
|
|
491
|
+
}) : styles;
|
|
492
|
+
$[11] = props;
|
|
493
|
+
$[12] = styles;
|
|
494
|
+
$[13] = t2;
|
|
495
|
+
} else t2 = $[13];
|
|
496
|
+
const css = t2;
|
|
497
|
+
const { disabled, config, hiddenMask, blurMask } = usePreviewOptions(preview);
|
|
498
|
+
let t3;
|
|
499
|
+
if ($[14] !== preview) {
|
|
500
|
+
t3 = "object" == typeof preview ? preview : {};
|
|
501
|
+
$[14] = preview;
|
|
502
|
+
$[15] = t3;
|
|
503
|
+
} else t3 = $[15];
|
|
504
|
+
const raw = t3;
|
|
505
|
+
const isProgressConfig = null !== placeholder && "object" == typeof placeholder && !/*#__PURE__*/ isValidElement(placeholder) && "progress" in placeholder;
|
|
506
|
+
const progress = isProgressConfig ? placeholder.progress : void 0;
|
|
507
|
+
if (progress || !props.src && placeholder && !isProgressConfig) {
|
|
508
|
+
let t4;
|
|
509
|
+
if ($[16] !== progress) {
|
|
510
|
+
t4 = true === progress ? {} : progress || void 0;
|
|
511
|
+
$[16] = progress;
|
|
512
|
+
$[17] = t4;
|
|
513
|
+
} else t4 = $[17];
|
|
514
|
+
const t5 = isProgressConfig ? void 0 : placeholder;
|
|
515
|
+
let t6;
|
|
516
|
+
if ($[18] !== props || $[19] !== t4 || $[20] !== t5) {
|
|
517
|
+
t6 = /*#__PURE__*/ jsx(ImageProgress, {
|
|
518
|
+
props: props,
|
|
519
|
+
progress: t4,
|
|
520
|
+
placeholder: t5
|
|
521
|
+
});
|
|
522
|
+
$[18] = props;
|
|
523
|
+
$[19] = t4;
|
|
524
|
+
$[20] = t5;
|
|
525
|
+
$[21] = t6;
|
|
526
|
+
} else t6 = $[21];
|
|
527
|
+
return t6;
|
|
528
|
+
}
|
|
529
|
+
const t4 = classes?.cover;
|
|
530
|
+
let t5;
|
|
531
|
+
if ($[22] !== raw.maskClassName || $[23] !== t4) {
|
|
532
|
+
t5 = cx(t4, raw.maskClassName);
|
|
533
|
+
$[22] = raw.maskClassName;
|
|
534
|
+
$[23] = t4;
|
|
535
|
+
$[24] = t5;
|
|
536
|
+
} else t5 = $[24];
|
|
537
|
+
let t6;
|
|
538
|
+
if ($[25] !== classes || $[26] !== t5) {
|
|
539
|
+
t6 = {
|
|
540
|
+
...classes,
|
|
541
|
+
cover: t5
|
|
542
|
+
};
|
|
543
|
+
$[25] = classes;
|
|
544
|
+
$[26] = t5;
|
|
545
|
+
$[27] = t6;
|
|
546
|
+
} else t6 = $[27];
|
|
547
|
+
const t7 = css?.root;
|
|
548
|
+
let t8;
|
|
549
|
+
if ($[28] !== t7 || $[29] !== tokenStyle || $[30] !== wrapperStyle) {
|
|
550
|
+
t8 = {
|
|
551
|
+
...tokenStyle,
|
|
552
|
+
...wrapperStyle,
|
|
553
|
+
...t7
|
|
554
|
+
};
|
|
555
|
+
$[28] = t7;
|
|
556
|
+
$[29] = tokenStyle;
|
|
557
|
+
$[30] = wrapperStyle;
|
|
558
|
+
$[31] = t8;
|
|
559
|
+
} else t8 = $[31];
|
|
560
|
+
const t9 = css?.popup;
|
|
561
|
+
const t10 = css?.popup?.root;
|
|
562
|
+
let t11;
|
|
563
|
+
if ($[32] !== t10 || $[33] !== tokenStyle) {
|
|
564
|
+
t11 = {
|
|
565
|
+
...tokenStyle,
|
|
566
|
+
...t10
|
|
567
|
+
};
|
|
568
|
+
$[32] = t10;
|
|
569
|
+
$[33] = tokenStyle;
|
|
570
|
+
$[34] = t11;
|
|
571
|
+
} else t11 = $[34];
|
|
572
|
+
let t12;
|
|
573
|
+
if ($[35] !== hiddenMask) {
|
|
574
|
+
t12 = hiddenMask ? {
|
|
575
|
+
background: "transparent"
|
|
576
|
+
} : {};
|
|
577
|
+
$[35] = hiddenMask;
|
|
578
|
+
$[36] = t12;
|
|
579
|
+
} else t12 = $[36];
|
|
580
|
+
let t13;
|
|
581
|
+
if ($[37] !== blurMask) {
|
|
582
|
+
t13 = blurMask ? {
|
|
583
|
+
backdropFilter: "blur(4px)"
|
|
584
|
+
} : {};
|
|
585
|
+
$[37] = blurMask;
|
|
586
|
+
$[38] = t13;
|
|
587
|
+
} else t13 = $[38];
|
|
588
|
+
const t14 = css?.popup?.mask;
|
|
589
|
+
let t15;
|
|
590
|
+
if ($[39] !== t12 || $[40] !== t13 || $[41] !== t14) {
|
|
591
|
+
t15 = {
|
|
592
|
+
...t12,
|
|
593
|
+
...t13,
|
|
594
|
+
...t14
|
|
595
|
+
};
|
|
596
|
+
$[39] = t12;
|
|
597
|
+
$[40] = t13;
|
|
598
|
+
$[41] = t14;
|
|
599
|
+
$[42] = t15;
|
|
600
|
+
} else t15 = $[42];
|
|
601
|
+
let t16;
|
|
602
|
+
if ($[43] !== t11 || $[44] !== t15 || $[45] !== t9) {
|
|
603
|
+
t16 = {
|
|
604
|
+
...t9,
|
|
605
|
+
root: t11,
|
|
606
|
+
mask: t15
|
|
607
|
+
};
|
|
608
|
+
$[43] = t11;
|
|
609
|
+
$[44] = t15;
|
|
610
|
+
$[45] = t9;
|
|
611
|
+
$[46] = t16;
|
|
612
|
+
} else t16 = $[46];
|
|
613
|
+
let t17;
|
|
614
|
+
if ($[47] !== css || $[48] !== t16 || $[49] !== t8) {
|
|
615
|
+
t17 = {
|
|
616
|
+
...css,
|
|
617
|
+
root: t8,
|
|
618
|
+
popup: t16
|
|
619
|
+
};
|
|
620
|
+
$[47] = css;
|
|
621
|
+
$[48] = t16;
|
|
622
|
+
$[49] = t8;
|
|
623
|
+
$[50] = t17;
|
|
624
|
+
} else t17 = $[50];
|
|
625
|
+
const t18 = isProgressConfig ? void 0 : placeholder;
|
|
626
|
+
let t19;
|
|
627
|
+
if ($[51] !== config || $[52] !== disabled || $[53] !== raw.cover || $[54] !== raw.onOpenChange || $[55] !== raw.onVisibleChange) {
|
|
628
|
+
t19 = disabled ? false : {
|
|
629
|
+
...config,
|
|
630
|
+
cover: raw.cover ?? config.cover ?? /*#__PURE__*/ jsx("span", {
|
|
631
|
+
"aria-hidden": "true",
|
|
632
|
+
children: "⌕"
|
|
633
|
+
}),
|
|
634
|
+
onOpenChange: raw.onOpenChange ?? (raw.onVisibleChange ? (open)=>raw.onVisibleChange(open, !open) : void 0)
|
|
635
|
+
};
|
|
636
|
+
$[51] = config;
|
|
637
|
+
$[52] = disabled;
|
|
638
|
+
$[53] = raw.cover;
|
|
639
|
+
$[54] = raw.onOpenChange;
|
|
640
|
+
$[55] = raw.onVisibleChange;
|
|
641
|
+
$[56] = t19;
|
|
642
|
+
} else t19 = $[56];
|
|
643
|
+
let t20;
|
|
644
|
+
if ($[57] !== prefixCls || $[58] !== rest || $[59] !== t17 || $[60] !== t18 || $[61] !== t19 || $[62] !== t6) {
|
|
645
|
+
t20 = /*#__PURE__*/ jsx("span", {
|
|
646
|
+
"data-tao-image-inline": "",
|
|
647
|
+
children: /*#__PURE__*/ jsx(RcImageComponent, {
|
|
648
|
+
...rest,
|
|
649
|
+
"data-tao-image": "",
|
|
650
|
+
prefixCls: prefixCls,
|
|
651
|
+
previewPrefixCls: "tao-image-preview",
|
|
652
|
+
classNames: t6,
|
|
653
|
+
styles: t17,
|
|
654
|
+
placeholder: t18,
|
|
655
|
+
preview: t19
|
|
656
|
+
})
|
|
657
|
+
});
|
|
658
|
+
$[57] = prefixCls;
|
|
659
|
+
$[58] = rest;
|
|
660
|
+
$[59] = t17;
|
|
661
|
+
$[60] = t18;
|
|
662
|
+
$[61] = t19;
|
|
663
|
+
$[62] = t6;
|
|
664
|
+
$[63] = t20;
|
|
665
|
+
} else t20 = $[63];
|
|
666
|
+
return t20;
|
|
667
|
+
}
|
|
668
|
+
function ImagePreviewGroup(props) {
|
|
669
|
+
const $ = c(42);
|
|
670
|
+
const { tokenStyle } = useTaoInternalConfig();
|
|
671
|
+
let children;
|
|
672
|
+
let classNames;
|
|
673
|
+
let preview;
|
|
674
|
+
let rest;
|
|
675
|
+
let styles;
|
|
676
|
+
if ($[0] !== props) {
|
|
677
|
+
({ preview, classNames, styles, children, ...rest } = props);
|
|
678
|
+
$[0] = props;
|
|
679
|
+
$[1] = children;
|
|
680
|
+
$[2] = classNames;
|
|
681
|
+
$[3] = preview;
|
|
682
|
+
$[4] = rest;
|
|
683
|
+
$[5] = styles;
|
|
684
|
+
} else {
|
|
685
|
+
children = $[1];
|
|
686
|
+
classNames = $[2];
|
|
687
|
+
preview = $[3];
|
|
688
|
+
rest = $[4];
|
|
689
|
+
styles = $[5];
|
|
690
|
+
}
|
|
691
|
+
let t0;
|
|
692
|
+
if ($[6] !== classNames || $[7] !== props) {
|
|
693
|
+
t0 = "function" == typeof classNames ? classNames({
|
|
694
|
+
props: props
|
|
695
|
+
}) : classNames;
|
|
696
|
+
$[6] = classNames;
|
|
697
|
+
$[7] = props;
|
|
698
|
+
$[8] = t0;
|
|
699
|
+
} else t0 = $[8];
|
|
700
|
+
const classes = t0;
|
|
701
|
+
let t1;
|
|
702
|
+
if ($[9] !== props || $[10] !== styles) {
|
|
703
|
+
t1 = "function" == typeof styles ? styles({
|
|
704
|
+
props: props
|
|
705
|
+
}) : styles;
|
|
706
|
+
$[9] = props;
|
|
707
|
+
$[10] = styles;
|
|
708
|
+
$[11] = t1;
|
|
709
|
+
} else t1 = $[11];
|
|
710
|
+
const css = t1;
|
|
711
|
+
const { disabled, config, hiddenMask, blurMask } = usePreviewOptions(preview);
|
|
712
|
+
let t2;
|
|
713
|
+
if ($[12] !== preview) {
|
|
714
|
+
t2 = "object" == typeof preview ? preview : {};
|
|
715
|
+
$[12] = preview;
|
|
716
|
+
$[13] = t2;
|
|
717
|
+
} else t2 = $[13];
|
|
718
|
+
const raw = t2;
|
|
719
|
+
const t3 = css?.popup;
|
|
720
|
+
const t4 = css?.popup?.root;
|
|
721
|
+
let t5;
|
|
722
|
+
if ($[14] !== t4 || $[15] !== tokenStyle) {
|
|
723
|
+
t5 = {
|
|
724
|
+
...tokenStyle,
|
|
725
|
+
...t4
|
|
726
|
+
};
|
|
727
|
+
$[14] = t4;
|
|
728
|
+
$[15] = tokenStyle;
|
|
729
|
+
$[16] = t5;
|
|
730
|
+
} else t5 = $[16];
|
|
731
|
+
let t6;
|
|
732
|
+
if ($[17] !== hiddenMask) {
|
|
733
|
+
t6 = hiddenMask ? {
|
|
734
|
+
background: "transparent"
|
|
735
|
+
} : {};
|
|
736
|
+
$[17] = hiddenMask;
|
|
737
|
+
$[18] = t6;
|
|
738
|
+
} else t6 = $[18];
|
|
739
|
+
let t7;
|
|
740
|
+
if ($[19] !== blurMask) {
|
|
741
|
+
t7 = blurMask ? {
|
|
742
|
+
backdropFilter: "blur(4px)"
|
|
743
|
+
} : {};
|
|
744
|
+
$[19] = blurMask;
|
|
745
|
+
$[20] = t7;
|
|
746
|
+
} else t7 = $[20];
|
|
747
|
+
const t8 = css?.popup?.mask;
|
|
748
|
+
let t9;
|
|
749
|
+
if ($[21] !== t6 || $[22] !== t7 || $[23] !== t8) {
|
|
750
|
+
t9 = {
|
|
751
|
+
...t6,
|
|
752
|
+
...t7,
|
|
753
|
+
...t8
|
|
754
|
+
};
|
|
755
|
+
$[21] = t6;
|
|
756
|
+
$[22] = t7;
|
|
757
|
+
$[23] = t8;
|
|
758
|
+
$[24] = t9;
|
|
759
|
+
} else t9 = $[24];
|
|
760
|
+
let t10;
|
|
761
|
+
if ($[25] !== t3 || $[26] !== t5 || $[27] !== t9) {
|
|
762
|
+
t10 = {
|
|
763
|
+
...t3,
|
|
764
|
+
root: t5,
|
|
765
|
+
mask: t9
|
|
766
|
+
};
|
|
767
|
+
$[25] = t3;
|
|
768
|
+
$[26] = t5;
|
|
769
|
+
$[27] = t9;
|
|
770
|
+
$[28] = t10;
|
|
771
|
+
} else t10 = $[28];
|
|
772
|
+
let t11;
|
|
773
|
+
if ($[29] !== css || $[30] !== t10) {
|
|
774
|
+
t11 = {
|
|
775
|
+
...css,
|
|
776
|
+
popup: t10
|
|
777
|
+
};
|
|
778
|
+
$[29] = css;
|
|
779
|
+
$[30] = t10;
|
|
780
|
+
$[31] = t11;
|
|
781
|
+
} else t11 = $[31];
|
|
782
|
+
let t12;
|
|
783
|
+
if ($[32] !== config || $[33] !== disabled || $[34] !== raw) {
|
|
784
|
+
t12 = disabled ? false : {
|
|
785
|
+
...config,
|
|
786
|
+
onOpenChange: raw.onOpenChange ?? (raw.onVisibleChange ? (open, info)=>raw.onVisibleChange(open, !open, info.current) : void 0)
|
|
787
|
+
};
|
|
788
|
+
$[32] = config;
|
|
789
|
+
$[33] = disabled;
|
|
790
|
+
$[34] = raw;
|
|
791
|
+
$[35] = t12;
|
|
792
|
+
} else t12 = $[35];
|
|
793
|
+
let t13;
|
|
794
|
+
if ($[36] !== children || $[37] !== classes || $[38] !== rest || $[39] !== t11 || $[40] !== t12) {
|
|
795
|
+
t13 = /*#__PURE__*/ jsx("span", {
|
|
796
|
+
"data-tao-image-group": "",
|
|
797
|
+
children: /*#__PURE__*/ jsx(RcImageComponent.PreviewGroup, {
|
|
798
|
+
...rest,
|
|
799
|
+
previewPrefixCls: "tao-image-preview",
|
|
800
|
+
classNames: classes,
|
|
801
|
+
styles: t11,
|
|
802
|
+
preview: t12,
|
|
803
|
+
children: children
|
|
804
|
+
})
|
|
805
|
+
});
|
|
806
|
+
$[36] = children;
|
|
807
|
+
$[37] = classes;
|
|
808
|
+
$[38] = rest;
|
|
809
|
+
$[39] = t11;
|
|
810
|
+
$[40] = t12;
|
|
811
|
+
$[41] = t13;
|
|
812
|
+
} else t13 = $[41];
|
|
813
|
+
return t13;
|
|
814
|
+
}
|
|
815
|
+
const Image = Object.assign(ImageBase, {
|
|
816
|
+
PreviewGroup: ImagePreviewGroup
|
|
817
|
+
});
|
|
818
|
+
export { Image, ImagePreviewGroup };
|