antd-mobile 5.5.0 → 5.6.1
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/2x/cjs/components/action-sheet/action-sheet.d.ts +5 -5
- package/2x/cjs/components/action-sheet/action-sheet.js +6 -46
- package/2x/cjs/components/action-sheet/index.d.ts +1 -1
- package/2x/cjs/components/badge/badge.js +1 -1
- package/2x/cjs/components/cascader-view/cascader-view.js +7 -0
- package/2x/cjs/components/checkbox/checkbox.js +4 -20
- package/2x/cjs/components/checkbox/native-input.d.ts +10 -0
- package/2x/cjs/components/checkbox/native-input.js +42 -0
- package/2x/cjs/components/dialog/index.d.ts +1 -1
- package/2x/cjs/components/dialog/show.d.ts +2 -4
- package/2x/cjs/components/dialog/show.js +9 -47
- package/2x/cjs/components/dot-loading/dot-loading.js +1 -2
- package/2x/cjs/components/empty/empty-icon.d.ts +3 -0
- package/2x/cjs/components/empty/empty-icon.js +37 -0
- package/2x/cjs/components/empty/empty.js +27 -15
- package/2x/cjs/components/error-block/error-block.css +1 -0
- package/2x/cjs/components/error-block/error-block.js +5 -8
- package/2x/cjs/components/error-block/images/busy.d.ts +1 -0
- package/2x/cjs/components/error-block/images/busy.js +102 -0
- package/2x/cjs/components/error-block/images/default.d.ts +1 -0
- package/2x/cjs/components/error-block/images/default.js +178 -0
- package/2x/cjs/components/error-block/images/disconnected.d.ts +1 -0
- package/2x/cjs/components/error-block/images/disconnected.js +135 -0
- package/2x/cjs/components/error-block/images/empty.d.ts +1 -0
- package/2x/cjs/components/error-block/images/empty.js +131 -0
- package/2x/cjs/components/error-block/images/index.d.ts +2 -0
- package/2x/cjs/components/error-block/images/index.js +22 -0
- package/2x/cjs/components/floating-bubble/floating-bubble.css +2 -1
- package/2x/cjs/components/floating-bubble/floating-bubble.d.ts +1 -1
- package/2x/cjs/components/form/form-item.d.ts +1 -1
- package/2x/cjs/components/form/form-item.js +4 -1
- package/2x/cjs/components/image-viewer/index.d.ts +1 -1
- package/2x/cjs/components/image-viewer/methods.d.ts +3 -7
- package/2x/cjs/components/image-viewer/methods.js +13 -79
- package/2x/cjs/components/modal/index.d.ts +1 -1
- package/2x/cjs/components/modal/show.d.ts +2 -4
- package/2x/cjs/components/modal/show.js +9 -47
- package/2x/cjs/components/popover/popover.css +1 -0
- package/2x/cjs/components/popover/popover.js +7 -6
- package/2x/cjs/components/popover/temp-floating-ui.min.d.ts +1 -0
- package/2x/cjs/components/popover/temp-floating-ui.min.js +1 -0
- package/2x/cjs/components/radio/radio.js +4 -20
- package/2x/cjs/components/search-bar/search-bar.d.ts +1 -1
- package/2x/cjs/components/tab-bar/tab-bar.d.ts +1 -1
- package/2x/cjs/components/tab-bar/tab-bar.js +1 -1
- package/2x/cjs/components/tree-select/tree-select.js +2 -2
- package/2x/cjs/utils/render-imperatively.d.ts +10 -0
- package/2x/cjs/utils/render-imperatively.js +68 -0
- package/2x/es/components/action-sheet/action-sheet.d.ts +5 -5
- package/2x/es/components/action-sheet/action-sheet.js +5 -41
- package/2x/es/components/action-sheet/index.d.ts +1 -1
- package/2x/es/components/badge/badge.js +1 -1
- package/2x/es/components/cascader-view/cascader-view.js +7 -0
- package/2x/es/components/checkbox/checkbox.js +4 -21
- package/2x/es/components/checkbox/native-input.d.ts +10 -0
- package/2x/es/components/checkbox/native-input.js +28 -0
- package/2x/es/components/dialog/index.d.ts +1 -1
- package/2x/es/components/dialog/show.d.ts +2 -4
- package/2x/es/components/dialog/show.js +8 -44
- package/2x/es/components/dot-loading/dot-loading.js +1 -2
- package/2x/es/components/empty/empty-icon.d.ts +3 -0
- package/2x/es/components/empty/empty-icon.js +24 -0
- package/2x/es/components/empty/empty.js +27 -14
- package/2x/es/components/error-block/error-block.css +1 -0
- package/2x/es/components/error-block/error-block.js +4 -6
- package/2x/es/components/error-block/images/busy.d.ts +1 -0
- package/2x/es/components/error-block/images/busy.js +90 -0
- package/2x/es/components/error-block/images/default.d.ts +1 -0
- package/2x/es/components/error-block/images/default.js +166 -0
- package/2x/es/components/error-block/images/disconnected.d.ts +1 -0
- package/2x/es/components/error-block/images/disconnected.js +123 -0
- package/2x/es/components/error-block/images/empty.d.ts +1 -0
- package/2x/es/components/error-block/images/empty.js +119 -0
- package/2x/es/components/error-block/images/index.d.ts +2 -0
- package/2x/es/components/error-block/images/index.js +10 -0
- package/2x/es/components/floating-bubble/floating-bubble.css +2 -1
- package/2x/es/components/floating-bubble/floating-bubble.d.ts +1 -1
- package/2x/es/components/form/form-item.d.ts +1 -1
- package/2x/es/components/form/form-item.js +4 -1
- package/2x/es/components/image-viewer/index.d.ts +1 -1
- package/2x/es/components/image-viewer/methods.d.ts +3 -7
- package/2x/es/components/image-viewer/methods.js +12 -75
- package/2x/es/components/modal/index.d.ts +1 -1
- package/2x/es/components/modal/show.d.ts +2 -4
- package/2x/es/components/modal/show.js +8 -44
- package/2x/es/components/popover/popover.css +1 -0
- package/2x/es/components/popover/popover.js +2 -1
- package/2x/es/components/popover/temp-floating-ui.min.d.ts +1 -0
- package/2x/es/components/popover/temp-floating-ui.min.js +1 -0
- package/2x/es/components/radio/radio.js +4 -21
- package/2x/es/components/search-bar/search-bar.d.ts +1 -1
- package/2x/es/components/tab-bar/tab-bar.d.ts +1 -1
- package/2x/es/components/tab-bar/tab-bar.js +1 -1
- package/2x/es/components/tree-select/tree-select.js +2 -2
- package/2x/es/utils/render-imperatively.d.ts +10 -0
- package/2x/es/utils/render-imperatively.js +53 -0
- package/2x/package.json +2 -3
- package/cjs/components/action-sheet/action-sheet.d.ts +5 -5
- package/cjs/components/action-sheet/action-sheet.js +6 -46
- package/cjs/components/action-sheet/index.d.ts +1 -1
- package/cjs/components/badge/badge.js +1 -1
- package/cjs/components/cascader-view/cascader-view.js +7 -0
- package/cjs/components/checkbox/checkbox.js +4 -20
- package/cjs/components/checkbox/native-input.d.ts +10 -0
- package/cjs/components/checkbox/native-input.js +42 -0
- package/cjs/components/dialog/index.d.ts +1 -1
- package/cjs/components/dialog/show.d.ts +2 -4
- package/cjs/components/dialog/show.js +9 -47
- package/cjs/components/dot-loading/dot-loading.js +1 -2
- package/cjs/components/empty/empty-icon.d.ts +3 -0
- package/cjs/components/empty/empty-icon.js +37 -0
- package/cjs/components/empty/empty.js +27 -15
- package/cjs/components/error-block/error-block.css +1 -0
- package/cjs/components/error-block/error-block.js +5 -8
- package/cjs/components/error-block/images/busy.d.ts +1 -0
- package/cjs/components/error-block/images/busy.js +102 -0
- package/cjs/components/error-block/images/default.d.ts +1 -0
- package/cjs/components/error-block/images/default.js +178 -0
- package/cjs/components/error-block/images/disconnected.d.ts +1 -0
- package/cjs/components/error-block/images/disconnected.js +135 -0
- package/cjs/components/error-block/images/empty.d.ts +1 -0
- package/cjs/components/error-block/images/empty.js +131 -0
- package/cjs/components/error-block/images/index.d.ts +2 -0
- package/cjs/components/error-block/images/index.js +22 -0
- package/cjs/components/floating-bubble/floating-bubble.css +2 -1
- package/cjs/components/floating-bubble/floating-bubble.d.ts +1 -1
- package/cjs/components/form/form-item.d.ts +1 -1
- package/cjs/components/form/form-item.js +4 -1
- package/cjs/components/image-viewer/index.d.ts +1 -1
- package/cjs/components/image-viewer/methods.d.ts +3 -7
- package/cjs/components/image-viewer/methods.js +13 -79
- package/cjs/components/modal/index.d.ts +1 -1
- package/cjs/components/modal/show.d.ts +2 -4
- package/cjs/components/modal/show.js +9 -47
- package/cjs/components/popover/popover.css +1 -0
- package/cjs/components/popover/popover.js +7 -6
- package/cjs/components/popover/temp-floating-ui.min.d.ts +1 -0
- package/cjs/components/popover/temp-floating-ui.min.js +1 -0
- package/cjs/components/radio/radio.js +4 -20
- package/cjs/components/search-bar/search-bar.d.ts +1 -1
- package/cjs/components/tab-bar/tab-bar.d.ts +1 -1
- package/cjs/components/tab-bar/tab-bar.js +1 -1
- package/cjs/components/tree-select/tree-select.js +2 -2
- package/cjs/utils/render-imperatively.d.ts +10 -0
- package/cjs/utils/render-imperatively.js +68 -0
- package/es/components/action-sheet/action-sheet.d.ts +5 -5
- package/es/components/action-sheet/action-sheet.js +5 -41
- package/es/components/action-sheet/index.d.ts +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/cascader-view/cascader-view.js +7 -0
- package/es/components/checkbox/checkbox.js +4 -21
- package/es/components/checkbox/native-input.d.ts +10 -0
- package/es/components/checkbox/native-input.js +28 -0
- package/es/components/dialog/index.d.ts +1 -1
- package/es/components/dialog/show.d.ts +2 -4
- package/es/components/dialog/show.js +8 -44
- package/es/components/dot-loading/dot-loading.js +1 -2
- package/es/components/empty/empty-icon.d.ts +3 -0
- package/es/components/empty/empty-icon.js +24 -0
- package/es/components/empty/empty.js +27 -14
- package/es/components/error-block/error-block.css +1 -0
- package/es/components/error-block/error-block.js +4 -6
- package/es/components/error-block/images/busy.d.ts +1 -0
- package/es/components/error-block/images/busy.js +90 -0
- package/es/components/error-block/images/default.d.ts +1 -0
- package/es/components/error-block/images/default.js +166 -0
- package/es/components/error-block/images/disconnected.d.ts +1 -0
- package/es/components/error-block/images/disconnected.js +123 -0
- package/es/components/error-block/images/empty.d.ts +1 -0
- package/es/components/error-block/images/empty.js +119 -0
- package/es/components/error-block/images/index.d.ts +2 -0
- package/es/components/error-block/images/index.js +10 -0
- package/es/components/floating-bubble/floating-bubble.css +2 -1
- package/es/components/floating-bubble/floating-bubble.d.ts +1 -1
- package/es/components/form/form-item.d.ts +1 -1
- package/es/components/form/form-item.js +4 -1
- package/es/components/image-viewer/index.d.ts +1 -1
- package/es/components/image-viewer/methods.d.ts +3 -7
- package/es/components/image-viewer/methods.js +12 -75
- package/es/components/modal/index.d.ts +1 -1
- package/es/components/modal/show.d.ts +2 -4
- package/es/components/modal/show.js +8 -44
- package/es/components/popover/popover.css +1 -0
- package/es/components/popover/popover.js +2 -1
- package/es/components/popover/temp-floating-ui.min.d.ts +1 -0
- package/es/components/popover/temp-floating-ui.min.js +1 -0
- package/es/components/radio/radio.js +4 -21
- package/es/components/search-bar/search-bar.d.ts +1 -1
- package/es/components/tab-bar/tab-bar.d.ts +1 -1
- package/es/components/tab-bar/tab-bar.js +1 -1
- package/es/components/tree-select/tree-select.js +2 -2
- package/es/utils/render-imperatively.d.ts +10 -0
- package/es/utils/render-imperatively.js +53 -0
- package/package.json +2 -3
- package/umd/antd-mobile.js +1 -1
- package/2x/assets/busy.svg +0 -42
- package/2x/assets/default.svg +0 -53
- package/2x/assets/disconnected.svg +0 -60
- package/2x/assets/empty-icon.svg +0 -18
- package/2x/assets/empty.svg +0 -52
- package/2x/cjs/assets/busy.svg +0 -42
- package/2x/cjs/assets/default.svg +0 -53
- package/2x/cjs/assets/disconnected.svg +0 -60
- package/2x/cjs/assets/empty-icon.svg +0 -18
- package/2x/cjs/assets/empty.svg +0 -52
- package/2x/cjs/components/error-block/error.d.ts +0 -1
- package/2x/cjs/components/error-block/error.js +0 -24
- package/2x/es/assets/busy.svg +0 -42
- package/2x/es/assets/default.svg +0 -53
- package/2x/es/assets/disconnected.svg +0 -60
- package/2x/es/assets/empty-icon.svg +0 -18
- package/2x/es/assets/empty.svg +0 -52
- package/2x/es/components/error-block/error.d.ts +0 -1
- package/2x/es/components/error-block/error.js +0 -10
- package/assets/busy.svg +0 -42
- package/assets/default.svg +0 -53
- package/assets/disconnected.svg +0 -60
- package/assets/empty-icon.svg +0 -18
- package/assets/empty.svg +0 -52
- package/cjs/assets/busy.svg +0 -42
- package/cjs/assets/default.svg +0 -53
- package/cjs/assets/disconnected.svg +0 -60
- package/cjs/assets/empty-icon.svg +0 -18
- package/cjs/assets/empty.svg +0 -52
- package/cjs/components/error-block/error.d.ts +0 -1
- package/cjs/components/error-block/error.js +0 -24
- package/es/assets/busy.svg +0 -42
- package/es/assets/default.svg +0 -53
- package/es/assets/disconnected.svg +0 -60
- package/es/assets/empty-icon.svg +0 -18
- package/es/assets/empty.svg +0 -52
- package/es/components/error-block/error.d.ts +0 -1
- package/es/components/error-block/error.js +0 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const emptyImage: JSX.Element;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const emptyImage = React.createElement("svg", {
|
|
3
|
+
viewBox: '0 0 400 400',
|
|
4
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
5
|
+
xmlnsXlink: 'http://www.w3.org/1999/xlink'
|
|
6
|
+
}, React.createElement("defs", null, React.createElement("linearGradient", {
|
|
7
|
+
x1: '50%',
|
|
8
|
+
y1: '-116.862%',
|
|
9
|
+
x2: '50%',
|
|
10
|
+
y2: '90.764%',
|
|
11
|
+
id: 'error-block-image-empty-a'
|
|
12
|
+
}, React.createElement("stop", {
|
|
13
|
+
stopColor: '#72A7FD',
|
|
14
|
+
stopOpacity: 0.207,
|
|
15
|
+
offset: '0%'
|
|
16
|
+
}), React.createElement("stop", {
|
|
17
|
+
stopColor: '#72A7FD',
|
|
18
|
+
stopOpacity: 0.115,
|
|
19
|
+
offset: '80.072%'
|
|
20
|
+
}), React.createElement("stop", {
|
|
21
|
+
stopColor: '#72A7FD',
|
|
22
|
+
stopOpacity: 0,
|
|
23
|
+
offset: '100%'
|
|
24
|
+
})), React.createElement("path", {
|
|
25
|
+
d: 'M146.183 18.461c31.705 23.336 33.349 71.85 4.93 96.614-.252.22 6.172 5.602 13.577 11.414l.686.537.69.54.695.54.348.27.698.54a341.27 341.27 0 0 0 8.806 6.596c1.114.802 4.643-.853 10.587-4.965l-.532 12.218a1.2 1.2 0 0 1-.481.91l-10.868 8.111c-1.405 1.048-3.32 1.185-4.854.072l-35.578-25.834c-33.414 17.333-79.913 15-109.804-7-33.444-24.616-33.444-75.95 0-100.563 33.443-24.615 87.657-24.615 121.1 0Zm-60.469 7.653C51.63 26.114 24 44.534 24 67.257S51.63 108.4 85.714 108.4s61.715-18.42 61.715-41.143c0-22.722-27.63-41.143-61.715-41.143Z',
|
|
26
|
+
id: 'error-block-image-empty-b'
|
|
27
|
+
})), React.createElement("g", {
|
|
28
|
+
fill: 'none',
|
|
29
|
+
fillRule: 'evenodd'
|
|
30
|
+
}, React.createElement("path", {
|
|
31
|
+
d: 'M157.964 244.661H0L3.806 100.13a4.572 4.572 0 0 1 4.353-4.446l.217-.006h45.588V68.2a4.572 4.572 0 0 1 4.356-4.567l.216-.005h65.498l2.554-58.689a4.571 4.571 0 0 1 4.779-4.367l.214.015 87.79 8.222a4.572 4.572 0 0 1 4.126 4.133l.015.212 3.146 69.652L301.634 64.9a4.571 4.571 0 0 1 5.628 4.231l.005.215v43.955l56.162.001v130.264h-56.163v.001h-82.383v-.004h-66.919v1.098ZM89.503 160.03h-9.968v8.436h9.968v-8.436Zm0-14.507h-9.968v8.435h9.968v-8.435Zm197.985-5.15h-9.967v8.432h9.967v-8.431Zm-197.985-8.806h-9.968v8.436h9.968v-8.436Zm197.985-5.153h-9.967v8.432h9.967v-8.432Zm0-14.503h-9.967v8.432h9.967v-8.432Zm-84.643-.777h-30.8v8.436h30.8v-8.436Zm84.643-13.186h-9.967v8.436h9.967v-8.436Zm-84.643-3.29h-30.8v8.436h30.8v-8.436Zm0-15.912h-30.8v8.436h30.8v-8.436Z',
|
|
32
|
+
transform: 'translate(18.286 50.286)',
|
|
33
|
+
fill: 'url(#error-block-image-empty-a)'
|
|
34
|
+
}), React.createElement("g", {
|
|
35
|
+
transform: 'translate(108.571 189.886)'
|
|
36
|
+
}, React.createElement("mask", {
|
|
37
|
+
id: 'error-block-image-empty-c',
|
|
38
|
+
fill: '#fff'
|
|
39
|
+
}, React.createElement("use", {
|
|
40
|
+
xlinkHref: '#error-block-image-empty-b'
|
|
41
|
+
})), React.createElement("use", {
|
|
42
|
+
fill: '#377EFF',
|
|
43
|
+
xlinkHref: '#error-block-image-empty-b'
|
|
44
|
+
}), React.createElement("path", {
|
|
45
|
+
d: 'M131.429 134.686a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm5.714 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285ZM128 133.543a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-5.714 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm21.143-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-9.143-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm12-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-6.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM120 128.971a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm5.714 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm16-1.142.125.006a1.143 1.143 0 1 1-.125-.006Zm11.429 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-22.857 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm17.143-1.143a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285ZM136 125.543a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-13.143 1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm4.572-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm18.857-2.286a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-16-1.143.124.007a1.143 1.143 0 1 1-.124-.007Zm11.428 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-22.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm36.572 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-5.715 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-37.143 1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm13.715-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm9.714-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm18.286-3.428a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-11.429 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-28 1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm5.714-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm17.715-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-5.715 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-6.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm17.143-4.571a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-11.428 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-5.143 1.142a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-8-1.142a.571.571 0 1 1 0 1.142.571.571 0 0 1 0-1.142Zm-9.143 0a.571.571 0 1 1 0 1.142.571.571 0 0 1 0-1.142Zm30.286-3.429a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM124 109.543a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm5.714 0a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm5.715-4.572a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-22.858-1.142a.571.571 0 1 1 0 1.142.571.571 0 0 1 0-1.142Zm-11.428-3.429a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM124 99.257a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM49.143 55.829a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm5.714 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-9.143-1.143a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-5.714 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm21.143-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM52 52.4a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm12-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-6.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-19.429-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm5.715 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm16-1.143.124.007a1.143 1.143 0 1 1-.124-.007Zm11.428 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-22.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm17.143-1.142a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-11.429-1.143a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-13.143 1.143a.571.571 0 1 1 0 1.142.571.571 0 0 1 0-1.142Zm4.572-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM64 44.4a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-16-1.143.125.007a1.143 1.143 0 1 1-.125-.007Zm11.429 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-22.858 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm36.572 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-5.714 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM30.286 44.4a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM44 43.257a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm9.714-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM72 38.686a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-11.429 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-28 1.143a.571.571 0 1 1 0 1.142.571.571 0 0 1 0-1.142Zm5.715-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM56 37.543a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-5.714 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-6.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM60.57 32.97a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-11.428 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM44 34.114a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-8-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-9.143 0a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm30.286-3.428a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-15.429 1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm5.715 0a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm5.714-4.572a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-22.857-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-11.429-3.428a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM41.714 20.4a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Z',
|
|
46
|
+
fill: '#003CFF',
|
|
47
|
+
fillRule: 'nonzero',
|
|
48
|
+
mask: 'url(#error-block-image-empty-c)'
|
|
49
|
+
})), React.createElement("path", {
|
|
50
|
+
d: 'M295.213 319.24c.744.546.745 1.433.002 1.98l-11.806 8.81c-1.069.799-3.326.474-4.853-.609l-35.622-25.241c-33.375 17.037-79.545 14.615-109.28-7.271-33.443-24.615-33.443-64.521 0-89.133 33.443-24.616 87.657-24.616 121.1 0 31.706 23.336 33.35 60.42 4.931 85.185-.543.473 35.528 26.278 35.528 26.278ZM148.06 220.015c-25.44 17.853-25.44 46.8 0 64.652 25.44 17.85 66.689 17.85 92.129 0 25.436-17.853 25.436-46.799 0-64.652-25.44-17.853-66.688-17.853-92.129 0Z',
|
|
51
|
+
fill: '#5D96FE'
|
|
52
|
+
}), React.createElement("path", {
|
|
53
|
+
d: 'M123.514 233.021c2.185-5.241 5.67-9.735 10.453-13.482M264.967 271.54c-2.185 5.24-5.67 9.734-10.453 13.481',
|
|
54
|
+
stroke: '#FFF',
|
|
55
|
+
strokeWidth: 0.75,
|
|
56
|
+
strokeLinecap: 'round',
|
|
57
|
+
strokeLinejoin: 'round'
|
|
58
|
+
}), React.createElement("path", {
|
|
59
|
+
d: 'M81.143 252.571c7.574 0 13.714 23.88 13.714 31.649 0 6.97-4.942 12.755-11.429 13.871v11.672c0 1.235-.767 2.237-1.713 2.237-.904 0-1.644-.912-1.71-2.07l-.005-.167v-11.526c-7.04-.595-12.571-6.644-12.571-14.017 0-7.024 5.02-27.222 11.581-31.027l.096-.053c.027-.016.055-.03.082-.045l.067-.035.066-.033.1-.05.094-.041a3.34 3.34 0 0 1 .224-.093l.11-.042.097-.032c.038-.013.077-.025.115-.036l.053-.016.053-.014a3.351 3.351 0 0 1 .23-.055l.085-.016a3.95 3.95 0 0 1 .441-.054l.11-.005.11-.002Z',
|
|
60
|
+
fill: '#FFCD6B',
|
|
61
|
+
fillRule: 'nonzero'
|
|
62
|
+
}), React.createElement("g", {
|
|
63
|
+
transform: 'translate(283.429 177.143)',
|
|
64
|
+
fillRule: 'nonzero'
|
|
65
|
+
}, React.createElement("path", {
|
|
66
|
+
d: 'M22.475.847c12.34 0 22.345 37.935 22.345 50.276 0 11.395-8.53 20.798-19.552 22.172v19.019c0 1.932-1.25 3.5-2.792 3.5-1.49 0-2.707-1.46-2.79-3.301l-.004-.2-.001-19.018C8.659 71.92.13 62.518.13 51.123.13 40.071 8.154 8.49 18.694 2.015l.054-.031a5.94 5.94 0 0 1 .214-.128l.088-.048c.213-.12.427-.228.642-.326l.135-.06.18-.075.135-.053a5.796 5.796 0 0 1 .464-.16 4.44 4.44 0 0 1 .33-.092l.124-.03a7.122 7.122 0 0 1 .31-.065l.018-.003a6.305 6.305 0 0 1 .756-.088l.165-.007.166-.002Z',
|
|
67
|
+
fill: '#FFCD6B'
|
|
68
|
+
}), React.createElement("path", {
|
|
69
|
+
d: 'M22.475.847c12.34 0 22.345 37.935 22.345 50.276 0 11.395-8.53 20.798-19.552 22.172v19.019c0 1.932-1.25 3.5-2.792 3.5-1.543 0-2.794-1.566-2.794-3.5V73.295C8.659 71.921.13 62.518.13 51.123.13 38.783 10.134.847 22.475.847Z',
|
|
70
|
+
fill: '#FFCD6B'
|
|
71
|
+
}), React.createElement("circle", {
|
|
72
|
+
fill: '#FFB400',
|
|
73
|
+
cx: 26.4,
|
|
74
|
+
cy: 56.869,
|
|
75
|
+
r: 1.45
|
|
76
|
+
}), React.createElement("circle", {
|
|
77
|
+
fill: '#FFB400',
|
|
78
|
+
cx: 39.453,
|
|
79
|
+
cy: 58.319,
|
|
80
|
+
r: 1
|
|
81
|
+
}), React.createElement("circle", {
|
|
82
|
+
fill: '#FFB400',
|
|
83
|
+
cx: 17.698,
|
|
84
|
+
cy: 63.637,
|
|
85
|
+
r: 2.417
|
|
86
|
+
}), React.createElement("circle", {
|
|
87
|
+
fill: '#FFB400',
|
|
88
|
+
cx: 38.002,
|
|
89
|
+
cy: 51.068,
|
|
90
|
+
r: 2.417
|
|
91
|
+
}), React.createElement("circle", {
|
|
92
|
+
fill: '#FFB400',
|
|
93
|
+
cx: 18.665,
|
|
94
|
+
cy: 17.228,
|
|
95
|
+
r: 2.417
|
|
96
|
+
}), React.createElement("circle", {
|
|
97
|
+
fill: '#FFB400',
|
|
98
|
+
cx: 32.201,
|
|
99
|
+
cy: 13.36,
|
|
100
|
+
r: 2.417
|
|
101
|
+
}), React.createElement("circle", {
|
|
102
|
+
fill: '#FFB400',
|
|
103
|
+
cx: 26.83,
|
|
104
|
+
cy: 20.666,
|
|
105
|
+
r: 1.45
|
|
106
|
+
}), React.createElement("circle", {
|
|
107
|
+
fill: '#FFB400',
|
|
108
|
+
cx: 38.969,
|
|
109
|
+
cy: 31.731,
|
|
110
|
+
r: 2.417
|
|
111
|
+
}), React.createElement("circle", {
|
|
112
|
+
fill: '#FFB400',
|
|
113
|
+
cx: 25.433,
|
|
114
|
+
cy: 29.797,
|
|
115
|
+
r: 1.45
|
|
116
|
+
}), React.createElement("path", {
|
|
117
|
+
d: 'M34.197 53.033c0 9.825-6.934 18.017-16.172 19.987a22.44 22.44 0 0 0 4.45.448c12.34 0 22.344-10.004 22.344-22.345C44.82 38.783 34.815.847 22.475.847c8.947 14.03 11.722 40.891 11.722 52.186Z',
|
|
118
|
+
fill: '#FBBE47'
|
|
119
|
+
}))));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defaultImage } from './default';
|
|
2
|
+
import { disconnectedImage } from './disconnected';
|
|
3
|
+
import { emptyImage } from './empty';
|
|
4
|
+
import { busyImage } from './busy';
|
|
5
|
+
export const imageRecord = {
|
|
6
|
+
'default': defaultImage,
|
|
7
|
+
'disconnected': disconnectedImage,
|
|
8
|
+
'empty': emptyImage,
|
|
9
|
+
'busy': busyImage
|
|
10
|
+
};
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
--edge-distance: 0;
|
|
8
8
|
--size: 96px;
|
|
9
9
|
--border-radius: 50%;
|
|
10
|
+
--background: var(--adm-color-primary);
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
.adm-floating-bubble-boundary-outer {
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
transition: opacity ease 0.15s;
|
|
44
45
|
user-select: none;
|
|
45
46
|
touch-action: none;
|
|
46
|
-
background: var(--
|
|
47
|
+
background: var(--background);
|
|
47
48
|
color: var(--adm-color-white);
|
|
48
49
|
border-radius: var(--border-radius);
|
|
49
50
|
z-index: var(--z-index);
|
|
@@ -4,5 +4,5 @@ export declare type FloatingBubbleProps = {
|
|
|
4
4
|
onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
5
5
|
axis?: 'x' | 'y' | 'xy' | 'lock';
|
|
6
6
|
magnetic?: 'x' | 'y';
|
|
7
|
-
} & NativeProps<'--initial-position-left' | '--initial-position-right' | '--initial-position-top' | '--initial-position-bottom' | '--z-index' | '--edge-distance' | '--size' | '--border-radius'>;
|
|
7
|
+
} & NativeProps<'--initial-position-left' | '--initial-position-right' | '--initial-position-top' | '--initial-position-bottom' | '--z-index' | '--edge-distance' | '--size' | '--border-radius' | '--background'>;
|
|
8
8
|
export declare const FloatingBubble: FC<FloatingBubbleProps>;
|
|
@@ -7,7 +7,7 @@ import type { FormLayout } from './index';
|
|
|
7
7
|
declare type RenderChildren<Values = any> = (form: FormInstance<Values>) => React.ReactNode;
|
|
8
8
|
declare type ChildrenType<Values = any> = RenderChildren<Values> | React.ReactNode;
|
|
9
9
|
declare type RcFieldProps = Omit<FieldProps, 'children'>;
|
|
10
|
-
export declare type FormItemProps = Pick<RcFieldProps, 'dependencies' | 'valuePropName' | 'name' | 'rules' | 'messageVariables' | 'trigger' | 'validateTrigger' | 'shouldUpdate' | 'initialValue'> & Pick<ListItemProps, 'style' | 'onClick' | 'extra' | 'arrow' | 'description'> & {
|
|
10
|
+
export declare type FormItemProps = Pick<RcFieldProps, 'dependencies' | 'valuePropName' | 'name' | 'rules' | 'messageVariables' | 'trigger' | 'validateTrigger' | 'shouldUpdate' | 'initialValue'> & Pick<ListItemProps, 'style' | 'onClick' | 'extra' | 'clickable' | 'arrow' | 'description'> & {
|
|
11
11
|
label?: React.ReactNode;
|
|
12
12
|
help?: React.ReactNode;
|
|
13
13
|
hasFeedback?: boolean;
|
|
@@ -92,6 +92,7 @@ const FormItemLayout = props => {
|
|
|
92
92
|
}),
|
|
93
93
|
disabled: disabled,
|
|
94
94
|
onClick: props.onClick,
|
|
95
|
+
clickable: props.clickable,
|
|
95
96
|
arrow: arrow
|
|
96
97
|
}, React.createElement("div", {
|
|
97
98
|
className: classNames(`${classPrefix}-child`, `${classPrefix}-child-position-${childElementPosition}`)
|
|
@@ -127,9 +128,10 @@ export const FormItem = props => {
|
|
|
127
128
|
onClick,
|
|
128
129
|
shouldUpdate,
|
|
129
130
|
dependencies,
|
|
131
|
+
clickable,
|
|
130
132
|
arrow
|
|
131
133
|
} = props,
|
|
132
|
-
fieldProps = __rest(props, ["className", "style", "label", "help", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "childElementPosition", "description", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies", "arrow"]);
|
|
134
|
+
fieldProps = __rest(props, ["className", "style", "label", "help", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "childElementPosition", "description", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies", "clickable", "arrow"]);
|
|
133
135
|
|
|
134
136
|
const {
|
|
135
137
|
validateTrigger: contextValidateTrigger
|
|
@@ -201,6 +203,7 @@ export const FormItem = props => {
|
|
|
201
203
|
hidden: hidden,
|
|
202
204
|
layout: layout,
|
|
203
205
|
childElementPosition: childElementPosition,
|
|
206
|
+
clickable: clickable,
|
|
204
207
|
arrow: arrow
|
|
205
208
|
}, React.createElement(NoStyleItemContext.Provider, {
|
|
206
209
|
value: onSubMetaChange
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import './image-viewer.less';
|
|
3
3
|
import { showMultiImageViewer, showImageViewer, clearImageViewer } from './methods';
|
|
4
4
|
export type { ImageViewerProps, MultiImageViewerProps, MultiImageViewerRef, } from './image-viewer';
|
|
5
|
-
export type {
|
|
5
|
+
export type { ImageViewerShowHandler } from './methods';
|
|
6
6
|
declare const _default: import("react").FC<import("./image-viewer").ImageViewerProps> & {
|
|
7
7
|
Multi: import("react").ForwardRefExoticComponent<Omit<import("./image-viewer").ImageViewerProps, "image"> & {
|
|
8
8
|
images?: string[] | undefined;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { ImageViewerProps, MultiImageViewerProps } from './image-viewer';
|
|
2
|
-
export declare type
|
|
3
|
-
close: () => void;
|
|
4
|
-
};
|
|
5
|
-
export declare function showImageViewer(props: Omit<ImageViewerProps, 'visible'>): {
|
|
6
|
-
close: () => void;
|
|
7
|
-
};
|
|
8
|
-
export declare function showMultiImageViewer(props: Omit<MultiImageViewerProps, 'visible'>): {
|
|
2
|
+
export declare type ImageViewerShowHandler = {
|
|
9
3
|
close: () => void;
|
|
10
4
|
};
|
|
5
|
+
export declare function showImageViewer(props: Omit<ImageViewerProps, 'visible'>): ImageViewerShowHandler;
|
|
6
|
+
export declare function showMultiImageViewer(props: Omit<MultiImageViewerProps, 'visible'>): ImageViewerShowHandler;
|
|
11
7
|
export declare function clearImageViewer(): void;
|
|
@@ -1,93 +1,30 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { renderToBody } from '../../utils/render-to-body';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import { ImageViewer, MultiImageViewer } from './image-viewer';
|
|
4
|
-
import {
|
|
3
|
+
import { renderImperatively } from '../../utils/render-imperatively';
|
|
5
4
|
const handlerSet = new Set();
|
|
6
5
|
export function showImageViewer(props) {
|
|
7
6
|
clearImageViewer();
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
setVisible(true);
|
|
12
|
-
}, []);
|
|
13
|
-
const isUnmountedRef = useUnmountedRef();
|
|
14
|
-
useImperativeHandle(ref, () => ({
|
|
15
|
-
close: () => {
|
|
16
|
-
if (isUnmountedRef.current) return;
|
|
17
|
-
setVisible(false);
|
|
18
|
-
}
|
|
19
|
-
}));
|
|
20
|
-
return React.createElement(ImageViewer, Object.assign({}, props, {
|
|
21
|
-
visible: visible,
|
|
22
|
-
onClose: () => {
|
|
23
|
-
var _a;
|
|
24
|
-
|
|
25
|
-
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
26
|
-
setVisible(false);
|
|
27
|
-
},
|
|
28
|
-
afterClose: () => {
|
|
29
|
-
var _a;
|
|
30
|
-
|
|
31
|
-
(_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
32
|
-
unmount();
|
|
33
|
-
}
|
|
34
|
-
}));
|
|
35
|
-
});
|
|
36
|
-
const ref = createRef();
|
|
37
|
-
const unmount = renderToBody(React.createElement(Wrapper, {
|
|
38
|
-
ref: ref
|
|
39
|
-
}));
|
|
40
|
-
const handler = {
|
|
41
|
-
close: () => {
|
|
7
|
+
const handler = renderImperatively(React.createElement(ImageViewer, Object.assign({}, props, {
|
|
8
|
+
afterClose: () => {
|
|
42
9
|
var _a;
|
|
43
10
|
|
|
44
|
-
|
|
11
|
+
handlerSet.delete(handler);
|
|
12
|
+
(_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
45
13
|
}
|
|
46
|
-
};
|
|
14
|
+
})));
|
|
47
15
|
handlerSet.add(handler);
|
|
48
16
|
return handler;
|
|
49
17
|
}
|
|
50
18
|
export function showMultiImageViewer(props) {
|
|
51
19
|
clearImageViewer();
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
setVisible(true);
|
|
56
|
-
}, []);
|
|
57
|
-
const isUnmountedRef = useUnmountedRef();
|
|
58
|
-
useImperativeHandle(ref, () => ({
|
|
59
|
-
close: () => {
|
|
60
|
-
if (isUnmountedRef.current) return;
|
|
61
|
-
setVisible(false);
|
|
62
|
-
}
|
|
63
|
-
}));
|
|
64
|
-
return React.createElement(MultiImageViewer, Object.assign({}, props, {
|
|
65
|
-
visible: visible,
|
|
66
|
-
onClose: () => {
|
|
67
|
-
var _a;
|
|
68
|
-
|
|
69
|
-
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
70
|
-
setVisible(false);
|
|
71
|
-
},
|
|
72
|
-
afterClose: () => {
|
|
73
|
-
var _a;
|
|
74
|
-
|
|
75
|
-
(_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
76
|
-
unmount();
|
|
77
|
-
}
|
|
78
|
-
}));
|
|
79
|
-
});
|
|
80
|
-
const ref = createRef();
|
|
81
|
-
const unmount = renderToBody(React.createElement(Wrapper, {
|
|
82
|
-
ref: ref
|
|
83
|
-
}));
|
|
84
|
-
const handler = {
|
|
85
|
-
close: () => {
|
|
20
|
+
const handler = renderImperatively(React.createElement(MultiImageViewer, Object.assign({}, props, {
|
|
21
|
+
afterClose: () => {
|
|
86
22
|
var _a;
|
|
87
23
|
|
|
88
|
-
|
|
24
|
+
handlerSet.delete(handler);
|
|
25
|
+
(_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
89
26
|
}
|
|
90
|
-
};
|
|
27
|
+
})));
|
|
91
28
|
handlerSet.add(handler);
|
|
92
29
|
return handler;
|
|
93
30
|
}
|
|
@@ -6,7 +6,7 @@ import { confirm } from './confirm';
|
|
|
6
6
|
import { clear } from './clear';
|
|
7
7
|
export type { ModalProps } from './modal';
|
|
8
8
|
export type { Action } from './modal-action-button';
|
|
9
|
-
export type { ModalShowProps,
|
|
9
|
+
export type { ModalShowProps, ModalShowHandler } from './show';
|
|
10
10
|
export type { ModalAlertProps } from './alert';
|
|
11
11
|
export type { ModalConfirmProps } from './confirm';
|
|
12
12
|
declare const _default: import("react").FC<import("./modal").ModalProps> & {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ModalProps } from './modal';
|
|
2
2
|
export declare type ModalShowProps = Omit<ModalProps, 'visible'>;
|
|
3
|
-
export declare type
|
|
3
|
+
export declare type ModalShowHandler = {
|
|
4
4
|
close: () => void;
|
|
5
5
|
};
|
|
6
6
|
export declare const closeFnSet: Set<() => void>;
|
|
7
|
-
export declare function show(props: ModalShowProps):
|
|
8
|
-
close: () => void;
|
|
9
|
-
};
|
|
7
|
+
export declare function show(props: ModalShowProps): ModalShowHandler;
|
|
@@ -1,52 +1,16 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { renderToBody } from '../../utils/render-to-body';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import { Modal } from './modal';
|
|
3
|
+
import { renderImperatively } from '../../utils/render-imperatively';
|
|
4
4
|
export const closeFnSet = new Set();
|
|
5
5
|
export function show(props) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
setVisible(true);
|
|
10
|
-
}, []);
|
|
11
|
-
|
|
12
|
-
function handleClose() {
|
|
13
|
-
var _a;
|
|
14
|
-
|
|
15
|
-
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
16
|
-
setVisible(false);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
useImperativeHandle(ref, () => ({
|
|
20
|
-
close: handleClose
|
|
21
|
-
}));
|
|
22
|
-
|
|
23
|
-
function handleAfterClose() {
|
|
6
|
+
const handler = renderImperatively(React.createElement(Modal, Object.assign({}, props, {
|
|
7
|
+
afterClose: () => {
|
|
24
8
|
var _a;
|
|
25
9
|
|
|
10
|
+
closeFnSet.delete(handler.close);
|
|
26
11
|
(_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
27
|
-
unmount();
|
|
28
|
-
closeFnSet.delete(close);
|
|
29
12
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
onClose: handleClose,
|
|
34
|
-
afterClose: handleAfterClose
|
|
35
|
-
}));
|
|
36
|
-
});
|
|
37
|
-
const ref = createRef();
|
|
38
|
-
const unmount = renderToBody(React.createElement(Wrapper, {
|
|
39
|
-
ref: ref
|
|
40
|
-
}));
|
|
41
|
-
|
|
42
|
-
const close = () => {
|
|
43
|
-
var _a;
|
|
44
|
-
|
|
45
|
-
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
closeFnSet.add(close);
|
|
49
|
-
return {
|
|
50
|
-
close
|
|
51
|
-
};
|
|
13
|
+
})));
|
|
14
|
+
closeFnSet.add(handler.close);
|
|
15
|
+
return handler;
|
|
52
16
|
}
|
|
@@ -7,7 +7,7 @@ import { withNativeProps } from '../../utils/native-props';
|
|
|
7
7
|
import { withStopPropagation } from '../../utils/with-stop-propagation';
|
|
8
8
|
import { Arrow } from './arrow';
|
|
9
9
|
import { renderToContainer } from '../../utils/render-to-container';
|
|
10
|
-
import { arrow, computePosition, flip, offset, autoUpdate, hide, shift, limitShift } from '
|
|
10
|
+
import { arrow, computePosition, flip, offset, autoUpdate, hide, shift, limitShift } from './temp-floating-ui.min.js';
|
|
11
11
|
import { Wrapper } from './wrapper';
|
|
12
12
|
import { useShouldRender } from '../../utils/should-render';
|
|
13
13
|
import { useClickAway, useIsomorphicLayoutEffect } from 'ahooks';
|
|
@@ -121,6 +121,7 @@ export const Popover = forwardRef((p, ref) => {
|
|
|
121
121
|
if (!props.trigger) return;
|
|
122
122
|
|
|
123
123
|
function handleClick() {
|
|
124
|
+
console.log('handleClick');
|
|
124
125
|
setVisible(v => !v);
|
|
125
126
|
}
|
|
126
127
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@floating-ui/dom'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@floating-ui/core")):"function"==typeof define&&define.amd?define(["exports","@floating-ui/core"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).FloatingUIDOM={},t.FloatingUICore)}(this,(function(t,e){"use strict";function n(t){return"[object Window]"===(null==t?void 0:t.toString())}function o(t){if(null==t)return window;if(!n(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function i(t){return o(t).getComputedStyle(t)}function r(t){return n(t)?"":t?(t.nodeName||"").toLowerCase():""}function l(t){return t instanceof o(t).HTMLElement}function c(t){return t instanceof o(t).Element}function f(t){return t instanceof o(t).ShadowRoot||t instanceof ShadowRoot}function u(t){const{overflow:e,overflowX:n,overflowY:o}=i(t);return/auto|scroll|overlay|hidden/.test(e+o+n)}function s(t){return["table","td","th"].includes(r(t))}function d(t){const e=navigator.userAgent.toLowerCase().includes("firefox"),n=i(t);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter}const h=Math.min,a=Math.max,g=Math.round;function p(t,e){void 0===e&&(e=!1);const n=t.getBoundingClientRect();let o=1,i=1;return e&&l(t)&&(o=t.offsetWidth>0&&g(n.width)/t.offsetWidth||1,i=t.offsetHeight>0&&g(n.height)/t.offsetHeight||1),{width:n.width/o,height:n.height/i,top:n.top/i,right:n.right/o,bottom:n.bottom/i,left:n.left/o,x:n.left/o,y:n.top/i}}function m(t){return(e=t,(e instanceof o(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function y(t){return n(t)?{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}:{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function w(t){return p(m(t)).left+y(t).scrollLeft}function b(t,e,n){const o=l(e),i=m(e),c=p(t,o&&function(t){const e=p(t);return g(e.width)!==t.offsetWidth||g(e.height)!==t.offsetHeight}(e));let f={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==r(e)||u(i))&&(f=y(e)),l(e)){const t=p(e,!0);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else i&&(s.x=w(i));return{x:c.left+f.scrollLeft-s.x,y:c.top+f.scrollTop-s.y,width:c.width,height:c.height}}function v(t){return"html"===r(t)?t:t.assignedSlot||t.parentNode||(f(t)?t.host:null)||m(t)}function x(t){return l(t)&&"fixed"!==getComputedStyle(t).position?t.offsetParent:null}function L(t){const e=o(t);let n=x(t);for(;n&&s(n)&&"static"===getComputedStyle(n).position;)n=x(n);return n&&("html"===r(n)||"body"===r(n)&&"static"===getComputedStyle(n).position&&!d(n))?e:n||function(t){let e=v(t);for(f(e)&&(e=e.host);l(e)&&!["html","body"].includes(r(e));){if(d(e))return e;e=e.parentNode}return null}(t)||e}function O(t){if(l(t))return{width:t.offsetWidth,height:t.offsetHeight};const e=p(t);return{width:e.width,height:e.height}}function P(t){const e=v(t);return["html","body","#document"].includes(r(e))?t.ownerDocument.body:l(e)&&u(e)?e:P(e)}function R(t,e){var n;void 0===e&&(e=[]);const i=P(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),l=o(i),c=r?[l].concat(l.visualViewport||[],u(i)?i:[]):i,f=e.concat(c);return r?f:f.concat(R(v(c)))}function T(t,n){return"viewport"===n?e.rectToClientRect(function(t){const e=o(t),n=m(t),i=e.visualViewport;let r=n.clientWidth,l=n.clientHeight,c=0,f=0;return i&&(r=i.width,l=i.height,Math.abs(e.innerWidth/i.scale-i.width)<.01&&(c=i.offsetLeft,f=i.offsetTop)),{width:r,height:l,x:c,y:f}}(t)):c(n)?function(t){const e=p(t),n=e.top+t.clientTop,o=e.left+t.clientLeft;return{top:n,left:o,x:o,y:n,right:o+t.clientWidth,bottom:n+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(n):e.rectToClientRect(function(t){var e;const n=m(t),o=y(t),r=null==(e=t.ownerDocument)?void 0:e.body,l=a(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=a(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let f=-o.scrollLeft+w(t);const u=-o.scrollTop;return"rtl"===i(r||n).direction&&(f+=a(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:c,x:f,y:u}}(m(t)))}function C(t){const e=R(t),n=["absolute","fixed"].includes(i(t).position)&&l(t)?L(t):t;return c(n)?e.filter((t=>c(t)&&function(t,e){const n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&f(n)){let n=e;do{if(n&&t===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(t,n)&&"body"!==r(t))):[]}const W={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o}=t;const i=[..."clippingAncestors"===n?C(e):[].concat(n),o],r=i[0],l=i.reduce(((t,n)=>{const o=T(e,n);return t.top=a(o.top,t.top),t.right=h(o.right,t.right),t.bottom=h(o.bottom,t.bottom),t.left=a(o.left,t.left),t}),T(e,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=l(n),c=m(n);if(n===c)return e;let f={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&"fixed"!==o)&&(("body"!==r(n)||u(c))&&(f=y(n)),l(n))){const t=p(n,!0);s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop}return{...e,x:e.x-f.scrollLeft+s.x,y:e.y-f.scrollTop+s.y}},isElement:c,getDimensions:O,getOffsetParent:L,getDocumentElement:m,getElementRects:t=>{let{reference:e,floating:n,strategy:o}=t;return{reference:b(e,L(n),o),floating:{...O(n),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===i(t).direction};Object.defineProperty(t,"arrow",{enumerable:!0,get:function(){return e.arrow}}),Object.defineProperty(t,"autoPlacement",{enumerable:!0,get:function(){return e.autoPlacement}}),Object.defineProperty(t,"detectOverflow",{enumerable:!0,get:function(){return e.detectOverflow}}),Object.defineProperty(t,"flip",{enumerable:!0,get:function(){return e.flip}}),Object.defineProperty(t,"hide",{enumerable:!0,get:function(){return e.hide}}),Object.defineProperty(t,"inline",{enumerable:!0,get:function(){return e.inline}}),Object.defineProperty(t,"limitShift",{enumerable:!0,get:function(){return e.limitShift}}),Object.defineProperty(t,"offset",{enumerable:!0,get:function(){return e.offset}}),Object.defineProperty(t,"shift",{enumerable:!0,get:function(){return e.shift}}),Object.defineProperty(t,"size",{enumerable:!0,get:function(){return e.size}}),t.autoUpdate=function(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=!0,animationFrame:f=!1}=o;let u=!1;const s=i&&!f,d=r&&!f,h=l&&!f,a=s||d?[...c(t)?R(t):[],...R(e)]:[];a.forEach((t=>{s&&t.addEventListener("scroll",n,{passive:!0}),d&&t.addEventListener("resize",n)}));let g,m=null;h&&(m=new ResizeObserver(n),c(t)&&m.observe(t),m.observe(e));let y=f?p(t):null;return f&&function e(){if(u)return;const o=p(t);!y||o.x===y.x&&o.y===y.y&&o.width===y.width&&o.height===y.height||n();y=o,g=requestAnimationFrame(e)}(),()=>{var t;u=!0,a.forEach((t=>{s&&t.removeEventListener("scroll",n),d&&t.removeEventListener("resize",n)})),null==(t=m)||t.disconnect(),m=null,f&&cancelAnimationFrame(g)}},t.computePosition=(t,n,o)=>e.computePosition(t,n,{platform:W,...o}),t.getOverflowAncestors=R,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
2
|
import { withNativeProps } from '../../utils/native-props';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { RadioGroupContext } from './group-context';
|
|
@@ -7,6 +7,7 @@ import { mergeProps } from '../../utils/with-default-props';
|
|
|
7
7
|
import { CheckIcon } from '../checkbox/check-icon';
|
|
8
8
|
import { devWarning } from '../../utils/dev-log';
|
|
9
9
|
import { isDev } from '../../utils/is-dev';
|
|
10
|
+
import { NativeInput } from '../checkbox/native-input';
|
|
10
11
|
const classPrefix = `adm-radio`;
|
|
11
12
|
const defaultProps = {
|
|
12
13
|
defaultChecked: false
|
|
@@ -64,34 +65,16 @@ export const Radio = p => {
|
|
|
64
65
|
}, checked && React.createElement(CheckIcon, null));
|
|
65
66
|
};
|
|
66
67
|
|
|
67
|
-
const inputRef = useRef(null);
|
|
68
|
-
const labelRef = useRef(null);
|
|
69
|
-
useEffect(() => {
|
|
70
|
-
var _a;
|
|
71
|
-
|
|
72
|
-
(_a = labelRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('click', e => {
|
|
73
|
-
if (e.target !== inputRef.current) {
|
|
74
|
-
e.stopPropagation();
|
|
75
|
-
e.stopImmediatePropagation();
|
|
76
|
-
}
|
|
77
|
-
}, {
|
|
78
|
-
capture: false
|
|
79
|
-
});
|
|
80
|
-
}, []);
|
|
81
68
|
return withNativeProps(props, React.createElement("label", {
|
|
82
|
-
ref: labelRef,
|
|
83
69
|
className: classNames(classPrefix, {
|
|
84
70
|
[`${classPrefix}-checked`]: checked,
|
|
85
71
|
[`${classPrefix}-disabled`]: disabled,
|
|
86
72
|
[`${classPrefix}-block`]: props.block
|
|
87
73
|
})
|
|
88
|
-
}, React.createElement(
|
|
89
|
-
ref: inputRef,
|
|
74
|
+
}, React.createElement(NativeInput, {
|
|
90
75
|
type: 'radio',
|
|
91
76
|
checked: checked,
|
|
92
|
-
onChange:
|
|
93
|
-
setChecked(e.target.checked);
|
|
94
|
-
},
|
|
77
|
+
onChange: setChecked,
|
|
95
78
|
disabled: disabled,
|
|
96
79
|
id: props.id
|
|
97
80
|
}), renderIcon(), props.children && React.createElement("div", {
|
|
@@ -29,4 +29,4 @@ export declare const SearchBar: React.ForwardRefExoticComponent<Pick<InputProps,
|
|
|
29
29
|
onSearch?: ((val: string) => void) | undefined;
|
|
30
30
|
onChange?: ((val: string) => void) | undefined;
|
|
31
31
|
onCancel?: (() => void) | undefined;
|
|
32
|
-
} & NativeProps<"--border-radius" | "--height" | "--padding-left" | "--
|
|
32
|
+
} & NativeProps<"--border-radius" | "--height" | "--padding-left" | "--background" | "--placeholder-color"> & React.RefAttributes<InputRef>>;
|
|
@@ -3,7 +3,7 @@ import { NativeProps } from '../../utils/native-props';
|
|
|
3
3
|
import { BadgeProps } from '../badge';
|
|
4
4
|
export declare type TabBarItemProps = {
|
|
5
5
|
icon?: ReactNode | ((active: boolean) => ReactNode);
|
|
6
|
-
title?: ReactNode;
|
|
6
|
+
title?: ReactNode | ((active: boolean) => ReactNode);
|
|
7
7
|
badge?: BadgeProps['content'];
|
|
8
8
|
} & NativeProps;
|
|
9
9
|
export declare const TabBarItem: FC<TabBarItemProps>;
|
|
@@ -52,7 +52,7 @@ export const TabBar = p => {
|
|
|
52
52
|
}, typeof item.props.icon === 'function' ? item.props.icon(active) : item.props.icon);
|
|
53
53
|
const titleElement = item.props.title && React.createElement("div", {
|
|
54
54
|
className: `${classPrefix}-item-title`
|
|
55
|
-
}, item.props.title);
|
|
55
|
+
}, typeof item.props.title === 'function' ? item.props.title(active) : item.props.title);
|
|
56
56
|
|
|
57
57
|
if (iconElement) {
|
|
58
58
|
return React.createElement(React.Fragment, null, React.createElement(Badge, {
|
|
@@ -47,12 +47,12 @@ export const TreeSelect = p => {
|
|
|
47
47
|
let current = node;
|
|
48
48
|
|
|
49
49
|
while (current) {
|
|
50
|
-
parentNodes.
|
|
50
|
+
parentNodes.push(current);
|
|
51
51
|
const next = optionsParentMap.get(current[valueName]);
|
|
52
52
|
current = next;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
const values = parentNodes.map(i => i[valueName]);
|
|
55
|
+
const values = parentNodes.reverse().map(i => i[valueName]);
|
|
56
56
|
setValue(values);
|
|
57
57
|
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, values, {
|
|
58
58
|
options: parentNodes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
declare type ImperativeProps = {
|
|
3
|
+
visible?: boolean;
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
afterClose?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function renderImperatively(element: ReactElement<ImperativeProps>): {
|
|
8
|
+
close: () => void;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React, { useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
2
|
+
import { renderToBody } from './render-to-body';
|
|
3
|
+
export function renderImperatively(element) {
|
|
4
|
+
const Wrapper = React.forwardRef((_, ref) => {
|
|
5
|
+
const [visible, setVisible] = useState(false);
|
|
6
|
+
const closedRef = useRef(false);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
if (!closedRef.current) {
|
|
9
|
+
setVisible(true);
|
|
10
|
+
} else {
|
|
11
|
+
afterClose();
|
|
12
|
+
}
|
|
13
|
+
}, []);
|
|
14
|
+
|
|
15
|
+
function onClose() {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
|
|
18
|
+
closedRef.current = true;
|
|
19
|
+
setVisible(false);
|
|
20
|
+
(_b = (_a = element.props).onClose) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function afterClose() {
|
|
24
|
+
var _a, _b;
|
|
25
|
+
|
|
26
|
+
unmount();
|
|
27
|
+
(_b = (_a = element.props).afterClose) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
useImperativeHandle(ref, () => ({
|
|
31
|
+
close: onClose
|
|
32
|
+
}));
|
|
33
|
+
return React.cloneElement(element, Object.assign(Object.assign({}, element.props), {
|
|
34
|
+
visible,
|
|
35
|
+
onClose,
|
|
36
|
+
afterClose
|
|
37
|
+
}));
|
|
38
|
+
});
|
|
39
|
+
const wrapperRef = React.createRef();
|
|
40
|
+
const unmount = renderToBody(React.createElement(Wrapper, {
|
|
41
|
+
ref: wrapperRef
|
|
42
|
+
}));
|
|
43
|
+
|
|
44
|
+
function close() {
|
|
45
|
+
var _a;
|
|
46
|
+
|
|
47
|
+
(_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
close
|
|
52
|
+
};
|
|
53
|
+
}
|