@nutui/nutui-react-taro 2.5.0 → 2.5.2
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 +38 -0
- package/README.md +5 -5
- package/dist/esm/Address/style/style.css +1 -1
- package/dist/esm/Address.js +1 -1
- package/dist/esm/CalendarCard.js +1 -1
- package/dist/esm/Cascader/style/style.css +1 -1
- package/dist/esm/Cascader.js +1 -1
- package/dist/esm/DatePicker.js +1 -1
- package/dist/esm/Ellipsis/style/style.css +1 -1
- package/dist/esm/Ellipsis.js +1 -1
- package/dist/esm/Form/style/style.css +1 -1
- package/dist/esm/FormItem/style/style.css +1 -1
- package/dist/esm/Input.js +1 -1
- package/dist/esm/Popover/style/style.css +1 -1
- package/dist/esm/Popover.js +1 -1
- package/dist/esm/Progress.js +1 -1
- package/dist/esm/Radio/style/style.css +1 -1
- package/dist/esm/RadioGroup/style/style.css +1 -1
- package/dist/esm/Tabs/style/style.css +1 -1
- package/dist/esm/Tabs.js +1 -1
- package/dist/esm/Tour/style/style.css +1 -1
- package/dist/esm/Tour.js +1 -1
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/{address.taro-CipZMqK4.js → address.taro-CQmN9x1W.js} +1 -1
- package/dist/esm/{cascader.taro-AZEBpBH3.js → cascader.taro-7Xhq98L4.js} +1 -1
- package/dist/esm/{datepicker.taro-DqR52Ivo.js → datepicker.taro-FiLalMAA.js} +14 -3
- package/dist/esm/{ellipsis.taro-cNaaQFyW.js → ellipsis.taro-uVc3En9l.js} +17 -8
- package/dist/esm/{input.taro-BVC8gEuk.js → input.taro-Dh6zXTLQ.js} +10 -3
- package/dist/esm/nutui-react.es.js +11 -11
- package/dist/esm/{popover.taro-BsOaXoWp.js → popover.taro-BG0msyw5.js} +17 -10
- package/dist/esm/progress.taro-rjiPI6mD.js +120 -0
- package/dist/esm/{tabs.taro-BxPmx5n5.js → tabs.taro-A7pOK9IM.js} +4 -20
- package/dist/esm/{tour.taro-wfXuUebD.js → tour.taro-BqlNfxdD.js} +1 -1
- package/dist/esm/{uploader.taro-Bs-cboSU.js → uploader.taro-DMmTl0Cp.js} +1 -1
- package/dist/esm/use-uuid-BvqmbYZ7.js +19 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/tr-TR.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +462 -339
- package/dist/nutui.react.umd.js +470 -347
- package/dist/packages/ellipsis/ellipsis.scss +1 -1
- package/dist/packages/form/form.scss +4 -2
- package/dist/packages/formitem/formitem.scss +19 -0
- package/dist/packages/popover/popover.scss +0 -23
- package/dist/packages/radiogroup/radiogroup.scss +1 -2
- package/dist/packages/tabs/tabs.scss +16 -21
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +0 -1
- package/dist/styles/variables.scss +5 -9
- package/dist/types/packages/calendar/calendar.d.ts +1 -5
- package/dist/types/packages/calendar/calendar.taro.d.ts +1 -5
- package/dist/types/packages/calendar/types.d.ts +3 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/progress/progress.taro.d.ts +5 -0
- package/package.json +2 -2
- package/dist/esm/progress.taro-BOHykt7X.js +0 -60
- package/dist/esm/{calendarcard.taro-CK31xju_.js → calendarcard.taro-C7P3oqAL.js} +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.nut-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--nutui-overlay-bg-color, var(--nutui-black-10, rgba(0, 0, 0, .7)));z-index:var(--nutui-overlay-zIndex, 1000)}.nut-overlay .wrapper .content{background-color:var(--nutui-overlay-content-bg-color, var(--nutui-gray-1, #ffffff));color:var(--nutui-overlay-content-color, var(--nutui-gray-7, #1a1a1a))}[dir=rtl] .nut-overlay,.nut-rtl .nut-overlay{left:auto;right:0}.nut-overflow-hidden,.nut-overflow-hidden .taro_page{overflow:hidden!important}@keyframes nut-fade-in{0%{opacity:0}1%{opacity:0}to{opacity:1}}@keyframes nut-fade-out{0%{opacity:1}1%{opacity:1}to{opacity:0}}.nut-overlay-slide-enter-active,.nut-overlay-slide-appear-active{animation-fill-mode:both;animation-name:nut-fade-in;animation-duration:var(--nutui-overlay-animation-duration, .3s)}.nut-overlay-slide-exit-active{animation-fill-mode:both;animation-name:nut-fade-out;animation-duration:var(--nutui-overlay-animation-duration, .3s)}.nut-popup{position:fixed;min-height:26%;max-height:100%;overflow-y:auto;background-color:var(--nutui-overlay-content-bg-color, var(--nutui-gray-1, #ffffff));color:var(--nutui-gray-7, #1a1a1a);-webkit-overflow-scrolling:touch;font-size:var(--nutui-font-size-3, 14px)}.nut-popup-title{display:flex;align-items:center;justify-content:center;border-bottom:var(--nutui-popup-title-border-bottom, 0);padding:var(--nutui-popup-title-padding, 16px);position:relative}.nut-popup-title-left{position:absolute;left:var(--nutui-popup-title-padding, 16px)}.nut-popup-title-title{font-weight:var(--nutui-font-weight-bold, 500);font-size:var(--nutui-popup-title-font-size, var(--nutui-font-size-5, 18px))}.nut-popup-title-description{color:var(--nutui-gray-5, #8c8c8c);font-size:var(--nutui-popup-description-font-size, var(--nutui-font-size-1, 10px));font-weight:var(--nutui-font-weight, 400)}.nut-popup-title-right{position:absolute!important;z-index:1;cursor:pointer;width:var(--nutui-popup-icon-size, var(--nutui-font-size-5, 18px));height:var(--nutui-popup-icon-size, var(--nutui-font-size-5, 18px));display:flex;justify-content:center;align-items:center;top:var(--nutui-popup-title-padding, 16px);right:var(--nutui-popup-title-padding, 16px);color:var(--nutui-gray-5, #8c8c8c)}.nut-popup-title-right:active{opacity:.7}.nut-popup-title-right-top-left{top:var(--nutui-popup-title-padding, 16px);left:var(--nutui-popup-title-padding, 16px)}.nut-popup-title-right-bottom-left{bottom:var(--nutui-popup-title-padding, 16px);left:var(--nutui-popup-title-padding, 16px)}.nut-popup-title-right-bottom-right{right:var(--nutui-popup-title-padding, 16px);bottom:var(--nutui-popup-title-padding, 16px)}.nut-popup-center{top:50%;left:50%;min-height:10%;transform:translate(-50%,-50%)}.nut-popup-center.nut-popup-round{border-radius:var(--nutui-popup-border-radius, 24px)}.nut-popup-bottom,.nut-popup-top{max-height:83%}.nut-popup-bottom{bottom:0;left:0;width:100%}.nut-popup-bottom.nut-popup-round{border-radius:var(--nutui-popup-border-radius, 24px) var(--nutui-popup-border-radius, 24px) 0 0}.nut-popup-right{top:0;right:0}.nut-popup-right.nut-popup-round{border-radius:var(--nutui-popup-border-radius, 24px) 0 0 var(--nutui-popup-border-radius, 24px)}.nut-popup-left{top:0;left:0}.nut-popup-left.nut-popup-round{border-radius:0 var(--nutui-popup-border-radius, 24px) var(--nutui-popup-border-radius, 24px) 0}.nut-popup-top{top:0;left:0;width:100%}.nut-popup-top.nut-popup-round{border-radius:0 0 var(--nutui-popup-border-radius, 24px) var(--nutui-popup-border-radius, 24px)}@keyframes popup-scale-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes popup-scale-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}.nut-popup-slide-default-enter-active{animation-fill-mode:both;animation-name:popup-scale-fade-in;animation-duration:var(--nutui-popup-animation-duration, .3s)}.nut-popup-slide-default-exit-active{animation-fill-mode:both;animation-name:popup-scale-fade-out;animation-duration:var(--nutui-popup-animation-duration, .3s)}@keyframes popup-fade-in{0%{opacity:0}to{opacity:1}}@keyframes popup-fade-out{0%{opacity:1}to{opacity:0}}.nut-popup-slide-center-enter-active{animation-fill-mode:both;animation-name:popup-fade-in;animation-duration:var(--nutui-popup-animation-duration, .3s)}.nut-popup-slide-center-exit-active{animation-fill-mode:both;animation-name:popup-fade-out;animation-duration:var(--nutui-popup-animation-duration, .3s)}@keyframes popup-slide-top-enter{0%{transform:translate3d(0,-100%,0)}}@keyframes popup-slide-top-exit{to{transform:translate3d(0,-100%,0)}}.nut-popup-slide-top-enter-active,.nut-popup-slide-top-appear-active{transform:translateZ(0);animation-fill-mode:both;animation-name:popup-slide-top-enter;animation-duration:var(--nutui-popup-animation-duration, .3s)}.nut-popup-slide-top-exit-active{animation-fill-mode:both;animation-name:popup-slide-top-exit;animation-duration:var(--nutui-popup-animation-duration, .3s)}@keyframes popup-slide-right-enter{0%{transform:translate3d(100%,0,0)}}@keyframes popup-slide-right-exit{to{transform:translate3d(100%,0,0)}}.nut-popup-slide-right-enter-active,.nut-popup-slide-right-appear-active{transform:translateZ(0);animation-fill-mode:both;animation-name:popup-slide-right-enter;animation-duration:var(--nutui-popup-animation-duration, .3s)}.nut-popup-slide-right-exit{animation-fill-mode:both;animation-name:popup-slide-right-exit;animation-duration:var(--nutui-popup-animation-duration, .3s)}@keyframes popup-slide-bottom-enter{0%{transform:translate3d(0,100%,0)}}@keyframes slide-bottom-exit{to{transform:translate3d(0,100%,0)}}.nut-popup-slide-bottom-enter-active,.nut-popup-slide-bottom-appear-active{transform:translate(0);animation-fill-mode:both;animation-name:popup-slide-bottom-enter;animation-duration:var(--nutui-popup-animation-duration, .3s)}.nut-popup-slide-bottom-exit{animation-fill-mode:both;animation-name:slide-bottom-exit;animation-duration:var(--nutui-popup-animation-duration, .3s)}@keyframes popup-slide-left-enter{0%{transform:translate3d(-100%,0,0)}}@keyframes popup-slide-left-exit{to{transform:translate3d(-100%,0,0)}}.nut-popup-slide-left-enter-active,.nut-popup-slide-left-appear-active{transform:translate(0);animation-fill-mode:both;animation-name:popup-slide-left-enter;animation-duration:var(--nutui-popup-animation-duration, .3s)}.nut-popup-slide-left-exit-active,.nut-popup-slide-left-exit-done{animation-fill-mode:both;animation-name:popup-slide-left-exit;animation-duration:var(--nutui-popup-animation-duration, .3s)}.nut-popup-slide-default-exit-done.nut-popup,.nut-popup-slide-center-exit-done.nut-popup,.nut-popup-slide-left-exit-done.nut-popup,.nut-popup-slide-right-exit-done.nut-popup,.nut-popup-slide-top-exit-done.nut-popup,.nut-popup-slide-bottom-exit-done.nut-popup{display:none}.nut-popup .nut-overflow-hidden{overflow:hidden!important}[dir=rtl] .nut-popup-title-left,.nut-rtl .nut-popup-title-left{left:auto;right:var(--nutui-popup-title-padding, 16px)}[dir=rtl] .nut-popup-title-right,.nut-rtl .nut-popup-title-right{right:auto;left:var(--nutui-popup-title-padding, 16px)}[dir=rtl] .nut-popup-title-right-top-left,.nut-rtl .nut-popup-title-right-top-left,[dir=rtl] .nut-popup-title-right-bottom-left,.nut-rtl .nut-popup-title-right-bottom-left{left:auto;right:var(--nutui-popup-title-padding, 16px)}[dir=rtl] .nut-popup-title-right-bottom-right,.nut-rtl .nut-popup-title-right-bottom-right{right:auto;left:var(--nutui-popup-title-padding, 16px)}[dir=rtl] .nut-popup-title .nut-icon-ArrowLeft,.nut-rtl .nut-popup-title .nut-icon-ArrowLeft{transform:rotate(180deg)}[dir=rtl] .nut-popup-center,.nut-rtl .nut-popup-center{left:auto;right:50%;transform:translate(50%,-50%)}[dir=rtl] .nut-popup-bottom,.nut-rtl .nut-popup-bottom,[dir=rtl] .nut-popup-top,.nut-rtl .nut-popup-top{left:auto;right:0}.nut-popover{position:absolute;display:inline-block;word-break:normal}.nut-popover-arrow{position:absolute;width:0;height:0;border:8px solid transparent}.nut-popover-arrow-top{bottom:0;border-top-color:var(--nutui-popover-border-color, #ffffff);border-bottom-width:0;margin-bottom:-8px}.nut-popover-arrow-bottom{top:0;border-bottom-color:var(--nutui-popover-border-color, #ffffff);border-top-width:0;margin-top:-8px}.nut-popover-arrow-left{right:0;border-left-color:var(--nutui-popover-border-color, #ffffff);border-right-width:0;margin-right:-8px}.nut-popover-arrow-left.nut-popover-arrow-left{top:50%;transform:translateY(-50%)}.nut-popover-arrow-left.nut-popover-arrow-left-start{top:16px;transform:translateY(0)}.nut-popover-arrow-left.nut-popover-arrow-left-end{bottom:16px;transform:translateY(0)}.nut-popover-arrow-right{left:0;border-right-color:var(--nutui-popover-border-color, #ffffff);border-left-width:0;margin-left:-8px}.nut-popover-arrow-right.nut-popover-arrow-right{top:50%;transform:translateY(-50%)}.nut-popover-arrow-right.nut-popover-arrow-right-start{top:16px;transform:translateY(0)}.nut-popover-arrow-right.nut-popover-arrow-right-end{bottom:16px;transform:translateY(0)}.nut-popover .nut-popover-content{position:absolute;background-color:var(--nutui-popover-content-background-color, #ffffff);border-radius:var(--nutui-popover-border-radius, 8px);font-size:var(--nutui-popover-font-size, var(--nutui-font-size-2, 12px));font-family:PingFangSC;font-weight:400;color:var(--nutui-popover-text-color, #1a1a1a);box-shadow:0 2px 12px #3232331f;max-height:initial;overflow-y:initial}.nut-popover .nut-popover-content-group{display:block;height:100%;width:100%}.nut-popover .nut-popover-content .nut-popover-menu-item{position:relative;display:flex;align-items:center;justify-content:center;padding:var(--nutui-popover-menu-item-padding, 8px);border-bottom:1px solid var(--nutui-popover-divider-color, var(--nutui-black-3, rgba(0, 0, 0, .06)))}.nut-popover .nut-popover-content .nut-popover-menu-item:last-child{margin-bottom:0;border-bottom:none}.nut-popover .nut-popover-content .nut-popover-menu-item:hover:nth-of-type(2){border-radius:8px 8px 0 0}.nut-popover .nut-popover-content .nut-popover-menu-item:hover:last-of-type{border-radius:0 0 8px 8px}.nut-popover .nut-popover-content .nut-popover-menu-item-icon{display:flex;justify-content:center;align-items:center;width:12px;height:12px;font-size:12px}.nut-popover .nut-popover-content .nut-popover-menu-item-icon .nut-icon{width:12px;height:12px;font-size:12px}.nut-popover .nut-popover-content .nut-popover-menu-item-name{width:100%;word-break:keep-all;margin:0 6px 0 4px}.nut-popover .nut-popover-content .nut-popover-menu-item-action-icon{display:flex;justify-content:center;align-items:center;width:12px;height:12px;font-size:12px;color:var(--nutui-gray-6, #595959)}.nut-popover .nut-popover-content .nut-popover-menu-item.nut-popover-menu-disabled{color:var(--nutui-popover-disable-color, var(--nutui-color-text-disabled, #bfbfbf));cursor:not-allowed}.nut-popover .nut-popover-content .nut-popover-menu-item.nut-popover-menu-taroitem{display:flex}.nut-popover .nut-popover-content-top .nut-popover-arrow-top{left:50%;transform:translate(-50%)}.nut-popover .nut-popover-content-top-end{right:0}.nut-popover .nut-popover-content-top-end .nut-popover-arrow-top-end{right:16px;transform:translate(0)}.nut-popover .nut-popover-content-top-start{left:0}.nut-popover .nut-popover-content-top-start .nut-popover-arrow-top-start{left:16px;transform:translate(0)}.nut-popover .nut-popover-content-bottom .nut-popover-arrow-bottom{left:50%;transform:translate(-50%)}.nut-popover .nut-popover-content-bottom-end{right:0}.nut-popover .nut-popover-content-bottom-end .nut-popover-arrow-bottom-end{right:16px;transform:translate(0)}.nut-popover .nut-popover-content-bottom-start{left:0}.nut-popover .nut-popover-content-bottom-start .nut-popover-arrow-bottom-start{left:16px;transform:translate(0)}.nut-popover .nut-popover-content-left-end{bottom:0}.nut-popover .nut-popover-content-left-start{top:0}.nut-popover .nut-popover-content-right-end{bottom:0}.nut-popover .nut-popover-content-right-start{top:0}.nut-popover-dark{background:var(--nutui-popover-text-color, #1a1a1a);color:var(--nutui-popover-content-background-color, #ffffff)}.nut-popover-dark .nut-popover-arrow{border-bottom-color:var(--nutui-popover-text-color, #1a1a1a)}.nut-popover-dark .nut-popover-content{background:var(--nutui-popover-text-color, #1a1a1a)!important;color:var(--nutui-popover-content-background-color, #ffffff)!important}.nut-popover-dark .nut-popover-content .nut-popover-menu-item{border-bottom-color:var(--nutui-popover-content-background-color, #ffffff)}.nut-popover-dark .nut-popover-content .nut-popover-menu-item:hover{color:var(--nutui-popover-content-background-color, #ffffff);background-color:var(--nutui-popover-text-color, #1a1a1a)}[dir=rtl] .nut-popover-arrow-left,.nut-rtl .nut-popover-arrow-left{right:auto;left:0;border-left-color:currentcolor;border-right-color:var(--nutui-popover-border-color, #ffffff);border-right-width:medium;border-left-width:0;margin-right:0;margin-left:-8px}[dir=rtl] .nut-popover-arrow-right,.nut-rtl .nut-popover-arrow-right{left:auto;right:0;border-right-color:currentcolor;border-left-color:var(--nutui-popover-border-color, #ffffff);border-left-width:medium;border-right-width:0;margin-left:0;margin-right:-8px}[dir=rtl] .nut-popover .nut-popover-content .nut-popover-menu-item-name,.nut-rtl .nut-popover .nut-popover-content .nut-popover-menu-item-name{margin-left:0;margin-right:4px}[dir=rtl] .nut-popover .nut-popover-content .nut-popover-menu-item-action-icon,.nut-rtl .nut-popover .nut-popover-content .nut-popover-menu-item-action-icon{right:auto;left:var(--nutui-popover-menu-item-padding, 8px)}[dir=rtl] .nut-popover .nut-popover-content-top .nut-popover-arrow-top,.nut-rtl .nut-popover .nut-popover-content-top .nut-popover-arrow-top{left:auto;right:50%;transform:translate(50%)}[dir=rtl] .nut-popover .nut-popover-content-top-end,.nut-rtl .nut-popover .nut-popover-content-top-end{right:auto;left:0}[dir=rtl] .nut-popover .nut-popover-content-top-end .nut-popover-arrow-top-end,.nut-rtl .nut-popover .nut-popover-content-top-end .nut-popover-arrow-top-end{right:auto;left:16px}[dir=rtl] .nut-popover .nut-popover-content-top-start,.nut-rtl .nut-popover .nut-popover-content-top-start{left:auto;right:0}[dir=rtl] .nut-popover .nut-popover-content-top-start .nut-popover-arrow-top-start,.nut-rtl .nut-popover .nut-popover-content-top-start .nut-popover-arrow-top-start{left:auto;right:16px}[dir=rtl] .nut-popover .nut-popover-content-bottom .nut-popover-arrow-bottom,.nut-rtl .nut-popover .nut-popover-content-bottom .nut-popover-arrow-bottom{left:auto;right:50%;transform:translate(50%)}[dir=rtl] .nut-popover .nut-popover-content-bottom-end,.nut-rtl .nut-popover .nut-popover-content-bottom-end{right:auto;left:0}[dir=rtl] .nut-popover .nut-popover-content-bottom-end .nut-popover-arrow-bottom-end,.nut-rtl .nut-popover .nut-popover-content-bottom-end .nut-popover-arrow-bottom-end{right:auto;left:16px}[dir=rtl] .nut-popover .nut-popover-content-bottom-start,.nut-rtl .nut-popover .nut-popover-content-bottom-start{left:auto;right:0}[dir=rtl] .nut-popover .nut-popover-content-bottom-start .nut-popover-arrow-bottom-start,.nut-rtl .nut-popover .nut-popover-content-bottom-start .nut-popover-arrow-bottom-start{left:auto;right:16px}.nut-popover-enter-from,.nut-popover-leave-active{transform:scale(.8);opacity:0}.nut-popover-enter-active{transition-timing-function:ease-out}.nut-popover-leave-active{transition-timing-function:ease-in}.nut-popover-content-bg{position:fixed;height:100%;width:100%;top:0;left:0;background:transparent;z-index:999}[dir=rtl] .nut-popover-content-bg,.nut-rtl .nut-popover-content-bg{left:auto;right:0}.nut-popover-wrapper{display:inline-block}.nut-popover-content-copy{position:absolute;top:-99999px}.nut-tour-mask{position:fixed;box-shadow:0 0 0 150vh var(--nutui-black-10, rgba(0, 0, 0, .7));border-radius:var(--nutui-tour-mask-border-radius, 10px);z-index:999}.nut-tour-mask-none{box-shadow:none}.nut-tour-mask-hidden{opacity:0}.nut-tour-content{display:block;padding:var(--nutui-tour-content-padding, 10px 12px);min-width:var(--nutui-tour-content-min-width, 200px);box-sizing:content-box}.nut-tour-content-top{display:block;text-align:end}.nut-tour-content-top-close{--nut-icon-width: 10px;--nut-icon-height: 10px}.nut-tour-content-inner{margin:var(--nutui-tour-content-inner-margin, 10px 0px);font-size:var(--nutui-tour-content-inner-font-size, 14px);white-space:nowrap}.nut-tour-content-bottom{margin-top:var(--nutui-tour-content-bottom-margin-top, 10px);display:flex;justify-content:space-between}.nut-tour-content-bottom-operate{display:flex;justify-content:flex-end}.nut-tour-content-bottom-operate-btn{display:inline-block;border:1px solid var(--nutui-color-text-disabled, #bfbfbf);margin-left:var(--nutui-tour-content-bottom-btn-margin-left, 4px);padding:var(--nutui-tour-content-bottom-btn-padding, 2px 4px);font-size:var(--nutui-tour-content-bottom-btn-font-size, 12px);border-radius:var(--nutui-tour-content-bottom-btn-border-radius, 4px);color:var(--nutui-gray-6, #595959);cursor:pointer}.nut-tour-content-bottom-operate-btn.active{color:#fff;border:0;background:var(--nutui-color-primary, #fa2c19)}.nut-tour-content-tile .nut-tour-content-inner{margin:0}.nut-tour-masked{position:fixed;width:100vh;height:100vh;z-index:1000;top:0;left:0;background:transparent}[dir=rtl] .nut-tour-content-bottom-operate-btn,.nut-rtl .nut-tour-content-bottom-operate-btn{margin-left:0;margin-right:var(--nutui-tour-content-bottom-btn-margin-left, 4px)}[dir=rtl] .nut-tour-masked,.nut-rtl .nut-tour-masked{left:auto;right:0}
|
|
1
|
+
.nut-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--nutui-overlay-bg-color, var(--nutui-black-10, rgba(0, 0, 0, .7)));z-index:var(--nutui-overlay-zIndex, 1000)}.nut-overlay .wrapper .content{background-color:var(--nutui-overlay-content-bg-color, var(--nutui-gray-1, #ffffff));color:var(--nutui-overlay-content-color, var(--nutui-gray-7, #1a1a1a))}[dir=rtl] .nut-overlay,.nut-rtl .nut-overlay{left:auto;right:0}.nut-overflow-hidden,.nut-overflow-hidden .taro_page{overflow:hidden!important}@keyframes nut-fade-in{0%{opacity:0}1%{opacity:0}to{opacity:1}}@keyframes nut-fade-out{0%{opacity:1}1%{opacity:1}to{opacity:0}}.nut-overlay-slide-enter-active,.nut-overlay-slide-appear-active{animation-fill-mode:both;animation-name:nut-fade-in;animation-duration:var(--nutui-overlay-animation-duration, .3s)}.nut-overlay-slide-exit-active{animation-fill-mode:both;animation-name:nut-fade-out;animation-duration:var(--nutui-overlay-animation-duration, .3s)}.nut-popup{position:fixed;min-height:26%;max-height:100%;overflow-y:auto;background-color:var(--nutui-overlay-content-bg-color, var(--nutui-gray-1, #ffffff));color:var(--nutui-gray-7, #1a1a1a);-webkit-overflow-scrolling:touch;font-size:var(--nutui-font-size-3, 14px)}.nut-popup-title{display:flex;align-items:center;justify-content:center;border-bottom:var(--nutui-popup-title-border-bottom, 0);padding:var(--nutui-popup-title-padding, 16px);position:relative}.nut-popup-title-left{position:absolute;left:var(--nutui-popup-title-padding, 16px)}.nut-popup-title-title{font-weight:var(--nutui-font-weight-bold, 500);font-size:var(--nutui-popup-title-font-size, var(--nutui-font-size-5, 18px))}.nut-popup-title-description{color:var(--nutui-gray-5, #8c8c8c);font-size:var(--nutui-popup-description-font-size, var(--nutui-font-size-1, 10px));font-weight:var(--nutui-font-weight, 400)}.nut-popup-title-right{position:absolute!important;z-index:1;cursor:pointer;width:var(--nutui-popup-icon-size, var(--nutui-font-size-5, 18px));height:var(--nutui-popup-icon-size, var(--nutui-font-size-5, 18px));display:flex;justify-content:center;align-items:center;top:var(--nutui-popup-title-padding, 16px);right:var(--nutui-popup-title-padding, 16px);color:var(--nutui-gray-5, #8c8c8c)}.nut-popup-title-right:active{opacity:.7}.nut-popup-title-right-top-left{top:var(--nutui-popup-title-padding, 16px);left:var(--nutui-popup-title-padding, 16px)}.nut-popup-title-right-bottom-left{bottom:var(--nutui-popup-title-padding, 16px);left:var(--nutui-popup-title-padding, 16px)}.nut-popup-title-right-bottom-right{right:var(--nutui-popup-title-padding, 16px);bottom:var(--nutui-popup-title-padding, 16px)}.nut-popup-center{top:50%;left:50%;min-height:10%;transform:translate(-50%,-50%)}.nut-popup-center.nut-popup-round{border-radius:var(--nutui-popup-border-radius, 24px)}.nut-popup-bottom,.nut-popup-top{max-height:83%}.nut-popup-bottom{bottom:0;left:0;width:100%}.nut-popup-bottom.nut-popup-round{border-radius:var(--nutui-popup-border-radius, 24px) var(--nutui-popup-border-radius, 24px) 0 0}.nut-popup-right{top:0;right:0}.nut-popup-right.nut-popup-round{border-radius:var(--nutui-popup-border-radius, 24px) 0 0 var(--nutui-popup-border-radius, 24px)}.nut-popup-left{top:0;left:0}.nut-popup-left.nut-popup-round{border-radius:0 var(--nutui-popup-border-radius, 24px) var(--nutui-popup-border-radius, 24px) 0}.nut-popup-top{top:0;left:0;width:100%}.nut-popup-top.nut-popup-round{border-radius:0 0 var(--nutui-popup-border-radius, 24px) var(--nutui-popup-border-radius, 24px)}@keyframes popup-scale-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes popup-scale-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}.nut-popup-slide-default-enter-active{animation-fill-mode:both;animation-name:popup-scale-fade-in;animation-duration:var(--nutui-popup-animation-duration, .3s)}.nut-popup-slide-default-exit-active{animation-fill-mode:both;animation-name:popup-scale-fade-out;animation-duration:var(--nutui-popup-animation-duration, .3s)}@keyframes popup-fade-in{0%{opacity:0}to{opacity:1}}@keyframes popup-fade-out{0%{opacity:1}to{opacity:0}}.nut-popup-slide-center-enter-active{animation-fill-mode:both;animation-name:popup-fade-in;animation-duration:var(--nutui-popup-animation-duration, .3s)}.nut-popup-slide-center-exit-active{animation-fill-mode:both;animation-name:popup-fade-out;animation-duration:var(--nutui-popup-animation-duration, .3s)}@keyframes popup-slide-top-enter{0%{transform:translate3d(0,-100%,0)}}@keyframes popup-slide-top-exit{to{transform:translate3d(0,-100%,0)}}.nut-popup-slide-top-enter-active,.nut-popup-slide-top-appear-active{transform:translateZ(0);animation-fill-mode:both;animation-name:popup-slide-top-enter;animation-duration:var(--nutui-popup-animation-duration, .3s)}.nut-popup-slide-top-exit-active{animation-fill-mode:both;animation-name:popup-slide-top-exit;animation-duration:var(--nutui-popup-animation-duration, .3s)}@keyframes popup-slide-right-enter{0%{transform:translate3d(100%,0,0)}}@keyframes popup-slide-right-exit{to{transform:translate3d(100%,0,0)}}.nut-popup-slide-right-enter-active,.nut-popup-slide-right-appear-active{transform:translateZ(0);animation-fill-mode:both;animation-name:popup-slide-right-enter;animation-duration:var(--nutui-popup-animation-duration, .3s)}.nut-popup-slide-right-exit{animation-fill-mode:both;animation-name:popup-slide-right-exit;animation-duration:var(--nutui-popup-animation-duration, .3s)}@keyframes popup-slide-bottom-enter{0%{transform:translate3d(0,100%,0)}}@keyframes slide-bottom-exit{to{transform:translate3d(0,100%,0)}}.nut-popup-slide-bottom-enter-active,.nut-popup-slide-bottom-appear-active{transform:translate(0);animation-fill-mode:both;animation-name:popup-slide-bottom-enter;animation-duration:var(--nutui-popup-animation-duration, .3s)}.nut-popup-slide-bottom-exit{animation-fill-mode:both;animation-name:slide-bottom-exit;animation-duration:var(--nutui-popup-animation-duration, .3s)}@keyframes popup-slide-left-enter{0%{transform:translate3d(-100%,0,0)}}@keyframes popup-slide-left-exit{to{transform:translate3d(-100%,0,0)}}.nut-popup-slide-left-enter-active,.nut-popup-slide-left-appear-active{transform:translate(0);animation-fill-mode:both;animation-name:popup-slide-left-enter;animation-duration:var(--nutui-popup-animation-duration, .3s)}.nut-popup-slide-left-exit-active,.nut-popup-slide-left-exit-done{animation-fill-mode:both;animation-name:popup-slide-left-exit;animation-duration:var(--nutui-popup-animation-duration, .3s)}.nut-popup-slide-default-exit-done.nut-popup,.nut-popup-slide-center-exit-done.nut-popup,.nut-popup-slide-left-exit-done.nut-popup,.nut-popup-slide-right-exit-done.nut-popup,.nut-popup-slide-top-exit-done.nut-popup,.nut-popup-slide-bottom-exit-done.nut-popup{display:none}.nut-popup .nut-overflow-hidden{overflow:hidden!important}[dir=rtl] .nut-popup-title-left,.nut-rtl .nut-popup-title-left{left:auto;right:var(--nutui-popup-title-padding, 16px)}[dir=rtl] .nut-popup-title-right,.nut-rtl .nut-popup-title-right{right:auto;left:var(--nutui-popup-title-padding, 16px)}[dir=rtl] .nut-popup-title-right-top-left,.nut-rtl .nut-popup-title-right-top-left,[dir=rtl] .nut-popup-title-right-bottom-left,.nut-rtl .nut-popup-title-right-bottom-left{left:auto;right:var(--nutui-popup-title-padding, 16px)}[dir=rtl] .nut-popup-title-right-bottom-right,.nut-rtl .nut-popup-title-right-bottom-right{right:auto;left:var(--nutui-popup-title-padding, 16px)}[dir=rtl] .nut-popup-title .nut-icon-ArrowLeft,.nut-rtl .nut-popup-title .nut-icon-ArrowLeft{transform:rotate(180deg)}[dir=rtl] .nut-popup-center,.nut-rtl .nut-popup-center{left:auto;right:50%;transform:translate(50%,-50%)}[dir=rtl] .nut-popup-bottom,.nut-rtl .nut-popup-bottom,[dir=rtl] .nut-popup-top,.nut-rtl .nut-popup-top{left:auto;right:0}.nut-popover{position:absolute;display:inline-block;word-break:normal}.nut-popover-arrow{position:absolute;width:0;height:0;border:8px solid transparent}.nut-popover-arrow-top{bottom:0;border-top-color:var(--nutui-popover-border-color, #ffffff);border-bottom-width:0;margin-bottom:-8px}.nut-popover-arrow-bottom{top:0;border-bottom-color:var(--nutui-popover-border-color, #ffffff);border-top-width:0;margin-top:-8px}.nut-popover-arrow-left{right:0;border-left-color:var(--nutui-popover-border-color, #ffffff);border-right-width:0;margin-right:-8px}.nut-popover-arrow-left.nut-popover-arrow-left{top:50%;transform:translateY(-50%)}.nut-popover-arrow-left.nut-popover-arrow-left-start{top:16px;transform:translateY(0)}.nut-popover-arrow-left.nut-popover-arrow-left-end{bottom:16px;transform:translateY(0)}.nut-popover-arrow-right{left:0;border-right-color:var(--nutui-popover-border-color, #ffffff);border-left-width:0;margin-left:-8px}.nut-popover-arrow-right.nut-popover-arrow-right{top:50%;transform:translateY(-50%)}.nut-popover-arrow-right.nut-popover-arrow-right-start{top:16px;transform:translateY(0)}.nut-popover-arrow-right.nut-popover-arrow-right-end{bottom:16px;transform:translateY(0)}.nut-popover .nut-popover-content{position:absolute;background-color:var(--nutui-popover-content-background-color, #ffffff);border-radius:var(--nutui-popover-border-radius, 8px);font-size:var(--nutui-popover-font-size, var(--nutui-font-size-2, 12px));font-family:PingFangSC;font-weight:400;color:var(--nutui-popover-text-color, #1a1a1a);box-shadow:0 2px 12px #3232331f;max-height:initial;overflow-y:initial}.nut-popover .nut-popover-content-group{display:block;height:100%;width:100%}.nut-popover .nut-popover-content .nut-popover-menu-item{position:relative;display:flex;align-items:center;justify-content:center;padding:var(--nutui-popover-menu-item-padding, 8px);border-bottom:1px solid var(--nutui-popover-divider-color, var(--nutui-black-3, rgba(0, 0, 0, .06)))}.nut-popover .nut-popover-content .nut-popover-menu-item:last-child{margin-bottom:0;border-bottom:none}.nut-popover .nut-popover-content .nut-popover-menu-item:hover:nth-of-type(2){border-radius:8px 8px 0 0}.nut-popover .nut-popover-content .nut-popover-menu-item:hover:last-of-type{border-radius:0 0 8px 8px}.nut-popover .nut-popover-content .nut-popover-menu-item-icon{display:flex;justify-content:center;align-items:center;width:12px;height:12px;font-size:12px}.nut-popover .nut-popover-content .nut-popover-menu-item-icon .nut-icon{width:12px;height:12px;font-size:12px}.nut-popover .nut-popover-content .nut-popover-menu-item-name{width:100%;word-break:keep-all;margin:0 6px 0 4px}.nut-popover .nut-popover-content .nut-popover-menu-item-action-icon{display:flex;justify-content:center;align-items:center;width:12px;height:12px;font-size:12px;color:var(--nutui-gray-6, #595959)}.nut-popover .nut-popover-content .nut-popover-menu-item.nut-popover-menu-disabled{color:var(--nutui-popover-disable-color, var(--nutui-color-text-disabled, #bfbfbf));cursor:not-allowed}.nut-popover .nut-popover-content .nut-popover-menu-item.nut-popover-menu-taroitem{display:flex}.nut-popover .nut-popover-content-top .nut-popover-arrow-top{left:50%;transform:translate(-50%)}.nut-popover .nut-popover-content-top-end{right:0}.nut-popover .nut-popover-content-top-end .nut-popover-arrow-top-end{right:16px;transform:translate(0)}.nut-popover .nut-popover-content-top-start{left:0}.nut-popover .nut-popover-content-top-start .nut-popover-arrow-top-start{left:16px;transform:translate(0)}.nut-popover .nut-popover-content-bottom .nut-popover-arrow-bottom{left:50%;transform:translate(-50%)}.nut-popover .nut-popover-content-bottom-end{right:0}.nut-popover .nut-popover-content-bottom-end .nut-popover-arrow-bottom-end{right:16px;transform:translate(0)}.nut-popover .nut-popover-content-bottom-start{left:0}.nut-popover .nut-popover-content-bottom-start .nut-popover-arrow-bottom-start{left:16px;transform:translate(0)}.nut-popover .nut-popover-content-left-end{bottom:0}.nut-popover .nut-popover-content-left-start{top:0}.nut-popover .nut-popover-content-right-end{bottom:0}.nut-popover .nut-popover-content-right-start{top:0}.nut-popover-dark{background:var(--nutui-popover-text-color, #1a1a1a);color:var(--nutui-popover-content-background-color, #ffffff)}.nut-popover-dark .nut-popover-arrow{border-bottom-color:var(--nutui-popover-text-color, #1a1a1a)}.nut-popover-dark .nut-popover-content{background:var(--nutui-popover-text-color, #1a1a1a)!important;color:var(--nutui-popover-content-background-color, #ffffff)!important}.nut-popover-dark .nut-popover-content .nut-popover-menu-item{border-bottom-color:var(--nutui-popover-content-background-color, #ffffff)}.nut-popover-dark .nut-popover-content .nut-popover-menu-item:hover{color:var(--nutui-popover-content-background-color, #ffffff);background-color:var(--nutui-popover-text-color, #1a1a1a)}[dir=rtl] .nut-popover .nut-popover-content .nut-popover-menu-item-name,.nut-rtl .nut-popover .nut-popover-content .nut-popover-menu-item-name{margin-left:0;margin-right:4px}[dir=rtl] .nut-popover .nut-popover-content .nut-popover-menu-item-action-icon,.nut-rtl .nut-popover .nut-popover-content .nut-popover-menu-item-action-icon{right:auto;left:var(--nutui-popover-menu-item-padding, 8px)}[dir=rtl] .nut-popover .nut-popover-content-top .nut-popover-arrow-top,.nut-rtl .nut-popover .nut-popover-content-top .nut-popover-arrow-top{left:auto;right:50%;transform:translate(50%)}[dir=rtl] .nut-popover .nut-popover-content-top-end,.nut-rtl .nut-popover .nut-popover-content-top-end{right:auto;left:0}[dir=rtl] .nut-popover .nut-popover-content-top-end .nut-popover-arrow-top-end,.nut-rtl .nut-popover .nut-popover-content-top-end .nut-popover-arrow-top-end{right:auto;left:16px}[dir=rtl] .nut-popover .nut-popover-content-top-start,.nut-rtl .nut-popover .nut-popover-content-top-start{left:auto;right:0}[dir=rtl] .nut-popover .nut-popover-content-top-start .nut-popover-arrow-top-start,.nut-rtl .nut-popover .nut-popover-content-top-start .nut-popover-arrow-top-start{left:auto;right:16px}[dir=rtl] .nut-popover .nut-popover-content-bottom .nut-popover-arrow-bottom,.nut-rtl .nut-popover .nut-popover-content-bottom .nut-popover-arrow-bottom{left:auto;right:50%;transform:translate(50%)}[dir=rtl] .nut-popover .nut-popover-content-bottom-end,.nut-rtl .nut-popover .nut-popover-content-bottom-end{right:auto;left:0}[dir=rtl] .nut-popover .nut-popover-content-bottom-end .nut-popover-arrow-bottom-end,.nut-rtl .nut-popover .nut-popover-content-bottom-end .nut-popover-arrow-bottom-end{right:auto;left:16px}[dir=rtl] .nut-popover .nut-popover-content-bottom-start,.nut-rtl .nut-popover .nut-popover-content-bottom-start{left:auto;right:0}[dir=rtl] .nut-popover .nut-popover-content-bottom-start .nut-popover-arrow-bottom-start,.nut-rtl .nut-popover .nut-popover-content-bottom-start .nut-popover-arrow-bottom-start{left:auto;right:16px}.nut-popover-enter-from,.nut-popover-leave-active{transform:scale(.8);opacity:0}.nut-popover-enter-active{transition-timing-function:ease-out}.nut-popover-leave-active{transition-timing-function:ease-in}.nut-popover-content-bg{position:fixed;height:100%;width:100%;top:0;left:0;background:transparent;z-index:999}[dir=rtl] .nut-popover-content-bg,.nut-rtl .nut-popover-content-bg{left:auto;right:0}.nut-popover-wrapper{display:inline-block}.nut-popover-content-copy{position:absolute;top:-99999px}.nut-tour-mask{position:fixed;box-shadow:0 0 0 150vh var(--nutui-black-10, rgba(0, 0, 0, .7));border-radius:var(--nutui-tour-mask-border-radius, 10px);z-index:999}.nut-tour-mask-none{box-shadow:none}.nut-tour-mask-hidden{opacity:0}.nut-tour-content{display:block;padding:var(--nutui-tour-content-padding, 10px 12px);min-width:var(--nutui-tour-content-min-width, 200px);box-sizing:content-box}.nut-tour-content-top{display:block;text-align:end}.nut-tour-content-top-close{--nut-icon-width: 10px;--nut-icon-height: 10px}.nut-tour-content-inner{margin:var(--nutui-tour-content-inner-margin, 10px 0px);font-size:var(--nutui-tour-content-inner-font-size, 14px);white-space:nowrap}.nut-tour-content-bottom{margin-top:var(--nutui-tour-content-bottom-margin-top, 10px);display:flex;justify-content:space-between}.nut-tour-content-bottom-operate{display:flex;justify-content:flex-end}.nut-tour-content-bottom-operate-btn{display:inline-block;border:1px solid var(--nutui-color-text-disabled, #bfbfbf);margin-left:var(--nutui-tour-content-bottom-btn-margin-left, 4px);padding:var(--nutui-tour-content-bottom-btn-padding, 2px 4px);font-size:var(--nutui-tour-content-bottom-btn-font-size, 12px);border-radius:var(--nutui-tour-content-bottom-btn-border-radius, 4px);color:var(--nutui-gray-6, #595959);cursor:pointer}.nut-tour-content-bottom-operate-btn.active{color:#fff;border:0;background:var(--nutui-color-primary, #fa2c19)}.nut-tour-content-tile .nut-tour-content-inner{margin:0}.nut-tour-masked{position:fixed;width:100vh;height:100vh;z-index:1000;top:0;left:0;background:transparent}[dir=rtl] .nut-tour-content-bottom-operate-btn,.nut-rtl .nut-tour-content-bottom-operate-btn{margin-left:0;margin-right:var(--nutui-tour-content-bottom-btn-margin-left, 4px)}[dir=rtl] .nut-tour-masked,.nut-rtl .nut-tour-masked{left:auto;right:0}
|
package/dist/esm/Tour.js
CHANGED
package/dist/esm/Uploader.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Check, Location, ArrowLeft } from "@nutui/icons-react-taro";
|
|
|
4
4
|
import { P as Popup } from "./popup.taro-Iy_WQZ-m.js";
|
|
5
5
|
import { ScrollView } from "@tarojs/components";
|
|
6
6
|
import { u as useConfig } from "./configprovider.taro-CyU_tvNJ.js";
|
|
7
|
-
import { C as Cascader } from "./cascader.taro-
|
|
7
|
+
import { C as Cascader } from "./cascader.taro-7Xhq98L4.js";
|
|
8
8
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
9
9
|
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
10
10
|
const defaultProps$2 = {
|
|
@@ -4,7 +4,7 @@ import classNames from "classnames";
|
|
|
4
4
|
import { Loading, Checklist } from "@nutui/icons-react-taro";
|
|
5
5
|
import { ScrollView } from "@tarojs/components";
|
|
6
6
|
import { P as Popup } from "./popup.taro-Iy_WQZ-m.js";
|
|
7
|
-
import { T as Tabs } from "./tabs.taro-
|
|
7
|
+
import { T as Tabs } from "./tabs.taro-A7pOK9IM.js";
|
|
8
8
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
9
9
|
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
10
10
|
const formatTree = (tree, parent, config) => tree.map((node) => {
|
|
@@ -125,8 +125,12 @@ const DatePicker = (props) => {
|
|
|
125
125
|
return result;
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
|
-
const
|
|
128
|
+
const compareDateChange = (currentDate, newDate) => {
|
|
129
129
|
var _a2;
|
|
130
|
+
const isEqual = ((_a2 = new Date(currentDate)) === null || _a2 === void 0 ? void 0 : _a2.getTime()) === (newDate === null || newDate === void 0 ? void 0 : newDate.getTime());
|
|
131
|
+
newDate && isDate(newDate) && !isEqual && setSelectedDate(formatValue(newDate));
|
|
132
|
+
};
|
|
133
|
+
const handlePickerChange = (selectedOptions, selectedValue, index) => {
|
|
130
134
|
const rangeType = type.toLocaleLowerCase();
|
|
131
135
|
if (["date", "datetime", "datehour", "month-day", "year-month"].includes(rangeType)) {
|
|
132
136
|
const formatDate = [];
|
|
@@ -150,8 +154,15 @@ const DatePicker = (props) => {
|
|
|
150
154
|
} else if (rangeType === "datehour") {
|
|
151
155
|
date = new Date(year, month, day, Number(formatDate[3]));
|
|
152
156
|
}
|
|
153
|
-
|
|
154
|
-
|
|
157
|
+
compareDateChange(selectedDate, date);
|
|
158
|
+
} else {
|
|
159
|
+
const [hour, minute, seconds] = selectedValue;
|
|
160
|
+
const currentDate = new Date(selectedDate);
|
|
161
|
+
const year = currentDate.getFullYear();
|
|
162
|
+
const month = currentDate.getMonth();
|
|
163
|
+
const day = currentDate.getDate();
|
|
164
|
+
const date = new Date(year, month, day, Number(hour), Number(minute), rangeType === "time" ? Number(seconds) : 0);
|
|
165
|
+
compareDateChange(selectedDate, date);
|
|
155
166
|
}
|
|
156
167
|
props.onChange && props.onChange(selectedOptions, selectedValue, index);
|
|
157
168
|
};
|
|
@@ -5,6 +5,7 @@ import classNames from "classnames";
|
|
|
5
5
|
import { View } from "@tarojs/components";
|
|
6
6
|
import { g as getRectByTaro } from "./get-rect-by-taro-CSN0TGnD.js";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
8
|
+
import { a as useRtl } from "./configprovider.taro-CyU_tvNJ.js";
|
|
8
9
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { content: "", direction: "end", rows: 1, expandText: "", collapseText: "", symbol: "...", lineHeight: "20", width: "auto" });
|
|
9
10
|
const classPrefix = `nut-ellipsis`;
|
|
10
11
|
const Ellipsis = (props) => {
|
|
@@ -32,7 +33,11 @@ const Ellipsis = (props) => {
|
|
|
32
33
|
const digitReg = /^[0-9]+$/;
|
|
33
34
|
const letterUpperReg = /^[A-Z]+$/;
|
|
34
35
|
const letterLowerReg = /^[a-z]+$/;
|
|
35
|
-
const
|
|
36
|
+
const rtl = useRtl();
|
|
37
|
+
const rtlClasses = classNames({
|
|
38
|
+
[`${classPrefix}-rtl`]: rtl
|
|
39
|
+
});
|
|
40
|
+
const classes = classNames(classPrefix, width ? `${classPrefix}-width` : "", rtlClasses, className);
|
|
36
41
|
useEffect(() => {
|
|
37
42
|
setContentCopy(content);
|
|
38
43
|
nextTick(() => {
|
|
@@ -218,13 +223,17 @@ const Ellipsis = (props) => {
|
|
|
218
223
|
exceeded && expanded ? React__default.createElement(
|
|
219
224
|
React__default.Fragment,
|
|
220
225
|
null,
|
|
221
|
-
React__default.createElement(
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
React__default.createElement(
|
|
227
|
+
View,
|
|
228
|
+
{ style: {
|
|
229
|
+
width: `${!Number.isNaN(Number(width)) ? `${width}px` : "auto"}`
|
|
230
|
+
} },
|
|
231
|
+
content,
|
|
232
|
+
expandText ? React__default.createElement("span", { className: "nut-ellipsis-text", onClick: (e) => {
|
|
233
|
+
e.stopPropagation();
|
|
234
|
+
clickHandle(2);
|
|
235
|
+
} }, collapseText) : null
|
|
236
|
+
)
|
|
228
237
|
) : null
|
|
229
238
|
)
|
|
230
239
|
),
|
|
@@ -3,7 +3,7 @@ import React__default, { forwardRef, useRef, useState, useImperativeHandle, useC
|
|
|
3
3
|
import { View, Input as Input$1 } from "@tarojs/components";
|
|
4
4
|
import { MaskClose } from "@nutui/icons-react-taro";
|
|
5
5
|
import Taro, { getEnv, ENV_TYPE } from "@tarojs/taro";
|
|
6
|
-
import { u as useConfig } from "./configprovider.taro-CyU_tvNJ.js";
|
|
6
|
+
import { a as useRtl, u as useConfig } from "./configprovider.taro-CyU_tvNJ.js";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
8
8
|
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
9
9
|
function trimExtraChar(value, char, regExp) {
|
|
@@ -32,6 +32,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
32
32
|
}
|
|
33
33
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { type: "text", name: "", placeholder: "", confirmType: "done", align: "left", required: false, disabled: false, readOnly: false, maxLength: 9999, clearable: false, clearIcon: null, formatTrigger: "onChange", autoFocus: false });
|
|
34
34
|
const Input = forwardRef((props, ref) => {
|
|
35
|
+
const rtl = useRtl();
|
|
35
36
|
const { locale } = useConfig();
|
|
36
37
|
const _a = Object.assign(Object.assign({}, defaultProps), props), { type, name, placeholder, align, disabled, readOnly, maxLength, clearable, clearIcon, formatTrigger, autoFocus, style, className, onChange, onFocus, onBlur, onClear, formatter, onClick, confirmType, defaultValue, value: _value } = _a, rest = __rest(_a, ["type", "name", "placeholder", "align", "disabled", "readOnly", "maxLength", "clearable", "clearIcon", "formatTrigger", "autoFocus", "style", "className", "onChange", "onFocus", "onBlur", "onClear", "formatter", "onClick", "confirmType", "defaultValue", "value"]);
|
|
37
38
|
const [value, setValue] = usePropsValue({
|
|
@@ -129,8 +130,14 @@ const Input = forwardRef((props, ref) => {
|
|
|
129
130
|
onClick && onClick(e);
|
|
130
131
|
} },
|
|
131
132
|
React__default.createElement(Input$1, Object.assign({}, rest, { name, className: "nut-input-native", ref: inputRef, style: {
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
// eslint-disable-next-line no-nested-ternary
|
|
134
|
+
textAlign: rtl ? (
|
|
135
|
+
// eslint-disable-next-line no-nested-ternary
|
|
136
|
+
align === "right" ? (
|
|
137
|
+
// eslint-disable-next-line no-nested-ternary
|
|
138
|
+
"left"
|
|
139
|
+
) : align === "left" ? "right" : "center"
|
|
140
|
+
) : align
|
|
134
141
|
}, type: inputType(type), password: type === "password", maxlength: maxLength, placeholder: placeholder || locale.placeholder, disabled: disabled || readOnly, value, focus: autoFocus, confirmType, onBlur: handleBlur, onFocus: handleFocus, onInput: (e) => {
|
|
135
142
|
handleInput(e.currentTarget.value);
|
|
136
143
|
} })),
|
|
@@ -23,17 +23,17 @@ import { S as S6 } from "./subsidenavbar.taro-ByxYpgfP.js";
|
|
|
23
23
|
import { T } from "./tabbar.taro-CVp3ZaqP.js";
|
|
24
24
|
import { T as T2 } from "./tabbaritem.taro-C_90fvMh.js";
|
|
25
25
|
import { T as T3 } from "./tabpane.taro-BAe86j3t.js";
|
|
26
|
-
import { T as T4 } from "./tabs.taro-
|
|
27
|
-
import { A } from "./address.taro-
|
|
26
|
+
import { T as T4 } from "./tabs.taro-A7pOK9IM.js";
|
|
27
|
+
import { A } from "./address.taro-CQmN9x1W.js";
|
|
28
28
|
import { C as C5 } from "./calendar.taro-DbHJEx4G.js";
|
|
29
29
|
import { C as C6 } from "./calendaritem.taro-B8tN2DYa.js";
|
|
30
|
-
import { C as C7 } from "./calendarcard.taro-
|
|
31
|
-
import { C as C8 } from "./cascader.taro-
|
|
30
|
+
import { C as C7 } from "./calendarcard.taro-C7P3oqAL.js";
|
|
31
|
+
import { C as C8 } from "./cascader.taro-7Xhq98L4.js";
|
|
32
32
|
import { C as C9, a as a2 } from "./checkbox.taro-CUpF7Afr.js";
|
|
33
|
-
import { D as D2 } from "./datepicker.taro-
|
|
33
|
+
import { D as D2 } from "./datepicker.taro-FiLalMAA.js";
|
|
34
34
|
import { default as default2 } from "./Form.js";
|
|
35
35
|
import { F as F2 } from "./formitem.taro-Brz5dj_8.js";
|
|
36
|
-
import { I as I2 } from "./input.taro-
|
|
36
|
+
import { I as I2 } from "./input.taro-Dh6zXTLQ.js";
|
|
37
37
|
import { I as I3 } from "./inputnumber.taro-CQiAPZgS.js";
|
|
38
38
|
import { M } from "./menu.taro-BAiJPGR7.js";
|
|
39
39
|
import { M as M2 } from "./menuitem.taro-oLv6ZYC5.js";
|
|
@@ -47,7 +47,7 @@ import { S as S8 } from "./shortpassword.taro-BXsxku33.js";
|
|
|
47
47
|
import { S as S9 } from "./signature.taro-KPm_xs66.js";
|
|
48
48
|
import { S as S10 } from "./switch.taro-D1HgJoJz.js";
|
|
49
49
|
import { T as T5 } from "./textarea.taro-BJIFCpKb.js";
|
|
50
|
-
import { U } from "./uploader.taro-
|
|
50
|
+
import { U } from "./uploader.taro-DMmTl0Cp.js";
|
|
51
51
|
import { A as A2 } from "./actionsheet.taro-C5BqWoML.js";
|
|
52
52
|
import { B as B3 } from "./badge.taro-B0spW6jr.js";
|
|
53
53
|
import { B as B4 } from "./dialog.taro-B8Usf0kl.js";
|
|
@@ -57,7 +57,7 @@ import { I as I4 } from "./infiniteloading.taro-WiMpG-fU.js";
|
|
|
57
57
|
import { L as L2 } from "./loading.taro-CRF1z5wQ.js";
|
|
58
58
|
import { N as N3 } from "./noticebar.taro-BtudzdMD.js";
|
|
59
59
|
import { N as N4 } from "./notify.taro-jP7y9zMU.js";
|
|
60
|
-
import { P as P2 } from "./popover.taro-
|
|
60
|
+
import { P as P2 } from "./popover.taro-BG0msyw5.js";
|
|
61
61
|
import { P as P3 } from "./popup.taro-Iy_WQZ-m.js";
|
|
62
62
|
import { P as P4 } from "./pulltorefresh.taro-DfVmOGuo.js";
|
|
63
63
|
import { S as S11 } from "./skeleton.taro-BwIDIf2p.js";
|
|
@@ -72,19 +72,19 @@ import { C as C10 } from "./circleprogress.taro-CKSrzt8Q.js";
|
|
|
72
72
|
import { C as C11 } from "./collapse.taro-BM0BsN30.js";
|
|
73
73
|
import { C as C12 } from "./collapseitem.taro-D_m4VEdG.js";
|
|
74
74
|
import { C as C13 } from "./countdown.taro-wopKr1Il.js";
|
|
75
|
-
import { E as E3 } from "./ellipsis.taro-
|
|
75
|
+
import { E as E3 } from "./ellipsis.taro-uVc3En9l.js";
|
|
76
76
|
import { I as I5 } from "./imagepreview.taro-Bb1TkBCV.js";
|
|
77
77
|
import { I as I6 } from "./indicator.taro-CpHZtD9p.js";
|
|
78
78
|
import { P as P5 } from "./pagination.taro-DAK6ddag.js";
|
|
79
79
|
import { P as P6 } from "./price.taro-UVRHPHRD.js";
|
|
80
|
-
import { P as P7 } from "./progress.taro-
|
|
80
|
+
import { P as P7 } from "./progress.taro-rjiPI6mD.js";
|
|
81
81
|
import { S as S13 } from "./step.taro-DLr2GzYk.js";
|
|
82
82
|
import { S as S14 } from "./steps.taro-C8Yg1Sns.js";
|
|
83
83
|
import { default as default4 } from "./Swiper.js";
|
|
84
84
|
import { S as S15 } from "./swiperitem.taro-8JXI24f0.js";
|
|
85
85
|
import { T as T7 } from "./table.taro-ClLmfqz3.js";
|
|
86
86
|
import { T as T8 } from "./tag.taro-rKMK0jan.js";
|
|
87
|
-
import { T as T9 } from "./tour.taro-
|
|
87
|
+
import { T as T9 } from "./tour.taro-BqlNfxdD.js";
|
|
88
88
|
import { V } from "./video.taro-DJQeroOH.js";
|
|
89
89
|
import { V as V2 } from "./virtuallist.taro-Cl08vfdg.js";
|
|
90
90
|
import { B as B5 } from "./barrage.taro-BNOcZsJ1.js";
|
|
@@ -5,12 +5,14 @@ import Taro, { createSelectorQuery } from "@tarojs/taro";
|
|
|
5
5
|
import { P as Popup } from "./popup.taro-Iy_WQZ-m.js";
|
|
6
6
|
import { a as getRect, g as getRectByTaro } from "./get-rect-by-taro-CSN0TGnD.js";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
8
|
+
import { a as useRtl } from "./configprovider.taro-CyU_tvNJ.js";
|
|
8
9
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { list: [], theme: "light", location: "bottom", visible: false, offset: [0, 12], arrowOffset: 0, targetId: "", className: "", showArrow: true, closeOnOutsideClick: true, closeOnActionClick: true, overlay: false, onClick: () => {
|
|
9
10
|
}, onOpen: () => {
|
|
10
11
|
}, onClose: () => {
|
|
11
12
|
} });
|
|
12
13
|
const classPrefix = `nut-popover`;
|
|
13
14
|
const Popover = (props) => {
|
|
15
|
+
const rtl = useRtl();
|
|
14
16
|
const _a = Object.assign(Object.assign({}, defaultProps), props), { children, list, theme, location, visible, offset, arrowOffset, targetId, overlay, closeOnOutsideClick, closeOnActionClick, className, showArrow, style, onClick, onOpen, onClose, onSelect } = _a, rest = __rest(_a, ["children", "list", "theme", "location", "visible", "offset", "arrowOffset", "targetId", "overlay", "closeOnOutsideClick", "closeOnActionClick", "className", "showArrow", "style", "onClick", "onOpen", "onClose", "onSelect"]);
|
|
15
17
|
const popoverRef = useRef(null);
|
|
16
18
|
const popoverContentRef = useRef(null);
|
|
@@ -42,9 +44,9 @@ const Popover = (props) => {
|
|
|
42
44
|
setRootPosition({
|
|
43
45
|
width: rect.width,
|
|
44
46
|
height: rect.height,
|
|
45
|
-
left: rect.left,
|
|
47
|
+
left: rtl ? rect.right : rect.left,
|
|
46
48
|
top: rect.top + distance,
|
|
47
|
-
right: rect.right
|
|
49
|
+
right: rtl ? rect.left : rect.right
|
|
48
50
|
});
|
|
49
51
|
})).exec();
|
|
50
52
|
setTimeout(() => {
|
|
@@ -95,15 +97,17 @@ const Popover = (props) => {
|
|
|
95
97
|
let cross = 0;
|
|
96
98
|
let parallel = 0;
|
|
97
99
|
if (Array.isArray(offset) && offset.length === 2) {
|
|
100
|
+
const rtloffset = rtl ? -offset[0] : offset[0];
|
|
98
101
|
cross += +offset[1];
|
|
99
|
-
parallel += +
|
|
102
|
+
parallel += +rtloffset;
|
|
100
103
|
}
|
|
101
104
|
if (width) {
|
|
105
|
+
const dir = rtl ? "right" : "left";
|
|
102
106
|
if (["bottom", "top"].includes(direction)) {
|
|
103
107
|
const h = direction === "bottom" ? height + cross : -(contentHeight + cross);
|
|
104
108
|
styles.top = `${top + h}px`;
|
|
105
109
|
if (!skew) {
|
|
106
|
-
styles
|
|
110
|
+
styles[dir] = `${-(contentWidth - width) / 2 + rootPosition[dir] + parallel}px`;
|
|
107
111
|
}
|
|
108
112
|
if (skew === "start") {
|
|
109
113
|
styles.left = `${left + parallel}px`;
|
|
@@ -139,15 +143,17 @@ const Popover = (props) => {
|
|
|
139
143
|
const skew = location.split("-")[1];
|
|
140
144
|
const base = 16;
|
|
141
145
|
if (props.arrowOffset !== 0) {
|
|
146
|
+
const dir = rtl ? "right" : "left";
|
|
147
|
+
const dir2 = rtl ? "left" : "right";
|
|
142
148
|
if (["bottom", "top"].includes(direction)) {
|
|
143
149
|
if (!skew) {
|
|
144
|
-
styles
|
|
150
|
+
styles[dir] = `calc(50% + ${arrowOffset}px)`;
|
|
145
151
|
}
|
|
146
152
|
if (skew === "start") {
|
|
147
|
-
styles
|
|
153
|
+
styles[dir] = `${base + arrowOffset}px`;
|
|
148
154
|
}
|
|
149
155
|
if (skew === "end") {
|
|
150
|
-
styles
|
|
156
|
+
styles[dir2] = `${base - arrowOffset}px`;
|
|
151
157
|
}
|
|
152
158
|
}
|
|
153
159
|
if (["left", "right"].includes(direction)) {
|
|
@@ -165,12 +171,13 @@ const Popover = (props) => {
|
|
|
165
171
|
return styles;
|
|
166
172
|
};
|
|
167
173
|
const handleSelect = (item, index) => {
|
|
174
|
+
var _a2;
|
|
168
175
|
if (!item.disabled) {
|
|
169
|
-
onSelect
|
|
176
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(item, index);
|
|
170
177
|
}
|
|
171
178
|
if (closeOnActionClick) {
|
|
172
|
-
props.onClick
|
|
173
|
-
onClose
|
|
179
|
+
(_a2 = props.onClick) === null || _a2 === void 0 ? void 0 : _a2.call(props);
|
|
180
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
174
181
|
}
|
|
175
182
|
};
|
|
176
183
|
return React__default.createElement(
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
2
|
+
import React__default, { useState, useEffect, useRef } from "react";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import Taro from "@tarojs/taro";
|
|
5
|
+
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
6
|
+
import { a as useRtl } from "./configprovider.taro-CyU_tvNJ.js";
|
|
7
|
+
import { u as useUuid } from "./use-uuid-BvqmbYZ7.js";
|
|
8
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { percent: 0, showText: false, animated: false, lazy: false, delay: 0 });
|
|
9
|
+
const Progress = (props) => {
|
|
10
|
+
const rtl = useRtl();
|
|
11
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { className, style, percent, background, color, strokeWidth, showText, animated, children, lazy, delay } = _a, rest = __rest(_a, ["className", "style", "percent", "background", "color", "strokeWidth", "showText", "animated", "children", "lazy", "delay"]);
|
|
12
|
+
const classPrefix = "nut-progress";
|
|
13
|
+
const classesInner = classNames({
|
|
14
|
+
[`${classPrefix}-inner`]: true,
|
|
15
|
+
[`${classPrefix}-active`]: animated
|
|
16
|
+
});
|
|
17
|
+
const stylesOuter = {
|
|
18
|
+
height: `${strokeWidth}px`,
|
|
19
|
+
background
|
|
20
|
+
};
|
|
21
|
+
const [displayPercent, setDispalyPercent] = useState(0);
|
|
22
|
+
const stylesInner = {
|
|
23
|
+
width: `${displayPercent}%`,
|
|
24
|
+
background: color
|
|
25
|
+
};
|
|
26
|
+
const handlePercent = () => {
|
|
27
|
+
let timer = null;
|
|
28
|
+
if (delay) {
|
|
29
|
+
setDispalyPercent(0);
|
|
30
|
+
timer = setTimeout(() => {
|
|
31
|
+
setDispalyPercent(percent);
|
|
32
|
+
}, delay);
|
|
33
|
+
}
|
|
34
|
+
return () => {
|
|
35
|
+
lazy && resetObserver(Taro.getEnv());
|
|
36
|
+
timer && clearTimeout(timer);
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
setDispalyPercent(percent);
|
|
41
|
+
}, [percent]);
|
|
42
|
+
const [intersecting, setIntersecting] = useState(false);
|
|
43
|
+
const progressRef = useRef(null);
|
|
44
|
+
const webObserver = useRef(null);
|
|
45
|
+
const uuid = useUuid();
|
|
46
|
+
const selector = `${classPrefix}-lazy-${uuid}`;
|
|
47
|
+
const resetObserver = (env, observer = null) => {
|
|
48
|
+
if (env === "WEB") {
|
|
49
|
+
webObserver.current.disconnect && webObserver.current.disconnect();
|
|
50
|
+
} else {
|
|
51
|
+
observer && observer.disconnect();
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (lazy) {
|
|
56
|
+
setTimeout(() => {
|
|
57
|
+
if (intersecting) {
|
|
58
|
+
setDispalyPercent(percent);
|
|
59
|
+
} else {
|
|
60
|
+
setDispalyPercent(0.01);
|
|
61
|
+
}
|
|
62
|
+
}, delay);
|
|
63
|
+
}
|
|
64
|
+
}, [intersecting]);
|
|
65
|
+
const handleWebObserver = () => {
|
|
66
|
+
if (lazy) {
|
|
67
|
+
webObserver.current = new IntersectionObserver((entires, self) => {
|
|
68
|
+
entires.forEach((item) => {
|
|
69
|
+
setIntersecting(item.isIntersecting);
|
|
70
|
+
});
|
|
71
|
+
}, {
|
|
72
|
+
threshold: [0],
|
|
73
|
+
rootMargin: "0px"
|
|
74
|
+
});
|
|
75
|
+
webObserver.current.observe(progressRef.current);
|
|
76
|
+
}
|
|
77
|
+
handlePercent();
|
|
78
|
+
};
|
|
79
|
+
const handleOtherObserver = () => {
|
|
80
|
+
let observer = null;
|
|
81
|
+
if (lazy) {
|
|
82
|
+
observer = Taro.createIntersectionObserver(Taro.getCurrentInstance().page, {
|
|
83
|
+
thresholds: [0],
|
|
84
|
+
observeAll: true
|
|
85
|
+
});
|
|
86
|
+
observer.relativeToViewport({ top: 0 }).observe(`#${selector}`, (res) => {
|
|
87
|
+
setIntersecting(res.intersectionRatio > 0);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
handlePercent();
|
|
91
|
+
};
|
|
92
|
+
useEffect(() => {
|
|
93
|
+
if (Taro.getEnv() === "WEB") {
|
|
94
|
+
handleWebObserver();
|
|
95
|
+
} else {
|
|
96
|
+
handleOtherObserver();
|
|
97
|
+
}
|
|
98
|
+
}, []);
|
|
99
|
+
return React__default.createElement(
|
|
100
|
+
"div",
|
|
101
|
+
Object.assign({ ref: progressRef, id: selector, className: classNames(classPrefix, className), style }, rest),
|
|
102
|
+
React__default.createElement(
|
|
103
|
+
"div",
|
|
104
|
+
{ className: `${classPrefix}-outer`, style: stylesOuter },
|
|
105
|
+
React__default.createElement("div", { className: classesInner, style: stylesInner }, showText && React__default.createElement("div", { className: `${classPrefix}-text`, style: rtl ? { right: `${displayPercent}%` } : { left: `${displayPercent}%` } }, children || React__default.createElement(
|
|
106
|
+
"div",
|
|
107
|
+
{ className: `${classPrefix}-text-inner`, style: {
|
|
108
|
+
background: color
|
|
109
|
+
} },
|
|
110
|
+
percent,
|
|
111
|
+
"%"
|
|
112
|
+
)))
|
|
113
|
+
)
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
Progress.defaultProps = defaultProps;
|
|
117
|
+
Progress.displayName = "NutProgress";
|
|
118
|
+
export {
|
|
119
|
+
Progress as P
|
|
120
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
2
|
-
import React__default, {
|
|
2
|
+
import React__default, { useState, useRef, useEffect } from "react";
|
|
3
3
|
import { View, ScrollView } from "@tarojs/components";
|
|
4
4
|
import classNames from "classnames";
|
|
5
5
|
import { JoySmile } from "@nutui/icons-react-taro";
|
|
@@ -9,22 +9,8 @@ import { T as TabPane } from "./tabpane.taro-BAe86j3t.js";
|
|
|
9
9
|
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
10
10
|
import { u as useForceUpdate } from "./use-force-update-CudFjCsy.js";
|
|
11
11
|
import { r as requestAniFrame } from "./raf-zwv-SBjP.js";
|
|
12
|
+
import { u as useUuid } from "./use-uuid-BvqmbYZ7.js";
|
|
12
13
|
import { a as useRtl } from "./configprovider.taro-CyU_tvNJ.js";
|
|
13
|
-
const idCounter = {};
|
|
14
|
-
function uniqueId(prefix = "$nut$") {
|
|
15
|
-
if (!idCounter[prefix]) {
|
|
16
|
-
idCounter[prefix] = 0;
|
|
17
|
-
}
|
|
18
|
-
const id = ++idCounter[prefix];
|
|
19
|
-
if (prefix === "$nut$") {
|
|
20
|
-
return `${id}`;
|
|
21
|
-
}
|
|
22
|
-
return `${prefix}${id}`;
|
|
23
|
-
}
|
|
24
|
-
function useUuid() {
|
|
25
|
-
const idRef = useRef(uniqueId());
|
|
26
|
-
return idRef.current;
|
|
27
|
-
}
|
|
28
14
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { tabStyle: {}, activeColor: "", direction: "horizontal", activeType: "line", duration: 300, autoHeight: false });
|
|
29
15
|
const classPrefix = "nut-tabs";
|
|
30
16
|
const Tabs = (props) => {
|
|
@@ -129,12 +115,10 @@ const Tabs = (props) => {
|
|
|
129
115
|
return;
|
|
130
116
|
let to = 0;
|
|
131
117
|
if (props.direction === "vertical") {
|
|
132
|
-
const
|
|
133
|
-
const top = titleRects.slice(0, index).reduce((prev, curr) => prev + curr.height, DEFAULT_PADDING);
|
|
118
|
+
const top = titleRects.slice(0, index).reduce((prev, curr) => prev + curr.height, 0);
|
|
134
119
|
to = top - (navRectRef.current.height - titleRect.height) / 2;
|
|
135
120
|
} else {
|
|
136
|
-
const
|
|
137
|
-
const left = titleRects.slice(0, index).reduce((prev, curr) => prev + curr.width, DEFAULT_PADDING);
|
|
121
|
+
const left = titleRects.slice(0, index).reduce((prev, curr) => prev + curr.width, 0);
|
|
138
122
|
to = left - (navRectRef.current.width - titleRect.width) / 2;
|
|
139
123
|
to = rtl ? -to : to;
|
|
140
124
|
}
|
|
@@ -2,7 +2,7 @@ import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
|
|
|
2
2
|
import React__default, { useState, useEffect } from "react";
|
|
3
3
|
import { Close } from "@nutui/icons-react-taro";
|
|
4
4
|
import classNames from "classnames";
|
|
5
|
-
import { P as Popover } from "./popover.taro-
|
|
5
|
+
import { P as Popover } from "./popover.taro-BG0msyw5.js";
|
|
6
6
|
import Taro, { createSelectorQuery } from "@tarojs/taro";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
8
8
|
import { useConfig } from "./ConfigProvider.js";
|
|
@@ -9,7 +9,7 @@ import { a as isPromise } from "./index-DeNfBlua.js";
|
|
|
9
9
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
10
10
|
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
11
11
|
import { Image } from "@tarojs/components";
|
|
12
|
-
import { P as Progress } from "./progress.taro-
|
|
12
|
+
import { P as Progress } from "./progress.taro-rjiPI6mD.js";
|
|
13
13
|
class UploadOptions {
|
|
14
14
|
constructor() {
|
|
15
15
|
this.url = "";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useRef } from "react";
|
|
2
|
+
const idCounter = {};
|
|
3
|
+
function uniqueId(prefix = "$nut$") {
|
|
4
|
+
if (!idCounter[prefix]) {
|
|
5
|
+
idCounter[prefix] = 0;
|
|
6
|
+
}
|
|
7
|
+
const id = ++idCounter[prefix];
|
|
8
|
+
if (prefix === "$nut$") {
|
|
9
|
+
return `${id}`;
|
|
10
|
+
}
|
|
11
|
+
return `${prefix}${id}`;
|
|
12
|
+
}
|
|
13
|
+
function useUuid() {
|
|
14
|
+
const idRef = useRef(uniqueId());
|
|
15
|
+
return idRef.current;
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
useUuid as u
|
|
19
|
+
};
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/tr-TR.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED