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 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/divider/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport PropTypes, { InferProps } from 'prop-types'\nimport React from 'react'\nimport { View } from '@tarojs/components'\nimport { AtDividerProps } from '../../../types/divider'\nimport { mergeStyle, pxTransform } from '../../common/utils'\n\nexport default class AtDivider extends React.Component<AtDividerProps> {\n public static defaultProps: AtDividerProps\n public static propTypes: InferProps<AtDividerProps>\n\n public render(): JSX.Element {\n const {\n className,\n customStyle,\n content,\n height,\n fontColor,\n fontSize,\n lineColor\n } = this.props\n\n const rootStyle = {\n height: height ? `${pxTransform(Number(height))}` : ''\n }\n\n const fontStyle = {\n color: fontColor,\n fontSize: fontSize ? `${pxTransform(Number(fontSize))}` : ''\n }\n\n const lineStyle: React.CSSProperties = {\n backgroundColor: lineColor\n }\n\n return (\n <View\n className={classNames('at-divider', className)}\n style={mergeStyle(rootStyle, customStyle as object)}\n >\n <View className='at-divider__content' style={fontStyle}>\n {content === '' ? this.props.children : content}\n </View>\n <View className='at-divider__line' style={lineStyle}></View>\n </View>\n )\n }\n}\n\nAtDivider.defaultProps = {\n content: '',\n height: 0,\n fontColor: '',\n fontSize: 0,\n lineColor: ''\n}\n\nAtDivider.propTypes = {\n customStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),\n className: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),\n content: PropTypes.string,\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n fontColor: PropTypes.string,\n fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n lineColor: PropTypes.string\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,OAAO,eAA+B;AACtC,OAAO,WAAW;AAClB,SAAS,YAAY;AAErB,SAAS,YAAY,mBAAmB;AAExC,MAAO,kBAAgC,MAAM,UAA0B;AAAA,EAI9D,SAAsB;AAC3B,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,IAAI,KAAK;AAET,UAAM,YAAY;AAAA,MAChB,QAAQ,SAAS,GAAG,YAAY,OAAO,MAAM,CAAC,CAAC,KAAK;AAAA,IACtD;AAEA,UAAM,YAAY;AAAA,MAChB,OAAO;AAAA,MACP,UAAU,WAAW,GAAG,YAAY,OAAO,QAAQ,CAAC,CAAC,KAAK;AAAA,IAC5D;AAEA,UAAM,YAAiC;AAAA,MACrC,iBAAiB;AAAA,IACnB;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,WAAW,cAAc,SAAS;AAAA,QAC7C,OAAO,WAAW,WAAW,WAAqB;AAAA;AAAA,MAElD,oCAAC,QAAK,WAAU,uBAAsB,OAAO,aAC1C,YAAY,KAAK,KAAK,MAAM,WAAW,OAC1C;AAAA,MACA,oCAAC,QAAK,WAAU,oBAAmB,OAAO,WAAW;AAAA,IACvD;AAAA,EAEJ;AACF;AAEA,UAAU,eAAe;AAAA,EACvB,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AACb;AAEA,UAAU,YAAY;AAAA,EACpB,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,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AAAA,EAChE,WAAW,UAAU;AAAA,EACrB,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AAAA,EAClE,WAAW,UAAU;AACvB;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { InferProps } from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AtDrawerProps, AtDrawerState } from '../../../types/drawer';
|
|
4
|
+
export default class AtDrawer extends React.Component<AtDrawerProps, AtDrawerState> {
|
|
5
|
+
static defaultProps: AtDrawerProps;
|
|
6
|
+
static propTypes: InferProps<AtDrawerProps>;
|
|
7
|
+
constructor(props: AtDrawerProps);
|
|
8
|
+
componentDidMount(): void;
|
|
9
|
+
private onItemClick;
|
|
10
|
+
private onHide;
|
|
11
|
+
private animHide;
|
|
12
|
+
private animShow;
|
|
13
|
+
private onMaskClick;
|
|
14
|
+
UNSAFE_componentWillReceiveProps(nextProps: AtDrawerProps): void;
|
|
15
|
+
render(): JSX.Element;
|
|
16
|
+
}
|
|
@@ -1,93 +1,114 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import React from
|
|
4
|
-
import { View } from
|
|
5
|
-
import AtList from
|
|
6
|
-
import AtListItem from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { View } from "@tarojs/components";
|
|
5
|
+
import AtList from "../list/index";
|
|
6
|
+
import AtListItem from "../list/item/index";
|
|
7
|
+
class AtDrawer extends React.Component {
|
|
8
|
+
constructor(props) {
|
|
9
|
+
super(props);
|
|
10
|
+
this.state = {
|
|
11
|
+
animShow: false,
|
|
12
|
+
_show: props.show
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
componentDidMount() {
|
|
16
|
+
const { _show } = this.state;
|
|
17
|
+
if (_show) this.animShow();
|
|
18
|
+
}
|
|
19
|
+
onItemClick(index) {
|
|
20
|
+
this.props.onItemClick && this.props.onItemClick(index);
|
|
21
|
+
this.animHide();
|
|
22
|
+
}
|
|
23
|
+
onHide() {
|
|
24
|
+
this.setState({ _show: false }, () => {
|
|
25
|
+
this.props.onClose && this.props.onClose();
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
animHide() {
|
|
29
|
+
this.setState({
|
|
30
|
+
animShow: false
|
|
31
|
+
});
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
this.onHide();
|
|
34
|
+
}, 300);
|
|
35
|
+
}
|
|
36
|
+
animShow() {
|
|
37
|
+
this.setState({ _show: true });
|
|
38
|
+
setTimeout(() => {
|
|
39
|
+
this.setState({
|
|
40
|
+
animShow: true
|
|
41
|
+
});
|
|
42
|
+
}, 200);
|
|
43
|
+
}
|
|
44
|
+
onMaskClick() {
|
|
45
|
+
this.animHide();
|
|
46
|
+
}
|
|
47
|
+
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
48
|
+
const { show } = nextProps;
|
|
49
|
+
if (show !== this.state._show) {
|
|
50
|
+
show ? this.animShow() : this.animHide();
|
|
14
51
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
onMaskClick() {
|
|
46
|
-
this.animHide();
|
|
47
|
-
}
|
|
48
|
-
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
49
|
-
const { show } = nextProps;
|
|
50
|
-
if (show !== this.state._show) {
|
|
51
|
-
show ? this.animShow() : this.animHide();
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
const { mask, width, right, items } = this.props;
|
|
55
|
+
const { animShow, _show } = this.state;
|
|
56
|
+
const rootClassName = ["at-drawer"];
|
|
57
|
+
const maskStyle = {
|
|
58
|
+
display: mask ? "block" : "none",
|
|
59
|
+
opacity: animShow ? 1 : 0
|
|
60
|
+
};
|
|
61
|
+
const listStyle = {
|
|
62
|
+
width,
|
|
63
|
+
transition: animShow ? "all 225ms cubic-bezier(0, 0, 0.2, 1)" : "all 195ms cubic-bezier(0.4, 0, 0.6, 1)"
|
|
64
|
+
};
|
|
65
|
+
const classObject = {
|
|
66
|
+
"at-drawer--show": animShow,
|
|
67
|
+
"at-drawer--right": right,
|
|
68
|
+
"at-drawer--left": !right
|
|
69
|
+
};
|
|
70
|
+
return _show ? /* @__PURE__ */ React.createElement(
|
|
71
|
+
View,
|
|
72
|
+
{
|
|
73
|
+
className: classNames(rootClassName, classObject, this.props.className)
|
|
74
|
+
},
|
|
75
|
+
/* @__PURE__ */ React.createElement(
|
|
76
|
+
View,
|
|
77
|
+
{
|
|
78
|
+
className: "at-drawer__mask",
|
|
79
|
+
style: maskStyle,
|
|
80
|
+
onClick: this.onMaskClick.bind(this)
|
|
52
81
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
: 'all 195ms cubic-bezier(0.4, 0, 0.6, 1)'
|
|
67
|
-
};
|
|
68
|
-
const classObject = {
|
|
69
|
-
'at-drawer--show': animShow,
|
|
70
|
-
'at-drawer--right': right,
|
|
71
|
-
'at-drawer--left': !right
|
|
72
|
-
};
|
|
73
|
-
return _show ? (React.createElement(View, { className: classNames(rootClassName, classObject, this.props.className) },
|
|
74
|
-
React.createElement(View, { className: 'at-drawer__mask', style: maskStyle, onClick: this.onMaskClick.bind(this) }),
|
|
75
|
-
React.createElement(View, { className: 'at-drawer__content', style: listStyle }, !!items && items.length ? (React.createElement(AtList, null, items.map((name, index) => (React.createElement(AtListItem, { key: `${name}-${index}`, "data-index": index, onClick: this.onItemClick.bind(this, index), title: name, arrow: 'right' }))))) : (this.props.children)))) : (React.createElement(View, null));
|
|
76
|
-
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ React.createElement(View, { className: "at-drawer__content", style: listStyle }, !!items && items.length ? /* @__PURE__ */ React.createElement(AtList, null, items.map((name, index) => /* @__PURE__ */ React.createElement(
|
|
84
|
+
AtListItem,
|
|
85
|
+
{
|
|
86
|
+
key: `${name}-${index}`,
|
|
87
|
+
"data-index": index,
|
|
88
|
+
onClick: this.onItemClick.bind(this, index),
|
|
89
|
+
title: name,
|
|
90
|
+
arrow: "right"
|
|
91
|
+
}
|
|
92
|
+
))) : this.props.children)
|
|
93
|
+
) : /* @__PURE__ */ React.createElement(View, null);
|
|
94
|
+
}
|
|
77
95
|
}
|
|
78
96
|
AtDrawer.defaultProps = {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
97
|
+
show: false,
|
|
98
|
+
mask: true,
|
|
99
|
+
width: "",
|
|
100
|
+
right: false,
|
|
101
|
+
items: []
|
|
84
102
|
};
|
|
85
103
|
AtDrawer.propTypes = {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
104
|
+
show: PropTypes.bool,
|
|
105
|
+
mask: PropTypes.bool,
|
|
106
|
+
width: PropTypes.string,
|
|
107
|
+
items: PropTypes.arrayOf(PropTypes.string),
|
|
108
|
+
onItemClick: PropTypes.func,
|
|
109
|
+
onClose: PropTypes.func
|
|
110
|
+
};
|
|
111
|
+
export {
|
|
112
|
+
AtDrawer as default
|
|
92
113
|
};
|
|
93
114
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/drawer/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport PropTypes, { InferProps } from 'prop-types'\nimport React from 'react'\nimport { View } from '@tarojs/components'\nimport { AtDrawerProps, AtDrawerState } from '../../../types/drawer'\nimport AtList from '../list/index'\nimport AtListItem from '../list/item/index'\n\nexport default class AtDrawer extends React.Component<\n AtDrawerProps,\n AtDrawerState\n> {\n public static defaultProps: AtDrawerProps\n public static propTypes: InferProps<AtDrawerProps>\n\n public constructor(props: AtDrawerProps) {\n super(props)\n this.state = {\n animShow: false,\n _show: props.show\n }\n }\n\n public componentDidMount(): void {\n const { _show } = this.state\n if (_show) this.animShow()\n }\n\n private onItemClick(index: number): void {\n this.props.onItemClick && this.props.onItemClick(index)\n this.animHide()\n }\n\n private onHide(): void {\n this.setState({ _show: false }, () => {\n this.props.onClose && this.props.onClose()\n })\n }\n\n private animHide(): void {\n this.setState({\n animShow: false\n })\n setTimeout(() => {\n this.onHide()\n }, 300)\n }\n\n private animShow(): void {\n this.setState({ _show: true })\n setTimeout(() => {\n this.setState({\n animShow: true\n })\n }, 200)\n }\n\n private onMaskClick(): void {\n this.animHide()\n }\n\n public UNSAFE_componentWillReceiveProps(nextProps: AtDrawerProps): void {\n const { show } = nextProps\n if (show !== this.state._show) {\n show ? this.animShow() : this.animHide()\n }\n }\n\n public render(): JSX.Element {\n const { mask, width, right, items } = this.props\n const { animShow, _show } = this.state\n const rootClassName = ['at-drawer']\n\n const maskStyle = {\n display: mask ? 'block' : 'none',\n opacity: animShow ? 1 : 0\n }\n const listStyle = {\n width,\n transition: animShow\n ? 'all 225ms cubic-bezier(0, 0, 0.2, 1)'\n : 'all 195ms cubic-bezier(0.4, 0, 0.6, 1)'\n }\n\n const classObject = {\n 'at-drawer--show': animShow,\n 'at-drawer--right': right,\n 'at-drawer--left': !right\n }\n\n return _show ? (\n <View\n className={classNames(rootClassName, classObject, this.props.className)}\n >\n <View\n className='at-drawer__mask'\n style={maskStyle}\n onClick={this.onMaskClick.bind(this)}\n ></View>\n\n <View className='at-drawer__content' style={listStyle}>\n {!!items && items.length ? (\n <AtList>\n {items.map((name, index) => (\n <AtListItem\n key={`${name}-${index}`}\n data-index={index}\n onClick={this.onItemClick.bind(this, index)}\n title={name}\n arrow='right'\n ></AtListItem>\n ))}\n </AtList>\n ) : (\n this.props.children\n )}\n </View>\n </View>\n ) : (\n <View></View>\n )\n }\n}\n\nAtDrawer.defaultProps = {\n show: false,\n mask: true,\n width: '',\n right: false,\n items: []\n}\n\nAtDrawer.propTypes = {\n show: PropTypes.bool,\n mask: PropTypes.bool,\n width: PropTypes.string,\n items: PropTypes.arrayOf(PropTypes.string),\n onItemClick: PropTypes.func,\n onClose: 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 { AtFabProps } from '../../../types/fab';
|
|
4
|
+
export default class AtFab extends React.Component<AtFabProps> {
|
|
5
|
+
static defaultProps: AtFabProps;
|
|
6
|
+
static propTypes: InferProps<AtFabProps>;
|
|
7
|
+
private onClick;
|
|
8
|
+
render(): JSX.Element;
|
|
9
|
+
}
|
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import React from
|
|
4
|
-
import { View } from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
render() {
|
|
12
|
-
const { size, className, children } = this.props;
|
|
13
|
-
const rootClass = classNames('at-fab', className, {
|
|
14
|
-
[`at-fab--${size}`]: size
|
|
15
|
-
});
|
|
16
|
-
return (React.createElement(View, { className: rootClass, onClick: this.onClick.bind(this) }, children));
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { View } from "@tarojs/components";
|
|
5
|
+
class AtFab extends React.Component {
|
|
6
|
+
onClick(e) {
|
|
7
|
+
if (typeof this.props.onClick === "function") {
|
|
8
|
+
this.props.onClick(e);
|
|
17
9
|
}
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
const { size, className, children } = this.props;
|
|
13
|
+
const rootClass = classNames("at-fab", className, {
|
|
14
|
+
[`at-fab--${size}`]: size
|
|
15
|
+
});
|
|
16
|
+
return /* @__PURE__ */ React.createElement(View, { className: rootClass, onClick: this.onClick.bind(this) }, children);
|
|
17
|
+
}
|
|
18
18
|
}
|
|
19
19
|
AtFab.propTypes = {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
size: PropTypes.oneOf(["normal", "small"]),
|
|
21
|
+
onClick: PropTypes.func
|
|
22
22
|
};
|
|
23
23
|
AtFab.defaultProps = {
|
|
24
|
-
|
|
24
|
+
size: "normal"
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
AtFab as default
|
|
25
28
|
};
|
|
26
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/fab/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport PropTypes, { InferProps } from 'prop-types'\nimport React from 'react'\nimport { View } from '@tarojs/components'\nimport { CommonEvent } from '@tarojs/components/types/common'\nimport { AtFabProps } from '../../../types/fab'\n\nexport default class AtFab extends React.Component<AtFabProps> {\n public static defaultProps: AtFabProps\n public static propTypes: InferProps<AtFabProps>\n\n private onClick(e: CommonEvent): void {\n if (typeof this.props.onClick === 'function') {\n this.props.onClick(e)\n }\n }\n\n public render(): JSX.Element {\n const { size, className, children } = this.props\n\n const rootClass = classNames('at-fab', className, {\n [`at-fab--${size}`]: size\n })\n\n return (\n <View className={rootClass} onClick={this.onClick.bind(this)}>\n {children}\n </View>\n )\n }\n}\n\nAtFab.propTypes = {\n size: PropTypes.oneOf(['normal', 'small']),\n onClick: PropTypes.func\n}\n\nAtFab.defaultProps = {\n size: 'normal'\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,OAAO,eAA+B;AACtC,OAAO,WAAW;AAClB,SAAS,YAAY;AAIrB,MAAO,cAA4B,MAAM,UAAsB;AAAA,EAIrD,QAAQ,GAAsB;AACpC,QAAI,OAAO,KAAK,MAAM,YAAY,YAAY;AAC5C,WAAK,MAAM,QAAQ,CAAC;AAAA,IACtB;AAAA,EACF;AAAA,EAEO,SAAsB;AAC3B,UAAM,EAAE,MAAM,WAAW,SAAS,IAAI,KAAK;AAE3C,UAAM,YAAY,WAAW,UAAU,WAAW;AAAA,MAChD,CAAC,WAAW,IAAI,EAAE,GAAG;AAAA,IACvB,CAAC;AAED,WACE,oCAAC,QAAK,WAAW,WAAW,SAAS,KAAK,QAAQ,KAAK,IAAI,KACxD,QACH;AAAA,EAEJ;AACF;AAEA,MAAM,YAAY;AAAA,EAChB,MAAM,UAAU,MAAM,CAAC,UAAU,OAAO,CAAC;AAAA,EACzC,SAAS,UAAU;AACrB;AAEA,MAAM,eAAe;AAAA,EACnB,MAAM;AACR;","names":[]}
|
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import _forEach from
|
|
3
|
-
import PropTypes from
|
|
4
|
-
import React from
|
|
5
|
-
import { View } from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import _forEach from "lodash/forEach";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { View } from "@tarojs/components";
|
|
6
|
+
class AtFlex extends React.Component {
|
|
7
|
+
render() {
|
|
8
|
+
const rootClass = ["at-row"];
|
|
9
|
+
_forEach(this.props, (value, key) => {
|
|
10
|
+
if (key === "children") {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (key === "alignContent") {
|
|
14
|
+
return rootClass.push(`at-row--${value}`);
|
|
15
|
+
}
|
|
16
|
+
if (key === "alignContent") {
|
|
17
|
+
return rootClass.push(`at-row__align-content--${value}`);
|
|
18
|
+
}
|
|
19
|
+
rootClass.push(`at-row__${key}--${value}`);
|
|
20
|
+
});
|
|
21
|
+
return /* @__PURE__ */ React.createElement(View, { className: classNames(rootClass) }, this.props.children);
|
|
22
|
+
}
|
|
23
23
|
}
|
|
24
24
|
AtFlex.propTypes = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
wrap: PropTypes.oneOf(["no-wrap", "wrap", "wrap-reverse"]),
|
|
26
|
+
align: PropTypes.oneOf(["start", "end", "center", "stretch", "baseline"]),
|
|
27
|
+
justify: PropTypes.oneOf(["start", "end", "center", "between", "around"]),
|
|
28
|
+
dirction: PropTypes.oneOf(["row", "column", "row-reverse", "column-reverse"]),
|
|
29
|
+
alignContent: PropTypes.oneOf([
|
|
30
|
+
"start",
|
|
31
|
+
"end",
|
|
32
|
+
"center",
|
|
33
|
+
"stretch",
|
|
34
|
+
"between",
|
|
35
|
+
"around"
|
|
36
|
+
])
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
AtFlex as default
|
|
37
40
|
};
|
|
38
41
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/flex/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport _forEach from 'lodash/forEach'\nimport PropTypes, { InferProps } from 'prop-types'\nimport React from 'react'\nimport { View } from '@tarojs/components'\nimport { AtFlexProps } from '../../../types/flex'\n\nexport default class AtFlex extends React.Component<AtFlexProps> {\n public static propTypes: InferProps<AtFlexProps>\n\n public render(): JSX.Element {\n const rootClass = ['at-row']\n\n _forEach(this.props, (value, key) => {\n if (key === 'children') {\n return\n }\n if (key === 'alignContent') {\n return rootClass.push(`at-row--${value}`)\n }\n if (key === 'alignContent') {\n return rootClass.push(`at-row__align-content--${value}`)\n }\n rootClass.push(`at-row__${key}--${value}`)\n })\n\n return <View className={classNames(rootClass)}>{this.props.children}</View>\n }\n}\n\nAtFlex.propTypes = {\n wrap: PropTypes.oneOf(['no-wrap', 'wrap', 'wrap-reverse']),\n align: PropTypes.oneOf(['start', 'end', 'center', 'stretch', 'baseline']),\n justify: PropTypes.oneOf(['start', 'end', 'center', 'between', 'around']),\n dirction: PropTypes.oneOf(['row', 'column', 'row-reverse', 'column-reverse']),\n alignContent: PropTypes.oneOf([\n 'start',\n 'end',\n 'center',\n 'stretch',\n 'between',\n 'around'\n ])\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,OAAO,cAAc;AACrB,OAAO,eAA+B;AACtC,OAAO,WAAW;AAClB,SAAS,YAAY;AAGrB,MAAO,eAA6B,MAAM,UAAuB;AAAA,EAGxD,SAAsB;AAC3B,UAAM,YAAY,CAAC,QAAQ;AAE3B,aAAS,KAAK,OAAO,CAAC,OAAO,QAAQ;AACnC,UAAI,QAAQ,YAAY;AACtB;AAAA,MACF;AACA,UAAI,QAAQ,gBAAgB;AAC1B,eAAO,UAAU,KAAK,WAAW,KAAK,EAAE;AAAA,MAC1C;AACA,UAAI,QAAQ,gBAAgB;AAC1B,eAAO,UAAU,KAAK,0BAA0B,KAAK,EAAE;AAAA,MACzD;AACA,gBAAU,KAAK,WAAW,GAAG,KAAK,KAAK,EAAE;AAAA,IAC3C,CAAC;AAED,WAAO,oCAAC,QAAK,WAAW,WAAW,SAAS,KAAI,KAAK,MAAM,QAAS;AAAA,EACtE;AACF;AAEA,OAAO,YAAY;AAAA,EACjB,MAAM,UAAU,MAAM,CAAC,WAAW,QAAQ,cAAc,CAAC;AAAA,EACzD,OAAO,UAAU,MAAM,CAAC,SAAS,OAAO,UAAU,WAAW,UAAU,CAAC;AAAA,EACxE,SAAS,UAAU,MAAM,CAAC,SAAS,OAAO,UAAU,WAAW,QAAQ,CAAC;AAAA,EACxE,UAAU,UAAU,MAAM,CAAC,OAAO,UAAU,eAAe,gBAAgB,CAAC;AAAA,EAC5E,cAAc,UAAU,MAAM;AAAA,IAC5B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InferProps } from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AtFlexItemProps } from '../../../../types/flex';
|
|
4
|
+
export default class AtFlexItem extends React.Component<AtFlexItemProps> {
|
|
5
|
+
static propTypes: InferProps<AtFlexItemProps>;
|
|
6
|
+
render(): JSX.Element;
|
|
7
|
+
}
|
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import _forEach from
|
|
3
|
-
import PropTypes from
|
|
4
|
-
import React from
|
|
5
|
-
import { View } from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import _forEach from "lodash/forEach";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { View } from "@tarojs/components";
|
|
6
|
+
class AtFlexItem extends React.Component {
|
|
7
|
+
render() {
|
|
8
|
+
const rootClass = ["at-col"];
|
|
9
|
+
_forEach(this.props, (value, key) => {
|
|
10
|
+
if (key === "isAuto" && value) {
|
|
11
|
+
return rootClass.push("at-col--auto");
|
|
12
|
+
}
|
|
13
|
+
if (key === "isWrap" && value) {
|
|
14
|
+
return rootClass.push("at-col--wrap");
|
|
15
|
+
}
|
|
16
|
+
if (key === "size" && value) {
|
|
17
|
+
rootClass.push(`at-col-${value}`);
|
|
18
|
+
}
|
|
19
|
+
rootClass.push(`at-col__${key}--${value}`);
|
|
20
|
+
});
|
|
21
|
+
return /* @__PURE__ */ React.createElement(View, { className: classNames(rootClass) }, this.props.children);
|
|
22
|
+
}
|
|
23
23
|
}
|
|
24
24
|
AtFlexItem.propTypes = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
isAuto: PropTypes.bool,
|
|
26
|
+
isWrap: PropTypes.bool,
|
|
27
|
+
align: PropTypes.oneOf(["top", "bottom", "center"]),
|
|
28
|
+
size: PropTypes.oneOf([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),
|
|
29
|
+
offset: PropTypes.oneOf([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
AtFlexItem as default
|
|
30
33
|
};
|
|
31
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/flex/item/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport _forEach from 'lodash/forEach'\nimport PropTypes, { InferProps } from 'prop-types'\nimport React from 'react'\nimport { View } from '@tarojs/components'\nimport { AtFlexItemProps } from '../../../../types/flex'\n\nexport default class AtFlexItem extends React.Component<AtFlexItemProps> {\n public static propTypes: InferProps<AtFlexItemProps>\n\n public render(): JSX.Element {\n const rootClass = ['at-col']\n\n _forEach(this.props, (value, key) => {\n if (key === 'isAuto' && value) {\n return rootClass.push('at-col--auto')\n }\n if (key === 'isWrap' && value) {\n return rootClass.push('at-col--wrap')\n }\n if (key === 'size' && value) {\n rootClass.push(`at-col-${value}`)\n }\n rootClass.push(`at-col__${key}--${value}`)\n })\n\n return <View className={classNames(rootClass)}>{this.props.children}</View>\n }\n}\n\nAtFlexItem.propTypes = {\n isAuto: PropTypes.bool,\n isWrap: PropTypes.bool,\n align: PropTypes.oneOf(['top', 'bottom', 'center']),\n size: PropTypes.oneOf([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n offset: PropTypes.oneOf([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,OAAO,cAAc;AACrB,OAAO,eAA+B;AACtC,OAAO,WAAW;AAClB,SAAS,YAAY;AAGrB,MAAO,mBAAiC,MAAM,UAA2B;AAAA,EAGhE,SAAsB;AAC3B,UAAM,YAAY,CAAC,QAAQ;AAE3B,aAAS,KAAK,OAAO,CAAC,OAAO,QAAQ;AACnC,UAAI,QAAQ,YAAY,OAAO;AAC7B,eAAO,UAAU,KAAK,cAAc;AAAA,MACtC;AACA,UAAI,QAAQ,YAAY,OAAO;AAC7B,eAAO,UAAU,KAAK,cAAc;AAAA,MACtC;AACA,UAAI,QAAQ,UAAU,OAAO;AAC3B,kBAAU,KAAK,UAAU,KAAK,EAAE;AAAA,MAClC;AACA,gBAAU,KAAK,WAAW,GAAG,KAAK,KAAK,EAAE;AAAA,IAC3C,CAAC;AAED,WAAO,oCAAC,QAAK,WAAW,WAAW,SAAS,KAAI,KAAK,MAAM,QAAS;AAAA,EACtE;AACF;AAEA,WAAW,YAAY;AAAA,EACrB,QAAQ,UAAU;AAAA,EAClB,QAAQ,UAAU;AAAA,EAClB,OAAO,UAAU,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC;AAAA,EAClD,MAAM,UAAU,MAAM,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;AAAA,EAC7D,QAAQ,UAAU,MAAM,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;AACjE;","names":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InferProps } from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AtFloatLayoutProps, AtFloatLayoutState } from '../../../types/float-layout';
|
|
4
|
+
export default class AtFloatLayout extends React.Component<AtFloatLayoutProps, AtFloatLayoutState> {
|
|
5
|
+
static defaultProps: AtFloatLayoutProps;
|
|
6
|
+
static propTypes: InferProps<AtFloatLayoutProps>;
|
|
7
|
+
constructor(props: AtFloatLayoutProps);
|
|
8
|
+
UNSAFE_componentWillReceiveProps(nextProps: AtFloatLayoutProps): void;
|
|
9
|
+
private handleClose;
|
|
10
|
+
private close;
|
|
11
|
+
private handleTouchMove;
|
|
12
|
+
render(): JSX.Element;
|
|
13
|
+
}
|