@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
|
@@ -19,10 +19,10 @@ var _ts_generator = require("@swc/helpers/_/_ts_generator");
|
|
|
19
19
|
var _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
20
20
|
var _taro = require("@tarojs/taro");
|
|
21
21
|
var _reactdom = require("react-dom");
|
|
22
|
-
var _reacttransitiongroup = require("react-transition-group");
|
|
23
22
|
var _classnames = /*#__PURE__*/ _interop_require_default._(require("classnames"));
|
|
24
23
|
var _iconsreacttaro = require("@nutui/icons-react-taro");
|
|
25
24
|
var _components = require("@tarojs/components");
|
|
25
|
+
var _ConfigurableCSSTransition = /*#__PURE__*/ _interop_require_default._(require("../../utils/taro/ConfigurableCSSTransition"));
|
|
26
26
|
var _getrect = require("../../utils/taro/get-rect");
|
|
27
27
|
var _overlay = require("../overlay/overlay");
|
|
28
28
|
var _index = /*#__PURE__*/ _interop_require_default._(require("../overlay/index"));
|
|
@@ -54,61 +54,72 @@ var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _overla
|
|
|
54
54
|
},
|
|
55
55
|
onTouchStart: function onTouchStart() {},
|
|
56
56
|
onTouchMove: function onTouchMove() {},
|
|
57
|
-
onTouchEnd: function onTouchEnd() {}
|
|
57
|
+
onTouchEnd: function onTouchEnd() {},
|
|
58
|
+
overlayProps: {},
|
|
59
|
+
animated: true
|
|
58
60
|
});
|
|
59
61
|
// 默认1000,参看variables
|
|
60
62
|
var _zIndex = 1100;
|
|
61
63
|
var Popup = function Popup(props) {
|
|
62
|
-
var _$_object_spread = (0, _object_spread._)({}, defaultProps, props), children = _$_object_spread.children, visible = _$_object_spread.visible, overlay = _$_object_spread.overlay, closeOnOverlayClick = _$_object_spread.closeOnOverlayClick, overlayStyle = _$_object_spread.overlayStyle, overlayClassName = _$_object_spread.overlayClassName, zIndex = _$_object_spread.zIndex, lockScroll = _$_object_spread.lockScroll, duration = _$_object_spread.duration, closeable = _$_object_spread.closeable, closeIconPosition = _$_object_spread.closeIconPosition, closeIcon = _$_object_spread.closeIcon, left = _$_object_spread.left, title = _$_object_spread.title, top = _$_object_spread.top, description = _$_object_spread.description, style = _$_object_spread.style, transition = _$_object_spread.transition, round = _$_object_spread.round, position = _$_object_spread.position, className = _$_object_spread.className, destroyOnClose = _$_object_spread.destroyOnClose, portal = _$_object_spread.portal, resizable = _$_object_spread.resizable, minHeight = _$_object_spread.minHeight, onOpen = _$_object_spread.onOpen, onClose = _$_object_spread.onClose, onOverlayClick = _$_object_spread.onOverlayClick, onCloseIconClick = _$_object_spread.onCloseIconClick, afterShow = _$_object_spread.afterShow, afterClose = _$_object_spread.afterClose, onClick = _$_object_spread.onClick, onTouchStart = _$_object_spread.onTouchStart, onTouchMove = _$_object_spread.onTouchMove, onTouchEnd = _$_object_spread.onTouchEnd, closeAriaLabel = _$_object_spread.closeAriaLabel;
|
|
63
|
-
var
|
|
64
|
-
var
|
|
64
|
+
var _$_object_spread = (0, _object_spread._)({}, defaultProps, props), children = _$_object_spread.children, visible = _$_object_spread.visible, overlay = _$_object_spread.overlay, closeOnOverlayClick = _$_object_spread.closeOnOverlayClick, overlayStyle = _$_object_spread.overlayStyle, overlayClassName = _$_object_spread.overlayClassName, zIndex = _$_object_spread.zIndex, lockScroll = _$_object_spread.lockScroll, duration = _$_object_spread.duration, closeable = _$_object_spread.closeable, closeIconPosition = _$_object_spread.closeIconPosition, closeIcon = _$_object_spread.closeIcon, left = _$_object_spread.left, title = _$_object_spread.title, top = _$_object_spread.top, description = _$_object_spread.description, style = _$_object_spread.style, transition = _$_object_spread.transition, round = _$_object_spread.round, position = _$_object_spread.position, className = _$_object_spread.className, destroyOnClose = _$_object_spread.destroyOnClose, portal = _$_object_spread.portal, resizable = _$_object_spread.resizable, minHeight = _$_object_spread.minHeight, onOpen = _$_object_spread.onOpen, onClose = _$_object_spread.onClose, onOverlayClick = _$_object_spread.onOverlayClick, onCloseIconClick = _$_object_spread.onCloseIconClick, afterShow = _$_object_spread.afterShow, afterClose = _$_object_spread.afterClose, onClick = _$_object_spread.onClick, onTouchStart = _$_object_spread.onTouchStart, onTouchMove = _$_object_spread.onTouchMove, onTouchEnd = _$_object_spread.onTouchEnd, closeAriaLabel = _$_object_spread.closeAriaLabel, overlayProps = _$_object_spread.overlayProps, animated = _$_object_spread.animated;
|
|
65
|
+
var locale = (0, _configprovider.useConfig)().locale;
|
|
66
|
+
var transitionDuration = (0, _react.useMemo)(function() {
|
|
67
|
+
return animated ? Number(duration) : 0;
|
|
68
|
+
}, [
|
|
69
|
+
animated,
|
|
70
|
+
duration
|
|
71
|
+
]);
|
|
72
|
+
var _useState = (0, _sliced_to_array._)((0, _react.useState)(zIndex || _zIndex), 2), index = _useState[0], setIndex = _useState[1];
|
|
65
73
|
var _useState1 = (0, _sliced_to_array._)((0, _react.useState)(visible), 2), innerVisible = _useState1[0], setInnerVisible = _useState1[1];
|
|
66
74
|
var _useState2 = (0, _sliced_to_array._)((0, _react.useState)(true), 2), showChildren = _useState2[0], setShowChildren = _useState2[1];
|
|
67
|
-
var _useState3 = (0, _sliced_to_array._)((0, _react.useState)(''), 2), transitionName = _useState3[0], setTransitionName = _useState3[1];
|
|
68
75
|
var nodeRef = (0, _uselockscoll.useLockScrollTaro)(innerVisible && lockScroll);
|
|
69
|
-
var topNodeRef = _react.
|
|
76
|
+
var topNodeRef = (0, _react.useRef)(null);
|
|
70
77
|
var rootRect = (0, _react.useRef)(null);
|
|
71
78
|
var touchStartRef = (0, _react.useRef)(0);
|
|
72
79
|
var touchMoveDistanceRef = (0, _react.useRef)(0);
|
|
73
80
|
var heightRef = (0, _react.useRef)(0);
|
|
74
81
|
var defaultHeightRef = (0, _react.useRef)(0);
|
|
75
82
|
var isTouching = (0, _react.useRef)(false);
|
|
76
|
-
var locale = (0, _configprovider.useConfig)().locale;
|
|
77
83
|
var classPrefix = 'nut-popup';
|
|
78
|
-
var
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
var
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
84
|
+
var transitionName = (0, _react.useMemo)(function() {
|
|
85
|
+
return transition || "".concat(classPrefix, "-slide-").concat(position);
|
|
86
|
+
}, [
|
|
87
|
+
transition,
|
|
88
|
+
position
|
|
89
|
+
]);
|
|
90
|
+
var overlayStyles = (0, _react.useMemo)(function() {
|
|
91
|
+
return (0, _object_spread._)({}, overlayStyle);
|
|
92
|
+
}, [
|
|
93
|
+
overlayStyle
|
|
94
|
+
]);
|
|
95
|
+
var contentZIndex = (0, _react.useMemo)(function() {
|
|
96
|
+
return (0, _platform.harmony)() ? index + 1 : index // 解决harmony层级问题
|
|
97
|
+
;
|
|
98
|
+
}, [
|
|
99
|
+
index
|
|
100
|
+
]);
|
|
101
|
+
var popStyles = (0, _react.useMemo)(function() {
|
|
102
|
+
return (0, _object_spread._)({
|
|
103
|
+
zIndex: contentZIndex,
|
|
104
|
+
minHeight: minHeight
|
|
105
|
+
}, style);
|
|
106
|
+
}, [
|
|
107
|
+
contentZIndex,
|
|
108
|
+
minHeight,
|
|
109
|
+
style
|
|
110
|
+
]);
|
|
111
|
+
var popClassName = (0, _react.useMemo)(function() {
|
|
112
|
+
var _obj;
|
|
113
|
+
return (0, _classnames.default)(classPrefix, (_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix, "-round"), round || position === 'bottom'), (0, _define_property._)(_obj, "".concat(classPrefix, "-").concat(position), true), _obj), className);
|
|
114
|
+
}, [
|
|
115
|
+
round,
|
|
116
|
+
position,
|
|
117
|
+
className
|
|
118
|
+
]);
|
|
119
|
+
var _useState3 = (0, _sliced_to_array._)((0, _react.useState)(''), 2), popupHeight = _useState3[0], setPopupHeight = _useState3[1];
|
|
120
|
+
var _useState4 = (0, _sliced_to_array._)((0, _react.useState)(''), 2), topBottom = _useState4[0], setTopBottom = _useState4[1];
|
|
121
|
+
var getPopupHeight = (0, _react.useCallback)(function() {
|
|
122
|
+
return (0, _async_to_generator._)(function() {
|
|
112
123
|
var _nodeRef_current, rect, height;
|
|
113
124
|
return (0, _ts_generator._)(this, function(_state) {
|
|
114
125
|
switch(_state.label){
|
|
@@ -126,52 +137,110 @@ var Popup = function Popup(props) {
|
|
|
126
137
|
];
|
|
127
138
|
}
|
|
128
139
|
});
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
(
|
|
137
|
-
(0,
|
|
138
|
-
|
|
139
|
-
|
|
140
|
+
})();
|
|
141
|
+
}, [
|
|
142
|
+
nodeRef
|
|
143
|
+
]);
|
|
144
|
+
var open = (0, _react.useCallback)(function() {
|
|
145
|
+
if (!innerVisible) {
|
|
146
|
+
// 当高度改变后,再次打开时,将高度置为初始高度
|
|
147
|
+
if (position === 'bottom' && resizable && nodeRef.current && heightRef.current) {
|
|
148
|
+
setPopupHeight((0, _pxtransform.pxTransform)(defaultHeightRef.current));
|
|
149
|
+
}
|
|
150
|
+
setInnerVisible(true);
|
|
151
|
+
setIndex(function(prev) {
|
|
152
|
+
return prev + 1;
|
|
140
153
|
});
|
|
141
154
|
}
|
|
155
|
+
if (destroyOnClose) {
|
|
156
|
+
setShowChildren(true);
|
|
157
|
+
}
|
|
158
|
+
onOpen === null || onOpen === void 0 ? void 0 : onOpen();
|
|
142
159
|
}, [
|
|
143
|
-
innerVisible
|
|
160
|
+
innerVisible,
|
|
161
|
+
position,
|
|
162
|
+
resizable,
|
|
163
|
+
destroyOnClose,
|
|
164
|
+
onOpen,
|
|
165
|
+
nodeRef,
|
|
166
|
+
setInnerVisible,
|
|
167
|
+
setIndex,
|
|
168
|
+
setShowChildren
|
|
144
169
|
]);
|
|
145
|
-
var close =
|
|
170
|
+
var close = (0, _react.useCallback)(function() {
|
|
146
171
|
if (innerVisible) {
|
|
147
172
|
setInnerVisible(false);
|
|
148
173
|
if (destroyOnClose) {
|
|
149
174
|
setTimeout(function() {
|
|
150
175
|
setShowChildren(false);
|
|
151
|
-
},
|
|
176
|
+
}, transitionDuration);
|
|
152
177
|
}
|
|
153
|
-
onClose
|
|
178
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
154
179
|
}
|
|
155
|
-
}
|
|
156
|
-
|
|
180
|
+
}, [
|
|
181
|
+
innerVisible,
|
|
182
|
+
destroyOnClose,
|
|
183
|
+
transitionDuration,
|
|
184
|
+
onClose,
|
|
185
|
+
setInnerVisible,
|
|
186
|
+
setShowChildren
|
|
187
|
+
]);
|
|
188
|
+
(0, _react.useEffect)(function() {
|
|
189
|
+
visible ? open() : close();
|
|
190
|
+
}, [
|
|
191
|
+
visible,
|
|
192
|
+
open,
|
|
193
|
+
close
|
|
194
|
+
]);
|
|
195
|
+
(0, _react.useEffect)(function() {
|
|
196
|
+
if (innerVisible && topNodeRef.current && nodeRef.current) {
|
|
197
|
+
(0, _taro.nextTick)(function() {
|
|
198
|
+
(0, _taro.nextTick)(function() {
|
|
199
|
+
getPopupHeight();
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}, [
|
|
204
|
+
innerVisible,
|
|
205
|
+
getPopupHeight,
|
|
206
|
+
nodeRef
|
|
207
|
+
]);
|
|
208
|
+
var handleOverlayClick = (0, _react.useCallback)(function(e) {
|
|
157
209
|
e.stopPropagation();
|
|
158
210
|
if (closeOnOverlayClick && onOverlayClick(e)) {
|
|
159
211
|
close();
|
|
160
212
|
}
|
|
161
|
-
}
|
|
162
|
-
|
|
213
|
+
}, [
|
|
214
|
+
closeOnOverlayClick,
|
|
215
|
+
onOverlayClick,
|
|
216
|
+
close
|
|
217
|
+
]);
|
|
218
|
+
var handleCloseIconClick = (0, _react.useCallback)(function(e) {
|
|
163
219
|
onCloseIconClick(e) && close();
|
|
164
|
-
}
|
|
165
|
-
|
|
220
|
+
}, [
|
|
221
|
+
onCloseIconClick,
|
|
222
|
+
close
|
|
223
|
+
]);
|
|
224
|
+
var renderCloseIcon = (0, _react.useCallback)(function() {
|
|
225
|
+
if (!closeable) return null;
|
|
166
226
|
var closeClasses = (0, _classnames.default)("".concat(classPrefix, "-title-right"), "".concat(classPrefix, "-title-right-").concat(closeIconPosition));
|
|
167
|
-
return /*#__PURE__*/ _react.default.createElement(
|
|
227
|
+
return /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
168
228
|
className: closeClasses,
|
|
169
229
|
onClick: handleCloseIconClick,
|
|
170
230
|
ariaRole: "button",
|
|
171
231
|
ariaLabel: closeAriaLabel || locale.close
|
|
172
|
-
}, /*#__PURE__*/ _react.default.isValidElement(closeIcon) ? closeIcon : /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Close,
|
|
173
|
-
|
|
174
|
-
|
|
232
|
+
}, /*#__PURE__*/ _react.default.isValidElement(closeIcon) ? closeIcon : /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Close, {
|
|
233
|
+
ariaHidden: true
|
|
234
|
+
}));
|
|
235
|
+
}, [
|
|
236
|
+
closeable,
|
|
237
|
+
closeIconPosition,
|
|
238
|
+
handleCloseIconClick,
|
|
239
|
+
closeAriaLabel,
|
|
240
|
+
locale.close,
|
|
241
|
+
closeIcon
|
|
242
|
+
]);
|
|
243
|
+
var renderTop = (0, _react.useCallback)(function() {
|
|
175
244
|
if (!top) return null;
|
|
176
245
|
return /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
177
246
|
className: "".concat(classPrefix, "-bottom-top"),
|
|
@@ -180,8 +249,11 @@ var Popup = function Popup(props) {
|
|
|
180
249
|
bottom: topBottom
|
|
181
250
|
}
|
|
182
251
|
}, top);
|
|
183
|
-
}
|
|
184
|
-
|
|
252
|
+
}, [
|
|
253
|
+
top,
|
|
254
|
+
topBottom
|
|
255
|
+
]);
|
|
256
|
+
var renderTitle = (0, _react.useCallback)(function() {
|
|
185
257
|
if (left || title || description) {
|
|
186
258
|
return /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
187
259
|
className: "".concat(classPrefix, "-title")
|
|
@@ -198,9 +270,16 @@ var Popup = function Popup(props) {
|
|
|
198
270
|
if (closeable) {
|
|
199
271
|
return renderCloseIcon();
|
|
200
272
|
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
273
|
+
}, [
|
|
274
|
+
left,
|
|
275
|
+
title,
|
|
276
|
+
description,
|
|
277
|
+
position,
|
|
278
|
+
closeable,
|
|
279
|
+
renderCloseIcon
|
|
280
|
+
]);
|
|
281
|
+
var handleTouchStart = (0, _react.useCallback)(function(event) {
|
|
282
|
+
return (0, _async_to_generator._)(function() {
|
|
204
283
|
var _nodeRef_current, _rootRect_current, e, rect;
|
|
205
284
|
return (0, _ts_generator._)(this, function(_state) {
|
|
206
285
|
switch(_state.label){
|
|
@@ -228,12 +307,14 @@ var Popup = function Popup(props) {
|
|
|
228
307
|
];
|
|
229
308
|
}
|
|
230
309
|
});
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
310
|
+
})();
|
|
311
|
+
}, [
|
|
312
|
+
position,
|
|
313
|
+
resizable,
|
|
314
|
+
onTouchStart,
|
|
315
|
+
nodeRef
|
|
316
|
+
]);
|
|
317
|
+
var handleTouchMove = (0, _react.useCallback)(function(event) {
|
|
237
318
|
if (position !== 'bottom' || !resizable || !nodeRef.current || !rootRect.current) return;
|
|
238
319
|
var e = event;
|
|
239
320
|
e.stopPropagation();
|
|
@@ -252,65 +333,63 @@ var Popup = function Popup(props) {
|
|
|
252
333
|
}
|
|
253
334
|
};
|
|
254
335
|
requestAnimationFrame(handleMove);
|
|
255
|
-
}
|
|
256
|
-
|
|
336
|
+
}, [
|
|
337
|
+
position,
|
|
338
|
+
resizable,
|
|
339
|
+
minHeight,
|
|
340
|
+
onTouchMove,
|
|
341
|
+
nodeRef
|
|
342
|
+
]);
|
|
343
|
+
var handleTouchEnd = (0, _react.useCallback)(function(event) {
|
|
257
344
|
if (position !== 'bottom' || !resizable || !nodeRef.current || !rootRect.current) return;
|
|
258
345
|
var e = event;
|
|
259
346
|
isTouching.current = false;
|
|
260
347
|
var min = typeof minHeight === 'number' ? minHeight : parseInt(String(minHeight || 0), 10) || 0;
|
|
261
348
|
var currentHeight = Math.max(min, heightRef.current - touchMoveDistanceRef.current);
|
|
262
349
|
onTouchEnd === null || onTouchEnd === void 0 ? void 0 : onTouchEnd(currentHeight, e);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
className: popClassName,
|
|
271
|
-
onClick: onClick,
|
|
272
|
-
catchMove: lockScroll,
|
|
273
|
-
onTouchStart: handleTouchStart,
|
|
274
|
-
onTouchMove: handleTouchMove,
|
|
275
|
-
onTouchEnd: handleTouchEnd,
|
|
276
|
-
onTouchCancel: handleTouchEnd
|
|
277
|
-
}, renderTop(), renderTitle(), showChildren ? children : null);
|
|
278
|
-
};
|
|
350
|
+
}, [
|
|
351
|
+
position,
|
|
352
|
+
resizable,
|
|
353
|
+
minHeight,
|
|
354
|
+
onTouchEnd,
|
|
355
|
+
nodeRef
|
|
356
|
+
]);
|
|
279
357
|
var renderPop = function renderPop() {
|
|
280
|
-
return /*#__PURE__*/ _react.default.createElement(
|
|
358
|
+
return /*#__PURE__*/ _react.default.createElement(_ConfigurableCSSTransition.default, {
|
|
281
359
|
nodeRef: nodeRef,
|
|
282
360
|
classNames: transitionName,
|
|
283
361
|
mountOnEnter: true,
|
|
284
362
|
unmountOnExit: destroyOnClose,
|
|
285
|
-
timeout:
|
|
363
|
+
timeout: Number(transitionDuration),
|
|
286
364
|
in: innerVisible,
|
|
287
365
|
onEntered: afterShow,
|
|
288
366
|
onExited: afterClose
|
|
289
|
-
},
|
|
367
|
+
}, /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
368
|
+
ref: nodeRef,
|
|
369
|
+
style: (0, _object_spread._)({}, popStyles, popupHeight ? {
|
|
370
|
+
height: popupHeight
|
|
371
|
+
} : {}),
|
|
372
|
+
className: popClassName,
|
|
373
|
+
onClick: onClick,
|
|
374
|
+
catchMove: lockScroll,
|
|
375
|
+
onTouchStart: handleTouchStart,
|
|
376
|
+
onTouchMove: handleTouchMove,
|
|
377
|
+
onTouchEnd: handleTouchEnd,
|
|
378
|
+
onTouchCancel: handleTouchEnd
|
|
379
|
+
}, renderTop(), renderTitle(), showChildren ? children : null));
|
|
290
380
|
};
|
|
291
381
|
var renderNode = function renderNode() {
|
|
292
|
-
return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, overlay ? /*#__PURE__*/ _react.default.createElement(_index.default, {
|
|
382
|
+
return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, overlay ? /*#__PURE__*/ _react.default.createElement(_index.default, (0, _object_spread._)({
|
|
293
383
|
zIndex: index,
|
|
294
384
|
style: overlayStyles,
|
|
295
385
|
className: overlayClassName,
|
|
296
386
|
visible: innerVisible,
|
|
297
387
|
closeOnOverlayClick: closeOnOverlayClick,
|
|
298
388
|
lockScroll: lockScroll,
|
|
299
|
-
duration:
|
|
389
|
+
duration: transitionDuration,
|
|
300
390
|
onClick: handleOverlayClick
|
|
301
|
-
}) : null, renderPop());
|
|
391
|
+
}, overlayProps)) : null, renderPop());
|
|
302
392
|
};
|
|
303
|
-
(0, _react.useEffect)(function() {
|
|
304
|
-
visible ? open() : close();
|
|
305
|
-
}, [
|
|
306
|
-
visible
|
|
307
|
-
]);
|
|
308
|
-
(0, _react.useEffect)(function() {
|
|
309
|
-
setTransitionName(transition || "".concat(classPrefix, "-slide-").concat(position));
|
|
310
|
-
}, [
|
|
311
|
-
position,
|
|
312
|
-
transition
|
|
313
|
-
]);
|
|
314
393
|
var resolveContainer = function resolveContainer(getContainer) {
|
|
315
394
|
return (typeof getContainer === 'function' ? getContainer() : getContainer) || document.body;
|
|
316
395
|
};
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
color: $color-title;
|
|
27
27
|
font-weight: $font-weight-bold;
|
|
28
28
|
font-size: $popup-title-font-size;
|
|
29
|
-
line-height: $popup-title-font-size;
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
&-description {
|
|
@@ -79,6 +78,8 @@
|
|
|
79
78
|
&-center {
|
|
80
79
|
top: 50%;
|
|
81
80
|
left: 50%;
|
|
81
|
+
right: auto;
|
|
82
|
+
bottom: auto;
|
|
82
83
|
min-height: 10%;
|
|
83
84
|
max-width: 295px;
|
|
84
85
|
transform: translate(-50%, -50%);
|
|
@@ -91,6 +92,8 @@
|
|
|
91
92
|
&-bottom {
|
|
92
93
|
bottom: 0;
|
|
93
94
|
left: 0;
|
|
95
|
+
right: auto;
|
|
96
|
+
top: auto;
|
|
94
97
|
width: 100%;
|
|
95
98
|
|
|
96
99
|
&.nut-popup-round {
|
|
@@ -105,6 +108,8 @@
|
|
|
105
108
|
&-right {
|
|
106
109
|
top: 0;
|
|
107
110
|
right: 0;
|
|
111
|
+
left: auto;
|
|
112
|
+
bottom: auto;
|
|
108
113
|
width: 100px;
|
|
109
114
|
height: 100%;
|
|
110
115
|
|
|
@@ -116,6 +121,8 @@
|
|
|
116
121
|
&-left {
|
|
117
122
|
top: 0;
|
|
118
123
|
left: 0;
|
|
124
|
+
right: auto;
|
|
125
|
+
bottom: auto;
|
|
119
126
|
width: 100px;
|
|
120
127
|
height: 100%;
|
|
121
128
|
|
|
@@ -127,6 +134,8 @@
|
|
|
127
134
|
&-top {
|
|
128
135
|
top: 0;
|
|
129
136
|
left: 0;
|
|
137
|
+
right: auto;
|
|
138
|
+
bottom: auto;
|
|
130
139
|
width: 100%;
|
|
131
140
|
|
|
132
141
|
&.nut-popup-round {
|
|
@@ -210,6 +219,9 @@
|
|
|
210
219
|
}
|
|
211
220
|
|
|
212
221
|
@keyframes popup-slide-top-exit {
|
|
222
|
+
from {
|
|
223
|
+
transform: translate3d(0, 0%, 0);
|
|
224
|
+
}
|
|
213
225
|
to {
|
|
214
226
|
transform: translate3d(0, -100%, 0);
|
|
215
227
|
}
|
|
@@ -240,6 +252,9 @@
|
|
|
240
252
|
}
|
|
241
253
|
|
|
242
254
|
@keyframes popup-slide-right-exit {
|
|
255
|
+
from {
|
|
256
|
+
transform: translate3d(0%, 0, 0);
|
|
257
|
+
}
|
|
243
258
|
to {
|
|
244
259
|
transform: translate3d(100%, 0, 0);
|
|
245
260
|
}
|
|
@@ -270,6 +285,9 @@
|
|
|
270
285
|
}
|
|
271
286
|
|
|
272
287
|
@keyframes slide-bottom-exit {
|
|
288
|
+
from {
|
|
289
|
+
transform: translate3d(0, 0%, 0);
|
|
290
|
+
}
|
|
273
291
|
to {
|
|
274
292
|
transform: translate3d(0, 100%, 0);
|
|
275
293
|
}
|
|
@@ -300,6 +318,9 @@
|
|
|
300
318
|
}
|
|
301
319
|
|
|
302
320
|
@keyframes popup-slide-left-exit {
|
|
321
|
+
from {
|
|
322
|
+
transform: translate3d(0%, 0, 0);
|
|
323
|
+
}
|
|
303
324
|
to {
|
|
304
325
|
transform: translate3d(-100%, 0, 0);
|
|
305
326
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
align-items: center;
|
|
18
18
|
justify-content: center;
|
|
19
19
|
border-bottom: var(--nutui-popup-title-border-bottom, 0);
|
|
20
|
-
padding: var(--nutui-popup-title-padding,
|
|
20
|
+
padding: var(--nutui-popup-title-padding, 11px);
|
|
21
21
|
position: relative;
|
|
22
22
|
}
|
|
23
23
|
.nut-popup-title-wrapper {
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
color: var(--nutui-color-title, #1a1a1a);
|
|
31
31
|
font-weight: var(--nutui-font-weight-bold, 600);
|
|
32
32
|
font-size: var(--nutui-popup-title-font-size, var(--nutui-font-size-xl, 18px));
|
|
33
|
-
line-height: var(--nutui-popup-title-font-size, var(--nutui-font-size-xl, 18px));
|
|
34
33
|
}
|
|
35
34
|
.nut-popup-title-description {
|
|
36
35
|
color: var(--nutui-color-text, #505259);
|
|
@@ -42,13 +41,13 @@
|
|
|
42
41
|
}
|
|
43
42
|
.nut-popup-title-left {
|
|
44
43
|
position: absolute;
|
|
45
|
-
top: var(--nutui-popup-title-padding,
|
|
46
|
-
left: var(--nutui-popup-title-padding,
|
|
44
|
+
top: var(--nutui-popup-title-padding, 11px);
|
|
45
|
+
left: var(--nutui-popup-title-padding, 11px);
|
|
47
46
|
}
|
|
48
47
|
.nut-popup-title-right {
|
|
49
48
|
position: absolute;
|
|
50
|
-
top: var(--nutui-popup-title-padding,
|
|
51
|
-
right: var(--nutui-popup-title-padding,
|
|
49
|
+
top: var(--nutui-popup-title-padding, 11px);
|
|
50
|
+
right: var(--nutui-popup-title-padding, 11px);
|
|
52
51
|
z-index: 1;
|
|
53
52
|
width: var(--nutui-popup-icon-size, 20px);
|
|
54
53
|
height: var(--nutui-popup-icon-size, 20px);
|
|
@@ -59,20 +58,22 @@
|
|
|
59
58
|
opacity: 0.7;
|
|
60
59
|
}
|
|
61
60
|
.nut-popup-title-right-top-left {
|
|
62
|
-
top: var(--nutui-popup-title-padding,
|
|
63
|
-
left: var(--nutui-popup-title-padding,
|
|
61
|
+
top: var(--nutui-popup-title-padding, 11px);
|
|
62
|
+
left: var(--nutui-popup-title-padding, 11px);
|
|
64
63
|
}
|
|
65
64
|
.nut-popup-title-right-bottom-left {
|
|
66
|
-
bottom: var(--nutui-popup-title-padding,
|
|
67
|
-
left: var(--nutui-popup-title-padding,
|
|
65
|
+
bottom: var(--nutui-popup-title-padding, 11px);
|
|
66
|
+
left: var(--nutui-popup-title-padding, 11px);
|
|
68
67
|
}
|
|
69
68
|
.nut-popup-title-right-bottom-right {
|
|
70
|
-
right: var(--nutui-popup-title-padding,
|
|
71
|
-
bottom: var(--nutui-popup-title-padding,
|
|
69
|
+
right: var(--nutui-popup-title-padding, 11px);
|
|
70
|
+
bottom: var(--nutui-popup-title-padding, 11px);
|
|
72
71
|
}
|
|
73
72
|
.nut-popup-center {
|
|
74
73
|
top: 50%;
|
|
75
74
|
left: 50%;
|
|
75
|
+
right: auto;
|
|
76
|
+
bottom: auto;
|
|
76
77
|
min-height: 10%;
|
|
77
78
|
max-width: 295px;
|
|
78
79
|
transform: translate(-50%, -50%);
|
|
@@ -83,6 +84,8 @@
|
|
|
83
84
|
.nut-popup-bottom {
|
|
84
85
|
bottom: 0;
|
|
85
86
|
left: 0;
|
|
87
|
+
right: auto;
|
|
88
|
+
top: auto;
|
|
86
89
|
width: 100%;
|
|
87
90
|
}
|
|
88
91
|
.nut-popup-bottom.nut-popup-round {
|
|
@@ -94,6 +97,8 @@
|
|
|
94
97
|
.nut-popup-right {
|
|
95
98
|
top: 0;
|
|
96
99
|
right: 0;
|
|
100
|
+
left: auto;
|
|
101
|
+
bottom: auto;
|
|
97
102
|
width: 100px;
|
|
98
103
|
height: 100%;
|
|
99
104
|
}
|
|
@@ -103,6 +108,8 @@
|
|
|
103
108
|
.nut-popup-left {
|
|
104
109
|
top: 0;
|
|
105
110
|
left: 0;
|
|
111
|
+
right: auto;
|
|
112
|
+
bottom: auto;
|
|
106
113
|
width: 100px;
|
|
107
114
|
height: 100%;
|
|
108
115
|
}
|
|
@@ -112,6 +119,8 @@
|
|
|
112
119
|
.nut-popup-top {
|
|
113
120
|
top: 0;
|
|
114
121
|
left: 0;
|
|
122
|
+
right: auto;
|
|
123
|
+
bottom: auto;
|
|
115
124
|
width: 100%;
|
|
116
125
|
}
|
|
117
126
|
.nut-popup-top.nut-popup-round {
|
|
@@ -188,6 +197,9 @@
|
|
|
188
197
|
}
|
|
189
198
|
}
|
|
190
199
|
@keyframes popup-slide-top-exit {
|
|
200
|
+
from {
|
|
201
|
+
transform: translate3d(0, 0%, 0);
|
|
202
|
+
}
|
|
191
203
|
to {
|
|
192
204
|
transform: translate3d(0, -100%, 0);
|
|
193
205
|
}
|
|
@@ -212,6 +224,9 @@
|
|
|
212
224
|
}
|
|
213
225
|
}
|
|
214
226
|
@keyframes popup-slide-right-exit {
|
|
227
|
+
from {
|
|
228
|
+
transform: translate3d(0%, 0, 0);
|
|
229
|
+
}
|
|
215
230
|
to {
|
|
216
231
|
transform: translate3d(100%, 0, 0);
|
|
217
232
|
}
|
|
@@ -236,6 +251,9 @@
|
|
|
236
251
|
}
|
|
237
252
|
}
|
|
238
253
|
@keyframes slide-bottom-exit {
|
|
254
|
+
from {
|
|
255
|
+
transform: translate3d(0, 0%, 0);
|
|
256
|
+
}
|
|
239
257
|
to {
|
|
240
258
|
transform: translate3d(0, 100%, 0);
|
|
241
259
|
}
|
|
@@ -260,6 +278,9 @@
|
|
|
260
278
|
}
|
|
261
279
|
}
|
|
262
280
|
@keyframes popup-slide-left-exit {
|
|
281
|
+
from {
|
|
282
|
+
transform: translate3d(0%, 0, 0);
|
|
283
|
+
}
|
|
263
284
|
to {
|
|
264
285
|
transform: translate3d(-100%, 0, 0);
|
|
265
286
|
}
|
|
@@ -285,27 +306,27 @@
|
|
|
285
306
|
[dir=rtl] .nut-popup-title-left,
|
|
286
307
|
.nut-rtl .nut-popup-title-left {
|
|
287
308
|
left: auto;
|
|
288
|
-
right: var(--nutui-popup-title-padding,
|
|
309
|
+
right: var(--nutui-popup-title-padding, 11px);
|
|
289
310
|
}
|
|
290
311
|
[dir=rtl] .nut-popup-title-right,
|
|
291
312
|
.nut-rtl .nut-popup-title-right {
|
|
292
313
|
right: auto;
|
|
293
|
-
left: var(--nutui-popup-title-padding,
|
|
314
|
+
left: var(--nutui-popup-title-padding, 11px);
|
|
294
315
|
}
|
|
295
316
|
[dir=rtl] .nut-popup-title-right-top-left,
|
|
296
317
|
.nut-rtl .nut-popup-title-right-top-left {
|
|
297
318
|
left: auto;
|
|
298
|
-
right: var(--nutui-popup-title-padding,
|
|
319
|
+
right: var(--nutui-popup-title-padding, 11px);
|
|
299
320
|
}
|
|
300
321
|
[dir=rtl] .nut-popup-title-right-bottom-left,
|
|
301
322
|
.nut-rtl .nut-popup-title-right-bottom-left {
|
|
302
323
|
left: auto;
|
|
303
|
-
right: var(--nutui-popup-title-padding,
|
|
324
|
+
right: var(--nutui-popup-title-padding, 11px);
|
|
304
325
|
}
|
|
305
326
|
[dir=rtl] .nut-popup-title-right-bottom-right,
|
|
306
327
|
.nut-rtl .nut-popup-title-right-bottom-right {
|
|
307
328
|
right: auto;
|
|
308
|
-
left: var(--nutui-popup-title-padding,
|
|
329
|
+
left: var(--nutui-popup-title-padding, 11px);
|
|
309
330
|
}
|
|
310
331
|
[dir=rtl] .nut-popup-title .nut-icon-ArrowLeft,
|
|
311
332
|
.nut-rtl .nut-popup-title .nut-icon-ArrowLeft {
|