@tarojs/components 3.6.0-canary.10 → 3.6.0-canary.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +3 -5
  2. package/dist/cjs/taro-swiper-core_2.cjs.entry.js.map +1 -1
  3. package/dist/collection/components/swiper/swiper.js +3 -5
  4. package/dist/collection/components/swiper/swiper.js.map +1 -1
  5. package/dist/components/helper.js +15 -0
  6. package/dist/components/helper.js.map +1 -0
  7. package/dist/components/hls.js +27622 -0
  8. package/dist/components/hls.js.map +1 -0
  9. package/dist/components/index.d.ts +97 -0
  10. package/dist/components/index.js +79 -0
  11. package/dist/components/index.js.map +1 -0
  12. package/dist/components/index2.js +78 -0
  13. package/dist/components/index2.js.map +1 -0
  14. package/dist/components/index3.js +33 -0
  15. package/dist/components/index3.js.map +1 -0
  16. package/dist/components/intersection-observer.js +728 -0
  17. package/dist/components/intersection-observer.js.map +1 -0
  18. package/dist/components/picker-group.js +220 -0
  19. package/dist/components/picker-group.js.map +1 -0
  20. package/dist/components/taro-ad-core.d.ts +11 -0
  21. package/dist/components/taro-ad-core.js +35 -0
  22. package/dist/components/taro-ad-core.js.map +1 -0
  23. package/dist/components/taro-ad-custom-core.d.ts +11 -0
  24. package/dist/components/taro-ad-custom-core.js +35 -0
  25. package/dist/components/taro-ad-custom-core.js.map +1 -0
  26. package/dist/components/taro-animation-video-core.d.ts +11 -0
  27. package/dist/components/taro-animation-video-core.js +35 -0
  28. package/dist/components/taro-animation-video-core.js.map +1 -0
  29. package/dist/components/taro-animation-view-core.d.ts +11 -0
  30. package/dist/components/taro-animation-view-core.js +35 -0
  31. package/dist/components/taro-animation-view-core.js.map +1 -0
  32. package/dist/components/taro-ar-camera-core.d.ts +11 -0
  33. package/dist/components/taro-ar-camera-core.js +35 -0
  34. package/dist/components/taro-ar-camera-core.js.map +1 -0
  35. package/dist/components/taro-audio-core.d.ts +11 -0
  36. package/dist/components/taro-audio-core.js +80 -0
  37. package/dist/components/taro-audio-core.js.map +1 -0
  38. package/dist/components/taro-aweme-data-core.d.ts +11 -0
  39. package/dist/components/taro-aweme-data-core.js +35 -0
  40. package/dist/components/taro-aweme-data-core.js.map +1 -0
  41. package/dist/components/taro-block-core.d.ts +11 -0
  42. package/dist/components/taro-block-core.js +31 -0
  43. package/dist/components/taro-block-core.js.map +1 -0
  44. package/dist/components/taro-button-core.d.ts +11 -0
  45. package/dist/components/taro-button-core.js +102 -0
  46. package/dist/components/taro-button-core.js.map +1 -0
  47. package/dist/components/taro-camera-core.d.ts +11 -0
  48. package/dist/components/taro-camera-core.js +35 -0
  49. package/dist/components/taro-camera-core.js.map +1 -0
  50. package/dist/components/taro-canvas-core.d.ts +11 -0
  51. package/dist/components/taro-canvas-core.js +57 -0
  52. package/dist/components/taro-canvas-core.js.map +1 -0
  53. package/dist/components/taro-checkbox-core.d.ts +11 -0
  54. package/dist/components/taro-checkbox-core.js +81 -0
  55. package/dist/components/taro-checkbox-core.js.map +1 -0
  56. package/dist/components/taro-checkbox-group-core.d.ts +11 -0
  57. package/dist/components/taro-checkbox-group-core.js +71 -0
  58. package/dist/components/taro-checkbox-group-core.js.map +1 -0
  59. package/dist/components/taro-comment-detail-core.d.ts +11 -0
  60. package/dist/components/taro-comment-detail-core.js +35 -0
  61. package/dist/components/taro-comment-detail-core.js.map +1 -0
  62. package/dist/components/taro-comment-list-core.d.ts +11 -0
  63. package/dist/components/taro-comment-list-core.js +35 -0
  64. package/dist/components/taro-comment-list-core.js.map +1 -0
  65. package/dist/components/taro-contact-button-core.d.ts +11 -0
  66. package/dist/components/taro-contact-button-core.js +35 -0
  67. package/dist/components/taro-contact-button-core.js.map +1 -0
  68. package/dist/components/taro-cover-image-core.d.ts +11 -0
  69. package/dist/components/taro-cover-image-core.js +52 -0
  70. package/dist/components/taro-cover-image-core.js.map +1 -0
  71. package/dist/components/taro-cover-view-core.d.ts +11 -0
  72. package/dist/components/taro-cover-view-core.js +89 -0
  73. package/dist/components/taro-cover-view-core.js.map +1 -0
  74. package/dist/components/taro-custom-wrapper-core.d.ts +11 -0
  75. package/dist/components/taro-custom-wrapper-core.js +31 -0
  76. package/dist/components/taro-custom-wrapper-core.js.map +1 -0
  77. package/dist/components/taro-editor-core.d.ts +11 -0
  78. package/dist/components/taro-editor-core.js +35 -0
  79. package/dist/components/taro-editor-core.js.map +1 -0
  80. package/dist/components/taro-follow-swan-core.d.ts +11 -0
  81. package/dist/components/taro-follow-swan-core.js +35 -0
  82. package/dist/components/taro-follow-swan-core.js.map +1 -0
  83. package/dist/components/taro-form-core.d.ts +11 -0
  84. package/dist/components/taro-form-core.js +140 -0
  85. package/dist/components/taro-form-core.js.map +1 -0
  86. package/dist/components/taro-functional-page-navigator-core.d.ts +11 -0
  87. package/dist/components/taro-functional-page-navigator-core.js +35 -0
  88. package/dist/components/taro-functional-page-navigator-core.js.map +1 -0
  89. package/dist/components/taro-icon-core.d.ts +11 -0
  90. package/dist/components/taro-icon-core.js +48 -0
  91. package/dist/components/taro-icon-core.js.map +1 -0
  92. package/dist/components/taro-image-core.d.ts +11 -0
  93. package/dist/components/taro-image-core.js +81 -0
  94. package/dist/components/taro-image-core.js.map +1 -0
  95. package/dist/components/taro-inline-payment-panel-core.d.ts +11 -0
  96. package/dist/components/taro-inline-payment-panel-core.js +35 -0
  97. package/dist/components/taro-inline-payment-panel-core.js.map +1 -0
  98. package/dist/components/taro-input-core.d.ts +11 -0
  99. package/dist/components/taro-input-core.js +246 -0
  100. package/dist/components/taro-input-core.js.map +1 -0
  101. package/dist/components/taro-keyboard-accessory-core.d.ts +11 -0
  102. package/dist/components/taro-keyboard-accessory-core.js +35 -0
  103. package/dist/components/taro-keyboard-accessory-core.js.map +1 -0
  104. package/dist/components/taro-label-core.d.ts +11 -0
  105. package/dist/components/taro-label-core.js +34 -0
  106. package/dist/components/taro-label-core.js.map +1 -0
  107. package/dist/components/taro-lifestyle-core.d.ts +11 -0
  108. package/dist/components/taro-lifestyle-core.js +35 -0
  109. package/dist/components/taro-lifestyle-core.js.map +1 -0
  110. package/dist/components/taro-like-core.d.ts +11 -0
  111. package/dist/components/taro-like-core.js +35 -0
  112. package/dist/components/taro-like-core.js.map +1 -0
  113. package/dist/components/taro-live-player-core.d.ts +11 -0
  114. package/dist/components/taro-live-player-core.js +35 -0
  115. package/dist/components/taro-live-player-core.js.map +1 -0
  116. package/dist/components/taro-live-pusher-core.d.ts +11 -0
  117. package/dist/components/taro-live-pusher-core.js +35 -0
  118. package/dist/components/taro-live-pusher-core.js.map +1 -0
  119. package/dist/components/taro-login-core.d.ts +11 -0
  120. package/dist/components/taro-login-core.js +35 -0
  121. package/dist/components/taro-login-core.js.map +1 -0
  122. package/dist/components/taro-lottie-core.d.ts +11 -0
  123. package/dist/components/taro-lottie-core.js +35 -0
  124. package/dist/components/taro-lottie-core.js.map +1 -0
  125. package/dist/components/taro-map-core.d.ts +11 -0
  126. package/dist/components/taro-map-core.js +35 -0
  127. package/dist/components/taro-map-core.js.map +1 -0
  128. package/dist/components/taro-match-media-core.d.ts +11 -0
  129. package/dist/components/taro-match-media-core.js +35 -0
  130. package/dist/components/taro-match-media-core.js.map +1 -0
  131. package/dist/components/taro-movable-area-core.d.ts +11 -0
  132. package/dist/components/taro-movable-area-core.js +175 -0
  133. package/dist/components/taro-movable-area-core.js.map +1 -0
  134. package/dist/components/taro-movable-view-core.d.ts +11 -0
  135. package/dist/components/taro-movable-view-core.js +361 -0
  136. package/dist/components/taro-movable-view-core.js.map +1 -0
  137. package/dist/components/taro-native-slot-core.d.ts +11 -0
  138. package/dist/components/taro-native-slot-core.js +35 -0
  139. package/dist/components/taro-native-slot-core.js.map +1 -0
  140. package/dist/components/taro-navigation-bar-core.d.ts +11 -0
  141. package/dist/components/taro-navigation-bar-core.js +35 -0
  142. package/dist/components/taro-navigation-bar-core.js.map +1 -0
  143. package/dist/components/taro-navigator-core.d.ts +11 -0
  144. package/dist/components/taro-navigator-core.js +96 -0
  145. package/dist/components/taro-navigator-core.js.map +1 -0
  146. package/dist/components/taro-official-account-core.d.ts +11 -0
  147. package/dist/components/taro-official-account-core.js +35 -0
  148. package/dist/components/taro-official-account-core.js.map +1 -0
  149. package/dist/components/taro-open-data-core.d.ts +11 -0
  150. package/dist/components/taro-open-data-core.js +35 -0
  151. package/dist/components/taro-open-data-core.js.map +1 -0
  152. package/dist/components/taro-page-container-core.d.ts +11 -0
  153. package/dist/components/taro-page-container-core.js +35 -0
  154. package/dist/components/taro-page-container-core.js.map +1 -0
  155. package/dist/components/taro-page-meta-core.d.ts +11 -0
  156. package/dist/components/taro-page-meta-core.js +35 -0
  157. package/dist/components/taro-page-meta-core.js.map +1 -0
  158. package/dist/components/taro-picker-core.d.ts +11 -0
  159. package/dist/components/taro-picker-core.js +538 -0
  160. package/dist/components/taro-picker-core.js.map +1 -0
  161. package/dist/components/taro-picker-group.d.ts +11 -0
  162. package/dist/components/taro-picker-group.js +8 -0
  163. package/dist/components/taro-picker-group.js.map +1 -0
  164. package/dist/components/taro-picker-view-column-core.d.ts +11 -0
  165. package/dist/components/taro-picker-view-column-core.js +115 -0
  166. package/dist/components/taro-picker-view-column-core.js.map +1 -0
  167. package/dist/components/taro-picker-view-core.d.ts +11 -0
  168. package/dist/components/taro-picker-view-core.js +114 -0
  169. package/dist/components/taro-picker-view-core.js.map +1 -0
  170. package/dist/components/taro-progress-core.d.ts +11 -0
  171. package/dist/components/taro-progress-core.js +62 -0
  172. package/dist/components/taro-progress-core.js.map +1 -0
  173. package/dist/components/taro-pull-to-refresh.d.ts +11 -0
  174. package/dist/components/taro-pull-to-refresh.js +284 -0
  175. package/dist/components/taro-pull-to-refresh.js.map +1 -0
  176. package/dist/components/taro-radio-core.d.ts +11 -0
  177. package/dist/components/taro-radio-core.js +83 -0
  178. package/dist/components/taro-radio-core.js.map +1 -0
  179. package/dist/components/taro-radio-group-core.d.ts +11 -0
  180. package/dist/components/taro-radio-group-core.js +82 -0
  181. package/dist/components/taro-radio-group-core.js.map +1 -0
  182. package/dist/components/taro-rich-text-core.d.ts +11 -0
  183. package/dist/components/taro-rich-text-core.js +86 -0
  184. package/dist/components/taro-rich-text-core.js.map +1 -0
  185. package/dist/components/taro-root-portal-core.d.ts +11 -0
  186. package/dist/components/taro-root-portal-core.js +35 -0
  187. package/dist/components/taro-root-portal-core.js.map +1 -0
  188. package/dist/components/taro-rtc-room-core.d.ts +11 -0
  189. package/dist/components/taro-rtc-room-core.js +35 -0
  190. package/dist/components/taro-rtc-room-core.js.map +1 -0
  191. package/dist/components/taro-rtc-room-item-core.d.ts +11 -0
  192. package/dist/components/taro-rtc-room-item-core.js +35 -0
  193. package/dist/components/taro-rtc-room-item-core.js.map +1 -0
  194. package/dist/components/taro-scroll-view-core.d.ts +11 -0
  195. package/dist/components/taro-scroll-view-core.js +184 -0
  196. package/dist/components/taro-scroll-view-core.js.map +1 -0
  197. package/dist/components/taro-share-element-core.d.ts +11 -0
  198. package/dist/components/taro-share-element-core.js +35 -0
  199. package/dist/components/taro-share-element-core.js.map +1 -0
  200. package/dist/components/taro-slider-core.d.ts +11 -0
  201. package/dist/components/taro-slider-core.js +196 -0
  202. package/dist/components/taro-slider-core.js.map +1 -0
  203. package/dist/components/taro-slot-core.d.ts +11 -0
  204. package/dist/components/taro-slot-core.js +35 -0
  205. package/dist/components/taro-slot-core.js.map +1 -0
  206. package/dist/components/taro-swiper-core.d.ts +11 -0
  207. package/dist/components/taro-swiper-core.js +10165 -0
  208. package/dist/components/taro-swiper-core.js.map +1 -0
  209. package/dist/components/taro-swiper-item-core.d.ts +11 -0
  210. package/dist/components/taro-swiper-item-core.js +34 -0
  211. package/dist/components/taro-swiper-item-core.js.map +1 -0
  212. package/dist/components/taro-switch-core.d.ts +11 -0
  213. package/dist/components/taro-switch-core.js +87 -0
  214. package/dist/components/taro-switch-core.js.map +1 -0
  215. package/dist/components/taro-tab-item-core.d.ts +11 -0
  216. package/dist/components/taro-tab-item-core.js +35 -0
  217. package/dist/components/taro-tab-item-core.js.map +1 -0
  218. package/dist/components/taro-tabbar.d.ts +11 -0
  219. package/dist/components/taro-tabbar.js +457 -0
  220. package/dist/components/taro-tabbar.js.map +1 -0
  221. package/dist/components/taro-tabs-core.d.ts +11 -0
  222. package/dist/components/taro-tabs-core.js +35 -0
  223. package/dist/components/taro-tabs-core.js.map +1 -0
  224. package/dist/components/taro-text-core.d.ts +11 -0
  225. package/dist/components/taro-text-core.js +41 -0
  226. package/dist/components/taro-text-core.js.map +1 -0
  227. package/dist/components/taro-textarea-core.d.ts +11 -0
  228. package/dist/components/taro-textarea-core.js +164 -0
  229. package/dist/components/taro-textarea-core.js.map +1 -0
  230. package/dist/components/taro-video-control.d.ts +11 -0
  231. package/dist/components/taro-video-control.js +8 -0
  232. package/dist/components/taro-video-control.js.map +1 -0
  233. package/dist/components/taro-video-core.d.ts +11 -0
  234. package/dist/components/taro-video-core.js +485 -0
  235. package/dist/components/taro-video-core.js.map +1 -0
  236. package/dist/components/taro-video-danmu.d.ts +11 -0
  237. package/dist/components/taro-video-danmu.js +8 -0
  238. package/dist/components/taro-video-danmu.js.map +1 -0
  239. package/dist/components/taro-view-core.d.ts +11 -0
  240. package/dist/components/taro-view-core.js +101 -0
  241. package/dist/components/taro-view-core.js.map +1 -0
  242. package/dist/components/taro-voip-room-core.d.ts +11 -0
  243. package/dist/components/taro-voip-room-core.js +35 -0
  244. package/dist/components/taro-voip-room-core.js.map +1 -0
  245. package/dist/components/taro-web-view-core.d.ts +11 -0
  246. package/dist/components/taro-web-view-core.js +46 -0
  247. package/dist/components/taro-web-view-core.js.map +1 -0
  248. package/dist/components/video-control.js +233 -0
  249. package/dist/components/video-control.js.map +1 -0
  250. package/dist/components/video-danmu.js +110 -0
  251. package/dist/components/video-danmu.js.map +1 -0
  252. package/dist/esm/taro-swiper-core_2.entry.js +3 -5
  253. package/dist/esm/taro-swiper-core_2.entry.js.map +1 -1
  254. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  255. package/dist/esm-es5/taro-swiper-core_2.entry.js.map +1 -1
  256. package/dist/taro-components/{p-d388c097.entry.js → p-22315b9d.entry.js} +2 -2
  257. package/dist/taro-components/p-22315b9d.entry.js.map +1 -0
  258. package/dist/taro-components/{p-6831f7b1.system.entry.js → p-c3c37cbb.system.entry.js} +2 -2
  259. package/dist/taro-components/p-c3c37cbb.system.entry.js.map +1 -0
  260. package/dist/taro-components/p-cb17d8bd.system.js +1 -1
  261. package/dist/taro-components/taro-components.esm.js +1 -1
  262. package/lib/react/components.d.ts +82 -0
  263. package/lib/react/components.js +85 -0
  264. package/lib/react/components.js.map +1 -0
  265. package/lib/react/helper.d.ts +10 -0
  266. package/lib/react/helper.js +7 -0
  267. package/lib/react/helper.js.map +1 -0
  268. package/lib/react/index.d.ts +1 -0
  269. package/lib/react/index.js +2 -0
  270. package/lib/react/index.js.map +1 -0
  271. package/lib/react/interfaces-4f837811.d.ts +30 -0
  272. package/lib/react/react-component-lib/createComponent.d.ts +10 -0
  273. package/lib/react/react-component-lib/createComponent.js +70 -0
  274. package/lib/react/react-component-lib/createComponent.js.map +1 -0
  275. package/lib/react/react-component-lib/createOverlayComponent.d.ts +21 -0
  276. package/lib/react/react-component-lib/createOverlayComponent.js +91 -0
  277. package/lib/react/react-component-lib/createOverlayComponent.js.map +1 -0
  278. package/lib/react/react-component-lib/index.d.ts +2 -0
  279. package/lib/react/react-component-lib/index.js +3 -0
  280. package/lib/react/react-component-lib/index.js.map +1 -0
  281. package/lib/react/react-component-lib/utils/attachProps.d.ts +13 -0
  282. package/lib/react/react-component-lib/utils/attachProps.js +101 -0
  283. package/lib/react/react-component-lib/utils/attachProps.js.map +1 -0
  284. package/lib/react/react-component-lib/utils/case.d.ts +3 -0
  285. package/lib/react/react-component-lib/utils/case.js +9 -0
  286. package/lib/react/react-component-lib/utils/case.js.map +1 -0
  287. package/lib/react/react-component-lib/utils/index.d.ts +11 -0
  288. package/lib/react/react-component-lib/utils/index.js +37 -0
  289. package/lib/react/react-component-lib/utils/index.js.map +1 -0
  290. package/lib/vue2/components.d.ts +352 -0
  291. package/lib/vue2/components.js +620 -0
  292. package/lib/vue2/components.js.map +1 -0
  293. package/lib/vue2/index.d.ts +3 -0
  294. package/lib/vue2/index.js +21 -0
  295. package/lib/vue2/index.js.map +1 -0
  296. package/lib/vue2/vue-component-lib/utils.d.ts +6 -0
  297. package/lib/vue2/vue-component-lib/utils.js +32 -0
  298. package/lib/vue2/vue-component-lib/utils.js.map +1 -0
  299. package/lib/vue3/components.d.ts +82 -0
  300. package/lib/vue3/components.js +386 -0
  301. package/lib/vue3/components.js.map +1 -0
  302. package/lib/vue3/index.d.ts +3 -0
  303. package/lib/vue3/index.js +15 -0
  304. package/lib/vue3/index.js.map +1 -0
  305. package/lib/vue3/vue-component-lib/utils.d.ts +21 -0
  306. package/lib/vue3/vue-component-lib/utils.js +163 -0
  307. package/lib/vue3/vue-component-lib/utils.js.map +1 -0
  308. package/package.json +9 -7
  309. package/types/index.vue3.d.ts +4 -4
  310. package/dist/react/component-lib/index.js +0 -74
  311. package/dist/react/component-lib/input.js +0 -17
  312. package/dist/react/component-lib/reactify-wc.js +0 -206
  313. package/dist/react/components.js +0 -82
  314. package/dist/react/helper.js +0 -8
  315. package/dist/react/index.js +0 -1
  316. package/dist/react/react-component-lib/createComponent.js +0 -99
  317. package/dist/react/react-component-lib/createOverlayComponent.js +0 -178
  318. package/dist/react/react-component-lib/index.js +0 -2
  319. package/dist/react/react-component-lib/interfaces.js +0 -0
  320. package/dist/react/react-component-lib/utils/attachProps.js +0 -98
  321. package/dist/react/react-component-lib/utils/case.js +0 -10
  322. package/dist/react/react-component-lib/utils/dev.js +0 -12
  323. package/dist/react/react-component-lib/utils/index.js +0 -37
  324. package/dist/taro-components/p-6831f7b1.system.entry.js.map +0 -1
  325. package/dist/taro-components/p-d388c097.entry.js.map +0 -1
  326. package/dist/vue2/component-lib/components.js +0 -71
  327. package/dist/vue2/component-lib/createComponent.js +0 -21
  328. package/dist/vue2/component-lib/createFormsComponent.js +0 -53
  329. package/dist/vue2/component-lib/icon.js +0 -19
  330. package/dist/vue2/component-lib/image.js +0 -20
  331. package/dist/vue2/component-lib/index.js +0 -28
  332. package/dist/vue2/component-lib/mixins/listeners.js +0 -14
  333. package/dist/vue2/component-lib/mixins/refs.js +0 -44
  334. package/dist/vue2/component-lib/picker.js +0 -40
  335. package/dist/vue2/component-lib/scroll-view.js +0 -32
  336. package/dist/vue2/component-lib/text.js +0 -20
  337. package/dist/vue2/components.js +0 -542
  338. package/dist/vue2/index.js +0 -22
  339. package/dist/vue2/vue-component-lib/utils.js +0 -40
  340. package/dist/vue3/component-lib/createComponent.js +0 -23
  341. package/dist/vue3/component-lib/createFormsComponent.js +0 -43
  342. package/dist/vue3/component-lib/forwardRef.js +0 -9
  343. package/dist/vue3/component-lib/icon.js +0 -21
  344. package/dist/vue3/component-lib/image.js +0 -22
  345. package/dist/vue3/component-lib/index.js +0 -76
  346. package/dist/vue3/component-lib/scroll-view.js +0 -28
  347. package/dist/vue3/component-lib/text.js +0 -22
  348. package/dist/vue3/components.js +0 -80
  349. package/dist/vue3/index.js +0 -17
  350. package/dist/vue3/vue-component-lib/utils.js +0 -175
@@ -0,0 +1,80 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
+
3
+ const indexCss = "audio{max-width:100%;outline:none}";
4
+
5
+ const Audio = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ this.onError = createEvent(this, "error", 7);
10
+ this.onPlay = createEvent(this, "play", 7);
11
+ this.onPause = createEvent(this, "pause", 7);
12
+ this.onTimeUpdate = createEvent(this, "timeupdate", 7);
13
+ this.onEnded = createEvent(this, "ended", 7);
14
+ this.src = undefined;
15
+ this.controls = true;
16
+ this.autoplay = false;
17
+ this.loop = false;
18
+ this.muted = false;
19
+ this.nativeProps = {};
20
+ }
21
+ bindevent() {
22
+ this.audio.addEventListener('timeupdate', (e) => {
23
+ this.onTimeUpdate.emit({
24
+ duration: e.srcElement.duration,
25
+ currentTime: e.srcElement.duration
26
+ });
27
+ });
28
+ this.audio.addEventListener('ended', () => {
29
+ this.onEnded.emit();
30
+ });
31
+ this.audio.addEventListener('play', () => {
32
+ this.onPlay.emit();
33
+ });
34
+ this.audio.addEventListener('pause', (e) => {
35
+ this.onPause.emit(e);
36
+ });
37
+ // 1网络错误, 2解码错误, 3解码错误,4 不合适资源
38
+ this.audio.addEventListener('error', (e) => {
39
+ var _a;
40
+ this.onError.emit({
41
+ errMsg: (_a = e.srcElement.error) === null || _a === void 0 ? void 0 : _a.code
42
+ });
43
+ });
44
+ }
45
+ componentDidLoad() {
46
+ this.bindevent();
47
+ }
48
+ render() {
49
+ const { src, controls, autoplay, loop, muted, nativeProps } = this;
50
+ return (h("audio", Object.assign({ src: src, controls: controls, autoplay: autoplay, loop: loop, muted: muted, ref: audio => { this.audio = audio; } }, nativeProps)));
51
+ }
52
+ static get style() { return indexCss; }
53
+ }, [0, "taro-audio-core", {
54
+ "src": [1],
55
+ "controls": [4],
56
+ "autoplay": [4],
57
+ "loop": [4],
58
+ "muted": [4],
59
+ "nativeProps": [16]
60
+ }]);
61
+ function defineCustomElement$1() {
62
+ if (typeof customElements === "undefined") {
63
+ return;
64
+ }
65
+ const components = ["taro-audio-core"];
66
+ components.forEach(tagName => { switch (tagName) {
67
+ case "taro-audio-core":
68
+ if (!customElements.get(tagName)) {
69
+ customElements.define(tagName, Audio);
70
+ }
71
+ break;
72
+ } });
73
+ }
74
+
75
+ const TaroAudioCore = Audio;
76
+ const defineCustomElement = defineCustomElement$1;
77
+
78
+ export { TaroAudioCore, defineCustomElement };
79
+
80
+ //# sourceMappingURL=taro-audio-core.js.map
@@ -0,0 +1 @@
1
+ {"file":"taro-audio-core.js","mappings":";;AAAA,MAAM,QAAQ,GAAG,oCAAoC;;MCOxC,KAAK;;;;;;;;;;oBAEG,IAAI;oBACJ,KAAK;gBACT,KAAK;iBACJ,KAAK;uBACC,EAAE;;EAwBhB,SAAS;IACf,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAA8B;MACvE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;QACrB,QAAQ,EAAE,CAAC,CAAC,UAAW,CAAC,QAAQ;QAChC,WAAW,EAAE,CAAC,CAAC,UAAW,CAAC,QAAQ;OACpC,CAAC,CAAA;KACH,CAAC,CAAA;IAEF,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE;MACnC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAA;KACpB,CAAC,CAAA;IAEF,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE;MAClC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;KACnB,CAAC,CAAA;IAEF,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC;MACrC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KACrB,CAAC,CAAA;;IAGF,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAA8B;;MAClE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;QAChB,MAAM,EAAE,MAAA,CAAC,CAAC,UAAW,CAAC,KAAK,0CAAE,IAAI;OAClC,CAAC,CAAA;KACH,CAAC,CAAA;GACH;EAED,gBAAgB;IACd,IAAI,CAAC,SAAS,EAAE,CAAA;GACjB;EAED,MAAM;IACJ,MAAM,EACJ,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,WAAW,EACZ,GAAG,IAAI,CAAA;IACR,QACE,2BACE,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,KAAK,MAAM,IAAI,CAAC,KAAK,GAAG,KAAyB,CAAA,EAAE,IACpD,WAAW,EACf,EACH;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/audio/style/index.scss?tag=taro-audio-core","./src/components/audio/audio.tsx"],"sourcesContent":["@charset \"UTF-8\";\n\naudio {\n max-width: 100%;\n outline: none;\n}\n","import { Component, Prop, h, ComponentInterface, Event, EventEmitter } from '@stencil/core'\nimport { TaroEvent } from '../../../types'\n\n@Component({\n tag: 'taro-audio-core',\n styleUrl: './style/index.scss'\n})\nexport class Audio implements ComponentInterface {\n @Prop() src: string\n @Prop() controls = true\n @Prop() autoplay = false\n @Prop() loop = false\n @Prop() muted = false\n @Prop() nativeProps = {}\n\n @Event({\n eventName: 'error'\n }) onError: EventEmitter\n\n @Event({\n eventName: 'play'\n }) onPlay: EventEmitter\n\n @Event({\n eventName: 'pause'\n }) onPause: EventEmitter\n\n @Event({\n eventName: 'timeupdate'\n }) onTimeUpdate: EventEmitter\n\n @Event({\n eventName: 'ended'\n }) onEnded: EventEmitter\n\n private audio: HTMLAudioElement\n\n private bindevent () {\n this.audio.addEventListener('timeupdate', (e: TaroEvent<HTMLAudioElement>) => {\n this.onTimeUpdate.emit({\n duration: e.srcElement!.duration,\n currentTime: e.srcElement!.duration\n })\n })\n\n this.audio.addEventListener('ended', () => {\n this.onEnded.emit()\n })\n\n this.audio.addEventListener('play', () => {\n this.onPlay.emit()\n })\n\n this.audio.addEventListener('pause', (e) => {\n this.onPause.emit(e)\n })\n\n // 1网络错误, 2解码错误, 3解码错误,4 不合适资源\n this.audio.addEventListener('error', (e: TaroEvent<HTMLAudioElement>) => {\n this.onError.emit({\n errMsg: e.srcElement!.error?.code\n })\n })\n }\n\n componentDidLoad () {\n this.bindevent()\n }\n\n render () {\n const {\n src,\n controls,\n autoplay,\n loop,\n muted,\n nativeProps\n } = this\n return (\n <audio\n src={src}\n controls={controls}\n autoplay={autoplay}\n loop={loop}\n muted={muted}\n ref={audio => { this.audio = audio as HTMLAudioElement }}\n {...nativeProps}\n />\n )\n }\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface TaroAwemeDataCore extends Components.TaroAwemeDataCore, HTMLElement {}
4
+ export const TaroAwemeDataCore: {
5
+ prototype: TaroAwemeDataCore;
6
+ new (): TaroAwemeDataCore;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,35 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { n as notSupport } from './helper.js';
3
+
4
+ const AwemeData = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
5
+ constructor() {
6
+ super();
7
+ this.__registerHost();
8
+ }
9
+ componentDidLoad() {
10
+ notSupport('AwemeData', this);
11
+ }
12
+ render() {
13
+ return (h(Host, null));
14
+ }
15
+ }, [0, "taro-aweme-data-core"]);
16
+ function defineCustomElement$1() {
17
+ if (typeof customElements === "undefined") {
18
+ return;
19
+ }
20
+ const components = ["taro-aweme-data-core"];
21
+ components.forEach(tagName => { switch (tagName) {
22
+ case "taro-aweme-data-core":
23
+ if (!customElements.get(tagName)) {
24
+ customElements.define(tagName, AwemeData);
25
+ }
26
+ break;
27
+ } });
28
+ }
29
+
30
+ const TaroAwemeDataCore = AwemeData;
31
+ const defineCustomElement = defineCustomElement$1;
32
+
33
+ export { TaroAwemeDataCore, defineCustomElement };
34
+
35
+ //# sourceMappingURL=taro-aweme-data-core.js.map
@@ -0,0 +1 @@
1
+ {"file":"taro-aweme-data-core.js","mappings":";;;MAOa,SAAS;;;;;EACpB,gBAAgB;IACd,UAAU,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;GAC9B;EAED,MAAM;IACJ,QACE,EAAC,IAAI,OAAG,EACT;GACF;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/aweme-data/aweme-data.tsx"],"sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-aweme-data-core'\n})\nexport class AwemeData implements ComponentInterface {\n componentDidLoad () {\n notSupport('AwemeData', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface TaroBlockCore extends Components.TaroBlockCore, HTMLElement {}
4
+ export const TaroBlockCore: {
5
+ prototype: TaroBlockCore;
6
+ new (): TaroBlockCore;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,31 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+
3
+ const Block = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
4
+ constructor() {
5
+ super();
6
+ this.__registerHost();
7
+ }
8
+ render() {
9
+ return (h(Host, null));
10
+ }
11
+ }, [0, "taro-block-core"]);
12
+ function defineCustomElement$1() {
13
+ if (typeof customElements === "undefined") {
14
+ return;
15
+ }
16
+ const components = ["taro-block-core"];
17
+ components.forEach(tagName => { switch (tagName) {
18
+ case "taro-block-core":
19
+ if (!customElements.get(tagName)) {
20
+ customElements.define(tagName, Block);
21
+ }
22
+ break;
23
+ } });
24
+ }
25
+
26
+ const TaroBlockCore = Block;
27
+ const defineCustomElement = defineCustomElement$1;
28
+
29
+ export { TaroBlockCore, defineCustomElement };
30
+
31
+ //# sourceMappingURL=taro-block-core.js.map
@@ -0,0 +1 @@
1
+ {"file":"taro-block-core.js","mappings":";;MAKa,KAAK;;;;;EAChB,MAAM;IACJ,QACE,EAAC,IAAI,OAAG,EACT;GACF;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/block/block.tsx"],"sourcesContent":["import { Component, h, Host, ComponentInterface } from '@stencil/core'\n\n@Component({\n tag: 'taro-block-core'\n})\nexport class Block implements ComponentInterface {\n render () {\n return (\n <Host />\n )\n }\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface TaroButtonCore extends Components.TaroButtonCore, HTMLElement {}
4
+ export const TaroButtonCore: {
5
+ prototype: TaroButtonCore;
6
+ new (): TaroButtonCore;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,102 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { c as classnames } from './index2.js';
3
+
4
+ const indexCss = "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)}";
5
+
6
+ const Button = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.onSubmit = createEvent(this, "tarobuttonsubmit", 7);
11
+ this.onReset = createEvent(this, "tarobuttonreset", 7);
12
+ this.disabled = undefined;
13
+ this.hoverClass = 'button-hover';
14
+ this.type = '';
15
+ this.hoverStartTime = 20;
16
+ this.hoverStayTime = 70;
17
+ this.size = undefined;
18
+ this.plain = undefined;
19
+ this.loading = false;
20
+ this.formType = null;
21
+ this.hover = false;
22
+ this.touch = false;
23
+ }
24
+ onClick(e) {
25
+ if (this.disabled) {
26
+ e.stopPropagation();
27
+ }
28
+ }
29
+ onTouchStart() {
30
+ if (this.disabled) {
31
+ return;
32
+ }
33
+ this.touch = true;
34
+ if (this.hoverClass && !this.disabled) {
35
+ setTimeout(() => {
36
+ if (this.touch) {
37
+ this.hover = true;
38
+ }
39
+ }, this.hoverStartTime);
40
+ }
41
+ }
42
+ onTouchEnd() {
43
+ if (this.disabled) {
44
+ return;
45
+ }
46
+ this.touch = false;
47
+ if (this.hoverClass && !this.disabled) {
48
+ setTimeout(() => {
49
+ if (!this.touch) {
50
+ this.hover = false;
51
+ }
52
+ }, this.hoverStayTime);
53
+ }
54
+ if (this.formType === 'submit') {
55
+ this.onSubmit.emit();
56
+ }
57
+ else if (this.formType === 'reset') {
58
+ this.onReset.emit();
59
+ }
60
+ }
61
+ render() {
62
+ const { disabled, hoverClass, type, size, plain, loading, hover } = this;
63
+ const cls = classnames({
64
+ [`${hoverClass}`]: hover && !disabled
65
+ });
66
+ return (h(Host, { class: cls, type: type, plain: plain, loading: loading, size: size, disabled: disabled }, loading && h("i", { class: 'weui-loading' }), h("slot", null)));
67
+ }
68
+ get el() { return this; }
69
+ static get style() { return indexCss; }
70
+ }, [4, "taro-button-core", {
71
+ "disabled": [4],
72
+ "hoverClass": [1, "hover-class"],
73
+ "type": [1],
74
+ "hoverStartTime": [2, "hover-start-time"],
75
+ "hoverStayTime": [2, "hover-stay-time"],
76
+ "size": [1],
77
+ "plain": [4],
78
+ "loading": [4],
79
+ "formType": [513, "form-type"],
80
+ "hover": [32],
81
+ "touch": [32]
82
+ }, [[0, "click", "onClick"], [1, "touchstart", "onTouchStart"], [1, "touchend", "onTouchEnd"]]]);
83
+ function defineCustomElement$1() {
84
+ if (typeof customElements === "undefined") {
85
+ return;
86
+ }
87
+ const components = ["taro-button-core"];
88
+ components.forEach(tagName => { switch (tagName) {
89
+ case "taro-button-core":
90
+ if (!customElements.get(tagName)) {
91
+ customElements.define(tagName, Button);
92
+ }
93
+ break;
94
+ } });
95
+ }
96
+
97
+ const TaroButtonCore = Button;
98
+ const defineCustomElement = defineCustomElement$1;
99
+
100
+ export { TaroButtonCore, defineCustomElement };
101
+
102
+ //# sourceMappingURL=taro-button-core.js.map
@@ -0,0 +1 @@
1
+ {"file":"taro-button-core.js","mappings":";;;AAAA,MAAM,QAAQ,GAAG,41GAA41G;;MCOh2G,MAAM;;;;;;;sBAEI,cAAc;gBACpB,EAAE;0BACQ,EAAE;yBACH,EAAE;;;mBAGR,KAAK;oBACwC,IAAI;iBAIlD,KAAK;iBACL,KAAK;;EAWtB,OAAO,CAAE,CAAQ;IACf,IAAI,IAAI,CAAC,QAAQ,EAAE;MACjB,CAAC,CAAC,eAAe,EAAE,CAAA;KACpB;GACF;EAGD,YAAY;IACV,IAAI,IAAI,CAAC,QAAQ,EAAE;MACjB,OAAM;KACP;IAED,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;IACjB,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;MACrC,UAAU,CAAC;QACT,IAAI,IAAI,CAAC,KAAK,EAAE;UACd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;SAClB;OACF,EAAE,IAAI,CAAC,cAAc,CAAC,CAAA;KACxB;GACF;EAGD,UAAU;IACR,IAAI,IAAI,CAAC,QAAQ,EAAE;MACjB,OAAM;KACP;IAED,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IAClB,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;MACrC,UAAU,CAAC;QACT,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;UACf,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;SACnB;OACF,EAAE,IAAI,CAAC,aAAa,CAAC,CAAA;KACvB;IAED,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,EAAE;MAC9B,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAA;KACrB;SAAM,IAAI,IAAI,CAAC,QAAQ,KAAK,OAAO,EAAE;MACpC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAA;KACpB;GACF;EAED,MAAM;IACJ,MAAM,EACJ,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,OAAO,EACP,KAAK,EACN,GAAG,IAAI,CAAA;IAER,MAAM,GAAG,GAAGA,UAAU,CAAC;MACrB,CAAC,GAAG,UAAU,EAAE,GAAG,KAAK,IAAI,CAAC,QAAQ;KACtC,CAAC,CAAA;IAEF,QACE,EAAC,IAAI,IACH,KAAK,EAAE,GAAG,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,IAEjB,OAAO,IAAI,SAAG,KAAK,EAAC,cAAc,GAAG,EACtC,eAAQ,CACH,EACR;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["classNames"],"sources":["./src/components/button/style/index.scss?tag=taro-button-core","./src/components/button/button.tsx"],"sourcesContent":["$weuiBtnHeight: 46px;\n$weuiBtnFontSize: 18px;\n$weuiBtnFontColor: #fff;\n$weuiBtnActiveFontColor: rgb(255 255 255 / 60%);\n$weuiBtnDisabledFontColor: rgb(255 255 255 / 60%);\n$weuiBtnBorderRadius: 5px;\n$weuiBtnDefaultGap: 15px;\n\n// Button Mini\n$weuiBtnMiniFontSize: 13px;\n$weuiBtnMiniHeight: 2.3;\n\n// Button Default\n$weuiBtnDefaultFontColor: #000;\n$weuiBtnDefaultActiveFontColor: rgb(0 0 0 / 60%);\n$weuiBtnDefaultDisabledFontColor: rgb(0 0 0 / 30%);\n$weuiBtnDefaultBg: #f8f8f8;\n$weuiBtnDefaultActiveBg: #dedede;\n$weuiBtnDefaultDisabledBg: #f7f7f7;\n\n// Button Primary\n$weuiBtnPrimaryBg: #1aad19;\n$weuiBtnPrimaryActiveBg: #179b16;\n$weuiBtnPrimaryDisabledBg: #9ed99d;\n\n// Button Warn\n$weuiBtnWarnBg: #e64340;\n$weuiBtnWarnActiveBg: #ce3c39;\n$weuiBtnWarnDisabledBg: #ec8b89;\n\n// Button Plain Primary\n$weuiBtnPlainPrimaryColor: rgb(26 173 25 / 100%);\n$weuiBtnPlainPrimaryBorderColor: rgb(26 173 25 / 100%);\n$weuiBtnPlainPrimaryActiveColor: rgb(26 173 25 / 60%);\n$weuiBtnPlainPrimaryActiveBorderColor: rgb(26 173 25 / 60%);\n\n// Button Plain Default\n$weuiBtnPlainDefaultColor: rgb(53 53 53 / 100%);\n$weuiBtnPlainDefaultBorderColor: rgb(53 53 53 / 100%);\n$weuiBtnPlainDefaultActiveColor: rgb(53 53 53 / 60%);\n$weuiBtnPlainDefaultActiveBorderColor: rgb(53 53 53 / 60%);\n\ntaro-button-core {\n display: block;\n overflow: hidden;\n position: relative;\n box-sizing: border-box;\n margin-left: auto;\n margin-right: auto;\n padding-left: 14px;\n padding-right: 14px;\n border-width: 0;\n border-radius: $weuiBtnBorderRadius;\n width: 100%;\n appearance: none;\n outline: 0;\n background-color: $weuiBtnDefaultBg;\n line-height: 2.55555556;\n text-decoration: none;\n text-align: center;\n font-size: $weuiBtnFontSize;\n color: $weuiBtnDefaultFontColor;\n -webkit-tap-highlight-color: rgb(0 0 0 / 0%);\n\n &:focus {\n outline: 0;\n }\n\n &:not([disabled]):active {\n background-color: $weuiBtnDefaultActiveBg;\n color: $weuiBtnDefaultActiveFontColor;\n }\n\n &::after {\n position: absolute;\n left: 0;\n top: 0;\n box-sizing: border-box;\n border: 1px solid rgb(0 0 0 / 20%);\n border-radius: $weuiBtnBorderRadius * 2;\n width: 200%;\n height: 200%;\n content: \" \";\n transform: scale(0.5);\n transform-origin: 0 0;\n }\n\n & + & {\n margin-top: $weuiBtnDefaultGap;\n }\n\n &[type=\"default\"] {\n background-color: $weuiBtnDefaultBg;\n color: $weuiBtnDefaultFontColor;\n\n &:not([disabled]):visited {\n color: $weuiBtnDefaultFontColor;\n }\n\n &:not([disabled]):active {\n background-color: $weuiBtnDefaultActiveBg;\n color: $weuiBtnDefaultActiveFontColor;\n }\n }\n\n &[size=\"mini\"] {\n display: inline-block;\n padding: 0 1.32em;\n width: auto;\n line-height: $weuiBtnMiniHeight;\n font-size: $weuiBtnMiniFontSize;\n }\n\n &[plain],\n &[plain][type=\"default\"],\n &[plain][type=\"primary\"] {\n border-width: 1px;\n background-color: transparent;\n }\n\n &[disabled] {\n color: $weuiBtnDisabledFontColor;\n\n &[type=\"default\"] {\n background-color: $weuiBtnDefaultDisabledBg;\n color: $weuiBtnDefaultDisabledFontColor;\n }\n\n &[type=\"primary\"] {\n background-color: $weuiBtnPrimaryDisabledBg;\n }\n\n &[type=\"warn\"] {\n background-color: $weuiBtnWarnDisabledBg;\n }\n }\n\n &[loading] {\n .weui-loading {\n margin: -0.2em 0.34em 0 0;\n }\n\n &[type=\"primary\"],\n &[type=\"warn\"] {\n color: $weuiBtnActiveFontColor;\n }\n\n &[type=\"primary\"] {\n background-color: $weuiBtnPrimaryActiveBg;\n }\n\n &[type=\"warn\"] {\n background-color: $weuiBtnWarnActiveBg;\n }\n }\n\n &[plain][type=\"primary\"] {\n border: 1px solid $weuiBtnPlainPrimaryBorderColor;\n color: $weuiBtnPlainPrimaryColor;\n\n &:not([disabled]):active {\n border-color: $weuiBtnPlainPrimaryActiveBorderColor;\n background-color: transparent;\n color: $weuiBtnPlainPrimaryActiveColor;\n }\n\n &::after {\n border-width: 0;\n }\n }\n\n &[plain],\n &[plain][type=\"default\"] {\n border: 1px solid $weuiBtnPlainDefaultBorderColor;\n color: $weuiBtnPlainDefaultColor;\n\n &:not([disabled]):active {\n border-color: $weuiBtnPlainDefaultActiveBorderColor;\n background-color: transparent;\n color: $weuiBtnPlainDefaultActiveColor;\n }\n\n &::after {\n border-width: 0;\n }\n }\n\n &[type=\"primary\"] {\n background-color: $weuiBtnPrimaryBg;\n color: #fff;\n\n &:not([disabled]):visited {\n color: $weuiBtnFontColor;\n }\n\n &:not([disabled]):active {\n background-color: $weuiBtnPrimaryActiveBg;\n color: $weuiBtnActiveFontColor;\n }\n }\n\n &[type=\"warn\"] {\n background-color: $weuiBtnWarnBg;\n color: #fff;\n\n &:not([disabled]):visited {\n color: $weuiBtnFontColor;\n }\n\n &:not([disabled]):active {\n background-color: $weuiBtnWarnActiveBg;\n color: $weuiBtnActiveFontColor;\n }\n }\n\n &[plain][disabled] {\n border: 1px solid rgb(0 0 0 / 20%);\n background-color: #f7f7f7;\n color: rgb(0 0 0 / 30%);\n }\n\n &[plain][disabled][type=\"primary\"] {\n border: 1px solid rgb(0 0 0 / 20%);\n background-color: #f7f7f7;\n color: rgb(0 0 0 / 30%);\n }\n}\n","import { Component, h, Prop, State, ComponentInterface, Event, EventEmitter, Listen, Element, Host } from '@stencil/core'\nimport classNames from 'classnames'\n\n@Component({\n tag: 'taro-button-core',\n styleUrl: './style/index.scss'\n})\nexport class Button implements ComponentInterface {\n @Prop() disabled: boolean\n @Prop() hoverClass = 'button-hover'\n @Prop() type = ''\n @Prop() hoverStartTime = 20\n @Prop() hoverStayTime = 70\n @Prop() size: string\n @Prop() plain: boolean\n @Prop() loading = false\n @Prop({ reflect: true }) formType: 'submit' | 'reset' | null = null\n\n @Element() el: HTMLElement\n\n @State() hover = false\n @State() touch = false\n\n @Event({\n eventName: 'tarobuttonsubmit'\n }) onSubmit: EventEmitter\n\n @Event({\n eventName: 'tarobuttonreset'\n }) onReset: EventEmitter\n\n @Listen('click')\n onClick (e: Event) {\n if (this.disabled) {\n e.stopPropagation()\n }\n }\n\n @Listen('touchstart')\n onTouchStart () {\n if (this.disabled) {\n return\n }\n\n this.touch = true\n if (this.hoverClass && !this.disabled) {\n setTimeout(() => {\n if (this.touch) {\n this.hover = true\n }\n }, this.hoverStartTime)\n }\n }\n\n @Listen('touchend')\n onTouchEnd () {\n if (this.disabled) {\n return\n }\n\n this.touch = false\n if (this.hoverClass && !this.disabled) {\n setTimeout(() => {\n if (!this.touch) {\n this.hover = false\n }\n }, this.hoverStayTime)\n }\n\n if (this.formType === 'submit') {\n this.onSubmit.emit()\n } else if (this.formType === 'reset') {\n this.onReset.emit()\n }\n }\n\n render () {\n const {\n disabled,\n hoverClass,\n type,\n size,\n plain,\n loading,\n hover\n } = this\n\n const cls = classNames({\n [`${hoverClass}`]: hover && !disabled\n })\n\n return (\n <Host\n class={cls}\n type={type}\n plain={plain}\n loading={loading}\n size={size}\n disabled={disabled}\n >\n {loading && <i class='weui-loading' />}\n <slot />\n </Host>\n )\n }\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface TaroCameraCore extends Components.TaroCameraCore, HTMLElement {}
4
+ export const TaroCameraCore: {
5
+ prototype: TaroCameraCore;
6
+ new (): TaroCameraCore;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,35 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { n as notSupport } from './helper.js';
3
+
4
+ const Camera = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
5
+ constructor() {
6
+ super();
7
+ this.__registerHost();
8
+ }
9
+ componentDidLoad() {
10
+ notSupport('Camera', this);
11
+ }
12
+ render() {
13
+ return (h(Host, null));
14
+ }
15
+ }, [0, "taro-camera-core"]);
16
+ function defineCustomElement$1() {
17
+ if (typeof customElements === "undefined") {
18
+ return;
19
+ }
20
+ const components = ["taro-camera-core"];
21
+ components.forEach(tagName => { switch (tagName) {
22
+ case "taro-camera-core":
23
+ if (!customElements.get(tagName)) {
24
+ customElements.define(tagName, Camera);
25
+ }
26
+ break;
27
+ } });
28
+ }
29
+
30
+ const TaroCameraCore = Camera;
31
+ const defineCustomElement = defineCustomElement$1;
32
+
33
+ export { TaroCameraCore, defineCustomElement };
34
+
35
+ //# sourceMappingURL=taro-camera-core.js.map
@@ -0,0 +1 @@
1
+ {"file":"taro-camera-core.js","mappings":";;;MAOa,MAAM;;;;;EACjB,gBAAgB;IACd,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;GAC3B;EAED,MAAM;IACJ,QACE,EAAC,IAAI,OAAG,EACT;GACF;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/camera/camera.tsx"],"sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-camera-core'\n})\nexport class Camera implements ComponentInterface {\n componentDidLoad () {\n notSupport('Camera', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface TaroCanvasCore extends Components.TaroCanvasCore, HTMLElement {}
4
+ export const TaroCanvasCore: {
5
+ prototype: TaroCanvasCore;
6
+ new (): TaroCanvasCore;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,57 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
+
3
+ const indexCss = "taro-canvas-core{display:block;position:relative;width:300px;height:150px}";
4
+
5
+ const LONG_TAP_DELAY = 500;
6
+ const Canvas = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.onLongTap = createEvent(this, "longtap", 7);
11
+ this.onTouchStart = () => {
12
+ this.timer = setTimeout(() => {
13
+ this.onLongTap.emit();
14
+ }, LONG_TAP_DELAY);
15
+ };
16
+ this.onTouchMove = () => {
17
+ clearTimeout(this.timer);
18
+ };
19
+ this.onTouchEnd = () => {
20
+ clearTimeout(this.timer);
21
+ };
22
+ this.canvasId = undefined;
23
+ this.nativeProps = {};
24
+ }
25
+ render() {
26
+ const { canvasId, nativeProps } = this;
27
+ return (h("canvas", Object.assign({ "canvas-id": canvasId, style: {
28
+ width: '100%',
29
+ height: '100%'
30
+ }, onTouchStart: this.onTouchStart, onTouchMove: this.onTouchMove, onTouchEnd: this.onTouchEnd }, nativeProps)));
31
+ }
32
+ get el() { return this; }
33
+ static get style() { return indexCss; }
34
+ }, [0, "taro-canvas-core", {
35
+ "canvasId": [1, "canvas-id"],
36
+ "nativeProps": [16]
37
+ }]);
38
+ function defineCustomElement$1() {
39
+ if (typeof customElements === "undefined") {
40
+ return;
41
+ }
42
+ const components = ["taro-canvas-core"];
43
+ components.forEach(tagName => { switch (tagName) {
44
+ case "taro-canvas-core":
45
+ if (!customElements.get(tagName)) {
46
+ customElements.define(tagName, Canvas);
47
+ }
48
+ break;
49
+ } });
50
+ }
51
+
52
+ const TaroCanvasCore = Canvas;
53
+ const defineCustomElement = defineCustomElement$1;
54
+
55
+ export { TaroCanvasCore, defineCustomElement };
56
+
57
+ //# sourceMappingURL=taro-canvas-core.js.map
@@ -0,0 +1 @@
1
+ {"file":"taro-canvas-core.js","mappings":";;AAAA,MAAM,QAAQ,GAAG,4EAA4E;;ACE7F,MAAM,cAAc,GAAG,GAAG,CAAA;MAMb,MAAM;;;;;IAcjB,iBAAY,GAAG;MACb,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC;QACtB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAA;OACtB,EAAE,cAAc,CAAC,CAAA;KACnB,CAAA;IAED,gBAAW,GAAG;MACZ,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;KACzB,CAAA;IAED,eAAU,GAAG;MACX,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;KACzB,CAAA;;uBAtBqB,EAAE;;EAwBxB,MAAM;IACJ,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI,CAAA;IAEtC,QACE,yCACa,QAAQ,EACnB,KAAK,EAAE;QACL,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;OACf,EACD,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,IACvB,WAAW,EACf,EACH;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/canvas/style/index.scss?tag=taro-canvas-core","./src/components/canvas/canvas.tsx"],"sourcesContent":["taro-canvas-core {\r\n display: block;\r\n position: relative;\r\n width: 300px;\r\n height: 150px;\r\n}\r\n","import { Component, h, ComponentInterface, Prop, Element, Event } from '@stencil/core'\n\nconst LONG_TAP_DELAY = 500\n\n@Component({\n tag: 'taro-canvas-core',\n styleUrl: './style/index.scss'\n})\nexport class Canvas implements ComponentInterface {\n private timer: ReturnType<typeof setTimeout>\n\n @Prop() canvasId: string\n @Prop() nativeProps = {}\n\n @Element() el: HTMLElement\n\n @Event({\n eventName: 'longtap'\n })\n\n onLongTap\n\n onTouchStart = () => {\n this.timer = setTimeout(() => {\n this.onLongTap.emit()\n }, LONG_TAP_DELAY)\n }\n\n onTouchMove = () => {\n clearTimeout(this.timer)\n }\n\n onTouchEnd = () => {\n clearTimeout(this.timer)\n }\n\n render () {\n const { canvasId, nativeProps } = this\n\n return (\n <canvas\n canvas-id={canvasId}\n style={{\n width: '100%',\n height: '100%'\n }}\n onTouchStart={this.onTouchStart}\n onTouchMove={this.onTouchMove}\n onTouchEnd={this.onTouchEnd}\n {...nativeProps}\n />\n )\n }\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface TaroCheckboxCore extends Components.TaroCheckboxCore, HTMLElement {}
4
+ export const TaroCheckboxCore: {
5
+ prototype: TaroCheckboxCore;
6
+ new (): TaroCheckboxCore;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,81 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+
3
+ const indexCss = ".taro-checkbox{display:inline-block;position:relative}.taro-checkbox_checked{display:inline-block;position:relative;top:5px;border:1px solid #d1d1d1;border-radius:3px;width:23px;height:23px;min-height:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;background-color:#fff;vertical-align:0;font-size:23px;color:#1aad19}.taro-checkbox_checked:checked::before{display:inline-block;position:absolute;left:50%;top:50%;vertical-align:middle;text-decoration:inherit;text-align:center;text-transform:none;font-family:weui;font-style:normal;font-weight:normal;font-variant:normal;font-size:inherit;color:inherit;content:\"\\ea08\";-webkit-transform:translate(-50%, -48%) scale(0.73);transform:translate(-50%, -48%) scale(0.73);speak:none}";
4
+
5
+ const Checkbox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ this.onChange = createEvent(this, "checkboxchange", 7);
10
+ this.handleChange = (e) => {
11
+ e.stopPropagation();
12
+ this.onChange.emit({
13
+ value: this.value
14
+ });
15
+ };
16
+ this.name = undefined;
17
+ this.value = '';
18
+ this.color = undefined;
19
+ this.id = undefined;
20
+ this.checked = false;
21
+ this.disabled = false;
22
+ this.nativeProps = {};
23
+ this.isWillLoadCalled = false;
24
+ }
25
+ watchId(newVal) {
26
+ if (!this.isWillLoadCalled)
27
+ return;
28
+ if (newVal)
29
+ this.inputEl.setAttribute('id', newVal);
30
+ }
31
+ componentWillLoad() {
32
+ this.isWillLoadCalled = true;
33
+ }
34
+ componentDidRender() {
35
+ this.id && this.el.removeAttribute('id');
36
+ }
37
+ render() {
38
+ const { checked, name, color, value, disabled, nativeProps } = this;
39
+ return (h(Host, { className: 'weui-cells_checkbox' }, h("input", Object.assign({ ref: dom => {
40
+ if (!dom)
41
+ return;
42
+ this.inputEl = dom;
43
+ if (this.id)
44
+ dom.setAttribute('id', this.id);
45
+ }, type: 'checkbox', value: value, name: name, class: 'taro-checkbox_checked', style: { color }, checked: checked, disabled: disabled, onChange: this.handleChange }, nativeProps)), h("slot", null)));
46
+ }
47
+ get el() { return this; }
48
+ static get watchers() { return {
49
+ "id": ["watchId"]
50
+ }; }
51
+ static get style() { return indexCss; }
52
+ }, [4, "taro-checkbox-core", {
53
+ "name": [1],
54
+ "value": [1],
55
+ "color": [1],
56
+ "id": [1025],
57
+ "checked": [4],
58
+ "disabled": [4],
59
+ "nativeProps": [16],
60
+ "isWillLoadCalled": [32]
61
+ }]);
62
+ function defineCustomElement$1() {
63
+ if (typeof customElements === "undefined") {
64
+ return;
65
+ }
66
+ const components = ["taro-checkbox-core"];
67
+ components.forEach(tagName => { switch (tagName) {
68
+ case "taro-checkbox-core":
69
+ if (!customElements.get(tagName)) {
70
+ customElements.define(tagName, Checkbox);
71
+ }
72
+ break;
73
+ } });
74
+ }
75
+
76
+ const TaroCheckboxCore = Checkbox;
77
+ const defineCustomElement = defineCustomElement$1;
78
+
79
+ export { TaroCheckboxCore, defineCustomElement };
80
+
81
+ //# sourceMappingURL=taro-checkbox-core.js.map
@@ -0,0 +1 @@
1
+ {"file":"taro-checkbox-core.js","mappings":";;AAAA,MAAM,QAAQ,GAAG,mvBAAmvB;;MCMvvB,QAAQ;;;;;IAiCnB,iBAAY,GAAG,CAAC,CAAQ;MACtB,CAAC,CAAC,eAAe,EAAE,CAAA;MACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QACjB,KAAK,EAAE,IAAI,CAAC,KAAK;OAClB,CAAC,CAAA;KACH,CAAA;;iBAnCe,EAAE;;;mBAGA,KAAK;oBACJ,KAAK;uBACF,EAAE;4BAEI,KAAK;;EAKjC,OAAO,CAAE,MAAM;IACb,IAAI,CAAC,IAAI,CAAC,gBAAgB;MAAE,OAAM;IAClC,IAAI,MAAM;MAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;GACpD;EAOD,iBAAiB;IACf,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAA;GAC7B;EAED,kBAAkB;IAChB,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAA;GACzC;EASD,MAAM;IACJ,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI,CAAA;IAEnE,QACE,EAAC,IAAI,IACH,SAAS,EAAC,qBAAqB,IAE/B,2BACE,GAAG,EAAE,GAAG;QACN,IAAI,CAAC,GAAG;UAAE,OAAM;QAChB,IAAI,CAAC,OAAO,GAAG,GAAG,CAAA;QAClB,IAAI,IAAI,CAAC,EAAE;UAAE,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAA;OAC7C,EACD,IAAI,EAAC,UAAU,EACf,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,uBAAuB,EAC7B,KAAK,EAAE,EAAE,KAAK,EAAE,EAChB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,IAAI,CAAC,YAAY,IACvB,WAAW,EACf,EACF,eAAQ,CACH,EACR;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/checkbox/style/index.scss?tag=taro-checkbox-core","./src/components/checkbox/checkbox.tsx"],"sourcesContent":[".taro-checkbox {\n display: inline-block;\n position: relative;\n\n &_checked {\n display: inline-block;\n position: relative;\n top: 5px;\n border: 1px solid #d1d1d1;\n border-radius: 3px;\n width: 23px;\n height: 23px;\n min-height: 0;\n appearance: none;\n outline: 0;\n background-color: #fff;\n vertical-align: 0;\n font-size: 23px;\n color: #1aad19;\n\n &:checked::before {\n display: inline-block;\n position: absolute;\n left: 50%;\n top: 50%;\n vertical-align: middle;\n text-decoration: inherit;\n text-align: center;\n text-transform: none;\n font-family: weui;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n font-size: inherit;\n color: inherit;\n content: \"\\EA08\";\n transform: translate(-50%, -48%) scale(0.73);\n speak: none;\n }\n }\n}\n","import { Component, h, ComponentInterface, Prop, Event, EventEmitter, Host, Watch, Element, State } from '@stencil/core'\n\n@Component({\n tag: 'taro-checkbox-core',\n styleUrl: './style/index.scss'\n})\nexport class Checkbox implements ComponentInterface {\n private inputEl: HTMLInputElement\n @Prop() name: string\n @Prop() value = ''\n @Prop() color: string\n @Prop({ mutable: true }) id: string\n @Prop() checked = false\n @Prop() disabled = false\n @Prop() nativeProps = {}\n\n @State() isWillLoadCalled = false\n\n @Element() el: HTMLElement\n\n @Watch('id')\n watchId (newVal) {\n if (!this.isWillLoadCalled) return\n if (newVal) this.inputEl.setAttribute('id', newVal)\n }\n\n @Event({\n eventName: 'checkboxchange'\n })\n onChange: EventEmitter\n\n componentWillLoad () {\n this.isWillLoadCalled = true\n }\n\n componentDidRender () {\n this.id && this.el.removeAttribute('id')\n }\n\n handleChange = (e: Event) => {\n e.stopPropagation()\n this.onChange.emit({\n value: this.value\n })\n }\n\n render () {\n const { checked, name, color, value, disabled, nativeProps } = this\n\n return (\n <Host\n className='weui-cells_checkbox'\n >\n <input\n ref={dom => {\n if (!dom) return\n this.inputEl = dom\n if (this.id) dom.setAttribute('id', this.id)\n }}\n type='checkbox'\n value={value}\n name={name}\n class='taro-checkbox_checked'\n style={{ color }}\n checked={checked}\n disabled={disabled}\n onChange={this.handleChange}\n {...nativeProps}\n />\n <slot />\n </Host>\n )\n }\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface TaroCheckboxGroupCore extends Components.TaroCheckboxGroupCore, HTMLElement {}
4
+ export const TaroCheckboxGroupCore: {
5
+ prototype: TaroCheckboxGroupCore;
6
+ new (): TaroCheckboxGroupCore;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,71 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+
3
+ const CheckboxGroup = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
4
+ constructor() {
5
+ super();
6
+ this.__registerHost();
7
+ this.onChange = createEvent(this, "change", 7);
8
+ this.uniqueName = Date.now().toString(36);
9
+ this.name = undefined;
10
+ }
11
+ function(e) {
12
+ e.stopPropagation();
13
+ if (e.target.tagName !== 'TARO-CHECKBOX-CORE')
14
+ return;
15
+ const childList = this.el.querySelectorAll('taro-checkbox-core');
16
+ this.value = this.getValues(childList);
17
+ this.onChange.emit({
18
+ value: this.value
19
+ });
20
+ }
21
+ componentDidLoad() {
22
+ const childList = this.el.querySelectorAll('taro-checkbox-core');
23
+ childList.forEach((element) => {
24
+ element.setAttribute('name', this.name || this.uniqueName);
25
+ });
26
+ Object.defineProperty(this.el, 'value', {
27
+ get: () => {
28
+ if (!this.value) {
29
+ const childList = this.el.querySelectorAll('taro-checkbox-core');
30
+ this.value = this.getValues(childList);
31
+ }
32
+ return this.value;
33
+ },
34
+ configurable: true
35
+ });
36
+ }
37
+ getValues(childList) {
38
+ return Array.from(childList)
39
+ .filter(element => {
40
+ const checkbox = element.querySelector('input');
41
+ return checkbox === null || checkbox === void 0 ? void 0 : checkbox.checked;
42
+ })
43
+ .map(element => element.value);
44
+ }
45
+ render() {
46
+ return (h(Host, null));
47
+ }
48
+ get el() { return this; }
49
+ }, [0, "taro-checkbox-group-core", {
50
+ "name": [8]
51
+ }, [[0, "checkboxchange", "function"]]]);
52
+ function defineCustomElement$1() {
53
+ if (typeof customElements === "undefined") {
54
+ return;
55
+ }
56
+ const components = ["taro-checkbox-group-core"];
57
+ components.forEach(tagName => { switch (tagName) {
58
+ case "taro-checkbox-group-core":
59
+ if (!customElements.get(tagName)) {
60
+ customElements.define(tagName, CheckboxGroup);
61
+ }
62
+ break;
63
+ } });
64
+ }
65
+
66
+ const TaroCheckboxGroupCore = CheckboxGroup;
67
+ const defineCustomElement = defineCustomElement$1;
68
+
69
+ export { TaroCheckboxGroupCore, defineCustomElement };
70
+
71
+ //# sourceMappingURL=taro-checkbox-group-core.js.map