@arco-design/mobile-react 2.37.0 → 2.38.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/CHANGELOG.md +28 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/action-sheet/index.d.ts +2 -2
- package/cjs/action-sheet/style/css/index.css +18 -0
- package/cjs/avatar/style/css/index.css +18 -0
- package/cjs/badge/index.d.ts +2 -1
- package/cjs/badge/index.js +1 -1
- package/cjs/badge/style/css/index.css +26 -4
- package/cjs/badge/style/index.less +4 -2
- package/cjs/button/style/css/index.css +18 -0
- package/cjs/carousel/style/css/index.css +18 -0
- package/cjs/cell/style/css/index.css +18 -0
- package/cjs/checkbox/style/css/index.css +18 -0
- package/cjs/circle-progress/style/css/index.css +18 -0
- package/cjs/collapse/style/css/index.css +18 -0
- package/cjs/count-down/style/css/index.css +18 -0
- package/cjs/date-picker/style/css/index.css +18 -0
- package/cjs/dialog/index.d.ts +7 -6
- package/cjs/dialog/index.js +4 -1
- package/cjs/dialog/style/css/index.css +26 -4
- package/cjs/dialog/style/index.less +4 -2
- package/cjs/divider/style/css/index.css +18 -0
- package/cjs/dropdown/style/css/index.css +18 -0
- package/cjs/dropdown-menu/style/css/index.css +18 -0
- package/cjs/ellipsis/style/css/index.css +18 -0
- package/cjs/form/style/css/index.css +18 -0
- package/cjs/grid/style/css/index.css +18 -0
- package/cjs/image/style/css/index.css +18 -0
- package/cjs/image-picker/index.d.ts +1 -1
- package/cjs/image-picker/index.js +1 -0
- package/cjs/image-picker/style/css/index.css +18 -0
- package/cjs/image-picker/type.d.ts +11 -5
- package/cjs/image-preview/style/css/index.css +18 -0
- package/cjs/index-bar/style/css/index.css +18 -0
- package/cjs/input/style/css/index.css +18 -0
- package/cjs/keyboard/style/css/index.css +18 -0
- package/cjs/load-more/style/css/index.css +18 -0
- package/cjs/loading/style/css/index.css +18 -0
- package/cjs/masking/index.d.ts +11 -5
- package/cjs/masking/index.js +2 -0
- package/cjs/masking/style/css/index.css +18 -0
- package/cjs/nav-bar/style/css/index.css +18 -0
- package/cjs/notice-bar/style/css/index.css +18 -0
- package/cjs/notify/style/css/index.css +18 -0
- package/cjs/pagination/style/css/index.css +18 -0
- package/cjs/picker/style/css/index.css +18 -0
- package/cjs/picker-view/style/css/index.css +18 -0
- package/cjs/popover/style/css/index.css +18 -0
- package/cjs/popover/style/css/menu.css +18 -0
- package/cjs/popup/index.d.ts +3 -3
- package/cjs/popup/index.js +1 -0
- package/cjs/popup/style/css/index.css +35 -0
- package/cjs/popup/style/index.less +36 -3
- package/cjs/popup-swiper/index.d.ts +2 -2
- package/cjs/popup-swiper/index.js +20 -3
- package/cjs/popup-swiper/style/css/index.css +18 -0
- package/cjs/progress/style/css/index.css +18 -0
- package/cjs/pull-refresh/style/css/index.css +18 -0
- package/cjs/radio/style/css/index.css +18 -0
- package/cjs/rate/style/css/index.css +18 -0
- package/cjs/search-bar/style/css/index.css +18 -0
- package/cjs/skeleton/style/css/index.css +18 -0
- package/cjs/slider/style/css/index.css +18 -0
- package/cjs/stepper/style/css/index.css +18 -0
- package/cjs/steps/style/css/index.css +18 -0
- package/cjs/sticky/style/css/index.css +18 -0
- package/cjs/swipe-action/style/css/index.css +18 -0
- package/cjs/swipe-load/style/css/index.css +18 -0
- package/cjs/switch/style/css/index.css +18 -0
- package/cjs/tab-bar/style/css/index.css +18 -0
- package/cjs/tabs/index.js +7 -3
- package/cjs/tabs/style/css/index.css +18 -0
- package/cjs/tabs/tab-cell.js +9 -1
- package/cjs/tabs/type.d.ts +5 -0
- package/cjs/tag/style/css/index.css +18 -0
- package/cjs/textarea/style/css/index.css +18 -0
- package/cjs/toast/style/css/index.css +18 -0
- package/cjs/transition/index.d.ts +9 -3
- package/cjs/transition/index.js +36 -6
- package/cjs/transition/style/css/index.css +22 -4
- package/cjs/transition/style/index.less +2 -2
- package/cjs/uploader/style/css/index.css +18 -0
- package/dist/index.js +83 -22
- package/dist/index.min.js +4 -4
- package/dist/style.css +1049 -6
- package/dist/style.min.css +1 -1
- package/esm/action-sheet/index.d.ts +2 -2
- package/esm/action-sheet/style/css/index.css +18 -0
- package/esm/avatar/style/css/index.css +18 -0
- package/esm/badge/index.d.ts +2 -1
- package/esm/badge/index.js +1 -1
- package/esm/badge/style/css/index.css +26 -4
- package/esm/badge/style/index.less +4 -2
- package/esm/button/style/css/index.css +18 -0
- package/esm/carousel/style/css/index.css +18 -0
- package/esm/cell/style/css/index.css +18 -0
- package/esm/checkbox/style/css/index.css +18 -0
- package/esm/circle-progress/style/css/index.css +18 -0
- package/esm/collapse/style/css/index.css +18 -0
- package/esm/count-down/style/css/index.css +18 -0
- package/esm/date-picker/style/css/index.css +18 -0
- package/esm/dialog/index.d.ts +7 -6
- package/esm/dialog/index.js +4 -1
- package/esm/dialog/style/css/index.css +26 -4
- package/esm/dialog/style/index.less +4 -2
- package/esm/divider/style/css/index.css +18 -0
- package/esm/dropdown/style/css/index.css +18 -0
- package/esm/dropdown-menu/style/css/index.css +18 -0
- package/esm/ellipsis/style/css/index.css +18 -0
- package/esm/form/style/css/index.css +18 -0
- package/esm/grid/style/css/index.css +18 -0
- package/esm/image/style/css/index.css +18 -0
- package/esm/image-picker/index.d.ts +1 -1
- package/esm/image-picker/index.js +1 -0
- package/esm/image-picker/style/css/index.css +18 -0
- package/esm/image-picker/type.d.ts +11 -5
- package/esm/image-preview/style/css/index.css +18 -0
- package/esm/index-bar/style/css/index.css +18 -0
- package/esm/input/style/css/index.css +18 -0
- package/esm/keyboard/style/css/index.css +18 -0
- package/esm/load-more/style/css/index.css +18 -0
- package/esm/loading/style/css/index.css +18 -0
- package/esm/masking/index.d.ts +11 -5
- package/esm/masking/index.js +2 -0
- package/esm/masking/style/css/index.css +18 -0
- package/esm/nav-bar/style/css/index.css +18 -0
- package/esm/notice-bar/style/css/index.css +18 -0
- package/esm/notify/style/css/index.css +18 -0
- package/esm/pagination/style/css/index.css +18 -0
- package/esm/picker/style/css/index.css +18 -0
- package/esm/picker-view/style/css/index.css +18 -0
- package/esm/popover/style/css/index.css +18 -0
- package/esm/popover/style/css/menu.css +18 -0
- package/esm/popup/index.d.ts +3 -3
- package/esm/popup/index.js +1 -0
- package/esm/popup/style/css/index.css +35 -0
- package/esm/popup/style/index.less +36 -3
- package/esm/popup-swiper/index.d.ts +2 -2
- package/esm/popup-swiper/index.js +20 -3
- package/esm/popup-swiper/style/css/index.css +18 -0
- package/esm/progress/style/css/index.css +18 -0
- package/esm/pull-refresh/style/css/index.css +18 -0
- package/esm/radio/style/css/index.css +18 -0
- package/esm/rate/style/css/index.css +18 -0
- package/esm/search-bar/style/css/index.css +18 -0
- package/esm/skeleton/style/css/index.css +18 -0
- package/esm/slider/style/css/index.css +18 -0
- package/esm/stepper/style/css/index.css +18 -0
- package/esm/steps/style/css/index.css +18 -0
- package/esm/sticky/style/css/index.css +18 -0
- package/esm/swipe-action/style/css/index.css +18 -0
- package/esm/swipe-load/style/css/index.css +18 -0
- package/esm/switch/style/css/index.css +18 -0
- package/esm/tab-bar/style/css/index.css +18 -0
- package/esm/tabs/index.js +7 -3
- package/esm/tabs/style/css/index.css +18 -0
- package/esm/tabs/tab-cell.js +9 -1
- package/esm/tabs/type.d.ts +5 -0
- package/esm/tag/style/css/index.css +18 -0
- package/esm/textarea/style/css/index.css +18 -0
- package/esm/toast/style/css/index.css +18 -0
- package/esm/transition/index.d.ts +9 -3
- package/esm/transition/index.js +32 -7
- package/esm/transition/style/css/index.css +22 -4
- package/esm/transition/style/index.less +2 -2
- package/esm/uploader/style/css/index.css +18 -0
- package/esnext/action-sheet/index.d.ts +2 -2
- package/esnext/action-sheet/style/css/index.css +18 -0
- package/esnext/avatar/style/css/index.css +18 -0
- package/esnext/badge/index.d.ts +2 -1
- package/esnext/badge/index.js +1 -1
- package/esnext/badge/style/css/index.css +26 -4
- package/esnext/badge/style/index.less +4 -2
- package/esnext/button/style/css/index.css +18 -0
- package/esnext/carousel/style/css/index.css +18 -0
- package/esnext/cell/style/css/index.css +18 -0
- package/esnext/checkbox/style/css/index.css +18 -0
- package/esnext/circle-progress/style/css/index.css +18 -0
- package/esnext/collapse/style/css/index.css +18 -0
- package/esnext/count-down/style/css/index.css +18 -0
- package/esnext/date-picker/style/css/index.css +18 -0
- package/esnext/dialog/index.d.ts +7 -6
- package/esnext/dialog/index.js +1 -1
- package/esnext/dialog/style/css/index.css +26 -4
- package/esnext/dialog/style/index.less +4 -2
- package/esnext/divider/style/css/index.css +18 -0
- package/esnext/dropdown/style/css/index.css +18 -0
- package/esnext/dropdown-menu/style/css/index.css +18 -0
- package/esnext/ellipsis/style/css/index.css +18 -0
- package/esnext/form/style/css/index.css +18 -0
- package/esnext/grid/style/css/index.css +18 -0
- package/esnext/image/style/css/index.css +18 -0
- package/esnext/image-picker/index.d.ts +1 -1
- package/esnext/image-picker/index.js +1 -1
- package/esnext/image-picker/style/css/index.css +18 -0
- package/esnext/image-picker/type.d.ts +11 -5
- package/esnext/image-preview/style/css/index.css +18 -0
- package/esnext/index-bar/style/css/index.css +18 -0
- package/esnext/input/style/css/index.css +18 -0
- package/esnext/keyboard/style/css/index.css +18 -0
- package/esnext/load-more/style/css/index.css +18 -0
- package/esnext/loading/style/css/index.css +18 -0
- package/esnext/masking/index.d.ts +11 -5
- package/esnext/masking/index.js +3 -3
- package/esnext/masking/style/css/index.css +18 -0
- package/esnext/nav-bar/style/css/index.css +18 -0
- package/esnext/notice-bar/style/css/index.css +18 -0
- package/esnext/notify/style/css/index.css +18 -0
- package/esnext/pagination/style/css/index.css +18 -0
- package/esnext/picker/style/css/index.css +18 -0
- package/esnext/picker-view/style/css/index.css +18 -0
- package/esnext/popover/style/css/index.css +18 -0
- package/esnext/popover/style/css/menu.css +18 -0
- package/esnext/popup/index.d.ts +3 -3
- package/esnext/popup/index.js +1 -1
- package/esnext/popup/style/css/index.css +35 -0
- package/esnext/popup/style/index.less +36 -3
- package/esnext/popup-swiper/index.d.ts +2 -2
- package/esnext/popup-swiper/index.js +7 -2
- package/esnext/popup-swiper/style/css/index.css +18 -0
- package/esnext/progress/style/css/index.css +18 -0
- package/esnext/pull-refresh/style/css/index.css +18 -0
- package/esnext/radio/style/css/index.css +18 -0
- package/esnext/rate/style/css/index.css +18 -0
- package/esnext/search-bar/style/css/index.css +18 -0
- package/esnext/skeleton/style/css/index.css +18 -0
- package/esnext/slider/style/css/index.css +18 -0
- package/esnext/stepper/style/css/index.css +18 -0
- package/esnext/steps/style/css/index.css +18 -0
- package/esnext/sticky/style/css/index.css +18 -0
- package/esnext/swipe-action/style/css/index.css +18 -0
- package/esnext/swipe-load/style/css/index.css +18 -0
- package/esnext/switch/style/css/index.css +18 -0
- package/esnext/tab-bar/style/css/index.css +18 -0
- package/esnext/tabs/index.js +3 -2
- package/esnext/tabs/style/css/index.css +18 -0
- package/esnext/tabs/tab-cell.js +8 -1
- package/esnext/tabs/type.d.ts +5 -0
- package/esnext/tag/style/css/index.css +18 -0
- package/esnext/textarea/style/css/index.css +18 -0
- package/esnext/toast/style/css/index.css +18 -0
- package/esnext/transition/index.d.ts +9 -3
- package/esnext/transition/index.js +28 -3
- package/esnext/transition/style/css/index.css +22 -4
- package/esnext/transition/style/index.less +2 -2
- package/esnext/uploader/style/css/index.css +18 -0
- package/package.json +3 -3
- package/style/css/public.css +18 -0
- package/tokens/mixin/index.less +31 -2
- package/umd/action-sheet/index.d.ts +2 -2
- package/umd/action-sheet/style/css/index.css +18 -0
- package/umd/avatar/style/css/index.css +18 -0
- package/umd/badge/index.d.ts +2 -1
- package/umd/badge/index.js +1 -1
- package/umd/badge/style/css/index.css +26 -4
- package/umd/badge/style/index.less +4 -2
- package/umd/button/style/css/index.css +18 -0
- package/umd/carousel/style/css/index.css +18 -0
- package/umd/cell/style/css/index.css +18 -0
- package/umd/checkbox/style/css/index.css +18 -0
- package/umd/circle-progress/style/css/index.css +18 -0
- package/umd/collapse/style/css/index.css +18 -0
- package/umd/count-down/style/css/index.css +18 -0
- package/umd/date-picker/style/css/index.css +18 -0
- package/umd/dialog/index.d.ts +7 -6
- package/umd/dialog/index.js +4 -1
- package/umd/dialog/style/css/index.css +26 -4
- package/umd/dialog/style/index.less +4 -2
- package/umd/divider/style/css/index.css +18 -0
- package/umd/dropdown/style/css/index.css +18 -0
- package/umd/dropdown-menu/style/css/index.css +18 -0
- package/umd/ellipsis/style/css/index.css +18 -0
- package/umd/form/style/css/index.css +18 -0
- package/umd/grid/style/css/index.css +18 -0
- package/umd/image/style/css/index.css +18 -0
- package/umd/image-picker/index.d.ts +1 -1
- package/umd/image-picker/index.js +1 -0
- package/umd/image-picker/style/css/index.css +18 -0
- package/umd/image-picker/type.d.ts +11 -5
- package/umd/image-preview/style/css/index.css +18 -0
- package/umd/index-bar/style/css/index.css +18 -0
- package/umd/input/style/css/index.css +18 -0
- package/umd/keyboard/style/css/index.css +18 -0
- package/umd/load-more/style/css/index.css +18 -0
- package/umd/loading/style/css/index.css +18 -0
- package/umd/masking/index.d.ts +11 -5
- package/umd/masking/index.js +2 -0
- package/umd/masking/style/css/index.css +18 -0
- package/umd/nav-bar/style/css/index.css +18 -0
- package/umd/notice-bar/style/css/index.css +18 -0
- package/umd/notify/style/css/index.css +18 -0
- package/umd/pagination/style/css/index.css +18 -0
- package/umd/picker/style/css/index.css +18 -0
- package/umd/picker-view/style/css/index.css +18 -0
- package/umd/popover/style/css/index.css +18 -0
- package/umd/popover/style/css/menu.css +18 -0
- package/umd/popup/index.d.ts +3 -3
- package/umd/popup/index.js +1 -0
- package/umd/popup/style/css/index.css +35 -0
- package/umd/popup/style/index.less +36 -3
- package/umd/popup-swiper/index.d.ts +2 -2
- package/umd/popup-swiper/index.js +20 -3
- package/umd/popup-swiper/style/css/index.css +18 -0
- package/umd/progress/style/css/index.css +18 -0
- package/umd/pull-refresh/style/css/index.css +18 -0
- package/umd/radio/style/css/index.css +18 -0
- package/umd/rate/style/css/index.css +18 -0
- package/umd/search-bar/style/css/index.css +18 -0
- package/umd/skeleton/style/css/index.css +18 -0
- package/umd/slider/style/css/index.css +18 -0
- package/umd/stepper/style/css/index.css +18 -0
- package/umd/steps/style/css/index.css +18 -0
- package/umd/sticky/style/css/index.css +18 -0
- package/umd/swipe-action/style/css/index.css +18 -0
- package/umd/swipe-load/style/css/index.css +18 -0
- package/umd/switch/style/css/index.css +18 -0
- package/umd/tab-bar/style/css/index.css +18 -0
- package/umd/tabs/index.js +7 -3
- package/umd/tabs/style/css/index.css +18 -0
- package/umd/tabs/tab-cell.js +9 -1
- package/umd/tabs/type.d.ts +5 -0
- package/umd/tag/style/css/index.css +18 -0
- package/umd/textarea/style/css/index.css +18 -0
- package/umd/toast/style/css/index.css +18 -0
- package/umd/transition/index.d.ts +9 -3
- package/umd/transition/index.js +36 -6
- package/umd/transition/style/css/index.css +22 -4
- package/umd/transition/style/index.less +2 -2
- package/umd/uploader/style/css/index.css +18 -0
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
package/esnext/tabs/index.js
CHANGED
|
@@ -205,6 +205,8 @@ const Tabs = forwardRef((props, ref) => {
|
|
|
205
205
|
if (scrollingRef.current && tabBarResetWhenScroll === 'touchend') {
|
|
206
206
|
cellRef.current && cellRef.current.scrollToCenter();
|
|
207
207
|
}
|
|
208
|
+
setCellTrans(true);
|
|
209
|
+
setPaneTrans(true);
|
|
208
210
|
if (!touchStartedRef.current ||
|
|
209
211
|
posAdjustingRef.current ||
|
|
210
212
|
scrollingRef.current ||
|
|
@@ -212,8 +214,6 @@ const Tabs = forwardRef((props, ref) => {
|
|
|
212
214
|
return;
|
|
213
215
|
}
|
|
214
216
|
touchStartedRef.current = false;
|
|
215
|
-
setCellTrans(true);
|
|
216
|
-
setPaneTrans(true);
|
|
217
217
|
const touchEndTime = new Date().getTime();
|
|
218
218
|
const dis = distanceRef.current;
|
|
219
219
|
const speed = (dis / (touchEndTime - touchStartTimeRef.current)) * 1000;
|
|
@@ -329,6 +329,7 @@ const Tabs = forwardRef((props, ref) => {
|
|
|
329
329
|
tabBarStyle,
|
|
330
330
|
tabBarClass,
|
|
331
331
|
tabBarStopPropagation,
|
|
332
|
+
onUnderlineFirstShow: () => setCellTrans(true),
|
|
332
333
|
...commonProps,
|
|
333
334
|
};
|
|
334
335
|
const CellComp = React.createElement(TabCell, Object.assign({}, cellProps));
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
package/esnext/tabs/tab-cell.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useSystem, useUpdateEffect } from '../_helpers';
|
|
|
4
4
|
import TabCellUnderline from './tab-cell-underline';
|
|
5
5
|
import { GlobalContext } from '../context-provider';
|
|
6
6
|
const TabCell = forwardRef((props, ref) => {
|
|
7
|
-
const { tabs, prefixCls, activeIndex, activeIndexRef, tabDirection, type, onTabClick, changeIndex, tabBarPosition, tabBarArrange, tabBarScroll, tabBarFixed, renderUnderline, duration, transitionDuration, useCaterpillar, wrapWidth, wrapHeight, cellTrans, distance, jumpingDis, tabBarExtra, onTabBarOverflowChange, tabBarGutter, tabBarPadding, underlineSize, underlineThick, underlineInnerStyle, caterpillarMaxScale, caterpillarProperty, onTabBarScroll, hideTabBarBeforeMounted, overflowThreshold = 5, tabBarScrollBezier, tabBarScrollDuration, tabBarScrollChance, tabBarHasDivider, showUnderline, underlineAdaptive, disabled, renderTabBarItem, renderTabBarInner, tabBarStyle, tabBarClass, translateZ, tabBarStopPropagation, } = props;
|
|
7
|
+
const { tabs, prefixCls, activeIndex, activeIndexRef, tabDirection, type, onTabClick, changeIndex, tabBarPosition, tabBarArrange, tabBarScroll, tabBarFixed, renderUnderline, duration, transitionDuration, useCaterpillar, wrapWidth, wrapHeight, cellTrans, distance, jumpingDis, tabBarExtra, onTabBarOverflowChange, tabBarGutter, tabBarPadding, underlineSize, underlineThick, underlineInnerStyle, caterpillarMaxScale, caterpillarProperty, onTabBarScroll, hideTabBarBeforeMounted, overflowThreshold = 5, tabBarScrollBezier, tabBarScrollDuration, tabBarScrollChance, tabBarHasDivider, showUnderline, underlineAdaptive, disabled, renderTabBarItem, renderTabBarInner, tabBarStyle, tabBarClass, translateZ, tabBarStopPropagation, onUnderlineFirstShow, } = props;
|
|
8
8
|
const prefix = `${prefixCls}-tab-cell`;
|
|
9
9
|
const { useRtl } = useContext(GlobalContext);
|
|
10
10
|
const domRef = useRef(null);
|
|
@@ -66,6 +66,13 @@ const TabCell = forwardRef((props, ref) => {
|
|
|
66
66
|
useEffect(() => {
|
|
67
67
|
updateScrollPosition();
|
|
68
68
|
}, [activeIndex, wrapSize]);
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
// underline 首次展示时,通知父组件启用 cellTrans
|
|
71
|
+
// @en When underline is first shown, notify parent component to enable cellTrans
|
|
72
|
+
if (showLine && onUnderlineFirstShow) {
|
|
73
|
+
onUnderlineFirstShow();
|
|
74
|
+
}
|
|
75
|
+
}, [showLine]);
|
|
69
76
|
useUpdateEffect(() => {
|
|
70
77
|
setCellOverflow();
|
|
71
78
|
underlineRef.current?.resetUnderlineStyle();
|
package/esnext/tabs/type.d.ts
CHANGED
|
@@ -533,6 +533,11 @@ export interface TabCellProps extends Pick<TabsProps, 'tabs' | 'type' | 'onTabCl
|
|
|
533
533
|
* @en Does the touch event of the current TabBar require stopPropagation
|
|
534
534
|
*/
|
|
535
535
|
tabBarStopPropagation: boolean;
|
|
536
|
+
/**
|
|
537
|
+
* underline 首次展示时的回调
|
|
538
|
+
* @en Callback when underline is first shown
|
|
539
|
+
*/
|
|
540
|
+
onUnderlineFirstShow?: () => void;
|
|
536
541
|
}
|
|
537
542
|
export interface TabCellRef {
|
|
538
543
|
/**
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { CSSTransitionProps } from 'react-transition-group/CSSTransition';
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { CSSTransitionProps } from 'react-transition-group/CSSTransition';
|
|
3
3
|
export declare type TransitionProps = Omit<CSSTransitionProps, 'timeout'> & {
|
|
4
4
|
/**
|
|
5
5
|
* 待执行动画内容
|
|
6
6
|
* @en Animation content to be executed
|
|
7
7
|
*/
|
|
8
|
-
children?:
|
|
8
|
+
children?: ReactNode;
|
|
9
9
|
/**
|
|
10
10
|
* 待执行动画css类名
|
|
11
11
|
* @en Css classname of the animation to be executed
|
|
@@ -37,6 +37,12 @@ export declare type TransitionProps = Omit<CSSTransitionProps, 'timeout'> & {
|
|
|
37
37
|
* @default true
|
|
38
38
|
*/
|
|
39
39
|
unmountOnExit?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* 动画时长变量标识
|
|
42
|
+
* @en Animation duration variable identifier
|
|
43
|
+
* @default type 属性值
|
|
44
|
+
*/
|
|
45
|
+
transitionVarType?: string;
|
|
40
46
|
};
|
|
41
47
|
/**
|
|
42
48
|
* react-transition-group/CSSTransition 的简单封装。
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { cloneElement, useMemo } from 'react';
|
|
2
2
|
import CSSTransition from 'react-transition-group/CSSTransition';
|
|
3
3
|
import { ContextLayout } from '../context-provider';
|
|
4
|
+
const DEFAULT_TIMEOUT = 300;
|
|
4
5
|
/**
|
|
5
6
|
* react-transition-group/CSSTransition 的简单封装。
|
|
6
7
|
* @en Simple wrapper for react-transition-group/CSSTransition.
|
|
@@ -10,6 +11,30 @@ import { ContextLayout } from '../context-provider';
|
|
|
10
11
|
* @name_en Transition
|
|
11
12
|
*/
|
|
12
13
|
export default function Transition(props) {
|
|
13
|
-
const { children = React.createElement("div", null), type, in: transIn, timeout =
|
|
14
|
-
|
|
14
|
+
const { children = React.createElement("div", null), type, in: transIn, timeout = DEFAULT_TIMEOUT, mountOnEnter = true, unmountOnExit = true, transitionVarType, ...restProps } = props;
|
|
15
|
+
const varPrefix = `builtin-transition-${transitionVarType || type}`;
|
|
16
|
+
// 计算动画时长,支持对象形式的 timeout
|
|
17
|
+
const getDuration = (phase) => {
|
|
18
|
+
if (typeof timeout === 'number') {
|
|
19
|
+
return timeout;
|
|
20
|
+
}
|
|
21
|
+
return timeout[phase] || DEFAULT_TIMEOUT;
|
|
22
|
+
};
|
|
23
|
+
// 生成 CSS 变量样式
|
|
24
|
+
const cssVariables = useMemo(() => {
|
|
25
|
+
const enterDuration = getDuration('enter');
|
|
26
|
+
const exitDuration = getDuration('exit');
|
|
27
|
+
const appearDuration = getDuration('appear');
|
|
28
|
+
return {
|
|
29
|
+
[`--${varPrefix}-enter-duration`]: `${enterDuration}ms`,
|
|
30
|
+
[`--${varPrefix}-exit-duration`]: `${exitDuration}ms`,
|
|
31
|
+
[`--${varPrefix}-appear-duration`]: `${appearDuration}ms`,
|
|
32
|
+
};
|
|
33
|
+
}, [timeout, varPrefix]);
|
|
34
|
+
return (React.createElement(ContextLayout, null, ({ prefixCls }) => (React.createElement(CSSTransition, Object.assign({ in: transIn, timeout: timeout, classNames: `${prefixCls}-${type}`, mountOnEnter: mountOnEnter, unmountOnExit: unmountOnExit }, restProps), cloneElement(children, {
|
|
35
|
+
style: {
|
|
36
|
+
...cssVariables,
|
|
37
|
+
...children?.props?.style,
|
|
38
|
+
},
|
|
39
|
+
})))));
|
|
15
40
|
}
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
|
@@ -517,8 +535,8 @@
|
|
|
517
535
|
opacity: 1;
|
|
518
536
|
-webkit-transition-property: opacity;
|
|
519
537
|
transition-property: opacity;
|
|
520
|
-
-webkit-transition-duration: 300ms ;
|
|
521
|
-
transition-duration: 300ms ;
|
|
538
|
+
-webkit-transition-duration: var(--builtin-transition-fade-enter-duration, 300ms );
|
|
539
|
+
transition-duration: var(--builtin-transition-fade-enter-duration, 300ms );
|
|
522
540
|
}
|
|
523
541
|
.arco-fade-exit {
|
|
524
542
|
opacity: 1;
|
|
@@ -527,8 +545,8 @@
|
|
|
527
545
|
opacity: 0;
|
|
528
546
|
-webkit-transition-property: opacity;
|
|
529
547
|
transition-property: opacity;
|
|
530
|
-
-webkit-transition-duration: 300ms ;
|
|
531
|
-
transition-duration: 300ms ;
|
|
548
|
+
-webkit-transition-duration: var(--builtin-transition-fade-exit-duration, 300ms );
|
|
549
|
+
transition-duration: var(--builtin-transition-fade-exit-duration, 300ms );
|
|
532
550
|
}
|
|
533
551
|
.arco-fade-exit-done {
|
|
534
552
|
display: none;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
&-enter-active {
|
|
10
10
|
opacity: 1;
|
|
11
11
|
transition-property: opacity;
|
|
12
|
-
.use-var(transition-duration, transition-fade-duration);
|
|
12
|
+
.use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
&-exit {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
&-exit-active {
|
|
20
20
|
opacity: 0;
|
|
21
21
|
transition-property: opacity;
|
|
22
|
-
.use-var(transition-duration, transition-fade-duration);
|
|
22
|
+
.use-transition-var(builtin-transition-fade-exit-duration, transition-fade-duration);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
&-exit-done {
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arco-design/mobile-react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.38.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"author": "taoyiyue@bytedance.com",
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@arco-design/mobile-utils": "2.
|
|
18
|
+
"@arco-design/mobile-utils": "2.23.1",
|
|
19
19
|
"@arco-design/transformable": "^1.0.0",
|
|
20
20
|
"@babel/runtime": "^7",
|
|
21
21
|
"lodash.throttle": "^4.1.1",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "349c0ae646228a80b3851dd825a14069f2286bff"
|
|
51
51
|
}
|
package/style/css/public.css
CHANGED
|
@@ -288,6 +288,24 @@
|
|
|
288
288
|
* }
|
|
289
289
|
* ```
|
|
290
290
|
*/
|
|
291
|
+
/**
|
|
292
|
+
* 为属性设置 transition 变量
|
|
293
|
+
* @desc {en} set the transition variable for the attribute
|
|
294
|
+
* @param @transitionVariable transition 变量名
|
|
295
|
+
* @param @transitionVariable {en} transition variable name
|
|
296
|
+
* @param @backupVariable 备份变量名
|
|
297
|
+
* @param @backupVariable {en} backup variable name
|
|
298
|
+
* @param @property css属性名
|
|
299
|
+
* @param @property {en} css property
|
|
300
|
+
* @example
|
|
301
|
+
* ```
|
|
302
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
303
|
+
*
|
|
304
|
+
* .demo {
|
|
305
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
306
|
+
* }
|
|
307
|
+
* ```
|
|
308
|
+
*/
|
|
291
309
|
/**
|
|
292
310
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
293
311
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
package/tokens/mixin/index.less
CHANGED
|
@@ -110,9 +110,38 @@
|
|
|
110
110
|
* ```
|
|
111
111
|
*/
|
|
112
112
|
.use-var(@property, @variables, @preValues: '', @nextValues: '') {
|
|
113
|
-
|
|
113
|
+
& when (@use-css-vars = 0) {
|
|
114
|
+
@{property}: ~"@{preValues}" @@variables ~"@{nextValues}";
|
|
115
|
+
}
|
|
116
|
+
& when (@use-css-vars = 1) {
|
|
117
|
+
@{property}: ~"@{preValues}" ~"var(--@{variables}, "@@variables~")" ~"@{nextValues}";
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* 为属性设置 transition 变量
|
|
123
|
+
* @desc {en} set the transition variable for the attribute
|
|
124
|
+
* @param @transitionVariable transition 变量名
|
|
125
|
+
* @param @transitionVariable {en} transition variable name
|
|
126
|
+
* @param @backupVariable 备份变量名
|
|
127
|
+
* @param @backupVariable {en} backup variable name
|
|
128
|
+
* @param @property css属性名
|
|
129
|
+
* @param @property {en} css property
|
|
130
|
+
* @example
|
|
131
|
+
* ```
|
|
132
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
133
|
+
*
|
|
134
|
+
* .demo {
|
|
135
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
136
|
+
* }
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
.use-transition-var(@transitionVariable, @backupVariable, @property: transition-duration) {
|
|
140
|
+
& when (@use-css-vars = 0) {
|
|
141
|
+
@{property}: ~"var(--@{transitionVariable}, "@@backupVariable~")";
|
|
142
|
+
}
|
|
114
143
|
& when (@use-css-vars = 1) {
|
|
115
|
-
@{property}: ~"
|
|
144
|
+
@{property}: ~"var(--@{transitionVariable}, var(--@{backupVariable}, "@@backupVariable~"))";
|
|
116
145
|
}
|
|
117
146
|
}
|
|
118
147
|
|
|
@@ -87,11 +87,11 @@ declare const _default: React.ForwardRefExoticComponent<ActionSheetProps & React
|
|
|
87
87
|
* @param {ActionSheetProps} config setting
|
|
88
88
|
* @returns {{ close: () => void; update: (newConfig: ActionSheetProps) => void; }}
|
|
89
89
|
*/
|
|
90
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "ref" | "className" | "title" | "context" | "key" | "translateZ" | "onTouchMove" | "getContainer" | "items" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "cancelText" | "subTitle"> & {
|
|
90
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "ref" | "className" | "title" | "context" | "key" | "translateZ" | "onTouchMove" | "getContainer" | "items" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "contentTransitionVarType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "cancelText" | "subTitle"> & {
|
|
91
91
|
key?: string | undefined;
|
|
92
92
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
|
93
93
|
close: () => void;
|
|
94
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "ref" | "className" | "title" | "context" | "key" | "translateZ" | "onTouchMove" | "getContainer" | "items" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "cancelText" | "subTitle"> & {
|
|
94
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "ref" | "className" | "title" | "context" | "key" | "translateZ" | "onTouchMove" | "getContainer" | "items" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "contentTransitionVarType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "cancelText" | "subTitle"> & {
|
|
95
95
|
key?: string | undefined;
|
|
96
96
|
}) => void;
|
|
97
97
|
};
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
package/umd/badge/index.d.ts
CHANGED
package/umd/badge/index.js
CHANGED
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
_props$bordered = props.bordered,
|
|
52
52
|
bordered = _props$bordered === void 0 ? false : _props$bordered,
|
|
53
53
|
_props$timeout = props.timeout,
|
|
54
|
-
timeout = _props$timeout === void 0 ?
|
|
54
|
+
timeout = _props$timeout === void 0 ? 400 : _props$timeout;
|
|
55
55
|
var domRef = (0, _react.useRef)(null);
|
|
56
56
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
57
57
|
return {
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
|
@@ -559,12 +577,16 @@
|
|
|
559
577
|
}
|
|
560
578
|
}
|
|
561
579
|
.arco-scale-enter-active {
|
|
562
|
-
-webkit-animation: scale-on
|
|
563
|
-
animation: scale-on
|
|
580
|
+
-webkit-animation: scale-on cubic-bezier(0.3, 1.3, 0.3, 1) forwards;
|
|
581
|
+
animation: scale-on cubic-bezier(0.3, 1.3, 0.3, 1) forwards;
|
|
582
|
+
-webkit-animation-duration: var(--builtin-transition-scale-enter-duration, 0.4s);
|
|
583
|
+
animation-duration: var(--builtin-transition-scale-enter-duration, 0.4s);
|
|
564
584
|
}
|
|
565
585
|
.arco-scale-exit-active {
|
|
566
|
-
-webkit-animation: scale-off
|
|
567
|
-
animation: scale-off
|
|
586
|
+
-webkit-animation: scale-off cubic-bezier(0.3, 1.3, 0.3, 1) forwards;
|
|
587
|
+
animation: scale-off cubic-bezier(0.3, 1.3, 0.3, 1) forwards;
|
|
588
|
+
-webkit-animation-duration: var(--builtin-transition-scale-exit-duration, 0.4s);
|
|
589
|
+
animation-duration: var(--builtin-transition-scale-exit-duration, 0.4s);
|
|
568
590
|
}
|
|
569
591
|
.arco-badge {
|
|
570
592
|
cursor: pointer;
|