@nutui/nutui-react-taro 3.0.20 → 3.0.22-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 +38 -68
- package/dist/cjs/hooks/use-props-value.js +1 -1
- package/dist/cjs/hooks/use-touch.js +4 -4
- 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/cascaderRender.js +1 -1
- package/dist/cjs/packages/address/existRender.js +1 -1
- package/dist/cjs/packages/address/style/style.harmony.css +38 -17
- package/dist/cjs/packages/animatingnumbers/countup.js +3 -1
- package/dist/cjs/packages/audio/audio.js +1 -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 +3 -7
- package/dist/cjs/packages/badge/badge.js +16 -3
- package/dist/cjs/packages/barrage/barrage.js +2 -1
- 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/calendarcard/calendarcard.js +30 -8
- package/dist/cjs/packages/calendarcard/icon.js +12 -23
- 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/card/card.js +1 -1
- package/dist/cjs/packages/card/style/style.harmony.css +1 -1
- package/dist/cjs/packages/cascader/style/style.harmony.css +38 -17
- package/dist/cjs/packages/cascader/utils.js +4 -4
- package/dist/cjs/packages/cellgroup/cellgroup.js +1 -1
- package/dist/cjs/packages/checkboxgroup/checkboxgroup.js +3 -3
- package/dist/cjs/packages/circleprogress/circleprogress.js +1 -1
- package/dist/cjs/packages/collapseitem/collapseitem.js +1 -1
- package/dist/cjs/packages/configprovider/types.d.ts +1 -1
- package/dist/cjs/packages/countdown/countdown.js +1 -1
- package/dist/cjs/packages/datepicker/datepicker.js +1 -1
- package/dist/cjs/packages/datepicker/style/style.harmony.css +39 -18
- package/dist/cjs/packages/dialog/dialog.js +20 -14
- 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 +3 -3
- package/dist/cjs/packages/elevator/elevator.js +1 -1
- package/dist/cjs/packages/ellipsis/ellipsis.js +1 -1
- 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/form.js +1 -1
- package/dist/cjs/packages/form/style/style.harmony.css +0 -5
- 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/grid/grid.js +1 -1
- package/dist/cjs/packages/griditem/griditem.js +1 -1
- package/dist/cjs/packages/image/image.js +12 -4
- package/dist/cjs/packages/imagepreview/imagepreview.js +3 -2
- package/dist/cjs/packages/imagepreview/style/style.harmony.css +38 -17
- package/dist/cjs/packages/indicator/indicator.js +1 -1
- package/dist/cjs/packages/infiniteloading/infiniteloading.js +3 -3
- package/dist/cjs/packages/input/input.js +11 -4
- package/dist/cjs/packages/inputnumber/inputnumber.js +2 -2
- package/dist/cjs/packages/loading/loading.js +1 -1
- package/dist/cjs/packages/lottie/lottiemp.js +10 -18
- package/dist/cjs/packages/menu/menu.js +1 -1
- 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 +18 -14
- package/dist/cjs/packages/nutui.react.d.ts +4 -1
- package/dist/cjs/packages/nutui.react.js +19 -14
- 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 +4 -4
- package/dist/cjs/packages/pagination/pagination.js +1 -1
- package/dist/cjs/packages/picker/picker.js +1 -1
- 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 +1 -1
- package/dist/cjs/packages/popover/popover.js +2 -2
- package/dist/cjs/packages/popover/style/style.harmony.css +38 -17
- package/dist/cjs/packages/popup/popup.js +188 -103
- 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 +7 -12
- 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/radio.js +1 -1
- package/dist/cjs/packages/radiogroup/radiogroup.js +3 -3
- package/dist/cjs/packages/range/range.js +35 -10
- 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 +1 -1
- package/dist/cjs/packages/shortpassword/style/style.harmony.css +38 -17
- package/dist/cjs/packages/sidebar/sidebar.js +1 -1
- package/dist/cjs/packages/signature/signature.js +2 -2
- package/dist/cjs/packages/skeleton/skeleton.js +1 -1
- 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 +3 -3
- package/dist/cjs/packages/swipe/swipe.js +84 -115
- package/dist/cjs/packages/swiper/swiper.js +1 -1
- package/dist/cjs/packages/switch/switch.js +1 -1
- package/dist/cjs/packages/tabbaritem/tabbaritem.js +1 -1
- 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/table/table.js +1 -1
- package/dist/cjs/packages/tabs/tabs.js +13 -6
- 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/textarea/textarea.js +1 -1
- package/dist/cjs/packages/timeselect/style/style.harmony.css +38 -17
- package/dist/cjs/packages/timeselect/timeselect.js +1 -1
- 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 +3 -3
- package/dist/cjs/packages/tour/style/style.harmony.css +38 -17
- package/dist/cjs/packages/trendarrow/trendarrow.js +1 -1
- package/dist/cjs/packages/uploader/uploader.js +1 -1
- package/dist/cjs/packages/video/video.js +2 -2
- package/dist/cjs/packages/virtuallist/utils.js +1 -1
- package/dist/cjs/packages/virtuallist/virtuallist.js +1 -1
- package/dist/cjs/types/index.d.ts +3 -0
- package/dist/cjs/types/index.js +3 -0
- 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/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.js → ConfigurableCSSTransition.js} +13 -53
- package/dist/cjs/utils/taro/get-rect.js +4 -2
- package/dist/cjs/utils/taro/get-system-info.d.ts +0 -5
- package/dist/cjs/utils/taro/get-system-info.js +2 -7
- package/dist/es/hooks/taro/use-custom-event.js +4 -3
- package/dist/es/hooks/taro/use-lock-scoll.js +1 -1
- package/dist/es/hooks/use-click-away.js +2 -2
- package/dist/es/hooks/use-lock-scroll.js +3 -3
- package/dist/es/hooks/use-pagination.js +1 -1
- package/dist/es/hooks/use-ref-state.js +3 -3
- package/dist/es/hooks/use-touch.js +13 -13
- package/dist/es/hooks/use-watch.js +1 -1
- package/dist/es/locales/base.d.ts +9 -0
- package/dist/es/locales/en-US.js +24 -5
- package/dist/es/locales/id-ID.js +24 -5
- package/dist/es/locales/ja-JP.js +22 -5
- package/dist/es/locales/tr-TR.js +24 -5
- package/dist/es/locales/zh-CN.js +22 -5
- package/dist/es/locales/zh-TW.js +22 -5
- package/dist/es/locales/zh-UG.js +24 -5
- package/dist/es/packages/actionsheet/actionsheet.js +8 -8
- 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/address.js +10 -10
- package/dist/es/packages/address/cascaderRender.js +4 -4
- package/dist/es/packages/address/elevatorRender.js +17 -17
- package/dist/es/packages/address/existRender.js +5 -5
- package/dist/es/packages/address/style/style.harmony.css +38 -17
- package/dist/es/packages/address/utils.js +5 -5
- package/dist/es/packages/animate/animate.js +3 -3
- package/dist/es/packages/animatingnumbers/countup.js +4 -2
- package/dist/es/packages/audio/audio.js +16 -16
- package/dist/es/packages/audio/style/style.harmony.css +0 -3
- package/dist/es/packages/avatar/avatar.js +35 -9
- package/dist/es/packages/avatarcropper/avatarcropper.js +29 -33
- package/dist/es/packages/avatargroup/avatargroup.js +1 -1
- package/dist/es/packages/backtop/backtop.js +3 -3
- package/dist/es/packages/badge/badge.js +18 -5
- package/dist/es/packages/barrage/barrage.js +10 -9
- package/dist/es/packages/button/button.d.ts +2 -24
- package/dist/es/packages/button/button.js +12 -14
- 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/calendar.js +12 -12
- 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/calendar/utils.js +7 -7
- package/dist/es/packages/calendarcard/calendarcard.js +53 -31
- package/dist/es/packages/calendarcard/icon.js +18 -29
- 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/calendarcard/utils.js +5 -5
- package/dist/es/packages/calendaritem/calendaritem.js +32 -32
- package/dist/es/packages/card/card.js +2 -2
- package/dist/es/packages/card/style/style.harmony.css +1 -1
- package/dist/es/packages/cascader/cascader.js +15 -15
- package/dist/es/packages/cascader/style/style.harmony.css +38 -17
- package/dist/es/packages/cascader/utils.js +6 -6
- package/dist/es/packages/cell/cell.js +4 -4
- package/dist/es/packages/cellgroup/cellgroup.js +2 -2
- package/dist/es/packages/checkbox/checkbox.js +10 -10
- package/dist/es/packages/checkboxgroup/checkboxgroup.js +7 -7
- package/dist/es/packages/circleprogress/circleprogress.js +7 -7
- package/dist/es/packages/col/col.js +2 -2
- package/dist/es/packages/collapse/collapse.js +3 -3
- package/dist/es/packages/collapse/context.js +2 -2
- package/dist/es/packages/collapseitem/collapseitem.js +5 -5
- package/dist/es/packages/configprovider/configprovider.js +5 -5
- package/dist/es/packages/configprovider/types.d.ts +1 -1
- package/dist/es/packages/countdown/countdown.js +15 -15
- package/dist/es/packages/datepicker/datepicker.js +12 -12
- package/dist/es/packages/datepicker/style/style.harmony.css +39 -18
- package/dist/es/packages/datepicker/utils.js +7 -7
- package/dist/es/packages/datepickerview/datepickerview.js +5 -5
- package/dist/es/packages/dialog/content.js +6 -6
- package/dist/es/packages/dialog/dialog.js +53 -45
- 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 +4 -4
- package/dist/es/packages/drag/drag.js +5 -5
- package/dist/es/packages/elevator/elevator.js +17 -17
- package/dist/es/packages/ellipsis/ellipsis.js +14 -14
- package/dist/es/packages/empty/empty.d.ts +4 -4
- package/dist/es/packages/empty/empty.js +1 -1
- package/dist/es/packages/empty/style/style.harmony.css +0 -3
- package/dist/es/packages/fixednav/fixednav.js +7 -7
- package/dist/es/packages/form/form.js +7 -7
- package/dist/es/packages/form/style/style.harmony.css +0 -5
- package/dist/es/packages/form/useform.js +4 -4
- package/dist/es/packages/formitem/formitem.js +1 -1
- 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/grid/context.js +1 -1
- package/dist/es/packages/grid/grid.js +4 -4
- package/dist/es/packages/griditem/griditem.js +6 -6
- package/dist/es/packages/hoverbutton/hoverbutton.js +1 -1
- package/dist/es/packages/hoverbuttonitem/hoverbuttonitem.js +6 -6
- package/dist/es/packages/hoverbuttonitem/utils.js +1 -1
- package/dist/es/packages/image/image.js +18 -10
- package/dist/es/packages/imagepreview/imagepreview.js +16 -15
- package/dist/es/packages/imagepreview/style/style.harmony.css +38 -17
- package/dist/es/packages/indicator/indicator.js +5 -5
- package/dist/es/packages/infiniteloading/infiniteloading.js +14 -14
- package/dist/es/packages/input/input.js +23 -16
- package/dist/es/packages/inputnumber/inputnumber.js +13 -13
- package/dist/es/packages/layout/layout.js +1 -1
- package/dist/es/packages/loading/loading.js +3 -3
- package/dist/es/packages/lottie/index.js +1 -1
- package/dist/es/packages/lottie/lottiemp.js +12 -20
- package/dist/es/packages/menu/menu.js +13 -13
- package/dist/es/packages/menuitem/menuitem.js +12 -12
- package/dist/es/packages/navbar/navbar.js +7 -7
- package/dist/es/packages/noticebar/noticebar.js +22 -22
- package/dist/es/packages/notify/notify.js +8 -8
- package/dist/es/packages/numberkeyboard/numberkeyboard.js +12 -12
- 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 +10 -10
- package/dist/es/packages/pagination/pagination.js +8 -8
- package/dist/es/packages/picker/picker.js +15 -15
- 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 +12 -12
- package/dist/es/packages/pickerview/pickerview.js +3 -3
- package/dist/es/packages/pickerview/utils.js +6 -6
- package/dist/es/packages/popover/popover.js +16 -16
- package/dist/es/packages/popover/style/style.harmony.css +38 -17
- package/dist/es/packages/popup/popup.js +200 -115
- 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 +60 -21
- package/dist/es/packages/progress/progress.js +17 -22
- package/dist/es/packages/pulltorefresh/pulltorefresh.js +8 -8
- 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/radio.js +11 -11
- package/dist/es/packages/radiogroup/radiogroup.js +6 -6
- package/dist/es/packages/range/range.js +44 -19
- package/dist/es/packages/rate/rate.js +16 -19
- package/dist/es/packages/resultpage/resultpage.js +3 -2
- package/dist/es/packages/resultpage/style/style.harmony.css +0 -3
- package/dist/es/packages/row/row.js +4 -4
- package/dist/es/packages/safearea/safearea.js +4 -13
- 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 +27 -13
- package/dist/es/packages/segmented/segmented.js +4 -4
- package/dist/es/packages/shortpassword/shortpassword.js +7 -7
- package/dist/es/packages/shortpassword/style/style.harmony.css +38 -17
- package/dist/es/packages/sidebar/sidebar.js +11 -11
- package/dist/es/packages/sidebar/utils.js +1 -1
- package/dist/es/packages/sidebaritem/sidebaritem.js +1 -1
- package/dist/es/packages/signature/signature.js +15 -15
- package/dist/es/packages/skeleton/skeleton.js +4 -4
- package/dist/es/packages/space/space.js +1 -1
- package/dist/es/packages/step/step.js +4 -9
- 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/steps.js +1 -1
- 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 +5 -5
- package/dist/es/packages/swipe/swipe.js +98 -129
- package/dist/es/packages/swiper/swiper.js +7 -7
- package/dist/es/packages/swiperitem/swiperitem.js +1 -1
- package/dist/es/packages/switch/switch.js +6 -6
- package/dist/es/packages/tabbar/tabbar.js +2 -2
- package/dist/es/packages/tabbaritem/tabbaritem.js +10 -10
- 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/table/table.js +10 -10
- package/dist/es/packages/tabpane/tabpane.js +1 -1
- package/dist/es/packages/tabs/tabs.js +23 -16
- 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/tag/tag.js +10 -10
- package/dist/es/packages/textarea/textarea.js +11 -11
- package/dist/es/packages/timedetail/timedetail.js +3 -3
- package/dist/es/packages/timeselect/style/style.harmony.css +38 -17
- package/dist/es/packages/timeselect/timeselect.js +6 -6
- 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 +11 -11
- package/dist/es/packages/tour/style/style.harmony.css +38 -17
- package/dist/es/packages/tour/tour.js +10 -10
- package/dist/es/packages/trendarrow/trendarrow.js +4 -4
- package/dist/es/packages/uploader/preview.js +8 -8
- package/dist/es/packages/uploader/uploader.js +19 -19
- package/dist/es/packages/video/video.js +3 -3
- package/dist/es/packages/virtuallist/utils.js +5 -5
- package/dist/es/packages/virtuallist/virtuallist.js +8 -8
- package/dist/es/packages/watermark/watermark.js +2 -2
- package/dist/es/types/index.d.ts +3 -0
- package/dist/es/types/index.js +3 -0
- 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/clamp.js +1 -1
- package/dist/es/utils/date.js +3 -3
- package/dist/es/utils/get-rect.js +1 -1
- package/dist/es/utils/interceptor.js +1 -1
- package/dist/es/utils/is-date.js +1 -1
- package/dist/es/utils/is-empty.js +1 -1
- package/dist/es/utils/is-function.js +1 -1
- package/dist/es/utils/is-object.js +1 -1
- package/dist/es/utils/is-promise.js +1 -1
- package/dist/es/utils/pad-zero.js +1 -1
- package/dist/es/utils/px-check.js +1 -1
- 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/sleep.js +1 -1
- package/dist/es/utils/taro/{ConfigurableCSSTransition copy.js → ConfigurableCSSTransition.js} +14 -54
- package/dist/es/utils/taro/get-rect-by-id.js +1 -1
- package/dist/es/utils/taro/get-rect.js +6 -4
- package/dist/es/utils/taro/get-system-info.d.ts +0 -5
- package/dist/es/utils/taro/get-system-info.js +10 -9
- package/dist/es/utils/taro/platform.js +4 -4
- package/dist/es/utils/upper-case-first.js +1 -1
- package/dist/nutui.react.umd.js +11331 -10903
- package/dist/style-jmapp.css +1 -1
- package/dist/style-jmapp.scss +36 -35
- package/dist/style-jrkf.css +1 -1
- package/dist/style-jrkf.scss +32 -31
- package/dist/style.css +1 -1
- package/dist/style.scss +33 -32
- 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/dist/cjs/utils/taro/{ConfigurableCSSTransition copy.d.ts → ConfigurableCSSTransition.d.ts} +0 -0
- /package/dist/es/utils/taro/{ConfigurableCSSTransition copy.d.ts → ConfigurableCSSTransition.d.ts} +0 -0
|
@@ -23,10 +23,12 @@ export interface BaseCalendarCard extends BaseProps {
|
|
|
23
23
|
firstDayOfWeek: number;
|
|
24
24
|
startDate: Date;
|
|
25
25
|
endDate: Date;
|
|
26
|
+
weekdays?: string[];
|
|
26
27
|
disableDay: (day: CalendarCardDay) => boolean;
|
|
27
28
|
renderDay: (day: CalendarCardDay) => ReactNode;
|
|
28
29
|
renderDayTop: (day: CalendarCardDay) => ReactNode;
|
|
29
30
|
renderDayBottom: (day: CalendarCardDay) => ReactNode;
|
|
31
|
+
renderDayAriaLabel?: (day: CalendarCardDay) => string;
|
|
30
32
|
onDayClick: (day: CalendarCardDay) => void;
|
|
31
33
|
onPageChange: (data: CalendarCardMonth) => void;
|
|
32
34
|
onChange: (value: CalendarCardValue) => void;
|
|
@@ -39,6 +39,7 @@ export interface BaseDialog extends DialogWrapProps {
|
|
|
39
39
|
beforeClose: () => boolean;
|
|
40
40
|
beforeCancel: () => boolean;
|
|
41
41
|
onConfirm: (e?: MouseEvent<HTMLButtonElement>) => PromiseLike<any> | void;
|
|
42
|
+
ariaLabel?: string;
|
|
42
43
|
}
|
|
43
44
|
export type DialogReturnProps = {
|
|
44
45
|
update: (newConfig: Partial<BaseDialog>) => void;
|
|
@@ -2,6 +2,8 @@ import { ITouchEvent } from '@tarojs/components';
|
|
|
2
2
|
import { BaseDialog, BaseContentProps } from './base';
|
|
3
3
|
export interface TaroContentProps extends BaseContentProps {
|
|
4
4
|
onClick: (event: ITouchEvent) => void;
|
|
5
|
+
ariaRole?: string;
|
|
6
|
+
ariaLabel?: string;
|
|
5
7
|
}
|
|
6
8
|
export interface TaroDialogProps extends Omit<BaseDialog, 'onOverlayClick' | 'onClick'> {
|
|
7
9
|
onClick: (event: ITouchEvent) => void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BaseProps } from '../../base/props';
|
|
3
|
+
export type QuickEnterRef = QuickEnterActions;
|
|
4
|
+
export type QuickEnterActions = {
|
|
5
|
+
open: () => void;
|
|
6
|
+
close: () => void;
|
|
7
|
+
};
|
|
8
|
+
export interface QuickEnterOption extends Record<string, any> {
|
|
9
|
+
title?: string;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
type?: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
badge?: boolean | ReactNode;
|
|
14
|
+
badgeProps?: any;
|
|
15
|
+
}
|
|
16
|
+
export interface BaseQuickEnter<POPUP_PROPS = any> extends BaseProps {
|
|
17
|
+
visible?: boolean;
|
|
18
|
+
title?: ReactNode;
|
|
19
|
+
options?: QuickEnterOption[];
|
|
20
|
+
popupProps?: POPUP_PROPS;
|
|
21
|
+
closeOnOverlayClick?: boolean;
|
|
22
|
+
closeIcon?: ReactNode;
|
|
23
|
+
safeAreaInsetTop?: boolean;
|
|
24
|
+
onClose?: () => void;
|
|
25
|
+
onChange?: (item: QuickEnterOption, index: number) => void;
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get hasNonPriceChars () {
|
|
13
|
+
return hasNonPriceChars;
|
|
14
|
+
},
|
|
15
|
+
get shouldRenderPriceAsRaw () {
|
|
16
|
+
return shouldRenderPriceAsRaw;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
var RE_NUM = /\d+(?:\.\d+)?/g;
|
|
20
|
+
// 价格合法字符:数字、小数点、负号、大写货币代码(HK USD EUR 等)、常见货币符号 Unicode 区块(含全角 ¥)
|
|
21
|
+
var PRICE_CHARS = /^[\d.\-A-Z¥¥$€£₩₹₽₺₴₪฿\u20A0-\u20CF\uFE69\uFF04\uFFE5]*$/;
|
|
22
|
+
// 无法提取出有效价格时直接按原文展示,避免把纯文案误格式化成 0 或空串
|
|
23
|
+
function hasNoExtractablePrice(s) {
|
|
24
|
+
var t = s.trim();
|
|
25
|
+
if (!t) return true;
|
|
26
|
+
if (!/\d/.test(t)) return true;
|
|
27
|
+
if (t.replace(/[^\d.]/g, '') === '') return true;
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
function shouldRenderPriceAsRaw(s) {
|
|
31
|
+
if (hasNoExtractablePrice(s)) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
var t = s.trim();
|
|
35
|
+
var matches = Array.from(t.matchAll(RE_NUM));
|
|
36
|
+
if (matches.length < 2) return false;
|
|
37
|
+
var a = matches[0];
|
|
38
|
+
var b = matches[1];
|
|
39
|
+
var i0 = a.index;
|
|
40
|
+
var i1 = b.index;
|
|
41
|
+
var between = t.slice(i0 + a[0].length, i1);
|
|
42
|
+
return !PRICE_CHARS.test(between);
|
|
43
|
+
}
|
|
44
|
+
function hasNonPriceChars(s) {
|
|
45
|
+
return !PRICE_CHARS.test(s);
|
|
46
|
+
}
|
package/dist/cjs/utils/taro/{ConfigurableCSSTransition copy.js → ConfigurableCSSTransition.js}
RENAMED
|
@@ -21,84 +21,45 @@ var ConfigurableCSSTransition = function ConfigurableCSSTransition(props) {
|
|
|
21
21
|
if (inPhase) return "".concat(baseClassName, "-enter-done");
|
|
22
22
|
return "".concat(baseClassName, "-exit-done");
|
|
23
23
|
}), 2), classes = _useState1[0], setClasses = _useState1[1];
|
|
24
|
-
var
|
|
24
|
+
var timerRef = (0, _react.useRef)(null);
|
|
25
25
|
var statusRef = (0, _react.useRef)(status);
|
|
26
26
|
var prevInPhase = (0, _react.useRef)(inPhase);
|
|
27
|
-
var latestOnAnimationEnd = (0, _react.useRef)(children.props.onAnimationEnd);
|
|
28
|
-
(0, _react.useEffect)(function() {
|
|
29
|
-
latestOnAnimationEnd.current = children.props.onAnimationEnd;
|
|
30
|
-
});
|
|
31
27
|
var updateStatus = (0, _react.useCallback)(function(nextStatus) {
|
|
32
28
|
statusRef.current = nextStatus;
|
|
33
29
|
setStatus(nextStatus);
|
|
34
30
|
}, []);
|
|
35
|
-
var handleAnimationEnd = (0, _react.useCallback)(function(e) {
|
|
36
|
-
var _latestOnAnimationEnd_current;
|
|
37
|
-
(_latestOnAnimationEnd_current = latestOnAnimationEnd.current) === null || _latestOnAnimationEnd_current === void 0 ? void 0 : _latestOnAnimationEnd_current.call(latestOnAnimationEnd, e);
|
|
38
|
-
if (e && e.target !== e.currentTarget) return;
|
|
39
|
-
if (fallbackTimerRef.current) clearTimeout(fallbackTimerRef.current);
|
|
40
|
-
if (statusRef.current === 'entering') {
|
|
41
|
-
updateStatus('entered');
|
|
42
|
-
setClasses("".concat(baseClassName, "-enter-done"));
|
|
43
|
-
onEntered === null || onEntered === void 0 ? void 0 : onEntered();
|
|
44
|
-
} else if (statusRef.current === 'exiting') {
|
|
45
|
-
updateStatus('exited');
|
|
46
|
-
setClasses("".concat(baseClassName, "-exit-done"));
|
|
47
|
-
if (unmountOnExit) {
|
|
48
|
-
updateStatus('unmounted');
|
|
49
|
-
}
|
|
50
|
-
onExited === null || onExited === void 0 ? void 0 : onExited();
|
|
51
|
-
}
|
|
52
|
-
}, [
|
|
53
|
-
baseClassName,
|
|
54
|
-
onEntered,
|
|
55
|
-
onExited,
|
|
56
|
-
unmountOnExit,
|
|
57
|
-
updateStatus
|
|
58
|
-
]);
|
|
59
31
|
var enter = (0, _react.useCallback)(function() {
|
|
60
|
-
if (
|
|
32
|
+
if (timerRef.current) clearTimeout(timerRef.current);
|
|
61
33
|
if (statusRef.current === 'unmounted') {
|
|
62
34
|
updateStatus('exited');
|
|
63
35
|
}
|
|
64
|
-
|
|
36
|
+
updateStatus('entering');
|
|
37
|
+
setClasses("".concat(baseClassName, "-enter ").concat(baseClassName, "-enter-active"));
|
|
38
|
+
timerRef.current = setTimeout(function() {
|
|
65
39
|
updateStatus('entered');
|
|
66
40
|
setClasses("".concat(baseClassName, "-enter-done"));
|
|
67
41
|
onEntered === null || onEntered === void 0 ? void 0 : onEntered();
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
updateStatus('entering');
|
|
71
|
-
setClasses("".concat(baseClassName, "-enter ").concat(baseClassName, "-enter-active"));
|
|
72
|
-
// Safety fallback: Give it extra time over the expected timeout in case onAnimationEnd misses
|
|
73
|
-
fallbackTimerRef.current = setTimeout(function() {
|
|
74
|
-
handleAnimationEnd(null);
|
|
75
|
-
}, timeout + 200);
|
|
42
|
+
}, timeout);
|
|
76
43
|
}, [
|
|
77
44
|
baseClassName,
|
|
78
|
-
handleAnimationEnd,
|
|
79
45
|
onEntered,
|
|
80
46
|
timeout,
|
|
81
47
|
updateStatus
|
|
82
48
|
]);
|
|
83
49
|
var exit = (0, _react.useCallback)(function() {
|
|
84
|
-
if (
|
|
85
|
-
|
|
50
|
+
if (timerRef.current) clearTimeout(timerRef.current);
|
|
51
|
+
updateStatus('exiting');
|
|
52
|
+
setClasses("".concat(baseClassName, "-exit ").concat(baseClassName, "-exit-active"));
|
|
53
|
+
timerRef.current = setTimeout(function() {
|
|
86
54
|
updateStatus('exited');
|
|
87
55
|
setClasses("".concat(baseClassName, "-exit-done"));
|
|
88
56
|
if (unmountOnExit) {
|
|
89
57
|
updateStatus('unmounted');
|
|
90
58
|
}
|
|
91
59
|
onExited === null || onExited === void 0 ? void 0 : onExited();
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
updateStatus('exiting');
|
|
95
|
-
setClasses("".concat(baseClassName, "-exit ").concat(baseClassName, "-exit-active"));
|
|
96
|
-
fallbackTimerRef.current = setTimeout(function() {
|
|
97
|
-
handleAnimationEnd(null);
|
|
98
|
-
}, timeout + 200);
|
|
60
|
+
}, timeout);
|
|
99
61
|
}, [
|
|
100
62
|
baseClassName,
|
|
101
|
-
handleAnimationEnd,
|
|
102
63
|
onExited,
|
|
103
64
|
timeout,
|
|
104
65
|
unmountOnExit,
|
|
@@ -114,7 +75,7 @@ var ConfigurableCSSTransition = function ConfigurableCSSTransition(props) {
|
|
|
114
75
|
prevInPhase.current = inPhase;
|
|
115
76
|
}
|
|
116
77
|
return function() {
|
|
117
|
-
if (
|
|
78
|
+
if (timerRef.current) clearTimeout(timerRef.current);
|
|
118
79
|
};
|
|
119
80
|
}, [
|
|
120
81
|
inPhase,
|
|
@@ -123,8 +84,7 @@ var ConfigurableCSSTransition = function ConfigurableCSSTransition(props) {
|
|
|
123
84
|
]);
|
|
124
85
|
if (status === 'unmounted') return null;
|
|
125
86
|
return /*#__PURE__*/ (0, _react.cloneElement)(children, {
|
|
126
|
-
className: "".concat(children.props.className || '', " ").concat(classes)
|
|
127
|
-
onAnimationEnd: handleAnimationEnd
|
|
87
|
+
className: "".concat(children.props.className || '', " ").concat(classes)
|
|
128
88
|
});
|
|
129
89
|
};
|
|
130
90
|
var _default = ConfigurableCSSTransition;
|
|
@@ -55,7 +55,8 @@ var getRectInMultiPlatform = function getRectInMultiPlatform(element) {
|
|
|
55
55
|
resolve(lru.get(element));
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
(0, _taro.createSelectorQuery)()
|
|
58
|
+
(0, _taro.createSelectorQuery)() // https://taro.jd.com/docs/reference/config/page/
|
|
59
|
+
.in((element === null || element === void 0 ? void 0 : element._scope) || element).select("#".concat(harmonyId || element.uid)).boundingClientRect().exec(function(param) {
|
|
59
60
|
var _param = (0, _sliced_to_array._)(param, 1), rects = _param[0];
|
|
60
61
|
if (rects) {
|
|
61
62
|
lru.set(element, rects);
|
|
@@ -86,7 +87,8 @@ var getRectInMultiPlatformWithoutCache = function getRectInMultiPlatformWithoutC
|
|
|
86
87
|
return [
|
|
87
88
|
2,
|
|
88
89
|
new Promise(function(resolve, reject) {
|
|
89
|
-
(0, _taro.createSelectorQuery)()
|
|
90
|
+
(0, _taro.createSelectorQuery)() // https://taro.jd.com/docs/reference/config/page/
|
|
91
|
+
.in((element === null || element === void 0 ? void 0 : element._scope) || element).select("#".concat(harmonyId || element.uid)).boundingClientRect().exec(function(param) {
|
|
90
92
|
var _param = (0, _sliced_to_array._)(param, 1), rects = _param[0];
|
|
91
93
|
resolve(rects);
|
|
92
94
|
});
|
|
@@ -14,9 +14,4 @@ export declare const getDeviceInfo: () => IDeviceInfo;
|
|
|
14
14
|
* @returns {Taro.getWindowInfo.Result} 窗口信息
|
|
15
15
|
*/
|
|
16
16
|
export declare const getWindowInfo: () => Taro.getWindowInfo.Result;
|
|
17
|
-
/**
|
|
18
|
-
* 获取应用基础信息,兼容新旧 API
|
|
19
|
-
* @returns {Taro.getAppBaseInfo.Result} 应用基础信息
|
|
20
|
-
*/
|
|
21
|
-
export declare const getAppBaseInfo: () => Taro.getAppBaseInfo.Result;
|
|
22
17
|
export {};
|
|
@@ -9,9 +9,6 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
get getAppBaseInfo () {
|
|
13
|
-
return getAppBaseInfo;
|
|
14
|
-
},
|
|
15
12
|
get getDeviceInfo () {
|
|
16
13
|
return getDeviceInfo;
|
|
17
14
|
},
|
|
@@ -26,7 +23,5 @@ var getDeviceInfo = function getDeviceInfo() {
|
|
|
26
23
|
};
|
|
27
24
|
var getWindowInfo = function getWindowInfo() {
|
|
28
25
|
return typeof _taro.default.getWindowInfo === 'function' ? _taro.default.getWindowInfo() : _taro.default.getSystemInfoSync();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return typeof _taro.default.getAppBaseInfo === 'function' ? _taro.default.getAppBaseInfo() : _taro.default.getSystemInfoSync();
|
|
32
|
-
};
|
|
26
|
+
} // /**
|
|
27
|
+
;
|
|
@@ -3,6 +3,7 @@ import { useEffect, useRef } from "react";
|
|
|
3
3
|
import isEqual from "react-fast-compare";
|
|
4
4
|
import { eventCenter, getCurrentInstance } from "@tarojs/taro";
|
|
5
5
|
import { useForceUpdate } from "../use-force-update";
|
|
6
|
+
// export const customEvents = new Events()
|
|
6
7
|
export var customEvents = eventCenter;
|
|
7
8
|
export function useCustomEventsPath(selector) {
|
|
8
9
|
var _getCurrentInstance_router;
|
|
@@ -18,10 +19,10 @@ export function useCustomEvent(selector, cb) {
|
|
|
18
19
|
customEvents.off(path);
|
|
19
20
|
};
|
|
20
21
|
}, []);
|
|
21
|
-
var trigger = function(args) {
|
|
22
|
+
var trigger = function trigger(args) {
|
|
22
23
|
customEvents.trigger(path, args);
|
|
23
24
|
};
|
|
24
|
-
var off = function() {
|
|
25
|
+
var off = function off() {
|
|
25
26
|
customEvents.off(path);
|
|
26
27
|
};
|
|
27
28
|
return [
|
|
@@ -39,7 +40,7 @@ export function useParams(args) {
|
|
|
39
40
|
currentRef.current = args;
|
|
40
41
|
stateRef.current = args;
|
|
41
42
|
}
|
|
42
|
-
var setParams = function(args) {
|
|
43
|
+
var setParams = function setParams(args) {
|
|
43
44
|
stateRef.current = _object_spread({}, stateRef.current, args);
|
|
44
45
|
forceUpdate();
|
|
45
46
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useRef } from "react";
|
|
2
2
|
import { getEnv } from "@tarojs/taro";
|
|
3
3
|
import { useLockScroll } from "../use-lock-scroll";
|
|
4
|
-
export var useLockScrollTaro = function(shouldLock) {
|
|
4
|
+
export var useLockScrollTaro = function useLockScrollTaro(shouldLock) {
|
|
5
5
|
var refObject = useRef(null);
|
|
6
6
|
if (getEnv() === 'WEB') {
|
|
7
7
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect } from "react";
|
|
2
2
|
import { isFunction } from "../utils";
|
|
3
|
-
var getTargetElement = function(target) {
|
|
3
|
+
var getTargetElement = function getTargetElement(target) {
|
|
4
4
|
var targetElement;
|
|
5
5
|
if (isFunction(target)) {
|
|
6
6
|
targetElement = target();
|
|
@@ -14,7 +14,7 @@ var getTargetElement = function(target) {
|
|
|
14
14
|
export default function useClickAway(onClickAway, target) {
|
|
15
15
|
var // eslint-disable-next-line default-param-last
|
|
16
16
|
eventName = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 'click', useCapture = arguments.length > 3 ? arguments[3] : void 0, isListener = arguments.length > 4 ? arguments[4] : void 0, outerVar = arguments.length > 5 ? arguments[5] : void 0;
|
|
17
|
-
var handler = function(event) {
|
|
17
|
+
var handler = function handler(event) {
|
|
18
18
|
var targets = Array.isArray(target) ? target : [
|
|
19
19
|
target
|
|
20
20
|
];
|
|
@@ -17,7 +17,7 @@ function getScrollableElement(el) {
|
|
|
17
17
|
// 移植自vant:https://github.com/youzan/vant/blob/HEAD/src/composables/use-lock-scroll.ts
|
|
18
18
|
export function useLockScroll(rootRef, shouldLock) {
|
|
19
19
|
var touch = useTouch();
|
|
20
|
-
var onTouchMove = function(event) {
|
|
20
|
+
var onTouchMove = function onTouchMove(event) {
|
|
21
21
|
touch.move(event);
|
|
22
22
|
var direction = touch.deltaY.current > 0 ? '10' : '01';
|
|
23
23
|
var el = getScrollParent(event.target, rootRef.current);
|
|
@@ -43,7 +43,7 @@ export function useLockScroll(rootRef, shouldLock) {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
var lock = function() {
|
|
46
|
+
var lock = function lock() {
|
|
47
47
|
document.addEventListener('touchstart', touch.start);
|
|
48
48
|
document.addEventListener('touchmove', onTouchMove, passiveSupported ? {
|
|
49
49
|
passive: false
|
|
@@ -53,7 +53,7 @@ export function useLockScroll(rootRef, shouldLock) {
|
|
|
53
53
|
}
|
|
54
54
|
totalLockCount++;
|
|
55
55
|
};
|
|
56
|
-
var unlock = function() {
|
|
56
|
+
var unlock = function unlock() {
|
|
57
57
|
if (totalLockCount) {
|
|
58
58
|
document.removeEventListener('touchstart', touch.start);
|
|
59
59
|
document.removeEventListener('touchmove', onTouchMove);
|
|
@@ -68,7 +68,7 @@ function addEllipses(nodes, param) {
|
|
|
68
68
|
}
|
|
69
69
|
return nodes;
|
|
70
70
|
}
|
|
71
|
-
export var usePagination = function(options) {
|
|
71
|
+
export var usePagination = function usePagination(options) {
|
|
72
72
|
var mergedOptions = _object_spread({}, defaultPaginationOptions, options);
|
|
73
73
|
var total = mergedOptions.total, itemsPerPage = mergedOptions.itemsPerPage;
|
|
74
74
|
var nodesCount = Math.ceil((total || 0) / itemsPerPage) || 1;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
2
2
|
import { useRef, useState } from "react";
|
|
3
|
-
export var getRefValue = function(ref) {
|
|
3
|
+
export var getRefValue = function getRefValue(ref) {
|
|
4
4
|
return ref.current;
|
|
5
5
|
};
|
|
6
|
-
export var useRefState = function(param) {
|
|
6
|
+
export var useRefState = function useRefState(param) {
|
|
7
7
|
var ref = useRef(param);
|
|
8
8
|
var _useState = _sliced_to_array(useState(param), 2), setState = _useState[1];
|
|
9
|
-
var updateState = function(p) {
|
|
9
|
+
var updateState = function updateState(p) {
|
|
10
10
|
ref.current = p;
|
|
11
11
|
setState(p);
|
|
12
12
|
};
|
|
@@ -21,13 +21,13 @@ export function useTouch() {
|
|
|
21
21
|
var last = useRef(false);
|
|
22
22
|
var velocity = useRef(0);
|
|
23
23
|
var touchTime = useRef(Date.now());
|
|
24
|
-
var isVertical = function() {
|
|
24
|
+
var isVertical = function isVertical() {
|
|
25
25
|
return direction.current === 'vertical';
|
|
26
26
|
};
|
|
27
|
-
var isHorizontal = function() {
|
|
27
|
+
var isHorizontal = function isHorizontal() {
|
|
28
28
|
return direction.current === 'horizontal';
|
|
29
29
|
};
|
|
30
|
-
var reset = function() {
|
|
30
|
+
var reset = function reset() {
|
|
31
31
|
touchTime.current = Date.now();
|
|
32
32
|
deltaX.current = 0;
|
|
33
33
|
deltaY.current = 0;
|
|
@@ -37,27 +37,27 @@ export function useTouch() {
|
|
|
37
37
|
direction.current = '';
|
|
38
38
|
last.current = false;
|
|
39
39
|
};
|
|
40
|
-
var getTouch = function(event) {
|
|
40
|
+
var getTouch = function getTouch(event) {
|
|
41
41
|
var touch = event.touches ? event.touches[0] : event.nativeEvent;
|
|
42
42
|
return touch;
|
|
43
43
|
};
|
|
44
|
-
var getX = function(touch) {
|
|
44
|
+
var getX = function getX(touch) {
|
|
45
|
+
var _ref, _ref1, _touch_screenX;
|
|
45
46
|
if (typeof touch.clientX !== 'undefined' && typeof touch.pageX !== 'undefined') return touch.pageX;
|
|
46
|
-
|
|
47
|
-
return (_ref1 = (_ref = (_touch_screenX = touch.screenX) !== null && _touch_screenX !== void 0 ? _touch_screenX : touch.pageX) !== null && _ref !== void 0 ? _ref : touch.clientX) !== null && _ref1 !== void 0 ? _ref1 : 0;
|
|
47
|
+
return (_ref = (_ref1 = (_touch_screenX = touch.screenX) !== null && _touch_screenX !== void 0 ? _touch_screenX : touch.pageX) !== null && _ref1 !== void 0 ? _ref1 : touch.clientX) !== null && _ref !== void 0 ? _ref : 0;
|
|
48
48
|
};
|
|
49
|
-
var getY = function(touch) {
|
|
49
|
+
var getY = function getY(touch) {
|
|
50
|
+
var _ref, _ref1, _touch_screenY;
|
|
50
51
|
if (typeof touch.clientY !== 'undefined' && typeof touch.pageY !== 'undefined') return touch.pageY;
|
|
51
|
-
|
|
52
|
-
return (_ref1 = (_ref = (_touch_screenY = touch.screenY) !== null && _touch_screenY !== void 0 ? _touch_screenY : touch.pageY) !== null && _ref !== void 0 ? _ref : touch.clientY) !== null && _ref1 !== void 0 ? _ref1 : 0;
|
|
52
|
+
return (_ref = (_ref1 = (_touch_screenY = touch.screenY) !== null && _touch_screenY !== void 0 ? _touch_screenY : touch.pageY) !== null && _ref1 !== void 0 ? _ref1 : touch.clientY) !== null && _ref !== void 0 ? _ref : 0;
|
|
53
53
|
};
|
|
54
|
-
var start = function(event) {
|
|
54
|
+
var start = function start(event) {
|
|
55
55
|
reset();
|
|
56
56
|
touchTime.current = Date.now();
|
|
57
57
|
startX.current = getX(getTouch(event));
|
|
58
58
|
startY.current = getY(getTouch(event));
|
|
59
59
|
};
|
|
60
|
-
var move = function(event) {
|
|
60
|
+
var move = function move(event) {
|
|
61
61
|
var touch = getTouch(event);
|
|
62
62
|
var clientX = getX(touch);
|
|
63
63
|
var clientY = getY(touch);
|
|
@@ -71,7 +71,7 @@ export function useTouch() {
|
|
|
71
71
|
direction.current = getDirection(offsetX.current, offsetY.current);
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
|
-
var end = function(event) {
|
|
74
|
+
var end = function end(event) {
|
|
75
75
|
last.current = true;
|
|
76
76
|
velocity.current = Math.sqrt(Math.pow(deltaX.current, 2) + Math.pow(deltaY.current, 2)) / (Date.now() - touchTime.current);
|
|
77
77
|
};
|
|
@@ -9,6 +9,11 @@ export interface BaseLang {
|
|
|
9
9
|
edit: string;
|
|
10
10
|
reset: string;
|
|
11
11
|
close: string;
|
|
12
|
+
back: string;
|
|
13
|
+
clear: string;
|
|
14
|
+
image: {
|
|
15
|
+
errorTip: string;
|
|
16
|
+
};
|
|
12
17
|
video: {
|
|
13
18
|
errorTip: string;
|
|
14
19
|
clickRetry: string;
|
|
@@ -39,6 +44,7 @@ export interface BaseLang {
|
|
|
39
44
|
today: string;
|
|
40
45
|
loadPreviousMonth: string;
|
|
41
46
|
noEarlierMonth: string;
|
|
47
|
+
dayAriaLabel?: Function;
|
|
42
48
|
};
|
|
43
49
|
shortpassword: {
|
|
44
50
|
title: string;
|
|
@@ -142,4 +148,7 @@ export interface BaseLang {
|
|
|
142
148
|
errorCanvasTips: string;
|
|
143
149
|
};
|
|
144
150
|
mask: string;
|
|
151
|
+
quickenter: {
|
|
152
|
+
title: string;
|
|
153
|
+
};
|
|
145
154
|
}
|
package/dist/es/locales/en-US.js
CHANGED
|
@@ -9,6 +9,11 @@ var enUS = {
|
|
|
9
9
|
edit: 'Edit',
|
|
10
10
|
reset: 'Reset',
|
|
11
11
|
close: 'Close',
|
|
12
|
+
back: 'Back',
|
|
13
|
+
clear: 'Clear',
|
|
14
|
+
image: {
|
|
15
|
+
errorTip: 'Image failed to load'
|
|
16
|
+
},
|
|
12
17
|
video: {
|
|
13
18
|
errorTip: 'Error Tip',
|
|
14
19
|
clickRetry: 'Click Retry'
|
|
@@ -43,12 +48,23 @@ var enUS = {
|
|
|
43
48
|
start: 'Start',
|
|
44
49
|
confirm: 'Confirm',
|
|
45
50
|
title: 'Calendar',
|
|
46
|
-
monthTitle: function(year, month) {
|
|
51
|
+
monthTitle: function monthTitle(year, month) {
|
|
47
52
|
return "".concat(year, "/").concat(Number(month) < 10 ? "0".concat(Number(month)) : month);
|
|
48
53
|
},
|
|
49
54
|
today: 'Today',
|
|
50
55
|
loadPreviousMonth: 'Load Previous Month',
|
|
51
|
-
noEarlierMonth: 'No Earlier Month'
|
|
56
|
+
noEarlierMonth: 'No Earlier Month',
|
|
57
|
+
dayAriaLabel: function dayAriaLabel(year, month, day, today, isActive, isDisable) {
|
|
58
|
+
var dateStr = "".concat(year, "-").concat(month, "-").concat(day);
|
|
59
|
+
var label = today ? "Today, ".concat(dateStr) : dateStr;
|
|
60
|
+
if (isActive) {
|
|
61
|
+
label = "Selected ".concat(label);
|
|
62
|
+
}
|
|
63
|
+
if (isDisable) {
|
|
64
|
+
label = "".concat(label, " disabled");
|
|
65
|
+
}
|
|
66
|
+
return label;
|
|
67
|
+
}
|
|
52
68
|
},
|
|
53
69
|
shortpassword: {
|
|
54
70
|
title: 'Please input a password',
|
|
@@ -103,10 +119,10 @@ var enUS = {
|
|
|
103
119
|
},
|
|
104
120
|
comment: {
|
|
105
121
|
complaintsText: 'I have a complaint',
|
|
106
|
-
additionalReview: function(day) {
|
|
122
|
+
additionalReview: function additionalReview(day) {
|
|
107
123
|
return "Review after ".concat(day, " days of purchase");
|
|
108
124
|
},
|
|
109
|
-
additionalImages: function(length) {
|
|
125
|
+
additionalImages: function additionalImages(length) {
|
|
110
126
|
return "There are ".concat(length, " follow-up comments");
|
|
111
127
|
}
|
|
112
128
|
},
|
|
@@ -155,6 +171,9 @@ var enUS = {
|
|
|
155
171
|
watermark: {
|
|
156
172
|
errorCanvasTips: 'Canvas is not supported in the current environment'
|
|
157
173
|
},
|
|
158
|
-
mask: 'Mask'
|
|
174
|
+
mask: 'Mask',
|
|
175
|
+
quickenter: {
|
|
176
|
+
title: 'Quick Enter'
|
|
177
|
+
}
|
|
159
178
|
};
|
|
160
179
|
export default enUS;
|