@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,35 +1,17 @@
|
|
|
1
|
+
import { _ as __rest, a as __awaiter } from "./tslib.es6-BZ8i9Q6l.js";
|
|
1
2
|
import React__default, { useRef, useState, useEffect } from "react";
|
|
2
3
|
import classNames from "classnames";
|
|
3
4
|
import Taro, { createSelectorQuery } from "@tarojs/taro";
|
|
4
|
-
import { P as Popup } from "./popup.taro-
|
|
5
|
-
import { a as getRect, g as getRectByTaro } from "./get-rect-by-taro-
|
|
6
|
-
import { C as ComponentDefaults } from "./typings-
|
|
7
|
-
const defaultProps = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
visible: false,
|
|
12
|
-
offset: [0, 12],
|
|
13
|
-
arrowOffset: 0,
|
|
14
|
-
targetId: "",
|
|
15
|
-
className: "",
|
|
16
|
-
showArrow: true,
|
|
17
|
-
overlay: false,
|
|
18
|
-
closeOnOutsideClick: true,
|
|
19
|
-
closeOnActionClick: true,
|
|
20
|
-
onClick: () => {
|
|
21
|
-
},
|
|
22
|
-
onOpen: () => {
|
|
23
|
-
},
|
|
24
|
-
onClose: () => {
|
|
25
|
-
}
|
|
26
|
-
};
|
|
5
|
+
import { P as Popup } from "./popup.taro-Iy_WQZ-m.js";
|
|
6
|
+
import { a as getRect, g as getRectByTaro } from "./get-rect-by-taro-CSN0TGnD.js";
|
|
7
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
8
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { list: [], location: "bottom", visible: false, offset: [0, 12], arrowOffset: 0, targetId: "", className: "", showArrow: true, overlay: false, closeOnOutsideClick: true, closeOnActionClick: true, onClick: () => {
|
|
9
|
+
}, onOpen: () => {
|
|
10
|
+
}, onClose: () => {
|
|
11
|
+
} });
|
|
27
12
|
const classPrefix = `nut-popover`;
|
|
28
13
|
const Popover = (props) => {
|
|
29
|
-
const { children, list, location, visible, offset, targetId, overlay, closeOnOutsideClick, closeOnActionClick, className, showArrow, arrowOffset, style, onClick, onOpen, onClose, onSelect,
|
|
30
|
-
...defaultProps,
|
|
31
|
-
...props
|
|
32
|
-
};
|
|
14
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { children, list, location, visible, offset, targetId, overlay, closeOnOutsideClick, closeOnActionClick, className, showArrow, arrowOffset, style, onClick, onOpen, onClose, onSelect } = _a, rest = __rest(_a, ["children", "list", "location", "visible", "offset", "targetId", "overlay", "closeOnOutsideClick", "closeOnActionClick", "className", "showArrow", "arrowOffset", "style", "onClick", "onOpen", "onClose", "onSelect"]);
|
|
33
15
|
const popoverRef = useRef(null);
|
|
34
16
|
const popoverContentRef = useRef(null);
|
|
35
17
|
const [showPopup, setShowPopup] = useState(false);
|
|
@@ -44,18 +26,18 @@ const Popover = (props) => {
|
|
|
44
26
|
}, 0);
|
|
45
27
|
}
|
|
46
28
|
}, [visible]);
|
|
47
|
-
const getContentWidth =
|
|
29
|
+
const getContentWidth = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
48
30
|
let rect;
|
|
49
|
-
createSelectorQuery().selectViewport().scrollOffset(
|
|
31
|
+
createSelectorQuery().selectViewport().scrollOffset((res) => __awaiter(void 0, void 0, void 0, function* () {
|
|
50
32
|
const distance = res.scrollTop;
|
|
51
33
|
if (targetId) {
|
|
52
34
|
if (Taro.getEnv() === Taro.ENV_TYPE.WEB) {
|
|
53
35
|
rect = getRect(document.querySelector(`#${targetId}`));
|
|
54
36
|
} else {
|
|
55
|
-
rect =
|
|
37
|
+
rect = yield getRectTaro(targetId);
|
|
56
38
|
}
|
|
57
39
|
} else {
|
|
58
|
-
rect =
|
|
40
|
+
rect = yield getRectByTaro(popoverRef.current);
|
|
59
41
|
}
|
|
60
42
|
setRootPosition({
|
|
61
43
|
width: rect.width,
|
|
@@ -64,12 +46,12 @@ const Popover = (props) => {
|
|
|
64
46
|
top: rect.top + distance,
|
|
65
47
|
right: rect.right
|
|
66
48
|
});
|
|
67
|
-
}).exec();
|
|
49
|
+
})).exec();
|
|
68
50
|
setTimeout(() => {
|
|
69
51
|
getPopoverContentW();
|
|
70
52
|
}, 300);
|
|
71
|
-
};
|
|
72
|
-
const getRectTaro =
|
|
53
|
+
});
|
|
54
|
+
const getRectTaro = (targetId2) => __awaiter(void 0, void 0, void 0, function* () {
|
|
73
55
|
return new Promise((resolve) => {
|
|
74
56
|
const query = createSelectorQuery();
|
|
75
57
|
query.select(`#${targetId2}`) && query.select(`#${targetId2}`).boundingClientRect();
|
|
@@ -77,12 +59,12 @@ const Popover = (props) => {
|
|
|
77
59
|
resolve(res[0]);
|
|
78
60
|
});
|
|
79
61
|
});
|
|
80
|
-
};
|
|
81
|
-
const getPopoverContentW =
|
|
82
|
-
const rectContent =
|
|
62
|
+
});
|
|
63
|
+
const getPopoverContentW = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
64
|
+
const rectContent = yield getRectByTaro(popoverContentRef.current);
|
|
83
65
|
setElWidth(rectContent.width);
|
|
84
66
|
setElHeight(rectContent.height);
|
|
85
|
-
};
|
|
67
|
+
});
|
|
86
68
|
const clickAway = () => {
|
|
87
69
|
if (closeOnOutsideClick) {
|
|
88
70
|
props.onClick && props.onClick();
|
|
@@ -206,7 +188,7 @@ const Popover = (props) => {
|
|
|
206
188
|
{ className: classes, style: getRootPosition() },
|
|
207
189
|
React__default.createElement(
|
|
208
190
|
Popup,
|
|
209
|
-
{ className: `nut-popover-content nut-popover-content-${location}`, position: "default", overlay, visible: showPopup,
|
|
191
|
+
Object.assign({ className: `nut-popover-content nut-popover-content-${location}`, position: "default", overlay, visible: showPopup }, rest),
|
|
210
192
|
React__default.createElement(
|
|
211
193
|
"div",
|
|
212
194
|
{ className: "nut-popover-content-group", ref: popoverContentRef },
|
|
@@ -222,8 +204,8 @@ const Popover = (props) => {
|
|
|
222
204
|
item.icon ? React__default.createElement("div", { className: "nut-popover-menu-item-icon" }, item.icon) : null,
|
|
223
205
|
React__default.createElement("div", { className: "nut-popover-menu-item-name" }, item.name),
|
|
224
206
|
item.action && item.action.icon ? React__default.createElement("div", { className: "nut-popover-menu-item-action-icon", onClick: (e) => {
|
|
225
|
-
var
|
|
226
|
-
return (_b = (
|
|
207
|
+
var _a2, _b;
|
|
208
|
+
return (_b = (_a2 = item.action) === null || _a2 === void 0 ? void 0 : _a2.onClick) === null || _b === void 0 ? void 0 : _b.call(_a2, e);
|
|
227
209
|
} }, item.action.icon) : null
|
|
228
210
|
);
|
|
229
211
|
})
|
|
@@ -4,32 +4,14 @@ import { CSSTransition } from "react-transition-group";
|
|
|
4
4
|
import classNames from "classnames";
|
|
5
5
|
import { Close } from "@nutui/icons-react-taro";
|
|
6
6
|
import { View } from "@tarojs/components";
|
|
7
|
-
import { d as defaultOverlayProps, u as useLockScrollTaro, O as Overlay } from "./overlay.taro-
|
|
8
|
-
import { C as ComponentDefaults } from "./typings-
|
|
9
|
-
const defaultProps = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
transition: "",
|
|
13
|
-
overlayStyle: {},
|
|
14
|
-
overlayClassName: "",
|
|
15
|
-
closeable: false,
|
|
16
|
-
closeIconPosition: "top-right",
|
|
17
|
-
closeIcon: "close",
|
|
18
|
-
destroyOnClose: false,
|
|
19
|
-
portal: null,
|
|
20
|
-
overlay: true,
|
|
21
|
-
round: false,
|
|
22
|
-
onOpen: () => {
|
|
23
|
-
},
|
|
24
|
-
onClose: () => {
|
|
25
|
-
},
|
|
26
|
-
onOverlayClick: (e) => true,
|
|
27
|
-
onCloseIconClick: (e) => true,
|
|
28
|
-
...defaultOverlayProps
|
|
29
|
-
};
|
|
7
|
+
import { d as defaultOverlayProps, u as useLockScrollTaro, O as Overlay } from "./overlay.taro-BaBu-3-F.js";
|
|
8
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
9
|
+
const defaultProps = Object.assign(Object.assign(Object.assign({}, ComponentDefaults), { position: "center", transition: "", overlayStyle: {}, overlayClassName: "", closeable: false, closeIconPosition: "top-right", closeIcon: "close", destroyOnClose: false, portal: null, overlay: true, round: false, onOpen: () => {
|
|
10
|
+
}, onClose: () => {
|
|
11
|
+
}, onOverlayClick: (e) => true, onCloseIconClick: (e) => true }), defaultOverlayProps);
|
|
30
12
|
const _zIndex = 1100;
|
|
31
13
|
const Popup = (props) => {
|
|
32
|
-
const { children, visible, overlay, closeOnOverlayClick, overlayStyle, overlayClassName, zIndex, lockScroll, duration, closeable, closeIconPosition, closeIcon, left, title, description, style, transition, round, position, className, destroyOnClose, portal, onOpen, onClose, onOverlayClick, onCloseIconClick, afterShow, afterClose, onClick } = {
|
|
14
|
+
const { children, visible, overlay, closeOnOverlayClick, overlayStyle, overlayClassName, zIndex, lockScroll, duration, closeable, closeIconPosition, closeIcon, left, title, description, style, transition, round, position, className, destroyOnClose, portal, onOpen, onClose, onOverlayClick, onCloseIconClick, afterShow, afterClose, onClick } = Object.assign(Object.assign({}, defaultProps), props);
|
|
33
15
|
let innerIndex = zIndex || _zIndex;
|
|
34
16
|
const [index, setIndex] = useState(innerIndex);
|
|
35
17
|
const [innerVisible, setInnerVisible] = useState(visible);
|
|
@@ -40,14 +22,8 @@ const Popup = (props) => {
|
|
|
40
22
|
const baseStyle = {
|
|
41
23
|
zIndex: index
|
|
42
24
|
};
|
|
43
|
-
const overlayStyles = {
|
|
44
|
-
|
|
45
|
-
"--nutui-overlay-zIndex": index
|
|
46
|
-
};
|
|
47
|
-
const popStyles = {
|
|
48
|
-
...style,
|
|
49
|
-
...baseStyle
|
|
50
|
-
};
|
|
25
|
+
const overlayStyles = Object.assign(Object.assign({}, overlayStyle), { "--nutui-overlay-zIndex": index });
|
|
26
|
+
const popStyles = Object.assign(Object.assign({}, style), baseStyle);
|
|
51
27
|
const popClassName = classNames({
|
|
52
28
|
[`${classPrefix}`]: true,
|
|
53
29
|
[`${classPrefix}-round`]: round || position === "bottom",
|
|
@@ -1,20 +1,9 @@
|
|
|
1
|
+
import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
1
2
|
import React__default from "react";
|
|
2
|
-
import { C as ComponentDefaults } from "./typings-
|
|
3
|
-
const defaultProps = {
|
|
4
|
-
...ComponentDefaults,
|
|
5
|
-
price: 0,
|
|
6
|
-
symbol: "¥",
|
|
7
|
-
digits: 2,
|
|
8
|
-
thousands: false,
|
|
9
|
-
position: "before",
|
|
10
|
-
size: "large",
|
|
11
|
-
line: false
|
|
12
|
-
};
|
|
3
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
4
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { price: 0, symbol: "¥", digits: 2, thousands: false, position: "before", size: "large", line: false });
|
|
13
5
|
const Price = (props) => {
|
|
14
|
-
const { price, symbol, digits, thousands, position, size, line, className, style,
|
|
15
|
-
...defaultProps,
|
|
16
|
-
...props
|
|
17
|
-
};
|
|
6
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { price, symbol, digits, thousands, position, size, line, className, style } = _a, rest = __rest(_a, ["price", "symbol", "digits", "thousands", "position", "size", "line", "className", "style"]);
|
|
18
7
|
const classPrefix = "nut-price";
|
|
19
8
|
const replaceSpecialChar = (url) => {
|
|
20
9
|
url = url.replace(/"/g, '"');
|
|
@@ -65,7 +54,7 @@ const Price = (props) => {
|
|
|
65
54
|
};
|
|
66
55
|
return React__default.createElement(
|
|
67
56
|
"div",
|
|
68
|
-
{ className: `${classPrefix} ${line ? `${classPrefix}-line` : ""} ${className}`, style,
|
|
57
|
+
Object.assign({ className: `${classPrefix} ${line ? `${classPrefix}-line` : ""} ${className}`, style }, rest),
|
|
69
58
|
symbol && position === "before" ? renderSymbol() : null,
|
|
70
59
|
React__default.createElement("div", { className: `${classPrefix}-integer ${classPrefix}-integer-${size}` }, formatThousands(price)),
|
|
71
60
|
digits !== 0 ? React__default.createElement("div", { className: `${classPrefix}-decimal ${classPrefix}-decimal-${size}` }, ".") : null,
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
+
import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
1
2
|
import React__default, { useState, useEffect } from "react";
|
|
2
3
|
import classNames from "classnames";
|
|
3
|
-
import { C as ComponentDefaults } from "./typings-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
percent: 0,
|
|
7
|
-
showText: false,
|
|
8
|
-
animated: false,
|
|
9
|
-
delay: 0
|
|
10
|
-
};
|
|
4
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
5
|
+
import { a as useRtl } from "./configprovider.taro-CyU_tvNJ.js";
|
|
6
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { percent: 0, showText: false, animated: false, delay: 0 });
|
|
11
7
|
const Progress = (props) => {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
...props
|
|
15
|
-
};
|
|
8
|
+
const rtl = useRtl();
|
|
9
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { className, style, percent, background, color, strokeWidth, showText, animated, children, delay } = _a, rest = __rest(_a, ["className", "style", "percent", "background", "color", "strokeWidth", "showText", "animated", "children", "delay"]);
|
|
16
10
|
const classPrefix = "nut-progress";
|
|
17
11
|
const classesInner = classNames({
|
|
18
12
|
[`${classPrefix}-inner`]: true,
|
|
@@ -44,11 +38,11 @@ const Progress = (props) => {
|
|
|
44
38
|
}, []);
|
|
45
39
|
return React__default.createElement(
|
|
46
40
|
"div",
|
|
47
|
-
{ className: classNames(classPrefix, className), style,
|
|
41
|
+
Object.assign({ className: classNames(classPrefix, className), style }, rest),
|
|
48
42
|
React__default.createElement(
|
|
49
43
|
"div",
|
|
50
44
|
{ className: `${classPrefix}-outer`, style: stylesOuter },
|
|
51
|
-
React__default.createElement("div", { className: classesInner, style: stylesInner }, showText && React__default.createElement("div", { className: `${classPrefix}-text`, style: { left: `${displayPercent}%` } }, children || React__default.createElement(
|
|
45
|
+
React__default.createElement("div", { className: classesInner, style: stylesInner }, showText && React__default.createElement("div", { className: `${classPrefix}-text`, style: rtl ? { right: `${displayPercent}%` } : { left: `${displayPercent}%` } }, children || React__default.createElement(
|
|
52
46
|
"div",
|
|
53
47
|
{ className: `${classPrefix}-text-inner`, style: {
|
|
54
48
|
background: color
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { a as __awaiter } from "./tslib.es6-BZ8i9Q6l.js";
|
|
1
2
|
import React__default, { useRef, useState } from "react";
|
|
2
3
|
import { View } from "@tarojs/components";
|
|
3
4
|
import { Loading, More } from "@nutui/icons-react-taro";
|
|
4
5
|
import Taro from "@tarojs/taro";
|
|
5
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
6
|
-
import { u as useTouch } from "./use-touch-
|
|
7
|
-
import { C as ComponentDefaults } from "./typings-
|
|
6
|
+
import { u as useConfig } from "./configprovider.taro-CyU_tvNJ.js";
|
|
7
|
+
import { u as useTouch } from "./use-touch-OfEaR5qi.js";
|
|
8
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
8
9
|
function bound(position, min, max) {
|
|
9
10
|
let ret = position;
|
|
10
11
|
if (min !== void 0) {
|
|
@@ -28,34 +29,18 @@ function rubberbandIfOutOfBounds(position, min, max, dimension, constant = 0.15)
|
|
|
28
29
|
return position;
|
|
29
30
|
}
|
|
30
31
|
const sleep = (time) => new Promise((resolve) => setTimeout(resolve, time));
|
|
31
|
-
const defaultProps = {
|
|
32
|
-
|
|
33
|
-
pullingText: "",
|
|
34
|
-
canReleaseText: "",
|
|
35
|
-
refreshingText: "",
|
|
36
|
-
completeText: "",
|
|
37
|
-
completeDelay: 500,
|
|
38
|
-
disabled: false,
|
|
39
|
-
headHeight: 50,
|
|
40
|
-
threshold: 60,
|
|
41
|
-
scrollTop: 0,
|
|
42
|
-
onRefresh: () => {
|
|
43
|
-
}
|
|
44
|
-
};
|
|
32
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { pullingText: "", canReleaseText: "", refreshingText: "", completeText: "", completeDelay: 500, disabled: false, headHeight: 50, threshold: 60, scrollTop: 0, onRefresh: () => {
|
|
33
|
+
} });
|
|
45
34
|
const PullToRefresh = (p) => {
|
|
46
35
|
const classPrefix = "nut-pulltorefresh";
|
|
47
36
|
const { locale } = useConfig();
|
|
48
37
|
const touch = useTouch();
|
|
49
|
-
const props = {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
refreshingText: p.refreshingText || locale.pullToRefresh.refreshingText,
|
|
56
|
-
completeText: p.completeText || locale.pullToRefresh.completeText
|
|
57
|
-
}
|
|
58
|
-
};
|
|
38
|
+
const props = Object.assign(Object.assign(Object.assign({}, defaultProps), p), {
|
|
39
|
+
pullingText: p.pullingText || locale.pullToRefresh.pullingText,
|
|
40
|
+
canReleaseText: p.canReleaseText || locale.pullToRefresh.canReleaseText,
|
|
41
|
+
refreshingText: p.refreshingText || locale.pullToRefresh.refreshingText,
|
|
42
|
+
completeText: p.completeText || locale.pullToRefresh.completeText
|
|
43
|
+
});
|
|
59
44
|
const headHeight = props.headHeight;
|
|
60
45
|
const threshold = props.threshold;
|
|
61
46
|
const pullingRef = useRef(false);
|
|
@@ -72,14 +57,14 @@ const PullToRefresh = (p) => {
|
|
|
72
57
|
const renderStatusIcon = () => {
|
|
73
58
|
var _a;
|
|
74
59
|
if (props.renderIcon) {
|
|
75
|
-
return (_a = props.renderIcon)
|
|
60
|
+
return (_a = props.renderIcon) === null || _a === void 0 ? void 0 : _a.call(props, status);
|
|
76
61
|
}
|
|
77
62
|
return renderIcons(status);
|
|
78
63
|
};
|
|
79
64
|
const renderStatusText = () => {
|
|
80
65
|
var _a;
|
|
81
66
|
if (props.renderText) {
|
|
82
|
-
return (_a = props.renderText)
|
|
67
|
+
return (_a = props.renderText) === null || _a === void 0 ? void 0 : _a.call(props, status);
|
|
83
68
|
}
|
|
84
69
|
if (status === "pulling")
|
|
85
70
|
return props.pullingText;
|
|
@@ -107,22 +92,24 @@ const PullToRefresh = (p) => {
|
|
|
107
92
|
setStatus(height > threshold ? "canRelease" : "pulling");
|
|
108
93
|
}
|
|
109
94
|
};
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
95
|
+
function doRefresh() {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
setHeight(headHeight);
|
|
98
|
+
setStatus("refreshing");
|
|
99
|
+
try {
|
|
100
|
+
yield props.onRefresh();
|
|
101
|
+
setStatus("complete");
|
|
102
|
+
} catch (e) {
|
|
103
|
+
setHeight(0);
|
|
104
|
+
setStatus("pulling");
|
|
105
|
+
throw e;
|
|
106
|
+
}
|
|
107
|
+
if (props.completeDelay > 0) {
|
|
108
|
+
yield sleep(props.completeDelay);
|
|
109
|
+
}
|
|
117
110
|
setHeight(0);
|
|
118
111
|
setStatus("pulling");
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
if (props.completeDelay > 0) {
|
|
122
|
-
await sleep(props.completeDelay);
|
|
123
|
-
}
|
|
124
|
-
setHeight(0);
|
|
125
|
-
setStatus("pulling");
|
|
112
|
+
});
|
|
126
113
|
}
|
|
127
114
|
const handleTouchEnd = () => {
|
|
128
115
|
pullingRef.current = false;
|
|
@@ -134,10 +121,7 @@ const PullToRefresh = (p) => {
|
|
|
134
121
|
}
|
|
135
122
|
};
|
|
136
123
|
const isAndroidWeApp = Taro.getSystemInfoSync().platform === "android" && Taro.getEnv() === "WEAPP";
|
|
137
|
-
const springStyles = {
|
|
138
|
-
height: `${height}px`,
|
|
139
|
-
...!pullingRef.current || isAndroidWeApp ? { transition: "height .3s ease" } : {}
|
|
140
|
-
};
|
|
124
|
+
const springStyles = Object.assign({ height: `${height}px` }, !pullingRef.current || isAndroidWeApp ? { transition: "height .3s ease" } : {});
|
|
141
125
|
return React__default.createElement(
|
|
142
126
|
View,
|
|
143
127
|
{ className: `${classPrefix} ${props.className}`, style: props.style, onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd },
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
1
2
|
import React__default, { useCallback, useContext } from "react";
|
|
2
3
|
import { CheckDisabled, CheckChecked, CheckNormal } from "@nutui/icons-react-taro";
|
|
3
4
|
import classNames from "classnames";
|
|
4
|
-
import { C as ComponentDefaults } from "./typings-
|
|
5
|
-
import { u as usePropsValue } from "./use-props-value-
|
|
5
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
6
|
+
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
6
7
|
const RadioContext = React__default.createContext(null);
|
|
7
8
|
const defaultProps$1 = {
|
|
8
9
|
labelPosition: "right",
|
|
@@ -13,7 +14,7 @@ const defaultProps$1 = {
|
|
|
13
14
|
};
|
|
14
15
|
const classPrefix = "nut-radiogroup";
|
|
15
16
|
const RadioGroup = React__default.forwardRef((props, ref) => {
|
|
16
|
-
const { children, className, value, defaultValue, onChange, shape, labelPosition, direction, options, disabled,
|
|
17
|
+
const _a = Object.assign(Object.assign({}, defaultProps$1), props), { children, className, value, defaultValue, onChange, shape, labelPosition, direction, options, disabled } = _a, rest = __rest(_a, ["children", "className", "value", "defaultValue", "onChange", "shape", "labelPosition", "direction", "options", "disabled"]);
|
|
17
18
|
const [val2State, setVal2State] = usePropsValue({
|
|
18
19
|
defaultValue: props.defaultValue,
|
|
19
20
|
value: props.value,
|
|
@@ -21,8 +22,9 @@ const RadioGroup = React__default.forwardRef((props, ref) => {
|
|
|
21
22
|
onChange
|
|
22
23
|
});
|
|
23
24
|
const renderOptionsChildren = useCallback(() => {
|
|
24
|
-
return options
|
|
25
|
-
|
|
25
|
+
return options === null || options === void 0 ? void 0 : options.map((_a2) => {
|
|
26
|
+
var { label, value: value2, disabled: disabled2, onChange: onChange2 } = _a2, rest2 = __rest(_a2, ["label", "value", "disabled", "onChange"]);
|
|
27
|
+
return React__default.createElement(Radio, Object.assign({}, rest2, { key: value2 === null || value2 === void 0 ? void 0 : value2.toString(), children: label, value: value2, disabled: disabled2, onChange: onChange2, labelPosition, checked: value2 === val2State }));
|
|
26
28
|
});
|
|
27
29
|
}, [options]);
|
|
28
30
|
return React__default.createElement(
|
|
@@ -39,31 +41,22 @@ const RadioGroup = React__default.forwardRef((props, ref) => {
|
|
|
39
41
|
setVal2State("");
|
|
40
42
|
}
|
|
41
43
|
} },
|
|
42
|
-
React__default.createElement("div", { className: classNames(classPrefix, {
|
|
44
|
+
React__default.createElement("div", Object.assign({ className: classNames(classPrefix, {
|
|
43
45
|
[`${classPrefix}-${props.direction}`]: props.direction
|
|
44
|
-
}, className),
|
|
46
|
+
}, className) }, rest), (options === null || options === void 0 ? void 0 : options.length) ? renderOptionsChildren() : children)
|
|
45
47
|
);
|
|
46
48
|
});
|
|
47
49
|
RadioGroup.defaultProps = defaultProps$1;
|
|
48
50
|
RadioGroup.displayName = "NutRadioGroup";
|
|
49
|
-
const defaultProps = {
|
|
50
|
-
|
|
51
|
-
disabled: false,
|
|
52
|
-
shape: "round",
|
|
53
|
-
value: "",
|
|
54
|
-
labelPosition: "right",
|
|
55
|
-
icon: null,
|
|
56
|
-
activeIcon: null,
|
|
57
|
-
onChange: (checked) => {
|
|
58
|
-
}
|
|
59
|
-
};
|
|
51
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { disabled: false, shape: "round", value: "", labelPosition: "right", icon: null, activeIcon: null, onChange: (checked) => {
|
|
52
|
+
} });
|
|
60
53
|
const Radio = (props) => {
|
|
61
54
|
const classPrefix2 = "nut-radio";
|
|
62
|
-
const { children, className, style, checked, defaultChecked, shape, value, icon, activeIcon, onChange,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
55
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { children, className, style, checked, defaultChecked, shape, value, icon, activeIcon, onChange } = _a, others = __rest(_a, ["children", "className", "style", "checked", "defaultChecked", "shape", "value", "icon", "activeIcon", "onChange"]);
|
|
56
|
+
let { labelPosition, disabled } = others, rest = __rest(
|
|
57
|
+
others,
|
|
58
|
+
["labelPosition", "disabled"]
|
|
59
|
+
);
|
|
67
60
|
let [checkedStatement, setCheckedStatement] = usePropsValue({
|
|
68
61
|
value: checked,
|
|
69
62
|
defaultValue: defaultChecked,
|
|
@@ -111,15 +104,9 @@ const Radio = (props) => {
|
|
|
111
104
|
return React__default.createElement(CheckDisabled, { className: classNames(color()) });
|
|
112
105
|
}
|
|
113
106
|
if (checkedStatement) {
|
|
114
|
-
return React__default.isValidElement(activeIcon2) ? React__default.cloneElement(activeIcon2, {
|
|
115
|
-
...activeIcon2.props,
|
|
116
|
-
className: classNames(color())
|
|
117
|
-
}) : React__default.createElement(CheckChecked, { className: classNames(color()) });
|
|
107
|
+
return React__default.isValidElement(activeIcon2) ? React__default.cloneElement(activeIcon2, Object.assign(Object.assign({}, activeIcon2.props), { className: classNames(color()) })) : React__default.createElement(CheckChecked, { className: classNames(color()) });
|
|
118
108
|
}
|
|
119
|
-
return React__default.isValidElement(icon2) ? React__default.cloneElement(icon2, {
|
|
120
|
-
...icon2.props,
|
|
121
|
-
className: classNames(color())
|
|
122
|
-
}) : React__default.createElement(CheckNormal, { className: classNames(color()) });
|
|
109
|
+
return React__default.isValidElement(icon2) ? React__default.cloneElement(icon2, Object.assign(Object.assign({}, icon2.props), { className: classNames(color()) })) : React__default.createElement(CheckNormal, { className: classNames(color()) });
|
|
123
110
|
};
|
|
124
111
|
const renderByShape = (shape2) => {
|
|
125
112
|
return shape2 === "button" ? renderButton() : React__default.createElement(
|
|
@@ -137,9 +124,9 @@ const Radio = (props) => {
|
|
|
137
124
|
return;
|
|
138
125
|
setCheckedStatement(!checkedStatement);
|
|
139
126
|
};
|
|
140
|
-
return React__default.createElement("div", { className: classNames(classPrefix2, {
|
|
127
|
+
return React__default.createElement("div", Object.assign({ className: classNames(classPrefix2, {
|
|
141
128
|
[`${classPrefix2}-reverse`]: labelPosition === "left"
|
|
142
|
-
}, className), style, onClick: handleClick,
|
|
129
|
+
}, className), style, onClick: handleClick }, rest), renderRadioItem());
|
|
143
130
|
};
|
|
144
131
|
Radio.defaultProps = defaultProps;
|
|
145
132
|
Radio.displayName = "NutRadio";
|
|
@@ -1,21 +1,16 @@
|
|
|
1
|
+
import { a as __awaiter } from "./tslib.es6-BZ8i9Q6l.js";
|
|
1
2
|
import React__default, { useState, useRef, useEffect, useCallback } from "react";
|
|
2
3
|
import classNames from "classnames";
|
|
3
4
|
import { View } from "@tarojs/components";
|
|
4
|
-
import { u as useTouch } from "./use-touch-
|
|
5
|
-
import { C as ComponentDefaults } from "./typings-
|
|
6
|
-
import { u as usePropsValue } from "./use-props-value-
|
|
7
|
-
import { g as getRectByTaro } from "./get-rect-by-taro-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
range: false,
|
|
11
|
-
min: 0,
|
|
12
|
-
max: 100,
|
|
13
|
-
step: 1,
|
|
14
|
-
vertical: false,
|
|
15
|
-
marks: {}
|
|
16
|
-
};
|
|
5
|
+
import { u as useTouch } from "./use-touch-OfEaR5qi.js";
|
|
6
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
7
|
+
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
8
|
+
import { g as getRectByTaro } from "./get-rect-by-taro-CSN0TGnD.js";
|
|
9
|
+
import { a as useRtl } from "./configprovider.taro-CyU_tvNJ.js";
|
|
10
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { range: false, min: 0, max: 100, step: 1, vertical: false, marks: {} });
|
|
17
11
|
const Range = (props) => {
|
|
18
|
-
const
|
|
12
|
+
const rtl = useRtl();
|
|
13
|
+
const { className, range, disabled, button, vertical, marks, onChange, onStart, onEnd, minDescription, maxDescription, currentDescription, min, max, step, value, defaultValue } = Object.assign(Object.assign({}, defaultProps), props);
|
|
19
14
|
const classPrefix = "nut-range";
|
|
20
15
|
const [buttonIndex, setButtonIndex] = useState(0);
|
|
21
16
|
const [dragStatus, setDragStatus] = useState("start");
|
|
@@ -100,15 +95,17 @@ const Range = (props) => {
|
|
|
100
95
|
transition: dragStatus ? "none" : void 0
|
|
101
96
|
};
|
|
102
97
|
}
|
|
98
|
+
const dir = rtl ? "right" : "left";
|
|
103
99
|
return {
|
|
104
100
|
width: calcMainAxis(),
|
|
105
|
-
|
|
101
|
+
[dir]: calcOffset(),
|
|
106
102
|
transition: dragStatus ? "none" : void 0
|
|
107
103
|
};
|
|
108
104
|
};
|
|
109
105
|
const marksStyle = (mark) => {
|
|
106
|
+
const dir = rtl ? "right" : "left";
|
|
110
107
|
let style = {
|
|
111
|
-
|
|
108
|
+
[dir]: `${(mark - min) / scope() * 100}%`
|
|
112
109
|
};
|
|
113
110
|
if (vertical) {
|
|
114
111
|
style = {
|
|
@@ -147,12 +144,12 @@ const Range = (props) => {
|
|
|
147
144
|
}
|
|
148
145
|
end && onEnd && onEnd(value2);
|
|
149
146
|
};
|
|
150
|
-
const click =
|
|
147
|
+
const click = (event) => __awaiter(void 0, void 0, void 0, function* () {
|
|
151
148
|
if (disabled || !root.current) {
|
|
152
149
|
return;
|
|
153
150
|
}
|
|
154
151
|
setDragStatus("");
|
|
155
|
-
const rect =
|
|
152
|
+
const rect = yield getRectByTaro(root.current);
|
|
156
153
|
let delta = (event.detail.x ? event.detail.x : event.clientX) - rect.left;
|
|
157
154
|
let total = rect.width;
|
|
158
155
|
if (vertical) {
|
|
@@ -172,7 +169,7 @@ const Range = (props) => {
|
|
|
172
169
|
} else {
|
|
173
170
|
updateValue(value2, true);
|
|
174
171
|
}
|
|
175
|
-
};
|
|
172
|
+
});
|
|
176
173
|
const onTouchStart = (event) => {
|
|
177
174
|
if (disabled) {
|
|
178
175
|
return;
|
|
@@ -186,7 +183,7 @@ const Range = (props) => {
|
|
|
186
183
|
}
|
|
187
184
|
setDragStatus("start");
|
|
188
185
|
};
|
|
189
|
-
const onTouchMove =
|
|
186
|
+
const onTouchMove = (event) => __awaiter(void 0, void 0, void 0, function* () {
|
|
190
187
|
if (disabled || !root.current) {
|
|
191
188
|
return;
|
|
192
189
|
}
|
|
@@ -195,10 +192,11 @@ const Range = (props) => {
|
|
|
195
192
|
}
|
|
196
193
|
touch.move(event);
|
|
197
194
|
setDragStatus("draging");
|
|
198
|
-
const rect =
|
|
195
|
+
const rect = yield getRectByTaro(root.current);
|
|
199
196
|
let delta = touch.deltaX.current;
|
|
200
197
|
let total = rect.width;
|
|
201
198
|
let diff = delta / total * scope();
|
|
199
|
+
diff = rtl ? -diff : diff;
|
|
202
200
|
if (vertical) {
|
|
203
201
|
delta = touch.deltaY.current;
|
|
204
202
|
total = rect.height;
|
|
@@ -213,7 +211,7 @@ const Range = (props) => {
|
|
|
213
211
|
}
|
|
214
212
|
setEaxctValue(newValue);
|
|
215
213
|
updateValue(newValue);
|
|
216
|
-
};
|
|
214
|
+
});
|
|
217
215
|
const onTouchEnd = () => {
|
|
218
216
|
if (disabled) {
|
|
219
217
|
return;
|
|
@@ -3,26 +3,13 @@ import classNames from "classnames";
|
|
|
3
3
|
import { StarFill } from "@nutui/icons-react-taro";
|
|
4
4
|
import { useReady } from "@tarojs/taro";
|
|
5
5
|
import { View } from "@tarojs/components";
|
|
6
|
-
import { C as ComponentDefaults } from "./typings-
|
|
7
|
-
import { u as usePropsValue } from "./use-props-value-
|
|
8
|
-
import { g as getRectByTaro } from "./get-rect-by-taro-
|
|
9
|
-
import { u as useRefs } from "./use-refs-
|
|
10
|
-
const defaultProps = {
|
|
11
|
-
...ComponentDefaults,
|
|
12
|
-
count: 5,
|
|
13
|
-
min: 0,
|
|
14
|
-
checkedIcon: null,
|
|
15
|
-
uncheckedIcon: null,
|
|
16
|
-
disabled: false,
|
|
17
|
-
readOnly: false,
|
|
18
|
-
allowHalf: false,
|
|
19
|
-
touchable: false
|
|
20
|
-
};
|
|
6
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
7
|
+
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
8
|
+
import { g as getRectByTaro } from "./get-rect-by-taro-CSN0TGnD.js";
|
|
9
|
+
import { u as useRefs } from "./use-refs-BeEmziIR.js";
|
|
10
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { count: 5, min: 0, checkedIcon: null, uncheckedIcon: null, disabled: false, readOnly: false, allowHalf: false, touchable: false });
|
|
21
11
|
const Rate = (props) => {
|
|
22
|
-
const { className, style, count, value, defaultValue, min, checkedIcon, uncheckedIcon, disabled, readOnly, allowHalf, touchable, onChange, onTouchEnd } = {
|
|
23
|
-
...defaultProps,
|
|
24
|
-
...props
|
|
25
|
-
};
|
|
12
|
+
const { className, style, count, value, defaultValue, min, checkedIcon, uncheckedIcon, disabled, readOnly, allowHalf, touchable, onChange, onTouchEnd } = Object.assign(Object.assign({}, defaultProps), props);
|
|
26
13
|
const classPrefix = "nut-rate";
|
|
27
14
|
const [countArray, setCountArray] = useState([1, 2, 3, 4, 5]);
|
|
28
15
|
const [refs, setRefs] = useRefs();
|
|
@@ -65,7 +52,7 @@ const Rate = (props) => {
|
|
|
65
52
|
};
|
|
66
53
|
const getScoreByPosition = (x) => {
|
|
67
54
|
var _a;
|
|
68
|
-
if ((_a = rateRects.current)
|
|
55
|
+
if ((_a = rateRects.current) === null || _a === void 0 ? void 0 : _a.length) {
|
|
69
56
|
for (let index = rateRects.current.length - 1; index >= 0; index--) {
|
|
70
57
|
const item = rateRects.current[index];
|
|
71
58
|
if (item && x > item.left) {
|
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
import React__default from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
import { D as DataContext } from "./UserContext-
|
|
4
|
-
import { C as ComponentDefaults } from "./typings-
|
|
3
|
+
import { D as DataContext } from "./UserContext-BlM0373q.js";
|
|
4
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
5
5
|
const classPrefix = "nut-row";
|
|
6
|
-
const defaultProps = {
|
|
7
|
-
...ComponentDefaults,
|
|
8
|
-
type: "",
|
|
9
|
-
justify: "start",
|
|
10
|
-
align: "flex-start",
|
|
11
|
-
wrap: "nowrap",
|
|
12
|
-
gutter: "0"
|
|
13
|
-
};
|
|
6
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { type: "", justify: "start", align: "flex-start", wrap: "nowrap", gutter: "0" });
|
|
14
7
|
const Row = (props) => {
|
|
15
|
-
const { className, style, children, type, justify, align, wrap, gutter, onClick } = {
|
|
16
|
-
...defaultProps,
|
|
17
|
-
...props
|
|
18
|
-
};
|
|
8
|
+
const { className, style, children, type, justify, align, wrap, gutter, onClick } = Object.assign(Object.assign({}, defaultProps), props);
|
|
19
9
|
const getClass = (prefix, type2) => {
|
|
20
10
|
const classType = type2 ? `nut-row-${prefix}-${type2}` : "";
|
|
21
11
|
const className2 = prefix ? classType : `nut-row-${type2}`;
|