@varlet/ui 1.23.3-alpha.1 → 1.23.4-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (607) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/highlight/web-types.json +1 -1
  3. package/lib/action-sheet/ActionSheet.js +149 -0
  4. package/lib/action-sheet/ActionSheetSfc.css +0 -0
  5. package/lib/action-sheet/ActionSheetSfc.less +0 -0
  6. package/lib/action-sheet/actionSheet.css +1 -0
  7. package/lib/action-sheet/actionSheet.less +68 -0
  8. package/lib/action-sheet/index.js +79 -0
  9. package/lib/action-sheet/props.js +37 -0
  10. package/lib/action-sheet/style/index.js +6 -0
  11. package/lib/action-sheet/style/less.js +6 -0
  12. package/lib/app-bar/AppBar.js +66 -0
  13. package/lib/app-bar/AppBarSfc.css +0 -0
  14. package/lib/app-bar/AppBarSfc.less +0 -0
  15. package/lib/app-bar/appBar.css +1 -0
  16. package/lib/app-bar/appBar.less +56 -0
  17. package/lib/app-bar/index.js +17 -0
  18. package/lib/app-bar/props.js +32 -0
  19. package/lib/app-bar/style/index.js +4 -0
  20. package/lib/app-bar/style/less.js +4 -0
  21. package/lib/back-top/BackTop.js +96 -0
  22. package/lib/back-top/BackTopSfc.css +0 -0
  23. package/lib/back-top/BackTopSfc.less +0 -0
  24. package/lib/back-top/backTop.css +1 -0
  25. package/lib/back-top/backTop.less +27 -0
  26. package/lib/back-top/index.js +17 -0
  27. package/lib/back-top/props.js +21 -0
  28. package/lib/back-top/style/index.js +5 -0
  29. package/lib/back-top/style/less.js +5 -0
  30. package/lib/badge/Badge.js +107 -0
  31. package/lib/badge/BadgeSfc.css +0 -0
  32. package/lib/badge/BadgeSfc.less +0 -0
  33. package/lib/badge/badge.css +1 -0
  34. package/lib/badge/badge.less +119 -0
  35. package/lib/badge/index.js +17 -0
  36. package/lib/badge/props.js +55 -0
  37. package/lib/badge/style/index.js +4 -0
  38. package/lib/badge/style/less.js +4 -0
  39. package/lib/button/Button.js +102 -0
  40. package/lib/button/ButtonSfc.css +0 -0
  41. package/lib/button/ButtonSfc.less +0 -0
  42. package/lib/button/button.css +1 -0
  43. package/lib/button/button.less +183 -0
  44. package/lib/button/index.js +17 -0
  45. package/lib/button/props.js +76 -0
  46. package/lib/button/style/index.js +6 -0
  47. package/lib/button/style/less.js +6 -0
  48. package/lib/card/Card.js +83 -0
  49. package/lib/card/CardSfc.css +0 -0
  50. package/lib/card/CardSfc.less +0 -0
  51. package/lib/card/card.css +1 -0
  52. package/lib/card/card.less +84 -0
  53. package/lib/card/index.js +17 -0
  54. package/lib/card/props.js +45 -0
  55. package/lib/card/style/index.js +5 -0
  56. package/lib/card/style/less.js +5 -0
  57. package/lib/cell/Cell.js +68 -0
  58. package/lib/cell/CellSfc.css +0 -0
  59. package/lib/cell/CellSfc.less +0 -0
  60. package/lib/cell/cell.css +1 -0
  61. package/lib/cell/cell.less +74 -0
  62. package/lib/cell/index.js +17 -0
  63. package/lib/cell/props.js +32 -0
  64. package/lib/cell/style/index.js +4 -0
  65. package/lib/cell/style/less.js +4 -0
  66. package/lib/checkbox/Checkbox.js +232 -0
  67. package/lib/checkbox/CheckboxSfc.css +0 -0
  68. package/lib/checkbox/CheckboxSfc.less +0 -0
  69. package/lib/checkbox/checkbox.css +1 -0
  70. package/lib/checkbox/checkbox.less +78 -0
  71. package/lib/checkbox/index.js +17 -0
  72. package/lib/checkbox/props.js +56 -0
  73. package/lib/checkbox/provide.js +23 -0
  74. package/lib/checkbox/style/index.js +5 -0
  75. package/lib/checkbox/style/less.js +5 -0
  76. package/lib/checkbox-group/CheckboxGroup.js +181 -0
  77. package/lib/checkbox-group/CheckboxGroupSfc.css +0 -0
  78. package/lib/checkbox-group/CheckboxGroupSfc.less +0 -0
  79. package/lib/checkbox-group/checkboxGroup.css +1 -0
  80. package/lib/checkbox-group/checkboxGroup.less +12 -0
  81. package/lib/checkbox-group/index.js +17 -0
  82. package/lib/checkbox-group/props.js +38 -0
  83. package/lib/checkbox-group/provide.js +27 -0
  84. package/lib/checkbox-group/style/index.js +4 -0
  85. package/lib/checkbox-group/style/less.js +4 -0
  86. package/lib/chip/Chip.js +95 -0
  87. package/lib/chip/ChipSfc.css +0 -0
  88. package/lib/chip/ChipSfc.less +0 -0
  89. package/lib/chip/chip.css +1 -0
  90. package/lib/chip/chip.less +182 -0
  91. package/lib/chip/index.js +17 -0
  92. package/lib/chip/props.js +56 -0
  93. package/lib/chip/style/index.js +4 -0
  94. package/lib/chip/style/less.js +4 -0
  95. package/lib/col/Col.js +68 -0
  96. package/lib/col/ColSfc.css +0 -0
  97. package/lib/col/ColSfc.less +0 -0
  98. package/lib/col/col.css +1 -0
  99. package/lib/col/col.less +17 -0
  100. package/lib/col/index.js +17 -0
  101. package/lib/col/props.js +18 -0
  102. package/lib/col/provide.js +28 -0
  103. package/lib/col/style/index.js +3 -0
  104. package/lib/col/style/less.js +3 -0
  105. package/lib/collapse/Collapse.js +126 -0
  106. package/lib/collapse/CollapseSfc.css +1 -0
  107. package/lib/collapse/CollapseSfc.less +1 -0
  108. package/lib/collapse/index.js +17 -0
  109. package/lib/collapse/props.js +24 -0
  110. package/lib/collapse/provide.js +27 -0
  111. package/lib/collapse/style/index.js +3 -0
  112. package/lib/collapse/style/less.js +3 -0
  113. package/lib/collapse-item/CollapseItem.js +155 -0
  114. package/lib/collapse-item/CollapseItemSfc.css +0 -0
  115. package/lib/collapse-item/CollapseItemSfc.less +0 -0
  116. package/lib/collapse-item/collapseItem.css +1 -0
  117. package/lib/collapse-item/collapseItem.less +105 -0
  118. package/lib/collapse-item/index.js +17 -0
  119. package/lib/collapse-item/props.js +21 -0
  120. package/lib/collapse-item/provide.js +28 -0
  121. package/lib/collapse-item/style/index.js +4 -0
  122. package/lib/collapse-item/style/less.js +4 -0
  123. package/lib/context/index.js +20 -0
  124. package/lib/context/lock.js +107 -0
  125. package/lib/context/style/index.js +0 -0
  126. package/lib/context/style/less.js +0 -0
  127. package/lib/context/zIndex.js +25 -0
  128. package/lib/countdown/Countdown.js +119 -0
  129. package/lib/countdown/CountdownSfc.css +0 -0
  130. package/lib/countdown/CountdownSfc.less +0 -0
  131. package/lib/countdown/index.js +17 -0
  132. package/lib/countdown/props.js +25 -0
  133. package/lib/countdown/style/index.js +2 -0
  134. package/lib/countdown/style/less.js +2 -0
  135. package/lib/counter/Counter.js +387 -0
  136. package/lib/counter/CounterSfc.css +0 -0
  137. package/lib/counter/CounterSfc.less +0 -0
  138. package/lib/counter/counter.css +1 -0
  139. package/lib/counter/counter.less +85 -0
  140. package/lib/counter/index.js +17 -0
  141. package/lib/counter/props.js +98 -0
  142. package/lib/counter/provide.js +3 -0
  143. package/lib/counter/style/index.js +7 -0
  144. package/lib/counter/style/less.js +7 -0
  145. package/lib/date-picker/DatePicker.js +465 -0
  146. package/lib/date-picker/DatePickerSfc.css +0 -0
  147. package/lib/date-picker/DatePickerSfc.less +0 -0
  148. package/lib/date-picker/date-picker.css +1 -0
  149. package/lib/date-picker/date-picker.less +330 -0
  150. package/lib/date-picker/index.js +17 -0
  151. package/lib/date-picker/props.js +107 -0
  152. package/lib/date-picker/src/day-picker-panel.js +352 -0
  153. package/lib/date-picker/src/month-picker-panel.js +286 -0
  154. package/lib/date-picker/src/panel-header.js +152 -0
  155. package/lib/date-picker/src/year-picker-panel.js +110 -0
  156. package/lib/date-picker/style/index.js +5 -0
  157. package/lib/date-picker/style/less.js +5 -0
  158. package/lib/dialog/Dialog.js +214 -0
  159. package/lib/dialog/DialogSfc.css +0 -0
  160. package/lib/dialog/DialogSfc.less +0 -0
  161. package/lib/dialog/dialog.css +1 -0
  162. package/lib/dialog/dialog.less +77 -0
  163. package/lib/dialog/index.js +85 -0
  164. package/lib/dialog/props.js +73 -0
  165. package/lib/dialog/style/index.js +5 -0
  166. package/lib/dialog/style/less.js +5 -0
  167. package/lib/divider/Divider.js +88 -0
  168. package/lib/divider/DividerSfc.css +0 -0
  169. package/lib/divider/DividerSfc.less +0 -0
  170. package/lib/divider/divider.css +1 -0
  171. package/lib/divider/divider.less +79 -0
  172. package/lib/divider/index.js +17 -0
  173. package/lib/divider/props.js +25 -0
  174. package/lib/divider/style/index.js +3 -0
  175. package/lib/divider/style/less.js +3 -0
  176. package/lib/form/Form.js +77 -0
  177. package/lib/form/FormSfc.css +0 -0
  178. package/lib/form/FormSfc.less +0 -0
  179. package/lib/form/index.js +17 -0
  180. package/lib/form/props.js +15 -0
  181. package/lib/form/provide.js +33 -0
  182. package/lib/form/style/index.js +2 -0
  183. package/lib/form/style/less.js +2 -0
  184. package/lib/form-details/FormDetails.js +45 -0
  185. package/lib/form-details/FormDetailsSfc.css +0 -0
  186. package/lib/form-details/FormDetailsSfc.less +0 -0
  187. package/lib/form-details/formDetails.css +1 -0
  188. package/lib/form-details/formDetails.less +48 -0
  189. package/lib/form-details/index.js +17 -0
  190. package/lib/form-details/props.js +15 -0
  191. package/lib/form-details/style/index.js +3 -0
  192. package/lib/form-details/style/less.js +3 -0
  193. package/lib/icon/Icon.js +83 -0
  194. package/lib/icon/IconSfc.css +0 -0
  195. package/lib/icon/IconSfc.less +0 -0
  196. package/lib/icon/icon.css +1 -0
  197. package/lib/icon/icon.less +25 -0
  198. package/lib/icon/index.js +17 -0
  199. package/lib/icon/props.js +27 -0
  200. package/lib/icon/style/index.js +3 -0
  201. package/lib/icon/style/less.js +3 -0
  202. package/lib/image/Image.js +113 -0
  203. package/lib/image/ImageSfc.css +0 -0
  204. package/lib/image/ImageSfc.less +0 -0
  205. package/lib/image/image.css +1 -0
  206. package/lib/image/image.less +9 -0
  207. package/lib/image/index.js +17 -0
  208. package/lib/image/props.js +60 -0
  209. package/lib/image/style/index.js +4 -0
  210. package/lib/image/style/less.js +4 -0
  211. package/lib/image-preview/ImagePreview.js +369 -0
  212. package/lib/image-preview/ImagePreviewSfc.css +0 -0
  213. package/lib/image-preview/ImagePreviewSfc.less +0 -0
  214. package/lib/image-preview/imagePreview.css +1 -0
  215. package/lib/image-preview/imagePreview.less +66 -0
  216. package/lib/image-preview/index.js +74 -0
  217. package/lib/image-preview/props.js +40 -0
  218. package/lib/image-preview/style/index.js +7 -0
  219. package/lib/image-preview/style/less.js +7 -0
  220. package/lib/index-anchor/IndexAnchor.js +99 -0
  221. package/lib/index-anchor/IndexAnchorSfc.css +1 -0
  222. package/lib/index-anchor/IndexAnchorSfc.less +1 -0
  223. package/lib/index-anchor/index.js +17 -0
  224. package/lib/index-anchor/props.js +10 -0
  225. package/lib/index-anchor/provide.js +28 -0
  226. package/lib/index-anchor/style/index.js +3 -0
  227. package/lib/index-anchor/style/less.js +3 -0
  228. package/lib/index-bar/IndexBar.js +186 -0
  229. package/lib/index-bar/IndexBarSfc.css +0 -0
  230. package/lib/index-bar/IndexBarSfc.less +0 -0
  231. package/lib/index-bar/index.js +17 -0
  232. package/lib/index-bar/indexBar.css +1 -0
  233. package/lib/index-bar/indexBar.less +43 -0
  234. package/lib/index-bar/props.js +40 -0
  235. package/lib/index-bar/provide.js +27 -0
  236. package/lib/index-bar/style/index.js +3 -0
  237. package/lib/index-bar/style/less.js +3 -0
  238. package/lib/index.js +195 -0
  239. package/lib/input/Input.js +304 -0
  240. package/lib/input/InputSfc.css +0 -0
  241. package/lib/input/InputSfc.less +0 -0
  242. package/lib/input/index.js +17 -0
  243. package/lib/input/input.css +1 -0
  244. package/lib/input/input.less +183 -0
  245. package/lib/input/props.js +96 -0
  246. package/lib/input/provide.js +3 -0
  247. package/lib/input/style/index.js +5 -0
  248. package/lib/input/style/less.js +5 -0
  249. package/lib/lazy/index.js +247 -0
  250. package/lib/lazy/style/index.js +0 -0
  251. package/lib/lazy/style/less.js +0 -0
  252. package/lib/less.js +62 -0
  253. package/lib/list/List.js +157 -0
  254. package/lib/list/ListSfc.css +0 -0
  255. package/lib/list/ListSfc.less +0 -0
  256. package/lib/list/index.js +17 -0
  257. package/lib/list/list.css +1 -0
  258. package/lib/list/list.less +63 -0
  259. package/lib/list/props.js +45 -0
  260. package/lib/list/style/index.js +5 -0
  261. package/lib/list/style/less.js +5 -0
  262. package/lib/loading/Loading.js +93 -0
  263. package/lib/loading/LoadingSfc.css +0 -0
  264. package/lib/loading/LoadingSfc.less +0 -0
  265. package/lib/loading/index.js +17 -0
  266. package/lib/loading/loading.css +1 -0
  267. package/lib/loading/loading.less +420 -0
  268. package/lib/loading/props.js +39 -0
  269. package/lib/loading/style/index.js +3 -0
  270. package/lib/loading/style/less.js +3 -0
  271. package/lib/locale/en-US.js +107 -0
  272. package/lib/locale/index.js +83 -0
  273. package/lib/locale/style/index.js +0 -0
  274. package/lib/locale/style/less.js +0 -0
  275. package/lib/locale/zh-CN.js +107 -0
  276. package/lib/menu/Menu.js +144 -0
  277. package/lib/menu/MenuSfc.css +0 -0
  278. package/lib/menu/MenuSfc.less +0 -0
  279. package/lib/menu/index.js +17 -0
  280. package/lib/menu/menu.css +1 -0
  281. package/lib/menu/menu.less +21 -0
  282. package/lib/menu/props.js +48 -0
  283. package/lib/menu/style/index.js +4 -0
  284. package/lib/menu/style/less.js +4 -0
  285. package/lib/option/Option.js +125 -0
  286. package/lib/option/OptionSfc.css +0 -0
  287. package/lib/option/OptionSfc.less +0 -0
  288. package/lib/option/index.js +17 -0
  289. package/lib/option/option.css +1 -0
  290. package/lib/option/option.less +37 -0
  291. package/lib/option/props.js +9 -0
  292. package/lib/option/provide.js +28 -0
  293. package/lib/option/style/index.js +6 -0
  294. package/lib/option/style/less.js +6 -0
  295. package/lib/pagination/Pagination.js +373 -0
  296. package/lib/pagination/PaginationSfc.css +0 -0
  297. package/lib/pagination/PaginationSfc.less +0 -0
  298. package/lib/pagination/index.js +17 -0
  299. package/lib/pagination/pagination.css +1 -0
  300. package/lib/pagination/pagination.less +178 -0
  301. package/lib/pagination/porps.js +48 -0
  302. package/lib/pagination/style/index.js +8 -0
  303. package/lib/pagination/style/less.js +8 -0
  304. package/lib/picker/Picker.js +446 -0
  305. package/lib/picker/PickerSfc.css +0 -0
  306. package/lib/picker/PickerSfc.less +0 -0
  307. package/lib/picker/index.js +98 -0
  308. package/lib/picker/picker.css +1 -0
  309. package/lib/picker/picker.less +103 -0
  310. package/lib/picker/props.js +68 -0
  311. package/lib/picker/style/index.js +5 -0
  312. package/lib/picker/style/less.js +5 -0
  313. package/lib/popup/Popup.js +121 -0
  314. package/lib/popup/PopupSfc.css +0 -0
  315. package/lib/popup/PopupSfc.less +0 -0
  316. package/lib/popup/index.js +17 -0
  317. package/lib/popup/popup.css +1 -0
  318. package/lib/popup/popup.less +125 -0
  319. package/lib/popup/props.js +67 -0
  320. package/lib/popup/style/index.js +3 -0
  321. package/lib/popup/style/less.js +3 -0
  322. package/lib/progress/Progress.js +154 -0
  323. package/lib/progress/ProgressSfc.css +0 -0
  324. package/lib/progress/ProgressSfc.less +0 -0
  325. package/lib/progress/index.js +17 -0
  326. package/lib/progress/progress.css +1 -0
  327. package/lib/progress/progress.less +98 -0
  328. package/lib/progress/props.js +61 -0
  329. package/lib/progress/style/index.js +3 -0
  330. package/lib/progress/style/less.js +3 -0
  331. package/lib/pull-refresh/PullRefresh.js +150 -0
  332. package/lib/pull-refresh/PullRefreshSfc.css +0 -0
  333. package/lib/pull-refresh/PullRefreshSfc.less +0 -0
  334. package/lib/pull-refresh/index.js +17 -0
  335. package/lib/pull-refresh/props.js +47 -0
  336. package/lib/pull-refresh/pullRefresh.css +1 -0
  337. package/lib/pull-refresh/pullRefresh.less +55 -0
  338. package/lib/pull-refresh/style/index.js +5 -0
  339. package/lib/pull-refresh/style/less.js +5 -0
  340. package/lib/radio/Radio.js +231 -0
  341. package/lib/radio/RadioSfc.css +0 -0
  342. package/lib/radio/RadioSfc.less +0 -0
  343. package/lib/radio/index.js +17 -0
  344. package/lib/radio/props.js +56 -0
  345. package/lib/radio/provide.js +23 -0
  346. package/lib/radio/radio.css +1 -0
  347. package/lib/radio/radio.less +78 -0
  348. package/lib/radio/style/index.js +6 -0
  349. package/lib/radio/style/less.js +6 -0
  350. package/lib/radio-group/RadioGroup.js +122 -0
  351. package/lib/radio-group/RadioGroupSfc.css +0 -0
  352. package/lib/radio-group/RadioGroupSfc.less +0 -0
  353. package/lib/radio-group/index.js +17 -0
  354. package/lib/radio-group/props.js +35 -0
  355. package/lib/radio-group/provide.js +27 -0
  356. package/lib/radio-group/radioGroup.css +1 -0
  357. package/lib/radio-group/radioGroup.less +12 -0
  358. package/lib/radio-group/style/index.js +4 -0
  359. package/lib/radio-group/style/less.js +4 -0
  360. package/lib/rate/Rate.js +235 -0
  361. package/lib/rate/RateSfc.css +0 -0
  362. package/lib/rate/RateSfc.less +0 -0
  363. package/lib/rate/index.js +17 -0
  364. package/lib/rate/props.js +69 -0
  365. package/lib/rate/provide.js +3 -0
  366. package/lib/rate/rate.css +1 -0
  367. package/lib/rate/rate.less +35 -0
  368. package/lib/rate/style/index.js +6 -0
  369. package/lib/rate/style/less.js +6 -0
  370. package/lib/ripple/index.js +187 -0
  371. package/lib/ripple/ripple.css +1 -0
  372. package/lib/ripple/ripple.less +17 -0
  373. package/lib/ripple/style/index.js +2 -0
  374. package/lib/ripple/style/less.js +2 -0
  375. package/lib/row/Row.js +102 -0
  376. package/lib/row/RowSfc.css +0 -0
  377. package/lib/row/RowSfc.less +0 -0
  378. package/lib/row/index.js +17 -0
  379. package/lib/row/props.js +33 -0
  380. package/lib/row/provide.js +27 -0
  381. package/lib/row/row.css +1 -0
  382. package/lib/row/row.less +4 -0
  383. package/lib/row/style/index.js +3 -0
  384. package/lib/row/style/less.js +3 -0
  385. package/lib/select/Select.js +492 -0
  386. package/lib/select/SelectSfc.css +0 -0
  387. package/lib/select/SelectSfc.less +0 -0
  388. package/lib/select/index.js +17 -0
  389. package/lib/select/props.js +93 -0
  390. package/lib/select/provide.js +27 -0
  391. package/lib/select/select.css +1 -0
  392. package/lib/select/select.less +181 -0
  393. package/lib/select/style/index.js +7 -0
  394. package/lib/select/style/less.js +7 -0
  395. package/lib/skeleton/Skeleton.js +134 -0
  396. package/lib/skeleton/SkeletonSfc.css +0 -0
  397. package/lib/skeleton/SkeletonSfc.less +0 -0
  398. package/lib/skeleton/index.js +17 -0
  399. package/lib/skeleton/props.js +44 -0
  400. package/lib/skeleton/skeleton.css +1 -0
  401. package/lib/skeleton/skeleton.less +138 -0
  402. package/lib/skeleton/style/index.js +3 -0
  403. package/lib/skeleton/style/less.js +3 -0
  404. package/lib/slider/Slider.js +386 -0
  405. package/lib/slider/SliderSfc.css +0 -0
  406. package/lib/slider/SliderSfc.less +0 -0
  407. package/lib/slider/index.js +17 -0
  408. package/lib/slider/props.js +77 -0
  409. package/lib/slider/provide.js +3 -0
  410. package/lib/slider/slider.css +1 -0
  411. package/lib/slider/slider.less +146 -0
  412. package/lib/slider/style/index.js +4 -0
  413. package/lib/slider/style/less.js +4 -0
  414. package/lib/snackbar/Snackbar.js +70 -0
  415. package/lib/snackbar/SnackbarSfc.css +0 -0
  416. package/lib/snackbar/SnackbarSfc.less +0 -0
  417. package/lib/snackbar/core.js +146 -0
  418. package/lib/snackbar/coreSfc.css +0 -0
  419. package/lib/snackbar/coreSfc.less +0 -0
  420. package/lib/snackbar/index.js +232 -0
  421. package/lib/snackbar/props.js +103 -0
  422. package/lib/snackbar/snackbar.css +1 -0
  423. package/lib/snackbar/snackbar.less +135 -0
  424. package/lib/snackbar/style/index.js +8 -0
  425. package/lib/snackbar/style/less.js +8 -0
  426. package/lib/space/Space.js +99 -0
  427. package/lib/space/index.js +17 -0
  428. package/lib/space/props.js +49 -0
  429. package/lib/space/space.css +1 -0
  430. package/lib/space/space.less +6 -0
  431. package/lib/space/style/index.js +2 -0
  432. package/lib/space/style/less.js +2 -0
  433. package/lib/step/Step.js +156 -0
  434. package/lib/step/StepSfc.css +0 -0
  435. package/lib/step/StepSfc.less +0 -0
  436. package/lib/step/index.js +17 -0
  437. package/lib/step/props.js +17 -0
  438. package/lib/step/provide.js +28 -0
  439. package/lib/step/step.css +1 -0
  440. package/lib/step/step.less +145 -0
  441. package/lib/step/style/index.js +4 -0
  442. package/lib/step/style/less.js +4 -0
  443. package/lib/steps/Steps.js +56 -0
  444. package/lib/steps/StepsSfc.css +1 -0
  445. package/lib/steps/StepsSfc.less +1 -0
  446. package/lib/steps/index.js +17 -0
  447. package/lib/steps/props.js +30 -0
  448. package/lib/steps/provide.js +27 -0
  449. package/lib/steps/style/index.js +2 -0
  450. package/lib/steps/style/less.js +2 -0
  451. package/lib/sticky/Sticky.js +145 -0
  452. package/lib/sticky/StickySfc.css +0 -0
  453. package/lib/sticky/StickySfc.less +0 -0
  454. package/lib/sticky/index.js +17 -0
  455. package/lib/sticky/props.js +26 -0
  456. package/lib/sticky/sticky.css +1 -0
  457. package/lib/sticky/sticky.less +8 -0
  458. package/lib/sticky/style/index.js +3 -0
  459. package/lib/sticky/style/less.js +3 -0
  460. package/lib/style-provider/StyleProvider.js +30 -0
  461. package/lib/style-provider/StyleProviderSfc.css +0 -0
  462. package/lib/style-provider/StyleProviderSfc.less +0 -0
  463. package/lib/style-provider/index.js +37 -0
  464. package/lib/style-provider/style/index.js +2 -0
  465. package/lib/style-provider/style/less.js +2 -0
  466. package/lib/style.js +62 -0
  467. package/lib/styles/common.css +1 -0
  468. package/lib/styles/common.less +67 -0
  469. package/lib/styles/elevation.css +1 -0
  470. package/lib/styles/elevation.less +126 -0
  471. package/lib/styles/style/index.js +0 -0
  472. package/lib/styles/style/less.js +0 -0
  473. package/lib/styles/var.css +0 -0
  474. package/lib/styles/var.less +30 -0
  475. package/lib/swipe/Swipe.js +408 -0
  476. package/lib/swipe/SwipeSfc.css +0 -0
  477. package/lib/swipe/SwipeSfc.less +0 -0
  478. package/lib/swipe/index.js +17 -0
  479. package/lib/swipe/props.js +40 -0
  480. package/lib/swipe/provide.js +27 -0
  481. package/lib/swipe/style/index.js +3 -0
  482. package/lib/swipe/style/less.js +3 -0
  483. package/lib/swipe/swipe.css +1 -0
  484. package/lib/swipe/swipe.less +59 -0
  485. package/lib/swipe-item/SwipeItem.js +58 -0
  486. package/lib/swipe-item/SwipeItemSfc.css +0 -0
  487. package/lib/swipe-item/SwipeItemSfc.less +0 -0
  488. package/lib/swipe-item/index.js +17 -0
  489. package/lib/swipe-item/provide.js +28 -0
  490. package/lib/swipe-item/style/index.js +3 -0
  491. package/lib/swipe-item/style/less.js +3 -0
  492. package/lib/swipe-item/swipeItem.css +1 -0
  493. package/lib/swipe-item/swipeItem.less +5 -0
  494. package/lib/switch/Switch.js +185 -0
  495. package/lib/switch/SwitchSfc.css +0 -0
  496. package/lib/switch/SwitchSfc.less +0 -0
  497. package/lib/switch/index.js +17 -0
  498. package/lib/switch/props.js +57 -0
  499. package/lib/switch/provide.js +3 -0
  500. package/lib/switch/style/index.js +7 -0
  501. package/lib/switch/style/less.js +7 -0
  502. package/lib/switch/switch.css +1 -0
  503. package/lib/switch/switch.less +80 -0
  504. package/lib/tab/Tab.js +116 -0
  505. package/lib/tab/TabSfc.css +0 -0
  506. package/lib/tab/TabSfc.less +0 -0
  507. package/lib/tab/index.js +17 -0
  508. package/lib/tab/props.js +17 -0
  509. package/lib/tab/provide.js +28 -0
  510. package/lib/tab/style/index.js +4 -0
  511. package/lib/tab/style/less.js +4 -0
  512. package/lib/tab/tab.css +1 -0
  513. package/lib/tab/tab.less +46 -0
  514. package/lib/tab-item/TabItem.js +74 -0
  515. package/lib/tab-item/TabItemSfc.css +0 -0
  516. package/lib/tab-item/TabItemSfc.less +0 -0
  517. package/lib/tab-item/index.js +17 -0
  518. package/lib/tab-item/props.js +10 -0
  519. package/lib/tab-item/provide.js +28 -0
  520. package/lib/tab-item/style/index.js +4 -0
  521. package/lib/tab-item/style/less.js +4 -0
  522. package/lib/tab-item/tabItem.css +1 -0
  523. package/lib/tab-item/tabItem.less +6 -0
  524. package/lib/table/Table.js +53 -0
  525. package/lib/table/TableSfc.css +0 -0
  526. package/lib/table/TableSfc.less +0 -0
  527. package/lib/table/index.js +17 -0
  528. package/lib/table/style/index.js +4 -0
  529. package/lib/table/style/less.js +4 -0
  530. package/lib/table/table.css +1 -0
  531. package/lib/table/table.less +110 -0
  532. package/lib/tabs/Tabs.js +208 -0
  533. package/lib/tabs/TabsSfc.css +0 -0
  534. package/lib/tabs/TabsSfc.less +0 -0
  535. package/lib/tabs/index.js +17 -0
  536. package/lib/tabs/props.js +70 -0
  537. package/lib/tabs/provide.js +27 -0
  538. package/lib/tabs/style/index.js +5 -0
  539. package/lib/tabs/style/less.js +5 -0
  540. package/lib/tabs/tabs.css +1 -0
  541. package/lib/tabs/tabs.less +93 -0
  542. package/lib/tabs-items/TabsItems.js +107 -0
  543. package/lib/tabs-items/TabsItemsSfc.css +0 -0
  544. package/lib/tabs-items/TabsItemsSfc.less +0 -0
  545. package/lib/tabs-items/index.js +17 -0
  546. package/lib/tabs-items/props.js +22 -0
  547. package/lib/tabs-items/provide.js +27 -0
  548. package/lib/tabs-items/style/index.js +3 -0
  549. package/lib/tabs-items/style/less.js +3 -0
  550. package/lib/themes/dark/actionSheet.js +10 -0
  551. package/lib/themes/dark/badge.js +8 -0
  552. package/lib/themes/dark/button.js +8 -0
  553. package/lib/themes/dark/card.js +11 -0
  554. package/lib/themes/dark/cell.js +9 -0
  555. package/lib/themes/dark/checkbox.js +8 -0
  556. package/lib/themes/dark/chip.js +8 -0
  557. package/lib/themes/dark/collapse.js +10 -0
  558. package/lib/themes/dark/datePicker.js +10 -0
  559. package/lib/themes/dark/dialog.js +9 -0
  560. package/lib/themes/dark/divider.js +9 -0
  561. package/lib/themes/dark/index.js +75 -0
  562. package/lib/themes/dark/input.js +9 -0
  563. package/lib/themes/dark/pagination.js +12 -0
  564. package/lib/themes/dark/picker.js +10 -0
  565. package/lib/themes/dark/popup.js +8 -0
  566. package/lib/themes/dark/pullRefresh.js +8 -0
  567. package/lib/themes/dark/radio.js +8 -0
  568. package/lib/themes/dark/select.js +10 -0
  569. package/lib/themes/dark/skeleton.js +11 -0
  570. package/lib/themes/dark/steps.js +10 -0
  571. package/lib/themes/dark/switch.js +9 -0
  572. package/lib/themes/dark/tab-item.js +8 -0
  573. package/lib/themes/dark/tab.js +8 -0
  574. package/lib/themes/dark/table.js +12 -0
  575. package/lib/themes/dark/tabs.js +8 -0
  576. package/lib/themes/dark/timePicker.js +10 -0
  577. package/lib/themes/dark/uploader.js +12 -0
  578. package/lib/themes/style/index.js +0 -0
  579. package/lib/themes/style/less.js +0 -0
  580. package/lib/time-picker/TimePicker.js +409 -0
  581. package/lib/time-picker/TimePickerSfc.css +0 -0
  582. package/lib/time-picker/TimePickerSfc.less +0 -0
  583. package/lib/time-picker/clock.js +345 -0
  584. package/lib/time-picker/index.js +17 -0
  585. package/lib/time-picker/props.js +59 -0
  586. package/lib/time-picker/style/index.js +4 -0
  587. package/lib/time-picker/style/less.js +4 -0
  588. package/lib/time-picker/timePicker.css +1 -0
  589. package/lib/time-picker/timePicker.less +236 -0
  590. package/lib/time-picker/utils.js +148 -0
  591. package/lib/uploader/Uploader.js +433 -0
  592. package/lib/uploader/UploaderSfc.css +0 -0
  593. package/lib/uploader/UploaderSfc.less +0 -0
  594. package/lib/uploader/index.js +17 -0
  595. package/lib/uploader/props.js +74 -0
  596. package/lib/uploader/provide.js +3 -0
  597. package/lib/uploader/style/index.js +8 -0
  598. package/lib/uploader/style/less.js +8 -0
  599. package/lib/uploader/uploader.css +1 -0
  600. package/lib/uploader/uploader.less +219 -0
  601. package/lib/utils/components.js +276 -0
  602. package/lib/utils/elements.js +261 -0
  603. package/lib/utils/jest.js +252 -0
  604. package/lib/utils/shared.js +212 -0
  605. package/lib/utils/style/index.js +0 -0
  606. package/lib/utils/style/less.js +0 -0
  607. package/package.json +5 -3
@@ -0,0 +1,8 @@
1
+ require('../../styles/common.css')
2
+ require('../../styles/elevation.css')
3
+ require('../../loading/loading.css')
4
+ require('../../button/button.css')
5
+ require('../../icon/icon.css')
6
+ require('../snackbar.css')
7
+ require('../coreSfc.css')
8
+ require('../SnackbarSfc.css')
@@ -0,0 +1,8 @@
1
+ require('../../styles/common.less')
2
+ require('../../styles/elevation.less')
3
+ require('../../loading/loading.less')
4
+ require('../../button/button.less')
5
+ require('../../icon/icon.less')
6
+ require('../snackbar.less')
7
+ require('../coreSfc.less')
8
+ require('../SnackbarSfc.less')
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _vue = require("vue");
7
+
8
+ var _props = require("./props");
9
+
10
+ var _elements = require("../utils/elements");
11
+
12
+ var _shared = require("../utils/shared");
13
+
14
+
15
+
16
+
17
+
18
+ var internalSizes = {
19
+ mini: [4, 4],
20
+ small: [6, 6],
21
+ normal: [8, 12],
22
+ large: [12, 20]
23
+ };
24
+
25
+ var _default = (0, _vue.defineComponent)({
26
+ name: 'VarSpace',
27
+ props: _props.props,
28
+
29
+ setup(props, {
30
+ slots
31
+ }) {
32
+ var getSize = (size, isInternalSize) => {
33
+ return isInternalSize ? internalSizes[size] : (0, _shared.isArray)(size) ? size.map(_elements.toPxNum) : [(0, _elements.toPxNum)(size), (0, _elements.toPxNum)(size)];
34
+ };
35
+
36
+ return () => {
37
+ var _slots$default;
38
+
39
+ var {
40
+ inline,
41
+ justify,
42
+ align,
43
+ wrap,
44
+ direction,
45
+ size
46
+ } = props;
47
+ var children = (_slots$default = slots.default == null ? void 0 : slots.default()) != null ? _slots$default : [];
48
+ var lastIndex = children.length - 1;
49
+ var isInternalSize = (0, _props.internalSizeValidator)(size);
50
+ var [y, x] = getSize(size, isInternalSize);
51
+ var spacers = children.map((child, index) => {
52
+ var margin = '0';
53
+
54
+ if (direction === 'row') {
55
+ if (justify === 'start' || justify === 'center' || justify === 'end') {
56
+ if (index !== lastIndex) {
57
+ margin = y / 2 + "px " + x + "px " + y / 2 + "px 0";
58
+ } else {
59
+ margin = y / 2 + "px 0";
60
+ }
61
+ } else if (justify === 'space-around') {
62
+ margin = y / 2 + "px " + x / 2 + "px";
63
+ } else if (justify === 'space-between') {
64
+ if (index === 0) {
65
+ margin = y / 2 + "px " + x / 2 + "px " + y / 2 + "px 0";
66
+ } else if (index === lastIndex) {
67
+ margin = y / 2 + "px 0 " + y / 2 + "px " + x / 2 + "px";
68
+ } else {
69
+ margin = y / 2 + "px " + x / 2 + "px";
70
+ }
71
+ }
72
+ }
73
+
74
+ if (direction === 'column' && index !== lastIndex) {
75
+ margin = "0 0 " + y + "px 0";
76
+ }
77
+
78
+ return (0, _vue.createVNode)("div", {
79
+ "style": {
80
+ margin
81
+ }
82
+ }, [child]);
83
+ });
84
+ return (0, _vue.createVNode)("div", {
85
+ "class": ['var-space', 'var--box', inline ? 'var-space--inline' : null],
86
+ "style": {
87
+ flexDirection: direction,
88
+ justifyContent: justify,
89
+ alignItems: align,
90
+ flexWrap: wrap ? 'wrap' : 'nowrap',
91
+ margin: direction === 'row' ? "-" + y / 2 + "px 0" : undefined
92
+ }
93
+ }, [spacers]);
94
+ };
95
+ }
96
+
97
+ });
98
+
99
+ exports.default = _default;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = exports._SpaceComponent = void 0;
5
+
6
+ var _Space = _interopRequireDefault(require("./Space"));
7
+
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+
10
+ _Space.default.install = function (app) {
11
+ app.component(_Space.default.name, _Space.default);
12
+ };
13
+
14
+ var _SpaceComponent = _Space.default;
15
+ exports._SpaceComponent = _SpaceComponent;
16
+ var _default = _Space.default;
17
+ exports.default = _default;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.props = exports.sizeValidator = exports.internalSizeValidator = void 0;
5
+
6
+ var _shared = require("../utils/shared");
7
+
8
+ var internalSizeValidator = size => ['mini', 'small', 'normal', 'large'].includes(size);
9
+
10
+ exports.internalSizeValidator = internalSizeValidator;
11
+
12
+ var sizeValidator = size => {
13
+ return internalSizeValidator(size) || (0, _shared.isArray)(size) || (0, _shared.isNumber)(size) || (0, _shared.isString)(size);
14
+ };
15
+
16
+ exports.sizeValidator = sizeValidator;
17
+
18
+ var justifyValidator = justify => {
19
+ return ['start', 'end', 'center', 'space-around', 'space-between'].includes(justify);
20
+ };
21
+
22
+ var props = {
23
+ align: {
24
+ type: String
25
+ },
26
+ size: {
27
+ type: [String, Number, Array],
28
+ default: 'normal',
29
+ validator: sizeValidator
30
+ },
31
+ wrap: {
32
+ type: Boolean,
33
+ default: true
34
+ },
35
+ direction: {
36
+ type: String,
37
+ default: 'row'
38
+ },
39
+ justify: {
40
+ type: String,
41
+ default: 'start',
42
+ validator: justifyValidator
43
+ },
44
+ inline: {
45
+ type: Boolean,
46
+ default: false
47
+ }
48
+ };
49
+ exports.props = props;
@@ -0,0 +1 @@
1
+ .var-space { display: flex;}.var-space--line { display: inline-flex;}
@@ -0,0 +1,6 @@
1
+ .var-space {
2
+ display: flex;
3
+ &--line {
4
+ display: inline-flex;
5
+ }
6
+ }
@@ -0,0 +1,2 @@
1
+ require('../../styles/common.css')
2
+ require('../space.css')
@@ -0,0 +1,2 @@
1
+ require('../../styles/common.less')
2
+ require('../space.less')
@@ -0,0 +1,156 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.render = render;
5
+ exports.default = void 0;
6
+
7
+ var _vue = require("vue");
8
+
9
+ var _props = require("./props");
10
+
11
+ var _provide = require("./provide");
12
+
13
+ var _icon = _interopRequireDefault(require("../icon"));
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+
17
+ var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
18
+
19
+ var _hoisted_1 = {
20
+ class: "var-step"
21
+ };
22
+ var _hoisted_2 = {
23
+ key: 3
24
+ };
25
+
26
+ function render(_ctx, _cache) {
27
+ var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
28
+
29
+ return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [(0, _vue.createElementVNode)("div", {
30
+ class: (0, _vue.normalizeClass)("var-step-" + _ctx.direction)
31
+ }, [(0, _vue.createElementVNode)("div", {
32
+ class: (0, _vue.normalizeClass)("var-step-" + _ctx.direction + "__main"),
33
+ ref: _ctx.getRef
34
+ }, [(0, _vue.createElementVNode)("div", {
35
+ class: (0, _vue.normalizeClass)({
36
+ ["var-step-" + _ctx.direction + "__tag"]: true,
37
+ ["var-step-" + _ctx.direction + "__tag--active"]: _ctx.isActive || _ctx.isCurrent
38
+ }),
39
+ style: (0, _vue.normalizeStyle)({
40
+ backgroundColor: _ctx.isActive || _ctx.isCurrent ? _ctx.activeColor : _ctx.inactiveColor
41
+ }),
42
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.click && _ctx.click(...args))
43
+ }, [_ctx.isActive ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_icon, {
44
+ key: 0,
45
+ class: "var-step__icon",
46
+ "var-step-cover": "",
47
+ name: _ctx.activeIcon
48
+ }, null, 8
49
+ /* PROPS */
50
+ , ["name"])) : _ctx.isCurrent && _ctx.currentIcon ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_icon, {
51
+ key: 1,
52
+ class: "var-step__icon",
53
+ "var-step-cover": "",
54
+ name: _ctx.currentIcon
55
+ }, null, 8
56
+ /* PROPS */
57
+ , ["name"])) : _ctx.inactiveIcon ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_icon, {
58
+ key: 2,
59
+ class: "var-step__icon",
60
+ "var-step-cover": "",
61
+ name: _ctx.inactiveIcon
62
+ }, null, 8
63
+ /* PROPS */
64
+ , ["name"])) : ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("span", _hoisted_2, (0, _vue.toDisplayString)(_ctx.index + 1), 1
65
+ /* TEXT */
66
+ ))], 6
67
+ /* CLASS, STYLE */
68
+ ), (0, _vue.createElementVNode)("div", {
69
+ class: (0, _vue.normalizeClass)({
70
+ ["var-step-" + _ctx.direction + "__content"]: true,
71
+ ["var-step-" + _ctx.direction + "__content--active"]: _ctx.isActive || _ctx.isCurrent
72
+ }),
73
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.click && _ctx.click(...args))
74
+ }, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 2
75
+ /* CLASS */
76
+ )], 2
77
+ /* CLASS */
78
+ ), !_ctx.isLastChild ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
79
+ key: 0,
80
+ class: (0, _vue.normalizeClass)("var-step-" + _ctx.direction + "__line"),
81
+ style: (0, _vue.normalizeStyle)({
82
+ margin: _ctx.lineMargin
83
+ })
84
+ }, null, 6
85
+ /* CLASS, STYLE */
86
+ )) : (0, _vue.createCommentVNode)("v-if", true)], 2
87
+ /* CLASS */
88
+ )]);
89
+ }
90
+
91
+ var _default = (0, _vue.defineComponent)({
92
+ render,
93
+ name: 'VarStep',
94
+ components: {
95
+ VarIcon: _icon.default
96
+ },
97
+ props: _props.props,
98
+
99
+ setup() {
100
+ var main = (0, _vue.ref)(null);
101
+ var lineMargin = (0, _vue.ref)('');
102
+ var isLastChild = (0, _vue.ref)(false);
103
+ var {
104
+ index,
105
+ steps,
106
+ bindSteps
107
+ } = (0, _provide.useSteps)();
108
+ var {
109
+ active,
110
+ length,
111
+ activeColor,
112
+ inactiveColor,
113
+ direction,
114
+ clickStep
115
+ } = steps;
116
+ var isCurrent = (0, _vue.computed)(() => active.value === index.value);
117
+ var isActive = (0, _vue.computed)(() => index.value !== -1 && active.value > index.value);
118
+ var stepProvider = {
119
+ index
120
+ };
121
+
122
+ var click = () => clickStep(index.value);
123
+
124
+ var getRef = el => {
125
+ if (direction.value === 'horizontal') {
126
+ main.value = el;
127
+ }
128
+ };
129
+
130
+ bindSteps(stepProvider);
131
+ (0, _vue.watch)(length, newLength => {
132
+ isLastChild.value = newLength - 1 === index.value;
133
+
134
+ if (main.value) {
135
+ var margin = main.value.offsetWidth / 2 - 14;
136
+ lineMargin.value = "0 -" + margin + "px";
137
+ }
138
+ });
139
+ return {
140
+ main,
141
+ index,
142
+ isActive,
143
+ isCurrent,
144
+ direction,
145
+ lineMargin,
146
+ activeColor,
147
+ inactiveColor,
148
+ isLastChild,
149
+ click,
150
+ getRef
151
+ };
152
+ }
153
+
154
+ });
155
+
156
+ exports.default = _default;
File without changes
File without changes
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = exports._StepComponent = void 0;
5
+
6
+ var _Step = _interopRequireDefault(require("./Step.vue"));
7
+
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+
10
+ _Step.default.install = function (app) {
11
+ app.component(_Step.default.name, _Step.default);
12
+ };
13
+
14
+ var _StepComponent = _Step.default;
15
+ exports._StepComponent = _StepComponent;
16
+ var _default = _Step.default;
17
+ exports.default = _default;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.props = void 0;
5
+ var props = {
6
+ activeIcon: {
7
+ type: String,
8
+ default: 'check'
9
+ },
10
+ currentIcon: {
11
+ type: String
12
+ },
13
+ inactiveIcon: {
14
+ type: String
15
+ }
16
+ };
17
+ exports.props = props;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.useSteps = useSteps;
5
+
6
+ var _components = require("../utils/components");
7
+
8
+ var _provide = require("../steps/provide");
9
+
10
+ function useSteps() {
11
+ var {
12
+ parentProvider,
13
+ bindParent
14
+ } = (0, _components.useParent)(_provide.STEPS_BIND_STEP_KEY);
15
+ var {
16
+ index
17
+ } = (0, _components.useAtParentIndex)(_provide.STEPS_COUNT_STEP_KEY);
18
+
19
+ if (!parentProvider || !bindParent || !index) {
20
+ throw Error('[Varlet] Steps: <step/> must in <steps>');
21
+ }
22
+
23
+ return {
24
+ index,
25
+ steps: parentProvider,
26
+ bindSteps: bindParent
27
+ };
28
+ }
@@ -0,0 +1 @@
1
+ :root { --step-tag-size: 20px; --step-tag-background: #9e9e9e; --step-tag-font-size: var(--font-size-md); --step-tag-color: #fff; --step-tag-active-color: var(--color-primary); --step-tag-margin: 4px 0; --step-tag-icon-size: var(--font-size-lg); --step-content-font-size: var(--font-size-md); --step-content-color: rgba(0, 0, 0, 0.38); --step-content-active-color: #000; --step-line-background: #000; --step-vertical-min-height: 30px; --step-vertical-tag-margin: 0 4px; --step-vertical-line-height: calc(100% - 30px); --step-vertical-line-min-height: 20px;}.tag { width: var(--step-tag-size); height: var(--step-tag-size); background: var(--step-tag-background); display: flex; font-size: var(--step-tag-font-size); align-items: center; justify-content: center; border-radius: 50%; color: var(--step-tag-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.content { font-size: var(--step-content-font-size); color: var(--step-content-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step { display: flex; position: relative; flex: 1; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-step-horizontal { display: flex; width: 100%;}.var-step-horizontal__main { display: flex; flex-direction: column; align-items: center; flex-basis: 100%;}.var-step-horizontal__tag { margin: var(--step-tag-margin); width: var(--step-tag-size); height: var(--step-tag-size); background: var(--step-tag-background); display: flex; font-size: var(--step-tag-font-size); align-items: center; justify-content: center; border-radius: 50%; color: var(--step-tag-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step-horizontal__tag--active { background: var(--step-tag-active-color);}.var-step-horizontal__content { font-size: var(--step-content-font-size); color: var(--step-content-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step-horizontal__content--active { color: var(--step-content-active-color);}.var-step-horizontal__line { position: relative; top: 14px; flex: 1; height: 1px; transform: scaleY(0.5); background: var(--step-line-background);}.var-step-vertical { width: 100%;}.var-step-vertical__main { display: flex; align-items: flex-start; min-height: var(--step-vertical-min-height);}.var-step-vertical__tag { margin: var(--step-vertical-tag-margin); width: var(--step-tag-size); height: var(--step-tag-size); background: var(--step-tag-background); display: flex; font-size: var(--step-tag-font-size); align-items: center; justify-content: center; border-radius: 50%; color: var(--step-tag-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step-vertical__tag--active { background: var(--step-tag-active-color);}.var-step-vertical__content { font-size: var(--step-content-font-size); color: var(--step-content-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step-vertical__content--active { color: var(--step-content-active-color);}.var-step-vertical__line { position: relative; height: var(--step-vertical-line-height); left: 14px; top: calc(-100% + 45px); min-height: var(--step-vertical-line-min-height); width: 1px; transform: scaleX(0.5); background: var(--step-line-background);}.var-step__icon[var-step-cover] { font-size: var(--step-tag-icon-size);}
@@ -0,0 +1,145 @@
1
+ @step-tag-size: 20px;
2
+ @step-tag-background: #9e9e9e;
3
+ @step-tag-font-size: var(--font-size-md);
4
+ @step-tag-color: #fff;
5
+ @step-tag-active-color: var(--color-primary);
6
+ @step-tag-margin: 4px 0;
7
+ @step-tag-icon-size: var(--font-size-lg);
8
+ @step-content-font-size: var(--font-size-md);
9
+ @step-content-color: rgba(0, 0, 0, 0.38);
10
+ @step-content-active-color: #000;
11
+ @step-line-background: #000;
12
+ @step-vertical-min-height: 30px;
13
+ @step-vertical-tag-margin: 0 4px;
14
+ @step-vertical-line-height: calc(100% - 30px);
15
+ @step-vertical-line-min-height: 20px;
16
+
17
+ :root {
18
+ --step-tag-size: @step-tag-size;
19
+ --step-tag-background: @step-tag-background;
20
+ --step-tag-font-size: @step-tag-font-size;
21
+ --step-tag-color: @step-tag-color;
22
+ --step-tag-active-color: @step-tag-active-color;
23
+ --step-tag-margin: @step-tag-margin;
24
+ --step-tag-icon-size: @step-tag-icon-size;
25
+ --step-content-font-size: @step-content-font-size;
26
+ --step-content-color: @step-content-color;
27
+ --step-content-active-color: @step-content-active-color;
28
+ --step-line-background: @step-line-background;
29
+ --step-vertical-min-height: @step-vertical-min-height;
30
+ --step-vertical-tag-margin: @step-vertical-tag-margin;
31
+ --step-vertical-line-height: @step-vertical-line-height;
32
+ --step-vertical-line-min-height: @step-vertical-line-min-height;
33
+ }
34
+
35
+ // Mixins
36
+ .tag {
37
+ width: var(--step-tag-size);
38
+ height: var(--step-tag-size);
39
+ background: var(--step-tag-background);
40
+ display: flex;
41
+ font-size: var(--step-tag-font-size);
42
+ align-items: center;
43
+ justify-content: center;
44
+ border-radius: 50%;
45
+ color: var(--step-tag-color);
46
+ cursor: pointer;
47
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
48
+ transition: 0.3s var(--cubic-bezier);
49
+ }
50
+
51
+ // Mixins
52
+ .content {
53
+ font-size: var(--step-content-font-size);
54
+ color: var(--step-content-color);
55
+ cursor: pointer;
56
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
57
+ transition: 0.3s var(--cubic-bezier);
58
+ }
59
+
60
+ .var-step {
61
+ display: flex;
62
+ position: relative;
63
+ flex: 1;
64
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
65
+
66
+ &-horizontal {
67
+ display: flex;
68
+ width: 100%;
69
+
70
+ &__main {
71
+ display: flex;
72
+ flex-direction: column;
73
+ align-items: center;
74
+ flex-basis: 100%;
75
+ }
76
+
77
+ &__tag {
78
+ margin: var(--step-tag-margin);
79
+ .tag();
80
+
81
+ &--active {
82
+ background: var(--step-tag-active-color);
83
+ }
84
+ }
85
+
86
+ &__content {
87
+ .content();
88
+
89
+ &--active {
90
+ color: var(--step-content-active-color);
91
+ }
92
+ }
93
+
94
+ &__line {
95
+ position: relative;
96
+ top: 14px;
97
+ flex: 1;
98
+ height: 1px;
99
+ transform: scaleY(0.5);
100
+ background: var(--step-line-background);
101
+ }
102
+ }
103
+
104
+ &-vertical {
105
+ width: 100%;
106
+
107
+ &__main {
108
+ display: flex;
109
+ align-items: flex-start;
110
+ min-height: var(--step-vertical-min-height);
111
+ }
112
+
113
+ &__tag {
114
+ margin: var(--step-vertical-tag-margin);
115
+ .tag();
116
+
117
+ &--active {
118
+ background: var(--step-tag-active-color);
119
+ }
120
+ }
121
+
122
+ &__content {
123
+ .content();
124
+
125
+ &--active {
126
+ color: var(--step-content-active-color);
127
+ }
128
+ }
129
+
130
+ &__line {
131
+ position: relative;
132
+ height: var(--step-vertical-line-height);
133
+ left: 14px;
134
+ top: calc(-100% + 45px);
135
+ min-height: var(--step-vertical-line-min-height);
136
+ width: 1px;
137
+ transform: scaleX(0.5);
138
+ background: var(--step-line-background);
139
+ }
140
+ }
141
+
142
+ &__icon[var-step-cover] {
143
+ font-size: var(--step-tag-icon-size);
144
+ }
145
+ }
@@ -0,0 +1,4 @@
1
+ require('../../styles/common.css')
2
+ require('../../icon/icon.css')
3
+ require('../step.css')
4
+ require('../StepSfc.css')
@@ -0,0 +1,4 @@
1
+ require('../../styles/common.less')
2
+ require('../../icon/icon.less')
3
+ require('../step.less')
4
+ require('../StepSfc.less')
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.render = render;
5
+ exports.default = void 0;
6
+
7
+ var _vue = require("vue");
8
+
9
+ var _provide = require("./provide");
10
+
11
+ var _props = require("./props");
12
+
13
+ function render(_ctx, _cache) {
14
+ return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
15
+ class: "var-steps",
16
+ style: (0, _vue.normalizeStyle)({
17
+ flexDirection: _ctx.direction === 'horizontal' ? 'row' : 'column'
18
+ })
19
+ }, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 4
20
+ /* STYLE */
21
+ );
22
+ }
23
+
24
+ var _default = (0, _vue.defineComponent)({
25
+ render,
26
+ name: 'VarSteps',
27
+ props: _props.props,
28
+
29
+ setup(props) {
30
+ var active = (0, _vue.computed)(() => props.active);
31
+ var activeColor = (0, _vue.computed)(() => props.activeColor);
32
+ var inactiveColor = (0, _vue.computed)(() => props.inactiveColor);
33
+ var direction = (0, _vue.computed)(() => props.direction);
34
+ var {
35
+ length,
36
+ bindStep
37
+ } = (0, _provide.useStep)();
38
+
39
+ var clickStep = index => {
40
+ props.onClickStep == null ? void 0 : props.onClickStep(index);
41
+ };
42
+
43
+ var stepsProvider = {
44
+ active,
45
+ length,
46
+ direction,
47
+ activeColor,
48
+ inactiveColor,
49
+ clickStep
50
+ };
51
+ bindStep(stepsProvider);
52
+ }
53
+
54
+ });
55
+
56
+ exports.default = _default;
@@ -0,0 +1 @@
1
+ .var-steps { display: flex; justify-content: space-between; overflow: hidden;}
@@ -0,0 +1 @@
1
+ .var-steps { display: flex; justify-content: space-between; overflow: hidden;}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = exports._StepsComponent = void 0;
5
+
6
+ var _Steps = _interopRequireDefault(require("./Steps.vue"));
7
+
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+
10
+ _Steps.default.install = function (app) {
11
+ app.component(_Steps.default.name, _Steps.default);
12
+ };
13
+
14
+ var _StepsComponent = _Steps.default;
15
+ exports._StepsComponent = _StepsComponent;
16
+ var _default = _Steps.default;
17
+ exports.default = _default;