@varlet/ui 1.27.20 → 2.0.0-alpha.1663499244572

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 (572) hide show
  1. package/CHANGELOG.md +1885 -1885
  2. package/LICENCE +21 -21
  3. package/README.en-US.md +86 -93
  4. package/README.md +93 -93
  5. package/es/action-sheet/actionSheet.css +1 -1
  6. package/es/action-sheet/props.js +1 -1
  7. package/es/bottom-navigation/BottomNavigation.js +1 -1
  8. package/es/button/Button.js +2 -1
  9. package/es/button/button.css +1 -1
  10. package/es/button/props.js +5 -0
  11. package/es/card/Card.js +18 -22
  12. package/es/card/card.css +1 -1
  13. package/es/card/props.js +0 -7
  14. package/es/cell/Cell.js +3 -3
  15. package/es/cell/cell.css +1 -1
  16. package/es/cell/props.js +2 -2
  17. package/es/chip/chip.css +1 -1
  18. package/es/date-picker/DatePicker.js +1 -1
  19. package/es/date-picker/props.js +1 -1
  20. package/es/date-picker/src/day-picker-panel.js +1 -1
  21. package/es/date-picker/src/month-picker-panel.js +1 -1
  22. package/es/dialog/props.js +1 -1
  23. package/es/divider/Divider.js +1 -1
  24. package/es/image-preview/props.js +1 -1
  25. package/es/index.d.ts +1 -1
  26. package/es/index.js +5 -0
  27. package/es/input/Input.js +1 -1
  28. package/es/lazy/index.js +1 -1
  29. package/es/loading/loading.css +1 -1
  30. package/es/loading/props.js +1 -2
  31. package/es/locale/en-US.d.ts +5 -5
  32. package/es/locale/index.js +7 -2
  33. package/es/locale/zh-CN.d.ts +5 -5
  34. package/es/menu/Menu.js +318 -94
  35. package/es/{action-sheet/ActionSheetSfc.less → menu/MenuSfc.css} +0 -0
  36. package/es/menu/index.js +1 -1
  37. package/es/menu/menu.css +1 -1
  38. package/es/menu/props.js +23 -6
  39. package/es/menu/style/index.js +3 -2
  40. package/es/pagination/Pagination.js +7 -3
  41. package/es/pagination/pagination.css +1 -1
  42. package/es/picker/props.js +1 -1
  43. package/es/popup/Popup.js +3 -3
  44. package/es/rate/Rate.js +20 -36
  45. package/es/rate/rate.css +1 -1
  46. package/es/ripple/index.js +2 -2
  47. package/es/select/Select.js +18 -46
  48. package/es/select/select.css +1 -1
  49. package/es/slider/Slider.js +1 -1
  50. package/es/snackbar/core.js +4 -2
  51. package/es/snackbar/index.js +1 -1
  52. package/es/snackbar/props.js +6 -2
  53. package/es/style-provider/StyleProvider.js +5 -1
  54. package/es/style.css +1 -1
  55. package/es/style.js +1 -0
  56. package/es/switch/Switch.js +6 -5
  57. package/es/tabs/tabs.css +1 -1
  58. package/es/tabs-items/TabsItems.js +8 -2
  59. package/es/themes/dark/cell.js +1 -1
  60. package/es/themes/dark/index.d.ts +5 -5
  61. package/es/themes/dark/index.js +3 -2
  62. package/es/themes/dark/menu.js +3 -0
  63. package/es/themes/index.js +4 -0
  64. package/es/time-picker/TimePicker.js +1 -1
  65. package/es/time-picker/props.js +1 -1
  66. package/es/umdIndex.js +5 -0
  67. package/es/utils/components.js +2 -2
  68. package/es/utils/{jest.js → test.js} +0 -19
  69. package/es/varlet.esm.js +12805 -13960
  70. package/highlight/attributes.json +1 -1850
  71. package/highlight/tags.json +58 -578
  72. package/highlight/web-types.json +152 -5241
  73. package/json/area.json +10706 -10706
  74. package/lib/action-sheet/actionSheet.css +1 -1
  75. package/lib/action-sheet/props.js +1 -1
  76. package/lib/bottom-navigation/BottomNavigation.js +1 -1
  77. package/lib/button/Button.js +2 -1
  78. package/lib/button/button.css +1 -1
  79. package/lib/button/props.js +5 -0
  80. package/lib/card/Card.js +18 -22
  81. package/lib/card/card.css +1 -1
  82. package/lib/card/props.js +0 -7
  83. package/lib/cell/Cell.js +3 -3
  84. package/lib/cell/cell.css +1 -1
  85. package/lib/cell/props.js +2 -2
  86. package/lib/chip/chip.css +1 -1
  87. package/lib/date-picker/DatePicker.js +14 -14
  88. package/lib/date-picker/props.js +1 -1
  89. package/lib/date-picker/src/day-picker-panel.js +14 -14
  90. package/lib/date-picker/src/month-picker-panel.js +12 -12
  91. package/lib/date-picker/src/year-picker-panel.js +3 -3
  92. package/lib/dialog/props.js +1 -1
  93. package/lib/divider/Divider.js +1 -1
  94. package/lib/image-preview/props.js +1 -1
  95. package/lib/index.d.ts +1 -1
  96. package/lib/index.js +3 -0
  97. package/lib/input/Input.js +1 -1
  98. package/lib/lazy/index.js +1 -1
  99. package/lib/loading/loading.css +1 -1
  100. package/lib/loading/props.js +1 -2
  101. package/lib/locale/en-US.d.ts +5 -5
  102. package/lib/locale/index.js +11 -1
  103. package/lib/locale/zh-CN.d.ts +5 -5
  104. package/lib/menu/Menu.js +321 -91
  105. package/{es/app-bar/AppBarSfc.less → lib/menu/MenuSfc.css} +0 -0
  106. package/lib/menu/index.js +1 -1
  107. package/lib/menu/menu.css +1 -1
  108. package/lib/menu/props.js +23 -6
  109. package/lib/menu/style/index.js +3 -2
  110. package/lib/pagination/Pagination.js +6 -2
  111. package/lib/pagination/pagination.css +1 -1
  112. package/lib/picker/props.js +1 -1
  113. package/lib/popup/Popup.js +2 -2
  114. package/lib/rate/Rate.js +20 -36
  115. package/lib/rate/rate.css +1 -1
  116. package/lib/ripple/index.js +2 -2
  117. package/lib/select/Select.js +17 -45
  118. package/lib/select/select.css +1 -1
  119. package/lib/slider/Slider.js +1 -1
  120. package/lib/snackbar/core.js +4 -2
  121. package/lib/snackbar/index.js +1 -1
  122. package/lib/snackbar/props.js +6 -2
  123. package/lib/style-provider/StyleProvider.js +5 -1
  124. package/lib/style.css +1 -1
  125. package/lib/style.js +1 -0
  126. package/lib/switch/Switch.js +6 -5
  127. package/lib/tabs/tabs.css +1 -1
  128. package/lib/tabs-items/TabsItems.js +9 -3
  129. package/lib/themes/dark/cell.js +1 -1
  130. package/lib/themes/dark/index.d.ts +5 -5
  131. package/lib/themes/dark/index.js +4 -2
  132. package/lib/themes/dark/menu.js +8 -0
  133. package/lib/themes/index.js +13 -0
  134. package/lib/time-picker/TimePicker.js +9 -9
  135. package/lib/time-picker/clock.js +3 -3
  136. package/lib/time-picker/props.js +1 -1
  137. package/lib/utils/components.js +3 -3
  138. package/lib/utils/{jest.js → test.js} +0 -21
  139. package/package.json +14 -10
  140. package/types/actionSheet.d.ts +68 -69
  141. package/types/appBar.d.ts +17 -16
  142. package/types/backTop.d.ts +16 -17
  143. package/types/badge.d.ts +20 -19
  144. package/types/bottomNavigation.d.ts +23 -24
  145. package/types/bottomNavigationItem.d.ts +17 -18
  146. package/types/button.d.ts +29 -28
  147. package/types/card.d.ts +29 -30
  148. package/types/cell.d.ts +18 -19
  149. package/types/checkbox.d.ts +34 -35
  150. package/types/checkboxGroup.d.ts +29 -30
  151. package/types/chip.d.ts +20 -21
  152. package/types/col.d.ts +23 -24
  153. package/types/collapse.d.ts +17 -18
  154. package/types/collapseItem.d.ts +14 -15
  155. package/types/countdown.d.ts +29 -30
  156. package/types/counter.d.ts +44 -45
  157. package/types/datePicker.d.ts +29 -28
  158. package/types/dialog.d.ts +84 -83
  159. package/types/divider.d.ts +15 -16
  160. package/types/form.d.ts +18 -19
  161. package/types/icon.d.ts +16 -17
  162. package/types/image.d.ts +26 -25
  163. package/types/imagePreview.d.ts +51 -52
  164. package/types/index.d.ts +67 -0
  165. package/types/indexAnchor.d.ts +11 -12
  166. package/types/indexBar.d.ts +21 -22
  167. package/types/input.d.ts +48 -47
  168. package/types/lazy.d.ts +5 -5
  169. package/types/list.d.ts +21 -22
  170. package/types/loading.d.ts +18 -17
  171. package/types/locale.d.ts +52 -49
  172. package/types/menu.d.ts +46 -22
  173. package/types/option.d.ts +12 -13
  174. package/types/pagination.d.ts +25 -26
  175. package/types/picker.d.ts +85 -86
  176. package/types/popup.d.ts +27 -26
  177. package/types/progress.d.ts +22 -21
  178. package/types/pullRefresh.d.ts +20 -21
  179. package/types/radio.d.ts +34 -35
  180. package/types/radioGroup.d.ts +24 -25
  181. package/types/rate.d.ts +28 -29
  182. package/types/ripple.d.ts +5 -5
  183. package/types/row.d.ts +18 -15
  184. package/types/select.d.ts +48 -47
  185. package/types/skeleton.d.ts +21 -22
  186. package/types/slider.d.ts +30 -29
  187. package/types/snackbar.d.ts +82 -82
  188. package/types/space.d.ts +26 -27
  189. package/types/step.d.ts +13 -14
  190. package/types/steps.d.ts +15 -16
  191. package/types/sticky.d.ts +15 -16
  192. package/types/styleProvider.d.ts +24 -24
  193. package/types/swipe.d.ts +27 -28
  194. package/types/swipeItem.d.ts +9 -10
  195. package/types/switch.d.ts +25 -26
  196. package/types/tab.d.ts +13 -14
  197. package/types/tabItem.d.ts +11 -12
  198. package/types/table.d.ts +11 -12
  199. package/types/tabs.d.ts +29 -30
  200. package/types/tabsItems.d.ts +15 -13
  201. package/types/timePicker.d.ts +30 -29
  202. package/types/uploader.d.ts +65 -60
  203. package/types/varComponent.d.ts +18 -12
  204. package/types/varDirective.d.ts +12 -12
  205. package/umd/varlet.js +16 -4
  206. package/es/action-sheet/actionSheet.less +0 -68
  207. package/es/action-sheet/style/less.js +0 -6
  208. package/es/app-bar/appBar.less +0 -57
  209. package/es/app-bar/style/less.js +0 -4
  210. package/es/back-top/BackTopSfc.less +0 -0
  211. package/es/back-top/backTop.less +0 -27
  212. package/es/back-top/style/less.js +0 -5
  213. package/es/badge/BadgeSfc.less +0 -0
  214. package/es/badge/badge.less +0 -119
  215. package/es/badge/style/less.js +0 -4
  216. package/es/bottom-navigation/BottomNavigationSfc.less +0 -0
  217. package/es/bottom-navigation/bottomNavigation.less +0 -56
  218. package/es/bottom-navigation/style/less.js +0 -4
  219. package/es/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
  220. package/es/bottom-navigation-item/bottomNavigationItem.less +0 -78
  221. package/es/bottom-navigation-item/style/less.js +0 -6
  222. package/es/button/ButtonSfc.less +0 -0
  223. package/es/button/button.less +0 -183
  224. package/es/button/style/less.js +0 -6
  225. package/es/card/CardSfc.less +0 -0
  226. package/es/card/card.less +0 -189
  227. package/es/card/style/less.js +0 -5
  228. package/es/cell/CellSfc.less +0 -0
  229. package/es/cell/cell.less +0 -78
  230. package/es/cell/style/less.js +0 -4
  231. package/es/checkbox/CheckboxSfc.less +0 -0
  232. package/es/checkbox/checkbox.less +0 -78
  233. package/es/checkbox/style/less.js +0 -6
  234. package/es/checkbox-group/CheckboxGroupSfc.less +0 -0
  235. package/es/checkbox-group/checkboxGroup.less +0 -12
  236. package/es/checkbox-group/style/less.js +0 -4
  237. package/es/chip/ChipSfc.less +0 -0
  238. package/es/chip/chip.less +0 -182
  239. package/es/chip/style/less.js +0 -4
  240. package/es/col/ColSfc.less +0 -0
  241. package/es/col/col.less +0 -74
  242. package/es/col/style/less.js +0 -3
  243. package/es/collapse/CollapseSfc.less +0 -1
  244. package/es/collapse/style/less.js +0 -3
  245. package/es/collapse-item/CollapseItemSfc.less +0 -0
  246. package/es/collapse-item/collapseItem.less +0 -105
  247. package/es/collapse-item/style/less.js +0 -4
  248. package/es/context/style/less.js +0 -0
  249. package/es/countdown/CountdownSfc.less +0 -0
  250. package/es/countdown/style/less.js +0 -2
  251. package/es/counter/CounterSfc.less +0 -0
  252. package/es/counter/counter.less +0 -89
  253. package/es/counter/style/less.js +0 -7
  254. package/es/date-picker/DatePickerSfc.less +0 -0
  255. package/es/date-picker/date-picker.less +0 -354
  256. package/es/date-picker/style/less.js +0 -7
  257. package/es/dialog/DialogSfc.less +0 -0
  258. package/es/dialog/dialog.less +0 -77
  259. package/es/dialog/style/less.js +0 -5
  260. package/es/divider/DividerSfc.less +0 -0
  261. package/es/divider/divider.less +0 -78
  262. package/es/divider/style/less.js +0 -3
  263. package/es/form/FormSfc.less +0 -0
  264. package/es/form/style/less.js +0 -2
  265. package/es/form-details/FormDetailsSfc.less +0 -0
  266. package/es/form-details/formDetails.less +0 -48
  267. package/es/form-details/style/less.js +0 -3
  268. package/es/icon/IconSfc.less +0 -0
  269. package/es/icon/icon.less +0 -26
  270. package/es/icon/style/less.js +0 -3
  271. package/es/image/ImageSfc.less +0 -0
  272. package/es/image/image.less +0 -9
  273. package/es/image/style/less.js +0 -4
  274. package/es/image-preview/ImagePreviewSfc.less +0 -0
  275. package/es/image-preview/imagePreview.less +0 -76
  276. package/es/image-preview/style/less.js +0 -7
  277. package/es/index-anchor/IndexAnchorSfc.less +0 -1
  278. package/es/index-anchor/style/less.js +0 -3
  279. package/es/index-bar/IndexBarSfc.less +0 -0
  280. package/es/index-bar/indexBar.less +0 -43
  281. package/es/index-bar/style/less.js +0 -3
  282. package/es/input/InputSfc.less +0 -0
  283. package/es/input/input.less +0 -187
  284. package/es/input/style/less.js +0 -5
  285. package/es/lazy/style/less.js +0 -0
  286. package/es/less.js +0 -64
  287. package/es/list/ListSfc.less +0 -0
  288. package/es/list/list.less +0 -63
  289. package/es/list/style/less.js +0 -5
  290. package/es/loading/LoadingSfc.less +0 -0
  291. package/es/loading/loading.less +0 -500
  292. package/es/loading/style/less.js +0 -3
  293. package/es/locale/style/less.js +0 -0
  294. package/es/menu/menu.less +0 -21
  295. package/es/menu/style/less.js +0 -3
  296. package/es/option/OptionSfc.less +0 -0
  297. package/es/option/option.less +0 -37
  298. package/es/option/style/less.js +0 -6
  299. package/es/pagination/PaginationSfc.less +0 -0
  300. package/es/pagination/pagination.less +0 -188
  301. package/es/pagination/style/less.js +0 -8
  302. package/es/picker/PickerSfc.less +0 -0
  303. package/es/picker/picker.less +0 -106
  304. package/es/picker/style/less.js +0 -5
  305. package/es/popup/popup.less +0 -125
  306. package/es/popup/style/less.js +0 -2
  307. package/es/progress/ProgressSfc.less +0 -0
  308. package/es/progress/progress.less +0 -101
  309. package/es/progress/style/less.js +0 -3
  310. package/es/pull-refresh/PullRefreshSfc.less +0 -0
  311. package/es/pull-refresh/pullRefresh.less +0 -56
  312. package/es/pull-refresh/style/less.js +0 -5
  313. package/es/radio/RadioSfc.less +0 -0
  314. package/es/radio/radio.less +0 -78
  315. package/es/radio/style/less.js +0 -6
  316. package/es/radio-group/RadioGroupSfc.less +0 -0
  317. package/es/radio-group/radioGroup.less +0 -12
  318. package/es/radio-group/style/less.js +0 -4
  319. package/es/rate/RateSfc.less +0 -0
  320. package/es/rate/rate.less +0 -48
  321. package/es/rate/style/less.js +0 -6
  322. package/es/ripple/ripple.less +0 -20
  323. package/es/ripple/style/less.js +0 -2
  324. package/es/row/RowSfc.less +0 -0
  325. package/es/row/row.less +0 -4
  326. package/es/row/style/less.js +0 -3
  327. package/es/select/SelectSfc.less +0 -0
  328. package/es/select/select.less +0 -184
  329. package/es/select/style/less.js +0 -7
  330. package/es/skeleton/SkeletonSfc.less +0 -0
  331. package/es/skeleton/skeleton.less +0 -138
  332. package/es/skeleton/style/less.js +0 -3
  333. package/es/slider/SliderSfc.less +0 -0
  334. package/es/slider/slider.less +0 -147
  335. package/es/slider/style/less.js +0 -4
  336. package/es/snackbar/SnackbarSfc.less +0 -0
  337. package/es/snackbar/coreSfc.less +0 -0
  338. package/es/snackbar/snackbar.less +0 -129
  339. package/es/snackbar/style/less.js +0 -8
  340. package/es/space/space.less +0 -6
  341. package/es/space/style/less.js +0 -2
  342. package/es/step/StepSfc.less +0 -0
  343. package/es/step/step.less +0 -145
  344. package/es/step/style/less.js +0 -4
  345. package/es/steps/StepsSfc.less +0 -1
  346. package/es/steps/style/less.js +0 -2
  347. package/es/sticky/StickySfc.less +0 -0
  348. package/es/sticky/sticky.less +0 -8
  349. package/es/sticky/style/less.js +0 -3
  350. package/es/style-provider/StyleProviderSfc.less +0 -0
  351. package/es/style-provider/style/less.js +0 -2
  352. package/es/styles/common.less +0 -73
  353. package/es/styles/elevation.less +0 -128
  354. package/es/styles/style/less.js +0 -0
  355. package/es/styles/var.css +0 -0
  356. package/es/styles/var.less +0 -30
  357. package/es/swipe/SwipeSfc.less +0 -0
  358. package/es/swipe/style/less.js +0 -3
  359. package/es/swipe/swipe.less +0 -60
  360. package/es/swipe-item/SwipeItemSfc.less +0 -0
  361. package/es/swipe-item/style/less.js +0 -3
  362. package/es/swipe-item/swipeItem.less +0 -5
  363. package/es/switch/SwitchSfc.less +0 -0
  364. package/es/switch/style/less.js +0 -7
  365. package/es/switch/switch.less +0 -94
  366. package/es/tab/TabSfc.less +0 -0
  367. package/es/tab/style/less.js +0 -4
  368. package/es/tab/tab.less +0 -46
  369. package/es/tab-item/TabItemSfc.less +0 -0
  370. package/es/tab-item/style/less.js +0 -4
  371. package/es/tab-item/tabItem.less +0 -6
  372. package/es/table/TableSfc.less +0 -0
  373. package/es/table/style/less.js +0 -4
  374. package/es/table/table.less +0 -110
  375. package/es/tabs/TabsSfc.less +0 -0
  376. package/es/tabs/style/less.js +0 -5
  377. package/es/tabs/tabs.less +0 -99
  378. package/es/tabs-items/TabsItemsSfc.less +0 -0
  379. package/es/tabs-items/style/less.js +0 -3
  380. package/es/themes/style/less.js +0 -0
  381. package/es/time-picker/TimePickerSfc.less +0 -0
  382. package/es/time-picker/style/less.js +0 -4
  383. package/es/time-picker/timePicker.less +0 -237
  384. package/es/uploader/UploaderSfc.less +0 -0
  385. package/es/uploader/style/less.js +0 -8
  386. package/es/uploader/uploader.less +0 -216
  387. package/es/utils/style/less.js +0 -0
  388. package/lib/action-sheet/ActionSheetSfc.less +0 -0
  389. package/lib/action-sheet/actionSheet.less +0 -68
  390. package/lib/action-sheet/style/less.js +0 -6
  391. package/lib/app-bar/AppBarSfc.less +0 -0
  392. package/lib/app-bar/appBar.less +0 -57
  393. package/lib/app-bar/style/less.js +0 -4
  394. package/lib/back-top/BackTopSfc.less +0 -0
  395. package/lib/back-top/backTop.less +0 -27
  396. package/lib/back-top/style/less.js +0 -5
  397. package/lib/badge/BadgeSfc.less +0 -0
  398. package/lib/badge/badge.less +0 -119
  399. package/lib/badge/style/less.js +0 -4
  400. package/lib/bottom-navigation/BottomNavigationSfc.less +0 -0
  401. package/lib/bottom-navigation/bottomNavigation.less +0 -56
  402. package/lib/bottom-navigation/style/less.js +0 -4
  403. package/lib/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
  404. package/lib/bottom-navigation-item/bottomNavigationItem.less +0 -78
  405. package/lib/bottom-navigation-item/style/less.js +0 -6
  406. package/lib/button/ButtonSfc.less +0 -0
  407. package/lib/button/button.less +0 -183
  408. package/lib/button/style/less.js +0 -6
  409. package/lib/card/CardSfc.less +0 -0
  410. package/lib/card/card.less +0 -189
  411. package/lib/card/style/less.js +0 -5
  412. package/lib/cell/CellSfc.less +0 -0
  413. package/lib/cell/cell.less +0 -78
  414. package/lib/cell/style/less.js +0 -4
  415. package/lib/checkbox/CheckboxSfc.less +0 -0
  416. package/lib/checkbox/checkbox.less +0 -78
  417. package/lib/checkbox/style/less.js +0 -6
  418. package/lib/checkbox-group/CheckboxGroupSfc.less +0 -0
  419. package/lib/checkbox-group/checkboxGroup.less +0 -12
  420. package/lib/checkbox-group/style/less.js +0 -4
  421. package/lib/chip/ChipSfc.less +0 -0
  422. package/lib/chip/chip.less +0 -182
  423. package/lib/chip/style/less.js +0 -4
  424. package/lib/col/ColSfc.less +0 -0
  425. package/lib/col/col.less +0 -74
  426. package/lib/col/style/less.js +0 -3
  427. package/lib/collapse/CollapseSfc.less +0 -1
  428. package/lib/collapse/style/less.js +0 -3
  429. package/lib/collapse-item/CollapseItemSfc.less +0 -0
  430. package/lib/collapse-item/collapseItem.less +0 -105
  431. package/lib/collapse-item/style/less.js +0 -4
  432. package/lib/context/style/less.js +0 -0
  433. package/lib/countdown/CountdownSfc.less +0 -0
  434. package/lib/countdown/style/less.js +0 -2
  435. package/lib/counter/CounterSfc.less +0 -0
  436. package/lib/counter/counter.less +0 -89
  437. package/lib/counter/style/less.js +0 -7
  438. package/lib/date-picker/DatePickerSfc.less +0 -0
  439. package/lib/date-picker/date-picker.less +0 -354
  440. package/lib/date-picker/style/less.js +0 -7
  441. package/lib/dialog/DialogSfc.less +0 -0
  442. package/lib/dialog/dialog.less +0 -77
  443. package/lib/dialog/style/less.js +0 -5
  444. package/lib/divider/DividerSfc.less +0 -0
  445. package/lib/divider/divider.less +0 -78
  446. package/lib/divider/style/less.js +0 -3
  447. package/lib/form/FormSfc.less +0 -0
  448. package/lib/form/style/less.js +0 -2
  449. package/lib/form-details/FormDetailsSfc.less +0 -0
  450. package/lib/form-details/formDetails.less +0 -48
  451. package/lib/form-details/style/less.js +0 -3
  452. package/lib/icon/IconSfc.less +0 -0
  453. package/lib/icon/icon.less +0 -26
  454. package/lib/icon/style/less.js +0 -3
  455. package/lib/image/ImageSfc.less +0 -0
  456. package/lib/image/image.less +0 -9
  457. package/lib/image/style/less.js +0 -4
  458. package/lib/image-preview/ImagePreviewSfc.less +0 -0
  459. package/lib/image-preview/imagePreview.less +0 -76
  460. package/lib/image-preview/style/less.js +0 -7
  461. package/lib/index-anchor/IndexAnchorSfc.less +0 -1
  462. package/lib/index-anchor/style/less.js +0 -3
  463. package/lib/index-bar/IndexBarSfc.less +0 -0
  464. package/lib/index-bar/indexBar.less +0 -43
  465. package/lib/index-bar/style/less.js +0 -3
  466. package/lib/input/InputSfc.less +0 -0
  467. package/lib/input/input.less +0 -187
  468. package/lib/input/style/less.js +0 -5
  469. package/lib/lazy/style/less.js +0 -0
  470. package/lib/less.js +0 -64
  471. package/lib/list/ListSfc.less +0 -0
  472. package/lib/list/list.less +0 -63
  473. package/lib/list/style/less.js +0 -5
  474. package/lib/loading/LoadingSfc.less +0 -0
  475. package/lib/loading/loading.less +0 -500
  476. package/lib/loading/style/less.js +0 -3
  477. package/lib/locale/style/less.js +0 -0
  478. package/lib/menu/menu.less +0 -21
  479. package/lib/menu/style/less.js +0 -3
  480. package/lib/option/OptionSfc.less +0 -0
  481. package/lib/option/option.less +0 -37
  482. package/lib/option/style/less.js +0 -6
  483. package/lib/pagination/PaginationSfc.less +0 -0
  484. package/lib/pagination/pagination.less +0 -188
  485. package/lib/pagination/style/less.js +0 -8
  486. package/lib/picker/PickerSfc.less +0 -0
  487. package/lib/picker/picker.less +0 -106
  488. package/lib/picker/style/less.js +0 -5
  489. package/lib/popup/popup.less +0 -125
  490. package/lib/popup/style/less.js +0 -2
  491. package/lib/progress/ProgressSfc.less +0 -0
  492. package/lib/progress/progress.less +0 -101
  493. package/lib/progress/style/less.js +0 -3
  494. package/lib/pull-refresh/PullRefreshSfc.less +0 -0
  495. package/lib/pull-refresh/pullRefresh.less +0 -56
  496. package/lib/pull-refresh/style/less.js +0 -5
  497. package/lib/radio/RadioSfc.less +0 -0
  498. package/lib/radio/radio.less +0 -78
  499. package/lib/radio/style/less.js +0 -6
  500. package/lib/radio-group/RadioGroupSfc.less +0 -0
  501. package/lib/radio-group/radioGroup.less +0 -12
  502. package/lib/radio-group/style/less.js +0 -4
  503. package/lib/rate/RateSfc.less +0 -0
  504. package/lib/rate/rate.less +0 -48
  505. package/lib/rate/style/less.js +0 -6
  506. package/lib/ripple/ripple.less +0 -20
  507. package/lib/ripple/style/less.js +0 -2
  508. package/lib/row/RowSfc.less +0 -0
  509. package/lib/row/row.less +0 -4
  510. package/lib/row/style/less.js +0 -3
  511. package/lib/select/SelectSfc.less +0 -0
  512. package/lib/select/select.less +0 -184
  513. package/lib/select/style/less.js +0 -7
  514. package/lib/skeleton/SkeletonSfc.less +0 -0
  515. package/lib/skeleton/skeleton.less +0 -138
  516. package/lib/skeleton/style/less.js +0 -3
  517. package/lib/slider/SliderSfc.less +0 -0
  518. package/lib/slider/slider.less +0 -147
  519. package/lib/slider/style/less.js +0 -4
  520. package/lib/snackbar/SnackbarSfc.less +0 -0
  521. package/lib/snackbar/coreSfc.less +0 -0
  522. package/lib/snackbar/snackbar.less +0 -129
  523. package/lib/snackbar/style/less.js +0 -8
  524. package/lib/space/space.less +0 -6
  525. package/lib/space/style/less.js +0 -2
  526. package/lib/step/StepSfc.less +0 -0
  527. package/lib/step/step.less +0 -145
  528. package/lib/step/style/less.js +0 -4
  529. package/lib/steps/StepsSfc.less +0 -1
  530. package/lib/steps/style/less.js +0 -2
  531. package/lib/sticky/StickySfc.less +0 -0
  532. package/lib/sticky/sticky.less +0 -8
  533. package/lib/sticky/style/less.js +0 -3
  534. package/lib/style-provider/StyleProviderSfc.less +0 -0
  535. package/lib/style-provider/style/less.js +0 -2
  536. package/lib/styles/common.less +0 -73
  537. package/lib/styles/elevation.less +0 -128
  538. package/lib/styles/style/less.js +0 -0
  539. package/lib/styles/var.css +0 -0
  540. package/lib/styles/var.less +0 -30
  541. package/lib/swipe/SwipeSfc.less +0 -0
  542. package/lib/swipe/style/less.js +0 -3
  543. package/lib/swipe/swipe.less +0 -60
  544. package/lib/swipe-item/SwipeItemSfc.less +0 -0
  545. package/lib/swipe-item/style/less.js +0 -3
  546. package/lib/swipe-item/swipeItem.less +0 -5
  547. package/lib/switch/SwitchSfc.less +0 -0
  548. package/lib/switch/style/less.js +0 -7
  549. package/lib/switch/switch.less +0 -94
  550. package/lib/tab/TabSfc.less +0 -0
  551. package/lib/tab/style/less.js +0 -4
  552. package/lib/tab/tab.less +0 -46
  553. package/lib/tab-item/TabItemSfc.less +0 -0
  554. package/lib/tab-item/style/less.js +0 -4
  555. package/lib/tab-item/tabItem.less +0 -6
  556. package/lib/table/TableSfc.less +0 -0
  557. package/lib/table/style/less.js +0 -4
  558. package/lib/table/table.less +0 -110
  559. package/lib/tabs/TabsSfc.less +0 -0
  560. package/lib/tabs/style/less.js +0 -5
  561. package/lib/tabs/tabs.less +0 -99
  562. package/lib/tabs-items/TabsItemsSfc.less +0 -0
  563. package/lib/tabs-items/style/less.js +0 -3
  564. package/lib/themes/style/less.js +0 -0
  565. package/lib/time-picker/TimePickerSfc.less +0 -0
  566. package/lib/time-picker/style/less.js +0 -4
  567. package/lib/time-picker/timePicker.less +0 -237
  568. package/lib/uploader/UploaderSfc.less +0 -0
  569. package/lib/uploader/style/less.js +0 -8
  570. package/lib/uploader/uploader.less +0 -216
  571. package/lib/utils/style/less.js +0 -0
  572. package/types/global.d.ts +0 -68
@@ -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
@@ -1,5 +1,5 @@
1
- import type { Pack } from '../../types'
2
-
3
- declare const enUS: Pack
4
-
5
- export default enUS
1
+ import type { Pack } from '../../types'
2
+
3
+ declare const enUS: Pack
4
+
5
+ export default enUS
@@ -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,
@@ -1,5 +1,5 @@
1
- import type { Pack } from '../../types'
2
-
3
- declare const zhCN: Pack
4
-
5
- export default zhCN
1
+ import type { Pack } from '../../types'
2
+
3
+ declare const zhCN: Pack
4
+
5
+ export default zhCN
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;}
package/lib/menu/props.js CHANGED
@@ -3,8 +3,12 @@
3
3
  exports.__esModule = true;
4
4
  exports.props = void 0;
5
5
 
6
- function alignmentValidator(alignment) {
7
- return ['top', 'bottom'].includes(alignment);
6
+ function triggerValidator(trigger) {
7
+ return ['click', 'hover'].includes(trigger);
8
+ }
9
+
10
+ function placementValidator(alignment) {
11
+ return ['top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end', 'cover-top', 'cover-top-start', 'cover-top-end', 'cover-bottom', 'cover-bottom-start', 'cover-bottom-end', 'cover-left', 'cover-right'].includes(alignment);
8
12
  }
9
13
 
10
14
  var props = {
@@ -12,10 +16,19 @@ var props = {
12
16
  type: Boolean,
13
17
  default: false
14
18
  },
15
- alignment: {
19
+ disabled: {
20
+ type: Boolean,
21
+ default: false
22
+ },
23
+ trigger: {
16
24
  type: String,
17
- default: 'top',
18
- validator: alignmentValidator
25
+ default: 'click',
26
+ validator: triggerValidator
27
+ },
28
+ placement: {
29
+ type: String,
30
+ default: 'cover-top-start',
31
+ validator: placementValidator
19
32
  },
20
33
  offsetX: {
21
34
  type: [Number, String],
@@ -26,9 +39,13 @@ var props = {
26
39
  default: 0
27
40
  },
28
41
  teleport: {
29
- type: String,
42
+ type: [String, Object],
30
43
  default: 'body'
31
44
  },
45
+ defaultStyle: {
46
+ type: Boolean,
47
+ default: true
48
+ },
32
49
  onOpen: {
33
50
  type: Function
34
51
  },
@@ -1,3 +1,4 @@
1
- require('../../styles/common.css')
2
- require('../../styles/elevation.css')
3
1
  require('../menu.css')
2
+ require('../../styles/elevation.css')
3
+ require('../../styles/common.css')
4
+ require('../MenuSfc.css')