taro-ui 3.3.2 → 3.4.0
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 +1 -1
- package/README.md +85 -0
- package/{lib → dist}/common/utils.d.ts +2 -1
- package/{lib → dist}/common/utils.js +3 -0
- package/{lib → dist}/common/utils.js.map +1 -1
- package/dist/components/accordion/index.d.ts +17 -0
- package/dist/components/accordion/index.js +101 -0
- package/dist/components/accordion/index.js.map +1 -0
- package/dist/components/action-sheet/body/index.d.ts +3 -0
- package/dist/components/action-sheet/body/index.js +15 -0
- package/dist/components/action-sheet/body/index.js.map +1 -0
- package/dist/components/action-sheet/body/item/index.d.ts +9 -0
- package/dist/components/action-sheet/body/item/index.js +25 -0
- package/dist/components/action-sheet/body/item/index.js.map +1 -0
- package/dist/components/action-sheet/footer/index.d.ts +9 -0
- package/dist/components/action-sheet/footer/index.js +25 -0
- package/dist/components/action-sheet/footer/index.js.map +1 -0
- package/dist/components/action-sheet/header/index.d.ts +3 -0
- package/dist/components/action-sheet/header/index.js +15 -0
- package/dist/components/action-sheet/header/index.js.map +1 -0
- package/dist/components/action-sheet/index.d.ts +13 -0
- package/dist/components/action-sheet/index.js +72 -0
- package/dist/components/action-sheet/index.js.map +1 -0
- package/dist/components/activity-indicator/index.d.ts +14 -0
- package/dist/components/activity-indicator/index.js +36 -0
- package/dist/components/activity-indicator/index.js.map +1 -0
- package/dist/components/avatar/index.d.ts +15 -0
- package/dist/components/avatar/index.js +61 -0
- package/dist/components/avatar/index.js.map +1 -0
- package/dist/components/badge/index.d.ts +13 -0
- package/dist/components/badge/index.js +35 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/components/button/index.d.ts +30 -0
- package/dist/components/button/index.js +162 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/calendar/body/index.d.ts +3 -0
- package/dist/components/calendar/body/index.js +269 -0
- package/dist/components/calendar/body/index.js.map +1 -0
- package/dist/components/calendar/controller/index.d.ts +3 -0
- package/dist/components/calendar/controller/index.js +55 -0
- package/dist/components/calendar/controller/index.js.map +1 -0
- package/dist/components/calendar/index.d.ts +3 -0
- package/dist/components/calendar/index.js +262 -0
- package/dist/components/calendar/index.js.map +1 -0
- package/{lib → dist}/components/calendar/ui/date-list/index.d.ts +2 -6
- package/dist/components/calendar/ui/date-list/index.js +49 -0
- package/dist/components/calendar/ui/date-list/index.js.map +1 -0
- package/dist/components/calendar/ui/day-list/index.d.ts +2 -0
- package/dist/components/calendar/ui/day-list/index.js +12 -0
- package/dist/components/calendar/ui/day-list/index.js.map +1 -0
- package/dist/components/card/index.d.ts +17 -0
- package/dist/components/card/index.js +79 -0
- package/dist/components/card/index.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +13 -0
- package/dist/components/checkbox/index.js +54 -0
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/components/config-provider/context.d.ts +6 -0
- package/dist/components/config-provider/context.js +13 -0
- package/dist/components/config-provider/context.js.map +1 -0
- package/dist/components/config-provider/index.d.ts +7 -0
- package/dist/components/config-provider/index.js +15 -0
- package/dist/components/config-provider/index.js.map +1 -0
- package/dist/components/countdown/index.d.ts +20 -0
- package/dist/components/countdown/index.js +217 -0
- package/dist/components/countdown/index.js.map +1 -0
- package/dist/components/countdown/item/index.d.ts +10 -0
- package/dist/components/countdown/item/index.js +21 -0
- package/dist/components/countdown/item/index.js.map +1 -0
- package/dist/components/curtain/index.d.ts +13 -0
- package/dist/components/curtain/index.js +53 -0
- package/dist/components/curtain/index.js.map +1 -0
- package/dist/components/divider/index.d.ts +15 -0
- package/dist/components/divider/index.js +48 -0
- package/dist/components/divider/index.js.map +1 -0
- package/dist/components/drawer/index.d.ts +14 -0
- package/dist/components/drawer/index.js +121 -0
- package/dist/components/drawer/index.js.map +1 -0
- package/dist/components/fab/index.d.ts +10 -0
- package/dist/components/fab/index.js +29 -0
- package/dist/components/fab/index.js.map +1 -0
- package/dist/components/flex/index.d.ts +13 -0
- package/{lib → dist}/components/flex/index.js +17 -18
- package/dist/components/flex/index.js.map +1 -0
- package/dist/components/flex/item/index.d.ts +13 -0
- package/dist/components/flex/item/index.js +33 -0
- package/dist/components/flex/item/index.js.map +1 -0
- package/dist/components/float-layout/index.d.ts +21 -0
- package/dist/components/float-layout/index.js +88 -0
- package/dist/components/float-layout/index.js.map +1 -0
- package/dist/components/form/index.d.ts +13 -0
- package/dist/components/form/index.js +43 -0
- package/dist/components/form/index.js.map +1 -0
- package/dist/components/grid/index.d.ts +24 -0
- package/dist/components/grid/index.js +96 -0
- package/dist/components/grid/index.js.map +1 -0
- package/dist/components/icon/index.d.ts +15 -0
- package/dist/components/icon/index.js +44 -0
- package/dist/components/icon/index.js.map +1 -0
- package/dist/components/image-picker/index.d.ts +21 -0
- package/dist/components/image-picker/index.js +145 -0
- package/dist/components/image-picker/index.js.map +1 -0
- package/dist/components/indexes/index.d.ts +17 -0
- package/dist/components/indexes/index.js +261 -0
- package/dist/components/indexes/index.js.map +1 -0
- package/dist/components/input/index.d.ts +39 -0
- package/dist/components/input/index.js +223 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input-number/index.d.ts +22 -0
- package/dist/components/input-number/index.js +174 -0
- package/dist/components/input-number/index.js.map +1 -0
- package/dist/components/list/index.d.ts +9 -0
- package/dist/components/list/index.js +26 -0
- package/dist/components/list/index.js.map +1 -0
- package/dist/components/list/item/index.d.ts +29 -0
- package/dist/components/list/item/index.js +124 -0
- package/dist/components/list/item/index.js.map +1 -0
- package/dist/components/load-more/index.d.ts +17 -0
- package/dist/components/load-more/index.js +51 -0
- package/dist/components/load-more/index.js.map +1 -0
- package/dist/components/loading/index.d.ts +13 -0
- package/dist/components/loading/index.js +26 -0
- package/dist/components/loading/index.js.map +1 -0
- package/dist/components/message/index.d.ts +10 -0
- package/dist/components/message/index.js +64 -0
- package/dist/components/message/index.js.map +1 -0
- package/dist/components/modal/action/index.d.ts +9 -0
- package/dist/components/modal/action/index.js +26 -0
- package/dist/components/modal/action/index.js.map +1 -0
- package/dist/components/modal/content/index.d.ts +3 -0
- package/dist/components/modal/content/index.js +15 -0
- package/dist/components/modal/content/index.js.map +1 -0
- package/dist/components/modal/header/index.d.ts +3 -0
- package/dist/components/modal/header/index.js +15 -0
- package/dist/components/modal/header/index.js.map +1 -0
- package/dist/components/modal/index.d.ts +17 -0
- package/dist/components/modal/index.js +92 -0
- package/dist/components/modal/index.js.map +1 -0
- package/dist/components/nav-bar/index.d.ts +22 -0
- package/dist/components/nav-bar/index.js +201 -0
- package/dist/components/nav-bar/index.js.map +1 -0
- package/dist/components/noticebar/index.d.ts +18 -0
- package/dist/components/noticebar/index.js +173 -0
- package/dist/components/noticebar/index.js.map +1 -0
- package/dist/components/pagination/index.d.ts +14 -0
- package/dist/components/pagination/index.js +90 -0
- package/dist/components/pagination/index.js.map +1 -0
- package/dist/components/progress/index.d.ts +13 -0
- package/dist/components/progress/index.js +56 -0
- package/dist/components/progress/index.js.map +1 -0
- package/dist/components/radio/index.d.ts +13 -0
- package/dist/components/radio/index.js +50 -0
- package/dist/components/radio/index.js.map +1 -0
- package/dist/components/range/index.d.ts +20 -0
- package/dist/components/range/index.js +200 -0
- package/dist/components/range/index.js.map +1 -0
- package/dist/components/rate/index.d.ts +15 -0
- package/dist/components/rate/index.js +67 -0
- package/dist/components/rate/index.js.map +1 -0
- package/dist/components/search-bar/index.d.ts +24 -0
- package/dist/components/search-bar/index.js +150 -0
- package/dist/components/search-bar/index.js.map +1 -0
- package/dist/components/segmented-control/index.d.ts +16 -0
- package/dist/components/segmented-control/index.js +70 -0
- package/dist/components/segmented-control/index.js.map +1 -0
- package/dist/components/slider/index.d.ts +22 -0
- package/dist/components/slider/index.js +91 -0
- package/dist/components/slider/index.js.map +1 -0
- package/dist/components/steps/index.d.ts +13 -0
- package/dist/components/steps/index.js +62 -0
- package/dist/components/steps/index.js.map +1 -0
- package/dist/components/swipe-action/index.d.ts +14 -0
- package/dist/components/swipe-action/index.js +223 -0
- package/dist/components/swipe-action/index.js.map +1 -0
- package/dist/components/swipe-action/options/index.d.ts +3 -0
- package/dist/components/swipe-action/options/index.js +25 -0
- package/dist/components/swipe-action/options/index.js.map +1 -0
- package/dist/components/switch/index.d.ts +16 -0
- package/dist/components/switch/index.js +54 -0
- package/dist/components/switch/index.js.map +1 -0
- package/dist/components/tab-bar/index.d.ts +19 -0
- package/dist/components/tab-bar/index.js +143 -0
- package/dist/components/tab-bar/index.js.map +1 -0
- package/dist/components/tabs/index.d.ts +18 -0
- package/dist/components/tabs/index.js +230 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/tabs-pane/index.d.ts +13 -0
- package/dist/components/tabs-pane/index.js +41 -0
- package/dist/components/tabs-pane/index.js.map +1 -0
- package/dist/components/tag/index.d.ts +16 -0
- package/dist/components/tag/index.js +66 -0
- package/dist/components/tag/index.js.map +1 -0
- package/dist/components/textarea/index.d.ts +31 -0
- package/dist/components/textarea/index.js +121 -0
- package/dist/components/textarea/index.js.map +1 -0
- package/dist/components/timeline/index.d.ts +11 -0
- package/dist/components/timeline/index.js +70 -0
- package/dist/components/timeline/index.js.map +1 -0
- package/dist/components/toast/img.json +5 -0
- package/dist/components/toast/index.d.ts +17 -0
- package/dist/components/toast/index.js +115 -0
- package/dist/components/toast/index.js.map +1 -0
- package/dist/hooks/useComponentLocale.d.ts +2 -0
- package/dist/hooks/useComponentLocale.js +12 -0
- package/dist/hooks/useComponentLocale.js.map +1 -0
- package/{lib → dist}/index.d.ts +3 -0
- package/dist/index.esm.js +5856 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +5937 -0
- package/dist/index.js.map +1 -0
- package/dist/locale/en_US.d.ts +3 -0
- package/dist/locale/en_US.js +34 -0
- package/dist/locale/en_US.js.map +1 -0
- package/dist/locale/index.d.ts +4 -0
- package/dist/locale/index.js +10 -0
- package/dist/locale/index.js.map +1 -0
- package/dist/locale/types.d.ts +34 -0
- package/dist/locale/types.js +1 -0
- package/dist/locale/types.js.map +1 -0
- package/dist/locale/zh_CN.d.ts +3 -0
- package/dist/locale/zh_CN.js +34 -0
- package/dist/locale/zh_CN.js.map +1 -0
- package/{lib → dist}/style/components/avatar.scss +1 -1
- package/{lib → dist}/style/components/badge.scss +7 -2
- package/{lib → dist}/style/components/calendar.scss +1 -1
- package/{lib → dist}/style/components/countdown.scss +2 -1
- package/{lib → dist}/style/components/flex.scss +1 -1
- package/{lib → dist}/style/components/grid.scss +2 -2
- package/{lib → dist}/style/components/icon.scss +302 -101
- package/{lib → dist}/style/components/input.scss +2 -2
- package/{lib → dist}/style/components/progress.scss +1 -1
- package/{lib → dist}/style/components/search-bar.scss +1 -1
- package/{lib → dist}/style/components/steps.scss +2 -2
- package/{lib → dist}/style/components/tabs.scss +1 -1
- package/{lib → dist}/style/components/tag.scss +1 -1
- package/{lib → dist}/style/components/timeline.scss +1 -1
- package/{lib → dist}/style/components/toast.scss +7 -3
- package/{lib → dist}/style/index.css +176 -176
- package/dist/style/index.css.map +1 -0
- package/{lib → dist}/style/mixins/libs/hairline.scss +4 -19
- package/{lib → dist}/style/mixins/libs/shade.scss +3 -6
- package/{lib → dist}/style/mixins/libs/tint.scss +4 -7
- package/{lib → dist}/style/themes/purple.scss +15 -15
- package/{lib → dist}/style/themes/red.scss +16 -13
- package/{lib → dist}/style/variables/default.scss +69 -73
- package/package.json +45 -12
- package/rn/components/accordion/index.tsx +2 -9
- package/rn/components/action-sheet/body/index.tsx +1 -3
- package/rn/components/action-sheet/body/item/index.tsx +1 -3
- package/rn/components/action-sheet/footer/index.tsx +1 -3
- package/rn/components/action-sheet/header/index.tsx +1 -3
- package/rn/components/activity-indicator/index.tsx +1 -3
- package/rn/components/avatar/index.tsx +5 -5
- package/rn/components/calendar/controller/index.tsx +2 -7
- package/rn/components/card/index.tsx +4 -4
- package/rn/components/countdown/index.scss +5 -4
- package/rn/components/countdown/item/index.tsx +1 -3
- package/rn/components/curtain/index.tsx +5 -5
- package/rn/components/flex/index.scss +2 -2
- package/rn/components/flex/item/index.scss +2 -2
- package/rn/components/grid/index.tsx +15 -15
- package/rn/components/icon/index.tsx +4 -4
- package/rn/components/image-picker/index.tsx +7 -7
- package/rn/components/pagination/index.tsx +7 -7
- package/rn/components/progress/index.tsx +5 -5
- package/rn/components/radio/index.tsx +7 -7
- package/rn/components/rate/index.tsx +4 -4
- package/rn/components/segmented-control/index.tsx +8 -8
- package/rn/components/slider/index.tsx +9 -9
- package/rn/components/steps/index.tsx +8 -8
- package/rn/components/swipe-action/options/index.tsx +1 -3
- package/rn/components/switch/index.tsx +2 -9
- package/rn/components/toast/img.json +3 -6
- package/rn/components/toast/index.tsx +8 -8
- package/rn/style/components/accordion.scss +1 -1
- package/rn/style/components/action-sheet.scss +1 -1
- package/rn/style/components/avatar.scss +1 -1
- package/rn/style/components/badge.scss +8 -3
- package/rn/style/components/button.scss +1 -1
- package/rn/style/components/calendar.scss +1 -1
- package/rn/style/components/checkbox.scss +1 -1
- package/rn/style/components/curtain.scss +1 -1
- package/rn/style/components/fab.scss +1 -4
- package/rn/style/components/flex.scss +1 -1
- package/rn/style/components/grid.scss +2 -6
- package/rn/style/components/icon.scss +302 -101
- package/rn/style/components/index.scss +41 -41
- package/rn/style/components/input.scss +1 -1
- package/rn/style/components/list.scss +2 -4
- package/rn/style/components/loading.scss +4 -4
- package/rn/style/components/message.scss +1 -1
- package/rn/style/components/modal.scss +0 -2
- package/rn/style/components/nav-bar.scss +3 -3
- package/rn/style/components/noticebar.scss +0 -4
- package/rn/style/components/progress.scss +1 -1
- package/rn/style/components/radio.scss +2 -2
- package/rn/style/components/range.scss +1 -1
- package/rn/style/components/search-bar.scss +1 -1
- package/rn/style/components/segmented-control.scss +4 -1
- package/rn/style/components/slider.scss +0 -1
- package/rn/style/components/steps.scss +3 -3
- package/rn/style/components/switch.scss +0 -1
- package/rn/style/components/tabs.scss +2 -2
- package/rn/style/components/tag.scss +1 -1
- package/rn/style/components/timeline.scss +0 -2
- package/rn/style/components/toast.scss +5 -2
- package/rn/style/index.scss +1 -1
- package/rn/style/mixins/libs/hairline.scss +4 -22
- package/rn/style/mixins/libs/shade.scss +1 -4
- package/rn/style/mixins/libs/tint.scss +2 -5
- package/rn/style/themes/purple.scss +15 -15
- package/rn/style/themes/red.scss +16 -13
- package/rn/style/variables/default.scss +69 -73
- package/lib/components/accordion/index.d.ts +0 -14
- package/lib/components/accordion/index.js +0 -121
- package/lib/components/accordion/index.js.map +0 -1
- package/lib/components/action-sheet/body/index.d.ts +0 -5
- package/lib/components/action-sheet/body/index.js +0 -13
- package/lib/components/action-sheet/body/index.js.map +0 -1
- package/lib/components/action-sheet/body/item/index.d.ts +0 -9
- package/lib/components/action-sheet/body/item/index.js +0 -25
- package/lib/components/action-sheet/body/item/index.js.map +0 -1
- package/lib/components/action-sheet/footer/index.d.ts +0 -9
- package/lib/components/action-sheet/footer/index.js +0 -28
- package/lib/components/action-sheet/footer/index.js.map +0 -1
- package/lib/components/action-sheet/header/index.d.ts +0 -5
- package/lib/components/action-sheet/header/index.js +0 -16
- package/lib/components/action-sheet/header/index.js.map +0 -1
- package/lib/components/action-sheet/index.d.ts +0 -14
- package/lib/components/action-sheet/index.js +0 -76
- package/lib/components/action-sheet/index.js.map +0 -1
- package/lib/components/activity-indicator/index.d.ts +0 -8
- package/lib/components/activity-indicator/index.js +0 -39
- package/lib/components/activity-indicator/index.js.map +0 -1
- package/lib/components/avatar/index.d.ts +0 -9
- package/lib/components/avatar/index.js +0 -67
- package/lib/components/avatar/index.js.map +0 -1
- package/lib/components/badge/index.d.ts +0 -10
- package/lib/components/badge/index.js +0 -51
- package/lib/components/badge/index.js.map +0 -1
- package/lib/components/button/index.d.ts +0 -15
- package/lib/components/button/index.js +0 -177
- package/lib/components/button/index.js.map +0 -1
- package/lib/components/calendar/body/index.d.ts +0 -26
- package/lib/components/calendar/body/index.js +0 -289
- package/lib/components/calendar/body/index.js.map +0 -1
- package/lib/components/calendar/controller/index.d.ts +0 -5
- package/lib/components/calendar/controller/index.js +0 -51
- package/lib/components/calendar/controller/index.js.map +0 -1
- package/lib/components/calendar/index.d.ts +0 -20
- package/lib/components/calendar/index.js +0 -244
- package/lib/components/calendar/index.js.map +0 -1
- package/lib/components/calendar/ui/date-list/index.js +0 -54
- package/lib/components/calendar/ui/date-list/index.js.map +0 -1
- package/lib/components/calendar/ui/day-list/index.d.ts +0 -4
- package/lib/components/calendar/ui/day-list/index.js +0 -11
- package/lib/components/calendar/ui/day-list/index.js.map +0 -1
- package/lib/components/card/index.d.ts +0 -9
- package/lib/components/card/index.js +0 -80
- package/lib/components/card/index.js.map +0 -1
- package/lib/components/checkbox/index.d.ts +0 -9
- package/lib/components/checkbox/index.js +0 -59
- package/lib/components/checkbox/index.js.map +0 -1
- package/lib/components/countdown/index.d.ts +0 -20
- package/lib/components/countdown/index.js +0 -152
- package/lib/components/countdown/index.js.map +0 -1
- package/lib/components/countdown/item/index.d.ts +0 -9
- package/lib/components/countdown/item/index.js +0 -24
- package/lib/components/countdown/item/index.js.map +0 -1
- package/lib/components/curtain/index.d.ts +0 -10
- package/lib/components/curtain/index.js +0 -62
- package/lib/components/curtain/index.js.map +0 -1
- package/lib/components/divider/index.d.ts +0 -8
- package/lib/components/divider/index.js +0 -57
- package/lib/components/divider/index.js.map +0 -1
- package/lib/components/drawer/index.d.ts +0 -16
- package/lib/components/drawer/index.js +0 -114
- package/lib/components/drawer/index.js.map +0 -1
- package/lib/components/fab/index.d.ts +0 -9
- package/lib/components/fab/index.js +0 -29
- package/lib/components/fab/index.js.map +0 -1
- package/lib/components/flex/index.d.ts +0 -7
- package/lib/components/flex/index.js.map +0 -1
- package/lib/components/flex/item/index.d.ts +0 -7
- package/lib/components/flex/item/index.js +0 -34
- package/lib/components/flex/item/index.js.map +0 -1
- package/lib/components/float-layout/index.d.ts +0 -13
- package/lib/components/float-layout/index.js +0 -104
- package/lib/components/float-layout/index.js.map +0 -1
- package/lib/components/form/index.d.ts +0 -10
- package/lib/components/form/index.js +0 -43
- package/lib/components/form/index.js.map +0 -1
- package/lib/components/grid/index.d.ts +0 -9
- package/lib/components/grid/index.js +0 -101
- package/lib/components/grid/index.js.map +0 -1
- package/lib/components/icon/index.d.ts +0 -9
- package/lib/components/icon/index.js +0 -54
- package/lib/components/icon/index.js.map +0 -1
- package/lib/components/image-picker/index.d.ts +0 -11
- package/lib/components/image-picker/index.js +0 -164
- package/lib/components/image-picker/index.js.map +0 -1
- package/lib/components/indexes/index.d.ts +0 -29
- package/lib/components/indexes/index.js +0 -272
- package/lib/components/indexes/index.js.map +0 -1
- package/lib/components/input/index.d.ts +0 -17
- package/lib/components/input/index.js +0 -232
- package/lib/components/input/index.js.map +0 -1
- package/lib/components/input-number/index.d.ts +0 -13
- package/lib/components/input-number/index.js +0 -193
- package/lib/components/input-number/index.js.map +0 -1
- package/lib/components/list/index.d.ts +0 -8
- package/lib/components/list/index.js +0 -26
- package/lib/components/list/index.js.map +0 -1
- package/lib/components/list/item/index.d.ts +0 -11
- package/lib/components/list/item/index.js +0 -152
- package/lib/components/list/item/index.js.map +0 -1
- package/lib/components/load-more/index.d.ts +0 -9
- package/lib/components/load-more/index.js +0 -72
- package/lib/components/load-more/index.js.map +0 -1
- package/lib/components/loading/index.d.ts +0 -12
- package/lib/components/loading/index.js +0 -32
- package/lib/components/loading/index.js.map +0 -1
- package/lib/components/message/index.d.ts +0 -15
- package/lib/components/message/index.js +0 -78
- package/lib/components/message/index.js.map +0 -1
- package/lib/components/modal/action/index.d.ts +0 -8
- package/lib/components/modal/action/index.js +0 -26
- package/lib/components/modal/action/index.js.map +0 -1
- package/lib/components/modal/content/index.d.ts +0 -5
- package/lib/components/modal/content/index.js +0 -13
- package/lib/components/modal/content/index.js.map +0 -1
- package/lib/components/modal/header/index.d.ts +0 -5
- package/lib/components/modal/header/index.js +0 -13
- package/lib/components/modal/header/index.js.map +0 -1
- package/lib/components/modal/index.d.ts +0 -15
- package/lib/components/modal/index.js +0 -106
- package/lib/components/modal/index.js.map +0 -1
- package/lib/components/nav-bar/index.d.ts +0 -12
- package/lib/components/nav-bar/index.js +0 -217
- package/lib/components/nav-bar/index.js.map +0 -1
- package/lib/components/noticebar/index.d.ts +0 -16
- package/lib/components/noticebar/index.js +0 -186
- package/lib/components/noticebar/index.js.map +0 -1
- package/lib/components/pagination/index.d.ts +0 -12
- package/lib/components/pagination/index.js +0 -146
- package/lib/components/pagination/index.js.map +0 -1
- package/lib/components/progress/index.d.ts +0 -7
- package/lib/components/progress/index.js +0 -53
- package/lib/components/progress/index.js.map +0 -1
- package/lib/components/radio/index.d.ts +0 -9
- package/lib/components/radio/index.js +0 -54
- package/lib/components/radio/index.js.map +0 -1
- package/lib/components/range/index.d.ts +0 -22
- package/lib/components/range/index.js +0 -207
- package/lib/components/range/index.js.map +0 -1
- package/lib/components/rate/index.d.ts +0 -9
- package/lib/components/rate/index.js +0 -82
- package/lib/components/rate/index.js.map +0 -1
- package/lib/components/search-bar/index.d.ts +0 -16
- package/lib/components/search-bar/index.js +0 -176
- package/lib/components/search-bar/index.js.map +0 -1
- package/lib/components/segmented-control/index.d.ts +0 -9
- package/lib/components/segmented-control/index.js +0 -84
- package/lib/components/segmented-control/index.js.map +0 -1
- package/lib/components/slider/index.d.ts +0 -13
- package/lib/components/slider/index.js +0 -115
- package/lib/components/slider/index.js.map +0 -1
- package/lib/components/steps/index.d.ts +0 -9
- package/lib/components/steps/index.js +0 -67
- package/lib/components/steps/index.js.map +0 -1
- package/lib/components/swipe-action/index.d.ts +0 -27
- package/lib/components/swipe-action/index.js +0 -220
- package/lib/components/swipe-action/index.js.map +0 -1
- package/lib/components/swipe-action/options/index.d.ts +0 -5
- package/lib/components/swipe-action/options/index.js +0 -24
- package/lib/components/swipe-action/options/index.js.map +0 -1
- package/lib/components/switch/index.d.ts +0 -9
- package/lib/components/switch/index.js +0 -59
- package/lib/components/switch/index.js.map +0 -1
- package/lib/components/tab-bar/index.d.ts +0 -9
- package/lib/components/tab-bar/index.js +0 -170
- package/lib/components/tab-bar/index.js.map +0 -1
- package/lib/components/tabs/index.d.ts +0 -24
- package/lib/components/tabs/index.js +0 -219
- package/lib/components/tabs/index.js.map +0 -1
- package/lib/components/tabs-pane/index.d.ts +0 -8
- package/lib/components/tabs-pane/index.js +0 -43
- package/lib/components/tabs-pane/index.js.map +0 -1
- package/lib/components/tag/index.d.ts +0 -9
- package/lib/components/tag/index.js +0 -75
- package/lib/components/tag/index.js.map +0 -1
- package/lib/components/textarea/index.d.ts +0 -13
- package/lib/components/textarea/index.js +0 -141
- package/lib/components/textarea/index.js.map +0 -1
- package/lib/components/timeline/index.d.ts +0 -8
- package/lib/components/timeline/index.js +0 -76
- package/lib/components/timeline/index.js.map +0 -1
- package/lib/components/toast/img.json +0 -8
- package/lib/components/toast/index.d.ts +0 -16
- package/lib/components/toast/index.js +0 -124
- package/lib/components/toast/index.js.map +0 -1
- package/lib/index.js +0 -109
- package/lib/index.js.map +0 -1
- package/lib/style/index.css.map +0 -1
- /package/{lib → dist}/common/component.d.ts +0 -0
- /package/{lib → dist}/common/component.js +0 -0
- /package/{lib → dist}/common/component.js.map +0 -0
- /package/{lib → dist}/components/calendar/common/constant.d.ts +0 -0
- /package/{lib → dist}/components/calendar/common/constant.js +0 -0
- /package/{lib → dist}/components/calendar/common/constant.js.map +0 -0
- /package/{lib → dist}/components/calendar/common/helper.d.ts +0 -0
- /package/{lib → dist}/components/calendar/common/helper.js +0 -0
- /package/{lib → dist}/components/calendar/common/helper.js.map +0 -0
- /package/{lib → dist}/components/calendar/common/plugins.d.ts +0 -0
- /package/{lib → dist}/components/calendar/common/plugins.js +0 -0
- /package/{lib → dist}/components/calendar/common/plugins.js.map +0 -0
- /package/{lib → dist}/style/components/accordion.scss +0 -0
- /package/{lib → dist}/style/components/action-sheet.scss +0 -0
- /package/{lib → dist}/style/components/activity-indicator.scss +0 -0
- /package/{lib → dist}/style/components/article.scss +0 -0
- /package/{lib → dist}/style/components/button.scss +0 -0
- /package/{lib → dist}/style/components/card.scss +0 -0
- /package/{lib → dist}/style/components/checkbox.scss +0 -0
- /package/{lib → dist}/style/components/curtain.scss +0 -0
- /package/{lib → dist}/style/components/divider.scss +0 -0
- /package/{lib → dist}/style/components/drawer.scss +0 -0
- /package/{lib → dist}/style/components/fab.scss +0 -0
- /package/{lib → dist}/style/components/float-layout.scss +0 -0
- /package/{lib → dist}/style/components/form.scss +0 -0
- /package/{lib → dist}/style/components/image-picker.scss +0 -0
- /package/{lib → dist}/style/components/index.scss +0 -0
- /package/{lib → dist}/style/components/indexes.scss +0 -0
- /package/{lib → dist}/style/components/input-number.scss +0 -0
- /package/{lib → dist}/style/components/list.scss +0 -0
- /package/{lib → dist}/style/components/load-more.scss +0 -0
- /package/{lib → dist}/style/components/loading.scss +0 -0
- /package/{lib → dist}/style/components/message.scss +0 -0
- /package/{lib → dist}/style/components/modal.scss +0 -0
- /package/{lib → dist}/style/components/nav-bar.scss +0 -0
- /package/{lib → dist}/style/components/noticebar.scss +0 -0
- /package/{lib → dist}/style/components/pagination.scss +0 -0
- /package/{lib → dist}/style/components/radio.scss +0 -0
- /package/{lib → dist}/style/components/range.scss +0 -0
- /package/{lib → dist}/style/components/rate.scss +0 -0
- /package/{lib → dist}/style/components/segmented-control.scss +0 -0
- /package/{lib → dist}/style/components/slider.scss +0 -0
- /package/{lib → dist}/style/components/swipe-action.scss +0 -0
- /package/{lib → dist}/style/components/switch.scss +0 -0
- /package/{lib → dist}/style/components/tab-bar.scss +0 -0
- /package/{lib → dist}/style/components/textarea.scss +0 -0
- /package/{lib → dist}/style/index.scss +0 -0
- /package/{lib → dist}/style/mixins/index.scss +0 -0
- /package/{lib → dist}/style/mixins/libs/absolute-center.scss +0 -0
- /package/{lib → dist}/style/mixins/libs/active.scss +0 -0
- /package/{lib → dist}/style/mixins/libs/alignhack.scss +0 -0
- /package/{lib → dist}/style/mixins/libs/border.scss +0 -0
- /package/{lib → dist}/style/mixins/libs/clearfix.scss +0 -0
- /package/{lib → dist}/style/mixins/libs/disabled.scss +0 -0
- /package/{lib → dist}/style/mixins/libs/flex.scss +0 -0
- /package/{lib → dist}/style/mixins/libs/line.scss +0 -0
- /package/{lib → dist}/style/mixins/libs/overlay.scss +0 -0
- /package/{lib → dist}/style/mixins/libs/placeholder.scss +0 -0
|
@@ -7,64 +7,64 @@
|
|
|
7
7
|
$hd: 2 !default; // 基本单位
|
|
8
8
|
|
|
9
9
|
/* The Color of O2Team Brand */
|
|
10
|
-
$color-brand: #
|
|
11
|
-
$color-brand-light: #
|
|
12
|
-
$color-brand-dark: #
|
|
10
|
+
$color-brand: #6190e8 !default;
|
|
11
|
+
$color-brand-light: #78a4f4 !default;
|
|
12
|
+
$color-brand-dark: #346fc2 !default;
|
|
13
13
|
|
|
14
14
|
/* Color */
|
|
15
|
-
$color-success: #
|
|
16
|
-
$color-error: #
|
|
17
|
-
$color-warning: #
|
|
18
|
-
$color-info: #
|
|
15
|
+
$color-success: #13ce66 !default;
|
|
16
|
+
$color-error: #ff4949 !default;
|
|
17
|
+
$color-warning: #ffc82c !default;
|
|
18
|
+
$color-info: #78a4fa !default;
|
|
19
19
|
|
|
20
20
|
/* Color Palette */
|
|
21
21
|
$color-black-0: #000 !default;
|
|
22
22
|
$color-black-1: #333 !default;
|
|
23
|
-
$color-black-2: #
|
|
24
|
-
$color-black-3: #
|
|
23
|
+
$color-black-2: #7f7f7f !default;
|
|
24
|
+
$color-black-3: #b2b2b2 !default;
|
|
25
25
|
|
|
26
26
|
$color-grey-0: #333 !default;
|
|
27
27
|
$color-grey-1: #666 !default;
|
|
28
28
|
$color-grey-2: #999 !default;
|
|
29
|
-
$color-grey-3: #
|
|
30
|
-
$color-grey-4: #
|
|
31
|
-
$color-grey-5: #
|
|
32
|
-
$color-grey-6: #
|
|
29
|
+
$color-grey-3: #ccc !default;
|
|
30
|
+
$color-grey-4: #e5e5e5 !default;
|
|
31
|
+
$color-grey-5: #f0f0f0 !default;
|
|
32
|
+
$color-grey-6: #f7f7f7 !default;
|
|
33
33
|
|
|
34
|
-
$color-white: #
|
|
34
|
+
$color-white: #fff !default;
|
|
35
35
|
|
|
36
36
|
/* Text Color */
|
|
37
37
|
$color-text-base: #333 !default; // 文字的基本色
|
|
38
|
-
$color-text-base-inverse: #
|
|
39
|
-
$color-text-secondary: #
|
|
40
|
-
$color-text-placeholder: #
|
|
41
|
-
$color-text-disabled: #
|
|
42
|
-
$color-text-title: #
|
|
43
|
-
$color-text-paragraph: #
|
|
38
|
+
$color-text-base-inverse: #fff !default; // 反色
|
|
39
|
+
$color-text-secondary: #36d57d !default; // 辅助色
|
|
40
|
+
$color-text-placeholder: #c9c9c9 !default;
|
|
41
|
+
$color-text-disabled: #ccc !default;
|
|
42
|
+
$color-text-title: #2c405a !default; // 文章标题
|
|
43
|
+
$color-text-paragraph: #3f536e !default; // 文章段落
|
|
44
44
|
|
|
45
45
|
/* Link */
|
|
46
|
-
$color-link: #
|
|
47
|
-
$color-link-hover: #
|
|
48
|
-
$color-link-active: #
|
|
49
|
-
$color-link-disabled: #
|
|
46
|
+
$color-link: #6190e8 !default;
|
|
47
|
+
$color-link-hover: #79a1eb !default;
|
|
48
|
+
$color-link-active: #4f7de2 !default;
|
|
49
|
+
$color-link-disabled: #bfbfbf !default;
|
|
50
50
|
|
|
51
51
|
/* 背景色 */
|
|
52
|
-
$color-bg: #
|
|
53
|
-
$color-bg-base: #
|
|
54
|
-
$color-bg-light: #
|
|
52
|
+
$color-bg: #fff !default;
|
|
53
|
+
$color-bg-base: #fafbfc !default;
|
|
54
|
+
$color-bg-light: #ecf5fd !default;
|
|
55
55
|
$color-bg-lighter: tint($color-bg-light, 50%) !default;
|
|
56
|
-
$color-bg-grey: #
|
|
56
|
+
$color-bg-grey: #f7f7f7 !default;
|
|
57
57
|
|
|
58
58
|
/* 边框颜色 */
|
|
59
|
-
$color-border-base: #
|
|
59
|
+
$color-border-base: #c5d9e8 !default;
|
|
60
60
|
$color-border-split: tint($color-border-base, 20%) !default; // 分割线
|
|
61
61
|
$color-border-light: tint($color-border-base, 30%) !default;
|
|
62
62
|
$color-border-lighter: tint($color-border-base, 50%) !default;
|
|
63
63
|
$color-border-lightest: tint($color-border-base, 80%) !default;
|
|
64
|
-
$color-border-grey: #
|
|
64
|
+
$color-border-grey: #ccc !default;
|
|
65
65
|
|
|
66
66
|
/* 图标颜色 */
|
|
67
|
-
$color-icon-base: #
|
|
67
|
+
$color-icon-base: #ccc !default;
|
|
68
68
|
|
|
69
69
|
/* Border Radius */
|
|
70
70
|
$border-radius-sm: 2px * $hd !default;
|
|
@@ -135,32 +135,32 @@ $timing-func: cubic-bezier(0.36, 0.66, 0.04, 1) !default;
|
|
|
135
135
|
* CSS cubic-bezier timing functions
|
|
136
136
|
* http://bourbon.io/docs/#timing-functions
|
|
137
137
|
*/
|
|
138
|
-
$ease-in-quad: cubic-bezier(0.
|
|
139
|
-
$ease-in-cubic: cubic-bezier(0.
|
|
140
|
-
$ease-in-quart: cubic-bezier(0.895, 0.
|
|
141
|
-
$ease-in-quint: cubic-bezier(0.755, 0.
|
|
142
|
-
$ease-in-sine: cubic-bezier(0.
|
|
143
|
-
$ease-in-expo: cubic-bezier(0.
|
|
144
|
-
$ease-in-circ: cubic-bezier(0.
|
|
145
|
-
$ease-in-back: cubic-bezier(0.
|
|
146
|
-
|
|
147
|
-
$ease-out-quad: cubic-bezier(0.
|
|
148
|
-
$ease-out-cubic: cubic-bezier(0.215, 0.
|
|
149
|
-
$ease-out-quart: cubic-bezier(0.165, 0.
|
|
150
|
-
$ease-out-quint: cubic-bezier(0.
|
|
151
|
-
$ease-out-sine: cubic-bezier(0.
|
|
152
|
-
$ease-out-expo: cubic-bezier(0.
|
|
153
|
-
$ease-out-circ: cubic-bezier(0.075, 0.
|
|
154
|
-
$ease-out-back: cubic-bezier(0.175, 0.885, 0.
|
|
155
|
-
|
|
156
|
-
$ease-in-out-quad: cubic-bezier(0.455, 0.
|
|
157
|
-
$ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1
|
|
158
|
-
$ease-in-out-quart: cubic-bezier(0.
|
|
159
|
-
$ease-in-out-quint: cubic-bezier(0.
|
|
160
|
-
$ease-in-out-sine: cubic-bezier(0.445, 0.
|
|
161
|
-
$ease-in-out-expo: cubic-bezier(1
|
|
162
|
-
$ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.
|
|
163
|
-
$ease-in-out-back: cubic-bezier(0.
|
|
138
|
+
$ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53) !default;
|
|
139
|
+
$ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19) !default;
|
|
140
|
+
$ease-in-quart: cubic-bezier(0.895, 0.03, 0.685, 0.22) !default;
|
|
141
|
+
$ease-in-quint: cubic-bezier(0.755, 0.05, 0.855, 0.06) !default;
|
|
142
|
+
$ease-in-sine: cubic-bezier(0.47, 0, 0.745, 0.715) !default;
|
|
143
|
+
$ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035) !default;
|
|
144
|
+
$ease-in-circ: cubic-bezier(0.6, 0.04, 0.98, 0.335) !default;
|
|
145
|
+
$ease-in-back: cubic-bezier(0.6, -0.28, 0.735, 0.045) !default;
|
|
146
|
+
|
|
147
|
+
$ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94) !default;
|
|
148
|
+
$ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1) !default;
|
|
149
|
+
$ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1) !default;
|
|
150
|
+
$ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1) !default;
|
|
151
|
+
$ease-out-sine: cubic-bezier(0.39, 0.575, 0.565, 1) !default;
|
|
152
|
+
$ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1) !default;
|
|
153
|
+
$ease-out-circ: cubic-bezier(0.075, 0.82, 0.165, 1) !default;
|
|
154
|
+
$ease-out-back: cubic-bezier(0.175, 0.885, 0.32, 1.275) !default;
|
|
155
|
+
|
|
156
|
+
$ease-in-out-quad: cubic-bezier(0.455, 0.03, 0.515, 0.955) !default;
|
|
157
|
+
$ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1) !default;
|
|
158
|
+
$ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1) !default;
|
|
159
|
+
$ease-in-out-quint: cubic-bezier(0.86, 0, 0.07, 1) !default;
|
|
160
|
+
$ease-in-out-sine: cubic-bezier(0.445, 0.05, 0.55, 0.95) !default;
|
|
161
|
+
$ease-in-out-expo: cubic-bezier(1, 0, 0, 1) !default;
|
|
162
|
+
$ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.15, 0.86) !default;
|
|
163
|
+
$ease-in-out-back: cubic-bezier(0.68, -0.55, 0.265, 1.55) !default;
|
|
164
164
|
|
|
165
165
|
/**
|
|
166
166
|
* 组件变量
|
|
@@ -201,21 +201,17 @@ $at-fab-size-sm: 40px * $hd !default;
|
|
|
201
201
|
$at-fab-icon-size: 24px * $hd !default;
|
|
202
202
|
$at-fab-bg-color: $color-brand;
|
|
203
203
|
$at-fab-bg-color-active: $color-brand-dark;
|
|
204
|
-
$at-fab-box-shadow:
|
|
205
|
-
0
|
|
206
|
-
|
|
207
|
-
0
|
|
208
|
-
$at-fab-box-shadow-active:
|
|
209
|
-
0 14px 16px -8px rgba(0, 0, 0, 0.2),
|
|
210
|
-
0 24px 34px 4px rgba(0, 0, 0, 0.14),
|
|
211
|
-
0 10px 44px 8px rgba(0, 0, 0, 0.12) !default;
|
|
204
|
+
$at-fab-box-shadow: 0 6px 10px -2px rgba(0, 0, 0, 0.2),
|
|
205
|
+
0 12px 20px 0 rgba(0, 0, 0, 0.14), 0 2px 36px 0 rgba(0, 0, 0, 0.12) !default;
|
|
206
|
+
$at-fab-box-shadow-active: 0 14px 16px -8px rgba(0, 0, 0, 0.2),
|
|
207
|
+
0 24px 34px 4px rgba(0, 0, 0, 0.14), 0 10px 44px 8px rgba(0, 0, 0, 0.12) !default;
|
|
212
208
|
|
|
213
209
|
/* Calendar */
|
|
214
210
|
$at-calendar-day-size: 72px !default;
|
|
215
211
|
$at-calendar-mark-size: 8px !default;
|
|
216
|
-
$at-calendar-header-color: #
|
|
212
|
+
$at-calendar-header-color: #b8bfc6 !default;
|
|
217
213
|
$at-calendar-main-color: $color-brand !default;
|
|
218
|
-
$at-calendar-day-color: #
|
|
214
|
+
$at-calendar-day-color: #7c86a2 !default;
|
|
219
215
|
|
|
220
216
|
/* Card */
|
|
221
217
|
$at-card-thumb-size: 32px !default;
|
|
@@ -238,7 +234,7 @@ $at-checkbox-desc-color: $color-grey-2 !default;
|
|
|
238
234
|
/* Countdown */
|
|
239
235
|
$at-countdown-font-size: $font-size-lg !default;
|
|
240
236
|
$at-countdown-num-color: $color-text-base !default;
|
|
241
|
-
$at-countdown-card-num-color: #
|
|
237
|
+
$at-countdown-card-num-color: #ff4949 !default;
|
|
242
238
|
$at-countdown-card-num-bg-color: $color-white !default;
|
|
243
239
|
|
|
244
240
|
/* Curtain */
|
|
@@ -330,8 +326,8 @@ $at-nav-bar-title-color: $color-text-base !default;
|
|
|
330
326
|
$at-nav-bar-link-color: $color-brand !default;
|
|
331
327
|
|
|
332
328
|
/* NoticeBar */
|
|
333
|
-
$at-noticebar-text-color: #
|
|
334
|
-
$at-noticebar-bg-color: #
|
|
329
|
+
$at-noticebar-text-color: #de8c17 !default;
|
|
330
|
+
$at-noticebar-bg-color: #fcf6ed !default;
|
|
335
331
|
$at-noticebar-font-size: $font-size-sm !default;
|
|
336
332
|
$at-noticebar-icon-size: 30px !default;
|
|
337
333
|
$at-noticebar-btn-close-size: 32px !default;
|
|
@@ -363,15 +359,15 @@ $at-radio-check-color: $color-brand !default;
|
|
|
363
359
|
/* Range */
|
|
364
360
|
$at-range-slider-size: 28PX !default;
|
|
365
361
|
$at-range-rail-height: 2PX !default;
|
|
366
|
-
$at-range-rail-bg-color: #
|
|
362
|
+
$at-range-rail-bg-color: #e9e9e9 !default;
|
|
367
363
|
$at-range-track-bg-color: $color-brand !default;
|
|
368
364
|
$at-range-slider-color: $color-white !default;
|
|
369
365
|
$at-range-slider-shadow: 0 0 4PX 0 rgba(0, 0, 0, 0.2) !default;
|
|
370
366
|
|
|
371
367
|
/* Rate */
|
|
372
368
|
$at-rate-icon-size: 20PX !default;
|
|
373
|
-
$at-rate-star-color: #
|
|
374
|
-
$at-rate-star-color-on: #
|
|
369
|
+
$at-rate-star-color: #ececec !default;
|
|
370
|
+
$at-rate-star-color-on: #ffca3e !default;
|
|
375
371
|
|
|
376
372
|
/* SearchBar */
|
|
377
373
|
$at-search-bar-btn-color: $color-white !default;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { InferProps } from 'prop-types';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { AtAccordionProps, AtAccordionState } from '../../../types/accordion';
|
|
4
|
-
export default class AtAccordion extends React.Component<AtAccordionProps, AtAccordionState> {
|
|
5
|
-
private isCompleted;
|
|
6
|
-
private startOpen;
|
|
7
|
-
static defaultProps: AtAccordionProps;
|
|
8
|
-
static propTypes: InferProps<AtAccordionProps>;
|
|
9
|
-
constructor(props: AtAccordionProps);
|
|
10
|
-
private handleClick;
|
|
11
|
-
private toggleWithAnimation;
|
|
12
|
-
UNSAFE_componentWillReceiveProps(nextProps: AtAccordionProps): void;
|
|
13
|
-
render(): JSX.Element;
|
|
14
|
-
}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import classNames from "classnames";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { Text, View } from "@tarojs/components";
|
|
5
|
-
import { delayQuerySelector, uuid } from "../../common/utils";
|
|
6
|
-
class AtAccordion extends React.Component {
|
|
7
|
-
constructor(props) {
|
|
8
|
-
super(props);
|
|
9
|
-
this.handleClick = (event) => {
|
|
10
|
-
const { open } = this.props;
|
|
11
|
-
if (!this.isCompleted) return;
|
|
12
|
-
this.props.onClick && this.props.onClick(!open, event);
|
|
13
|
-
};
|
|
14
|
-
this.isCompleted = true;
|
|
15
|
-
this.startOpen = false;
|
|
16
|
-
this.state = {
|
|
17
|
-
componentId: uuid(),
|
|
18
|
-
wrapperHeight: 0
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
toggleWithAnimation() {
|
|
22
|
-
const { open, isAnimation } = this.props;
|
|
23
|
-
const { componentId } = this.state;
|
|
24
|
-
if (!this.isCompleted || !isAnimation) return;
|
|
25
|
-
this.isCompleted = false;
|
|
26
|
-
delayQuerySelector(`#at-accordion__body-${componentId}`, 0).then((rect) => {
|
|
27
|
-
const height = parseInt(rect[0].height.toString());
|
|
28
|
-
const startHeight = open ? height : 0;
|
|
29
|
-
const endHeight = open ? 0 : height;
|
|
30
|
-
this.startOpen = false;
|
|
31
|
-
this.setState(
|
|
32
|
-
{
|
|
33
|
-
wrapperHeight: startHeight
|
|
34
|
-
},
|
|
35
|
-
() => {
|
|
36
|
-
setTimeout(() => {
|
|
37
|
-
this.setState(
|
|
38
|
-
{
|
|
39
|
-
wrapperHeight: endHeight
|
|
40
|
-
},
|
|
41
|
-
() => {
|
|
42
|
-
setTimeout(() => {
|
|
43
|
-
this.isCompleted = true;
|
|
44
|
-
this.setState({});
|
|
45
|
-
}, 700);
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
}, 100);
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
54
|
-
if (nextProps.open !== this.props.open) {
|
|
55
|
-
this.startOpen = !!nextProps.open && !!nextProps.isAnimation;
|
|
56
|
-
this.toggleWithAnimation();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
render() {
|
|
60
|
-
const { customStyle, className, title, icon, hasBorder, open, note } = this.props;
|
|
61
|
-
const { wrapperHeight } = this.state;
|
|
62
|
-
const rootCls = classNames("at-accordion", className);
|
|
63
|
-
const prefixClass = icon && icon.prefixClass || "at-icon";
|
|
64
|
-
const iconCls = classNames({
|
|
65
|
-
[prefixClass]: true,
|
|
66
|
-
[`${prefixClass}-${icon && icon.value}`]: icon && icon.value,
|
|
67
|
-
"at-accordion__icon": true
|
|
68
|
-
});
|
|
69
|
-
const headerCls = classNames("at-accordion__header", {
|
|
70
|
-
"at-accordion__header--noborder": !hasBorder
|
|
71
|
-
});
|
|
72
|
-
const arrowCls = classNames("at-accordion__arrow", {
|
|
73
|
-
"at-accordion__arrow--folded": !!open
|
|
74
|
-
});
|
|
75
|
-
const contentCls = classNames("at-accordion__content", {
|
|
76
|
-
"at-accordion__content--inactive": !open && this.isCompleted || this.startOpen
|
|
77
|
-
});
|
|
78
|
-
const iconStyle = {
|
|
79
|
-
color: icon && icon.color || "",
|
|
80
|
-
fontSize: icon && `${icon.size}px` || ""
|
|
81
|
-
};
|
|
82
|
-
const contentStyle = { height: `${wrapperHeight}px` };
|
|
83
|
-
if (this.isCompleted) {
|
|
84
|
-
contentStyle.height = "";
|
|
85
|
-
}
|
|
86
|
-
const { componentId } = this.state;
|
|
87
|
-
return /* @__PURE__ */ React.createElement(View, { className: rootCls, style: customStyle }, /* @__PURE__ */ React.createElement(View, { className: headerCls, onClick: this.handleClick }, icon && icon.value && /* @__PURE__ */ React.createElement(Text, { className: iconCls, style: iconStyle }), /* @__PURE__ */ React.createElement(View, { className: "at-accordion__info" }, /* @__PURE__ */ React.createElement(View, { className: "at-accordion__info__title" }, title), /* @__PURE__ */ React.createElement(View, { className: "at-accordion__info__note" }, note)), /* @__PURE__ */ React.createElement(View, { className: arrowCls }, /* @__PURE__ */ React.createElement(Text, { className: "at-icon at-icon-chevron-down" }))), /* @__PURE__ */ React.createElement(View, { style: contentStyle, className: contentCls }, /* @__PURE__ */ React.createElement(
|
|
88
|
-
View,
|
|
89
|
-
{
|
|
90
|
-
id: `at-accordion__body-${componentId}`,
|
|
91
|
-
className: "at-accordion__body"
|
|
92
|
-
},
|
|
93
|
-
this.props.children
|
|
94
|
-
)));
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
AtAccordion.defaultProps = {
|
|
98
|
-
open: false,
|
|
99
|
-
customStyle: "",
|
|
100
|
-
className: "",
|
|
101
|
-
title: "",
|
|
102
|
-
note: "",
|
|
103
|
-
icon: { value: "" },
|
|
104
|
-
hasBorder: true,
|
|
105
|
-
isAnimation: true
|
|
106
|
-
};
|
|
107
|
-
AtAccordion.propTypes = {
|
|
108
|
-
customStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
109
|
-
className: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),
|
|
110
|
-
open: PropTypes.bool,
|
|
111
|
-
isAnimation: PropTypes.bool,
|
|
112
|
-
title: PropTypes.string,
|
|
113
|
-
note: PropTypes.string,
|
|
114
|
-
icon: PropTypes.object,
|
|
115
|
-
hasBorder: PropTypes.bool,
|
|
116
|
-
onClick: PropTypes.func
|
|
117
|
-
};
|
|
118
|
-
export {
|
|
119
|
-
AtAccordion as default
|
|
120
|
-
};
|
|
121
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/accordion/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport PropTypes, { InferProps } from 'prop-types'\nimport React from 'react'\nimport { Text, View } from '@tarojs/components'\nimport { CommonEvent } from '@tarojs/components/types/common'\nimport { AtAccordionProps, AtAccordionState } from '../../../types/accordion'\nimport { delayQuerySelector, uuid } from '../../common/utils'\n\nexport default class AtAccordion extends React.Component<\n AtAccordionProps,\n AtAccordionState\n> {\n private isCompleted: boolean\n private startOpen: boolean\n\n public static defaultProps: AtAccordionProps\n public static propTypes: InferProps<AtAccordionProps>\n\n public constructor(props: AtAccordionProps) {\n super(props)\n this.isCompleted = true\n this.startOpen = false\n this.state = {\n componentId: uuid(),\n wrapperHeight: 0\n }\n }\n\n private handleClick = (event: CommonEvent): void => {\n const { open } = this.props\n if (!this.isCompleted) return\n\n this.props.onClick && this.props.onClick(!open, event)\n }\n\n private toggleWithAnimation(): void {\n const { open, isAnimation } = this.props\n const { componentId } = this.state\n if (!this.isCompleted || !isAnimation) return\n\n this.isCompleted = false\n\n delayQuerySelector(`#at-accordion__body-${componentId}`, 0).then(rect => {\n const height = parseInt(rect[0].height.toString())\n const startHeight = open ? height : 0\n const endHeight = open ? 0 : height\n this.startOpen = false\n this.setState(\n {\n wrapperHeight: startHeight\n },\n () => {\n setTimeout(() => {\n this.setState(\n {\n wrapperHeight: endHeight\n },\n () => {\n setTimeout(() => {\n this.isCompleted = true\n this.setState({})\n }, 700)\n }\n )\n }, 100)\n }\n )\n })\n }\n\n public UNSAFE_componentWillReceiveProps(nextProps: AtAccordionProps): void {\n if (nextProps.open !== this.props.open) {\n this.startOpen = !!nextProps.open && !!nextProps.isAnimation\n this.toggleWithAnimation()\n }\n }\n\n public render(): JSX.Element {\n const { customStyle, className, title, icon, hasBorder, open, note } =\n this.props\n const { wrapperHeight } = this.state\n\n const rootCls = classNames('at-accordion', className)\n const prefixClass = (icon && icon.prefixClass) || 'at-icon'\n const iconCls = classNames({\n [prefixClass]: true,\n [`${prefixClass}-${icon && icon.value}`]: icon && icon.value,\n 'at-accordion__icon': true\n })\n const headerCls = classNames('at-accordion__header', {\n 'at-accordion__header--noborder': !hasBorder\n })\n const arrowCls = classNames('at-accordion__arrow', {\n 'at-accordion__arrow--folded': !!open\n })\n const contentCls = classNames('at-accordion__content', {\n 'at-accordion__content--inactive':\n (!open && this.isCompleted) || this.startOpen\n })\n const iconStyle = {\n color: (icon && icon.color) || '',\n fontSize: (icon && `${icon.size}px`) || ''\n }\n const contentStyle = { height: `${wrapperHeight}px` }\n\n if (this.isCompleted) {\n contentStyle.height = ''\n }\n\n const { componentId } = this.state\n\n return (\n <View className={rootCls} style={customStyle}>\n <View className={headerCls} onClick={this.handleClick}>\n {icon && icon.value && (\n <Text className={iconCls} style={iconStyle}></Text>\n )}\n <View className='at-accordion__info'>\n <View className='at-accordion__info__title'>{title}</View>\n <View className='at-accordion__info__note'>{note}</View>\n </View>\n <View className={arrowCls}>\n <Text className='at-icon at-icon-chevron-down'></Text>\n </View>\n </View>\n <View style={contentStyle} className={contentCls}>\n <View\n id={`at-accordion__body-${componentId}`}\n className='at-accordion__body'\n >\n {this.props.children}\n </View>\n </View>\n </View>\n )\n }\n}\n\nAtAccordion.defaultProps = {\n open: false,\n customStyle: '',\n className: '',\n title: '',\n note: '',\n icon: { value: '' },\n hasBorder: true,\n isAnimation: true\n}\n\nAtAccordion.propTypes = {\n customStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),\n className: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),\n open: PropTypes.bool,\n isAnimation: PropTypes.bool,\n title: PropTypes.string,\n note: PropTypes.string,\n icon: PropTypes.object,\n hasBorder: PropTypes.bool,\n onClick: PropTypes.func\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,OAAO,eAA+B;AACtC,OAAO,WAAW;AAClB,SAAS,MAAM,YAAY;AAG3B,SAAS,oBAAoB,YAAY;AAEzC,MAAO,oBAAkC,MAAM,UAG7C;AAAA,EAOO,YAAY,OAAyB;AAC1C,UAAM,KAAK;AASb,SAAQ,cAAc,CAAC,UAA6B;AAClD,YAAM,EAAE,KAAK,IAAI,KAAK;AACtB,UAAI,CAAC,KAAK,YAAa;AAEvB,WAAK,MAAM,WAAW,KAAK,MAAM,QAAQ,CAAC,MAAM,KAAK;AAAA,IACvD;AAbE,SAAK,cAAc;AACnB,SAAK,YAAY;AACjB,SAAK,QAAQ;AAAA,MACX,aAAa,KAAK;AAAA,MAClB,eAAe;AAAA,IACjB;AAAA,EACF;AAAA,EASQ,sBAA4B;AAClC,UAAM,EAAE,MAAM,YAAY,IAAI,KAAK;AACnC,UAAM,EAAE,YAAY,IAAI,KAAK;AAC7B,QAAI,CAAC,KAAK,eAAe,CAAC,YAAa;AAEvC,SAAK,cAAc;AAEnB,uBAAmB,uBAAuB,WAAW,IAAI,CAAC,EAAE,KAAK,UAAQ;AACvE,YAAM,SAAS,SAAS,KAAK,CAAC,EAAE,OAAO,SAAS,CAAC;AACjD,YAAM,cAAc,OAAO,SAAS;AACpC,YAAM,YAAY,OAAO,IAAI;AAC7B,WAAK,YAAY;AACjB,WAAK;AAAA,QACH;AAAA,UACE,eAAe;AAAA,QACjB;AAAA,QACA,MAAM;AACJ,qBAAW,MAAM;AACf,iBAAK;AAAA,cACH;AAAA,gBACE,eAAe;AAAA,cACjB;AAAA,cACA,MAAM;AACJ,2BAAW,MAAM;AACf,uBAAK,cAAc;AACnB,uBAAK,SAAS,CAAC,CAAC;AAAA,gBAClB,GAAG,GAAG;AAAA,cACR;AAAA,YACF;AAAA,UACF,GAAG,GAAG;AAAA,QACR;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEO,iCAAiC,WAAmC;AACzE,QAAI,UAAU,SAAS,KAAK,MAAM,MAAM;AACtC,WAAK,YAAY,CAAC,CAAC,UAAU,QAAQ,CAAC,CAAC,UAAU;AACjD,WAAK,oBAAoB;AAAA,IAC3B;AAAA,EACF;AAAA,EAEO,SAAsB;AAC3B,UAAM,EAAE,aAAa,WAAW,OAAO,MAAM,WAAW,MAAM,KAAK,IACjE,KAAK;AACP,UAAM,EAAE,cAAc,IAAI,KAAK;AAE/B,UAAM,UAAU,WAAW,gBAAgB,SAAS;AACpD,UAAM,cAAe,QAAQ,KAAK,eAAgB;AAClD,UAAM,UAAU,WAAW;AAAA,MACzB,CAAC,WAAW,GAAG;AAAA,MACf,CAAC,GAAG,WAAW,IAAI,QAAQ,KAAK,KAAK,EAAE,GAAG,QAAQ,KAAK;AAAA,MACvD,sBAAsB;AAAA,IACxB,CAAC;AACD,UAAM,YAAY,WAAW,wBAAwB;AAAA,MACnD,kCAAkC,CAAC;AAAA,IACrC,CAAC;AACD,UAAM,WAAW,WAAW,uBAAuB;AAAA,MACjD,+BAA+B,CAAC,CAAC;AAAA,IACnC,CAAC;AACD,UAAM,aAAa,WAAW,yBAAyB;AAAA,MACrD,mCACG,CAAC,QAAQ,KAAK,eAAgB,KAAK;AAAA,IACxC,CAAC;AACD,UAAM,YAAY;AAAA,MAChB,OAAQ,QAAQ,KAAK,SAAU;AAAA,MAC/B,UAAW,QAAQ,GAAG,KAAK,IAAI,QAAS;AAAA,IAC1C;AACA,UAAM,eAAe,EAAE,QAAQ,GAAG,aAAa,KAAK;AAEpD,QAAI,KAAK,aAAa;AACpB,mBAAa,SAAS;AAAA,IACxB;AAEA,UAAM,EAAE,YAAY,IAAI,KAAK;AAE7B,WACE,oCAAC,QAAK,WAAW,SAAS,OAAO,eAC/B,oCAAC,QAAK,WAAW,WAAW,SAAS,KAAK,eACvC,QAAQ,KAAK,SACZ,oCAAC,QAAK,WAAW,SAAS,OAAO,WAAW,GAE9C,oCAAC,QAAK,WAAU,wBACd,oCAAC,QAAK,WAAU,+BAA6B,KAAM,GACnD,oCAAC,QAAK,WAAU,8BAA4B,IAAK,CACnD,GACA,oCAAC,QAAK,WAAW,YACf,oCAAC,QAAK,WAAU,gCAA+B,CACjD,CACF,GACA,oCAAC,QAAK,OAAO,cAAc,WAAW,cACpC;AAAA,MAAC;AAAA;AAAA,QACC,IAAI,sBAAsB,WAAW;AAAA,QACrC,WAAU;AAAA;AAAA,MAET,KAAK,MAAM;AAAA,IACd,CACF,CACF;AAAA,EAEJ;AACF;AAEA,YAAY,eAAe;AAAA,EACzB,MAAM;AAAA,EACN,aAAa;AAAA,EACb,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM,EAAE,OAAO,GAAG;AAAA,EAClB,WAAW;AAAA,EACX,aAAa;AACf;AAEA,YAAY,YAAY;AAAA,EACtB,aAAa,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AAAA,EACrE,WAAW,UAAU,UAAU,CAAC,UAAU,OAAO,UAAU,MAAM,CAAC;AAAA,EAClE,MAAM,UAAU;AAAA,EAChB,aAAa,UAAU;AAAA,EACvB,OAAO,UAAU;AAAA,EACjB,MAAM,UAAU;AAAA,EAChB,MAAM,UAAU;AAAA,EAChB,WAAW,UAAU;AAAA,EACrB,SAAS,UAAU;AACrB;","names":[]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import classNames from "classnames";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { View } from "@tarojs/components";
|
|
4
|
-
class AtActionSheetBody extends React.Component {
|
|
5
|
-
render() {
|
|
6
|
-
const rootClass = classNames("at-action-sheet__body", this.props.className);
|
|
7
|
-
return /* @__PURE__ */ React.createElement(View, { className: rootClass }, this.props.children);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export {
|
|
11
|
-
AtActionSheetBody as default
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/action-sheet/body/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport React from 'react'\nimport { View } from '@tarojs/components'\nimport { AtActionSheetBodyProps } from '../../../../types/action-sheet'\n\nexport default class AtActionSheetBody extends React.Component<AtActionSheetBodyProps> {\n public render(): JSX.Element {\n const rootClass = classNames('at-action-sheet__body', this.props.className)\n return <View className={rootClass}>{this.props.children}</View>\n }\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,OAAO,WAAW;AAClB,SAAS,YAAY;AAGrB,MAAO,0BAAwC,MAAM,UAAkC;AAAA,EAC9E,SAAsB;AAC3B,UAAM,YAAY,WAAW,yBAAyB,KAAK,MAAM,SAAS;AAC1E,WAAO,oCAAC,QAAK,WAAW,aAAY,KAAK,MAAM,QAAS;AAAA,EAC1D;AACF;","names":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { InferProps } from 'prop-types';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { AtActionSheetItemProps } from '../../../../../types/action-sheet';
|
|
4
|
-
export default class AtActionSheetItem extends React.Component<AtActionSheetItemProps> {
|
|
5
|
-
static defaultProps: AtActionSheetItemProps;
|
|
6
|
-
static propTypes: InferProps<AtActionSheetItemProps>;
|
|
7
|
-
private handleClick;
|
|
8
|
-
render(): JSX.Element;
|
|
9
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import classNames from "classnames";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { View } from "@tarojs/components";
|
|
5
|
-
class AtActionSheetItem extends React.Component {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.handleClick = (args) => {
|
|
9
|
-
if (typeof this.props.onClick === "function") {
|
|
10
|
-
this.props.onClick(args);
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
const rootClass = classNames("at-action-sheet__item", this.props.className);
|
|
16
|
-
return /* @__PURE__ */ React.createElement(View, { className: rootClass, onClick: this.handleClick }, this.props.children);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
AtActionSheetItem.propTypes = {
|
|
20
|
-
onClick: PropTypes.func
|
|
21
|
-
};
|
|
22
|
-
export {
|
|
23
|
-
AtActionSheetItem as default
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/action-sheet/body/item/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport PropTypes, { InferProps } from 'prop-types'\nimport React from 'react'\nimport { View } from '@tarojs/components'\nimport { AtActionSheetItemProps } from '../../../../../types/action-sheet'\n\nexport default class AtActionSheetItem extends React.Component<AtActionSheetItemProps> {\n public static defaultProps: AtActionSheetItemProps\n public static propTypes: InferProps<AtActionSheetItemProps>\n\n private handleClick = (args: any): void => {\n if (typeof this.props.onClick === 'function') {\n this.props.onClick(args)\n }\n }\n\n public render(): JSX.Element {\n const rootClass = classNames('at-action-sheet__item', this.props.className)\n\n return (\n <View className={rootClass} onClick={this.handleClick}>\n {this.props.children}\n </View>\n )\n }\n}\n\nAtActionSheetItem.propTypes = {\n onClick: PropTypes.func\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,OAAO,eAA+B;AACtC,OAAO,WAAW;AAClB,SAAS,YAAY;AAGrB,MAAO,0BAAwC,MAAM,UAAkC;AAAA,EAAvF;AAAA;AAIE,SAAQ,cAAc,CAAC,SAAoB;AACzC,UAAI,OAAO,KAAK,MAAM,YAAY,YAAY;AAC5C,aAAK,MAAM,QAAQ,IAAI;AAAA,MACzB;AAAA,IACF;AAAA;AAAA,EAEO,SAAsB;AAC3B,UAAM,YAAY,WAAW,yBAAyB,KAAK,MAAM,SAAS;AAE1E,WACE,oCAAC,QAAK,WAAW,WAAW,SAAS,KAAK,eACvC,KAAK,MAAM,QACd;AAAA,EAEJ;AACF;AAEA,kBAAkB,YAAY;AAAA,EAC5B,SAAS,UAAU;AACrB;","names":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { InferProps } from 'prop-types';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { AtActionSheetFooterProps } from '../../../../types/action-sheet';
|
|
4
|
-
export default class AtActionSheetFooter extends React.Component<AtActionSheetFooterProps> {
|
|
5
|
-
static defaultProps: AtActionSheetFooterProps;
|
|
6
|
-
static propTypes: InferProps<AtActionSheetFooterProps>;
|
|
7
|
-
private handleClick;
|
|
8
|
-
render(): JSX.Element;
|
|
9
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import classNames from "classnames";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { View } from "@tarojs/components";
|
|
5
|
-
class AtActionSheetFooter extends React.Component {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.handleClick = (...args) => {
|
|
9
|
-
if (typeof this.props.onClick === "function") {
|
|
10
|
-
this.props.onClick(...args);
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
const rootClass = classNames(
|
|
16
|
-
"at-action-sheet__footer",
|
|
17
|
-
this.props.className
|
|
18
|
-
);
|
|
19
|
-
return /* @__PURE__ */ React.createElement(View, { onClick: this.handleClick, className: rootClass }, this.props.children);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
AtActionSheetFooter.propTypes = {
|
|
23
|
-
onClick: PropTypes.func
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
AtActionSheetFooter as default
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/action-sheet/footer/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport PropTypes, { InferProps } from 'prop-types'\nimport React from 'react'\nimport { View } from '@tarojs/components'\nimport { AtActionSheetFooterProps } from '../../../../types/action-sheet'\n\nexport default class AtActionSheetFooter extends React.Component<AtActionSheetFooterProps> {\n public static defaultProps: AtActionSheetFooterProps\n public static propTypes: InferProps<AtActionSheetFooterProps>\n\n private handleClick = (...args: any[]): void => {\n if (typeof this.props.onClick === 'function') {\n this.props.onClick(...args)\n }\n }\n\n public render(): JSX.Element {\n const rootClass = classNames(\n 'at-action-sheet__footer',\n this.props.className\n )\n\n return (\n <View onClick={this.handleClick} className={rootClass}>\n {this.props.children}\n </View>\n )\n }\n}\n\nAtActionSheetFooter.propTypes = {\n onClick: PropTypes.func\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,OAAO,eAA+B;AACtC,OAAO,WAAW;AAClB,SAAS,YAAY;AAGrB,MAAO,4BAA0C,MAAM,UAAoC;AAAA,EAA3F;AAAA;AAIE,SAAQ,cAAc,IAAI,SAAsB;AAC9C,UAAI,OAAO,KAAK,MAAM,YAAY,YAAY;AAC5C,aAAK,MAAM,QAAQ,GAAG,IAAI;AAAA,MAC5B;AAAA,IACF;AAAA;AAAA,EAEO,SAAsB;AAC3B,UAAM,YAAY;AAAA,MAChB;AAAA,MACA,KAAK,MAAM;AAAA,IACb;AAEA,WACE,oCAAC,QAAK,SAAS,KAAK,aAAa,WAAW,aACzC,KAAK,MAAM,QACd;AAAA,EAEJ;AACF;AAEA,oBAAoB,YAAY;AAAA,EAC9B,SAAS,UAAU;AACrB;","names":[]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import classNames from "classnames";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { View } from "@tarojs/components";
|
|
4
|
-
class AtActionSheetHeader extends React.Component {
|
|
5
|
-
render() {
|
|
6
|
-
const rootClass = classNames(
|
|
7
|
-
"at-action-sheet__header",
|
|
8
|
-
this.props.className
|
|
9
|
-
);
|
|
10
|
-
return /* @__PURE__ */ React.createElement(View, { className: rootClass }, this.props.children);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export {
|
|
14
|
-
AtActionSheetHeader as default
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/action-sheet/header/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport React from 'react'\nimport { View } from '@tarojs/components'\nimport { AtActionSheetHeaderProps } from '../../../../types/action-sheet'\n\nexport default class AtActionSheetHeader extends React.Component<AtActionSheetHeaderProps> {\n public render(): JSX.Element {\n const rootClass = classNames(\n 'at-action-sheet__header',\n this.props.className\n )\n\n return <View className={rootClass}>{this.props.children}</View>\n }\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,OAAO,WAAW;AAClB,SAAS,YAAY;AAGrB,MAAO,4BAA0C,MAAM,UAAoC;AAAA,EAClF,SAAsB;AAC3B,UAAM,YAAY;AAAA,MAChB;AAAA,MACA,KAAK,MAAM;AAAA,IACb;AAEA,WAAO,oCAAC,QAAK,WAAW,aAAY,KAAK,MAAM,QAAS;AAAA,EAC1D;AACF;","names":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { InferProps } from 'prop-types';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { AtActionSheetProps, AtActionSheetState } from '../../../types/action-sheet';
|
|
4
|
-
export default class AtActionSheet extends React.Component<AtActionSheetProps, AtActionSheetState> {
|
|
5
|
-
static defaultProps: AtActionSheetProps;
|
|
6
|
-
static propTypes: InferProps<AtActionSheetProps>;
|
|
7
|
-
constructor(props: AtActionSheetProps);
|
|
8
|
-
UNSAFE_componentWillReceiveProps(nextProps: AtActionSheetProps): void;
|
|
9
|
-
private handleClose;
|
|
10
|
-
private handleCancel;
|
|
11
|
-
private close;
|
|
12
|
-
private handleTouchMove;
|
|
13
|
-
render(): JSX.Element;
|
|
14
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import classNames from "classnames";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { View } from "@tarojs/components";
|
|
5
|
-
import AtActionSheetBody from "./body/index";
|
|
6
|
-
import AtActionSheetFooter from "./footer/index";
|
|
7
|
-
import AtActionSheetHeader from "./header/index";
|
|
8
|
-
class AtActionSheet extends React.Component {
|
|
9
|
-
constructor(props) {
|
|
10
|
-
super(props);
|
|
11
|
-
this.handleClose = () => {
|
|
12
|
-
if (typeof this.props.onClose === "function") {
|
|
13
|
-
this.props.onClose();
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
this.handleCancel = () => {
|
|
17
|
-
if (typeof this.props.onCancel === "function") {
|
|
18
|
-
return this.props.onCancel();
|
|
19
|
-
}
|
|
20
|
-
this.close();
|
|
21
|
-
};
|
|
22
|
-
this.close = () => {
|
|
23
|
-
this.setState(
|
|
24
|
-
{
|
|
25
|
-
_isOpened: false
|
|
26
|
-
},
|
|
27
|
-
this.handleClose
|
|
28
|
-
);
|
|
29
|
-
};
|
|
30
|
-
this.handleTouchMove = (e) => {
|
|
31
|
-
e.stopPropagation();
|
|
32
|
-
e.preventDefault();
|
|
33
|
-
};
|
|
34
|
-
const { isOpened } = props;
|
|
35
|
-
this.state = {
|
|
36
|
-
_isOpened: isOpened
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
40
|
-
const { isOpened } = nextProps;
|
|
41
|
-
if (isOpened !== this.state._isOpened) {
|
|
42
|
-
this.setState({
|
|
43
|
-
_isOpened: isOpened
|
|
44
|
-
});
|
|
45
|
-
!isOpened && this.handleClose();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
render() {
|
|
49
|
-
const { title, cancelText, className } = this.props;
|
|
50
|
-
const { _isOpened } = this.state;
|
|
51
|
-
const rootClass = classNames(
|
|
52
|
-
"at-action-sheet",
|
|
53
|
-
{
|
|
54
|
-
"at-action-sheet--active": _isOpened
|
|
55
|
-
},
|
|
56
|
-
className
|
|
57
|
-
);
|
|
58
|
-
return /* @__PURE__ */ React.createElement(View, { className: rootClass, onTouchMove: this.handleTouchMove }, /* @__PURE__ */ React.createElement(View, { onClick: this.close, className: "at-action-sheet__overlay" }), /* @__PURE__ */ React.createElement(View, { className: "at-action-sheet__container" }, title && /* @__PURE__ */ React.createElement(AtActionSheetHeader, null, title), /* @__PURE__ */ React.createElement(AtActionSheetBody, null, this.props.children), cancelText && /* @__PURE__ */ React.createElement(AtActionSheetFooter, { onClick: this.handleCancel }, cancelText)));
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
AtActionSheet.defaultProps = {
|
|
62
|
-
title: "",
|
|
63
|
-
cancelText: "",
|
|
64
|
-
isOpened: false
|
|
65
|
-
};
|
|
66
|
-
AtActionSheet.propTypes = {
|
|
67
|
-
title: PropTypes.string,
|
|
68
|
-
onClose: PropTypes.func,
|
|
69
|
-
onCancel: PropTypes.func,
|
|
70
|
-
isOpened: PropTypes.bool.isRequired,
|
|
71
|
-
cancelText: PropTypes.string
|
|
72
|
-
};
|
|
73
|
-
export {
|
|
74
|
-
AtActionSheet as default
|
|
75
|
-
};
|
|
76
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/action-sheet/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 {\n AtActionSheetProps,\n AtActionSheetState\n} from '../../../types/action-sheet'\nimport AtActionSheetBody from './body/index'\nimport AtActionSheetFooter from './footer/index'\nimport AtActionSheetHeader from './header/index'\n\nexport default class AtActionSheet extends React.Component<\n AtActionSheetProps,\n AtActionSheetState\n> {\n public static defaultProps: AtActionSheetProps\n public static propTypes: InferProps<AtActionSheetProps>\n\n public constructor(props: AtActionSheetProps) {\n super(props)\n const { isOpened } = props\n\n this.state = {\n _isOpened: isOpened\n }\n }\n\n public UNSAFE_componentWillReceiveProps(nextProps: AtActionSheetProps): void {\n const { isOpened } = nextProps\n if (isOpened !== this.state._isOpened) {\n this.setState({\n _isOpened: isOpened\n })\n\n !isOpened && this.handleClose()\n }\n }\n\n private handleClose = (): void => {\n if (typeof this.props.onClose === 'function') {\n this.props.onClose()\n }\n }\n\n private handleCancel = (): void => {\n if (typeof this.props.onCancel === 'function') {\n return this.props.onCancel()\n }\n this.close()\n }\n\n private close = (): void => {\n this.setState(\n {\n _isOpened: false\n },\n this.handleClose\n )\n }\n\n private handleTouchMove = (e: CommonEvent): void => {\n e.stopPropagation()\n e.preventDefault()\n }\n\n public render(): JSX.Element {\n const { title, cancelText, className } = this.props\n const { _isOpened } = this.state\n\n const rootClass = classNames(\n 'at-action-sheet',\n {\n 'at-action-sheet--active': _isOpened\n },\n className\n )\n\n return (\n <View className={rootClass} onTouchMove={this.handleTouchMove}>\n <View onClick={this.close} className='at-action-sheet__overlay' />\n <View className='at-action-sheet__container'>\n {title && <AtActionSheetHeader>{title}</AtActionSheetHeader>}\n <AtActionSheetBody>{this.props.children}</AtActionSheetBody>\n {cancelText && (\n <AtActionSheetFooter onClick={this.handleCancel}>\n {cancelText}\n </AtActionSheetFooter>\n )}\n </View>\n </View>\n )\n }\n}\n\nAtActionSheet.defaultProps = {\n title: '',\n cancelText: '',\n isOpened: false\n}\n\nAtActionSheet.propTypes = {\n title: PropTypes.string,\n onClose: PropTypes.func,\n onCancel: PropTypes.func,\n isOpened: PropTypes.bool.isRequired,\n cancelText: PropTypes.string\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,OAAO,eAA+B;AACtC,OAAO,WAAW;AAClB,SAAS,YAAY;AAMrB,OAAO,uBAAuB;AAC9B,OAAO,yBAAyB;AAChC,OAAO,yBAAyB;AAEhC,MAAO,sBAAoC,MAAM,UAG/C;AAAA,EAIO,YAAY,OAA2B;AAC5C,UAAM,KAAK;AAmBb,SAAQ,cAAc,MAAY;AAChC,UAAI,OAAO,KAAK,MAAM,YAAY,YAAY;AAC5C,aAAK,MAAM,QAAQ;AAAA,MACrB;AAAA,IACF;AAEA,SAAQ,eAAe,MAAY;AACjC,UAAI,OAAO,KAAK,MAAM,aAAa,YAAY;AAC7C,eAAO,KAAK,MAAM,SAAS;AAAA,MAC7B;AACA,WAAK,MAAM;AAAA,IACb;AAEA,SAAQ,QAAQ,MAAY;AAC1B,WAAK;AAAA,QACH;AAAA,UACE,WAAW;AAAA,QACb;AAAA,QACA,KAAK;AAAA,MACP;AAAA,IACF;AAEA,SAAQ,kBAAkB,CAAC,MAAyB;AAClD,QAAE,gBAAgB;AAClB,QAAE,eAAe;AAAA,IACnB;AA3CE,UAAM,EAAE,SAAS,IAAI;AAErB,SAAK,QAAQ;AAAA,MACX,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EAEO,iCAAiC,WAAqC;AAC3E,UAAM,EAAE,SAAS,IAAI;AACrB,QAAI,aAAa,KAAK,MAAM,WAAW;AACrC,WAAK,SAAS;AAAA,QACZ,WAAW;AAAA,MACb,CAAC;AAED,OAAC,YAAY,KAAK,YAAY;AAAA,IAChC;AAAA,EACF;AAAA,EA6BO,SAAsB;AAC3B,UAAM,EAAE,OAAO,YAAY,UAAU,IAAI,KAAK;AAC9C,UAAM,EAAE,UAAU,IAAI,KAAK;AAE3B,UAAM,YAAY;AAAA,MAChB;AAAA,MACA;AAAA,QACE,2BAA2B;AAAA,MAC7B;AAAA,MACA;AAAA,IACF;AAEA,WACE,oCAAC,QAAK,WAAW,WAAW,aAAa,KAAK,mBAC5C,oCAAC,QAAK,SAAS,KAAK,OAAO,WAAU,4BAA2B,GAChE,oCAAC,QAAK,WAAU,gCACb,SAAS,oCAAC,2BAAqB,KAAM,GACtC,oCAAC,yBAAmB,KAAK,MAAM,QAAS,GACvC,cACC,oCAAC,uBAAoB,SAAS,KAAK,gBAChC,UACH,CAEJ,CACF;AAAA,EAEJ;AACF;AAEA,cAAc,eAAe;AAAA,EAC3B,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,UAAU;AACZ;AAEA,cAAc,YAAY;AAAA,EACxB,OAAO,UAAU;AAAA,EACjB,SAAS,UAAU;AAAA,EACnB,UAAU,UAAU;AAAA,EACpB,UAAU,UAAU,KAAK;AAAA,EACzB,YAAY,UAAU;AACxB;","names":[]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { InferProps } from 'prop-types';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { AtActivityIndicatorProps } from '../../../types/activity-indicator';
|
|
4
|
-
export default class AtActivityIndicator extends React.Component<AtActivityIndicatorProps> {
|
|
5
|
-
static defaultProps: AtActivityIndicatorProps;
|
|
6
|
-
static propTypes: InferProps<AtActivityIndicatorProps>;
|
|
7
|
-
render(): JSX.Element;
|
|
8
|
-
}
|