@nutui/nutui-react-taro 3.0.20-beta.0 → 3.0.20-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 +28 -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.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.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 +47 -46
- package/dist/style-jrkf.css +1 -1
- package/dist/style-jrkf.scss +31 -30
- package/dist/style.css +1 -1
- package/dist/style.scss +34 -33
- 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
- package/postinstall.js +0 -9
|
@@ -81,8 +81,8 @@ export var Sticky = function(props) {
|
|
|
81
81
|
threshold,
|
|
82
82
|
zIndex
|
|
83
83
|
]);
|
|
84
|
-
var handleScroll =
|
|
85
|
-
|
|
84
|
+
var handleScroll = function(scrollTop) {
|
|
85
|
+
return _async_to_generator(function() {
|
|
86
86
|
var curRootRect, stickyRect, containerRect, difference, curTransform, curFixed, windowHeight;
|
|
87
87
|
return _ts_generator(this, function(_state) {
|
|
88
88
|
switch(_state.label){
|
|
@@ -150,11 +150,8 @@ export var Sticky = function(props) {
|
|
|
150
150
|
];
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
return _ref.apply(this, arguments);
|
|
156
|
-
};
|
|
157
|
-
}();
|
|
153
|
+
})();
|
|
154
|
+
};
|
|
158
155
|
var getElement = useCallback(function() {
|
|
159
156
|
return getScrollParent(rootRef.current);
|
|
160
157
|
}, []);
|
|
@@ -3,13 +3,13 @@ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
|
3
3
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
4
4
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
5
5
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
6
|
-
import React, { forwardRef, useCallback, useEffect, useImperativeHandle,
|
|
6
|
+
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
7
7
|
import classNames from "classnames";
|
|
8
8
|
import { View } from "@tarojs/components";
|
|
9
|
+
import { nextTick, useReady } from "@tarojs/taro";
|
|
9
10
|
import { useTouch } from "../../hooks/use-touch";
|
|
10
11
|
import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
|
|
11
12
|
import { ComponentDefaults } from "../../utils/typings";
|
|
12
|
-
import { harmony } from "../../utils/taro/platform";
|
|
13
13
|
import { useRefState } from "../../hooks/use-ref-state";
|
|
14
14
|
import { useUuid } from "../../hooks/use-uuid";
|
|
15
15
|
function preventDefault(event, isStopPropagation) {
|
|
@@ -29,100 +29,9 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
|
|
|
29
29
|
var uid = useUuid();
|
|
30
30
|
var leftId = "swipe-left-".concat(uid);
|
|
31
31
|
var rightId = "swipe-right-".concat(uid);
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
var lockClick = useRef(false);
|
|
36
|
-
var startOffset = useRef(0);
|
|
37
|
-
var _useState = _sliced_to_array(useState({
|
|
38
|
-
offset: 0,
|
|
39
|
-
dragging: false
|
|
40
|
-
}), 2), state = _useState[0], setState = _useState[1];
|
|
41
|
-
var _useRefState = _sliced_to_array(useRefState({
|
|
42
|
-
left: 0,
|
|
43
|
-
right: 0
|
|
44
|
-
}), 2), actionWidth = _useRefState[0], updateState = _useRefState[1];
|
|
45
|
-
var setActionWidth = useCallback(function(fn) {
|
|
46
|
-
var res = fn();
|
|
47
|
-
if (res.left !== undefined) {
|
|
48
|
-
updateState(_object_spread_props(_object_spread({}, actionWidth.current), {
|
|
49
|
-
left: res.left
|
|
50
|
-
}));
|
|
51
|
-
}
|
|
52
|
-
if (res.right !== undefined) {
|
|
53
|
-
updateState(_object_spread_props(_object_spread({}, actionWidth.current), {
|
|
54
|
-
right: res.right
|
|
55
|
-
}));
|
|
56
|
-
}
|
|
57
|
-
}, [
|
|
58
|
-
actionWidth,
|
|
59
|
-
updateState
|
|
60
|
-
]);
|
|
61
|
-
// 获取元素的时候要在页面 onReady 后,需要参考小程序的事件周期
|
|
62
|
-
useLayoutEffect(function() {
|
|
63
|
-
var getWidth = /*#__PURE__*/ function() {
|
|
64
|
-
var _ref = _async_to_generator(function() {
|
|
65
|
-
var leftRect, rightRect;
|
|
66
|
-
return _ts_generator(this, function(_state) {
|
|
67
|
-
switch(_state.label){
|
|
68
|
-
case 0:
|
|
69
|
-
if (!leftWrapper.current) return [
|
|
70
|
-
3,
|
|
71
|
-
2
|
|
72
|
-
];
|
|
73
|
-
return [
|
|
74
|
-
4,
|
|
75
|
-
getRectInMultiPlatform(leftWrapper.current, leftId)
|
|
76
|
-
];
|
|
77
|
-
case 1:
|
|
78
|
-
leftRect = _state.sent();
|
|
79
|
-
leftRect && setActionWidth(function(v) {
|
|
80
|
-
return _object_spread_props(_object_spread({}, v), {
|
|
81
|
-
left: leftRect.width
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
_state.label = 2;
|
|
85
|
-
case 2:
|
|
86
|
-
if (!rightWrapper.current) return [
|
|
87
|
-
3,
|
|
88
|
-
4
|
|
89
|
-
];
|
|
90
|
-
return [
|
|
91
|
-
4,
|
|
92
|
-
getRectInMultiPlatform(rightWrapper.current, rightId)
|
|
93
|
-
];
|
|
94
|
-
case 3:
|
|
95
|
-
rightRect = _state.sent();
|
|
96
|
-
rightRect && setActionWidth(function(v) {
|
|
97
|
-
return _object_spread_props(_object_spread({}, v), {
|
|
98
|
-
right: rightRect.width
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
_state.label = 4;
|
|
102
|
-
case 4:
|
|
103
|
-
return [
|
|
104
|
-
2
|
|
105
|
-
];
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
return function getWidth() {
|
|
110
|
-
return _ref.apply(this, arguments);
|
|
111
|
-
};
|
|
112
|
-
}();
|
|
113
|
-
getWidth();
|
|
114
|
-
}, [
|
|
115
|
-
leftId,
|
|
116
|
-
rightId,
|
|
117
|
-
setActionWidth
|
|
118
|
-
]);
|
|
119
|
-
var wrapperStyle = {
|
|
120
|
-
transform: "translate(".concat(state.offset).concat(!harmony() ? 'px' : '', ", 0)"),
|
|
121
|
-
transitionDuration: state.dragging ? '0s' : '.6s'
|
|
122
|
-
};
|
|
123
|
-
var onTouchStart = /*#__PURE__*/ function() {
|
|
124
|
-
var _ref = _async_to_generator(function(event) {
|
|
125
|
-
var leftRect, rightRect, _props_onTouchStart;
|
|
32
|
+
var getWidth = function() {
|
|
33
|
+
return _async_to_generator(function() {
|
|
34
|
+
var leftRect, rightRect;
|
|
126
35
|
return _ts_generator(this, function(_state) {
|
|
127
36
|
switch(_state.label){
|
|
128
37
|
case 0:
|
|
@@ -160,47 +69,96 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
|
|
|
160
69
|
});
|
|
161
70
|
_state.label = 4;
|
|
162
71
|
case 4:
|
|
163
|
-
if (!props.disabled) {
|
|
164
|
-
;
|
|
165
|
-
startOffset.current = state.offset;
|
|
166
|
-
touch.start(event);
|
|
167
|
-
(_props_onTouchStart = props.onTouchStart) === null || _props_onTouchStart === void 0 ? void 0 : _props_onTouchStart.call(props, event);
|
|
168
|
-
}
|
|
169
72
|
return [
|
|
170
73
|
2
|
|
171
74
|
];
|
|
172
75
|
}
|
|
173
76
|
});
|
|
77
|
+
})();
|
|
78
|
+
};
|
|
79
|
+
// 获取元素的时候要在页面 onReady 后,需要参考小程序的事件周期
|
|
80
|
+
useReady(function() {
|
|
81
|
+
nextTick(function() {
|
|
82
|
+
return getWidth();
|
|
174
83
|
});
|
|
175
|
-
|
|
176
|
-
|
|
84
|
+
});
|
|
85
|
+
var _$_object_spread = _object_spread({}, defaultProps, props), children = _$_object_spread.children, className = _$_object_spread.className, style = _$_object_spread.style;
|
|
86
|
+
var root = useRef();
|
|
87
|
+
var opened = useRef(false);
|
|
88
|
+
var lockClick = useRef(false);
|
|
89
|
+
var startOffset = useRef(0);
|
|
90
|
+
var _useState = _sliced_to_array(useState({
|
|
91
|
+
offset: 0,
|
|
92
|
+
dragging: false
|
|
93
|
+
}), 2), state = _useState[0], setState = _useState[1];
|
|
94
|
+
var _useRefState = _sliced_to_array(useRefState({
|
|
95
|
+
left: 0,
|
|
96
|
+
right: 0
|
|
97
|
+
}), 2), actionWidth = _useRefState[0], updateState = _useRefState[1];
|
|
98
|
+
var setActionWidth = function(fn) {
|
|
99
|
+
var res = fn();
|
|
100
|
+
if (res.left !== undefined) {
|
|
101
|
+
updateState(_object_spread_props(_object_spread({}, actionWidth.current), {
|
|
102
|
+
left: res.left
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
if (res.right !== undefined) {
|
|
106
|
+
updateState(_object_spread_props(_object_spread({}, actionWidth.current), {
|
|
107
|
+
right: res.right
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
var wrapperStyle = useMemo(function() {
|
|
112
|
+
return {
|
|
113
|
+
transform: "translate(".concat(state.offset, "px, 0)"),
|
|
114
|
+
transitionDuration: state.dragging ? '0.01s' : '.6s'
|
|
177
115
|
};
|
|
178
|
-
}
|
|
116
|
+
}, [
|
|
117
|
+
state.offset,
|
|
118
|
+
state.dragging
|
|
119
|
+
]);
|
|
120
|
+
var onTouchStart = function(event) {
|
|
121
|
+
return _async_to_generator(function() {
|
|
122
|
+
var _props_onTouchStart;
|
|
123
|
+
return _ts_generator(this, function(_state) {
|
|
124
|
+
if (!props.disabled) {
|
|
125
|
+
;
|
|
126
|
+
getWidth();
|
|
127
|
+
startOffset.current = state.offset;
|
|
128
|
+
touch.start(event);
|
|
129
|
+
(_props_onTouchStart = props.onTouchStart) === null || _props_onTouchStart === void 0 ? void 0 : _props_onTouchStart.call(props, event);
|
|
130
|
+
}
|
|
131
|
+
return [
|
|
132
|
+
2
|
|
133
|
+
];
|
|
134
|
+
});
|
|
135
|
+
})();
|
|
136
|
+
};
|
|
179
137
|
var onTouchMove = function(event) {
|
|
180
138
|
var _props_onTouchMove;
|
|
181
|
-
if (props.disabled)
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
139
|
+
if (props.disabled) return;
|
|
184
140
|
touch.move(event);
|
|
185
141
|
(_props_onTouchMove = props.onTouchMove) === null || _props_onTouchMove === void 0 ? void 0 : _props_onTouchMove.call(props, event);
|
|
186
142
|
if (touch.isHorizontal()) {
|
|
187
143
|
lockClick.current = true;
|
|
188
|
-
var newState = _object_spread_props(_object_spread({}, state), {
|
|
189
|
-
dragging: true
|
|
190
|
-
});
|
|
191
144
|
var isEdge = !opened || touch.deltaX.current * startOffset.current < 0;
|
|
192
145
|
if (isEdge) {
|
|
193
146
|
preventDefault(event, true);
|
|
194
147
|
}
|
|
195
|
-
|
|
196
|
-
setState(
|
|
148
|
+
var offset = rangeCalculation(touch.deltaX.current + startOffset.current, -actionWidth.current.right || 0, actionWidth.current.left || 0);
|
|
149
|
+
setState(function(prevState) {
|
|
150
|
+
return _object_spread_props(_object_spread({}, prevState), {
|
|
151
|
+
dragging: true,
|
|
152
|
+
offset: Number(offset) || 0
|
|
153
|
+
});
|
|
154
|
+
});
|
|
197
155
|
}
|
|
198
156
|
};
|
|
199
157
|
var onTouchEnd = function(event) {
|
|
200
158
|
if (state.dragging) {
|
|
201
159
|
var _props_onTouchEnd;
|
|
202
|
-
setState(function(
|
|
203
|
-
return _object_spread_props(_object_spread({},
|
|
160
|
+
setState(function(prevState) {
|
|
161
|
+
return _object_spread_props(_object_spread({}, prevState), {
|
|
204
162
|
dragging: false
|
|
205
163
|
});
|
|
206
164
|
});
|
|
@@ -231,13 +189,13 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
|
|
|
231
189
|
name: name,
|
|
232
190
|
position: side
|
|
233
191
|
});
|
|
234
|
-
setState(function(
|
|
235
|
-
return _object_spread_props(_object_spread({},
|
|
192
|
+
setState(function(prevState) {
|
|
193
|
+
return _object_spread_props(_object_spread({}, prevState), {
|
|
236
194
|
offset: Number(offset) || 0
|
|
237
195
|
});
|
|
238
196
|
});
|
|
239
197
|
};
|
|
240
|
-
var close = function(position) {
|
|
198
|
+
var close = useCallback(function(position) {
|
|
241
199
|
if (opened.current) {
|
|
242
200
|
var _props_onClose;
|
|
243
201
|
opened.current = false;
|
|
@@ -246,12 +204,14 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
|
|
|
246
204
|
position: position || 'left'
|
|
247
205
|
});
|
|
248
206
|
}
|
|
249
|
-
setState(function(
|
|
250
|
-
return _object_spread_props(_object_spread({},
|
|
207
|
+
setState(function(prevState) {
|
|
208
|
+
return _object_spread_props(_object_spread({}, prevState), {
|
|
251
209
|
offset: 0
|
|
252
210
|
});
|
|
253
211
|
});
|
|
254
|
-
}
|
|
212
|
+
}, [
|
|
213
|
+
props
|
|
214
|
+
]);
|
|
255
215
|
var rangeCalculation = function(num, min, max) {
|
|
256
216
|
return Math.min(Math.max(Number(num), Number(min)), Number(max));
|
|
257
217
|
};
|
|
@@ -288,7 +248,7 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
|
|
|
288
248
|
};
|
|
289
249
|
});
|
|
290
250
|
useEffect(function() {
|
|
291
|
-
|
|
251
|
+
// 并没有生效
|
|
292
252
|
var handler = function(event) {
|
|
293
253
|
var targets = [
|
|
294
254
|
root
|
|
@@ -305,7 +265,9 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
|
|
|
305
265
|
return function() {
|
|
306
266
|
document.removeEventListener('touchstart', handler);
|
|
307
267
|
};
|
|
308
|
-
}, [
|
|
268
|
+
}, [
|
|
269
|
+
close
|
|
270
|
+
]);
|
|
309
271
|
return /*#__PURE__*/ React.createElement(View, {
|
|
310
272
|
ref: root,
|
|
311
273
|
className: classNames(classPrefix, className),
|
|
@@ -63,8 +63,8 @@ export var Switch = function(props) {
|
|
|
63
63
|
(_obj = {}, _define_property(_obj, "".concat(classPrefix, "-close"), !value), _define_property(_obj, "".concat(classPrefix, "-disabled"), disabled), _define_property(_obj, "".concat(classPrefix, "-disabled-close"), disabled && !value), _obj)
|
|
64
64
|
]);
|
|
65
65
|
};
|
|
66
|
-
var onClick =
|
|
67
|
-
|
|
66
|
+
var onClick = function() {
|
|
67
|
+
return _async_to_generator(function() {
|
|
68
68
|
var e;
|
|
69
69
|
return _ts_generator(this, function(_state) {
|
|
70
70
|
switch(_state.label){
|
|
@@ -109,11 +109,8 @@ export var Switch = function(props) {
|
|
|
109
109
|
];
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
return _ref.apply(this, arguments);
|
|
115
|
-
};
|
|
116
|
-
}();
|
|
112
|
+
})();
|
|
113
|
+
};
|
|
117
114
|
var _obj, _obj1;
|
|
118
115
|
return /*#__PURE__*/ React.createElement(View, _object_spread({
|
|
119
116
|
className: classes(),
|
|
@@ -51,6 +51,7 @@ export var Tabs = function(props) {
|
|
|
51
51
|
onChange: onChange
|
|
52
52
|
}), 2), value = _usePropsValue[0], setValue = _usePropsValue[1];
|
|
53
53
|
var titleItemsRef = useRef([]);
|
|
54
|
+
var tabsRef = useRef(null);
|
|
54
55
|
var getTitles = function() {
|
|
55
56
|
var titles = [];
|
|
56
57
|
React.Children.forEach(children, function(child, idx) {
|
|
@@ -90,7 +91,8 @@ export var Tabs = function(props) {
|
|
|
90
91
|
var classesTitle = classNames("".concat(classPrefix, "-titles"), (_obj = {}, _define_property(_obj, "".concat(classPrefix, "-titles-").concat(activeType), activeType), _define_property(_obj, "".concat(classPrefix, "-titles-").concat(align), align), _obj));
|
|
91
92
|
var getRect = function(selector) {
|
|
92
93
|
return new Promise(function(resolve) {
|
|
93
|
-
|
|
94
|
+
var _tabsRef_current;
|
|
95
|
+
createSelectorQuery().in(((_tabsRef_current = tabsRef.current) === null || _tabsRef_current === void 0 ? void 0 : _tabsRef_current._scope) || tabsRef.current).select(selector).boundingClientRect().exec(function() {
|
|
94
96
|
var rect = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
95
97
|
resolve(rect[0]);
|
|
96
98
|
});
|
|
@@ -98,7 +100,8 @@ export var Tabs = function(props) {
|
|
|
98
100
|
};
|
|
99
101
|
var getAllRect = function(selector) {
|
|
100
102
|
return new Promise(function(resolve) {
|
|
101
|
-
|
|
103
|
+
var _tabsRef_current;
|
|
104
|
+
createSelectorQuery().in(((_tabsRef_current = tabsRef.current) === null || _tabsRef_current === void 0 ? void 0 : _tabsRef_current._scope) || tabsRef.current).selectAll(selector).boundingClientRect().exec(function() {
|
|
102
105
|
var rect = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
103
106
|
resolve(rect[0]);
|
|
104
107
|
});
|
|
@@ -178,9 +181,11 @@ export var Tabs = function(props) {
|
|
|
178
181
|
setValue(item.value);
|
|
179
182
|
}
|
|
180
183
|
};
|
|
181
|
-
return /*#__PURE__*/ React.createElement(View, _object_spread({
|
|
184
|
+
return /*#__PURE__*/ React.createElement(View, _object_spread_props(_object_spread({
|
|
182
185
|
className: classes
|
|
183
|
-
}, rest),
|
|
186
|
+
}, rest), {
|
|
187
|
+
ref: tabsRef
|
|
188
|
+
}), /*#__PURE__*/ React.createElement(ScrollView, {
|
|
184
189
|
enableFlex: true,
|
|
185
190
|
scrollX: direction === 'horizontal',
|
|
186
191
|
scrollY: direction === 'vertical',
|
|
@@ -212,7 +217,9 @@ export var Tabs = function(props) {
|
|
|
212
217
|
background: activeColor
|
|
213
218
|
}
|
|
214
219
|
}), activeType === 'smile' && /*#__PURE__*/ React.createElement(View, {
|
|
215
|
-
className: "".concat(classPrefix, "-titles-item-smile")
|
|
220
|
+
className: "".concat(classPrefix, "-titles-item-smile"),
|
|
221
|
+
// @ts-ignore
|
|
222
|
+
ariaHidden: true
|
|
216
223
|
}, /*#__PURE__*/ React.createElement(JoySmile, {
|
|
217
224
|
color: activeColor
|
|
218
225
|
})), /*#__PURE__*/ React.createElement(View, {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
background: var(--nutui-tag-background-color, var(--nutui-color-title, #1a1a1a));
|
|
31
31
|
}
|
|
32
32
|
.nut-tag-primary {
|
|
33
|
-
background:
|
|
33
|
+
background: #fa2c19;
|
|
34
34
|
}
|
|
35
35
|
.nut-tag-info {
|
|
36
36
|
background: var(--nutui-tag-info-background-color, var(--nutui-color-info, #0073ff));
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
background: var(--nutui-tag-background-color, var(--nutui-color-title, #1a1a1a));
|
|
31
31
|
}
|
|
32
32
|
.nut-tag-primary {
|
|
33
|
-
background:
|
|
33
|
+
background: #fa2c19;
|
|
34
34
|
}
|
|
35
35
|
.nut-tag-info {
|
|
36
36
|
background: var(--nutui-tag-info-background-color, var(--nutui-color-info, #0073ff));
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
background: var(--nutui-tag-background-color, var(--nutui-color-title));
|
|
31
31
|
}
|
|
32
32
|
.nut-tag-primary {
|
|
33
|
-
background:
|
|
33
|
+
background: #fa2c19;
|
|
34
34
|
}
|
|
35
35
|
.nut-tag-info {
|
|
36
36
|
background: var(--nutui-tag-info-background-color, var(--nutui-color-info));
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
background: var(--nutui-tag-background-color, var(--nutui-color-title));
|
|
31
31
|
}
|
|
32
32
|
.nut-tag-primary {
|
|
33
|
-
background:
|
|
33
|
+
background: #fa2c19;
|
|
34
34
|
}
|
|
35
35
|
.nut-tag-info {
|
|
36
36
|
background: var(--nutui-tag-info-background-color, var(--nutui-color-info));
|