antd-mobile 5.0.0-rc.21 → 5.0.0-rc.25
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/README.md +7 -6
- package/2x/cjs/components/avatar/avatar.d.ts +1 -1
- package/2x/cjs/components/badge/badge.css +18 -10
- package/2x/cjs/components/badge/badge.d.ts +1 -0
- package/2x/cjs/components/badge/badge.js +4 -5
- package/2x/cjs/components/button/button.css +1 -1
- package/2x/cjs/components/calendar/calendar.js +4 -0
- package/2x/cjs/components/capsule-tabs/capsule-tabs.css +1 -1
- package/2x/cjs/components/cascade-picker-view/cascade-picker-view.d.ts +1 -2
- package/2x/cjs/components/checkbox/check-icon.js +4 -13
- package/2x/cjs/components/checkbox/checkbox.css +11 -30
- package/2x/cjs/components/checkbox/checkbox.js +4 -6
- package/2x/cjs/components/checkbox/indeterminate-icon.d.ts +3 -0
- package/2x/cjs/components/checkbox/indeterminate-icon.js +24 -0
- package/2x/cjs/components/date-picker/date-picker.d.ts +1 -1
- package/2x/cjs/components/date-picker-view/date-picker-view.d.ts +3 -2
- package/2x/cjs/components/error-block/error-block.d.ts +1 -1
- package/2x/cjs/components/floating-bubble/floating-bubble.css +1 -0
- package/2x/cjs/components/floating-panel/floating-panel.d.ts +2 -0
- package/2x/cjs/components/floating-panel/floating-panel.js +5 -0
- package/2x/cjs/components/form/form-item.css +3 -2
- package/2x/cjs/components/form/form-item.d.ts +2 -2
- package/2x/cjs/components/form/form-item.js +9 -5
- package/2x/cjs/components/form/form.css +7 -3
- package/2x/cjs/components/form/form.d.ts +5 -4
- package/2x/cjs/components/form/index.css +10 -5
- package/2x/cjs/components/form/index.d.ts +5 -4
- package/2x/cjs/components/image-viewer/image-viewer.d.ts +8 -2
- package/2x/cjs/components/image-viewer/image-viewer.js +8 -5
- package/2x/cjs/components/image-viewer/index.d.ts +6 -2
- package/2x/cjs/components/image-viewer/slides.d.ts +7 -3
- package/2x/cjs/components/image-viewer/slides.js +18 -11
- package/2x/cjs/components/input/input.css +28 -25
- package/2x/cjs/components/input/input.d.ts +4 -4
- package/2x/cjs/components/input/input.js +10 -4
- package/2x/cjs/components/jumbo-tabs/jumbo-tabs.css +4 -1
- package/2x/cjs/components/list/list.css +2 -6
- package/2x/cjs/components/list/list.d.ts +1 -1
- package/2x/cjs/components/modal/modal.css +25 -20
- package/2x/cjs/components/modal/modal.js +8 -12
- package/2x/cjs/components/nav-bar/nav-bar.css +3 -3
- package/2x/cjs/components/notice-bar/notice-bar.d.ts +1 -1
- package/2x/cjs/components/passcode-input/passcode-input.d.ts +2 -2
- package/2x/cjs/components/picker/picker.css +10 -2
- package/2x/cjs/components/picker/picker.d.ts +1 -1
- package/2x/cjs/components/picker-view/picker-view.css +4 -2
- package/2x/cjs/components/picker-view/picker-view.d.ts +1 -1
- package/2x/cjs/components/picker-view/wheel.js +1 -1
- package/2x/cjs/components/popover/arrow.d.ts +3 -0
- package/2x/cjs/components/popover/arrow.js +26 -0
- package/2x/cjs/components/popover/index.d.ts +7 -15
- package/2x/cjs/components/popover/index.js +4 -2
- package/2x/cjs/components/popover/popover-menu.css +63 -0
- package/2x/cjs/components/popover/popover-menu.d.ts +20 -0
- package/{cjs/components/popover/pop-menu.js → 2x/cjs/components/popover/popover-menu.js} +23 -26
- package/2x/cjs/components/popover/popover.css +90 -318
- package/2x/cjs/components/popover/popover.d.ts +9 -8
- package/2x/cjs/components/popover/popover.js +11 -17
- package/2x/cjs/components/radio/radio.css +9 -12
- package/2x/cjs/components/radio/radio.js +1 -3
- package/2x/cjs/components/result/result.css +2 -5
- package/2x/cjs/components/search-bar/search-bar.css +14 -9
- package/2x/cjs/components/selector/selector.css +4 -0
- package/2x/cjs/components/spin-loading/spin-loading.css +1 -19
- package/2x/cjs/components/spin-loading/spin-loading.d.ts +1 -1
- package/2x/cjs/components/spin-loading/spin-loading.js +33 -5
- package/2x/cjs/components/stepper/stepper.css +4 -7
- package/2x/cjs/components/stepper/stepper.js +0 -1
- package/2x/cjs/components/swipe-action/swipe-action.d.ts +2 -2
- package/2x/cjs/components/swipe-action/swipe-action.js +1 -1
- package/2x/cjs/components/swiper/swiper.js +14 -19
- package/2x/cjs/components/switch/switch.css +8 -3
- package/2x/cjs/components/tabs/tabs.css +1 -1
- package/2x/cjs/components/tag/tag.css +3 -3
- package/2x/cjs/components/text-area/text-area.css +9 -9
- package/2x/cjs/components/text-area/text-area.d.ts +2 -2
- package/2x/cjs/components/text-area/text-area.js +41 -32
- package/2x/cjs/components/virtual-input/virtual-input.d.ts +1 -1
- package/2x/cjs/utils/get-scroll-parent.js +1 -1
- package/2x/es/components/avatar/avatar.d.ts +1 -1
- package/2x/es/components/badge/badge.css +18 -10
- package/2x/es/components/badge/badge.d.ts +1 -0
- package/2x/es/components/badge/badge.js +4 -5
- package/2x/es/components/button/button.css +1 -1
- package/2x/es/components/calendar/calendar.js +2 -0
- package/2x/es/components/capsule-tabs/capsule-tabs.css +1 -1
- package/2x/es/components/cascade-picker-view/cascade-picker-view.d.ts +1 -2
- package/2x/es/components/checkbox/check-icon.js +4 -13
- package/2x/es/components/checkbox/checkbox.css +11 -30
- package/2x/es/components/checkbox/checkbox.js +3 -6
- package/2x/es/components/checkbox/indeterminate-icon.d.ts +3 -0
- package/2x/es/components/checkbox/indeterminate-icon.js +10 -0
- package/2x/es/components/date-picker/date-picker.d.ts +1 -1
- package/2x/es/components/date-picker-view/date-picker-view.d.ts +3 -2
- package/2x/es/components/error-block/error-block.d.ts +1 -1
- package/2x/es/components/floating-bubble/floating-bubble.css +1 -0
- package/2x/es/components/floating-panel/floating-panel.d.ts +2 -0
- package/2x/es/components/floating-panel/floating-panel.js +5 -0
- package/2x/es/components/form/form-item.css +3 -2
- package/2x/es/components/form/form-item.d.ts +2 -2
- package/2x/es/components/form/form-item.js +9 -5
- package/2x/es/components/form/form.css +7 -3
- package/2x/es/components/form/form.d.ts +5 -4
- package/2x/es/components/form/index.css +10 -5
- package/2x/es/components/form/index.d.ts +5 -4
- package/2x/es/components/image-viewer/image-viewer.d.ts +8 -2
- package/2x/es/components/image-viewer/image-viewer.js +4 -3
- package/2x/es/components/image-viewer/index.d.ts +6 -2
- package/2x/es/components/image-viewer/slides.d.ts +7 -3
- package/2x/es/components/image-viewer/slides.js +19 -10
- package/2x/es/components/input/input.css +28 -25
- package/2x/es/components/input/input.d.ts +4 -4
- package/2x/es/components/input/input.js +7 -4
- package/2x/es/components/jumbo-tabs/jumbo-tabs.css +4 -1
- package/2x/es/components/list/list.css +2 -6
- package/2x/es/components/list/list.d.ts +1 -1
- package/2x/es/components/modal/modal.css +25 -20
- package/2x/es/components/modal/modal.js +8 -12
- package/2x/es/components/nav-bar/nav-bar.css +3 -3
- package/2x/es/components/notice-bar/notice-bar.d.ts +1 -1
- package/2x/es/components/passcode-input/passcode-input.d.ts +2 -2
- package/2x/es/components/picker/picker.css +10 -2
- package/2x/es/components/picker/picker.d.ts +1 -1
- package/2x/es/components/picker-view/picker-view.css +4 -2
- package/2x/es/components/picker-view/picker-view.d.ts +1 -1
- package/2x/es/components/picker-view/wheel.js +1 -1
- package/2x/es/components/popover/arrow.d.ts +3 -0
- package/2x/es/components/popover/arrow.js +12 -0
- package/2x/es/components/popover/index.d.ts +7 -15
- package/2x/es/components/popover/index.js +3 -2
- package/2x/es/components/popover/popover-menu.css +63 -0
- package/2x/es/components/popover/popover-menu.d.ts +20 -0
- package/2x/es/components/popover/popover-menu.js +52 -0
- package/2x/es/components/popover/popover.css +90 -318
- package/2x/es/components/popover/popover.d.ts +9 -8
- package/2x/es/components/popover/popover.js +10 -17
- package/2x/es/components/radio/radio.css +9 -12
- package/2x/es/components/radio/radio.js +1 -3
- package/2x/es/components/result/result.css +2 -5
- package/2x/es/components/search-bar/search-bar.css +14 -9
- package/2x/es/components/selector/selector.css +4 -0
- package/2x/es/components/spin-loading/spin-loading.css +1 -19
- package/2x/es/components/spin-loading/spin-loading.d.ts +1 -1
- package/2x/es/components/spin-loading/spin-loading.js +32 -5
- package/2x/es/components/stepper/stepper.css +4 -7
- package/2x/es/components/stepper/stepper.js +0 -1
- package/2x/es/components/swipe-action/swipe-action.d.ts +2 -2
- package/2x/es/components/swipe-action/swipe-action.js +1 -1
- package/2x/es/components/swiper/swiper.js +13 -19
- package/2x/es/components/switch/switch.css +8 -3
- package/2x/es/components/tabs/tabs.css +1 -1
- package/2x/es/components/tag/tag.css +3 -3
- package/2x/es/components/text-area/text-area.css +9 -9
- package/2x/es/components/text-area/text-area.d.ts +2 -2
- package/2x/es/components/text-area/text-area.js +41 -31
- package/2x/es/components/virtual-input/virtual-input.d.ts +1 -1
- package/2x/es/utils/get-scroll-parent.js +1 -1
- package/2x/package.json +2 -2
- package/README.md +7 -6
- package/cjs/components/avatar/avatar.d.ts +1 -1
- package/cjs/components/badge/badge.css +16 -10
- package/cjs/components/badge/badge.d.ts +1 -0
- package/cjs/components/badge/badge.js +4 -5
- package/cjs/components/button/button.css +1 -1
- package/cjs/components/calendar/calendar.js +4 -0
- package/cjs/components/capsule-tabs/capsule-tabs.css +1 -1
- package/cjs/components/cascade-picker-view/cascade-picker-view.d.ts +1 -2
- package/cjs/components/checkbox/check-icon.js +4 -13
- package/cjs/components/checkbox/checkbox.css +11 -27
- package/cjs/components/checkbox/checkbox.js +4 -6
- package/cjs/components/checkbox/indeterminate-icon.d.ts +3 -0
- package/cjs/components/checkbox/indeterminate-icon.js +24 -0
- package/cjs/components/date-picker/date-picker.d.ts +1 -1
- package/cjs/components/date-picker-view/date-picker-view.d.ts +3 -2
- package/cjs/components/error-block/error-block.d.ts +1 -1
- package/cjs/components/floating-bubble/floating-bubble.css +1 -0
- package/cjs/components/floating-panel/floating-panel.d.ts +2 -0
- package/cjs/components/floating-panel/floating-panel.js +5 -0
- package/cjs/components/form/form-item.css +3 -2
- package/cjs/components/form/form-item.d.ts +2 -2
- package/cjs/components/form/form-item.js +9 -5
- package/cjs/components/form/form.css +6 -3
- package/cjs/components/form/form.d.ts +5 -4
- package/cjs/components/form/index.css +9 -5
- package/cjs/components/form/index.d.ts +5 -4
- package/cjs/components/image-viewer/image-viewer.d.ts +8 -2
- package/cjs/components/image-viewer/image-viewer.js +8 -5
- package/cjs/components/image-viewer/index.d.ts +6 -2
- package/cjs/components/image-viewer/slides.d.ts +7 -3
- package/cjs/components/image-viewer/slides.js +18 -11
- package/cjs/components/input/input.css +26 -24
- package/cjs/components/input/input.d.ts +4 -4
- package/cjs/components/input/input.js +10 -4
- package/cjs/components/jumbo-tabs/jumbo-tabs.css +4 -1
- package/cjs/components/list/list.css +2 -5
- package/cjs/components/list/list.d.ts +1 -1
- package/cjs/components/modal/modal.css +23 -19
- package/cjs/components/modal/modal.js +8 -12
- package/cjs/components/nav-bar/nav-bar.css +3 -3
- package/cjs/components/notice-bar/notice-bar.d.ts +1 -1
- package/cjs/components/passcode-input/passcode-input.d.ts +2 -2
- package/cjs/components/picker/picker.css +9 -2
- package/cjs/components/picker/picker.d.ts +1 -1
- package/cjs/components/picker-view/picker-view.css +4 -2
- package/cjs/components/picker-view/picker-view.d.ts +1 -1
- package/cjs/components/picker-view/wheel.js +1 -1
- package/cjs/components/popover/arrow.d.ts +3 -0
- package/cjs/components/popover/arrow.js +26 -0
- package/cjs/components/popover/index.d.ts +7 -15
- package/cjs/components/popover/index.js +4 -2
- package/cjs/components/popover/popover-menu.css +52 -0
- package/cjs/components/popover/popover-menu.d.ts +20 -0
- package/{2x/cjs/components/popover/pop-menu.js → cjs/components/popover/popover-menu.js} +23 -26
- package/cjs/components/popover/popover.css +83 -276
- package/cjs/components/popover/popover.d.ts +9 -8
- package/cjs/components/popover/popover.js +11 -17
- package/cjs/components/radio/radio.css +9 -12
- package/cjs/components/radio/radio.js +1 -3
- package/cjs/components/result/result.css +2 -5
- package/cjs/components/search-bar/search-bar.css +13 -9
- package/cjs/components/selector/selector.css +3 -0
- package/cjs/components/spin-loading/spin-loading.css +1 -17
- package/cjs/components/spin-loading/spin-loading.d.ts +1 -1
- package/cjs/components/spin-loading/spin-loading.js +33 -5
- package/cjs/components/stepper/stepper.css +4 -6
- package/cjs/components/stepper/stepper.js +0 -1
- package/cjs/components/swipe-action/swipe-action.d.ts +2 -2
- package/cjs/components/swipe-action/swipe-action.js +1 -1
- package/cjs/components/swiper/swiper.js +14 -19
- package/cjs/components/switch/switch.css +8 -3
- package/cjs/components/tabs/tabs.css +1 -1
- package/cjs/components/tag/tag.css +3 -3
- package/cjs/components/text-area/text-area.css +9 -9
- package/cjs/components/text-area/text-area.d.ts +2 -2
- package/cjs/components/text-area/text-area.js +41 -32
- package/cjs/components/virtual-input/virtual-input.d.ts +1 -1
- package/cjs/utils/get-scroll-parent.js +1 -1
- package/es/components/avatar/avatar.d.ts +1 -1
- package/es/components/badge/badge.css +16 -10
- package/es/components/badge/badge.d.ts +1 -0
- package/es/components/badge/badge.js +4 -5
- package/es/components/button/button.css +1 -1
- package/es/components/calendar/calendar.js +2 -0
- package/es/components/capsule-tabs/capsule-tabs.css +1 -1
- package/es/components/cascade-picker-view/cascade-picker-view.d.ts +1 -2
- package/es/components/checkbox/check-icon.js +4 -13
- package/es/components/checkbox/checkbox.css +11 -27
- package/es/components/checkbox/checkbox.js +3 -6
- package/es/components/checkbox/indeterminate-icon.d.ts +3 -0
- package/es/components/checkbox/indeterminate-icon.js +10 -0
- package/es/components/date-picker/date-picker.d.ts +1 -1
- package/es/components/date-picker-view/date-picker-view.d.ts +3 -2
- package/es/components/error-block/error-block.d.ts +1 -1
- package/es/components/floating-bubble/floating-bubble.css +1 -0
- package/es/components/floating-panel/floating-panel.d.ts +2 -0
- package/es/components/floating-panel/floating-panel.js +5 -0
- package/es/components/form/form-item.css +3 -2
- package/es/components/form/form-item.d.ts +2 -2
- package/es/components/form/form-item.js +9 -5
- package/es/components/form/form.css +6 -3
- package/es/components/form/form.d.ts +5 -4
- package/es/components/form/index.css +9 -5
- package/es/components/form/index.d.ts +5 -4
- package/es/components/image-viewer/image-viewer.d.ts +8 -2
- package/es/components/image-viewer/image-viewer.js +4 -3
- package/es/components/image-viewer/index.d.ts +6 -2
- package/es/components/image-viewer/slides.d.ts +7 -3
- package/es/components/image-viewer/slides.js +19 -10
- package/es/components/input/input.css +26 -24
- package/es/components/input/input.d.ts +4 -4
- package/es/components/input/input.js +7 -4
- package/es/components/jumbo-tabs/jumbo-tabs.css +4 -1
- package/es/components/list/list.css +2 -5
- package/es/components/list/list.d.ts +1 -1
- package/es/components/modal/modal.css +23 -19
- package/es/components/modal/modal.js +8 -12
- package/es/components/nav-bar/nav-bar.css +3 -3
- package/es/components/notice-bar/notice-bar.d.ts +1 -1
- package/es/components/passcode-input/passcode-input.d.ts +2 -2
- package/es/components/picker/picker.css +9 -2
- package/es/components/picker/picker.d.ts +1 -1
- package/es/components/picker-view/picker-view.css +4 -2
- package/es/components/picker-view/picker-view.d.ts +1 -1
- package/es/components/picker-view/wheel.js +1 -1
- package/es/components/popover/arrow.d.ts +3 -0
- package/es/components/popover/arrow.js +12 -0
- package/es/components/popover/index.d.ts +7 -15
- package/es/components/popover/index.js +3 -2
- package/es/components/popover/popover-menu.css +52 -0
- package/es/components/popover/popover-menu.d.ts +20 -0
- package/es/components/popover/popover-menu.js +52 -0
- package/es/components/popover/popover.css +83 -276
- package/es/components/popover/popover.d.ts +9 -8
- package/es/components/popover/popover.js +10 -17
- package/es/components/radio/radio.css +9 -12
- package/es/components/radio/radio.js +1 -3
- package/es/components/result/result.css +2 -5
- package/es/components/search-bar/search-bar.css +13 -9
- package/es/components/selector/selector.css +3 -0
- package/es/components/spin-loading/spin-loading.css +1 -17
- package/es/components/spin-loading/spin-loading.d.ts +1 -1
- package/es/components/spin-loading/spin-loading.js +32 -5
- package/es/components/stepper/stepper.css +4 -6
- package/es/components/stepper/stepper.js +0 -1
- package/es/components/swipe-action/swipe-action.d.ts +2 -2
- package/es/components/swipe-action/swipe-action.js +1 -1
- package/es/components/swiper/swiper.js +13 -19
- package/es/components/switch/switch.css +8 -3
- package/es/components/tabs/tabs.css +1 -1
- package/es/components/tag/tag.css +3 -3
- package/es/components/text-area/text-area.css +9 -9
- package/es/components/text-area/text-area.d.ts +2 -2
- package/es/components/text-area/text-area.js +41 -31
- package/es/components/virtual-input/virtual-input.d.ts +1 -1
- package/es/utils/get-scroll-parent.js +1 -1
- package/package.json +2 -2
- package/umd/antd-mobile.js +1 -1
- package/2x/cjs/components/popover/animation.css +0 -111
- package/2x/cjs/components/popover/pop-menu.d.ts +0 -28
- package/2x/es/components/popover/animation.css +0 -111
- package/2x/es/components/popover/pop-menu.d.ts +0 -28
- package/2x/es/components/popover/pop-menu.js +0 -54
- package/cjs/components/popover/animation.css +0 -96
- package/cjs/components/popover/pop-menu.d.ts +0 -28
- package/es/components/popover/animation.css +0 -96
- package/es/components/popover/pop-menu.d.ts +0 -28
- package/es/components/popover/pop-menu.js +0 -54
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
@keyframes amSlideDownIn {
|
|
2
|
-
0% {
|
|
3
|
-
transform: scaleY(0.8);
|
|
4
|
-
transform-origin: 0% 0%;
|
|
5
|
-
opacity: 0;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
100% {
|
|
9
|
-
transform: scaleY(1);
|
|
10
|
-
transform-origin: 0% 0%;
|
|
11
|
-
opacity: 1;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@keyframes amSlideDownOut {
|
|
16
|
-
0% {
|
|
17
|
-
transform: scaleY(1);
|
|
18
|
-
transform-origin: 0% 0%;
|
|
19
|
-
opacity: 1;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
100% {
|
|
23
|
-
transform: scaleY(0.8);
|
|
24
|
-
transform-origin: 0% 0%;
|
|
25
|
-
opacity: 0;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@keyframes amSlideUpIn {
|
|
30
|
-
0% {
|
|
31
|
-
transform: scaleY(0.8);
|
|
32
|
-
transform-origin: 100% 100%;
|
|
33
|
-
opacity: 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
100% {
|
|
37
|
-
transform: scaleY(1);
|
|
38
|
-
transform-origin: 100% 100%;
|
|
39
|
-
opacity: 1;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@keyframes amSlideUpOut {
|
|
44
|
-
0% {
|
|
45
|
-
transform: scaleY(1);
|
|
46
|
-
transform-origin: 100% 100%;
|
|
47
|
-
opacity: 1;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
100% {
|
|
51
|
-
transform: scaleY(0.8);
|
|
52
|
-
transform-origin: 100% 100%;
|
|
53
|
-
opacity: 0;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@keyframes amSlideRightIn {
|
|
58
|
-
0% {
|
|
59
|
-
transform: scaleX(0.8);
|
|
60
|
-
transform-origin: 0% 0%;
|
|
61
|
-
opacity: 0;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
100% {
|
|
65
|
-
transform: scaleX(1);
|
|
66
|
-
transform-origin: 0% 0%;
|
|
67
|
-
opacity: 1;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@keyframes amSlideRightOut {
|
|
72
|
-
0% {
|
|
73
|
-
transform: scaleX(1);
|
|
74
|
-
transform-origin: 0% 0%;
|
|
75
|
-
opacity: 1;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
100% {
|
|
79
|
-
transform: scaleX(0.8);
|
|
80
|
-
transform-origin: 0% 0%;
|
|
81
|
-
opacity: 0;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
@keyframes amSlideLeftIn {
|
|
86
|
-
0% {
|
|
87
|
-
transform: scaleX(0.8);
|
|
88
|
-
transform-origin: 100% 0%;
|
|
89
|
-
opacity: 0;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
100% {
|
|
93
|
-
transform: scaleX(1);
|
|
94
|
-
transform-origin: 100% 0%;
|
|
95
|
-
opacity: 1;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
@keyframes amSlideLeftOut {
|
|
100
|
-
0% {
|
|
101
|
-
transform: scaleX(1);
|
|
102
|
-
transform-origin: 100% 0%;
|
|
103
|
-
opacity: 1;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
100% {
|
|
107
|
-
transform: scaleX(0.8);
|
|
108
|
-
transform-origin: 100% 0%;
|
|
109
|
-
opacity: 0;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React, { ReactElement, Ref } from 'react';
|
|
2
|
-
import { BasePopoverProps, PopoverRef } from './popover';
|
|
3
|
-
export declare type Action = {
|
|
4
|
-
text: React.ReactNode;
|
|
5
|
-
icon?: React.ReactNode;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
key?: string;
|
|
8
|
-
onClick?: () => void;
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
};
|
|
11
|
-
export declare type PopMenuProps<T> = BasePopoverProps & {
|
|
12
|
-
actions: T[];
|
|
13
|
-
onAction?: (text: T) => void;
|
|
14
|
-
};
|
|
15
|
-
export declare const PopMenu: <T extends Action = Action>(props: {
|
|
16
|
-
getContainer?: (() => HTMLElement) | undefined;
|
|
17
|
-
destroyOnHide?: boolean | undefined;
|
|
18
|
-
children: React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>;
|
|
19
|
-
mode?: "dark" | "light" | undefined;
|
|
20
|
-
trigger?: "click" | undefined;
|
|
21
|
-
placement: "left" | "right" | "bottom" | "top" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
|
|
22
|
-
stopPropagation?: "click"[] | undefined;
|
|
23
|
-
} & Pick<import("rc-tooltip/lib/Tooltip").TooltipProps, "visible" | "zIndex" | "align" | "defaultVisible" | "onVisibleChange" | "overlayStyle" | "overlayClassName"> & import("../../utils/native-props").NativeProps<"--z-index"> & {
|
|
24
|
-
actions: T[];
|
|
25
|
-
onAction?: ((text: T) => void) | undefined;
|
|
26
|
-
} & {
|
|
27
|
-
ref?: ((instance: PopoverRef | null) => void) | React.RefObject<PopoverRef> | null | undefined;
|
|
28
|
-
}) => ReactElement;
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
@keyframes amSlideDownIn {
|
|
2
|
-
0% {
|
|
3
|
-
transform: scaleY(0.8);
|
|
4
|
-
transform-origin: 0% 0%;
|
|
5
|
-
opacity: 0;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
100% {
|
|
9
|
-
transform: scaleY(1);
|
|
10
|
-
transform-origin: 0% 0%;
|
|
11
|
-
opacity: 1;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@keyframes amSlideDownOut {
|
|
16
|
-
0% {
|
|
17
|
-
transform: scaleY(1);
|
|
18
|
-
transform-origin: 0% 0%;
|
|
19
|
-
opacity: 1;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
100% {
|
|
23
|
-
transform: scaleY(0.8);
|
|
24
|
-
transform-origin: 0% 0%;
|
|
25
|
-
opacity: 0;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@keyframes amSlideUpIn {
|
|
30
|
-
0% {
|
|
31
|
-
transform: scaleY(0.8);
|
|
32
|
-
transform-origin: 100% 100%;
|
|
33
|
-
opacity: 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
100% {
|
|
37
|
-
transform: scaleY(1);
|
|
38
|
-
transform-origin: 100% 100%;
|
|
39
|
-
opacity: 1;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@keyframes amSlideUpOut {
|
|
44
|
-
0% {
|
|
45
|
-
transform: scaleY(1);
|
|
46
|
-
transform-origin: 100% 100%;
|
|
47
|
-
opacity: 1;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
100% {
|
|
51
|
-
transform: scaleY(0.8);
|
|
52
|
-
transform-origin: 100% 100%;
|
|
53
|
-
opacity: 0;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@keyframes amSlideRightIn {
|
|
58
|
-
0% {
|
|
59
|
-
transform: scaleX(0.8);
|
|
60
|
-
transform-origin: 0% 0%;
|
|
61
|
-
opacity: 0;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
100% {
|
|
65
|
-
transform: scaleX(1);
|
|
66
|
-
transform-origin: 0% 0%;
|
|
67
|
-
opacity: 1;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@keyframes amSlideRightOut {
|
|
72
|
-
0% {
|
|
73
|
-
transform: scaleX(1);
|
|
74
|
-
transform-origin: 0% 0%;
|
|
75
|
-
opacity: 1;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
100% {
|
|
79
|
-
transform: scaleX(0.8);
|
|
80
|
-
transform-origin: 0% 0%;
|
|
81
|
-
opacity: 0;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
@keyframes amSlideLeftIn {
|
|
86
|
-
0% {
|
|
87
|
-
transform: scaleX(0.8);
|
|
88
|
-
transform-origin: 100% 0%;
|
|
89
|
-
opacity: 0;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
100% {
|
|
93
|
-
transform: scaleX(1);
|
|
94
|
-
transform-origin: 100% 0%;
|
|
95
|
-
opacity: 1;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
@keyframes amSlideLeftOut {
|
|
100
|
-
0% {
|
|
101
|
-
transform: scaleX(1);
|
|
102
|
-
transform-origin: 100% 0%;
|
|
103
|
-
opacity: 1;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
100% {
|
|
107
|
-
transform: scaleX(0.8);
|
|
108
|
-
transform-origin: 100% 0%;
|
|
109
|
-
opacity: 0;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React, { ReactElement, Ref } from 'react';
|
|
2
|
-
import { BasePopoverProps, PopoverRef } from './popover';
|
|
3
|
-
export declare type Action = {
|
|
4
|
-
text: React.ReactNode;
|
|
5
|
-
icon?: React.ReactNode;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
key?: string;
|
|
8
|
-
onClick?: () => void;
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
};
|
|
11
|
-
export declare type PopMenuProps<T> = BasePopoverProps & {
|
|
12
|
-
actions: T[];
|
|
13
|
-
onAction?: (text: T) => void;
|
|
14
|
-
};
|
|
15
|
-
export declare const PopMenu: <T extends Action = Action>(props: {
|
|
16
|
-
getContainer?: (() => HTMLElement) | undefined;
|
|
17
|
-
destroyOnHide?: boolean | undefined;
|
|
18
|
-
children: React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>;
|
|
19
|
-
mode?: "dark" | "light" | undefined;
|
|
20
|
-
trigger?: "click" | undefined;
|
|
21
|
-
placement: "left" | "right" | "bottom" | "top" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
|
|
22
|
-
stopPropagation?: "click"[] | undefined;
|
|
23
|
-
} & Pick<import("rc-tooltip/lib/Tooltip").TooltipProps, "visible" | "zIndex" | "align" | "defaultVisible" | "onVisibleChange" | "overlayStyle" | "overlayClassName"> & import("../../utils/native-props").NativeProps<"--z-index"> & {
|
|
24
|
-
actions: T[];
|
|
25
|
-
onAction?: ((text: T) => void) | undefined;
|
|
26
|
-
} & {
|
|
27
|
-
ref?: ((instance: PopoverRef | null) => void) | React.RefObject<PopoverRef> | null | undefined;
|
|
28
|
-
}) => ReactElement;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef, useCallback, useImperativeHandle, useMemo, useRef } from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import Button from '../button';
|
|
4
|
-
import { Popover } from './popover';
|
|
5
|
-
const classPrefix = `adm-popover`;
|
|
6
|
-
export const PopMenu = forwardRef((props, ref) => {
|
|
7
|
-
const innerRef = useRef(null);
|
|
8
|
-
useImperativeHandle(ref, () => innerRef.current, []);
|
|
9
|
-
const onClick = useCallback(e => {
|
|
10
|
-
var _a;
|
|
11
|
-
|
|
12
|
-
const {
|
|
13
|
-
onAction
|
|
14
|
-
} = props;
|
|
15
|
-
|
|
16
|
-
if (onAction) {
|
|
17
|
-
onAction(e);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
(_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.hide();
|
|
21
|
-
}, [props.onAction]);
|
|
22
|
-
const overlay = useMemo(() => {
|
|
23
|
-
return React.createElement(React.Fragment, null, (props.actions || []).map((ele, index) => {
|
|
24
|
-
var _a;
|
|
25
|
-
|
|
26
|
-
return React.createElement("div", {
|
|
27
|
-
className: classNames(`${classPrefix}-inner-menu`, {
|
|
28
|
-
[`${classPrefix}-inner-menu-with-icon`]: !!ele.icon
|
|
29
|
-
}),
|
|
30
|
-
key: (_a = ele.key) !== null && _a !== void 0 ? _a : index
|
|
31
|
-
}, React.createElement(Button, {
|
|
32
|
-
disabled: ele.disabled,
|
|
33
|
-
onClick: () => {
|
|
34
|
-
var _a;
|
|
35
|
-
|
|
36
|
-
if (!ele.disabled) {
|
|
37
|
-
onClick(ele);
|
|
38
|
-
(_a = ele.onClick) === null || _a === void 0 ? void 0 : _a.call(ele);
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
fill: 'none',
|
|
42
|
-
block: true
|
|
43
|
-
}, ele.icon && React.createElement("span", {
|
|
44
|
-
className: `${classPrefix}-inner-menu-icon`
|
|
45
|
-
}, ele.icon), ele.text));
|
|
46
|
-
}));
|
|
47
|
-
}, [props.actions, onClick]);
|
|
48
|
-
return React.createElement(Popover, Object.assign({
|
|
49
|
-
ref: innerRef
|
|
50
|
-
}, props, {
|
|
51
|
-
overlayClassName: classNames(`${classPrefix}-menu`, props.overlayClassName),
|
|
52
|
-
content: overlay
|
|
53
|
-
}), props.children);
|
|
54
|
-
});
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
@keyframes amSlideDownIn {
|
|
2
|
-
0% {
|
|
3
|
-
transform: scaleY(0.8);
|
|
4
|
-
transform-origin: 0% 0%;
|
|
5
|
-
opacity: 0;
|
|
6
|
-
}
|
|
7
|
-
100% {
|
|
8
|
-
transform: scaleY(1);
|
|
9
|
-
transform-origin: 0% 0%;
|
|
10
|
-
opacity: 1;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
@keyframes amSlideDownOut {
|
|
14
|
-
0% {
|
|
15
|
-
transform: scaleY(1);
|
|
16
|
-
transform-origin: 0% 0%;
|
|
17
|
-
opacity: 1;
|
|
18
|
-
}
|
|
19
|
-
100% {
|
|
20
|
-
transform: scaleY(0.8);
|
|
21
|
-
transform-origin: 0% 0%;
|
|
22
|
-
opacity: 0;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
@keyframes amSlideUpIn {
|
|
26
|
-
0% {
|
|
27
|
-
transform: scaleY(0.8);
|
|
28
|
-
transform-origin: 100% 100%;
|
|
29
|
-
opacity: 0;
|
|
30
|
-
}
|
|
31
|
-
100% {
|
|
32
|
-
transform: scaleY(1);
|
|
33
|
-
transform-origin: 100% 100%;
|
|
34
|
-
opacity: 1;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
@keyframes amSlideUpOut {
|
|
38
|
-
0% {
|
|
39
|
-
transform: scaleY(1);
|
|
40
|
-
transform-origin: 100% 100%;
|
|
41
|
-
opacity: 1;
|
|
42
|
-
}
|
|
43
|
-
100% {
|
|
44
|
-
transform: scaleY(0.8);
|
|
45
|
-
transform-origin: 100% 100%;
|
|
46
|
-
opacity: 0;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
@keyframes amSlideRightIn {
|
|
50
|
-
0% {
|
|
51
|
-
transform: scaleX(0.8);
|
|
52
|
-
transform-origin: 0% 0%;
|
|
53
|
-
opacity: 0;
|
|
54
|
-
}
|
|
55
|
-
100% {
|
|
56
|
-
transform: scaleX(1);
|
|
57
|
-
transform-origin: 0% 0%;
|
|
58
|
-
opacity: 1;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
@keyframes amSlideRightOut {
|
|
62
|
-
0% {
|
|
63
|
-
transform: scaleX(1);
|
|
64
|
-
transform-origin: 0% 0%;
|
|
65
|
-
opacity: 1;
|
|
66
|
-
}
|
|
67
|
-
100% {
|
|
68
|
-
transform: scaleX(0.8);
|
|
69
|
-
transform-origin: 0% 0%;
|
|
70
|
-
opacity: 0;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
@keyframes amSlideLeftIn {
|
|
74
|
-
0% {
|
|
75
|
-
transform: scaleX(0.8);
|
|
76
|
-
transform-origin: 100% 0%;
|
|
77
|
-
opacity: 0;
|
|
78
|
-
}
|
|
79
|
-
100% {
|
|
80
|
-
transform: scaleX(1);
|
|
81
|
-
transform-origin: 100% 0%;
|
|
82
|
-
opacity: 1;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
@keyframes amSlideLeftOut {
|
|
86
|
-
0% {
|
|
87
|
-
transform: scaleX(1);
|
|
88
|
-
transform-origin: 100% 0%;
|
|
89
|
-
opacity: 1;
|
|
90
|
-
}
|
|
91
|
-
100% {
|
|
92
|
-
transform: scaleX(0.8);
|
|
93
|
-
transform-origin: 100% 0%;
|
|
94
|
-
opacity: 0;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React, { ReactElement, Ref } from 'react';
|
|
2
|
-
import { BasePopoverProps, PopoverRef } from './popover';
|
|
3
|
-
export declare type Action = {
|
|
4
|
-
text: React.ReactNode;
|
|
5
|
-
icon?: React.ReactNode;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
key?: string;
|
|
8
|
-
onClick?: () => void;
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
};
|
|
11
|
-
export declare type PopMenuProps<T> = BasePopoverProps & {
|
|
12
|
-
actions: T[];
|
|
13
|
-
onAction?: (text: T) => void;
|
|
14
|
-
};
|
|
15
|
-
export declare const PopMenu: <T extends Action = Action>(props: {
|
|
16
|
-
getContainer?: (() => HTMLElement) | undefined;
|
|
17
|
-
destroyOnHide?: boolean | undefined;
|
|
18
|
-
children: React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>;
|
|
19
|
-
mode?: "dark" | "light" | undefined;
|
|
20
|
-
trigger?: "click" | undefined;
|
|
21
|
-
placement: "left" | "right" | "bottom" | "top" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
|
|
22
|
-
stopPropagation?: "click"[] | undefined;
|
|
23
|
-
} & Pick<import("rc-tooltip/lib/Tooltip").TooltipProps, "visible" | "zIndex" | "align" | "defaultVisible" | "onVisibleChange" | "overlayStyle" | "overlayClassName"> & import("../../utils/native-props").NativeProps<"--z-index"> & {
|
|
24
|
-
actions: T[];
|
|
25
|
-
onAction?: ((text: T) => void) | undefined;
|
|
26
|
-
} & {
|
|
27
|
-
ref?: ((instance: PopoverRef | null) => void) | React.RefObject<PopoverRef> | null | undefined;
|
|
28
|
-
}) => ReactElement;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
@keyframes amSlideDownIn {
|
|
2
|
-
0% {
|
|
3
|
-
transform: scaleY(0.8);
|
|
4
|
-
transform-origin: 0% 0%;
|
|
5
|
-
opacity: 0;
|
|
6
|
-
}
|
|
7
|
-
100% {
|
|
8
|
-
transform: scaleY(1);
|
|
9
|
-
transform-origin: 0% 0%;
|
|
10
|
-
opacity: 1;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
@keyframes amSlideDownOut {
|
|
14
|
-
0% {
|
|
15
|
-
transform: scaleY(1);
|
|
16
|
-
transform-origin: 0% 0%;
|
|
17
|
-
opacity: 1;
|
|
18
|
-
}
|
|
19
|
-
100% {
|
|
20
|
-
transform: scaleY(0.8);
|
|
21
|
-
transform-origin: 0% 0%;
|
|
22
|
-
opacity: 0;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
@keyframes amSlideUpIn {
|
|
26
|
-
0% {
|
|
27
|
-
transform: scaleY(0.8);
|
|
28
|
-
transform-origin: 100% 100%;
|
|
29
|
-
opacity: 0;
|
|
30
|
-
}
|
|
31
|
-
100% {
|
|
32
|
-
transform: scaleY(1);
|
|
33
|
-
transform-origin: 100% 100%;
|
|
34
|
-
opacity: 1;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
@keyframes amSlideUpOut {
|
|
38
|
-
0% {
|
|
39
|
-
transform: scaleY(1);
|
|
40
|
-
transform-origin: 100% 100%;
|
|
41
|
-
opacity: 1;
|
|
42
|
-
}
|
|
43
|
-
100% {
|
|
44
|
-
transform: scaleY(0.8);
|
|
45
|
-
transform-origin: 100% 100%;
|
|
46
|
-
opacity: 0;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
@keyframes amSlideRightIn {
|
|
50
|
-
0% {
|
|
51
|
-
transform: scaleX(0.8);
|
|
52
|
-
transform-origin: 0% 0%;
|
|
53
|
-
opacity: 0;
|
|
54
|
-
}
|
|
55
|
-
100% {
|
|
56
|
-
transform: scaleX(1);
|
|
57
|
-
transform-origin: 0% 0%;
|
|
58
|
-
opacity: 1;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
@keyframes amSlideRightOut {
|
|
62
|
-
0% {
|
|
63
|
-
transform: scaleX(1);
|
|
64
|
-
transform-origin: 0% 0%;
|
|
65
|
-
opacity: 1;
|
|
66
|
-
}
|
|
67
|
-
100% {
|
|
68
|
-
transform: scaleX(0.8);
|
|
69
|
-
transform-origin: 0% 0%;
|
|
70
|
-
opacity: 0;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
@keyframes amSlideLeftIn {
|
|
74
|
-
0% {
|
|
75
|
-
transform: scaleX(0.8);
|
|
76
|
-
transform-origin: 100% 0%;
|
|
77
|
-
opacity: 0;
|
|
78
|
-
}
|
|
79
|
-
100% {
|
|
80
|
-
transform: scaleX(1);
|
|
81
|
-
transform-origin: 100% 0%;
|
|
82
|
-
opacity: 1;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
@keyframes amSlideLeftOut {
|
|
86
|
-
0% {
|
|
87
|
-
transform: scaleX(1);
|
|
88
|
-
transform-origin: 100% 0%;
|
|
89
|
-
opacity: 1;
|
|
90
|
-
}
|
|
91
|
-
100% {
|
|
92
|
-
transform: scaleX(0.8);
|
|
93
|
-
transform-origin: 100% 0%;
|
|
94
|
-
opacity: 0;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React, { ReactElement, Ref } from 'react';
|
|
2
|
-
import { BasePopoverProps, PopoverRef } from './popover';
|
|
3
|
-
export declare type Action = {
|
|
4
|
-
text: React.ReactNode;
|
|
5
|
-
icon?: React.ReactNode;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
key?: string;
|
|
8
|
-
onClick?: () => void;
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
};
|
|
11
|
-
export declare type PopMenuProps<T> = BasePopoverProps & {
|
|
12
|
-
actions: T[];
|
|
13
|
-
onAction?: (text: T) => void;
|
|
14
|
-
};
|
|
15
|
-
export declare const PopMenu: <T extends Action = Action>(props: {
|
|
16
|
-
getContainer?: (() => HTMLElement) | undefined;
|
|
17
|
-
destroyOnHide?: boolean | undefined;
|
|
18
|
-
children: React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>;
|
|
19
|
-
mode?: "dark" | "light" | undefined;
|
|
20
|
-
trigger?: "click" | undefined;
|
|
21
|
-
placement: "left" | "right" | "bottom" | "top" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
|
|
22
|
-
stopPropagation?: "click"[] | undefined;
|
|
23
|
-
} & Pick<import("rc-tooltip/lib/Tooltip").TooltipProps, "visible" | "zIndex" | "align" | "defaultVisible" | "onVisibleChange" | "overlayStyle" | "overlayClassName"> & import("../../utils/native-props").NativeProps<"--z-index"> & {
|
|
24
|
-
actions: T[];
|
|
25
|
-
onAction?: ((text: T) => void) | undefined;
|
|
26
|
-
} & {
|
|
27
|
-
ref?: ((instance: PopoverRef | null) => void) | React.RefObject<PopoverRef> | null | undefined;
|
|
28
|
-
}) => ReactElement;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef, useCallback, useImperativeHandle, useMemo, useRef } from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import Button from '../button';
|
|
4
|
-
import { Popover } from './popover';
|
|
5
|
-
const classPrefix = `adm-popover`;
|
|
6
|
-
export const PopMenu = forwardRef((props, ref) => {
|
|
7
|
-
const innerRef = useRef(null);
|
|
8
|
-
useImperativeHandle(ref, () => innerRef.current, []);
|
|
9
|
-
const onClick = useCallback(e => {
|
|
10
|
-
var _a;
|
|
11
|
-
|
|
12
|
-
const {
|
|
13
|
-
onAction
|
|
14
|
-
} = props;
|
|
15
|
-
|
|
16
|
-
if (onAction) {
|
|
17
|
-
onAction(e);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
(_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.hide();
|
|
21
|
-
}, [props.onAction]);
|
|
22
|
-
const overlay = useMemo(() => {
|
|
23
|
-
return React.createElement(React.Fragment, null, (props.actions || []).map((ele, index) => {
|
|
24
|
-
var _a;
|
|
25
|
-
|
|
26
|
-
return React.createElement("div", {
|
|
27
|
-
className: classNames(`${classPrefix}-inner-menu`, {
|
|
28
|
-
[`${classPrefix}-inner-menu-with-icon`]: !!ele.icon
|
|
29
|
-
}),
|
|
30
|
-
key: (_a = ele.key) !== null && _a !== void 0 ? _a : index
|
|
31
|
-
}, React.createElement(Button, {
|
|
32
|
-
disabled: ele.disabled,
|
|
33
|
-
onClick: () => {
|
|
34
|
-
var _a;
|
|
35
|
-
|
|
36
|
-
if (!ele.disabled) {
|
|
37
|
-
onClick(ele);
|
|
38
|
-
(_a = ele.onClick) === null || _a === void 0 ? void 0 : _a.call(ele);
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
fill: 'none',
|
|
42
|
-
block: true
|
|
43
|
-
}, ele.icon && React.createElement("span", {
|
|
44
|
-
className: `${classPrefix}-inner-menu-icon`
|
|
45
|
-
}, ele.icon), ele.text));
|
|
46
|
-
}));
|
|
47
|
-
}, [props.actions, onClick]);
|
|
48
|
-
return React.createElement(Popover, Object.assign({
|
|
49
|
-
ref: innerRef
|
|
50
|
-
}, props, {
|
|
51
|
-
overlayClassName: classNames(`${classPrefix}-menu`, props.overlayClassName),
|
|
52
|
-
content: overlay
|
|
53
|
-
}), props.children);
|
|
54
|
-
});
|