@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
@@ -26,7 +26,7 @@ var _locale = require("../../locale");
26
26
 
27
27
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
28
28
 
29
- 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); }
29
+ 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); }
30
30
 
31
31
  _dayjs.default.extend(_isSameOrBefore.default);
32
32
 
@@ -7,7 +7,7 @@ var _components = require("../utils/components");
7
7
 
8
8
  var _props = require("../popup/props");
9
9
 
10
- 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); }
10
+ 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); }
11
11
 
12
12
  function messageAlignValidator(messageAlign) {
13
13
  return ['left', 'center', 'right'].includes(messageAlign);
@@ -14,7 +14,7 @@ var _props = require("./props");
14
14
 
15
15
  var _components = require("../utils/components");
16
16
 
17
- 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); }
17
+ 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); }
18
18
 
19
19
  var {
20
20
  n,
@@ -9,7 +9,7 @@ var _props = require("../swipe/props");
9
9
 
10
10
  var _props2 = require("../popup/props");
11
11
 
12
- 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); }
12
+ 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); }
13
13
 
14
14
  var props = _extends({
15
15
  show: {
package/lib/index.js CHANGED
@@ -60,6 +60,7 @@ var TabItem = require('./tab-item')['default']
60
60
  var Table = require('./table')['default']
61
61
  var Tabs = require('./tabs')['default']
62
62
  var TabsItems = require('./tabs-items')['default']
63
+ var Themes = require('./themes')['default']
63
64
  var TimePicker = require('./time-picker')['default']
64
65
  var Uploader = require('./uploader')['default']
65
66
 
@@ -127,6 +128,7 @@ function install(app) {
127
128
  Table.install && app.use(Table)
128
129
  Tabs.install && app.use(Tabs)
129
130
  TabsItems.install && app.use(TabsItems)
131
+ Themes.install && app.use(Themes)
130
132
  TimePicker.install && app.use(TimePicker)
131
133
  Uploader.install && app.use(Uploader)
132
134
  }
@@ -196,6 +198,7 @@ module.exports = {
196
198
  Table,
197
199
  Tabs,
198
200
  TabsItems,
201
+ Themes,
199
202
  TimePicker,
200
203
  Uploader
201
204
  }
package/lib/lazy/index.js CHANGED
@@ -15,7 +15,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
15
15
 
16
16
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
17
17
 
18
- 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); }
18
+ 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); }
19
19
 
20
20
  var BACKGROUND_IMAGE_ARG_NAME = 'background-image';
21
21
  var LAZY_LOADING = 'lazy-loading';
@@ -1 +1 @@
1
- :root { --loading-opacity: 0.38; --loading-desc-margin: 8px 0 0;}.var-loading { position: relative;}.var-loading__content { position: relative; transition: opacity 0.3s; opacity: 1;}.var-loading__content--active { opacity: var(--loading-opacity);}.var-loading__content-mask { position: absolute; left: 0; right: 0; top: 0; bottom: 0;}.var-loading__body { display: flex; justify-content: center; align-items: center; height: 100%; flex-direction: column;}.var-loading__inside { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1;}.var-loading__description { color: currentColor; margin: var(--loading-desc-margin);}.var-loading__description--large { font-size: 16px;}.var-loading__description--normal { font-size: 14px;}.var-loading__description--small { font-size: 12px;}.var-loading__description--mini { font-size: 10px;}.var-loading__circle { display: flex;}.var-loading__circle-block { display: inline-block; animation: circle 1.8s linear infinite;}.var-loading__circle-block--large { width: 36px; height: 36px;}.var-loading__circle-block--normal { width: 30px; height: 30px;}.var-loading__circle-block--small { width: 24px; height: 24px;}.var-loading__circle-block--mini { width: 18px; height: 18px;}.var-loading__circle-block svg { display: block; width: 100%; height: 100%;}.var-loading__circle-block svg circle { animation: circular 1.5s ease-in-out infinite; stroke: currentColor; stroke-width: 3; stroke-linecap: round;}@keyframes circle { from { transform: rotate(0deg); } to { transform: rotate(360deg); }}@keyframes circular { 0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; } 50% { stroke-dasharray: 90, 150; stroke-dashoffset: -40; } 100% { stroke-dasharray: 90, 150; stroke-dashoffset: -120; }}.var-loading__wave { display: flex; align-items: center; justify-content: center;}.var-loading__wave--large { width: 64px; height: 18px;}.var-loading__wave--normal { width: 50px; height: 16px;}.var-loading__wave--small { width: 36px; height: 14px;}.var-loading__wave--mini { width: 22px; height: 12px;}.var-loading__wave-item { height: 100%; display: inline-block; animation: 1.2s ease-in-out infinite wave;}.var-loading__wave-item:nth-child(1) { animation-delay: -1.2s; margin-left: 0;}.var-loading__wave-item:nth-child(2) { animation-delay: -1.1s;}.var-loading__wave-item:nth-child(3) { animation-delay: -1s;}.var-loading__wave-item:nth-child(4) { animation-delay: -0.9s;}.var-loading__wave-item:nth-child(5) { animation-delay: -0.8s;}.var-loading__wave-item--large { width: 5px; margin-left: 5px;}.var-loading__wave-item--normal { width: 4px; margin-left: 4px;}.var-loading__wave-item--small { width: 3px; margin-left: 3px;}.var-loading__wave-item--mini { width: 2px; margin-left: 2px;}@keyframes wave { 0%, 40%, 100% { transform: scaleY(0.4); } 20% { transform: scaleY(1); }}.var-loading__cube { display: flex; align-items: center;}.var-loading__cube--large { width: 64px; height: 18px;}.var-loading__cube--normal { width: 50px; height: 16px;}.var-loading__cube--small { width: 36px; height: 14px;}.var-loading__cube--mini { width: 22px; height: 12px;}.var-loading__cube-item { display: inline-block; transform-origin: right bottom; animation: 1.5s ease infinite cube;}.var-loading__cube-item:nth-child(1) { animation-delay: 0.2s; margin-left: 0;}.var-loading__cube-item:nth-child(2) { animation-delay: 0.4s;}.var-loading__cube-item:nth-child(3) { animation-delay: 0.6s;}.var-loading__cube-item:nth-child(4) { animation-delay: 0.8s;}.var-loading__cube-item--large { height: 10px; width: 10px; margin-left: 5px;}.var-loading__cube-item--normal { height: 8px; width: 8px; margin-left: 4px;}.var-loading__cube-item--small { height: 6px; width: 6px; margin-left: 3px;}.var-loading__cube-item--mini { height: 4px; width: 4px; margin-left: 2px;}@keyframes cube { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: rotate(90deg) scale(0.3); }}.var-loading__rect { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center;}.var-loading__rect--large { width: 64px; height: 18px;}.var-loading__rect--normal { width: 50px; height: 16px;}.var-loading__rect--small { width: 36px; height: 14px;}.var-loading__rect--mini { width: 22px; height: 12px;}.var-loading__rect-item { animation: 2s ease-in-out infinite rect;}.var-loading__rect-item:nth-child(1) { animation-delay: 1.75s;}.var-loading__rect-item:nth-child(2) { animation-delay: 1.5s;}.var-loading__rect-item:nth-child(3) { animation-delay: 1.25s;}.var-loading__rect-item:nth-child(4) { animation-delay: 1s;}.var-loading__rect-item:nth-child(5) { animation-delay: 0.75s;}.var-loading__rect-item:nth-child(6) { animation-delay: 0.5s;}.var-loading__rect-item:nth-child(7) { animation-delay: 0.25s;}.var-loading__rect-item:nth-child(8) { animation-delay: 0s;}.var-loading__rect-item--large { height: 100%; width: 8px;}.var-loading__rect-item--normal { height: 90%; width: 6.4px;}.var-loading__rect-item--small { height: 80%; width: 4.8px;}.var-loading__rect-item--mini { height: 70%; width: 3.2px;}@keyframes rect { 0% { opacity: 0.3; } 25% { opacity: 1; } 50% { opacity: 0.3; } 65% { opacity: 1; } 100% { opacity: 0.3; }}.var-loading__disappear { display: flex; justify-content: space-around; align-items: center; flex-flow: nowrap;}.var-loading__disappear--large { width: 64px; height: 18px;}.var-loading__disappear--normal { width: 50px; height: 16px;}.var-loading__disappear--small { width: 36px; height: 14px;}.var-loading__disappear--mini { width: 22px; height: 12px;}.var-loading__disappear-item { border-radius: 50%; animation: 0.5s ease-in-out infinite alternate disappear;}.var-loading__disappear-item:nth-child(1) { animation-delay: -0.4s;}.var-loading__disappear-item:nth-child(2) { animation-delay: -0.2s;}.var-loading__disappear-item:nth-child(3) { animation-delay: 0s;}.var-loading__disappear-item--large { height: 15px; width: 15px;}.var-loading__disappear-item--normal { height: 12px; width: 12px;}.var-loading__disappear-item--small { height: 9px; width: 9px;}.var-loading__disappear-item--mini { height: 6px; width: 6px;}@keyframes disappear { 0% { opacity: 1; } 100% { opacity: 0; }}
1
+ :root { --loading-opacity: 0.38; --loading-desc-margin: 8px 0 0;}.var-loading { --loading-normal-width: 50px; --loading-normal-height: calc(var(--font-size-md) + 2px); --loading-large-width: 64px; --loading-large-height: calc(var(--font-size-lg) + 2px); --loading-small-width: 36px; --loading-small-height: calc(var(--font-size-sm) + 2px); --loading-mini-width: 22px; --loading-mini-height: calc(var(--font-size-xs) + 2px); position: relative;}.var-loading__content { position: relative; transition: opacity 0.3s; opacity: 1;}.var-loading__content--active { opacity: var(--loading-opacity);}.var-loading__content-mask { position: absolute; left: 0; right: 0; top: 0; bottom: 0;}.var-loading__body { display: flex; justify-content: center; align-items: center; height: 100%; flex-direction: column;}.var-loading__inside { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1;}.var-loading__description { color: var(--color-primary); margin: var(--loading-desc-margin);}.var-loading__description--large { font-size: var(--font-size-lg);}.var-loading__description--normal { font-size: var(--font-size-md);}.var-loading__description--small { font-size: var(--font-size-sm);}.var-loading__description--mini { font-size: var(--font-size-xs);}.var-loading__circle { display: flex;}.var-loading__circle-block { display: inline-block; color: var(--color-primary); animation: circle 1.8s linear infinite;}.var-loading__circle-block--large { width: 36px; height: 36px;}.var-loading__circle-block--normal { width: 30px; height: 30px;}.var-loading__circle-block--small { width: 24px; height: 24px;}.var-loading__circle-block--mini { width: 18px; height: 18px;}.var-loading__circle-block svg { display: block; width: 100%; height: 100%;}.var-loading__circle-block svg circle { animation: circular 1.5s ease-in-out infinite; stroke: currentColor; stroke-width: 3; stroke-linecap: round;}@keyframes circle { from { transform: rotate(0deg); } to { transform: rotate(360deg); }}@keyframes circular { 0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; } 50% { stroke-dasharray: 90, 150; stroke-dashoffset: -40; } 100% { stroke-dasharray: 90, 150; stroke-dashoffset: -120; }}.var-loading__wave { --loading-wave-size-item-width: 5px; --loading-wave-size-item-margin: 5px; display: flex; align-items: center; justify-content: center;}.var-loading__wave--large { width: var(--loading-large-width); height: var(--loading-large-height);}.var-loading__wave--normal { width: var(--loading-normal-width); height: var(--loading-normal-height);}.var-loading__wave--small { width: var(--loading-small-width); height: var(--loading-small-height);}.var-loading__wave--mini { width: var(--loading-mini-width); height: var(--loading-mini-height);}.var-loading__wave-item { height: 100%; display: inline-block; animation: 1.2s ease-in-out infinite wave; background-color: var(--color-primary);}.var-loading__wave-item:nth-child(1) { animation-delay: -1.2s; margin-left: 0;}.var-loading__wave-item:nth-child(2) { animation-delay: -1.1s;}.var-loading__wave-item:nth-child(3) { animation-delay: -1s;}.var-loading__wave-item:nth-child(4) { animation-delay: -0.9s;}.var-loading__wave-item:nth-child(5) { animation-delay: -0.8s;}.var-loading__wave-item--large { width: var(--loading-wave-size-item-width); margin-left: var(--loading-wave-size-item-margin);}.var-loading__wave-item--normal { width: calc(var(--loading-wave-size-item-width) - 1px); margin-left: calc(var(--loading-wave-size-item-margin) - 1px);}.var-loading__wave-item--small { width: calc(var(--loading-wave-size-item-width) - 2px); margin-left: calc(var(--loading-wave-size-item-margin) - 2px);}.var-loading__wave-item--mini { width: calc(var(--loading-wave-size-item-width) - 3px); margin-left: calc(var(--loading-wave-size-item-margin) - 3px);}@keyframes wave { 0%, 40%, 100% { transform: scaleY(0.4); } 20% { transform: scaleY(1); }}.var-loading__cube { --loading-cube-size-item-width: 10px; --loading-cube-size-item-height: 10px; --loading-cube-size-item-margin: 5px; display: flex; align-items: center;}.var-loading__cube--large { width: var(--loading-large-width); height: var(--loading-large-height);}.var-loading__cube--normal { width: var(--loading-normal-width); height: var(--loading-normal-height);}.var-loading__cube--small { width: var(--loading-small-width); height: var(--loading-small-height);}.var-loading__cube--mini { width: var(--loading-mini-width); height: var(--loading-mini-height);}.var-loading__cube-item { display: inline-block; transform-origin: right bottom; animation: 1.5s ease infinite cube; background-color: var(--color-primary);}.var-loading__cube-item:nth-child(1) { animation-delay: 0.2s; margin-left: 0;}.var-loading__cube-item:nth-child(2) { animation-delay: 0.4s;}.var-loading__cube-item:nth-child(3) { animation-delay: 0.6s;}.var-loading__cube-item:nth-child(4) { animation-delay: 0.8s;}.var-loading__cube-item--large { height: var(--loading-cube-size-item-height); width: var(--loading-cube-size-item-width); margin-left: var(--loading-cube-size-item-margin);}.var-loading__cube-item--normal { height: calc(var(--loading-cube-size-item-height) - 2px); width: calc(var(--loading-cube-size-item-width) - 2px); margin-left: calc(var(--loading-cube-size-item-margin) - 1px);}.var-loading__cube-item--small { height: calc(var(--loading-cube-size-item-height) - 4px); width: calc(var(--loading-cube-size-item-width) - 4px); margin-left: calc(var(--loading-cube-size-item-margin) - 2px);}.var-loading__cube-item--mini { height: calc(var(--loading-cube-size-item-height) - 6px); width: calc(var(--loading-cube-size-item-width) - 6px); margin-left: calc(var(--loading-cube-size-item-margin) - 3px);}@keyframes cube { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: rotate(90deg) scale(0.3); }}.var-loading__rect { --loading-rect-size-item-width: 8px; --loading-rect-size-item-height: 100%; display: flex; flex-wrap: nowrap; justify-content: center; align-items: center;}.var-loading__rect--large { width: var(--loading-large-width); height: var(--loading-large-height);}.var-loading__rect--normal { width: var(--loading-normal-width); height: var(--loading-normal-height);}.var-loading__rect--small { width: var(--loading-small-width); height: var(--loading-small-height);}.var-loading__rect--mini { width: var(--loading-mini-width); height: var(--loading-mini-height);}.var-loading__rect-item { animation: 2s ease-in-out infinite rect; background-color: var(--color-primary);}.var-loading__rect-item:nth-child(1) { animation-delay: 1.75s;}.var-loading__rect-item:nth-child(2) { animation-delay: 1.5s;}.var-loading__rect-item:nth-child(3) { animation-delay: 1.25s;}.var-loading__rect-item:nth-child(4) { animation-delay: 1s;}.var-loading__rect-item:nth-child(5) { animation-delay: 0.75s;}.var-loading__rect-item:nth-child(6) { animation-delay: 0.5s;}.var-loading__rect-item:nth-child(7) { animation-delay: 0.25s;}.var-loading__rect-item:nth-child(8) { animation-delay: 0s;}.var-loading__rect-item--large { height: var(--loading-rect-size-item-height); width: var(--loading-rect-size-item-width);}.var-loading__rect-item--normal { height: calc(var(--loading-rect-size-item-height) * 0.9); width: calc(var(--loading-rect-size-item-width) * 0.8);}.var-loading__rect-item--small { height: calc(var(--loading-rect-size-item-height) * 0.8); width: calc(var(--loading-rect-size-item-width) * 0.6);}.var-loading__rect-item--mini { height: calc(var(--loading-rect-size-item-height) * 0.7); width: calc(var(--loading-rect-size-item-width) * 0.4);}@keyframes rect { 0% { opacity: 0.3; } 25% { opacity: 1; } 50% { opacity: 0.3; } 65% { opacity: 1; } 100% { opacity: 0.3; }}.var-loading__disappear { --loading-disappear-size-item-width: 15px; --loading-disappear-size-item-height: 15px; display: flex; justify-content: space-around; align-items: center; flex-flow: nowrap;}.var-loading__disappear--large { width: var(--loading-large-width); height: var(--loading-large-height);}.var-loading__disappear--normal { width: var(--loading-normal-width); height: var(--loading-normal-height);}.var-loading__disappear--small { width: var(--loading-small-width); height: var(--loading-small-height);}.var-loading__disappear--mini { width: var(--loading-mini-width); height: var(--loading-mini-height);}.var-loading__disappear-item { border-radius: 50%; animation: 0.5s ease-in-out infinite alternate disappear; background-color: var(--color-primary);}.var-loading__disappear-item:nth-child(1) { animation-delay: -0.4s;}.var-loading__disappear-item:nth-child(2) { animation-delay: -0.2s;}.var-loading__disappear-item:nth-child(3) { animation-delay: 0s;}.var-loading__disappear-item--large { height: var(--loading-disappear-size-item-height); width: var(--loading-disappear-size-item-width);}.var-loading__disappear-item--normal { height: calc(var(--loading-disappear-size-item-height) * 0.8); width: calc(var(--loading-disappear-size-item-width) * 0.8);}.var-loading__disappear-item--small { height: calc(var(--loading-disappear-size-item-height) * 0.6); width: calc(var(--loading-disappear-size-item-width) * 0.6);}.var-loading__disappear-item--mini { height: calc(var(--loading-disappear-size-item-height) * 0.4); width: calc(var(--loading-disappear-size-item-width) * 0.4);}@keyframes disappear { 0% { opacity: 1; } 100% { opacity: 0; }}
@@ -31,8 +31,7 @@ var props = {
31
31
  },
32
32
  // loading颜色
33
33
  color: {
34
- type: String,
35
- default: 'currentColor'
34
+ type: String
36
35
  },
37
36
  description: {
38
37
  type: String
@@ -8,9 +8,15 @@ var _vue = require("vue");
8
8
 
9
9
  var _zhCN = _interopRequireDefault(require("./zh-CN"));
10
10
 
11
+ exports.zhCN = _zhCN.default;
12
+
13
+ var _enUS = _interopRequireDefault(require("./en-US"));
14
+
15
+ exports.enUS = _enUS.default;
16
+
11
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
18
 
13
- 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); }
19
+ 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); }
14
20
 
15
21
  function useLocale() {
16
22
  var packs = {};
@@ -64,6 +70,8 @@ exports.packs = packs;
64
70
  add('zh-CN', _zhCN.default);
65
71
  use('zh-CN');
66
72
  var _LocaleComponent = {
73
+ zhCN: _zhCN.default,
74
+ enUS: _enUS.default,
67
75
  packs,
68
76
  pack,
69
77
  add,
@@ -73,6 +81,8 @@ var _LocaleComponent = {
73
81
  };
74
82
  exports._LocaleComponent = _LocaleComponent;
75
83
  var _default = {
84
+ zhCN: _zhCN.default,
85
+ enUS: _enUS.default,
76
86
  packs,
77
87
  pack,
78
88
  add,
package/lib/menu/Menu.js CHANGED
@@ -2,62 +2,178 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.default = void 0;
5
+ exports.render = render;
5
6
 
6
- var _vue = require("vue");
7
-
8
- var _props = require("./props");
7
+ var _flip = _interopRequireDefault(require("@popperjs/core/lib/modifiers/flip"));
9
8
 
10
- var _elements = require("../utils/elements");
9
+ var _offset = _interopRequireDefault(require("@popperjs/core/lib/modifiers/offset"));
11
10
 
12
- var _zIndex = require("../context/zIndex");
11
+ var _popperLite = require("@popperjs/core/lib/popper-lite");
13
12
 
14
13
  var _components = require("../utils/components");
15
14
 
15
+ var _vue = require("vue");
16
16
 
17
+ var _props = require("./props");
17
18
 
19
+ var _elements = require("../utils/elements");
18
20
 
21
+ var _zIndex = require("../context/zIndex");
19
22
 
23
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
24
 
25
+ 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); }
21
26
 
22
27
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
23
28
 
24
29
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
25
30
 
26
- function _isSlot(s) {
27
- return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
28
- }
29
-
30
31
  var {
31
32
  n,
32
33
  classes
33
34
  } = (0, _components.createNamespace)('menu');
34
35
 
36
+ function render(_ctx, _cache) {
37
+ return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
38
+ ref: "host",
39
+ class: (0, _vue.normalizeClass)(_ctx.n()),
40
+ onClick: _cache[3] || (_cache[3] = function () {
41
+ return _ctx.handleClick && _ctx.handleClick(...arguments);
42
+ }),
43
+ onMouseenter: _cache[4] || (_cache[4] = function () {
44
+ return _ctx.handleMouseenter && _ctx.handleMouseenter(...arguments);
45
+ }),
46
+ onMouseleave: _cache[5] || (_cache[5] = function () {
47
+ return _ctx.handleMouseleave && _ctx.handleMouseleave(...arguments);
48
+ })
49
+ }, [(0, _vue.renderSlot)(_ctx.$slots, "default"), ((0, _vue.openBlock)(), (0, _vue.createBlock)(_vue.Teleport, {
50
+ to: _ctx.teleport
51
+ }, [(0, _vue.createVNode)(_vue.Transition, {
52
+ name: _ctx.n(),
53
+ onAfterEnter: _ctx.onOpened,
54
+ onAfterLeave: _ctx.onClosed
55
+ }, {
56
+ default: (0, _vue.withCtx)(() => [(0, _vue.withDirectives)((0, _vue.createElementVNode)("div", {
57
+ ref: "menu",
58
+ style: (0, _vue.normalizeStyle)({
59
+ zIndex: _ctx.zIndex
60
+ }),
61
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('menu'), [_ctx.defaultStyle, _ctx.n('--menu-background-color') + " var-elevation--3"])),
62
+ onClick: _cache[0] || (_cache[0] = (0, _vue.withModifiers)(() => {}, ["stop"])),
63
+ onMouseenter: _cache[1] || (_cache[1] = function () {
64
+ return _ctx.handleMenuMouseenter && _ctx.handleMenuMouseenter(...arguments);
65
+ }),
66
+ onMouseleave: _cache[2] || (_cache[2] = function () {
67
+ return _ctx.handleMenuMouseleave && _ctx.handleMenuMouseleave(...arguments);
68
+ })
69
+ }, [(0, _vue.renderSlot)(_ctx.$slots, "menu")], 38
70
+ /* CLASS, STYLE, HYDRATE_EVENTS */
71
+ ), [[_vue.vShow, _ctx.show]])]),
72
+ _: 3
73
+ /* FORWARDED */
74
+
75
+ }, 8
76
+ /* PROPS */
77
+ , ["name", "onAfterEnter", "onAfterLeave"])], 8
78
+ /* PROPS */
79
+ , ["to"]))], 34
80
+ /* CLASS, HYDRATE_EVENTS */
81
+ );
82
+ }
83
+
35
84
  var _default = (0, _vue.defineComponent)({
85
+ render,
36
86
  name: 'VarMenu',
37
87
  props: _props.props,
38
88
 
39
- setup(props, _ref) {
40
- var {
41
- slots
42
- } = _ref;
89
+ setup(props) {
43
90
  var host = (0, _vue.ref)(null);
44
91
  var menu = (0, _vue.ref)(null);
45
- var to = (0, _vue.ref)();
46
- var top = (0, _vue.ref)(0);
47
- var left = (0, _vue.ref)(0);
92
+ var show = (0, _vue.ref)(false);
48
93
  var {
49
94
  zIndex
50
- } = (0, _zIndex.useZIndex)(() => props.show, 1);
51
- var {
52
- disabled
53
- } = (0, _components.useTeleport)();
95
+ } = (0, _zIndex.useZIndex)(() => show.value, 1);
96
+ var popover = null;
54
97
  var clickSelf = false;
98
+ var enterMenu = false;
99
+ var enterHost = false;
100
+ var hostSize = {
101
+ width: 0,
102
+ height: 0
103
+ };
55
104
 
56
- var computeTop = alignment => {
57
- return alignment === 'top' ? (0, _elements.getTop)(host.value) : (0, _elements.getTop)(host.value) - menu.value.offsetHeight;
105
+ var computeHostSize = () => {
106
+ var {
107
+ width,
108
+ height
109
+ } = getComputedStyle(host.value);
110
+ hostSize = {
111
+ width: (0, _elements.toPxNum)(width),
112
+ height: (0, _elements.toPxNum)(height)
113
+ };
58
114
  };
59
115
 
116
+ var handleMouseenter = () => {
117
+ if (props.trigger !== 'hover') {
118
+ return;
119
+ }
120
+
121
+ enterHost = true;
122
+ open();
123
+ };
124
+
125
+ var handleMouseleave = /*#__PURE__*/function () {
126
+ var _ref = _asyncToGenerator(function* () {
127
+ if (props.trigger !== 'hover') {
128
+ return;
129
+ }
130
+
131
+ enterHost = false;
132
+ yield (0, _elements.doubleRaf)();
133
+
134
+ if (enterMenu) {
135
+ return;
136
+ }
137
+
138
+ close();
139
+ });
140
+
141
+ return function handleMouseleave() {
142
+ return _ref.apply(this, arguments);
143
+ };
144
+ }();
145
+
146
+ var handleMenuMouseenter = () => {
147
+ if (props.trigger !== 'hover') {
148
+ return;
149
+ }
150
+
151
+ enterMenu = true;
152
+ };
153
+
154
+ var handleMenuMouseleave = /*#__PURE__*/function () {
155
+ var _ref2 = _asyncToGenerator(function* () {
156
+ if (props.trigger !== 'hover') {
157
+ return;
158
+ }
159
+
160
+ enterMenu = false;
161
+ yield (0, _elements.doubleRaf)();
162
+
163
+ if (enterHost) {
164
+ return;
165
+ }
166
+
167
+ close();
168
+ });
169
+
170
+ return function handleMenuMouseleave() {
171
+ return _ref2.apply(this, arguments);
172
+ };
173
+ }();
174
+
60
175
  var handleClick = () => {
176
+ open();
61
177
  clickSelf = true;
62
178
  };
63
179
 
@@ -67,93 +183,207 @@ var _default = (0, _vue.defineComponent)({
67
183
  return;
68
184
  }
69
185
 
70
- if (!props.show) {
71
- return;
186
+ show.value = false;
187
+ (0, _components.call)(props['onUpdate:show'], false);
188
+ };
189
+
190
+ var getPosition = () => {
191
+ computeHostSize();
192
+ var offset = {
193
+ x: (0, _elements.toPxNum)(props.offsetX),
194
+ y: (0, _elements.toPxNum)(props.offsetY)
195
+ };
196
+
197
+ switch (props.placement) {
198
+ case 'cover-top':
199
+ return {
200
+ placement: 'bottom',
201
+ skidding: offset.x,
202
+ distance: offset.y - hostSize.height
203
+ };
204
+
205
+ case 'cover-top-start':
206
+ return {
207
+ placement: 'bottom-start',
208
+ skidding: offset.x,
209
+ distance: offset.y - hostSize.height
210
+ };
211
+
212
+ case 'cover-top-end':
213
+ return {
214
+ placement: 'bottom-end',
215
+ skidding: offset.x,
216
+ distance: offset.y - hostSize.height
217
+ };
218
+
219
+ case 'cover-bottom':
220
+ return {
221
+ placement: 'top',
222
+ skidding: offset.x,
223
+ distance: -offset.y - hostSize.height
224
+ };
225
+
226
+ case 'cover-bottom-start':
227
+ return {
228
+ placement: 'top-start',
229
+ skidding: offset.x,
230
+ distance: -offset.y - hostSize.height
231
+ };
232
+
233
+ case 'cover-bottom-end':
234
+ return {
235
+ placement: 'top-end',
236
+ skidding: offset.x,
237
+ distance: -offset.y - hostSize.height
238
+ };
239
+
240
+ case 'cover-left':
241
+ return {
242
+ placement: 'right',
243
+ skidding: offset.y,
244
+ distance: offset.x - hostSize.width
245
+ };
246
+
247
+ case 'cover-right':
248
+ return {
249
+ placement: 'left',
250
+ skidding: offset.y,
251
+ distance: -offset.x - hostSize.width
252
+ };
253
+
254
+ case 'left':
255
+ case 'left-start':
256
+ case 'left-end':
257
+ return {
258
+ placement: props.placement,
259
+ skidding: offset.y,
260
+ distance: -offset.x
261
+ };
262
+
263
+ case 'top':
264
+ case 'top-start':
265
+ case 'top-end':
266
+ return {
267
+ placement: props.placement,
268
+ skidding: offset.x,
269
+ distance: -offset.y
270
+ };
271
+
272
+ case 'bottom':
273
+ case 'bottom-start':
274
+ case 'bottom-end':
275
+ return {
276
+ placement: props.placement,
277
+ skidding: offset.x,
278
+ distance: offset.y
279
+ };
280
+
281
+ case 'right':
282
+ case 'right-start':
283
+ case 'right-end':
284
+ return {
285
+ placement: props.placement,
286
+ skidding: offset.y,
287
+ distance: offset.x
288
+ };
72
289
  }
290
+ };
73
291
 
74
- (0, _components.call)(props['onUpdate:show'], false);
292
+ var getPopperOptions = () => {
293
+ var {
294
+ placement,
295
+ skidding,
296
+ distance
297
+ } = getPosition();
298
+ return {
299
+ placement,
300
+ modifiers: [_extends({}, _flip.default, {
301
+ enabled: show.value
302
+ }), _extends({}, _offset.default, {
303
+ options: {
304
+ offset: [skidding, distance]
305
+ }
306
+ })]
307
+ };
75
308
  }; // expose
76
309
 
77
310
 
78
311
  var resize = () => {
79
- top.value = computeTop(props.alignment);
80
- left.value = (0, _elements.getLeft)(host.value);
81
- }; // Transition style use computed place here
312
+ popover.setOptions(getPopperOptions());
313
+ }; // expose
82
314
 
83
315
 
84
- var transitionStyle = (0, _vue.computed)(() => {
85
- return {
86
- top: "calc(" + top.value + "px + " + (0, _elements.toSizeUnit)(props.offsetY) + ")",
87
- left: "calc(" + left.value + "px + " + (0, _elements.toSizeUnit)(props.offsetX) + ")",
88
- zIndex: zIndex.value
89
- };
90
- });
316
+ var open = () => {
317
+ var {
318
+ disabled
319
+ } = props;
91
320
 
92
- var renderTransition = () => (0, _vue.createVNode)(_vue.Transition, {
93
- "name": n(),
94
- "onAfterEnter": props.onOpened,
95
- "onAfterLeave": props.onClosed
96
- }, {
97
- default: () => [(0, _vue.withDirectives)((0, _vue.createVNode)("div", {
98
- "class": classes(n('menu'), 'var-elevation--3'),
99
- "ref": menu,
100
- "style": transitionStyle.value,
101
- "onClick": event => {
102
- event.stopPropagation();
103
- }
104
- }, [(0, _components.call)(slots.menu)]), [[_vue.vShow, props.show]])]
105
- });
321
+ if (disabled) {
322
+ return;
323
+ }
106
324
 
107
- (0, _vue.watch)(() => props.alignment, resize);
108
- (0, _vue.watch)(() => props.show, /*#__PURE__*/function () {
109
- var _ref2 = _asyncToGenerator(function* (newValue) {
110
- var {
111
- onOpen,
112
- onClose
113
- } = props;
114
-
115
- if (newValue) {
116
- yield (0, _vue.nextTick)();
117
- resize();
118
- }
325
+ show.value = true;
326
+ (0, _components.call)(props['onUpdate:show'], true);
327
+ }; // expose
119
328
 
120
- newValue ? (0, _components.call)(onOpen) : (0, _components.call)(onClose);
121
- });
122
329
 
123
- return function (_x) {
124
- return _ref2.apply(this, arguments);
125
- };
126
- }());
127
- (0, _vue.watch)(() => props.teleport, newValue => {
128
- to.value = newValue;
330
+ var close = () => {
331
+ show.value = false;
332
+ (0, _components.call)(props['onUpdate:show'], false);
333
+ };
334
+
335
+ (0, _vue.watch)(() => props.show, newValue => {
336
+ show.value = newValue != null ? newValue : false;
337
+ }, {
338
+ immediate: true
339
+ });
340
+ (0, _vue.watch)(() => props.offsetX, resize);
341
+ (0, _vue.watch)(() => props.offsetY, resize);
342
+ (0, _vue.watch)(() => props.placement, resize);
343
+ (0, _vue.watch)(() => show.value, newValue => {
344
+ if (newValue) {
345
+ resize();
346
+ (0, _components.call)(props.onOpen);
347
+ } else {
348
+ (0, _components.call)(props.onClose);
349
+ }
129
350
  });
351
+ (0, _vue.watch)(() => props.trigger, newValue => {
352
+ if (newValue === 'click') {
353
+ document.addEventListener('click', handleMenuClose);
354
+ } else {
355
+ document.removeEventListener('click', handleMenuClose);
356
+ }
357
+ });
358
+ (0, _vue.watch)(() => props.disabled, close);
130
359
  (0, _vue.onMounted)(() => {
131
- // Synchronously transfer the state to the mount hook to support server-side rendering to prevent hydration errors
132
- to.value = props.teleport;
133
- resize();
134
- document.addEventListener('click', handleMenuClose);
135
- window.addEventListener('resize', resize);
360
+ popover = (0, _popperLite.createPopper)(host.value, menu.value, getPopperOptions());
361
+
362
+ if (props.trigger === 'click') {
363
+ document.addEventListener('click', handleMenuClose);
364
+ }
136
365
  });
137
366
  (0, _vue.onUnmounted)(() => {
138
367
  document.removeEventListener('click', handleMenuClose);
139
- window.removeEventListener('resize', resize);
140
- });
141
- (0, _components.exposeApis)({
142
- resize
368
+ popover.destroy();
143
369
  });
144
- return () => {
145
- var _slot;
146
-
147
- return (0, _vue.createVNode)("div", {
148
- "class": n(),
149
- "ref": host,
150
- "onClick": handleClick
151
- }, [(0, _components.call)(slots.default), to.value ? (0, _vue.createVNode)(_vue.Teleport, {
152
- "to": to.value,
153
- "disabled": disabled.value
154
- }, _isSlot(_slot = renderTransition()) ? _slot : {
155
- default: () => [_slot]
156
- }) : renderTransition()]);
370
+ return {
371
+ menu,
372
+ host,
373
+ hostSize,
374
+ show,
375
+ zIndex,
376
+ n,
377
+ classes,
378
+ handleClick,
379
+ handleMenuClose,
380
+ handleMouseenter,
381
+ handleMouseleave,
382
+ handleMenuMouseenter,
383
+ handleMenuMouseleave,
384
+ resize,
385
+ open,
386
+ close
157
387
  };
158
388
  }
159
389
 
package/lib/menu/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = exports._MenuComponent = void 0;
5
5
 
6
- var _Menu = _interopRequireDefault(require("./Menu"));
6
+ var _Menu = _interopRequireDefault(require("./Menu.js"));
7
7
 
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
9
 
package/lib/menu/menu.css CHANGED
@@ -1 +1 @@
1
- .var-menu-enter-from,.var-menu-leave-to { transform: scale(0.8); opacity: 0;}.var-menu-enter-active,.var-menu-leave-active { transition-property: opacity, transform; transition-duration: 0.25s;}.var-menu { display: inline-block; transition: background-color 0.25s;}.var-menu__menu { position: absolute;}
1
+ :root { --menu-background-color: #fff;}.var-menu-enter-from,.var-menu-leave-to { opacity: 0;}.var-menu-enter-active,.var-menu-leave-active { transition-property: opacity; transition-duration: 0.25s;}.var-menu { display: inline-block;}.var-menu--menu-background-color { background: var(--menu-background-color); transition: opacity 0.25s, background-color 0.25s;}