@nutui/nutui-react-taro 2.3.11 → 2.3.12
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 +18 -0
- package/dist/esm/ActionSheet.js +1 -13
- package/dist/esm/Address.js +1 -21
- package/dist/esm/Animate.js +1 -4
- package/dist/esm/AnimatingNumbers.js +8 -22
- package/dist/esm/Audio.js +1 -15
- package/dist/esm/Avatar.js +1 -10
- package/dist/esm/AvatarCropper.js +1 -10
- package/dist/esm/AvatarGroup.js +1 -4
- package/dist/esm/BackTop.js +1 -6
- package/dist/esm/Badge.js +1 -4
- package/dist/esm/Barrage.js +1 -7
- package/dist/esm/Button.js +1 -6
- package/dist/esm/Calendar.js +1 -20
- package/dist/esm/CalendarCard.js +1 -8
- package/dist/esm/CalendarItem.js +1 -12
- package/dist/esm/Card.js +1 -7
- package/dist/esm/Cascader.js +1 -18
- package/dist/esm/Cell.js +1 -5
- package/dist/esm/CellGroup.js +1 -4
- package/dist/esm/Checkbox.js +1 -7
- package/dist/esm/CheckboxGroup.js +1 -7
- package/dist/esm/CircleProgress.js +1 -6
- package/dist/esm/Col.js +1 -5
- package/dist/esm/Collapse.js +1 -8
- package/dist/esm/CollapseItem.js +1 -5
- package/dist/esm/ConfigProvider.js +4 -6
- package/dist/esm/CountDown.js +1 -7
- package/dist/esm/DatePicker.js +1 -21
- package/dist/esm/Dialog.js +1 -16
- package/dist/esm/Divider.js +1 -4
- package/dist/esm/Drag.js +1 -4
- package/dist/esm/Elevator.js +1 -6
- package/dist/esm/Ellipsis.js +1 -7
- package/dist/esm/Empty.js +1 -9
- package/dist/esm/FixedNav.js +1 -13
- package/dist/esm/Form.js +7 -18
- package/dist/esm/FormItem.js +1 -6
- package/dist/esm/Grid.js +1 -7
- package/dist/esm/GridItem.js +1 -6
- package/dist/esm/Image.js +1 -7
- package/dist/esm/ImagePreview.js +1 -20
- package/dist/esm/Indicator.js +1 -3
- package/dist/esm/InfiniteLoading.js +1 -8
- package/dist/esm/Input.js +1 -11
- package/dist/esm/InputNumber.js +1 -7
- package/dist/esm/Layout.js +1 -2
- package/dist/esm/Loading.js +1 -5
- package/dist/esm/Menu.js +1 -15
- package/dist/esm/MenuItem.js +1 -14
- package/dist/esm/NavBar.js +1 -7
- package/dist/esm/NoticeBar.js +1 -7
- package/dist/esm/Notify.js +1 -9
- package/dist/esm/NumberKeyboard.js +1 -15
- package/dist/esm/Overlay.js +1 -9
- package/dist/esm/Pagination.js +1 -8
- package/dist/esm/Picker.js +1 -19
- package/dist/esm/Popover.js +1 -14
- package/dist/esm/Popup.js +1 -12
- package/dist/esm/Price.js +1 -3
- package/dist/esm/Progress.js +1 -4
- package/dist/esm/PullToRefresh.js +1 -10
- package/dist/esm/Radio.js +1 -7
- package/dist/esm/RadioGroup.js +1 -7
- package/dist/esm/Range.js +1 -10
- package/dist/esm/Rate.js +1 -11
- package/dist/esm/Row.js +1 -5
- package/dist/esm/SafeArea.js +1 -3
- package/dist/esm/SearchBar.js +1 -7
- package/dist/esm/ShortPassword.js +1 -17
- package/dist/esm/SideNavBar.js +1 -14
- package/dist/esm/SideNavBarItem.js +1 -2
- package/dist/esm/Signature.js +1 -4
- package/dist/esm/Skeleton.js +1 -11
- package/dist/esm/Space.js +1 -3
- package/dist/esm/Step.js +1 -6
- package/dist/esm/Steps.js +1 -5
- package/dist/esm/Sticky.js +1 -7
- package/dist/esm/SubSideNavBar.js +1 -3
- package/dist/esm/Swipe.js +1 -8
- package/dist/esm/Swiper.js +9 -11
- package/dist/esm/SwiperItem.js +1 -2
- package/dist/esm/Switch.js +1 -5
- package/dist/esm/TabPane.js +1 -3
- package/dist/esm/Tabbar.js +1 -8
- package/dist/esm/TabbarItem.js +1 -5
- package/dist/esm/Table.js +1 -9
- package/dist/esm/Tabs.js +1 -11
- package/dist/esm/Tag.js +1 -5
- package/dist/esm/TextArea.js +1 -10
- package/dist/esm/TimeDetail.js +1 -4
- package/dist/esm/TimeSelect.js +1 -16
- package/dist/esm/Toast.js +1 -15
- package/dist/esm/Tour.js +1 -16
- package/dist/esm/TrendArrow.js +1 -4
- package/dist/esm/Uploader.js +1 -14
- package/dist/esm/Video.js +1 -4
- package/dist/esm/VirtualList.js +1 -6
- package/dist/esm/WaterMark.js +1 -7
- package/dist/esm/{actionsheet.taro-kKhb0Vwt.js → actionsheet.taro-C5BqWoML.js} +9 -17
- package/dist/esm/{address.taro-zQuxQEce.js → address.taro-DjlXNWie.js} +19 -44
- package/dist/esm/{animate.taro-m67VyUHP.js → animate.taro-Dg9jxZEu.js} +6 -14
- package/dist/esm/{audio.taro-dJgj5qIu.js → audio.taro-DXxWGngO.js} +14 -30
- package/dist/esm/avatar.taro-a6CX3kxV.js +86 -0
- package/dist/esm/{avatarcropper.taro-GIZxzMJ_.js → avatarcropper.taro-BFvFmK4t.js} +47 -90
- package/dist/esm/{avatargroup.taro-h6dpv6UX.js → avatargroup.taro-bpT5kPbf.js} +3 -11
- package/dist/esm/{backtop.taro-Cfld7ina.js → backtop.taro-B-zl6AEC.js} +4 -15
- package/dist/esm/{badge.taro-993L861f.js → badge.taro-CyDqBb9Z.js} +4 -15
- package/dist/esm/{barrage.taro-6nbq7wtt.js → barrage.taro-BNOcZsJ1.js} +18 -28
- package/dist/esm/{button.taro-3IIFy1M2.js → button.taro-OKGsDVW7.js} +8 -23
- package/dist/esm/{calendar.taro-iNNHje7V.js → calendar.taro-DbHJEx4G.js} +12 -39
- package/dist/esm/{calendarcard.taro-9s7naGmU.js → calendarcard.taro-BHGCq5zX.js} +10 -14
- package/dist/esm/{calendaritem.taro-o6Z8OOGY.js → calendaritem.taro-B8tN2DYa.js} +11 -36
- package/dist/esm/{card.taro-p4PTy-IU.js → card.taro-uLorQW97.js} +7 -22
- package/dist/esm/{cascader.taro-M2nZWxiB.js → cascader.taro-CpofskUL.js} +47 -83
- package/dist/esm/{cell.taro-jD6MoFTj.js → cell.taro-CCnLF6RC.js} +9 -23
- package/dist/esm/{cellgroup.taro-08A3XAze.js → cellgroup.taro-Dz69kT6e.js} +5 -12
- package/dist/esm/{checkbox.taro-xMxWdpyI.js → checkbox.taro-D9F_HM7f.js} +19 -29
- package/dist/esm/{circleprogress.taro-myZgamBw.js → circleprogress.taro-CKSrzt8Q.js} +8 -22
- package/dist/esm/{col.taro-5FMpttLE.js → col.taro-C8DUuJYh.js} +5 -13
- package/dist/esm/{collapse.taro-sZibDygv.js → collapse.taro-BM0BsN30.js} +5 -14
- package/dist/esm/{collapseitem.taro-AaQ_msgd.js → collapseitem.taro-D_m4VEdG.js} +7 -16
- package/dist/esm/configprovider.taro-CyU_tvNJ.js +202 -0
- package/dist/esm/{countdown.taro-XZlfWBrA.js → countdown.taro-Dfa9kpmZ.js} +8 -18
- package/dist/esm/{datepicker.taro-DrXkqJkN.js → datepicker.taro-DshCn7Rn.js} +13 -25
- package/dist/esm/{dialog.taro-dmQGDu3o.js → dialog.taro-xsQhsC1V.js} +19 -19
- package/dist/esm/{divider.taro-H5fKry4P.js → divider.taro-DRcO_m9e.js} +5 -11
- package/dist/esm/{drag.taro-BwcleRuB.js → drag.taro-CcHIO07Y.js} +10 -18
- package/dist/esm/{elevator.taro-2nbUM3vH.js → elevator.taro-uhrF7ChY.js} +5 -17
- package/dist/esm/{ellipsis.taro-VApVqS_j.js → ellipsis.taro-B_mTyNyk.js} +25 -34
- package/dist/esm/{empty.taro-gwvOr1xf.js → empty.taro-Brkv6B2Z.js} +8 -18
- package/dist/esm/{fixednav.taro-QVBXysDj.js → fixednav.taro-WTBxWxOo.js} +10 -21
- package/dist/esm/formitem.taro-Brz5dj_8.js +330 -0
- package/dist/esm/{get-rect-by-taro-piSHvCGp.js → get-rect-by-taro-CSN0TGnD.js} +3 -2
- package/dist/esm/{grid.taro-3X-_AhXw.js → grid.taro-BA76RrgT.js} +5 -4
- package/dist/esm/{griditem.taro-TJDJVeQy.js → griditem.taro-JLddv9zD.js} +6 -11
- package/dist/esm/{image.taro-FfeikBlO.js → image.taro-BLz2WCva.js} +5 -6
- package/dist/esm/{imagepreview.taro--fVrJUOE.js → imagepreview.taro-Bb1TkBCV.js} +13 -31
- package/dist/esm/{indicator.taro-ZH6MICsS.js → indicator.taro-CpHZtD9p.js} +3 -5
- package/dist/esm/{infiniteloading.taro-BO0_y46K.js → infiniteloading.taro-Ccq4bEzk.js} +14 -21
- package/dist/esm/{input.taro-xCoGdppk.js → input.taro-BVC8gEuk.js} +14 -31
- package/dist/esm/{inputnumber.taro-WPpS0Xl9.js → inputnumber.taro-F3jNGr_V.js} +16 -27
- package/dist/esm/{layout.taro-lnN-wB0Y.js → layout.taro-BE2868d6.js} +1 -1
- package/dist/esm/{loading.taro-aHN6xLIT.js → loading.taro-CRF1z5wQ.js} +5 -8
- package/dist/esm/{menu.taro-ODwHYGFM.js → menu.taro-BAiJPGR7.js} +12 -25
- package/dist/esm/{menuitem.taro-9nyTDLpt.js → menuitem.taro-oLv6ZYC5.js} +15 -36
- package/dist/esm/{navbar.taro-AuKPDCaW.js → navbar.taro-B8u3DOE4.js} +14 -29
- package/dist/esm/{noticebar.taro-bHnEzTvL.js → noticebar.taro-CMdfOp2g.js} +16 -32
- package/dist/esm/{notify.taro-mA9KS8qh.js → notify.taro-jP7y9zMU.js} +6 -15
- package/dist/esm/{numberkeyboard.taro-bF6VCXry.js → numberkeyboard.taro-B9rMgy7D.js} +9 -16
- package/dist/esm/nutui-react.es.js +93 -118
- package/dist/esm/{overlay.taro-HsGeVyPh.js → overlay.taro-BaBu-3-F.js} +10 -22
- package/dist/esm/{pagination.taro-C4_Ey5KC.js → pagination.taro-DAK6ddag.js} +7 -19
- package/dist/esm/{picker.taro-csU3SZPF.js → picker.taro-Cmng9GW9.js} +34 -43
- package/dist/esm/{popover.taro-qldQwLPC.js → popover.taro-CcKwnX27.js} +23 -41
- package/dist/esm/{popup.taro-ObEUml4r.js → popup.taro-Iy_WQZ-m.js} +8 -32
- package/dist/esm/{price.taro-Z1zR8YWV.js → price.taro-UVRHPHRD.js} +5 -16
- package/dist/esm/{progress.taro-pStvlrbA.js → progress.taro-BOHykt7X.js} +8 -14
- package/dist/esm/{pulltorefresh.taro-2jER8Mat.js → pulltorefresh.taro-BJdQj5sL.js} +31 -47
- package/dist/esm/{radio.taro-EKJXMjnX.js → radio.taro-CjJgX9o2.js} +20 -33
- package/dist/esm/{range.taro-mDYY3SXA.js → range.taro-BxMDs5Cy.js} +20 -22
- package/dist/esm/{rate.taro-_5Mjd_EO.js → rate.taro-BABLqt4h.js} +7 -20
- package/dist/esm/{row.taro-IxNlKKQM.js → row.taro-D8chDydP.js} +4 -14
- package/dist/esm/{searchbar.taro-hVzdT6nI.js → searchbar.taro-PfVx6o-6.js} +9 -26
- package/dist/esm/{shortpassword.taro-JBWXzk6I.js → shortpassword.taro-BXsxku33.js} +9 -19
- package/dist/esm/{sidenavbar.taro-8qoGZg5n.js → sidenavbar.taro-eK5vaZPR.js} +7 -13
- package/dist/esm/sidenavbaritem.taro-L7HbsCLn.js +14 -0
- package/dist/esm/{signature.taro-y3qxnKMv.js → signature.taro-KPm_xs66.js} +11 -19
- package/dist/esm/{skeleton.taro--AtiA7MK.js → skeleton.taro-BwIDIf2p.js} +6 -17
- package/dist/esm/{space.taro-q3R_yq79.js → space.taro-CZ999etm.js} +1 -4
- package/dist/esm/{step.taro-_DEZqFGb.js → step.taro-DLr2GzYk.js} +8 -16
- package/dist/esm/steps.taro-C8Yg1Sns.js +28 -0
- package/dist/esm/{sticky.taro-p-evMNR-.js → sticky.taro-DRBk3gkQ.js} +12 -15
- package/dist/esm/{subsidenavbar.taro-Zy52MDDG.js → subsidenavbar.taro-ByxYpgfP.js} +7 -9
- package/dist/esm/{swipe.taro-p2ONOq1o.js → swipe.taro-wm7YWwaj.js} +29 -31
- package/dist/esm/{swiperitem.taro-BC1CE0T-.js → swiperitem.taro-8JXI24f0.js} +3 -1
- package/dist/esm/{switch.taro-L0BAbMeu.js → switch.taro-D1HgJoJz.js} +6 -13
- package/dist/esm/{tabbar.taro-QE0rjSKE.js → tabbar.taro-8_SmJofa.js} +7 -18
- package/dist/esm/tabbaritem.taro-Cb-yfOln.js +58 -0
- package/dist/esm/{table.taro-0zRh2hq6.js → table.taro-0BcEBB0F.js} +7 -18
- package/dist/esm/{tabpane.taro-5k7wWimS.js → tabpane.taro-BAe86j3t.js} +1 -4
- package/dist/esm/{tabs.taro-Yj7vgtSg.js → tabs.taro-HgAoKBAc.js} +14 -30
- package/dist/esm/{tag.taro-5KC_wObY.js → tag.taro-BsmY5QfN.js} +7 -22
- package/dist/esm/{textarea.taro-9zQLTCwU.js → textarea.taro-BJIFCpKb.js} +11 -20
- package/dist/esm/{timedetail.taro-TF9Wcblh.js → timedetail.taro-x6Zey1xi.js} +11 -21
- package/dist/esm/{timeselect.taro-j8LgSCe5.js → timeselect.taro-BXq4APSJ.js} +20 -33
- package/dist/esm/{toast.taro-xnEQSCDJ.js → toast.taro-BIR_7Wgb.js} +8 -26
- package/dist/esm/{tour.taro-CGEjzzN_.js → tour.taro-CMagdKcp.js} +7 -24
- package/dist/esm/{trendarrow.taro-hsM6-XsQ.js → trendarrow.taro-BHUetKSS.js} +6 -18
- package/dist/esm/tslib.es6-BZ8i9Q6l.js +47 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo1.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo2.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo3.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo4.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo5.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo6.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo7.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo8.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo9.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo1.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo10.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo2.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo3.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo4.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo5.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo6.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo7.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo8.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo9.d.ts +3 -0
- package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +1 -0
- package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/configprovider/index.d.ts +2 -2
- package/dist/esm/types/src/packages/configprovider/index.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/inputnumber/inputnumber.taro.d.ts +2 -0
- package/dist/esm/{uploader.taro-bRF02TR9.js → uploader.taro-CuaIVvya.js} +47 -99
- package/dist/esm/{use-custom-event-XvsODK8c.js → use-custom-event-DuP4onEm.js} +5 -5
- package/dist/esm/{use-props-value-vKr0R0AX.js → use-props-value-SH9krhkx.js} +2 -2
- package/dist/esm/{video.taro-csvHwS2v.js → video.taro-CEMVfhCS.js} +3 -5
- package/dist/esm/{virtuallist.taro-AeTVtFFa.js → virtuallist.taro-C5vZAyza.js} +7 -17
- package/dist/esm/{watermark.taro-nvSmcwu-.js → watermark.taro-BxM8VfXb.js} +5 -30
- 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 +305 -332
- package/dist/nutui.react.umd.js +306 -333
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +4 -0
- package/dist/types/index.d.ts +98 -98
- package/dist/types/packages/actionsheet/actionsheet.d.ts +1 -1
- package/dist/types/packages/actionsheet/actionsheet.taro.d.ts +1 -1
- package/dist/types/packages/address/address.d.ts +1 -1
- package/dist/types/packages/address/address.taro.d.ts +1 -1
- package/dist/types/packages/address/customRender.d.ts +1 -1
- package/dist/types/packages/address/customRender.taro.d.ts +1 -1
- package/dist/types/packages/avatar/avatar.d.ts +1 -1
- package/dist/types/packages/avatar/avatar.taro.d.ts +1 -1
- package/dist/types/packages/button/demos/h5/demo1.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo2.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo3.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo4.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo5.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo6.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo7.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo8.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo9.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo1.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo10.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo2.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo3.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo4.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo5.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo6.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo7.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo8.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo9.d.ts +3 -0
- package/dist/types/packages/calendaritem/calendaritem.d.ts +1 -1
- package/dist/types/packages/calendaritem/calendaritem.taro.d.ts +1 -1
- package/dist/types/packages/cascader/cascader.d.ts +1 -1
- package/dist/types/packages/cascader/cascader.taro.d.ts +1 -1
- package/dist/types/packages/cell/cell.d.ts +1 -1
- package/dist/types/packages/cell/cell.taro.d.ts +1 -1
- package/dist/types/packages/checkbox/checkbox.d.ts +2 -2
- package/dist/types/packages/checkbox/checkbox.taro.d.ts +2 -2
- package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +2 -2
- package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +2 -2
- package/dist/types/packages/configprovider/configprovider.d.ts +1 -0
- package/dist/types/packages/configprovider/configprovider.taro.d.ts +1 -0
- package/dist/types/packages/configprovider/index.d.ts +2 -2
- package/dist/types/packages/configprovider/index.taro.d.ts +2 -2
- package/dist/types/packages/datepicker/datepicker.d.ts +1 -1
- package/dist/types/packages/datepicker/datepicker.taro.d.ts +1 -1
- package/dist/types/packages/dialog/dialogwrap.d.ts +1 -1
- package/dist/types/packages/empty/empty.d.ts +1 -1
- package/dist/types/packages/empty/empty.taro.d.ts +15 -3
- package/dist/types/packages/fixednav/fixednav.d.ts +1 -1
- package/dist/types/packages/fixednav/fixednav.taro.d.ts +1 -1
- package/dist/types/packages/form/form.d.ts +1 -1
- package/dist/types/packages/form/form.taro.d.ts +1 -1
- package/dist/types/packages/form/index.d.ts +1 -1
- package/dist/types/packages/form/index.taro.d.ts +1 -1
- package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +6 -0
- package/dist/types/packages/menu/menu.d.ts +1 -1
- package/dist/types/packages/menu/menu.taro.d.ts +1 -1
- package/dist/types/packages/numberkeyboard/numberkeyboard.d.ts +1 -1
- package/dist/types/packages/numberkeyboard/numberkeyboard.taro.d.ts +1 -1
- package/dist/types/packages/nutui.react.build.d.ts +98 -98
- package/dist/types/packages/nutui.react.d.ts +98 -98
- package/dist/types/packages/nutui.react.taro.d.ts +98 -98
- package/dist/types/packages/picker/picker.d.ts +1 -1
- package/dist/types/packages/picker/picker.taro.d.ts +1 -1
- package/dist/types/packages/popover/popover.d.ts +1 -1
- package/dist/types/packages/popover/popover.taro.d.ts +1 -1
- package/dist/types/packages/popup/popup.d.ts +1 -1
- package/dist/types/packages/popup/popup.taro.d.ts +1 -1
- package/dist/types/packages/radio/radio.d.ts +2 -2
- package/dist/types/packages/radio/radio.taro.d.ts +2 -2
- package/dist/types/packages/shortpassword/shortpassword.d.ts +1 -1
- package/dist/types/packages/shortpassword/shortpassword.taro.d.ts +1 -1
- package/dist/types/packages/swiper/index.d.ts +1 -1
- package/dist/types/packages/swiper/index.taro.d.ts +1 -1
- package/dist/types/packages/tabs/tabs.d.ts +1 -1
- package/dist/types/packages/tabs/tabs.taro.d.ts +1 -1
- package/dist/types/packages/timedetail/timedetail.d.ts +1 -1
- package/dist/types/packages/timedetail/timedetail.taro.d.ts +1 -1
- package/dist/types/packages/tour/tour.d.ts +1 -1
- package/dist/types/packages/tour/tour.taro.d.ts +1 -1
- package/package.json +5 -1
- package/dist/esm/avatar.taro-7ltbzIdY.js +0 -109
- package/dist/esm/configprovider.taro-q5J2gQbi.js +0 -486
- package/dist/esm/formitem.taro-viaUkMmm.js +0 -1435
- package/dist/esm/index-oitVOJp9.js +0 -661
- package/dist/esm/sidenavbaritem.taro-AxJNRAdi.js +0 -13
- package/dist/esm/steps.taro-PH0qWPla.js +0 -32
- package/dist/esm/tabbaritem.taro-t9C07OYX.js +0 -73
- /package/dist/esm/{UserContext-9BL0cq8w.js → UserContext-BlM0373q.js} +0 -0
- /package/dist/esm/{context-6mGEMLsx.js → context-4T-L2x0_.js} +0 -0
- /package/dist/esm/{context-9BL0cq8w.js → context-BlM0373q.js} +0 -0
- /package/dist/esm/{date-nxKOxj5-.js → date-D0pth0qC.js} +0 -0
- /package/dist/esm/{get-scroll-parent-uywvoQMl.js → get-scroll-parent-DB1VRg11.js} +0 -0
- /package/dist/esm/{index-YvHA__3D.js → index-DeNfBlua.js} +0 -0
- /package/dist/esm/{pad-zero-iY-0-oys.js → pad-zero-B2OUQfh7.js} +0 -0
- /package/dist/esm/{px-check-JiWLYN2v.js → px-check-D1Xbd9pj.js} +0 -0
- /package/dist/esm/{raf-UzmDvMUW.js → raf-zwv-SBjP.js} +0 -0
- /package/dist/esm/{safearea.taro-afu_mY7g.js → safearea.taro-BMQHr7tu.js} +0 -0
- /package/dist/esm/{typings-buMpDfSR.js → typings-DV9RBfhj.js} +0 -0
- /package/dist/esm/{use-force-update-0oEVD8Nr.js → use-force-update-CudFjCsy.js} +0 -0
- /package/dist/esm/{use-refs-IdrY0ww3.js → use-refs-BeEmziIR.js} +0 -0
- /package/dist/esm/{use-touch-BUFdkOSA.js → use-touch-OfEaR5qi.js} +0 -0
|
@@ -1,22 +1,10 @@
|
|
|
1
|
+
import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
1
2
|
import React__default, { useRef } from "react";
|
|
2
3
|
import { TriangleUp, TriangleDown } from "@nutui/icons-react-taro";
|
|
3
|
-
import { C as ComponentDefaults } from "./typings-
|
|
4
|
-
const defaultProps = {
|
|
5
|
-
...ComponentDefaults,
|
|
6
|
-
value: 0,
|
|
7
|
-
digits: 2,
|
|
8
|
-
symbol: false,
|
|
9
|
-
zero: false,
|
|
10
|
-
left: false,
|
|
11
|
-
sync: true,
|
|
12
|
-
color: "#333",
|
|
13
|
-
riseColor: "var(--nutui-brand-6)",
|
|
14
|
-
dropColor: "var(--nutui-secondary-1)",
|
|
15
|
-
riseIcon: null,
|
|
16
|
-
dropIcon: null
|
|
17
|
-
};
|
|
4
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
5
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { value: 0, digits: 2, symbol: false, zero: false, left: false, sync: true, color: "#333", riseColor: "var(--nutui-brand-6)", dropColor: "var(--nutui-secondary-1)", riseIcon: null, dropIcon: null });
|
|
18
6
|
const TrendArrow = (props) => {
|
|
19
|
-
const { value, digits, symbol, zero, left, sync, color, riseColor, dropColor, riseIcon, dropIcon, className, style, children,
|
|
7
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { value, digits, symbol, zero, left, sync, color, riseColor, dropColor, riseIcon, dropIcon, className, style, children } = _a, rest = __rest(_a, ["value", "digits", "symbol", "zero", "left", "sync", "color", "riseColor", "dropColor", "riseIcon", "dropIcon", "className", "style", "children"]);
|
|
20
8
|
const classPrefix = "nut-trendarrow";
|
|
21
9
|
const rateTrend = useRef(value > 0);
|
|
22
10
|
const myFixed = (num, digit = 2) => {
|
|
@@ -24,7 +12,7 @@ const TrendArrow = (props) => {
|
|
|
24
12
|
return console.warn(`传入的值:${num}不是一个数字`);
|
|
25
13
|
}
|
|
26
14
|
num = parseFloat(num);
|
|
27
|
-
const numPow = 10
|
|
15
|
+
const numPow = Math.pow(10, digit);
|
|
28
16
|
return (Math.round((num + Number.EPSILON) * numPow) / numPow).toFixed(digit);
|
|
29
17
|
};
|
|
30
18
|
const calcStyle = (() => {
|
|
@@ -57,7 +45,7 @@ const TrendArrow = (props) => {
|
|
|
57
45
|
};
|
|
58
46
|
return React__default.createElement(
|
|
59
47
|
"div",
|
|
60
|
-
{ className: `${classPrefix} ${className}`, style,
|
|
48
|
+
Object.assign({ className: `${classPrefix} ${className}`, style }, rest),
|
|
61
49
|
!left && renderContent(!left),
|
|
62
50
|
Number(value) !== 0 && React__default.createElement(React__default.Fragment, null, rateTrend.current ? React__default.createElement(React__default.Fragment, null, riseIcon || React__default.createElement(TriangleUp, { color: calcIconProps.color })) : React__default.createElement(React__default.Fragment, null, dropIcon || React__default.createElement(TriangleDown, { color: calcIconProps.color }))),
|
|
63
51
|
left && renderContent(!left)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
function __rest(s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s)
|
|
4
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
}
|
|
13
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) {
|
|
15
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
16
|
+
resolve(value);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
20
|
+
function fulfilled(value) {
|
|
21
|
+
try {
|
|
22
|
+
step(generator.next(value));
|
|
23
|
+
} catch (e) {
|
|
24
|
+
reject(e);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function rejected(value) {
|
|
28
|
+
try {
|
|
29
|
+
step(generator["throw"](value));
|
|
30
|
+
} catch (e) {
|
|
31
|
+
reject(e);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function step(result) {
|
|
35
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
36
|
+
}
|
|
37
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
41
|
+
var e = new Error(message);
|
|
42
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
__rest as _,
|
|
46
|
+
__awaiter as a
|
|
47
|
+
};
|
|
@@ -14,4 +14,5 @@ export declare const defaultConfigRef: {
|
|
|
14
14
|
export declare const setDefaultConfig: (config: ConfigProviderProps) => void;
|
|
15
15
|
export declare const getDefaultConfig: () => ConfigProviderProps;
|
|
16
16
|
export declare const useConfig: () => ConfigProviderProps;
|
|
17
|
+
export declare const useRtl: () => boolean;
|
|
17
18
|
export declare const ConfigProvider: FunctionComponent<Partial<ConfigProviderProps & BasicComponent>>;
|
|
@@ -14,4 +14,5 @@ export declare const defaultConfigRef: {
|
|
|
14
14
|
export declare const setDefaultConfig: (config: ConfigProviderProps) => void;
|
|
15
15
|
export declare const getDefaultConfig: () => ConfigProviderProps;
|
|
16
16
|
export declare const useConfig: () => ConfigProviderProps;
|
|
17
|
+
export declare const useRtl: () => boolean;
|
|
17
18
|
export declare const ConfigProvider: FunctionComponent<Partial<ConfigProviderProps & BasicComponent>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConfigProvider, useConfig, setDefaultConfig, getDefaultConfig } from './configprovider';
|
|
1
|
+
import { ConfigProvider, useConfig, setDefaultConfig, getDefaultConfig, useRtl } from './configprovider';
|
|
2
2
|
export type { ConfigProviderProps, Direction } from './configprovider';
|
|
3
3
|
export type { NutCSSVariables } from './types';
|
|
4
|
-
export { useConfig, setDefaultConfig, getDefaultConfig };
|
|
4
|
+
export { useConfig, setDefaultConfig, getDefaultConfig, useRtl };
|
|
5
5
|
export default ConfigProvider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConfigProvider, useConfig, setDefaultConfig, getDefaultConfig } from './configprovider.taro';
|
|
1
|
+
import { ConfigProvider, useConfig, setDefaultConfig, getDefaultConfig, useRtl } from './configprovider.taro';
|
|
2
2
|
export type { ConfigProviderProps, Direction } from './configprovider.taro';
|
|
3
3
|
export type { NutCSSVariables } from './types';
|
|
4
|
-
export { useConfig, setDefaultConfig, getDefaultConfig };
|
|
4
|
+
export { useConfig, setDefaultConfig, getDefaultConfig, useRtl };
|
|
5
5
|
export default ConfigProvider;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent, ChangeEvent } from 'react';
|
|
2
|
+
import { InputProps } from '@tarojs/components';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export interface InputNumberProps extends BasicComponent {
|
|
4
5
|
value: number | string;
|
|
@@ -6,6 +7,7 @@ export interface InputNumberProps extends BasicComponent {
|
|
|
6
7
|
allowEmpty: boolean;
|
|
7
8
|
min: number | string;
|
|
8
9
|
max: number | string;
|
|
10
|
+
type?: Extract<InputProps['type'], 'number' | 'digit'>;
|
|
9
11
|
disabled: boolean;
|
|
10
12
|
readOnly: boolean;
|
|
11
13
|
step: number;
|
|
@@ -1,38 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
1
|
+
import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
7
2
|
import React__default, { useState, useImperativeHandle } from "react";
|
|
8
3
|
import classNames from "classnames";
|
|
9
4
|
import Taro, { uploadFile, getEnv, chooseMedia, chooseImage } from "@tarojs/taro";
|
|
10
5
|
import { Failure, Link, Del, Loading, Photograph } from "@nutui/icons-react-taro";
|
|
11
|
-
import { B as Button } from "./button.taro-
|
|
12
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
13
|
-
import { a as isPromise } from "./index-
|
|
14
|
-
import { C as ComponentDefaults } from "./typings-
|
|
15
|
-
import { u as usePropsValue } from "./use-props-value-
|
|
6
|
+
import { B as Button } from "./button.taro-OKGsDVW7.js";
|
|
7
|
+
import { u as useConfig } from "./configprovider.taro-CyU_tvNJ.js";
|
|
8
|
+
import { a as isPromise } from "./index-DeNfBlua.js";
|
|
9
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
10
|
+
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
16
11
|
import { Image } from "@tarojs/components";
|
|
17
|
-
import { P as Progress } from "./progress.taro-
|
|
12
|
+
import { P as Progress } from "./progress.taro-BOHykt7X.js";
|
|
18
13
|
class UploadOptions {
|
|
19
14
|
constructor() {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
__publicField(this, "headers", {});
|
|
29
|
-
__publicField(this, "withCredentials", false);
|
|
30
|
-
__publicField(this, "onStart");
|
|
31
|
-
__publicField(this, "taroFilePath");
|
|
32
|
-
__publicField(this, "onProgress");
|
|
33
|
-
__publicField(this, "onSuccess");
|
|
34
|
-
__publicField(this, "onFailure");
|
|
35
|
-
__publicField(this, "beforeXhrUpload");
|
|
15
|
+
this.url = "";
|
|
16
|
+
this.name = "file";
|
|
17
|
+
this.fileType = "image";
|
|
18
|
+
this.method = "post";
|
|
19
|
+
this.xhrState = 200;
|
|
20
|
+
this.timeout = 30 * 1e3;
|
|
21
|
+
this.headers = {};
|
|
22
|
+
this.withCredentials = false;
|
|
36
23
|
}
|
|
37
24
|
}
|
|
38
25
|
const UPLOADING = "uploading";
|
|
@@ -40,7 +27,6 @@ const SUCCESS = "success";
|
|
|
40
27
|
const ERROR = "error";
|
|
41
28
|
class Upload {
|
|
42
29
|
constructor(options) {
|
|
43
|
-
__publicField(this, "options");
|
|
44
30
|
this.options = options;
|
|
45
31
|
}
|
|
46
32
|
upload() {
|
|
@@ -51,15 +37,15 @@ class Upload {
|
|
|
51
37
|
if (xhr.upload) {
|
|
52
38
|
xhr.upload.addEventListener("progress", (e) => {
|
|
53
39
|
var _a2;
|
|
54
|
-
(_a2 = options.onProgress)
|
|
40
|
+
(_a2 = options.onProgress) === null || _a2 === void 0 ? void 0 : _a2.call(options, e, options);
|
|
55
41
|
}, false);
|
|
56
42
|
xhr.onreadystatechange = () => {
|
|
57
43
|
var _a2, _b;
|
|
58
44
|
if (xhr.readyState === 4) {
|
|
59
45
|
if (xhr.status === options.xhrState) {
|
|
60
|
-
(_a2 = options.onSuccess)
|
|
46
|
+
(_a2 = options.onSuccess) === null || _a2 === void 0 ? void 0 : _a2.call(options, xhr.responseText, options);
|
|
61
47
|
} else {
|
|
62
|
-
(_b = options.onFailure)
|
|
48
|
+
(_b = options.onFailure) === null || _b === void 0 ? void 0 : _b.call(options, xhr.responseText, options);
|
|
63
49
|
}
|
|
64
50
|
}
|
|
65
51
|
};
|
|
@@ -68,7 +54,7 @@ class Upload {
|
|
|
68
54
|
for (const [key, value] of Object.entries(options.headers)) {
|
|
69
55
|
xhr.setRequestHeader(key, value);
|
|
70
56
|
}
|
|
71
|
-
(_a = options.onStart)
|
|
57
|
+
(_a = options.onStart) === null || _a === void 0 ? void 0 : _a.call(options, options);
|
|
72
58
|
if (options.beforeXhrUpload) {
|
|
73
59
|
options.beforeXhrUpload(xhr, options);
|
|
74
60
|
} else {
|
|
@@ -95,29 +81,26 @@ class UploaderTaro extends Upload {
|
|
|
95
81
|
url: options.url,
|
|
96
82
|
filePath: options.taroFilePath,
|
|
97
83
|
fileType: options.fileType,
|
|
98
|
-
header: {
|
|
99
|
-
"Content-Type": "multipart/form-data",
|
|
100
|
-
...options.headers
|
|
101
|
-
},
|
|
84
|
+
header: Object.assign({ "Content-Type": "multipart/form-data" }, options.headers),
|
|
102
85
|
formData: options.formData,
|
|
103
86
|
name: options.name,
|
|
104
87
|
success(response) {
|
|
105
88
|
var _a2, _b;
|
|
106
89
|
if (options.xhrState === response.statusCode) {
|
|
107
|
-
(_a2 = options.onSuccess)
|
|
90
|
+
(_a2 = options.onSuccess) === null || _a2 === void 0 ? void 0 : _a2.call(options, response, options);
|
|
108
91
|
} else {
|
|
109
|
-
(_b = options.onFailure)
|
|
92
|
+
(_b = options.onFailure) === null || _b === void 0 ? void 0 : _b.call(options, response, options);
|
|
110
93
|
}
|
|
111
94
|
},
|
|
112
95
|
fail(e) {
|
|
113
96
|
var _a2;
|
|
114
|
-
(_a2 = options.onFailure)
|
|
97
|
+
(_a2 = options.onFailure) === null || _a2 === void 0 ? void 0 : _a2.call(options, e, options);
|
|
115
98
|
}
|
|
116
99
|
});
|
|
117
|
-
(_a = options.onStart)
|
|
100
|
+
(_a = options.onStart) === null || _a === void 0 ? void 0 : _a.call(options, options);
|
|
118
101
|
uploadTask.progress((res) => {
|
|
119
102
|
var _a2;
|
|
120
|
-
(_a2 = options.onProgress)
|
|
103
|
+
(_a2 = options.onProgress) === null || _a2 === void 0 ? void 0 : _a2.call(options, res, options);
|
|
121
104
|
});
|
|
122
105
|
}
|
|
123
106
|
}
|
|
@@ -145,18 +128,11 @@ const funcInterceptor = (interceptor, { args = [], done, canceled }) => {
|
|
|
145
128
|
};
|
|
146
129
|
class FileItem {
|
|
147
130
|
constructor() {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
__publicField(this, "type");
|
|
154
|
-
__publicField(this, "path");
|
|
155
|
-
__publicField(this, "percentage", 0);
|
|
156
|
-
__publicField(this, "formData", {});
|
|
157
|
-
__publicField(this, "responseText");
|
|
158
|
-
__publicField(this, "loadingIcon");
|
|
159
|
-
__publicField(this, "failIcon");
|
|
131
|
+
this.status = "ready";
|
|
132
|
+
this.message = "准备中..";
|
|
133
|
+
this.uid = (/* @__PURE__ */ new Date()).getTime().toString();
|
|
134
|
+
this.percentage = 0;
|
|
135
|
+
this.formData = {};
|
|
160
136
|
}
|
|
161
137
|
}
|
|
162
138
|
const Preview = ({ fileList, previewType, deletable, onDeleteItem, handleItemClick, previewUrl, children }) => {
|
|
@@ -185,7 +161,7 @@ const Preview = ({ fileList, previewType, deletable, onDeleteItem, handleItemCli
|
|
|
185
161
|
renderIcon(item),
|
|
186
162
|
React__default.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)
|
|
187
163
|
),
|
|
188
|
-
((_a = item.type)
|
|
164
|
+
((_a = item.type) === null || _a === void 0 ? void 0 : _a.includes("image")) ? React__default.createElement(React__default.Fragment, null, item.url && React__default.createElement(Image, { className: "nut-uploader-preview-img-c", style: { objectFit: "fill" }, mode: "aspectFit", src: item.url, onClick: () => handleItemClick(item, index) })) : React__default.createElement(React__default.Fragment, null, previewUrl ? React__default.createElement(Image, { className: "nut-uploader-preview-img-c", mode: "aspectFit", src: previewUrl, onClick: () => handleItemClick(item, index) }) : React__default.createElement(
|
|
189
165
|
"div",
|
|
190
166
|
{ className: "nut-uploader-preview-img-file" },
|
|
191
167
|
React__default.createElement(
|
|
@@ -222,46 +198,18 @@ const Preview = ({ fileList, previewType, deletable, onDeleteItem, handleItemCli
|
|
|
222
198
|
);
|
|
223
199
|
}));
|
|
224
200
|
};
|
|
225
|
-
const defaultProps = {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
maxCount: 1,
|
|
229
|
-
sizeType: ["original", "compressed"],
|
|
230
|
-
sourceType: ["album", "camera"],
|
|
231
|
-
mediaType: ["image", "video"],
|
|
232
|
-
camera: "back",
|
|
233
|
-
uploadIcon: React__default.createElement(Photograph, { size: "20px", color: "#808080" }),
|
|
234
|
-
uploadLabel: "",
|
|
235
|
-
previewType: "picture",
|
|
236
|
-
fit: "cover",
|
|
237
|
-
name: "file",
|
|
238
|
-
accept: "*",
|
|
239
|
-
disabled: false,
|
|
240
|
-
autoUpload: true,
|
|
241
|
-
multiple: false,
|
|
242
|
-
maxFileSize: Number.MAX_VALUE,
|
|
243
|
-
data: {},
|
|
244
|
-
headers: {},
|
|
245
|
-
method: "post",
|
|
246
|
-
previewUrl: "",
|
|
247
|
-
xhrState: 200,
|
|
248
|
-
timeout: 1e3 * 30,
|
|
249
|
-
preview: true,
|
|
250
|
-
deletable: true,
|
|
251
|
-
maxDuration: 10,
|
|
252
|
-
beforeDelete: (file, files) => {
|
|
253
|
-
return true;
|
|
254
|
-
}
|
|
255
|
-
};
|
|
201
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { url: "", maxCount: 1, sizeType: ["original", "compressed"], sourceType: ["album", "camera"], mediaType: ["image", "video"], camera: "back", uploadIcon: React__default.createElement(Photograph, { size: "20px", color: "#808080" }), uploadLabel: "", previewType: "picture", fit: "cover", name: "file", accept: "*", disabled: false, autoUpload: true, multiple: false, maxFileSize: Number.MAX_VALUE, data: {}, headers: {}, method: "post", previewUrl: "", xhrState: 200, timeout: 1e3 * 30, preview: true, deletable: true, maxDuration: 10, beforeDelete: (file, files) => {
|
|
202
|
+
return true;
|
|
203
|
+
} });
|
|
256
204
|
const InternalUploader = (props, ref) => {
|
|
257
205
|
const { locale } = useConfig();
|
|
258
|
-
const { 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,
|
|
206
|
+
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"]);
|
|
259
207
|
const [fileList, setFileList] = usePropsValue({
|
|
260
208
|
value,
|
|
261
209
|
defaultValue,
|
|
262
210
|
finalValue: [],
|
|
263
211
|
onChange: (v) => {
|
|
264
|
-
onChange
|
|
212
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(v);
|
|
265
213
|
}
|
|
266
214
|
});
|
|
267
215
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
@@ -293,7 +241,7 @@ const InternalUploader = (props, ref) => {
|
|
|
293
241
|
if (Taro.getEnv() === "WEB") {
|
|
294
242
|
const el = document.getElementById("taroChooseImage");
|
|
295
243
|
if (el) {
|
|
296
|
-
el
|
|
244
|
+
el === null || el === void 0 ? void 0 : el.setAttribute("accept", accept);
|
|
297
245
|
} else {
|
|
298
246
|
const obj = document.createElement("input");
|
|
299
247
|
obj.setAttribute("type", "file");
|
|
@@ -382,7 +330,7 @@ const InternalUploader = (props, ref) => {
|
|
|
382
330
|
return item;
|
|
383
331
|
});
|
|
384
332
|
setFileList(list);
|
|
385
|
-
onSuccess
|
|
333
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess({
|
|
386
334
|
responseText,
|
|
387
335
|
option,
|
|
388
336
|
files: list
|
|
@@ -398,7 +346,7 @@ const InternalUploader = (props, ref) => {
|
|
|
398
346
|
return item;
|
|
399
347
|
});
|
|
400
348
|
setFileList(list);
|
|
401
|
-
onFailure
|
|
349
|
+
onFailure === null || onFailure === void 0 ? void 0 : onFailure({
|
|
402
350
|
responseText,
|
|
403
351
|
option,
|
|
404
352
|
files: list
|
|
@@ -416,7 +364,7 @@ const InternalUploader = (props, ref) => {
|
|
|
416
364
|
};
|
|
417
365
|
const readFile = (files) => {
|
|
418
366
|
files.forEach((file, index) => {
|
|
419
|
-
var
|
|
367
|
+
var _a2, _b;
|
|
420
368
|
let fileType = file.type;
|
|
421
369
|
const filepath = file.tempFilePath || file.path;
|
|
422
370
|
const fileItem = new FileItem();
|
|
@@ -440,8 +388,8 @@ const InternalUploader = (props, ref) => {
|
|
|
440
388
|
formData.append(key, value2);
|
|
441
389
|
}
|
|
442
390
|
formData.append(name, file.originalFileObj);
|
|
443
|
-
fileItem.name = (
|
|
444
|
-
fileItem.type = (_b = file.originalFileObj)
|
|
391
|
+
fileItem.name = (_a2 = file.originalFileObj) === null || _a2 === void 0 ? void 0 : _a2.name;
|
|
392
|
+
fileItem.type = (_b = file.originalFileObj) === null || _b === void 0 ? void 0 : _b.type;
|
|
445
393
|
fileItem.formData = formData;
|
|
446
394
|
} else {
|
|
447
395
|
fileItem.formData = data;
|
|
@@ -476,7 +424,7 @@ const InternalUploader = (props, ref) => {
|
|
|
476
424
|
};
|
|
477
425
|
const deleted = (file, index) => {
|
|
478
426
|
const deletedFileList = fileList.filter((file2, idx) => idx !== index);
|
|
479
|
-
onDelete
|
|
427
|
+
onDelete === null || onDelete === void 0 ? void 0 : onDelete(file, deletedFileList);
|
|
480
428
|
setFileList(deletedFileList);
|
|
481
429
|
};
|
|
482
430
|
const onDeleteItem = (file, index) => {
|
|
@@ -497,11 +445,11 @@ const InternalUploader = (props, ref) => {
|
|
|
497
445
|
readFile(_files);
|
|
498
446
|
};
|
|
499
447
|
const handleItemClick = (file, index) => {
|
|
500
|
-
onFileItemClick
|
|
448
|
+
onFileItemClick === null || onFileItemClick === void 0 ? void 0 : onFileItemClick(file, index);
|
|
501
449
|
};
|
|
502
450
|
return React__default.createElement(
|
|
503
451
|
"div",
|
|
504
|
-
{ className: classes,
|
|
452
|
+
Object.assign({ className: classes }, restProps),
|
|
505
453
|
(children || previewType === "list") && React__default.createElement(
|
|
506
454
|
"div",
|
|
507
455
|
{ className: "nut-uploader-slot" },
|
|
@@ -512,7 +460,7 @@ const InternalUploader = (props, ref) => {
|
|
|
512
460
|
maxCount > fileList.length && React__default.createElement(Button, { className: "nut-uploader-input", onClick: _chooseImage })
|
|
513
461
|
)
|
|
514
462
|
),
|
|
515
|
-
React__default.createElement(Preview, {
|
|
463
|
+
React__default.createElement(Preview, Object.assign({}, {
|
|
516
464
|
fileList,
|
|
517
465
|
previewType,
|
|
518
466
|
deletable,
|
|
@@ -520,7 +468,7 @@ const InternalUploader = (props, ref) => {
|
|
|
520
468
|
handleItemClick,
|
|
521
469
|
previewUrl,
|
|
522
470
|
children
|
|
523
|
-
}
|
|
471
|
+
})),
|
|
524
472
|
maxCount > fileList.length && previewType === "picture" && !children && React__default.createElement(
|
|
525
473
|
"div",
|
|
526
474
|
{ className: `nut-uploader-upload ${previewType} ${disabled ? "nut-uploader-upload-disabled" : ""}` },
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useEffect, useRef } from "react";
|
|
2
|
-
import
|
|
2
|
+
import isequal from "lodash.isequal";
|
|
3
3
|
import { Events, getCurrentInstance } from "@tarojs/taro";
|
|
4
|
-
import { u as useForceUpdate } from "./use-force-update-
|
|
4
|
+
import { u as useForceUpdate } from "./use-force-update-CudFjCsy.js";
|
|
5
5
|
const customEvents = new Events();
|
|
6
6
|
function useCustomEventsPath(selector) {
|
|
7
7
|
var _a;
|
|
8
8
|
selector = selector || "";
|
|
9
|
-
const path = (_a = getCurrentInstance().router)
|
|
9
|
+
const path = (_a = getCurrentInstance().router) === null || _a === void 0 ? void 0 : _a.path;
|
|
10
10
|
return path ? `${path}__${selector}` : selector;
|
|
11
11
|
}
|
|
12
12
|
function useCustomEvent(selector, cb) {
|
|
@@ -30,13 +30,13 @@ function useParams(args) {
|
|
|
30
30
|
const stateRef = useRef(args);
|
|
31
31
|
const currentRef = useRef();
|
|
32
32
|
const previousRef = useRef();
|
|
33
|
-
if (!
|
|
33
|
+
if (!isequal(currentRef.current, args)) {
|
|
34
34
|
previousRef.current = currentRef.current;
|
|
35
35
|
currentRef.current = args;
|
|
36
36
|
stateRef.current = args;
|
|
37
37
|
}
|
|
38
38
|
const setParams = (args2) => {
|
|
39
|
-
stateRef.current = {
|
|
39
|
+
stateRef.current = Object.assign(Object.assign({}, stateRef.current), args2);
|
|
40
40
|
forceUpdate();
|
|
41
41
|
};
|
|
42
42
|
const params = stateRef.current;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef, useCallback } from "react";
|
|
2
|
-
import { u as useForceUpdate } from "./use-force-update-
|
|
2
|
+
import { u as useForceUpdate } from "./use-force-update-CudFjCsy.js";
|
|
3
3
|
function usePropsValue({ value, defaultValue, finalValue, onChange = (value2) => {
|
|
4
4
|
} }) {
|
|
5
5
|
const forceUpdate = useForceUpdate();
|
|
@@ -13,7 +13,7 @@ function usePropsValue({ value, defaultValue, finalValue, onChange = (value2) =>
|
|
|
13
13
|
stateRef.current = v;
|
|
14
14
|
if (prevState !== stateRef.current || forceTrigger) {
|
|
15
15
|
forceUpdate();
|
|
16
|
-
onChange
|
|
16
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(v);
|
|
17
17
|
}
|
|
18
18
|
}, [value, onChange]);
|
|
19
19
|
return [stateRef.current, setState];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
1
2
|
import React__default from "react";
|
|
2
3
|
import classNames from "classnames";
|
|
3
4
|
import { View, Video as Video$1 } from "@tarojs/components";
|
|
@@ -17,15 +18,12 @@ const defaultProps = {
|
|
|
17
18
|
};
|
|
18
19
|
const classPrefix = `nut-video`;
|
|
19
20
|
const Video = (props) => {
|
|
20
|
-
const { children, source, options, className, style, onPlay, onPause, onPlayEnd,
|
|
21
|
-
...defaultProps,
|
|
22
|
-
...props
|
|
23
|
-
};
|
|
21
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { children, source, options, className, style, onPlay, onPause, onPlayEnd } = _a, restProps = __rest(_a, ["children", "source", "options", "className", "style", "onPlay", "onPause", "onPlayEnd"]);
|
|
24
22
|
const classes = classNames(classPrefix, className);
|
|
25
23
|
return React__default.createElement(
|
|
26
24
|
View,
|
|
27
25
|
{ className: classes, style },
|
|
28
|
-
React__default.createElement(Video$1, { className: "nut-video-player", muted: options.muted, autoplay: options.autoplay, loop: options.loop, poster: options.poster, controls: options.controls, src: source.src, onPlay, onPause, onEnded: onPlayEnd,
|
|
26
|
+
React__default.createElement(Video$1, Object.assign({ className: "nut-video-player", muted: options.muted, autoplay: options.autoplay, loop: options.loop, poster: options.poster, controls: options.controls, src: source.src, onPlay, onPause, onEnded: onPlayEnd }, restProps))
|
|
29
27
|
);
|
|
30
28
|
};
|
|
31
29
|
Video.defaultProps = defaultProps;
|