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,13 +1,14 @@
|
|
|
1
1
|
.adm-search-bar {
|
|
2
|
-
|
|
3
|
-
justify-content: center;
|
|
4
|
-
align-items: center;
|
|
5
|
-
--height: 56px;
|
|
2
|
+
--height: 64px;
|
|
6
3
|
--padding-left: 16px;
|
|
7
4
|
--background: #f5f5f5;
|
|
8
5
|
--border-radius: 12px;
|
|
9
6
|
--placeholder-color: var(--adm-color-weak);
|
|
10
7
|
---placeholder-color: var(--placeholder-color);
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
height: var(--height);
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
.adm-search-bar .adm-search-bar-input-box {
|
|
@@ -23,23 +24,23 @@
|
|
|
23
24
|
|
|
24
25
|
.adm-search-bar .adm-search-bar-input-box .adm-search-bar-input-box-icon {
|
|
25
26
|
flex: none;
|
|
26
|
-
color: var(
|
|
27
|
+
color: var(--adm-color-light);
|
|
27
28
|
font-size: 32px;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
.adm-search-bar .adm-search-bar-input-box .adm-search-bar-input {
|
|
31
32
|
flex: auto;
|
|
32
33
|
padding: 8px 16px 8px 8px;
|
|
33
|
-
height: var(--height);
|
|
34
|
+
height: calc(var(--height) - 4px);
|
|
34
35
|
box-sizing: border-box;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
.adm-search-bar .adm-search-bar-input-box .adm-search-bar-input.adm-input
|
|
38
|
+
.adm-search-bar .adm-search-bar-input-box .adm-search-bar-input.adm-input {
|
|
38
39
|
--placeholder-color: var(---placeholder-color);
|
|
40
|
+
--font-size: 30px;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
.adm-search-bar .adm-search-bar-input-box .adm-search-bar-input .adm-input {
|
|
42
|
-
font-size: 26px;
|
|
43
|
+
.adm-search-bar .adm-search-bar-input-box .adm-search-bar-input .adm-input-element {
|
|
43
44
|
line-height: 38px;
|
|
44
45
|
}
|
|
45
46
|
|
|
@@ -56,6 +57,10 @@
|
|
|
56
57
|
padding: 6px 24px;
|
|
57
58
|
}
|
|
58
59
|
|
|
60
|
+
.adm-search-bar-active .adm-input.adm-input.adm-input {
|
|
61
|
+
--placeholder-color: var(--adm-color-light);
|
|
62
|
+
}
|
|
63
|
+
|
|
59
64
|
.adm-search-bar-active .adm-search-bar-input-box {
|
|
60
65
|
border-color: var(--adm-color-primary);
|
|
61
66
|
background: var(--adm-color-white);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
.adm-spin-loading {
|
|
2
2
|
--color: var(--adm-color-weak);
|
|
3
3
|
--size: 64px;
|
|
4
|
-
--track-width: calc(var(--size) / 16);
|
|
5
4
|
--pi: 3.14159265;
|
|
6
|
-
--radius:
|
|
5
|
+
--radius: 15;
|
|
7
6
|
--circumference: calc(var(--radius) * var(--pi) * 2);
|
|
8
7
|
width: var(--size);
|
|
9
8
|
height: var(--size);
|
|
@@ -17,13 +16,6 @@
|
|
|
17
16
|
|
|
18
17
|
.adm-spin-loading-svg > .adm-spin-loading-fill {
|
|
19
18
|
stroke: var(--color);
|
|
20
|
-
stroke-width: var(--track-width);
|
|
21
|
-
stroke-dasharray: var(--circumference);
|
|
22
|
-
stroke-linecap: square;
|
|
23
|
-
animation: adm-spin-loading-fill 1s infinite alternate-reverse linear;
|
|
24
|
-
r: var(--radius);
|
|
25
|
-
cx: calc(var(--size) / 2);
|
|
26
|
-
cy: calc(var(--size) / 2);
|
|
27
19
|
}
|
|
28
20
|
|
|
29
21
|
@keyframes adm-spin-loading-rotate {
|
|
@@ -34,14 +26,4 @@
|
|
|
34
26
|
to {
|
|
35
27
|
transform: rotate(360deg);
|
|
36
28
|
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@keyframes adm-spin-loading-fill {
|
|
40
|
-
from {
|
|
41
|
-
stroke-dashoffset: calc(var(--circumference) * (1 - 0.4));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
to {
|
|
45
|
-
stroke-dashoffset: calc(var(--circumference) * (1 - 0.8));
|
|
46
|
-
}
|
|
47
29
|
}
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
export declare type SpinLoadingProps = {
|
|
4
4
|
color?: 'default' | 'primary' | 'white' | (string & {});
|
|
5
|
-
} & NativeProps<'--color' | '--size'
|
|
5
|
+
} & NativeProps<'--color' | '--size'>;
|
|
6
6
|
export declare const SpinLoading: React.NamedExoticComponent<SpinLoadingProps>;
|
|
@@ -11,6 +11,8 @@ var _nativeProps = require("../../utils/native-props");
|
|
|
11
11
|
|
|
12
12
|
var _withDefaultProps = require("../../utils/with-default-props");
|
|
13
13
|
|
|
14
|
+
var _web = require("@react-spring/web");
|
|
15
|
+
|
|
14
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
17
|
|
|
16
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -24,20 +26,46 @@ const colorRecord = {
|
|
|
24
26
|
const defaultProps = {
|
|
25
27
|
color: 'default'
|
|
26
28
|
};
|
|
29
|
+
const circumference = 15 * 3.14159265358979 * 2;
|
|
27
30
|
const SpinLoading = (0, _react.memo)(p => {
|
|
28
31
|
var _a;
|
|
29
32
|
|
|
30
33
|
const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
|
|
31
|
-
|
|
34
|
+
const {
|
|
35
|
+
percent
|
|
36
|
+
} = (0, _web.useSpring)({
|
|
37
|
+
loop: {
|
|
38
|
+
reverse: true
|
|
39
|
+
},
|
|
40
|
+
from: {
|
|
41
|
+
percent: 30
|
|
42
|
+
},
|
|
43
|
+
to: {
|
|
44
|
+
percent: 80
|
|
45
|
+
},
|
|
46
|
+
config: {
|
|
47
|
+
duration: 1200
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement(_web.animated.div, {
|
|
32
51
|
className: classPrefix,
|
|
33
52
|
style: {
|
|
34
|
-
'--color': (_a = colorRecord[props.color]) !== null && _a !== void 0 ? _a : props.color
|
|
53
|
+
'--color': (_a = colorRecord[props.color]) !== null && _a !== void 0 ? _a : props.color,
|
|
54
|
+
'--percent': percent
|
|
35
55
|
}
|
|
36
56
|
}, _react.default.createElement("svg", {
|
|
37
|
-
className: `${classPrefix}-svg
|
|
38
|
-
|
|
57
|
+
className: `${classPrefix}-svg`,
|
|
58
|
+
viewBox: '0 0 32 32'
|
|
59
|
+
}, _react.default.createElement(_web.animated.circle, {
|
|
39
60
|
className: `${classPrefix}-fill`,
|
|
40
|
-
fill: 'transparent'
|
|
61
|
+
fill: 'transparent',
|
|
62
|
+
strokeWidth: '2',
|
|
63
|
+
strokeDasharray: circumference,
|
|
64
|
+
strokeDashoffset: percent,
|
|
65
|
+
strokeLinecap: 'square',
|
|
66
|
+
r: 15,
|
|
67
|
+
cx: 16,
|
|
68
|
+
cy: 16
|
|
41
69
|
}))));
|
|
42
70
|
});
|
|
43
71
|
exports.SpinLoading = SpinLoading;
|
|
@@ -34,13 +34,10 @@
|
|
|
34
34
|
|
|
35
35
|
.adm-stepper .adm-stepper-input {
|
|
36
36
|
height: var(--height);
|
|
37
|
-
background-color: var(--input-background-color);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
text-align: center;
|
|
42
|
-
font-size: var(--input-font-size);
|
|
43
|
-
color: var(--input-font-color);
|
|
37
|
+
--background-color: var(--input-background-color);
|
|
38
|
+
--font-size: var(--input-font-size);
|
|
39
|
+
--color: var(--input-font-color);
|
|
40
|
+
--text-align: center;
|
|
44
41
|
}
|
|
45
42
|
|
|
46
43
|
.adm-stepper-minus,
|
|
@@ -102,7 +102,6 @@ const Stepper = p => {
|
|
|
102
102
|
|
|
103
103
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
104
104
|
className: (0, _classnames.default)(classPrefix, {
|
|
105
|
-
[`${classPrefix}-disabled`]: disabled,
|
|
106
105
|
[`${classPrefix}-active`]: hasFocus
|
|
107
106
|
})
|
|
108
107
|
}, _react.default.createElement(_button.default, {
|
|
@@ -14,7 +14,7 @@ export declare type Action = {
|
|
|
14
14
|
export declare type SwipeActionProps = {
|
|
15
15
|
rightActions?: Action[];
|
|
16
16
|
leftActions?: Action[];
|
|
17
|
-
onAction?: (action: Action) => void;
|
|
17
|
+
onAction?: (action: Action, e: React.MouseEvent) => void;
|
|
18
18
|
closeOnTouchOutside?: boolean;
|
|
19
19
|
closeOnAction?: boolean;
|
|
20
20
|
children: ReactNode;
|
|
@@ -22,7 +22,7 @@ export declare type SwipeActionProps = {
|
|
|
22
22
|
export declare const SwipeAction: React.ForwardRefExoticComponent<{
|
|
23
23
|
rightActions?: Action[] | undefined;
|
|
24
24
|
leftActions?: Action[] | undefined;
|
|
25
|
-
onAction?: ((action: Action) => void) | undefined;
|
|
25
|
+
onAction?: ((action: Action, e: React.MouseEvent) => void) | undefined;
|
|
26
26
|
closeOnTouchOutside?: boolean | undefined;
|
|
27
27
|
closeOnAction?: boolean | undefined;
|
|
28
28
|
children: ReactNode;
|
|
@@ -167,7 +167,7 @@ const SwipeAction = (0, _react.forwardRef)((p, ref) => {
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
(_a = action.onClick) === null || _a === void 0 ? void 0 : _a.call(action, e);
|
|
170
|
-
(_b = props.onAction) === null || _b === void 0 ? void 0 : _b.call(props, action);
|
|
170
|
+
(_b = props.onAction) === null || _b === void 0 ? void 0 : _b.call(props, action, e);
|
|
171
171
|
}
|
|
172
172
|
}, action.text);
|
|
173
173
|
}
|
|
@@ -29,6 +29,8 @@ var _useRefState = require("../../utils/use-ref-state");
|
|
|
29
29
|
|
|
30
30
|
var _bound = require("../../utils/bound");
|
|
31
31
|
|
|
32
|
+
var _ahooks = require("ahooks");
|
|
33
|
+
|
|
32
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
35
|
|
|
34
36
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -98,6 +100,11 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
|
|
|
98
100
|
}
|
|
99
101
|
|
|
100
102
|
const [current, setCurrent] = (0, _react.useState)(props.defaultIndex);
|
|
103
|
+
(0, _ahooks.useUpdateEffect)(() => {
|
|
104
|
+
var _a;
|
|
105
|
+
|
|
106
|
+
(_a = props.onIndexChange) === null || _a === void 0 ? void 0 : _a.call(props, current);
|
|
107
|
+
}, [current]);
|
|
101
108
|
const [dragging, setDragging, draggingRef] = (0, _useRefState.useRefState)(false);
|
|
102
109
|
|
|
103
110
|
function boundIndex(current) {
|
|
@@ -183,25 +190,13 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
|
|
|
183
190
|
});
|
|
184
191
|
|
|
185
192
|
function swipeTo(index, immediate = false) {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
position: index * 100,
|
|
194
|
-
immediate
|
|
195
|
-
});
|
|
196
|
-
} else {
|
|
197
|
-
const i = (0, _bound.bound)(index, 0, count - 1);
|
|
198
|
-
setCurrent(i);
|
|
199
|
-
(_b = props.onIndexChange) === null || _b === void 0 ? void 0 : _b.call(props, i);
|
|
200
|
-
api.start({
|
|
201
|
-
position: boundIndex(i) * 100,
|
|
202
|
-
immediate
|
|
203
|
-
});
|
|
204
|
-
}
|
|
193
|
+
const roundedIndex = Math.round(index);
|
|
194
|
+
const targetIndex = loop ? modulus(roundedIndex, count) : (0, _bound.bound)(roundedIndex, 0, count - 1);
|
|
195
|
+
setCurrent(targetIndex);
|
|
196
|
+
api.start({
|
|
197
|
+
position: (loop ? roundedIndex : boundIndex(roundedIndex)) * 100,
|
|
198
|
+
immediate
|
|
199
|
+
});
|
|
205
200
|
}
|
|
206
201
|
|
|
207
202
|
function swipeNext() {
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
.adm-switch {
|
|
8
8
|
--checked-color: var(--adm-color-primary);
|
|
9
|
-
--height:
|
|
10
|
-
--width:
|
|
9
|
+
--height: 62px;
|
|
10
|
+
--width: 102px;
|
|
11
11
|
--border-width: 4px;
|
|
12
12
|
display: inline-block;
|
|
13
13
|
vertical-align: middle;
|
|
@@ -69,9 +69,14 @@
|
|
|
69
69
|
.adm-switch-inner {
|
|
70
70
|
position: relative;
|
|
71
71
|
z-index: 1;
|
|
72
|
-
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
align-items: center;
|
|
75
|
+
margin: 0 16px 0 calc(var(--height) - var(--border-width) + 8px);
|
|
76
|
+
height: 100%;
|
|
73
77
|
color: var(--adm-color-weak);
|
|
74
78
|
transition: margin 200ms;
|
|
79
|
+
font-size: 30px;
|
|
75
80
|
}
|
|
76
81
|
|
|
77
82
|
.adm-switch.adm-switch-checked .adm-switch-checkbox {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.adm-tag {
|
|
2
2
|
--border-radius: var(--adm-tag-border-radius, 4px);
|
|
3
|
-
padding:
|
|
4
|
-
font-size:
|
|
3
|
+
padding: 4px 8px;
|
|
4
|
+
font-size: 22px;
|
|
5
5
|
line-height: 1;
|
|
6
6
|
font-weight: normal;
|
|
7
7
|
background: var(--background-color);
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
display: inline-block;
|
|
10
10
|
white-space: nowrap;
|
|
11
11
|
border-radius: var(--border-radius);
|
|
12
|
-
border:
|
|
12
|
+
border: 2px solid var(--border-color);
|
|
13
13
|
box-sizing: border-box;
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.adm-text-area
|
|
1
|
+
.adm-text-area {
|
|
2
2
|
--font-size: 34px;
|
|
3
3
|
--color: var(--adm-color-text);
|
|
4
4
|
--placeholder-color: var(--adm-color-light);
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
max-height: 100%;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
.adm-text-area {
|
|
11
|
+
.adm-text-area-element {
|
|
12
12
|
font-family: var(--adm-font-family);
|
|
13
13
|
resize: none;
|
|
14
14
|
flex: auto;
|
|
@@ -29,35 +29,35 @@
|
|
|
29
29
|
min-height: 1.5em;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.adm-text-area::placeholder {
|
|
32
|
+
.adm-text-area-element::placeholder {
|
|
33
33
|
color: var(--placeholder-color);
|
|
34
34
|
font-family: inherit;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
.adm-text-area:-webkit-autofill {
|
|
37
|
+
.adm-text-area-element:-webkit-autofill {
|
|
38
38
|
background-color: transparent;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.adm-text-area:disabled {
|
|
41
|
+
.adm-text-area-element:disabled {
|
|
42
42
|
color: var(--disabled-color);
|
|
43
43
|
cursor: not-allowed;
|
|
44
44
|
opacity: 1;
|
|
45
45
|
-webkit-text-fill-color: var(--disabled-color);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
.adm-text-area:read-only {
|
|
48
|
+
.adm-text-area-element:read-only {
|
|
49
49
|
cursor: default;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.adm-text-area:invalid {
|
|
52
|
+
.adm-text-area-element:invalid {
|
|
53
53
|
box-shadow: none;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.adm-text-area::-ms-clear {
|
|
56
|
+
.adm-text-area-element::-ms-clear {
|
|
57
57
|
display: none;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
.adm-text-area[readonly] {
|
|
60
|
+
.adm-text-area-element[readonly] {
|
|
61
61
|
pointer-events: none;
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
import { NativeProps } from '../../utils/native-props';
|
|
4
|
-
export declare type TextAreaProps = Pick<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, 'autoComplete' | 'disabled' | 'readOnly' | 'onFocus' | 'onBlur'> & {
|
|
4
|
+
export declare type TextAreaProps = Pick<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, 'autoComplete' | 'disabled' | 'readOnly' | 'onFocus' | 'onBlur' | 'onCompositionStart' | 'onCompositionEnd'> & {
|
|
5
5
|
onChange?: (val: string) => void;
|
|
6
6
|
value?: string;
|
|
7
7
|
defaultValue?: string;
|
|
@@ -20,7 +20,7 @@ export declare type TextAreaRef = {
|
|
|
20
20
|
focus: () => void;
|
|
21
21
|
blur: () => void;
|
|
22
22
|
};
|
|
23
|
-
export declare const TextArea: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "disabled" | "onFocus" | "onBlur" | "autoComplete" | "readOnly"> & {
|
|
23
|
+
export declare const TextArea: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "disabled" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "autoComplete" | "readOnly"> & {
|
|
24
24
|
onChange?: ((val: string) => void) | undefined;
|
|
25
25
|
value?: string | undefined;
|
|
26
26
|
defaultValue?: string | undefined;
|
|
@@ -5,18 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.TextArea = void 0;
|
|
7
7
|
|
|
8
|
-
var _tslib = require("tslib");
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
9
|
|
|
12
|
-
var
|
|
10
|
+
var _nativeProps = require("../../utils/native-props");
|
|
13
11
|
|
|
14
12
|
var _usePropsValue = require("../../utils/use-props-value");
|
|
15
13
|
|
|
16
14
|
var _withDefaultProps = require("../../utils/with-default-props");
|
|
17
15
|
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
17
|
|
|
22
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -31,16 +27,10 @@ const defaultProps = {
|
|
|
31
27
|
const TextArea = (0, _react.forwardRef)((p, ref) => {
|
|
32
28
|
const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
|
|
33
29
|
const {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
onChange: outerOnChange,
|
|
39
|
-
rows: rows,
|
|
40
|
-
autoSize: autoSize,
|
|
41
|
-
showCount
|
|
42
|
-
} = props,
|
|
43
|
-
textAreaProps = (0, _tslib.__rest)(props, ["className", "style", "defaultValue", "value", "onChange", "rows", "autoSize", "showCount"]);
|
|
30
|
+
autoSize,
|
|
31
|
+
showCount,
|
|
32
|
+
maxLength
|
|
33
|
+
} = props;
|
|
44
34
|
const [value, setValue] = (0, _usePropsValue.usePropsValue)(props);
|
|
45
35
|
const nativeTextAreaRef = (0, _react.useRef)(null);
|
|
46
36
|
(0, _react.useImperativeHandle)(ref, () => ({
|
|
@@ -80,40 +70,59 @@ const TextArea = (0, _react.forwardRef)((p, ref) => {
|
|
|
80
70
|
|
|
81
71
|
textArea.style.height = `${height}px`;
|
|
82
72
|
}, [value, autoSize]);
|
|
73
|
+
const compositingRef = (0, _react.useRef)(false);
|
|
83
74
|
let count;
|
|
75
|
+
const valueLength = [...value].length;
|
|
84
76
|
|
|
85
77
|
if (typeof showCount === 'function') {
|
|
86
|
-
count = showCount(
|
|
78
|
+
count = showCount(valueLength, maxLength);
|
|
87
79
|
} else if (showCount) {
|
|
88
80
|
count = _react.default.createElement("div", {
|
|
89
81
|
className: `${classPrefix}-count`
|
|
90
|
-
},
|
|
82
|
+
}, maxLength === undefined ? valueLength : valueLength + '/' + maxLength);
|
|
91
83
|
}
|
|
92
84
|
|
|
93
|
-
return _react.default.createElement("div", {
|
|
94
|
-
className:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
className: classPrefix,
|
|
100
|
-
rows: rows,
|
|
85
|
+
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
86
|
+
className: classPrefix
|
|
87
|
+
}, _react.default.createElement("textarea", {
|
|
88
|
+
ref: nativeTextAreaRef,
|
|
89
|
+
className: `${classPrefix}-element`,
|
|
90
|
+
rows: props.rows,
|
|
101
91
|
value: value,
|
|
92
|
+
placeholder: props.placeholder,
|
|
102
93
|
onChange: e => {
|
|
103
|
-
|
|
94
|
+
let v = e.target.value;
|
|
95
|
+
|
|
96
|
+
if (maxLength && !compositingRef.current) {
|
|
97
|
+
v = [...v].slice(0, maxLength).join('');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
setValue(v);
|
|
104
101
|
},
|
|
105
|
-
|
|
102
|
+
id: props.id,
|
|
103
|
+
onCompositionStart: e => {
|
|
106
104
|
var _a;
|
|
107
105
|
|
|
108
|
-
|
|
106
|
+
compositingRef.current = true;
|
|
107
|
+
(_a = props.onCompositionStart) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
109
108
|
},
|
|
110
|
-
|
|
109
|
+
onCompositionEnd: e => {
|
|
111
110
|
var _a;
|
|
112
111
|
|
|
113
|
-
|
|
112
|
+
compositingRef.current = false;
|
|
113
|
+
|
|
114
|
+
if (maxLength) {
|
|
115
|
+
setValue([...value].slice(0, maxLength).join(''));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
(_a = props.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
114
119
|
},
|
|
115
|
-
|
|
116
|
-
|
|
120
|
+
autoComplete: props.autoComplete,
|
|
121
|
+
disabled: props.disabled,
|
|
122
|
+
readOnly: props.readOnly,
|
|
123
|
+
onFocus: props.onFocus,
|
|
124
|
+
onBlur: props.onBlur
|
|
125
|
+
}), count));
|
|
117
126
|
});
|
|
118
127
|
exports.TextArea = TextArea;
|
|
119
128
|
TextArea.defaultProps = defaultProps;
|
|
@@ -21,4 +21,4 @@ export declare const VirtualInput: React.ForwardRefExoticComponent<{
|
|
|
21
21
|
keyboard?: React.ReactElement<NumberKeyboardProps, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)> | undefined;
|
|
22
22
|
clearable?: boolean | undefined;
|
|
23
23
|
onClear?: (() => void) | undefined;
|
|
24
|
-
} & Pick<InputProps, "value" | "disabled" | "onChange" | "placeholder"> & NativeProps<"--color" | "--font-size" | "--placeholder-color" | "--
|
|
24
|
+
} & Pick<InputProps, "value" | "disabled" | "onChange" | "placeholder"> & NativeProps<"--color" | "--font-size" | "--placeholder-color" | "--text-align" | "--disabled-color" | "--caret-width" | "--caret-color"> & React.RefAttributes<VirtualInputRef>>;
|
|
@@ -7,7 +7,7 @@ exports.getScrollParent = getScrollParent;
|
|
|
7
7
|
|
|
8
8
|
var _canUseDom = require("./can-use-dom");
|
|
9
9
|
|
|
10
|
-
const overflowScrollReg = /scroll|auto/i;
|
|
10
|
+
const overflowScrollReg = /scroll|auto|overlay/i;
|
|
11
11
|
const defaultRoot = _canUseDom.canUseDom ? window : undefined;
|
|
12
12
|
|
|
13
13
|
function isElement(node) {
|
|
@@ -5,5 +5,5 @@ export declare type AvatarProps = {
|
|
|
5
5
|
src: string;
|
|
6
6
|
fallback?: ReactNode;
|
|
7
7
|
fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
8
|
-
} & Pick<ImageProps, 'alt' | 'lazy' | 'onClick' | 'onError'> & NativeProps<'--size'>;
|
|
8
|
+
} & Pick<ImageProps, 'alt' | 'lazy' | 'onClick' | 'onError'> & NativeProps<'--size' | '--border-radius'>;
|
|
9
9
|
export declare const Avatar: FC<AvatarProps>;
|
|
@@ -4,24 +4,28 @@
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.adm-badge {
|
|
7
|
-
display: inline-
|
|
8
|
-
color: #fff;
|
|
9
|
-
font-weight: normal;
|
|
10
|
-
text-align: center;
|
|
7
|
+
display: inline-flex;
|
|
11
8
|
vertical-align: middle;
|
|
12
|
-
box-sizing:
|
|
13
|
-
min-width: 32px;
|
|
9
|
+
box-sizing: content-box;
|
|
14
10
|
border-radius: 200px;
|
|
15
|
-
padding: 0 8px;
|
|
16
|
-
font-size: 18px;
|
|
17
|
-
line-height: 1.2;
|
|
18
|
-
white-space: nowrap;
|
|
19
11
|
background-color: var(--color);
|
|
20
12
|
--right: 0;
|
|
21
13
|
--top: 0;
|
|
22
14
|
--color: var(--adm-badge-color, #ff411c);
|
|
23
15
|
}
|
|
24
16
|
|
|
17
|
+
.adm-badge-content {
|
|
18
|
+
color: #fff;
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
min-width: 16px;
|
|
21
|
+
padding: 2px 8px;
|
|
22
|
+
font-size: 18px;
|
|
23
|
+
line-height: 24px;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
font-weight: normal;
|
|
26
|
+
text-align: center;
|
|
27
|
+
}
|
|
28
|
+
|
|
25
29
|
.adm-badge-fixed {
|
|
26
30
|
position: absolute;
|
|
27
31
|
right: var(--right);
|
|
@@ -34,4 +38,8 @@
|
|
|
34
38
|
width: 20px;
|
|
35
39
|
height: 20px;
|
|
36
40
|
border-radius: 10px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.adm-badge-bordered {
|
|
44
|
+
border: solid 2px var(--adm-color-white);
|
|
37
45
|
}
|
|
@@ -10,16 +10,15 @@ export const Badge = props => {
|
|
|
10
10
|
children
|
|
11
11
|
} = props;
|
|
12
12
|
const isDot = content === dot;
|
|
13
|
-
const badgeCls = classNames(classPrefix, {
|
|
14
|
-
[`${classPrefix}-fixed`]: !!children,
|
|
15
|
-
[`${classPrefix}-dot`]: isDot
|
|
16
|
-
});
|
|
13
|
+
const badgeCls = classNames(classPrefix, !!children && `${classPrefix}-fixed`, isDot && `${classPrefix}-dot`, props.bordered && `${classPrefix}-bordered`);
|
|
17
14
|
const element = content ? withNativeProps(props, React.createElement("div", {
|
|
18
15
|
className: badgeCls,
|
|
19
16
|
style: {
|
|
20
17
|
'--color': color
|
|
21
18
|
}
|
|
22
|
-
}, !isDot &&
|
|
19
|
+
}, !isDot && React.createElement("div", {
|
|
20
|
+
className: `${classPrefix}-content`
|
|
21
|
+
}, content))) : null;
|
|
23
22
|
return children ? React.createElement("div", {
|
|
24
23
|
className: `${classPrefix}-wrap`
|
|
25
24
|
}, children, element) : element;
|
|
@@ -6,6 +6,8 @@ import { mergeProps } from '../../utils/with-default-props';
|
|
|
6
6
|
import { ArrowLeft } from './arrow-left';
|
|
7
7
|
import { ArrowLeftDouble } from './arrow-left-double';
|
|
8
8
|
import { useConfig } from '../config-provider';
|
|
9
|
+
import isoWeek from 'dayjs/plugin/isoWeek';
|
|
10
|
+
dayjs.extend(isoWeek);
|
|
9
11
|
const classPrefix = 'adm-calendar';
|
|
10
12
|
const defaultProps = {
|
|
11
13
|
weekStartsOn: 'Sunday'
|