@nutui/nutui-react-taro 3.0.20-cpp → 3.0.20
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 +71 -28
- package/dist/cjs/locales/base.d.ts +0 -9
- package/dist/cjs/locales/en-US.js +2 -21
- package/dist/cjs/locales/id-ID.js +2 -21
- package/dist/cjs/locales/ja-JP.js +2 -19
- package/dist/cjs/locales/tr-TR.js +2 -21
- package/dist/cjs/locales/vi-VN.d.ts +3 -0
- package/dist/cjs/locales/vi-VN.js +170 -0
- package/dist/cjs/locales/zh-CN.js +2 -19
- package/dist/cjs/locales/zh-TW.js +2 -19
- package/dist/cjs/locales/zh-UG.js +2 -21
- package/dist/cjs/packages/actionsheet/style/style.harmony.css +17 -38
- package/dist/cjs/packages/address/address.d.ts +1 -1
- package/dist/cjs/packages/address/style/style.harmony.css +17 -38
- package/dist/cjs/packages/animatingnumbers/countup.js +1 -3
- package/dist/cjs/packages/audio/style/style.harmony.css +3 -0
- package/dist/cjs/packages/avatar/avatar.js +6 -32
- package/dist/cjs/packages/avatarcropper/avatarcropper.js +6 -2
- package/dist/cjs/packages/badge/badge.js +3 -16
- package/dist/cjs/packages/button/button.d.ts +24 -2
- package/dist/cjs/packages/button/button.js +12 -9
- package/dist/cjs/packages/button/index.d.ts +1 -0
- package/dist/cjs/packages/button/style/button.scss +3 -0
- package/dist/cjs/packages/button/style/style.css +3 -0
- package/dist/cjs/packages/button/style/style.harmony.css +3 -0
- package/dist/cjs/packages/button/style-jmapp/button.scss +3 -0
- package/dist/cjs/packages/button/style-jmapp/style.css +3 -0
- package/dist/cjs/packages/button/style-jrkf/button.scss +3 -0
- package/dist/cjs/packages/button/style-jrkf/style.css +3 -0
- package/dist/cjs/packages/calendar/style/calendar.scss +1 -32
- package/dist/cjs/packages/calendar/style/style.css +1 -21
- package/dist/cjs/packages/calendar/style/style.harmony.css +18 -59
- package/dist/cjs/packages/calendar/style-jmapp/calendar.scss +1 -32
- package/dist/cjs/packages/calendar/style-jmapp/style.css +1 -21
- package/dist/cjs/packages/calendar/style-jrkf/calendar.scss +1 -32
- package/dist/cjs/packages/calendar/style-jrkf/style.css +1 -21
- package/dist/cjs/packages/calendarcard/calendarcard.js +8 -30
- package/dist/cjs/packages/calendarcard/icon.js +23 -12
- package/dist/cjs/packages/calendarcard/style/calendarcard.scss +0 -19
- package/dist/cjs/packages/calendarcard/style/style.css +0 -13
- package/dist/cjs/packages/calendarcard/style/style.harmony.css +0 -13
- package/dist/cjs/packages/calendarcard/style-jmapp/calendarcard.scss +0 -19
- package/dist/cjs/packages/calendarcard/style-jmapp/style.css +0 -13
- package/dist/cjs/packages/calendarcard/style-jrkf/calendarcard.scss +0 -19
- package/dist/cjs/packages/calendarcard/style-jrkf/style.css +0 -13
- package/dist/cjs/packages/card/style/style.harmony.css +1 -1
- package/dist/cjs/packages/cascader/style/style.harmony.css +17 -38
- package/dist/cjs/packages/configprovider/types.d.ts +1 -1
- package/dist/cjs/packages/datepicker/style/style.harmony.css +18 -39
- package/dist/cjs/packages/dialog/dialog.js +12 -18
- 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 +4 -1
- 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/empty/empty.d.ts +4 -4
- package/dist/cjs/packages/empty/style/style.harmony.css +3 -0
- package/dist/cjs/packages/form/style/style.harmony.css +5 -0
- package/dist/cjs/packages/formitem/style/formitem.scss +4 -4
- package/dist/cjs/packages/formitem/style/style.css +5 -0
- package/dist/cjs/packages/formitem/style/style.harmony.css +5 -0
- package/dist/cjs/packages/formitem/style-jmapp/formitem.scss +4 -4
- package/dist/cjs/packages/formitem/style-jmapp/style.css +5 -0
- package/dist/cjs/packages/formitem/style-jrkf/formitem.scss +4 -4
- package/dist/cjs/packages/formitem/style-jrkf/style.css +5 -0
- package/dist/cjs/packages/image/image.js +3 -11
- package/dist/cjs/packages/imagepreview/style/style.harmony.css +17 -38
- package/dist/cjs/packages/input/input.js +3 -10
- package/dist/cjs/packages/inputnumber/inputnumber.js +1 -1
- package/dist/cjs/packages/lottie/lottiemp.js +18 -10
- package/dist/cjs/packages/numberkeyboard/style/style.css +1 -1
- package/dist/cjs/packages/numberkeyboard/style/style.harmony.css +18 -39
- package/dist/cjs/packages/nutui.react.build.d.ts +1 -3
- package/dist/cjs/packages/nutui.react.build.js +14 -18
- package/dist/cjs/packages/nutui.react.d.ts +1 -4
- package/dist/cjs/packages/nutui.react.js +14 -19
- package/dist/cjs/packages/nutui.react.scss.d.ts +0 -1
- package/dist/cjs/packages/nutui.react.scss.js +0 -1
- package/dist/cjs/packages/overlay/overlay.js +3 -3
- package/dist/cjs/packages/picker/style/style.css +1 -1
- package/dist/cjs/packages/picker/style/style.harmony.css +18 -39
- package/dist/cjs/packages/popover/style/style.harmony.css +17 -38
- package/dist/cjs/packages/popup/popup.js +103 -188
- package/dist/cjs/packages/popup/style/popup.scss +1 -22
- package/dist/cjs/packages/popup/style/style.css +17 -38
- package/dist/cjs/packages/popup/style/style.harmony.css +17 -38
- package/dist/cjs/packages/popup/style-jmapp/popup.scss +1 -22
- package/dist/cjs/packages/popup/style-jmapp/style.css +1 -22
- package/dist/cjs/packages/popup/style-jrkf/popup.scss +1 -22
- package/dist/cjs/packages/popup/style-jrkf/style.css +1 -22
- package/dist/cjs/packages/price/price.js +13 -52
- package/dist/cjs/packages/progress/progress.js +4 -2
- package/dist/cjs/packages/range/range.js +7 -32
- package/dist/cjs/packages/rate/rate.js +8 -5
- package/dist/cjs/packages/resultpage/resultpage.js +1 -2
- package/dist/cjs/packages/resultpage/style/style.harmony.css +3 -0
- package/dist/cjs/packages/safearea/safearea.js +12 -3
- package/dist/cjs/packages/safearea/style/safearea.scss +6 -0
- package/dist/cjs/packages/safearea/style/style.css +2 -0
- package/dist/cjs/packages/safearea/style/style.harmony.css +2 -0
- package/dist/cjs/packages/safearea/style-jmapp/safearea.scss +6 -0
- package/dist/cjs/packages/safearea/style-jmapp/style.css +2 -0
- package/dist/cjs/packages/safearea/style-jrkf/safearea.scss +6 -0
- package/dist/cjs/packages/safearea/style-jrkf/style.css +2 -0
- package/dist/cjs/packages/searchbar/searchbar.js +9 -23
- package/dist/cjs/packages/shortpassword/style/style.harmony.css +17 -38
- package/dist/cjs/packages/step/step.js +8 -3
- package/dist/cjs/packages/step/style/step.scss +2 -0
- package/dist/cjs/packages/step/style/style.css +2 -0
- package/dist/cjs/packages/step/style/style.harmony.css +2 -0
- package/dist/cjs/packages/step/style-jmapp/step.scss +2 -0
- package/dist/cjs/packages/step/style-jmapp/style.css +2 -0
- package/dist/cjs/packages/step/style-jrkf/step.scss +2 -0
- package/dist/cjs/packages/step/style-jrkf/style.css +2 -0
- package/dist/cjs/packages/steps/style/steps.scss +3 -10
- package/dist/cjs/packages/steps/style/style.css +7 -13
- package/dist/cjs/packages/steps/style/style.harmony.css +9 -13
- package/dist/cjs/packages/steps/style-jmapp/steps.scss +3 -10
- package/dist/cjs/packages/steps/style-jmapp/style.css +3 -9
- package/dist/cjs/packages/steps/style-jrkf/steps.scss +3 -10
- package/dist/cjs/packages/steps/style-jrkf/style.css +3 -9
- package/dist/cjs/packages/swipe/swipe.js +115 -83
- 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 +5 -12
- 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 +17 -38
- package/dist/cjs/packages/toast/style/style.css +4 -2
- package/dist/cjs/packages/toast/style/style.harmony.css +4 -2
- package/dist/cjs/packages/toast/style/toast.scss +4 -2
- package/dist/cjs/packages/toast/style-jmapp/style.css +4 -2
- package/dist/cjs/packages/toast/style-jmapp/toast.scss +4 -2
- package/dist/cjs/packages/toast/style-jrkf/style.css +4 -2
- package/dist/cjs/packages/toast/style-jrkf/toast.scss +4 -2
- package/dist/cjs/packages/toast/toast.js +1 -1
- package/dist/cjs/packages/tour/style/style.harmony.css +17 -38
- package/dist/cjs/types/index.d.ts +0 -3
- package/dist/cjs/types/index.js +0 -3
- package/dist/cjs/types/spec/button/base.d.ts +1 -2
- package/dist/cjs/types/spec/button/taro.d.ts +1 -5
- package/dist/cjs/types/spec/calendarcard/base.d.ts +0 -2
- package/dist/cjs/types/spec/dialog/base.d.ts +0 -1
- package/dist/cjs/types/spec/dialog/h5.d.ts +0 -2
- package/dist/cjs/types/spec/dialog/taro.d.ts +0 -2
- package/dist/cjs/types/spec/overlay/base.d.ts +0 -1
- package/dist/cjs/types/spec/popup/base.d.ts +0 -2
- package/dist/cjs/types/spec/price/base.d.ts +0 -1
- package/dist/cjs/utils/taro/{ConfigurableCSSTransition.js → ConfigurableCSSTransition copy.js } +53 -13
- package/dist/cjs/utils/taro/get-rect.js +2 -4
- package/dist/cjs/utils/taro/get-system-info.d.ts +5 -0
- package/dist/cjs/utils/taro/get-system-info.js +7 -2
- package/dist/es/hooks/taro/use-custom-event.js +0 -1
- package/dist/es/locales/base.d.ts +0 -9
- package/dist/es/locales/en-US.js +2 -21
- package/dist/es/locales/id-ID.js +2 -21
- package/dist/es/locales/ja-JP.js +2 -19
- package/dist/es/locales/tr-TR.js +2 -21
- package/dist/es/locales/vi-VN.d.ts +3 -0
- package/dist/es/locales/vi-VN.js +160 -0
- package/dist/es/locales/zh-CN.js +2 -19
- package/dist/es/locales/zh-TW.js +2 -19
- package/dist/es/locales/zh-UG.js +2 -21
- package/dist/es/packages/actionsheet/style/style.harmony.css +17 -38
- package/dist/es/packages/address/address.d.ts +1 -1
- package/dist/es/packages/address/style/style.harmony.css +17 -38
- package/dist/es/packages/animatingnumbers/countup.js +1 -3
- package/dist/es/packages/audio/style/style.harmony.css +3 -0
- package/dist/es/packages/avatar/avatar.js +6 -32
- package/dist/es/packages/avatarcropper/avatarcropper.js +8 -4
- package/dist/es/packages/badge/badge.js +3 -16
- package/dist/es/packages/button/button.d.ts +24 -2
- package/dist/es/packages/button/button.js +12 -10
- package/dist/es/packages/button/index.d.ts +1 -0
- package/dist/es/packages/button/style/button.scss +3 -0
- package/dist/es/packages/button/style/style.css +3 -0
- package/dist/es/packages/button/style/style.harmony.css +3 -0
- package/dist/es/packages/button/style-jmapp/button.scss +3 -0
- package/dist/es/packages/button/style-jmapp/style.css +3 -0
- package/dist/es/packages/button/style-jrkf/button.scss +3 -0
- package/dist/es/packages/button/style-jrkf/style.css +3 -0
- package/dist/es/packages/calendar/style/calendar.scss +1 -32
- package/dist/es/packages/calendar/style/style.css +1 -21
- package/dist/es/packages/calendar/style/style.harmony.css +18 -59
- package/dist/es/packages/calendar/style-jmapp/calendar.scss +1 -32
- package/dist/es/packages/calendar/style-jmapp/style.css +1 -21
- package/dist/es/packages/calendar/style-jrkf/calendar.scss +1 -32
- package/dist/es/packages/calendar/style-jrkf/style.css +1 -21
- package/dist/es/packages/calendarcard/calendarcard.js +9 -31
- package/dist/es/packages/calendarcard/icon.js +24 -13
- package/dist/es/packages/calendarcard/style/calendarcard.scss +0 -19
- package/dist/es/packages/calendarcard/style/style.css +0 -13
- package/dist/es/packages/calendarcard/style/style.harmony.css +0 -13
- package/dist/es/packages/calendarcard/style-jmapp/calendarcard.scss +0 -19
- package/dist/es/packages/calendarcard/style-jmapp/style.css +0 -13
- package/dist/es/packages/calendarcard/style-jrkf/calendarcard.scss +0 -19
- package/dist/es/packages/calendarcard/style-jrkf/style.css +0 -13
- package/dist/es/packages/card/style/style.harmony.css +1 -1
- package/dist/es/packages/cascader/style/style.harmony.css +17 -38
- package/dist/es/packages/configprovider/types.d.ts +1 -1
- package/dist/es/packages/datepicker/style/style.harmony.css +18 -39
- package/dist/es/packages/dialog/dialog.js +21 -29
- 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 +4 -1
- 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/empty/empty.d.ts +4 -4
- package/dist/es/packages/empty/style/style.harmony.css +3 -0
- package/dist/es/packages/form/style/style.harmony.css +5 -0
- package/dist/es/packages/formitem/style/formitem.scss +4 -4
- package/dist/es/packages/formitem/style/style.css +5 -0
- package/dist/es/packages/formitem/style/style.harmony.css +5 -0
- package/dist/es/packages/formitem/style-jmapp/formitem.scss +4 -4
- package/dist/es/packages/formitem/style-jmapp/style.css +5 -0
- package/dist/es/packages/formitem/style-jrkf/formitem.scss +4 -4
- package/dist/es/packages/formitem/style-jrkf/style.css +5 -0
- package/dist/es/packages/image/image.js +3 -11
- package/dist/es/packages/imagepreview/style/style.harmony.css +17 -38
- package/dist/es/packages/input/input.js +3 -10
- package/dist/es/packages/inputnumber/inputnumber.js +1 -1
- package/dist/es/packages/lottie/lottiemp.js +20 -12
- package/dist/es/packages/numberkeyboard/style/style.css +1 -1
- package/dist/es/packages/numberkeyboard/style/style.harmony.css +18 -39
- package/dist/es/packages/nutui.react.build.d.ts +1 -3
- package/dist/es/packages/nutui.react.build.js +1 -3
- 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 +18 -39
- package/dist/es/packages/popover/style/style.harmony.css +17 -38
- package/dist/es/packages/popup/popup.js +104 -189
- package/dist/es/packages/popup/style/popup.scss +1 -22
- package/dist/es/packages/popup/style/style.css +17 -38
- package/dist/es/packages/popup/style/style.harmony.css +17 -38
- package/dist/es/packages/popup/style-jmapp/popup.scss +1 -22
- package/dist/es/packages/popup/style-jmapp/style.css +1 -22
- package/dist/es/packages/popup/style-jrkf/popup.scss +1 -22
- package/dist/es/packages/popup/style-jrkf/style.css +1 -22
- package/dist/es/packages/price/price.js +14 -53
- package/dist/es/packages/progress/progress.js +4 -2
- package/dist/es/packages/range/range.js +8 -33
- package/dist/es/packages/rate/rate.js +9 -6
- package/dist/es/packages/resultpage/resultpage.js +1 -2
- package/dist/es/packages/resultpage/style/style.harmony.css +3 -0
- package/dist/es/packages/safearea/safearea.js +12 -3
- package/dist/es/packages/safearea/style/safearea.scss +6 -0
- package/dist/es/packages/safearea/style/style.css +2 -0
- package/dist/es/packages/safearea/style/style.harmony.css +2 -0
- package/dist/es/packages/safearea/style-jmapp/safearea.scss +6 -0
- package/dist/es/packages/safearea/style-jmapp/style.css +2 -0
- package/dist/es/packages/safearea/style-jrkf/safearea.scss +6 -0
- package/dist/es/packages/safearea/style-jrkf/style.css +2 -0
- package/dist/es/packages/searchbar/searchbar.js +9 -23
- package/dist/es/packages/shortpassword/style/style.harmony.css +17 -38
- package/dist/es/packages/step/step.js +8 -3
- package/dist/es/packages/step/style/step.scss +2 -0
- package/dist/es/packages/step/style/style.css +2 -0
- package/dist/es/packages/step/style/style.harmony.css +2 -0
- package/dist/es/packages/step/style-jmapp/step.scss +2 -0
- package/dist/es/packages/step/style-jmapp/style.css +2 -0
- package/dist/es/packages/step/style-jrkf/step.scss +2 -0
- package/dist/es/packages/step/style-jrkf/style.css +2 -0
- package/dist/es/packages/steps/style/steps.scss +3 -10
- package/dist/es/packages/steps/style/style.css +7 -13
- package/dist/es/packages/steps/style/style.harmony.css +9 -13
- package/dist/es/packages/steps/style-jmapp/steps.scss +3 -10
- package/dist/es/packages/steps/style-jmapp/style.css +3 -9
- package/dist/es/packages/steps/style-jrkf/steps.scss +3 -10
- package/dist/es/packages/steps/style-jrkf/style.css +3 -9
- package/dist/es/packages/swipe/swipe.js +116 -84
- 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 +5 -12
- 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 +17 -38
- package/dist/es/packages/toast/style/style.css +4 -2
- package/dist/es/packages/toast/style/style.harmony.css +4 -2
- package/dist/es/packages/toast/style/toast.scss +4 -2
- package/dist/es/packages/toast/style-jmapp/style.css +4 -2
- package/dist/es/packages/toast/style-jmapp/toast.scss +4 -2
- package/dist/es/packages/toast/style-jrkf/style.css +4 -2
- package/dist/es/packages/toast/style-jrkf/toast.scss +4 -2
- package/dist/es/packages/toast/toast.js +1 -1
- package/dist/es/packages/tour/style/style.harmony.css +17 -38
- package/dist/es/types/index.d.ts +0 -3
- package/dist/es/types/index.js +0 -3
- package/dist/es/types/spec/button/base.d.ts +1 -2
- package/dist/es/types/spec/button/taro.d.ts +1 -5
- package/dist/es/types/spec/calendarcard/base.d.ts +0 -2
- package/dist/es/types/spec/dialog/base.d.ts +8 -3
- package/dist/es/types/spec/dialog/h5.d.ts +0 -2
- package/dist/es/types/spec/dialog/taro.d.ts +0 -2
- package/dist/es/types/spec/overlay/base.d.ts +0 -1
- package/dist/es/types/spec/popup/base.d.ts +5 -4
- package/dist/es/types/spec/price/base.d.ts +0 -4
- package/dist/es/utils/taro/{ConfigurableCSSTransition.js → ConfigurableCSSTransition copy.js } +53 -13
- package/dist/es/utils/taro/get-rect.js +2 -4
- package/dist/es/utils/taro/get-system-info.d.ts +5 -0
- package/dist/es/utils/taro/get-system-info.js +7 -8
- package/dist/nutui.react.umd.js +10310 -10733
- package/dist/style-jmapp.css +1 -1
- package/dist/style-jmapp.scss +41 -42
- package/dist/style-jrkf.css +1 -1
- package/dist/style-jrkf.scss +31 -32
- package/dist/style.css +1 -1
- package/dist/style.scss +30 -31
- package/dist/styles/jd-font.scss +2 -2
- package/dist/styles/theme-dark.scss +2 -1
- 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 +0 -41
- package/dist/styles/variables-jmapp.scss +0 -41
- package/dist/styles/variables-jrkf.scss +0 -41
- package/dist/styles/variables.scss +4 -49
- package/package.json +1 -1
- package/postinstall.js +9 -0
- package/dist/cjs/packages/quickenter/index.d.ts +0 -3
- package/dist/cjs/packages/quickenter/index.js +0 -13
- package/dist/cjs/packages/quickenter/quickenter.d.ts +0 -4
- package/dist/cjs/packages/quickenter/quickenter.js +0 -153
- package/dist/cjs/packages/quickenter/style/css.js +0 -2
- package/dist/cjs/packages/quickenter/style/index.js +0 -2
- package/dist/cjs/packages/quickenter/style/quickenter.scss +0 -120
- package/dist/cjs/packages/quickenter/style/style.css +0 -106
- package/dist/cjs/packages/quickenter/style/style.harmony.css +0 -506
- package/dist/cjs/packages/quickenter/style-jmapp/css.js +0 -2
- package/dist/cjs/packages/quickenter/style-jmapp/index.js +0 -2
- package/dist/cjs/packages/quickenter/style-jmapp/quickenter.scss +0 -120
- package/dist/cjs/packages/quickenter/style-jmapp/style.css +0 -106
- package/dist/cjs/packages/quickenter/style-jrkf/css.js +0 -2
- package/dist/cjs/packages/quickenter/style-jrkf/index.js +0 -2
- package/dist/cjs/packages/quickenter/style-jrkf/quickenter.scss +0 -120
- package/dist/cjs/packages/quickenter/style-jrkf/style.css +0 -106
- package/dist/cjs/types/spec/quickenter/base.d.ts +0 -27
- package/dist/cjs/types/spec/quickenter/base.js +0 -4
- package/dist/cjs/types/spec/quickenter/h5.d.ts +0 -5
- package/dist/cjs/types/spec/quickenter/h5.js +0 -4
- package/dist/cjs/types/spec/quickenter/taro.d.ts +0 -5
- package/dist/cjs/types/spec/quickenter/taro.js +0 -4
- package/dist/cjs/utils/should-render-price-raw.d.ts +0 -2
- package/dist/cjs/utils/should-render-price-raw.js +0 -46
- package/dist/es/packages/quickenter/index.d.ts +0 -3
- package/dist/es/packages/quickenter/index.js +0 -2
- package/dist/es/packages/quickenter/quickenter.d.ts +0 -4
- package/dist/es/packages/quickenter/quickenter.js +0 -141
- package/dist/es/packages/quickenter/style/css.js +0 -2
- package/dist/es/packages/quickenter/style/index.js +0 -2
- package/dist/es/packages/quickenter/style/quickenter.scss +0 -120
- package/dist/es/packages/quickenter/style/style.css +0 -106
- package/dist/es/packages/quickenter/style/style.harmony.css +0 -506
- package/dist/es/packages/quickenter/style-jmapp/css.js +0 -2
- package/dist/es/packages/quickenter/style-jmapp/index.js +0 -2
- package/dist/es/packages/quickenter/style-jmapp/quickenter.scss +0 -120
- package/dist/es/packages/quickenter/style-jmapp/style.css +0 -106
- package/dist/es/packages/quickenter/style-jrkf/css.js +0 -2
- package/dist/es/packages/quickenter/style-jrkf/index.js +0 -2
- package/dist/es/packages/quickenter/style-jrkf/quickenter.scss +0 -120
- package/dist/es/packages/quickenter/style-jrkf/style.css +0 -106
- package/dist/es/types/spec/quickenter/base.d.ts +0 -45
- package/dist/es/types/spec/quickenter/base.js +0 -1
- package/dist/es/types/spec/quickenter/h5.d.ts +0 -5
- package/dist/es/types/spec/quickenter/h5.js +0 -1
- package/dist/es/types/spec/quickenter/taro.d.ts +0 -5
- package/dist/es/types/spec/quickenter/taro.js +0 -1
- package/dist/es/utils/should-render-price-raw.d.ts +0 -2
- package/dist/es/utils/should-render-price-raw.js +0 -30
- /package/dist/cjs/utils/taro/{ConfigurableCSSTransition.d.ts → ConfigurableCSSTransition copy.d.ts} +0 -0
- /package/dist/es/utils/taro/{ConfigurableCSSTransition.d.ts → ConfigurableCSSTransition copy.d.ts} +0 -0
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
}
|
|
96
96
|
.nut-steps-horizontal-double .nut-step-head {
|
|
97
97
|
justify-content: center;
|
|
98
|
-
margin-bottom:
|
|
98
|
+
margin-bottom: 6px;
|
|
99
99
|
}
|
|
100
100
|
.nut-steps-horizontal-double .nut-step-head-dot-wrap, .nut-steps-horizontal-double .nut-step-head-icon-wrap, .nut-steps-horizontal-double .nut-step-head-text-wrap {
|
|
101
101
|
background-color: var(--nutui-steps-background-color, #ffffff);
|
|
@@ -112,13 +112,7 @@
|
|
|
112
112
|
.nut-steps-horizontal-double .nut-step-main {
|
|
113
113
|
align-items: center;
|
|
114
114
|
margin-left: 0;
|
|
115
|
-
|
|
116
|
-
.nut-steps-horizontal-double .nut-step-title {
|
|
117
|
-
height: auto;
|
|
118
|
-
line-height: 20px;
|
|
119
|
-
white-space: normal;
|
|
120
|
-
overflow-wrap: break-word;
|
|
121
|
-
text-align: center;
|
|
115
|
+
margin-top: 2px;
|
|
122
116
|
}
|
|
123
117
|
.nut-steps-horizontal-double.nut-steps-horizontal-icon .nut-step-head, .nut-steps-horizontal-double.nut-steps-horizontal-icon .nut-step-line {
|
|
124
118
|
height: var(--nutui-steps-base-head-icon-size-right, 20px);
|
|
@@ -137,7 +131,7 @@
|
|
|
137
131
|
flex-direction: column;
|
|
138
132
|
}
|
|
139
133
|
.nut-steps-vertical .nut-step {
|
|
140
|
-
padding-bottom: var(--nutui-steps-vertical-item-padding-bottom,
|
|
134
|
+
padding-bottom: var(--nutui-steps-vertical-item-padding-bottom, 13px);
|
|
141
135
|
}
|
|
142
136
|
.nut-steps-vertical .nut-step-last {
|
|
143
137
|
padding-bottom: 0 !important;
|
|
@@ -153,7 +147,7 @@
|
|
|
153
147
|
.nut-steps-vertical .nut-step-head {
|
|
154
148
|
align-items: center;
|
|
155
149
|
justify-content: center;
|
|
156
|
-
height:
|
|
150
|
+
height: 18px;
|
|
157
151
|
}
|
|
158
152
|
.nut-steps-vertical .nut-step-head-icon {
|
|
159
153
|
width: var(--nutui-steps-vertical-item-icon-size, 20px);
|
|
@@ -172,18 +166,18 @@
|
|
|
172
166
|
.nut-steps-vertical .nut-step-title {
|
|
173
167
|
display: flex;
|
|
174
168
|
align-items: center;
|
|
175
|
-
height: var(--nutui-steps-vertical-line-height,
|
|
169
|
+
height: var(--nutui-steps-vertical-line-height, 18px);
|
|
176
170
|
font-size: var(--nutui-steps-vertical-title-font-size, var(--nutui-font-size-l, 15px));
|
|
177
171
|
/* #ifndef dynamic*/
|
|
178
172
|
overflow: auto;
|
|
179
173
|
/* #endif */
|
|
180
174
|
font-weight: 500;
|
|
181
|
-
margin-bottom: var(--nutui-steps-vertical-title-margin-bottom,
|
|
175
|
+
margin-bottom: var(--nutui-steps-vertical-title-margin-bottom, 4px);
|
|
182
176
|
}
|
|
183
177
|
.nut-steps-vertical .nut-step-description {
|
|
184
178
|
margin: var(--nutui-steps-vertical-description-margin, 0 0 1px);
|
|
185
179
|
height: auto;
|
|
186
|
-
line-height: var(--nutui-steps-vertical-line-height,
|
|
180
|
+
line-height: var(--nutui-steps-vertical-line-height, 18px);
|
|
187
181
|
color: var(--nutui-color-title, #1a1a1a);
|
|
188
182
|
font-size: var(--nutui-steps-vertical-description-font-size, var(--nutui-font-size-base, 14px));
|
|
189
183
|
box-sizing: border-box;
|
|
@@ -73,9 +73,11 @@
|
|
|
73
73
|
z-index: 1;
|
|
74
74
|
}
|
|
75
75
|
.nut-step-title {
|
|
76
|
+
height: 14px;
|
|
76
77
|
line-height: 14px;
|
|
77
78
|
font-size: var(--nutui-steps-base-title-font-size, var(--nutui-font-size-s, 12px));
|
|
78
79
|
color: var(--nutui-steps-base-title-color, var(--nutui-color-title, #1a1a1a));
|
|
80
|
+
overflow: hidden;
|
|
79
81
|
white-space: nowrap;
|
|
80
82
|
}
|
|
81
83
|
.nut-step-description {
|
|
@@ -213,7 +215,7 @@
|
|
|
213
215
|
}
|
|
214
216
|
.nut-steps-horizontal-double .nut-step-head {
|
|
215
217
|
justify-content: center;
|
|
216
|
-
margin-bottom:
|
|
218
|
+
margin-bottom: 6px;
|
|
217
219
|
}
|
|
218
220
|
.nut-steps-horizontal-double .nut-step-head-dot-wrap, .nut-steps-horizontal-double .nut-step-head-icon-wrap, .nut-steps-horizontal-double .nut-step-head-text-wrap {
|
|
219
221
|
background-color: var(--nutui-steps-background-color, #ffffff);
|
|
@@ -230,13 +232,7 @@
|
|
|
230
232
|
.nut-steps-horizontal-double .nut-step-main {
|
|
231
233
|
align-items: center;
|
|
232
234
|
margin-left: 0;
|
|
233
|
-
|
|
234
|
-
.nut-steps-horizontal-double .nut-step-title {
|
|
235
|
-
height: auto;
|
|
236
|
-
line-height: 20px;
|
|
237
|
-
white-space: normal;
|
|
238
|
-
overflow-wrap: break-word;
|
|
239
|
-
text-align: center;
|
|
235
|
+
margin-top: 2px;
|
|
240
236
|
}
|
|
241
237
|
.nut-steps-horizontal-double.nut-steps-horizontal-icon .nut-step-head, .nut-steps-horizontal-double.nut-steps-horizontal-icon .nut-step-line {
|
|
242
238
|
height: var(--nutui-steps-base-head-icon-size-right, 20px);
|
|
@@ -255,7 +251,7 @@
|
|
|
255
251
|
flex-direction: column;
|
|
256
252
|
}
|
|
257
253
|
.nut-steps-vertical .nut-step {
|
|
258
|
-
padding-bottom: var(--nutui-steps-vertical-item-padding-bottom,
|
|
254
|
+
padding-bottom: var(--nutui-steps-vertical-item-padding-bottom, 13px);
|
|
259
255
|
}
|
|
260
256
|
.nut-steps-vertical .nut-step-last {
|
|
261
257
|
padding-bottom: 0 !important;
|
|
@@ -271,7 +267,7 @@
|
|
|
271
267
|
.nut-steps-vertical .nut-step-head {
|
|
272
268
|
align-items: center;
|
|
273
269
|
justify-content: center;
|
|
274
|
-
height:
|
|
270
|
+
height: 18px;
|
|
275
271
|
}
|
|
276
272
|
.nut-steps-vertical .nut-step-head-icon {
|
|
277
273
|
width: var(--nutui-steps-vertical-item-icon-size, 20px);
|
|
@@ -290,18 +286,18 @@
|
|
|
290
286
|
.nut-steps-vertical .nut-step-title {
|
|
291
287
|
display: flex;
|
|
292
288
|
align-items: center;
|
|
293
|
-
height: var(--nutui-steps-vertical-line-height,
|
|
289
|
+
height: var(--nutui-steps-vertical-line-height, 18px);
|
|
294
290
|
font-size: var(--nutui-steps-vertical-title-font-size, var(--nutui-font-size-l, 15px));
|
|
295
291
|
/* #ifndef dynamic*/
|
|
296
292
|
overflow: auto;
|
|
297
293
|
/* #endif */
|
|
298
294
|
font-weight: 500;
|
|
299
|
-
margin-bottom: var(--nutui-steps-vertical-title-margin-bottom,
|
|
295
|
+
margin-bottom: var(--nutui-steps-vertical-title-margin-bottom, 4px);
|
|
300
296
|
}
|
|
301
297
|
.nut-steps-vertical .nut-step-description {
|
|
302
298
|
margin: var(--nutui-steps-vertical-description-margin, 0 0 1px);
|
|
303
299
|
height: auto;
|
|
304
|
-
line-height: var(--nutui-steps-vertical-line-height,
|
|
300
|
+
line-height: var(--nutui-steps-vertical-line-height, 18px);
|
|
305
301
|
color: var(--nutui-color-title, #1a1a1a);
|
|
306
302
|
font-size: var(--nutui-steps-vertical-description-font-size, var(--nutui-font-size-base, 14px));
|
|
307
303
|
box-sizing: border-box;
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
|
|
129
129
|
&-head {
|
|
130
130
|
justify-content: center;
|
|
131
|
-
margin-bottom:
|
|
131
|
+
margin-bottom: 6px;
|
|
132
132
|
|
|
133
133
|
&-dot-wrap,
|
|
134
134
|
&-icon-wrap,
|
|
@@ -151,14 +151,7 @@
|
|
|
151
151
|
&-main {
|
|
152
152
|
align-items: center;
|
|
153
153
|
margin-left: 0;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
&-title {
|
|
157
|
-
height: auto;
|
|
158
|
-
line-height: 20px;
|
|
159
|
-
white-space: normal;
|
|
160
|
-
overflow-wrap: break-word;
|
|
161
|
-
text-align: center;
|
|
154
|
+
margin-top: 2px;
|
|
162
155
|
}
|
|
163
156
|
}
|
|
164
157
|
|
|
@@ -219,7 +212,7 @@
|
|
|
219
212
|
&-head {
|
|
220
213
|
align-items: center;
|
|
221
214
|
justify-content: center;
|
|
222
|
-
height:
|
|
215
|
+
height: 18px;
|
|
223
216
|
|
|
224
217
|
&-icon {
|
|
225
218
|
width: $steps-vertical-head-icon-size;
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
}
|
|
96
96
|
.nut-steps-horizontal-double .nut-step-head {
|
|
97
97
|
justify-content: center;
|
|
98
|
-
margin-bottom:
|
|
98
|
+
margin-bottom: 6px;
|
|
99
99
|
}
|
|
100
100
|
.nut-steps-horizontal-double .nut-step-head-dot-wrap, .nut-steps-horizontal-double .nut-step-head-icon-wrap, .nut-steps-horizontal-double .nut-step-head-text-wrap {
|
|
101
101
|
background-color: var(--nutui-steps-background-color, #ffffff);
|
|
@@ -112,13 +112,7 @@
|
|
|
112
112
|
.nut-steps-horizontal-double .nut-step-main {
|
|
113
113
|
align-items: center;
|
|
114
114
|
margin-left: 0;
|
|
115
|
-
|
|
116
|
-
.nut-steps-horizontal-double .nut-step-title {
|
|
117
|
-
height: auto;
|
|
118
|
-
line-height: 20px;
|
|
119
|
-
white-space: normal;
|
|
120
|
-
overflow-wrap: break-word;
|
|
121
|
-
text-align: center;
|
|
115
|
+
margin-top: 2px;
|
|
122
116
|
}
|
|
123
117
|
.nut-steps-horizontal-double.nut-steps-horizontal-icon .nut-step-head, .nut-steps-horizontal-double.nut-steps-horizontal-icon .nut-step-line {
|
|
124
118
|
height: var(--nutui-steps-base-head-icon-size-right, 20px);
|
|
@@ -153,7 +147,7 @@
|
|
|
153
147
|
.nut-steps-vertical .nut-step-head {
|
|
154
148
|
align-items: center;
|
|
155
149
|
justify-content: center;
|
|
156
|
-
height:
|
|
150
|
+
height: 18px;
|
|
157
151
|
}
|
|
158
152
|
.nut-steps-vertical .nut-step-head-icon {
|
|
159
153
|
width: var(--nutui-steps-vertical-item-icon-size, 20px);
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
|
|
129
129
|
&-head {
|
|
130
130
|
justify-content: center;
|
|
131
|
-
margin-bottom:
|
|
131
|
+
margin-bottom: 6px;
|
|
132
132
|
|
|
133
133
|
&-dot-wrap,
|
|
134
134
|
&-icon-wrap,
|
|
@@ -151,14 +151,7 @@
|
|
|
151
151
|
&-main {
|
|
152
152
|
align-items: center;
|
|
153
153
|
margin-left: 0;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
&-title {
|
|
157
|
-
height: auto;
|
|
158
|
-
line-height: 20px;
|
|
159
|
-
white-space: normal;
|
|
160
|
-
overflow-wrap: break-word;
|
|
161
|
-
text-align: center;
|
|
154
|
+
margin-top: 2px;
|
|
162
155
|
}
|
|
163
156
|
}
|
|
164
157
|
|
|
@@ -219,7 +212,7 @@
|
|
|
219
212
|
&-head {
|
|
220
213
|
align-items: center;
|
|
221
214
|
justify-content: center;
|
|
222
|
-
height:
|
|
215
|
+
height: 18px;
|
|
223
216
|
|
|
224
217
|
&-icon {
|
|
225
218
|
width: $steps-vertical-head-icon-size;
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
}
|
|
96
96
|
.nut-steps-horizontal-double .nut-step-head {
|
|
97
97
|
justify-content: center;
|
|
98
|
-
margin-bottom:
|
|
98
|
+
margin-bottom: 6px;
|
|
99
99
|
}
|
|
100
100
|
.nut-steps-horizontal-double .nut-step-head-dot-wrap, .nut-steps-horizontal-double .nut-step-head-icon-wrap, .nut-steps-horizontal-double .nut-step-head-text-wrap {
|
|
101
101
|
background-color: var(--nutui-steps-background-color, #ffffff);
|
|
@@ -112,13 +112,7 @@
|
|
|
112
112
|
.nut-steps-horizontal-double .nut-step-main {
|
|
113
113
|
align-items: center;
|
|
114
114
|
margin-left: 0;
|
|
115
|
-
|
|
116
|
-
.nut-steps-horizontal-double .nut-step-title {
|
|
117
|
-
height: auto;
|
|
118
|
-
line-height: 20px;
|
|
119
|
-
white-space: normal;
|
|
120
|
-
overflow-wrap: break-word;
|
|
121
|
-
text-align: center;
|
|
115
|
+
margin-top: 2px;
|
|
122
116
|
}
|
|
123
117
|
.nut-steps-horizontal-double.nut-steps-horizontal-icon .nut-step-head, .nut-steps-horizontal-double.nut-steps-horizontal-icon .nut-step-line {
|
|
124
118
|
height: var(--nutui-steps-base-head-icon-size-right, 20px);
|
|
@@ -153,7 +147,7 @@
|
|
|
153
147
|
.nut-steps-vertical .nut-step-head {
|
|
154
148
|
align-items: center;
|
|
155
149
|
justify-content: center;
|
|
156
|
-
height:
|
|
150
|
+
height: 18px;
|
|
157
151
|
}
|
|
158
152
|
.nut-steps-vertical .nut-step-head-icon {
|
|
159
153
|
width: var(--nutui-steps-vertical-item-icon-size, 20px);
|
|
@@ -18,10 +18,10 @@ var _ts_generator = require("@swc/helpers/_/_ts_generator");
|
|
|
18
18
|
var _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
19
19
|
var _classnames = /*#__PURE__*/ _interop_require_default._(require("classnames"));
|
|
20
20
|
var _components = require("@tarojs/components");
|
|
21
|
-
var _taro = require("@tarojs/taro");
|
|
22
21
|
var _usetouch = require("../../hooks/use-touch");
|
|
23
22
|
var _getrect = require("../../utils/taro/get-rect");
|
|
24
23
|
var _typings = require("../../utils/typings");
|
|
24
|
+
var _platform = require("../../utils/taro/platform");
|
|
25
25
|
var _userefstate = require("../../hooks/use-ref-state");
|
|
26
26
|
var _useuuid = require("../../hooks/use-uuid");
|
|
27
27
|
function preventDefault(event, isStopPropagation) {
|
|
@@ -41,9 +41,97 @@ var Swipe = /*#__PURE__*/ (0, _react.forwardRef)(function(props, instanceRef) {
|
|
|
41
41
|
var uid = (0, _useuuid.useUuid)();
|
|
42
42
|
var leftId = "swipe-left-".concat(uid);
|
|
43
43
|
var rightId = "swipe-right-".concat(uid);
|
|
44
|
-
var
|
|
44
|
+
var _$_object_spread = (0, _object_spread._)({}, defaultProps, props), children = _$_object_spread.children, className = _$_object_spread.className, style = _$_object_spread.style;
|
|
45
|
+
var root = (0, _react.useRef)();
|
|
46
|
+
var opened = (0, _react.useRef)(false);
|
|
47
|
+
var lockClick = (0, _react.useRef)(false);
|
|
48
|
+
var startOffset = (0, _react.useRef)(0);
|
|
49
|
+
var _useState = (0, _sliced_to_array._)((0, _react.useState)({
|
|
50
|
+
offset: 0,
|
|
51
|
+
dragging: false
|
|
52
|
+
}), 2), state = _useState[0], setState = _useState[1];
|
|
53
|
+
var _useRefState = (0, _sliced_to_array._)((0, _userefstate.useRefState)({
|
|
54
|
+
left: 0,
|
|
55
|
+
right: 0
|
|
56
|
+
}), 2), actionWidth = _useRefState[0], updateState = _useRefState[1];
|
|
57
|
+
var setActionWidth = (0, _react.useCallback)(function(fn) {
|
|
58
|
+
var res = fn();
|
|
59
|
+
if (res.left !== undefined) {
|
|
60
|
+
updateState((0, _object_spread_props._)((0, _object_spread._)({}, actionWidth.current), {
|
|
61
|
+
left: res.left
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
if (res.right !== undefined) {
|
|
65
|
+
updateState((0, _object_spread_props._)((0, _object_spread._)({}, actionWidth.current), {
|
|
66
|
+
right: res.right
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
}, [
|
|
70
|
+
actionWidth,
|
|
71
|
+
updateState
|
|
72
|
+
]);
|
|
73
|
+
// 获取元素的时候要在页面 onReady 后,需要参考小程序的事件周期
|
|
74
|
+
(0, _react.useLayoutEffect)(function() {
|
|
75
|
+
var getWidth = function getWidth() {
|
|
76
|
+
return (0, _async_to_generator._)(function() {
|
|
77
|
+
var leftRect, rightRect;
|
|
78
|
+
return (0, _ts_generator._)(this, function(_state) {
|
|
79
|
+
switch(_state.label){
|
|
80
|
+
case 0:
|
|
81
|
+
if (!leftWrapper.current) return [
|
|
82
|
+
3,
|
|
83
|
+
2
|
|
84
|
+
];
|
|
85
|
+
return [
|
|
86
|
+
4,
|
|
87
|
+
(0, _getrect.getRectInMultiPlatform)(leftWrapper.current, leftId)
|
|
88
|
+
];
|
|
89
|
+
case 1:
|
|
90
|
+
leftRect = _state.sent();
|
|
91
|
+
leftRect && setActionWidth(function(v) {
|
|
92
|
+
return (0, _object_spread_props._)((0, _object_spread._)({}, v), {
|
|
93
|
+
left: leftRect.width
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
_state.label = 2;
|
|
97
|
+
case 2:
|
|
98
|
+
if (!rightWrapper.current) return [
|
|
99
|
+
3,
|
|
100
|
+
4
|
|
101
|
+
];
|
|
102
|
+
return [
|
|
103
|
+
4,
|
|
104
|
+
(0, _getrect.getRectInMultiPlatform)(rightWrapper.current, rightId)
|
|
105
|
+
];
|
|
106
|
+
case 3:
|
|
107
|
+
rightRect = _state.sent();
|
|
108
|
+
rightRect && setActionWidth(function(v) {
|
|
109
|
+
return (0, _object_spread_props._)((0, _object_spread._)({}, v), {
|
|
110
|
+
right: rightRect.width
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
_state.label = 4;
|
|
114
|
+
case 4:
|
|
115
|
+
return [
|
|
116
|
+
2
|
|
117
|
+
];
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
})();
|
|
121
|
+
};
|
|
122
|
+
getWidth();
|
|
123
|
+
}, [
|
|
124
|
+
leftId,
|
|
125
|
+
rightId,
|
|
126
|
+
setActionWidth
|
|
127
|
+
]);
|
|
128
|
+
var wrapperStyle = {
|
|
129
|
+
transform: "translate(".concat(state.offset).concat(!(0, _platform.harmony)() ? 'px' : '', ", 0)"),
|
|
130
|
+
transitionDuration: state.dragging ? '0s' : '.6s'
|
|
131
|
+
};
|
|
132
|
+
var onTouchStart = function onTouchStart(event) {
|
|
45
133
|
return (0, _async_to_generator._)(function() {
|
|
46
|
-
var leftRect, rightRect;
|
|
134
|
+
var leftRect, rightRect, _props_onTouchStart;
|
|
47
135
|
return (0, _ts_generator._)(this, function(_state) {
|
|
48
136
|
switch(_state.label){
|
|
49
137
|
case 0:
|
|
@@ -81,6 +169,12 @@ var Swipe = /*#__PURE__*/ (0, _react.forwardRef)(function(props, instanceRef) {
|
|
|
81
169
|
});
|
|
82
170
|
_state.label = 4;
|
|
83
171
|
case 4:
|
|
172
|
+
if (!props.disabled) {
|
|
173
|
+
;
|
|
174
|
+
startOffset.current = state.offset;
|
|
175
|
+
touch.start(event);
|
|
176
|
+
(_props_onTouchStart = props.onTouchStart) === null || _props_onTouchStart === void 0 ? void 0 : _props_onTouchStart.call(props, event);
|
|
177
|
+
}
|
|
84
178
|
return [
|
|
85
179
|
2
|
|
86
180
|
];
|
|
@@ -88,89 +182,31 @@ var Swipe = /*#__PURE__*/ (0, _react.forwardRef)(function(props, instanceRef) {
|
|
|
88
182
|
});
|
|
89
183
|
})();
|
|
90
184
|
};
|
|
91
|
-
// 获取元素的时候要在页面 onReady 后,需要参考小程序的事件周期
|
|
92
|
-
(0, _taro.useReady)(function() {
|
|
93
|
-
(0, _taro.nextTick)(function() {
|
|
94
|
-
return getWidth();
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
var _$_object_spread = (0, _object_spread._)({}, defaultProps, props), children = _$_object_spread.children, className = _$_object_spread.className, style = _$_object_spread.style;
|
|
98
|
-
var root = (0, _react.useRef)();
|
|
99
|
-
var opened = (0, _react.useRef)(false);
|
|
100
|
-
var lockClick = (0, _react.useRef)(false);
|
|
101
|
-
var startOffset = (0, _react.useRef)(0);
|
|
102
|
-
var _useState = (0, _sliced_to_array._)((0, _react.useState)({
|
|
103
|
-
offset: 0,
|
|
104
|
-
dragging: false
|
|
105
|
-
}), 2), state = _useState[0], setState = _useState[1];
|
|
106
|
-
var _useRefState = (0, _sliced_to_array._)((0, _userefstate.useRefState)({
|
|
107
|
-
left: 0,
|
|
108
|
-
right: 0
|
|
109
|
-
}), 2), actionWidth = _useRefState[0], updateState = _useRefState[1];
|
|
110
|
-
var setActionWidth = function setActionWidth(fn) {
|
|
111
|
-
var res = fn();
|
|
112
|
-
if (res.left !== undefined) {
|
|
113
|
-
updateState((0, _object_spread_props._)((0, _object_spread._)({}, actionWidth.current), {
|
|
114
|
-
left: res.left
|
|
115
|
-
}));
|
|
116
|
-
}
|
|
117
|
-
if (res.right !== undefined) {
|
|
118
|
-
updateState((0, _object_spread_props._)((0, _object_spread._)({}, actionWidth.current), {
|
|
119
|
-
right: res.right
|
|
120
|
-
}));
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
var wrapperStyle = (0, _react.useMemo)(function() {
|
|
124
|
-
return {
|
|
125
|
-
transform: "translate(".concat(state.offset, "px, 0)"),
|
|
126
|
-
transitionDuration: state.dragging ? '0.01s' : '.6s'
|
|
127
|
-
};
|
|
128
|
-
}, [
|
|
129
|
-
state.offset,
|
|
130
|
-
state.dragging
|
|
131
|
-
]);
|
|
132
|
-
var onTouchStart = function onTouchStart(event) {
|
|
133
|
-
return (0, _async_to_generator._)(function() {
|
|
134
|
-
var _props_onTouchStart;
|
|
135
|
-
return (0, _ts_generator._)(this, function(_state) {
|
|
136
|
-
if (!props.disabled) {
|
|
137
|
-
;
|
|
138
|
-
getWidth();
|
|
139
|
-
startOffset.current = state.offset;
|
|
140
|
-
touch.start(event);
|
|
141
|
-
(_props_onTouchStart = props.onTouchStart) === null || _props_onTouchStart === void 0 ? void 0 : _props_onTouchStart.call(props, event);
|
|
142
|
-
}
|
|
143
|
-
return [
|
|
144
|
-
2
|
|
145
|
-
];
|
|
146
|
-
});
|
|
147
|
-
})();
|
|
148
|
-
};
|
|
149
185
|
var onTouchMove = function onTouchMove(event) {
|
|
150
186
|
var _props_onTouchMove;
|
|
151
|
-
if (props.disabled)
|
|
187
|
+
if (props.disabled) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
152
190
|
touch.move(event);
|
|
153
191
|
(_props_onTouchMove = props.onTouchMove) === null || _props_onTouchMove === void 0 ? void 0 : _props_onTouchMove.call(props, event);
|
|
154
192
|
if (touch.isHorizontal()) {
|
|
155
193
|
lockClick.current = true;
|
|
194
|
+
var newState = (0, _object_spread_props._)((0, _object_spread._)({}, state), {
|
|
195
|
+
dragging: true
|
|
196
|
+
});
|
|
156
197
|
var isEdge = !opened || touch.deltaX.current * startOffset.current < 0;
|
|
157
198
|
if (isEdge) {
|
|
158
199
|
preventDefault(event, true);
|
|
159
200
|
}
|
|
160
|
-
|
|
161
|
-
setState(
|
|
162
|
-
return (0, _object_spread_props._)((0, _object_spread._)({}, prevState), {
|
|
163
|
-
dragging: true,
|
|
164
|
-
offset: Number(offset) || 0
|
|
165
|
-
});
|
|
166
|
-
});
|
|
201
|
+
newState.offset = rangeCalculation(touch.deltaX.current + startOffset.current, -actionWidth.current.right || 0, actionWidth.current.left || 0);
|
|
202
|
+
setState(newState);
|
|
167
203
|
}
|
|
168
204
|
};
|
|
169
205
|
var onTouchEnd = function onTouchEnd(event) {
|
|
170
206
|
if (state.dragging) {
|
|
171
207
|
var _props_onTouchEnd;
|
|
172
|
-
setState(function(
|
|
173
|
-
return (0, _object_spread_props._)((0, _object_spread._)({},
|
|
208
|
+
setState(function(v) {
|
|
209
|
+
return (0, _object_spread_props._)((0, _object_spread._)({}, v), {
|
|
174
210
|
dragging: false
|
|
175
211
|
});
|
|
176
212
|
});
|
|
@@ -201,13 +237,13 @@ var Swipe = /*#__PURE__*/ (0, _react.forwardRef)(function(props, instanceRef) {
|
|
|
201
237
|
name: name,
|
|
202
238
|
position: side
|
|
203
239
|
});
|
|
204
|
-
setState(function(
|
|
205
|
-
return (0, _object_spread_props._)((0, _object_spread._)({},
|
|
240
|
+
setState(function(v) {
|
|
241
|
+
return (0, _object_spread_props._)((0, _object_spread._)({}, v), {
|
|
206
242
|
offset: Number(offset) || 0
|
|
207
243
|
});
|
|
208
244
|
});
|
|
209
245
|
};
|
|
210
|
-
var close =
|
|
246
|
+
var close = function close(position) {
|
|
211
247
|
if (opened.current) {
|
|
212
248
|
var _props_onClose;
|
|
213
249
|
opened.current = false;
|
|
@@ -216,14 +252,12 @@ var Swipe = /*#__PURE__*/ (0, _react.forwardRef)(function(props, instanceRef) {
|
|
|
216
252
|
position: position || 'left'
|
|
217
253
|
});
|
|
218
254
|
}
|
|
219
|
-
setState(function(
|
|
220
|
-
return (0, _object_spread_props._)((0, _object_spread._)({},
|
|
255
|
+
setState(function(v) {
|
|
256
|
+
return (0, _object_spread_props._)((0, _object_spread._)({}, v), {
|
|
221
257
|
offset: 0
|
|
222
258
|
});
|
|
223
259
|
});
|
|
224
|
-
}
|
|
225
|
-
props
|
|
226
|
-
]);
|
|
260
|
+
};
|
|
227
261
|
var rangeCalculation = function rangeCalculation(num, min, max) {
|
|
228
262
|
return Math.min(Math.max(Number(num), Number(min)), Number(max));
|
|
229
263
|
};
|
|
@@ -260,7 +294,7 @@ var Swipe = /*#__PURE__*/ (0, _react.forwardRef)(function(props, instanceRef) {
|
|
|
260
294
|
};
|
|
261
295
|
});
|
|
262
296
|
(0, _react.useEffect)(function() {
|
|
263
|
-
|
|
297
|
+
if ((0, _platform.harmony)()) return;
|
|
264
298
|
var handler = function handler(event) {
|
|
265
299
|
var targets = [
|
|
266
300
|
root
|
|
@@ -277,9 +311,7 @@ var Swipe = /*#__PURE__*/ (0, _react.forwardRef)(function(props, instanceRef) {
|
|
|
277
311
|
return function() {
|
|
278
312
|
document.removeEventListener('touchstart', handler);
|
|
279
313
|
};
|
|
280
|
-
}, [
|
|
281
|
-
close
|
|
282
|
-
]);
|
|
314
|
+
}, []);
|
|
283
315
|
return /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
284
316
|
ref: root,
|
|
285
317
|
className: (0, _classnames.default)(classPrefix, className),
|
|
@@ -63,7 +63,6 @@ var Tabs = function Tabs(props) {
|
|
|
63
63
|
onChange: onChange
|
|
64
64
|
}), 2), value = _usePropsValue[0], setValue = _usePropsValue[1];
|
|
65
65
|
var titleItemsRef = (0, _react.useRef)([]);
|
|
66
|
-
var tabsRef = (0, _react.useRef)(null);
|
|
67
66
|
var getTitles = function getTitles() {
|
|
68
67
|
var titles = [];
|
|
69
68
|
_react.default.Children.forEach(children, function(child, idx) {
|
|
@@ -103,8 +102,7 @@ var Tabs = function Tabs(props) {
|
|
|
103
102
|
var classesTitle = (0, _classnames.default)("".concat(classPrefix, "-titles"), (_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix, "-titles-").concat(activeType), activeType), (0, _define_property._)(_obj, "".concat(classPrefix, "-titles-").concat(align), align), _obj));
|
|
104
103
|
var getRect = function getRect(selector) {
|
|
105
104
|
return new Promise(function(resolve) {
|
|
106
|
-
|
|
107
|
-
(0, _taro.createSelectorQuery)().in(((_tabsRef_current = tabsRef.current) === null || _tabsRef_current === void 0 ? void 0 : _tabsRef_current._scope) || tabsRef.current).select(selector).boundingClientRect().exec(function() {
|
|
105
|
+
(0, _taro.createSelectorQuery)().select(selector).boundingClientRect().exec(function() {
|
|
108
106
|
var rect = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
109
107
|
resolve(rect[0]);
|
|
110
108
|
});
|
|
@@ -112,8 +110,7 @@ var Tabs = function Tabs(props) {
|
|
|
112
110
|
};
|
|
113
111
|
var getAllRect = function getAllRect(selector) {
|
|
114
112
|
return new Promise(function(resolve) {
|
|
115
|
-
|
|
116
|
-
(0, _taro.createSelectorQuery)().in(((_tabsRef_current = tabsRef.current) === null || _tabsRef_current === void 0 ? void 0 : _tabsRef_current._scope) || tabsRef.current).selectAll(selector).boundingClientRect().exec(function() {
|
|
113
|
+
(0, _taro.createSelectorQuery)().selectAll(selector).boundingClientRect().exec(function() {
|
|
117
114
|
var rect = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
118
115
|
resolve(rect[0]);
|
|
119
116
|
});
|
|
@@ -193,11 +190,9 @@ var Tabs = function Tabs(props) {
|
|
|
193
190
|
setValue(item.value);
|
|
194
191
|
}
|
|
195
192
|
};
|
|
196
|
-
return /*#__PURE__*/ _react.default.createElement(_components.View, (0,
|
|
193
|
+
return /*#__PURE__*/ _react.default.createElement(_components.View, (0, _object_spread._)({
|
|
197
194
|
className: classes
|
|
198
|
-
}, rest), {
|
|
199
|
-
ref: tabsRef
|
|
200
|
-
}), /*#__PURE__*/ _react.default.createElement(_components.ScrollView, {
|
|
195
|
+
}, rest), /*#__PURE__*/ _react.default.createElement(_components.ScrollView, {
|
|
201
196
|
enableFlex: true,
|
|
202
197
|
scrollX: direction === 'horizontal',
|
|
203
198
|
scrollY: direction === 'vertical',
|
|
@@ -229,9 +224,7 @@ var Tabs = function Tabs(props) {
|
|
|
229
224
|
background: activeColor
|
|
230
225
|
}
|
|
231
226
|
}), activeType === 'smile' && /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
232
|
-
className: "".concat(classPrefix, "-titles-item-smile")
|
|
233
|
-
// @ts-ignore
|
|
234
|
-
ariaHidden: true
|
|
227
|
+
className: "".concat(classPrefix, "-titles-item-smile")
|
|
235
228
|
}, /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.JoySmile, {
|
|
236
229
|
color: activeColor
|
|
237
230
|
})), /*#__PURE__*/ _react.default.createElement(_components.View, {
|