taro-ui 3.3.1 → 3.3.2
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/lib/common/component.d.ts +10 -0
- package/lib/common/component.js +27 -28
- package/lib/common/component.js.map +1 -1
- package/lib/common/utils.d.ts +41 -0
- package/lib/common/utils.js +169 -192
- package/lib/common/utils.js.map +1 -1
- package/lib/components/accordion/index.d.ts +14 -0
- package/lib/components/accordion/index.js +111 -106
- package/lib/components/accordion/index.js.map +1 -1
- package/lib/components/action-sheet/body/index.d.ts +5 -0
- package/lib/components/action-sheet/body/index.js +11 -8
- package/lib/components/action-sheet/body/index.js.map +1 -1
- package/lib/components/action-sheet/body/item/index.d.ts +9 -0
- package/lib/components/action-sheet/body/item/index.js +21 -18
- package/lib/components/action-sheet/body/item/index.js.map +1 -1
- package/lib/components/action-sheet/footer/index.d.ts +9 -0
- package/lib/components/action-sheet/footer/index.js +24 -18
- package/lib/components/action-sheet/footer/index.js.map +1 -1
- package/lib/components/action-sheet/header/index.d.ts +5 -0
- package/lib/components/action-sheet/header/index.js +14 -8
- package/lib/components/action-sheet/header/index.js.map +1 -1
- package/lib/components/action-sheet/index.d.ts +14 -0
- package/lib/components/action-sheet/index.js +69 -64
- package/lib/components/action-sheet/index.js.map +1 -1
- package/lib/components/activity-indicator/index.d.ts +8 -0
- package/lib/components/activity-indicator/index.js +33 -29
- package/lib/components/activity-indicator/index.js.map +1 -1
- package/lib/components/avatar/index.d.ts +9 -0
- package/lib/components/avatar/index.js +58 -55
- package/lib/components/avatar/index.js.map +1 -1
- package/lib/components/badge/index.d.ts +10 -0
- package/lib/components/badge/index.js +44 -35
- package/lib/components/badge/index.js.map +1 -1
- package/lib/components/button/index.d.ts +15 -0
- package/lib/components/button/index.js +165 -113
- package/lib/components/button/index.js.map +1 -1
- package/lib/components/calendar/body/index.d.ts +26 -0
- package/lib/components/calendar/body/index.js +279 -183
- package/lib/components/calendar/body/index.js.map +1 -1
- package/lib/components/calendar/common/constant.d.ts +3 -0
- package/lib/components/calendar/common/constant.js +8 -3
- package/lib/components/calendar/common/constant.js.map +1 -1
- package/lib/components/calendar/common/helper.d.ts +4 -0
- package/lib/components/calendar/common/helper.js +77 -76
- package/lib/components/calendar/common/helper.js.map +1 -1
- package/lib/components/calendar/common/plugins.d.ts +11 -0
- package/lib/components/calendar/common/plugins.js +50 -66
- package/lib/components/calendar/common/plugins.js.map +1 -1
- package/lib/components/calendar/controller/index.d.ts +5 -0
- package/lib/components/calendar/controller/index.js +49 -28
- package/lib/components/calendar/controller/index.js.map +1 -1
- package/lib/components/calendar/index.d.ts +20 -0
- package/lib/components/calendar/index.js +233 -196
- package/lib/components/calendar/index.js.map +1 -1
- package/lib/components/calendar/ui/date-list/index.d.ts +12 -0
- package/lib/components/calendar/ui/date-list/index.js +50 -39
- package/lib/components/calendar/ui/date-list/index.js.map +1 -1
- package/lib/components/calendar/ui/day-list/index.d.ts +4 -0
- package/lib/components/calendar/ui/day-list/index.js +9 -14
- package/lib/components/calendar/ui/day-list/index.js.map +1 -1
- package/lib/components/card/index.d.ts +9 -0
- package/lib/components/card/index.js +73 -52
- package/lib/components/card/index.js.map +1 -1
- package/lib/components/checkbox/index.d.ts +9 -0
- package/lib/components/checkbox/index.js +52 -48
- package/lib/components/checkbox/index.js.map +1 -1
- package/lib/components/countdown/index.d.ts +20 -0
- package/lib/components/countdown/index.js +140 -125
- package/lib/components/countdown/index.js.map +1 -1
- package/lib/components/countdown/item/index.d.ts +9 -0
- package/lib/components/countdown/item/index.js +18 -18
- package/lib/components/countdown/item/index.js.map +1 -1
- package/lib/components/curtain/index.d.ts +10 -0
- package/lib/components/curtain/index.js +56 -39
- package/lib/components/curtain/index.js.map +1 -1
- package/lib/components/divider/index.d.ts +8 -0
- package/lib/components/divider/index.js +51 -34
- package/lib/components/divider/index.js.map +1 -1
- package/lib/components/drawer/index.d.ts +16 -0
- package/lib/components/drawer/index.js +106 -85
- package/lib/components/drawer/index.js.map +1 -1
- package/lib/components/fab/index.d.ts +9 -0
- package/lib/components/fab/index.js +22 -19
- package/lib/components/fab/index.js.map +1 -1
- package/lib/components/flex/index.d.ts +7 -0
- package/lib/components/flex/index.js +37 -34
- package/lib/components/flex/index.js.map +1 -1
- package/lib/components/flex/item/index.d.ts +7 -0
- package/lib/components/flex/item/index.js +30 -27
- package/lib/components/flex/item/index.js.map +1 -1
- package/lib/components/float-layout/index.d.ts +13 -0
- package/lib/components/float-layout/index.js +96 -68
- package/lib/components/float-layout/index.js.map +1 -1
- package/lib/components/form/index.d.ts +10 -0
- package/lib/components/form/index.js +37 -24
- package/lib/components/form/index.js.map +1 -1
- package/lib/components/grid/index.d.ts +9 -0
- package/lib/components/grid/index.js +92 -62
- package/lib/components/grid/index.js.map +1 -1
- package/lib/components/icon/index.d.ts +9 -0
- package/lib/components/icon/index.js +48 -31
- package/lib/components/icon/index.js.map +1 -1
- package/lib/components/image-picker/index.d.ts +11 -0
- package/lib/components/image-picker/index.js +152 -126
- package/lib/components/image-picker/index.js.map +1 -1
- package/lib/components/indexes/index.d.ts +29 -0
- package/lib/components/indexes/index.js +255 -198
- package/lib/components/indexes/index.js.map +1 -1
- package/lib/components/input/index.d.ts +17 -0
- package/lib/components/input/index.js +224 -160
- package/lib/components/input/index.js.map +1 -1
- package/lib/components/input-number/index.d.ts +13 -0
- package/lib/components/input-number/index.js +180 -152
- package/lib/components/input-number/index.js.map +1 -1
- package/lib/components/list/index.d.ts +8 -0
- package/lib/components/list/index.js +20 -13
- package/lib/components/list/index.js.map +1 -1
- package/lib/components/list/item/index.d.ts +11 -0
- package/lib/components/list/item/index.js +146 -99
- package/lib/components/list/item/index.js.map +1 -1
- package/lib/components/load-more/index.d.ts +9 -0
- package/lib/components/load-more/index.js +65 -41
- package/lib/components/load-more/index.js.map +1 -1
- package/lib/components/loading/index.d.ts +12 -0
- package/lib/components/loading/index.js +26 -26
- package/lib/components/loading/index.js.map +1 -1
- package/lib/components/message/index.d.ts +15 -0
- package/lib/components/message/index.js +72 -63
- package/lib/components/message/index.js.map +1 -1
- package/lib/components/modal/action/index.d.ts +8 -0
- package/lib/components/modal/action/index.js +20 -14
- package/lib/components/modal/action/index.js.map +1 -1
- package/lib/components/modal/content/index.d.ts +5 -0
- package/lib/components/modal/content/index.js +11 -8
- package/lib/components/modal/content/index.js.map +1 -1
- package/lib/components/modal/header/index.d.ts +5 -0
- package/lib/components/modal/header/index.js +11 -8
- package/lib/components/modal/header/index.js.map +1 -1
- package/lib/components/modal/index.d.ts +15 -0
- package/lib/components/modal/index.js +96 -87
- package/lib/components/modal/index.js.map +1 -1
- package/lib/components/nav-bar/index.d.ts +12 -0
- package/lib/components/nav-bar/index.js +210 -98
- package/lib/components/nav-bar/index.js.map +1 -1
- package/lib/components/noticebar/index.d.ts +16 -0
- package/lib/components/noticebar/index.js +177 -154
- package/lib/components/noticebar/index.js.map +1 -1
- package/lib/components/pagination/index.d.ts +12 -0
- package/lib/components/pagination/index.js +133 -102
- package/lib/components/pagination/index.js.map +1 -1
- package/lib/components/progress/index.d.ts +7 -0
- package/lib/components/progress/index.js +48 -40
- package/lib/components/progress/index.js.map +1 -1
- package/lib/components/radio/index.d.ts +9 -0
- package/lib/components/radio/index.js +48 -37
- package/lib/components/radio/index.js.map +1 -1
- package/lib/components/range/index.d.ts +22 -0
- package/lib/components/range/index.js +197 -142
- package/lib/components/range/index.js.map +1 -1
- package/lib/components/rate/index.d.ts +9 -0
- package/lib/components/rate/index.js +74 -48
- package/lib/components/rate/index.js.map +1 -1
- package/lib/components/search-bar/index.d.ts +16 -0
- package/lib/components/search-bar/index.js +167 -112
- package/lib/components/search-bar/index.js.map +1 -1
- package/lib/components/segmented-control/index.d.ts +9 -0
- package/lib/components/segmented-control/index.js +78 -53
- package/lib/components/segmented-control/index.js.map +1 -1
- package/lib/components/slider/index.d.ts +13 -0
- package/lib/components/slider/index.js +107 -69
- package/lib/components/slider/index.js.map +1 -1
- package/lib/components/steps/index.d.ts +9 -0
- package/lib/components/steps/index.js +61 -44
- package/lib/components/steps/index.js.map +1 -1
- package/lib/components/swipe-action/index.d.ts +27 -0
- package/lib/components/swipe-action/index.js +206 -157
- package/lib/components/swipe-action/index.js.map +1 -1
- package/lib/components/swipe-action/options/index.d.ts +5 -0
- package/lib/components/swipe-action/options/index.js +22 -8
- package/lib/components/swipe-action/options/index.js.map +1 -1
- package/lib/components/switch/index.d.ts +9 -0
- package/lib/components/switch/index.js +53 -42
- package/lib/components/switch/index.js.map +1 -1
- package/lib/components/tab-bar/index.d.ts +9 -0
- package/lib/components/tab-bar/index.js +164 -90
- package/lib/components/tab-bar/index.js.map +1 -1
- package/lib/components/tabs/index.d.ts +24 -0
- package/lib/components/tabs/index.js +203 -174
- package/lib/components/tabs/index.js.map +1 -1
- package/lib/components/tabs-pane/index.d.ts +8 -0
- package/lib/components/tabs-pane/index.js +37 -24
- package/lib/components/tabs-pane/index.js.map +1 -1
- package/lib/components/tag/index.d.ts +9 -0
- package/lib/components/tag/index.js +64 -44
- package/lib/components/tag/index.js.map +1 -1
- package/lib/components/textarea/index.d.ts +13 -0
- package/lib/components/textarea/index.js +132 -86
- package/lib/components/textarea/index.js.map +1 -1
- package/lib/components/timeline/index.d.ts +8 -0
- package/lib/components/timeline/index.js +70 -47
- package/lib/components/timeline/index.js.map +1 -1
- package/lib/components/toast/img.json +6 -3
- package/lib/components/toast/index.d.ts +16 -0
- package/lib/components/toast/index.js +111 -104
- package/lib/components/toast/index.js.map +1 -1
- package/lib/index.d.ts +53 -0
- package/lib/index.js +108 -54
- package/lib/index.js.map +1 -1
- package/{dist → lib}/style/components/grid.scss +2 -2
- package/lib/style/components/index.scss +52 -0
- package/{dist → lib}/style/components/list.scss +2 -2
- package/lib/style/index.css +11754 -0
- package/lib/style/index.css.map +1 -0
- package/lib/style/mixins/index.scss +18 -0
- package/{dist → lib}/style/mixins/libs/shade.scss +4 -2
- package/{dist → lib}/style/mixins/libs/tint.scss +4 -2
- package/{dist → lib}/style/variables/default.scss +1 -1
- package/package.json +24 -32
- package/rn/components/action-sheet/index.tsx +8 -14
- package/rn/components/calendar/ui/date-list/index.tsx +1 -1
- package/rn/components/drawer/index.tsx +15 -15
- package/rn/components/float-layout/index.tsx +3 -2
- package/rn/components/input/index.tsx +14 -7
- package/rn/components/input-number/index.tsx +19 -19
- package/rn/components/message/index.tsx +1 -1
- package/rn/components/swipe-action/index.rn.tsx +4 -2
- package/rn/components/swipe-action/index.tsx +6 -5
- package/rn/components/tab-bar/index.tsx +1 -1
- package/rn/components/tabs/index.tsx +14 -14
- package/rn/components/textarea/index.tsx +2 -2
- package/dist/index.esm.js +0 -8506
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js +0 -8567
- package/dist/index.js.map +0 -1
- package/dist/style/components/accordion.rn.scss +0 -79
- package/dist/style/components/action-sheet.rn.scss +0 -80
- package/dist/style/components/activity-indicator.rn.scss +0 -30
- package/dist/style/components/article.rn.scss +0 -59
- package/dist/style/components/avatar.rn.scss +0 -46
- package/dist/style/components/badge.rn.scss +0 -52
- package/dist/style/components/button.rn.scss +0 -80
- package/dist/style/components/calendar.rn.scss +0 -182
- package/dist/style/components/card.rn.scss +0 -88
- package/dist/style/components/checkbox.rn.scss +0 -108
- package/dist/style/components/countdown.rn.scss +0 -82
- package/dist/style/components/curtain.rn.scss +0 -129
- package/dist/style/components/divider.rn.scss +0 -33
- package/dist/style/components/drawer.rn.scss +0 -72
- package/dist/style/components/fab.rn.scss +0 -38
- package/dist/style/components/flex.rn.scss +0 -159
- package/dist/style/components/float-layout.rn.scss +0 -119
- package/dist/style/components/form.rn.scss +0 -12
- package/dist/style/components/grid.rn.scss +0 -104
- package/dist/style/components/icon.rn.scss +0 -221
- package/dist/style/components/image-picker.rn.scss +0 -108
- package/dist/style/components/index.rn.scss +0 -51
- package/dist/style/components/index.scss +0 -52
- package/dist/style/components/indexes.rn.scss +0 -53
- package/dist/style/components/input-number.rn.scss +0 -82
- package/dist/style/components/input.rn.scss +0 -149
- package/dist/style/components/list.rn.scss +0 -107
- package/dist/style/components/load-more.rn.scss +0 -28
- package/dist/style/components/loading.rn.scss +0 -45
- package/dist/style/components/message.rn.scss +0 -57
- package/dist/style/components/modal.rn.scss +0 -136
- package/dist/style/components/nav-bar.rn.scss +0 -123
- package/dist/style/components/noticebar.rn.scss +0 -111
- package/dist/style/components/pagination.rn.scss +0 -43
- package/dist/style/components/progress.rn.scss +0 -105
- package/dist/style/components/radio.rn.scss +0 -94
- package/dist/style/components/range.rn.scss +0 -52
- package/dist/style/components/rate.rn.scss +0 -48
- package/dist/style/components/search-bar.rn.scss +0 -134
- package/dist/style/components/segmented-control.rn.scss +0 -44
- package/dist/style/components/slider.rn.scss +0 -33
- package/dist/style/components/steps.rn.scss +0 -131
- package/dist/style/components/swipe-action.rn.scss +0 -53
- package/dist/style/components/switch.rn.scss +0 -61
- package/dist/style/components/tab-bar.rn.scss +0 -74
- package/dist/style/components/tabs.rn.scss +0 -205
- package/dist/style/components/tag.rn.scss +0 -74
- package/dist/style/components/textarea.rn.scss +0 -57
- package/dist/style/components/timeline.rn.scss +0 -89
- package/dist/style/components/toast.rn.scss +0 -112
- package/dist/style/index.rn.scss +0 -14
- package/dist/style/mixins/index.rn.scss +0 -18
- package/dist/style/mixins/index.scss +0 -18
- package/dist/style/mixins/libs/absolute-center.rn.scss +0 -9
- package/dist/style/mixins/libs/active.rn.scss +0 -10
- package/dist/style/mixins/libs/alignhack.rn.scss +0 -11
- package/dist/style/mixins/libs/border.rn.scss +0 -48
- package/dist/style/mixins/libs/clearfix.rn.scss +0 -21
- package/dist/style/mixins/libs/disabled.rn.scss +0 -6
- package/dist/style/mixins/libs/flex.rn.scss +0 -49
- package/dist/style/mixins/libs/hairline.rn.scss +0 -209
- package/dist/style/mixins/libs/line.rn.scss +0 -14
- package/dist/style/mixins/libs/overlay.rn.scss +0 -11
- package/dist/style/mixins/libs/placeholder.rn.scss +0 -12
- package/dist/style/mixins/libs/shade.rn.scss +0 -23
- package/dist/style/mixins/libs/tint.rn.scss +0 -23
- package/dist/style/themes/purple.rn.scss +0 -44
- package/dist/style/themes/red.rn.scss +0 -45
- package/dist/style/variables/default.rn.scss +0 -461
- package/types/accordion.d.ts +0 -49
- package/types/action-sheet.d.ts +0 -55
- package/types/activity-indicator.d.ts +0 -33
- package/types/avatar.d.ts +0 -39
- package/types/badge.d.ts +0 -24
- package/types/base.d.ts +0 -26
- package/types/button.d.ts +0 -70
- package/types/calendar.d.ts +0 -225
- package/types/card.d.ts +0 -48
- package/types/checkbox.d.ts +0 -24
- package/types/countdown.d.ts +0 -95
- package/types/curtain.d.ts +0 -26
- package/types/divider.d.ts +0 -33
- package/types/drawer.d.ts +0 -48
- package/types/fab.d.ts +0 -21
- package/types/flex.d.ts +0 -27
- package/types/float-button.d.ts +0 -26
- package/types/float-layout.d.ts +0 -73
- package/types/form.d.ts +0 -26
- package/types/grid.d.ts +0 -51
- package/types/icon.d.ts +0 -12
- package/types/image-picker.d.ts +0 -73
- package/types/index.d.ts +0 -55
- package/types/indexes.d.ts +0 -76
- package/types/input-number.d.ts +0 -89
- package/types/input.d.ts +0 -162
- package/types/list.d.ts +0 -84
- package/types/load-more.d.ts +0 -43
- package/types/message.d.ts +0 -43
- package/types/modal.d.ts +0 -62
- package/types/nav-bar.d.ts +0 -65
- package/types/noticebar.d.ts +0 -65
- package/types/pagination.d.ts +0 -51
- package/types/progress.d.ts +0 -30
- package/types/radio.d.ts +0 -47
- package/types/range.d.ts +0 -63
- package/types/rate.d.ts +0 -34
- package/types/search-bar.d.ts +0 -105
- package/types/segmented-control.d.ts +0 -44
- package/types/slider.d.ts +0 -73
- package/types/steps.d.ts +0 -69
- package/types/swipe-action.d.ts +0 -86
- package/types/switch.d.ts +0 -38
- package/types/tab-bar.d.ts +0 -98
- package/types/tabs-pane.d.ts +0 -25
- package/types/tabs.d.ts +0 -62
- package/types/tag.d.ts +0 -48
- package/types/textarea.d.ts +0 -113
- package/types/timeline.d.ts +0 -46
- package/types/toast.d.ts +0 -53
- /package/{dist → lib}/style/components/accordion.scss +0 -0
- /package/{dist → lib}/style/components/action-sheet.scss +0 -0
- /package/{dist → lib}/style/components/activity-indicator.scss +0 -0
- /package/{dist → lib}/style/components/article.scss +0 -0
- /package/{dist → lib}/style/components/avatar.scss +0 -0
- /package/{dist → lib}/style/components/badge.scss +0 -0
- /package/{dist → lib}/style/components/button.scss +0 -0
- /package/{dist → lib}/style/components/calendar.scss +0 -0
- /package/{dist → lib}/style/components/card.scss +0 -0
- /package/{dist → lib}/style/components/checkbox.scss +0 -0
- /package/{dist → lib}/style/components/countdown.scss +0 -0
- /package/{dist → lib}/style/components/curtain.scss +0 -0
- /package/{dist → lib}/style/components/divider.scss +0 -0
- /package/{dist → lib}/style/components/drawer.scss +0 -0
- /package/{dist → lib}/style/components/fab.scss +0 -0
- /package/{dist → lib}/style/components/flex.scss +0 -0
- /package/{dist → lib}/style/components/float-layout.scss +0 -0
- /package/{dist → lib}/style/components/form.scss +0 -0
- /package/{dist → lib}/style/components/icon.scss +0 -0
- /package/{dist → lib}/style/components/image-picker.scss +0 -0
- /package/{dist → lib}/style/components/indexes.scss +0 -0
- /package/{dist → lib}/style/components/input-number.scss +0 -0
- /package/{dist → lib}/style/components/input.scss +0 -0
- /package/{dist → lib}/style/components/load-more.scss +0 -0
- /package/{dist → lib}/style/components/loading.scss +0 -0
- /package/{dist → lib}/style/components/message.scss +0 -0
- /package/{dist → lib}/style/components/modal.scss +0 -0
- /package/{dist → lib}/style/components/nav-bar.scss +0 -0
- /package/{dist → lib}/style/components/noticebar.scss +0 -0
- /package/{dist → lib}/style/components/pagination.scss +0 -0
- /package/{dist → lib}/style/components/progress.scss +0 -0
- /package/{dist → lib}/style/components/radio.scss +0 -0
- /package/{dist → lib}/style/components/range.scss +0 -0
- /package/{dist → lib}/style/components/rate.scss +0 -0
- /package/{dist → lib}/style/components/search-bar.scss +0 -0
- /package/{dist → lib}/style/components/segmented-control.scss +0 -0
- /package/{dist → lib}/style/components/slider.scss +0 -0
- /package/{dist → lib}/style/components/steps.scss +0 -0
- /package/{dist → lib}/style/components/swipe-action.scss +0 -0
- /package/{dist → lib}/style/components/switch.scss +0 -0
- /package/{dist → lib}/style/components/tab-bar.scss +0 -0
- /package/{dist → lib}/style/components/tabs.scss +0 -0
- /package/{dist → lib}/style/components/tag.scss +0 -0
- /package/{dist → lib}/style/components/textarea.scss +0 -0
- /package/{dist → lib}/style/components/timeline.scss +0 -0
- /package/{dist → lib}/style/components/toast.scss +0 -0
- /package/{dist → lib}/style/index.scss +0 -0
- /package/{dist → lib}/style/mixins/libs/absolute-center.scss +0 -0
- /package/{dist → lib}/style/mixins/libs/active.scss +0 -0
- /package/{dist → lib}/style/mixins/libs/alignhack.scss +0 -0
- /package/{dist → lib}/style/mixins/libs/border.scss +0 -0
- /package/{dist → lib}/style/mixins/libs/clearfix.scss +0 -0
- /package/{dist → lib}/style/mixins/libs/disabled.scss +0 -0
- /package/{dist → lib}/style/mixins/libs/flex.scss +0 -0
- /package/{dist → lib}/style/mixins/libs/hairline.scss +0 -0
- /package/{dist → lib}/style/mixins/libs/line.scss +0 -0
- /package/{dist → lib}/style/mixins/libs/overlay.scss +0 -0
- /package/{dist → lib}/style/mixins/libs/placeholder.scss +0 -0
- /package/{dist → lib}/style/themes/purple.scss +0 -0
- /package/{dist → lib}/style/themes/red.scss +0 -0
|
@@ -1,77 +1,115 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import React from
|
|
4
|
-
import { Slider, View } from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Slider, View } from "@tarojs/components";
|
|
5
|
+
class AtSlider extends React.Component {
|
|
6
|
+
constructor(props) {
|
|
7
|
+
super(props);
|
|
8
|
+
const { value = 0, min = 0, max = 100 } = props;
|
|
9
|
+
this.state = {
|
|
10
|
+
_value: AtSlider.clampNumber(value, min, max)
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
static clampNumber(value, lower, upper) {
|
|
14
|
+
return Math.max(lower, Math.min(upper, value));
|
|
15
|
+
}
|
|
16
|
+
handleChanging(e) {
|
|
17
|
+
const { _value } = this.state;
|
|
18
|
+
const { value } = e.detail;
|
|
19
|
+
if (value !== _value) {
|
|
20
|
+
this.setState({ _value: value });
|
|
12
21
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
this.props.onChanging && this.props.onChanging(value);
|
|
23
|
+
}
|
|
24
|
+
handleChange(e) {
|
|
25
|
+
const { value } = e.detail;
|
|
26
|
+
this.setState({ _value: value });
|
|
27
|
+
this.props.onChange && this.props.onChange(value);
|
|
28
|
+
}
|
|
29
|
+
UNSAFE_componentWillReceiveProps(props) {
|
|
30
|
+
const { value = 0, min = 0, max = 100 } = props;
|
|
31
|
+
this.setState({
|
|
32
|
+
_value: AtSlider.clampNumber(value, min, max)
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
const { _value } = this.state;
|
|
37
|
+
const {
|
|
38
|
+
customStyle,
|
|
39
|
+
className,
|
|
40
|
+
min,
|
|
41
|
+
max,
|
|
42
|
+
step,
|
|
43
|
+
disabled,
|
|
44
|
+
activeColor,
|
|
45
|
+
backgroundColor,
|
|
46
|
+
blockSize,
|
|
47
|
+
blockColor,
|
|
48
|
+
showValue
|
|
49
|
+
} = this.props;
|
|
50
|
+
return /* @__PURE__ */ React.createElement(
|
|
51
|
+
View,
|
|
52
|
+
{
|
|
53
|
+
className: classNames(
|
|
54
|
+
{
|
|
55
|
+
"at-slider": true,
|
|
56
|
+
"at-slider--disabled": disabled
|
|
57
|
+
},
|
|
58
|
+
className
|
|
59
|
+
),
|
|
60
|
+
style: customStyle
|
|
61
|
+
},
|
|
62
|
+
/* @__PURE__ */ React.createElement(View, { className: "at-slider__inner" }, /* @__PURE__ */ React.createElement(
|
|
63
|
+
Slider,
|
|
64
|
+
{
|
|
65
|
+
min,
|
|
66
|
+
max,
|
|
67
|
+
step,
|
|
68
|
+
value: _value,
|
|
69
|
+
disabled,
|
|
70
|
+
activeColor,
|
|
71
|
+
backgroundColor,
|
|
72
|
+
blockSize,
|
|
73
|
+
blockColor,
|
|
74
|
+
onChanging: this.handleChanging.bind(this),
|
|
75
|
+
onChange: this.handleChange.bind(this)
|
|
21
76
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this.setState({ _value: value });
|
|
27
|
-
this.props.onChange && this.props.onChange(value);
|
|
28
|
-
}
|
|
29
|
-
UNSAFE_componentWillReceiveProps(props) {
|
|
30
|
-
const { value = 0, min = 0, max = 100 } = props;
|
|
31
|
-
this.setState({
|
|
32
|
-
_value: AtSlider.clampNumber(value, min, max)
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
render() {
|
|
36
|
-
const { _value } = this.state;
|
|
37
|
-
const { customStyle, className, min, max, step, disabled, activeColor, backgroundColor, blockSize, blockColor, showValue } = this.props;
|
|
38
|
-
return (React.createElement(View, { className: classNames({
|
|
39
|
-
'at-slider': true,
|
|
40
|
-
'at-slider--disabled': disabled
|
|
41
|
-
}, className), style: customStyle },
|
|
42
|
-
React.createElement(View, { className: 'at-slider__inner' },
|
|
43
|
-
React.createElement(Slider, { min: min, max: max, step: step, value: _value, disabled: disabled, activeColor: activeColor, backgroundColor: backgroundColor, blockSize: blockSize, blockColor: blockColor, onChanging: this.handleChanging.bind(this), onChange: this.handleChange.bind(this) })),
|
|
44
|
-
showValue && React.createElement(View, { className: 'at-slider__text' }, `${_value}`)));
|
|
45
|
-
}
|
|
77
|
+
)),
|
|
78
|
+
showValue && /* @__PURE__ */ React.createElement(View, { className: "at-slider__text" }, `${_value}`)
|
|
79
|
+
);
|
|
80
|
+
}
|
|
46
81
|
}
|
|
47
82
|
AtSlider.defaultProps = {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
83
|
+
customStyle: "",
|
|
84
|
+
className: "",
|
|
85
|
+
min: 0,
|
|
86
|
+
max: 100,
|
|
87
|
+
step: 1,
|
|
88
|
+
value: 0,
|
|
89
|
+
disabled: false,
|
|
90
|
+
activeColor: "#6190e8",
|
|
91
|
+
backgroundColor: "#e9e9e9",
|
|
92
|
+
blockSize: 28,
|
|
93
|
+
blockColor: "#ffffff",
|
|
94
|
+
showValue: false
|
|
60
95
|
};
|
|
61
96
|
AtSlider.propTypes = {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
97
|
+
customStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
98
|
+
className: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),
|
|
99
|
+
min: PropTypes.number,
|
|
100
|
+
max: PropTypes.number,
|
|
101
|
+
step: PropTypes.number,
|
|
102
|
+
value: PropTypes.number,
|
|
103
|
+
disabled: PropTypes.bool,
|
|
104
|
+
activeColor: PropTypes.string,
|
|
105
|
+
backgroundColor: PropTypes.string,
|
|
106
|
+
blockSize: PropTypes.number,
|
|
107
|
+
blockColor: PropTypes.string,
|
|
108
|
+
showValue: PropTypes.bool,
|
|
109
|
+
onChange: PropTypes.func,
|
|
110
|
+
onChanging: PropTypes.func
|
|
111
|
+
};
|
|
112
|
+
export {
|
|
113
|
+
AtSlider as default
|
|
76
114
|
};
|
|
77
115
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/slider/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport PropTypes, { InferProps } from 'prop-types'\nimport React from 'react'\nimport { Slider, View } from '@tarojs/components'\nimport { CommonEvent } from '@tarojs/components/types/common'\nimport { AtSliderProps, AtSliderState } from '../../../types/slider'\n\nexport default class AtSlider extends React.Component<\n AtSliderProps,\n AtSliderState\n> {\n public static defaultProps: AtSliderProps\n public static propTypes: InferProps<AtSliderProps>\n\n public constructor(props: AtSliderProps) {\n super(props)\n const { value = 0, min = 0, max = 100 } = props\n this.state = {\n _value: AtSlider.clampNumber(value, min, max)\n }\n }\n\n protected static clampNumber(\n value: number,\n lower: number,\n upper: number\n ): number {\n return Math.max(lower, Math.min(upper, value))\n }\n\n private handleChanging(e: CommonEvent): void {\n const { _value } = this.state\n const { value }: { value: number } = e.detail\n\n if (value !== _value) {\n this.setState({ _value: value })\n }\n this.props.onChanging && this.props.onChanging(value)\n }\n\n private handleChange(e: CommonEvent): void {\n const { value } = e.detail\n\n this.setState({ _value: value })\n this.props.onChange && this.props.onChange(value)\n }\n\n public UNSAFE_componentWillReceiveProps(props: AtSliderProps): void {\n const { value = 0, min = 0, max = 100 } = props\n this.setState({\n _value: AtSlider.clampNumber(value, min, max)\n })\n }\n\n public render(): JSX.Element {\n const { _value } = this.state\n const {\n customStyle,\n className,\n min,\n max,\n step,\n disabled,\n activeColor,\n backgroundColor,\n blockSize,\n blockColor,\n showValue\n } = this.props\n\n return (\n <View\n className={classNames(\n {\n 'at-slider': true,\n 'at-slider--disabled': disabled\n },\n className\n )}\n style={customStyle}\n >\n <View className='at-slider__inner'>\n <Slider\n min={min}\n max={max}\n step={step}\n value={_value}\n disabled={disabled}\n activeColor={activeColor}\n backgroundColor={backgroundColor}\n blockSize={blockSize}\n blockColor={blockColor}\n onChanging={this.handleChanging.bind(this)}\n onChange={this.handleChange.bind(this)}\n ></Slider>\n </View>\n {showValue && <View className='at-slider__text'>{`${_value}`}</View>}\n </View>\n )\n }\n}\n\nAtSlider.defaultProps = {\n customStyle: '',\n className: '',\n min: 0,\n max: 100,\n step: 1,\n value: 0,\n disabled: false,\n activeColor: '#6190e8',\n backgroundColor: '#e9e9e9',\n blockSize: 28,\n blockColor: '#ffffff',\n showValue: false\n}\n\nAtSlider.propTypes = {\n customStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),\n className: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),\n min: PropTypes.number,\n max: PropTypes.number,\n step: PropTypes.number,\n value: PropTypes.number,\n disabled: PropTypes.bool,\n activeColor: PropTypes.string,\n backgroundColor: PropTypes.string,\n blockSize: PropTypes.number,\n blockColor: PropTypes.string,\n showValue: PropTypes.bool,\n onChange: PropTypes.func,\n onChanging: PropTypes.func\n}\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InferProps } from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AtStepsProps } from '../../../types/steps';
|
|
4
|
+
export default class AtSteps extends React.Component<AtStepsProps> {
|
|
5
|
+
static defaultProps: AtStepsProps;
|
|
6
|
+
static propTypes: InferProps<AtStepsProps>;
|
|
7
|
+
private handleClick;
|
|
8
|
+
render(): JSX.Element;
|
|
9
|
+
}
|
|
@@ -1,50 +1,67 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import React from
|
|
4
|
-
import { Text, View } from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Text, View } from "@tarojs/components";
|
|
5
|
+
class AtSteps extends React.Component {
|
|
6
|
+
handleClick(current, event) {
|
|
7
|
+
this.props.onChange(current, event);
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
const { customStyle, className, items, current } = this.props;
|
|
11
|
+
return /* @__PURE__ */ React.createElement(View, { className: classNames("at-steps", className), style: customStyle }, !!items && items.map((item, i) => /* @__PURE__ */ React.createElement(
|
|
12
|
+
View,
|
|
13
|
+
{
|
|
14
|
+
key: item.title,
|
|
15
|
+
className: classNames({
|
|
16
|
+
"at-steps__item": true,
|
|
17
|
+
"at-steps__item--active": i === current,
|
|
18
|
+
"at-steps__item--inactive": i !== current
|
|
19
|
+
}),
|
|
20
|
+
onClick: this.handleClick.bind(this, i)
|
|
21
|
+
},
|
|
22
|
+
/* @__PURE__ */ React.createElement(View, { className: "at-steps__circular-wrap" }, i !== 0 && /* @__PURE__ */ React.createElement(View, { className: "at-steps__left-line" }), item.status ? /* @__PURE__ */ React.createElement(
|
|
23
|
+
View,
|
|
24
|
+
{
|
|
25
|
+
className: classNames({
|
|
26
|
+
"at-icon": true,
|
|
27
|
+
"at-icon-check-circle": item.status === "success",
|
|
28
|
+
"at-icon-close-circle": item.status === "error",
|
|
29
|
+
"at-steps__single-icon": true,
|
|
30
|
+
"at-steps__single-icon--success": item.status === "success",
|
|
31
|
+
"at-steps__single-icon--error": item.status === "error"
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
) : /* @__PURE__ */ React.createElement(View, { className: "at-steps__circular" }, item.icon ? /* @__PURE__ */ React.createElement(
|
|
35
|
+
Text,
|
|
36
|
+
{
|
|
37
|
+
className: classNames("at-icon", {
|
|
38
|
+
[`at-icon-${item.icon.value}`]: item.icon.value,
|
|
39
|
+
"at-steps__circle-icon": true
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
) : /* @__PURE__ */ React.createElement(Text, { className: "at-steps__num" }, i + 1)), i !== items.length - 1 && /* @__PURE__ */ React.createElement(View, { className: "at-steps__right-line" })),
|
|
43
|
+
/* @__PURE__ */ React.createElement(View, { className: "at-steps__title" }, item.title),
|
|
44
|
+
/* @__PURE__ */ React.createElement(View, { className: "at-steps__desc" }, item.desc)
|
|
45
|
+
)));
|
|
46
|
+
}
|
|
34
47
|
}
|
|
35
48
|
AtSteps.defaultProps = {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
49
|
+
customStyle: "",
|
|
50
|
+
className: "",
|
|
51
|
+
current: 0,
|
|
52
|
+
items: [],
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
54
|
+
onChange: () => {
|
|
55
|
+
}
|
|
42
56
|
};
|
|
43
57
|
AtSteps.propTypes = {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
58
|
+
customStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
59
|
+
className: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),
|
|
60
|
+
current: PropTypes.number,
|
|
61
|
+
items: PropTypes.array,
|
|
62
|
+
onChange: PropTypes.func
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
AtSteps as default
|
|
49
66
|
};
|
|
50
67
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/steps/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport PropTypes, { InferProps } from 'prop-types'\nimport React from 'react'\nimport { Text, View } from '@tarojs/components'\nimport { CommonEvent } from '@tarojs/components/types/common'\nimport { AtStepsProps } from '../../../types/steps'\n\nexport default class AtSteps extends React.Component<AtStepsProps> {\n public static defaultProps: AtStepsProps\n public static propTypes: InferProps<AtStepsProps>\n\n private handleClick(current: number, event: CommonEvent): void {\n this.props.onChange(current, event)\n }\n\n public render(): JSX.Element {\n const { customStyle, className, items, current } = this.props\n\n return (\n <View className={classNames('at-steps', className)} style={customStyle}>\n {!!items &&\n items.map((item, i) => (\n <View\n key={item.title}\n className={classNames({\n 'at-steps__item': true,\n 'at-steps__item--active': i === current,\n 'at-steps__item--inactive': i !== current\n })}\n onClick={this.handleClick.bind(this, i)}\n >\n <View className='at-steps__circular-wrap'>\n {i !== 0 && <View className='at-steps__left-line'></View>}\n {item.status ? (\n <View\n className={classNames({\n 'at-icon': true,\n 'at-icon-check-circle': item.status === 'success',\n 'at-icon-close-circle': item.status === 'error',\n 'at-steps__single-icon': true,\n 'at-steps__single-icon--success':\n item.status === 'success',\n 'at-steps__single-icon--error': item.status === 'error'\n })}\n ></View>\n ) : (\n <View className='at-steps__circular'>\n {item.icon ? (\n <Text\n className={classNames('at-icon', {\n [`at-icon-${item.icon.value}`]: item.icon.value,\n 'at-steps__circle-icon': true\n })}\n ></Text>\n ) : (\n <Text className='at-steps__num'>{i + 1}</Text>\n )}\n </View>\n )}\n {i !== items.length - 1 && (\n <View className='at-steps__right-line'></View>\n )}\n </View>\n <View className='at-steps__title'>{item.title}</View>\n <View className='at-steps__desc'>{item.desc}</View>\n </View>\n ))}\n </View>\n )\n }\n}\n\nAtSteps.defaultProps = {\n customStyle: '',\n className: '',\n current: 0,\n items: [],\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onChange: (): void => {}\n}\n\nAtSteps.propTypes = {\n customStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),\n className: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),\n current: PropTypes.number,\n items: PropTypes.array,\n onChange: PropTypes.func\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,OAAO,eAA+B;AACtC,OAAO,WAAW;AAClB,SAAS,MAAM,YAAY;AAI3B,MAAO,gBAA8B,MAAM,UAAwB;AAAA,EAIzD,YAAY,SAAiB,OAA0B;AAC7D,SAAK,MAAM,SAAS,SAAS,KAAK;AAAA,EACpC;AAAA,EAEO,SAAsB;AAC3B,UAAM,EAAE,aAAa,WAAW,OAAO,QAAQ,IAAI,KAAK;AAExD,WACE,oCAAC,QAAK,WAAW,WAAW,YAAY,SAAS,GAAG,OAAO,eACxD,CAAC,CAAC,SACD,MAAM,IAAI,CAAC,MAAM,MACf;AAAA,MAAC;AAAA;AAAA,QACC,KAAK,KAAK;AAAA,QACV,WAAW,WAAW;AAAA,UACpB,kBAAkB;AAAA,UAClB,0BAA0B,MAAM;AAAA,UAChC,4BAA4B,MAAM;AAAA,QACpC,CAAC;AAAA,QACD,SAAS,KAAK,YAAY,KAAK,MAAM,CAAC;AAAA;AAAA,MAEtC,oCAAC,QAAK,WAAU,6BACb,MAAM,KAAK,oCAAC,QAAK,WAAU,uBAAsB,GACjD,KAAK,SACJ;AAAA,QAAC;AAAA;AAAA,UACC,WAAW,WAAW;AAAA,YACpB,WAAW;AAAA,YACX,wBAAwB,KAAK,WAAW;AAAA,YACxC,wBAAwB,KAAK,WAAW;AAAA,YACxC,yBAAyB;AAAA,YACzB,kCACE,KAAK,WAAW;AAAA,YAClB,gCAAgC,KAAK,WAAW;AAAA,UAClD,CAAC;AAAA;AAAA,MACF,IAED,oCAAC,QAAK,WAAU,wBACb,KAAK,OACJ;AAAA,QAAC;AAAA;AAAA,UACC,WAAW,WAAW,WAAW;AAAA,YAC/B,CAAC,WAAW,KAAK,KAAK,KAAK,EAAE,GAAG,KAAK,KAAK;AAAA,YAC1C,yBAAyB;AAAA,UAC3B,CAAC;AAAA;AAAA,MACF,IAED,oCAAC,QAAK,WAAU,mBAAiB,IAAI,CAAE,CAE3C,GAED,MAAM,MAAM,SAAS,KACpB,oCAAC,QAAK,WAAU,wBAAuB,CAE3C;AAAA,MACA,oCAAC,QAAK,WAAU,qBAAmB,KAAK,KAAM;AAAA,MAC9C,oCAAC,QAAK,WAAU,oBAAkB,KAAK,IAAK;AAAA,IAC9C,CACD,CACL;AAAA,EAEJ;AACF;AAEA,QAAQ,eAAe;AAAA,EACrB,aAAa;AAAA,EACb,WAAW;AAAA,EACX,SAAS;AAAA,EACT,OAAO,CAAC;AAAA;AAAA,EAER,UAAU,MAAY;AAAA,EAAC;AACzB;AAEA,QAAQ,YAAY;AAAA,EAClB,aAAa,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AAAA,EACrE,WAAW,UAAU,UAAU,CAAC,UAAU,OAAO,UAAU,MAAM,CAAC;AAAA,EAClE,SAAS,UAAU;AAAA,EACnB,OAAO,UAAU;AAAA,EACjB,UAAU,UAAU;AACtB;","names":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InferProps } from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AtSwipeActionProps, AtSwipeActionState } from '../../../types/swipe-action';
|
|
4
|
+
export default class AtSwipeAction extends React.Component<AtSwipeActionProps, AtSwipeActionState> {
|
|
5
|
+
static defaultProps: AtSwipeActionProps;
|
|
6
|
+
static propTypes: InferProps<AtSwipeActionProps>;
|
|
7
|
+
private moveX;
|
|
8
|
+
constructor(props: AtSwipeActionProps);
|
|
9
|
+
componentDidMount(): void;
|
|
10
|
+
componentDidUpdate(_: any, prevState: AtSwipeActionState): void;
|
|
11
|
+
UNSAFE_componentWillReceiveProps(nextProps: AtSwipeActionProps): void;
|
|
12
|
+
/**
|
|
13
|
+
* 获取滑动区域宽度
|
|
14
|
+
*/
|
|
15
|
+
private getAreaWidth;
|
|
16
|
+
/**
|
|
17
|
+
* 获取最大偏移量
|
|
18
|
+
*/
|
|
19
|
+
private getMaxOffsetSize;
|
|
20
|
+
private _reset;
|
|
21
|
+
private handleOpened;
|
|
22
|
+
private handleClosed;
|
|
23
|
+
private handleClick;
|
|
24
|
+
onTouchEnd: (e: any) => void;
|
|
25
|
+
onChange: (e: any) => void;
|
|
26
|
+
render(): JSX.Element;
|
|
27
|
+
}
|