@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
|
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
5
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
6
|
-
var _excluded = ["children", "direction", "className", "pageContent", "onChange", "initPage", "paginationColor", "paginationVisible", "touchable", "isPreventDefault", "isStopPropagation", "autoPlay"];
|
|
6
|
+
var _excluded = ["children", "direction", "className", "pageContent", "onChange", "initPage", "paginationColor", "paginationVisible", "touchable", "isPreventDefault", "isStopPropagation", "autoPlay", "isCenter"];
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
8
|
|
|
9
9
|
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; }
|
|
@@ -14,6 +14,7 @@ import React__default, { useRef, useState, useMemo, useEffect } from 'react';
|
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import { D as DataContext } from './UserContext-b4181162.js';
|
|
16
16
|
import { c as cn } from './bem-893ad28d.js';
|
|
17
|
+
import { g as getRectByTaro } from './useClientRect-8b7cc406.js';
|
|
17
18
|
var defaultProps = {
|
|
18
19
|
width: (typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object' ? window.innerWidth : 375,
|
|
19
20
|
height: 0,
|
|
@@ -27,6 +28,7 @@ var defaultProps = {
|
|
|
27
28
|
touchable: true,
|
|
28
29
|
isPreventDefault: true,
|
|
29
30
|
isStopPropagation: true,
|
|
31
|
+
isCenter: false,
|
|
30
32
|
className: ''
|
|
31
33
|
};
|
|
32
34
|
var DISTANCE = 5;
|
|
@@ -47,6 +49,7 @@ var Swiper = React__default.forwardRef(function (props, ref) {
|
|
|
47
49
|
isPreventDefault = propSwiper.isPreventDefault,
|
|
48
50
|
isStopPropagation = propSwiper.isStopPropagation,
|
|
49
51
|
autoPlay = propSwiper.autoPlay,
|
|
52
|
+
isCenter = propSwiper.isCenter,
|
|
50
53
|
rest = _objectWithoutProperties(propSwiper, _excluded);
|
|
51
54
|
|
|
52
55
|
var container = useRef(null);
|
|
@@ -66,7 +69,8 @@ var Swiper = React__default.forwardRef(function (props, ref) {
|
|
|
66
69
|
var _useState = useState(null),
|
|
67
70
|
_useState2 = _slicedToArray(_useState, 2),
|
|
68
71
|
rect = _useState2[0],
|
|
69
|
-
setRect = _useState2[1];
|
|
72
|
+
setRect = _useState2[1]; // eslint-disable-next-line prefer-const
|
|
73
|
+
|
|
70
74
|
|
|
71
75
|
var _useState3 = useState(0),
|
|
72
76
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -139,7 +143,7 @@ var Swiper = React__default.forwardRef(function (props, ref) {
|
|
|
139
143
|
|
|
140
144
|
var minOffset = function () {
|
|
141
145
|
if (rect) {
|
|
142
|
-
var base = isVertical ? rect.height : rect.width;
|
|
146
|
+
var base = isVertical ? rect === null || rect === void 0 ? void 0 : rect.height : rect === null || rect === void 0 ? void 0 : rect.width;
|
|
143
147
|
return base - Number(size) * childCount;
|
|
144
148
|
}
|
|
145
149
|
|
|
@@ -266,7 +270,6 @@ var Swiper = React__default.forwardRef(function (props, ref) {
|
|
|
266
270
|
}
|
|
267
271
|
|
|
268
272
|
active = targetActive;
|
|
269
|
-
offset = targetOffset;
|
|
270
273
|
setActive(targetActive);
|
|
271
274
|
setOffset(targetOffset);
|
|
272
275
|
getStyle(targetOffset);
|
|
@@ -361,8 +364,18 @@ var Swiper = React__default.forwardRef(function (props, ref) {
|
|
|
361
364
|
var getStyle = function getStyle() {
|
|
362
365
|
var moveOffset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : offset;
|
|
363
366
|
var target = innerRef.current;
|
|
364
|
-
|
|
365
|
-
|
|
367
|
+
var _offset = 0;
|
|
368
|
+
|
|
369
|
+
if (!isCenter) {
|
|
370
|
+
_offset = moveOffset;
|
|
371
|
+
} else {
|
|
372
|
+
var _size = isVertical ? height : width;
|
|
373
|
+
|
|
374
|
+
var val = isVertical ? (rect === null || rect === void 0 ? void 0 : rect.height) - _size : (rect === null || rect === void 0 ? void 0 : rect.width) - _size;
|
|
375
|
+
_offset = moveOffset + (active === childCount - 1 && !props.loop ? -val / 2 : val / 2);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
target.style.transform = "translate3D".concat(!isVertical ? "(".concat(_offset, "px,0,0)") : "(0,".concat(_offset, "px,0)"));
|
|
366
379
|
target.style.transitionDuration = "".concat(_swiper.current.moving ? 0 : props.duration, "ms");
|
|
367
380
|
target.style[isVertical ? 'height' : 'width'] = "".concat(Number(size) * childCount, "px");
|
|
368
381
|
target.style[isVertical ? 'width' : 'height'] = "".concat(isVertical ? width : height, "px");
|
|
@@ -398,10 +411,14 @@ var Swiper = React__default.forwardRef(function (props, ref) {
|
|
|
398
411
|
_swiper.current.moving = false;
|
|
399
412
|
|
|
400
413
|
if (isShouldMove && touch.stateDirection === props.direction) {
|
|
401
|
-
var
|
|
414
|
+
var _offset2 = isVertical ? touch.offsetY : touch.offsetX;
|
|
402
415
|
|
|
403
416
|
if (props.loop) {
|
|
404
|
-
|
|
417
|
+
if (_offset2 > 0) {
|
|
418
|
+
pace = touch.delta > 0 ? -1 : 1;
|
|
419
|
+
} else {
|
|
420
|
+
pace = 0;
|
|
421
|
+
}
|
|
405
422
|
} else {
|
|
406
423
|
pace = -Math[touch.delta > 0 ? 'ceil' : 'floor'](touch.delta / size);
|
|
407
424
|
}
|
|
@@ -441,7 +458,7 @@ var Swiper = React__default.forwardRef(function (props, ref) {
|
|
|
441
458
|
case 0:
|
|
442
459
|
active = _args.length > 0 && _args[0] !== undefined ? _args[0] : +propSwiper.initPage;
|
|
443
460
|
_context.next = 3;
|
|
444
|
-
return container.current
|
|
461
|
+
return getRectByTaro(container.current);
|
|
445
462
|
|
|
446
463
|
case 3:
|
|
447
464
|
rect = _context.sent;
|
|
@@ -510,8 +527,13 @@ var Swiper = React__default.forwardRef(function (props, ref) {
|
|
|
510
527
|
target.removeEventListener('touchend', onTouchEnd, false);
|
|
511
528
|
};
|
|
512
529
|
});
|
|
530
|
+
useEffect(function () {
|
|
531
|
+
return function () {
|
|
532
|
+
stopAutoPlay();
|
|
533
|
+
};
|
|
534
|
+
}, []);
|
|
513
535
|
|
|
514
|
-
var
|
|
536
|
+
var itemStyle = function itemStyle(index) {
|
|
515
537
|
var style = {};
|
|
516
538
|
|
|
517
539
|
var _direction = propSwiper.direction || direction;
|
|
@@ -549,16 +571,19 @@ var Swiper = React__default.forwardRef(function (props, ref) {
|
|
|
549
571
|
}, React__default.Children.map(childs, function (child, index) {
|
|
550
572
|
return React__default.createElement("div", {
|
|
551
573
|
className: b('item-wrapper'),
|
|
552
|
-
style:
|
|
574
|
+
style: itemStyle(index),
|
|
553
575
|
key: index
|
|
554
576
|
}, child);
|
|
555
577
|
})), propSwiper.paginationVisible && !('pageContent' in propSwiper) ? React__default.createElement("div", {
|
|
556
578
|
className: classNames((_classNames2 = {}, _defineProperty(_classNames2, "".concat(b('pagination')), true), _defineProperty(_classNames2, "".concat(b('pagination-vertical')), isVertical), _classNames2))
|
|
557
579
|
}, React__default.Children.map(childs, function (item, index) {
|
|
580
|
+
var _classNames3;
|
|
581
|
+
|
|
558
582
|
return React__default.createElement("i", {
|
|
559
|
-
style: {
|
|
560
|
-
backgroundColor:
|
|
561
|
-
},
|
|
583
|
+
style: (active + childCount) % childCount === index ? {
|
|
584
|
+
backgroundColor: propSwiper.paginationColor
|
|
585
|
+
} : undefined,
|
|
586
|
+
className: classNames((_classNames3 = {}, _defineProperty(_classNames3, "".concat(b('pagination-item')), true), _defineProperty(_classNames3, "active", (active + childCount) % childCount === index), _classNames3)),
|
|
562
587
|
key: index
|
|
563
588
|
});
|
|
564
589
|
})) : React__default.createElement("div", null, pageContent)));
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
|
|
4
3
|
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; }
|
|
5
4
|
|
|
6
5
|
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; }
|
|
7
6
|
|
|
8
|
-
import React__default, { useContext
|
|
7
|
+
import React__default, { useContext } from 'react';
|
|
9
8
|
import classNames from 'classnames';
|
|
10
9
|
import { D as DataContext } from './UserContext-b4181162.js';
|
|
11
10
|
import { c as cn } from './bem-893ad28d.js';
|
|
@@ -19,21 +18,8 @@ var SwiperItem = React__default.forwardRef(function (props, ref) {
|
|
|
19
18
|
direction = _props.direction,
|
|
20
19
|
size = _props.size;
|
|
21
20
|
var parent = useContext(DataContext);
|
|
22
|
-
|
|
23
|
-
var _useState = useState(0),
|
|
24
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
25
|
-
offset = _useState2[0],
|
|
26
|
-
setOffset = _useState2[1];
|
|
27
|
-
|
|
28
21
|
var b = cn('swiper-item');
|
|
29
22
|
var classes = classNames(b(''));
|
|
30
|
-
useImperativeHandle(ref, function () {
|
|
31
|
-
return {
|
|
32
|
-
changeOffset: function changeOffset(num) {
|
|
33
|
-
setOffset(num);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
});
|
|
37
23
|
|
|
38
24
|
var style = function style() {
|
|
39
25
|
var style = {};
|
|
@@ -7,7 +7,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
7
7
|
import React__default, { useEffect } from 'react';
|
|
8
8
|
import { useHistory } from 'react-router-dom';
|
|
9
9
|
import { c as cn } from './bem-893ad28d.js';
|
|
10
|
-
import { I as Icon } from './icon-
|
|
10
|
+
import { I as Icon } from './icon-8dc4de10.js';
|
|
11
11
|
var defaultProps = {
|
|
12
12
|
dot: false,
|
|
13
13
|
size: '',
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["children", "className", "style", "columns", "data", "bordered", "summary", "striped", "noData", "onSorter"];
|
|
5
|
+
|
|
6
|
+
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; }
|
|
7
|
+
|
|
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
|
+
|
|
10
|
+
import React__default, { useState, useEffect } from 'react';
|
|
11
|
+
import classNames from 'classnames';
|
|
12
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
13
|
+
import { I as Icon } from './icon-8dc4de10.js';
|
|
14
|
+
import { u as useConfig } from './configprovider-9c393a29.js';
|
|
15
|
+
var defaultProps = {
|
|
16
|
+
className: '',
|
|
17
|
+
style: {},
|
|
18
|
+
columns: [],
|
|
19
|
+
data: [],
|
|
20
|
+
bordered: true,
|
|
21
|
+
striped: false,
|
|
22
|
+
noData: '无数据'
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var Table = function Table(props) {
|
|
26
|
+
var _useConfig = useConfig(),
|
|
27
|
+
locale = _useConfig.locale;
|
|
28
|
+
|
|
29
|
+
defaultProps.noData = locale.noData;
|
|
30
|
+
|
|
31
|
+
var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
|
|
32
|
+
children = _defaultProps$props.children,
|
|
33
|
+
className = _defaultProps$props.className,
|
|
34
|
+
style = _defaultProps$props.style,
|
|
35
|
+
columns = _defaultProps$props.columns,
|
|
36
|
+
data = _defaultProps$props.data,
|
|
37
|
+
bordered = _defaultProps$props.bordered,
|
|
38
|
+
summary = _defaultProps$props.summary,
|
|
39
|
+
striped = _defaultProps$props.striped,
|
|
40
|
+
noData = _defaultProps$props.noData,
|
|
41
|
+
onSorter = _defaultProps$props.onSorter,
|
|
42
|
+
rest = _objectWithoutProperties(_defaultProps$props, _excluded);
|
|
43
|
+
|
|
44
|
+
var _useState = useState(data),
|
|
45
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
46
|
+
curData = _useState2[0],
|
|
47
|
+
setCurData = _useState2[1];
|
|
48
|
+
|
|
49
|
+
useEffect(function () {
|
|
50
|
+
if (data && String(data) !== String(curData)) {
|
|
51
|
+
setCurData(data);
|
|
52
|
+
}
|
|
53
|
+
}, [data]);
|
|
54
|
+
var b = cn('table');
|
|
55
|
+
var classes = classNames({});
|
|
56
|
+
var cls = classNames(b(), classes, className);
|
|
57
|
+
|
|
58
|
+
var handleSorterClick = function handleSorterClick(item) {
|
|
59
|
+
if (item.sorter) {
|
|
60
|
+
onSorter && onSorter(item, curData);
|
|
61
|
+
|
|
62
|
+
if (typeof item.sorter === 'function') {
|
|
63
|
+
setCurData(curData.sort(item.sorter));
|
|
64
|
+
} else {
|
|
65
|
+
setCurData(item.sorter === 'default' ? curData.sort() : curData);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
var cellClasses = function cellClasses(item) {
|
|
71
|
+
return _defineProperty({
|
|
72
|
+
'nut-table__main__head__tr--border': props.bordered
|
|
73
|
+
}, "nut-table__main__head__tr--align".concat(item.align ? item.align : ''), true);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
var getColumnItem = function getColumnItem(value) {
|
|
77
|
+
return columns.filter(function (item) {
|
|
78
|
+
return item.key === value;
|
|
79
|
+
})[0];
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
var renderHeadCells = function renderHeadCells() {
|
|
83
|
+
return columns.map(function (item, index) {
|
|
84
|
+
return React__default.createElement("span", {
|
|
85
|
+
className: classNames('nut-table__main__head__tr__th', cellClasses(item)),
|
|
86
|
+
key: item.key,
|
|
87
|
+
onClick: function onClick() {
|
|
88
|
+
return handleSorterClick(item);
|
|
89
|
+
}
|
|
90
|
+
}, item.title, item.sorter && React__default.createElement(Icon, {
|
|
91
|
+
name: "down-arrow",
|
|
92
|
+
size: "12px"
|
|
93
|
+
}));
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
var sortDataItem = function sortDataItem() {
|
|
98
|
+
return columns.map(function (columns) {
|
|
99
|
+
return [columns.key, columns.render];
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
var renderBodyTds = function renderBodyTds(item) {
|
|
104
|
+
return sortDataItem().map(function (_ref2, index) {
|
|
105
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
106
|
+
value = _ref3[0],
|
|
107
|
+
render = _ref3[1];
|
|
108
|
+
|
|
109
|
+
return React__default.createElement("span", {
|
|
110
|
+
className: classNames('nut-table__main__body__tr__td', cellClasses(getColumnItem(value))),
|
|
111
|
+
key: value
|
|
112
|
+
}, typeof item[value] === 'function' || typeof render === 'function' ? React__default.createElement("div", null, render ? render(item) : item[value](item)) : item[value]);
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
var renderBoyTrs = function renderBoyTrs() {
|
|
117
|
+
return curData.map(function (item, index) {
|
|
118
|
+
return React__default.createElement("div", {
|
|
119
|
+
className: "nut-table__main__body__tr",
|
|
120
|
+
key: index
|
|
121
|
+
}, renderBodyTds(item));
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
return React__default.createElement("div", _objectSpread({
|
|
126
|
+
className: cls,
|
|
127
|
+
style: style
|
|
128
|
+
}, rest), React__default.createElement("div", {
|
|
129
|
+
className: classNames('nut-table__main', {
|
|
130
|
+
'nut-table__main--striped': striped
|
|
131
|
+
})
|
|
132
|
+
}, React__default.createElement("div", {
|
|
133
|
+
className: "nut-table__main__head"
|
|
134
|
+
}, React__default.createElement("div", {
|
|
135
|
+
className: "nut-table__main__head__tr"
|
|
136
|
+
}, renderHeadCells())), React__default.createElement("div", {
|
|
137
|
+
className: "nut-table__main__body"
|
|
138
|
+
}, renderBoyTrs())), summary && React__default.createElement("div", {
|
|
139
|
+
className: "nut-table__summary"
|
|
140
|
+
}, React__default.createElement("span", {
|
|
141
|
+
className: "nut-table__summary__text"
|
|
142
|
+
}, summary)), curData.length === 0 && React__default.createElement("div", {
|
|
143
|
+
className: "nut-table__nodata"
|
|
144
|
+
}, React__default.createElement("div", {
|
|
145
|
+
className: "nut-table__nodata"
|
|
146
|
+
}, React__default.createElement("div", {
|
|
147
|
+
className: "nut-table__nodata__text"
|
|
148
|
+
}, noData))));
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
Table.defaultProps = defaultProps;
|
|
152
|
+
Table.displayName = 'NutTable';
|
|
153
|
+
export { Table as T };
|
|
@@ -18,12 +18,13 @@ var TabPane = function TabPane(props) {
|
|
|
18
18
|
var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
|
|
19
19
|
children = _defaultProps$props.children,
|
|
20
20
|
paneKey = _defaultProps$props.paneKey,
|
|
21
|
-
activeKey = _defaultProps$props.activeKey
|
|
21
|
+
activeKey = _defaultProps$props.activeKey,
|
|
22
|
+
autoHeightClassName = _defaultProps$props.autoHeightClassName;
|
|
22
23
|
|
|
23
24
|
var b = cn('tabpane');
|
|
24
25
|
var classes = classNames({
|
|
25
26
|
active: paneKey === activeKey
|
|
26
|
-
}, b(''));
|
|
27
|
+
}, b(''), autoHeightClassName);
|
|
27
28
|
return React__default.createElement("div", {
|
|
28
29
|
className: classes
|
|
29
30
|
}, children);
|
|
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
4
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
5
5
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
6
|
-
var _excluded = ["value", "color", "background", "direction", "type", "titleScroll", "ellipsis", "animatedTime", "titleGutter", "size", "titleNode", "children", "onClick", "onChange", "className"];
|
|
6
|
+
var _excluded = ["value", "color", "background", "direction", "type", "titleScroll", "ellipsis", "animatedTime", "titleGutter", "size", "titleNode", "children", "onClick", "onChange", "className", "autoHeight"];
|
|
7
7
|
|
|
8
8
|
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; }
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12
12
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import { c as cn } from './bem-893ad28d.js';
|
|
15
|
-
import { I as Icon } from './icon-
|
|
15
|
+
import { I as Icon } from './icon-8dc4de10.js';
|
|
16
16
|
|
|
17
17
|
var Title = /*#__PURE__*/_createClass( // eslint-disable-next-line no-useless-constructor
|
|
18
18
|
function Title() {
|
|
@@ -37,7 +37,8 @@ var defaultProps = {
|
|
|
37
37
|
ellipsis: true,
|
|
38
38
|
animatedTime: 300,
|
|
39
39
|
titleGutter: 0,
|
|
40
|
-
size: 'normal'
|
|
40
|
+
size: 'normal',
|
|
41
|
+
autoHeight: false
|
|
41
42
|
};
|
|
42
43
|
|
|
43
44
|
var pxCheck = function pxCheck(value) {
|
|
@@ -63,6 +64,7 @@ var Tabs = function Tabs(props) {
|
|
|
63
64
|
onClick = _defaultProps$props.onClick,
|
|
64
65
|
onChange = _defaultProps$props.onChange,
|
|
65
66
|
className = _defaultProps$props.className,
|
|
67
|
+
autoHeight = _defaultProps$props.autoHeight,
|
|
66
68
|
rest = _objectWithoutProperties(_defaultProps$props, _excluded);
|
|
67
69
|
|
|
68
70
|
var _useState = useState({
|
|
@@ -86,7 +88,7 @@ var Tabs = function Tabs(props) {
|
|
|
86
88
|
|
|
87
89
|
var title = new Title();
|
|
88
90
|
|
|
89
|
-
if ((_child$props = child.props) !== null && _child$props !== void 0 && _child$props.title || (_child$props2 = child.props) !== null && _child$props2 !== void 0 && _child$props2.paneKey) {
|
|
91
|
+
if (child !== null && child !== void 0 && (_child$props = child.props) !== null && _child$props !== void 0 && _child$props.title || child !== null && child !== void 0 && (_child$props2 = child.props) !== null && _child$props2 !== void 0 && _child$props2.paneKey) {
|
|
90
92
|
var _child$props3, _child$props4, _child$props5;
|
|
91
93
|
|
|
92
94
|
title.title = (_child$props3 = child.props) === null || _child$props3 === void 0 ? void 0 : _child$props3.title;
|
|
@@ -147,7 +149,7 @@ var Tabs = function Tabs(props) {
|
|
|
147
149
|
return tabChange(item);
|
|
148
150
|
},
|
|
149
151
|
className: classNames({
|
|
150
|
-
active: item.paneKey === value,
|
|
152
|
+
active: String(item.paneKey) === String(value),
|
|
151
153
|
disabled: item.disabled
|
|
152
154
|
}, "".concat(b(''), "__titles-item")),
|
|
153
155
|
key: item.paneKey
|
|
@@ -169,6 +171,8 @@ var Tabs = function Tabs(props) {
|
|
|
169
171
|
className: "".concat(b(''), "__content"),
|
|
170
172
|
style: contentStyle
|
|
171
173
|
}, React__default.Children.map(children, function (child, idx) {
|
|
174
|
+
var _child$props6;
|
|
175
|
+
|
|
172
176
|
if (!React__default.isValidElement(child)) {
|
|
173
177
|
return null;
|
|
174
178
|
}
|
|
@@ -177,6 +181,12 @@ var Tabs = function Tabs(props) {
|
|
|
177
181
|
activeKey: value
|
|
178
182
|
});
|
|
179
183
|
|
|
184
|
+
if (String(value) !== String(((_child$props6 = child.props) === null || _child$props6 === void 0 ? void 0 : _child$props6.paneKey) || idx) && autoHeight) {
|
|
185
|
+
childProps = _objectSpread(_objectSpread({}, childProps), {}, {
|
|
186
|
+
autoHeightClassName: 'inactive'
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
|
|
180
190
|
return React__default.cloneElement(child, childProps);
|
|
181
191
|
})));
|
|
182
192
|
};
|
|
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
6
6
|
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; }
|
|
7
7
|
|
|
8
8
|
import React__default, { useState, useEffect } from 'react';
|
|
9
|
-
import { I as Icon } from './icon-
|
|
9
|
+
import { I as Icon } from './icon-8dc4de10.js';
|
|
10
10
|
var defaultProps = {
|
|
11
11
|
type: 'default',
|
|
12
12
|
color: '',
|
|
@@ -90,7 +90,7 @@ var Tag = function Tag(props) {
|
|
|
90
90
|
className: "_icon",
|
|
91
91
|
name: "close",
|
|
92
92
|
size: "12",
|
|
93
|
-
|
|
93
|
+
onClick: function onClick(e) {
|
|
94
94
|
setIsTagShow(false);
|
|
95
95
|
|
|
96
96
|
if (props.onClose) {
|
|
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
6
6
|
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; }
|
|
7
7
|
|
|
8
8
|
import React__default, { useState, useEffect } from 'react';
|
|
9
|
-
import { u as useConfig } from './configprovider-
|
|
9
|
+
import { u as useConfig } from './configprovider-9c393a29.js';
|
|
10
10
|
import { c as cn } from './bem-893ad28d.js';
|
|
11
11
|
var defaultProps = {
|
|
12
12
|
defaultValue: '',
|
|
@@ -60,7 +60,7 @@ var TextArea = function TextArea(props) {
|
|
|
60
60
|
}, [defaultValue]);
|
|
61
61
|
|
|
62
62
|
var textChange = function textChange(event) {
|
|
63
|
-
var text = event.
|
|
63
|
+
var text = event.detail;
|
|
64
64
|
|
|
65
65
|
if (maxlength && text.value.length > Number(maxlength)) {
|
|
66
66
|
text.value = text.value.substring(0, Number(maxlength));
|
|
@@ -79,7 +79,7 @@ var TextArea = function TextArea(props) {
|
|
|
79
79
|
var textBlur = function textBlur(event) {
|
|
80
80
|
if (disabled) return;
|
|
81
81
|
if (readonly) return;
|
|
82
|
-
var text = event.
|
|
82
|
+
var text = event.detail;
|
|
83
83
|
onChange && onChange(text.value, event);
|
|
84
84
|
onBlur && onBlur(event);
|
|
85
85
|
};
|
|
@@ -95,6 +95,9 @@ var TextArea = function TextArea(props) {
|
|
|
95
95
|
disabled: disabled,
|
|
96
96
|
readOnly: readonly,
|
|
97
97
|
value: inputValue,
|
|
98
|
+
onInput: function onInput(e) {
|
|
99
|
+
textChange(e);
|
|
100
|
+
},
|
|
98
101
|
onChange: function onChange(e) {
|
|
99
102
|
textChange(e);
|
|
100
103
|
},
|
|
@@ -7,7 +7,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
7
7
|
|
|
8
8
|
import React__default, { useState, useEffect } from 'react';
|
|
9
9
|
import { c as cn } from './bem-893ad28d.js';
|
|
10
|
-
import { u as useConfig } from './configprovider-
|
|
10
|
+
import { u as useConfig } from './configprovider-9c393a29.js';
|
|
11
11
|
var defaultProps = {
|
|
12
12
|
className: '',
|
|
13
13
|
currentKey: 0,
|
|
@@ -6,7 +6,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
6
6
|
|
|
7
7
|
import React__default from 'react';
|
|
8
8
|
import { c as cn } from './bem-893ad28d.js';
|
|
9
|
-
import { u as useConfig } from './configprovider-
|
|
9
|
+
import { u as useConfig } from './configprovider-9c393a29.js';
|
|
10
10
|
var defaultProps = {
|
|
11
11
|
className: '',
|
|
12
12
|
date: '',
|
|
@@ -7,9 +7,9 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
7
7
|
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; }
|
|
8
8
|
|
|
9
9
|
import React__default, { useState, useEffect } from 'react';
|
|
10
|
-
import { P as Popup } from './popup-
|
|
10
|
+
import { P as Popup } from './popup-67173ec6.js';
|
|
11
11
|
import { c as cn } from './bem-893ad28d.js';
|
|
12
|
-
import { u as useConfig } from './configprovider-
|
|
12
|
+
import { u as useConfig } from './configprovider-9c393a29.js';
|
|
13
13
|
var defaultProps$2 = {
|
|
14
14
|
className: '',
|
|
15
15
|
date: '',
|
|
@@ -4,7 +4,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
4
4
|
|
|
5
5
|
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; }
|
|
6
6
|
|
|
7
|
-
import { N as Notification } from './Notification-
|
|
7
|
+
import { N as Notification } from './Notification-422905bd.js';
|
|
8
8
|
var messageInstance = null;
|
|
9
9
|
var options = {
|
|
10
10
|
msg: '',
|
|
@@ -12,9 +12,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12
12
|
|
|
13
13
|
import React__default, { useState, useEffect, useImperativeHandle } from 'react';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
-
import { I as Icon } from './icon-
|
|
15
|
+
import { I as Icon } from './icon-8dc4de10.js';
|
|
16
16
|
import { c as cn } from './bem-893ad28d.js';
|
|
17
|
-
import { u as useConfig } from './configprovider-
|
|
17
|
+
import { u as useConfig } from './configprovider-9c393a29.js';
|
|
18
18
|
|
|
19
19
|
var UploadOptions = /*#__PURE__*/_createClass(function UploadOptions() {
|
|
20
20
|
_classCallCheck(this, UploadOptions);
|
|
@@ -509,7 +509,7 @@ var InternalUploader = function InternalUploader(props, ref) {
|
|
|
509
509
|
name: "link"
|
|
510
510
|
}), "\xA0", item.name))), React__default.createElement("div", {
|
|
511
511
|
className: "tips"
|
|
512
|
-
}, item.name)), listType
|
|
512
|
+
}, item.name)), listType === 'list' && React__default.createElement("div", {
|
|
513
513
|
className: "nut-uploader__preview-list"
|
|
514
514
|
}, React__default.createElement("div", {
|
|
515
515
|
className: "nut-uploader__preview-img__file__name ".concat(item.status),
|
|
@@ -526,7 +526,7 @@ var InternalUploader = function InternalUploader(props, ref) {
|
|
|
526
526
|
return onDelete(item, index);
|
|
527
527
|
}
|
|
528
528
|
})));
|
|
529
|
-
}), maximum > fileList.length && listType
|
|
529
|
+
}), maximum > fileList.length && listType === 'picture' && !children && React__default.createElement("div", {
|
|
530
530
|
className: "nut-uploader__upload ".concat(listType)
|
|
531
531
|
}, React__default.createElement(Icon, {
|
|
532
532
|
size: uploadIconSize,
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
获取元素的大小及其相对于视口的位置,等价于 Element.getBoundingClientRect。
|
|
6
|
+
width 宽度 number
|
|
7
|
+
height 高度 number
|
|
8
|
+
top 顶部与视图窗口左上角的距离 number
|
|
9
|
+
left 左侧与视图窗口左上角的距离 number
|
|
10
|
+
right 右侧与视图窗口左上角的距离 number
|
|
11
|
+
bottom 底部与视图窗口左上角的距离 number
|
|
12
|
+
*/
|
|
13
|
+
function isWindow(val) {
|
|
14
|
+
return val === window;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
var getRect = function getRect(elementRef) {
|
|
18
|
+
var element = elementRef;
|
|
19
|
+
|
|
20
|
+
if (isWindow(element)) {
|
|
21
|
+
var width = element.innerWidth;
|
|
22
|
+
var height = element.innerHeight;
|
|
23
|
+
return {
|
|
24
|
+
top: 0,
|
|
25
|
+
left: 0,
|
|
26
|
+
right: width,
|
|
27
|
+
bottom: height,
|
|
28
|
+
width: width,
|
|
29
|
+
height: height
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (element && element.getBoundingClientRect) {
|
|
34
|
+
return element.getBoundingClientRect();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
top: 0,
|
|
39
|
+
left: 0,
|
|
40
|
+
right: 0,
|
|
41
|
+
bottom: 0,
|
|
42
|
+
width: 0,
|
|
43
|
+
height: 0
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
var getRectByTaro = /*#__PURE__*/function () {
|
|
48
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(element) {
|
|
49
|
+
var res;
|
|
50
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
51
|
+
while (1) {
|
|
52
|
+
switch (_context.prev = _context.next) {
|
|
53
|
+
case 0:
|
|
54
|
+
_context.next = 2;
|
|
55
|
+
return element.getBoundingClientRect();
|
|
56
|
+
|
|
57
|
+
case 2:
|
|
58
|
+
res = _context.sent;
|
|
59
|
+
return _context.abrupt("return", res);
|
|
60
|
+
|
|
61
|
+
case 4:
|
|
62
|
+
case "end":
|
|
63
|
+
return _context.stop();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}, _callee);
|
|
67
|
+
}));
|
|
68
|
+
|
|
69
|
+
return function getRectByTaro(_x) {
|
|
70
|
+
return _ref.apply(this, arguments);
|
|
71
|
+
};
|
|
72
|
+
}();
|
|
73
|
+
|
|
74
|
+
export { getRect as a, getRectByTaro as g };
|