@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
|
@@ -16,8 +16,8 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
|
16
16
|
format: {},
|
|
17
17
|
height: '200px'
|
|
18
18
|
});
|
|
19
|
-
export var CascaderRender = function(props) {
|
|
20
|
-
var
|
|
19
|
+
export var CascaderRender = function CascaderRender(props) {
|
|
20
|
+
var _$_object_spread = _object_spread({}, defaultProps, props), children = _$_object_spread.children, visible = _$_object_spread.visible, type = _$_object_spread.type, height = _$_object_spread.height, options = _$_object_spread.options, title = _$_object_spread.title, left = _$_object_spread.left, value = _$_object_spread.value, defaultValue = _$_object_spread.defaultValue, optionKey = _$_object_spread.optionKey, format = _$_object_spread.format, onClose = _$_object_spread.onClose, onChange = _$_object_spread.onChange, onPathChange = _$_object_spread.onPathChange, rest = _object_without_properties(_$_object_spread, [
|
|
21
21
|
"children",
|
|
22
22
|
"visible",
|
|
23
23
|
"type",
|
|
@@ -42,10 +42,10 @@ export var CascaderRender = function(props) {
|
|
|
42
42
|
options: options,
|
|
43
43
|
format: format,
|
|
44
44
|
optionKey: optionKey,
|
|
45
|
-
onClose: function() {
|
|
45
|
+
onClose: function onClose1() {
|
|
46
46
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
47
47
|
},
|
|
48
|
-
onChange: function(val, params) {
|
|
48
|
+
onChange: function onChange1(val, params) {
|
|
49
49
|
onChange === null || onChange === void 0 ? void 0 : onChange(val, params);
|
|
50
50
|
},
|
|
51
51
|
onPathChange: onPathChange
|
|
@@ -31,11 +31,11 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
|
31
31
|
closeIcon: 'close',
|
|
32
32
|
lazy: false,
|
|
33
33
|
hotList: [],
|
|
34
|
-
onClose: function() {},
|
|
35
|
-
onChange: function() {},
|
|
36
|
-
onPathChange: function() {}
|
|
34
|
+
onClose: function onClose() {},
|
|
35
|
+
onChange: function onChange() {},
|
|
36
|
+
onPathChange: function onPathChange() {}
|
|
37
37
|
});
|
|
38
|
-
export var ElevatorRender = function(props) {
|
|
38
|
+
export var ElevatorRender = function ElevatorRender(props) {
|
|
39
39
|
var _mergeProps = mergeProps(defaultProps, props), hotList = _mergeProps.hotList, title = _mergeProps.title, left = _mergeProps.left, optionKey = _mergeProps.optionKey, format = _mergeProps.format, onClose = _mergeProps.onClose, onChange = _mergeProps.onChange, onPathChange = _mergeProps.onPathChange, popup = _mergeProps.popup, _mergeProps_popupProps = _mergeProps.popupProps, popupProps = _mergeProps_popupProps === void 0 ? {} : _mergeProps_popupProps, outerVisible = _mergeProps.visible, outerOptions = _mergeProps.options, outerValue = _mergeProps.value, outerDefaultValue = _mergeProps.defaultValue, closeable = _mergeProps.closeable, closeIconPosition = _mergeProps.closeIconPosition, closeIcon = _mergeProps.closeIcon;
|
|
40
40
|
var _useConfig = useConfig(), _useConfig_locale = _useConfig.locale, select = _useConfig_locale.select, _useConfig_locale_address = _useConfig_locale.address, hotCity = _useConfig_locale_address.hotCity, selectProvince = _useConfig_locale_address.selectProvince;
|
|
41
41
|
var classPrefix = 'nut-address';
|
|
@@ -44,7 +44,7 @@ export var ElevatorRender = function(props) {
|
|
|
44
44
|
value: outerValue,
|
|
45
45
|
defaultValue: outerDefaultValue,
|
|
46
46
|
finalValue: [],
|
|
47
|
-
onChange: function(value) {
|
|
47
|
+
onChange: function onChange1(value) {
|
|
48
48
|
onChange(value, []);
|
|
49
49
|
onPathChange(value, []);
|
|
50
50
|
}
|
|
@@ -115,7 +115,7 @@ export var ElevatorRender = function(props) {
|
|
|
115
115
|
var _usePropsValue1 = _sliced_to_array(usePropsValue({
|
|
116
116
|
value: outerVisible,
|
|
117
117
|
defaultValue: undefined,
|
|
118
|
-
onChange: function(value) {
|
|
118
|
+
onChange: function onChange(value) {
|
|
119
119
|
if (value === false) onClose();
|
|
120
120
|
}
|
|
121
121
|
}), 2), visible = _usePropsValue1[0], setVisible = _usePropsValue1[1];
|
|
@@ -136,7 +136,7 @@ export var ElevatorRender = function(props) {
|
|
|
136
136
|
}, [
|
|
137
137
|
innerValue
|
|
138
138
|
]);
|
|
139
|
-
var handleElevatorItemClick = function(elevatorItem, levelIndex) {
|
|
139
|
+
var handleElevatorItemClick = function handleElevatorItemClick(elevatorItem, levelIndex) {
|
|
140
140
|
var _elevatorItem_children;
|
|
141
141
|
var nextValue = innerValue.slice(0, levelIndex);
|
|
142
142
|
if (elevatorItem.name) {
|
|
@@ -151,7 +151,7 @@ export var ElevatorRender = function(props) {
|
|
|
151
151
|
setValue(nextValue);
|
|
152
152
|
}
|
|
153
153
|
};
|
|
154
|
-
var handleHotItemClick = function(hotItem) {
|
|
154
|
+
var handleHotItemClick = function handleHotItemClick(hotItem) {
|
|
155
155
|
// 通过修改 innerValue 构造 level 数据
|
|
156
156
|
var distData = findDataByName(options, hotItem.name);
|
|
157
157
|
// 热门城市主要是一级城市和二级城市,可以扩展。TODO
|
|
@@ -167,7 +167,7 @@ export var ElevatorRender = function(props) {
|
|
|
167
167
|
setLevelIndex(nextValue.length);
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
|
-
var renderTabs = function() {
|
|
170
|
+
var renderTabs = function renderTabs() {
|
|
171
171
|
if (!levels.length || !levels[0].name) return null;
|
|
172
172
|
return /*#__PURE__*/ React.createElement(View, {
|
|
173
173
|
className: "".concat(classPrefix, "-selected")
|
|
@@ -177,7 +177,7 @@ export var ElevatorRender = function(props) {
|
|
|
177
177
|
key: "adtabs-".concat(index)
|
|
178
178
|
}, item.name && /*#__PURE__*/ React.createElement(View, {
|
|
179
179
|
className: "".concat(classPrefix, "-selected-item ").concat(item.current ? 'active' : ''),
|
|
180
|
-
onClick: function() {
|
|
180
|
+
onClick: function onClick() {
|
|
181
181
|
var _props_onTabsChange;
|
|
182
182
|
(_props_onTabsChange = props.onTabsChange) === null || _props_onTabsChange === void 0 ? void 0 : _props_onTabsChange.call(props, index);
|
|
183
183
|
setTabActiveIndex(index);
|
|
@@ -189,7 +189,7 @@ export var ElevatorRender = function(props) {
|
|
|
189
189
|
}, "-"));
|
|
190
190
|
}));
|
|
191
191
|
};
|
|
192
|
-
var renderHotCity = function() {
|
|
192
|
+
var renderHotCity = function renderHotCity() {
|
|
193
193
|
if (levels.length && tabActiveIndex !== 0) return null;
|
|
194
194
|
return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(View, {
|
|
195
195
|
className: "".concat(classPrefix, "-title")
|
|
@@ -199,19 +199,19 @@ export var ElevatorRender = function(props) {
|
|
|
199
199
|
return /*#__PURE__*/ React.createElement(View, {
|
|
200
200
|
className: "".concat(classPrefix, "-hotlist-item"),
|
|
201
201
|
key: "hot-".concat(index),
|
|
202
|
-
onClick: function() {
|
|
202
|
+
onClick: function onClick() {
|
|
203
203
|
return handleHotItemClick(item);
|
|
204
204
|
}
|
|
205
205
|
}, item.name);
|
|
206
206
|
})));
|
|
207
207
|
};
|
|
208
|
-
var renderArea = function() {
|
|
208
|
+
var renderArea = function renderArea() {
|
|
209
209
|
return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(View, {
|
|
210
210
|
className: "".concat(classPrefix, "-title")
|
|
211
211
|
}, addressTip), /*#__PURE__*/ React.createElement(Elevator, {
|
|
212
212
|
className: "".concat(classPrefix, "-elevator"),
|
|
213
213
|
list: elevatorOptions,
|
|
214
|
-
onItemClick: function(key, item) {
|
|
214
|
+
onItemClick: function onItemClick(key, item) {
|
|
215
215
|
return handleElevatorItemClick(item, levelIndex);
|
|
216
216
|
},
|
|
217
217
|
// height="67%"
|
|
@@ -221,7 +221,7 @@ export var ElevatorRender = function(props) {
|
|
|
221
221
|
height: "93%"
|
|
222
222
|
}));
|
|
223
223
|
};
|
|
224
|
-
var renderContent = function() {
|
|
224
|
+
var renderContent = function renderContent() {
|
|
225
225
|
return /*#__PURE__*/ React.createElement(React.Fragment, null, renderTabs(), /*#__PURE__*/ React.createElement(View, {
|
|
226
226
|
style: {
|
|
227
227
|
height: innerValue.length ? '80%' : '93%',
|
|
@@ -241,10 +241,10 @@ export var ElevatorRender = function(props) {
|
|
|
241
241
|
closeIconPosition: closeIconPosition,
|
|
242
242
|
title: title,
|
|
243
243
|
left: left,
|
|
244
|
-
onOverlayClick: function() {
|
|
244
|
+
onOverlayClick: function onOverlayClick() {
|
|
245
245
|
return setVisible(false);
|
|
246
246
|
},
|
|
247
|
-
onCloseIconClick: function() {
|
|
247
|
+
onCloseIconClick: function onCloseIconClick() {
|
|
248
248
|
return setVisible(false);
|
|
249
249
|
}
|
|
250
250
|
}), renderContent()) : renderContent();
|
|
@@ -11,9 +11,9 @@ var defaultProps = {
|
|
|
11
11
|
selectIcon: null,
|
|
12
12
|
custom: false
|
|
13
13
|
};
|
|
14
|
-
export var ExistRender = function(props) {
|
|
14
|
+
export var ExistRender = function ExistRender(props) {
|
|
15
15
|
var locale = useConfig().locale;
|
|
16
|
-
var
|
|
16
|
+
var _$_object_spread = _object_spread({}, defaultProps, props), children = _$_object_spread.children, type = _$_object_spread.type, existList = _$_object_spread.existList, selectIcon = _$_object_spread.selectIcon, defaultIcon = _$_object_spread.defaultIcon, custom = _$_object_spread.custom, onSelect = _$_object_spread.onSelect, onSwitch = _$_object_spread.onSwitch, rest = _object_without_properties(_$_object_spread, [
|
|
17
17
|
"children",
|
|
18
18
|
"type",
|
|
19
19
|
"existList",
|
|
@@ -24,7 +24,7 @@ export var ExistRender = function(props) {
|
|
|
24
24
|
"onSwitch"
|
|
25
25
|
]);
|
|
26
26
|
var classPrefix = 'nut-address';
|
|
27
|
-
var selectedExist = function(item) {
|
|
27
|
+
var selectedExist = function selectedExist(item) {
|
|
28
28
|
existList.forEach(function(list, index) {
|
|
29
29
|
;
|
|
30
30
|
list.selectedAddress = false;
|
|
@@ -32,7 +32,7 @@ export var ExistRender = function(props) {
|
|
|
32
32
|
item.selectedAddress = true;
|
|
33
33
|
onSelect && onSelect(item);
|
|
34
34
|
};
|
|
35
|
-
var onClick = function(e) {
|
|
35
|
+
var onClick = function onClick(e) {
|
|
36
36
|
e.stopPropagation();
|
|
37
37
|
onSwitch && onSwitch({
|
|
38
38
|
type: type === 'exist' ? 'cascader' : 'exist'
|
|
@@ -49,7 +49,7 @@ export var ExistRender = function(props) {
|
|
|
49
49
|
return /*#__PURE__*/ React.createElement("li", {
|
|
50
50
|
className: "".concat(classPrefix, "-exist-item ").concat(item.selectedAddress ? 'active' : ''),
|
|
51
51
|
key: index,
|
|
52
|
-
onClick: function(e) {
|
|
52
|
+
onClick: function onClick(e) {
|
|
53
53
|
e.stopPropagation();
|
|
54
54
|
selectedExist(item);
|
|
55
55
|
}
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
align-items: center;
|
|
222
222
|
justify-content: center;
|
|
223
223
|
border-bottom: var(--nutui-popup-title-border-bottom, 0);
|
|
224
|
-
padding: var(--nutui-popup-title-padding,
|
|
224
|
+
padding: var(--nutui-popup-title-padding, 11px);
|
|
225
225
|
position: relative;
|
|
226
226
|
}
|
|
227
227
|
.nut-popup-title-wrapper {
|
|
@@ -234,7 +234,6 @@
|
|
|
234
234
|
color: var(--nutui-color-title, #1a1a1a);
|
|
235
235
|
font-weight: var(--nutui-font-weight-bold, 600);
|
|
236
236
|
font-size: var(--nutui-popup-title-font-size, var(--nutui-font-size-xl, 18px));
|
|
237
|
-
line-height: var(--nutui-popup-title-font-size, var(--nutui-font-size-xl, 18px));
|
|
238
237
|
}
|
|
239
238
|
.nut-popup-title-description {
|
|
240
239
|
color: var(--nutui-color-text, #505259);
|
|
@@ -246,13 +245,13 @@
|
|
|
246
245
|
}
|
|
247
246
|
.nut-popup-title-left {
|
|
248
247
|
position: absolute;
|
|
249
|
-
top: var(--nutui-popup-title-padding,
|
|
250
|
-
left: var(--nutui-popup-title-padding,
|
|
248
|
+
top: var(--nutui-popup-title-padding, 11px);
|
|
249
|
+
left: var(--nutui-popup-title-padding, 11px);
|
|
251
250
|
}
|
|
252
251
|
.nut-popup-title-right {
|
|
253
252
|
position: absolute;
|
|
254
|
-
top: var(--nutui-popup-title-padding,
|
|
255
|
-
right: var(--nutui-popup-title-padding,
|
|
253
|
+
top: var(--nutui-popup-title-padding, 11px);
|
|
254
|
+
right: var(--nutui-popup-title-padding, 11px);
|
|
256
255
|
z-index: 1;
|
|
257
256
|
width: var(--nutui-popup-icon-size, 20px);
|
|
258
257
|
height: var(--nutui-popup-icon-size, 20px);
|
|
@@ -263,20 +262,22 @@
|
|
|
263
262
|
opacity: 0.7;
|
|
264
263
|
}
|
|
265
264
|
.nut-popup-title-right-top-left {
|
|
266
|
-
top: var(--nutui-popup-title-padding,
|
|
267
|
-
left: var(--nutui-popup-title-padding,
|
|
265
|
+
top: var(--nutui-popup-title-padding, 11px);
|
|
266
|
+
left: var(--nutui-popup-title-padding, 11px);
|
|
268
267
|
}
|
|
269
268
|
.nut-popup-title-right-bottom-left {
|
|
270
|
-
bottom: var(--nutui-popup-title-padding,
|
|
271
|
-
left: var(--nutui-popup-title-padding,
|
|
269
|
+
bottom: var(--nutui-popup-title-padding, 11px);
|
|
270
|
+
left: var(--nutui-popup-title-padding, 11px);
|
|
272
271
|
}
|
|
273
272
|
.nut-popup-title-right-bottom-right {
|
|
274
|
-
right: var(--nutui-popup-title-padding,
|
|
275
|
-
bottom: var(--nutui-popup-title-padding,
|
|
273
|
+
right: var(--nutui-popup-title-padding, 11px);
|
|
274
|
+
bottom: var(--nutui-popup-title-padding, 11px);
|
|
276
275
|
}
|
|
277
276
|
.nut-popup-center {
|
|
278
277
|
top: 50%;
|
|
279
278
|
left: 50%;
|
|
279
|
+
right: auto;
|
|
280
|
+
bottom: auto;
|
|
280
281
|
min-height: 10%;
|
|
281
282
|
max-width: 295px;
|
|
282
283
|
transform: translate(-50%, -50%);
|
|
@@ -287,6 +288,8 @@
|
|
|
287
288
|
.nut-popup-bottom {
|
|
288
289
|
bottom: 0;
|
|
289
290
|
left: 0;
|
|
291
|
+
right: auto;
|
|
292
|
+
top: auto;
|
|
290
293
|
width: 100%;
|
|
291
294
|
}
|
|
292
295
|
.nut-popup-bottom.nut-popup-round {
|
|
@@ -298,6 +301,8 @@
|
|
|
298
301
|
.nut-popup-right {
|
|
299
302
|
top: 0;
|
|
300
303
|
right: 0;
|
|
304
|
+
left: auto;
|
|
305
|
+
bottom: auto;
|
|
301
306
|
width: 100px;
|
|
302
307
|
height: 100%;
|
|
303
308
|
}
|
|
@@ -307,6 +312,8 @@
|
|
|
307
312
|
.nut-popup-left {
|
|
308
313
|
top: 0;
|
|
309
314
|
left: 0;
|
|
315
|
+
right: auto;
|
|
316
|
+
bottom: auto;
|
|
310
317
|
width: 100px;
|
|
311
318
|
height: 100%;
|
|
312
319
|
}
|
|
@@ -316,6 +323,8 @@
|
|
|
316
323
|
.nut-popup-top {
|
|
317
324
|
top: 0;
|
|
318
325
|
left: 0;
|
|
326
|
+
right: auto;
|
|
327
|
+
bottom: auto;
|
|
319
328
|
width: 100%;
|
|
320
329
|
}
|
|
321
330
|
.nut-popup-top.nut-popup-round {
|
|
@@ -392,6 +401,9 @@
|
|
|
392
401
|
}
|
|
393
402
|
}
|
|
394
403
|
@keyframes popup-slide-top-exit {
|
|
404
|
+
from {
|
|
405
|
+
transform: translate3d(0, 0%, 0);
|
|
406
|
+
}
|
|
395
407
|
to {
|
|
396
408
|
transform: translate3d(0, -100%, 0);
|
|
397
409
|
}
|
|
@@ -416,6 +428,9 @@
|
|
|
416
428
|
}
|
|
417
429
|
}
|
|
418
430
|
@keyframes popup-slide-right-exit {
|
|
431
|
+
from {
|
|
432
|
+
transform: translate3d(0%, 0, 0);
|
|
433
|
+
}
|
|
419
434
|
to {
|
|
420
435
|
transform: translate3d(100%, 0, 0);
|
|
421
436
|
}
|
|
@@ -440,6 +455,9 @@
|
|
|
440
455
|
}
|
|
441
456
|
}
|
|
442
457
|
@keyframes slide-bottom-exit {
|
|
458
|
+
from {
|
|
459
|
+
transform: translate3d(0, 0%, 0);
|
|
460
|
+
}
|
|
443
461
|
to {
|
|
444
462
|
transform: translate3d(0, 100%, 0);
|
|
445
463
|
}
|
|
@@ -464,6 +482,9 @@
|
|
|
464
482
|
}
|
|
465
483
|
}
|
|
466
484
|
@keyframes popup-slide-left-exit {
|
|
485
|
+
from {
|
|
486
|
+
transform: translate3d(0%, 0, 0);
|
|
487
|
+
}
|
|
467
488
|
to {
|
|
468
489
|
transform: translate3d(-100%, 0, 0);
|
|
469
490
|
}
|
|
@@ -489,27 +510,27 @@
|
|
|
489
510
|
[dir=rtl] .nut-popup-title-left,
|
|
490
511
|
.nut-rtl .nut-popup-title-left {
|
|
491
512
|
left: auto;
|
|
492
|
-
right: var(--nutui-popup-title-padding,
|
|
513
|
+
right: var(--nutui-popup-title-padding, 11px);
|
|
493
514
|
}
|
|
494
515
|
[dir=rtl] .nut-popup-title-right,
|
|
495
516
|
.nut-rtl .nut-popup-title-right {
|
|
496
517
|
right: auto;
|
|
497
|
-
left: var(--nutui-popup-title-padding,
|
|
518
|
+
left: var(--nutui-popup-title-padding, 11px);
|
|
498
519
|
}
|
|
499
520
|
[dir=rtl] .nut-popup-title-right-top-left,
|
|
500
521
|
.nut-rtl .nut-popup-title-right-top-left {
|
|
501
522
|
left: auto;
|
|
502
|
-
right: var(--nutui-popup-title-padding,
|
|
523
|
+
right: var(--nutui-popup-title-padding, 11px);
|
|
503
524
|
}
|
|
504
525
|
[dir=rtl] .nut-popup-title-right-bottom-left,
|
|
505
526
|
.nut-rtl .nut-popup-title-right-bottom-left {
|
|
506
527
|
left: auto;
|
|
507
|
-
right: var(--nutui-popup-title-padding,
|
|
528
|
+
right: var(--nutui-popup-title-padding, 11px);
|
|
508
529
|
}
|
|
509
530
|
[dir=rtl] .nut-popup-title-right-bottom-right,
|
|
510
531
|
.nut-rtl .nut-popup-title-right-bottom-right {
|
|
511
532
|
right: auto;
|
|
512
|
-
left: var(--nutui-popup-title-padding,
|
|
533
|
+
left: var(--nutui-popup-title-padding, 11px);
|
|
513
534
|
}
|
|
514
535
|
[dir=rtl] .nut-popup-title .nut-icon-ArrowLeft,
|
|
515
536
|
.nut-rtl .nut-popup-title .nut-icon-ArrowLeft {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var generateId = function(name) {
|
|
1
|
+
var generateId = function generateId(name) {
|
|
2
2
|
return name.split('').reduce(function(sum, char) {
|
|
3
3
|
return sum + char.charCodeAt(0);
|
|
4
4
|
}, 0) // 使用字符的 Unicode 值作为 ID
|
|
5
5
|
;
|
|
6
6
|
};
|
|
7
|
-
export var transformData = function(data) {
|
|
8
|
-
var groupByWordCode = function(data, parentId, parentName) {
|
|
7
|
+
export var transformData = function transformData(data) {
|
|
8
|
+
var groupByWordCode = function groupByWordCode1(data, parentId, parentName) {
|
|
9
9
|
return data === null || data === void 0 ? void 0 : data.reduce(function(acc, item) {
|
|
10
10
|
var wordCode = item.wordCode;
|
|
11
11
|
if (!acc[wordCode]) {
|
|
@@ -23,7 +23,7 @@ export var transformData = function(data) {
|
|
|
23
23
|
return acc;
|
|
24
24
|
}, {});
|
|
25
25
|
};
|
|
26
|
-
var extractTitles = function(obj) {
|
|
26
|
+
var extractTitles = function extractTitles1(obj) {
|
|
27
27
|
return Object.keys(obj).map(function(key) {
|
|
28
28
|
return {
|
|
29
29
|
title: key,
|
|
@@ -40,7 +40,7 @@ export var transformData = function(data) {
|
|
|
40
40
|
var resultData = extractTitles(middleData);
|
|
41
41
|
return resultData;
|
|
42
42
|
};
|
|
43
|
-
export var findDataByName = function(data, name) {
|
|
43
|
+
export var findDataByName = function findDataByName1(data, name) {
|
|
44
44
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
45
45
|
try {
|
|
46
46
|
for(var _iterator = data[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
@@ -10,17 +10,17 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
|
10
10
|
type: 'shake',
|
|
11
11
|
action: 'initial',
|
|
12
12
|
loop: false,
|
|
13
|
-
onClick: function(event) {}
|
|
13
|
+
onClick: function onClick(event) {}
|
|
14
14
|
});
|
|
15
15
|
var classPrefix = 'nut-animate';
|
|
16
|
-
export var Animate = function(props) {
|
|
16
|
+
export var Animate = function Animate(props) {
|
|
17
17
|
var _$_object_spread = _object_spread({}, defaultProps, props), className = _$_object_spread.className, type = _$_object_spread.type, action = _$_object_spread.action, loop = _$_object_spread.loop, onClick = _$_object_spread.onClick, children = _$_object_spread.children, style = _$_object_spread.style;
|
|
18
18
|
var _useState = _sliced_to_array(useState(false), 2), clicked = _useState[0], setClicked = _useState[1];
|
|
19
19
|
var _obj;
|
|
20
20
|
var classes = classNames((_obj = {
|
|
21
21
|
'nut-ani-container': true
|
|
22
22
|
}, _define_property(_obj, "".concat(classPrefix, "-").concat(type), action === 'initial' || clicked), _define_property(_obj, "loop", loop), _obj), className);
|
|
23
|
-
var handleClick = function(event) {
|
|
23
|
+
var handleClick = function handleClick(event) {
|
|
24
24
|
setClicked(true);
|
|
25
25
|
// 如果不是无限循环,清除类名
|
|
26
26
|
if (!loop) {
|
|
@@ -15,7 +15,7 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
|
15
15
|
duration: 1,
|
|
16
16
|
thousands: false
|
|
17
17
|
});
|
|
18
|
-
export var CountUp = function(props) {
|
|
18
|
+
export var CountUp = function CountUp(props) {
|
|
19
19
|
var _mergeProps = mergeProps(defaultProps, props), length = _mergeProps.length, value = _mergeProps.value, delay = _mergeProps.delay, duration = _mergeProps.duration, className = _mergeProps.className, thousands = _mergeProps.thousands, style = _mergeProps.style, rest = _object_without_properties(_mergeProps, [
|
|
20
20
|
"length",
|
|
21
21
|
"value",
|
|
@@ -48,7 +48,9 @@ export var CountUp = function(props) {
|
|
|
48
48
|
var isLoaded = useRef(false);
|
|
49
49
|
var setNumberTransform = useCallback(function() {
|
|
50
50
|
if (countupRef.current && numberArr.length) {
|
|
51
|
-
|
|
51
|
+
var _countupRef_current;
|
|
52
|
+
createSelectorQuery()// @ts-ignore
|
|
53
|
+
.in(((_countupRef_current = countupRef.current) === null || _countupRef_current === void 0 ? void 0 : _countupRef_current._scope) || countupRef.current).selectAll('.nut-countup-listitem').node(function(numberItems) {
|
|
52
54
|
var transformArrCache = [];
|
|
53
55
|
Object.keys(numberItems).forEach(function(key) {
|
|
54
56
|
var elem = numberItems[Number(key)];
|
|
@@ -17,14 +17,14 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
|
17
17
|
autoplay: false,
|
|
18
18
|
loop: false,
|
|
19
19
|
type: 'progress',
|
|
20
|
-
onFastBack: function(ctx) {},
|
|
21
|
-
onForward: function(ctx) {},
|
|
22
|
-
onPause: function(ctx) {},
|
|
23
|
-
onPlay: function(ctx) {},
|
|
24
|
-
onPlayEnd: function(ctx) {},
|
|
25
|
-
onCanPlay: function(ctx) {}
|
|
20
|
+
onFastBack: function onFastBack(ctx) {},
|
|
21
|
+
onForward: function onForward(ctx) {},
|
|
22
|
+
onPause: function onPause(ctx) {},
|
|
23
|
+
onPlay: function onPlay(ctx) {},
|
|
24
|
+
onPlayEnd: function onPlayEnd(ctx) {},
|
|
25
|
+
onCanPlay: function onCanPlay(ctx) {}
|
|
26
26
|
});
|
|
27
|
-
export var Audio = function(props) {
|
|
27
|
+
export var Audio = function Audio(props) {
|
|
28
28
|
var formatSeconds = function formatSeconds(value) {
|
|
29
29
|
if (!value) {
|
|
30
30
|
return '00:00:00';
|
|
@@ -41,7 +41,7 @@ export var Audio = function(props) {
|
|
|
41
41
|
};
|
|
42
42
|
var classPrefix = 'nut-audio';
|
|
43
43
|
var locale = useConfig().locale;
|
|
44
|
-
var
|
|
44
|
+
var _$_object_spread = _object_spread({}, defaultProps, props), className = _$_object_spread.className, src = _$_object_spread.src, style = _$_object_spread.style, autoplay = _$_object_spread.autoplay, loop = _$_object_spread.loop, type = _$_object_spread.type, onFastBack = _$_object_spread.onFastBack, onForward = _$_object_spread.onForward, onPause = _$_object_spread.onPause, onPlay = _$_object_spread.onPlay, onPlayEnd = _$_object_spread.onPlayEnd, onCanPlay = _$_object_spread.onCanPlay, children = _$_object_spread.children, iconClassPrefix = _$_object_spread.iconClassPrefix, iconFontClassName = _$_object_spread.iconFontClassName, rest = _object_without_properties(_$_object_spread, [
|
|
45
45
|
"className",
|
|
46
46
|
"src",
|
|
47
47
|
"style",
|
|
@@ -108,21 +108,21 @@ export var Audio = function(props) {
|
|
|
108
108
|
audioCtx.onError(function(res) {
|
|
109
109
|
console.warn('onError', res.errCode, res.errMsg);
|
|
110
110
|
});
|
|
111
|
-
var handleBack = function() {
|
|
111
|
+
var handleBack = function handleBack() {
|
|
112
112
|
var currentTime = Math.floor(audioCtx.currentTime);
|
|
113
113
|
statusRef.current.currentTime = Math.max(currentTime - 1, 0);
|
|
114
114
|
setCurrentDuration(formatSeconds(statusRef.current.currentTime.toString()));
|
|
115
115
|
audioCtx.seek(statusRef.current.currentTime);
|
|
116
116
|
onFastBack === null || onFastBack === void 0 ? void 0 : onFastBack(audioCtx);
|
|
117
117
|
};
|
|
118
|
-
var handleForward = function() {
|
|
118
|
+
var handleForward = function handleForward() {
|
|
119
119
|
var currentTime = Math.floor(audioCtx.currentTime);
|
|
120
120
|
statusRef.current.currentTime = Math.min(currentTime + 1, audioCtx.duration);
|
|
121
121
|
setCurrentDuration(formatSeconds(statusRef.current.currentTime.toString()));
|
|
122
122
|
audioCtx.seek(statusRef.current.currentTime);
|
|
123
123
|
onForward === null || onForward === void 0 ? void 0 : onForward(audioCtx);
|
|
124
124
|
};
|
|
125
|
-
var handleStatusChange = function() {
|
|
125
|
+
var handleStatusChange = function handleStatusChange() {
|
|
126
126
|
setPlaying(!playing);
|
|
127
127
|
if (!playing) {
|
|
128
128
|
audioCtx.play();
|
|
@@ -130,7 +130,7 @@ export var Audio = function(props) {
|
|
|
130
130
|
audioCtx.pause();
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
|
-
var renderIcon = function() {
|
|
133
|
+
var renderIcon = function renderIcon() {
|
|
134
134
|
return /*#__PURE__*/ React.createElement(View, {
|
|
135
135
|
className: "".concat(classPrefix, "-icon")
|
|
136
136
|
}, /*#__PURE__*/ React.createElement(View, {
|
|
@@ -140,7 +140,7 @@ export var Audio = function(props) {
|
|
|
140
140
|
className: playing ? 'nut-icon-loading' : ''
|
|
141
141
|
})));
|
|
142
142
|
};
|
|
143
|
-
var renderProgerss = function() {
|
|
143
|
+
var renderProgerss = function renderProgerss() {
|
|
144
144
|
return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(View, {
|
|
145
145
|
className: "".concat(classPrefix, "-progress")
|
|
146
146
|
}, /*#__PURE__*/ React.createElement(View, {
|
|
@@ -149,7 +149,7 @@ export var Audio = function(props) {
|
|
|
149
149
|
className: "".concat(classPrefix, "-progress-bar-wrapper")
|
|
150
150
|
}, /*#__PURE__*/ React.createElement(Range, {
|
|
151
151
|
value: percent,
|
|
152
|
-
onChange: function(val) {
|
|
152
|
+
onChange: function onChange(val) {
|
|
153
153
|
return setPercent(val);
|
|
154
154
|
},
|
|
155
155
|
currentDescription: null,
|
|
@@ -177,13 +177,13 @@ export var Audio = function(props) {
|
|
|
177
177
|
onClick: handleForward
|
|
178
178
|
}, locale.audio.forward || '快进')));
|
|
179
179
|
};
|
|
180
|
-
var renderNone = function() {
|
|
180
|
+
var renderNone = function renderNone() {
|
|
181
181
|
return /*#__PURE__*/ React.createElement(View, {
|
|
182
182
|
className: "".concat(classPrefix, "-none-container"),
|
|
183
183
|
onClick: handleStatusChange
|
|
184
184
|
}, children);
|
|
185
185
|
};
|
|
186
|
-
var renderAudio = function() {
|
|
186
|
+
var renderAudio = function renderAudio() {
|
|
187
187
|
switch(type){
|
|
188
188
|
case 'icon':
|
|
189
189
|
return renderIcon();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
2
2
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
3
3
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
4
|
+
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
|
|
4
5
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
5
6
|
import React, { useContext, useEffect, useRef, useState } from "react";
|
|
6
7
|
import { Image, View } from "@tarojs/components";
|
|
@@ -24,8 +25,24 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
|
24
25
|
avatarIndex: 0
|
|
25
26
|
});
|
|
26
27
|
var classPrefix = "nut-avatar";
|
|
27
|
-
export var Avatar = function(props) {
|
|
28
|
-
var _$_object_spread = _object_spread({}, defaultProps, props), children = _$_object_spread.children, size = _$_object_spread.size, shape = _$_object_spread.shape, background = _$_object_spread.background, color = _$_object_spread.color, src = _$_object_spread.src, icon = _$_object_spread.icon, mode = _$_object_spread.mode, fit = _$_object_spread.fit, avatarIndex = _$_object_spread.avatarIndex, className = _$_object_spread.className, style = _$_object_spread.style, onClick = _$_object_spread.onClick, onError = _$_object_spread.onError
|
|
28
|
+
export var Avatar = function Avatar(props) {
|
|
29
|
+
var _$_object_spread = _object_spread({}, defaultProps, props), children = _$_object_spread.children, size = _$_object_spread.size, shape = _$_object_spread.shape, background = _$_object_spread.background, color = _$_object_spread.color, src = _$_object_spread.src, alt = _$_object_spread.alt, icon = _$_object_spread.icon, mode = _$_object_spread.mode, fit = _$_object_spread.fit, avatarIndex = _$_object_spread.avatarIndex, className = _$_object_spread.className, style = _$_object_spread.style, onClick = _$_object_spread.onClick, onError = _$_object_spread.onError, rest = _object_without_properties(_$_object_spread, [
|
|
30
|
+
"children",
|
|
31
|
+
"size",
|
|
32
|
+
"shape",
|
|
33
|
+
"background",
|
|
34
|
+
"color",
|
|
35
|
+
"src",
|
|
36
|
+
"alt",
|
|
37
|
+
"icon",
|
|
38
|
+
"mode",
|
|
39
|
+
"fit",
|
|
40
|
+
"avatarIndex",
|
|
41
|
+
"className",
|
|
42
|
+
"style",
|
|
43
|
+
"onClick",
|
|
44
|
+
"onError"
|
|
45
|
+
]);
|
|
29
46
|
var _useState // 是否显示的最大头像个数
|
|
30
47
|
= _sliced_to_array(useState(false), 2), showMax = _useState[0], setShowMax = _useState[1];
|
|
31
48
|
var avatarRef = useRef(null);
|
|
@@ -62,27 +79,35 @@ export var Avatar = function(props) {
|
|
|
62
79
|
}
|
|
63
80
|
}, [
|
|
64
81
|
avatarIndex,
|
|
65
|
-
groupCount
|
|
82
|
+
groupCount,
|
|
83
|
+
groupMax
|
|
66
84
|
]);
|
|
67
|
-
var errorEvent = function() {
|
|
85
|
+
var errorEvent = function errorEvent() {
|
|
68
86
|
onError && onError();
|
|
69
87
|
};
|
|
70
|
-
var clickAvatar = function(e) {
|
|
88
|
+
var clickAvatar = function clickAvatar(e) {
|
|
71
89
|
onClick && onClick(e);
|
|
72
90
|
};
|
|
73
|
-
return /*#__PURE__*/ React.createElement(React.Fragment, null, (showMax || !groupMax || avatarIndex <= groupMax) && /*#__PURE__*/ React.createElement(View, {
|
|
91
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, (showMax || !groupMax || avatarIndex <= groupMax) && /*#__PURE__*/ React.createElement(View, _object_spread({
|
|
74
92
|
className: cls,
|
|
75
93
|
style: !showMax ? styles : maxStyles,
|
|
76
94
|
onClick: clickAvatar,
|
|
77
|
-
ref: avatarRef
|
|
78
|
-
|
|
95
|
+
ref: avatarRef,
|
|
96
|
+
// @ts-ignore
|
|
97
|
+
ariaRole: onClick ? 'button' : undefined
|
|
98
|
+
}, rest), (!groupMax || avatarIndex <= groupMax) && /*#__PURE__*/ React.createElement(React.Fragment, null, src && /*#__PURE__*/ React.createElement(Image, {
|
|
79
99
|
className: "nut-avatar-img nut-avatar-".concat(groupSize || size || 'normal', "-img"),
|
|
80
100
|
src: src,
|
|
101
|
+
nativeProps: {
|
|
102
|
+
alt: alt
|
|
103
|
+
},
|
|
81
104
|
style: {
|
|
82
105
|
objectFit: fit
|
|
83
106
|
},
|
|
84
107
|
mode: mode,
|
|
85
|
-
onError: errorEvent
|
|
108
|
+
onError: errorEvent,
|
|
109
|
+
// @ts-ignore
|
|
110
|
+
ariaHidden: true
|
|
86
111
|
}), /*#__PURE__*/ React.isValidElement(icon) ? /*#__PURE__*/ React.createElement(View, {
|
|
87
112
|
className: "nut-avatar-text"
|
|
88
113
|
}, /*#__PURE__*/ React.cloneElement(icon, _object_spread_props(_object_spread({}, icon.props), {
|
|
@@ -96,6 +121,7 @@ export var Avatar = function(props) {
|
|
|
96
121
|
}, children), !src && !icon && !children && /*#__PURE__*/ React.createElement(View, {
|
|
97
122
|
className: "nut-avatar-text"
|
|
98
123
|
}, /*#__PURE__*/ React.createElement(User, {
|
|
124
|
+
ariaHidden: true,
|
|
99
125
|
style: {
|
|
100
126
|
color: color
|
|
101
127
|
},
|