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,116 +1,121 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import React from
|
|
4
|
-
import { Text, View } from
|
|
5
|
-
import { delayQuerySelector, uuid } from
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Text, View } from "@tarojs/components";
|
|
5
|
+
import { delayQuerySelector, uuid } from "../../common/utils";
|
|
6
|
+
class AtAccordion extends React.Component {
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(props);
|
|
9
|
+
this.handleClick = (event) => {
|
|
10
|
+
const { open } = this.props;
|
|
11
|
+
if (!this.isCompleted) return;
|
|
12
|
+
this.props.onClick && this.props.onClick(!open, event);
|
|
13
|
+
};
|
|
14
|
+
this.isCompleted = true;
|
|
15
|
+
this.startOpen = false;
|
|
16
|
+
this.state = {
|
|
17
|
+
componentId: uuid(),
|
|
18
|
+
wrapperHeight: 0
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
toggleWithAnimation() {
|
|
22
|
+
const { open, isAnimation } = this.props;
|
|
23
|
+
const { componentId } = this.state;
|
|
24
|
+
if (!this.isCompleted || !isAnimation) return;
|
|
25
|
+
this.isCompleted = false;
|
|
26
|
+
delayQuerySelector(`#at-accordion__body-${componentId}`, 0).then((rect) => {
|
|
27
|
+
const height = parseInt(rect[0].height.toString());
|
|
28
|
+
const startHeight = open ? height : 0;
|
|
29
|
+
const endHeight = open ? 0 : height;
|
|
30
|
+
this.startOpen = false;
|
|
31
|
+
this.setState(
|
|
32
|
+
{
|
|
33
|
+
wrapperHeight: startHeight
|
|
34
|
+
},
|
|
35
|
+
() => {
|
|
36
|
+
setTimeout(() => {
|
|
37
|
+
this.setState(
|
|
38
|
+
{
|
|
39
|
+
wrapperHeight: endHeight
|
|
40
|
+
},
|
|
41
|
+
() => {
|
|
36
42
|
setTimeout(() => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}, 700);
|
|
44
|
-
});
|
|
45
|
-
}, 100);
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
50
|
-
if (nextProps.open !== this.props.open) {
|
|
51
|
-
this.startOpen = !!nextProps.open && !!nextProps.isAnimation;
|
|
52
|
-
this.toggleWithAnimation();
|
|
43
|
+
this.isCompleted = true;
|
|
44
|
+
this.setState({});
|
|
45
|
+
}, 700);
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}, 100);
|
|
53
49
|
}
|
|
50
|
+
);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
54
|
+
if (nextProps.open !== this.props.open) {
|
|
55
|
+
this.startOpen = !!nextProps.open && !!nextProps.isAnimation;
|
|
56
|
+
this.toggleWithAnimation();
|
|
54
57
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
const { componentId } = this.state;
|
|
83
|
-
return (React.createElement(View, { className: rootCls, style: customStyle },
|
|
84
|
-
React.createElement(View, { className: headerCls, onClick: this.handleClick },
|
|
85
|
-
icon && icon.value && (React.createElement(Text, { className: iconCls, style: iconStyle })),
|
|
86
|
-
React.createElement(View, { className: 'at-accordion__info' },
|
|
87
|
-
React.createElement(View, { className: 'at-accordion__info__title' }, title),
|
|
88
|
-
React.createElement(View, { className: 'at-accordion__info__note' }, note)),
|
|
89
|
-
React.createElement(View, { className: arrowCls },
|
|
90
|
-
React.createElement(Text, { className: 'at-icon at-icon-chevron-down' }))),
|
|
91
|
-
React.createElement(View, { style: contentStyle, className: contentCls },
|
|
92
|
-
React.createElement(View, { id: `at-accordion__body-${componentId}`, className: 'at-accordion__body' }, this.props.children))));
|
|
58
|
+
}
|
|
59
|
+
render() {
|
|
60
|
+
const { customStyle, className, title, icon, hasBorder, open, note } = this.props;
|
|
61
|
+
const { wrapperHeight } = this.state;
|
|
62
|
+
const rootCls = classNames("at-accordion", className);
|
|
63
|
+
const prefixClass = icon && icon.prefixClass || "at-icon";
|
|
64
|
+
const iconCls = classNames({
|
|
65
|
+
[prefixClass]: true,
|
|
66
|
+
[`${prefixClass}-${icon && icon.value}`]: icon && icon.value,
|
|
67
|
+
"at-accordion__icon": true
|
|
68
|
+
});
|
|
69
|
+
const headerCls = classNames("at-accordion__header", {
|
|
70
|
+
"at-accordion__header--noborder": !hasBorder
|
|
71
|
+
});
|
|
72
|
+
const arrowCls = classNames("at-accordion__arrow", {
|
|
73
|
+
"at-accordion__arrow--folded": !!open
|
|
74
|
+
});
|
|
75
|
+
const contentCls = classNames("at-accordion__content", {
|
|
76
|
+
"at-accordion__content--inactive": !open && this.isCompleted || this.startOpen
|
|
77
|
+
});
|
|
78
|
+
const iconStyle = {
|
|
79
|
+
color: icon && icon.color || "",
|
|
80
|
+
fontSize: icon && `${icon.size}px` || ""
|
|
81
|
+
};
|
|
82
|
+
const contentStyle = { height: `${wrapperHeight}px` };
|
|
83
|
+
if (this.isCompleted) {
|
|
84
|
+
contentStyle.height = "";
|
|
93
85
|
}
|
|
86
|
+
const { componentId } = this.state;
|
|
87
|
+
return /* @__PURE__ */ React.createElement(View, { className: rootCls, style: customStyle }, /* @__PURE__ */ React.createElement(View, { className: headerCls, onClick: this.handleClick }, icon && icon.value && /* @__PURE__ */ React.createElement(Text, { className: iconCls, style: iconStyle }), /* @__PURE__ */ React.createElement(View, { className: "at-accordion__info" }, /* @__PURE__ */ React.createElement(View, { className: "at-accordion__info__title" }, title), /* @__PURE__ */ React.createElement(View, { className: "at-accordion__info__note" }, note)), /* @__PURE__ */ React.createElement(View, { className: arrowCls }, /* @__PURE__ */ React.createElement(Text, { className: "at-icon at-icon-chevron-down" }))), /* @__PURE__ */ React.createElement(View, { style: contentStyle, className: contentCls }, /* @__PURE__ */ React.createElement(
|
|
88
|
+
View,
|
|
89
|
+
{
|
|
90
|
+
id: `at-accordion__body-${componentId}`,
|
|
91
|
+
className: "at-accordion__body"
|
|
92
|
+
},
|
|
93
|
+
this.props.children
|
|
94
|
+
)));
|
|
95
|
+
}
|
|
94
96
|
}
|
|
95
97
|
AtAccordion.defaultProps = {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
98
|
+
open: false,
|
|
99
|
+
customStyle: "",
|
|
100
|
+
className: "",
|
|
101
|
+
title: "",
|
|
102
|
+
note: "",
|
|
103
|
+
icon: { value: "" },
|
|
104
|
+
hasBorder: true,
|
|
105
|
+
isAnimation: true
|
|
104
106
|
};
|
|
105
107
|
AtAccordion.propTypes = {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
108
|
+
customStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
109
|
+
className: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),
|
|
110
|
+
open: PropTypes.bool,
|
|
111
|
+
isAnimation: PropTypes.bool,
|
|
112
|
+
title: PropTypes.string,
|
|
113
|
+
note: PropTypes.string,
|
|
114
|
+
icon: PropTypes.object,
|
|
115
|
+
hasBorder: PropTypes.bool,
|
|
116
|
+
onClick: PropTypes.func
|
|
117
|
+
};
|
|
118
|
+
export {
|
|
119
|
+
AtAccordion as default
|
|
115
120
|
};
|
|
116
121
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/accordion/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 { AtAccordionProps, AtAccordionState } from '../../../types/accordion'\nimport { delayQuerySelector, uuid } from '../../common/utils'\n\nexport default class AtAccordion extends React.Component<\n AtAccordionProps,\n AtAccordionState\n> {\n private isCompleted: boolean\n private startOpen: boolean\n\n public static defaultProps: AtAccordionProps\n public static propTypes: InferProps<AtAccordionProps>\n\n public constructor(props: AtAccordionProps) {\n super(props)\n this.isCompleted = true\n this.startOpen = false\n this.state = {\n componentId: uuid(),\n wrapperHeight: 0\n }\n }\n\n private handleClick = (event: CommonEvent): void => {\n const { open } = this.props\n if (!this.isCompleted) return\n\n this.props.onClick && this.props.onClick(!open, event)\n }\n\n private toggleWithAnimation(): void {\n const { open, isAnimation } = this.props\n const { componentId } = this.state\n if (!this.isCompleted || !isAnimation) return\n\n this.isCompleted = false\n\n delayQuerySelector(`#at-accordion__body-${componentId}`, 0).then(rect => {\n const height = parseInt(rect[0].height.toString())\n const startHeight = open ? height : 0\n const endHeight = open ? 0 : height\n this.startOpen = false\n this.setState(\n {\n wrapperHeight: startHeight\n },\n () => {\n setTimeout(() => {\n this.setState(\n {\n wrapperHeight: endHeight\n },\n () => {\n setTimeout(() => {\n this.isCompleted = true\n this.setState({})\n }, 700)\n }\n )\n }, 100)\n }\n )\n })\n }\n\n public UNSAFE_componentWillReceiveProps(nextProps: AtAccordionProps): void {\n if (nextProps.open !== this.props.open) {\n this.startOpen = !!nextProps.open && !!nextProps.isAnimation\n this.toggleWithAnimation()\n }\n }\n\n public render(): JSX.Element {\n const { customStyle, className, title, icon, hasBorder, open, note } =\n this.props\n const { wrapperHeight } = this.state\n\n const rootCls = classNames('at-accordion', className)\n const prefixClass = (icon && icon.prefixClass) || 'at-icon'\n const iconCls = classNames({\n [prefixClass]: true,\n [`${prefixClass}-${icon && icon.value}`]: icon && icon.value,\n 'at-accordion__icon': true\n })\n const headerCls = classNames('at-accordion__header', {\n 'at-accordion__header--noborder': !hasBorder\n })\n const arrowCls = classNames('at-accordion__arrow', {\n 'at-accordion__arrow--folded': !!open\n })\n const contentCls = classNames('at-accordion__content', {\n 'at-accordion__content--inactive':\n (!open && this.isCompleted) || this.startOpen\n })\n const iconStyle = {\n color: (icon && icon.color) || '',\n fontSize: (icon && `${icon.size}px`) || ''\n }\n const contentStyle = { height: `${wrapperHeight}px` }\n\n if (this.isCompleted) {\n contentStyle.height = ''\n }\n\n const { componentId } = this.state\n\n return (\n <View className={rootCls} style={customStyle}>\n <View className={headerCls} onClick={this.handleClick}>\n {icon && icon.value && (\n <Text className={iconCls} style={iconStyle}></Text>\n )}\n <View className='at-accordion__info'>\n <View className='at-accordion__info__title'>{title}</View>\n <View className='at-accordion__info__note'>{note}</View>\n </View>\n <View className={arrowCls}>\n <Text className='at-icon at-icon-chevron-down'></Text>\n </View>\n </View>\n <View style={contentStyle} className={contentCls}>\n <View\n id={`at-accordion__body-${componentId}`}\n className='at-accordion__body'\n >\n {this.props.children}\n </View>\n </View>\n </View>\n )\n }\n}\n\nAtAccordion.defaultProps = {\n open: false,\n customStyle: '',\n className: '',\n title: '',\n note: '',\n icon: { value: '' },\n hasBorder: true,\n isAnimation: true\n}\n\nAtAccordion.propTypes = {\n customStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),\n className: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),\n open: PropTypes.bool,\n isAnimation: PropTypes.bool,\n title: PropTypes.string,\n note: PropTypes.string,\n icon: PropTypes.object,\n hasBorder: PropTypes.bool,\n onClick: PropTypes.func\n}\n"],"mappings":"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","names":[]}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import React from
|
|
3
|
-
import { View } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { View } from "@tarojs/components";
|
|
4
|
+
class AtActionSheetBody extends React.Component {
|
|
5
|
+
render() {
|
|
6
|
+
const rootClass = classNames("at-action-sheet__body", this.props.className);
|
|
7
|
+
return /* @__PURE__ */ React.createElement(View, { className: rootClass }, this.props.children);
|
|
8
|
+
}
|
|
9
9
|
}
|
|
10
|
+
export {
|
|
11
|
+
AtActionSheetBody as default
|
|
12
|
+
};
|
|
10
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/action-sheet/body/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport React from 'react'\nimport { View } from '@tarojs/components'\nimport { AtActionSheetBodyProps } from '../../../../types/action-sheet'\n\nexport default class AtActionSheetBody extends React.Component<AtActionSheetBodyProps> {\n public render(): JSX.Element {\n const rootClass = classNames('at-action-sheet__body', this.props.className)\n return <View className={rootClass}>{this.props.children}</View>\n }\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,OAAO,WAAW;AAClB,SAAS,YAAY;AAGrB,MAAO,0BAAwC,MAAM,UAAkC;AAAA,EAC9E,SAAsB;AAC3B,UAAM,YAAY,WAAW,yBAAyB,KAAK,MAAM,SAAS;AAC1E,WAAO,oCAAC,QAAK,WAAW,aAAY,KAAK,MAAM,QAAS;AAAA,EAC1D;AACF;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InferProps } from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AtActionSheetItemProps } from '../../../../../types/action-sheet';
|
|
4
|
+
export default class AtActionSheetItem extends React.Component<AtActionSheetItemProps> {
|
|
5
|
+
static defaultProps: AtActionSheetItemProps;
|
|
6
|
+
static propTypes: InferProps<AtActionSheetItemProps>;
|
|
7
|
+
private handleClick;
|
|
8
|
+
render(): JSX.Element;
|
|
9
|
+
}
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import React from
|
|
4
|
-
import { View } from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { View } from "@tarojs/components";
|
|
5
|
+
class AtActionSheetItem extends React.Component {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.handleClick = (args) => {
|
|
9
|
+
if (typeof this.props.onClick === "function") {
|
|
10
|
+
this.props.onClick(args);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const rootClass = classNames("at-action-sheet__item", this.props.className);
|
|
16
|
+
return /* @__PURE__ */ React.createElement(View, { className: rootClass, onClick: this.handleClick }, this.props.children);
|
|
17
|
+
}
|
|
18
18
|
}
|
|
19
19
|
AtActionSheetItem.propTypes = {
|
|
20
|
-
|
|
20
|
+
onClick: PropTypes.func
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
AtActionSheetItem as default
|
|
21
24
|
};
|
|
22
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/action-sheet/body/item/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport PropTypes, { InferProps } from 'prop-types'\nimport React from 'react'\nimport { View } from '@tarojs/components'\nimport { AtActionSheetItemProps } from '../../../../../types/action-sheet'\n\nexport default class AtActionSheetItem extends React.Component<AtActionSheetItemProps> {\n public static defaultProps: AtActionSheetItemProps\n public static propTypes: InferProps<AtActionSheetItemProps>\n\n private handleClick = (args: any): void => {\n if (typeof this.props.onClick === 'function') {\n this.props.onClick(args)\n }\n }\n\n public render(): JSX.Element {\n const rootClass = classNames('at-action-sheet__item', this.props.className)\n\n return (\n <View className={rootClass} onClick={this.handleClick}>\n {this.props.children}\n </View>\n )\n }\n}\n\nAtActionSheetItem.propTypes = {\n onClick: PropTypes.func\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,OAAO,eAA+B;AACtC,OAAO,WAAW;AAClB,SAAS,YAAY;AAGrB,MAAO,0BAAwC,MAAM,UAAkC;AAAA,EAAvF;AAAA;AAIE,SAAQ,cAAc,CAAC,SAAoB;AACzC,UAAI,OAAO,KAAK,MAAM,YAAY,YAAY;AAC5C,aAAK,MAAM,QAAQ,IAAI;AAAA,MACzB;AAAA,IACF;AAAA;AAAA,EAEO,SAAsB;AAC3B,UAAM,YAAY,WAAW,yBAAyB,KAAK,MAAM,SAAS;AAE1E,WACE,oCAAC,QAAK,WAAW,WAAW,SAAS,KAAK,eACvC,KAAK,MAAM,QACd;AAAA,EAEJ;AACF;AAEA,kBAAkB,YAAY;AAAA,EAC5B,SAAS,UAAU;AACrB;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InferProps } from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AtActionSheetFooterProps } from '../../../../types/action-sheet';
|
|
4
|
+
export default class AtActionSheetFooter extends React.Component<AtActionSheetFooterProps> {
|
|
5
|
+
static defaultProps: AtActionSheetFooterProps;
|
|
6
|
+
static propTypes: InferProps<AtActionSheetFooterProps>;
|
|
7
|
+
private handleClick;
|
|
8
|
+
render(): JSX.Element;
|
|
9
|
+
}
|
|
@@ -1,22 +1,28 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import React from
|
|
4
|
-
import { View } from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { View } from "@tarojs/components";
|
|
5
|
+
class AtActionSheetFooter extends React.Component {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.handleClick = (...args) => {
|
|
9
|
+
if (typeof this.props.onClick === "function") {
|
|
10
|
+
this.props.onClick(...args);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const rootClass = classNames(
|
|
16
|
+
"at-action-sheet__footer",
|
|
17
|
+
this.props.className
|
|
18
|
+
);
|
|
19
|
+
return /* @__PURE__ */ React.createElement(View, { onClick: this.handleClick, className: rootClass }, this.props.children);
|
|
20
|
+
}
|
|
18
21
|
}
|
|
19
22
|
AtActionSheetFooter.propTypes = {
|
|
20
|
-
|
|
23
|
+
onClick: PropTypes.func
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
AtActionSheetFooter as default
|
|
21
27
|
};
|
|
22
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/action-sheet/footer/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport PropTypes, { InferProps } from 'prop-types'\nimport React from 'react'\nimport { View } from '@tarojs/components'\nimport { AtActionSheetFooterProps } from '../../../../types/action-sheet'\n\nexport default class AtActionSheetFooter extends React.Component<AtActionSheetFooterProps> {\n public static defaultProps: AtActionSheetFooterProps\n public static propTypes: InferProps<AtActionSheetFooterProps>\n\n private handleClick = (...args: any[]): void => {\n if (typeof this.props.onClick === 'function') {\n this.props.onClick(...args)\n }\n }\n\n public render(): JSX.Element {\n const rootClass = classNames(\n 'at-action-sheet__footer',\n this.props.className\n )\n\n return (\n <View onClick={this.handleClick} className={rootClass}>\n {this.props.children}\n </View>\n )\n }\n}\n\nAtActionSheetFooter.propTypes = {\n onClick: PropTypes.func\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,OAAO,eAA+B;AACtC,OAAO,WAAW;AAClB,SAAS,YAAY;AAGrB,MAAO,4BAA0C,MAAM,UAAoC;AAAA,EAA3F;AAAA;AAIE,SAAQ,cAAc,IAAI,SAAsB;AAC9C,UAAI,OAAO,KAAK,MAAM,YAAY,YAAY;AAC5C,aAAK,MAAM,QAAQ,GAAG,IAAI;AAAA,MAC5B;AAAA,IACF;AAAA;AAAA,EAEO,SAAsB;AAC3B,UAAM,YAAY;AAAA,MAChB;AAAA,MACA,KAAK,MAAM;AAAA,IACb;AAEA,WACE,oCAAC,QAAK,SAAS,KAAK,aAAa,WAAW,aACzC,KAAK,MAAM,QACd;AAAA,EAEJ;AACF;AAEA,oBAAoB,YAAY;AAAA,EAC9B,SAAS,UAAU;AACrB;","names":[]}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import React from
|
|
3
|
-
import { View } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { View } from "@tarojs/components";
|
|
4
|
+
class AtActionSheetHeader extends React.Component {
|
|
5
|
+
render() {
|
|
6
|
+
const rootClass = classNames(
|
|
7
|
+
"at-action-sheet__header",
|
|
8
|
+
this.props.className
|
|
9
|
+
);
|
|
10
|
+
return /* @__PURE__ */ React.createElement(View, { className: rootClass }, this.props.children);
|
|
11
|
+
}
|
|
9
12
|
}
|
|
13
|
+
export {
|
|
14
|
+
AtActionSheetHeader as default
|
|
15
|
+
};
|
|
10
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/action-sheet/header/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport React from 'react'\nimport { View } from '@tarojs/components'\nimport { AtActionSheetHeaderProps } from '../../../../types/action-sheet'\n\nexport default class AtActionSheetHeader extends React.Component<AtActionSheetHeaderProps> {\n public render(): JSX.Element {\n const rootClass = classNames(\n 'at-action-sheet__header',\n this.props.className\n )\n\n return <View className={rootClass}>{this.props.children}</View>\n }\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,OAAO,WAAW;AAClB,SAAS,YAAY;AAGrB,MAAO,4BAA0C,MAAM,UAAoC;AAAA,EAClF,SAAsB;AAC3B,UAAM,YAAY;AAAA,MAChB;AAAA,MACA,KAAK,MAAM;AAAA,IACb;AAEA,WAAO,oCAAC,QAAK,WAAW,aAAY,KAAK,MAAM,QAAS;AAAA,EAC1D;AACF;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InferProps } from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AtActionSheetProps, AtActionSheetState } from '../../../types/action-sheet';
|
|
4
|
+
export default class AtActionSheet extends React.Component<AtActionSheetProps, AtActionSheetState> {
|
|
5
|
+
static defaultProps: AtActionSheetProps;
|
|
6
|
+
static propTypes: InferProps<AtActionSheetProps>;
|
|
7
|
+
constructor(props: AtActionSheetProps);
|
|
8
|
+
UNSAFE_componentWillReceiveProps(nextProps: AtActionSheetProps): void;
|
|
9
|
+
private handleClose;
|
|
10
|
+
private handleCancel;
|
|
11
|
+
private close;
|
|
12
|
+
private handleTouchMove;
|
|
13
|
+
render(): JSX.Element;
|
|
14
|
+
}
|