@nutui/nutui-react-taro 2.3.10 → 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 +27 -0
- package/dist/esm/ActionSheet/style/style.css +1 -1
- package/dist/esm/ActionSheet.js +1 -13
- package/dist/esm/Address/style/style.css +1 -1
- package/dist/esm/Address.js +1 -21
- package/dist/esm/Animate/style/style.css +1 -1
- package/dist/esm/Animate.js +1 -4
- package/dist/esm/AnimatingNumbers.js +8 -22
- package/dist/esm/Audio/style/style.css +1 -1
- 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/style/style.css +1 -1
- package/dist/esm/Badge.js +1 -4
- package/dist/esm/Barrage/style/style.css +1 -1
- package/dist/esm/Barrage.js +1 -7
- package/dist/esm/Button.js +1 -6
- package/dist/esm/Calendar/style/style.css +1 -1
- 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/style/style.css +1 -1
- package/dist/esm/Card.js +1 -7
- package/dist/esm/Cascader/style/style.css +1 -1
- 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/style/style.css +1 -1
- package/dist/esm/Checkbox.js +1 -7
- package/dist/esm/CheckboxGroup/style/style.css +1 -1
- package/dist/esm/CheckboxGroup.js +1 -7
- package/dist/esm/CircleProgress.js +1 -6
- package/dist/esm/Col/style/style.css +1 -1
- package/dist/esm/Col.js +1 -5
- package/dist/esm/Collapse/style/style.css +1 -1
- package/dist/esm/Collapse.js +1 -8
- package/dist/esm/CollapseItem/style/style.css +1 -1
- 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/style/style.css +1 -1
- package/dist/esm/DatePicker.js +1 -21
- package/dist/esm/Dialog/style/style.css +1 -1
- package/dist/esm/Dialog.js +1 -16
- package/dist/esm/Divider/style/style.css +1 -1
- 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/style/style.css +1 -1
- package/dist/esm/Form.js +7 -18
- package/dist/esm/FormItem/style/style.css +1 -1
- package/dist/esm/FormItem.js +1 -6
- package/dist/esm/Grid/style/style.css +1 -1
- package/dist/esm/Grid.js +1 -7
- package/dist/esm/GridItem/style/style.css +1 -1
- package/dist/esm/GridItem.js +1 -6
- package/dist/esm/Image.js +1 -7
- package/dist/esm/ImagePreview/style/style.css +1 -1
- package/dist/esm/ImagePreview.js +1 -20
- package/dist/esm/Indicator/style/style.css +1 -1
- 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/style/style.css +1 -1
- package/dist/esm/Menu.js +1 -15
- package/dist/esm/MenuItem/style/style.css +1 -1
- package/dist/esm/MenuItem.js +1 -14
- package/dist/esm/NavBar/style/style.css +1 -1
- package/dist/esm/NavBar.js +1 -7
- package/dist/esm/NoticeBar/style/style.css +1 -1
- package/dist/esm/NoticeBar.js +1 -7
- package/dist/esm/Notify.js +1 -9
- package/dist/esm/NumberKeyboard/style/style.css +1 -1
- 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/style/style.css +1 -1
- package/dist/esm/Picker.js +1 -19
- package/dist/esm/Popover/style/style.css +1 -1
- package/dist/esm/Popover.js +1 -14
- package/dist/esm/Popup/style/style.css +1 -1
- package/dist/esm/Popup.js +1 -12
- package/dist/esm/Price/style/style.css +1 -1
- 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/style/style.css +1 -1
- package/dist/esm/Radio.js +1 -7
- package/dist/esm/RadioGroup/style/style.css +1 -1
- package/dist/esm/RadioGroup.js +1 -7
- package/dist/esm/Range/style/style.css +1 -1
- 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/style/style.css +1 -1
- package/dist/esm/SearchBar.js +1 -7
- package/dist/esm/ShortPassword/style/style.css +1 -1
- package/dist/esm/ShortPassword.js +1 -17
- package/dist/esm/SideNavBar/style/style.css +1 -1
- 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/style/style.css +1 -1
- package/dist/esm/Skeleton.js +1 -11
- package/dist/esm/Space.js +1 -3
- package/dist/esm/Step/style/style.css +1 -1
- package/dist/esm/Step.js +1 -6
- package/dist/esm/Steps/style/style.css +1 -1
- 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/style/style.css +1 -1
- package/dist/esm/Swipe.js +1 -8
- package/dist/esm/Swiper/style/style.css +1 -1
- package/dist/esm/Swiper.js +9 -11
- package/dist/esm/SwiperItem.js +1 -2
- package/dist/esm/Switch/style/style.css +1 -1
- package/dist/esm/Switch.js +1 -5
- package/dist/esm/TabPane.js +1 -3
- package/dist/esm/Tabbar/style/style.css +1 -1
- package/dist/esm/Tabbar.js +1 -8
- package/dist/esm/TabbarItem/style/style.css +1 -1
- package/dist/esm/TabbarItem.js +1 -5
- package/dist/esm/Table/style/style.css +1 -1
- package/dist/esm/Table.js +1 -9
- package/dist/esm/Tabs/style/style.css +1 -1
- package/dist/esm/Tabs.js +1 -11
- package/dist/esm/Tag.js +1 -5
- package/dist/esm/TextArea/style/style.css +1 -1
- package/dist/esm/TextArea.js +1 -10
- package/dist/esm/TimeDetail.js +1 -4
- package/dist/esm/TimeSelect/style/style.css +1 -1
- package/dist/esm/TimeSelect.js +1 -16
- package/dist/esm/Toast.js +1 -15
- package/dist/esm/Tour/style/style.css +1 -1
- 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/style/style.css +1 -1
- package/dist/esm/VirtualList.js +1 -6
- package/dist/esm/WaterMark.js +1 -7
- package/dist/esm/{actionsheet.taro-6NiOrNyd.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-Y3vOJiXq.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-YoPsV-op.js → input.taro-BVC8gEuk.js} +17 -31
- package/dist/esm/inputnumber.taro-F3jNGr_V.js +158 -0
- 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-ECs_E1Xn.js → shortpassword.taro-BXsxku33.js} +10 -20
- 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-Pg7WtP0e.js → skeleton.taro-BwIDIf2p.js} +8 -19
- 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.d.ts +15 -15
- package/dist/esm/types/src/packages/inputnumber/inputnumber.taro.d.ts +17 -17
- 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 +439 -497
- package/dist/nutui.react.umd.js +440 -498
- package/dist/packages/animate/animate.scss +0 -27
- package/dist/packages/audio/audio.scss +0 -5
- package/dist/packages/avatarcropper/avatarcropper.scss +0 -2
- package/dist/packages/badge/badge.scss +7 -0
- package/dist/packages/barrage/barrage.scss +22 -3
- package/dist/packages/button/button.scss +0 -1
- package/dist/packages/calendar/calendar.scss +4 -4
- package/dist/packages/calendarcard/calendarcard.scss +0 -1
- package/dist/packages/cascader/cascader.scss +0 -1
- package/dist/packages/checkbox/checkbox.scss +0 -2
- package/dist/packages/checkboxgroup/checkboxgroup.scss +1 -3
- package/dist/packages/col/col.scss +2 -2
- package/dist/packages/collapseitem/collapseitem.scss +2 -3
- package/dist/packages/dialog/dialog.scss +4 -0
- package/dist/packages/divider/divider.scss +1 -1
- package/dist/packages/fixednav/fixednav.scss +0 -2
- package/dist/packages/form/form.scss +24 -26
- package/dist/packages/formitem/formitem.scss +0 -1
- package/dist/packages/grid/grid.scss +1 -1
- package/dist/packages/griditem/griditem.scss +28 -26
- package/dist/packages/imagepreview/imagepreview.scss +0 -1
- package/dist/packages/indicator/indicator.scss +2 -3
- package/dist/packages/menu/menu.scss +0 -7
- package/dist/packages/menuitem/menuitem.scss +14 -10
- package/dist/packages/navbar/navbar.scss +3 -5
- package/dist/packages/noticebar/noticebar.scss +20 -0
- package/dist/packages/numberkeyboard/numberkeyboard.scss +25 -18
- package/dist/packages/pagination/pagination.scss +0 -2
- package/dist/packages/picker/picker.scss +9 -0
- package/dist/packages/popover/popover.scss +0 -4
- package/dist/packages/popup/popup.scss +3 -19
- package/dist/packages/price/price.scss +1 -0
- package/dist/packages/radio/radio.scss +0 -1
- package/dist/packages/radiogroup/radiogroup.scss +10 -1
- package/dist/packages/range/range.scss +127 -127
- package/dist/packages/rate/rate.scss +0 -1
- package/dist/packages/searchbar/searchbar.scss +3 -2
- package/dist/packages/shortpassword/shortpassword.scss +4 -0
- package/dist/packages/skeleton/skeleton.scss +13 -3
- package/dist/packages/space/space.scss +0 -1
- package/dist/packages/step/step.scss +21 -25
- package/dist/packages/swipe/swipe.scss +0 -15
- package/dist/packages/swiper/swiper.scss +0 -1
- package/dist/packages/switch/switch.scss +11 -0
- package/dist/packages/table/table.scss +4 -5
- package/dist/packages/tabs/tabs.scss +2 -4
- package/dist/packages/tag/tag.scss +0 -1
- package/dist/packages/textarea/textarea.scss +1 -6
- package/dist/packages/timeselect/timeselect.scss +1 -6
- package/dist/packages/tour/tour.scss +1 -5
- package/dist/packages/trendarrow/trendarrow.scss +0 -1
- package/dist/packages/uploader/uploader.scss +0 -1
- package/dist/packages/virtuallist/virtuallist.scss +12 -12
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +4 -0
- package/dist/styles/variables.scss +11 -7
- 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.d.ts +15 -15
- package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +33 -29
- 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 +9 -5
- package/dist/esm/avatar.taro-7ltbzIdY.js +0 -109
- package/dist/esm/configprovider.taro-q5J2gQbi.js +0 -486
- package/dist/esm/formitem.taro-PPkTQGfW.js +0 -1435
- package/dist/esm/index-oitVOJp9.js +0 -661
- package/dist/esm/inputnumber.taro-7QptygT3.js +0 -197
- 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,31 +1,14 @@
|
|
|
1
1
|
import React__default, { useRef, useState, useEffect } from "react";
|
|
2
2
|
import { Search, ArrowLeft, MaskClose } from "@nutui/icons-react-taro";
|
|
3
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
4
|
-
import { C as ComponentDefaults } from "./typings-
|
|
5
|
-
const defaultProps = {
|
|
6
|
-
...ComponentDefaults,
|
|
7
|
-
placeholder: "",
|
|
8
|
-
shape: "square",
|
|
9
|
-
disabled: false,
|
|
10
|
-
maxLength: 9999,
|
|
11
|
-
clearable: true,
|
|
12
|
-
readOnly: false,
|
|
13
|
-
autoFocus: false,
|
|
14
|
-
backable: false,
|
|
15
|
-
left: "",
|
|
16
|
-
right: "",
|
|
17
|
-
rightIn: "",
|
|
18
|
-
leftIn: React__default.createElement(Search, { size: "16" })
|
|
19
|
-
};
|
|
3
|
+
import { u as useConfig } from "./configprovider.taro-CyU_tvNJ.js";
|
|
4
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
5
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { placeholder: "", shape: "square", disabled: false, maxLength: 9999, clearable: true, readOnly: false, autoFocus: false, backable: false, left: "", right: "", rightIn: "", leftIn: React__default.createElement(Search, { size: "16" }) });
|
|
20
6
|
const SearchBar = (props) => {
|
|
21
7
|
const classPrefix = "nut-searchbar";
|
|
22
8
|
const { locale } = useConfig();
|
|
23
9
|
const searchRef = useRef(null);
|
|
24
10
|
const [value, setValue] = useState(() => props.value);
|
|
25
|
-
const { placeholder, shape, className, disabled, maxLength, clearable, readOnly, autoFocus, backable, right, left, leftIn, rightIn, onChange, onFocus, onBlur, onClear, onSearch, onInputClick } = {
|
|
26
|
-
...defaultProps,
|
|
27
|
-
...props
|
|
28
|
-
};
|
|
11
|
+
const { placeholder, shape, className, disabled, maxLength, clearable, readOnly, autoFocus, backable, right, left, leftIn, rightIn, onChange, onFocus, onBlur, onClear, onSearch, onInputClick } = Object.assign(Object.assign({}, defaultProps), props);
|
|
29
12
|
const forceFocus = () => {
|
|
30
13
|
const searchSelf = searchRef.current;
|
|
31
14
|
searchSelf && searchSelf.focus();
|
|
@@ -33,19 +16,19 @@ const SearchBar = (props) => {
|
|
|
33
16
|
const change = (event) => {
|
|
34
17
|
if (value === event.target.value)
|
|
35
18
|
return;
|
|
36
|
-
onChange && (onChange
|
|
19
|
+
onChange && (onChange === null || onChange === void 0 ? void 0 : onChange(event.target.value, event));
|
|
37
20
|
setValue(event.target.value);
|
|
38
21
|
event.target.value === "" && forceFocus();
|
|
39
22
|
};
|
|
40
23
|
const focus = (event) => {
|
|
41
24
|
const { value: value2 } = event.target;
|
|
42
|
-
onFocus && (onFocus
|
|
25
|
+
onFocus && (onFocus === null || onFocus === void 0 ? void 0 : onFocus(value2, event));
|
|
43
26
|
};
|
|
44
27
|
const blur = (event) => {
|
|
45
28
|
const searchSelf = searchRef.current;
|
|
46
29
|
searchSelf && searchSelf.blur();
|
|
47
30
|
const { value: value2 } = event.target;
|
|
48
|
-
onBlur && (onBlur
|
|
31
|
+
onBlur && (onBlur === null || onBlur === void 0 ? void 0 : onBlur(value2, event));
|
|
49
32
|
};
|
|
50
33
|
useEffect(() => {
|
|
51
34
|
setValue(props.value || "");
|
|
@@ -54,7 +37,7 @@ const SearchBar = (props) => {
|
|
|
54
37
|
autoFocus && forceFocus();
|
|
55
38
|
}, [autoFocus]);
|
|
56
39
|
const renderField = () => {
|
|
57
|
-
return React__default.createElement("input", { className: `${classPrefix}-input ${clearable ? `${classPrefix}-input-clear` : ""}`, ref: searchRef, style: {
|
|
40
|
+
return React__default.createElement("input", { className: `${classPrefix}-input ${clearable ? `${classPrefix}-input-clear` : ""}`, ref: searchRef, style: Object.assign({}, props.style), value: value || "", placeholder: placeholder || locale.placeholder, disabled, readOnly, maxLength, onKeyPress: onKeypress, onChange: (e) => change(e), onFocus: (e) => focus(e), onBlur: (e) => blur(e), onClick: (e) => clickInput(e) });
|
|
58
41
|
};
|
|
59
42
|
const clickInput = (e) => {
|
|
60
43
|
onInputClick && onInputClick(e);
|
|
@@ -104,7 +87,7 @@ const SearchBar = (props) => {
|
|
|
104
87
|
};
|
|
105
88
|
return React__default.createElement(
|
|
106
89
|
"div",
|
|
107
|
-
{ className: `${classPrefix} ${disabled ? `${classPrefix}-disabled` : ""} ${className || ""}`, style: {
|
|
90
|
+
{ className: `${classPrefix} ${disabled ? `${classPrefix}-disabled` : ""} ${className || ""}`, style: Object.assign({}, props.style) },
|
|
108
91
|
renderLeft(),
|
|
109
92
|
React__default.createElement(
|
|
110
93
|
"div",
|
|
@@ -1,25 +1,15 @@
|
|
|
1
|
+
import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
1
2
|
import React__default, { useMemo, useImperativeHandle, useEffect } from "react";
|
|
2
3
|
import { Tips } from "@nutui/icons-react-taro";
|
|
3
4
|
import classNames from "classnames";
|
|
4
|
-
import { P as Popup } from "./popup.taro-
|
|
5
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
6
|
-
import { C as ComponentDefaults } from "./typings-
|
|
7
|
-
import { u as usePropsValue } from "./use-props-value-
|
|
8
|
-
const defaultProps = {
|
|
9
|
-
...ComponentDefaults,
|
|
10
|
-
value: "",
|
|
11
|
-
visible: false,
|
|
12
|
-
plain: false,
|
|
13
|
-
hideFooter: true,
|
|
14
|
-
length: 6,
|
|
15
|
-
autoFocus: false
|
|
16
|
-
};
|
|
5
|
+
import { P as Popup } from "./popup.taro-Iy_WQZ-m.js";
|
|
6
|
+
import { u as useConfig } from "./configprovider.taro-CyU_tvNJ.js";
|
|
7
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
8
|
+
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
9
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { value: "", visible: false, plain: false, hideFooter: true, length: 6, autoFocus: false });
|
|
17
10
|
const InternalShortPassword = (props, ref) => {
|
|
18
11
|
const { locale } = useConfig();
|
|
19
|
-
const { title, description, tips, visible: deleteVisible, value, error, hideFooter, length, plain, style, className, closeable, autoFocus, onFocus, onChange, onConfirm, onTips, onCancel, onClose, onComplete, onOverlayClick, onCloseIconClick,
|
|
20
|
-
...defaultProps,
|
|
21
|
-
...props
|
|
22
|
-
};
|
|
12
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { title, description, tips, visible: deleteVisible, value, error, hideFooter, length, plain, style, className, closeable, autoFocus, onFocus, onChange, onConfirm, onTips, onCancel, onClose, onComplete, onOverlayClick, onCloseIconClick } = _a, rest = __rest(_a, ["title", "description", "tips", "visible", "value", "error", "hideFooter", "length", "plain", "style", "className", "closeable", "autoFocus", "onFocus", "onChange", "onConfirm", "onTips", "onCancel", "onClose", "onComplete", "onOverlayClick", "onCloseIconClick"]);
|
|
23
13
|
const classPrefix = "nut-shortpassword";
|
|
24
14
|
const comLen = useMemo(() => {
|
|
25
15
|
return Math.min(Math.max(4, length || 4), 6);
|
|
@@ -59,11 +49,11 @@ const InternalShortPassword = (props, ref) => {
|
|
|
59
49
|
};
|
|
60
50
|
return React__default.createElement(
|
|
61
51
|
Popup,
|
|
62
|
-
{ style: {
|
|
52
|
+
Object.assign({ style: {
|
|
63
53
|
padding: "32px 24px 28px 24px",
|
|
64
54
|
borderRadius: "12px",
|
|
65
55
|
textAlign: "center"
|
|
66
|
-
}, visible, closeable: true, onOverlayClick: onClose, onCloseIconClick: onClose,
|
|
56
|
+
}, visible, closeable: true, onOverlayClick: onClose, onCloseIconClick: onClose }, rest),
|
|
67
57
|
React__default.createElement(
|
|
68
58
|
"div",
|
|
69
59
|
{ className: classNames(classPrefix, className), style },
|
|
@@ -84,7 +74,7 @@ const InternalShortPassword = (props, ref) => {
|
|
|
84
74
|
React__default.createElement("div", { className: `${classPrefix}-message-forget`, onClick: onTips }, tips || React__default.createElement(
|
|
85
75
|
React__default.Fragment,
|
|
86
76
|
null,
|
|
87
|
-
React__default.createElement(Tips, { size: 11
|
|
77
|
+
React__default.createElement(Tips, { size: 11 }),
|
|
88
78
|
locale.shortpassword.tips
|
|
89
79
|
))
|
|
90
80
|
),
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
+
import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
1
2
|
import React__default, { useState } from "react";
|
|
2
3
|
import classNames from "classnames";
|
|
3
|
-
import { P as Popup } from "./popup.taro-
|
|
4
|
-
import { O as OffsetContext } from "./context-
|
|
5
|
-
import { C as ComponentDefaults } from "./typings-
|
|
6
|
-
const defaultProps = {
|
|
7
|
-
...ComponentDefaults,
|
|
8
|
-
position: "left",
|
|
9
|
-
width: "80%"
|
|
10
|
-
};
|
|
4
|
+
import { P as Popup } from "./popup.taro-Iy_WQZ-m.js";
|
|
5
|
+
import { O as OffsetContext } from "./context-4T-L2x0_.js";
|
|
6
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
7
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { position: "left", width: "80%" });
|
|
11
8
|
const SideNavBar = (props) => {
|
|
12
9
|
const classPrefix = "nut-sidenavbar";
|
|
13
|
-
const { title, visible, width, position, children, className, onClose,
|
|
14
|
-
...defaultProps,
|
|
15
|
-
...props
|
|
16
|
-
};
|
|
10
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { title, visible, width, position, children, className, onClose } = _a, rest = __rest(_a, ["title", "visible", "width", "position", "children", "className", "onClose"]);
|
|
17
11
|
const indent = props.indent ? Number(props.indent) : 20;
|
|
18
12
|
const [sidenavbarShow, setSidenavbarShow] = useState(true);
|
|
19
13
|
const handleClick = () => {
|
|
@@ -24,7 +18,7 @@ const SideNavBar = (props) => {
|
|
|
24
18
|
{ visible, style: { width, height: "100%" }, position, onClose },
|
|
25
19
|
React__default.createElement(
|
|
26
20
|
"div",
|
|
27
|
-
{ className: classNames(classPrefix, className),
|
|
21
|
+
Object.assign({ className: classNames(classPrefix, className) }, rest),
|
|
28
22
|
React__default.createElement(
|
|
29
23
|
"div",
|
|
30
24
|
{ className: `${classPrefix}-content` },
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
const SideNavBarItem = (props) => {
|
|
4
|
+
const classPrefix = "nut-subsidenavbar";
|
|
5
|
+
const { title, value, children, onClick } = props, rest = __rest(props, ["title", "value", "children", "onClick"]);
|
|
6
|
+
const clickFn = (e) => {
|
|
7
|
+
e.stopPropagation();
|
|
8
|
+
onClick && onClick({ title, value });
|
|
9
|
+
};
|
|
10
|
+
return React__default.createElement("div", Object.assign({ className: `${classPrefix}-item ${classPrefix}-border-bt`, onClick: clickFn }, rest), title);
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
SideNavBarItem as S
|
|
14
|
+
};
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
+
import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
1
2
|
import React__default, { useRef, useState, useImperativeHandle, useEffect } from "react";
|
|
2
3
|
import { getEnv, nextTick, createSelectorQuery, canvasToTempFilePath } from "@tarojs/taro";
|
|
3
|
-
import { C as ComponentDefaults } from "./typings-
|
|
4
|
-
const defaultProps = {
|
|
5
|
-
...ComponentDefaults,
|
|
6
|
-
canvasId: "spcanvas",
|
|
7
|
-
type: "png",
|
|
8
|
-
lineWidth: 2,
|
|
9
|
-
strokeStyle: "#1a1a1a"
|
|
10
|
-
};
|
|
4
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
5
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { canvasId: "spcanvas", type: "png", lineWidth: 2, strokeStyle: "#1a1a1a" });
|
|
11
6
|
const InternalSignature = (props, ref) => {
|
|
12
|
-
const { canvasId, type, lineWidth, strokeStyle, className, style, onConfirm, onClear,
|
|
13
|
-
...defaultProps,
|
|
14
|
-
...props
|
|
15
|
-
};
|
|
7
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { canvasId, type, lineWidth, strokeStyle, className, style, onConfirm, onClear } = _a, rest = __rest(_a, ["canvasId", "type", "lineWidth", "strokeStyle", "className", "style", "onConfirm", "onClear"]);
|
|
16
8
|
const classPrefix = `nut-signature`;
|
|
17
9
|
const canvasRef = useRef(null);
|
|
18
10
|
const wrapRef = useRef(null);
|
|
@@ -38,9 +30,9 @@ const InternalSignature = (props, ref) => {
|
|
|
38
30
|
mouseY = evt.clientY - coverPos.top;
|
|
39
31
|
}
|
|
40
32
|
nextTick(() => {
|
|
41
|
-
var
|
|
42
|
-
(
|
|
43
|
-
(_b = ctx.current)
|
|
33
|
+
var _a2, _b;
|
|
34
|
+
(_a2 = ctx.current) === null || _a2 === void 0 ? void 0 : _a2.lineTo(mouseX, mouseY);
|
|
35
|
+
(_b = ctx.current) === null || _b === void 0 ? void 0 : _b.stroke();
|
|
44
36
|
});
|
|
45
37
|
}
|
|
46
38
|
};
|
|
@@ -109,10 +101,10 @@ const InternalSignature = (props, ref) => {
|
|
|
109
101
|
} else {
|
|
110
102
|
const canvasDom = document.getElementById(`${canvasId}`);
|
|
111
103
|
let canvas = canvasDom;
|
|
112
|
-
if ((canvasDom
|
|
113
|
-
canvas = canvasDom
|
|
104
|
+
if ((canvasDom === null || canvasDom === void 0 ? void 0 : canvasDom.tagName) !== "CANVAS") {
|
|
105
|
+
canvas = canvasDom === null || canvasDom === void 0 ? void 0 : canvasDom.getElementsByTagName("canvas")[0];
|
|
114
106
|
}
|
|
115
|
-
canvasSetting(canvas, canvasDom
|
|
107
|
+
canvasSetting(canvas, canvasDom === null || canvasDom === void 0 ? void 0 : canvasDom.offsetWidth, canvasDom === null || canvasDom === void 0 ? void 0 : canvasDom.offsetHeight);
|
|
116
108
|
}
|
|
117
109
|
}, 1e3);
|
|
118
110
|
});
|
|
@@ -122,7 +114,7 @@ const InternalSignature = (props, ref) => {
|
|
|
122
114
|
}, []);
|
|
123
115
|
return React__default.createElement(
|
|
124
116
|
"div",
|
|
125
|
-
{ className: `${classPrefix} ${className}
|
|
117
|
+
Object.assign({ className: `${classPrefix} ${className}` }, rest),
|
|
126
118
|
React__default.createElement("div", { className: `${classPrefix}-inner spcanvas_WEAPP`, ref: wrapRef }, getEnv() === "WEAPP" || getEnv() === "JD" ? React__default.createElement("canvas", {
|
|
127
119
|
id: canvasId,
|
|
128
120
|
ref: canvasRef,
|
|
@@ -1,26 +1,15 @@
|
|
|
1
|
+
import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
1
2
|
import React__default from "react";
|
|
2
3
|
import classNames from "classnames";
|
|
3
|
-
import { A as Avatar } from "./avatar.taro-
|
|
4
|
-
import { C as ComponentDefaults } from "./typings-
|
|
5
|
-
const defaultProps = {
|
|
6
|
-
...ComponentDefaults,
|
|
7
|
-
rows: 1,
|
|
8
|
-
animated: false,
|
|
9
|
-
title: false,
|
|
10
|
-
avatar: false,
|
|
11
|
-
avatarSize: "50px",
|
|
12
|
-
visible: false,
|
|
13
|
-
avatarShape: "round"
|
|
14
|
-
};
|
|
4
|
+
import { A as Avatar } from "./avatar.taro-a6CX3kxV.js";
|
|
5
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
6
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { rows: 1, animated: false, title: false, avatar: false, avatarSize: "50px", visible: false, avatarShape: "round" });
|
|
15
7
|
const Skeleton = (props) => {
|
|
16
|
-
const { className, animated, rows, title, avatar, avatarSize, visible, children, avatarShape,
|
|
17
|
-
...defaultProps,
|
|
18
|
-
...props
|
|
19
|
-
};
|
|
8
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { className, animated, rows, title, avatar, avatarSize, visible, children, avatarShape } = _a, rest = __rest(_a, ["className", "animated", "rows", "title", "avatar", "avatarSize", "visible", "children", "avatarShape"]);
|
|
20
9
|
const classPrefix = "nut-skeleton";
|
|
21
10
|
const classes = classNames(classPrefix, className);
|
|
22
11
|
const avatarClass = classNames({
|
|
23
|
-
avatar: true,
|
|
12
|
+
[`nut-avatar`]: true,
|
|
24
13
|
[`avatar-${avatarShape}`]: avatarShape
|
|
25
14
|
});
|
|
26
15
|
const repeatLines = (num) => {
|
|
@@ -38,9 +27,9 @@ const Skeleton = (props) => {
|
|
|
38
27
|
height: "50px"
|
|
39
28
|
};
|
|
40
29
|
};
|
|
41
|
-
return React__default.createElement(React__default.Fragment, null, visible ? React__default.createElement(
|
|
30
|
+
return React__default.createElement(React__default.Fragment, null, visible ? React__default.createElement(React__default.Fragment, null, children) : React__default.createElement(
|
|
42
31
|
"div",
|
|
43
|
-
{ className: classes,
|
|
32
|
+
Object.assign({ className: classes }, rest),
|
|
44
33
|
animated && React__default.createElement("div", { className: `${classPrefix}-animation` }),
|
|
45
34
|
React__default.createElement(
|
|
46
35
|
"div",
|
|
@@ -5,10 +5,7 @@ const defaultProps = {
|
|
|
5
5
|
direction: "horizontal"
|
|
6
6
|
};
|
|
7
7
|
const Space = (props) => {
|
|
8
|
-
const { className, style, children, wrap, align, direction, justify } = {
|
|
9
|
-
...defaultProps,
|
|
10
|
-
...props
|
|
11
|
-
};
|
|
8
|
+
const { className, style, children, wrap, align, direction, justify } = Object.assign(Object.assign({}, defaultProps), props);
|
|
12
9
|
const cls = classNames(prefixCls, wrap && `${prefixCls}-wrap`, direction && `${prefixCls}-${direction}`, align && `${prefixCls}-align-${align}`, justify && `${prefixCls}-justify-${justify}`, className);
|
|
13
10
|
return React__default.createElement("div", { className: cls, style }, React__default.Children.map(children, (child) => {
|
|
14
11
|
return child !== null && child !== void 0 && React__default.createElement("div", { className: `${prefixCls}-item` }, child);
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
+
import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
1
2
|
import React__default, { useContext } from "react";
|
|
2
3
|
import classNames from "classnames";
|
|
3
4
|
import { View } from "@tarojs/components";
|
|
4
|
-
import { D as DataContext } from "./context-
|
|
5
|
-
import { C as ComponentDefaults } from "./typings-
|
|
6
|
-
const defaultProps = {
|
|
7
|
-
...ComponentDefaults,
|
|
8
|
-
title: "",
|
|
9
|
-
description: "",
|
|
10
|
-
value: 0,
|
|
11
|
-
icon: null
|
|
12
|
-
};
|
|
5
|
+
import { D as DataContext } from "./context-BlM0373q.js";
|
|
6
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
7
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { title: "", description: "", value: 0, icon: null });
|
|
13
8
|
const Step = (props) => {
|
|
14
|
-
const { children, title, description, value, icon, className,
|
|
15
|
-
...defaultProps,
|
|
16
|
-
...props
|
|
17
|
-
};
|
|
9
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { children, title, description, value, icon, className } = _a, restProps = __rest(_a, ["children", "title", "description", "value", "icon", "className"]);
|
|
18
10
|
const parent = useContext(DataContext);
|
|
19
11
|
const dot = parent.propSteps.dot;
|
|
20
12
|
const getCurrentStatus = () => {
|
|
@@ -24,8 +16,8 @@ const Step = (props) => {
|
|
|
24
16
|
return index === +parent.propSteps.value ? "process" : "wait";
|
|
25
17
|
};
|
|
26
18
|
const handleClickStep = () => {
|
|
27
|
-
var
|
|
28
|
-
((
|
|
19
|
+
var _a2, _b;
|
|
20
|
+
((_a2 = parent.propSteps) === null || _a2 === void 0 ? void 0 : _a2.onStepClick) && ((_b = parent.propSteps) === null || _b === void 0 ? void 0 : _b.onStepClick(value));
|
|
29
21
|
};
|
|
30
22
|
const classPrefix = `nut-step`;
|
|
31
23
|
const classes = classNames(classPrefix, {
|
|
@@ -42,7 +34,7 @@ const Step = (props) => {
|
|
|
42
34
|
};
|
|
43
35
|
return React__default.createElement(
|
|
44
36
|
"div",
|
|
45
|
-
{ className: classes,
|
|
37
|
+
Object.assign({ className: classes }, restProps, { onClick: handleClickStep }),
|
|
46
38
|
React__default.createElement(
|
|
47
39
|
View,
|
|
48
40
|
{ className: "nut-step-head" },
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import { D as DataContext } from "./context-BlM0373q.js";
|
|
5
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
6
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { value: 0, direction: "horizontal", dot: false });
|
|
7
|
+
const Steps = (props) => {
|
|
8
|
+
const propSteps = Object.assign(Object.assign({}, defaultProps), props);
|
|
9
|
+
const { children, value, direction, className, dot, onStepClick } = propSteps, restProps = __rest(propSteps, ["children", "value", "direction", "className", "dot", "onStepClick"]);
|
|
10
|
+
const parentSteps = {
|
|
11
|
+
propSteps
|
|
12
|
+
};
|
|
13
|
+
const classPrefix = `nut-steps`;
|
|
14
|
+
const classes = classNames(classPrefix, {
|
|
15
|
+
[`${classPrefix}-${direction}`]: true,
|
|
16
|
+
[`${classPrefix}-dot`]: !!props.dot
|
|
17
|
+
}, className);
|
|
18
|
+
return React__default.createElement(
|
|
19
|
+
DataContext.Provider,
|
|
20
|
+
{ value: parentSteps },
|
|
21
|
+
React__default.createElement("div", Object.assign({ className: classes }, restProps), children)
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
Steps.defaultProps = defaultProps;
|
|
25
|
+
Steps.displayName = "NutSteps";
|
|
26
|
+
export {
|
|
27
|
+
Steps as S
|
|
28
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { _ as __rest, a as __awaiter } from "./tslib.es6-BZ8i9Q6l.js";
|
|
1
2
|
import React__default, { useRef, useEffect, useState, useMemo, useCallback } from "react";
|
|
2
3
|
import classNames from "classnames";
|
|
3
4
|
import { getEnv, usePageScroll, getSystemInfoSync } from "@tarojs/taro";
|
|
4
|
-
import { C as ComponentDefaults } from "./typings-
|
|
5
|
-
import { g as getRectByTaro } from "./get-rect-by-taro-
|
|
6
|
-
import { g as getScrollParent } from "./get-scroll-parent-
|
|
5
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
6
|
+
import { g as getRectByTaro } from "./get-rect-by-taro-CSN0TGnD.js";
|
|
7
|
+
import { g as getScrollParent } from "./get-scroll-parent-DB1VRg11.js";
|
|
7
8
|
function useWatch(dep, callback, config = { immediate: false }) {
|
|
8
9
|
const { immediate } = config;
|
|
9
10
|
const prev = useRef();
|
|
@@ -27,14 +28,10 @@ function useWatch(dep, callback, config = { immediate: false }) {
|
|
|
27
28
|
stop.current = true;
|
|
28
29
|
};
|
|
29
30
|
}
|
|
30
|
-
const defaultProps = {
|
|
31
|
-
...ComponentDefaults,
|
|
32
|
-
position: "top",
|
|
33
|
-
zIndex: 900
|
|
34
|
-
};
|
|
31
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { position: "top", zIndex: 900 });
|
|
35
32
|
const classPrefix = "nut-sticky";
|
|
36
33
|
const Sticky = (props) => {
|
|
37
|
-
const { position, zIndex, threshold, style, children, container, className, onChange,
|
|
34
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { position, zIndex, threshold, style, children, container, className, onChange } = _a, rest = __rest(_a, ["position", "zIndex", "threshold", "style", "children", "container", "className", "onChange"]);
|
|
38
35
|
const stickyRef = useRef(null);
|
|
39
36
|
const rootRef = useRef(null);
|
|
40
37
|
const [rootRect, setRootRect] = useState({});
|
|
@@ -77,14 +74,14 @@ const Sticky = (props) => {
|
|
|
77
74
|
style2.zIndex = zIndex;
|
|
78
75
|
return style2;
|
|
79
76
|
}, [fixed, rootRect.height, rootRect.width, transform, position]);
|
|
80
|
-
const handleScroll =
|
|
81
|
-
const curRootRect =
|
|
82
|
-
const stickyRect =
|
|
77
|
+
const handleScroll = (scrollTop) => __awaiter(void 0, void 0, void 0, function* () {
|
|
78
|
+
const curRootRect = yield getRectByTaro(rootRef.current);
|
|
79
|
+
const stickyRect = yield getRectByTaro(stickyRef.current);
|
|
83
80
|
if (curRootRect && stickyRect) {
|
|
84
81
|
setRootRect(curRootRect);
|
|
85
82
|
if (position === "top") {
|
|
86
83
|
if (container) {
|
|
87
|
-
const containerRect =
|
|
84
|
+
const containerRect = yield getRectByTaro(container.current);
|
|
88
85
|
const difference = containerRect.bottom - threshold - curRootRect.height;
|
|
89
86
|
const curTransform = difference < 0 ? difference : 0;
|
|
90
87
|
setTransform(curTransform);
|
|
@@ -100,7 +97,7 @@ const Sticky = (props) => {
|
|
|
100
97
|
} else {
|
|
101
98
|
console.warn("getRectByTaro获取失败", { stickyRect, curRootRect });
|
|
102
99
|
}
|
|
103
|
-
};
|
|
100
|
+
});
|
|
104
101
|
const getElement = useCallback(() => {
|
|
105
102
|
return getScrollParent(rootRef.current);
|
|
106
103
|
}, []);
|
|
@@ -121,7 +118,7 @@ const Sticky = (props) => {
|
|
|
121
118
|
});
|
|
122
119
|
return React__default.createElement(
|
|
123
120
|
"div",
|
|
124
|
-
{ ref: rootRef, style: rootStyle, className: classNames(classPrefix, className),
|
|
121
|
+
Object.assign({ ref: rootRef, style: rootStyle, className: classNames(classPrefix, className) }, rest),
|
|
125
122
|
React__default.createElement("div", { className: classNames("nut-sticky-box", {
|
|
126
123
|
"nut-sticky-fixed": fixed
|
|
127
124
|
}), ref: stickyRef, style: stickyStyle }, children)
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
+
import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
1
2
|
import React__default, { useState, useContext, useRef, useCallback, useEffect } from "react";
|
|
2
|
-
import { O as OffsetContext } from "./context-
|
|
3
|
+
import { O as OffsetContext } from "./context-4T-L2x0_.js";
|
|
3
4
|
const defaultProps = {
|
|
4
5
|
open: true
|
|
5
6
|
};
|
|
6
7
|
const SubSideNavBar = (props) => {
|
|
7
8
|
const classPrefix = "nut-subsidenavbar";
|
|
8
|
-
const { title, value, children, onClick, open,
|
|
9
|
-
...defaultProps,
|
|
10
|
-
...props
|
|
11
|
-
};
|
|
9
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { title, value, children, onClick, open } = _a, rest = __rest(_a, ["title", "value", "children", "onClick", "open"]);
|
|
12
10
|
const [subShow, setSubShow] = useState(open);
|
|
13
11
|
const offset = useContext(OffsetContext);
|
|
14
12
|
const listRef = useRef(null);
|
|
@@ -40,16 +38,16 @@ const SubSideNavBar = (props) => {
|
|
|
40
38
|
onClick && onClick({ title, value, isShow });
|
|
41
39
|
};
|
|
42
40
|
useEffect(() => {
|
|
43
|
-
var
|
|
44
|
-
const childNodes = (
|
|
45
|
-
(_b = listRef.current)
|
|
41
|
+
var _a2, _b;
|
|
42
|
+
const childNodes = (_a2 = listRef.current) === null || _a2 === void 0 ? void 0 : _a2.children;
|
|
43
|
+
(_b = listRef.current) === null || _b === void 0 ? void 0 : _b.setAttribute("level", "1");
|
|
46
44
|
childNodes && setListLevel(childNodes);
|
|
47
45
|
}, [setListLevel]);
|
|
48
46
|
const divClass = subShow ? `${classPrefix}-list sidenavbar-show` : `${classPrefix}-list sidenavbar-hide`;
|
|
49
47
|
const iconClass = subShow ? "arrow-icon arrow-down" : "arrow-icon arrow-up";
|
|
50
48
|
return React__default.createElement(
|
|
51
49
|
"div",
|
|
52
|
-
{ className: divClass, ref: listRef, onClick: clickFn,
|
|
50
|
+
Object.assign({ className: divClass, ref: listRef, onClick: clickFn }, rest),
|
|
53
51
|
React__default.createElement(
|
|
54
52
|
"div",
|
|
55
53
|
{ className: `${classPrefix}-title ${classPrefix}-border-bt` },
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { a as __awaiter } from "./tslib.es6-BZ8i9Q6l.js";
|
|
1
2
|
import React__default, { forwardRef, useRef, useState, useImperativeHandle, useEffect } from "react";
|
|
2
3
|
import classNames from "classnames";
|
|
3
4
|
import { View } from "@tarojs/components";
|
|
4
5
|
import { useReady, nextTick } from "@tarojs/taro";
|
|
5
|
-
import { u as useTouch } from "./use-touch-
|
|
6
|
-
import { g as getRectByTaro } from "./get-rect-by-taro-
|
|
7
|
-
import { C as ComponentDefaults } from "./typings-
|
|
6
|
+
import { u as useTouch } from "./use-touch-OfEaR5qi.js";
|
|
7
|
+
import { g as getRectByTaro } from "./get-rect-by-taro-CSN0TGnD.js";
|
|
8
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
8
9
|
function preventDefault(event, isStopPropagation) {
|
|
9
10
|
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
10
11
|
event.preventDefault();
|
|
@@ -13,27 +14,24 @@ function preventDefault(event, isStopPropagation) {
|
|
|
13
14
|
event.stopPropagation();
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
|
-
const defaultProps = {
|
|
17
|
-
...ComponentDefaults,
|
|
18
|
-
name: ""
|
|
19
|
-
};
|
|
17
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { name: "" });
|
|
20
18
|
const Swipe = forwardRef((props, instanceRef) => {
|
|
21
19
|
const classPrefix = "nut-swipe";
|
|
22
20
|
const touch = useTouch();
|
|
23
21
|
useReady(() => {
|
|
24
|
-
const getWidth =
|
|
22
|
+
const getWidth = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
25
23
|
if (leftWrapper.current) {
|
|
26
|
-
const leftRect =
|
|
27
|
-
setActionWidth((v) => ({
|
|
24
|
+
const leftRect = yield getRectByTaro(leftWrapper.current);
|
|
25
|
+
setActionWidth((v) => Object.assign(Object.assign({}, v), { left: leftRect.width }));
|
|
28
26
|
}
|
|
29
27
|
if (rightWrapper.current) {
|
|
30
|
-
const rightRect =
|
|
31
|
-
setActionWidth((v) => ({
|
|
28
|
+
const rightRect = yield getRectByTaro(rightWrapper.current);
|
|
29
|
+
setActionWidth((v) => Object.assign(Object.assign({}, v), { right: rightRect.width }));
|
|
32
30
|
}
|
|
33
|
-
};
|
|
31
|
+
});
|
|
34
32
|
nextTick(() => getWidth());
|
|
35
33
|
});
|
|
36
|
-
const { children, className, style } = {
|
|
34
|
+
const { children, className, style } = Object.assign(Object.assign({}, defaultProps), props);
|
|
37
35
|
const root = useRef();
|
|
38
36
|
const opened = useRef(false);
|
|
39
37
|
const lockClick = useRef(false);
|
|
@@ -52,33 +50,33 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
52
50
|
};
|
|
53
51
|
const leftWidth = actionWidth.left;
|
|
54
52
|
const rightWidth = actionWidth.right;
|
|
55
|
-
const onTouchStart =
|
|
53
|
+
const onTouchStart = (event) => __awaiter(void 0, void 0, void 0, function* () {
|
|
56
54
|
var _a;
|
|
57
55
|
if (leftWrapper.current) {
|
|
58
|
-
const leftRect =
|
|
59
|
-
setActionWidth((v) => ({
|
|
56
|
+
const leftRect = yield getRectByTaro(leftWrapper.current);
|
|
57
|
+
setActionWidth((v) => Object.assign(Object.assign({}, v), { left: leftRect.width }));
|
|
60
58
|
}
|
|
61
59
|
if (rightWrapper.current) {
|
|
62
|
-
const rightRect =
|
|
63
|
-
setActionWidth((v) => ({
|
|
60
|
+
const rightRect = yield getRectByTaro(rightWrapper.current);
|
|
61
|
+
setActionWidth((v) => Object.assign(Object.assign({}, v), { right: rightRect === null || rightRect === void 0 ? void 0 : rightRect.width }));
|
|
64
62
|
}
|
|
65
63
|
if (!props.disabled) {
|
|
66
64
|
startOffset.current = state.offset;
|
|
67
65
|
touch.start(event);
|
|
68
|
-
(_a = props.onTouchStart)
|
|
66
|
+
(_a = props.onTouchStart) === null || _a === void 0 ? void 0 : _a.call(props, event);
|
|
69
67
|
}
|
|
70
|
-
};
|
|
68
|
+
});
|
|
71
69
|
const onTouchMove = (event) => {
|
|
72
70
|
var _a;
|
|
73
71
|
if (props.disabled) {
|
|
74
72
|
return;
|
|
75
73
|
}
|
|
76
74
|
touch.move(event);
|
|
77
|
-
(_a = props.onTouchMove)
|
|
75
|
+
(_a = props.onTouchMove) === null || _a === void 0 ? void 0 : _a.call(props, event);
|
|
78
76
|
if (touch.isHorizontal()) {
|
|
79
77
|
lockClick.current = true;
|
|
80
78
|
props.onTouchMove && props.onTouchMove(event);
|
|
81
|
-
const newState = {
|
|
79
|
+
const newState = Object.assign(Object.assign({}, state), { dragging: true });
|
|
82
80
|
const isEdge = !opened || touch.deltaX.current * startOffset.current < 0;
|
|
83
81
|
if (isEdge) {
|
|
84
82
|
preventDefault(event, true);
|
|
@@ -90,12 +88,12 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
90
88
|
const onTouchEnd = (event) => {
|
|
91
89
|
var _a;
|
|
92
90
|
if (state.dragging) {
|
|
93
|
-
setState((v) => ({
|
|
91
|
+
setState((v) => Object.assign(Object.assign({}, v), { dragging: false }));
|
|
94
92
|
toggle(state.offset > 0 ? "left" : "right");
|
|
95
93
|
setTimeout(() => {
|
|
96
94
|
lockClick.current = false;
|
|
97
95
|
}, 0);
|
|
98
|
-
(_a = props.onTouchEnd)
|
|
96
|
+
(_a = props.onTouchEnd) === null || _a === void 0 ? void 0 : _a.call(props, event);
|
|
99
97
|
}
|
|
100
98
|
};
|
|
101
99
|
const toggle = (side) => {
|
|
@@ -114,19 +112,19 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
114
112
|
opened.current = true;
|
|
115
113
|
const offset = side === "left" ? leftWidth : -rightWidth;
|
|
116
114
|
const name = props.name;
|
|
117
|
-
(_a = props.onOpen)
|
|
118
|
-
setState((v) => ({
|
|
115
|
+
(_a = props.onOpen) === null || _a === void 0 ? void 0 : _a.call(props, { name, position: side });
|
|
116
|
+
setState((v) => Object.assign(Object.assign({}, v), { offset: Number(offset) || 0 }));
|
|
119
117
|
};
|
|
120
118
|
const close = (position) => {
|
|
121
119
|
var _a;
|
|
122
120
|
if (opened.current) {
|
|
123
121
|
opened.current = false;
|
|
124
|
-
(_a = props.onClose)
|
|
122
|
+
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props, {
|
|
125
123
|
name: props.name,
|
|
126
124
|
position: position || "left"
|
|
127
125
|
});
|
|
128
126
|
}
|
|
129
|
-
setState((v) => ({
|
|
127
|
+
setState((v) => Object.assign(Object.assign({}, v), { offset: 0 }));
|
|
130
128
|
};
|
|
131
129
|
const rangeCalculation = (num, min, max) => {
|
|
132
130
|
return Math.min(Math.max(Number(num), Number(min)), Number(max));
|
|
@@ -145,7 +143,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
145
143
|
if (props.beforeClose) {
|
|
146
144
|
props.beforeClose(position);
|
|
147
145
|
} else {
|
|
148
|
-
(_a = props.onActionClick)
|
|
146
|
+
(_a = props.onActionClick) === null || _a === void 0 ? void 0 : _a.call(props, event, position);
|
|
149
147
|
}
|
|
150
148
|
};
|
|
151
149
|
useImperativeHandle(instanceRef, () => ({
|
|
@@ -157,7 +155,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
157
155
|
const targets = [root];
|
|
158
156
|
if (targets.some((targetItem) => {
|
|
159
157
|
const targetElement = targetItem.current || targetItem;
|
|
160
|
-
return !targetElement || (targetElement
|
|
158
|
+
return !targetElement || (targetElement === null || targetElement === void 0 ? void 0 : targetElement.contains(event.target));
|
|
161
159
|
})) {
|
|
162
160
|
return;
|
|
163
161
|
}
|