@tuya-miniapp/smart-ui 2.7.2-beta-11 → 2.7.2-beta-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 (1105) hide show
  1. package/dist/action-sheet/index.css +1 -0
  2. package/dist/action-sheet/index.d.ts +1 -0
  3. package/dist/action-sheet/index.js +115 -0
  4. package/dist/action-sheet/index.json +8 -0
  5. package/dist/action-sheet/index.wxml +87 -0
  6. package/dist/action-sheet/index.wxss +1 -0
  7. package/dist/area/index.css +1 -0
  8. package/dist/area/index.d.ts +1 -0
  9. package/dist/area/index.js +219 -0
  10. package/dist/area/index.json +6 -0
  11. package/dist/area/index.wxml +20 -0
  12. package/dist/area/index.wxs +8 -0
  13. package/dist/area/index.wxss +1 -0
  14. package/dist/battery/index.d.ts +1 -0
  15. package/dist/battery/index.js +110 -0
  16. package/dist/battery/index.json +4 -0
  17. package/dist/battery/index.wxml +1 -0
  18. package/dist/bottom-sheet/index.css +1 -0
  19. package/dist/bottom-sheet/index.d.ts +1 -0
  20. package/dist/bottom-sheet/index.js +151 -0
  21. package/dist/bottom-sheet/index.json +8 -0
  22. package/dist/bottom-sheet/index.wxml +71 -0
  23. package/dist/bottom-sheet/index.wxs +159 -0
  24. package/dist/bottom-sheet/index.wxss +1 -0
  25. package/dist/button/index.css +1 -0
  26. package/dist/button/index.d.ts +1 -0
  27. package/dist/button/index.js +61 -0
  28. package/dist/button/index.json +7 -0
  29. package/dist/button/index.wxml +64 -0
  30. package/dist/button/index.wxs +39 -0
  31. package/dist/button/index.wxss +1 -0
  32. package/dist/calendar/calendar.wxml +84 -0
  33. package/dist/calendar/index.css +1 -0
  34. package/dist/calendar/index.d.ts +1 -0
  35. package/dist/calendar/index.js +448 -0
  36. package/dist/calendar/index.json +12 -0
  37. package/dist/calendar/index.wxml +25 -0
  38. package/dist/calendar/index.wxs +59 -0
  39. package/dist/calendar/index.wxss +1 -0
  40. package/dist/calendar-header/index.css +1 -0
  41. package/dist/calendar-header/index.d.ts +1 -0
  42. package/dist/calendar-header/index.js +64 -0
  43. package/dist/calendar-header/index.json +6 -0
  44. package/dist/calendar-header/index.wxml +27 -0
  45. package/dist/calendar-header/index.wxss +1 -0
  46. package/dist/calendar-month/index.css +1 -0
  47. package/dist/calendar-month/index.d.ts +1 -0
  48. package/dist/calendar-month/index.js +177 -0
  49. package/dist/calendar-month/index.json +3 -0
  50. package/dist/calendar-month/index.wxml +22 -0
  51. package/dist/calendar-month/index.wxs +73 -0
  52. package/dist/calendar-month/index.wxss +1 -0
  53. package/dist/calendar-month-list/index.css +1 -0
  54. package/dist/calendar-month-list/index.d.ts +1 -0
  55. package/dist/calendar-month-list/index.js +103 -0
  56. package/dist/calendar-month-list/index.json +7 -0
  57. package/dist/calendar-month-list/index.wxml +15 -0
  58. package/dist/calendar-month-list/index.wxss +1 -0
  59. package/dist/calendar-utils/types.d.ts +7 -0
  60. package/dist/calendar-utils/types.js +1 -0
  61. package/dist/calendar-utils/utils.d.ts +21 -0
  62. package/dist/calendar-utils/utils.js +156 -0
  63. package/dist/calendar-utils/utils.wxs +25 -0
  64. package/dist/calendar-year-list/index.css +1 -0
  65. package/dist/calendar-year-list/index.d.ts +1 -0
  66. package/dist/calendar-year-list/index.js +113 -0
  67. package/dist/calendar-year-list/index.json +7 -0
  68. package/dist/calendar-year-list/index.wxml +15 -0
  69. package/dist/calendar-year-list/index.wxss +1 -0
  70. package/dist/cascader/index.css +1 -0
  71. package/dist/cascader/index.d.ts +1 -0
  72. package/dist/cascader/index.js +191 -0
  73. package/dist/cascader/index.json +8 -0
  74. package/dist/cascader/index.wxml +56 -0
  75. package/dist/cascader/index.wxs +21 -0
  76. package/dist/cascader/index.wxss +1 -0
  77. package/dist/cell/index.css +1 -0
  78. package/dist/cell/index.d.ts +1 -0
  79. package/dist/cell/index.js +43 -0
  80. package/dist/cell/index.json +6 -0
  81. package/dist/cell/index.wxml +47 -0
  82. package/dist/cell/index.wxs +17 -0
  83. package/dist/cell/index.wxss +1 -0
  84. package/dist/cell-group/index.css +1 -0
  85. package/dist/cell-group/index.d.ts +1 -0
  86. package/dist/cell-group/index.js +12 -0
  87. package/dist/cell-group/index.json +3 -0
  88. package/dist/cell-group/index.wxml +15 -0
  89. package/dist/cell-group/index.wxs +14 -0
  90. package/dist/cell-group/index.wxss +1 -0
  91. package/dist/checkbox/index.css +1 -0
  92. package/dist/checkbox/index.d.ts +1 -0
  93. package/dist/checkbox/index.js +79 -0
  94. package/dist/checkbox/index.json +6 -0
  95. package/dist/checkbox/index.wxml +32 -0
  96. package/dist/checkbox/index.wxs +20 -0
  97. package/dist/checkbox/index.wxss +1 -0
  98. package/dist/checkbox-group/index.css +1 -0
  99. package/dist/checkbox-group/index.d.ts +1 -0
  100. package/dist/checkbox-group/index.js +36 -0
  101. package/dist/checkbox-group/index.json +3 -0
  102. package/dist/checkbox-group/index.wxml +5 -0
  103. package/dist/checkbox-group/index.wxss +1 -0
  104. package/dist/circle/index.css +1 -0
  105. package/dist/circle/index.d.ts +1 -0
  106. package/dist/circle/index.js +127 -0
  107. package/dist/circle/index.json +3 -0
  108. package/dist/circle/index.rjs +232 -0
  109. package/dist/circle/index.wxml +8 -0
  110. package/dist/circle/index.wxss +1 -0
  111. package/dist/col/index.css +1 -0
  112. package/dist/col/index.d.ts +1 -0
  113. package/dist/col/index.js +9 -0
  114. package/dist/col/index.json +3 -0
  115. package/dist/col/index.wxml +9 -0
  116. package/dist/col/index.wxs +18 -0
  117. package/dist/col/index.wxss +1 -0
  118. package/dist/collapse/index.css +1 -0
  119. package/dist/collapse/index.d.ts +1 -0
  120. package/dist/collapse/index.js +46 -0
  121. package/dist/collapse/index.json +3 -0
  122. package/dist/collapse/index.wxml +3 -0
  123. package/dist/collapse/index.wxss +1 -0
  124. package/dist/collapse-item/animate.d.ts +2 -0
  125. package/dist/collapse-item/animate.js +39 -0
  126. package/dist/collapse-item/index.css +1 -0
  127. package/dist/collapse-item/index.d.ts +1 -0
  128. package/dist/collapse-item/index.js +62 -0
  129. package/dist/collapse-item/index.json +6 -0
  130. package/dist/collapse-item/index.wxml +45 -0
  131. package/dist/collapse-item/index.wxss +1 -0
  132. package/dist/common/appLog.d.ts +10 -0
  133. package/dist/common/appLog.js +105 -0
  134. package/dist/common/color.d.ts +7 -0
  135. package/dist/common/color.js +7 -0
  136. package/dist/common/component.d.ts +4 -0
  137. package/dist/common/component.js +46 -0
  138. package/dist/common/index.css +1 -0
  139. package/dist/common/index.wxss +1 -0
  140. package/dist/common/relation.d.ts +15 -0
  141. package/dist/common/relation.js +56 -0
  142. package/dist/common/style/clearfix.css +1 -0
  143. package/dist/common/style/clearfix.wxss +1 -0
  144. package/dist/common/style/ellipsis.css +1 -0
  145. package/dist/common/style/ellipsis.wxss +1 -0
  146. package/dist/common/style/hairline.css +1 -0
  147. package/dist/common/style/hairline.wxss +1 -0
  148. package/dist/common/style/mixins/clearfix.css +0 -0
  149. package/dist/common/style/mixins/clearfix.wxss +0 -0
  150. package/dist/common/style/mixins/ellipsis.css +0 -0
  151. package/dist/common/style/mixins/ellipsis.wxss +0 -0
  152. package/dist/common/style/mixins/hairline.css +1 -0
  153. package/dist/common/style/mixins/hairline.wxss +1 -0
  154. package/dist/common/style/var.css +1 -0
  155. package/dist/common/style/var.wxss +1 -0
  156. package/dist/common/ty.d.ts +7 -0
  157. package/dist/common/ty.js +33 -0
  158. package/dist/common/utils.d.ts +24 -0
  159. package/dist/common/utils.js +113 -0
  160. package/dist/common/validator.d.ts +9 -0
  161. package/dist/common/validator.js +31 -0
  162. package/dist/common/version.d.ts +15 -0
  163. package/dist/common/version.js +59 -0
  164. package/dist/config-provider/index.d.ts +1 -0
  165. package/dist/config-provider/index.js +9 -0
  166. package/dist/config-provider/index.json +3 -0
  167. package/dist/config-provider/index.wxml +5 -0
  168. package/dist/config-provider/index.wxs +29 -0
  169. package/dist/count-down/index.css +1 -0
  170. package/dist/count-down/index.d.ts +1 -0
  171. package/dist/count-down/index.js +100 -0
  172. package/dist/count-down/index.json +3 -0
  173. package/dist/count-down/index.wxml +4 -0
  174. package/dist/count-down/index.wxss +1 -0
  175. package/dist/count-down/utils.d.ts +10 -0
  176. package/dist/count-down/utils.js +57 -0
  177. package/dist/custom-keyboard/index.css +1 -0
  178. package/dist/custom-keyboard/index.d.ts +1 -0
  179. package/dist/custom-keyboard/index.js +162 -0
  180. package/dist/custom-keyboard/index.json +9 -0
  181. package/dist/custom-keyboard/index.wxml +44 -0
  182. package/dist/custom-keyboard/index.wxss +1 -0
  183. package/dist/datetime-picker/index.css +1 -0
  184. package/dist/datetime-picker/index.d.ts +1 -0
  185. package/dist/datetime-picker/index.js +479 -0
  186. package/dist/datetime-picker/index.json +6 -0
  187. package/dist/datetime-picker/index.wxml +22 -0
  188. package/dist/datetime-picker/index.wxss +1 -0
  189. package/dist/definitions/index.d.ts +29 -0
  190. package/dist/definitions/index.js +1 -0
  191. package/dist/dialog/dialog.d.ts +75 -0
  192. package/dist/dialog/dialog.js +116 -0
  193. package/dist/dialog/index.css +1 -0
  194. package/dist/dialog/index.d.ts +1 -0
  195. package/dist/dialog/index.js +215 -0
  196. package/dist/dialog/index.json +10 -0
  197. package/dist/dialog/index.wxml +146 -0
  198. package/dist/dialog/index.wxss +1 -0
  199. package/dist/divider/index.css +1 -0
  200. package/dist/divider/index.d.ts +1 -0
  201. package/dist/divider/index.js +12 -0
  202. package/dist/divider/index.json +4 -0
  203. package/dist/divider/index.wxml +9 -0
  204. package/dist/divider/index.wxs +18 -0
  205. package/dist/divider/index.wxss +1 -0
  206. package/dist/dropdown-item/index.css +1 -0
  207. package/dist/dropdown-item/index.d.ts +1 -0
  208. package/dist/dropdown-item/index.js +141 -0
  209. package/dist/dropdown-item/index.json +8 -0
  210. package/dist/dropdown-item/index.wxml +52 -0
  211. package/dist/dropdown-item/index.wxss +1 -0
  212. package/dist/dropdown-item/shared.d.ts +5 -0
  213. package/dist/dropdown-item/shared.js +1 -0
  214. package/dist/dropdown-menu/index.css +1 -0
  215. package/dist/dropdown-menu/index.d.ts +1 -0
  216. package/dist/dropdown-menu/index.js +130 -0
  217. package/dist/dropdown-menu/index.json +6 -0
  218. package/dist/dropdown-menu/index.wxml +24 -0
  219. package/dist/dropdown-menu/index.wxs +16 -0
  220. package/dist/dropdown-menu/index.wxss +1 -0
  221. package/dist/empty/index.css +1 -0
  222. package/dist/empty/index.d.ts +1 -0
  223. package/dist/empty/index.js +29 -0
  224. package/dist/empty/index.json +4 -0
  225. package/dist/empty/index.wxml +22 -0
  226. package/dist/empty/index.wxs +13 -0
  227. package/dist/empty/index.wxss +1 -0
  228. package/dist/field/cell-input.wxml +59 -0
  229. package/dist/field/cell-textarea.wxml +28 -0
  230. package/dist/field/index.css +1 -0
  231. package/dist/field/index.d.ts +1 -0
  232. package/dist/field/index.js +142 -0
  233. package/dist/field/index.json +7 -0
  234. package/dist/field/index.wxml +4 -0
  235. package/dist/field/index.wxs +19 -0
  236. package/dist/field/index.wxss +1 -0
  237. package/dist/field/input.wxml +30 -0
  238. package/dist/field/props.d.ts +4 -0
  239. package/dist/field/props.js +56 -0
  240. package/dist/field/textarea.wxml +32 -0
  241. package/dist/field/types.d.ts +8 -0
  242. package/dist/field/types.js +1 -0
  243. package/dist/goods-action/index.css +1 -0
  244. package/dist/goods-action/index.d.ts +1 -0
  245. package/dist/goods-action/index.js +15 -0
  246. package/dist/goods-action/index.json +3 -0
  247. package/dist/goods-action/index.wxml +5 -0
  248. package/dist/goods-action/index.wxss +1 -0
  249. package/dist/goods-action-button/index.css +1 -0
  250. package/dist/goods-action-button/index.d.ts +1 -0
  251. package/dist/goods-action-button/index.js +49 -0
  252. package/dist/goods-action-button/index.json +6 -0
  253. package/dist/goods-action-button/index.wxml +35 -0
  254. package/dist/goods-action-button/index.wxss +1 -0
  255. package/dist/goods-action-icon/index.css +1 -0
  256. package/dist/goods-action-icon/index.d.ts +1 -0
  257. package/dist/goods-action-icon/index.js +27 -0
  258. package/dist/goods-action-icon/index.json +7 -0
  259. package/dist/goods-action-icon/index.wxml +41 -0
  260. package/dist/goods-action-icon/index.wxss +1 -0
  261. package/dist/grid/index.css +1 -0
  262. package/dist/grid/index.d.ts +1 -0
  263. package/dist/grid/index.js +55 -0
  264. package/dist/grid/index.json +3 -0
  265. package/dist/grid/index.wxml +8 -0
  266. package/dist/grid/index.wxs +13 -0
  267. package/dist/grid/index.wxss +1 -0
  268. package/dist/grid-item/index.css +1 -0
  269. package/dist/grid-item/index.d.ts +1 -0
  270. package/dist/grid-item/index.js +52 -0
  271. package/dist/grid-item/index.json +6 -0
  272. package/dist/grid-item/index.wxml +27 -0
  273. package/dist/grid-item/index.wxs +32 -0
  274. package/dist/grid-item/index.wxss +1 -0
  275. package/dist/icon/index.css +1 -0
  276. package/dist/icon/index.d.ts +1 -0
  277. package/dist/icon/index.js +21 -0
  278. package/dist/icon/index.json +6 -0
  279. package/dist/icon/index.wxml +30 -0
  280. package/dist/icon/index.wxs +94 -0
  281. package/dist/icon/index.wxss +1 -0
  282. package/dist/image/index.css +1 -0
  283. package/dist/image/index.d.ts +1 -0
  284. package/dist/image/index.js +70 -0
  285. package/dist/image/index.json +7 -0
  286. package/dist/image/index.wxml +40 -0
  287. package/dist/image/index.wxs +42 -0
  288. package/dist/image/index.wxss +1 -0
  289. package/dist/index-anchor/index.css +1 -0
  290. package/dist/index-anchor/index.d.ts +1 -0
  291. package/dist/index-anchor/index.js +25 -0
  292. package/dist/index-anchor/index.json +3 -0
  293. package/dist/index-anchor/index.wxml +14 -0
  294. package/dist/index-anchor/index.wxss +1 -0
  295. package/dist/index-bar/index.css +1 -0
  296. package/dist/index-bar/index.d.ts +1 -0
  297. package/dist/index-bar/index.js +247 -0
  298. package/dist/index-bar/index.json +3 -0
  299. package/dist/index-bar/index.wxml +22 -0
  300. package/dist/index-bar/index.wxss +1 -0
  301. package/dist/info/index.css +1 -0
  302. package/dist/info/index.d.ts +1 -0
  303. package/dist/info/index.js +8 -0
  304. package/dist/info/index.json +3 -0
  305. package/dist/info/index.wxml +7 -0
  306. package/dist/info/index.wxss +1 -0
  307. package/dist/loading/index.css +1 -0
  308. package/dist/loading/index.d.ts +1 -0
  309. package/dist/loading/index.js +40 -0
  310. package/dist/loading/index.json +3 -0
  311. package/dist/loading/index.wxml +17 -0
  312. package/dist/loading/index.wxs +39 -0
  313. package/dist/loading/index.wxss +1 -0
  314. package/dist/mixins/basic.d.ts +1 -0
  315. package/dist/mixins/basic.js +26 -0
  316. package/dist/mixins/button.d.ts +1 -0
  317. package/dist/mixins/button.js +51 -0
  318. package/dist/mixins/link.d.ts +1 -0
  319. package/dist/mixins/link.js +22 -0
  320. package/dist/mixins/page-scroll.d.ts +6 -0
  321. package/dist/mixins/page-scroll.js +42 -0
  322. package/dist/mixins/touch.d.ts +1 -0
  323. package/dist/mixins/touch.js +36 -0
  324. package/dist/mixins/transition.d.ts +1 -0
  325. package/dist/mixins/transition.js +163 -0
  326. package/dist/nav-bar/index.css +1 -0
  327. package/dist/nav-bar/index.d.ts +1 -0
  328. package/dist/nav-bar/index.js +110 -0
  329. package/dist/nav-bar/index.json +6 -0
  330. package/dist/nav-bar/index.wxml +70 -0
  331. package/dist/nav-bar/index.wxs +14 -0
  332. package/dist/nav-bar/index.wxss +1 -0
  333. package/dist/normal-slider/index.css +1 -0
  334. package/dist/normal-slider/index.d.ts +1 -0
  335. package/dist/normal-slider/index.js +158 -0
  336. package/dist/normal-slider/index.json +6 -0
  337. package/dist/normal-slider/index.wxml +35 -0
  338. package/dist/normal-slider/index.wxss +1 -0
  339. package/dist/notice-bar/index.css +1 -0
  340. package/dist/notice-bar/index.d.ts +1 -0
  341. package/dist/notice-bar/index.js +170 -0
  342. package/dist/notice-bar/index.json +6 -0
  343. package/dist/notice-bar/index.wxml +52 -0
  344. package/dist/notice-bar/index.wxs +11 -0
  345. package/dist/notice-bar/index.wxss +1 -0
  346. package/dist/notify/index.css +1 -0
  347. package/dist/notify/index.d.ts +1 -0
  348. package/dist/notify/index.js +77 -0
  349. package/dist/notify/index.json +6 -0
  350. package/dist/notify/index.wxml +22 -0
  351. package/dist/notify/index.wxs +22 -0
  352. package/dist/notify/index.wxss +1 -0
  353. package/dist/notify/notify.d.ts +29 -0
  354. package/dist/notify/notify.js +57 -0
  355. package/dist/overlay/index.css +1 -0
  356. package/dist/overlay/index.d.ts +1 -0
  357. package/dist/overlay/index.js +30 -0
  358. package/dist/overlay/index.json +6 -0
  359. package/dist/overlay/index.wxml +7 -0
  360. package/dist/overlay/index.wxss +1 -0
  361. package/dist/overlay/overlay.wxml +10 -0
  362. package/dist/picker/index.css +1 -0
  363. package/dist/picker/index.d.ts +1 -0
  364. package/dist/picker/index.js +168 -0
  365. package/dist/picker/index.json +7 -0
  366. package/dist/picker/index.wxml +48 -0
  367. package/dist/picker/index.wxs +44 -0
  368. package/dist/picker/index.wxss +1 -0
  369. package/dist/picker/shared.d.ts +44 -0
  370. package/dist/picker/shared.js +44 -0
  371. package/dist/picker/toolbar.wxml +23 -0
  372. package/dist/picker-column/index.css +1 -0
  373. package/dist/picker-column/index.d.ts +1 -0
  374. package/dist/picker-column/index.js +331 -0
  375. package/dist/picker-column/index.json +3 -0
  376. package/dist/picker-column/index.wxml +60 -0
  377. package/dist/picker-column/index.wxs +628 -0
  378. package/dist/picker-column/index.wxss +1 -0
  379. package/dist/popover/index.css +1 -0
  380. package/dist/popover/index.d.ts +1 -0
  381. package/dist/popover/index.js +209 -0
  382. package/dist/popover/index.json +7 -0
  383. package/dist/popover/index.wxml +31 -0
  384. package/dist/popover/index.wxss +1 -0
  385. package/dist/popup/index.css +1 -0
  386. package/dist/popup/index.d.ts +1 -0
  387. package/dist/popup/index.js +117 -0
  388. package/dist/popup/index.json +7 -0
  389. package/dist/popup/index.wxml +21 -0
  390. package/dist/popup/index.wxs +23 -0
  391. package/dist/popup/index.wxss +1 -0
  392. package/dist/popup/popup.wxml +16 -0
  393. package/dist/progress/index.css +1 -0
  394. package/dist/progress/index.d.ts +1 -0
  395. package/dist/progress/index.js +48 -0
  396. package/dist/progress/index.json +3 -0
  397. package/dist/progress/index.wxml +20 -0
  398. package/dist/progress/index.wxs +36 -0
  399. package/dist/progress/index.wxss +1 -0
  400. package/dist/radio/index.css +1 -0
  401. package/dist/radio/index.d.ts +1 -0
  402. package/dist/radio/index.js +70 -0
  403. package/dist/radio/index.json +6 -0
  404. package/dist/radio/index.wxml +32 -0
  405. package/dist/radio/index.wxs +33 -0
  406. package/dist/radio/index.wxss +1 -0
  407. package/dist/radio-group/index.css +1 -0
  408. package/dist/radio-group/index.d.ts +1 -0
  409. package/dist/radio-group/index.js +27 -0
  410. package/dist/radio-group/index.json +3 -0
  411. package/dist/radio-group/index.wxml +5 -0
  412. package/dist/radio-group/index.wxss +1 -0
  413. package/dist/rate/index.css +1 -0
  414. package/dist/rate/index.d.ts +1 -0
  415. package/dist/rate/index.js +89 -0
  416. package/dist/rate/index.json +6 -0
  417. package/dist/rate/index.wxml +35 -0
  418. package/dist/rate/index.wxss +1 -0
  419. package/dist/row/index.css +1 -0
  420. package/dist/row/index.d.ts +1 -0
  421. package/dist/row/index.js +23 -0
  422. package/dist/row/index.json +3 -0
  423. package/dist/row/index.wxml +5 -0
  424. package/dist/row/index.wxs +18 -0
  425. package/dist/row/index.wxss +1 -0
  426. package/dist/search/index.css +1 -0
  427. package/dist/search/index.d.ts +1 -0
  428. package/dist/search/index.js +100 -0
  429. package/dist/search/index.json +7 -0
  430. package/dist/search/index.wxml +57 -0
  431. package/dist/search/index.wxss +1 -0
  432. package/dist/sidebar/index.css +1 -0
  433. package/dist/sidebar/index.d.ts +1 -0
  434. package/dist/sidebar/index.js +34 -0
  435. package/dist/sidebar/index.json +3 -0
  436. package/dist/sidebar/index.wxml +3 -0
  437. package/dist/sidebar/index.wxss +1 -0
  438. package/dist/sidebar-item/index.css +1 -0
  439. package/dist/sidebar-item/index.d.ts +1 -0
  440. package/dist/sidebar-item/index.js +29 -0
  441. package/dist/sidebar-item/index.json +6 -0
  442. package/dist/sidebar-item/index.wxml +18 -0
  443. package/dist/sidebar-item/index.wxss +1 -0
  444. package/dist/skeleton/index.css +1 -0
  445. package/dist/skeleton/index.d.ts +1 -0
  446. package/dist/skeleton/index.js +46 -0
  447. package/dist/skeleton/index.json +4 -0
  448. package/dist/skeleton/index.wxml +29 -0
  449. package/dist/skeleton/index.wxss +1 -0
  450. package/dist/slider/index.css +1 -0
  451. package/dist/slider/index.d.ts +1 -0
  452. package/dist/slider/index.js +209 -0
  453. package/dist/slider/index.json +3 -0
  454. package/dist/slider/index.wxml +68 -0
  455. package/dist/slider/index.wxs +14 -0
  456. package/dist/slider/index.wxss +1 -0
  457. package/dist/stepper/index.css +1 -0
  458. package/dist/stepper/index.d.ts +1 -0
  459. package/dist/stepper/index.js +206 -0
  460. package/dist/stepper/index.json +6 -0
  461. package/dist/stepper/index.wxml +45 -0
  462. package/dist/stepper/index.wxs +32 -0
  463. package/dist/stepper/index.wxss +1 -0
  464. package/dist/steps/index.css +1 -0
  465. package/dist/steps/index.d.ts +1 -0
  466. package/dist/steps/index.js +34 -0
  467. package/dist/steps/index.json +6 -0
  468. package/dist/steps/index.wxml +54 -0
  469. package/dist/steps/index.wxss +1 -0
  470. package/dist/sticky/index.css +1 -0
  471. package/dist/sticky/index.d.ts +1 -0
  472. package/dist/sticky/index.js +120 -0
  473. package/dist/sticky/index.json +3 -0
  474. package/dist/sticky/index.wxml +8 -0
  475. package/dist/sticky/index.wxs +25 -0
  476. package/dist/sticky/index.wxss +1 -0
  477. package/dist/swipe-cell/index.css +1 -0
  478. package/dist/swipe-cell/index.d.ts +1 -0
  479. package/dist/swipe-cell/index.js +140 -0
  480. package/dist/swipe-cell/index.json +3 -0
  481. package/dist/swipe-cell/index.wxml +21 -0
  482. package/dist/swipe-cell/index.wxss +1 -0
  483. package/dist/switch/index.css +1 -0
  484. package/dist/switch/index.d.ts +1 -0
  485. package/dist/switch/index.js +42 -0
  486. package/dist/switch/index.json +6 -0
  487. package/dist/switch/index.wxml +51 -0
  488. package/dist/switch/index.wxs +26 -0
  489. package/dist/switch/index.wxss +1 -0
  490. package/dist/tab/index.css +1 -0
  491. package/dist/tab/index.d.ts +1 -0
  492. package/dist/tab/index.js +64 -0
  493. package/dist/tab/index.json +3 -0
  494. package/dist/tab/index.wxml +8 -0
  495. package/dist/tab/index.wxss +1 -0
  496. package/dist/tabbar/index.css +1 -0
  497. package/dist/tabbar/index.d.ts +1 -0
  498. package/dist/tabbar/index.js +70 -0
  499. package/dist/tabbar/index.json +3 -0
  500. package/dist/tabbar/index.wxml +12 -0
  501. package/dist/tabbar/index.wxss +1 -0
  502. package/dist/tabbar-item/index.css +1 -0
  503. package/dist/tabbar-item/index.d.ts +1 -0
  504. package/dist/tabbar-item/index.js +77 -0
  505. package/dist/tabbar-item/index.json +7 -0
  506. package/dist/tabbar-item/index.wxml +32 -0
  507. package/dist/tabbar-item/index.wxss +1 -0
  508. package/dist/tabs/index.css +1 -0
  509. package/dist/tabs/index.d.ts +1 -0
  510. package/dist/tabs/index.js +304 -0
  511. package/dist/tabs/index.json +7 -0
  512. package/dist/tabs/index.wxml +67 -0
  513. package/dist/tabs/index.wxs +99 -0
  514. package/dist/tabs/index.wxss +1 -0
  515. package/dist/tag/index.css +1 -0
  516. package/dist/tag/index.d.ts +1 -0
  517. package/dist/tag/index.js +29 -0
  518. package/dist/tag/index.json +6 -0
  519. package/dist/tag/index.wxml +17 -0
  520. package/dist/tag/index.wxs +13 -0
  521. package/dist/tag/index.wxss +1 -0
  522. package/dist/toast/icons.d.ts +3 -0
  523. package/dist/toast/icons.js +6 -0
  524. package/dist/toast/index.css +1 -0
  525. package/dist/toast/index.d.ts +1 -0
  526. package/dist/toast/index.js +58 -0
  527. package/dist/toast/index.json +9 -0
  528. package/dist/toast/index.wxml +33 -0
  529. package/dist/toast/index.wxss +1 -0
  530. package/dist/toast/toast.d.ts +35 -0
  531. package/dist/toast/toast.js +97 -0
  532. package/dist/transition/index.css +1 -0
  533. package/dist/transition/index.d.ts +1 -0
  534. package/dist/transition/index.js +13 -0
  535. package/dist/transition/index.json +3 -0
  536. package/dist/transition/index.wxml +9 -0
  537. package/dist/transition/index.wxs +17 -0
  538. package/dist/transition/index.wxss +1 -0
  539. package/dist/tree-select/index.css +1 -0
  540. package/dist/tree-select/index.d.ts +1 -0
  541. package/dist/tree-select/index.js +69 -0
  542. package/dist/tree-select/index.json +8 -0
  543. package/dist/tree-select/index.wxml +41 -0
  544. package/dist/tree-select/index.wxs +12 -0
  545. package/dist/tree-select/index.wxss +1 -0
  546. package/dist/wxs/add-unit.wxs +12 -0
  547. package/dist/wxs/array.wxs +5 -0
  548. package/dist/wxs/bem.wxs +39 -0
  549. package/dist/wxs/memoize.wxs +55 -0
  550. package/dist/wxs/object.wxs +13 -0
  551. package/dist/wxs/style.wxs +46 -0
  552. package/dist/wxs/utils.wxs +85 -0
  553. package/lib/action-sheet/index.css +1 -0
  554. package/lib/action-sheet/index.d.ts +1 -0
  555. package/lib/action-sheet/index.js +121 -0
  556. package/lib/action-sheet/index.json +8 -0
  557. package/lib/action-sheet/index.wxml +87 -0
  558. package/lib/action-sheet/index.wxss +1 -0
  559. package/lib/area/index.css +1 -0
  560. package/lib/area/index.d.ts +1 -0
  561. package/lib/area/index.js +234 -0
  562. package/lib/area/index.json +6 -0
  563. package/lib/area/index.wxml +20 -0
  564. package/lib/area/index.wxs +8 -0
  565. package/lib/area/index.wxss +1 -0
  566. package/lib/battery/index.d.ts +1 -0
  567. package/lib/battery/index.js +105 -0
  568. package/lib/battery/index.json +4 -0
  569. package/lib/battery/index.wxml +1 -0
  570. package/lib/bottom-sheet/index.css +1 -0
  571. package/lib/bottom-sheet/index.d.ts +1 -0
  572. package/lib/bottom-sheet/index.js +156 -0
  573. package/lib/bottom-sheet/index.json +8 -0
  574. package/lib/bottom-sheet/index.wxml +71 -0
  575. package/lib/bottom-sheet/index.wxs +159 -0
  576. package/lib/bottom-sheet/index.wxss +1 -0
  577. package/lib/button/index.css +1 -0
  578. package/lib/button/index.d.ts +1 -0
  579. package/lib/button/index.js +64 -0
  580. package/lib/button/index.json +7 -0
  581. package/lib/button/index.wxml +64 -0
  582. package/lib/button/index.wxs +39 -0
  583. package/lib/button/index.wxss +1 -0
  584. package/lib/calendar/calendar.wxml +84 -0
  585. package/lib/calendar/index.css +1 -0
  586. package/lib/calendar/index.d.ts +1 -0
  587. package/lib/calendar/index.js +465 -0
  588. package/lib/calendar/index.json +12 -0
  589. package/lib/calendar/index.wxml +25 -0
  590. package/lib/calendar/index.wxs +59 -0
  591. package/lib/calendar/index.wxss +1 -0
  592. package/lib/calendar-header/index.css +1 -0
  593. package/lib/calendar-header/index.d.ts +1 -0
  594. package/lib/calendar-header/index.js +75 -0
  595. package/lib/calendar-header/index.json +6 -0
  596. package/lib/calendar-header/index.wxml +27 -0
  597. package/lib/calendar-header/index.wxss +1 -0
  598. package/lib/calendar-month/index.css +1 -0
  599. package/lib/calendar-month/index.d.ts +1 -0
  600. package/lib/calendar-month/index.js +179 -0
  601. package/lib/calendar-month/index.json +3 -0
  602. package/lib/calendar-month/index.wxml +22 -0
  603. package/lib/calendar-month/index.wxs +73 -0
  604. package/lib/calendar-month/index.wxss +1 -0
  605. package/lib/calendar-month-list/index.css +1 -0
  606. package/lib/calendar-month-list/index.d.ts +1 -0
  607. package/lib/calendar-month-list/index.js +105 -0
  608. package/lib/calendar-month-list/index.json +7 -0
  609. package/lib/calendar-month-list/index.wxml +15 -0
  610. package/lib/calendar-month-list/index.wxss +1 -0
  611. package/lib/calendar-utils/types.d.ts +7 -0
  612. package/lib/calendar-utils/types.js +2 -0
  613. package/lib/calendar-utils/utils.d.ts +21 -0
  614. package/lib/calendar-utils/utils.js +175 -0
  615. package/lib/calendar-utils/utils.wxs +25 -0
  616. package/lib/calendar-year-list/index.css +1 -0
  617. package/lib/calendar-year-list/index.d.ts +1 -0
  618. package/lib/calendar-year-list/index.js +115 -0
  619. package/lib/calendar-year-list/index.json +7 -0
  620. package/lib/calendar-year-list/index.wxml +15 -0
  621. package/lib/calendar-year-list/index.wxss +1 -0
  622. package/lib/cascader/index.css +1 -0
  623. package/lib/cascader/index.d.ts +1 -0
  624. package/lib/cascader/index.js +207 -0
  625. package/lib/cascader/index.json +8 -0
  626. package/lib/cascader/index.wxml +56 -0
  627. package/lib/cascader/index.wxs +21 -0
  628. package/lib/cascader/index.wxss +1 -0
  629. package/lib/cell/index.css +1 -0
  630. package/lib/cell/index.d.ts +1 -0
  631. package/lib/cell/index.js +48 -0
  632. package/lib/cell/index.json +6 -0
  633. package/lib/cell/index.wxml +47 -0
  634. package/lib/cell/index.wxs +17 -0
  635. package/lib/cell/index.wxss +1 -0
  636. package/lib/cell-group/index.css +1 -0
  637. package/lib/cell-group/index.d.ts +1 -0
  638. package/lib/cell-group/index.js +14 -0
  639. package/lib/cell-group/index.json +3 -0
  640. package/lib/cell-group/index.wxml +15 -0
  641. package/lib/cell-group/index.wxs +14 -0
  642. package/lib/cell-group/index.wxss +1 -0
  643. package/lib/checkbox/index.css +1 -0
  644. package/lib/checkbox/index.d.ts +1 -0
  645. package/lib/checkbox/index.js +84 -0
  646. package/lib/checkbox/index.json +6 -0
  647. package/lib/checkbox/index.wxml +32 -0
  648. package/lib/checkbox/index.wxs +20 -0
  649. package/lib/checkbox/index.wxss +1 -0
  650. package/lib/checkbox-group/index.css +1 -0
  651. package/lib/checkbox-group/index.d.ts +1 -0
  652. package/lib/checkbox-group/index.js +39 -0
  653. package/lib/checkbox-group/index.json +3 -0
  654. package/lib/checkbox-group/index.wxml +5 -0
  655. package/lib/checkbox-group/index.wxss +1 -0
  656. package/lib/circle/index.css +1 -0
  657. package/lib/circle/index.d.ts +1 -0
  658. package/lib/circle/index.js +134 -0
  659. package/lib/circle/index.json +3 -0
  660. package/lib/circle/index.rjs +232 -0
  661. package/lib/circle/index.wxml +8 -0
  662. package/lib/circle/index.wxss +1 -0
  663. package/lib/col/index.css +1 -0
  664. package/lib/col/index.d.ts +1 -0
  665. package/lib/col/index.js +11 -0
  666. package/lib/col/index.json +3 -0
  667. package/lib/col/index.wxml +9 -0
  668. package/lib/col/index.wxs +18 -0
  669. package/lib/col/index.wxss +1 -0
  670. package/lib/collapse/index.css +1 -0
  671. package/lib/collapse/index.d.ts +1 -0
  672. package/lib/collapse/index.js +48 -0
  673. package/lib/collapse/index.json +3 -0
  674. package/lib/collapse/index.wxml +3 -0
  675. package/lib/collapse/index.wxss +1 -0
  676. package/lib/collapse-item/animate.d.ts +2 -0
  677. package/lib/collapse-item/animate.js +43 -0
  678. package/lib/collapse-item/index.css +1 -0
  679. package/lib/collapse-item/index.d.ts +1 -0
  680. package/lib/collapse-item/index.js +64 -0
  681. package/lib/collapse-item/index.json +6 -0
  682. package/lib/collapse-item/index.wxml +45 -0
  683. package/lib/collapse-item/index.wxss +1 -0
  684. package/lib/common/appLog.d.ts +10 -0
  685. package/lib/common/appLog.js +112 -0
  686. package/lib/common/color.d.ts +7 -0
  687. package/lib/common/color.js +10 -0
  688. package/lib/common/component.d.ts +4 -0
  689. package/lib/common/component.js +49 -0
  690. package/lib/common/index.css +1 -0
  691. package/lib/common/index.wxss +1 -0
  692. package/lib/common/relation.d.ts +15 -0
  693. package/lib/common/relation.js +65 -0
  694. package/lib/common/style/clearfix.css +1 -0
  695. package/lib/common/style/clearfix.wxss +1 -0
  696. package/lib/common/style/ellipsis.css +1 -0
  697. package/lib/common/style/ellipsis.wxss +1 -0
  698. package/lib/common/style/hairline.css +1 -0
  699. package/lib/common/style/hairline.wxss +1 -0
  700. package/lib/common/style/mixins/clearfix.css +0 -0
  701. package/lib/common/style/mixins/clearfix.wxss +0 -0
  702. package/lib/common/style/mixins/ellipsis.css +0 -0
  703. package/lib/common/style/mixins/ellipsis.wxss +0 -0
  704. package/lib/common/style/mixins/hairline.css +1 -0
  705. package/lib/common/style/mixins/hairline.wxss +1 -0
  706. package/lib/common/style/var.css +1 -0
  707. package/lib/common/style/var.wxss +1 -0
  708. package/lib/common/ty.d.ts +7 -0
  709. package/lib/common/ty.js +35 -0
  710. package/lib/common/utils.d.ts +24 -0
  711. package/lib/common/utils.js +140 -0
  712. package/lib/common/validator.d.ts +9 -0
  713. package/lib/common/validator.js +43 -0
  714. package/lib/common/version.d.ts +15 -0
  715. package/lib/common/version.js +70 -0
  716. package/lib/config-provider/index.d.ts +1 -0
  717. package/lib/config-provider/index.js +11 -0
  718. package/lib/config-provider/index.json +3 -0
  719. package/lib/config-provider/index.wxml +5 -0
  720. package/lib/config-provider/index.wxs +29 -0
  721. package/lib/count-down/index.css +1 -0
  722. package/lib/count-down/index.d.ts +1 -0
  723. package/lib/count-down/index.js +104 -0
  724. package/lib/count-down/index.json +3 -0
  725. package/lib/count-down/index.wxml +4 -0
  726. package/lib/count-down/index.wxss +1 -0
  727. package/lib/count-down/utils.d.ts +10 -0
  728. package/lib/count-down/utils.js +64 -0
  729. package/lib/custom-keyboard/index.css +1 -0
  730. package/lib/custom-keyboard/index.d.ts +1 -0
  731. package/lib/custom-keyboard/index.js +156 -0
  732. package/lib/custom-keyboard/index.json +9 -0
  733. package/lib/custom-keyboard/index.wxml +44 -0
  734. package/lib/custom-keyboard/index.wxss +1 -0
  735. package/lib/datetime-picker/index.css +1 -0
  736. package/lib/datetime-picker/index.d.ts +1 -0
  737. package/lib/datetime-picker/index.js +512 -0
  738. package/lib/datetime-picker/index.json +6 -0
  739. package/lib/datetime-picker/index.wxml +22 -0
  740. package/lib/datetime-picker/index.wxss +1 -0
  741. package/lib/definitions/index.d.ts +29 -0
  742. package/lib/definitions/index.js +2 -0
  743. package/lib/dialog/dialog.d.ts +75 -0
  744. package/lib/dialog/dialog.js +137 -0
  745. package/lib/dialog/index.css +1 -0
  746. package/lib/dialog/index.d.ts +1 -0
  747. package/lib/dialog/index.js +223 -0
  748. package/lib/dialog/index.json +10 -0
  749. package/lib/dialog/index.wxml +146 -0
  750. package/lib/dialog/index.wxss +1 -0
  751. package/lib/divider/index.css +1 -0
  752. package/lib/divider/index.d.ts +1 -0
  753. package/lib/divider/index.js +14 -0
  754. package/lib/divider/index.json +4 -0
  755. package/lib/divider/index.wxml +9 -0
  756. package/lib/divider/index.wxs +18 -0
  757. package/lib/divider/index.wxss +1 -0
  758. package/lib/dropdown-item/index.css +1 -0
  759. package/lib/dropdown-item/index.d.ts +1 -0
  760. package/lib/dropdown-item/index.js +150 -0
  761. package/lib/dropdown-item/index.json +8 -0
  762. package/lib/dropdown-item/index.wxml +52 -0
  763. package/lib/dropdown-item/index.wxss +1 -0
  764. package/lib/dropdown-item/shared.d.ts +5 -0
  765. package/lib/dropdown-item/shared.js +2 -0
  766. package/lib/dropdown-menu/index.css +1 -0
  767. package/lib/dropdown-menu/index.d.ts +1 -0
  768. package/lib/dropdown-menu/index.js +137 -0
  769. package/lib/dropdown-menu/index.json +6 -0
  770. package/lib/dropdown-menu/index.wxml +24 -0
  771. package/lib/dropdown-menu/index.wxs +16 -0
  772. package/lib/dropdown-menu/index.wxss +1 -0
  773. package/lib/empty/index.css +1 -0
  774. package/lib/empty/index.d.ts +1 -0
  775. package/lib/empty/index.js +31 -0
  776. package/lib/empty/index.json +4 -0
  777. package/lib/empty/index.wxml +22 -0
  778. package/lib/empty/index.wxs +13 -0
  779. package/lib/empty/index.wxss +1 -0
  780. package/lib/field/cell-input.wxml +59 -0
  781. package/lib/field/cell-textarea.wxml +28 -0
  782. package/lib/field/index.css +1 -0
  783. package/lib/field/index.d.ts +1 -0
  784. package/lib/field/index.js +160 -0
  785. package/lib/field/index.json +7 -0
  786. package/lib/field/index.wxml +4 -0
  787. package/lib/field/index.wxs +19 -0
  788. package/lib/field/index.wxss +1 -0
  789. package/lib/field/input.wxml +30 -0
  790. package/lib/field/props.d.ts +4 -0
  791. package/lib/field/props.js +59 -0
  792. package/lib/field/textarea.wxml +32 -0
  793. package/lib/field/types.d.ts +8 -0
  794. package/lib/field/types.js +2 -0
  795. package/lib/goods-action/index.css +1 -0
  796. package/lib/goods-action/index.d.ts +1 -0
  797. package/lib/goods-action/index.js +17 -0
  798. package/lib/goods-action/index.json +3 -0
  799. package/lib/goods-action/index.wxml +5 -0
  800. package/lib/goods-action/index.wxss +1 -0
  801. package/lib/goods-action-button/index.css +1 -0
  802. package/lib/goods-action-button/index.d.ts +1 -0
  803. package/lib/goods-action-button/index.js +51 -0
  804. package/lib/goods-action-button/index.json +6 -0
  805. package/lib/goods-action-button/index.wxml +35 -0
  806. package/lib/goods-action-button/index.wxss +1 -0
  807. package/lib/goods-action-icon/index.css +1 -0
  808. package/lib/goods-action-icon/index.d.ts +1 -0
  809. package/lib/goods-action-icon/index.js +29 -0
  810. package/lib/goods-action-icon/index.json +7 -0
  811. package/lib/goods-action-icon/index.wxml +41 -0
  812. package/lib/goods-action-icon/index.wxss +1 -0
  813. package/lib/grid/index.css +1 -0
  814. package/lib/grid/index.d.ts +1 -0
  815. package/lib/grid/index.js +57 -0
  816. package/lib/grid/index.json +3 -0
  817. package/lib/grid/index.wxml +8 -0
  818. package/lib/grid/index.wxs +13 -0
  819. package/lib/grid/index.wxss +1 -0
  820. package/lib/grid-item/index.css +1 -0
  821. package/lib/grid-item/index.d.ts +1 -0
  822. package/lib/grid-item/index.js +54 -0
  823. package/lib/grid-item/index.json +6 -0
  824. package/lib/grid-item/index.wxml +27 -0
  825. package/lib/grid-item/index.wxs +32 -0
  826. package/lib/grid-item/index.wxss +1 -0
  827. package/lib/icon/index.css +1 -0
  828. package/lib/icon/index.d.ts +1 -0
  829. package/lib/icon/index.js +23 -0
  830. package/lib/icon/index.json +6 -0
  831. package/lib/icon/index.wxml +30 -0
  832. package/lib/icon/index.wxs +94 -0
  833. package/lib/icon/index.wxss +1 -0
  834. package/lib/image/index.css +1 -0
  835. package/lib/image/index.d.ts +1 -0
  836. package/lib/image/index.js +75 -0
  837. package/lib/image/index.json +7 -0
  838. package/lib/image/index.wxml +40 -0
  839. package/lib/image/index.wxs +42 -0
  840. package/lib/image/index.wxss +1 -0
  841. package/lib/index-anchor/index.css +1 -0
  842. package/lib/index-anchor/index.d.ts +1 -0
  843. package/lib/index-anchor/index.js +28 -0
  844. package/lib/index-anchor/index.json +3 -0
  845. package/lib/index-anchor/index.wxml +14 -0
  846. package/lib/index-anchor/index.wxss +1 -0
  847. package/lib/index-bar/index.css +1 -0
  848. package/lib/index-bar/index.d.ts +1 -0
  849. package/lib/index-bar/index.js +244 -0
  850. package/lib/index-bar/index.json +3 -0
  851. package/lib/index-bar/index.wxml +22 -0
  852. package/lib/index-bar/index.wxss +1 -0
  853. package/lib/info/index.css +1 -0
  854. package/lib/info/index.d.ts +1 -0
  855. package/lib/info/index.js +10 -0
  856. package/lib/info/index.json +3 -0
  857. package/lib/info/index.wxml +7 -0
  858. package/lib/info/index.wxss +1 -0
  859. package/lib/loading/index.css +1 -0
  860. package/lib/loading/index.d.ts +1 -0
  861. package/lib/loading/index.js +44 -0
  862. package/lib/loading/index.json +3 -0
  863. package/lib/loading/index.wxml +17 -0
  864. package/lib/loading/index.wxs +39 -0
  865. package/lib/loading/index.wxss +1 -0
  866. package/lib/mixins/basic.d.ts +1 -0
  867. package/lib/mixins/basic.js +30 -0
  868. package/lib/mixins/button.d.ts +1 -0
  869. package/lib/mixins/button.js +54 -0
  870. package/lib/mixins/link.d.ts +1 -0
  871. package/lib/mixins/link.js +26 -0
  872. package/lib/mixins/page-scroll.d.ts +6 -0
  873. package/lib/mixins/page-scroll.js +47 -0
  874. package/lib/mixins/touch.d.ts +1 -0
  875. package/lib/mixins/touch.js +39 -0
  876. package/lib/mixins/transition.d.ts +1 -0
  877. package/lib/mixins/transition.js +235 -0
  878. package/lib/nav-bar/index.css +1 -0
  879. package/lib/nav-bar/index.d.ts +1 -0
  880. package/lib/nav-bar/index.js +116 -0
  881. package/lib/nav-bar/index.json +6 -0
  882. package/lib/nav-bar/index.wxml +70 -0
  883. package/lib/nav-bar/index.wxs +14 -0
  884. package/lib/nav-bar/index.wxss +1 -0
  885. package/lib/normal-slider/index.css +1 -0
  886. package/lib/normal-slider/index.d.ts +1 -0
  887. package/lib/normal-slider/index.js +160 -0
  888. package/lib/normal-slider/index.json +6 -0
  889. package/lib/normal-slider/index.wxml +35 -0
  890. package/lib/normal-slider/index.wxss +1 -0
  891. package/lib/notice-bar/index.css +1 -0
  892. package/lib/notice-bar/index.d.ts +1 -0
  893. package/lib/notice-bar/index.js +178 -0
  894. package/lib/notice-bar/index.json +6 -0
  895. package/lib/notice-bar/index.wxml +52 -0
  896. package/lib/notice-bar/index.wxs +11 -0
  897. package/lib/notice-bar/index.wxss +1 -0
  898. package/lib/notify/index.css +1 -0
  899. package/lib/notify/index.d.ts +1 -0
  900. package/lib/notify/index.js +80 -0
  901. package/lib/notify/index.json +6 -0
  902. package/lib/notify/index.wxml +22 -0
  903. package/lib/notify/index.wxs +22 -0
  904. package/lib/notify/index.wxss +1 -0
  905. package/lib/notify/notify.d.ts +29 -0
  906. package/lib/notify/notify.js +72 -0
  907. package/lib/overlay/index.css +1 -0
  908. package/lib/overlay/index.d.ts +1 -0
  909. package/lib/overlay/index.js +32 -0
  910. package/lib/overlay/index.json +6 -0
  911. package/lib/overlay/index.wxml +7 -0
  912. package/lib/overlay/index.wxss +1 -0
  913. package/lib/overlay/overlay.wxml +10 -0
  914. package/lib/picker/index.css +1 -0
  915. package/lib/picker/index.d.ts +1 -0
  916. package/lib/picker/index.js +191 -0
  917. package/lib/picker/index.json +7 -0
  918. package/lib/picker/index.wxml +48 -0
  919. package/lib/picker/index.wxs +44 -0
  920. package/lib/picker/index.wxss +1 -0
  921. package/lib/picker/shared.d.ts +44 -0
  922. package/lib/picker/shared.js +47 -0
  923. package/lib/picker/toolbar.wxml +23 -0
  924. package/lib/picker-column/index.css +1 -0
  925. package/lib/picker-column/index.d.ts +1 -0
  926. package/lib/picker-column/index.js +337 -0
  927. package/lib/picker-column/index.json +3 -0
  928. package/lib/picker-column/index.wxml +60 -0
  929. package/lib/picker-column/index.wxs +628 -0
  930. package/lib/picker-column/index.wxss +1 -0
  931. package/lib/popover/index.css +1 -0
  932. package/lib/popover/index.d.ts +1 -0
  933. package/lib/popover/index.js +224 -0
  934. package/lib/popover/index.json +7 -0
  935. package/lib/popover/index.wxml +31 -0
  936. package/lib/popover/index.wxss +1 -0
  937. package/lib/popup/index.css +1 -0
  938. package/lib/popup/index.d.ts +1 -0
  939. package/lib/popup/index.js +122 -0
  940. package/lib/popup/index.json +7 -0
  941. package/lib/popup/index.wxml +21 -0
  942. package/lib/popup/index.wxs +23 -0
  943. package/lib/popup/index.wxss +1 -0
  944. package/lib/popup/popup.wxml +16 -0
  945. package/lib/progress/index.css +1 -0
  946. package/lib/progress/index.d.ts +1 -0
  947. package/lib/progress/index.js +52 -0
  948. package/lib/progress/index.json +3 -0
  949. package/lib/progress/index.wxml +20 -0
  950. package/lib/progress/index.wxs +36 -0
  951. package/lib/progress/index.wxss +1 -0
  952. package/lib/radio/index.css +1 -0
  953. package/lib/radio/index.d.ts +1 -0
  954. package/lib/radio/index.js +75 -0
  955. package/lib/radio/index.json +6 -0
  956. package/lib/radio/index.wxml +32 -0
  957. package/lib/radio/index.wxs +33 -0
  958. package/lib/radio/index.wxss +1 -0
  959. package/lib/radio-group/index.css +1 -0
  960. package/lib/radio-group/index.d.ts +1 -0
  961. package/lib/radio-group/index.js +29 -0
  962. package/lib/radio-group/index.json +3 -0
  963. package/lib/radio-group/index.wxml +5 -0
  964. package/lib/radio-group/index.wxss +1 -0
  965. package/lib/rate/index.css +1 -0
  966. package/lib/rate/index.d.ts +1 -0
  967. package/lib/rate/index.js +107 -0
  968. package/lib/rate/index.json +6 -0
  969. package/lib/rate/index.wxml +35 -0
  970. package/lib/rate/index.wxss +1 -0
  971. package/lib/row/index.css +1 -0
  972. package/lib/row/index.d.ts +1 -0
  973. package/lib/row/index.js +26 -0
  974. package/lib/row/index.json +3 -0
  975. package/lib/row/index.wxml +5 -0
  976. package/lib/row/index.wxs +18 -0
  977. package/lib/row/index.wxss +1 -0
  978. package/lib/search/index.css +1 -0
  979. package/lib/search/index.d.ts +1 -0
  980. package/lib/search/index.js +106 -0
  981. package/lib/search/index.json +7 -0
  982. package/lib/search/index.wxml +57 -0
  983. package/lib/search/index.wxss +1 -0
  984. package/lib/sidebar/index.css +1 -0
  985. package/lib/sidebar/index.d.ts +1 -0
  986. package/lib/sidebar/index.js +36 -0
  987. package/lib/sidebar/index.json +3 -0
  988. package/lib/sidebar/index.wxml +3 -0
  989. package/lib/sidebar/index.wxss +1 -0
  990. package/lib/sidebar-item/index.css +1 -0
  991. package/lib/sidebar-item/index.d.ts +1 -0
  992. package/lib/sidebar-item/index.js +32 -0
  993. package/lib/sidebar-item/index.json +6 -0
  994. package/lib/sidebar-item/index.wxml +18 -0
  995. package/lib/sidebar-item/index.wxss +1 -0
  996. package/lib/skeleton/index.css +1 -0
  997. package/lib/skeleton/index.d.ts +1 -0
  998. package/lib/skeleton/index.js +48 -0
  999. package/lib/skeleton/index.json +4 -0
  1000. package/lib/skeleton/index.wxml +29 -0
  1001. package/lib/skeleton/index.wxss +1 -0
  1002. package/lib/slider/index.css +1 -0
  1003. package/lib/slider/index.d.ts +1 -0
  1004. package/lib/slider/index.js +208 -0
  1005. package/lib/slider/index.json +3 -0
  1006. package/lib/slider/index.wxml +68 -0
  1007. package/lib/slider/index.wxs +14 -0
  1008. package/lib/slider/index.wxss +1 -0
  1009. package/lib/stepper/index.css +1 -0
  1010. package/lib/stepper/index.d.ts +1 -0
  1011. package/lib/stepper/index.js +225 -0
  1012. package/lib/stepper/index.json +6 -0
  1013. package/lib/stepper/index.wxml +45 -0
  1014. package/lib/stepper/index.wxs +32 -0
  1015. package/lib/stepper/index.wxss +1 -0
  1016. package/lib/steps/index.css +1 -0
  1017. package/lib/steps/index.d.ts +1 -0
  1018. package/lib/steps/index.js +39 -0
  1019. package/lib/steps/index.json +6 -0
  1020. package/lib/steps/index.wxml +54 -0
  1021. package/lib/steps/index.wxss +1 -0
  1022. package/lib/sticky/index.css +1 -0
  1023. package/lib/sticky/index.d.ts +1 -0
  1024. package/lib/sticky/index.js +128 -0
  1025. package/lib/sticky/index.json +3 -0
  1026. package/lib/sticky/index.wxml +8 -0
  1027. package/lib/sticky/index.wxs +25 -0
  1028. package/lib/sticky/index.wxss +1 -0
  1029. package/lib/swipe-cell/index.css +1 -0
  1030. package/lib/swipe-cell/index.d.ts +1 -0
  1031. package/lib/swipe-cell/index.js +142 -0
  1032. package/lib/swipe-cell/index.json +3 -0
  1033. package/lib/swipe-cell/index.wxml +21 -0
  1034. package/lib/swipe-cell/index.wxss +1 -0
  1035. package/lib/switch/index.css +1 -0
  1036. package/lib/switch/index.d.ts +1 -0
  1037. package/lib/switch/index.js +44 -0
  1038. package/lib/switch/index.json +6 -0
  1039. package/lib/switch/index.wxml +51 -0
  1040. package/lib/switch/index.wxs +26 -0
  1041. package/lib/switch/index.wxss +1 -0
  1042. package/lib/tab/index.css +1 -0
  1043. package/lib/tab/index.d.ts +1 -0
  1044. package/lib/tab/index.js +66 -0
  1045. package/lib/tab/index.json +3 -0
  1046. package/lib/tab/index.wxml +8 -0
  1047. package/lib/tab/index.wxss +1 -0
  1048. package/lib/tabbar/index.css +1 -0
  1049. package/lib/tabbar/index.d.ts +1 -0
  1050. package/lib/tabbar/index.js +73 -0
  1051. package/lib/tabbar/index.json +3 -0
  1052. package/lib/tabbar/index.wxml +12 -0
  1053. package/lib/tabbar/index.wxss +1 -0
  1054. package/lib/tabbar-item/index.css +1 -0
  1055. package/lib/tabbar-item/index.d.ts +1 -0
  1056. package/lib/tabbar-item/index.js +79 -0
  1057. package/lib/tabbar-item/index.json +7 -0
  1058. package/lib/tabbar-item/index.wxml +32 -0
  1059. package/lib/tabbar-item/index.wxss +1 -0
  1060. package/lib/tabs/index.css +1 -0
  1061. package/lib/tabs/index.d.ts +1 -0
  1062. package/lib/tabs/index.js +329 -0
  1063. package/lib/tabs/index.json +7 -0
  1064. package/lib/tabs/index.wxml +67 -0
  1065. package/lib/tabs/index.wxs +99 -0
  1066. package/lib/tabs/index.wxss +1 -0
  1067. package/lib/tag/index.css +1 -0
  1068. package/lib/tag/index.d.ts +1 -0
  1069. package/lib/tag/index.js +34 -0
  1070. package/lib/tag/index.json +6 -0
  1071. package/lib/tag/index.wxml +17 -0
  1072. package/lib/tag/index.wxs +13 -0
  1073. package/lib/tag/index.wxss +1 -0
  1074. package/lib/toast/icons.d.ts +3 -0
  1075. package/lib/toast/icons.js +12 -0
  1076. package/lib/toast/index.css +1 -0
  1077. package/lib/toast/index.d.ts +1 -0
  1078. package/lib/toast/index.js +63 -0
  1079. package/lib/toast/index.json +9 -0
  1080. package/lib/toast/index.wxml +33 -0
  1081. package/lib/toast/index.wxss +1 -0
  1082. package/lib/toast/toast.d.ts +35 -0
  1083. package/lib/toast/toast.js +116 -0
  1084. package/lib/transition/index.css +1 -0
  1085. package/lib/transition/index.d.ts +1 -0
  1086. package/lib/transition/index.js +15 -0
  1087. package/lib/transition/index.json +3 -0
  1088. package/lib/transition/index.wxml +9 -0
  1089. package/lib/transition/index.wxs +17 -0
  1090. package/lib/transition/index.wxss +1 -0
  1091. package/lib/tree-select/index.css +1 -0
  1092. package/lib/tree-select/index.d.ts +1 -0
  1093. package/lib/tree-select/index.js +74 -0
  1094. package/lib/tree-select/index.json +8 -0
  1095. package/lib/tree-select/index.wxml +41 -0
  1096. package/lib/tree-select/index.wxs +12 -0
  1097. package/lib/tree-select/index.wxss +1 -0
  1098. package/lib/wxs/add-unit.wxs +12 -0
  1099. package/lib/wxs/array.wxs +5 -0
  1100. package/lib/wxs/bem.wxs +39 -0
  1101. package/lib/wxs/memoize.wxs +55 -0
  1102. package/lib/wxs/object.wxs +13 -0
  1103. package/lib/wxs/style.wxs +46 -0
  1104. package/lib/wxs/utils.wxs +85 -0
  1105. package/package.json +1 -1
@@ -0,0 +1,479 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { SmartComponent } from '../common/component';
13
+ import { isDef } from '../common/validator';
14
+ import { pickerProps } from '../picker/shared';
15
+ import { range, replacePlaceholders } from '../common/utils';
16
+ const currentYear = new Date().getFullYear();
17
+ function isValidDate(date) {
18
+ return isDef(date) && !isNaN(new Date(date).getTime());
19
+ }
20
+ function padZero(val) {
21
+ return `00${val}`.slice(-2);
22
+ }
23
+ function times(n, iteratee) {
24
+ let index = -1;
25
+ const result = Array(n < 0 ? 0 : n);
26
+ while (++index < n) {
27
+ result[index] = iteratee(index);
28
+ }
29
+ return result;
30
+ }
31
+ function getTrueValue(formattedValue) {
32
+ if (formattedValue === undefined) {
33
+ formattedValue = '1';
34
+ }
35
+ while (isNaN(parseInt(formattedValue, 10))) {
36
+ formattedValue = formattedValue.slice(1);
37
+ }
38
+ return parseInt(formattedValue, 10);
39
+ }
40
+ function getMonthEndDay(year, month) {
41
+ return 32 - new Date(year, month - 1, 32).getDate();
42
+ }
43
+ function findIntersection(range1, range2) {
44
+ const [start1, end1] = range1;
45
+ const [start2, end2] = range2;
46
+ // 确定交集的开始和结束
47
+ const intersectionStart = Math.max(start1, start2);
48
+ const intersectionEnd = Math.min(end1, end2);
49
+ // 检查是否有交集
50
+ if (intersectionStart <= intersectionEnd) {
51
+ return [intersectionStart, intersectionEnd];
52
+ }
53
+ return []; // 没有交集
54
+ }
55
+ const defaultFormatter = (type, value) => value;
56
+ SmartComponent({
57
+ classes: ['active-class', 'toolbar-class', 'column-class'],
58
+ props: Object.assign(Object.assign({}, pickerProps), { value: {
59
+ type: null,
60
+ observer: 'updateValue',
61
+ }, filter: null, type: {
62
+ type: String,
63
+ value: 'datetime',
64
+ observer: 'updateValue',
65
+ }, showToolbar: {
66
+ type: Boolean,
67
+ value: true,
68
+ }, locale: {
69
+ type: Object,
70
+ }, formatter: {
71
+ type: null,
72
+ value: defaultFormatter,
73
+ }, amText: {
74
+ type: String,
75
+ value: 'AM',
76
+ }, pmText: {
77
+ type: String,
78
+ value: 'PM',
79
+ }, columnsOrder: {
80
+ type: Array,
81
+ value: [],
82
+ }, is12HourClock: {
83
+ type: Boolean,
84
+ value: false,
85
+ }, minDate: {
86
+ type: Number,
87
+ value: new Date(currentYear - 10, 0, 1).getTime(),
88
+ observer: 'updateValue',
89
+ }, maxDate: {
90
+ type: Number,
91
+ value: new Date(currentYear + 10, 11, 31).getTime(),
92
+ observer: 'updateValue',
93
+ }, minHour: {
94
+ type: Number,
95
+ value: 0,
96
+ observer: 'updateValue',
97
+ }, maxHour: {
98
+ type: Number,
99
+ value: 23,
100
+ observer: 'updateValue',
101
+ }, minMinute: {
102
+ type: Number,
103
+ value: 0,
104
+ observer: 'updateValue',
105
+ }, maxMinute: {
106
+ type: Number,
107
+ value: 59,
108
+ observer: 'updateValue',
109
+ }, formatterMap: {
110
+ type: Object,
111
+ value: undefined,
112
+ }, columnStyles: {
113
+ type: Object,
114
+ value: undefined,
115
+ }, fontStyles: {
116
+ type: Object,
117
+ value: undefined,
118
+ } }),
119
+ data: {
120
+ part: 'am',
121
+ innerValue: Date.now(),
122
+ isCreated: false,
123
+ columns: [],
124
+ },
125
+ created() {
126
+ const innerValue = this.correctValue(this.data.value);
127
+ this.updateColumnValue(innerValue);
128
+ if (innerValue !== this.data.value) {
129
+ this.$emit('input', innerValue);
130
+ }
131
+ this.setData({
132
+ isCreated: true,
133
+ });
134
+ },
135
+ methods: {
136
+ updateValue() {
137
+ const { value, innerValue, isCreated } = this.data;
138
+ if (!isCreated)
139
+ return;
140
+ const val = this.correctValue(value);
141
+ const isEqual = val === innerValue;
142
+ this.updateColumnValue(val);
143
+ if (!isEqual) {
144
+ this.$emit('input', val);
145
+ }
146
+ },
147
+ getPicker() {
148
+ if (this.picker == null) {
149
+ this.picker = this.selectComponent('.smart-datetime-picker');
150
+ const { picker } = this;
151
+ const { setColumnValues } = picker;
152
+ picker.setColumnValues = (...args) => setColumnValues.apply(picker, [...args, false]);
153
+ }
154
+ return this.picker;
155
+ },
156
+ getTimeBoundary() {
157
+ const { type, is12HourClock, minHour, maxHour, minMinute, maxMinute } = this.data;
158
+ if (type === 'time' && is12HourClock) {
159
+ if (minHour === 1 && maxHour === 24) {
160
+ return {
161
+ minHour: 0,
162
+ maxHour: 23,
163
+ minMinute,
164
+ maxMinute,
165
+ };
166
+ }
167
+ }
168
+ return {
169
+ minHour,
170
+ maxHour,
171
+ minMinute,
172
+ maxMinute,
173
+ };
174
+ },
175
+ formatterFunc(type, value, data) {
176
+ var _a, _b;
177
+ if (type === 'part') {
178
+ return value === 'am' ? data.amText : data.pmText;
179
+ }
180
+ const { formatterMap, formatter = defaultFormatter } = (_a = this === null || this === void 0 ? void 0 : this.data) !== null && _a !== void 0 ? _a : data;
181
+ const mapDetail = formatterMap === null || formatterMap === void 0 ? void 0 : formatterMap[type];
182
+ if (typeof mapDetail === 'string') {
183
+ return replacePlaceholders(mapDetail, { [type]: value });
184
+ }
185
+ if (typeof mapDetail === 'object') {
186
+ return (_b = mapDetail[value]) !== null && _b !== void 0 ? _b : formatter(type, value);
187
+ }
188
+ return formatter(type, value);
189
+ },
190
+ updateColumns(values) {
191
+ const { locale, columnStyles, fontStyles } = this.data;
192
+ const results = this.getOriginColumns().map((column, index) => {
193
+ const value = values[index];
194
+ const list = column.values.map(value => this.formatterFunc(column.type, value, this.data));
195
+ const activeIndex = list.findIndex(item => item === value);
196
+ return {
197
+ values: list,
198
+ order: column.order,
199
+ unit: locale === null || locale === void 0 ? void 0 : locale[column.type],
200
+ style: columnStyles === null || columnStyles === void 0 ? void 0 : columnStyles[column.type],
201
+ fontStyle: fontStyles === null || fontStyles === void 0 ? void 0 : fontStyles[column.type],
202
+ activeIndex: activeIndex === -1 ? 0 : activeIndex,
203
+ loop: !['12HourClock', 'year'].includes(column.type),
204
+ };
205
+ });
206
+ return this.setData({ columns: results });
207
+ },
208
+ getOriginColumns() {
209
+ const { part, filter, is12HourClock, type, amText, pmText, columnsOrder } = this.data;
210
+ const { minHour, maxHour } = this.getTimeBoundary();
211
+ const results = this.getRanges().map(({ type: timeType, range }, index) => {
212
+ const order = columnsOrder[index];
213
+ let values = times(range[1] - range[0] + 1, index => {
214
+ const value = range[0] + index;
215
+ if (is12HourClock && type === 'time' && timeType === 'hour') {
216
+ if (part === 'pm') {
217
+ if (value === 12)
218
+ return '12';
219
+ return padZero(value - 12);
220
+ }
221
+ if (value === 0)
222
+ return '12';
223
+ return padZero(value);
224
+ }
225
+ return timeType === 'year' ? `${value}` : padZero(value);
226
+ });
227
+ if (filter) {
228
+ values = filter(timeType, values);
229
+ }
230
+ return { type: timeType, values, order };
231
+ });
232
+ if (is12HourClock && type === 'time') {
233
+ return [
234
+ {
235
+ type: '12HourClock',
236
+ values: minHour > 11 ? [pmText] : maxHour < 12 ? [amText] : [amText, pmText],
237
+ order: columnsOrder[0],
238
+ },
239
+ ...results.map((item, index) => (Object.assign(Object.assign({}, item), { order: columnsOrder[index + 1] }))),
240
+ ].filter(Boolean);
241
+ }
242
+ return results;
243
+ },
244
+ getRanges() {
245
+ const { data } = this;
246
+ if (data.type === 'time' && data.is12HourClock) {
247
+ const { minHour, maxHour, minMinute, maxMinute } = this.getTimeBoundary();
248
+ const { part } = data;
249
+ const time12Range = part === 'pm' ? [12, 23] : [0, 11];
250
+ return [
251
+ {
252
+ type: 'hour',
253
+ range: findIntersection(time12Range, [minHour, maxHour]),
254
+ },
255
+ {
256
+ type: 'minute',
257
+ range: [minMinute, maxMinute],
258
+ },
259
+ ];
260
+ }
261
+ if (data.type === 'time') {
262
+ const { minHour, maxHour, minMinute, maxMinute } = this.getTimeBoundary();
263
+ return [
264
+ {
265
+ type: 'hour',
266
+ range: [minHour, maxHour],
267
+ },
268
+ {
269
+ type: 'minute',
270
+ range: [minMinute, maxMinute],
271
+ },
272
+ ];
273
+ }
274
+ const { maxYear, maxDate, maxMonth, maxHour, maxMinute } = this.getBoundary('max', data.innerValue);
275
+ const { minYear, minDate, minMonth, minHour, minMinute } = this.getBoundary('min', data.innerValue);
276
+ const result = [
277
+ {
278
+ type: 'year',
279
+ range: [minYear, maxYear],
280
+ },
281
+ {
282
+ type: 'month',
283
+ range: [minMonth, maxMonth],
284
+ },
285
+ {
286
+ type: 'day',
287
+ range: [minDate, maxDate],
288
+ },
289
+ {
290
+ type: 'hour',
291
+ range: [minHour, maxHour],
292
+ },
293
+ {
294
+ type: 'minute',
295
+ range: [minMinute, maxMinute],
296
+ },
297
+ ];
298
+ if (data.type === 'date')
299
+ result.splice(3, 2);
300
+ if (data.type === 'year-month')
301
+ result.splice(2, 3);
302
+ return result;
303
+ },
304
+ correctValue(value) {
305
+ const { data } = this;
306
+ // validate value
307
+ const isDateType = data.type !== 'time';
308
+ if (isDateType && !isValidDate(value)) {
309
+ value = data.minDate;
310
+ }
311
+ else if (!isDateType && !value) {
312
+ const { minHour } = data;
313
+ value = `${padZero(minHour)}:00`;
314
+ }
315
+ // time type
316
+ if (!isDateType) {
317
+ const { minHour, maxHour, minMinute, maxMinute } = this.getTimeBoundary();
318
+ let [hour, minute] = value.split(':');
319
+ if (Number(hour) === 24) {
320
+ hour = 0;
321
+ }
322
+ hour = padZero(range(hour, minHour, maxHour));
323
+ minute = padZero(range(minute, minMinute, maxMinute));
324
+ return `${hour}:${minute}`;
325
+ }
326
+ // date type
327
+ value = Math.max(value, data.minDate);
328
+ value = Math.min(value, data.maxDate);
329
+ return value;
330
+ },
331
+ getBoundary(type, innerValue) {
332
+ const value = new Date(innerValue);
333
+ const boundary = new Date(this.data[`${type}Date`]);
334
+ const year = boundary.getFullYear();
335
+ let month = 1;
336
+ let date = 1;
337
+ let hour = 0;
338
+ let minute = 0;
339
+ if (type === 'max') {
340
+ month = 12;
341
+ date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);
342
+ hour = 23;
343
+ minute = 59;
344
+ }
345
+ if (value.getFullYear() === year) {
346
+ month = boundary.getMonth() + 1;
347
+ if (value.getMonth() + 1 === month) {
348
+ date = boundary.getDate();
349
+ if (value.getDate() === date) {
350
+ hour = boundary.getHours();
351
+ if (value.getHours() === hour) {
352
+ minute = boundary.getMinutes();
353
+ }
354
+ }
355
+ }
356
+ }
357
+ return {
358
+ [`${type}Year`]: year,
359
+ [`${type}Month`]: month,
360
+ [`${type}Date`]: date,
361
+ [`${type}Hour`]: hour,
362
+ [`${type}Minute`]: minute,
363
+ };
364
+ },
365
+ onCancel() {
366
+ this.$emit('cancel');
367
+ },
368
+ onConfirm() {
369
+ this.$emit('confirm', this.data.innerValue);
370
+ },
371
+ onChange() {
372
+ const { data } = this;
373
+ let value;
374
+ const picker = this.getPicker();
375
+ const indexes = picker.getIndexes();
376
+ if (data.type === 'time' && data.is12HourClock) {
377
+ const originColumns = this.getOriginColumns();
378
+ const [partText, hour, minute] = indexes.map((item, index) => originColumns[index].values[item]);
379
+ const part = partText === this.data.pmText ? 'pm' : 'am';
380
+ this.setData({
381
+ part,
382
+ });
383
+ value = `${part === 'pm'
384
+ ? hour === '12'
385
+ ? 12
386
+ : Number(hour) + 12
387
+ : hour === '12'
388
+ ? 0
389
+ : Number(hour)}:${Number(minute)}`;
390
+ }
391
+ else if (data.type === 'time') {
392
+ const originColumns = this.getOriginColumns();
393
+ value = `${+originColumns[0].values[indexes[0]]}:${+originColumns[1].values[indexes[1]]}`;
394
+ }
395
+ else {
396
+ const originColumns = this.getOriginColumns();
397
+ const values = indexes.map((value, index) => originColumns[index].values[value]);
398
+ const year = getTrueValue(values[0]);
399
+ const month = getTrueValue(values[1]);
400
+ const maxDate = getMonthEndDay(year, month);
401
+ let date = getTrueValue(values[2]);
402
+ if (data.type === 'year-month') {
403
+ date = 1;
404
+ }
405
+ date = date > maxDate ? maxDate : date;
406
+ let hour = 0;
407
+ let minute = 0;
408
+ if (data.type === 'datetime') {
409
+ hour = getTrueValue(values[3]);
410
+ minute = getTrueValue(values[4]);
411
+ }
412
+ value = new Date(year, month - 1, date, hour, minute);
413
+ }
414
+ value = this.correctValue(value);
415
+ this.updateColumnValue(value);
416
+ picker.value = value;
417
+ this.$emit('input', value);
418
+ this.$emit('change', picker);
419
+ },
420
+ updateColumnValue(value) {
421
+ let values = [];
422
+ const _a = this.data, { columns, part, value: outerValue } = _a, rest = __rest(_a, ["columns", "part", "value"]);
423
+ rest.innerValue = value;
424
+ const dataStr = JSON.stringify(rest);
425
+ if (dataStr === this.preDataStr)
426
+ return;
427
+ this.preDataStr = dataStr;
428
+ const { type, is12HourClock } = this.data;
429
+ const formatter = this.formatterFunc;
430
+ if (type === 'time' && is12HourClock) {
431
+ const [hour, minute] = value.split(':');
432
+ const part = Number(hour) < 12 ? 'am' : 'pm';
433
+ this.setData({
434
+ part,
435
+ });
436
+ values = [
437
+ formatter('part', part, this.data),
438
+ formatter('hour', part === 'am'
439
+ ? hour === '0'
440
+ ? '12'
441
+ : hour
442
+ : hour === '12'
443
+ ? '12'
444
+ : padZero(Number(hour) - 12), this.data),
445
+ formatter('minute', minute, this.data),
446
+ ];
447
+ }
448
+ else if (type === 'time') {
449
+ const pair = value.split(':');
450
+ values = [formatter('hour', pair[0], this.data), formatter('minute', pair[1], this.data)];
451
+ }
452
+ else {
453
+ const date = new Date(value);
454
+ values = [
455
+ formatter('year', `${date.getFullYear()}`, this.data),
456
+ formatter('month', padZero(date.getMonth() + 1), this.data),
457
+ ];
458
+ if (type === 'date') {
459
+ values.push(formatter('day', padZero(date.getDate()), this.data));
460
+ }
461
+ if (type === 'datetime') {
462
+ values.push(formatter('day', padZero(date.getDate()), this.data), formatter('hour', padZero(date.getHours()), this.data), formatter('minute', padZero(date.getMinutes()), this.data));
463
+ }
464
+ }
465
+ this.setData({ innerValue: value });
466
+ this.updateColumns(values);
467
+ // picker.setValues(values);
468
+ // return this.set({ innerValue: value })
469
+ // .then(() => this.updateColumns())
470
+ // .then(() => picker.setValues(values));
471
+ },
472
+ onAnimationStart() {
473
+ this.$emit('animation-start');
474
+ },
475
+ onAnimationEnd() {
476
+ this.$emit('animation-end');
477
+ },
478
+ },
479
+ });
@@ -0,0 +1,6 @@
1
+ {
2
+ "component": true,
3
+ "usingComponents": {
4
+ "smart-picker": "../picker/index"
5
+ }
6
+ }
@@ -0,0 +1,22 @@
1
+ <smart-picker
2
+ class="smart-datetime-picker"
3
+ active-class="active-class"
4
+ toolbar-class="toolbar-class"
5
+ column-class="column-class"
6
+ hairline-class="smart-datetime-picker-hairline"
7
+ title="{{ title }}"
8
+ columns="{{ columns }}"
9
+ item-height="{{ itemHeight }}"
10
+ active-style="{{ activeStyle }}"
11
+ animation-time="{{ animationTime }}"
12
+ show-toolbar="{{ showToolbar }}"
13
+ visible-item-count="{{ visibleItemCount }}"
14
+ confirm-button-text="{{ confirmButtonText }}"
15
+ cancel-button-text="{{ cancelButtonText }}"
16
+ change-animation="{{ changeAnimation }}"
17
+ bind:change="onChange"
18
+ bind:confirm="onConfirm"
19
+ bind:cancel="onCancel"
20
+ bind:animation-start="onAnimationStart"
21
+ bind:animation-end="onAnimationEnd"
22
+ />
@@ -0,0 +1 @@
1
+ @import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-bottom-sheet-dragger-node-background:rgba(0,0,0,.3);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-bottom-sheet-dragger-node-background:hsla(0,0%,100%,.3);--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-manrope{font-family:Manrope,sans-serif}:host{width:100%}.smart-datetime-picker{--hairline-color:transparent}.smart-datetime-picker-hairline{border-image-slice:1;border-image-source:var(--hairline-border-image-color,var(--smart-ui-border-image,linear-gradient(to right,transparent,rgba(0,0,0,.3),transparent)));border-style:solid;border-width:.5px 0;position:absolute}
@@ -0,0 +1,29 @@
1
+ /// <reference types="miniprogram-api-typings" />
2
+ interface SmartComponentInstance {
3
+ parent: WechatMiniprogram.Component.TrivialInstance;
4
+ children: WechatMiniprogram.Component.TrivialInstance[];
5
+ index: number;
6
+ $emit: (name: string, detail?: unknown, options?: WechatMiniprogram.Component.TriggerEventOption) => void;
7
+ setView: (value: Record<string, any>, callback?: () => void) => void;
8
+ }
9
+ export type SmartComponentOptions<Data extends WechatMiniprogram.Component.DataOption, Props extends WechatMiniprogram.Component.PropertyOption, Methods extends WechatMiniprogram.Component.MethodOption> = {
10
+ data?: Data;
11
+ field?: boolean;
12
+ classes?: string[];
13
+ mixins?: string[];
14
+ props?: Props;
15
+ relation?: {
16
+ relations: Record<string, WechatMiniprogram.Component.RelationOption>;
17
+ mixin: string;
18
+ };
19
+ watch?: Record<string, (...args: any[]) => any>;
20
+ methods?: Methods;
21
+ beforeCreate?: () => void;
22
+ created?: () => void;
23
+ mounted?: () => void;
24
+ destroyed?: () => void;
25
+ } & ThisType<SmartComponentInstance & WechatMiniprogram.Component.Instance<Data & {
26
+ name: string;
27
+ value: any;
28
+ } & Record<string, any>, Props, Methods> & Record<string, any>>;
29
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,75 @@
1
+ /// <reference types="miniprogram-api-typings" />
2
+ /// <reference types="miniprogram-api-typings" />
3
+ export type Action = 'confirm' | 'cancel' | 'overlay';
4
+ type DialogContext = WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance;
5
+ type AnyObject = {};
6
+ interface DialogOptions {
7
+ lang?: string;
8
+ show?: boolean;
9
+ title?: string;
10
+ icon?: boolean | string;
11
+ iconColor?: string;
12
+ iconSize?: string;
13
+ nativeDisabled?: boolean;
14
+ width?: string | number | null;
15
+ zIndex?: number;
16
+ theme?: string;
17
+ context?: (() => DialogContext) | DialogContext;
18
+ message?: string;
19
+ overlay?: boolean;
20
+ selector?: string;
21
+ ariaLabel?: string;
22
+ customStyle?: string;
23
+ transition?: string;
24
+ autoClose?: boolean;
25
+ beforeClose?: null | ((action: Action, value?: string) => Promise<void | boolean> | void);
26
+ businessId?: number;
27
+ sessionFrom?: string;
28
+ overlayStyle?: string;
29
+ appParameter?: string;
30
+ messageAlign?: string;
31
+ sendMessageImg?: string;
32
+ showMessageCard?: boolean;
33
+ sendMessagePath?: string;
34
+ sendMessageTitle?: string;
35
+ confirmButtonText?: string;
36
+ cancelButtonText?: string;
37
+ showConfirmButton?: boolean;
38
+ showCancelButton?: boolean;
39
+ closeOnClickOverlay?: boolean;
40
+ confirmButtonOpenType?: string;
41
+ value?: null | string;
42
+ ignoreQueue?: boolean;
43
+ password?: boolean;
44
+ placeholder?: string;
45
+ maxlength?: number;
46
+ }
47
+ interface DialogInputOptions extends DialogOptions {
48
+ value: string;
49
+ type?: string;
50
+ password?: boolean;
51
+ placeholder?: string;
52
+ maxlength?: number;
53
+ emptyDisabled?: boolean;
54
+ }
55
+ export declare const contextRef: {
56
+ value: Record<string, DialogContext | null>;
57
+ };
58
+ declare const Dialog: {
59
+ (options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
60
+ alert(options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
61
+ confirm(options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
62
+ input: (options: DialogInputOptions) => Promise<WechatMiniprogram.Component.Instance<{
63
+ /**
64
+ * 输入框的当前值
65
+ */
66
+ inputValue: string;
67
+ }, AnyObject, AnyObject>>;
68
+ close(): void;
69
+ stopLoading(): void;
70
+ currentOptions: DialogOptions;
71
+ defaultOptions: DialogOptions;
72
+ setDefaultOptions(options: DialogOptions): void;
73
+ resetDefaultOptions(): void;
74
+ };
75
+ export default Dialog;