@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
package/es/menu/Menu.js CHANGED
@@ -1,52 +1,162 @@
1
- import { isVNode as _isVNode, withDirectives as _withDirectives, createVNode as _createVNode, vShow as _vShow } from "vue";
1
+ 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); }
2
2
 
3
3
  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); } }
4
4
 
5
5
  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); }); }; }
6
6
 
7
- import { defineComponent, ref, computed, watch, onMounted, onUnmounted, Transition, Teleport, nextTick } from 'vue';
7
+ import flip from '@popperjs/core/lib/modifiers/flip';
8
+ import offset from '@popperjs/core/lib/modifiers/offset';
9
+ import { createPopper } from '@popperjs/core/lib/popper-lite';
10
+ import { call, createNamespace } from '../utils/components';
11
+ import { defineComponent, onMounted, onUnmounted, ref, watch } from 'vue';
8
12
  import { props } from './props';
9
- import { getLeft, getTop, toSizeUnit } from '../utils/elements';
13
+ import { doubleRaf, toPxNum } from '../utils/elements';
10
14
  import { useZIndex } from '../context/zIndex';
11
- import { call, createNamespace, exposeApis, useTeleport } from '../utils/components';
12
-
13
-
14
-
15
-
16
- function _isSlot(s) {
17
- return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
18
- }
19
-
20
15
  var {
21
16
  n,
22
17
  classes
23
18
  } = createNamespace('menu');
19
+ import { renderSlot as _renderSlot, vShow as _vShow, withModifiers as _withModifiers, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, withDirectives as _withDirectives, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, Teleport as _Teleport, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock } from "vue";
20
+ export function render(_ctx, _cache) {
21
+ return _openBlock(), _createElementBlock("div", {
22
+ ref: "host",
23
+ class: _normalizeClass(_ctx.n()),
24
+ onClick: _cache[3] || (_cache[3] = function () {
25
+ return _ctx.handleClick && _ctx.handleClick(...arguments);
26
+ }),
27
+ onMouseenter: _cache[4] || (_cache[4] = function () {
28
+ return _ctx.handleMouseenter && _ctx.handleMouseenter(...arguments);
29
+ }),
30
+ onMouseleave: _cache[5] || (_cache[5] = function () {
31
+ return _ctx.handleMouseleave && _ctx.handleMouseleave(...arguments);
32
+ })
33
+ }, [_renderSlot(_ctx.$slots, "default"), (_openBlock(), _createBlock(_Teleport, {
34
+ to: _ctx.teleport
35
+ }, [_createVNode(_Transition, {
36
+ name: _ctx.n(),
37
+ onAfterEnter: _ctx.onOpened,
38
+ onAfterLeave: _ctx.onClosed
39
+ }, {
40
+ default: _withCtx(() => [_withDirectives(_createElementVNode("div", {
41
+ ref: "menu",
42
+ style: _normalizeStyle({
43
+ zIndex: _ctx.zIndex
44
+ }),
45
+ class: _normalizeClass(_ctx.classes(_ctx.n('menu'), [_ctx.defaultStyle, _ctx.n('--menu-background-color') + " var-elevation--3"])),
46
+ onClick: _cache[0] || (_cache[0] = _withModifiers(() => {}, ["stop"])),
47
+ onMouseenter: _cache[1] || (_cache[1] = function () {
48
+ return _ctx.handleMenuMouseenter && _ctx.handleMenuMouseenter(...arguments);
49
+ }),
50
+ onMouseleave: _cache[2] || (_cache[2] = function () {
51
+ return _ctx.handleMenuMouseleave && _ctx.handleMenuMouseleave(...arguments);
52
+ })
53
+ }, [_renderSlot(_ctx.$slots, "menu")], 38
54
+ /* CLASS, STYLE, HYDRATE_EVENTS */
55
+ ), [[_vShow, _ctx.show]])]),
56
+ _: 3
57
+ /* FORWARDED */
58
+
59
+ }, 8
60
+ /* PROPS */
61
+ , ["name", "onAfterEnter", "onAfterLeave"])], 8
62
+ /* PROPS */
63
+ , ["to"]))], 34
64
+ /* CLASS, HYDRATE_EVENTS */
65
+ );
66
+ }
24
67
  export default defineComponent({
68
+ render,
25
69
  name: 'VarMenu',
26
70
  props,
27
71
 
28
- setup(props, _ref) {
29
- var {
30
- slots
31
- } = _ref;
72
+ setup(props) {
32
73
  var host = ref(null);
33
74
  var menu = ref(null);
34
- var to = ref();
35
- var top = ref(0);
36
- var left = ref(0);
75
+ var show = ref(false);
37
76
  var {
38
77
  zIndex
39
- } = useZIndex(() => props.show, 1);
40
- var {
41
- disabled
42
- } = useTeleport();
78
+ } = useZIndex(() => show.value, 1);
79
+ var popover = null;
43
80
  var clickSelf = false;
81
+ var enterMenu = false;
82
+ var enterHost = false;
83
+ var hostSize = {
84
+ width: 0,
85
+ height: 0
86
+ };
87
+
88
+ var computeHostSize = () => {
89
+ var {
90
+ width,
91
+ height
92
+ } = getComputedStyle(host.value);
93
+ hostSize = {
94
+ width: toPxNum(width),
95
+ height: toPxNum(height)
96
+ };
97
+ };
98
+
99
+ var handleMouseenter = () => {
100
+ if (props.trigger !== 'hover') {
101
+ return;
102
+ }
103
+
104
+ enterHost = true;
105
+ open();
106
+ };
107
+
108
+ var handleMouseleave = /*#__PURE__*/function () {
109
+ var _ref = _asyncToGenerator(function* () {
110
+ if (props.trigger !== 'hover') {
111
+ return;
112
+ }
113
+
114
+ enterHost = false;
115
+ yield doubleRaf();
44
116
 
45
- var computeTop = alignment => {
46
- return alignment === 'top' ? getTop(host.value) : getTop(host.value) - menu.value.offsetHeight;
117
+ if (enterMenu) {
118
+ return;
119
+ }
120
+
121
+ close();
122
+ });
123
+
124
+ return function handleMouseleave() {
125
+ return _ref.apply(this, arguments);
126
+ };
127
+ }();
128
+
129
+ var handleMenuMouseenter = () => {
130
+ if (props.trigger !== 'hover') {
131
+ return;
132
+ }
133
+
134
+ enterMenu = true;
47
135
  };
48
136
 
137
+ var handleMenuMouseleave = /*#__PURE__*/function () {
138
+ var _ref2 = _asyncToGenerator(function* () {
139
+ if (props.trigger !== 'hover') {
140
+ return;
141
+ }
142
+
143
+ enterMenu = false;
144
+ yield doubleRaf();
145
+
146
+ if (enterHost) {
147
+ return;
148
+ }
149
+
150
+ close();
151
+ });
152
+
153
+ return function handleMenuMouseleave() {
154
+ return _ref2.apply(this, arguments);
155
+ };
156
+ }();
157
+
49
158
  var handleClick = () => {
159
+ open();
50
160
  clickSelf = true;
51
161
  };
52
162
 
@@ -56,93 +166,207 @@ export default defineComponent({
56
166
  return;
57
167
  }
58
168
 
59
- if (!props.show) {
60
- return;
169
+ show.value = false;
170
+ call(props['onUpdate:show'], false);
171
+ };
172
+
173
+ var getPosition = () => {
174
+ computeHostSize();
175
+ var offset = {
176
+ x: toPxNum(props.offsetX),
177
+ y: toPxNum(props.offsetY)
178
+ };
179
+
180
+ switch (props.placement) {
181
+ case 'cover-top':
182
+ return {
183
+ placement: 'bottom',
184
+ skidding: offset.x,
185
+ distance: offset.y - hostSize.height
186
+ };
187
+
188
+ case 'cover-top-start':
189
+ return {
190
+ placement: 'bottom-start',
191
+ skidding: offset.x,
192
+ distance: offset.y - hostSize.height
193
+ };
194
+
195
+ case 'cover-top-end':
196
+ return {
197
+ placement: 'bottom-end',
198
+ skidding: offset.x,
199
+ distance: offset.y - hostSize.height
200
+ };
201
+
202
+ case 'cover-bottom':
203
+ return {
204
+ placement: 'top',
205
+ skidding: offset.x,
206
+ distance: -offset.y - hostSize.height
207
+ };
208
+
209
+ case 'cover-bottom-start':
210
+ return {
211
+ placement: 'top-start',
212
+ skidding: offset.x,
213
+ distance: -offset.y - hostSize.height
214
+ };
215
+
216
+ case 'cover-bottom-end':
217
+ return {
218
+ placement: 'top-end',
219
+ skidding: offset.x,
220
+ distance: -offset.y - hostSize.height
221
+ };
222
+
223
+ case 'cover-left':
224
+ return {
225
+ placement: 'right',
226
+ skidding: offset.y,
227
+ distance: offset.x - hostSize.width
228
+ };
229
+
230
+ case 'cover-right':
231
+ return {
232
+ placement: 'left',
233
+ skidding: offset.y,
234
+ distance: -offset.x - hostSize.width
235
+ };
236
+
237
+ case 'left':
238
+ case 'left-start':
239
+ case 'left-end':
240
+ return {
241
+ placement: props.placement,
242
+ skidding: offset.y,
243
+ distance: -offset.x
244
+ };
245
+
246
+ case 'top':
247
+ case 'top-start':
248
+ case 'top-end':
249
+ return {
250
+ placement: props.placement,
251
+ skidding: offset.x,
252
+ distance: -offset.y
253
+ };
254
+
255
+ case 'bottom':
256
+ case 'bottom-start':
257
+ case 'bottom-end':
258
+ return {
259
+ placement: props.placement,
260
+ skidding: offset.x,
261
+ distance: offset.y
262
+ };
263
+
264
+ case 'right':
265
+ case 'right-start':
266
+ case 'right-end':
267
+ return {
268
+ placement: props.placement,
269
+ skidding: offset.y,
270
+ distance: offset.x
271
+ };
61
272
  }
273
+ };
62
274
 
63
- call(props['onUpdate:show'], false);
275
+ var getPopperOptions = () => {
276
+ var {
277
+ placement,
278
+ skidding,
279
+ distance
280
+ } = getPosition();
281
+ return {
282
+ placement,
283
+ modifiers: [_extends({}, flip, {
284
+ enabled: show.value
285
+ }), _extends({}, offset, {
286
+ options: {
287
+ offset: [skidding, distance]
288
+ }
289
+ })]
290
+ };
64
291
  }; // expose
65
292
 
66
293
 
67
294
  var resize = () => {
68
- top.value = computeTop(props.alignment);
69
- left.value = getLeft(host.value);
70
- }; // Transition style use computed place here
295
+ popover.setOptions(getPopperOptions());
296
+ }; // expose
71
297
 
72
298
 
73
- var transitionStyle = computed(() => {
74
- return {
75
- top: "calc(" + top.value + "px + " + toSizeUnit(props.offsetY) + ")",
76
- left: "calc(" + left.value + "px + " + toSizeUnit(props.offsetX) + ")",
77
- zIndex: zIndex.value
78
- };
79
- });
299
+ var open = () => {
300
+ var {
301
+ disabled
302
+ } = props;
80
303
 
81
- var renderTransition = () => _createVNode(Transition, {
82
- "name": n(),
83
- "onAfterEnter": props.onOpened,
84
- "onAfterLeave": props.onClosed
85
- }, {
86
- default: () => [_withDirectives(_createVNode("div", {
87
- "class": classes(n('menu'), 'var-elevation--3'),
88
- "ref": menu,
89
- "style": transitionStyle.value,
90
- "onClick": event => {
91
- event.stopPropagation();
92
- }
93
- }, [call(slots.menu)]), [[_vShow, props.show]])]
94
- });
304
+ if (disabled) {
305
+ return;
306
+ }
95
307
 
96
- watch(() => props.alignment, resize);
97
- watch(() => props.show, /*#__PURE__*/function () {
98
- var _ref2 = _asyncToGenerator(function* (newValue) {
99
- var {
100
- onOpen,
101
- onClose
102
- } = props;
103
-
104
- if (newValue) {
105
- yield nextTick();
106
- resize();
107
- }
308
+ show.value = true;
309
+ call(props['onUpdate:show'], true);
310
+ }; // expose
108
311
 
109
- newValue ? call(onOpen) : call(onClose);
110
- });
111
312
 
112
- return function (_x) {
113
- return _ref2.apply(this, arguments);
114
- };
115
- }());
116
- watch(() => props.teleport, newValue => {
117
- to.value = newValue;
313
+ var close = () => {
314
+ show.value = false;
315
+ call(props['onUpdate:show'], false);
316
+ };
317
+
318
+ watch(() => props.show, newValue => {
319
+ show.value = newValue != null ? newValue : false;
320
+ }, {
321
+ immediate: true
322
+ });
323
+ watch(() => props.offsetX, resize);
324
+ watch(() => props.offsetY, resize);
325
+ watch(() => props.placement, resize);
326
+ watch(() => show.value, newValue => {
327
+ if (newValue) {
328
+ resize();
329
+ call(props.onOpen);
330
+ } else {
331
+ call(props.onClose);
332
+ }
118
333
  });
334
+ watch(() => props.trigger, newValue => {
335
+ if (newValue === 'click') {
336
+ document.addEventListener('click', handleMenuClose);
337
+ } else {
338
+ document.removeEventListener('click', handleMenuClose);
339
+ }
340
+ });
341
+ watch(() => props.disabled, close);
119
342
  onMounted(() => {
120
- // Synchronously transfer the state to the mount hook to support server-side rendering to prevent hydration errors
121
- to.value = props.teleport;
122
- resize();
123
- document.addEventListener('click', handleMenuClose);
124
- window.addEventListener('resize', resize);
343
+ popover = createPopper(host.value, menu.value, getPopperOptions());
344
+
345
+ if (props.trigger === 'click') {
346
+ document.addEventListener('click', handleMenuClose);
347
+ }
125
348
  });
126
349
  onUnmounted(() => {
127
350
  document.removeEventListener('click', handleMenuClose);
128
- window.removeEventListener('resize', resize);
129
- });
130
- exposeApis({
131
- resize
351
+ popover.destroy();
132
352
  });
133
- return () => {
134
- var _slot;
135
-
136
- return _createVNode("div", {
137
- "class": n(),
138
- "ref": host,
139
- "onClick": handleClick
140
- }, [call(slots.default), to.value ? _createVNode(Teleport, {
141
- "to": to.value,
142
- "disabled": disabled.value
143
- }, _isSlot(_slot = renderTransition()) ? _slot : {
144
- default: () => [_slot]
145
- }) : renderTransition()]);
353
+ return {
354
+ menu,
355
+ host,
356
+ hostSize,
357
+ show,
358
+ zIndex,
359
+ n,
360
+ classes,
361
+ handleClick,
362
+ handleMenuClose,
363
+ handleMouseenter,
364
+ handleMouseleave,
365
+ handleMenuMouseenter,
366
+ handleMenuMouseleave,
367
+ resize,
368
+ open,
369
+ close
146
370
  };
147
371
  }
148
372
 
package/es/menu/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import Menu from './Menu';
1
+ import Menu from './Menu.js'
2
2
 
3
3
  Menu.install = function (app) {
4
4
  app.component(Menu.name, Menu);
package/es/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/es/menu/props.js CHANGED
@@ -1,5 +1,9 @@
1
- function alignmentValidator(alignment) {
2
- return ['top', 'bottom'].includes(alignment);
1
+ function triggerValidator(trigger) {
2
+ return ['click', 'hover'].includes(trigger);
3
+ }
4
+
5
+ function placementValidator(alignment) {
6
+ 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);
3
7
  }
4
8
 
5
9
  export var props = {
@@ -7,10 +11,19 @@ export var props = {
7
11
  type: Boolean,
8
12
  default: false
9
13
  },
10
- alignment: {
14
+ disabled: {
15
+ type: Boolean,
16
+ default: false
17
+ },
18
+ trigger: {
11
19
  type: String,
12
- default: 'top',
13
- validator: alignmentValidator
20
+ default: 'click',
21
+ validator: triggerValidator
22
+ },
23
+ placement: {
24
+ type: String,
25
+ default: 'cover-top-start',
26
+ validator: placementValidator
14
27
  },
15
28
  offsetX: {
16
29
  type: [Number, String],
@@ -21,9 +34,13 @@ export var props = {
21
34
  default: 0
22
35
  },
23
36
  teleport: {
24
- type: String,
37
+ type: [String, Object],
25
38
  default: 'body'
26
39
  },
40
+ defaultStyle: {
41
+ type: Boolean,
42
+ default: true
43
+ },
27
44
  onOpen: {
28
45
  type: Function
29
46
  },
@@ -1,3 +1,4 @@
1
- import '../../styles/common.css'
2
- import '../../styles/elevation.css'
3
1
  import '../menu.css'
2
+ import '../../styles/elevation.css'
3
+ import '../../styles/common.css'
4
+ import '../MenuSfc.css'
@@ -12,7 +12,7 @@ var {
12
12
  n,
13
13
  classes
14
14
  } = createNamespace('pagination');
15
- import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, withKeys as _withKeys, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createTextVNode as _createTextVNode, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
15
+ import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, withKeys as _withKeys, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
16
16
 
17
17
  var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
18
18
 
@@ -51,9 +51,13 @@ export function render(_ctx, _cache) {
51
51
  onKeydown: _cache[3] || (_cache[3] = _withKeys($event => _ctx.setPage('simple', _ctx.simpleValue, $event), ["enter"]))
52
52
  }, null, 8
53
53
  /* PROPS */
54
- , ["modelValue", "disabled"]), _createElementVNode("span", null, "/ " + _toDisplayString(_ctx.pageCount), 1
54
+ , ["modelValue", "disabled"]), _createElementVNode("span", null, [_createTextVNode(" / " + _toDisplayString(_ctx.pageCount) + " ", 1
55
55
  /* TEXT */
56
- )], 2
56
+ ), _createElementVNode("div", {
57
+ class: _normalizeClass(_ctx.n('simple-line'))
58
+ }, null, 2
59
+ /* CLASS */
60
+ )])], 2
57
61
  /* CLASS */
58
62
  )) : (_openBlock(true), _createElementBlock(_Fragment, {
59
63
  key: 1
@@ -1 +1 @@
1
- :root { --pagination-font-size: var(--font-size-md); --pagination-active-color: #fff; --pagination-active-bg-color: var(--color-primary); --pagination-hover-bg-color: #edf5ff; --pagination-total-margin: 0 12px; --pagination-total-line-height: 24px; --pagination-item-width: 32px; --pagination-item-height: 32px; --pagination-item-margin: 0 6px; --pagination-item-background: #fff; --pagination-item-border-radius: 4px; --pagination-list-bg-color: #fff; --pagination-list-active-bg-color: #edf5ff; --pagination-list-active-color: var(--color-primary); --pagination-input-width: 32px; --pagination-simple-padding: 0 0 2px 0; --pagination-disabled-color: var(--color-text-disabled); --pagination-bg-disabled-color: var(--color-disabled); --pagination-size-line-height: 24px;}.pagination-flex-nowrap { display: flex; white-space: nowrap; align-items: center;}.var-pagination { display: flex; align-items: center; list-style: none; width: 100%; margin: 0; font-size: var(--pagination-font-size); padding: 0;}.var-pagination__item { display: inline-flex; min-width: var(--pagination-item-width); align-items: center; justify-content: center; margin: var(--pagination-item-margin); height: var(--pagination-item-height); cursor: pointer; border-radius: var(--pagination-item-border-radius); outline: none; transition: all 0.25s; user-select: none; background-color: var(--pagination-item-background);}.var-pagination__item:hover { background-color: var(--pagination-hover-bg-color);}.var-pagination__item--active { color: var(--pagination-active-color); background-color: var(--pagination-active-bg-color) !important;}.var-pagination__item--hide { display: none;}.var-pagination__item--disabled { cursor: default; color: var(--pagination-disabled-color); background-color: unset;}.var-pagination__item--disabled:hover { background-color: unset;}.var-pagination__item--disabled--hover:hover { background-color: inherit;}.var-pagination__item--disabled--active { background-color: var(--pagination-bg-disabled-color);}.var-pagination__item--disabled--active:hover { background-color: var(--pagination-bg-disabled-color);}.var-pagination__prev { margin-left: 0;}.var-pagination__total { display: flex; white-space: nowrap; align-items: center; line-height: var(--pagination-total-line-height); margin: var(--pagination-total-margin);}.var-pagination__size { display: flex; white-space: nowrap; align-items: center; line-height: var(--pagination-size-line-height); margin: var(--pagination-item-margin);}.var-pagination__size--open { display: flex; align-items: center; cursor: pointer;}.var-pagination__size--open--disabled { cursor: default;}.var-pagination__list { background-color: var(--pagination-list-bg-color); cursor: pointer; transition: all 0.25s;}.var-pagination__list:hover { color: var(--pagination-list-active-color); background-color: var(--pagination-hover-bg-color);}.var-pagination__list--active { background-color: var(--pagination-list-active-bg-color) !important; color: var(--pagination-list-active-color);}.var-pagination__quickly,.var-pagination__simple { display: flex; white-space: nowrap; align-items: center;}.var-pagination__quickly [var-pagination-cover],.var-pagination__simple [var-pagination-cover] { width: var(--pagination-input-width);}.var-pagination__quickly [var-pagination-cover] .var-input__wrap,.var-pagination__simple [var-pagination-cover] .var-input__wrap { padding: 0;}.var-pagination__quickly [var-pagination-cover] .var-input__input,.var-pagination__simple [var-pagination-cover] .var-input__input { height: auto; text-align: center;}.var-pagination__quickly { margin: var(--pagination-item-margin);}.var-pagination__quickly [var-pagination-cover] { margin-left: 6px;}.var-pagination__size--open-icon[var-pagination-cover] { font-size: inherit;}.var-pagination--simple-padding { padding: var(--pagination-simple-padding);}
1
+ :root { --pagination-font-size: var(--font-size-md); --pagination-active-color: #fff; --pagination-active-bg-color: var(--color-primary); --pagination-hover-bg-color: #edf5ff; --pagination-total-margin: 0 12px; --pagination-total-line-height: 24px; --pagination-item-width: 32px; --pagination-item-height: 32px; --pagination-item-margin: 0 6px; --pagination-item-background: #fff; --pagination-item-border-radius: 4px; --pagination-list-bg-color: #fff; --pagination-list-active-bg-color: #edf5ff; --pagination-list-active-color: var(--color-primary); --pagination-input-width: 32px; --pagination-simple-padding: 0 0 2px 0; --pagination-disabled-color: var(--color-text-disabled); --pagination-bg-disabled-color: var(--color-disabled); --pagination-size-line-height: 24px;}.pagination-flex-nowrap { display: flex; white-space: nowrap; align-items: center;}.var-pagination { display: flex; align-items: center; list-style: none; width: 100%; margin: 0; font-size: var(--pagination-font-size); padding: 0;}.var-pagination__item { display: inline-flex; min-width: var(--pagination-item-width); align-items: center; justify-content: center; margin: var(--pagination-item-margin); height: var(--pagination-item-height); cursor: pointer; border-radius: var(--pagination-item-border-radius); outline: none; transition: all 0.25s; user-select: none; background-color: var(--pagination-item-background);}.var-pagination__item:hover { background-color: var(--pagination-hover-bg-color);}.var-pagination__item--active { color: var(--pagination-active-color); background-color: var(--pagination-active-bg-color) !important;}.var-pagination__item--hide { display: none;}.var-pagination__item--disabled { cursor: default; color: var(--pagination-disabled-color); background-color: unset;}.var-pagination__item--disabled:hover { background-color: unset;}.var-pagination__item--disabled--hover:hover { background-color: inherit;}.var-pagination__item--disabled--active { background-color: var(--pagination-bg-disabled-color);}.var-pagination__item--disabled--active:hover { background-color: var(--pagination-bg-disabled-color);}.var-pagination__prev { margin-left: 0;}.var-pagination__total { display: flex; white-space: nowrap; align-items: center; line-height: var(--pagination-total-line-height); margin: var(--pagination-total-margin);}.var-pagination__size { display: flex; white-space: nowrap; align-items: center; line-height: var(--pagination-size-line-height); margin: var(--pagination-item-margin);}.var-pagination__size--open { display: flex; align-items: center; cursor: pointer;}.var-pagination__size--open--disabled { cursor: default;}.var-pagination__list { background-color: var(--pagination-list-bg-color); cursor: pointer; transition: all 0.25s;}.var-pagination__list:hover { color: var(--pagination-list-active-color); background-color: var(--pagination-hover-bg-color);}.var-pagination__list--active { background-color: var(--pagination-list-active-bg-color) !important; color: var(--pagination-list-active-color);}.var-pagination__quickly,.var-pagination__simple { display: flex; white-space: nowrap; align-items: center;}.var-pagination__quickly [var-pagination-cover],.var-pagination__simple [var-pagination-cover] { width: var(--pagination-input-width);}.var-pagination__quickly [var-pagination-cover] .var-input__wrap,.var-pagination__simple [var-pagination-cover] .var-input__wrap { padding: 0;}.var-pagination__quickly [var-pagination-cover] .var-input__input,.var-pagination__simple [var-pagination-cover] .var-input__input { height: auto; text-align: center;}.var-pagination__quickly-line,.var-pagination__simple-line { height: 1px; background: transparent;}.var-pagination__quickly { margin: var(--pagination-item-margin);}.var-pagination__quickly [var-pagination-cover] { margin-left: 6px;}.var-pagination__size--open-icon[var-pagination-cover] { font-size: inherit;}.var-pagination--simple-padding { padding: var(--pagination-simple-padding);}
@@ -1,4 +1,4 @@
1
- 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); }
1
+ 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); }
2
2
 
3
3
  import { pickProps } from '../utils/components';
4
4
  import { props as popupProps } from '../popup/props';
package/es/popup/Popup.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { isVNode as _isVNode, withDirectives as _withDirectives, vShow as _vShow, mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
2
2
 
3
- 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); }
3
+ 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); }
4
4
 
5
5
  import { defineComponent, watch, Transition, Teleport } from 'vue';
6
6
  import { props } from './props';
7
7
  import { useLock } from '../context/lock';
8
8
  import { useZIndex } from '../context/zIndex';
9
- import { addRouteListener, useTeleport, createNamespace } from '../utils/components';
9
+ import { useRouteListener, useTeleport, createNamespace } from '../utils/components';
10
10
 
11
11
 
12
12
 
@@ -60,7 +60,7 @@ export default defineComponent({
60
60
  newValue ? onOpen == null ? void 0 : onOpen() : onClose == null ? void 0 : onClose();
61
61
  }); // internal for Dialog
62
62
 
63
- addRouteListener(() => props.onRouteChange == null ? void 0 : props.onRouteChange());
63
+ useRouteListener(() => props.onRouteChange == null ? void 0 : props.onRouteChange());
64
64
 
65
65
  var renderOverlay = () => {
66
66
  var {