@nutui/nutui-react-taro 2.6.17 → 2.6.19
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 -11
- package/dist/esm/ActionSheet.js +1 -1
- package/dist/esm/Address.js +1 -1
- package/dist/esm/AnimatingNumbers.js +2 -2
- package/dist/esm/Audio.js +1 -1
- package/dist/esm/AvatarCropper.js +1 -1
- package/dist/esm/Calendar.js +1 -1
- package/dist/esm/CalendarItem.js +1 -1
- package/dist/esm/Cascader.js +1 -1
- package/dist/esm/DatePicker.js +1 -1
- package/dist/esm/Dialog.js +1 -1
- package/dist/esm/Ellipsis.js +1 -1
- package/dist/esm/FixedNav.js +1 -1
- package/dist/esm/ImagePreview.js +1 -1
- package/dist/esm/Input.js +1 -1
- package/dist/esm/InputNumber.js +1 -1
- package/dist/esm/Layout.js +1 -1
- package/dist/esm/Menu.js +1 -1
- package/dist/esm/MenuItem.js +1 -1
- package/dist/esm/Notify.js +1 -1
- package/dist/esm/NumberKeyboard.js +1 -1
- package/dist/esm/Overlay.js +1 -1
- package/dist/esm/Pagination.js +1 -1
- package/dist/esm/Picker.js +1 -1
- package/dist/esm/Popover.js +1 -1
- package/dist/esm/Popup.js +1 -1
- package/dist/esm/ShortPassword.js +1 -1
- package/dist/esm/SideNavBar.js +1 -1
- package/dist/esm/Sticky.js +1 -1
- package/dist/esm/TimeSelect.js +1 -1
- package/dist/esm/Toast.js +1 -1
- package/dist/esm/Tour.js +1 -1
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/{actionsheet.taro-CQ3sJY3B.js → actionsheet.taro-CgfXnK1M.js} +3 -2
- package/dist/esm/{address.taro-Old6uBAn.js → address.taro-DErzR2nE.js} +2 -2
- package/dist/esm/{audio.taro-CD-vP_u0.js → audio.taro-C8UEIiBR.js} +4 -8
- package/dist/esm/{avatarcropper.taro-CAVcFvKC.js → avatarcropper.taro-Bmx6gexj.js} +11 -19
- package/dist/esm/{calendar.taro-C4UvVkgw.js → calendar.taro-CuPrPO_2.js} +2 -2
- package/dist/esm/{calendaritem.taro-CRultyrO.js → calendaritem.taro-DbaK10II.js} +5 -9
- package/dist/esm/{cascader.taro-BNw6H5ue.js → cascader.taro-Cad_4Sqw.js} +4 -1
- package/dist/esm/{datepicker.taro-C1wMTysn.js → datepicker.taro-DjTr__43.js} +2 -2
- package/dist/esm/{dialog.taro-BY2KfQh1.js → dialog.taro-CzGba5-2.js} +3 -3
- package/dist/esm/{ellipsis.taro-Ck2rumQ6.js → ellipsis.taro-Ba2Kokb7.js} +9 -13
- package/dist/esm/{fixednav.taro-C3iUeag8.js → fixednav.taro-eCRdeuqJ.js} +1 -1
- package/dist/esm/{get-scroll-parent-9ZDWApX2.js → get-scroll-parent-DB1VRg11.js} +1 -0
- package/dist/esm/{imagepreview.taro-CJDHziHn.js → imagepreview.taro-C0yMREHT.js} +1 -1
- package/dist/esm/{input.taro-B_B1lJq2.js → input.taro-DbAbbzIX.js} +5 -7
- package/dist/esm/{inputnumber.taro-D9mteLSI.js → inputnumber.taro-DPRZtV42.js} +1 -5
- package/dist/esm/{layout.taro-C-aUcOOE.js → layout.taro-DpiuZLLE.js} +1 -3
- package/dist/esm/{menu.taro-Cw_lCHDb.js → menu.taro-BFc4uUxG.js} +1 -1
- package/dist/esm/{menuitem.taro-DqLGsBUc.js → menuitem.taro-D6KQvdRw.js} +4 -3
- package/dist/esm/merge-props-2rRqFlJz.js +16 -0
- package/dist/esm/{notify.taro-jP7y9zMU.js → notify.taro-BVXg7xTI.js} +5 -4
- package/dist/esm/{numberkeyboard.taro-B-FEM91t.js → numberkeyboard.taro-B1LfptyA.js} +1 -1
- package/dist/esm/nutui-react.es.js +31 -31
- package/dist/esm/{overlay.taro-B5s6rmEf.js → overlay.taro-C8eXSsJH.js} +19 -9
- package/dist/esm/{pagination.taro-DdLO3OTc.js → pagination.taro-D0HOQwW2.js} +4 -8
- package/dist/esm/{picker.taro-Cu8B-fNC.js → picker.taro-D9CKPl5K.js} +3 -2
- package/dist/esm/{popover.taro-DrC9HQ1E.js → popover.taro-BvMcsCRf.js} +1 -1
- package/dist/esm/{popup.taro-_E52-0su.js → popup.taro-DV32k5dP.js} +6 -6
- package/dist/esm/{shortpassword.taro-CmPaHe0E.js → shortpassword.taro-DPmvilhN.js} +1 -1
- package/dist/esm/{sidenavbar.taro-BWB1yd3c.js → sidenavbar.taro-DNwoQw9u.js} +1 -1
- package/dist/esm/{sticky.taro-2Vup8HR8.js → sticky.taro-DC98CdU7.js} +10 -2
- package/dist/esm/{timeselect.taro-CgcPLf0z.js → timeselect.taro-BqP2APht.js} +1 -1
- package/dist/esm/{toast.taro-3B6uFLDu.js → toast.taro-Tx0IHbsl.js} +3 -3
- package/dist/esm/{tour.taro-D88VKjAl.js → tour.taro-XysJDnqf.js} +1 -1
- package/dist/esm/{uploader.taro-0QYFT-E8.js → uploader.taro-Do8LZqUn.js} +21 -3
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/tr-TR.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +491 -385
- package/dist/nutui.react.umd.js +496 -390
- package/dist/packages/elevator/elevator.scss +1 -2
- package/dist/packages/popover/popover.scss +3 -3
- package/dist/packages/tabs/tabs.scss +3 -3
- package/dist/packages/uploader/uploader.scss +1 -2
- package/dist/types/index.d.ts +196 -196
- package/dist/types/packages/actionsheet/actionsheet.d.ts +2 -2
- package/dist/types/packages/actionsheet/actionsheet.taro.d.ts +2 -2
- package/dist/types/packages/address/address.d.ts +2 -2
- package/dist/types/packages/address/address.taro.d.ts +2 -2
- package/dist/types/packages/address/customRender.d.ts +2 -2
- package/dist/types/packages/address/customRender.taro.d.ts +2 -2
- package/dist/types/packages/address/existRender.d.ts +1 -1
- package/dist/types/packages/address/existRender.taro.d.ts +1 -1
- package/dist/types/packages/animate/animate.d.ts +1 -1
- package/dist/types/packages/animate/animate.taro.d.ts +1 -1
- package/dist/types/packages/animatingnumbers/animatingnumbers.d.ts +2 -2
- package/dist/types/packages/animatingnumbers/animatingnumbers.taro.d.ts +2 -2
- package/dist/types/packages/audio/audio.d.ts +1 -2
- package/dist/types/packages/audio/audio.taro.d.ts +1 -1
- package/dist/types/packages/avatar/avatar.d.ts +2 -3
- package/dist/types/packages/avatar/avatar.taro.d.ts +2 -3
- package/dist/types/packages/avatarcropper/avatarcropper.d.ts +1 -1
- package/dist/types/packages/avatarcropper/avatarcropper.taro.d.ts +1 -1
- package/dist/types/packages/avatargroup/avatargroup.d.ts +1 -1
- package/dist/types/packages/avatargroup/avatargroup.taro.d.ts +1 -1
- package/dist/types/packages/avatargroup/context.d.ts +1 -1
- package/dist/types/packages/backtop/backtop.d.ts +1 -2
- package/dist/types/packages/backtop/backtop.taro.d.ts +1 -2
- package/dist/types/packages/barrage/barrage.d.ts +1 -1
- package/dist/types/packages/barrage/barrage.taro.d.ts +1 -1
- package/dist/types/packages/button/button.d.ts +1 -2
- package/dist/types/packages/button/button.taro.d.ts +1 -2
- package/dist/types/packages/calendar/calendar.d.ts +2 -2
- package/dist/types/packages/calendar/calendar.taro.d.ts +2 -2
- package/dist/types/packages/calendarcard/calendarcard.d.ts +2 -2
- package/dist/types/packages/calendarcard/calendarcard.taro.d.ts +2 -2
- package/dist/types/packages/calendaritem/calendaritem.d.ts +2 -2
- package/dist/types/packages/calendaritem/calendaritem.taro.d.ts +2 -2
- package/dist/types/packages/card/card.d.ts +1 -1
- package/dist/types/packages/card/card.taro.d.ts +1 -1
- package/dist/types/packages/cascader/cascader.d.ts +2 -2
- package/dist/types/packages/cascader/cascader.taro.d.ts +2 -2
- package/dist/types/packages/cell/cell.d.ts +2 -2
- package/dist/types/packages/cell/cell.taro.d.ts +2 -2
- package/dist/types/packages/cellgroup/context.d.ts +1 -1
- package/dist/types/packages/checkbox/checkbox.d.ts +3 -3
- package/dist/types/packages/checkbox/checkbox.taro.d.ts +3 -3
- package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +3 -3
- package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +3 -3
- package/dist/types/packages/checkboxgroup/context.d.ts +1 -1
- package/dist/types/packages/circleprogress/circleprogress.d.ts +1 -1
- package/dist/types/packages/circleprogress/circleprogress.taro.d.ts +1 -1
- package/dist/types/packages/col/col.d.ts +1 -2
- package/dist/types/packages/col/col.taro.d.ts +1 -2
- package/dist/types/packages/collapse/collapse.d.ts +1 -1
- package/dist/types/packages/collapse/collapse.taro.d.ts +1 -1
- package/dist/types/packages/collapse/context.d.ts +1 -1
- package/dist/types/packages/collapseitem/collapseitem.d.ts +1 -1
- package/dist/types/packages/collapseitem/collapseitem.taro.d.ts +1 -1
- package/dist/types/packages/configprovider/configprovider.d.ts +1 -1
- package/dist/types/packages/configprovider/configprovider.taro.d.ts +1 -1
- package/dist/types/packages/countdown/countdown.d.ts +1 -1
- package/dist/types/packages/countdown/countdown.taro.d.ts +1 -1
- package/dist/types/packages/datepicker/datepicker.d.ts +2 -2
- package/dist/types/packages/datepicker/datepicker.taro.d.ts +2 -2
- package/dist/types/packages/dialog/config.d.ts +1 -2
- package/dist/types/packages/dialog/dialogwrap.d.ts +2 -2
- package/dist/types/packages/divider/divider.d.ts +1 -1
- package/dist/types/packages/divider/divider.taro.d.ts +1 -1
- package/dist/types/packages/drag/drag.d.ts +1 -1
- package/dist/types/packages/drag/drag.taro.d.ts +1 -1
- package/dist/types/packages/elevator/elevator.d.ts +1 -1
- package/dist/types/packages/elevator/elevator.taro.d.ts +1 -1
- package/dist/types/packages/ellipsis/ellipsis.d.ts +1 -1
- package/dist/types/packages/ellipsis/ellipsis.taro.d.ts +1 -1
- package/dist/types/packages/empty/empty.d.ts +2 -2
- package/dist/types/packages/empty/empty.taro.d.ts +2 -2
- package/dist/types/packages/fixednav/fixednav.d.ts +2 -2
- package/dist/types/packages/fixednav/fixednav.taro.d.ts +2 -2
- package/dist/types/packages/form/context.d.ts +1 -1
- package/dist/types/packages/form/form.d.ts +2 -2
- package/dist/types/packages/form/form.taro.d.ts +2 -2
- package/dist/types/packages/form/index.d.ts +2 -2
- package/dist/types/packages/form/index.taro.d.ts +2 -2
- package/dist/types/packages/formitem/formitem.d.ts +1 -1
- package/dist/types/packages/formitem/formitem.taro.d.ts +1 -1
- package/dist/types/packages/grid/grid.context.d.ts +1 -1
- package/dist/types/packages/grid/grid.d.ts +1 -1
- package/dist/types/packages/grid/grid.taro.context.d.ts +1 -1
- package/dist/types/packages/grid/grid.taro.d.ts +1 -1
- package/dist/types/packages/griditem/griditem.d.ts +1 -1
- package/dist/types/packages/griditem/griditem.taro.d.ts +1 -1
- package/dist/types/packages/image/image.d.ts +1 -1
- package/dist/types/packages/indicator/indicator.d.ts +1 -1
- package/dist/types/packages/indicator/indicator.taro.d.ts +1 -1
- package/dist/types/packages/infiniteloading/infiniteloading.d.ts +1 -1
- package/dist/types/packages/infiniteloading/infiniteloading.taro.d.ts +1 -1
- package/dist/types/packages/input/input.d.ts +1 -1
- package/dist/types/packages/input/input.taro.d.ts +1 -1
- package/dist/types/packages/inputnumber/inputnumber.d.ts +1 -1
- package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +1 -1
- package/dist/types/packages/layout/layout.d.ts +1 -1
- package/dist/types/packages/layout/layout.taro.d.ts +1 -1
- package/dist/types/packages/loading/loading.d.ts +1 -1
- package/dist/types/packages/loading/loading.taro.d.ts +1 -1
- package/dist/types/packages/menu/menu.d.ts +2 -2
- package/dist/types/packages/menu/menu.taro.d.ts +2 -2
- package/dist/types/packages/menuitem/menuitem.d.ts +1 -1
- package/dist/types/packages/menuitem/menuitem.taro.d.ts +1 -1
- package/dist/types/packages/navbar/navbar.d.ts +1 -1
- package/dist/types/packages/navbar/navbar.taro.d.ts +1 -1
- package/dist/types/packages/noticebar/noticebar.d.ts +1 -1
- package/dist/types/packages/noticebar/noticebar.taro.d.ts +1 -1
- package/dist/types/packages/notify/Notification.d.ts +1 -1
- package/dist/types/packages/notify/index.d.ts +1 -1
- package/dist/types/packages/notify/notify.d.ts +1 -1
- package/dist/types/packages/numberkeyboard/numberkeyboard.d.ts +2 -2
- package/dist/types/packages/numberkeyboard/numberkeyboard.taro.d.ts +2 -2
- package/dist/types/packages/nutui.react.build.d.ts +196 -196
- package/dist/types/packages/nutui.react.d.ts +196 -196
- package/dist/types/packages/nutui.react.taro.d.ts +196 -196
- package/dist/types/packages/overlay/overlay.d.ts +1 -1
- package/dist/types/packages/overlay/overlay.taro.d.ts +1 -1
- package/dist/types/packages/pagination/pagination.d.ts +1 -1
- package/dist/types/packages/pagination/pagination.taro.d.ts +1 -1
- package/dist/types/packages/picker/index.d.ts +1 -1
- package/dist/types/packages/picker/index.taro.d.ts +1 -1
- package/dist/types/packages/picker/picker.d.ts +2 -2
- package/dist/types/packages/picker/picker.taro.d.ts +2 -2
- package/dist/types/packages/picker/pickerpanel.d.ts +1 -1
- package/dist/types/packages/picker/pickerpanel.taro.d.ts +1 -1
- package/dist/types/packages/popover/popover.d.ts +2 -2
- package/dist/types/packages/popover/popover.taro.d.ts +2 -2
- package/dist/types/packages/popup/popup.d.ts +2 -2
- package/dist/types/packages/popup/popup.taro.d.ts +2 -2
- package/dist/types/packages/progress/progress.d.ts +1 -1
- package/dist/types/packages/progress/progress.taro.d.ts +1 -1
- package/dist/types/packages/radio/radio.d.ts +3 -3
- package/dist/types/packages/radio/radio.taro.d.ts +3 -3
- package/dist/types/packages/radiogroup/context.d.ts +1 -1
- package/dist/types/packages/radiogroup/radiogroup.d.ts +1 -1
- package/dist/types/packages/radiogroup/radiogroup.taro.d.ts +1 -1
- package/dist/types/packages/range/range.d.ts +1 -1
- package/dist/types/packages/range/range.taro.d.ts +1 -1
- package/dist/types/packages/rate/rate.d.ts +1 -1
- package/dist/types/packages/rate/rate.taro.d.ts +1 -1
- package/dist/types/packages/row/UserContext.d.ts +1 -1
- package/dist/types/packages/row/row.d.ts +1 -2
- package/dist/types/packages/row/row.taro.d.ts +1 -2
- package/dist/types/packages/searchbar/searchbar.d.ts +1 -2
- package/dist/types/packages/searchbar/searchbar.taro.d.ts +1 -2
- package/dist/types/packages/shortpassword/shortpassword.d.ts +2 -2
- package/dist/types/packages/shortpassword/shortpassword.taro.d.ts +2 -2
- package/dist/types/packages/sidenavbar/context.d.ts +1 -1
- package/dist/types/packages/sidenavbar/sidenavbar.d.ts +1 -1
- package/dist/types/packages/sidenavbar/sidenavbar.taro.d.ts +1 -1
- package/dist/types/packages/sidenavbaritem/sidenavbaritem.d.ts +1 -1
- package/dist/types/packages/sidenavbaritem/sidenavbaritem.taro.d.ts +1 -1
- package/dist/types/packages/signature/signature.d.ts +1 -1
- package/dist/types/packages/signature/signature.taro.d.ts +1 -1
- package/dist/types/packages/space/space.d.ts +1 -1
- package/dist/types/packages/space/space.taro.d.ts +1 -1
- package/dist/types/packages/step/step.d.ts +1 -1
- package/dist/types/packages/step/step.taro.d.ts +1 -1
- package/dist/types/packages/steps/context.d.ts +1 -1
- package/dist/types/packages/steps/steps.d.ts +1 -1
- package/dist/types/packages/steps/steps.taro.d.ts +1 -1
- package/dist/types/packages/sticky/sticky.d.ts +1 -1
- package/dist/types/packages/sticky/sticky.taro.d.ts +1 -1
- package/dist/types/packages/subsidenavbar/subsidenavbar.d.ts +1 -1
- package/dist/types/packages/subsidenavbar/subsidenavbar.taro.d.ts +1 -1
- package/dist/types/packages/swipe/swipe.d.ts +1 -2
- package/dist/types/packages/swipe/swipe.taro.d.ts +1 -2
- package/dist/types/packages/swiper/context.d.ts +1 -1
- package/dist/types/packages/swiper/effects/default.d.ts +1 -1
- package/dist/types/packages/swiper/effects/focus.d.ts +1 -1
- package/dist/types/packages/swiper/index.d.ts +3 -3
- package/dist/types/packages/swiper/index.taro.d.ts +2 -2
- package/dist/types/packages/swiper/swiper.d.ts +2 -2
- package/dist/types/packages/swiper/swiper.taro.d.ts +1 -1
- package/dist/types/packages/swiperitem/swiperitem.d.ts +1 -1
- package/dist/types/packages/switch/switch.d.ts +1 -1
- package/dist/types/packages/switch/switch.taro.d.ts +1 -1
- package/dist/types/packages/tabbar/context.d.ts +1 -1
- package/dist/types/packages/tabbar/tabbar.d.ts +1 -1
- package/dist/types/packages/tabbar/tabbar.taro.d.ts +1 -1
- package/dist/types/packages/table/table.d.ts +1 -1
- package/dist/types/packages/table/table.taro.d.ts +1 -1
- package/dist/types/packages/table/types.d.ts +1 -1
- package/dist/types/packages/tabpane/tabpane.d.ts +1 -1
- package/dist/types/packages/tabpane/tabpane.taro.d.ts +1 -1
- package/dist/types/packages/tabs/tabs.d.ts +2 -2
- package/dist/types/packages/tabs/tabs.taro.d.ts +2 -2
- package/dist/types/packages/tag/tag.d.ts +1 -2
- package/dist/types/packages/tag/tag.taro.d.ts +1 -2
- package/dist/types/packages/textarea/textarea.d.ts +1 -2
- package/dist/types/packages/timedetail/timedetail.d.ts +2 -2
- package/dist/types/packages/timedetail/timedetail.taro.d.ts +2 -2
- package/dist/types/packages/toast/Notification.d.ts +1 -1
- package/dist/types/packages/toast/index.d.ts +1 -1
- package/dist/types/packages/toast/toast.d.ts +1 -1
- package/dist/types/packages/toast/toast.taro.d.ts +1 -1
- package/dist/types/packages/tour/tour.d.ts +2 -3
- package/dist/types/packages/tour/tour.taro.d.ts +2 -3
- package/dist/types/packages/trendarrow/trendarrow.d.ts +1 -1
- package/dist/types/packages/trendarrow/trendarrow.taro.d.ts +1 -1
- package/dist/types/packages/uploader/preview.d.ts +1 -1
- package/dist/types/packages/uploader/preview.taro.d.ts +1 -1
- package/dist/types/packages/uploader/uploader.d.ts +1 -1
- package/dist/types/packages/uploader/uploader.taro.d.ts +7 -2
- package/dist/types/packages/video/video.d.ts +1 -1
- package/dist/types/packages/virtuallist/virtuallist.d.ts +1 -1
- package/dist/types/packages/watermark/watermark.d.ts +1 -1
- package/dist/types/packages/watermark/watermark.taro.d.ts +1 -1
- package/dist/types/utils/merge-props.d.ts +9 -5
- package/dist/types/utils/render.d.ts +1 -1
- package/dist/types/utils/typings.d.ts +1 -1
- package/dist/types/utils/use-lock-scoll-taro.d.ts +1 -1
- package/dist/types/utils/use-touch.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as __awaiter } from "./tslib.es6-iWu3F_1J.js";
|
|
2
|
-
import React__default, { forwardRef, useState, useEffect, useMemo, useCallback, useImperativeHandle } from "react";
|
|
2
|
+
import React__default, { forwardRef, useState, useRef, useEffect, useMemo, useCallback, useImperativeHandle } from "react";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { getSystemInfoSync, usePageScroll } from "@tarojs/taro";
|
|
5
5
|
import { View } from "@tarojs/components";
|
|
6
6
|
import { CSSTransition } from "react-transition-group";
|
|
7
7
|
import { Check } from "@nutui/icons-react-taro";
|
|
8
|
-
import { O as Overlay } from "./overlay.taro-
|
|
8
|
+
import { O as Overlay } from "./overlay.taro-C8eXSsJH.js";
|
|
9
9
|
import { g as getRectByTaro } from "./get-rect-by-taro-THaHH07X.js";
|
|
10
10
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
11
11
|
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
@@ -22,6 +22,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
22
22
|
onChange === null || onChange === void 0 ? void 0 : onChange(option);
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
+
const cssRef = useRef(null);
|
|
25
26
|
useEffect(() => {
|
|
26
27
|
setShowPopup(show);
|
|
27
28
|
}, [show]);
|
|
@@ -118,7 +119,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
118
119
|
}, className), style: Object.assign(Object.assign({}, style), isShow()) },
|
|
119
120
|
React__default.createElement(
|
|
120
121
|
CSSTransition,
|
|
121
|
-
{ in: showPopup, timeout: 100, classNames: direction === "down" ? "nut-menu-container-down" : "nut-menu-container-up" },
|
|
122
|
+
{ nodeRef: cssRef, in: showPopup, timeout: 100, classNames: direction === "down" ? "nut-menu-container-down" : "nut-menu-container-up" },
|
|
122
123
|
React__default.createElement(
|
|
123
124
|
View,
|
|
124
125
|
{ className: "nut-menu-container-content" },
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function mergeProps(...items) {
|
|
2
|
+
const ret = {};
|
|
3
|
+
items.forEach((item) => {
|
|
4
|
+
if (item) {
|
|
5
|
+
Object.keys(item).forEach((key) => {
|
|
6
|
+
if (item[key] !== void 0) {
|
|
7
|
+
ret[key] = item[key];
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
return ret;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
mergeProps as m
|
|
16
|
+
};
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import React__default, { useState, useEffect } from "react";
|
|
1
|
+
import React__default, { useState, useRef, useEffect } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { CSSTransition } from "react-transition-group";
|
|
4
4
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
5
5
|
import { u as useCustomEvent, a as useCustomEventsPath, c as customEvents } from "./use-custom-event-DuP4onEm.js";
|
|
6
|
+
import { m as mergeProps } from "./merge-props-2rRqFlJz.js";
|
|
6
7
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { id: "", duration: 3e3, type: "danger", position: "top", visible: false, onClose: () => {
|
|
7
8
|
}, onClick: () => {
|
|
8
9
|
} });
|
|
9
10
|
const classPrefix = "nut-notify";
|
|
10
11
|
const Notify = (props) => {
|
|
11
|
-
const { id, children, style, type, className, position, visible, duration, onClose, onClick } =
|
|
12
|
+
const { id, children, style, type, className, position, visible, duration, onClose, onClick } = mergeProps(defaultProps, props);
|
|
12
13
|
useCustomEvent(id, (status) => {
|
|
13
14
|
status ? show() : hide();
|
|
14
15
|
});
|
|
15
16
|
let timer;
|
|
16
17
|
const [showNotify, setShowNotify] = useState(false);
|
|
18
|
+
const cssRef = useRef(null);
|
|
17
19
|
useEffect(() => {
|
|
18
20
|
if (visible) {
|
|
19
21
|
show();
|
|
@@ -54,7 +56,7 @@ const Notify = (props) => {
|
|
|
54
56
|
null,
|
|
55
57
|
React__default.createElement(
|
|
56
58
|
CSSTransition,
|
|
57
|
-
{ in: showNotify, timeout: 300, classNames: "fade", unmountOnExit: true, appear: true, position, id },
|
|
59
|
+
{ nodeRef: cssRef, in: showNotify, timeout: 300, classNames: "fade", unmountOnExit: true, appear: true, position, id },
|
|
58
60
|
React__default.createElement("div", { className: `${classes} ${className}`, style, onClick: clickHandle }, children)
|
|
59
61
|
)
|
|
60
62
|
);
|
|
@@ -67,7 +69,6 @@ function close(selector) {
|
|
|
67
69
|
const path = useCustomEventsPath(selector);
|
|
68
70
|
customEvents.trigger(path, false);
|
|
69
71
|
}
|
|
70
|
-
Notify.defaultProps = defaultProps;
|
|
71
72
|
Notify.displayName = "NutNotify";
|
|
72
73
|
Notify.open = open;
|
|
73
74
|
Notify.close = close;
|
|
@@ -3,7 +3,7 @@ import React__default, { useMemo, useState } from "react";
|
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { ArrowDown } from "@nutui/icons-react-taro";
|
|
5
5
|
import { View } from "@tarojs/components";
|
|
6
|
-
import { P as Popup } from "./popup.taro-
|
|
6
|
+
import { P as Popup } from "./popup.taro-DV32k5dP.js";
|
|
7
7
|
import { u as useConfig } from "./configprovider.taro-DA4GDDFu.js";
|
|
8
8
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
9
9
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { visible: false, rightActions: "", type: "default", custom: [], random: false, onClose: () => {
|
|
@@ -3,79 +3,79 @@ import { C } from "./cell.taro-DWLhb5m6.js";
|
|
|
3
3
|
import { C as C2 } from "./cellgroup.taro-DTLGMR_c.js";
|
|
4
4
|
import { C as C3, g, s, u, a } from "./configprovider.taro-DA4GDDFu.js";
|
|
5
5
|
import { I } from "./image.taro-CyF6ujA7.js";
|
|
6
|
-
import { O } from "./overlay.taro-
|
|
6
|
+
import { O } from "./overlay.taro-C8eXSsJH.js";
|
|
7
7
|
import { C as C4 } from "./col.taro-BdtbWacE.js";
|
|
8
8
|
import { D } from "./divider.taro-BuVR5t2X.js";
|
|
9
9
|
import { G } from "./grid.taro-ZJywVaVe.js";
|
|
10
10
|
import { G as G2 } from "./griditem.taro-CcWyYchl.js";
|
|
11
|
-
import { L } from "./layout.taro-
|
|
11
|
+
import { L } from "./layout.taro-DpiuZLLE.js";
|
|
12
12
|
import { R } from "./row.taro-ItEq1Bi5.js";
|
|
13
13
|
import { S } from "./space.taro-B1KsEPZL.js";
|
|
14
|
-
import { S as S2 } from "./sticky.taro-
|
|
14
|
+
import { S as S2 } from "./sticky.taro-DC98CdU7.js";
|
|
15
15
|
import { S as S3 } from "./safearea.taro-BJpvFsMf.js";
|
|
16
16
|
import { B as B2 } from "./backtop.taro-jWlJ1ZWG.js";
|
|
17
17
|
import { E } from "./elevator.taro-Bsc8PcT0.js";
|
|
18
|
-
import { F } from "./fixednav.taro-
|
|
18
|
+
import { F } from "./fixednav.taro-eCRdeuqJ.js";
|
|
19
19
|
import { N } from "./navbar.taro-Dea0-s9Q.js";
|
|
20
|
-
import { S as S4 } from "./sidenavbar.taro-
|
|
20
|
+
import { S as S4 } from "./sidenavbar.taro-DNwoQw9u.js";
|
|
21
21
|
import { S as S5 } from "./sidenavbaritem.taro-BKpzXpzG.js";
|
|
22
22
|
import { S as S6 } from "./subsidenavbar.taro-CSU3DhNq.js";
|
|
23
23
|
import { T } from "./tabbar.taro-CXk0zLdz.js";
|
|
24
24
|
import { T as T2 } from "./tabbaritem.taro-BZNabTBp.js";
|
|
25
25
|
import { T as T3 } from "./tabpane.taro-BAe86j3t.js";
|
|
26
26
|
import { T as T4 } from "./tabs.taro-8X51sTol.js";
|
|
27
|
-
import { A } from "./address.taro-
|
|
28
|
-
import { C as C5 } from "./calendar.taro-
|
|
29
|
-
import { C as C6 } from "./calendaritem.taro-
|
|
27
|
+
import { A } from "./address.taro-DErzR2nE.js";
|
|
28
|
+
import { C as C5 } from "./calendar.taro-CuPrPO_2.js";
|
|
29
|
+
import { C as C6 } from "./calendaritem.taro-DbaK10II.js";
|
|
30
30
|
import { C as C7 } from "./calendarcard.taro-CbvCWF1k.js";
|
|
31
|
-
import { C as C8 } from "./cascader.taro-
|
|
31
|
+
import { C as C8 } from "./cascader.taro-Cad_4Sqw.js";
|
|
32
32
|
import { C as C9, a as a2 } from "./checkbox.taro-CgqJyhrh.js";
|
|
33
|
-
import { D as D2 } from "./datepicker.taro-
|
|
33
|
+
import { D as D2 } from "./datepicker.taro-DjTr__43.js";
|
|
34
34
|
import { default as default2 } from "./Form.js";
|
|
35
35
|
import { F as F2 } from "./formitem.taro-CEWRz5EJ.js";
|
|
36
|
-
import { I as I2 } from "./input.taro-
|
|
37
|
-
import { I as I3 } from "./inputnumber.taro-
|
|
38
|
-
import { M } from "./menu.taro-
|
|
39
|
-
import { M as M2 } from "./menuitem.taro-
|
|
40
|
-
import { N as N2 } from "./numberkeyboard.taro-
|
|
41
|
-
import { P } from "./picker.taro-
|
|
36
|
+
import { I as I2 } from "./input.taro-DbAbbzIX.js";
|
|
37
|
+
import { I as I3 } from "./inputnumber.taro-DPRZtV42.js";
|
|
38
|
+
import { M } from "./menu.taro-BFc4uUxG.js";
|
|
39
|
+
import { M as M2 } from "./menuitem.taro-D6KQvdRw.js";
|
|
40
|
+
import { N as N2 } from "./numberkeyboard.taro-B1LfptyA.js";
|
|
41
|
+
import { P } from "./picker.taro-D9CKPl5K.js";
|
|
42
42
|
import { R as R2, a as a3 } from "./radio.taro-CzOHqD3O.js";
|
|
43
43
|
import { R as R3 } from "./range.taro-D_qsx_j6.js";
|
|
44
44
|
import { R as R4 } from "./rate.taro-CPGkjYYu.js";
|
|
45
45
|
import { S as S7 } from "./searchbar.taro-C8cg7NeJ.js";
|
|
46
|
-
import { S as S8 } from "./shortpassword.taro-
|
|
46
|
+
import { S as S8 } from "./shortpassword.taro-DPmvilhN.js";
|
|
47
47
|
import { S as S9 } from "./signature.taro-zgwaJkIE.js";
|
|
48
48
|
import { S as S10 } from "./switch.taro-CdBmDo18.js";
|
|
49
49
|
import { T as T5 } from "./textarea.taro-DuceTjAx.js";
|
|
50
|
-
import { U } from "./uploader.taro-
|
|
51
|
-
import { A as A2 } from "./actionsheet.taro-
|
|
50
|
+
import { U } from "./uploader.taro-Do8LZqUn.js";
|
|
51
|
+
import { A as A2 } from "./actionsheet.taro-CgfXnK1M.js";
|
|
52
52
|
import { B as B3 } from "./badge.taro-BGaxpEYi.js";
|
|
53
|
-
import { B as B4 } from "./dialog.taro-
|
|
53
|
+
import { B as B4 } from "./dialog.taro-CzGba5-2.js";
|
|
54
54
|
import { D as D3 } from "./drag.taro-B_sfzmtW.js";
|
|
55
55
|
import { E as E2 } from "./empty.taro-CnwDznke.js";
|
|
56
56
|
import { I as I4 } from "./infiniteloading.taro-TbcBB0Qr.js";
|
|
57
57
|
import { L as L2 } from "./loading.taro-n_qoNgCW.js";
|
|
58
58
|
import { N as N3 } from "./noticebar.taro-CGUTg60Q.js";
|
|
59
|
-
import { N as N4 } from "./notify.taro-
|
|
60
|
-
import { P as P2 } from "./popover.taro-
|
|
61
|
-
import { P as P3 } from "./popup.taro-
|
|
59
|
+
import { N as N4 } from "./notify.taro-BVXg7xTI.js";
|
|
60
|
+
import { P as P2 } from "./popover.taro-BvMcsCRf.js";
|
|
61
|
+
import { P as P3 } from "./popup.taro-DV32k5dP.js";
|
|
62
62
|
import { P as P4 } from "./pulltorefresh.taro-DSr2dBjM.js";
|
|
63
63
|
import { S as S11 } from "./skeleton.taro-bD6fHZop.js";
|
|
64
64
|
import { S as S12 } from "./swipe.taro-Bsk2fnEl.js";
|
|
65
|
-
import { T as T6 } from "./toast.taro-
|
|
65
|
+
import { T as T6 } from "./toast.taro-Tx0IHbsl.js";
|
|
66
66
|
import { A as A3 } from "./animate.taro-CQVEyDKL.js";
|
|
67
67
|
import { default as default3 } from "./AnimatingNumbers.js";
|
|
68
|
-
import { A as A4 } from "./audio.taro-
|
|
68
|
+
import { A as A4 } from "./audio.taro-C8UEIiBR.js";
|
|
69
69
|
import { A as A5 } from "./avatar.taro-DSL3ErmC.js";
|
|
70
70
|
import { A as A6 } from "./avatargroup.taro-ScakjsY1.js";
|
|
71
71
|
import { C as C10 } from "./circleprogress.taro-BTRyQG5T.js";
|
|
72
72
|
import { C as C11 } from "./collapse.taro-wqL6MWZr.js";
|
|
73
73
|
import { C as C12 } from "./collapseitem.taro-DjUx5Nx8.js";
|
|
74
74
|
import { C as C13 } from "./countdown.taro-mKXeisK0.js";
|
|
75
|
-
import { E as E3 } from "./ellipsis.taro-
|
|
76
|
-
import { I as I5 } from "./imagepreview.taro-
|
|
75
|
+
import { E as E3 } from "./ellipsis.taro-Ba2Kokb7.js";
|
|
76
|
+
import { I as I5 } from "./imagepreview.taro-C0yMREHT.js";
|
|
77
77
|
import { I as I6 } from "./indicator.taro-k8bxJf86.js";
|
|
78
|
-
import { P as P5 } from "./pagination.taro-
|
|
78
|
+
import { P as P5 } from "./pagination.taro-D0HOQwW2.js";
|
|
79
79
|
import { P as P6 } from "./price.taro-DUW-OR83.js";
|
|
80
80
|
import { P as P7 } from "./progress.taro-De9-206U.js";
|
|
81
81
|
import { S as S13 } from "./step.taro-Cc1dc5Qb.js";
|
|
@@ -84,16 +84,16 @@ import { default as default4 } from "./Swiper.js";
|
|
|
84
84
|
import { S as S15 } from "./swiperitem.taro-BleF1EOs.js";
|
|
85
85
|
import { T as T7 } from "./table.taro-B6WCKTkO.js";
|
|
86
86
|
import { T as T8 } from "./tag.taro-CFt28RLm.js";
|
|
87
|
-
import { T as T9 } from "./tour.taro-
|
|
87
|
+
import { T as T9 } from "./tour.taro-XysJDnqf.js";
|
|
88
88
|
import { V } from "./video.taro-CecLv4sr.js";
|
|
89
89
|
import { V as V2 } from "./virtuallist.taro-BlPW8ibd.js";
|
|
90
90
|
import { B as B5 } from "./barrage.taro-CA-9uADD.js";
|
|
91
91
|
import { C as C14 } from "./card.taro-DxcIi5qH.js";
|
|
92
92
|
import { T as T10 } from "./timedetail.taro-ya5JNy2L.js";
|
|
93
|
-
import { T as T11 } from "./timeselect.taro-
|
|
93
|
+
import { T as T11 } from "./timeselect.taro-BqP2APht.js";
|
|
94
94
|
import { T as T12 } from "./trendarrow.taro-DKx5cGIh.js";
|
|
95
95
|
import { W } from "./watermark.taro-CZ6R5FlJ.js";
|
|
96
|
-
import { A as A7 } from "./avatarcropper.taro-
|
|
96
|
+
import { A as A7 } from "./avatarcropper.taro-Bmx6gexj.js";
|
|
97
97
|
export {
|
|
98
98
|
A2 as ActionSheet,
|
|
99
99
|
A as Address,
|
|
@@ -6,7 +6,20 @@ import { View } from "@tarojs/components";
|
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
7
7
|
import { getEnv } from "@tarojs/taro";
|
|
8
8
|
import { u as useTouch } from "./use-touch-BeiLHDO9.js";
|
|
9
|
-
import { g as getScrollParent } from "./get-scroll-parent-
|
|
9
|
+
import { c as canUseDom, g as getScrollParent } from "./get-scroll-parent-DB1VRg11.js";
|
|
10
|
+
let passiveSupported = false;
|
|
11
|
+
if (canUseDom) {
|
|
12
|
+
try {
|
|
13
|
+
const opts = Object.defineProperty({}, "passive", {
|
|
14
|
+
get() {
|
|
15
|
+
passiveSupported = true;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
window.addEventListener("test-passive-supported", null, opts);
|
|
19
|
+
} catch (e) {
|
|
20
|
+
console.log(e);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
10
23
|
let totalLockCount = 0;
|
|
11
24
|
const BODY_LOCK_CLASS = "nut-overflow-hidden";
|
|
12
25
|
function getScrollableElement(el) {
|
|
@@ -49,7 +62,7 @@ function useLockScroll(rootRef, shouldLock) {
|
|
|
49
62
|
};
|
|
50
63
|
const lock = () => {
|
|
51
64
|
document.addEventListener("touchstart", touch.start);
|
|
52
|
-
document.addEventListener("touchmove", onTouchMove, false);
|
|
65
|
+
document.addEventListener("touchmove", onTouchMove, passiveSupported ? { passive: false } : false);
|
|
53
66
|
if (!totalLockCount) {
|
|
54
67
|
document.body.classList.add(BODY_LOCK_CLASS);
|
|
55
68
|
}
|
|
@@ -109,18 +122,15 @@ const Overlay = (props) => {
|
|
|
109
122
|
afterClose && afterClose();
|
|
110
123
|
};
|
|
111
124
|
return React__default.createElement(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
React__default.createElement(
|
|
115
|
-
CSSTransition,
|
|
116
|
-
{ nodeRef, classNames: `${classPrefix}-slide`, unmountOnExit: true, timeout: duration, in: innerVisible, onEntered: onHandleOpened, onExited: onHandleClosed },
|
|
117
|
-
React__default.createElement(View, Object.assign({ ref: nodeRef, className: classes, style: styles }, rest, { catchMove: lockScroll, onClick: handleClick }), children)
|
|
118
|
-
)
|
|
125
|
+
CSSTransition,
|
|
126
|
+
{ nodeRef, classNames: `${classPrefix}-slide`, unmountOnExit: true, timeout: duration, in: innerVisible, onEntered: onHandleOpened, onExited: onHandleClosed },
|
|
127
|
+
React__default.createElement(View, Object.assign({ ref: nodeRef, className: classes, style: styles }, rest, { catchMove: lockScroll, onClick: handleClick }), children)
|
|
119
128
|
);
|
|
120
129
|
};
|
|
121
130
|
Overlay.displayName = "NutOverlay";
|
|
122
131
|
export {
|
|
123
132
|
Overlay as O,
|
|
124
133
|
defaultOverlayProps as d,
|
|
134
|
+
passiveSupported as p,
|
|
125
135
|
useLockScrollTaro as u
|
|
126
136
|
};
|
|
@@ -78,14 +78,10 @@ const Pagination = (props) => {
|
|
|
78
78
|
React__default.createElement("div", { className: classNames(`${classPrefix}-next`, currentPage >= pageCount ? "disabled" : ""), onClick: (e) => handleSelectPage(currentPage + 1) }, next || locale.pagination.next)
|
|
79
79
|
),
|
|
80
80
|
mode === "lite" && React__default.createElement(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
React__default.createElement(
|
|
84
|
-
|
|
85
|
-
{ className: `${classPrefix}-lite` },
|
|
86
|
-
React__default.createElement("div", { className: `${classPrefix}-lite-active` }, 2),
|
|
87
|
-
React__default.createElement("div", { className: `${classPrefix}-lite-default` }, 8)
|
|
88
|
-
)
|
|
81
|
+
"div",
|
|
82
|
+
{ className: `${classPrefix}-lite` },
|
|
83
|
+
React__default.createElement("div", { className: `${classPrefix}-lite-active` }, 2),
|
|
84
|
+
React__default.createElement("div", { className: `${classPrefix}-lite-default` }, 8)
|
|
89
85
|
)
|
|
90
86
|
);
|
|
91
87
|
};
|
|
@@ -3,9 +3,10 @@ import React__default, { useState, useRef, useEffect, useImperativeHandle } from
|
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import Taro from "@tarojs/taro";
|
|
5
5
|
import { View, PickerView, PickerViewColumn } from "@tarojs/components";
|
|
6
|
-
import { P as Popup } from "./popup.taro-
|
|
6
|
+
import { P as Popup } from "./popup.taro-DV32k5dP.js";
|
|
7
7
|
import { u as useTouch } from "./use-touch-BeiLHDO9.js";
|
|
8
8
|
import { g as getRectByTaro } from "./get-rect-by-taro-THaHH07X.js";
|
|
9
|
+
import { p as passiveSupported } from "./overlay.taro-C8eXSsJH.js";
|
|
9
10
|
import { u as useRefs } from "./use-refs-BeEmziIR.js";
|
|
10
11
|
import { u as useConfig } from "./configprovider.taro-DA4GDDFu.js";
|
|
11
12
|
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
@@ -178,7 +179,7 @@ const InternalPickerPanel = (props, ref) => {
|
|
|
178
179
|
moving: moving.current
|
|
179
180
|
}));
|
|
180
181
|
useEffect(() => {
|
|
181
|
-
const eventOptions = false;
|
|
182
|
+
const eventOptions = passiveSupported ? { passive: false, once: true } : false;
|
|
182
183
|
const element = pickerPanelRef.current;
|
|
183
184
|
element.addEventListener("touchstart", touchStart, eventOptions);
|
|
184
185
|
element.addEventListener("touchmove", touchMove, eventOptions);
|
|
@@ -2,7 +2,7 @@ import { _ as __rest, a as __awaiter } from "./tslib.es6-iWu3F_1J.js";
|
|
|
2
2
|
import React__default, { useRef, useState, useEffect } from "react";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import Taro, { createSelectorQuery } from "@tarojs/taro";
|
|
5
|
-
import { P as Popup } from "./popup.taro-
|
|
5
|
+
import { P as Popup } from "./popup.taro-DV32k5dP.js";
|
|
6
6
|
import { a as getRect, g as getRectByTaro } from "./get-rect-by-taro-THaHH07X.js";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
8
8
|
import { a as useRtl } from "./configprovider.taro-DA4GDDFu.js";
|
|
@@ -4,7 +4,7 @@ import { CSSTransition } from "react-transition-group";
|
|
|
4
4
|
import classNames from "classnames";
|
|
5
5
|
import { Close } from "@nutui/icons-react-taro";
|
|
6
6
|
import { View } from "@tarojs/components";
|
|
7
|
-
import { d as defaultOverlayProps, u as useLockScrollTaro, O as Overlay } from "./overlay.taro-
|
|
7
|
+
import { d as defaultOverlayProps, u as useLockScrollTaro, O as Overlay } from "./overlay.taro-C8eXSsJH.js";
|
|
8
8
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
9
9
|
const defaultProps = Object.assign(Object.assign(Object.assign({}, ComponentDefaults), { position: "center", transition: "", overlayStyle: {}, overlayClassName: "", closeable: false, closeIconPosition: "top-right", closeIcon: "close", destroyOnClose: false, portal: null, overlay: true, round: false, onOpen: () => {
|
|
10
10
|
}, onClose: () => {
|
|
@@ -111,7 +111,7 @@ const Popup = (props) => {
|
|
|
111
111
|
const renderPop = () => {
|
|
112
112
|
return React__default.createElement(
|
|
113
113
|
CSSTransition,
|
|
114
|
-
{ classNames: transitionName, mountOnEnter: true, unmountOnExit: destroyOnClose, timeout: duration, in: innerVisible, onEntered: onHandleOpened, onExited: onHandleClosed },
|
|
114
|
+
{ nodeRef: refObject, classNames: transitionName, mountOnEnter: true, unmountOnExit: destroyOnClose, timeout: duration, in: innerVisible, onEntered: onHandleOpened, onExited: onHandleClosed },
|
|
115
115
|
React__default.createElement(
|
|
116
116
|
View,
|
|
117
117
|
{ ref: refObject, style: popStyles, className: popClassName, onClick: onHandleClick, catchMove: lockScroll },
|
|
@@ -121,12 +121,12 @@ const Popup = (props) => {
|
|
|
121
121
|
);
|
|
122
122
|
};
|
|
123
123
|
const renderNode = () => {
|
|
124
|
-
return React__default.createElement(
|
|
124
|
+
return React__default.createElement(
|
|
125
125
|
React__default.Fragment,
|
|
126
126
|
null,
|
|
127
|
-
React__default.createElement(Overlay, { style: overlayStyles, className: overlayClassName, visible: innerVisible, closeOnOverlayClick, lockScroll, duration, onClick: onHandleClickOverlay }),
|
|
128
|
-
renderPop()
|
|
129
|
-
)
|
|
127
|
+
overlay ? React__default.createElement(Overlay, { style: overlayStyles, className: overlayClassName, visible: innerVisible, closeOnOverlayClick, lockScroll, duration, onClick: onHandleClickOverlay }) : null,
|
|
128
|
+
React__default.createElement(React__default.Fragment, null, renderPop())
|
|
129
|
+
);
|
|
130
130
|
};
|
|
131
131
|
useEffect(() => {
|
|
132
132
|
visible && open();
|
|
@@ -2,7 +2,7 @@ import { _ as __rest } from "./tslib.es6-iWu3F_1J.js";
|
|
|
2
2
|
import React__default, { useMemo, useImperativeHandle, useEffect } from "react";
|
|
3
3
|
import { Tips } from "@nutui/icons-react-taro";
|
|
4
4
|
import classNames from "classnames";
|
|
5
|
-
import { P as Popup } from "./popup.taro-
|
|
5
|
+
import { P as Popup } from "./popup.taro-DV32k5dP.js";
|
|
6
6
|
import { u as useConfig } from "./configprovider.taro-DA4GDDFu.js";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
8
8
|
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __rest } from "./tslib.es6-iWu3F_1J.js";
|
|
2
2
|
import React__default, { useState } from "react";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
import { P as Popup } from "./popup.taro-
|
|
4
|
+
import { P as Popup } from "./popup.taro-DV32k5dP.js";
|
|
5
5
|
import { O as OffsetContext } from "./context-4T-L2x0_.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
7
7
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { position: "left", width: "80%" });
|
|
@@ -4,7 +4,7 @@ import classNames from "classnames";
|
|
|
4
4
|
import { getEnv, usePageScroll, getSystemInfoSync } from "@tarojs/taro";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
6
6
|
import { g as getRectByTaro } from "./get-rect-by-taro-THaHH07X.js";
|
|
7
|
-
import { g as getScrollParent } from "./get-scroll-parent-
|
|
7
|
+
import { g as getScrollParent } from "./get-scroll-parent-DB1VRg11.js";
|
|
8
8
|
function useWatch(dep, callback, config = { immediate: false }) {
|
|
9
9
|
const { immediate } = config;
|
|
10
10
|
const prev = useRef();
|
|
@@ -71,7 +71,15 @@ const Sticky = (props) => {
|
|
|
71
71
|
zIndex
|
|
72
72
|
};
|
|
73
73
|
return style2;
|
|
74
|
-
}, [
|
|
74
|
+
}, [
|
|
75
|
+
fixed,
|
|
76
|
+
rootRect.height,
|
|
77
|
+
rootRect.width,
|
|
78
|
+
transform,
|
|
79
|
+
position,
|
|
80
|
+
threshold,
|
|
81
|
+
zIndex
|
|
82
|
+
]);
|
|
75
83
|
const handleScroll = (scrollTop) => __awaiter(void 0, void 0, void 0, function* () {
|
|
76
84
|
const curRootRect = yield getRectByTaro(rootRef.current);
|
|
77
85
|
const stickyRect = yield getRectByTaro(stickyRef.current);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __rest } from "./tslib.es6-iWu3F_1J.js";
|
|
2
2
|
import React__default, { useState } from "react";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
import { P as Popup } from "./popup.taro-
|
|
4
|
+
import { P as Popup } from "./popup.taro-DV32k5dP.js";
|
|
5
5
|
import { T as TimeDetail } from "./timedetail.taro-ya5JNy2L.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
7
7
|
import { u as useConfig } from "./configprovider.taro-DA4GDDFu.js";
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import React__default, { useRef, useEffect } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { Success, Failure, Tips, Loading } from "@nutui/icons-react-taro";
|
|
4
|
-
import { O as Overlay } from "./overlay.taro-
|
|
4
|
+
import { O as Overlay } from "./overlay.taro-C8eXSsJH.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
6
6
|
import { b as useParams, u as useCustomEvent, a as useCustomEventsPath, c as customEvents } from "./use-custom-event-DuP4onEm.js";
|
|
7
7
|
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
8
|
+
import { m as mergeProps } from "./merge-props-2rRqFlJz.js";
|
|
8
9
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { id: "", icon: null, iconSize: "20", content: "", msg: "", duration: 2, position: "center", type: "text", title: "", closeOnOverlayClick: false, lockScroll: false, contentClassName: "", size: "base", visible: false, wordBreak: "break-all", onClose: () => {
|
|
9
10
|
} });
|
|
10
11
|
const classPrefix = "nut-toast";
|
|
11
12
|
const Toast = (props) => {
|
|
12
|
-
const { params: { id, position, contentStyle, icon, iconSize, content, msg, duration, type, title, closeOnOverlayClick, lockScroll, contentClassName, visible, size, className, style, onClose, wordBreak }, setParams } = useParams(
|
|
13
|
+
const { params: { id, position, contentStyle, icon, iconSize, content, msg, duration, type, title, closeOnOverlayClick, lockScroll, contentClassName, visible, size, className, style, onClose, wordBreak }, setParams } = useParams(mergeProps(defaultProps, props));
|
|
13
14
|
const timer = useRef(-1);
|
|
14
15
|
const [innerVisible, setInnerVisible] = usePropsValue({
|
|
15
16
|
value: visible,
|
|
@@ -108,7 +109,6 @@ function hide(selector) {
|
|
|
108
109
|
const path = useCustomEventsPath(selector);
|
|
109
110
|
customEvents.trigger(path, { status: false });
|
|
110
111
|
}
|
|
111
|
-
Toast.defaultProps = defaultProps;
|
|
112
112
|
Toast.displayName = "NutToast";
|
|
113
113
|
Toast.show = show;
|
|
114
114
|
Toast.hide = hide;
|
|
@@ -2,7 +2,7 @@ import { _ as __rest } from "./tslib.es6-iWu3F_1J.js";
|
|
|
2
2
|
import React__default, { useState, useEffect } from "react";
|
|
3
3
|
import { Close } from "@nutui/icons-react-taro";
|
|
4
4
|
import classNames from "classnames";
|
|
5
|
-
import { P as Popover } from "./popover.taro-
|
|
5
|
+
import { P as Popover } from "./popover.taro-BvMcsCRf.js";
|
|
6
6
|
import Taro, { createSelectorQuery } from "@tarojs/taro";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
8
8
|
import { useConfig } from "./ConfigProvider.js";
|
|
@@ -206,7 +206,7 @@ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { url:
|
|
|
206
206
|
} });
|
|
207
207
|
const InternalUploader = (props, ref) => {
|
|
208
208
|
const { locale } = useConfig();
|
|
209
|
-
const _a = Object.assign(Object.assign({}, defaultProps), props), { children, uploadIcon, uploadLabel, accept, name, camera, defaultValue, value, previewType, fit, disabled, multiple, url, previewUrl, headers, timeout, method, xhrState, data, preview, deletable, maxCount, maxFileSize, mediaType, className, autoUpload, sizeType, sourceType, maxDuration, onStart, onDelete, onChange, onFileItemClick, onProgress, onSuccess, onUpdate, onFailure, onOversize, beforeXhrUpload, beforeDelete } = _a, restProps = __rest(_a, ["children", "uploadIcon", "uploadLabel", "accept", "name", "camera", "defaultValue", "value", "previewType", "fit", "disabled", "multiple", "url", "previewUrl", "headers", "timeout", "method", "xhrState", "data", "preview", "deletable", "maxCount", "maxFileSize", "mediaType", "className", "autoUpload", "sizeType", "sourceType", "maxDuration", "onStart", "onDelete", "onChange", "onFileItemClick", "onProgress", "onSuccess", "onUpdate", "onFailure", "onOversize", "beforeXhrUpload", "beforeDelete"]);
|
|
209
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { children, uploadIcon, uploadLabel, accept, name, camera, defaultValue, value, previewType, fit, disabled, multiple, url, previewUrl, headers, timeout, method, xhrState, data, preview, deletable, maxCount, maxFileSize, mediaType, className, autoUpload, sizeType, sourceType, maxDuration, onStart, onDelete, onChange, onFileItemClick, onProgress, onSuccess, onUpdate, onFailure, onOversize, beforeUpload, beforeXhrUpload, beforeDelete } = _a, restProps = __rest(_a, ["children", "uploadIcon", "uploadLabel", "accept", "name", "camera", "defaultValue", "value", "previewType", "fit", "disabled", "multiple", "url", "previewUrl", "headers", "timeout", "method", "xhrState", "data", "preview", "deletable", "maxCount", "maxFileSize", "mediaType", "className", "autoUpload", "sizeType", "sourceType", "maxDuration", "onStart", "onDelete", "onChange", "onFileItemClick", "onProgress", "onSuccess", "onUpdate", "onFailure", "onOversize", "beforeUpload", "beforeXhrUpload", "beforeDelete"]);
|
|
210
210
|
const [fileList, setFileList] = usePropsValue({
|
|
211
211
|
value,
|
|
212
212
|
defaultValue,
|
|
@@ -440,12 +440,30 @@ const InternalUploader = (props, ref) => {
|
|
|
440
440
|
const onChangeMedia = (res) => {
|
|
441
441
|
const { tempFiles } = res;
|
|
442
442
|
const _files = filterFiles(tempFiles);
|
|
443
|
-
|
|
443
|
+
if (beforeUpload) {
|
|
444
|
+
beforeUpload(new Array().slice.call(_files)).then((f) => {
|
|
445
|
+
const _files2 = filterFiles(new Array().slice.call(f));
|
|
446
|
+
if (!_files2.length)
|
|
447
|
+
res.tempFiles = [];
|
|
448
|
+
readFile(_files2);
|
|
449
|
+
});
|
|
450
|
+
} else {
|
|
451
|
+
readFile(_files);
|
|
452
|
+
}
|
|
444
453
|
};
|
|
445
454
|
const onChangeImage = (res) => {
|
|
446
455
|
const { tempFiles } = res;
|
|
447
456
|
const _files = filterFiles(tempFiles);
|
|
448
|
-
|
|
457
|
+
if (beforeUpload) {
|
|
458
|
+
beforeUpload(new Array().slice.call(_files)).then((f) => {
|
|
459
|
+
const _files2 = filterFiles(new Array().slice.call(f));
|
|
460
|
+
if (!_files2.length)
|
|
461
|
+
res.tempFiles = [];
|
|
462
|
+
readFile(_files2);
|
|
463
|
+
});
|
|
464
|
+
} else {
|
|
465
|
+
readFile(_files);
|
|
466
|
+
}
|
|
449
467
|
};
|
|
450
468
|
const handleItemClick = (file, index) => {
|
|
451
469
|
onFileItemClick === null || onFileItemClick === void 0 ? void 0 : onFileItemClick(file, index);
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/tr-TR.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED
package/dist/locales/zh-UG.js
CHANGED