@nutui/nutui-react-taro 3.0.20-beta.0 → 3.0.21-cpp
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/CHANGELOG.md +34 -70
- package/dist/cjs/hooks/taro/use-custom-event.js +5 -5
- package/dist/cjs/hooks/use-ref-state.js +3 -3
- package/dist/cjs/hooks/use-touch.js +1 -2
- package/dist/cjs/locales/base.d.ts +9 -0
- package/dist/cjs/locales/en-US.js +21 -2
- package/dist/cjs/locales/id-ID.js +21 -2
- package/dist/cjs/locales/ja-JP.js +19 -2
- package/dist/cjs/locales/tr-TR.js +21 -2
- package/dist/cjs/locales/zh-CN.js +19 -2
- package/dist/cjs/locales/zh-TW.js +19 -2
- package/dist/cjs/locales/zh-UG.js +21 -2
- package/dist/cjs/packages/actionsheet/style/style.harmony.css +38 -17
- package/dist/cjs/packages/address/address.d.ts +1 -1
- package/dist/cjs/packages/address/style/style.harmony.css +38 -17
- package/dist/cjs/packages/address/utils.js +3 -3
- package/dist/cjs/packages/animatingnumbers/countup.js +3 -1
- package/dist/cjs/packages/audio/style/style.harmony.css +0 -3
- package/dist/cjs/packages/avatar/avatar.js +32 -6
- package/dist/cjs/packages/avatarcropper/avatarcropper.js +18 -34
- package/dist/cjs/packages/badge/badge.js +20 -10
- package/dist/cjs/packages/barrage/barrage.js +14 -24
- package/dist/cjs/packages/button/button.d.ts +2 -24
- package/dist/cjs/packages/button/button.js +9 -12
- package/dist/cjs/packages/button/index.d.ts +0 -1
- package/dist/cjs/packages/button/style/button.scss +0 -3
- package/dist/cjs/packages/button/style/style.css +0 -3
- package/dist/cjs/packages/button/style/style.harmony.css +0 -3
- package/dist/cjs/packages/button/style-jmapp/button.scss +0 -3
- package/dist/cjs/packages/button/style-jmapp/style.css +0 -3
- package/dist/cjs/packages/button/style-jrkf/button.scss +0 -3
- package/dist/cjs/packages/button/style-jrkf/style.css +0 -3
- package/dist/cjs/packages/calendar/style/calendar.scss +32 -1
- package/dist/cjs/packages/calendar/style/style.css +21 -1
- package/dist/cjs/packages/calendar/style/style.harmony.css +59 -18
- package/dist/cjs/packages/calendar/style-jmapp/calendar.scss +32 -1
- package/dist/cjs/packages/calendar/style-jmapp/style.css +21 -1
- package/dist/cjs/packages/calendar/style-jrkf/calendar.scss +32 -1
- package/dist/cjs/packages/calendar/style-jrkf/style.css +21 -1
- package/dist/cjs/packages/calendar/utils.js +8 -8
- package/dist/cjs/packages/calendarcard/calendarcard.js +30 -8
- package/dist/cjs/packages/calendarcard/icon.js +17 -28
- package/dist/cjs/packages/calendarcard/style/calendarcard.scss +19 -0
- package/dist/cjs/packages/calendarcard/style/style.css +13 -0
- package/dist/cjs/packages/calendarcard/style/style.harmony.css +13 -0
- package/dist/cjs/packages/calendarcard/style-jmapp/calendarcard.scss +19 -0
- package/dist/cjs/packages/calendarcard/style-jmapp/style.css +13 -0
- package/dist/cjs/packages/calendarcard/style-jrkf/calendarcard.scss +19 -0
- package/dist/cjs/packages/calendarcard/style-jrkf/style.css +13 -0
- package/dist/cjs/packages/calendarcard/utils.js +6 -6
- package/dist/cjs/packages/card/style/style.harmony.css +1 -1
- package/dist/cjs/packages/cascader/cascader.js +12 -21
- package/dist/cjs/packages/cascader/style/style.harmony.css +38 -17
- package/dist/cjs/packages/cascader/utils.js +3 -3
- package/dist/cjs/packages/collapseitem/collapseitem.js +4 -7
- package/dist/cjs/packages/configprovider/configprovider.js +7 -7
- package/dist/cjs/packages/configprovider/index.js +6 -6
- package/dist/cjs/packages/configprovider/types.d.ts +1 -1
- package/dist/cjs/packages/countdown/countdown.js +1 -2
- package/dist/cjs/packages/datepicker/style/style.harmony.css +39 -18
- package/dist/cjs/packages/datepicker/utils.js +9 -9
- package/dist/cjs/packages/dialog/content.js +3 -3
- package/dist/cjs/packages/dialog/dialog.js +26 -23
- package/dist/cjs/packages/dialog/style/dialog.scss +1 -1
- package/dist/cjs/packages/dialog/style/style.css +1 -1
- package/dist/cjs/packages/dialog/style/style.harmony.css +1 -4
- package/dist/cjs/packages/dialog/style-jmapp/dialog.scss +1 -1
- package/dist/cjs/packages/dialog/style-jmapp/style.css +1 -1
- package/dist/cjs/packages/dialog/style-jrkf/dialog.scss +1 -1
- package/dist/cjs/packages/dialog/style-jrkf/style.css +1 -1
- package/dist/cjs/packages/divider/divider.js +2 -2
- package/dist/cjs/packages/drag/drag.js +4 -7
- package/dist/cjs/packages/elevator/elevator.js +7 -10
- package/dist/cjs/packages/ellipsis/ellipsis.js +17 -30
- package/dist/cjs/packages/empty/empty.d.ts +4 -4
- package/dist/cjs/packages/empty/style/style.harmony.css +0 -3
- package/dist/cjs/packages/form/index.js +0 -2
- package/dist/cjs/packages/form/style/style.harmony.css +0 -5
- package/dist/cjs/packages/form/useform.js +50 -57
- package/dist/cjs/packages/formitem/style/formitem.scss +4 -4
- package/dist/cjs/packages/formitem/style/style.css +0 -5
- package/dist/cjs/packages/formitem/style/style.harmony.css +0 -5
- package/dist/cjs/packages/formitem/style-jmapp/formitem.scss +4 -4
- package/dist/cjs/packages/formitem/style-jmapp/style.css +0 -5
- package/dist/cjs/packages/formitem/style-jrkf/formitem.scss +4 -4
- package/dist/cjs/packages/formitem/style-jrkf/style.css +0 -5
- package/dist/cjs/packages/image/image.js +11 -3
- package/dist/cjs/packages/imagepreview/style/style.harmony.css +38 -17
- package/dist/cjs/packages/infiniteloading/infiniteloading.js +8 -14
- package/dist/cjs/packages/input/input.js +10 -3
- package/dist/cjs/packages/inputnumber/inputnumber.js +17 -29
- package/dist/cjs/packages/lottie/lottiemp.js +10 -18
- package/dist/cjs/packages/lottie/types.js +0 -2
- package/dist/cjs/packages/menuitem/menuitem.js +24 -22
- package/dist/cjs/packages/noticebar/noticebar.js +74 -70
- package/dist/cjs/packages/notify/notify.js +4 -4
- package/dist/cjs/packages/numberkeyboard/style/style.css +1 -1
- package/dist/cjs/packages/numberkeyboard/style/style.harmony.css +39 -18
- package/dist/cjs/packages/nutui.react.build.d.ts +3 -1
- package/dist/cjs/packages/nutui.react.build.js +123 -119
- package/dist/cjs/packages/nutui.react.d.ts +4 -1
- package/dist/cjs/packages/nutui.react.js +124 -119
- package/dist/cjs/packages/nutui.react.scss.d.ts +1 -0
- package/dist/cjs/packages/nutui.react.scss.js +1 -0
- package/dist/cjs/packages/overlay/overlay.js +6 -6
- package/dist/cjs/packages/picker/style/style.css +1 -1
- package/dist/cjs/packages/picker/style/style.harmony.css +39 -18
- package/dist/cjs/packages/pickerview/pickerroller.js +4 -7
- package/dist/cjs/packages/pickerview/pickerview.js +1 -2
- package/dist/cjs/packages/pickerview/utils.js +3 -3
- package/dist/cjs/packages/popover/popover.js +75 -77
- package/dist/cjs/packages/popover/style/style.harmony.css +38 -17
- package/dist/cjs/packages/popup/popup.js +192 -113
- package/dist/cjs/packages/popup/style/popup.scss +22 -1
- package/dist/cjs/packages/popup/style/style.css +38 -17
- package/dist/cjs/packages/popup/style/style.harmony.css +38 -17
- package/dist/cjs/packages/popup/style-jmapp/popup.scss +22 -1
- package/dist/cjs/packages/popup/style-jmapp/style.css +22 -1
- package/dist/cjs/packages/popup/style-jrkf/popup.scss +22 -1
- package/dist/cjs/packages/popup/style-jrkf/style.css +22 -1
- package/dist/cjs/packages/price/price.js +52 -13
- package/dist/cjs/packages/progress/progress.js +2 -4
- package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +52 -56
- package/dist/cjs/packages/quickenter/index.d.ts +3 -0
- package/dist/cjs/packages/quickenter/index.js +13 -0
- package/dist/cjs/packages/quickenter/quickenter.d.ts +4 -0
- package/dist/cjs/packages/quickenter/quickenter.js +153 -0
- package/dist/cjs/packages/quickenter/style/css.js +2 -0
- package/dist/cjs/packages/quickenter/style/index.js +2 -0
- package/dist/cjs/packages/quickenter/style/quickenter.scss +120 -0
- package/dist/cjs/packages/quickenter/style/style.css +106 -0
- package/dist/cjs/packages/quickenter/style/style.harmony.css +506 -0
- package/dist/cjs/packages/quickenter/style-jmapp/css.js +2 -0
- package/dist/cjs/packages/quickenter/style-jmapp/index.js +2 -0
- package/dist/cjs/packages/quickenter/style-jmapp/quickenter.scss +120 -0
- package/dist/cjs/packages/quickenter/style-jmapp/style.css +106 -0
- package/dist/cjs/packages/quickenter/style-jrkf/css.js +2 -0
- package/dist/cjs/packages/quickenter/style-jrkf/index.js +2 -0
- package/dist/cjs/packages/quickenter/style-jrkf/quickenter.scss +120 -0
- package/dist/cjs/packages/quickenter/style-jrkf/style.css +106 -0
- package/dist/cjs/packages/radio/index.js +0 -2
- package/dist/cjs/packages/range/range.js +44 -28
- package/dist/cjs/packages/rate/rate.js +5 -8
- package/dist/cjs/packages/resultpage/resultpage.js +2 -1
- package/dist/cjs/packages/resultpage/style/style.harmony.css +0 -3
- package/dist/cjs/packages/safearea/safearea.js +3 -12
- package/dist/cjs/packages/safearea/style/safearea.scss +0 -6
- package/dist/cjs/packages/safearea/style/style.css +0 -2
- package/dist/cjs/packages/safearea/style/style.harmony.css +0 -2
- package/dist/cjs/packages/safearea/style-jmapp/safearea.scss +0 -6
- package/dist/cjs/packages/safearea/style-jmapp/style.css +0 -2
- package/dist/cjs/packages/safearea/style-jrkf/safearea.scss +0 -6
- package/dist/cjs/packages/safearea/style-jrkf/style.css +0 -2
- package/dist/cjs/packages/searchbar/searchbar.js +23 -9
- package/dist/cjs/packages/shortpassword/shortpassword.js +3 -3
- package/dist/cjs/packages/shortpassword/style/style.harmony.css +38 -17
- package/dist/cjs/packages/step/step.js +3 -8
- package/dist/cjs/packages/step/style/step.scss +0 -2
- package/dist/cjs/packages/step/style/style.css +0 -2
- package/dist/cjs/packages/step/style/style.harmony.css +0 -2
- package/dist/cjs/packages/step/style-jmapp/step.scss +0 -2
- package/dist/cjs/packages/step/style-jmapp/style.css +0 -2
- package/dist/cjs/packages/step/style-jrkf/step.scss +0 -2
- package/dist/cjs/packages/step/style-jrkf/style.css +0 -2
- package/dist/cjs/packages/steps/style/steps.scss +10 -3
- package/dist/cjs/packages/steps/style/style.css +13 -7
- package/dist/cjs/packages/steps/style/style.harmony.css +13 -9
- package/dist/cjs/packages/steps/style-jmapp/steps.scss +10 -3
- package/dist/cjs/packages/steps/style-jmapp/style.css +9 -3
- package/dist/cjs/packages/steps/style-jrkf/steps.scss +10 -3
- package/dist/cjs/packages/steps/style-jrkf/style.css +9 -3
- package/dist/cjs/packages/sticky/sticky.js +4 -7
- package/dist/cjs/packages/swipe/swipe.js +84 -122
- package/dist/cjs/packages/swiper/index.js +0 -1
- package/dist/cjs/packages/switch/switch.js +4 -7
- package/dist/cjs/packages/table/style/style.css +1 -1
- package/dist/cjs/packages/table/style/style.harmony.css +1 -1
- package/dist/cjs/packages/table/style/table.scss +1 -1
- package/dist/cjs/packages/table/style-jmapp/style.css +1 -1
- package/dist/cjs/packages/table/style-jmapp/table.scss +1 -1
- package/dist/cjs/packages/table/style-jrkf/style.css +1 -1
- package/dist/cjs/packages/table/style-jrkf/table.scss +1 -1
- package/dist/cjs/packages/tabs/tabs.js +12 -5
- package/dist/cjs/packages/tag/style/style.css +1 -1
- package/dist/cjs/packages/tag/style/style.harmony.css +1 -1
- package/dist/cjs/packages/tag/style/tag.scss +1 -1
- package/dist/cjs/packages/tag/style-jmapp/style.css +1 -1
- package/dist/cjs/packages/tag/style-jmapp/tag.scss +1 -1
- package/dist/cjs/packages/tag/style-jrkf/style.css +1 -1
- package/dist/cjs/packages/tag/style-jrkf/tag.scss +1 -1
- package/dist/cjs/packages/timeselect/style/style.harmony.css +38 -17
- package/dist/cjs/packages/toast/style/style.css +2 -4
- package/dist/cjs/packages/toast/style/style.harmony.css +2 -4
- package/dist/cjs/packages/toast/style/toast.scss +2 -4
- package/dist/cjs/packages/toast/style-jmapp/style.css +2 -4
- package/dist/cjs/packages/toast/style-jmapp/toast.scss +2 -4
- package/dist/cjs/packages/toast/style-jrkf/style.css +2 -4
- package/dist/cjs/packages/toast/style-jrkf/toast.scss +2 -4
- package/dist/cjs/packages/toast/toast.js +5 -5
- package/dist/cjs/packages/tour/style/style.harmony.css +38 -17
- package/dist/cjs/packages/uploader/uploader.js +38 -51
- package/dist/cjs/packages/virtuallist/utils.js +6 -6
- package/dist/cjs/packages/watermark/watermark.js +4 -8
- package/dist/cjs/types/index.d.ts +3 -0
- package/dist/cjs/types/index.js +3 -0
- package/dist/cjs/types/spec/address/base.js +0 -2
- package/dist/cjs/types/spec/button/base.d.ts +2 -1
- package/dist/cjs/types/spec/button/taro.d.ts +5 -1
- package/dist/cjs/types/spec/calendarcard/base.d.ts +2 -0
- package/dist/cjs/types/spec/dialog/base.d.ts +1 -0
- package/dist/cjs/types/spec/dialog/h5.d.ts +2 -0
- package/dist/cjs/types/spec/dialog/taro.d.ts +2 -0
- package/dist/cjs/types/spec/overlay/base.d.ts +1 -0
- package/dist/cjs/types/spec/popup/base.d.ts +2 -0
- package/dist/cjs/types/spec/price/base.d.ts +1 -0
- package/dist/cjs/types/spec/quickenter/base.d.ts +27 -0
- package/dist/cjs/types/spec/quickenter/base.js +4 -0
- package/dist/cjs/types/spec/quickenter/h5.d.ts +5 -0
- package/dist/cjs/types/spec/quickenter/h5.js +4 -0
- package/dist/cjs/types/spec/quickenter/taro.d.ts +5 -0
- package/dist/cjs/types/spec/quickenter/taro.js +4 -0
- package/dist/cjs/utils/date.js +5 -5
- package/dist/cjs/utils/event-mocker.js +10 -18
- package/dist/cjs/utils/get-rect.js +4 -4
- package/dist/cjs/utils/get-scroll-parent.js +3 -3
- package/dist/cjs/utils/merge-props.js +3 -3
- package/dist/cjs/utils/merge.js +6 -6
- package/dist/cjs/utils/raf.js +3 -3
- package/dist/cjs/utils/render.js +5 -9
- package/dist/cjs/utils/rubberband.js +3 -3
- package/dist/cjs/utils/should-render-price-raw.d.ts +2 -0
- package/dist/cjs/utils/should-render-price-raw.js +46 -0
- package/dist/cjs/utils/taro/ConfigurableCSSTransition copy.d.ts +15 -0
- package/dist/cjs/utils/taro/ConfigurableCSSTransition copy.js +130 -0
- package/dist/cjs/utils/taro/ConfigurableCSSTransition.d.ts +15 -0
- package/dist/cjs/utils/taro/ConfigurableCSSTransition.js +90 -0
- package/dist/cjs/utils/taro/get-rect.js +18 -26
- package/dist/cjs/utils/taro/get-system-info.d.ts +0 -5
- package/dist/cjs/utils/taro/get-system-info.js +5 -10
- package/dist/cjs/utils/taro/platform.js +5 -5
- package/dist/es/hooks/taro/use-custom-event.js +1 -0
- package/dist/es/hooks/use-touch.js +1 -1
- package/dist/es/locales/base.d.ts +9 -0
- package/dist/es/locales/en-US.js +21 -2
- package/dist/es/locales/id-ID.js +21 -2
- package/dist/es/locales/ja-JP.js +19 -2
- package/dist/es/locales/tr-TR.js +21 -2
- package/dist/es/locales/zh-CN.js +19 -2
- package/dist/es/locales/zh-TW.js +19 -2
- package/dist/es/locales/zh-UG.js +21 -2
- package/dist/es/packages/actionsheet/style/style.harmony.css +38 -17
- package/dist/es/packages/address/address.d.ts +1 -1
- package/dist/es/packages/address/style/style.harmony.css +38 -17
- package/dist/es/packages/animatingnumbers/countup.js +3 -1
- package/dist/es/packages/audio/style/style.harmony.css +0 -3
- package/dist/es/packages/avatar/avatar.js +32 -6
- package/dist/es/packages/avatarcropper/avatarcropper.js +20 -36
- package/dist/es/packages/badge/badge.js +20 -10
- package/dist/es/packages/barrage/barrage.js +14 -24
- package/dist/es/packages/button/button.d.ts +2 -24
- package/dist/es/packages/button/button.js +10 -12
- package/dist/es/packages/button/index.d.ts +0 -1
- package/dist/es/packages/button/style/button.scss +0 -3
- package/dist/es/packages/button/style/style.css +0 -3
- package/dist/es/packages/button/style/style.harmony.css +0 -3
- package/dist/es/packages/button/style-jmapp/button.scss +0 -3
- package/dist/es/packages/button/style-jmapp/style.css +0 -3
- package/dist/es/packages/button/style-jrkf/button.scss +0 -3
- package/dist/es/packages/button/style-jrkf/style.css +0 -3
- package/dist/es/packages/calendar/style/calendar.scss +32 -1
- package/dist/es/packages/calendar/style/style.css +21 -1
- package/dist/es/packages/calendar/style/style.harmony.css +59 -18
- package/dist/es/packages/calendar/style-jmapp/calendar.scss +32 -1
- package/dist/es/packages/calendar/style-jmapp/style.css +21 -1
- package/dist/es/packages/calendar/style-jrkf/calendar.scss +32 -1
- package/dist/es/packages/calendar/style-jrkf/style.css +21 -1
- package/dist/es/packages/calendarcard/calendarcard.js +31 -9
- package/dist/es/packages/calendarcard/icon.js +13 -24
- package/dist/es/packages/calendarcard/style/calendarcard.scss +19 -0
- package/dist/es/packages/calendarcard/style/style.css +13 -0
- package/dist/es/packages/calendarcard/style/style.harmony.css +13 -0
- package/dist/es/packages/calendarcard/style-jmapp/calendarcard.scss +19 -0
- package/dist/es/packages/calendarcard/style-jmapp/style.css +13 -0
- package/dist/es/packages/calendarcard/style-jrkf/calendarcard.scss +19 -0
- package/dist/es/packages/calendarcard/style-jrkf/style.css +13 -0
- package/dist/es/packages/card/style/style.harmony.css +1 -1
- package/dist/es/packages/cascader/cascader.js +12 -21
- package/dist/es/packages/cascader/style/style.harmony.css +38 -17
- package/dist/es/packages/collapseitem/collapseitem.js +4 -7
- package/dist/es/packages/configprovider/types.d.ts +1 -1
- package/dist/es/packages/countdown/countdown.js +1 -2
- package/dist/es/packages/datepicker/style/style.harmony.css +39 -18
- package/dist/es/packages/dialog/dialog.js +33 -28
- package/dist/es/packages/dialog/style/dialog.scss +1 -1
- package/dist/es/packages/dialog/style/style.css +1 -1
- package/dist/es/packages/dialog/style/style.harmony.css +1 -4
- package/dist/es/packages/dialog/style-jmapp/dialog.scss +1 -1
- package/dist/es/packages/dialog/style-jmapp/style.css +1 -1
- package/dist/es/packages/dialog/style-jrkf/dialog.scss +1 -1
- package/dist/es/packages/dialog/style-jrkf/style.css +1 -1
- package/dist/es/packages/divider/divider.js +1 -1
- package/dist/es/packages/drag/drag.js +4 -7
- package/dist/es/packages/elevator/elevator.js +4 -7
- package/dist/es/packages/ellipsis/ellipsis.js +17 -30
- package/dist/es/packages/empty/empty.d.ts +4 -4
- package/dist/es/packages/empty/style/style.harmony.css +0 -3
- package/dist/es/packages/form/index.js +0 -1
- package/dist/es/packages/form/style/style.harmony.css +0 -5
- package/dist/es/packages/form/useform.js +46 -53
- package/dist/es/packages/formitem/style/formitem.scss +4 -4
- package/dist/es/packages/formitem/style/style.css +0 -5
- package/dist/es/packages/formitem/style/style.harmony.css +0 -5
- package/dist/es/packages/formitem/style-jmapp/formitem.scss +4 -4
- package/dist/es/packages/formitem/style-jmapp/style.css +0 -5
- package/dist/es/packages/formitem/style-jrkf/formitem.scss +4 -4
- package/dist/es/packages/formitem/style-jrkf/style.css +0 -5
- package/dist/es/packages/image/image.js +11 -3
- package/dist/es/packages/imagepreview/style/style.harmony.css +38 -17
- package/dist/es/packages/infiniteloading/infiniteloading.js +8 -14
- package/dist/es/packages/input/input.js +10 -3
- package/dist/es/packages/inputnumber/inputnumber.js +17 -29
- package/dist/es/packages/lottie/lottiemp.js +12 -20
- package/dist/es/packages/lottie/types.js +1 -1
- package/dist/es/packages/menuitem/menuitem.js +24 -22
- package/dist/es/packages/noticebar/noticebar.js +74 -70
- package/dist/es/packages/numberkeyboard/style/style.css +1 -1
- package/dist/es/packages/numberkeyboard/style/style.harmony.css +39 -18
- package/dist/es/packages/nutui.react.build.d.ts +3 -1
- package/dist/es/packages/nutui.react.build.js +3 -1
- package/dist/es/packages/overlay/overlay.js +3 -3
- package/dist/es/packages/picker/style/style.css +1 -1
- package/dist/es/packages/picker/style/style.harmony.css +39 -18
- package/dist/es/packages/pickerview/pickerroller.js +4 -7
- package/dist/es/packages/pickerview/pickerview.js +1 -2
- package/dist/es/packages/popover/popover.js +75 -77
- package/dist/es/packages/popover/style/style.harmony.css +38 -17
- package/dist/es/packages/popup/popup.js +193 -114
- package/dist/es/packages/popup/style/popup.scss +22 -1
- package/dist/es/packages/popup/style/style.css +38 -17
- package/dist/es/packages/popup/style/style.harmony.css +38 -17
- package/dist/es/packages/popup/style-jmapp/popup.scss +22 -1
- package/dist/es/packages/popup/style-jmapp/style.css +22 -1
- package/dist/es/packages/popup/style-jrkf/popup.scss +22 -1
- package/dist/es/packages/popup/style-jrkf/style.css +22 -1
- package/dist/es/packages/price/price.js +53 -14
- package/dist/es/packages/progress/progress.js +2 -4
- package/dist/es/packages/pulltorefresh/pulltorefresh.js +52 -56
- package/dist/es/packages/quickenter/index.d.ts +3 -0
- package/dist/es/packages/quickenter/index.js +2 -0
- package/dist/es/packages/quickenter/quickenter.d.ts +4 -0
- package/dist/es/packages/quickenter/quickenter.js +141 -0
- package/dist/es/packages/quickenter/style/css.js +2 -0
- package/dist/es/packages/quickenter/style/index.js +2 -0
- package/dist/es/packages/quickenter/style/quickenter.scss +120 -0
- package/dist/es/packages/quickenter/style/style.css +106 -0
- package/dist/es/packages/quickenter/style/style.harmony.css +506 -0
- package/dist/es/packages/quickenter/style-jmapp/css.js +2 -0
- package/dist/es/packages/quickenter/style-jmapp/index.js +2 -0
- package/dist/es/packages/quickenter/style-jmapp/quickenter.scss +120 -0
- package/dist/es/packages/quickenter/style-jmapp/style.css +106 -0
- package/dist/es/packages/quickenter/style-jrkf/css.js +2 -0
- package/dist/es/packages/quickenter/style-jrkf/index.js +2 -0
- package/dist/es/packages/quickenter/style-jrkf/quickenter.scss +120 -0
- package/dist/es/packages/quickenter/style-jrkf/style.css +106 -0
- package/dist/es/packages/radio/index.js +0 -1
- package/dist/es/packages/range/range.js +45 -29
- package/dist/es/packages/rate/rate.js +6 -9
- package/dist/es/packages/resultpage/resultpage.js +2 -1
- package/dist/es/packages/resultpage/style/style.harmony.css +0 -3
- package/dist/es/packages/safearea/safearea.js +3 -12
- package/dist/es/packages/safearea/style/safearea.scss +0 -6
- package/dist/es/packages/safearea/style/style.css +0 -2
- package/dist/es/packages/safearea/style/style.harmony.css +0 -2
- package/dist/es/packages/safearea/style-jmapp/safearea.scss +0 -6
- package/dist/es/packages/safearea/style-jmapp/style.css +0 -2
- package/dist/es/packages/safearea/style-jrkf/safearea.scss +0 -6
- package/dist/es/packages/safearea/style-jrkf/style.css +0 -2
- package/dist/es/packages/searchbar/searchbar.js +23 -9
- package/dist/es/packages/shortpassword/style/style.harmony.css +38 -17
- package/dist/es/packages/step/step.js +3 -8
- package/dist/es/packages/step/style/step.scss +0 -2
- package/dist/es/packages/step/style/style.css +0 -2
- package/dist/es/packages/step/style/style.harmony.css +0 -2
- package/dist/es/packages/step/style-jmapp/step.scss +0 -2
- package/dist/es/packages/step/style-jmapp/style.css +0 -2
- package/dist/es/packages/step/style-jrkf/step.scss +0 -2
- package/dist/es/packages/step/style-jrkf/style.css +0 -2
- package/dist/es/packages/steps/style/steps.scss +10 -3
- package/dist/es/packages/steps/style/style.css +13 -7
- package/dist/es/packages/steps/style/style.harmony.css +13 -9
- package/dist/es/packages/steps/style-jmapp/steps.scss +10 -3
- package/dist/es/packages/steps/style-jmapp/style.css +9 -3
- package/dist/es/packages/steps/style-jrkf/steps.scss +10 -3
- package/dist/es/packages/steps/style-jrkf/style.css +9 -3
- package/dist/es/packages/sticky/sticky.js +4 -7
- package/dist/es/packages/swipe/swipe.js +85 -123
- package/dist/es/packages/swiper/index.js +0 -1
- package/dist/es/packages/switch/switch.js +4 -7
- package/dist/es/packages/table/style/style.css +1 -1
- package/dist/es/packages/table/style/style.harmony.css +1 -1
- package/dist/es/packages/table/style/table.scss +1 -1
- package/dist/es/packages/table/style-jmapp/style.css +1 -1
- package/dist/es/packages/table/style-jmapp/table.scss +1 -1
- package/dist/es/packages/table/style-jrkf/style.css +1 -1
- package/dist/es/packages/table/style-jrkf/table.scss +1 -1
- package/dist/es/packages/tabs/tabs.js +12 -5
- package/dist/es/packages/tag/style/style.css +1 -1
- package/dist/es/packages/tag/style/style.harmony.css +1 -1
- package/dist/es/packages/tag/style/tag.scss +1 -1
- package/dist/es/packages/tag/style-jmapp/style.css +1 -1
- package/dist/es/packages/tag/style-jmapp/tag.scss +1 -1
- package/dist/es/packages/tag/style-jrkf/style.css +1 -1
- package/dist/es/packages/tag/style-jrkf/tag.scss +1 -1
- package/dist/es/packages/timeselect/style/style.harmony.css +38 -17
- package/dist/es/packages/toast/style/style.css +2 -4
- package/dist/es/packages/toast/style/style.harmony.css +2 -4
- package/dist/es/packages/toast/style/toast.scss +2 -4
- package/dist/es/packages/toast/style-jmapp/style.css +2 -4
- package/dist/es/packages/toast/style-jmapp/toast.scss +2 -4
- package/dist/es/packages/toast/style-jrkf/style.css +2 -4
- package/dist/es/packages/toast/style-jrkf/toast.scss +2 -4
- package/dist/es/packages/toast/toast.js +1 -1
- package/dist/es/packages/tour/style/style.harmony.css +38 -17
- package/dist/es/packages/uploader/uploader.js +38 -51
- package/dist/es/packages/watermark/watermark.js +4 -8
- package/dist/es/types/index.d.ts +3 -0
- package/dist/es/types/index.js +3 -0
- package/dist/es/types/spec/address/base.js +1 -1
- package/dist/es/types/spec/button/base.d.ts +2 -1
- package/dist/es/types/spec/button/taro.d.ts +5 -1
- package/dist/es/types/spec/calendarcard/base.d.ts +2 -0
- package/dist/es/types/spec/dialog/base.d.ts +3 -8
- package/dist/es/types/spec/dialog/h5.d.ts +2 -0
- package/dist/es/types/spec/dialog/taro.d.ts +2 -0
- package/dist/es/types/spec/overlay/base.d.ts +1 -0
- package/dist/es/types/spec/popup/base.d.ts +4 -5
- package/dist/es/types/spec/price/base.d.ts +4 -0
- package/dist/es/types/spec/quickenter/base.d.ts +45 -0
- package/dist/es/types/spec/quickenter/base.js +1 -0
- package/dist/es/types/spec/quickenter/h5.d.ts +5 -0
- package/dist/es/types/spec/quickenter/h5.js +1 -0
- package/dist/es/types/spec/quickenter/taro.d.ts +5 -0
- package/dist/es/types/spec/quickenter/taro.js +1 -0
- package/dist/es/utils/event-mocker.js +4 -12
- package/dist/es/utils/render.js +2 -6
- package/dist/es/utils/should-render-price-raw.d.ts +2 -0
- package/dist/es/utils/should-render-price-raw.js +30 -0
- package/dist/es/utils/taro/ConfigurableCSSTransition copy.d.ts +15 -0
- package/dist/es/utils/taro/ConfigurableCSSTransition copy.js +119 -0
- package/dist/es/utils/taro/ConfigurableCSSTransition.d.ts +15 -0
- package/dist/es/utils/taro/ConfigurableCSSTransition.js +79 -0
- package/dist/es/utils/taro/get-rect.js +14 -22
- package/dist/es/utils/taro/get-system-info.d.ts +0 -5
- package/dist/es/utils/taro/get-system-info.js +8 -7
- package/dist/nutui.react.umd.js +8698 -7529
- package/dist/style-jmapp.css +1 -1
- package/dist/style-jmapp.scss +32 -31
- package/dist/style-jrkf.css +1 -1
- package/dist/style-jrkf.scss +25 -24
- package/dist/style.css +1 -1
- package/dist/style.scss +35 -34
- package/dist/styles/jd-font.scss +2 -2
- package/dist/styles/theme-dark.scss +1 -2
- package/dist/styles/themes/daojia.css +1 -1
- package/dist/styles/themes/dark-daojia.css +1 -1
- package/dist/styles/themes/dark.css +1 -1
- package/dist/styles/themes/default.css +1 -1
- package/dist/styles/variables-daojia.scss +41 -0
- package/dist/styles/variables-jmapp.scss +41 -0
- package/dist/styles/variables-jrkf.scss +41 -0
- package/dist/styles/variables.scss +49 -4
- package/package.json +1 -1
- package/dist/cjs/locales/vi-VN.d.ts +0 -3
- package/dist/cjs/locales/vi-VN.js +0 -170
- package/dist/es/locales/vi-VN.d.ts +0 -3
- package/dist/es/locales/vi-VN.js +0 -160
|
@@ -4,8 +4,8 @@ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
|
4
4
|
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
|
|
5
5
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
6
6
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
7
|
-
import React, { useState, useEffect, useMemo, useCallback
|
|
8
|
-
import Taro, { createSelectorQuery } from "@tarojs/taro";
|
|
7
|
+
import React, { useState, useEffect, useMemo, useCallback } from "react";
|
|
8
|
+
import Taro, { useReady, createSelectorQuery } from "@tarojs/taro";
|
|
9
9
|
import classNames from "classnames";
|
|
10
10
|
import { Canvas, View } from "@tarojs/components";
|
|
11
11
|
import { getWindowInfo } from "../../utils/taro/get-system-info";
|
|
@@ -117,7 +117,7 @@ export var AvatarCropper = function(props) {
|
|
|
117
117
|
cropperCanvas: null,
|
|
118
118
|
cropperCanvasContext: null
|
|
119
119
|
}), 2), canvasAll = _useState5[0], setCanvasAll = _useState5[1];
|
|
120
|
-
|
|
120
|
+
useReady(function() {
|
|
121
121
|
if (showAlipayCanvas2D) {
|
|
122
122
|
var canvasId = canvasAll.canvasId;
|
|
123
123
|
createSelectorQuery().select("#".concat(canvasId)).node(function(param) {
|
|
@@ -129,11 +129,7 @@ export var AvatarCropper = function(props) {
|
|
|
129
129
|
}));
|
|
130
130
|
}).exec();
|
|
131
131
|
}
|
|
132
|
-
}
|
|
133
|
-
showAlipayCanvas2D,
|
|
134
|
-
state.displayHeight,
|
|
135
|
-
state.displayWidth
|
|
136
|
-
]);
|
|
132
|
+
});
|
|
137
133
|
useEffect(function() {
|
|
138
134
|
setCanvasAll(_object_spread_props(_object_spread({}, canvasAll), {
|
|
139
135
|
cropperCanvasContext: Taro.createCanvasContext(canvasAll.canvasId)
|
|
@@ -311,8 +307,8 @@ export var AvatarCropper = function(props) {
|
|
|
311
307
|
draw
|
|
312
308
|
]);
|
|
313
309
|
// 设置绘制图片
|
|
314
|
-
var setDrawImgInfo =
|
|
315
|
-
|
|
310
|
+
var setDrawImgInfo = function(image) {
|
|
311
|
+
return _async_to_generator(function() {
|
|
316
312
|
var displayWidth, cropperWidth, copyDrawImg, imgWidth, imgHeight, isPortrait, rate, scale;
|
|
317
313
|
return _ts_generator(this, function(_state) {
|
|
318
314
|
switch(_state.label){
|
|
@@ -362,11 +358,8 @@ export var AvatarCropper = function(props) {
|
|
|
362
358
|
];
|
|
363
359
|
}
|
|
364
360
|
});
|
|
365
|
-
});
|
|
366
|
-
|
|
367
|
-
return _ref.apply(this, arguments);
|
|
368
|
-
};
|
|
369
|
-
}();
|
|
361
|
+
})();
|
|
362
|
+
};
|
|
370
363
|
var chooseImage = function() {
|
|
371
364
|
Taro.chooseImage({
|
|
372
365
|
count: 1,
|
|
@@ -380,8 +373,8 @@ export var AvatarCropper = function(props) {
|
|
|
380
373
|
}
|
|
381
374
|
});
|
|
382
375
|
};
|
|
383
|
-
var imageChange =
|
|
384
|
-
|
|
376
|
+
var imageChange = function(file) {
|
|
377
|
+
return _async_to_generator(function() {
|
|
385
378
|
return _ts_generator(this, function(_state) {
|
|
386
379
|
Taro.getImageInfo({
|
|
387
380
|
src: file.path
|
|
@@ -393,11 +386,8 @@ export var AvatarCropper = function(props) {
|
|
|
393
386
|
2
|
|
394
387
|
];
|
|
395
388
|
});
|
|
396
|
-
});
|
|
397
|
-
|
|
398
|
-
return _ref.apply(this, arguments);
|
|
399
|
-
};
|
|
400
|
-
}();
|
|
389
|
+
})();
|
|
390
|
+
};
|
|
401
391
|
var resetScale = function(scale) {
|
|
402
392
|
setState(_object_spread_props(_object_spread({}, state), {
|
|
403
393
|
moveX: 0,
|
|
@@ -553,8 +543,8 @@ export var AvatarCropper = function(props) {
|
|
|
553
543
|
height: cropperWidth,
|
|
554
544
|
destWidth: cropperWidth,
|
|
555
545
|
destHeight: cropperWidth,
|
|
556
|
-
success:
|
|
557
|
-
|
|
546
|
+
success: function(res) {
|
|
547
|
+
return _async_to_generator(function() {
|
|
558
548
|
var filePath;
|
|
559
549
|
return _ts_generator(this, function(_state) {
|
|
560
550
|
filePath = res.tempFilePath;
|
|
@@ -564,11 +554,8 @@ export var AvatarCropper = function(props) {
|
|
|
564
554
|
2
|
|
565
555
|
];
|
|
566
556
|
});
|
|
567
|
-
});
|
|
568
|
-
|
|
569
|
-
return _ref.apply(this, arguments);
|
|
570
|
-
};
|
|
571
|
-
}()
|
|
557
|
+
})();
|
|
558
|
+
}
|
|
572
559
|
});
|
|
573
560
|
};
|
|
574
561
|
// 裁剪图片
|
|
@@ -592,8 +579,8 @@ export var AvatarCropper = function(props) {
|
|
|
592
579
|
height: cropperWidth,
|
|
593
580
|
destWidth: cropperWidth * systemInfo.pixelRatio,
|
|
594
581
|
destHeight: cropperWidth * systemInfo.pixelRatio,
|
|
595
|
-
success:
|
|
596
|
-
|
|
582
|
+
success: function(res) {
|
|
583
|
+
return _async_to_generator(function() {
|
|
597
584
|
var filePath;
|
|
598
585
|
return _ts_generator(this, function(_state) {
|
|
599
586
|
filePath = res.tempFilePath;
|
|
@@ -603,11 +590,8 @@ export var AvatarCropper = function(props) {
|
|
|
603
590
|
2
|
|
604
591
|
];
|
|
605
592
|
});
|
|
606
|
-
});
|
|
607
|
-
|
|
608
|
-
return _ref.apply(this, arguments);
|
|
609
|
-
};
|
|
610
|
-
}()
|
|
593
|
+
})();
|
|
594
|
+
}
|
|
611
595
|
});
|
|
612
596
|
};
|
|
613
597
|
var ToolBar = function() {
|
|
@@ -2,6 +2,7 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
|
|
|
2
2
|
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
3
3
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
4
4
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
5
|
+
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
|
|
5
6
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
6
7
|
import { _ as _type_of } from "@swc/helpers/_/_type_of";
|
|
7
8
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
@@ -41,7 +42,19 @@ export var Badge = function(props) {
|
|
|
41
42
|
};
|
|
42
43
|
var _this;
|
|
43
44
|
var rtl = useRtl();
|
|
44
|
-
var
|
|
45
|
+
var _ref = _object_spread({}, defaultProps, props), className = _ref.className, style = _ref.style, value = _ref.value, max = _ref.max, children = _ref.children, dot = _ref.dot, top = _ref.top, right = _ref.right, fill = _ref.fill, size = _ref.size, disabled = _ref.disabled, rest = _object_without_properties(_ref, [
|
|
46
|
+
"className",
|
|
47
|
+
"style",
|
|
48
|
+
"value",
|
|
49
|
+
"max",
|
|
50
|
+
"children",
|
|
51
|
+
"dot",
|
|
52
|
+
"top",
|
|
53
|
+
"right",
|
|
54
|
+
"fill",
|
|
55
|
+
"size",
|
|
56
|
+
"disabled"
|
|
57
|
+
]);
|
|
45
58
|
var classPrefix = 'nut-badge';
|
|
46
59
|
var isHarmony = harmony();
|
|
47
60
|
var classes = classNames(classPrefix, className);
|
|
@@ -54,8 +67,8 @@ export var Badge = function(props) {
|
|
|
54
67
|
getPositionStyle();
|
|
55
68
|
}
|
|
56
69
|
}, []);
|
|
57
|
-
var getPositionStyle =
|
|
58
|
-
|
|
70
|
+
var getPositionStyle = function() {
|
|
71
|
+
return _async_to_generator(function() {
|
|
59
72
|
var style;
|
|
60
73
|
return _ts_generator(this, function(_state) {
|
|
61
74
|
style = _define_property({
|
|
@@ -66,17 +79,14 @@ export var Badge = function(props) {
|
|
|
66
79
|
2
|
|
67
80
|
];
|
|
68
81
|
});
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
return _ref.apply(this, arguments);
|
|
72
|
-
};
|
|
73
|
-
}();
|
|
82
|
+
})();
|
|
83
|
+
};
|
|
74
84
|
var _obj1;
|
|
75
|
-
return /*#__PURE__*/ React.createElement(View, {
|
|
85
|
+
return /*#__PURE__*/ React.createElement(View, _object_spread({
|
|
76
86
|
className: classes,
|
|
77
87
|
style: style,
|
|
78
88
|
ref: badgeRef
|
|
79
|
-
}, isIcon() && /*#__PURE__*/ React.createElement(View, {
|
|
89
|
+
}, rest), isIcon() && /*#__PURE__*/ React.createElement(View, {
|
|
80
90
|
className: classNames("".concat(classPrefix, "-content"), (_obj1 = {}, _define_property(_obj1, "".concat(classPrefix, "-icon"), true), _define_property(_obj1, "".concat(classPrefix, "-icon-rtl"), rtl), _obj1)),
|
|
81
91
|
style: contentStyle
|
|
82
92
|
}, value), children, !isIcon() && (getContent() || dot) && /*#__PURE__*/ React.createElement(View, {
|
|
@@ -48,14 +48,13 @@ var InternalBarrage = function(props, ref) {
|
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
});
|
|
51
|
-
var getNodeWidth =
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
var
|
|
51
|
+
var getNodeWidth = function(node) {
|
|
52
|
+
var type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 'width';
|
|
53
|
+
return _async_to_generator(function() {
|
|
54
|
+
var refe;
|
|
55
55
|
return _ts_generator(this, function(_state) {
|
|
56
56
|
switch(_state.label){
|
|
57
57
|
case 0:
|
|
58
|
-
type = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : 'width';
|
|
59
58
|
if (!node) return [
|
|
60
59
|
3,
|
|
61
60
|
2
|
|
@@ -77,11 +76,8 @@ var InternalBarrage = function(props, ref) {
|
|
|
77
76
|
];
|
|
78
77
|
}
|
|
79
78
|
});
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
return _ref.apply(this, arguments);
|
|
83
|
-
};
|
|
84
|
-
}();
|
|
79
|
+
})();
|
|
80
|
+
};
|
|
85
81
|
var clearDomTimeout = function() {
|
|
86
82
|
if (domTimer.current) {
|
|
87
83
|
clearTimeout(domTimer.current);
|
|
@@ -89,8 +85,8 @@ var InternalBarrage = function(props, ref) {
|
|
|
89
85
|
}
|
|
90
86
|
};
|
|
91
87
|
useEffect(function() {
|
|
92
|
-
var init =
|
|
93
|
-
|
|
88
|
+
var init = function() {
|
|
89
|
+
return _async_to_generator(function() {
|
|
94
90
|
var _barrageBody_current;
|
|
95
91
|
return _ts_generator(this, function(_state) {
|
|
96
92
|
switch(_state.label){
|
|
@@ -115,11 +111,8 @@ var InternalBarrage = function(props, ref) {
|
|
|
115
111
|
];
|
|
116
112
|
}
|
|
117
113
|
});
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
return _ref.apply(this, arguments);
|
|
121
|
-
};
|
|
122
|
-
}();
|
|
114
|
+
})();
|
|
115
|
+
};
|
|
123
116
|
domTimer.current = window.setTimeout(function() {
|
|
124
117
|
init();
|
|
125
118
|
}, 300);
|
|
@@ -141,8 +134,8 @@ var InternalBarrage = function(props, ref) {
|
|
|
141
134
|
play();
|
|
142
135
|
}, intervalCache);
|
|
143
136
|
};
|
|
144
|
-
var setStyle =
|
|
145
|
-
|
|
137
|
+
var setStyle = function(el, currentIndex) {
|
|
138
|
+
return _async_to_generator(function() {
|
|
146
139
|
var refe, width, height, elScrollDuration, error;
|
|
147
140
|
return _ts_generator(this, function(_state) {
|
|
148
141
|
switch(_state.label){
|
|
@@ -195,11 +188,8 @@ var InternalBarrage = function(props, ref) {
|
|
|
195
188
|
];
|
|
196
189
|
}
|
|
197
190
|
});
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
return _ref.apply(this, arguments);
|
|
201
|
-
};
|
|
202
|
-
}();
|
|
191
|
+
})();
|
|
192
|
+
};
|
|
203
193
|
var play = function() {
|
|
204
194
|
if (!loop && index.current >= list.length) {
|
|
205
195
|
return;
|
|
@@ -1,25 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import { BasicComponent } from "../../utils/typings";
|
|
5
|
-
type OmitMiniProgramButtonProps = Omit<MiniProgramButtonProps, 'size' | 'type' | 'onClick' | 'style'>;
|
|
6
|
-
export type ButtonType = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
|
|
7
|
-
export type ButtonSize = 'xlarge' | 'large' | 'normal' | 'small' | 'mini';
|
|
8
|
-
export type ButtonShape = 'square' | 'round';
|
|
9
|
-
export type ButtonFill = 'solid' | 'outline' | 'dashed' | 'none';
|
|
10
|
-
export interface ButtonProps extends BasicComponent, OmitMiniProgramButtonProps {
|
|
11
|
-
color: string;
|
|
12
|
-
shape: ButtonShape;
|
|
13
|
-
type: ButtonType;
|
|
14
|
-
size: ButtonSize;
|
|
15
|
-
fill: ButtonFill;
|
|
16
|
-
block: boolean;
|
|
17
|
-
loading: boolean;
|
|
18
|
-
disabled: boolean;
|
|
19
|
-
icon: React.ReactNode;
|
|
20
|
-
rightIcon: React.ReactNode;
|
|
21
|
-
nativeType: 'submit' | 'reset';
|
|
22
|
-
onClick: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
23
|
-
}
|
|
24
|
-
export declare const Button: React.ForwardRefExoticComponent<Omit<Partial<ButtonProps>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
25
|
-
export {};
|
|
2
|
+
import { TaroButtonProps } from "../../types";
|
|
3
|
+
export declare const Button: React.ForwardRefExoticComponent<Omit<Partial<TaroButtonProps>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -4,9 +4,8 @@ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
|
4
4
|
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
|
|
5
5
|
import React, { useCallback, useMemo } from "react";
|
|
6
6
|
import classNames from "classnames";
|
|
7
|
-
import { View
|
|
7
|
+
import { View } from "@tarojs/components";
|
|
8
8
|
import { Loading } from "@nutui/icons-react-taro";
|
|
9
|
-
import { getEnv } from "@tarojs/taro";
|
|
10
9
|
import { ComponentDefaults } from "../../utils/typings";
|
|
11
10
|
import { harmony } from "../../utils/taro/platform";
|
|
12
11
|
var prefixCls = 'nut-button';
|
|
@@ -24,7 +23,8 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
|
24
23
|
onClick: function(e) {}
|
|
25
24
|
});
|
|
26
25
|
export var Button = /*#__PURE__*/ React.forwardRef(function(props, ref) {
|
|
27
|
-
var _ref = _object_spread({}, defaultProps, props), color = _ref.color, shape = _ref.shape, fill = _ref.fill, loading = _ref.loading, disabled = _ref.disabled, type = _ref.type, size = _ref.size, block = _ref.block, icon = _ref.icon, rightIcon = _ref.rightIcon, children = _ref.children, className = _ref.className, style = _ref.style,
|
|
26
|
+
var _ref = _object_spread({}, defaultProps, props), color = _ref.color, shape = _ref.shape, fill = _ref.fill, loading = _ref.loading, disabled = _ref.disabled, type = _ref.type, size = _ref.size, block = _ref.block, icon = _ref.icon, rightIcon = _ref.rightIcon, children = _ref.children, className = _ref.className, style = _ref.style, // formType,
|
|
27
|
+
nativeType = _ref.nativeType, onClick = _ref.onClick, rest = _object_without_properties(_ref, [
|
|
28
28
|
"color",
|
|
29
29
|
"shape",
|
|
30
30
|
"fill",
|
|
@@ -38,7 +38,6 @@ export var Button = /*#__PURE__*/ React.forwardRef(function(props, ref) {
|
|
|
38
38
|
"children",
|
|
39
39
|
"className",
|
|
40
40
|
"style",
|
|
41
|
-
"formType",
|
|
42
41
|
"nativeType",
|
|
43
42
|
"onClick"
|
|
44
43
|
]);
|
|
@@ -92,17 +91,15 @@ export var Button = /*#__PURE__*/ React.forwardRef(function(props, ref) {
|
|
|
92
91
|
]);
|
|
93
92
|
var _obj;
|
|
94
93
|
var buttonClassNames = classNames(prefixCls, "".concat(prefixCls, "-").concat(type), (_obj = {}, _define_property(_obj, "".concat(prefixCls, "-").concat(type, "-solid"), type === 'primary' && !props.fill), _define_property(_obj, "".concat(prefixCls, "-").concat(fill), props.fill), _define_property(_obj, "".concat(prefixCls, "-").concat(type, "-").concat(fill), props.fill), _define_property(_obj, "".concat(prefixCls, "-").concat(size), size), _define_property(_obj, "".concat(prefixCls, "-").concat(shape), shape), _define_property(_obj, "".concat(prefixCls, "-").concat(shape, "-").concat(size), shape && size), _define_property(_obj, "".concat(prefixCls, "-block"), block), _define_property(_obj, "".concat(prefixCls, "-disabled"), disabled || loading), _define_property(_obj, "".concat(prefixCls, "-").concat(type).concat(props.fill ? "-".concat(fill) : '', "-disabled"), disabled || loading), _define_property(_obj, "".concat(prefixCls, "-loading"), loading), _define_property(_obj, "".concat(prefixCls, "-icononly"), !children), _obj), className);
|
|
95
|
-
if (getEnv() === 'WEB') {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
94
|
+
// if (getEnv() === 'WEB') {
|
|
95
|
+
// ;(rest as any).type = formType
|
|
96
|
+
// }
|
|
99
97
|
return (
|
|
100
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
101
98
|
// @ts-ignore
|
|
102
|
-
//
|
|
103
|
-
/*#__PURE__*/ (React.createElement(
|
|
99
|
+
// <TaroButton
|
|
100
|
+
/*#__PURE__*/ (React.createElement(View, _object_spread_props(_object_spread({}, rest), {
|
|
104
101
|
ref: ref,
|
|
105
|
-
|
|
102
|
+
// formType={formType || nativeType}
|
|
106
103
|
className: buttonClassNames,
|
|
107
104
|
style: _object_spread({}, getStyle, style),
|
|
108
105
|
onClick: function(e) {
|
|
@@ -111,6 +108,7 @@ export var Button = /*#__PURE__*/ React.forwardRef(function(props, ref) {
|
|
|
111
108
|
}), /*#__PURE__*/ React.createElement(View, {
|
|
112
109
|
className: "nut-button-wrap"
|
|
113
110
|
}, loading && /*#__PURE__*/ React.createElement(Loading, {
|
|
111
|
+
ariaHidden: true,
|
|
114
112
|
className: "nut-icon-loading"
|
|
115
113
|
}), !loading && icon, children && /*#__PURE__*/ React.createElement(View, {
|
|
116
114
|
className: "nut-button-children nut-button-".concat(size, "-children nut-button-").concat(type, "-children ").concat(!(props.fill || disabled || loading) ? '' : "nut-button-".concat(type).concat(props.fill ? "-".concat(fill) : '').concat(disabled || loading ? '-disabled' : '')).concat(icon || loading ? " nut-button-text" : '').concat(rightIcon ? ' nut-button-text-right' : ''),
|
|
@@ -125,9 +125,20 @@
|
|
|
125
125
|
font-weight: $calendar-day-font-weight;
|
|
126
126
|
margin-bottom: 4px;
|
|
127
127
|
|
|
128
|
+
// 部分 Taro 机型下子节点不会稳定继承父级 color,颜色直接落到最内层文案。
|
|
129
|
+
&-day,
|
|
130
|
+
&-info-curr {
|
|
131
|
+
color: $color-title;
|
|
132
|
+
}
|
|
133
|
+
|
|
128
134
|
&:nth-child(7n + 0),
|
|
129
135
|
&:nth-child(7n + 1) {
|
|
130
136
|
color: $color-primary;
|
|
137
|
+
|
|
138
|
+
.nut-calendar-day-day,
|
|
139
|
+
.nut-calendar-day-info-curr {
|
|
140
|
+
color: $color-primary;
|
|
141
|
+
}
|
|
131
142
|
}
|
|
132
143
|
|
|
133
144
|
&-info,
|
|
@@ -168,7 +179,12 @@
|
|
|
168
179
|
border-bottom-right-radius: $calendar-day-active-border-radius;
|
|
169
180
|
}
|
|
170
181
|
|
|
171
|
-
.nut-calendar-day-info {
|
|
182
|
+
&.nut-calendar-day-active .nut-calendar-day-info {
|
|
183
|
+
color: $color-primary-text;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&.nut-calendar-day-active .nut-calendar-day-day,
|
|
187
|
+
&.nut-calendar-day-active .nut-calendar-day-info-curr {
|
|
172
188
|
color: $color-primary-text;
|
|
173
189
|
}
|
|
174
190
|
}
|
|
@@ -176,6 +192,11 @@
|
|
|
176
192
|
&-disabled {
|
|
177
193
|
color: $calendar-disable-color !important;
|
|
178
194
|
|
|
195
|
+
&.nut-calendar-day-disabled .nut-calendar-day-day,
|
|
196
|
+
&.nut-calendar-day-disabled .nut-calendar-day-info-curr {
|
|
197
|
+
color: $calendar-disable-color;
|
|
198
|
+
}
|
|
199
|
+
|
|
179
200
|
.nut-calendar-day-info-curr {
|
|
180
201
|
display: none;
|
|
181
202
|
}
|
|
@@ -185,10 +206,20 @@
|
|
|
185
206
|
background-color: $calendar-choose-background-color;
|
|
186
207
|
color: $calendar-choose-color;
|
|
187
208
|
|
|
209
|
+
&.nut-calendar-day-choose .nut-calendar-day-day,
|
|
210
|
+
&.nut-calendar-day-choose .nut-calendar-day-info-curr {
|
|
211
|
+
color: $calendar-choose-color;
|
|
212
|
+
}
|
|
213
|
+
|
|
188
214
|
&-disabled {
|
|
189
215
|
background-color: $calendar-choose-disable-background-color;
|
|
190
216
|
color: $calendar-disable-color !important;
|
|
191
217
|
|
|
218
|
+
&.nut-calendar-day-choose-disabled .nut-calendar-day-day,
|
|
219
|
+
&.nut-calendar-day-choose-disabled .nut-calendar-day-info-curr {
|
|
220
|
+
color: $calendar-disable-color;
|
|
221
|
+
}
|
|
222
|
+
|
|
192
223
|
.nut-calendar-day-info-curr {
|
|
193
224
|
display: none;
|
|
194
225
|
}
|
|
@@ -104,9 +104,17 @@
|
|
|
104
104
|
font-weight: var(--nutui-calendar-day-font-weight, var(--nutui-font-weight-bold, 600));
|
|
105
105
|
margin-bottom: 4px;
|
|
106
106
|
}
|
|
107
|
+
.nut-calendar-day-day, .nut-calendar-day-info-curr {
|
|
108
|
+
color: var(--nutui-color-title, #1a1a1a);
|
|
109
|
+
}
|
|
107
110
|
.nut-calendar-day:nth-child(7n+0), .nut-calendar-day:nth-child(7n+1) {
|
|
108
111
|
color: var(--nutui-color-primary, #ff0f23);
|
|
109
112
|
}
|
|
113
|
+
.nut-calendar-day:nth-child(7n+0) .nut-calendar-day-day,
|
|
114
|
+
.nut-calendar-day:nth-child(7n+0) .nut-calendar-day-info-curr, .nut-calendar-day:nth-child(7n+1) .nut-calendar-day-day,
|
|
115
|
+
.nut-calendar-day:nth-child(7n+1) .nut-calendar-day-info-curr {
|
|
116
|
+
color: var(--nutui-color-primary, #ff0f23);
|
|
117
|
+
}
|
|
110
118
|
.nut-calendar-day-info, .nut-calendar-day-info-curr {
|
|
111
119
|
position: absolute;
|
|
112
120
|
bottom: 5px;
|
|
@@ -139,12 +147,18 @@
|
|
|
139
147
|
border-top-right-radius: var(--nutui-calendar-day-active-border-radius, 4px);
|
|
140
148
|
border-bottom-right-radius: var(--nutui-calendar-day-active-border-radius, 4px);
|
|
141
149
|
}
|
|
142
|
-
.nut-calendar-day-active .nut-calendar-day-info {
|
|
150
|
+
.nut-calendar-day-active.nut-calendar-day-active .nut-calendar-day-info {
|
|
151
|
+
color: #ffffff;
|
|
152
|
+
}
|
|
153
|
+
.nut-calendar-day-active.nut-calendar-day-active .nut-calendar-day-day, .nut-calendar-day-active.nut-calendar-day-active .nut-calendar-day-info-curr {
|
|
143
154
|
color: #ffffff;
|
|
144
155
|
}
|
|
145
156
|
.nut-calendar-day-disabled {
|
|
146
157
|
color: var(--nutui-calendar-disable-color, var(--nutui-color-text-disabled, #c2c4cc)) !important;
|
|
147
158
|
}
|
|
159
|
+
.nut-calendar-day-disabled.nut-calendar-day-disabled .nut-calendar-day-day, .nut-calendar-day-disabled.nut-calendar-day-disabled .nut-calendar-day-info-curr {
|
|
160
|
+
color: var(--nutui-calendar-disable-color, var(--nutui-color-text-disabled, #c2c4cc));
|
|
161
|
+
}
|
|
148
162
|
.nut-calendar-day-disabled .nut-calendar-day-info-curr {
|
|
149
163
|
display: none;
|
|
150
164
|
}
|
|
@@ -152,10 +166,16 @@
|
|
|
152
166
|
background-color: var(--nutui-calendar-choose-background-color, var(--nutui-color-primary-light-pressed, #ffebf1));
|
|
153
167
|
color: var(--nutui-calendar-choose-color, var(--nutui-color-primary, #ff0f23));
|
|
154
168
|
}
|
|
169
|
+
.nut-calendar-day-choose.nut-calendar-day-choose .nut-calendar-day-day, .nut-calendar-day-choose.nut-calendar-day-choose .nut-calendar-day-info-curr {
|
|
170
|
+
color: var(--nutui-calendar-choose-color, var(--nutui-color-primary, #ff0f23));
|
|
171
|
+
}
|
|
155
172
|
.nut-calendar-day-choose-disabled {
|
|
156
173
|
background-color: var(--nutui-calendar-choose-disable-background-color, rgba(191, 191, 191, 0.09));
|
|
157
174
|
color: var(--nutui-calendar-disable-color, var(--nutui-color-text-disabled, #c2c4cc)) !important;
|
|
158
175
|
}
|
|
176
|
+
.nut-calendar-day-choose-disabled.nut-calendar-day-choose-disabled .nut-calendar-day-day, .nut-calendar-day-choose-disabled.nut-calendar-day-choose-disabled .nut-calendar-day-info-curr {
|
|
177
|
+
color: var(--nutui-calendar-disable-color, var(--nutui-color-text-disabled, #c2c4cc));
|
|
178
|
+
}
|
|
159
179
|
.nut-calendar-day-choose-disabled .nut-calendar-day-info-curr {
|
|
160
180
|
display: none;
|
|
161
181
|
}
|