@varlet/ui 1.27.20 → 2.0.0-alpha.1663742071515

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 (561) hide show
  1. package/LICENCE +1 -1
  2. package/README.md +27 -33
  3. package/README.zh-CN.md +92 -0
  4. package/es/action-sheet/actionSheet.css +1 -1
  5. package/es/action-sheet/props.js +1 -1
  6. package/es/bottom-navigation/BottomNavigation.js +1 -1
  7. package/es/button/Button.js +2 -1
  8. package/es/button/button.css +1 -1
  9. package/es/button/props.js +5 -0
  10. package/es/card/Card.js +18 -22
  11. package/es/card/card.css +1 -1
  12. package/es/card/props.js +0 -7
  13. package/es/cell/Cell.js +3 -3
  14. package/es/cell/cell.css +1 -1
  15. package/es/cell/props.js +2 -2
  16. package/es/chip/chip.css +1 -1
  17. package/es/date-picker/DatePicker.js +1 -1
  18. package/es/date-picker/props.js +1 -1
  19. package/es/date-picker/src/day-picker-panel.js +1 -1
  20. package/es/date-picker/src/month-picker-panel.js +1 -1
  21. package/es/dialog/props.js +1 -1
  22. package/es/divider/Divider.js +1 -1
  23. package/es/image-preview/props.js +1 -1
  24. package/es/index.js +5 -0
  25. package/es/lazy/index.js +1 -1
  26. package/es/loading/loading.css +1 -1
  27. package/es/loading/props.js +1 -2
  28. package/es/locale/index.js +7 -2
  29. package/es/menu/Menu.js +318 -94
  30. package/es/{action-sheet/ActionSheetSfc.less → menu/MenuSfc.css} +0 -0
  31. package/es/menu/index.js +1 -1
  32. package/es/menu/menu.css +1 -1
  33. package/es/menu/props.js +23 -6
  34. package/es/menu/style/index.js +3 -2
  35. package/es/pagination/Pagination.js +7 -3
  36. package/es/pagination/pagination.css +1 -1
  37. package/es/picker/props.js +1 -1
  38. package/es/popup/Popup.js +3 -3
  39. package/es/rate/Rate.js +20 -36
  40. package/es/rate/rate.css +1 -1
  41. package/es/ripple/index.js +2 -2
  42. package/es/select/Select.js +18 -46
  43. package/es/select/select.css +1 -1
  44. package/es/slider/Slider.js +1 -1
  45. package/es/snackbar/core.js +4 -2
  46. package/es/snackbar/index.js +1 -1
  47. package/es/snackbar/props.js +6 -2
  48. package/es/snackbar/style/index.js +1 -1
  49. package/es/space/Space.js +6 -2
  50. package/es/style-provider/StyleProvider.js +5 -1
  51. package/es/style-provider/index.js +1 -5
  52. package/es/style.css +1 -1
  53. package/es/style.js +1 -0
  54. package/es/switch/Switch.js +6 -5
  55. package/es/tabs/tabs.css +1 -1
  56. package/es/tabs-items/TabsItems.js +8 -2
  57. package/es/themes/dark/cell.js +1 -1
  58. package/es/themes/dark/index.js +3 -2
  59. package/es/themes/dark/menu.js +3 -0
  60. package/es/themes/index.js +4 -0
  61. package/es/time-picker/TimePicker.js +1 -1
  62. package/es/time-picker/props.js +1 -1
  63. package/es/umdIndex.js +5 -0
  64. package/es/utils/components.js +2 -2
  65. package/es/utils/jest.js +0 -19
  66. package/es/varlet.esm.js +12805 -13960
  67. package/highlight/attributes.json +41 -9
  68. package/highlight/tags.json +14 -6
  69. package/highlight/web-types.json +83 -11
  70. package/lib/action-sheet/actionSheet.css +1 -1
  71. package/lib/action-sheet/props.js +1 -1
  72. package/lib/bottom-navigation/BottomNavigation.js +1 -1
  73. package/lib/button/Button.js +2 -1
  74. package/lib/button/button.css +1 -1
  75. package/lib/button/props.js +5 -0
  76. package/lib/card/Card.js +18 -22
  77. package/lib/card/card.css +1 -1
  78. package/lib/card/props.js +0 -7
  79. package/lib/cell/Cell.js +3 -3
  80. package/lib/cell/cell.css +1 -1
  81. package/lib/cell/props.js +2 -2
  82. package/lib/chip/chip.css +1 -1
  83. package/lib/date-picker/DatePicker.js +1 -1
  84. package/lib/date-picker/props.js +1 -1
  85. package/lib/date-picker/src/day-picker-panel.js +1 -1
  86. package/lib/date-picker/src/month-picker-panel.js +1 -1
  87. package/lib/dialog/props.js +1 -1
  88. package/lib/divider/Divider.js +1 -1
  89. package/lib/image-preview/props.js +1 -1
  90. package/lib/index.js +3 -0
  91. package/lib/lazy/index.js +1 -1
  92. package/lib/loading/loading.css +1 -1
  93. package/lib/loading/props.js +1 -2
  94. package/lib/locale/index.js +11 -1
  95. package/lib/menu/Menu.js +321 -91
  96. package/{es/app-bar/AppBarSfc.less → lib/menu/MenuSfc.css} +0 -0
  97. package/lib/menu/index.js +1 -1
  98. package/lib/menu/menu.css +1 -1
  99. package/lib/menu/props.js +23 -6
  100. package/lib/menu/style/index.js +3 -2
  101. package/lib/pagination/Pagination.js +6 -2
  102. package/lib/pagination/pagination.css +1 -1
  103. package/lib/picker/props.js +1 -1
  104. package/lib/popup/Popup.js +2 -2
  105. package/lib/rate/Rate.js +20 -36
  106. package/lib/rate/rate.css +1 -1
  107. package/lib/ripple/index.js +2 -2
  108. package/lib/select/Select.js +17 -45
  109. package/lib/select/select.css +1 -1
  110. package/lib/slider/Slider.js +1 -1
  111. package/lib/snackbar/core.js +4 -2
  112. package/lib/snackbar/index.js +1 -1
  113. package/lib/snackbar/props.js +6 -2
  114. package/lib/space/Space.js +6 -2
  115. package/lib/style-provider/StyleProvider.js +5 -1
  116. package/lib/style-provider/index.js +1 -5
  117. package/lib/style.css +1 -1
  118. package/lib/style.js +1 -0
  119. package/lib/switch/Switch.js +6 -5
  120. package/lib/tabs/tabs.css +1 -1
  121. package/lib/tabs-items/TabsItems.js +9 -3
  122. package/lib/themes/dark/cell.js +1 -1
  123. package/lib/themes/dark/index.js +4 -2
  124. package/lib/themes/dark/menu.js +8 -0
  125. package/lib/themes/index.js +13 -0
  126. package/lib/time-picker/TimePicker.js +1 -1
  127. package/lib/time-picker/props.js +1 -1
  128. package/lib/utils/components.js +3 -3
  129. package/lib/utils/jest.js +0 -21
  130. package/package.json +10 -7
  131. package/types/actionSheet.d.ts +1 -2
  132. package/types/appBar.d.ts +4 -3
  133. package/types/backTop.d.ts +1 -2
  134. package/types/badge.d.ts +5 -4
  135. package/types/bottomNavigation.d.ts +1 -2
  136. package/types/bottomNavigationItem.d.ts +1 -2
  137. package/types/button.d.ts +7 -6
  138. package/types/card.d.ts +7 -8
  139. package/types/cell.d.ts +3 -4
  140. package/types/checkbox.d.ts +1 -2
  141. package/types/checkboxGroup.d.ts +4 -5
  142. package/types/chip.d.ts +3 -4
  143. package/types/col.d.ts +1 -2
  144. package/types/collapse.d.ts +1 -2
  145. package/types/collapseItem.d.ts +1 -2
  146. package/types/countdown.d.ts +1 -2
  147. package/types/counter.d.ts +3 -4
  148. package/types/datePicker.d.ts +5 -4
  149. package/types/dialog.d.ts +4 -3
  150. package/types/divider.d.ts +1 -2
  151. package/types/form.d.ts +1 -2
  152. package/types/icon.d.ts +1 -2
  153. package/types/image.d.ts +4 -3
  154. package/types/imagePreview.d.ts +2 -3
  155. package/types/index.d.ts +67 -0
  156. package/types/indexAnchor.d.ts +1 -2
  157. package/types/indexBar.d.ts +1 -2
  158. package/types/input.d.ts +6 -5
  159. package/types/list.d.ts +1 -2
  160. package/types/loading.d.ts +5 -4
  161. package/types/locale.d.ts +3 -0
  162. package/types/menu.d.ts +27 -3
  163. package/types/option.d.ts +1 -2
  164. package/types/pagination.d.ts +1 -2
  165. package/types/picker.d.ts +1 -2
  166. package/types/popup.d.ts +4 -3
  167. package/types/progress.d.ts +4 -3
  168. package/types/pullRefresh.d.ts +1 -2
  169. package/types/radio.d.ts +3 -4
  170. package/types/radioGroup.d.ts +4 -5
  171. package/types/rate.d.ts +1 -2
  172. package/types/row.d.ts +7 -4
  173. package/types/select.d.ts +6 -5
  174. package/types/skeleton.d.ts +1 -2
  175. package/types/slider.d.ts +4 -3
  176. package/types/snackbar.d.ts +9 -9
  177. package/types/space.d.ts +1 -2
  178. package/types/step.d.ts +1 -2
  179. package/types/steps.d.ts +2 -3
  180. package/types/sticky.d.ts +1 -2
  181. package/types/styleProvider.d.ts +2 -2
  182. package/types/swipe.d.ts +1 -2
  183. package/types/swipeItem.d.ts +1 -2
  184. package/types/switch.d.ts +1 -2
  185. package/types/tab.d.ts +1 -2
  186. package/types/tabItem.d.ts +1 -2
  187. package/types/table.d.ts +1 -2
  188. package/types/tabs.d.ts +3 -4
  189. package/types/tabsItems.d.ts +4 -2
  190. package/types/timePicker.d.ts +5 -4
  191. package/types/uploader.d.ts +12 -7
  192. package/types/varComponent.d.ts +6 -0
  193. package/umd/varlet.js +16 -4
  194. package/README.en-US.md +0 -93
  195. package/es/action-sheet/actionSheet.less +0 -68
  196. package/es/action-sheet/style/less.js +0 -6
  197. package/es/app-bar/appBar.less +0 -57
  198. package/es/app-bar/style/less.js +0 -4
  199. package/es/back-top/BackTopSfc.less +0 -0
  200. package/es/back-top/backTop.less +0 -27
  201. package/es/back-top/style/less.js +0 -5
  202. package/es/badge/BadgeSfc.less +0 -0
  203. package/es/badge/badge.less +0 -119
  204. package/es/badge/style/less.js +0 -4
  205. package/es/bottom-navigation/BottomNavigationSfc.less +0 -0
  206. package/es/bottom-navigation/bottomNavigation.less +0 -56
  207. package/es/bottom-navigation/style/less.js +0 -4
  208. package/es/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
  209. package/es/bottom-navigation-item/bottomNavigationItem.less +0 -78
  210. package/es/bottom-navigation-item/style/less.js +0 -6
  211. package/es/button/ButtonSfc.less +0 -0
  212. package/es/button/button.less +0 -183
  213. package/es/button/style/less.js +0 -6
  214. package/es/card/CardSfc.less +0 -0
  215. package/es/card/card.less +0 -189
  216. package/es/card/style/less.js +0 -5
  217. package/es/cell/CellSfc.less +0 -0
  218. package/es/cell/cell.less +0 -78
  219. package/es/cell/style/less.js +0 -4
  220. package/es/checkbox/CheckboxSfc.less +0 -0
  221. package/es/checkbox/checkbox.less +0 -78
  222. package/es/checkbox/style/less.js +0 -6
  223. package/es/checkbox-group/CheckboxGroupSfc.less +0 -0
  224. package/es/checkbox-group/checkboxGroup.less +0 -12
  225. package/es/checkbox-group/style/less.js +0 -4
  226. package/es/chip/ChipSfc.less +0 -0
  227. package/es/chip/chip.less +0 -182
  228. package/es/chip/style/less.js +0 -4
  229. package/es/col/ColSfc.less +0 -0
  230. package/es/col/col.less +0 -74
  231. package/es/col/style/less.js +0 -3
  232. package/es/collapse/CollapseSfc.less +0 -1
  233. package/es/collapse/style/less.js +0 -3
  234. package/es/collapse-item/CollapseItemSfc.less +0 -0
  235. package/es/collapse-item/collapseItem.less +0 -105
  236. package/es/collapse-item/style/less.js +0 -4
  237. package/es/context/style/less.js +0 -0
  238. package/es/countdown/CountdownSfc.less +0 -0
  239. package/es/countdown/style/less.js +0 -2
  240. package/es/counter/CounterSfc.less +0 -0
  241. package/es/counter/counter.less +0 -89
  242. package/es/counter/style/less.js +0 -7
  243. package/es/date-picker/DatePickerSfc.less +0 -0
  244. package/es/date-picker/date-picker.less +0 -354
  245. package/es/date-picker/style/less.js +0 -7
  246. package/es/dialog/DialogSfc.less +0 -0
  247. package/es/dialog/dialog.less +0 -77
  248. package/es/dialog/style/less.js +0 -5
  249. package/es/divider/DividerSfc.less +0 -0
  250. package/es/divider/divider.less +0 -78
  251. package/es/divider/style/less.js +0 -3
  252. package/es/form/FormSfc.less +0 -0
  253. package/es/form/style/less.js +0 -2
  254. package/es/form-details/FormDetailsSfc.less +0 -0
  255. package/es/form-details/formDetails.less +0 -48
  256. package/es/form-details/style/less.js +0 -3
  257. package/es/icon/IconSfc.less +0 -0
  258. package/es/icon/icon.less +0 -26
  259. package/es/icon/style/less.js +0 -3
  260. package/es/image/ImageSfc.less +0 -0
  261. package/es/image/image.less +0 -9
  262. package/es/image/style/less.js +0 -4
  263. package/es/image-preview/ImagePreviewSfc.less +0 -0
  264. package/es/image-preview/imagePreview.less +0 -76
  265. package/es/image-preview/style/less.js +0 -7
  266. package/es/index-anchor/IndexAnchorSfc.less +0 -1
  267. package/es/index-anchor/style/less.js +0 -3
  268. package/es/index-bar/IndexBarSfc.less +0 -0
  269. package/es/index-bar/indexBar.less +0 -43
  270. package/es/index-bar/style/less.js +0 -3
  271. package/es/input/InputSfc.less +0 -0
  272. package/es/input/input.less +0 -187
  273. package/es/input/style/less.js +0 -5
  274. package/es/lazy/style/less.js +0 -0
  275. package/es/less.js +0 -64
  276. package/es/list/ListSfc.less +0 -0
  277. package/es/list/list.less +0 -63
  278. package/es/list/style/less.js +0 -5
  279. package/es/loading/LoadingSfc.less +0 -0
  280. package/es/loading/loading.less +0 -500
  281. package/es/loading/style/less.js +0 -3
  282. package/es/locale/style/less.js +0 -0
  283. package/es/menu/menu.less +0 -21
  284. package/es/menu/style/less.js +0 -3
  285. package/es/option/OptionSfc.less +0 -0
  286. package/es/option/option.less +0 -37
  287. package/es/option/style/less.js +0 -6
  288. package/es/pagination/PaginationSfc.less +0 -0
  289. package/es/pagination/pagination.less +0 -188
  290. package/es/pagination/style/less.js +0 -8
  291. package/es/picker/PickerSfc.less +0 -0
  292. package/es/picker/picker.less +0 -106
  293. package/es/picker/style/less.js +0 -5
  294. package/es/popup/popup.less +0 -125
  295. package/es/popup/style/less.js +0 -2
  296. package/es/progress/ProgressSfc.less +0 -0
  297. package/es/progress/progress.less +0 -101
  298. package/es/progress/style/less.js +0 -3
  299. package/es/pull-refresh/PullRefreshSfc.less +0 -0
  300. package/es/pull-refresh/pullRefresh.less +0 -56
  301. package/es/pull-refresh/style/less.js +0 -5
  302. package/es/radio/RadioSfc.less +0 -0
  303. package/es/radio/radio.less +0 -78
  304. package/es/radio/style/less.js +0 -6
  305. package/es/radio-group/RadioGroupSfc.less +0 -0
  306. package/es/radio-group/radioGroup.less +0 -12
  307. package/es/radio-group/style/less.js +0 -4
  308. package/es/rate/RateSfc.less +0 -0
  309. package/es/rate/rate.less +0 -48
  310. package/es/rate/style/less.js +0 -6
  311. package/es/ripple/ripple.less +0 -20
  312. package/es/ripple/style/less.js +0 -2
  313. package/es/row/RowSfc.less +0 -0
  314. package/es/row/row.less +0 -4
  315. package/es/row/style/less.js +0 -3
  316. package/es/select/SelectSfc.less +0 -0
  317. package/es/select/select.less +0 -184
  318. package/es/select/style/less.js +0 -7
  319. package/es/skeleton/SkeletonSfc.less +0 -0
  320. package/es/skeleton/skeleton.less +0 -138
  321. package/es/skeleton/style/less.js +0 -3
  322. package/es/slider/SliderSfc.less +0 -0
  323. package/es/slider/slider.less +0 -147
  324. package/es/slider/style/less.js +0 -4
  325. package/es/snackbar/SnackbarSfc.less +0 -0
  326. package/es/snackbar/coreSfc.less +0 -0
  327. package/es/snackbar/snackbar.less +0 -129
  328. package/es/snackbar/style/less.js +0 -8
  329. package/es/space/space.less +0 -6
  330. package/es/space/style/less.js +0 -2
  331. package/es/step/StepSfc.less +0 -0
  332. package/es/step/step.less +0 -145
  333. package/es/step/style/less.js +0 -4
  334. package/es/steps/StepsSfc.less +0 -1
  335. package/es/steps/style/less.js +0 -2
  336. package/es/sticky/StickySfc.less +0 -0
  337. package/es/sticky/sticky.less +0 -8
  338. package/es/sticky/style/less.js +0 -3
  339. package/es/style-provider/StyleProviderSfc.less +0 -0
  340. package/es/style-provider/style/less.js +0 -2
  341. package/es/styles/common.less +0 -73
  342. package/es/styles/elevation.less +0 -128
  343. package/es/styles/style/less.js +0 -0
  344. package/es/styles/var.css +0 -0
  345. package/es/styles/var.less +0 -30
  346. package/es/swipe/SwipeSfc.less +0 -0
  347. package/es/swipe/style/less.js +0 -3
  348. package/es/swipe/swipe.less +0 -60
  349. package/es/swipe-item/SwipeItemSfc.less +0 -0
  350. package/es/swipe-item/style/less.js +0 -3
  351. package/es/swipe-item/swipeItem.less +0 -5
  352. package/es/switch/SwitchSfc.less +0 -0
  353. package/es/switch/style/less.js +0 -7
  354. package/es/switch/switch.less +0 -94
  355. package/es/tab/TabSfc.less +0 -0
  356. package/es/tab/style/less.js +0 -4
  357. package/es/tab/tab.less +0 -46
  358. package/es/tab-item/TabItemSfc.less +0 -0
  359. package/es/tab-item/style/less.js +0 -4
  360. package/es/tab-item/tabItem.less +0 -6
  361. package/es/table/TableSfc.less +0 -0
  362. package/es/table/style/less.js +0 -4
  363. package/es/table/table.less +0 -110
  364. package/es/tabs/TabsSfc.less +0 -0
  365. package/es/tabs/style/less.js +0 -5
  366. package/es/tabs/tabs.less +0 -99
  367. package/es/tabs-items/TabsItemsSfc.less +0 -0
  368. package/es/tabs-items/style/less.js +0 -3
  369. package/es/themes/style/less.js +0 -0
  370. package/es/time-picker/TimePickerSfc.less +0 -0
  371. package/es/time-picker/style/less.js +0 -4
  372. package/es/time-picker/timePicker.less +0 -237
  373. package/es/uploader/UploaderSfc.less +0 -0
  374. package/es/uploader/style/less.js +0 -8
  375. package/es/uploader/uploader.less +0 -216
  376. package/es/utils/style/less.js +0 -0
  377. package/lib/action-sheet/ActionSheetSfc.less +0 -0
  378. package/lib/action-sheet/actionSheet.less +0 -68
  379. package/lib/action-sheet/style/less.js +0 -6
  380. package/lib/app-bar/AppBarSfc.less +0 -0
  381. package/lib/app-bar/appBar.less +0 -57
  382. package/lib/app-bar/style/less.js +0 -4
  383. package/lib/back-top/BackTopSfc.less +0 -0
  384. package/lib/back-top/backTop.less +0 -27
  385. package/lib/back-top/style/less.js +0 -5
  386. package/lib/badge/BadgeSfc.less +0 -0
  387. package/lib/badge/badge.less +0 -119
  388. package/lib/badge/style/less.js +0 -4
  389. package/lib/bottom-navigation/BottomNavigationSfc.less +0 -0
  390. package/lib/bottom-navigation/bottomNavigation.less +0 -56
  391. package/lib/bottom-navigation/style/less.js +0 -4
  392. package/lib/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
  393. package/lib/bottom-navigation-item/bottomNavigationItem.less +0 -78
  394. package/lib/bottom-navigation-item/style/less.js +0 -6
  395. package/lib/button/ButtonSfc.less +0 -0
  396. package/lib/button/button.less +0 -183
  397. package/lib/button/style/less.js +0 -6
  398. package/lib/card/CardSfc.less +0 -0
  399. package/lib/card/card.less +0 -189
  400. package/lib/card/style/less.js +0 -5
  401. package/lib/cell/CellSfc.less +0 -0
  402. package/lib/cell/cell.less +0 -78
  403. package/lib/cell/style/less.js +0 -4
  404. package/lib/checkbox/CheckboxSfc.less +0 -0
  405. package/lib/checkbox/checkbox.less +0 -78
  406. package/lib/checkbox/style/less.js +0 -6
  407. package/lib/checkbox-group/CheckboxGroupSfc.less +0 -0
  408. package/lib/checkbox-group/checkboxGroup.less +0 -12
  409. package/lib/checkbox-group/style/less.js +0 -4
  410. package/lib/chip/ChipSfc.less +0 -0
  411. package/lib/chip/chip.less +0 -182
  412. package/lib/chip/style/less.js +0 -4
  413. package/lib/col/ColSfc.less +0 -0
  414. package/lib/col/col.less +0 -74
  415. package/lib/col/style/less.js +0 -3
  416. package/lib/collapse/CollapseSfc.less +0 -1
  417. package/lib/collapse/style/less.js +0 -3
  418. package/lib/collapse-item/CollapseItemSfc.less +0 -0
  419. package/lib/collapse-item/collapseItem.less +0 -105
  420. package/lib/collapse-item/style/less.js +0 -4
  421. package/lib/context/style/less.js +0 -0
  422. package/lib/countdown/CountdownSfc.less +0 -0
  423. package/lib/countdown/style/less.js +0 -2
  424. package/lib/counter/CounterSfc.less +0 -0
  425. package/lib/counter/counter.less +0 -89
  426. package/lib/counter/style/less.js +0 -7
  427. package/lib/date-picker/DatePickerSfc.less +0 -0
  428. package/lib/date-picker/date-picker.less +0 -354
  429. package/lib/date-picker/style/less.js +0 -7
  430. package/lib/dialog/DialogSfc.less +0 -0
  431. package/lib/dialog/dialog.less +0 -77
  432. package/lib/dialog/style/less.js +0 -5
  433. package/lib/divider/DividerSfc.less +0 -0
  434. package/lib/divider/divider.less +0 -78
  435. package/lib/divider/style/less.js +0 -3
  436. package/lib/form/FormSfc.less +0 -0
  437. package/lib/form/style/less.js +0 -2
  438. package/lib/form-details/FormDetailsSfc.less +0 -0
  439. package/lib/form-details/formDetails.less +0 -48
  440. package/lib/form-details/style/less.js +0 -3
  441. package/lib/icon/IconSfc.less +0 -0
  442. package/lib/icon/icon.less +0 -26
  443. package/lib/icon/style/less.js +0 -3
  444. package/lib/image/ImageSfc.less +0 -0
  445. package/lib/image/image.less +0 -9
  446. package/lib/image/style/less.js +0 -4
  447. package/lib/image-preview/ImagePreviewSfc.less +0 -0
  448. package/lib/image-preview/imagePreview.less +0 -76
  449. package/lib/image-preview/style/less.js +0 -7
  450. package/lib/index-anchor/IndexAnchorSfc.less +0 -1
  451. package/lib/index-anchor/style/less.js +0 -3
  452. package/lib/index-bar/IndexBarSfc.less +0 -0
  453. package/lib/index-bar/indexBar.less +0 -43
  454. package/lib/index-bar/style/less.js +0 -3
  455. package/lib/input/InputSfc.less +0 -0
  456. package/lib/input/input.less +0 -187
  457. package/lib/input/style/less.js +0 -5
  458. package/lib/lazy/style/less.js +0 -0
  459. package/lib/less.js +0 -64
  460. package/lib/list/ListSfc.less +0 -0
  461. package/lib/list/list.less +0 -63
  462. package/lib/list/style/less.js +0 -5
  463. package/lib/loading/LoadingSfc.less +0 -0
  464. package/lib/loading/loading.less +0 -500
  465. package/lib/loading/style/less.js +0 -3
  466. package/lib/locale/style/less.js +0 -0
  467. package/lib/menu/menu.less +0 -21
  468. package/lib/menu/style/less.js +0 -3
  469. package/lib/option/OptionSfc.less +0 -0
  470. package/lib/option/option.less +0 -37
  471. package/lib/option/style/less.js +0 -6
  472. package/lib/pagination/PaginationSfc.less +0 -0
  473. package/lib/pagination/pagination.less +0 -188
  474. package/lib/pagination/style/less.js +0 -8
  475. package/lib/picker/PickerSfc.less +0 -0
  476. package/lib/picker/picker.less +0 -106
  477. package/lib/picker/style/less.js +0 -5
  478. package/lib/popup/popup.less +0 -125
  479. package/lib/popup/style/less.js +0 -2
  480. package/lib/progress/ProgressSfc.less +0 -0
  481. package/lib/progress/progress.less +0 -101
  482. package/lib/progress/style/less.js +0 -3
  483. package/lib/pull-refresh/PullRefreshSfc.less +0 -0
  484. package/lib/pull-refresh/pullRefresh.less +0 -56
  485. package/lib/pull-refresh/style/less.js +0 -5
  486. package/lib/radio/RadioSfc.less +0 -0
  487. package/lib/radio/radio.less +0 -78
  488. package/lib/radio/style/less.js +0 -6
  489. package/lib/radio-group/RadioGroupSfc.less +0 -0
  490. package/lib/radio-group/radioGroup.less +0 -12
  491. package/lib/radio-group/style/less.js +0 -4
  492. package/lib/rate/RateSfc.less +0 -0
  493. package/lib/rate/rate.less +0 -48
  494. package/lib/rate/style/less.js +0 -6
  495. package/lib/ripple/ripple.less +0 -20
  496. package/lib/ripple/style/less.js +0 -2
  497. package/lib/row/RowSfc.less +0 -0
  498. package/lib/row/row.less +0 -4
  499. package/lib/row/style/less.js +0 -3
  500. package/lib/select/SelectSfc.less +0 -0
  501. package/lib/select/select.less +0 -184
  502. package/lib/select/style/less.js +0 -7
  503. package/lib/skeleton/SkeletonSfc.less +0 -0
  504. package/lib/skeleton/skeleton.less +0 -138
  505. package/lib/skeleton/style/less.js +0 -3
  506. package/lib/slider/SliderSfc.less +0 -0
  507. package/lib/slider/slider.less +0 -147
  508. package/lib/slider/style/less.js +0 -4
  509. package/lib/snackbar/SnackbarSfc.less +0 -0
  510. package/lib/snackbar/coreSfc.less +0 -0
  511. package/lib/snackbar/snackbar.less +0 -129
  512. package/lib/snackbar/style/less.js +0 -8
  513. package/lib/space/space.less +0 -6
  514. package/lib/space/style/less.js +0 -2
  515. package/lib/step/StepSfc.less +0 -0
  516. package/lib/step/step.less +0 -145
  517. package/lib/step/style/less.js +0 -4
  518. package/lib/steps/StepsSfc.less +0 -1
  519. package/lib/steps/style/less.js +0 -2
  520. package/lib/sticky/StickySfc.less +0 -0
  521. package/lib/sticky/sticky.less +0 -8
  522. package/lib/sticky/style/less.js +0 -3
  523. package/lib/style-provider/StyleProviderSfc.less +0 -0
  524. package/lib/style-provider/style/less.js +0 -2
  525. package/lib/styles/common.less +0 -73
  526. package/lib/styles/elevation.less +0 -128
  527. package/lib/styles/style/less.js +0 -0
  528. package/lib/styles/var.css +0 -0
  529. package/lib/styles/var.less +0 -30
  530. package/lib/swipe/SwipeSfc.less +0 -0
  531. package/lib/swipe/style/less.js +0 -3
  532. package/lib/swipe/swipe.less +0 -60
  533. package/lib/swipe-item/SwipeItemSfc.less +0 -0
  534. package/lib/swipe-item/style/less.js +0 -3
  535. package/lib/swipe-item/swipeItem.less +0 -5
  536. package/lib/switch/SwitchSfc.less +0 -0
  537. package/lib/switch/style/less.js +0 -7
  538. package/lib/switch/switch.less +0 -94
  539. package/lib/tab/TabSfc.less +0 -0
  540. package/lib/tab/style/less.js +0 -4
  541. package/lib/tab/tab.less +0 -46
  542. package/lib/tab-item/TabItemSfc.less +0 -0
  543. package/lib/tab-item/style/less.js +0 -4
  544. package/lib/tab-item/tabItem.less +0 -6
  545. package/lib/table/TableSfc.less +0 -0
  546. package/lib/table/style/less.js +0 -4
  547. package/lib/table/table.less +0 -110
  548. package/lib/tabs/TabsSfc.less +0 -0
  549. package/lib/tabs/style/less.js +0 -5
  550. package/lib/tabs/tabs.less +0 -99
  551. package/lib/tabs-items/TabsItemsSfc.less +0 -0
  552. package/lib/tabs-items/style/less.js +0 -3
  553. package/lib/themes/style/less.js +0 -0
  554. package/lib/time-picker/TimePickerSfc.less +0 -0
  555. package/lib/time-picker/style/less.js +0 -4
  556. package/lib/time-picker/timePicker.less +0 -237
  557. package/lib/uploader/UploaderSfc.less +0 -0
  558. package/lib/uploader/style/less.js +0 -8
  559. package/lib/uploader/uploader.less +0 -216
  560. package/lib/utils/style/less.js +0 -0
  561. package/types/global.d.ts +0 -68
package/lib/style.js CHANGED
@@ -60,5 +60,6 @@ require('./tab-item/style')
60
60
  require('./table/style')
61
61
  require('./tabs/style')
62
62
  require('./tabs-items/style')
63
+ require('./themes/style')
63
64
  require('./time-picker/style')
64
65
  require('./uploader/style')
@@ -55,7 +55,8 @@ function render(_ctx, _cache) {
55
55
  class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('handle'), 'var-elevation--2', [_ctx.modelValue === _ctx.activeValue, _ctx.n('handle--active')], [_ctx.errorMessage, _ctx.n('handle--error')]))
56
56
  }, [_ctx.loading ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_loading, {
57
57
  key: 0,
58
- radius: _ctx.radius
58
+ radius: _ctx.radius,
59
+ color: "currentColor"
59
60
  }, null, 8
60
61
  /* PROPS */
61
62
  , ["radius"])) : (0, _vue.createCommentVNode)("v-if", true)], 6
@@ -116,12 +117,12 @@ var _default = (0, _vue.defineComponent)({
116
117
  handle: {
117
118
  width: (0, _elements.multiplySizeUnit)(size),
118
119
  height: (0, _elements.multiplySizeUnit)(size),
119
- backgroundColor: modelValue === activeValue ? color || '' : closeColor || '',
120
- color: loadingColor && loadingColor
120
+ backgroundColor: modelValue === activeValue ? color : closeColor,
121
+ color: loadingColor
121
122
  },
122
123
  ripple: {
123
124
  left: modelValue === activeValue ? (0, _elements.multiplySizeUnit)(size, 0.5) : "-" + (0, _elements.multiplySizeUnit)(size, 0.5),
124
- color: modelValue === activeValue ? color || '' : closeColor || '#999',
125
+ color: modelValue === activeValue ? color : closeColor || '#999',
125
126
  width: (0, _elements.multiplySizeUnit)(size, 2),
126
127
  height: (0, _elements.multiplySizeUnit)(size, 2)
127
128
  },
@@ -130,7 +131,7 @@ var _default = (0, _vue.defineComponent)({
130
131
  width: (0, _elements.multiplySizeUnit)(size, 1.9),
131
132
  borderRadius: (0, _elements.multiplySizeUnit)(size, 2 / 3),
132
133
  filter: modelValue === activeValue || errorMessage != null && errorMessage.value ? 'opacity(.6)' : 'brightness(.6)',
133
- backgroundColor: modelValue === activeValue ? color || '' : closeColor || ''
134
+ backgroundColor: modelValue === activeValue ? color : closeColor
134
135
  },
135
136
  switch: {
136
137
  height: (0, _elements.multiplySizeUnit)(size, 1.2),
package/lib/tabs/tabs.css CHANGED
@@ -1 +1 @@
1
- :root { --tabs-item-horizontal-height: 44px; --tabs-item-vertical-height: 66px; --tabs-radius: 2px; --tabs-padding: 12px; --tabs-indicator-size: 2px; --tabs-indicator-background: var(--color-primary); --tabs-background: #fff;}.var-tabs { border-radius: var(--tabs-radius); background: var(--tabs-background); overflow: hidden; transition: background-color 0.25s;}.var-tabs__tab-wrap { position: relative; display: flex; height: 100%;}.var-tabs__indicator { position: absolute; z-index: 10; transition-property: width, transform; transition-duration: 0.3s;}.var-tabs--layout-horizontal { flex-direction: row;}.var-tabs--layout-horizontal-scrollable { overflow-x: auto; overflow-y: hidden;}.var-tabs--layout-horizontal-padding { padding: 0 var(--tabs-padding);}.var-tabs--layout-horizontal-indicator { left: 0; bottom: 0; height: var(--tabs-indicator-size); background: var(--tabs-indicator-background);}.var-tabs--layout-vertical { flex-direction: column;}.var-tabs--layout-vertical-scrollable { overflow-x: hidden; overflow-y: auto;}.var-tabs--layout-vertical-padding { padding: 0;}.var-tabs--layout-vertical-indicator { left: 0; top: 0; width: var(--tabs-indicator-size); background: var(--tabs-indicator-background);}.var-tabs--item-horizontal { height: var(--tabs-item-horizontal-height);}.var-tabs--item-vertical { height: var(--tabs-item-vertical-height);}.var-tabs--fixed-bottom { position: fixed; width: 100%; left: 0; bottom: 0; z-index: 99;}.var-tabs--safe-area { padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); box-sizing: content-box !important;}
1
+ :root { --tabs-item-horizontal-height: 44px; --tabs-item-vertical-height: 66px; --tabs-radius: 2px; --tabs-padding: 12px; --tabs-indicator-size: 2px; --tabs-indicator-background: var(--color-primary); --tabs-background: #fff;}.var-tabs { border-radius: var(--tabs-radius); background: var(--tabs-background); overflow: hidden; transition: background-color 0.25s;}.var-tabs__tab-wrap { position: relative; display: flex; height: 100%;}.var-tabs__indicator { position: absolute; z-index: 10; transition-property: width, transform; transition-duration: 0.3s;}.var-tabs--layout-horizontal { flex-direction: row;}.var-tabs--layout-horizontal-scrollable { overflow-x: auto; overflow-y: hidden;}.var-tabs--layout-horizontal-scrollable::-webkit-scrollbar { display: none;}.var-tabs--layout-horizontal-padding { padding: 0 var(--tabs-padding);}.var-tabs--layout-horizontal-indicator { left: 0; bottom: 0; height: var(--tabs-indicator-size); background: var(--tabs-indicator-background);}.var-tabs--layout-vertical { flex-direction: column;}.var-tabs--layout-vertical-scrollable { overflow-x: hidden; overflow-y: auto;}.var-tabs--layout-vertical-scrollable::-webkit-scrollbar { display: none;}.var-tabs--layout-vertical-padding { padding: 0;}.var-tabs--layout-vertical-indicator { left: 0; top: 0; width: var(--tabs-indicator-size); background: var(--tabs-indicator-background);}.var-tabs--item-horizontal { height: var(--tabs-item-horizontal-height);}.var-tabs--item-vertical { height: var(--tabs-item-vertical-height);}.var-tabs--fixed-bottom { position: fixed; width: 100%; left: 0; bottom: 0; z-index: 99;}.var-tabs--safe-area { padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); box-sizing: content-box !important;}
@@ -10,10 +10,10 @@ var _vue = require("vue");
10
10
 
11
11
  var _provide = require("./provide");
12
12
 
13
- var _props = require("./props");
14
-
15
13
  var _components = require("../utils/components");
16
14
 
15
+ var _props = require("./props");
16
+
17
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
18
 
19
19
  var {
@@ -108,6 +108,11 @@ var _default = (0, _vue.defineComponent)({
108
108
  });
109
109
  var active = (_tabItem$name$value = tabItem.name.value) != null ? _tabItem$name$value : tabItem.index.value;
110
110
  (0, _components.call)(props['onUpdate:active'], active);
111
+ }; // expose
112
+
113
+
114
+ var getSwipe = () => {
115
+ return swipe.value;
111
116
  };
112
117
 
113
118
  var tabsItemsProvider = {};
@@ -117,7 +122,8 @@ var _default = (0, _vue.defineComponent)({
117
122
  return {
118
123
  swipe,
119
124
  n,
120
- handleSwipeChange
125
+ handleSwipeChange,
126
+ getSwipe
121
127
  };
122
128
  }
123
129
 
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = void 0;
5
5
  var _default = {
6
- '--cell-desc-color': '#aaa',
6
+ '--cell-description-color': '#aaa',
7
7
  '--cell-border-color': '#545454'
8
8
  };
9
9
  exports.default = _default;
@@ -61,9 +61,11 @@ var _bottomNavigation = _interopRequireDefault(require("./bottomNavigation"));
61
61
 
62
62
  var _bottomNavigationItem = _interopRequireDefault(require("./bottomNavigationItem"));
63
63
 
64
+ var _menu = _interopRequireDefault(require("./menu"));
65
+
64
66
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
65
67
 
66
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
68
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
67
69
 
68
70
  var _default = _extends({
69
71
  // common
@@ -76,6 +78,6 @@ var _default = _extends({
76
78
  '--color-danger': '#ef5350',
77
79
  '--color-disabled': '#404040',
78
80
  '--color-text-disabled': '#757575'
79
- }, _button.default, _cell.default, _card.default, _timePicker.default, _datePicker.default, _skeleton.default, _tabs.default, _tab.default, _popup.default, _dialog.default, _actionSheet.default, _chip.default, _badge.default, _uploader.default, _collapse.default, _pullRefresh.default, _switch.default, _steps.default, _pagination.default, _table.default, _input.default, _select.default, _radio.default, _checkbox.default, _divider.default, _picker.default, _appBar.default, _bottomNavigation.default, _bottomNavigationItem.default);
81
+ }, _button.default, _cell.default, _card.default, _timePicker.default, _datePicker.default, _skeleton.default, _tabs.default, _tab.default, _popup.default, _dialog.default, _actionSheet.default, _chip.default, _badge.default, _uploader.default, _collapse.default, _pullRefresh.default, _switch.default, _steps.default, _pagination.default, _table.default, _input.default, _select.default, _radio.default, _checkbox.default, _divider.default, _picker.default, _appBar.default, _bottomNavigation.default, _bottomNavigationItem.default, _menu.default);
80
82
 
81
83
  exports.default = _default;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+ var _default = {
6
+ '--menu-background-color': '#272727'
7
+ };
8
+ exports.default = _default;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _dark = _interopRequireDefault(require("./dark"));
7
+
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+
10
+ var _default = {
11
+ dark: _dark.default
12
+ };
13
+ exports.default = _default;
@@ -39,7 +39,7 @@ function render(_ctx, _cache) {
39
39
  var _component_clock = (0, _vue.resolveComponent)("clock");
40
40
 
41
41
  return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
42
- class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.shadow, 'var-elevation--2'])),
42
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.elevation, 'var-elevation--2'])),
43
43
  ref: "picker"
44
44
  }, [(0, _vue.createElementVNode)("div", {
45
45
  class: (0, _vue.normalizeClass)(_ctx.n('title')),
@@ -17,7 +17,7 @@ var props = {
17
17
  modelValue: {
18
18
  type: String
19
19
  },
20
- shadow: {
20
+ elevation: {
21
21
  type: Boolean,
22
22
  default: false
23
23
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.addRouteListener = addRouteListener;
5
4
  exports.call = call;
6
5
  exports.createNamespace = createNamespace;
7
6
  exports.exposeApis = exposeApis;
@@ -14,6 +13,7 @@ exports.useAtChildrenCounter = useAtChildrenCounter;
14
13
  exports.useAtParentIndex = useAtParentIndex;
15
14
  exports.useChildren = useChildren;
16
15
  exports.useParent = useParent;
16
+ exports.useRouteListener = useRouteListener;
17
17
  exports.useTeleport = useTeleport;
18
18
  exports.useValidation = useValidation;
19
19
 
@@ -29,7 +29,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
29
29
 
30
30
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
31
31
 
32
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
32
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
33
33
 
34
34
  function pickProps(props, propsKey) {
35
35
  return Array.isArray(propsKey) ? propsKey.reduce((pickedProps, key) => {
@@ -262,7 +262,7 @@ function useValidation() {
262
262
  };
263
263
  }
264
264
 
265
- function addRouteListener(cb) {
265
+ function useRouteListener(cb) {
266
266
  (0, _vue.onMounted)(() => {
267
267
  window.addEventListener('hashchange', cb);
268
268
  window.addEventListener('popstate', cb);
package/lib/utils/jest.js CHANGED
@@ -7,7 +7,6 @@ exports.mockConsole = mockConsole;
7
7
  exports.mockDoubleRaf = mockDoubleRaf;
8
8
  exports.mockFileReader = mockFileReader;
9
9
  exports.mockImageNaturalSize = mockImageNaturalSize;
10
- exports.mockIndexBarOwnTop = mockIndexBarOwnTop;
11
10
  exports.mockOffset = mockOffset;
12
11
  exports.mockScrollTo = mockScrollTo;
13
12
  exports.mockStubs = mockStubs;
@@ -282,24 +281,4 @@ function mockScrollTo(Element) {
282
281
  this.scrollTop = y;
283
282
  }
284
283
  };
285
- }
286
-
287
- function mockIndexBarOwnTop() {
288
- var originForEach = Array.prototype.forEach; // eslint-disable-next-line no-extend-native
289
-
290
- Array.prototype.forEach = function (fn, thisArg) {
291
- var changedArr = this.map((value, index) => {
292
- if (value.ownTop && !value.ownTop.value) value.ownTop.value = (index + 1) * 50;
293
- return value;
294
- });
295
- originForEach.call(changedArr, fn, thisArg);
296
- };
297
-
298
- return {
299
- mockRestore() {
300
- // eslint-disable-next-line no-extend-native
301
- Array.prototype.forEach = originForEach;
302
- }
303
-
304
- };
305
284
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "1.27.20",
3
+ "version": "2.0.0-alpha.1663742071515",
4
4
  "description": "A material like components library",
5
5
  "module": "es/index.js",
6
6
  "main": "lib/index.js",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "author": "haoziqaq <357229046@qq.com>",
28
28
  "license": "MIT",
29
- "homepage": "https://varlet-varletjs.vercel.app/",
29
+ "homepage": "https://varlet.gitee.io/varlet-ui/",
30
30
  "repository": {
31
31
  "type": "git",
32
32
  "url": "git+https://github.com/varletjs/varlet.git"
@@ -48,17 +48,20 @@
48
48
  "vue": "^3.2.0"
49
49
  },
50
50
  "dependencies": {
51
- "@varlet/icons": "1.27.20",
52
- "@varlet/shared": "1.27.20",
51
+ "@popperjs/core": "^2.11.6",
52
+ "@varlet/icons": "2.0.0-alpha.1663742071515",
53
+ "@varlet/shared": "2.0.0-alpha.1663742071515",
53
54
  "dayjs": "^1.10.4",
54
55
  "decimal.js": "^10.2.1"
55
56
  },
56
57
  "devDependencies": {
57
- "@varlet/cli": "1.27.20",
58
- "@varlet/touch-emulator": "1.27.20",
58
+ "@varlet/cli": "2.0.0-alpha.1663742071515",
59
+ "@varlet/touch-emulator": "2.0.0-alpha.1663742071515",
59
60
  "@vue/runtime-core": "3.2.25",
60
- "@vue/test-utils": "2.0.0-rc.6",
61
+ "@vue/test-utils": "^2.0.2",
62
+ "@types/jest": "^26.0.15",
61
63
  "clipboard": "^2.0.6",
64
+ "jsdom": "^20.0.0",
62
65
  "live-server": "^1.2.1",
63
66
  "lodash-es": "^4.17.21",
64
67
  "postcss-px-to-viewport": "^1.1.1",
@@ -1,6 +1,5 @@
1
1
  import type { App, TeleportProps } from 'vue'
2
- import { VarComponent } from './varComponent'
3
- import type { BasicAttributes } from './varComponent'
2
+ import { VarComponent, BasicAttributes } from './varComponent'
4
3
 
5
4
  export interface ActionSheetProps extends BasicAttributes {
6
5
  actions?: ActionItem[]
package/types/appBar.d.ts CHANGED
@@ -1,11 +1,12 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
2
+
3
+ export type AppBarTitlePosition = 'left' | 'center' | 'right'
3
4
 
4
5
  export interface AppBarProps extends BasicAttributes {
5
6
  color?: string
6
7
  textColor?: string
7
8
  title?: string
8
- titlePosition?: 'left' | 'center' | 'right'
9
+ titlePosition?: AppBarTitlePosition
9
10
  elevation?: boolean
10
11
  }
11
12
 
@@ -1,5 +1,4 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
3
2
 
4
3
  export interface BackTopProps extends BasicAttributes {
5
4
  visibilityHeight?: number | string
package/types/badge.d.ts CHANGED
@@ -1,14 +1,15 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes, Type as BadgeType } from './varComponent'
2
+
3
+ export type BadgePosition = 'right-top' | 'right-bottom' | 'left-top' | 'left-bottom'
3
4
 
4
5
  export interface BadgeProps extends BasicAttributes {
5
- type?: 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger'
6
+ type?: BadgeType
6
7
  hidden?: boolean
7
8
  dot?: boolean
8
9
  value?: string | number
9
10
  maxValue?: string | number
10
11
  color?: string
11
- position?: 'right-top' | 'right-bottom' | 'left-top' | 'left-bottom'
12
+ position?: BadgePosition
12
13
  icon?: string
13
14
  }
14
15
 
@@ -1,5 +1,4 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
3
2
  import { ButtonProps } from './button'
4
3
 
5
4
  export interface BottomNavigationProps extends BasicAttributes {
@@ -1,5 +1,4 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
3
2
  import { BadgeProps } from './badge'
4
3
 
5
4
  export interface BottomNavigationItemProps extends BasicAttributes {
package/types/button.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes, Type as ButtonType, Size as ButtonSize } from './varComponent'
2
+ import { LoadingType, LoadingSize } from './loading'
3
3
 
4
4
  export interface ButtonProps extends BasicAttributes {
5
- type?: 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger'
6
- size?: 'normal' | 'mini' | 'small' | 'large'
5
+ type?: ButtonType
6
+ size?: ButtonSize
7
7
  loading?: boolean
8
8
  round?: boolean
9
9
  block?: boolean
@@ -15,8 +15,9 @@ export interface ButtonProps extends BasicAttributes {
15
15
  color?: string
16
16
  textColor?: string
17
17
  loadingRadius?: string | number
18
- loadingType?: 'circle' | 'wave' | 'cube' | 'rect' | 'disappear'
19
- loadingSize?: 'normal' | 'mini' | 'small' | 'large'
18
+ loadingType?: LoadingType
19
+ loadingSize?: LoadingSize
20
+ loadingColor?: string
20
21
  onClick?: (e: Event) => void
21
22
  onTouchstart?: (e: Event) => void
22
23
  }
package/types/card.d.ts CHANGED
@@ -1,13 +1,12 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
2
+
3
+ export type CardFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'
4
+
5
+ export type CardLayout = 'row' | 'column'
3
6
 
4
7
  export interface CardProps extends BasicAttributes {
5
8
  src?: string
6
- fit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'
7
- /**
8
- * @deprecated use imageHeight instead
9
- */
10
- height?: string | number
9
+ fit?: CardFit
11
10
  imageHeight?: string | number
12
11
  imageWidth?: string | number
13
12
  alt?: string
@@ -17,7 +16,7 @@ export interface CardProps extends BasicAttributes {
17
16
  elevation?: string | number
18
17
  ripple?: boolean
19
18
  onClick?: (e: Event) => void
20
- layout?: 'row' | 'column'
19
+ layout?: CardLayout
21
20
  floating?: boolean
22
21
  floatingDuration?: number
23
22
  'onUpdate:floating'?: (value: boolean) => void
package/types/cell.d.ts CHANGED
@@ -1,14 +1,13 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
3
2
 
4
3
  export interface CellProps extends BasicAttributes {
5
4
  title?: string | number
6
5
  icon?: string
7
- desc?: string
6
+ description?: string
8
7
  border?: boolean
9
8
  iconClass?: string
10
9
  titleClass?: string
11
- descClass?: string
10
+ descriptionClass?: string
12
11
  extraClass?: string
13
12
  }
14
13
 
@@ -1,5 +1,4 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
3
2
 
4
3
  export type CheckboxValidateTriggers = 'onChange'
5
4
 
@@ -1,13 +1,12 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes, Direction as CheckboxGroupDirection } from './varComponent'
3
2
 
4
- export type CheckboxGroupValidateTriggers = 'onChange'
3
+ export type CheckboxGroupValidateTrigger = 'onChange'
5
4
 
6
5
  export interface CheckboxGroupProps extends BasicAttributes {
7
6
  modelValue?: any[]
8
7
  max?: string | number
9
- direction?: 'horizontal' | 'vertical'
10
- validateTrigger?: Array<CheckboxGroupValidateTriggers>
8
+ direction?: CheckboxGroupDirection
9
+ validateTrigger?: Array<CheckboxGroupValidateTrigger>
11
10
  rules?: Array<(value: any) => any>
12
11
  onChange?: (value: Array<any>) => void
13
12
  'onUpdate:modelValue'?: (value: Array<any>) => void
package/types/chip.d.ts CHANGED
@@ -1,9 +1,8 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes, Type as ChipType, Size as ChipSize } from './varComponent'
3
2
 
4
3
  export interface ChipProps extends BasicAttributes {
5
- type?: 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger'
6
- size?: 'normal' | 'mini' | 'small' | 'large'
4
+ type?: ChipType
5
+ size?: ChipSize
7
6
  color?: string
8
7
  textColor?: string
9
8
  iconName?: string
package/types/col.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
3
2
 
4
3
  export type SizeDescriptor = {
5
4
  span?: number | string
@@ -1,5 +1,4 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
3
2
 
4
3
  export type CollapseModelValue = null | string | number | Array<string | number>
5
4
 
@@ -1,5 +1,4 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
3
2
 
4
3
  export interface CollapseItemProps extends BasicAttributes {
5
4
  name?: string | number
@@ -1,5 +1,4 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
3
2
 
4
3
  export type TimeData = {
5
4
  days: number
@@ -1,7 +1,6 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
3
2
 
4
- export type CounterValidateTriggers = 'onIncrement' | 'onDecrement' | 'onInputChange' | 'onLazyChange'
3
+ export type CounterValidateTrigger = 'onIncrement' | 'onDecrement' | 'onInputChange' | 'onLazyChange'
5
4
 
6
5
  export interface CounterProps extends BasicAttributes {
7
6
  modelValue?: string | number
@@ -23,7 +22,7 @@ export interface CounterProps extends BasicAttributes {
23
22
  decrementButton?: boolean
24
23
  press?: boolean
25
24
  ripple?: boolean
26
- validateTrigger?: Array<CounterValidateTriggers>
25
+ validateTrigger?: Array<CounterValidateTrigger>
27
26
  rules?: Array<(v: number) => any>
28
27
  onBeforeChange?: (value: number, change: (value: string | number) => void) => void
29
28
  onChange?: (value: number) => void
@@ -1,13 +1,14 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
2
+
3
+ export type DatePickerType = 'date' | 'month'
3
4
 
4
5
  export interface DatePickerProps extends BasicAttributes {
5
6
  modelValue: string | Array<string>
6
- type?: 'date' | 'month'
7
+ type?: DatePickerType
7
8
  allowedDates?: (val: string) => boolean
8
9
  color?: string
9
10
  headerColor?: string
10
- shadow?: boolean
11
+ elevation?: boolean
11
12
  firstDayOfWeek?: string | number
12
13
  min?: string
13
14
  max?: string
package/types/dialog.d.ts CHANGED
@@ -1,12 +1,13 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
3
2
  import type { App, TeleportProps } from 'vue'
4
3
 
4
+ export type DialogTypeMessageAlign = 'left' | 'center' | 'right'
5
+
5
6
  export interface DialogProps extends BasicAttributes {
6
7
  show?: boolean
7
8
  title?: string
8
9
  message?: string
9
- messageAlign?: 'left' | 'center' | 'right'
10
+ messageAlign?: DialogTypeMessageAlign
10
11
  confirmButton?: boolean
11
12
  cancelButton?: boolean
12
13
  confirmButtonText?: string
@@ -1,5 +1,4 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
3
2
 
4
3
  export interface DividerProps extends BasicAttributes {
5
4
  inset?: boolean | number
package/types/form.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
3
2
 
4
3
  export interface FormProps extends BasicAttributes {
5
4
  disabled?: boolean
package/types/icon.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
3
2
 
4
3
  export interface IconProps extends BasicAttributes {
5
4
  name?: string
package/types/image.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
2
+
3
+ type ImageFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'
3
4
 
4
5
  export interface ImageProps extends BasicAttributes {
5
6
  src?: string
6
- fit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'
7
+ fit?: ImageFit
7
8
  alt?: string
8
9
  width?: string | number
9
10
  height?: string | number
@@ -1,6 +1,5 @@
1
- import { VarComponent } from './varComponent'
2
- import type { BasicAttributes } from './varComponent'
3
- import type { App, TeleportProps } from 'vue'
1
+ import { VarComponent, BasicAttributes } from './varComponent'
2
+ import { App, TeleportProps } from 'vue'
4
3
 
5
4
  export interface ImagePreviewProps extends BasicAttributes {
6
5
  show?: boolean