taro-ui 3.3.0 → 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/LICENSE +21 -0
- 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 -50
- 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/curtain.scss +3 -3
- 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/{dist → lib}/style/components/range.scss +2 -2
- package/{dist → lib}/style/components/toast.scss +1 -1
- 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 +45 -48
- 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/README.md +0 -85
- package/dist/index.esm.js +0 -8407
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js +0 -8468
- 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/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/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/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,16 +1,11 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { View } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
React.createElement(View, { className: 'header__flex-item' }, "\u65E5"),
|
|
8
|
-
React.createElement(View, { className: 'header__flex-item' }, "\u4E00"),
|
|
9
|
-
React.createElement(View, { className: 'header__flex-item' }, "\u4E8C"),
|
|
10
|
-
React.createElement(View, { className: 'header__flex-item' }, "\u4E09"),
|
|
11
|
-
React.createElement(View, { className: 'header__flex-item' }, "\u56DB"),
|
|
12
|
-
React.createElement(View, { className: 'header__flex-item' }, "\u4E94"),
|
|
13
|
-
React.createElement(View, { className: 'header__flex-item' }, "\u516D"))));
|
|
14
|
-
}
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "@tarojs/components";
|
|
3
|
+
class AtCalendarHeader extends React.Component {
|
|
4
|
+
render() {
|
|
5
|
+
return /* @__PURE__ */ React.createElement(View, { className: "at-calendar__header header" }, /* @__PURE__ */ React.createElement(View, { className: "header__flex" }, /* @__PURE__ */ React.createElement(View, { className: "header__flex-item" }, "\u65E5"), /* @__PURE__ */ React.createElement(View, { className: "header__flex-item" }, "\u4E00"), /* @__PURE__ */ React.createElement(View, { className: "header__flex-item" }, "\u4E8C"), /* @__PURE__ */ React.createElement(View, { className: "header__flex-item" }, "\u4E09"), /* @__PURE__ */ React.createElement(View, { className: "header__flex-item" }, "\u56DB"), /* @__PURE__ */ React.createElement(View, { className: "header__flex-item" }, "\u4E94"), /* @__PURE__ */ React.createElement(View, { className: "header__flex-item" }, "\u516D")));
|
|
6
|
+
}
|
|
15
7
|
}
|
|
8
|
+
export {
|
|
9
|
+
AtCalendarHeader as default
|
|
10
|
+
};
|
|
16
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/calendar/ui/day-list/index.tsx"],"sourcesContent":["import React from 'react'\nimport { View } from '@tarojs/components'\n\nexport default class AtCalendarHeader extends React.Component {\n public render(): JSX.Element {\n return (\n <View className='at-calendar__header header'>\n <View className='header__flex'>\n <View className='header__flex-item'>日</View>\n <View className='header__flex-item'>一</View>\n <View className='header__flex-item'>二</View>\n <View className='header__flex-item'>三</View>\n <View className='header__flex-item'>四</View>\n <View className='header__flex-item'>五</View>\n <View className='header__flex-item'>六</View>\n </View>\n </View>\n )\n }\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAClB,SAAS,YAAY;AAErB,MAAO,yBAAuC,MAAM,UAAU;AAAA,EACrD,SAAsB;AAC3B,WACE,oCAAC,QAAK,WAAU,gCACd,oCAAC,QAAK,WAAU,kBACd,oCAAC,QAAK,WAAU,uBAAoB,QAAC,GACrC,oCAAC,QAAK,WAAU,uBAAoB,QAAC,GACrC,oCAAC,QAAK,WAAU,uBAAoB,QAAC,GACrC,oCAAC,QAAK,WAAU,uBAAoB,QAAC,GACrC,oCAAC,QAAK,WAAU,uBAAoB,QAAC,GACrC,oCAAC,QAAK,WAAU,uBAAoB,QAAC,GACrC,oCAAC,QAAK,WAAU,uBAAoB,QAAC,CACvC,CACF;AAAA,EAEJ;AACF;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InferProps } from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AtCardProps } from '../../../types/card';
|
|
4
|
+
export default class AtCard extends React.Component<AtCardProps> {
|
|
5
|
+
static defaultProps: AtCardProps;
|
|
6
|
+
static propTypes: InferProps<AtCardProps>;
|
|
7
|
+
private handleClick;
|
|
8
|
+
render(): JSX.Element;
|
|
9
|
+
}
|
|
@@ -1,59 +1,80 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
render() {
|
|
15
|
-
const { title, note, extra, extraStyle, thumb, isFull, icon, renderIcon } = this.props;
|
|
16
|
-
const rootClass = classNames('at-card', {
|
|
17
|
-
'at-card--full': isFull
|
|
18
|
-
}, this.props.className);
|
|
19
|
-
const iconClass = classNames({
|
|
20
|
-
'at-icon': true,
|
|
21
|
-
[`at-icon-${icon && icon.value}`]: icon && icon.value,
|
|
22
|
-
'at-card__header-icon': true
|
|
23
|
-
});
|
|
24
|
-
const iconStyle = {
|
|
25
|
-
color: (icon && icon.color) || '',
|
|
26
|
-
fontSize: (icon && `${icon.size}px`) || ''
|
|
27
|
-
};
|
|
28
|
-
return (React.createElement(View, { onClick: this.handleClick, className: rootClass },
|
|
29
|
-
React.createElement(View, { className: 'at-card__header' },
|
|
30
|
-
thumb && (React.createElement(View, { className: 'at-card__header-thumb' },
|
|
31
|
-
React.createElement(Image, { className: 'at-card__header-thumb-info', mode: 'scaleToFill', src: thumb }))),
|
|
32
|
-
renderIcon || '',
|
|
33
|
-
!thumb && icon && icon.value && (React.createElement(Text, { className: iconClass, style: iconStyle })),
|
|
34
|
-
React.createElement(Text, { className: 'at-card__header-title' }, title),
|
|
35
|
-
extra && (React.createElement(View, { style: Object.assign({}, extraStyle), className: 'at-card__header-extra' }, extra))),
|
|
36
|
-
React.createElement(View, { className: 'at-card__content' },
|
|
37
|
-
React.createElement(View, { className: 'at-card__content-info' }, this.props.children),
|
|
38
|
-
note && React.createElement(View, { className: 'at-card__content-note' }, note))));
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
39
14
|
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
import classNames from "classnames";
|
|
18
|
+
import PropTypes from "prop-types";
|
|
19
|
+
import React from "react";
|
|
20
|
+
import { Image, Text, View } from "@tarojs/components";
|
|
21
|
+
class AtCard extends React.Component {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.handleClick = (args) => {
|
|
25
|
+
if (typeof this.props.onClick === "function") {
|
|
26
|
+
this.props.onClick(args);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
const { title, note, extra, extraStyle, thumb, isFull, icon, renderIcon } = this.props;
|
|
32
|
+
const rootClass = classNames(
|
|
33
|
+
"at-card",
|
|
34
|
+
{
|
|
35
|
+
"at-card--full": isFull
|
|
36
|
+
},
|
|
37
|
+
this.props.className
|
|
38
|
+
);
|
|
39
|
+
const iconClass = classNames({
|
|
40
|
+
"at-icon": true,
|
|
41
|
+
[`at-icon-${icon && icon.value}`]: icon && icon.value,
|
|
42
|
+
"at-card__header-icon": true
|
|
43
|
+
});
|
|
44
|
+
const iconStyle = {
|
|
45
|
+
color: icon && icon.color || "",
|
|
46
|
+
fontSize: icon && `${icon.size}px` || ""
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ React.createElement(View, { onClick: this.handleClick, className: rootClass }, /* @__PURE__ */ React.createElement(View, { className: "at-card__header" }, thumb && /* @__PURE__ */ React.createElement(View, { className: "at-card__header-thumb" }, /* @__PURE__ */ React.createElement(
|
|
49
|
+
Image,
|
|
50
|
+
{
|
|
51
|
+
className: "at-card__header-thumb-info",
|
|
52
|
+
mode: "scaleToFill",
|
|
53
|
+
src: thumb
|
|
54
|
+
}
|
|
55
|
+
)), renderIcon || "", !thumb && icon && icon.value && /* @__PURE__ */ React.createElement(Text, { className: iconClass, style: iconStyle }), /* @__PURE__ */ React.createElement(Text, { className: "at-card__header-title" }, title), extra && /* @__PURE__ */ React.createElement(View, { style: __spreadValues({}, extraStyle), className: "at-card__header-extra" }, extra)), /* @__PURE__ */ React.createElement(View, { className: "at-card__content" }, /* @__PURE__ */ React.createElement(View, { className: "at-card__content-info" }, this.props.children), note && /* @__PURE__ */ React.createElement(View, { className: "at-card__content-note" }, note)));
|
|
56
|
+
}
|
|
40
57
|
}
|
|
41
58
|
AtCard.defaultProps = {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
59
|
+
note: "",
|
|
60
|
+
isFull: false,
|
|
61
|
+
thumb: "",
|
|
62
|
+
title: "",
|
|
63
|
+
extraStyle: {}
|
|
47
64
|
};
|
|
48
65
|
AtCard.propTypes = {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
66
|
+
note: PropTypes.string,
|
|
67
|
+
isFull: PropTypes.bool,
|
|
68
|
+
thumb: PropTypes.string,
|
|
69
|
+
title: PropTypes.string,
|
|
70
|
+
extra: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
71
|
+
icon: PropTypes.object,
|
|
72
|
+
onClick: PropTypes.func,
|
|
73
|
+
renderIcon: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
74
|
+
extraStyle: PropTypes.object
|
|
75
|
+
// 自定义extra样式
|
|
76
|
+
};
|
|
77
|
+
export {
|
|
78
|
+
AtCard as default
|
|
58
79
|
};
|
|
59
80
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/card/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport PropTypes, { InferProps } from 'prop-types'\nimport React from 'react'\nimport { Image, Text, View } from '@tarojs/components'\nimport { AtCardProps } from '../../../types/card'\n\nexport default class AtCard extends React.Component<AtCardProps> {\n public static defaultProps: AtCardProps\n public static propTypes: InferProps<AtCardProps>\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 { title, note, extra, extraStyle, thumb, isFull, icon, renderIcon } =\n this.props\n\n const rootClass = classNames(\n 'at-card',\n {\n 'at-card--full': isFull\n },\n this.props.className\n )\n const iconClass = classNames({\n 'at-icon': true,\n [`at-icon-${icon && icon.value}`]: icon && icon.value,\n 'at-card__header-icon': true\n })\n\n const iconStyle = {\n color: (icon && icon.color) || '',\n fontSize: (icon && `${icon.size}px`) || ''\n }\n\n return (\n <View onClick={this.handleClick} className={rootClass}>\n <View className='at-card__header'>\n {thumb && (\n <View className='at-card__header-thumb'>\n <Image\n className='at-card__header-thumb-info'\n mode='scaleToFill'\n src={thumb}\n />\n </View>\n )}\n {renderIcon || ''}\n {!thumb && icon && icon.value && (\n <Text className={iconClass} style={iconStyle}></Text>\n )}\n\n <Text className='at-card__header-title'>{title}</Text>\n {extra && (\n <View style={{ ...extraStyle }} className='at-card__header-extra'>\n {extra}\n </View>\n )}\n </View>\n <View className='at-card__content'>\n <View className='at-card__content-info'>{this.props.children}</View>\n {note && <View className='at-card__content-note'>{note}</View>}\n </View>\n </View>\n )\n }\n}\n\nAtCard.defaultProps = {\n note: '',\n isFull: false,\n thumb: '',\n title: '',\n extraStyle: {}\n}\n\nAtCard.propTypes = {\n note: PropTypes.string,\n isFull: PropTypes.bool,\n thumb: PropTypes.string,\n title: PropTypes.string,\n extra: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n icon: PropTypes.object,\n onClick: PropTypes.func,\n renderIcon: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n extraStyle: PropTypes.object // 自定义extra样式\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO,gBAAgB;AACvB,OAAO,eAA+B;AACtC,OAAO,WAAW;AAClB,SAAS,OAAO,MAAM,YAAY;AAGlC,MAAO,eAA6B,MAAM,UAAuB;AAAA,EAAjE;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,EAAE,OAAO,MAAM,OAAO,YAAY,OAAO,QAAQ,MAAM,WAAW,IACtE,KAAK;AAEP,UAAM,YAAY;AAAA,MAChB;AAAA,MACA;AAAA,QACE,iBAAiB;AAAA,MACnB;AAAA,MACA,KAAK,MAAM;AAAA,IACb;AACA,UAAM,YAAY,WAAW;AAAA,MAC3B,WAAW;AAAA,MACX,CAAC,WAAW,QAAQ,KAAK,KAAK,EAAE,GAAG,QAAQ,KAAK;AAAA,MAChD,wBAAwB;AAAA,IAC1B,CAAC;AAED,UAAM,YAAY;AAAA,MAChB,OAAQ,QAAQ,KAAK,SAAU;AAAA,MAC/B,UAAW,QAAQ,GAAG,KAAK,IAAI,QAAS;AAAA,IAC1C;AAEA,WACE,oCAAC,QAAK,SAAS,KAAK,aAAa,WAAW,aAC1C,oCAAC,QAAK,WAAU,qBACb,SACC,oCAAC,QAAK,WAAU,2BACd;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,MAAK;AAAA,QACL,KAAK;AAAA;AAAA,IACP,CACF,GAED,cAAc,IACd,CAAC,SAAS,QAAQ,KAAK,SACtB,oCAAC,QAAK,WAAW,WAAW,OAAO,WAAW,GAGhD,oCAAC,QAAK,WAAU,2BAAyB,KAAM,GAC9C,SACC,oCAAC,QAAK,OAAO,mBAAK,aAAc,WAAU,2BACvC,KACH,CAEJ,GACA,oCAAC,QAAK,WAAU,sBACd,oCAAC,QAAK,WAAU,2BAAyB,KAAK,MAAM,QAAS,GAC5D,QAAQ,oCAAC,QAAK,WAAU,2BAAyB,IAAK,CACzD,CACF;AAAA,EAEJ;AACF;AAEA,OAAO,eAAe;AAAA,EACpB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AAAA,EACP,YAAY,CAAC;AACf;AAEA,OAAO,YAAY;AAAA,EACjB,MAAM,UAAU;AAAA,EAChB,QAAQ,UAAU;AAAA,EAClB,OAAO,UAAU;AAAA,EACjB,OAAO,UAAU;AAAA,EACjB,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,OAAO,CAAC;AAAA,EAChE,MAAM,UAAU;AAAA,EAChB,SAAS,UAAU;AAAA,EACnB,YAAY,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,OAAO,CAAC;AAAA,EACrE,YAAY,UAAU;AAAA;AACxB;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InferProps } from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AtCheckboxProps } from '../../../types/checkbox';
|
|
4
|
+
export default class AtCheckbox extends React.Component<AtCheckboxProps<any>> {
|
|
5
|
+
static defaultProps: AtCheckboxProps<any>;
|
|
6
|
+
static propTypes: InferProps<AtCheckboxProps<any>>;
|
|
7
|
+
private handleClick;
|
|
8
|
+
render(): JSX.Element;
|
|
9
|
+
}
|
|
@@ -1,55 +1,59 @@
|
|
|
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
|
-
else {
|
|
17
|
-
selectedSet.delete(value);
|
|
18
|
-
}
|
|
19
|
-
this.props.onChange([...selectedSet]);
|
|
20
|
-
}
|
|
21
|
-
render() {
|
|
22
|
-
const { customStyle, className, options, selectedList } = this.props;
|
|
23
|
-
const rootCls = classNames('at-checkbox', className);
|
|
24
|
-
return (React.createElement(View, { className: rootCls, style: customStyle }, options.map((option, idx) => {
|
|
25
|
-
const { value, disabled, label, desc } = option;
|
|
26
|
-
const optionCls = classNames('at-checkbox__option', {
|
|
27
|
-
'at-checkbox__option--disabled': disabled,
|
|
28
|
-
'at-checkbox__option--selected': selectedList.includes(value)
|
|
29
|
-
});
|
|
30
|
-
return (React.createElement(View, { className: optionCls, key: value, onClick: this.handleClick.bind(this, idx) },
|
|
31
|
-
React.createElement(View, { className: 'at-checkbox__option-wrap' },
|
|
32
|
-
React.createElement(View, { className: 'at-checkbox__option-cnt' },
|
|
33
|
-
React.createElement(View, { className: 'at-checkbox__icon-cnt' },
|
|
34
|
-
React.createElement(Text, { className: 'at-icon at-icon-check' })),
|
|
35
|
-
React.createElement(View, { className: 'at-checkbox__title' }, label)),
|
|
36
|
-
desc && React.createElement(View, { className: 'at-checkbox__desc' }, desc))));
|
|
37
|
-
})));
|
|
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 AtCheckbox extends React.Component {
|
|
6
|
+
handleClick(idx) {
|
|
7
|
+
const { selectedList, options } = this.props;
|
|
8
|
+
const option = options[idx];
|
|
9
|
+
const { disabled, value } = option;
|
|
10
|
+
if (disabled) return;
|
|
11
|
+
const selectedSet = new Set(selectedList);
|
|
12
|
+
if (!selectedSet.has(value)) {
|
|
13
|
+
selectedSet.add(value);
|
|
14
|
+
} else {
|
|
15
|
+
selectedSet.delete(value);
|
|
38
16
|
}
|
|
17
|
+
this.props.onChange([...selectedSet]);
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
const { customStyle, className, options, selectedList } = this.props;
|
|
21
|
+
const rootCls = classNames("at-checkbox", className);
|
|
22
|
+
return /* @__PURE__ */ React.createElement(View, { className: rootCls, style: customStyle }, options.map((option, idx) => {
|
|
23
|
+
const { value, disabled, label, desc } = option;
|
|
24
|
+
const optionCls = classNames("at-checkbox__option", {
|
|
25
|
+
"at-checkbox__option--disabled": disabled,
|
|
26
|
+
"at-checkbox__option--selected": selectedList.includes(value)
|
|
27
|
+
});
|
|
28
|
+
return /* @__PURE__ */ React.createElement(
|
|
29
|
+
View,
|
|
30
|
+
{
|
|
31
|
+
className: optionCls,
|
|
32
|
+
key: value,
|
|
33
|
+
onClick: this.handleClick.bind(this, idx)
|
|
34
|
+
},
|
|
35
|
+
/* @__PURE__ */ React.createElement(View, { className: "at-checkbox__option-wrap" }, /* @__PURE__ */ React.createElement(View, { className: "at-checkbox__option-cnt" }, /* @__PURE__ */ React.createElement(View, { className: "at-checkbox__icon-cnt" }, /* @__PURE__ */ React.createElement(Text, { className: "at-icon at-icon-check" })), /* @__PURE__ */ React.createElement(View, { className: "at-checkbox__title" }, label)), desc && /* @__PURE__ */ React.createElement(View, { className: "at-checkbox__desc" }, desc))
|
|
36
|
+
);
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
39
|
}
|
|
40
40
|
AtCheckbox.defaultProps = {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
customStyle: "",
|
|
42
|
+
className: "",
|
|
43
|
+
options: [],
|
|
44
|
+
selectedList: [],
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
46
|
+
onChange: () => {
|
|
47
|
+
}
|
|
47
48
|
};
|
|
48
49
|
AtCheckbox.propTypes = {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
customStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
51
|
+
className: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),
|
|
52
|
+
options: PropTypes.array,
|
|
53
|
+
selectedList: PropTypes.array,
|
|
54
|
+
onChange: PropTypes.func
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
AtCheckbox as default
|
|
54
58
|
};
|
|
55
59
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/checkbox/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport PropTypes, { InferProps } from 'prop-types'\nimport React from 'react'\nimport { Text, View } from '@tarojs/components'\nimport { AtCheckboxProps } from '../../../types/checkbox'\n\nexport default class AtCheckbox extends React.Component<AtCheckboxProps<any>> {\n public static defaultProps: AtCheckboxProps<any>\n public static propTypes: InferProps<AtCheckboxProps<any>>\n\n private handleClick(idx: number): void {\n const { selectedList, options } = this.props\n const option = options[idx]\n const { disabled, value } = option\n if (disabled) return\n\n const selectedSet = new Set(selectedList)\n if (!selectedSet.has(value)) {\n selectedSet.add(value)\n } else {\n selectedSet.delete(value)\n }\n this.props.onChange([...selectedSet])\n }\n\n public render(): JSX.Element {\n const { customStyle, className, options, selectedList } = this.props\n\n const rootCls = classNames('at-checkbox', className)\n\n return (\n <View className={rootCls} style={customStyle}>\n {options.map((option, idx) => {\n const { value, disabled, label, desc } = option\n const optionCls = classNames('at-checkbox__option', {\n 'at-checkbox__option--disabled': disabled,\n 'at-checkbox__option--selected': selectedList.includes(value)\n })\n\n return (\n <View\n className={optionCls}\n key={value}\n onClick={this.handleClick.bind(this, idx)}\n >\n <View className='at-checkbox__option-wrap'>\n <View className='at-checkbox__option-cnt'>\n <View className='at-checkbox__icon-cnt'>\n <Text className='at-icon at-icon-check'></Text>\n </View>\n <View className='at-checkbox__title'>{label}</View>\n </View>\n {desc && <View className='at-checkbox__desc'>{desc}</View>}\n </View>\n </View>\n )\n })}\n </View>\n )\n }\n}\n\nAtCheckbox.defaultProps = {\n customStyle: '',\n className: '',\n options: [],\n selectedList: [],\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onChange: (): void => {}\n}\n\nAtCheckbox.propTypes = {\n customStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),\n className: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),\n options: PropTypes.array,\n selectedList: PropTypes.array,\n onChange: PropTypes.func\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,OAAO,eAA+B;AACtC,OAAO,WAAW;AAClB,SAAS,MAAM,YAAY;AAG3B,MAAO,mBAAiC,MAAM,UAAgC;AAAA,EAIpE,YAAY,KAAmB;AACrC,UAAM,EAAE,cAAc,QAAQ,IAAI,KAAK;AACvC,UAAM,SAAS,QAAQ,GAAG;AAC1B,UAAM,EAAE,UAAU,MAAM,IAAI;AAC5B,QAAI,SAAU;AAEd,UAAM,cAAc,IAAI,IAAI,YAAY;AACxC,QAAI,CAAC,YAAY,IAAI,KAAK,GAAG;AAC3B,kBAAY,IAAI,KAAK;AAAA,IACvB,OAAO;AACL,kBAAY,OAAO,KAAK;AAAA,IAC1B;AACA,SAAK,MAAM,SAAS,CAAC,GAAG,WAAW,CAAC;AAAA,EACtC;AAAA,EAEO,SAAsB;AAC3B,UAAM,EAAE,aAAa,WAAW,SAAS,aAAa,IAAI,KAAK;AAE/D,UAAM,UAAU,WAAW,eAAe,SAAS;AAEnD,WACE,oCAAC,QAAK,WAAW,SAAS,OAAO,eAC9B,QAAQ,IAAI,CAAC,QAAQ,QAAQ;AAC5B,YAAM,EAAE,OAAO,UAAU,OAAO,KAAK,IAAI;AACzC,YAAM,YAAY,WAAW,uBAAuB;AAAA,QAClD,iCAAiC;AAAA,QACjC,iCAAiC,aAAa,SAAS,KAAK;AAAA,MAC9D,CAAC;AAED,aACE;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,UACX,KAAK;AAAA,UACL,SAAS,KAAK,YAAY,KAAK,MAAM,GAAG;AAAA;AAAA,QAExC,oCAAC,QAAK,WAAU,8BACd,oCAAC,QAAK,WAAU,6BACd,oCAAC,QAAK,WAAU,2BACd,oCAAC,QAAK,WAAU,yBAAwB,CAC1C,GACA,oCAAC,QAAK,WAAU,wBAAsB,KAAM,CAC9C,GACC,QAAQ,oCAAC,QAAK,WAAU,uBAAqB,IAAK,CACrD;AAAA,MACF;AAAA,IAEJ,CAAC,CACH;AAAA,EAEJ;AACF;AAEA,WAAW,eAAe;AAAA,EACxB,aAAa;AAAA,EACb,WAAW;AAAA,EACX,SAAS,CAAC;AAAA,EACV,cAAc,CAAC;AAAA;AAAA,EAEf,UAAU,MAAY;AAAA,EAAC;AACzB;AAEA,WAAW,YAAY;AAAA,EACrB,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,cAAc,UAAU;AAAA,EACxB,UAAU,UAAU;AACtB;","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { InferProps } from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AtCountDownProps, AtCountdownState } from '../../../types/countdown';
|
|
4
|
+
export default class AtCountdown extends React.Component<AtCountDownProps, AtCountdownState> {
|
|
5
|
+
static defaultProps: AtCountDownProps;
|
|
6
|
+
static propTypes: InferProps<AtCountDownProps>;
|
|
7
|
+
private seconds;
|
|
8
|
+
private timer;
|
|
9
|
+
constructor(props: AtCountDownProps);
|
|
10
|
+
private setTimer;
|
|
11
|
+
private clearTimer;
|
|
12
|
+
private calculateTime;
|
|
13
|
+
private countdonwn;
|
|
14
|
+
UNSAFE_componentWillReceiveProps(nextProps: AtCountDownProps): void;
|
|
15
|
+
componentDidMount(): void;
|
|
16
|
+
componentWillUnmount(): void;
|
|
17
|
+
componentDidHide(): void;
|
|
18
|
+
componentDidShow(): void;
|
|
19
|
+
render(): JSX.Element;
|
|
20
|
+
}
|