@canlooks/can-ui 0.0.41 → 0.0.43
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/dist/cjs/components/alert/alert.style.js +1 -0
- package/dist/cjs/components/checkboxBase/checkboxBase.js +1 -2
- package/dist/cjs/components/checkboxBaseGroup/checkboxBaseGroup.d.ts +0 -2
- package/dist/cjs/components/checkboxBaseGroup/checkboxBaseGroup.js +3 -3
- package/dist/cjs/components/clickAway/clickAway.d.ts +285 -1
- package/dist/cjs/components/clickAway/clickAway.js +1 -2
- package/dist/cjs/components/dataGrid/columnResize.js +5 -5
- package/dist/cjs/components/dataGrid/dataGrid.js +1 -1
- package/dist/cjs/components/dataGrid/dataGridRows.js +3 -1
- package/dist/cjs/components/descriptions/descriptionItem.d.ts +3 -3
- package/dist/cjs/components/draggable/draggable.d.ts +6 -6
- package/dist/cjs/components/draggable/draggable.js +13 -18
- package/dist/cjs/components/{image/imagePreview.d.ts → gallery/gallery.d.ts} +7 -3
- package/dist/cjs/components/gallery/gallery.js +165 -0
- package/dist/{esm/components/image/imagePreview.style.d.ts → cjs/components/gallery/gallery.style.d.ts} +3 -1
- package/dist/cjs/components/{image/imagePreview.style.js → gallery/gallery.style.js} +49 -13
- package/dist/cjs/components/gallery/imageItem.d.ts +14 -0
- package/dist/cjs/components/gallery/imageItem.js +51 -0
- package/dist/cjs/components/gallery/index.d.ts +1 -0
- package/dist/cjs/components/gallery/index.js +4 -0
- package/dist/cjs/components/image/image.d.ts +2 -2
- package/dist/cjs/components/image/image.js +3 -3
- package/dist/cjs/components/image/index.d.ts +0 -1
- package/dist/cjs/components/image/index.js +0 -1
- package/dist/cjs/components/overlayBase/overlayBase.js +1 -1
- package/dist/cjs/components/palette/palette.d.ts +3 -3
- package/dist/cjs/components/palette/palette.js +9 -9
- package/dist/cjs/components/pickerDialog/pickerDialog.style.js +6 -0
- package/dist/cjs/components/pinchable/index.d.ts +1 -0
- package/dist/cjs/components/pinchable/index.js +4 -0
- package/dist/cjs/components/pinchable/pinchable.d.ts +33 -0
- package/dist/cjs/components/pinchable/pinchable.js +160 -0
- package/dist/cjs/components/pinchable/pinchable.style.d.ts +6 -0
- package/dist/cjs/components/pinchable/pinchable.style.js +21 -0
- package/dist/cjs/components/placeholder/placeholder.style.js +1 -0
- package/dist/cjs/components/progress/progress.d.ts +1 -1
- package/dist/cjs/components/rating/rating.d.ts +2 -2
- package/dist/cjs/components/rating/rating.js +2 -5
- package/dist/cjs/components/rating/rating.style.js +1 -2
- package/dist/cjs/components/resizable/resizable.d.ts +2 -2
- package/dist/cjs/components/resizable/resizable.js +12 -12
- package/dist/cjs/components/scrollbar/scrollbar.d.ts +1 -1
- package/dist/cjs/components/scrollbar/scrollbar.js +6 -6
- package/dist/cjs/components/segmented/SegmentedOption.d.ts +1 -1
- package/dist/cjs/components/selectedList/selectedItem.js +1 -1
- package/dist/cjs/components/selectedList/selectedList.style.js +1 -1
- package/dist/cjs/components/skeleton/skeleton.d.ts +1 -1
- package/dist/cjs/components/slidableActions/slidableActions.d.ts +9 -5
- package/dist/cjs/components/slidableActions/slidableActions.js +21 -25
- package/dist/cjs/components/slidableActions/slidableActions.style.d.ts +1 -1
- package/dist/cjs/components/slidableActions/slidableActions.style.js +14 -13
- package/dist/cjs/components/slidableActions/slidableActionsAction.d.ts +4 -2
- package/dist/cjs/components/slidableActions/slidableActionsAction.js +6 -2
- package/dist/cjs/components/slider/slider.d.ts +3 -3
- package/dist/cjs/components/slider/slider.js +8 -8
- package/dist/cjs/components/tabs/tabs.js +1 -1
- package/dist/cjs/components/theme/themeVariables.js +1 -1
- package/dist/cjs/components/upload/itemStatus.d.ts +1 -1
- package/dist/cjs/components/upload/itemStatus.js +3 -0
- package/dist/cjs/components/upload/upload.d.ts +3 -3
- package/dist/cjs/components/upload/upload.js +1 -1
- package/dist/cjs/extensions/documentViewer/documentViewer.js +1 -2
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/utils/dnd.d.ts +0 -42
- package/dist/cjs/utils/dnd.js +0 -121
- package/dist/cjs/utils/gesture.d.ts +69 -0
- package/dist/cjs/utils/gesture.js +250 -0
- package/dist/cjs/utils/index.d.ts +1 -0
- package/dist/cjs/utils/index.js +1 -0
- package/dist/cjs/utils/style.js +1 -1
- package/dist/cjs/utils/utils.d.ts +0 -2
- package/dist/cjs/utils/utils.js +0 -2
- package/dist/esm/components/alert/alert.style.js +1 -0
- package/dist/esm/components/checkboxBase/checkboxBase.js +1 -2
- package/dist/esm/components/checkboxBaseGroup/checkboxBaseGroup.d.ts +0 -2
- package/dist/esm/components/checkboxBaseGroup/checkboxBaseGroup.js +4 -4
- package/dist/esm/components/clickAway/clickAway.d.ts +285 -1
- package/dist/esm/components/clickAway/clickAway.js +2 -3
- package/dist/esm/components/dataGrid/columnResize.js +6 -6
- package/dist/esm/components/dataGrid/dataGrid.js +1 -1
- package/dist/esm/components/dataGrid/dataGridRows.js +3 -1
- package/dist/esm/components/descriptions/descriptionItem.d.ts +3 -3
- package/dist/esm/components/draggable/draggable.d.ts +6 -6
- package/dist/esm/components/draggable/draggable.js +14 -19
- package/dist/esm/components/{image/imagePreview.d.ts → gallery/gallery.d.ts} +7 -3
- package/dist/esm/components/gallery/gallery.js +162 -0
- package/dist/{cjs/components/image/imagePreview.style.d.ts → esm/components/gallery/gallery.style.d.ts} +3 -1
- package/dist/esm/components/{image/imagePreview.style.js → gallery/gallery.style.js} +49 -13
- package/dist/esm/components/gallery/imageItem.d.ts +14 -0
- package/dist/esm/components/gallery/imageItem.js +48 -0
- package/dist/esm/components/gallery/index.d.ts +1 -0
- package/dist/esm/components/gallery/index.js +1 -0
- package/dist/esm/components/image/image.d.ts +2 -2
- package/dist/esm/components/image/image.js +3 -3
- package/dist/esm/components/image/index.d.ts +0 -1
- package/dist/esm/components/image/index.js +0 -1
- package/dist/esm/components/overlayBase/overlayBase.js +1 -1
- package/dist/esm/components/palette/palette.d.ts +3 -3
- package/dist/esm/components/palette/palette.js +10 -10
- package/dist/esm/components/pickerDialog/pickerDialog.style.js +6 -0
- package/dist/esm/components/pinchable/index.d.ts +1 -0
- package/dist/esm/components/pinchable/index.js +1 -0
- package/dist/esm/components/pinchable/pinchable.d.ts +33 -0
- package/dist/esm/components/pinchable/pinchable.js +157 -0
- package/dist/esm/components/pinchable/pinchable.style.d.ts +6 -0
- package/dist/esm/components/pinchable/pinchable.style.js +18 -0
- package/dist/esm/components/placeholder/placeholder.style.js +1 -0
- package/dist/esm/components/progress/progress.d.ts +1 -1
- package/dist/esm/components/rating/rating.d.ts +2 -2
- package/dist/esm/components/rating/rating.js +2 -5
- package/dist/esm/components/rating/rating.style.js +1 -2
- package/dist/esm/components/resizable/resizable.d.ts +2 -2
- package/dist/esm/components/resizable/resizable.js +13 -13
- package/dist/esm/components/scrollbar/scrollbar.d.ts +1 -1
- package/dist/esm/components/scrollbar/scrollbar.js +7 -7
- package/dist/esm/components/segmented/SegmentedOption.d.ts +1 -1
- package/dist/esm/components/selectedList/selectedItem.js +1 -1
- package/dist/esm/components/selectedList/selectedList.style.js +1 -1
- package/dist/esm/components/skeleton/skeleton.d.ts +1 -1
- package/dist/esm/components/slidableActions/slidableActions.d.ts +9 -5
- package/dist/esm/components/slidableActions/slidableActions.js +22 -26
- package/dist/esm/components/slidableActions/slidableActions.style.d.ts +1 -1
- package/dist/esm/components/slidableActions/slidableActions.style.js +14 -13
- package/dist/esm/components/slidableActions/slidableActionsAction.d.ts +4 -2
- package/dist/esm/components/slidableActions/slidableActionsAction.js +6 -2
- package/dist/esm/components/slider/slider.d.ts +3 -3
- package/dist/esm/components/slider/slider.js +9 -9
- package/dist/esm/components/tabs/tabs.js +1 -1
- package/dist/esm/components/theme/themeVariables.js +1 -1
- package/dist/esm/components/upload/itemStatus.d.ts +1 -1
- package/dist/esm/components/upload/itemStatus.js +3 -0
- package/dist/esm/components/upload/upload.d.ts +3 -3
- package/dist/esm/components/upload/upload.js +1 -1
- package/dist/esm/extensions/documentViewer/documentViewer.js +2 -3
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/utils/dnd.d.ts +0 -42
- package/dist/esm/utils/dnd.js +0 -120
- package/dist/esm/utils/gesture.d.ts +69 -0
- package/dist/esm/utils/gesture.js +245 -0
- package/dist/esm/utils/index.d.ts +1 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/style.js +1 -1
- package/dist/esm/utils/utils.d.ts +0 -2
- package/dist/esm/utils/utils.js +0 -2
- package/documentation/dist/assets/{index-B6FOULC1.js → index-DXo4Z-bc.js} +1281 -1271
- package/documentation/dist/components/actionSheet.md +3 -3
- package/documentation/dist/components/autocomplete.md +10 -10
- package/documentation/dist/components/breadcrumb.md +1 -1
- package/documentation/dist/components/checkbox.md +24 -1
- package/documentation/dist/components/contextMenu.md +1 -1
- package/documentation/dist/components/counter.md +13 -13
- package/documentation/dist/components/dialog.md +3 -3
- package/documentation/dist/components/formDialog.md +6 -6
- package/documentation/dist/components/image.md +5 -3
- package/documentation/dist/components/menu.md +1 -1
- package/documentation/dist/components/pagination.md +15 -1
- package/documentation/dist/components/pickerDialog.md +56 -0
- package/documentation/dist/components/placeholder.md +30 -0
- package/documentation/dist/components/progress.md +43 -0
- package/documentation/dist/components/radio.md +37 -0
- package/documentation/dist/components/rating.md +35 -0
- package/documentation/dist/components/resizable.md +41 -0
- package/documentation/dist/components/scrollbar.md +31 -0
- package/documentation/dist/components/segmented.md +56 -0
- package/documentation/dist/components/select.md +30 -0
- package/documentation/dist/components/skeleton.md +26 -0
- package/documentation/dist/components/slidableActions.md +53 -0
- package/documentation/dist/guide/globalMethods.md +6 -6
- package/documentation/dist/index.html +1 -1
- package/package.json +6 -6
- package/dist/cjs/components/image/imagePreview.js +0 -63
- package/dist/esm/components/image/imagePreview.js +0 -60
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Gallery = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const modal_1 = require("../modal");
|
|
7
|
+
const utils_1 = require("../../utils");
|
|
8
|
+
const gallery_style_1 = require("./gallery.style");
|
|
9
|
+
const button_1 = require("../button");
|
|
10
|
+
const tooltip_1 = require("../tooltip");
|
|
11
|
+
const __1 = require("../..");
|
|
12
|
+
const faXmark_1 = require("@fortawesome/free-solid-svg-icons/faXmark");
|
|
13
|
+
const faExpand_1 = require("@fortawesome/free-solid-svg-icons/faExpand");
|
|
14
|
+
const faAngleLeft_1 = require("@fortawesome/free-solid-svg-icons/faAngleLeft");
|
|
15
|
+
const faAngleRight_1 = require("@fortawesome/free-solid-svg-icons/faAngleRight");
|
|
16
|
+
const faArrowRotateLeft_1 = require("@fortawesome/free-solid-svg-icons/faArrowRotateLeft");
|
|
17
|
+
const faArrowRotateRight_1 = require("@fortawesome/free-solid-svg-icons/faArrowRotateRight");
|
|
18
|
+
const faMagnifyingGlassPlus_1 = require("@fortawesome/free-solid-svg-icons/faMagnifyingGlassPlus");
|
|
19
|
+
const faMagnifyingGlassMinus_1 = require("@fortawesome/free-solid-svg-icons/faMagnifyingGlassMinus");
|
|
20
|
+
const imageItem_1 = require("./imageItem");
|
|
21
|
+
const commonControlProps = {
|
|
22
|
+
className: gallery_style_1.classes.button,
|
|
23
|
+
shape: 'circular',
|
|
24
|
+
size: 'large',
|
|
25
|
+
color: 'text'
|
|
26
|
+
};
|
|
27
|
+
const bounceBezier = (0, utils_1.cubicBezier)(0, 0, 0, 1);
|
|
28
|
+
exports.Gallery = (0, react_1.memo)(({ src = [], defaultIndex = 0, index, onIndexChange, defaultOpen = false, open, onOpenChange, showRotation = true, showZoom = true, showClose = true, renderControl, bounceElementTranslate = 24, bounceDragDistance = 240, effectiveSpeed = 450, ...props }) => {
|
|
29
|
+
const srcArr = (0, utils_1.useSync)((0, utils_1.toArray)(src));
|
|
30
|
+
const [innerOpen, setInnerOpen] = (0, utils_1.useControlled)(defaultOpen, open, onOpenChange);
|
|
31
|
+
const close = () => {
|
|
32
|
+
setInnerOpen(false);
|
|
33
|
+
};
|
|
34
|
+
const [innerIndex, setInnerIndex] = (0, utils_1.useControlled)(defaultIndex, index, onIndexChange);
|
|
35
|
+
const wrapperRef = (0, react_1.useRef)(null);
|
|
36
|
+
const imageItemRefs = (0, react_1.useRef)([]);
|
|
37
|
+
imageItemRefs.current = [];
|
|
38
|
+
/**
|
|
39
|
+
* --------------------------------------------------------------
|
|
40
|
+
* 左右滚动翻页
|
|
41
|
+
*/
|
|
42
|
+
const draggableHandles = (0, utils_1.useDraggable)({
|
|
43
|
+
onDragStart() {
|
|
44
|
+
wrapperRef.current.dataset.transition = 'drag';
|
|
45
|
+
return {
|
|
46
|
+
isFit: imageItemRefs.current[innerIndex.current].isFit(),
|
|
47
|
+
startLeft: -innerIndex.current * wrapperRef.current.offsetWidth
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
onDrag({ diff: [dx], data: { isFit: { left, right }, startLeft } }) {
|
|
51
|
+
if ((!left && dx > 0) || (!right && dx < 0)) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const min = -wrapperRef.current.offsetWidth * (srcArr.current.length - 1);
|
|
55
|
+
const max = 0;
|
|
56
|
+
let newLeft = (0, utils_1.range)(startLeft + dx, min - bounceDragDistance, max + bounceDragDistance);
|
|
57
|
+
if (newLeft < min) {
|
|
58
|
+
newLeft = min - bounceBezier(-(newLeft - min) / bounceDragDistance) * bounceElementTranslate;
|
|
59
|
+
}
|
|
60
|
+
else if (newLeft > max) {
|
|
61
|
+
newLeft = max + bounceBezier((newLeft - max) / bounceDragDistance) * bounceElementTranslate;
|
|
62
|
+
}
|
|
63
|
+
wrapperRef.current.style.left = newLeft + 'px';
|
|
64
|
+
},
|
|
65
|
+
onDragEnd({ diff: [dx], speed: [speedX], data: { isFit: { left, right } } }) {
|
|
66
|
+
wrapperRef.current.dataset.transition = '';
|
|
67
|
+
if (!dx) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if ((!left && dx > 0) || (!right && dx < 0)) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
alowSlideTransition();
|
|
74
|
+
const reset = () => {
|
|
75
|
+
wrapperRef.current.style.left = -innerIndex.current * wrapperRef.current.offsetWidth + 'px';
|
|
76
|
+
};
|
|
77
|
+
const goPrev = () => {
|
|
78
|
+
innerIndex.current === 0
|
|
79
|
+
? reset()
|
|
80
|
+
: goPrevLoop();
|
|
81
|
+
};
|
|
82
|
+
const goNext = () => {
|
|
83
|
+
innerIndex.current === srcArr.current.length - 1
|
|
84
|
+
? reset()
|
|
85
|
+
: goNextLoop();
|
|
86
|
+
};
|
|
87
|
+
if (effectiveSpeed && speedX * 1000 >= effectiveSpeed) {
|
|
88
|
+
dx > 0 ? goPrev() : goNext();
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const halfWidth = wrapperRef.current.offsetWidth / 2;
|
|
92
|
+
if (dx > halfWidth) {
|
|
93
|
+
goPrev();
|
|
94
|
+
}
|
|
95
|
+
else if (dx < -halfWidth) {
|
|
96
|
+
goNext();
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
reset();
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
onClick: () => {
|
|
103
|
+
doubleClicked.current = false;
|
|
104
|
+
setTimeout(() => {
|
|
105
|
+
!doubleClicked.current && close();
|
|
106
|
+
}, 250);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
const doubleClicked = (0, react_1.useRef)(false);
|
|
110
|
+
const doubleClickHandler = () => {
|
|
111
|
+
doubleClicked.current = true;
|
|
112
|
+
};
|
|
113
|
+
const alowSlideTransition = () => {
|
|
114
|
+
wrapperRef.current && (wrapperRef.current.dataset.transition = 'set');
|
|
115
|
+
};
|
|
116
|
+
const goPrevLoop = () => {
|
|
117
|
+
alowSlideTransition();
|
|
118
|
+
setInnerIndex(o => {
|
|
119
|
+
imageItemRefs.current[o].reset();
|
|
120
|
+
return (o + srcArr.current.length - 1) % srcArr.current.length;
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
const goNextLoop = () => {
|
|
124
|
+
alowSlideTransition();
|
|
125
|
+
setInnerIndex(o => {
|
|
126
|
+
imageItemRefs.current[o].reset();
|
|
127
|
+
return (o + 1) % srcArr.current.length;
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* -----------------------------------------------------------------------------
|
|
132
|
+
* 放大缩小与旋转
|
|
133
|
+
*/
|
|
134
|
+
const rotateLeft = () => {
|
|
135
|
+
imageItemRefs.current[innerIndex.current].rotateLeft();
|
|
136
|
+
};
|
|
137
|
+
const rotateRight = () => {
|
|
138
|
+
imageItemRefs.current[innerIndex.current].rotateRight();
|
|
139
|
+
};
|
|
140
|
+
const zoomIn = () => {
|
|
141
|
+
imageItemRefs.current[innerIndex.current].zoomIn();
|
|
142
|
+
};
|
|
143
|
+
const zoomOut = () => {
|
|
144
|
+
imageItemRefs.current[innerIndex.current].zoomOut();
|
|
145
|
+
};
|
|
146
|
+
const reset = () => {
|
|
147
|
+
imageItemRefs.current[innerIndex.current].reset();
|
|
148
|
+
};
|
|
149
|
+
const resetAll = () => {
|
|
150
|
+
imageItemRefs.current.forEach(item => {
|
|
151
|
+
item.reset(false);
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
return ((0, jsx_runtime_1.jsx)(modal_1.Modal, { ...props, css: gallery_style_1.style, className: (0, utils_1.clsx)(gallery_style_1.classes.root, props.className), open: innerOpen.current, onClosed: resetAll, maskProps: {
|
|
155
|
+
...props.maskProps,
|
|
156
|
+
children: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: gallery_style_1.classes.control, children: [renderControl, showRotation &&
|
|
157
|
+
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { title: "\u65CB\u8F6C-90\u00B0", children: (0, jsx_runtime_1.jsx)(button_1.Button, { ...commonControlProps, onClick: rotateLeft, children: (0, jsx_runtime_1.jsx)(__1.Icon, { icon: faArrowRotateLeft_1.faArrowRotateLeft }) }) }), (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { title: "\u65CB\u8F6C90\u00B0", children: (0, jsx_runtime_1.jsx)(button_1.Button, { ...commonControlProps, onClick: rotateRight, children: (0, jsx_runtime_1.jsx)(__1.Icon, { icon: faArrowRotateRight_1.faArrowRotateRight }) }) })] }), showZoom &&
|
|
158
|
+
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { title: "\u7F29\u5C0F", children: (0, jsx_runtime_1.jsx)(button_1.Button, { ...commonControlProps, onClick: zoomOut, children: (0, jsx_runtime_1.jsx)(__1.Icon, { icon: faMagnifyingGlassMinus_1.faMagnifyingGlassMinus }) }) }), (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { title: "\u653E\u5927", children: (0, jsx_runtime_1.jsx)(button_1.Button, { ...commonControlProps, onClick: zoomIn, children: (0, jsx_runtime_1.jsx)(__1.Icon, { icon: faMagnifyingGlassPlus_1.faMagnifyingGlassPlus }) }) }), (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { title: "\u9002\u5E94\u5C4F\u5E55", children: (0, jsx_runtime_1.jsx)(button_1.Button, { ...commonControlProps, onClick: reset, children: (0, jsx_runtime_1.jsx)(__1.Icon, { icon: faExpand_1.faExpand }) }) })] }), showClose &&
|
|
159
|
+
(0, jsx_runtime_1.jsx)(button_1.Button, { ...commonControlProps, onClick: close, children: (0, jsx_runtime_1.jsx)(__1.Icon, { icon: faXmark_1.faXmark }) })] }), srcArr.current.length > 1 &&
|
|
160
|
+
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: gallery_style_1.classes.swap, children: [(0, jsx_runtime_1.jsx)(button_1.Button, { ...commonControlProps, onClick: goPrevLoop, children: (0, jsx_runtime_1.jsx)(__1.Icon, { icon: faAngleLeft_1.faAngleLeft }) }), (0, jsx_runtime_1.jsx)(button_1.Button, { ...commonControlProps, onClick: goNextLoop, children: (0, jsx_runtime_1.jsx)(__1.Icon, { icon: faAngleRight_1.faAngleRight }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: gallery_style_1.classes.counter, children: [innerIndex.current + 1, " / ", srcArr.current.length] })] })] }))
|
|
161
|
+
}, children: srcArr.current.length > 0 &&
|
|
162
|
+
(0, jsx_runtime_1.jsx)("div", { className: gallery_style_1.classes.galleryContainer, ...draggableHandles, onDoubleClick: doubleClickHandler, children: (0, jsx_runtime_1.jsx)("div", { ref: wrapperRef, className: gallery_style_1.classes.galleryWrapper, style: { left: -innerIndex.current * 100 + '%' }, onTransitionEnd: e => e.currentTarget.dataset.transition = '', children: srcArr.current.map((src, i) => (0, jsx_runtime_1.jsx)(imageItem_1.ImageItem, { ref: r => {
|
|
163
|
+
r && imageItemRefs.current.push(r);
|
|
164
|
+
}, style: { left: i * 100 + '%' }, src: src }, i)) }) }) }));
|
|
165
|
+
});
|
|
@@ -9,10 +9,12 @@ exports.classes = (0, utils_1.defineInnerClasses)('image-preview', [
|
|
|
9
9
|
'control',
|
|
10
10
|
'swap',
|
|
11
11
|
'counter',
|
|
12
|
-
'
|
|
12
|
+
'galleryContainer',
|
|
13
|
+
'galleryWrapper',
|
|
14
|
+
'imageItem',
|
|
13
15
|
'image'
|
|
14
16
|
]);
|
|
15
|
-
exports.style = (0, utils_1.defineCss)(({ spacing, easing }) => (0, react_1.css) `
|
|
17
|
+
exports.style = (0, utils_1.defineCss)(({ spacing, easing, breakpoints }) => (0, react_1.css) `
|
|
16
18
|
.${exports.classes.control} {
|
|
17
19
|
display: flex;
|
|
18
20
|
gap: ${spacing[4]}px;
|
|
@@ -52,11 +54,11 @@ exports.style = (0, utils_1.defineCss)(({ spacing, easing }) => (0, react_1.css)
|
|
|
52
54
|
background-image: none !important;
|
|
53
55
|
background-color: rgba(0, 0, 0, .4);
|
|
54
56
|
transition: background-color .25s ${easing.easeOut};
|
|
55
|
-
|
|
57
|
+
|
|
56
58
|
&:hover {
|
|
57
59
|
background-color: rgba(0, 0, 0, .3);
|
|
58
60
|
}
|
|
59
|
-
|
|
61
|
+
|
|
60
62
|
&:active {
|
|
61
63
|
transition: background-color 0s;
|
|
62
64
|
background-color: rgba(0, 0, 0, .5);
|
|
@@ -71,17 +73,51 @@ exports.style = (0, utils_1.defineCss)(({ spacing, easing }) => (0, react_1.css)
|
|
|
71
73
|
padding: 0;
|
|
72
74
|
}
|
|
73
75
|
|
|
74
|
-
.${exports.classes.
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
.${exports.classes.galleryContainer} {
|
|
77
|
+
&, .${exports.classes.galleryWrapper}, .${exports.classes.imageItem}, .${exports.classes.image} {
|
|
78
|
+
width: 100%;
|
|
79
|
+
height: 100%;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
position: relative;
|
|
77
84
|
|
|
78
|
-
.${exports.classes.
|
|
79
|
-
|
|
85
|
+
.${exports.classes.galleryWrapper} {
|
|
86
|
+
&, .${exports.classes.imageItem} {
|
|
87
|
+
position: absolute;
|
|
88
|
+
top: 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&[data-transition=set] {
|
|
92
|
+
transition: left .5s ${easing.bounce} 0s;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&[data-transition=drag] {
|
|
96
|
+
transition: left .1s linear;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.${exports.classes.imageItem} {
|
|
100
|
+
padding: 90px;
|
|
101
|
+
|
|
102
|
+
.${exports.classes.image} {
|
|
103
|
+
object-fit: contain;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@media (max-width: ${breakpoints.sm}px) {
|
|
110
|
+
.${exports.classes.control}, .${exports.classes.swap}, .${exports.classes.button} {
|
|
111
|
+
display: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.${exports.classes.galleryContainer} .${exports.classes.galleryWrapper} {
|
|
115
|
+
&[data-transition=true] {
|
|
116
|
+
transition: left .4s ${easing.ease};
|
|
117
|
+
}
|
|
80
118
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
max-height: 100%;
|
|
84
|
-
transition: rotate .4s ${easing.easeOut};
|
|
119
|
+
.${exports.classes.imageItem} {
|
|
120
|
+
padding: 0;
|
|
85
121
|
}
|
|
86
122
|
}
|
|
87
123
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
import { PinchableProps, PinchableRef } from '../pinchable';
|
|
3
|
+
export interface ImageItemRef extends PinchableRef {
|
|
4
|
+
isFit(): {
|
|
5
|
+
left: boolean;
|
|
6
|
+
right: boolean;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
interface ImageItemProps extends PinchableProps {
|
|
10
|
+
ref?: Ref<ImageItemRef>;
|
|
11
|
+
src?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function ImageItem({ ref, src, ...props }: ImageItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageItem = ImageItem;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const gallery_style_1 = require("./gallery.style");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const utils_1 = require("../../utils");
|
|
8
|
+
const pinchable_1 = require("../pinchable");
|
|
9
|
+
function ImageItem({ ref, src, ...props }) {
|
|
10
|
+
(0, react_1.useImperativeHandle)(ref, () => {
|
|
11
|
+
if (pinchableRef.current) {
|
|
12
|
+
pinchableRef.current.isFit = () => {
|
|
13
|
+
const { x: pinchableX, width: pinchableWidth } = pinchableRef.current.getBoundingClientRect();
|
|
14
|
+
const { x: imgX, width: imgWidth } = imgRef.current.getBoundingClientRect();
|
|
15
|
+
return {
|
|
16
|
+
left: imgX >= pinchableX,
|
|
17
|
+
right: imgX + imgWidth <= pinchableX + pinchableWidth
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
return pinchableRef.current;
|
|
22
|
+
});
|
|
23
|
+
const pinchableRef = (0, react_1.useRef)(null);
|
|
24
|
+
const imgRef = (0, react_1.useRef)(null);
|
|
25
|
+
const fitSize = () => {
|
|
26
|
+
const img = imgRef.current;
|
|
27
|
+
const imgRatio = img.naturalWidth / img.naturalHeight;
|
|
28
|
+
const pinchableRatio = pinchableRef.current.clientWidth / pinchableRef.current.clientHeight;
|
|
29
|
+
if (imgRatio >= pinchableRatio) {
|
|
30
|
+
img.style.width = '100%';
|
|
31
|
+
img.style.height = 'auto';
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
img.style.width = 'auto';
|
|
35
|
+
img.style.height = '100%';
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
(0, react_1.useEffect)(() => {
|
|
39
|
+
!imgRef.current.complete && imgRef.current.addEventListener('load', fitSize, { once: true });
|
|
40
|
+
}, []);
|
|
41
|
+
(0, react_1.useEffect)(() => {
|
|
42
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
43
|
+
imgRef.current.complete && fitSize();
|
|
44
|
+
});
|
|
45
|
+
resizeObserver.observe(pinchableRef.current);
|
|
46
|
+
return () => {
|
|
47
|
+
resizeObserver.disconnect();
|
|
48
|
+
};
|
|
49
|
+
}, []);
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)(pinchable_1.Pinchable, { ref: pinchableRef, className: (0, utils_1.clsx)(gallery_style_1.classes.imageItem, props.className), ...props, children: (0, jsx_runtime_1.jsx)("img", { ref: imgRef, className: gallery_style_1.classes.image, src: src, draggable: false, alt: "" }) }));
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './gallery';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { CSSProperties, ReactNode, JSX, ReactElement } from 'react';
|
|
2
2
|
import { DivProps } from '../../types';
|
|
3
|
-
import {
|
|
3
|
+
import { Gallery, ImagePreviewProps } from '../gallery/gallery';
|
|
4
4
|
export interface ImageProps extends DivProps {
|
|
5
5
|
src?: string;
|
|
6
6
|
fallback?: string;
|
|
@@ -20,5 +20,5 @@ export interface ImageProps extends DivProps {
|
|
|
20
20
|
}
|
|
21
21
|
export declare const Image: {
|
|
22
22
|
(props: ImageProps): ReactElement;
|
|
23
|
-
|
|
23
|
+
Gallery: typeof Gallery;
|
|
24
24
|
};
|
|
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const image_style_1 = require("./image.style");
|
|
7
7
|
const utils_1 = require("../../utils");
|
|
8
|
-
const
|
|
8
|
+
const gallery_1 = require("../gallery/gallery");
|
|
9
9
|
const __1 = require("../..");
|
|
10
10
|
const faEye_1 = require("@fortawesome/free-regular-svg-icons/faEye");
|
|
11
11
|
exports.Image = (0, react_1.memo)(({ src, fallback, onLoad, onError, renderLoading, alt = '', width, height, objectFit = 'cover', objectPosition = 'center', imgProps, actions, previewable = true, previewProps, onPreview, ...props }) => {
|
|
@@ -46,6 +46,6 @@ exports.Image = (0, react_1.memo)(({ src, fallback, onLoad, onError, renderLoadi
|
|
|
46
46
|
}, onLoad: loadHandler, onError: errorHandler }), loading.current &&
|
|
47
47
|
(renderLoading ?? (0, jsx_runtime_1.jsx)(__1.Skeleton, { className: image_style_1.classes.skeleton })), !!renderedActions && !failed.current &&
|
|
48
48
|
(0, jsx_runtime_1.jsx)("div", { className: image_style_1.classes.mask, children: renderedActions }), previewable && src &&
|
|
49
|
-
(0, jsx_runtime_1.jsx)(
|
|
49
|
+
(0, jsx_runtime_1.jsx)(gallery_1.Gallery, { src: [src], ...previewProps, open: previewOpen.current, onOpenChange: setPreviewOpen })] }));
|
|
50
50
|
});
|
|
51
|
-
exports.Image.
|
|
51
|
+
exports.Image.Gallery = gallery_1.Gallery;
|
|
@@ -40,5 +40,5 @@ function OverlayBase({ container, forceRender, open, onMaskClick, singleLayer, o
|
|
|
40
40
|
onClosed?.();
|
|
41
41
|
forceRender === false && setShouldRender(false);
|
|
42
42
|
};
|
|
43
|
-
return shouldRender.current && (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsxs)("div", { ...props, css: overlayBase_style_1.style, className: (0, utils_1.clsx)(overlayBase_style_1.classes.root, props.className), "data-open": open, "data-custom-container":
|
|
43
|
+
return shouldRender.current && (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsxs)("div", { ...props, css: overlayBase_style_1.style, className: (0, utils_1.clsx)(overlayBase_style_1.classes.root, props.className), "data-open": open, "data-custom-container": containerEl !== document.body, children: [(0, jsx_runtime_1.jsx)(transitionBase_1.Fade, { timeout: exports.overlayBaseTransitionDuration, ...maskProps, in: open, className: (0, utils_1.clsx)(overlayBase_style_1.classes.mask, maskProps?.className), onClick: clickHandler, onEntered: onEntered, onExited: onExited }), props.children] }), containerEl);
|
|
44
44
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DivProps } from '../../types';
|
|
2
|
-
import {
|
|
2
|
+
import { GestureOptions } from '../../utils';
|
|
3
3
|
import { ColorInstance } from 'color';
|
|
4
4
|
export interface PaletteProps extends Omit<DivProps, 'defaultValue' | 'onChange'> {
|
|
5
5
|
defaultValue?: ColorInstance;
|
|
6
6
|
value?: ColorInstance;
|
|
7
7
|
onChange?(value: ColorInstance): void;
|
|
8
|
-
|
|
8
|
+
gestureOptions?: GestureOptions;
|
|
9
9
|
}
|
|
10
|
-
export declare const Palette: import("react").MemoExoticComponent<({ defaultValue, value, onChange,
|
|
10
|
+
export declare const Palette: import("react").MemoExoticComponent<({ defaultValue, value, onChange, gestureOptions, ...props }: PaletteProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
|
|
@@ -22,7 +22,7 @@ const sliderProps = {
|
|
|
22
22
|
tooltipProps: { disabled: true }
|
|
23
23
|
};
|
|
24
24
|
const availableFormat = ['HEX', 'RGB', 'HSL', 'CMYK'];
|
|
25
|
-
exports.Palette = (0, react_1.memo)(({ defaultValue, value, onChange,
|
|
25
|
+
exports.Palette = (0, react_1.memo)(({ defaultValue, value, onChange, gestureOptions, ...props }) => {
|
|
26
26
|
const { colors } = (0, theme_1.useTheme)();
|
|
27
27
|
const [innerValue, setInnerValue] = (0, utils_1.useControlled)(defaultValue ?? (0, color_1.default)(colors.primary.main, 'hex'), value, onChange);
|
|
28
28
|
const colorObject = (0, react_1.useMemo)(() => {
|
|
@@ -52,10 +52,10 @@ exports.Palette = (0, react_1.memo)(({ defaultValue, value, onChange, draggableO
|
|
|
52
52
|
setInnerValue(innerValue.current.black(newTop).saturationv(newLeft).hue(hue));
|
|
53
53
|
return [newLeft, newTop];
|
|
54
54
|
};
|
|
55
|
-
const
|
|
56
|
-
...
|
|
55
|
+
const draggableHandles = (0, utils_1.useDraggable)({
|
|
56
|
+
...gestureOptions,
|
|
57
57
|
onDragStart(e) {
|
|
58
|
-
|
|
58
|
+
gestureOptions?.onDragStart?.(e);
|
|
59
59
|
const paletteWidth = paletteRef.current.clientWidth;
|
|
60
60
|
const paletteHeight = paletteRef.current.clientHeight;
|
|
61
61
|
const { hue } = colorObject;
|
|
@@ -74,9 +74,9 @@ exports.Palette = (0, react_1.memo)(({ defaultValue, value, onChange, draggableO
|
|
|
74
74
|
};
|
|
75
75
|
},
|
|
76
76
|
onDrag(info, e) {
|
|
77
|
-
|
|
78
|
-
const { top, left, paletteWidth, paletteHeight, hue } = info.
|
|
79
|
-
setHandlePosition(left + info.
|
|
77
|
+
gestureOptions?.onDrag?.(info, e);
|
|
78
|
+
const { top, left, paletteWidth, paletteHeight, hue } = info.data;
|
|
79
|
+
setHandlePosition(left + info.diff[0] / paletteWidth * 100, top + info.diff[1] / paletteHeight * 100, hue);
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
const fitHandlePosition = () => {
|
|
@@ -108,10 +108,10 @@ exports.Palette = (0, react_1.memo)(({ defaultValue, value, onChange, draggableO
|
|
|
108
108
|
}
|
|
109
109
|
})(), commonAlphaItem] }));
|
|
110
110
|
};
|
|
111
|
-
return ((0, jsx_runtime_1.jsxs)("div", { ...props, css: palette_style_1.style, className: (0, utils_1.clsx)(palette_style_1.classes.root, props.className), children: [(0, jsx_runtime_1.jsxs)("div", { ref: paletteRef, className: palette_style_1.classes.main, style: { backgroundImage: `linear-gradient(90deg, #ffffff, ${colorObject.saturated})` }, ...
|
|
111
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ...props, css: palette_style_1.style, className: (0, utils_1.clsx)(palette_style_1.classes.root, props.className), children: [(0, jsx_runtime_1.jsxs)("div", { ref: paletteRef, className: palette_style_1.classes.main, style: { backgroundImage: `linear-gradient(90deg, #ffffff, ${colorObject.saturated})` }, ...draggableHandles, children: [(0, jsx_runtime_1.jsx)("div", { className: palette_style_1.classes.mask }), (0, jsx_runtime_1.jsx)("div", { className: palette_style_1.classes.handle, style: {
|
|
112
112
|
left: handlePosition[0] + '%',
|
|
113
113
|
top: handlePosition[1] + '%'
|
|
114
|
-
}, ...
|
|
114
|
+
}, ...draggableHandles })] }), (0, jsx_runtime_1.jsxs)("div", { className: palette_style_1.classes.slidersRow, children: [(0, jsx_runtime_1.jsxs)("div", { className: palette_style_1.classes.sliders, children: [(0, jsx_runtime_1.jsx)(slider_1.Slider, { ...sliderProps, className: palette_style_1.classes.hue, value: colorObject.hue / 359 * 100, onChange: hueChangeHandler }), (0, jsx_runtime_1.jsx)(slider_1.Slider, { ...sliderProps, className: palette_style_1.classes.alpha, renderRail: (_, railProps) => (0, jsx_runtime_1.jsxs)("div", { ...railProps, children: [railProps.children, (0, jsx_runtime_1.jsx)("div", { className: palette_style_1.classes.alphaMask, style: { backgroundImage: `linear-gradient(90deg, transparent, ${colorObject.saturated})` } })] }), value: colorObject.alpha * 100, onChange: alphaChangeHandler })] }), (0, jsx_runtime_1.jsx)("div", { className: palette_style_1.classes.preview, children: (0, jsx_runtime_1.jsx)("div", { className: palette_style_1.classes.previewColor, style: {
|
|
115
115
|
backgroundColor: colorObject.hex,
|
|
116
116
|
opacity: colorObject.alpha
|
|
117
117
|
} }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: palette_style_1.classes.inputRow, children: [(0, jsx_runtime_1.jsx)(button_1.Button, { variant: "plain", color: "text", suffix: (0, jsx_runtime_1.jsx)(__1.Icon, { icon: faChevronDown_1.faChevronDown }), onClick: formatChangeHandler, children: availableFormat[activeFormat] }), renderInputs()] })] }));
|
|
@@ -4,6 +4,7 @@ exports.style = exports.classes = void 0;
|
|
|
4
4
|
const react_1 = require("@emotion/react");
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
6
|
const divider_style_1 = require("../divider/divider.style");
|
|
7
|
+
const alert_style_1 = require("../alert/alert.style");
|
|
7
8
|
exports.classes = (0, utils_1.defineInnerClasses)('picker-dialog', [
|
|
8
9
|
'content',
|
|
9
10
|
'selectedArea',
|
|
@@ -17,6 +18,7 @@ exports.style = (0, utils_1.defineCss)(({ spacing }) => (0, react_1.css) `
|
|
|
17
18
|
max-height: 100%;
|
|
18
19
|
display: flex;
|
|
19
20
|
flex-direction: column;
|
|
21
|
+
gap: ${spacing[3]}px;
|
|
20
22
|
|
|
21
23
|
.${exports.classes.count} {
|
|
22
24
|
b {
|
|
@@ -32,6 +34,10 @@ exports.style = (0, utils_1.defineCss)(({ spacing }) => (0, react_1.css) `
|
|
|
32
34
|
.${exports.classes.list} {
|
|
33
35
|
flex: 1;
|
|
34
36
|
overflow: hidden auto;
|
|
37
|
+
|
|
38
|
+
.${alert_style_1.classes.description} {
|
|
39
|
+
margin-top: 0;
|
|
40
|
+
}
|
|
35
41
|
}
|
|
36
42
|
|
|
37
43
|
.${exports.classes.confirm} {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './pinchable';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ElementType, ReactElement, Ref } from 'react';
|
|
2
|
+
import { OverridableProps } from '../../types';
|
|
3
|
+
import { GestureOptions } from '../../utils';
|
|
4
|
+
export interface PinchableRef extends HTMLDivElement {
|
|
5
|
+
zoomIn(): void;
|
|
6
|
+
zoomOut(): void;
|
|
7
|
+
zoomTo(n?: number): void;
|
|
8
|
+
reset(transition?: boolean): void;
|
|
9
|
+
rotateLeft(): void;
|
|
10
|
+
rotateRight(): void;
|
|
11
|
+
rotate(deg: number): void;
|
|
12
|
+
}
|
|
13
|
+
type PinchableOwnProps = {
|
|
14
|
+
ref?: Ref<PinchableRef>;
|
|
15
|
+
gestureOptions?: GestureOptions;
|
|
16
|
+
defaultScale?: number;
|
|
17
|
+
scale?: number;
|
|
18
|
+
onScaleChange?(scale: number): void;
|
|
19
|
+
/** 缩放限制,`scale`非受控模式下有效,默认为1-6 */
|
|
20
|
+
scaleLimit?: [number, number];
|
|
21
|
+
defaultTranslate?: [number, number];
|
|
22
|
+
translate?: [number, number];
|
|
23
|
+
onTranslateChange?(translate: [number, number]): void;
|
|
24
|
+
/** 平移限制,`translate`非受控模式下有效 */
|
|
25
|
+
translateLimit?: (targetX: number, targetY: number, scale: number) => [number, number];
|
|
26
|
+
defaultRotate?: number;
|
|
27
|
+
rotate?: number;
|
|
28
|
+
onRotateChange?(rotate: number): void;
|
|
29
|
+
children?: ReactElement;
|
|
30
|
+
};
|
|
31
|
+
export type PinchableProps<C extends ElementType = 'div'> = OverridableProps<PinchableOwnProps, C>;
|
|
32
|
+
export declare const Pinchable: <C extends ElementType = "div">(props: PinchableProps<C>) => ReactElement;
|
|
33
|
+
export {};
|