@tarojs/components 3.7.0-alpha.1 → 3.7.0-alpha.11

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.
Files changed (219) hide show
  1. package/dist/cjs/hls-00fec546.js +25673 -0
  2. package/dist/{esm/index-394db4c1.js → cjs/index-f6805218.js} +2 -6
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/taro-button-core.cjs.entry.js +2 -2
  5. package/dist/cjs/taro-components.cjs.js +1 -1
  6. package/dist/cjs/taro-cover-view-core.cjs.entry.js +1 -1
  7. package/dist/cjs/taro-icon-core.cjs.entry.js +1 -1
  8. package/dist/cjs/taro-image-core.cjs.entry.js +5 -4
  9. package/dist/cjs/taro-input-core.cjs.entry.js +6 -11
  10. package/dist/cjs/taro-navigator-core.cjs.entry.js +1 -1
  11. package/dist/cjs/taro-picker-core_2.cjs.entry.js +23 -20
  12. package/dist/cjs/taro-picker-view-column-core_2.cjs.entry.js +1 -1
  13. package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +3 -3
  14. package/dist/cjs/taro-rich-text-core.cjs.entry.js +6 -0
  15. package/dist/cjs/taro-scroll-view-core.cjs.entry.js +5 -4
  16. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +37 -36
  17. package/dist/cjs/taro-tabbar.cjs.entry.js +1 -1
  18. package/dist/cjs/taro-text-core.cjs.entry.js +9 -6
  19. package/dist/cjs/taro-textarea-core.cjs.entry.js +1 -8
  20. package/dist/cjs/taro-video-control_3.cjs.entry.js +3 -3
  21. package/dist/cjs/taro-view-core.cjs.entry.js +1 -1
  22. package/dist/collection/components/button/style/index.css +12 -0
  23. package/dist/collection/components/checkbox/checkbox.js +4 -4
  24. package/dist/collection/components/image/image.js +6 -4
  25. package/dist/collection/components/input/input.js +9 -13
  26. package/dist/collection/components/picker/picker-group.js +29 -26
  27. package/dist/collection/components/picker/picker.js +42 -16
  28. package/dist/collection/components/pull-to-refresh/pull-to-refresh.js +1 -1
  29. package/dist/collection/components/pull-to-refresh/style/index.css +0 -1
  30. package/dist/collection/components/rich-text/rich-text.js +71 -0
  31. package/dist/collection/components/rich-text/style/index.css +16 -0
  32. package/dist/collection/components/scroll-view/scroll-view.js +22 -4
  33. package/dist/collection/components/swiper/swiper-item.js +34 -35
  34. package/dist/collection/components/swiper/swiper.js +2 -0
  35. package/dist/collection/components/text/style/index.css +20 -3
  36. package/dist/collection/components/text/text.js +66 -6
  37. package/dist/collection/components/textarea/textarea.js +4 -10
  38. package/dist/collection/components/video/video.js +1 -1
  39. package/dist/components/hls.js +23206 -24210
  40. package/dist/components/index2.js +1 -7
  41. package/dist/components/picker-group.js +9 -9
  42. package/dist/components/taro-button-core.js +1 -1
  43. package/dist/components/taro-checkbox-core.js +1 -1
  44. package/dist/components/taro-image-core.js +6 -4
  45. package/dist/components/taro-input-core.js +7 -12
  46. package/dist/components/taro-picker-core.js +16 -13
  47. package/dist/components/taro-pull-to-refresh.js +2 -2
  48. package/dist/components/taro-rich-text-core.js +10 -1
  49. package/dist/components/taro-scroll-view-core.js +5 -3
  50. package/dist/components/taro-swiper-core.js +2 -0
  51. package/dist/components/taro-swiper-item-core.js +34 -35
  52. package/dist/components/taro-text-core.js +13 -7
  53. package/dist/components/taro-textarea-core.js +2 -9
  54. package/dist/components/taro-video-core.js +2 -2
  55. package/dist/esm/hls-4018c7ea.js +25671 -0
  56. package/dist/{cjs/index-067a58c1.js → esm/index-c3e4004b.js} +1 -12
  57. package/dist/esm/loader.js +1 -1
  58. package/dist/esm/taro-button-core.entry.js +2 -2
  59. package/dist/esm/taro-components.js +1 -1
  60. package/dist/esm/taro-cover-view-core.entry.js +1 -1
  61. package/dist/esm/taro-icon-core.entry.js +1 -1
  62. package/dist/esm/taro-image-core.entry.js +5 -4
  63. package/dist/esm/taro-input-core.entry.js +6 -11
  64. package/dist/esm/taro-navigator-core.entry.js +1 -1
  65. package/dist/esm/taro-picker-core_2.entry.js +23 -20
  66. package/dist/esm/taro-picker-view-column-core_2.entry.js +1 -1
  67. package/dist/esm/taro-pull-to-refresh.entry.js +3 -3
  68. package/dist/esm/taro-rich-text-core.entry.js +6 -0
  69. package/dist/esm/taro-scroll-view-core.entry.js +5 -4
  70. package/dist/esm/taro-swiper-core_2.entry.js +37 -36
  71. package/dist/esm/taro-tabbar.entry.js +1 -1
  72. package/dist/esm/taro-text-core.entry.js +9 -6
  73. package/dist/esm/taro-textarea-core.entry.js +1 -8
  74. package/dist/esm/taro-video-control_3.entry.js +3 -3
  75. package/dist/esm/taro-view-core.entry.js +1 -1
  76. package/dist/esm-es5/hls-4018c7ea.js +1 -0
  77. package/dist/esm-es5/index-c3e4004b.js +7 -0
  78. package/dist/esm-es5/loader.js +1 -1
  79. package/dist/esm-es5/taro-button-core.entry.js +1 -1
  80. package/dist/esm-es5/taro-components.js +1 -1
  81. package/dist/esm-es5/taro-cover-view-core.entry.js +1 -1
  82. package/dist/esm-es5/taro-icon-core.entry.js +1 -1
  83. package/dist/esm-es5/taro-image-core.entry.js +1 -1
  84. package/dist/esm-es5/taro-input-core.entry.js +1 -1
  85. package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
  86. package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
  87. package/dist/esm-es5/taro-picker-view-column-core_2.entry.js +1 -1
  88. package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
  89. package/dist/esm-es5/taro-rich-text-core.entry.js +1 -1
  90. package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
  91. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  92. package/dist/esm-es5/taro-tabbar.entry.js +1 -1
  93. package/dist/esm-es5/taro-text-core.entry.js +1 -1
  94. package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
  95. package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
  96. package/dist/esm-es5/taro-view-core.entry.js +1 -1
  97. package/dist/taro-components/{p-1e43a2d5.entry.js → p-0114a2e4.entry.js} +1 -1
  98. package/dist/taro-components/p-01e163f8.system.entry.js +1 -0
  99. package/dist/taro-components/p-085076c5.system.entry.js +1 -0
  100. package/dist/taro-components/p-0fa96970.entry.js +1 -0
  101. package/dist/taro-components/{p-edbb1a17.system.entry.js → p-1991cc1a.system.entry.js} +1 -1
  102. package/dist/taro-components/{p-c0ec2f41.system.entry.js → p-2de2a3fd.system.entry.js} +1 -1
  103. package/dist/taro-components/p-2ec68968.system.js +7 -0
  104. package/dist/taro-components/{p-18703731.system.entry.js → p-416cc4dd.system.entry.js} +1 -1
  105. package/dist/taro-components/p-425c209a.entry.js +1 -0
  106. package/dist/taro-components/p-43efbf30.js +1 -0
  107. package/dist/taro-components/p-478deb81.entry.js +1 -0
  108. package/dist/taro-components/{p-2c89af5b.system.entry.js → p-657cb6e4.system.entry.js} +1 -1
  109. package/dist/taro-components/p-6cde180b.entry.js +1 -0
  110. package/dist/taro-components/{p-b898d734.entry.js → p-78e4805e.entry.js} +1 -1
  111. package/dist/taro-components/{p-c490cd45.entry.js → p-7b68dee8.entry.js} +1 -1
  112. package/dist/taro-components/{p-5905e3ef.system.entry.js → p-7e998213.system.entry.js} +1 -1
  113. package/dist/taro-components/p-982bb5bf.entry.js +1 -0
  114. package/dist/taro-components/{p-16336cc6.system.entry.js → p-98f9f50f.system.entry.js} +1 -1
  115. package/dist/taro-components/p-9edea30f.system.entry.js +1 -0
  116. package/dist/taro-components/{p-3f9f3448.entry.js → p-9fe49bab.entry.js} +1 -1
  117. package/dist/taro-components/{p-31bba7c3.entry.js → p-a20ecd3b.entry.js} +1 -1
  118. package/dist/taro-components/p-a20fed0a.entry.js +1 -0
  119. package/dist/taro-components/{p-e5f78321.system.entry.js → p-a4882902.system.entry.js} +1 -1
  120. package/dist/taro-components/{p-7c2454dd.system.entry.js → p-a8925584.system.entry.js} +1 -1
  121. package/dist/taro-components/p-a8e7cf87.entry.js +1 -0
  122. package/dist/taro-components/{p-c2322741.system.entry.js → p-b1d2b575.system.entry.js} +1 -1
  123. package/dist/taro-components/p-ba3b2aa5.system.entry.js +1 -0
  124. package/dist/taro-components/p-c39a46ca.system.entry.js +1 -0
  125. package/dist/taro-components/{p-ca3a269f.entry.js → p-c4b8851b.entry.js} +1 -1
  126. package/dist/taro-components/p-ce33f1f3.entry.js +1 -0
  127. package/dist/taro-components/p-dab28e1f.system.entry.js +1 -0
  128. package/dist/taro-components/p-de951a46.js +7 -0
  129. package/dist/taro-components/p-e09451c5.system.entry.js +1 -0
  130. package/dist/taro-components/{p-df4c2f21.entry.js → p-e33f3592.entry.js} +1 -1
  131. package/dist/taro-components/p-e78775ce.system.js +1 -0
  132. package/dist/taro-components/p-ebc7b6fc.entry.js +1 -0
  133. package/dist/taro-components/p-ed331c06.system.js +1 -1
  134. package/dist/taro-components/p-f02b6f70.entry.js +1 -0
  135. package/dist/taro-components/p-f6f6a996.system.entry.js +1 -0
  136. package/dist/taro-components/taro-components.css +1 -1
  137. package/dist/taro-components/taro-components.esm.js +1 -1
  138. package/dist/types/components/checkbox/checkbox.d.ts +1 -1
  139. package/dist/types/components/image/image.d.ts +1 -0
  140. package/dist/types/components/input/input.d.ts +2 -2
  141. package/dist/types/components/picker/picker-group.d.ts +3 -3
  142. package/dist/types/components/picker/picker.d.ts +7 -2
  143. package/dist/types/components/rich-text/rich-text.d.ts +4 -0
  144. package/dist/types/components/scroll-view/scroll-view.d.ts +1 -0
  145. package/dist/types/components/text/text.d.ts +4 -0
  146. package/dist/types/components/textarea/textarea.d.ts +0 -1
  147. package/dist/types/components.d.ts +28 -8
  148. package/lib/react/component-lib/index.js +50 -50
  149. package/lib/react/component-lib/index.js.map +1 -1
  150. package/lib/react/component-lib/reactify-wc.js +1 -1
  151. package/lib/react/component-lib/reactify-wc.js.map +1 -1
  152. package/lib/react/components.d.ts +1 -3
  153. package/lib/react/components.js +2 -2
  154. package/lib/react/components.js.map +1 -1
  155. package/lib/react/helper.d.ts +1 -1
  156. package/lib/react/react-component-lib/createOverlayComponent.js.map +1 -1
  157. package/lib/react/react-component-lib/utils/attachProps.js +21 -5
  158. package/lib/react/react-component-lib/utils/attachProps.js.map +1 -1
  159. package/lib/vue2/component-lib/index.js +0 -5
  160. package/lib/vue2/component-lib/index.js.map +1 -1
  161. package/lib/vue2/components-loader.js +1 -1
  162. package/lib/vue2/components-loader.js.map +1 -1
  163. package/lib/vue2/components.d.ts +10 -3
  164. package/lib/vue2/components.js +13 -6
  165. package/lib/vue2/components.js.map +1 -1
  166. package/lib/vue2/vue-component-lib/utils.js.map +1 -1
  167. package/lib/vue3/component-lib/index.js +48 -48
  168. package/lib/vue3/component-lib/index.js.map +1 -1
  169. package/lib/vue3/components.d.ts +1 -1
  170. package/lib/vue3/components.js +14 -6
  171. package/lib/vue3/components.js.map +1 -1
  172. package/lib/vue3/vue-component-lib/utils.js.map +1 -1
  173. package/package.json +13 -11
  174. package/types/Button.d.ts +71 -8
  175. package/types/ChannelVideo.d.ts +4 -0
  176. package/types/Form.d.ts +11 -0
  177. package/types/Image.d.ts +5 -0
  178. package/types/Input.d.ts +6 -1
  179. package/types/LivePlayer.d.ts +17 -0
  180. package/types/LivePusher.d.ts +10 -0
  181. package/types/Picker.d.ts +9 -0
  182. package/types/Progress.d.ts +2 -2
  183. package/types/RichText.d.ts +6 -4
  184. package/types/ScrollView.d.ts +7 -7
  185. package/types/ShareElement.d.ts +39 -0
  186. package/types/StickySection.d.ts +0 -1
  187. package/types/Swiper.d.ts +10 -0
  188. package/types/Text.d.ts +8 -3
  189. package/types/Textarea.d.ts +11 -4
  190. package/types/Video.d.ts +12 -0
  191. package/types/View.d.ts +1 -1
  192. package/types/index.vue3.d.ts +18 -9
  193. package/virtual-list/index.js +2 -2
  194. package/dist/cjs/hls-0f2d4d85.js +0 -26677
  195. package/dist/esm/hls-0e83e558.js +0 -26675
  196. package/dist/esm-es5/hls-0e83e558.js +0 -289
  197. package/dist/esm-es5/index-394db4c1.js +0 -7
  198. package/dist/taro-components/p-198000d8.system.js +0 -289
  199. package/dist/taro-components/p-25adb80c.entry.js +0 -1
  200. package/dist/taro-components/p-2fad2a65.js +0 -7
  201. package/dist/taro-components/p-385d8aed.entry.js +0 -1
  202. package/dist/taro-components/p-387314fa.system.js +0 -7
  203. package/dist/taro-components/p-3e701660.js +0 -289
  204. package/dist/taro-components/p-4e9bd4f6.entry.js +0 -1
  205. package/dist/taro-components/p-589293fd.entry.js +0 -1
  206. package/dist/taro-components/p-58b19305.system.entry.js +0 -1
  207. package/dist/taro-components/p-5b67a98e.entry.js +0 -1
  208. package/dist/taro-components/p-6800ccdc.system.entry.js +0 -1
  209. package/dist/taro-components/p-735c2a72.system.entry.js +0 -1
  210. package/dist/taro-components/p-97f0ad72.system.entry.js +0 -1
  211. package/dist/taro-components/p-a132ebb9.entry.js +0 -1
  212. package/dist/taro-components/p-ab2d4f12.entry.js +0 -1
  213. package/dist/taro-components/p-c43c5e89.system.entry.js +0 -1
  214. package/dist/taro-components/p-cc7b95fd.system.entry.js +0 -1
  215. package/dist/taro-components/p-cd90bead.system.entry.js +0 -1
  216. package/dist/taro-components/p-d9e2e3aa.entry.js +0 -1
  217. package/dist/taro-components/p-dcbb7b2d.entry.js +0 -1
  218. package/dist/taro-components/p-ed011ff9.entry.js +0 -1
  219. package/dist/taro-components/p-fa43177b.system.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as o,H as i,g as l}from"./p-9137dcab.js";import{c as r}from"./p-de951a46.js";import{d as e}from"./p-d3c7f87d.js";function h(t,s,o=500,i){if(t===s||"number"!=typeof t)return;const l=s-t,r=Date.now(),e=s>=t;!function h(){var c;c=Date.now()-r,t=l*c/o+t,e&&t>=s||!e&&s>=t?i(s):(i(t),requestAnimationFrame(h))}()}const c=class{constructor(o){t(this,o),this.onScroll=s(this,"scroll",3),this.onScrollToUpper=s(this,"scrolltoupper",3),this.onScrollToLower=s(this,"scrolltolower",3),this._scrollLeft=0,this._scrollTop=0,this.upperAndLower=e((()=>{const{offsetWidth:t,offsetHeight:s,scrollLeft:o,scrollTop:i,scrollHeight:l,scrollWidth:r}=this.el,e=Number(this.lowerThreshold),h=Number(this.upperThreshold);!isNaN(e)&&(this.scrollY&&s+i+e>=l||this.scrollX&&t+o+e>=r)&&this.onScrollToLower.emit({direction:this.scrollX?"right":this.scrollY?"bottom":""}),!isNaN(h)&&(this.scrollY&&i<=h||this.scrollX&&o<=h)&&this.onScrollToUpper.emit({direction:this.scrollX?"left":this.scrollY?"top":""})}),200),this.scrollX=!1,this.scrollY=!1,this.upperThreshold=50,this.lowerThreshold=50,this.mpScrollTop=void 0,this.mpScrollLeft=void 0,this.mpScrollIntoView=void 0,this.mpScrollIntoViewAlignment=void 0,this.animated=!1}watchScrollLeft(t){const s=Number(t),{animated:o}=this;this.mpScrollToMethod({left:s,animated:o})}watchScrollTop(t){const s=Number(t),{animated:o}=this;this.mpScrollToMethod({top:s,animated:o})}watchScrollIntoView(t){this.mpScrollIntoViewMethod(t)}handleScroll(t){if(t instanceof CustomEvent)return;t.stopPropagation();const{scrollLeft:s,scrollTop:o,scrollHeight:i,scrollWidth:l}=this.el;this._scrollLeft=s,this._scrollTop=o,this.upperAndLower(),this.onScroll.emit({scrollLeft:s,scrollTop:o,scrollHeight:i,scrollWidth:l})}async mpScrollToMethod(t){let{top:s,left:o,duration:i,animated:l=!1}=t;this.scrollY&&"number"==typeof s&&!isNaN(s)&&s!==this._scrollTop&&(l?h(this._scrollTop,s,i,(t=>this.el.scrollTop=t)):this.el.scrollTop=s,this._scrollTop=s),this.scrollX&&"number"==typeof o&&!isNaN(o)&&o!==this._scrollLeft&&(l?h(this._scrollLeft,o,i,(t=>this.el.scrollLeft=t)):this.el.scrollLeft=o,this._scrollLeft=o)}async mpScrollIntoViewMethod(t){var s;"string"==typeof t&&t&&(null===(s=document.querySelector(`#${t}`))||void 0===s||s.scrollIntoView({behavior:this.animated?"smooth":"auto",block:this.scrollY&&this.mpScrollIntoViewAlignment||"center",inline:this.scrollX&&this.mpScrollIntoViewAlignment||"start"}))}componentDidLoad(){const t=Number(this.mpScrollTop),s=Number(this.mpScrollLeft),{animated:o}=this;this.mpScrollToMethod({top:t,left:s,animated:o})}render(){const{scrollX:t,scrollY:s}=this,l=r({"taro-scroll-view__scroll-x":t,"taro-scroll-view__scroll-y":s});return o(i,{class:l},o("slot",null))}get el(){return l(this)}static get watchers(){return{mpScrollLeft:["watchScrollLeft"],mpScrollTop:["watchScrollTop"],mpScrollIntoView:["watchScrollIntoView"]}}};c.style="taro-scroll-view-core{display:block;width:100%;-webkit-overflow-scrolling:auto}taro-scroll-view-core::-webkit-scrollbar{display:none}.taro-scroll-view__scroll-x{overflow-x:scroll;overflow-y:hidden}.taro-scroll-view__scroll-y{overflow-x:hidden;overflow-y:scroll}";export{c as taro_scroll_view_core}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,o){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(o.next(e))}catch(e){a(e)}}function u(e){try{l(o["throw"](e))}catch(e){a(e)}}function l(e){e.done?n(e.value):i(e.value).then(r,u)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,i,a,r;return r={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function u(e){return function(t){return l([e,t])}}function l(u){if(o)throw new TypeError("Generator is already executing.");while(r&&(r=0,u[0]&&(n=0)),n)try{if(o=1,i&&(a=u[0]&2?i["return"]:u[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;if(i=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;i=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1];a=u;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(u);break}if(a[2])n.ops.pop();n.trys.pop();continue}u=t.call(e,n)}catch(e){u=[6,e];i=0}finally{o=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-7e6b54cb.system.js"],(function(e){"use strict";var t,n,o,i;return{setters:[function(e){t=e.r;n=e.c;o=e.h;i=e.g}],execute:function(){var a="taro-textarea-core{display:block;width:300px}taro-textarea-core .auto-height{height:auto}.taro-textarea{display:block;position:relative;border:0;width:100%;height:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:auto;line-height:1.5}.taro-textarea:focus{outline:none}";function r(e){return e!==null&&e!==void 0?e:""}var u=e("taro_textarea_core",function(){function e(e){var o=this;t(this,e);this.onInput=n(this,"input",7);this.onFocus=n(this,"focus",7);this.onBlur=n(this,"blur",7);this.onConfirm=n(this,"confirm",7);this.onChange=n(this,"change",7);this.onLineChange=n(this,"linechange",7);this.onKeyDown=n(this,"keydown",7);this.handleInput=function(e){e.stopPropagation();o.handleLineChange();var t=e.target.value||"";o.onInput.emit({value:t,cursor:t.length})};this.handleFocus=function(e){e.stopPropagation();o.onFocus.emit({value:e.target.value})};this.handleBlur=function(e){e.stopPropagation();o.onBlur.emit({value:e.target.value})};this.handleChange=function(e){e.stopPropagation();o.onChange.emit({value:e.target.value})};this.handleLineChange=function(){var e=o.getNumberOfLines();if(e!==o.line){o.line=e;o.onLineChange.emit({height:o.textareaRef.clientHeight,lineCount:o.line})}};this.handleKeyDown=function(e){e.stopPropagation();var t=e.target.value;var n=e.keyCode||e.code;o.onKeyDown.emit({value:t,cursor:t.length,keyCode:n});n===13&&o.onConfirm.emit({value:t})};this.calculateContentHeight=function(e,t){var n=e.style.height,o=e.offsetHeight,i=e.scrollHeight,a=e.style.overflow,r=e.style.minHeight||null;if(o>=i){e.style.minHeight=0;e.style.height=o+t+"px";e.style.overflow="hidden";if(i<e.scrollHeight){while(e.offsetHeight>=e.scrollHeight){e.style.height=(o-=t)+"px"}while(e.offsetHeight<e.scrollHeight){e.style.height=o+++"px"}e.style.height=n;e.style.overflow=a;e.style.minHeight=r;return o}}else{return i}};this.getNumberOfLines=function(){var e=o.textareaRef,t=window.getComputedStyle?window.getComputedStyle(e):e.style,n=parseInt(t.lineHeight,10),i=o.calculateContentHeight(e,n),a=Math.floor(i/n);return a};this.value=undefined;this.placeholder=undefined;this.disabled=false;this.maxlength=140;this.autoFocus=false;this.autoHeight=false;this.name=undefined;this.nativeProps={};this.line=1}e.prototype.watchAutoFocus=function(e,t){var n;if(!t&&e){(n=this.textareaRef)===null||n===void 0?void 0:n.focus()}};e.prototype.focus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.textareaRef.focus();return[2]}))}))};e.prototype.componentDidLoad=function(){var e=this;Object.defineProperty(this.el,"value",{get:function(){return e.textareaRef.value},set:function(t){return e.value!==t&&(e.value=t)},configurable:true})};e.prototype.render=function(){var e=this;var t=this,n=t.value,i=t.placeholder,a=t.disabled,u=t.maxlength,l=t.autoFocus,s=t.autoHeight,h=t.name,c=t.nativeProps,f=t.handleInput,g=t.handleFocus,p=t.handleBlur,d=t.handleChange;var v={};if(s){v.rows=this.line}return o("textarea",Object.assign({ref:function(t){if(t){e.textareaRef=t;if(l&&t)t.focus()}},class:"taro-textarea ".concat(s?"auto-height":""),value:r(n),placeholder:i,name:h,disabled:a,maxlength:u,autofocus:l,onInput:f,onFocus:g,onBlur:p,onChange:d,onKeyDown:this.handleKeyDown},c,v))};Object.defineProperty(e.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{autoFocus:["watchAutoFocus"]}},enumerable:false,configurable:true});return e}());u.style=a}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,o){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(o.next(e))}catch(e){a(e)}}function u(e){try{l(o["throw"](e))}catch(e){a(e)}}function l(e){e.done?n(e.value):i(e.value).then(r,u)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,i,a,r;return r={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function u(e){return function(t){return l([e,t])}}function l(u){if(o)throw new TypeError("Generator is already executing.");while(r&&(r=0,u[0]&&(n=0)),n)try{if(o=1,i&&(a=u[0]&2?i["return"]:u[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;if(i=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;i=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1];a=u;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(u);break}if(a[2])n.ops.pop();n.trys.pop();continue}u=t.call(e,n)}catch(e){u=[6,e];i=0}finally{o=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-7e6b54cb.system.js"],(function(e){"use strict";var t,n,o,i;return{setters:[function(e){t=e.r;n=e.c;o=e.h;i=e.g}],execute:function(){var a="taro-textarea-core{display:block;width:300px}taro-textarea-core .auto-height{height:auto}.taro-textarea{display:block;position:relative;border:0;width:100%;height:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:auto;line-height:1.5}.taro-textarea:focus{outline:none}";function r(e){return e!==null&&e!==void 0?e:""}var u=e("taro_textarea_core",function(){function e(e){var o=this;t(this,e);this.onInput=n(this,"input",7);this.onFocus=n(this,"focus",7);this.onBlur=n(this,"blur",7);this.onConfirm=n(this,"confirm",7);this.onChange=n(this,"change",7);this.onLineChange=n(this,"linechange",7);this.onKeyDown=n(this,"keydown",7);this.handleInput=function(e){e.stopPropagation();o.handleLineChange();var t=e.target.value||"";o.onInput.emit({value:t,cursor:t.length})};this.handleFocus=function(e){e.stopPropagation();o.onFocus.emit({value:e.target.value})};this.handleBlur=function(e){e.stopPropagation();o.onBlur.emit({value:e.target.value})};this.handleChange=function(e){e.stopPropagation();o.onChange.emit({value:e.target.value})};this.handleLineChange=function(){var e=o.getNumberOfLines();if(e!==o.line){o.line=e;o.onLineChange.emit({height:o.textareaRef.clientHeight,lineCount:o.line})}};this.handleKeyDown=function(e){e.stopPropagation();var t=e.target.value;var n=e.keyCode||e.code;o.onKeyDown.emit({value:t,cursor:t.length,keyCode:n});n===13&&o.onConfirm.emit({value:t})};this.calculateContentHeight=function(e,t){var n=e.style.height,o=e.offsetHeight,i=e.scrollHeight,a=e.style.overflow,r=e.style.minHeight||null;if(o>=i){e.style.minHeight=0;e.style.height=o+t+"px";e.style.overflow="hidden";if(i<e.scrollHeight){while(e.offsetHeight>=e.scrollHeight){e.style.height=(o-=t)+"px"}while(e.offsetHeight<e.scrollHeight){e.style.height=o+++"px"}e.style.height=n;e.style.overflow=a;e.style.minHeight=r;return o}}else{return i}};this.getNumberOfLines=function(){var e=o.textareaRef,t=window.getComputedStyle?window.getComputedStyle(e):e.style,n=parseInt(t.lineHeight,10),i=o.calculateContentHeight(e,n),a=Math.floor(i/n);return a};this.value="";this.placeholder=undefined;this.disabled=false;this.maxlength=140;this.autoFocus=false;this.autoHeight=false;this.name=undefined;this.nativeProps={};this.line=1}e.prototype.watchAutoFocus=function(e,t){var n;if(!t&&e){(n=this.textareaRef)===null||n===void 0?void 0:n.focus()}};e.prototype.focus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.textareaRef.focus();return[2]}))}))};e.prototype.render=function(){var e=this;var t=this,n=t.value,i=t.placeholder,a=t.disabled,u=t.maxlength,l=t.autoFocus,s=t.autoHeight,h=t.name,c=t.nativeProps,f=t.handleInput,g=t.handleFocus,p=t.handleBlur,d=t.handleChange;var v={};if(s){v.rows=this.line}return o("textarea",Object.assign({ref:function(t){if(t){e.textareaRef=t;if(l&&t)t.focus()}},class:"taro-textarea ".concat(s?"auto-height":""),value:r(n),placeholder:i,name:h,disabled:a,maxlength:u,autofocus:l,onInput:f,onFocus:g,onBlur:p,onChange:d,onKeyDown:this.handleKeyDown},c,v))};Object.defineProperty(e.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{autoFocus:["watchAutoFocus"]}},enumerable:false,configurable:true});return e}());u.style=a}}}));
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,H as e,g as h}from"./p-9137dcab.js";import{c as n}from"./p-de951a46.js";function o(t,i){const s=[];for(let e=t;e<=i;e++)s.push(`${e<10?"0":""}${e}`);return s}const r=["20","21","22","23",...o(0,23),"00","01","02","03"],a=["56","57","58","59",...o(0,59),"00","01","02","03"];function c(t,i){return!isNaN(+t)&&t>=0&&t<i.length}function u(t){if(!/^\d{1,2}:\d{1,2}$/.test(t))return!1;const i=t.split(":").map((t=>+t));return!(i[0]<0||i[0]>23||i[1]<0||i[1]>59)}function d(t,i){const s=t.split(":").map((t=>+t)),e=i.split(":").map((t=>+t));return s[0]<e[0]||s[0]===e[0]&&s[1]<=e[1]}function l(t){if(!t)return!1;const i=new Date(t.replace(/-/g,"/"));return!isNaN(i.getMonth())&&i}function p(t){let i;return i=Array.isArray(t)?t.map((t=>String(t))):t,i}function m(t,i){const s=[];for(let e=t;e<=i;e++)s.push(e);return s}function g(t,i){return m(t,i)}function f(t,i,s){let e=1,h=12;return t.getFullYear()===s&&(e=t.getMonth()+1),i.getFullYear()===s&&(h=i.getMonth()+1),m(e,h)}function v(t,i,s,e){let h=1,n=function(t,i){return 4===i||6===i||9===i||11===i?30:2===i?t%4==0&&t%100!=0||t%400==0?29:28:31}(s,e);return t.getFullYear()===s&&t.getMonth()+1===e&&(h=t.getDate()),i.getFullYear()===s&&i.getMonth()+1===e&&(n=i.getDate()),m(h,n)}const _=102,w=34,k=class{constructor(e){t(this,e),this.onChange=i(this,"change",7),this.onColumnChange=i(this,"columnchange",7),this.onCancel=i(this,"cancel",7),this.index=[],this.showPicker=()=>{this.disabled||(this.height=this.getHeightByIndex(),this.hidden=!1)},this.getHeightByIndex=()=>this.index.map((t=>{let i=0;return"time"===this.mode&&(i=136),_-w*t-i})),this.hidePicker=()=>{this.fadeOut=!0,setTimeout((()=>{this.hidden=!0,this.fadeOut=!1}),350)},this.handleChange=()=>{this.hidePicker(),this.index=this.height.map((t=>(_-t)/w));let t=this.index.length&&"selector"!==this.mode?this.index:this.index[0];if("time"===this.mode){const i=[r.slice(),a.slice()],s=this.index.map(((t,s)=>i[s][t]));this.index=s.map((t=>parseInt(t))),t=s.join(":")}if("date"===this.mode){const{_start:i,_end:s,_updateValue:e}=this.pickerDate,h=e[0],n=e[1],o=g(i.getFullYear(),s.getFullYear()),r=f(i,s,h),a=v(i,s,h,n),c=o[this.index[0]],u=r[this.index[1]];t="year"===this.fields?[c]:"month"===this.fields?[c,u]:[c,u,a[this.index[2]]],t=t.map((t=>t<10?`0${t}`:t)).join("-")}this.value=t,this.pickerValue=this.value,this.onChange.emit({value:t})},this.handleColumnChange=t=>{const{columnId:i,height:s}=t.detail;this.onColumnChange.emit({column:Number(i),value:(_-s)/w})},this.handleCancel=()=>{this.hidePicker(),this.onCancel.emit()},this.updateHeight=(t,i,s=!1)=>{const e=[...this.height];if(e[i]=t,this.height=e,s){let{start:t,end:i}=this;if(u(t)||(t="00:00"),u(i)||(i="23:59"),!d(t,i))return;const s=[r.slice(),a.slice()],e=this.height.map((t=>(_-t)/w)),h=e.map(((t,i)=>s[i][t])).join(":");if(d(t,h)){if(!d(h,i)){const t=i.split(":").map((t=>_-w*(+t+4)));requestAnimationFrame((()=>this.height=t))}}else{const i=t.split(":").map((t=>_-w*(+t+4)));requestAnimationFrame((()=>this.height=i))}}},this.updateDay=(t,i)=>{const{_start:s,_end:e,_updateValue:h}=this.pickerDate;h[i]=t;const n=h[0],o=h[1],r=h[2];if(0===i){const t=f(s,e,n),i=t[t.length-1],r=t[0];o>i&&(h[1]=i),o<r&&(h[1]=r);const a=t.indexOf(h[1]),c=_-w*a;this.updateDay(h[1],1),this.updateHeight(c,"1")}else if(1===i){const t=v(s,e,n,o),i=t[t.length-1],a=t[0];r>i&&(h[2]=i),r<a&&(h[2]=a);const c=t.indexOf(h[2]),u=_-w*c;this.updateDay(h[2],2),this.updateHeight(u,"2")}},this.getSelector=()=>s("taro-picker-group",{range:this.range,rangeKey:this.rangeKey,height:this.height[0],updateHeight:this.updateHeight,columnId:"0"}),this.getMultiSelector=()=>this.range.map(((t,i)=>s("taro-picker-group",{range:t,rangeKey:this.rangeKey,height:this.height[i],updateHeight:this.updateHeight,onColumnChange:this.handleColumnChange,columnId:String(i)}))),this.getTimeSelector=()=>{const t=r.slice(),i=a.slice();return[s("taro-picker-group",{mode:"time",range:t,height:this.height[0],updateHeight:this.updateHeight,columnId:"0"}),s("taro-picker-group",{mode:"time",range:i,height:this.height[1],updateHeight:this.updateHeight,columnId:"1"})]},this.getDateSelector=()=>{const{fields:t,height:i}=this,{_start:e,_end:h,_updateValue:n}=this.pickerDate,o=n[0],r=n[1],a=g(e.getFullYear(),h.getFullYear()).map((t=>`${t}年`)),c=f(e,h,o).map((t=>`${t<10?`0${t}`:t}月`)),u=v(e,h,o,r).map((t=>`${t<10?`0${t}`:t}日`)),d=[s("taro-picker-group",{mode:"date",range:a,height:i[0],updateDay:this.updateDay,updateHeight:this.updateHeight,columnId:"0"})];return"month"!==t&&"day"!==t||d.push(s("taro-picker-group",{mode:"date",range:c,height:i[1],updateDay:this.updateDay,updateHeight:this.updateHeight,columnId:"1"})),"day"===t&&d.push(s("taro-picker-group",{mode:"date",range:u,height:i[2],updateDay:this.updateDay,updateHeight:this.updateHeight,columnId:"2"})),d},this.mode="selector",this.disabled=!1,this.range=[],this.rangeKey=void 0,this.value=void 0,this.start="",this.end="",this.fields="day",this.name="",this.textProps={},this.pickerValue=[],this.height=[],this.hidden=!0,this.fadeOut=!1,this.isWillLoadCalled=!1}componentWillLoad(){this.isWillLoadCalled=!0,this.handleProps()}componentDidLoad(){this.overlay&&document.body.appendChild(this.overlay)}disconnectedCallback(){var t;this.overlay&&(null===(t=this.overlay.parentNode)||void 0===t||t.removeChild(this.overlay))}onPropsChange(){this.isWillLoadCalled&&this.handleProps()}handleProps(){const{mode:t,start:i,end:s}=this;if("selector"===t){const t=this.value;this.index=[c(t,this.range)?Math.floor(t):0]}else if("multiSelector"===t){const t=this.value;this.index=[],this.range.forEach(((i,s)=>{const e=null==t?void 0:t[s],h=c(e,i)?Math.floor(e):0;this.index.push(h)}))}else if("time"===t){let t=this.value;u(t)||(console.warn("time picker value illegal"),t="0:0");const i=t.split(":").map((t=>+t));this.index=i}else{if("date"!==t)throw new Error(`Picker not support "${t}" mode.`);{const t=l(this.value)||new Date((new Date).setHours(0,0,0,0)),e=l(i)||new Date("1970/01/01"),h=l(s)||new Date("2999/01/01");if(!(t>=e&&t<=h))throw new Error("Date Interval Error");{const i=t.getFullYear(),s=t.getMonth()+1,n=t.getDate(),o=g(e.getFullYear(),h.getFullYear()),r=f(e,h,i),a=v(e,h,i,s);this.index=[o.indexOf(i),r.indexOf(s),a.indexOf(n)],this.pickerDate&&this.pickerDate._value.getTime()===t.getTime()&&this.pickerDate._start.getTime()===e.getTime()&&this.pickerDate._end.getTime()===h.getTime()||(this.pickerDate={_value:t,_start:e,_end:h,_updateValue:[i,s,n]})}}}if(this.height=this.getHeightByIndex(),this.pickerValue=this.value,"date"===t){const t=this.pickerValue;"month"===this.fields?this.pickerValue=t.split("-").slice(0,2).join("-"):"year"===this.fields&&(this.pickerValue=t.split("-")[0])}}render(){var t,i;const{name:h,mode:o,fadeOut:r,hidden:a}=this;let c;switch(o){case"multiSelector":c=this.getMultiSelector();break;case"time":c=this.getTimeSelector();break;case"date":c=this.getDateSelector();break;default:c=this.getSelector()}const u=n("weui-mask","weui-animate-fade-in",{"weui-animate-fade-out":r}),d=n("weui-picker","weui-animate-slide-up",{"weui-animate-slide-down":r}),l=a?{display:"none"}:{};return s(e,null,s("div",{onClick:this.showPicker},s("slot",null),s("input",{type:"hidden",name:h,value:p(this.pickerValue)})),s("div",{class:"weui-picker__overlay",style:l,ref:t=>{this.overlay=t}},s("div",{class:u,onClick:this.handleCancel}),s("div",{class:d},s("div",{class:"weui-picker__hd"},s("div",{class:"weui-picker__action",onClick:this.handleCancel},null!==(t=this.textProps.cancelText)&&void 0!==t?t:"取消"),s("div",{class:"weui-picker__action",onClick:this.handleChange},null!==(i=this.textProps.okText)&&void 0!==i?i:"确定")),s("div",{class:"weui-picker__bd"},c),s("input",{type:"hidden",name:h,value:p(this.pickerValue)}))))}get el(){return h(this)}static get watchers(){return{mode:["onPropsChange"],value:["onPropsChange"],range:["onPropsChange"],start:["onPropsChange"],end:["onPropsChange"]}}};k.style=".weui-picker,.weui-picker__hd{font-size:12px}";const y=class{constructor(s){t(this,s),this.onColumnChange=i(this,"columnChange",7),this.mode=void 0,this.range=[],this.rangeKey=void 0,this.height=void 0,this.columnId=void 0,this.updateHeight=void 0,this.updateDay=void 0,this.startY=void 0,this.preY=void 0,this.hadMove=void 0,this.touchEnd=void 0,this.isMove=void 0}getPosition(){const t=`translate3d(0, ${this.height}px, 0)`,i=`transform ${this.touchEnd?.3:0}s`;return{transform:t,"-webkit-transform":t,transition:i,"-webkit-transition":i}}formulaUnlimitedScroll(t,i,s){const{height:e,updateHeight:h,columnId:n}=this,o="up"===s?1:-1;this.touchEnd=!1,h(-t*o*w+e,n),requestAnimationFrame((()=>{this.touchEnd=!0;const s=Math.round(i/-34)+t*o;h(_-w*s,n,!0)}))}async handleMoveStart(t){this.startY=t,this.preY=t,this.hadMove=!1}async handleMoving(t){const i=t,s=i-this.preY;this.preY=i,this.touchEnd=!1,Math.abs(i-this.startY)>10&&(this.hadMove=!0);let e=this.height+s;"time"===this.mode&&("0"===this.columnId?(e>0&&(e=-816+s),e<-850&&(e=-34+s)):"1"===this.columnId&&(e>0&&(e=-2040+s),e<-2074&&(e=-34+s))),this.updateHeight(e,this.columnId)}async handleMoveEnd(t){const{mode:i,range:s,height:e,updateHeight:h,columnId:n}=this,o=-34*(s.length-1),r=t;let a;if(this.touchEnd=!0,this.hadMove)a=e-_;else{const t=window.innerHeight;if(a=e-_-(r-(t-119)),"time"===i)if("0"===n){if(a>-85)return this.formulaUnlimitedScroll(24,a,"up");if(a<-969)return this.formulaUnlimitedScroll(24,a,"down")}else if("1"===n){if(a>-85)return this.formulaUnlimitedScroll(60,a,"up");if(a<-2193)return this.formulaUnlimitedScroll(60,a,"down")}}a>0&&(a=0),a<o&&(a=o);const c=Math.round(a/-34),u=_-w*c;"date"===this.mode&&"function"==typeof this.updateDay&&("0"===this.columnId&&this.updateDay(+this.range[c].replace(/[^0-9]/gi,""),0),"1"===this.columnId&&this.updateDay(+this.range[c].replace(/[^0-9]/gi,""),1),"2"===this.columnId&&this.updateDay(+this.range[c].replace(/[^0-9]/gi,""),2)),h(u,n,"time"===i),this.onColumnChange.emit({columnId:n,height:u})}onMouseDown(t){this.isMove=!0,this.handleMoveStart(t.clientY)}onMouseMove(t){this.isMove&&this.handleMoving(t.clientY)}onMouseMoveEnd(t){this.isMove&&(this.isMove=!1,this.handleMoveEnd(t.clientY))}onTouchStart(t){this.handleMoveStart(t.changedTouches[0].clientY)}onTouchMove(t){this.handleMoving(t.changedTouches[0].clientY)}onTouchEnd(t){this.handleMoveEnd(t.changedTouches[0].clientY)}render(){const{range:t,rangeKey:i}=this,h=t.map((t=>s("div",{class:"weui-picker__item"},i?t[i]:t)));return s(e,{class:"weui-picker__group"},s("div",{class:"weui-picker__mask"}),s("div",{class:"weui-picker__indicator"}),s("div",{class:"weui-picker__content",style:this.getPosition()},h))}};export{k as taro_picker_core,y as taro_picker_group}
@@ -1 +1 @@
1
- import{r as s,c as t,h as a,H as e}from"./p-9137dcab.js";import i from"@tarojs/taro";import{c as r}from"./p-2fad2a65.js";const o=class{constructor(a){s(this,a),this.onSuccess=t(this,"cuccess",7),this.onFail=t(this,"fail",7),this.onComplete=t(this,"complete",7),this.hoverClass=void 0,this.url=void 0,this.openType="navigate",this.isHover=!1,this.delta=0}onClick(){const{openType:s,onSuccess:t,onFail:a,onComplete:e}=this;let r=Promise.resolve();switch(s){case"navigate":r=i.navigateTo({url:this.url});break;case"redirect":r=i.redirectTo({url:this.url});break;case"switchTab":r=i.switchTab({url:this.url});break;case"reLaunch":r=i.reLaunch({url:this.url});break;case"navigateBack":r=i.navigateBack({delta:this.delta});break;case"exit":r=Promise.reject(new Error('navigator:fail 暂不支持"openType: exit"'))}r&&r.then((s=>{t.emit(s)})).catch((s=>{a.emit(s)})).finally((()=>{e.emit()}))}render(){const{isHover:s,hoverClass:t}=this;return a(e,{class:r({[t]:s})})}};o.style=".navigator-hover{background:#efefef}";export{o as taro_navigator_core}
1
+ import{r as s,c as t,h as e,H as a}from"./p-9137dcab.js";import i from"@tarojs/taro";import{c as r}from"./p-de951a46.js";const o=class{constructor(e){s(this,e),this.onSuccess=t(this,"cuccess",7),this.onFail=t(this,"fail",7),this.onComplete=t(this,"complete",7),this.hoverClass=void 0,this.url=void 0,this.openType="navigate",this.isHover=!1,this.delta=0}onClick(){const{openType:s,onSuccess:t,onFail:e,onComplete:a}=this;let r=Promise.resolve();switch(s){case"navigate":r=i.navigateTo({url:this.url});break;case"redirect":r=i.redirectTo({url:this.url});break;case"switchTab":r=i.switchTab({url:this.url});break;case"reLaunch":r=i.reLaunch({url:this.url});break;case"navigateBack":r=i.navigateBack({delta:this.delta});break;case"exit":r=Promise.reject(new Error('navigator:fail 暂不支持"openType: exit"'))}r&&r.then((s=>{t.emit(s)})).catch((s=>{e.emit(s)})).finally((()=>{a.emit()}))}render(){const{isHover:s,hoverClass:t}=this;return e(a,{class:r({[t]:s})})}};o.style=".navigator-hover{background:#efefef}";export{o as taro_navigator_core}
@@ -1 +1 @@
1
- import{r as o,c as t,h as r,H as a,g as e}from"./p-9137dcab.js";import{c as i}from"./p-2fad2a65.js";const n=class{constructor(r){o(this,r),this.onSubmit=t(this,"tarobuttonsubmit",7),this.onReset=t(this,"tarobuttonreset",7),this.disabled=void 0,this.hoverClass="button-hover",this.type="",this.hoverStartTime=20,this.hoverStayTime=70,this.size=void 0,this.plain=void 0,this.loading=!1,this.formType=null,this.hover=!1,this.touch=!1}onClick(o){this.disabled&&o.stopPropagation()}onTouchStart(){this.disabled||(this.touch=!0,this.hoverClass&&!this.disabled&&setTimeout((()=>{this.touch&&(this.hover=!0)}),this.hoverStartTime))}onTouchEnd(){this.disabled||(this.touch=!1,this.hoverClass&&!this.disabled&&setTimeout((()=>{this.touch||(this.hover=!1)}),this.hoverStayTime),"submit"===this.formType?this.onSubmit.emit():"reset"===this.formType&&this.onReset.emit())}render(){const{disabled:o,hoverClass:t,type:e,size:n,plain:b,loading:c,hover:d}=this,l=i({[`${t}`]:d&&!o});return r(a,{class:l,type:e,plain:b,loading:c,size:n,disabled:o},c&&r("i",{class:"weui-loading"}),r("slot",null))}get el(){return e(this)}};n.style='taro-button-core{display:block;overflow:hidden;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;margin-left:auto;margin-right:auto;padding-left:14px;padding-right:14px;border-width:0;border-radius:5px;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;background-color:#f8f8f8;line-height:2.55555556;text-decoration:none;text-align:center;font-size:18px;color:#000;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}taro-button-core:focus{outline:0}taro-button-core:not([disabled]):active{background-color:#dedede;color:rgba(0, 0, 0, 0.6)}taro-button-core::after{position:absolute;left:0;top:0;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid rgba(0, 0, 0, 0.2);border-radius:10px;width:200%;height:200%;content:" ";-webkit-transform:scale(0.5);transform:scale(0.5);-webkit-transform-origin:0 0;transform-origin:0 0}taro-button-core+taro-button-core{margin-top:15px}taro-button-core[type=default]{background-color:#f8f8f8;color:#000}taro-button-core[type=default]:not([disabled]):visited{color:#000}taro-button-core[type=default]:not([disabled]):active{background-color:#dedede;color:rgba(0, 0, 0, 0.6)}taro-button-core[size=mini]{display:inline-block;padding:0 1.32em;width:auto;line-height:2.3;font-size:13px}taro-button-core[plain],taro-button-core[plain][type=default],taro-button-core[plain][type=primary]{border-width:1px;background-color:transparent}taro-button-core[disabled]{color:rgba(255, 255, 255, 0.6)}taro-button-core[disabled][type=default]{background-color:#f7f7f7;color:rgba(0, 0, 0, 0.3)}taro-button-core[disabled][type=primary]{background-color:#9ed99d}taro-button-core[disabled][type=warn]{background-color:#ec8b89}taro-button-core[loading] .weui-loading{margin:-0.2em 0.34em 0 0}taro-button-core[loading][type=primary],taro-button-core[loading][type=warn]{color:rgba(255, 255, 255, 0.6)}taro-button-core[loading][type=primary]{background-color:#179b16}taro-button-core[loading][type=warn]{background-color:#ce3c39}taro-button-core[plain][type=primary]{border:1px solid #1aad19;color:#1aad19}taro-button-core[plain][type=primary]:not([disabled]):active{border-color:rgba(26, 173, 25, 0.6);background-color:transparent;color:rgba(26, 173, 25, 0.6)}taro-button-core[plain][type=primary]::after{border-width:0}taro-button-core[plain],taro-button-core[plain][type=default]{border:1px solid #353535;color:#353535}taro-button-core[plain]:not([disabled]):active,taro-button-core[plain][type=default]:not([disabled]):active{border-color:rgba(53, 53, 53, 0.6);background-color:transparent;color:rgba(53, 53, 53, 0.6)}taro-button-core[plain]::after,taro-button-core[plain][type=default]::after{border-width:0}taro-button-core[type=primary]{background-color:#1aad19;color:#fff}taro-button-core[type=primary]:not([disabled]):visited{color:#fff}taro-button-core[type=primary]:not([disabled]):active{background-color:#179b16;color:rgba(255, 255, 255, 0.6)}taro-button-core[type=warn]{background-color:#e64340;color:#fff}taro-button-core[type=warn]:not([disabled]):visited{color:#fff}taro-button-core[type=warn]:not([disabled]):active{background-color:#ce3c39;color:rgba(255, 255, 255, 0.6)}taro-button-core[plain][disabled]{border:1px solid rgba(0, 0, 0, 0.2);background-color:#f7f7f7;color:rgba(0, 0, 0, 0.3)}taro-button-core[plain][disabled][type=primary]{border:1px solid rgba(0, 0, 0, 0.2);background-color:#f7f7f7;color:rgba(0, 0, 0, 0.3)}';export{n as taro_button_core}
1
+ import{r as o,c as t,h as r,H as a,g as e}from"./p-9137dcab.js";import{c as i}from"./p-de951a46.js";const n=class{constructor(r){o(this,r),this.onSubmit=t(this,"tarobuttonsubmit",7),this.onReset=t(this,"tarobuttonreset",7),this.disabled=void 0,this.hoverClass="button-hover",this.type="",this.hoverStartTime=20,this.hoverStayTime=70,this.size=void 0,this.plain=void 0,this.loading=!1,this.formType=null,this.hover=!1,this.touch=!1}onClick(o){this.disabled&&o.stopPropagation()}onTouchStart(){this.disabled||(this.touch=!0,this.hoverClass&&!this.disabled&&setTimeout((()=>{this.touch&&(this.hover=!0)}),this.hoverStartTime))}onTouchEnd(){this.disabled||(this.touch=!1,this.hoverClass&&!this.disabled&&setTimeout((()=>{this.touch||(this.hover=!1)}),this.hoverStayTime),"submit"===this.formType?this.onSubmit.emit():"reset"===this.formType&&this.onReset.emit())}render(){const{disabled:o,hoverClass:t,type:e,size:n,plain:b,loading:c,hover:d}=this,l=i({[`${t}`]:d&&!o});return r(a,{class:l,type:e,plain:b,loading:c,size:n,disabled:o},c&&r("i",{class:"weui-loading"}),r("slot",null))}get el(){return e(this)}};n.style='taro-button-core{display:block;overflow:hidden;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;margin-left:auto;margin-right:auto;padding-left:14px;padding-right:14px;border-width:0;border-radius:5px;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;background-color:#f8f8f8;line-height:2.55555556;text-decoration:none;text-align:center;font-size:18px;color:#000;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}taro-button-core:focus{outline:0}taro-button-core:not([disabled]):active{background-color:#dedede;color:rgba(0, 0, 0, 0.6)}taro-button-core::after{position:absolute;left:0;top:0;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid rgba(0, 0, 0, 0.2);border-radius:10px;width:200%;height:200%;content:" ";-webkit-transform:scale(0.5);transform:scale(0.5);-webkit-transform-origin:0 0;transform-origin:0 0}taro-button-core+taro-button-core{margin-top:15px}taro-button-core[type=default]{background-color:#f8f8f8;color:#000}taro-button-core[type=default]:not([disabled]):visited{color:#000}taro-button-core[type=default]:not([disabled]):active{background-color:#dedede;color:rgba(0, 0, 0, 0.6)}taro-button-core[size=mini]{display:inline-block;padding:0 1.32em;width:auto;line-height:2.3;font-size:13px}taro-button-core[plain],taro-button-core[plain][type=default],taro-button-core[plain][type=primary]{border-width:1px;background-color:transparent}taro-button-core[disabled]{color:rgba(255, 255, 255, 0.6)}taro-button-core[disabled][type=default]{background-color:#f7f7f7;color:rgba(0, 0, 0, 0.3)}taro-button-core[disabled][type=primary]{background-color:#9ed99d}taro-button-core[disabled][type=warn]{background-color:#ec8b89}taro-button-core[loading] .weui-loading{margin:-0.2em 0.34em 0 0}taro-button-core[loading][type=primary],taro-button-core[loading][type=warn]{color:rgba(255, 255, 255, 0.6)}taro-button-core[loading][type=primary]{background-color:#179b16}taro-button-core[loading][type=warn]{background-color:#ce3c39}taro-button-core[plain][type=primary]{border:1px solid #1aad19;color:#1aad19}taro-button-core[plain][type=primary]:not([disabled]):active{border-color:rgba(26, 173, 25, 0.6);background-color:transparent;color:rgba(26, 173, 25, 0.6)}taro-button-core[plain][type=primary]::after{border-width:0}taro-button-core[plain][type=warn]{border:1px solid #e64340;color:#e64340}taro-button-core[plain][type=warn]:not([disabled]):active{border-color:rgba(230, 67, 64, 0.6);background-color:transparent;color:rgba(230, 67, 64, 0.6)}taro-button-core[plain][type=warn]::after{border-width:0}taro-button-core[plain],taro-button-core[plain][type=default]{border:1px solid #353535;color:#353535}taro-button-core[plain]:not([disabled]):active,taro-button-core[plain][type=default]:not([disabled]):active{border-color:rgba(53, 53, 53, 0.6);background-color:transparent;color:rgba(53, 53, 53, 0.6)}taro-button-core[plain]::after,taro-button-core[plain][type=default]::after{border-width:0}taro-button-core[type=primary]{background-color:#1aad19;color:#fff}taro-button-core[type=primary]:not([disabled]):visited{color:#fff}taro-button-core[type=primary]:not([disabled]):active{background-color:#179b16;color:rgba(255, 255, 255, 0.6)}taro-button-core[type=warn]{background-color:#e64340;color:#fff}taro-button-core[type=warn]:not([disabled]):visited{color:#fff}taro-button-core[type=warn]:not([disabled]):active{background-color:#ce3c39;color:rgba(255, 255, 255, 0.6)}taro-button-core[plain][disabled]{border:1px solid rgba(0, 0, 0, 0.2);background-color:#f7f7f7;color:rgba(0, 0, 0, 0.3)}taro-button-core[plain][disabled][type=primary]{border:1px solid rgba(0, 0, 0, 0.2);background-color:#f7f7f7;color:rgba(0, 0, 0, 0.3)}';export{n as taro_button_core}