@nutui/nutui-react-taro 1.2.2-beta.0 → 1.3.1-beta.0
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 +45 -0
- package/dist/esm/ActionSheet.js +5 -4
- package/dist/esm/Address.js +7 -6
- package/dist/esm/AnimatingNumbers.js +3 -2
- package/dist/esm/Audio/style/index.js +4 -0
- package/dist/esm/Audio.js +18 -0
- package/dist/esm/Avatar.js +3 -3
- package/dist/esm/AvatarGroup.js +4 -4
- package/dist/esm/BackTop.js +3 -3
- package/dist/esm/Badge.js +3 -3
- package/dist/esm/Barrage.js +3 -2
- package/dist/esm/Button.js +3 -3
- package/dist/esm/Calendar/style/index.js +1 -2
- package/dist/esm/Calendar.js +9 -7
- package/dist/esm/CalendarItem.js +5 -5
- package/dist/esm/Card.js +3 -3
- package/dist/esm/Cascader/style/index.js +2 -0
- package/dist/esm/Cascader.js +14 -0
- package/dist/esm/Cell.js +3 -3
- package/dist/esm/Checkbox.js +3 -3
- package/dist/esm/CheckboxGroup.js +2 -2
- package/dist/esm/Col.js +2 -2
- package/dist/esm/Collapse.js +2 -2
- package/dist/esm/CollapseItem.js +3 -3
- package/dist/esm/ConfigProvider.js +3 -3
- package/dist/esm/CountDown.js +4 -4
- package/dist/esm/DatePicker.js +9 -8
- package/dist/esm/Dialog.js +6 -6
- package/dist/esm/Divider.js +2 -2
- package/dist/esm/Drag.js +2 -2
- package/dist/esm/Elevator.js +3 -2
- package/dist/esm/Empty.js +4 -4
- package/dist/esm/FixedNav.js +5 -5
- package/dist/esm/Grid/style/index.js +2 -0
- package/dist/esm/Grid.js +7 -0
- package/dist/esm/GridItem/style/index.js +2 -0
- package/dist/esm/GridItem.js +8 -0
- package/dist/esm/Icon/style/index.js +1 -0
- package/dist/esm/Icon.js +2 -2
- package/dist/esm/ImagePreview/style/index.js +2 -0
- package/dist/esm/ImagePreview.js +15 -0
- package/dist/esm/Infiniteloading.js +5 -5
- package/dist/esm/Input.js +5 -5
- package/dist/esm/InputNumber.js +3 -3
- package/dist/esm/Menu/style/index.js +3 -0
- package/dist/esm/Menu.js +7 -0
- package/dist/esm/MenuItem/style/index.js +3 -0
- package/dist/esm/MenuItem.js +11 -0
- package/dist/esm/NavBar.js +4 -3
- package/dist/esm/NoticeBar.js +4 -3
- package/dist/esm/{Notification-b09c89e8.js → Notification-422905bd.js} +20 -12
- package/dist/esm/Notify.js +3 -2
- package/dist/esm/NumberKeyboard.js +7 -6
- package/dist/esm/Pagination.js +4 -4
- package/dist/esm/Picker.js +9 -8
- package/dist/esm/Popover.js +6 -4
- package/dist/esm/Popup.js +4 -3
- package/dist/esm/Progress.js +3 -3
- package/dist/esm/Radio.js +4 -4
- package/dist/esm/RadioGroup.js +2 -3
- package/dist/esm/Range.js +11 -9
- package/dist/esm/Rate.js +3 -3
- package/dist/esm/Row.js +2 -2
- package/dist/esm/SearchBar.js +5 -5
- package/dist/esm/ShortPassword.js +7 -6
- package/dist/esm/SideNavBar/style/index.js +2 -0
- package/dist/esm/SideNavBar.js +14 -0
- package/dist/esm/SideNavBarItem/style/index.js +2 -0
- package/dist/esm/SideNavBarItem.js +3 -0
- package/dist/esm/Signature.js +6 -6
- package/dist/esm/Skeleton.js +3 -3
- package/dist/esm/Step.js +3 -3
- package/dist/esm/SubSideNavBar/style/index.js +2 -0
- package/dist/esm/SubSideNavBar.js +4 -0
- package/dist/esm/Swipe/style/index.js +2 -0
- package/dist/esm/Swipe.js +7 -0
- package/dist/esm/Swiper.js +3 -2
- package/dist/esm/SwiperItem.js +2 -2
- package/dist/esm/TabPane.js +2 -2
- package/dist/esm/TabbarItem.js +3 -3
- package/dist/esm/Table/style/index.js +2 -0
- package/dist/esm/Table.js +9 -0
- package/dist/esm/Tabs.js +3 -3
- package/dist/esm/Tag.js +3 -3
- package/dist/esm/TextArea.js +4 -4
- package/dist/esm/TimeDetail.js +4 -4
- package/dist/esm/TimePannel.js +4 -4
- package/dist/esm/TimeSelect.js +7 -6
- package/dist/esm/Toast.js +5 -4
- package/dist/esm/Uploader.js +5 -5
- package/dist/esm/VirtualList.js +4 -4
- package/dist/esm/{actionsheet.taro-4ae40ea0.js → actionsheet.taro-f4d407b0.js} +1 -1
- package/dist/esm/{address.taro-82a8fa11.js → address.taro-4765a826.js} +95 -36
- package/dist/esm/{animatingnumbers.taro-cda438cc.js → animatingnumbers.taro-877baa98.js} +20 -15
- package/dist/esm/audio.taro-cd6cc93b.js +292 -0
- package/dist/esm/{avatar.taro-5dafffdc.js → avatar.taro-0a0472fd.js} +1 -2
- package/dist/esm/{avatargroup.taro-a39282b3.js → avatargroup-1ca79066.js} +1 -1
- package/dist/esm/{backtop.taro-65dccd86.js → backtop.taro-0e2e3946.js} +8 -6
- package/dist/esm/{badge.taro-8c001377.js → badge.taro-eeac9de8.js} +5 -5
- package/dist/esm/{barrage.taro-f1139b9c.js → barrage.taro-efac8422.js} +42 -19
- package/dist/esm/{button.taro-90c8bb93.js → button-521a516b.js} +1 -1
- package/dist/esm/{button-9b1f3219.js → button.taro-d5968f9d.js} +1 -1
- package/dist/esm/calendar.taro-1abb1925.js +89 -0
- package/dist/esm/{calendaritem.taro-bbe4a226.js → calendaritem.taro-3c06a809.js} +151 -74
- package/dist/esm/{card.taro-c4f88500.js → card.taro-0861c7b3.js} +2 -2
- package/dist/esm/cascader.taro-31dbc60e.js +786 -0
- package/dist/esm/{cell.taro-8080af48.js → cell.taro-3bb1b0f2.js} +1 -1
- package/dist/esm/{checkbox.taro-7267be92.js → checkbox.taro-6fbc4b3c.js} +55 -10
- package/dist/esm/{checkboxgroup.taro-bc16131f.js → checkboxgroup.taro-3d380042.js} +26 -4
- package/dist/esm/{col.taro-ff3af36f.js → col.taro-2a437387.js} +6 -2
- package/dist/esm/{collapse.taro-5fac953d.js → collapse.taro-72e58ba2.js} +1 -0
- package/dist/esm/{collapseitem.taro-179cf530.js → collapseitem-5556ec54.js} +14 -13
- package/dist/esm/{configprovider-18657611.js → configprovider-9c393a29.js} +1 -1
- package/dist/esm/{configprovider.taro-98343012.js → configprovider.taro-1ff7f150.js} +2 -2
- package/dist/esm/{countdown.taro-cd6a1bd4.js → countdown.taro-b00d0d46.js} +1 -1
- package/dist/esm/{datepicker.taro-f7c8ef80.js → datepicker.taro-e385849d.js} +8 -6
- package/dist/esm/{dialog.taro-57f6fc2e.js → dialog.taro-c80b7b5f.js} +13 -19
- package/dist/esm/{divider.taro-beaec14a.js → divider.taro-5236fe6a.js} +6 -3
- package/dist/esm/{drag.taro-7c0493f8.js → drag.taro-56e8c87a.js} +1 -1
- package/dist/esm/{elevator.taro-e37a3fbb.js → elevator.taro-15b0d8c2.js} +139 -39
- package/dist/esm/{empty.taro-c7ccac8a.js → empty.taro-20b8adac.js} +3 -3
- package/dist/esm/{fixednav.taro-5b473df6.js → fixednav.taro-75e35339.js} +4 -4
- package/dist/esm/grid.taro-7fb43d02.js +90 -0
- package/dist/esm/griditem.taro-8020b409.js +98 -0
- package/dist/esm/{icon-62bd7379.js → icon-8dc4de10.js} +9 -9
- package/dist/esm/{icon.taro-bf130544.js → icon.taro-1d0d4fb7.js} +11 -9
- package/dist/esm/imagepreview.taro-a0ddd8a2.js +813 -0
- package/dist/esm/{infiniteloading.taro-abf15a17.js → infiniteloading.taro-0a86819e.js} +2 -2
- package/dist/esm/input.taro-1d23861d.js +392 -0
- package/dist/esm/{inputnumber.taro-4ec2bfb6.js → inputnumber.taro-75662231.js} +17 -18
- package/dist/esm/menu.taro-03e3b011.js +153 -0
- package/dist/esm/menuitem.taro-56bf3205.js +195 -0
- package/dist/esm/navbar.taro-f2eae6a6.js +123 -0
- package/dist/esm/{noticebar.taro-70193e5e.js → noticebar.taro-1890c693.js} +77 -43
- package/dist/esm/{notify.taro-837a878b.js → notify.taro-22b8f4cd.js} +21 -5
- package/dist/esm/{numberkeyboard.taro-a80cec74.js → numberkeyboard.taro-5d685c76.js} +2 -2
- package/dist/esm/nutui-react.es.js +87 -74
- package/dist/esm/offsetContext-0e3d04b3.js +19 -0
- package/dist/esm/{pagination.taro-abc4a71e.js → pagination.taro-10449c4a.js} +1 -1
- package/dist/esm/{picker.taro-c05b1930.js → picker.taro-216cc3cb.js} +8 -6
- package/dist/esm/{pickerSlot-c8f5343e.js → pickerSlot-f8e4e542.js} +9 -6
- package/dist/esm/{popover.taro-3b06163e.js → popover.taro-9b3da0fa.js} +90 -107
- package/dist/esm/{popup-15922d84.js → popup-67173ec6.js} +55 -31
- package/dist/esm/{popup.taro-897e35fd.js → popup.taro-a89dd3a1.js} +55 -31
- package/dist/esm/{progress.taro-51bcdd4f.js → progress.taro-dd93ac38.js} +1 -1
- package/dist/esm/radio.taro-32cb0172.js +129 -0
- package/dist/esm/{radiogroup.taro-f2401b7a.js → radiogroup-e698d3df.js} +5 -2
- package/dist/esm/{range.taro-41ced357.js → range.taro-fe08c5f4.js} +262 -86
- package/dist/esm/{rate.taro-3d6edec3.js → rate.taro-a0b21714.js} +6 -2
- package/dist/esm/render-4a3856cb.js +32 -0
- package/dist/esm/{row.taro-7afb510a.js → row.taro-cec13a7e.js} +9 -3
- package/dist/esm/{searchbar.taro-b05ef5a8.js → searchbar.taro-450d2f88.js} +2 -2
- package/dist/esm/{shortpassword.taro-aad27ce9.js → shortpassword.taro-08a05360.js} +25 -20
- package/dist/esm/sidenavbar.taro-dd471476.js +65 -0
- package/dist/esm/sidenavbaritem.taro-77e077f4.js +32 -0
- package/dist/esm/{signature.taro-454c5413.js → signature.taro-7cb77bab.js} +2 -2
- package/dist/esm/{skeleton.taro-b2831f6f.js → skeleton.taro-5934c7d7.js} +6 -7
- package/dist/esm/{step.taro-33775bf4.js → step-9a048771.js} +1 -1
- package/dist/esm/subsidenavbar.taro-2c1fcf16.js +94 -0
- package/dist/esm/swipe.taro-dfb9a049.js +264 -0
- package/dist/esm/{swiper.taro-624d2cf2.js → swiper.taro-7a2ef124.js} +39 -14
- package/dist/esm/{swiperitem.taro-984e3ebb.js → swiperitem-d00e7513.js} +1 -15
- package/dist/esm/{tabbaritem.taro-898becb1.js → tabbaritem.taro-a88d3ae7.js} +1 -1
- package/dist/esm/table.taro-305e0317.js +153 -0
- package/dist/esm/{tabpane.taro-24514060.js → tabpane.taro-95aa185b.js} +3 -2
- package/dist/esm/{tabs.taro-56a953f6.js → tabs.taro-d1e85ea5.js} +15 -5
- package/dist/esm/{tag.taro-77cf134f.js → tag.taro-3bbbb557.js} +2 -2
- package/dist/esm/{textarea.taro-5d4efaf0.js → textarea.taro-700b04c2.js} +6 -3
- package/dist/esm/{timedetail.taro-0e31b4a5.js → timedetail.taro-7cc00243.js} +1 -1
- package/dist/esm/{timepannel.taro-2d54b3db.js → timepannel.taro-e24537e4.js} +1 -1
- package/dist/esm/{timeselect.taro-e4c97354.js → timeselect.taro-210fd548.js} +2 -2
- package/dist/esm/{toast.taro-b7ff92f1.js → toast.taro-bb181833.js} +1 -1
- package/dist/esm/{uploader.taro-5fab7e14.js → uploader.taro-f7528535.js} +4 -4
- package/dist/esm/useClientRect-8b7cc406.js +74 -0
- package/dist/esm/{index-31152350.js → useTouch-a2ea68c6.js} +26 -12
- package/dist/esm/{virtuallist.taro-2ff1a5ad.js → virtuallist.taro-ce9619f9.js} +1 -1
- package/dist/esm/{zh-CN-f5124686.js → zh-CN-91090ae2.js} +16 -0
- package/dist/locales/base.d.ts +16 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +17 -1
- package/dist/locales/id-ID.js +17 -1
- package/dist/locales/zh-CN.js +17 -1
- package/dist/locales/zh-TW.js +17 -1
- package/dist/nutui.react.es.js +6306 -3636
- package/dist/nutui.react.umd.js +20243 -33
- package/dist/packages/address/address.scss +9 -2
- package/dist/packages/audio/audio.scss +80 -0
- package/dist/packages/calendar/calendar.scss +57 -36
- package/dist/packages/calendaritem/calendaritem.scss +0 -191
- package/dist/packages/cascader/cascader.scss +69 -0
- package/dist/packages/col/col.scss +6 -6
- package/dist/packages/grid/grid.scss +10 -0
- package/dist/packages/griditem/griditem.scss +103 -0
- package/dist/packages/icon/icon.scss +104 -12
- package/dist/packages/imagepreview/imagepreview.scss +51 -0
- package/dist/packages/menu/menu.scss +72 -0
- package/dist/packages/menuitem/menuitem.scss +90 -0
- package/dist/packages/noticebar/noticebar.scss +31 -15
- package/dist/packages/notify/notify.scss +9 -0
- package/dist/packages/popover/popover.scss +205 -83
- package/dist/packages/popup/popup.scss +1 -1
- package/dist/packages/range/range.scss +141 -13
- package/dist/packages/searchbar/searchbar.scss +1 -0
- package/dist/packages/shortpassword/shortpassword.scss +6 -1
- package/dist/packages/sidenavbar/sidenavbar.scss +69 -0
- package/dist/packages/sidenavbaritem/sidenavbaritem.scss +8 -0
- package/dist/packages/subsidenavbar/subsidenavbar.scss +23 -0
- package/dist/packages/swipe/swipe.scss +33 -0
- package/dist/packages/swiper/swiper.scss +3 -0
- package/dist/packages/table/table.scss +81 -0
- package/dist/packages/textarea/textarea.scss +16 -1
- package/dist/packages/toast/toast.scss +16 -13
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/animation/icon.scss +245 -0
- package/dist/styles/animation/index.scss +1 -0
- package/dist/styles/font/config.json +169 -0
- package/dist/styles/font/demo_index.html +210 -3
- package/dist/styles/font/iconfont.css +39 -3
- package/dist/styles/font/iconfont.js +42 -40
- package/dist/styles/font/iconfont.json +63 -0
- package/dist/styles/font/iconfont.ttf +0 -0
- package/dist/styles/font/iconfont.woff +0 -0
- package/dist/styles/font/iconfont.woff2 +0 -0
- package/dist/styles/themes/default.scss +12 -0
- package/dist/styles/variables.scss +101 -21
- package/dist/types/address/address.taro.d.ts +4 -27
- package/dist/types/animatingnumbers/animatingnumbers.taro.d.ts +1 -1
- package/dist/types/animatingnumbers/countup.taro.d.ts +11 -0
- package/dist/types/audio/audio.taro.d.ts +18 -0
- package/dist/types/audio/index.taro.d.ts +2 -0
- package/dist/types/avatargroup/index.taro.d.ts +1 -1
- package/dist/types/backtop/backtop.taro.d.ts +4 -4
- package/dist/types/badge/badge.taro.d.ts +2 -1
- package/dist/types/card/card.taro.d.ts +4 -4
- package/dist/types/cascader/cascader.taro.d.ts +25 -0
- package/dist/types/cascader/cascaderItem.taro.d.ts +25 -0
- package/dist/types/cascader/index.taro.d.ts +2 -0
- package/dist/types/cellgroup/cellgroup.taro.d.ts +1 -0
- package/dist/types/checkbox/checkbox.taro.d.ts +6 -2
- package/dist/types/checkboxgroup/checkboxgroup.taro.d.ts +3 -2
- package/dist/types/col/col.taro.d.ts +4 -1
- package/dist/types/collapse/collapse.taro.d.ts +2 -1
- package/dist/types/collapseitem/index.taro.d.ts +1 -1
- package/dist/types/dialog/dialog.taro.d.ts +2 -1
- package/dist/types/elevator/elevator.taro.d.ts +6 -1
- package/dist/types/fixednav/fixednav.taro.d.ts +5 -5
- package/dist/types/grid/grid.taro.d.ts +16 -0
- package/dist/types/grid/index.taro.d.ts +2 -0
- package/dist/types/griditem/griditem.taro.d.ts +20 -0
- package/dist/types/griditem/index.taro.d.ts +2 -0
- package/dist/types/icon/icon.taro.d.ts +11 -5
- package/dist/types/imagepreview/imagepreview.taro.d.ts +26 -0
- package/dist/types/imagepreview/index.taro.d.ts +2 -0
- package/dist/types/input/input.taro.d.ts +42 -5
- package/dist/types/menu/index.taro.d.ts +2 -0
- package/dist/types/menu/menu.taro.d.ts +12 -0
- package/dist/types/menuitem/index.taro.d.ts +2 -0
- package/dist/types/menuitem/menuitem.taro.d.ts +23 -0
- package/dist/types/navbar/navbar.taro.d.ts +10 -4
- package/dist/types/noticebar/noticebar.taro.d.ts +1 -1
- package/dist/types/notify/notify.taro.d.ts +13 -0
- package/dist/types/nutui.react.d.ts +99 -1
- package/dist/types/picker/picker.taro.d.ts +3 -2
- package/dist/types/popover/popover.taro.d.ts +15 -7
- package/dist/types/popup/popup.taro.d.ts +3 -1
- package/dist/types/radiogroup/index.taro.d.ts +1 -1
- package/dist/types/range/range.taro.d.ts +3 -1
- package/dist/types/row/row.taro.d.ts +4 -1
- package/dist/types/shortpassword/shortpassword.taro.d.ts +3 -3
- package/dist/types/sidenavbar/index.taro.d.ts +2 -0
- package/dist/types/sidenavbar/sidenavbar.taro.d.ts +15 -0
- package/dist/types/sidenavbaritem/index.taro.d.ts +2 -0
- package/dist/types/sidenavbaritem/sidenavbaritem.taro.d.ts +11 -0
- package/dist/types/skeleton/skeleton.taro.d.ts +1 -0
- package/dist/types/step/index.taro.d.ts +1 -1
- package/dist/types/subsidenavbar/index.taro.d.ts +2 -0
- package/dist/types/subsidenavbar/subsidenavbar.taro.d.ts +13 -0
- package/dist/types/swipe/index.taro.d.ts +2 -0
- package/dist/types/swipe/swipe.taro.d.ts +41 -0
- package/dist/types/swiper/swiper.taro.d.ts +1 -0
- package/dist/types/swiperitem/index.taro.d.ts +1 -1
- package/dist/types/tabbar/tabbar.taro.d.ts +1 -0
- package/dist/types/table/index.taro.d.ts +2 -0
- package/dist/types/table/table.taro.d.ts +4 -0
- package/dist/types/tabpane/tabpane.taro.d.ts +3 -1
- package/dist/types/tabs/tabs.taro.d.ts +2 -0
- package/dist/types/tag/tag.taro.d.ts +2 -1
- package/dist/types/toast/toast.taro.d.ts +18 -0
- package/dist/types/virtuallist/virtuallist.taro.d.ts +2 -1
- package/package.json +18 -11
- package/dist/esm/calendar.taro-d3a90861.js +0 -617
- package/dist/esm/context-aa058329.js +0 -6
- package/dist/esm/input.taro-b6927020.js +0 -190
- package/dist/esm/navbar.taro-f2ba2cf4.js +0 -66
- package/dist/esm/radio.taro-923d91bc.js +0 -200
- package/dist/esm/raf-3fbb5f92.js +0 -126
- package/dist/packages/range/custom.scss +0 -9
- package/dist/types/actionsheet/demo.taro.d.ts +0 -6
- package/dist/types/address/demo.taro.d.ts +0 -3
- package/dist/types/animatingnumbers/demo.taro.d.ts +0 -3
- package/dist/types/avatar/demo.taro.d.ts +0 -4
- package/dist/types/avatargroup/avatargroup.taro.d.ts +0 -14
- package/dist/types/backtop/demo.taro.d.ts +0 -3
- package/dist/types/badge/demo.taro.d.ts +0 -3
- package/dist/types/barrage/demo.taro.d.ts +0 -4
- package/dist/types/button/demo.taro.d.ts +0 -3
- package/dist/types/calendar/demo.taro.d.ts +0 -3
- package/dist/types/card/demo.taro.d.ts +0 -3
- package/dist/types/cell/demo.taro.d.ts +0 -3
- package/dist/types/checkbox/demo.taro.d.ts +0 -3
- package/dist/types/circleprogress/demo.taro.d.ts +0 -4
- package/dist/types/collapse/demo.taro.d.ts +0 -3
- package/dist/types/collapseitem/collapseitem.taro.d.ts +0 -18
- package/dist/types/configprovider/demo.taro.d.ts +0 -3
- package/dist/types/countdown/demo.taro.d.ts +0 -3
- package/dist/types/datepicker/demo.taro.d.ts +0 -3
- package/dist/types/dialog/demo.taro.d.ts +0 -3
- package/dist/types/divider/demo.taro.d.ts +0 -3
- package/dist/types/drag/demo.taro.d.ts +0 -3
- package/dist/types/elevator/demo.taro.d.ts +0 -3
- package/dist/types/empty/demo.taro.d.ts +0 -4
- package/dist/types/fixednav/demo.taro.d.ts +0 -3
- package/dist/types/icon/demo.taro.d.ts +0 -3
- package/dist/types/indicator/demo.taro.d.ts +0 -4
- package/dist/types/infiniteloading/demo.taro.d.ts +0 -4
- package/dist/types/input/demo.taro.d.ts +0 -3
- package/dist/types/inputnumber/demo.taro.d.ts +0 -3
- package/dist/types/layout/demo.taro.d.ts +0 -4
- package/dist/types/navbar/demo.taro.d.ts +0 -3
- package/dist/types/noticebar/demo.taro.d.ts +0 -3
- package/dist/types/notify/demo.taro.d.ts +0 -3
- package/dist/types/numberkeyboard/demo.taro.d.ts +0 -3
- package/dist/types/overlay/demo.taro.d.ts +0 -4
- package/dist/types/pagination/demo.taro.d.ts +0 -3
- package/dist/types/picker/demo.taro.d.ts +0 -3
- package/dist/types/popover/demo.taro.d.ts +0 -3
- package/dist/types/popup/demo.taro.d.ts +0 -4
- package/dist/types/price/demo.taro.d.ts +0 -3
- package/dist/types/progress/demo.taro.d.ts +0 -3
- package/dist/types/radio/demo.taro.d.ts +0 -3
- package/dist/types/radiogroup/radiogroup.taro.d.ts +0 -11
- package/dist/types/range/demo.taro.d.ts +0 -3
- package/dist/types/rate/demo.taro.d.ts +0 -3
- package/dist/types/searchbar/demo.taro.d.ts +0 -3
- package/dist/types/shortpassword/demo.taro.d.ts +0 -3
- package/dist/types/signature/demo.taro.d.ts +0 -3
- package/dist/types/skeleton/demo.taro.d.ts +0 -4
- package/dist/types/step/step.taro.d.ts +0 -13
- package/dist/types/steps/demo.taro.d.ts +0 -4
- package/dist/types/swiper/demo.taro.d.ts +0 -4
- package/dist/types/swiperitem/swiperitem.taro.d.ts +0 -7
- package/dist/types/switch/demo.taro.d.ts +0 -3
- package/dist/types/tabbar/demo.taro.d.ts +0 -3
- package/dist/types/tabs/demo.taro.d.ts +0 -3
- package/dist/types/tag/demo.taro.d.ts +0 -3
- package/dist/types/textarea/demo.taro.d.ts +0 -3
- package/dist/types/timedetail/demo.taro.d.ts +0 -3
- package/dist/types/timepannel/demo.taro.d.ts +0 -3
- package/dist/types/timeselect/demo.taro.d.ts +0 -3
- package/dist/types/toast/demo.taro.d.ts +0 -3
- package/dist/types/uploader/demo.taro.d.ts +0 -16
- package/dist/types/virtuallist/demo.taro.d.ts +0 -3
|
@@ -1,98 +1,111 @@
|
|
|
1
|
-
export { B as Button } from './button.taro-
|
|
2
|
-
export { C as Cell } from './cell.taro-
|
|
1
|
+
export { B as Button } from './button.taro-d5968f9d.js';
|
|
2
|
+
export { C as Cell } from './cell.taro-3bb1b0f2.js';
|
|
3
3
|
export { C as CellGroup } from './cellgroup.taro-8c87bf08.js';
|
|
4
|
-
export { I as Icon } from './icon.taro-
|
|
4
|
+
export { I as Icon } from './icon.taro-1d0d4fb7.js';
|
|
5
5
|
export { O as Overlay } from './overlay.taro-a784329e.js';
|
|
6
|
-
export { P as Popup } from './popup.taro-
|
|
7
|
-
export { C as ConfigProvider } from './configprovider.taro-
|
|
6
|
+
export { P as Popup } from './popup.taro-a89dd3a1.js';
|
|
7
|
+
export { C as ConfigProvider } from './configprovider.taro-1ff7f150.js';
|
|
8
8
|
export { L as Layout } from './layout.taro-358f014f.js';
|
|
9
|
-
export { C as Col } from './col.taro-
|
|
10
|
-
export { R as Row } from './row.taro-
|
|
11
|
-
export { D as Divider } from './divider.taro-
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
9
|
+
export { C as Col } from './col.taro-2a437387.js';
|
|
10
|
+
export { R as Row } from './row.taro-cec13a7e.js';
|
|
11
|
+
export { D as Divider } from './divider.taro-5236fe6a.js';
|
|
12
|
+
export { G as Grid } from './grid.taro-7fb43d02.js';
|
|
13
|
+
export { G as GridItem } from './griditem.taro-8020b409.js';
|
|
14
|
+
export { N as NavBar } from './navbar.taro-f2eae6a6.js';
|
|
15
|
+
export { F as FixedNav } from './fixednav.taro-75e35339.js';
|
|
14
16
|
export { T as Tabbar } from './tabbar.taro-da72fa2c.js';
|
|
15
|
-
export { T as TabbarItem } from './tabbaritem.taro-
|
|
16
|
-
export { E as Elevator } from './elevator.taro-
|
|
17
|
-
export { P as Pagination } from './pagination.taro-
|
|
18
|
-
export { T as Tabs } from './tabs.taro-
|
|
19
|
-
export { T as TabPane } from './tabpane.taro-
|
|
17
|
+
export { T as TabbarItem } from './tabbaritem.taro-a88d3ae7.js';
|
|
18
|
+
export { E as Elevator } from './elevator.taro-15b0d8c2.js';
|
|
19
|
+
export { P as Pagination } from './pagination.taro-10449c4a.js';
|
|
20
|
+
export { T as Tabs } from './tabs.taro-d1e85ea5.js';
|
|
21
|
+
export { T as TabPane } from './tabpane.taro-95aa185b.js';
|
|
20
22
|
export { I as Indicator } from './indicator.taro-183ea169.js';
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export {
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
41
|
-
export {
|
|
42
|
-
export {
|
|
43
|
-
export { N as
|
|
23
|
+
export { S as SideNavBar } from './sidenavbar.taro-dd471476.js';
|
|
24
|
+
export { S as SubSideNavBar } from './subsidenavbar.taro-2c1fcf16.js';
|
|
25
|
+
export { S as SideNavBarItem } from './sidenavbaritem.taro-77e077f4.js';
|
|
26
|
+
export { M as Menu } from './menu.taro-03e3b011.js';
|
|
27
|
+
export { M as MenuItem } from './menuitem.taro-56bf3205.js';
|
|
28
|
+
export { R as Range } from './range.taro-fe08c5f4.js';
|
|
29
|
+
export { C as Calendar } from './calendar.taro-1abb1925.js';
|
|
30
|
+
export { C as Checkbox } from './checkbox.taro-6fbc4b3c.js';
|
|
31
|
+
export { C as CheckboxGroup } from './checkboxgroup.taro-3d380042.js';
|
|
32
|
+
export { D as DatePicker } from './datepicker.taro-e385849d.js';
|
|
33
|
+
export { I as InputNumber } from './inputnumber.taro-75662231.js';
|
|
34
|
+
export { I as Input } from './input.taro-1d23861d.js';
|
|
35
|
+
export { R as Radio } from './radio.taro-32cb0172.js';
|
|
36
|
+
export { R as RadioGroup } from './radiogroup-e698d3df.js';
|
|
37
|
+
export { R as Rate } from './rate.taro-a0b21714.js';
|
|
38
|
+
export { C as CalendarItem } from './calendaritem.taro-3c06a809.js';
|
|
39
|
+
export { P as Picker } from './picker.taro-216cc3cb.js';
|
|
40
|
+
export { S as ShortPassword } from './shortpassword.taro-08a05360.js';
|
|
41
|
+
export { T as TextArea } from './textarea.taro-700b04c2.js';
|
|
42
|
+
export { U as Uploader } from './uploader.taro-f7528535.js';
|
|
43
|
+
export { C as Cascader } from './cascader.taro-31dbc60e.js';
|
|
44
|
+
export { S as SearchBar } from './searchbar.taro-450d2f88.js';
|
|
45
|
+
export { N as NumberKeyboard } from './numberkeyboard.taro-5d685c76.js';
|
|
46
|
+
export { A as ActionSheet } from './actionsheet.taro-f4d407b0.js';
|
|
47
|
+
export { B as BackTop } from './backtop.taro-0e2e3946.js';
|
|
48
|
+
export { D as Drag } from './drag.taro-56e8c87a.js';
|
|
49
|
+
export { D as Dialog } from './dialog.taro-c80b7b5f.js';
|
|
50
|
+
export { I as Infiniteloading } from './infiniteloading.taro-0a86819e.js';
|
|
51
|
+
export { N as Notify } from './notify.taro-22b8f4cd.js';
|
|
44
52
|
export { S as Switch } from './switch.taro-be5eb823.js';
|
|
45
|
-
export { T as Toast } from './toast.taro-
|
|
53
|
+
export { T as Toast } from './toast.taro-bb181833.js';
|
|
54
|
+
export { S as Swipe } from './swipe.taro-dfb9a049.js';
|
|
46
55
|
export { C as CircleProgress } from './circleprogress.taro-1a38e1c6.js';
|
|
47
|
-
export { N as NoticeBar } from './noticebar.taro-
|
|
56
|
+
export { N as NoticeBar } from './noticebar.taro-1890c693.js';
|
|
48
57
|
export { S as Steps } from './steps.taro-943f4fbb.js';
|
|
49
|
-
export { S as Step } from './step
|
|
50
|
-
export { S as Swiper } from './swiper.taro-
|
|
51
|
-
export { S as SwiperItem } from './swiperitem
|
|
52
|
-
export { A as Avatar } from './avatar.taro-
|
|
53
|
-
export { A as AvatarGroup } from './avatargroup
|
|
58
|
+
export { S as Step } from './step-9a048771.js';
|
|
59
|
+
export { S as Swiper } from './swiper.taro-7a2ef124.js';
|
|
60
|
+
export { S as SwiperItem } from './swiperitem-d00e7513.js';
|
|
61
|
+
export { A as Avatar } from './avatar.taro-0a0472fd.js';
|
|
62
|
+
export { A as AvatarGroup } from './avatargroup-1ca79066.js';
|
|
54
63
|
export { P as Price } from './price.taro-97393d8f.js';
|
|
55
|
-
export { B as Badge } from './badge.taro-
|
|
56
|
-
export { T as Tag } from './tag.taro-
|
|
57
|
-
export { P as Popover } from './popover.taro-
|
|
58
|
-
export { S as Skeleton } from './skeleton.taro-
|
|
59
|
-
export { C as CountDown } from './countdown.taro-
|
|
60
|
-
export { C as Collapse } from './collapse.taro-
|
|
61
|
-
export { C as CollapseItem } from './collapseitem
|
|
62
|
-
export { A as AnimatingNumbers } from './animatingnumbers.taro-
|
|
63
|
-
export { E as Empty } from './empty.taro-
|
|
64
|
-
export { V as VirtualList } from './virtuallist.taro-
|
|
64
|
+
export { B as Badge } from './badge.taro-eeac9de8.js';
|
|
65
|
+
export { T as Tag } from './tag.taro-3bbbb557.js';
|
|
66
|
+
export { P as Popover } from './popover.taro-9b3da0fa.js';
|
|
67
|
+
export { S as Skeleton } from './skeleton.taro-5934c7d7.js';
|
|
68
|
+
export { C as CountDown } from './countdown.taro-b00d0d46.js';
|
|
69
|
+
export { C as Collapse } from './collapse.taro-72e58ba2.js';
|
|
70
|
+
export { C as CollapseItem } from './collapseitem-5556ec54.js';
|
|
71
|
+
export { A as AnimatingNumbers } from './animatingnumbers.taro-877baa98.js';
|
|
72
|
+
export { E as Empty } from './empty.taro-20b8adac.js';
|
|
73
|
+
export { V as VirtualList } from './virtuallist.taro-ce9619f9.js';
|
|
74
|
+
export { T as Table } from './table.taro-305e0317.js';
|
|
65
75
|
export { V as Video } from './video-c1090c92.js';
|
|
66
|
-
export { P as Progress } from './progress.taro-
|
|
67
|
-
export { A as
|
|
68
|
-
export {
|
|
69
|
-
export {
|
|
70
|
-
export {
|
|
71
|
-
export {
|
|
72
|
-
export {
|
|
73
|
-
export { T as
|
|
76
|
+
export { P as Progress } from './progress.taro-dd93ac38.js';
|
|
77
|
+
export { A as Audio } from './audio.taro-cd6cc93b.js';
|
|
78
|
+
export { I as ImagePreview } from './imagepreview.taro-a0ddd8a2.js';
|
|
79
|
+
export { A as Address } from './address.taro-4765a826.js';
|
|
80
|
+
export { B as Barrage } from './barrage.taro-efac8422.js';
|
|
81
|
+
export { S as Signature } from './signature.taro-7cb77bab.js';
|
|
82
|
+
export { C as Card } from './card.taro-0861c7b3.js';
|
|
83
|
+
export { T as TimePannel } from './timepannel.taro-e24537e4.js';
|
|
84
|
+
export { T as TimeDetail } from './timedetail.taro-7cc00243.js';
|
|
85
|
+
export { T as TimeSelect } from './timeselect.taro-210fd548.js';
|
|
74
86
|
import 'react';
|
|
75
|
-
import './icon-
|
|
87
|
+
import './icon-8dc4de10.js';
|
|
76
88
|
import './bem-893ad28d.js';
|
|
77
89
|
import '@bem-react/classname';
|
|
78
90
|
import 'react-router-dom';
|
|
79
91
|
import '@tarojs/taro';
|
|
80
92
|
import 'classnames';
|
|
93
|
+
import 'react-dom';
|
|
81
94
|
import 'react-transition-group';
|
|
82
95
|
import './overlay-ed3eb37d.js';
|
|
83
|
-
import './zh-CN-
|
|
96
|
+
import './zh-CN-91090ae2.js';
|
|
84
97
|
import './UserContext-be8097d2.js';
|
|
85
|
-
import './configprovider-
|
|
86
|
-
import './
|
|
87
|
-
import './
|
|
88
|
-
import '
|
|
89
|
-
import './
|
|
90
|
-
import './
|
|
91
|
-
import './
|
|
92
|
-
import './
|
|
98
|
+
import './configprovider-9c393a29.js';
|
|
99
|
+
import './popup-67173ec6.js';
|
|
100
|
+
import './offsetContext-0e3d04b3.js';
|
|
101
|
+
import './useTouch-a2ea68c6.js';
|
|
102
|
+
import './useClientRect-8b7cc406.js';
|
|
103
|
+
import './Notification-422905bd.js';
|
|
104
|
+
import './render-4a3856cb.js';
|
|
105
|
+
import './pickerSlot-f8e4e542.js';
|
|
93
106
|
import '@use-gesture/react';
|
|
94
107
|
import '@react-spring/web';
|
|
95
|
-
import './button-
|
|
108
|
+
import './button-521a516b.js';
|
|
96
109
|
import './UserContext-68f62e66.js';
|
|
97
110
|
import './UserContext-b4181162.js';
|
|
98
111
|
import './AvatarContext-7153ad2b.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
|
|
3
|
+
var handleClick = function handleClick(e) {
|
|
4
|
+
e.stopPropagation();
|
|
5
|
+
var isIcon = e.target.className.includes('arrow-icon');
|
|
6
|
+
var isTitle = e.target.className.includes('__title') || isIcon;
|
|
7
|
+
var currentClass = e.currentTarget.className;
|
|
8
|
+
var isShow = currentClass.includes('nutShow');
|
|
9
|
+
var arrowIcon = e.currentTarget.querySelector('.arrow-icon');
|
|
10
|
+
var iconClass = arrowIcon.className;
|
|
11
|
+
|
|
12
|
+
if (isTitle) {
|
|
13
|
+
e.currentTarget.className = isShow ? currentClass.replace('nutShow', 'nutHide') : currentClass.replace('nutHide', 'nutShow');
|
|
14
|
+
arrowIcon.className = isShow ? iconClass.replace('arrow-down', 'arrow-up') : iconClass.replace('arrow-up', 'arrow-down');
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
var OffsetContext = createContext(20);
|
|
19
|
+
export { OffsetContext as O, handleClick as h };
|
|
@@ -8,7 +8,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
8
8
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
9
|
|
|
10
10
|
import React__default, { useState, useEffect } from 'react';
|
|
11
|
-
import { u as useConfig } from './configprovider-
|
|
11
|
+
import { u as useConfig } from './configprovider-9c393a29.js';
|
|
12
12
|
import { c as cn } from './bem-893ad28d.js';
|
|
13
13
|
var defaultProps = {
|
|
14
14
|
defaultValue: 1,
|
|
@@ -2,16 +2,16 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["isVisible", "title", "listData", "defaultValueData", "onConfirm", "onClose", "onCloseUpdate", "onChange", "className", "style", "threeDimensional"];
|
|
5
|
+
var _excluded = ["isVisible", "title", "listData", "defaultValueData", "onConfirm", "onClose", "onCloseUpdate", "onChange", "className", "style", "threeDimensional", "swipeDuration"];
|
|
6
6
|
|
|
7
7
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8
8
|
|
|
9
9
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
10
|
|
|
11
11
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
12
|
-
import { P as Popup } from './popup-
|
|
13
|
-
import { P as PickerSlot } from './pickerSlot-
|
|
14
|
-
import { u as useConfig } from './configprovider-
|
|
12
|
+
import { P as Popup } from './popup-67173ec6.js';
|
|
13
|
+
import { P as PickerSlot } from './pickerSlot-f8e4e542.js';
|
|
14
|
+
import { u as useConfig } from './configprovider-9c393a29.js';
|
|
15
15
|
import { c as cn } from './bem-893ad28d.js';
|
|
16
16
|
|
|
17
17
|
var InternalPicker = function InternalPicker(props, ref) {
|
|
@@ -30,6 +30,7 @@ var InternalPicker = function InternalPicker(props, ref) {
|
|
|
30
30
|
className = props.className,
|
|
31
31
|
style = props.style,
|
|
32
32
|
threeDimensional = props.threeDimensional,
|
|
33
|
+
swipeDuration = props.swipeDuration,
|
|
33
34
|
rest = _objectWithoutProperties(props, _excluded);
|
|
34
35
|
|
|
35
36
|
var _useState = useState([]),
|
|
@@ -208,8 +209,8 @@ var InternalPicker = function InternalPicker(props, ref) {
|
|
|
208
209
|
var data = [];
|
|
209
210
|
var normalData = normalListData();
|
|
210
211
|
setColumnsList(normalData);
|
|
211
|
-
normalData.map(function (item) {
|
|
212
|
-
data.push(item[0].value);
|
|
212
|
+
normalData.length > 0 && normalData.map(function (item) {
|
|
213
|
+
item[0] && data.push(item[0].value);
|
|
213
214
|
return item;
|
|
214
215
|
});
|
|
215
216
|
|
|
@@ -252,6 +253,7 @@ var InternalPicker = function InternalPicker(props, ref) {
|
|
|
252
253
|
chooseItem: function chooseItem(value, index) {
|
|
253
254
|
return _chooseItem(value, index);
|
|
254
255
|
},
|
|
256
|
+
swipeDuration: swipeDuration,
|
|
255
257
|
key: index,
|
|
256
258
|
keyIndex: index
|
|
257
259
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
3
|
-
import { u as useTouch } from './
|
|
3
|
+
import { u as useTouch } from './useTouch-a2ea68c6.js';
|
|
4
4
|
|
|
5
5
|
var InternalPickerSlot = function InternalPickerSlot(props, ref) {
|
|
6
6
|
var _props$keyIndex = props.keyIndex,
|
|
@@ -10,8 +10,11 @@ var InternalPickerSlot = function InternalPickerSlot(props, ref) {
|
|
|
10
10
|
listData = _props$listData === void 0 ? [] : _props$listData,
|
|
11
11
|
_props$threeDimension = props.threeDimensional,
|
|
12
12
|
threeDimensional = _props$threeDimension === void 0 ? true : _props$threeDimension,
|
|
13
|
+
_props$swipeDuration = props.swipeDuration,
|
|
14
|
+
swipeDuration = _props$swipeDuration === void 0 ? 1000 : _props$swipeDuration,
|
|
13
15
|
chooseItem = props.chooseItem;
|
|
14
|
-
var touch = useTouch();
|
|
16
|
+
var touch = useTouch();
|
|
17
|
+
var DEFAULT_DURATION = 200; // 触发惯性滑动条件:
|
|
15
18
|
// 在手指离开屏幕时,如果和上一次 move 时的间隔小于 `MOMENTUM_TIME` 且 move
|
|
16
19
|
// 距离大于 `MOMENTUM_DISTANCE` 时,执行惯性滑动
|
|
17
20
|
|
|
@@ -58,7 +61,7 @@ var InternalPickerSlot = function InternalPickerSlot(props, ref) {
|
|
|
58
61
|
var setTransform = function setTransform() {
|
|
59
62
|
var translateY = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
60
63
|
var type = arguments.length > 1 ? arguments[1] : undefined;
|
|
61
|
-
var time = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] :
|
|
64
|
+
var time = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_DURATION;
|
|
62
65
|
var deg = arguments.length > 3 ? arguments[3] : undefined;
|
|
63
66
|
var nTime = time;
|
|
64
67
|
|
|
@@ -139,7 +142,7 @@ var InternalPickerSlot = function InternalPickerSlot(props, ref) {
|
|
|
139
142
|
if (moveTime <= INERTIA_TIME && Math.abs(move) > INERTIA_DISTANCE) {
|
|
140
143
|
// 惯性滚动
|
|
141
144
|
var distance = momentum(move, moveTime);
|
|
142
|
-
setMove(distance, 'end',
|
|
145
|
+
setMove(distance, 'end', +swipeDuration);
|
|
143
146
|
} else {
|
|
144
147
|
setMove(move, 'end');
|
|
145
148
|
}
|
|
@@ -228,12 +231,12 @@ var InternalPickerSlot = function InternalPickerSlot(props, ref) {
|
|
|
228
231
|
transform: "rotate3d(1, 0, 0, ".concat(-rotation * (index + 1), "deg) translate3d(0px, 0px, 104px)")
|
|
229
232
|
},
|
|
230
233
|
key: item.value ? item.value : index
|
|
231
|
-
}, item.text ? item.text : item);
|
|
234
|
+
}, React__default.createElement(React__default.Fragment, null, item.text ? item.text : item));
|
|
232
235
|
}), !threeDimensional && listData.map(function (item, index) {
|
|
233
236
|
return React__default.createElement("div", {
|
|
234
237
|
className: "nut-picker-roller-item-tile",
|
|
235
238
|
key: item.value ? item.value : index
|
|
236
|
-
}, item.text ? item.text : item);
|
|
239
|
+
}, React__default.createElement(React__default.Fragment, null, item.text ? item.text : item));
|
|
237
240
|
})), React__default.createElement("div", {
|
|
238
241
|
className: "nut-picker-mask"
|
|
239
242
|
}), React__default.createElement("div", {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
5
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
@@ -7,7 +8,8 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
8
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
9
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
10
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
10
|
-
var _excluded = ["children", "list", "theme", "location", "visible", "className", "style", "onClick"];
|
|
11
|
+
var _excluded = ["children", "list", "theme", "location", "visible", "offset", "className", "style", "onClick", "onChoose"];
|
|
12
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
13
|
|
|
12
14
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
15
|
|
|
@@ -18,8 +20,9 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
18
20
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
19
21
|
|
|
20
22
|
import React__default, { useRef, useState, useEffect } from 'react';
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
+
import { I as Icon } from './icon-8dc4de10.js';
|
|
24
|
+
import { O as Overlay } from './overlay-ed3eb37d.js';
|
|
25
|
+
import { g as getRectByTaro } from './useClientRect-8b7cc406.js';
|
|
23
26
|
/**
|
|
24
27
|
* 过滤ref
|
|
25
28
|
*/
|
|
@@ -53,14 +56,10 @@ var Trigger = /*#__PURE__*/function (_React__default$Compo) {
|
|
|
53
56
|
|
|
54
57
|
var _super = _createSuper(Trigger);
|
|
55
58
|
|
|
56
|
-
function Trigger(
|
|
59
|
+
function Trigger() {
|
|
57
60
|
_classCallCheck(this, Trigger);
|
|
58
61
|
|
|
59
|
-
return _super.
|
|
60
|
-
// ( this as any)[`fire${h}`] = (e: any) => {
|
|
61
|
-
// this.fireEvents(h, e)
|
|
62
|
-
// }
|
|
63
|
-
// })
|
|
62
|
+
return _super.apply(this, arguments);
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
_createClass(Trigger, [{
|
|
@@ -88,21 +87,7 @@ var Trigger = /*#__PURE__*/function (_React__default$Compo) {
|
|
|
88
87
|
var child = React__default.Children.only(children);
|
|
89
88
|
var newChildProps = {
|
|
90
89
|
key: 'trigger'
|
|
91
|
-
};
|
|
92
|
-
// this.fireEvents('onClick', e)
|
|
93
|
-
// }
|
|
94
|
-
// newChildProps.onMouseEnter = (e: any) => {
|
|
95
|
-
// this.fireEvents('onMouseEnter', e)
|
|
96
|
-
// }
|
|
97
|
-
// newChildProps.onMouseLeave = (e: any) => {
|
|
98
|
-
// this.fireEvents('onMouseLeave', e)
|
|
99
|
-
// }
|
|
100
|
-
// newChildProps.onFocus = (e: any) => {
|
|
101
|
-
// this.fireEvents('onMouseLeave', e)
|
|
102
|
-
// }
|
|
103
|
-
// newChildProps.onKeyPress = (e: any) => {
|
|
104
|
-
// this.fireEvents('onMouseLeave', e)
|
|
105
|
-
// }
|
|
90
|
+
};
|
|
106
91
|
|
|
107
92
|
if (child && child.props && child.props.className) {
|
|
108
93
|
newChildProps.className = className;
|
|
@@ -119,29 +104,15 @@ var Trigger = /*#__PURE__*/function (_React__default$Compo) {
|
|
|
119
104
|
return Trigger;
|
|
120
105
|
}(React__default.Component);
|
|
121
106
|
|
|
122
|
-
function findDOMNode(node) {
|
|
123
|
-
if (node instanceof HTMLElement) {
|
|
124
|
-
return node;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return ReactDOM__default.findDOMNode(node);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
var getEleAttr = function getEleAttr(ele) {
|
|
131
|
-
if (ele && ele.getBoundingClientRect) {
|
|
132
|
-
return ele.getBoundingClientRect();
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
return null;
|
|
136
|
-
};
|
|
137
|
-
|
|
138
107
|
var defaultProps = {
|
|
139
108
|
list: [],
|
|
140
109
|
theme: 'light',
|
|
141
110
|
location: 'bottom',
|
|
142
111
|
visible: false,
|
|
112
|
+
offset: 20,
|
|
143
113
|
className: '',
|
|
144
|
-
onClick: function onClick(e) {}
|
|
114
|
+
onClick: function onClick(e) {},
|
|
115
|
+
onChoose: function onChoose(item, index) {}
|
|
145
116
|
};
|
|
146
117
|
|
|
147
118
|
var Popover = function Popover(props) {
|
|
@@ -151,19 +122,40 @@ var Popover = function Popover(props) {
|
|
|
151
122
|
theme = _defaultProps$props.theme,
|
|
152
123
|
location = _defaultProps$props.location,
|
|
153
124
|
visible = _defaultProps$props.visible,
|
|
125
|
+
offset = _defaultProps$props.offset,
|
|
154
126
|
className = _defaultProps$props.className,
|
|
155
127
|
style = _defaultProps$props.style,
|
|
156
128
|
onClick = _defaultProps$props.onClick,
|
|
129
|
+
onChoose = _defaultProps$props.onChoose,
|
|
157
130
|
reset = _objectWithoutProperties(_defaultProps$props, _excluded);
|
|
158
131
|
|
|
159
132
|
var goodItem = useRef(null);
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
133
|
+
setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
134
|
+
var res;
|
|
135
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
136
|
+
while (1) {
|
|
137
|
+
switch (_context.prev = _context.next) {
|
|
138
|
+
case 0:
|
|
139
|
+
if (!goodItem.current) {
|
|
140
|
+
_context.next = 6;
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
_context.next = 3;
|
|
145
|
+
return getRectByTaro(goodItem.current);
|
|
146
|
+
|
|
147
|
+
case 3:
|
|
148
|
+
res = _context.sent;
|
|
149
|
+
setElWidth(res === null || res === void 0 ? void 0 : res.width);
|
|
150
|
+
setElHeight(res === null || res === void 0 ? void 0 : res.height);
|
|
151
|
+
|
|
152
|
+
case 6:
|
|
153
|
+
case "end":
|
|
154
|
+
return _context.stop();
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}, _callee);
|
|
158
|
+
})));
|
|
167
159
|
|
|
168
160
|
var _useState = useState(''),
|
|
169
161
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -191,74 +183,49 @@ var Popover = function Popover(props) {
|
|
|
191
183
|
setPopoverArrow = _useState10[1];
|
|
192
184
|
|
|
193
185
|
useEffect(function () {
|
|
194
|
-
setClasses(
|
|
195
|
-
setPopoverContent(
|
|
196
|
-
setPopoverArrow(
|
|
186
|
+
setClasses(classesSelf());
|
|
187
|
+
setPopoverContent(popoverContentSelf());
|
|
188
|
+
setPopoverArrow(popoverArrowSelf());
|
|
197
189
|
}, [list, theme]);
|
|
198
190
|
|
|
199
191
|
var getStyle = function getStyle() {
|
|
192
|
+
var offNumer = Number(offset) ? Number(offset) : 0;
|
|
200
193
|
var style = {};
|
|
201
194
|
|
|
202
|
-
if (location
|
|
203
|
-
style.bottom = elHeight +
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
style.right =
|
|
208
|
-
} else if (location == 'left') {
|
|
209
|
-
style.top = 0;
|
|
210
|
-
style.left = -elWidth - 20;
|
|
195
|
+
if (location.includes('top')) {
|
|
196
|
+
style.bottom = "".concat(elHeight + offNumer, "px");
|
|
197
|
+
} else if (location.includes('right')) {
|
|
198
|
+
style.left = "".concat(elWidth + offNumer, "px");
|
|
199
|
+
} else if (location.includes('left')) {
|
|
200
|
+
style.right = "".concat(elWidth + offNumer, "px");
|
|
211
201
|
} else {
|
|
212
|
-
style.top = elHeight +
|
|
213
|
-
style.left = 0;
|
|
202
|
+
style.top = "".concat(elHeight + offNumer, "px");
|
|
214
203
|
}
|
|
215
204
|
|
|
216
|
-
style.top += 'px';
|
|
217
|
-
style.left += 'px';
|
|
218
|
-
style.bottom += 'px';
|
|
219
|
-
style.right += 'px';
|
|
220
205
|
return style;
|
|
221
206
|
};
|
|
222
207
|
|
|
223
|
-
var
|
|
224
|
-
var style = {};
|
|
225
|
-
|
|
226
|
-
if (location == 'top') {
|
|
227
|
-
style.bottom = -20;
|
|
228
|
-
style.left = elWidth / 2;
|
|
229
|
-
} else if (location == 'right') {
|
|
230
|
-
style.top = 20;
|
|
231
|
-
style.left = -20;
|
|
232
|
-
} else if (location == 'left') {
|
|
233
|
-
style.top = 20;
|
|
234
|
-
style.right = -20;
|
|
235
|
-
} else {
|
|
236
|
-
style.left = elWidth / 2;
|
|
237
|
-
style.top = -20;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
style.top += 'px';
|
|
241
|
-
style.left += 'px';
|
|
242
|
-
style.bottom += 'px';
|
|
243
|
-
style.right += 'px';
|
|
244
|
-
return style;
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
var classes_self = function classes_self() {
|
|
208
|
+
var classesSelf = function classesSelf() {
|
|
248
209
|
var prefixCls = 'nut-popover';
|
|
249
|
-
return "".concat(prefixCls, "
|
|
210
|
+
return "".concat(prefixCls, " ").concat(theme ? "".concat(prefixCls, "--").concat(theme) : '');
|
|
250
211
|
};
|
|
251
212
|
|
|
252
|
-
var
|
|
253
|
-
var prefixCls = '
|
|
254
|
-
return "".concat(prefixCls, "
|
|
213
|
+
var popoverContentSelf = function popoverContentSelf() {
|
|
214
|
+
var prefixCls = 'popover-content';
|
|
215
|
+
return "".concat(prefixCls, "-show ").concat(prefixCls, " ").concat(location ? "".concat(prefixCls, "--").concat(location) : '');
|
|
255
216
|
};
|
|
256
217
|
|
|
257
|
-
var
|
|
258
|
-
var
|
|
259
|
-
return
|
|
260
|
-
|
|
218
|
+
var filter = function filter() {
|
|
219
|
+
var ms = ['top', 'bottom', 'left', 'right'];
|
|
220
|
+
return ms.filter(function (m) {
|
|
221
|
+
return location.includes(m);
|
|
222
|
+
})[0];
|
|
223
|
+
};
|
|
261
224
|
|
|
225
|
+
var popoverArrowSelf = function popoverArrowSelf() {
|
|
226
|
+
var prefixCls = 'popover-arrow';
|
|
227
|
+
return "".concat(prefixCls, " ").concat(prefixCls, "-").concat(filter(), " ").concat(location ? "".concat(prefixCls, "--").concat(location) : '');
|
|
228
|
+
};
|
|
262
229
|
|
|
263
230
|
var handleClick = function handleClick(e) {
|
|
264
231
|
if (props.onClick) {
|
|
@@ -266,7 +233,13 @@ var Popover = function Popover(props) {
|
|
|
266
233
|
}
|
|
267
234
|
};
|
|
268
235
|
|
|
269
|
-
|
|
236
|
+
var handleChoose = function handleChoose(item, index) {
|
|
237
|
+
if (!item.disabled) {
|
|
238
|
+
onChoose(item, index);
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", _objectSpread({
|
|
270
243
|
className: "".concat(classes, " ").concat(className),
|
|
271
244
|
style: _objectSpread({}, style)
|
|
272
245
|
}, reset), React__default.createElement(Trigger, {
|
|
@@ -279,19 +252,29 @@ var Popover = function Popover(props) {
|
|
|
279
252
|
className: "".concat(popoverContent),
|
|
280
253
|
style: getStyle()
|
|
281
254
|
}, React__default.createElement("div", {
|
|
282
|
-
className: "".concat(popoverArrow)
|
|
283
|
-
|
|
284
|
-
}, ' '), Array.isArray(children) ? children[1] : '', list.map(function (item) {
|
|
255
|
+
className: "".concat(popoverArrow)
|
|
256
|
+
}), Array.isArray(children) ? children[1] : '', list.map(function (item, i) {
|
|
285
257
|
return React__default.createElement("div", {
|
|
286
258
|
key: item.name,
|
|
287
|
-
className: "
|
|
259
|
+
className: "popover-menu-item ".concat(item.disabled ? 'disabled' : ''),
|
|
260
|
+
onClick: function onClick() {
|
|
261
|
+
handleChoose(item, i);
|
|
262
|
+
}
|
|
288
263
|
}, item.icon ? React__default.createElement(Icon, {
|
|
289
|
-
className: "item-img",
|
|
264
|
+
className: "popover-menu-item-img",
|
|
290
265
|
name: item.icon
|
|
291
266
|
}) : '', React__default.createElement("div", {
|
|
292
|
-
className: "
|
|
267
|
+
className: "popover-menu-item-name"
|
|
293
268
|
}, item.name));
|
|
294
|
-
})) : null)))
|
|
269
|
+
})) : null))), visible ? React__default.createElement(Overlay, {
|
|
270
|
+
visible: visible,
|
|
271
|
+
onClick: function onClick(e) {
|
|
272
|
+
return handleClick(e);
|
|
273
|
+
},
|
|
274
|
+
style: {
|
|
275
|
+
background: 'transparent'
|
|
276
|
+
}
|
|
277
|
+
}) : '');
|
|
295
278
|
};
|
|
296
279
|
|
|
297
280
|
Popover.defaultProps = defaultProps;
|