@varlet/ui 1.23.4 → 1.23.7

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 (635) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/es/action-sheet/index.js +1 -1
  3. package/es/back-top/BackTop.js +2 -2
  4. package/es/date-picker/date-picker.css +1 -1
  5. package/es/date-picker/date-picker.less +7 -3
  6. package/es/date-picker/src/day-picker-panel.js +5 -5
  7. package/es/date-picker/src/month-picker-panel.js +5 -5
  8. package/es/date-picker/src/panel-header.js +4 -11
  9. package/es/dialog/index.js +1 -1
  10. package/es/image-preview/index.js +1 -1
  11. package/es/index.d.ts +1 -0
  12. package/es/input/Input.js +36 -13
  13. package/es/list/List.js +1 -1
  14. package/es/loading/Loading.js +15 -5
  15. package/es/loading/props.js +1 -2
  16. package/es/popup/Popup.js +81 -59
  17. package/es/popup/index.js +1 -1
  18. package/es/popup/style/index.js +0 -1
  19. package/es/popup/style/less.js +0 -1
  20. package/es/pull-refresh/PullRefresh.js +1 -1
  21. package/es/sticky/Sticky.js +1 -1
  22. package/es/themes/dark/index.d.ts +5 -0
  23. package/es/utils/components.js +7 -0
  24. package/es/utils/elements.js +2 -2
  25. package/es/utils/shared.js +1 -1
  26. package/highlight/attributes.json +4 -0
  27. package/highlight/tags.json +2 -1
  28. package/highlight/web-types.json +10 -1
  29. package/lib/action-sheet/ActionSheet.js +149 -0
  30. package/{es/popup/PopupSfc.css → lib/action-sheet/ActionSheetSfc.css} +0 -0
  31. package/{es/popup/PopupSfc.less → lib/action-sheet/ActionSheetSfc.less} +0 -0
  32. package/lib/action-sheet/actionSheet.css +1 -0
  33. package/lib/action-sheet/actionSheet.less +68 -0
  34. package/lib/action-sheet/index.js +79 -0
  35. package/lib/action-sheet/props.js +37 -0
  36. package/lib/action-sheet/style/index.js +6 -0
  37. package/lib/action-sheet/style/less.js +6 -0
  38. package/lib/app-bar/AppBar.js +66 -0
  39. package/lib/app-bar/AppBarSfc.css +0 -0
  40. package/lib/app-bar/AppBarSfc.less +0 -0
  41. package/lib/app-bar/appBar.css +1 -0
  42. package/lib/app-bar/appBar.less +56 -0
  43. package/lib/app-bar/index.js +17 -0
  44. package/lib/app-bar/props.js +32 -0
  45. package/lib/app-bar/style/index.js +4 -0
  46. package/lib/app-bar/style/less.js +4 -0
  47. package/lib/back-top/BackTop.js +96 -0
  48. package/lib/back-top/BackTopSfc.css +0 -0
  49. package/lib/back-top/BackTopSfc.less +0 -0
  50. package/lib/back-top/backTop.css +1 -0
  51. package/lib/back-top/backTop.less +27 -0
  52. package/lib/back-top/index.js +17 -0
  53. package/lib/back-top/props.js +21 -0
  54. package/lib/back-top/style/index.js +5 -0
  55. package/lib/back-top/style/less.js +5 -0
  56. package/lib/badge/Badge.js +107 -0
  57. package/lib/badge/BadgeSfc.css +0 -0
  58. package/lib/badge/BadgeSfc.less +0 -0
  59. package/lib/badge/badge.css +1 -0
  60. package/lib/badge/badge.less +119 -0
  61. package/lib/badge/index.js +17 -0
  62. package/lib/badge/props.js +55 -0
  63. package/lib/badge/style/index.js +4 -0
  64. package/lib/badge/style/less.js +4 -0
  65. package/lib/button/Button.js +102 -0
  66. package/lib/button/ButtonSfc.css +0 -0
  67. package/lib/button/ButtonSfc.less +0 -0
  68. package/lib/button/button.css +1 -0
  69. package/lib/button/button.less +183 -0
  70. package/lib/button/index.js +17 -0
  71. package/lib/button/props.js +76 -0
  72. package/lib/button/style/index.js +6 -0
  73. package/lib/button/style/less.js +6 -0
  74. package/lib/card/Card.js +83 -0
  75. package/lib/card/CardSfc.css +0 -0
  76. package/lib/card/CardSfc.less +0 -0
  77. package/lib/card/card.css +1 -0
  78. package/lib/card/card.less +84 -0
  79. package/lib/card/index.js +17 -0
  80. package/lib/card/props.js +45 -0
  81. package/lib/card/style/index.js +5 -0
  82. package/lib/card/style/less.js +5 -0
  83. package/lib/cell/Cell.js +68 -0
  84. package/lib/cell/CellSfc.css +0 -0
  85. package/lib/cell/CellSfc.less +0 -0
  86. package/lib/cell/cell.css +1 -0
  87. package/lib/cell/cell.less +74 -0
  88. package/lib/cell/index.js +17 -0
  89. package/lib/cell/props.js +32 -0
  90. package/lib/cell/style/index.js +4 -0
  91. package/lib/cell/style/less.js +4 -0
  92. package/lib/checkbox/Checkbox.js +232 -0
  93. package/lib/checkbox/CheckboxSfc.css +0 -0
  94. package/lib/checkbox/CheckboxSfc.less +0 -0
  95. package/lib/checkbox/checkbox.css +1 -0
  96. package/lib/checkbox/checkbox.less +78 -0
  97. package/lib/checkbox/index.js +17 -0
  98. package/lib/checkbox/props.js +56 -0
  99. package/lib/checkbox/provide.js +23 -0
  100. package/lib/checkbox/style/index.js +5 -0
  101. package/lib/checkbox/style/less.js +5 -0
  102. package/lib/checkbox-group/CheckboxGroup.js +181 -0
  103. package/lib/checkbox-group/CheckboxGroupSfc.css +0 -0
  104. package/lib/checkbox-group/CheckboxGroupSfc.less +0 -0
  105. package/lib/checkbox-group/checkboxGroup.css +1 -0
  106. package/lib/checkbox-group/checkboxGroup.less +12 -0
  107. package/lib/checkbox-group/index.js +17 -0
  108. package/lib/checkbox-group/props.js +38 -0
  109. package/lib/checkbox-group/provide.js +27 -0
  110. package/lib/checkbox-group/style/index.js +4 -0
  111. package/lib/checkbox-group/style/less.js +4 -0
  112. package/lib/chip/Chip.js +95 -0
  113. package/lib/chip/ChipSfc.css +0 -0
  114. package/lib/chip/ChipSfc.less +0 -0
  115. package/lib/chip/chip.css +1 -0
  116. package/lib/chip/chip.less +182 -0
  117. package/lib/chip/index.js +17 -0
  118. package/lib/chip/props.js +56 -0
  119. package/lib/chip/style/index.js +4 -0
  120. package/lib/chip/style/less.js +4 -0
  121. package/lib/col/Col.js +68 -0
  122. package/lib/col/ColSfc.css +0 -0
  123. package/lib/col/ColSfc.less +0 -0
  124. package/lib/col/col.css +1 -0
  125. package/lib/col/col.less +17 -0
  126. package/lib/col/index.js +17 -0
  127. package/lib/col/props.js +18 -0
  128. package/lib/col/provide.js +28 -0
  129. package/lib/col/style/index.js +3 -0
  130. package/lib/col/style/less.js +3 -0
  131. package/lib/collapse/Collapse.js +126 -0
  132. package/lib/collapse/CollapseSfc.css +1 -0
  133. package/lib/collapse/CollapseSfc.less +1 -0
  134. package/lib/collapse/index.js +17 -0
  135. package/lib/collapse/props.js +24 -0
  136. package/lib/collapse/provide.js +27 -0
  137. package/lib/collapse/style/index.js +3 -0
  138. package/lib/collapse/style/less.js +3 -0
  139. package/lib/collapse-item/CollapseItem.js +155 -0
  140. package/lib/collapse-item/CollapseItemSfc.css +0 -0
  141. package/lib/collapse-item/CollapseItemSfc.less +0 -0
  142. package/lib/collapse-item/collapseItem.css +1 -0
  143. package/lib/collapse-item/collapseItem.less +105 -0
  144. package/lib/collapse-item/index.js +17 -0
  145. package/lib/collapse-item/props.js +21 -0
  146. package/lib/collapse-item/provide.js +28 -0
  147. package/lib/collapse-item/style/index.js +4 -0
  148. package/lib/collapse-item/style/less.js +4 -0
  149. package/lib/context/index.js +20 -0
  150. package/lib/context/lock.js +107 -0
  151. package/lib/context/style/index.js +0 -0
  152. package/lib/context/style/less.js +0 -0
  153. package/lib/context/zIndex.js +25 -0
  154. package/lib/countdown/Countdown.js +119 -0
  155. package/lib/countdown/CountdownSfc.css +0 -0
  156. package/lib/countdown/CountdownSfc.less +0 -0
  157. package/lib/countdown/index.js +17 -0
  158. package/lib/countdown/props.js +25 -0
  159. package/lib/countdown/style/index.js +2 -0
  160. package/lib/countdown/style/less.js +2 -0
  161. package/lib/counter/Counter.js +387 -0
  162. package/lib/counter/CounterSfc.css +0 -0
  163. package/lib/counter/CounterSfc.less +0 -0
  164. package/lib/counter/counter.css +1 -0
  165. package/lib/counter/counter.less +85 -0
  166. package/lib/counter/index.js +17 -0
  167. package/lib/counter/props.js +98 -0
  168. package/lib/counter/provide.js +3 -0
  169. package/lib/counter/style/index.js +7 -0
  170. package/lib/counter/style/less.js +7 -0
  171. package/lib/date-picker/DatePicker.js +469 -0
  172. package/lib/date-picker/DatePickerSfc.css +0 -0
  173. package/lib/date-picker/DatePickerSfc.less +0 -0
  174. package/lib/date-picker/date-picker.css +1 -0
  175. package/lib/date-picker/date-picker.less +334 -0
  176. package/lib/date-picker/index.js +17 -0
  177. package/lib/date-picker/props.js +107 -0
  178. package/lib/date-picker/src/day-picker-panel.js +355 -0
  179. package/lib/date-picker/src/month-picker-panel.js +289 -0
  180. package/lib/date-picker/src/panel-header.js +145 -0
  181. package/lib/date-picker/src/year-picker-panel.js +112 -0
  182. package/lib/date-picker/style/index.js +5 -0
  183. package/lib/date-picker/style/less.js +5 -0
  184. package/lib/dialog/Dialog.js +214 -0
  185. package/lib/dialog/DialogSfc.css +0 -0
  186. package/lib/dialog/DialogSfc.less +0 -0
  187. package/lib/dialog/dialog.css +1 -0
  188. package/lib/dialog/dialog.less +77 -0
  189. package/lib/dialog/index.js +85 -0
  190. package/lib/dialog/props.js +73 -0
  191. package/lib/dialog/style/index.js +5 -0
  192. package/lib/dialog/style/less.js +5 -0
  193. package/lib/divider/Divider.js +88 -0
  194. package/lib/divider/DividerSfc.css +0 -0
  195. package/lib/divider/DividerSfc.less +0 -0
  196. package/lib/divider/divider.css +1 -0
  197. package/lib/divider/divider.less +79 -0
  198. package/lib/divider/index.js +17 -0
  199. package/lib/divider/props.js +25 -0
  200. package/lib/divider/style/index.js +3 -0
  201. package/lib/divider/style/less.js +3 -0
  202. package/lib/form/Form.js +77 -0
  203. package/lib/form/FormSfc.css +0 -0
  204. package/lib/form/FormSfc.less +0 -0
  205. package/lib/form/index.js +17 -0
  206. package/lib/form/props.js +15 -0
  207. package/lib/form/provide.js +33 -0
  208. package/lib/form/style/index.js +2 -0
  209. package/lib/form/style/less.js +2 -0
  210. package/lib/form-details/FormDetails.js +45 -0
  211. package/lib/form-details/FormDetailsSfc.css +0 -0
  212. package/lib/form-details/FormDetailsSfc.less +0 -0
  213. package/lib/form-details/formDetails.css +1 -0
  214. package/lib/form-details/formDetails.less +48 -0
  215. package/lib/form-details/index.js +17 -0
  216. package/lib/form-details/props.js +15 -0
  217. package/lib/form-details/style/index.js +3 -0
  218. package/lib/form-details/style/less.js +3 -0
  219. package/lib/icon/Icon.js +83 -0
  220. package/lib/icon/IconSfc.css +0 -0
  221. package/lib/icon/IconSfc.less +0 -0
  222. package/lib/icon/icon.css +1 -0
  223. package/lib/icon/icon.less +25 -0
  224. package/lib/icon/index.js +17 -0
  225. package/lib/icon/props.js +27 -0
  226. package/lib/icon/style/index.js +3 -0
  227. package/lib/icon/style/less.js +3 -0
  228. package/lib/image/Image.js +113 -0
  229. package/lib/image/ImageSfc.css +0 -0
  230. package/lib/image/ImageSfc.less +0 -0
  231. package/lib/image/image.css +1 -0
  232. package/lib/image/image.less +9 -0
  233. package/lib/image/index.js +17 -0
  234. package/lib/image/props.js +60 -0
  235. package/lib/image/style/index.js +4 -0
  236. package/lib/image/style/less.js +4 -0
  237. package/lib/image-preview/ImagePreview.js +369 -0
  238. package/lib/image-preview/ImagePreviewSfc.css +0 -0
  239. package/lib/image-preview/ImagePreviewSfc.less +0 -0
  240. package/lib/image-preview/imagePreview.css +1 -0
  241. package/lib/image-preview/imagePreview.less +66 -0
  242. package/lib/image-preview/index.js +74 -0
  243. package/lib/image-preview/props.js +40 -0
  244. package/lib/image-preview/style/index.js +7 -0
  245. package/lib/image-preview/style/less.js +7 -0
  246. package/lib/index-anchor/IndexAnchor.js +99 -0
  247. package/lib/index-anchor/IndexAnchorSfc.css +1 -0
  248. package/lib/index-anchor/IndexAnchorSfc.less +1 -0
  249. package/lib/index-anchor/index.js +17 -0
  250. package/lib/index-anchor/props.js +10 -0
  251. package/lib/index-anchor/provide.js +28 -0
  252. package/lib/index-anchor/style/index.js +3 -0
  253. package/lib/index-anchor/style/less.js +3 -0
  254. package/lib/index-bar/IndexBar.js +186 -0
  255. package/lib/index-bar/IndexBarSfc.css +0 -0
  256. package/lib/index-bar/IndexBarSfc.less +0 -0
  257. package/lib/index-bar/index.js +17 -0
  258. package/lib/index-bar/indexBar.css +1 -0
  259. package/lib/index-bar/indexBar.less +43 -0
  260. package/lib/index-bar/props.js +40 -0
  261. package/lib/index-bar/provide.js +27 -0
  262. package/lib/index-bar/style/index.js +3 -0
  263. package/lib/index-bar/style/less.js +3 -0
  264. package/lib/index.d.ts +1 -0
  265. package/lib/index.js +195 -0
  266. package/lib/input/Input.js +327 -0
  267. package/lib/input/InputSfc.css +0 -0
  268. package/lib/input/InputSfc.less +0 -0
  269. package/lib/input/index.js +17 -0
  270. package/lib/input/input.css +1 -0
  271. package/lib/input/input.less +183 -0
  272. package/lib/input/props.js +96 -0
  273. package/lib/input/provide.js +3 -0
  274. package/lib/input/style/index.js +5 -0
  275. package/lib/input/style/less.js +5 -0
  276. package/lib/lazy/index.js +247 -0
  277. package/lib/lazy/style/index.js +0 -0
  278. package/lib/lazy/style/less.js +0 -0
  279. package/lib/less.js +62 -0
  280. package/lib/list/List.js +157 -0
  281. package/lib/list/ListSfc.css +0 -0
  282. package/lib/list/ListSfc.less +0 -0
  283. package/lib/list/index.js +17 -0
  284. package/lib/list/list.css +1 -0
  285. package/lib/list/list.less +63 -0
  286. package/lib/list/props.js +45 -0
  287. package/lib/list/style/index.js +5 -0
  288. package/lib/list/style/less.js +5 -0
  289. package/lib/loading/Loading.js +103 -0
  290. package/lib/loading/LoadingSfc.css +0 -0
  291. package/lib/loading/LoadingSfc.less +0 -0
  292. package/lib/loading/index.js +17 -0
  293. package/lib/loading/loading.css +1 -0
  294. package/lib/loading/loading.less +420 -0
  295. package/lib/loading/props.js +38 -0
  296. package/lib/loading/style/index.js +3 -0
  297. package/lib/loading/style/less.js +3 -0
  298. package/lib/locale/en-US.js +107 -0
  299. package/lib/locale/index.js +83 -0
  300. package/lib/locale/style/index.js +0 -0
  301. package/lib/locale/style/less.js +0 -0
  302. package/lib/locale/zh-CN.js +107 -0
  303. package/lib/menu/Menu.js +144 -0
  304. package/lib/menu/MenuSfc.css +0 -0
  305. package/lib/menu/MenuSfc.less +0 -0
  306. package/lib/menu/index.js +17 -0
  307. package/lib/menu/menu.css +1 -0
  308. package/lib/menu/menu.less +21 -0
  309. package/lib/menu/props.js +48 -0
  310. package/lib/menu/style/index.js +4 -0
  311. package/lib/menu/style/less.js +4 -0
  312. package/lib/option/Option.js +125 -0
  313. package/lib/option/OptionSfc.css +0 -0
  314. package/lib/option/OptionSfc.less +0 -0
  315. package/lib/option/index.js +17 -0
  316. package/lib/option/option.css +1 -0
  317. package/lib/option/option.less +37 -0
  318. package/lib/option/props.js +9 -0
  319. package/lib/option/provide.js +28 -0
  320. package/lib/option/style/index.js +6 -0
  321. package/lib/option/style/less.js +6 -0
  322. package/lib/pagination/Pagination.js +373 -0
  323. package/lib/pagination/PaginationSfc.css +0 -0
  324. package/lib/pagination/PaginationSfc.less +0 -0
  325. package/lib/pagination/index.js +17 -0
  326. package/lib/pagination/pagination.css +1 -0
  327. package/lib/pagination/pagination.less +178 -0
  328. package/lib/pagination/porps.js +48 -0
  329. package/lib/pagination/style/index.js +8 -0
  330. package/lib/pagination/style/less.js +8 -0
  331. package/lib/picker/Picker.js +446 -0
  332. package/lib/picker/PickerSfc.css +0 -0
  333. package/lib/picker/PickerSfc.less +0 -0
  334. package/lib/picker/index.js +98 -0
  335. package/lib/picker/picker.css +1 -0
  336. package/lib/picker/picker.less +103 -0
  337. package/lib/picker/props.js +68 -0
  338. package/lib/picker/style/index.js +5 -0
  339. package/lib/picker/style/less.js +5 -0
  340. package/lib/popup/Popup.js +141 -0
  341. package/lib/popup/index.js +17 -0
  342. package/lib/popup/popup.css +1 -0
  343. package/lib/popup/popup.less +125 -0
  344. package/lib/popup/props.js +67 -0
  345. package/lib/popup/style/index.js +2 -0
  346. package/lib/popup/style/less.js +2 -0
  347. package/lib/progress/Progress.js +154 -0
  348. package/lib/progress/ProgressSfc.css +0 -0
  349. package/lib/progress/ProgressSfc.less +0 -0
  350. package/lib/progress/index.js +17 -0
  351. package/lib/progress/progress.css +1 -0
  352. package/lib/progress/progress.less +98 -0
  353. package/lib/progress/props.js +61 -0
  354. package/lib/progress/style/index.js +3 -0
  355. package/lib/progress/style/less.js +3 -0
  356. package/lib/pull-refresh/PullRefresh.js +150 -0
  357. package/lib/pull-refresh/PullRefreshSfc.css +0 -0
  358. package/lib/pull-refresh/PullRefreshSfc.less +0 -0
  359. package/lib/pull-refresh/index.js +17 -0
  360. package/lib/pull-refresh/props.js +47 -0
  361. package/lib/pull-refresh/pullRefresh.css +1 -0
  362. package/lib/pull-refresh/pullRefresh.less +55 -0
  363. package/lib/pull-refresh/style/index.js +5 -0
  364. package/lib/pull-refresh/style/less.js +5 -0
  365. package/lib/radio/Radio.js +231 -0
  366. package/lib/radio/RadioSfc.css +0 -0
  367. package/lib/radio/RadioSfc.less +0 -0
  368. package/lib/radio/index.js +17 -0
  369. package/lib/radio/props.js +56 -0
  370. package/lib/radio/provide.js +23 -0
  371. package/lib/radio/radio.css +1 -0
  372. package/lib/radio/radio.less +78 -0
  373. package/lib/radio/style/index.js +6 -0
  374. package/lib/radio/style/less.js +6 -0
  375. package/lib/radio-group/RadioGroup.js +122 -0
  376. package/lib/radio-group/RadioGroupSfc.css +0 -0
  377. package/lib/radio-group/RadioGroupSfc.less +0 -0
  378. package/lib/radio-group/index.js +17 -0
  379. package/lib/radio-group/props.js +35 -0
  380. package/lib/radio-group/provide.js +27 -0
  381. package/lib/radio-group/radioGroup.css +1 -0
  382. package/lib/radio-group/radioGroup.less +12 -0
  383. package/lib/radio-group/style/index.js +4 -0
  384. package/lib/radio-group/style/less.js +4 -0
  385. package/lib/rate/Rate.js +235 -0
  386. package/lib/rate/RateSfc.css +0 -0
  387. package/lib/rate/RateSfc.less +0 -0
  388. package/lib/rate/index.js +17 -0
  389. package/lib/rate/props.js +69 -0
  390. package/lib/rate/provide.js +3 -0
  391. package/lib/rate/rate.css +1 -0
  392. package/lib/rate/rate.less +35 -0
  393. package/lib/rate/style/index.js +6 -0
  394. package/lib/rate/style/less.js +6 -0
  395. package/lib/ripple/index.js +187 -0
  396. package/lib/ripple/ripple.css +1 -0
  397. package/lib/ripple/ripple.less +17 -0
  398. package/lib/ripple/style/index.js +2 -0
  399. package/lib/ripple/style/less.js +2 -0
  400. package/lib/row/Row.js +102 -0
  401. package/lib/row/RowSfc.css +0 -0
  402. package/lib/row/RowSfc.less +0 -0
  403. package/lib/row/index.js +17 -0
  404. package/lib/row/props.js +33 -0
  405. package/lib/row/provide.js +27 -0
  406. package/lib/row/row.css +1 -0
  407. package/lib/row/row.less +4 -0
  408. package/lib/row/style/index.js +3 -0
  409. package/lib/row/style/less.js +3 -0
  410. package/lib/select/Select.js +492 -0
  411. package/lib/select/SelectSfc.css +0 -0
  412. package/lib/select/SelectSfc.less +0 -0
  413. package/lib/select/index.js +17 -0
  414. package/lib/select/props.js +93 -0
  415. package/lib/select/provide.js +27 -0
  416. package/lib/select/select.css +1 -0
  417. package/lib/select/select.less +181 -0
  418. package/lib/select/style/index.js +7 -0
  419. package/lib/select/style/less.js +7 -0
  420. package/lib/skeleton/Skeleton.js +134 -0
  421. package/lib/skeleton/SkeletonSfc.css +0 -0
  422. package/lib/skeleton/SkeletonSfc.less +0 -0
  423. package/lib/skeleton/index.js +17 -0
  424. package/lib/skeleton/props.js +44 -0
  425. package/lib/skeleton/skeleton.css +1 -0
  426. package/lib/skeleton/skeleton.less +138 -0
  427. package/lib/skeleton/style/index.js +3 -0
  428. package/lib/skeleton/style/less.js +3 -0
  429. package/lib/slider/Slider.js +386 -0
  430. package/lib/slider/SliderSfc.css +0 -0
  431. package/lib/slider/SliderSfc.less +0 -0
  432. package/lib/slider/index.js +17 -0
  433. package/lib/slider/props.js +77 -0
  434. package/lib/slider/provide.js +3 -0
  435. package/lib/slider/slider.css +1 -0
  436. package/lib/slider/slider.less +146 -0
  437. package/lib/slider/style/index.js +4 -0
  438. package/lib/slider/style/less.js +4 -0
  439. package/lib/snackbar/Snackbar.js +70 -0
  440. package/lib/snackbar/SnackbarSfc.css +0 -0
  441. package/lib/snackbar/SnackbarSfc.less +0 -0
  442. package/lib/snackbar/core.js +146 -0
  443. package/lib/snackbar/coreSfc.css +0 -0
  444. package/lib/snackbar/coreSfc.less +0 -0
  445. package/lib/snackbar/index.js +232 -0
  446. package/lib/snackbar/props.js +103 -0
  447. package/lib/snackbar/snackbar.css +1 -0
  448. package/lib/snackbar/snackbar.less +135 -0
  449. package/lib/snackbar/style/index.js +8 -0
  450. package/lib/snackbar/style/less.js +8 -0
  451. package/lib/space/Space.js +99 -0
  452. package/lib/space/index.js +17 -0
  453. package/lib/space/props.js +49 -0
  454. package/lib/space/space.css +1 -0
  455. package/lib/space/space.less +6 -0
  456. package/lib/space/style/index.js +2 -0
  457. package/lib/space/style/less.js +2 -0
  458. package/lib/step/Step.js +156 -0
  459. package/lib/step/StepSfc.css +0 -0
  460. package/lib/step/StepSfc.less +0 -0
  461. package/lib/step/index.js +17 -0
  462. package/lib/step/props.js +17 -0
  463. package/lib/step/provide.js +28 -0
  464. package/lib/step/step.css +1 -0
  465. package/lib/step/step.less +145 -0
  466. package/lib/step/style/index.js +4 -0
  467. package/lib/step/style/less.js +4 -0
  468. package/lib/steps/Steps.js +56 -0
  469. package/lib/steps/StepsSfc.css +1 -0
  470. package/lib/steps/StepsSfc.less +1 -0
  471. package/lib/steps/index.js +17 -0
  472. package/lib/steps/props.js +30 -0
  473. package/lib/steps/provide.js +27 -0
  474. package/lib/steps/style/index.js +2 -0
  475. package/lib/steps/style/less.js +2 -0
  476. package/lib/sticky/Sticky.js +145 -0
  477. package/lib/sticky/StickySfc.css +0 -0
  478. package/lib/sticky/StickySfc.less +0 -0
  479. package/lib/sticky/index.js +17 -0
  480. package/lib/sticky/props.js +26 -0
  481. package/lib/sticky/sticky.css +1 -0
  482. package/lib/sticky/sticky.less +8 -0
  483. package/lib/sticky/style/index.js +3 -0
  484. package/lib/sticky/style/less.js +3 -0
  485. package/lib/style-provider/StyleProvider.js +30 -0
  486. package/lib/style-provider/StyleProviderSfc.css +0 -0
  487. package/lib/style-provider/StyleProviderSfc.less +0 -0
  488. package/lib/style-provider/index.js +37 -0
  489. package/lib/style-provider/style/index.js +2 -0
  490. package/lib/style-provider/style/less.js +2 -0
  491. package/lib/style.css +1 -0
  492. package/lib/style.js +62 -0
  493. package/lib/styles/common.css +1 -0
  494. package/lib/styles/common.less +67 -0
  495. package/lib/styles/elevation.css +1 -0
  496. package/lib/styles/elevation.less +126 -0
  497. package/lib/styles/style/index.js +0 -0
  498. package/lib/styles/style/less.js +0 -0
  499. package/lib/styles/var.css +0 -0
  500. package/lib/styles/var.less +30 -0
  501. package/lib/swipe/Swipe.js +408 -0
  502. package/lib/swipe/SwipeSfc.css +0 -0
  503. package/lib/swipe/SwipeSfc.less +0 -0
  504. package/lib/swipe/index.js +17 -0
  505. package/lib/swipe/props.js +40 -0
  506. package/lib/swipe/provide.js +27 -0
  507. package/lib/swipe/style/index.js +3 -0
  508. package/lib/swipe/style/less.js +3 -0
  509. package/lib/swipe/swipe.css +1 -0
  510. package/lib/swipe/swipe.less +59 -0
  511. package/lib/swipe-item/SwipeItem.js +58 -0
  512. package/lib/swipe-item/SwipeItemSfc.css +0 -0
  513. package/lib/swipe-item/SwipeItemSfc.less +0 -0
  514. package/lib/swipe-item/index.js +17 -0
  515. package/lib/swipe-item/provide.js +28 -0
  516. package/lib/swipe-item/style/index.js +3 -0
  517. package/lib/swipe-item/style/less.js +3 -0
  518. package/lib/swipe-item/swipeItem.css +1 -0
  519. package/lib/swipe-item/swipeItem.less +5 -0
  520. package/lib/switch/Switch.js +185 -0
  521. package/lib/switch/SwitchSfc.css +0 -0
  522. package/lib/switch/SwitchSfc.less +0 -0
  523. package/lib/switch/index.js +17 -0
  524. package/lib/switch/props.js +57 -0
  525. package/lib/switch/provide.js +3 -0
  526. package/lib/switch/style/index.js +7 -0
  527. package/lib/switch/style/less.js +7 -0
  528. package/lib/switch/switch.css +1 -0
  529. package/lib/switch/switch.less +80 -0
  530. package/lib/tab/Tab.js +116 -0
  531. package/lib/tab/TabSfc.css +0 -0
  532. package/lib/tab/TabSfc.less +0 -0
  533. package/lib/tab/index.js +17 -0
  534. package/lib/tab/props.js +17 -0
  535. package/lib/tab/provide.js +28 -0
  536. package/lib/tab/style/index.js +4 -0
  537. package/lib/tab/style/less.js +4 -0
  538. package/lib/tab/tab.css +1 -0
  539. package/lib/tab/tab.less +46 -0
  540. package/lib/tab-item/TabItem.js +74 -0
  541. package/lib/tab-item/TabItemSfc.css +0 -0
  542. package/lib/tab-item/TabItemSfc.less +0 -0
  543. package/lib/tab-item/index.js +17 -0
  544. package/lib/tab-item/props.js +10 -0
  545. package/lib/tab-item/provide.js +28 -0
  546. package/lib/tab-item/style/index.js +4 -0
  547. package/lib/tab-item/style/less.js +4 -0
  548. package/lib/tab-item/tabItem.css +1 -0
  549. package/lib/tab-item/tabItem.less +6 -0
  550. package/lib/table/Table.js +53 -0
  551. package/lib/table/TableSfc.css +0 -0
  552. package/lib/table/TableSfc.less +0 -0
  553. package/lib/table/index.js +17 -0
  554. package/lib/table/style/index.js +4 -0
  555. package/lib/table/style/less.js +4 -0
  556. package/lib/table/table.css +1 -0
  557. package/lib/table/table.less +110 -0
  558. package/lib/tabs/Tabs.js +208 -0
  559. package/lib/tabs/TabsSfc.css +0 -0
  560. package/lib/tabs/TabsSfc.less +0 -0
  561. package/lib/tabs/index.js +17 -0
  562. package/lib/tabs/props.js +70 -0
  563. package/lib/tabs/provide.js +27 -0
  564. package/lib/tabs/style/index.js +5 -0
  565. package/lib/tabs/style/less.js +5 -0
  566. package/lib/tabs/tabs.css +1 -0
  567. package/lib/tabs/tabs.less +93 -0
  568. package/lib/tabs-items/TabsItems.js +107 -0
  569. package/lib/tabs-items/TabsItemsSfc.css +0 -0
  570. package/lib/tabs-items/TabsItemsSfc.less +0 -0
  571. package/lib/tabs-items/index.js +17 -0
  572. package/lib/tabs-items/props.js +22 -0
  573. package/lib/tabs-items/provide.js +27 -0
  574. package/lib/tabs-items/style/index.js +3 -0
  575. package/lib/tabs-items/style/less.js +3 -0
  576. package/lib/themes/dark/actionSheet.js +10 -0
  577. package/lib/themes/dark/badge.js +8 -0
  578. package/lib/themes/dark/button.js +8 -0
  579. package/lib/themes/dark/card.js +11 -0
  580. package/lib/themes/dark/cell.js +9 -0
  581. package/lib/themes/dark/checkbox.js +8 -0
  582. package/lib/themes/dark/chip.js +8 -0
  583. package/lib/themes/dark/collapse.js +10 -0
  584. package/lib/themes/dark/datePicker.js +10 -0
  585. package/lib/themes/dark/dialog.js +9 -0
  586. package/lib/themes/dark/divider.js +9 -0
  587. package/lib/themes/dark/index.d.ts +5 -0
  588. package/lib/themes/dark/index.js +75 -0
  589. package/lib/themes/dark/input.js +9 -0
  590. package/lib/themes/dark/pagination.js +12 -0
  591. package/lib/themes/dark/picker.js +10 -0
  592. package/lib/themes/dark/popup.js +8 -0
  593. package/lib/themes/dark/pullRefresh.js +8 -0
  594. package/lib/themes/dark/radio.js +8 -0
  595. package/lib/themes/dark/select.js +10 -0
  596. package/lib/themes/dark/skeleton.js +11 -0
  597. package/lib/themes/dark/steps.js +10 -0
  598. package/lib/themes/dark/switch.js +9 -0
  599. package/lib/themes/dark/tab-item.js +8 -0
  600. package/lib/themes/dark/tab.js +8 -0
  601. package/lib/themes/dark/table.js +12 -0
  602. package/lib/themes/dark/tabs.js +8 -0
  603. package/lib/themes/dark/timePicker.js +10 -0
  604. package/lib/themes/dark/uploader.js +12 -0
  605. package/lib/themes/style/index.js +0 -0
  606. package/lib/themes/style/less.js +0 -0
  607. package/lib/time-picker/TimePicker.js +413 -0
  608. package/lib/time-picker/TimePickerSfc.css +0 -0
  609. package/lib/time-picker/TimePickerSfc.less +0 -0
  610. package/lib/time-picker/clock.js +347 -0
  611. package/lib/time-picker/index.js +17 -0
  612. package/lib/time-picker/props.js +59 -0
  613. package/lib/time-picker/style/index.js +4 -0
  614. package/lib/time-picker/style/less.js +4 -0
  615. package/lib/time-picker/timePicker.css +1 -0
  616. package/lib/time-picker/timePicker.less +236 -0
  617. package/lib/time-picker/utils.js +148 -0
  618. package/lib/uploader/Uploader.js +433 -0
  619. package/lib/uploader/UploaderSfc.css +0 -0
  620. package/lib/uploader/UploaderSfc.less +0 -0
  621. package/lib/uploader/index.js +17 -0
  622. package/lib/uploader/props.js +74 -0
  623. package/lib/uploader/provide.js +3 -0
  624. package/lib/uploader/style/index.js +8 -0
  625. package/lib/uploader/style/less.js +8 -0
  626. package/lib/uploader/uploader.css +1 -0
  627. package/lib/uploader/uploader.less +219 -0
  628. package/lib/utils/components.js +285 -0
  629. package/lib/utils/elements.js +261 -0
  630. package/lib/utils/jest.js +252 -0
  631. package/lib/utils/shared.js +214 -0
  632. package/lib/utils/style/index.js +0 -0
  633. package/lib/utils/style/less.js +0 -0
  634. package/package.json +5 -3
  635. package/umd/varlet.js +4 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,53 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.23.7](https://github.com/haoziqaq/varlet/compare/v1.23.6...v1.23.7) (2021-11-23)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **loading:** add color for circle type & update doc ([3457394](https://github.com/haoziqaq/varlet/commit/345739466b8109e63205eee720d391a328d30ca7))
12
+ * **loading:** remove radius prop & add color for circle type & update doc ([3a9dfe0](https://github.com/haoziqaq/varlet/commit/3a9dfe07886b245d686b454bfa1aa975b7e223f5))
13
+ * **ui/themes, cli:** fix themes types ([f29511a](https://github.com/haoziqaq/varlet/commit/f29511a016edb462bdf578a6b5a19fbe10a22158))
14
+
15
+
16
+ ### Reverts
17
+
18
+ * revert fix loading ([b97b8b9](https://github.com/haoziqaq/varlet/commit/b97b8b96e6f5f3c5f22f0f93eedc3e39b44e5344))
19
+
20
+
21
+
22
+
23
+
24
+ ## [1.23.6](https://github.com/haoziqaq/varlet/compare/v1.23.5...v1.23.6) (2021-11-22)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * **date-picker:** css specificity ([565002b](https://github.com/haoziqaq/varlet/commit/565002bf78b0374b6b9f411df95d5e342f4ce626))
30
+
31
+
32
+
33
+
34
+
35
+ ## [1.23.5](https://github.com/haoziqaq/varlet/compare/v1.23.4...v1.23.5) (2021-11-21)
36
+
37
+
38
+ ### Bug Fixes
39
+
40
+ * **cli:** add module moduleCompatible option in varlet.config.js ([0b1d95f](https://github.com/haoziqaq/varlet/commit/0b1d95fc740a225240ee3f28e06015f4538b2304))
41
+ * **cli:** expose lib folder ([2a8848a](https://github.com/haoziqaq/varlet/commit/2a8848a6f064aa91d56875ba467c46da79589a79))
42
+ * **cli/compile:** add commonjs bundle ([4a424d4](https://github.com/haoziqaq/varlet/commit/4a424d4c066f7de69cbf561a5bc9279862739637))
43
+ * **ui:** dayjs compatible ([3f2289b](https://github.com/haoziqaq/varlet/commit/3f2289bdf39e82529df94fea6fec9dd7739a5c96))
44
+ * **ui/list:** support nuxt ([dd7a71e](https://github.com/haoziqaq/varlet/commit/dd7a71ee37e2eadbacc6febd22949ef664997cb3))
45
+ * **ui/popup,input:** support nuxt ([def81ef](https://github.com/haoziqaq/varlet/commit/def81ef821a8ce679287702316bd98ca363bc7f4))
46
+ * **ui/sticky:** support nuxt ([29c24d6](https://github.com/haoziqaq/varlet/commit/29c24d61a0e91ceb948ff5a3e1bc6eb4c52b416a))
47
+ * compatible nuxt ([d681176](https://github.com/haoziqaq/varlet/commit/d6811763867f44731544c8c218e5368896aab6b1))
48
+
49
+
50
+
51
+
52
+
6
53
  ## [1.23.4](https://github.com/haoziqaq/varlet/compare/v1.23.3...v1.23.4) (2021-11-21)
7
54
 
8
55
 
@@ -5,7 +5,7 @@ import { mountInstance } from '../utils/components';
5
5
  var singletonOptions;
6
6
 
7
7
  function ActionSheet(options) {
8
- if (!inBrowser) {
8
+ if (!inBrowser()) {
9
9
  return Promise.resolve();
10
10
  }
11
11
 
@@ -38,7 +38,7 @@ export default defineComponent({
38
38
  props,
39
39
 
40
40
  setup(props) {
41
- var element = window;
41
+ var element;
42
42
  var show = ref(false);
43
43
 
44
44
  var click = () => {
@@ -65,7 +65,7 @@ export default defineComponent({
65
65
  };
66
66
 
67
67
  onMounted(() => {
68
- if (props.target) element = getHTMLElement();
68
+ element = props.target ? getHTMLElement() : window;
69
69
  element.addEventListener('scroll', throttleScroll);
70
70
  });
71
71
  onBeforeUnmount(() => {
@@ -1 +1 @@
1
- :root { --date-picker-border-radius: 4px; --date-picker-font-size: var(--font-size-md); --date-picker-min-width: 290px; --date-picker-height: 385px; --date-picker-main-color: rgba(0, 0, 0, 0.87); --date-picker-title-padding: 16px; --date-picker-title-background: var(--color-primary); --date-picker-title-color: #fff; --date-picker-title-year-font-size: var(--font-size-md); --date-picker-title-year-font-weight: 500; --date-picker-title-year-margin-bottom: 8px; --date-picker-title-date-height: 48px; --date-picker-title-date-font-size: 34px; --date-picker-title-date-font-weight: 500; --date-picker-title-date-range-font-size: 20px; --date-picker-body-background-color: rgba(0, 0, 0, 0); --picker-header-padding: 4px 16px; --month-picker-padding: 0 12px; --month-picker-item-width: 33%; --month-picker-item-height: 56px; --month-picker-item-button-max-width: 140px; --year-picker-font-weight: 400; --year-picker-item-padding: 8px 0; --year-picker-item-active-font-size: 26px; --year-picker-item-active-font-weight: 500; --year-picker-item-active-font-padding: 10px 0; --year-picker-item-active-color: var(--color-primary); --day-picker-content-item-width: 14.28%; --day-picker-content-item-font-size: var(--font-size-sm); --day-picker-content-item-padding: 2px 0; --day-picker-content-item-button-width: 32px; --day-picker-content-item-button-height: 32px; --day-picker-content-item-button-font-size: var(--font-size-sm); --day-picker-head-item-color: rgba(0, 0, 0, 0.38); --day-picker-head-item-padding: 8px 0; --day-picker-head-item-font-weight: 600;}.var-date-picker { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); border-radius: var(--date-picker-border-radius); contain: layout style; display: flex; flex-direction: column; font-size: var(--date-picker-font-size); position: relative; min-width: var(--date-picker-min-width); height: var(--date-picker-height); overflow: hidden;}.var-date-picker ul { list-style: none; margin: 0; padding: 0;}.var-date-picker-title { padding: var(--date-picker-title-padding); color: var(--date-picker-title-color); background: var(--date-picker-title-background); display: flex; justify-content: space-between; flex-direction: column; flex-wrap: wrap;}.var-date-picker-title__year { opacity: 0.6; cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); align-items: center; display: inline-flex; font-size: var(--date-picker-title-year-font-size); font-weight: var(--date-picker-title-year-font-weight); margin-bottom: var(--date-picker-title-year-margin-bottom); transition: 0.3s var(--cubic-bezier);}.var-date-picker-title__year--active { opacity: 1;}.var-date-picker-title__date { height: var(--date-picker-title-date-height); overflow: hidden; font-size: var(--date-picker-title-date-font-size); text-align: left; font-weight: var(--date-picker-title-date-font-weight); position: relative; cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); display: flex; align-items: center; opacity: 0.6; transition: 0.3s var(--cubic-bezier);}.var-date-picker-title__date--active { opacity: 1;}.var-date-picker-title__date--range { font-size: var(--date-picker-title-date-range-font-size);}.var-date-picker-body { flex: 1; position: relative; overflow: auto; background-color: var(--date-picker-body-background-color);}.var-date-picker .var-picker-header { padding: var(--picker-header-padding); align-items: center; display: flex; justify-content: space-between; position: relative;}.var-date-picker .var-picker-header__value { flex: 1; text-align: center; position: relative; overflow: hidden; font-weight: 700; cursor: pointer;}.var-date-picker .var-picker-header__value div { width: 100%;}.var-date-picker .var-month-picker__content { padding: var(--month-picker-padding);}.var-date-picker .var-month-picker__content ul { display: flex; flex-wrap: wrap; justify-content: space-between;}.var-date-picker .var-month-picker__content ul li { width: var(--month-picker-item-width); display: flex; height: var(--month-picker-item-height); align-items: center; justify-content: center;}.var-date-picker .var-month-picker__button[var-month-picker-cover] { width: 100%; max-width: var(--month-picker-item-button-max-width);}.var-date-picker .var-year-picker__panel { width: 100%; height: 100%; font-weight: var(--year-picker-font-weight); padding: 0; margin: 0; list-style-type: none; overflow: auto; text-align: center;}.var-date-picker .var-year-picker__panel li { padding: var(--year-picker-item-padding); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-date-picker .var-year-picker__panel--active { font-size: var(--year-picker-item-active-font-size); font-weight: var(--year-picker-item-active-font-weight); padding: var(--year-picker-item-active-font-padding); color: var(--year-picker-item-active-color);}.var-date-picker .var-day-picker__content ul { display: flex; flex-wrap: wrap;}.var-date-picker .var-day-picker__content ul li { position: relative; display: flex; justify-content: center; width: var(--day-picker-content-item-width); font-size: var(--day-picker-content-item-font-size); padding: var(--day-picker-content-item-padding);}.var-date-picker .var-day-picker__head li { color: var(--day-picker-head-item-color); padding: var(--day-picker-head-item-padding); font-weight: var(--day-picker-head-item-font-weight);}.var-date-picker .var-day-picker__button[var-day-picker-cover] { width: var(--day-picker-content-item-button-width); height: var(--day-picker-content-item-button-height); font-size: var(--day-picker-content-item-button-font-size);}.var-date-picker-main__color { color: var(--date-picker-main-color);}.var-date-picker-translatey-enter-from { opacity: 0; transform: translateY(100%);}.var-date-picker-translatey-enter-active,.var-date-picker-reverse-translatey-enter-active { transition: 0.3s var(--cubic-bezier);}.var-date-picker-translatey-leave-active,.var-date-picker-reverse-translatey-leave-active { position: absolute; transition: 0.3s var(--cubic-bezier);}.var-date-picker-translatey-leave-to { opacity: 0; transform: translateY(-100%);}.var-date-picker-reverse-translatey-enter-from { opacity: 0; transform: translateY(-100%);}.var-date-picker-reverse-translatey-leave-to { opacity: 0; transform: translateY(100%);}.var-date-picker-panel-fade-enter-from,.var-date-picker-panel-fade-leave-to { transition: 0.3s var(--cubic-bezier); opacity: 0;}.var-date-picker-panel-fade-leave-active { position: absolute;}.var-date-picker-translatex-enter-from { opacity: 0; transform: translateX(100%);}.var-date-picker-reverse-translatex-enter-from { opacity: 0; transform: translateX(-100%);}.var-date-picker-translatex-enter-active,.var-date-picker-reverse-translatex-enter-active { transition: 0.3s var(--cubic-bezier);}.var-date-picker-translatex-leave-active,.var-date-picker-reverse-translatex-leave-active { position: absolute; transition: 0.3s var(--cubic-bezier);}.var-date-picker-translatex-leave-to { opacity: 0; transform: translateX(-100%);}.var-date-picker-reverse-translatex-leave-to { opacity: 0; transform: translateX(100%);}
1
+ :root { --date-picker-border-radius: 4px; --date-picker-font-size: var(--font-size-md); --date-picker-min-width: 290px; --date-picker-height: 385px; --date-picker-main-color: rgba(0, 0, 0, 0.87); --date-picker-title-padding: 16px; --date-picker-title-background: var(--color-primary); --date-picker-title-color: #fff; --date-picker-title-year-font-size: var(--font-size-md); --date-picker-title-year-font-weight: 500; --date-picker-title-year-margin-bottom: 8px; --date-picker-title-date-height: 48px; --date-picker-title-date-font-size: 34px; --date-picker-title-date-font-weight: 500; --date-picker-title-date-range-font-size: 20px; --date-picker-body-background-color: rgba(0, 0, 0, 0); --picker-header-padding: 4px 16px; --month-picker-padding: 0 12px; --month-picker-item-width: 33%; --month-picker-item-height: 56px; --month-picker-item-button-max-width: 140px; --year-picker-font-weight: 400; --year-picker-item-padding: 8px 0; --year-picker-item-active-font-size: 26px; --year-picker-item-active-font-weight: 500; --year-picker-item-active-font-padding: 10px 0; --year-picker-item-active-color: var(--color-primary); --day-picker-content-item-width: 14.28%; --day-picker-content-item-font-size: var(--font-size-sm); --day-picker-content-item-padding: 2px 0; --day-picker-content-item-button-width: 32px; --day-picker-content-item-button-height: 32px; --day-picker-content-item-button-font-size: var(--font-size-sm); --day-picker-head-item-color: rgba(0, 0, 0, 0.38); --day-picker-head-item-padding: 8px 0; --day-picker-head-item-font-weight: 600;}.var-date-picker { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); border-radius: var(--date-picker-border-radius); contain: layout style; display: flex; flex-direction: column; font-size: var(--date-picker-font-size); position: relative; min-width: var(--date-picker-min-width); height: var(--date-picker-height); overflow: hidden;}.var-date-picker ul { list-style: none; margin: 0; padding: 0;}.var-date-picker-title { padding: var(--date-picker-title-padding); color: var(--date-picker-title-color); background: var(--date-picker-title-background); display: flex; justify-content: space-between; flex-direction: column; flex-wrap: wrap;}.var-date-picker-title__year { opacity: 0.6; cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); align-items: center; display: inline-flex; font-size: var(--date-picker-title-year-font-size); font-weight: var(--date-picker-title-year-font-weight); margin-bottom: var(--date-picker-title-year-margin-bottom); transition: 0.3s var(--cubic-bezier);}.var-date-picker-title__year--active { opacity: 1;}.var-date-picker-title__date { height: var(--date-picker-title-date-height); overflow: hidden; font-size: var(--date-picker-title-date-font-size); text-align: left; font-weight: var(--date-picker-title-date-font-weight); position: relative; cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); display: flex; align-items: center; opacity: 0.6; transition: 0.3s var(--cubic-bezier);}.var-date-picker-title__date--active { opacity: 1;}.var-date-picker-title__date--range { font-size: var(--date-picker-title-date-range-font-size);}.var-date-picker-body { flex: 1; position: relative; overflow: auto; background-color: var(--date-picker-body-background-color);}.var-date-picker .var-picker-header { padding: var(--picker-header-padding); align-items: center; display: flex; justify-content: space-between; position: relative;}.var-date-picker .var-picker-header__value { flex: 1; text-align: center; position: relative; overflow: hidden; font-weight: 700; cursor: pointer;}.var-date-picker .var-picker-header__value div { width: 100%;}.var-date-picker .var-month-picker__content { padding: var(--month-picker-padding);}.var-date-picker .var-month-picker__content ul { display: flex; flex-wrap: wrap; justify-content: space-between;}.var-date-picker .var-month-picker__content ul li { width: var(--month-picker-item-width); display: flex; height: var(--month-picker-item-height); align-items: center; justify-content: center;}.var-date-picker .var-month-picker__button[var-month-picker-cover] { width: 100%; max-width: var(--month-picker-item-button-max-width);}.var-date-picker .var-month-picker__button[var-date-picker-color-cover='true'] { color: var(--date-picker-main-color);}.var-date-picker .var-year-picker__panel { width: 100%; height: 100%; font-weight: var(--year-picker-font-weight); padding: 0; margin: 0; list-style-type: none; overflow: auto; text-align: center;}.var-date-picker .var-year-picker__panel li { padding: var(--year-picker-item-padding); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-date-picker .var-year-picker__panel--active { font-size: var(--year-picker-item-active-font-size); font-weight: var(--year-picker-item-active-font-weight); padding: var(--year-picker-item-active-font-padding); color: var(--year-picker-item-active-color);}.var-date-picker .var-day-picker__content ul { display: flex; flex-wrap: wrap;}.var-date-picker .var-day-picker__content ul li { position: relative; display: flex; justify-content: center; width: var(--day-picker-content-item-width); font-size: var(--day-picker-content-item-font-size); padding: var(--day-picker-content-item-padding);}.var-date-picker .var-day-picker__head li { color: var(--day-picker-head-item-color); padding: var(--day-picker-head-item-padding); font-weight: var(--day-picker-head-item-font-weight);}.var-date-picker .var-day-picker__button[var-day-picker-cover] { width: var(--day-picker-content-item-button-width); height: var(--day-picker-content-item-button-height); font-size: var(--day-picker-content-item-button-font-size);}.var-date-picker .var-day-picker__button[var-date-picker-color-cover='true'] { color: var(--date-picker-main-color);}.var-date-picker-translatey-enter-from { opacity: 0; transform: translateY(100%);}.var-date-picker-translatey-enter-active,.var-date-picker-reverse-translatey-enter-active { transition: 0.3s var(--cubic-bezier);}.var-date-picker-translatey-leave-active,.var-date-picker-reverse-translatey-leave-active { position: absolute; transition: 0.3s var(--cubic-bezier);}.var-date-picker-translatey-leave-to { opacity: 0; transform: translateY(-100%);}.var-date-picker-reverse-translatey-enter-from { opacity: 0; transform: translateY(-100%);}.var-date-picker-reverse-translatey-leave-to { opacity: 0; transform: translateY(100%);}.var-date-picker-panel-fade-enter-from,.var-date-picker-panel-fade-leave-to { transition: 0.3s var(--cubic-bezier); opacity: 0;}.var-date-picker-panel-fade-leave-active { position: absolute;}.var-date-picker-translatex-enter-from { opacity: 0; transform: translateX(100%);}.var-date-picker-reverse-translatex-enter-from { opacity: 0; transform: translateX(-100%);}.var-date-picker-translatex-enter-active,.var-date-picker-reverse-translatex-enter-active { transition: 0.3s var(--cubic-bezier);}.var-date-picker-translatex-leave-active,.var-date-picker-reverse-translatex-leave-active { position: absolute; transition: 0.3s var(--cubic-bezier);}.var-date-picker-translatex-leave-to { opacity: 0; transform: translateX(-100%);}.var-date-picker-reverse-translatex-leave-to { opacity: 0; transform: translateX(100%);}
@@ -192,6 +192,10 @@
192
192
  width: 100%;
193
193
  max-width: var(--month-picker-item-button-max-width);
194
194
  }
195
+
196
+ &__button[var-date-picker-color-cover='true'] {
197
+ color: var(--date-picker-main-color);
198
+ }
195
199
  }
196
200
 
197
201
  .var-year-picker {
@@ -250,10 +254,10 @@
250
254
  height: var(--day-picker-content-item-button-height);
251
255
  font-size: var(--day-picker-content-item-button-font-size);
252
256
  }
253
- }
254
257
 
255
- &-main__color {
256
- color: var(--date-picker-main-color);
258
+ &__button[var-date-picker-color-cover='true'] {
259
+ color: var(--date-picker-main-color);
260
+ }
257
261
  }
258
262
 
259
263
  &-translatey-enter-from {
@@ -278,20 +278,20 @@ export default defineComponent({
278
278
  return true;
279
279
  };
280
280
 
281
- var textColorOrClass = () => {
281
+ var textColorOrCover = () => {
282
282
  if (disabled) return '';
283
283
  if (computeOutline()) return color != null ? color : '';
284
284
  if (dayExist()) return '';
285
- return 'var-date-picker-main__color';
285
+ return 'var-date-picker-color-cover';
286
286
  };
287
287
 
288
- var isClass = textColorOrClass().startsWith('var-date-picker');
288
+ var isCover = textColorOrCover().startsWith('var-date-picker');
289
289
  return {
290
290
  disabled,
291
291
  text: computeText(),
292
292
  outline: computeOutline(),
293
- textColor: isClass ? '' : textColorOrClass(),
294
- class: isClass ? textColorOrClass() : ''
293
+ textColor: isCover ? '' : textColorOrCover(),
294
+ 'var-date-picker-color-cover': isCover
295
295
  };
296
296
  };
297
297
 
@@ -209,21 +209,21 @@ export default defineComponent({
209
209
  return true;
210
210
  };
211
211
 
212
- var textColorOrClass = () => {
212
+ var textColorOrCover = () => {
213
213
  if (disabled) return '';
214
214
  if (computeOutline()) return color != null ? color : '';
215
215
  if (monthExist()) return '';
216
- return 'var-date-picker-main__color';
216
+ return 'var-date-picker-color-cover';
217
217
  };
218
218
 
219
- var isClass = textColorOrClass().startsWith('var-date-picker');
219
+ var isCover = textColorOrCover().startsWith('var-date-picker');
220
220
  return {
221
221
  disabled,
222
222
  outline: computeOutline(),
223
223
  text: computeText(),
224
224
  color: !computeText() ? color : '',
225
- textColor: isClass ? '' : textColorOrClass(),
226
- class: isClass ? textColorOrClass() : ''
225
+ textColor: isCover ? '' : textColorOrCover(),
226
+ 'var-date-picker-color-cover': isCover
227
227
  };
228
228
  };
229
229
 
@@ -3,7 +3,7 @@ import VarIcon from '../../icon';
3
3
  import { defineComponent, ref, computed, watch } from 'vue';
4
4
  import { toNumber } from '../../utils/shared';
5
5
  import { pack } from '../../locale';
6
- import { resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, withCtx as _withCtx, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, Transition as _Transition, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
6
+ import { resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, Transition as _Transition, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
7
7
 
8
8
  var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
9
9
 
@@ -18,7 +18,6 @@ export function render(_ctx, _cache) {
18
18
  return _openBlock(), _createElementBlock("div", _hoisted_1, [_createVNode(_component_var_button, {
19
19
  round: "",
20
20
  text: "",
21
- class: _normalizeClass(_ctx.getClass('left')),
22
21
  style: {
23
22
  "filter": "opacity(0.54)"
24
23
  },
@@ -33,7 +32,7 @@ export function render(_ctx, _cache) {
33
32
 
34
33
  }, 8
35
34
  /* PROPS */
36
- , ["class", "disabled"]), _createElementVNode("div", {
35
+ , ["disabled"]), _createElementVNode("div", {
37
36
  class: "var-picker-header__value",
38
37
  onClick: _cache[1] || (_cache[1] = $event => _ctx.$emit('check-panel'))
39
38
  }, [_createVNode(_Transition, {
@@ -52,7 +51,6 @@ export function render(_ctx, _cache) {
52
51
  , ["name"])]), _createVNode(_component_var_button, {
53
52
  round: "",
54
53
  text: "",
55
- class: _normalizeClass(_ctx.getClass('right')),
56
54
  style: {
57
55
  "filter": "opacity(0.54)"
58
56
  },
@@ -67,7 +65,7 @@ export function render(_ctx, _cache) {
67
65
 
68
66
  }, 8
69
67
  /* PROPS */
70
- , ["class", "disabled"])]);
68
+ , ["disabled"])]);
71
69
  }
72
70
  export default defineComponent({
73
71
  render,
@@ -113,10 +111,6 @@ export default defineComponent({
113
111
  return pack.value.lang === 'zh-CN' ? previewYear + " " + monthName : monthName + " " + previewYear;
114
112
  });
115
113
 
116
- var getClass = position => {
117
- return props.disabled[position] ? '' : 'var-date-picker-main__color';
118
- };
119
-
120
114
  var checkDate = checkType => {
121
115
  emit('check-date', checkType);
122
116
  reverse.value = checkType === 'prev';
@@ -129,8 +123,7 @@ export default defineComponent({
129
123
  return {
130
124
  reverse,
131
125
  showDate,
132
- checkDate,
133
- getClass
126
+ checkDate
134
127
  };
135
128
  }
136
129
 
@@ -5,7 +5,7 @@ import { mountInstance } from '../utils/components';
5
5
  var singletonOptions;
6
6
 
7
7
  function Dialog(options) {
8
- if (!inBrowser) {
8
+ if (!inBrowser()) {
9
9
  return Promise.resolve();
10
10
  }
11
11
 
@@ -5,7 +5,7 @@ import { mountInstance } from '../utils/components';
5
5
  var singletonOptions;
6
6
 
7
7
  function ImagePreview(options) {
8
- if (!inBrowser) {
8
+ if (!inBrowser()) {
9
9
  return;
10
10
  }
11
11
 
package/es/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from '../types'
package/es/input/Input.js CHANGED
@@ -5,7 +5,7 @@ import { props } from './props';
5
5
  import { isEmpty } from '../utils/shared';
6
6
  import { useValidation } from '../utils/components';
7
7
  import { useForm } from '../form/provide';
8
- import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveDynamicComponent as _resolveDynamicComponent, normalizeStyle as _normalizeStyle, createBlock as _createBlock, toDisplayString as _toDisplayString, resolveComponent as _resolveComponent, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
8
+ import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, toDisplayString as _toDisplayString, resolveComponent as _resolveComponent, createBlock as _createBlock, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
9
9
 
10
10
  var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
11
11
 
@@ -13,7 +13,9 @@ var _hoisted_1 = {
13
13
  key: 0,
14
14
  class: "var-input__autocomplete"
15
15
  };
16
- var _hoisted_2 = ["for"];
16
+ var _hoisted_2 = ["id", "disabled", "type", "value", "maxlength", "rows"];
17
+ var _hoisted_3 = ["id", "disabled", "type", "value", "maxlength"];
18
+ var _hoisted_4 = ["for"];
17
19
  export function render(_ctx, _cache) {
18
20
  var _component_var_icon = _resolveComponent("var-icon");
19
21
 
@@ -21,7 +23,7 @@ export function render(_ctx, _cache) {
21
23
 
22
24
  return _openBlock(), _createElementBlock("div", {
23
25
  class: _normalizeClass(["var-input var--box", [_ctx.disabled ? 'var-input--disabled' : null]]),
24
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
26
+ onClick: _cache[8] || (_cache[8] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
25
27
  }, [_createElementVNode("div", {
26
28
  class: _normalizeClass(["var-input__controller", [_ctx.isFocus ? 'var-input--focus' : null, _ctx.errorMessage ? 'var-input--error' : null, _ctx.formDisabled || _ctx.disabled ? 'var-input--disabled' : null]]),
27
29
  style: _normalizeStyle({
@@ -33,8 +35,9 @@ export function render(_ctx, _cache) {
33
35
  /* CLASS */
34
36
  ), _createElementVNode("div", {
35
37
  class: _normalizeClass(["var-input__wrap", [!_ctx.hint ? 'var-input--non-hint' : null]])
36
- }, [_ctx.type === 'password' ? (_openBlock(), _createElementBlock("input", _hoisted_1)) : _createCommentVNode("v-if", true), (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.textarea ? 'textarea' : 'input'), {
37
- class: _normalizeClass(["var-input__input", [_ctx.formDisabled || _ctx.disabled ? 'var-input--disabled' : null, _ctx.textarea ? 'var-input--textarea' : null, _ctx.errorMessage ? 'var-input--caret-error' : null]]),
38
+ }, [_ctx.type === 'password' ? (_openBlock(), _createElementBlock("input", _hoisted_1)) : _createCommentVNode("v-if", true), _ctx.textarea ? (_openBlock(), _createElementBlock("textarea", {
39
+ key: 1,
40
+ class: _normalizeClass(["var-input__input var-input--textarea", [_ctx.formDisabled || _ctx.disabled ? 'var-input--disabled' : null, _ctx.errorMessage ? 'var-input--caret-error' : null]]),
38
41
  ref: "el",
39
42
  autocomplete: "new-password",
40
43
  id: _ctx.id,
@@ -48,18 +51,38 @@ export function render(_ctx, _cache) {
48
51
  caretColor: !_ctx.errorMessage ? _ctx.focusColor : null,
49
52
  resize: _ctx.resize ? 'vertical' : 'none'
50
53
  }),
51
- onFocus: _ctx.handleFocus,
52
- onBlur: _ctx.handleBlur,
53
- onInput: _ctx.handleInput,
54
- onChange: _ctx.handleChange
55
- }, null, 8
56
- /* PROPS */
57
- , ["id", "disabled", "type", "value", "maxlength", "rows", "class", "style", "onFocus", "onBlur", "onInput", "onChange"])), _createElementVNode("label", {
54
+ onFocus: _cache[0] || (_cache[0] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
55
+ onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
56
+ onInput: _cache[2] || (_cache[2] = (...args) => _ctx.handleInput && _ctx.handleInput(...args)),
57
+ onChange: _cache[3] || (_cache[3] = (...args) => _ctx.handleChange && _ctx.handleChange(...args))
58
+ }, "\n ", 46
59
+ /* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
60
+ , _hoisted_2)) : (_openBlock(), _createElementBlock("input", {
61
+ key: 2,
62
+ class: _normalizeClass(["var-input__input", [_ctx.formDisabled || _ctx.disabled ? 'var-input--disabled' : null, _ctx.errorMessage ? 'var-input--caret-error' : null]]),
63
+ ref: "el",
64
+ autocomplete: "new-password",
65
+ id: _ctx.id,
66
+ disabled: _ctx.formDisabled || _ctx.disabled || _ctx.formReadonly || _ctx.readonly,
67
+ type: _ctx.type,
68
+ value: _ctx.modelValue,
69
+ maxlength: _ctx.maxlength,
70
+ style: _normalizeStyle({
71
+ color: _ctx.textColor,
72
+ caretColor: !_ctx.errorMessage ? _ctx.focusColor : null
73
+ }),
74
+ onFocus: _cache[4] || (_cache[4] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
75
+ onBlur: _cache[5] || (_cache[5] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
76
+ onInput: _cache[6] || (_cache[6] = (...args) => _ctx.handleInput && _ctx.handleInput(...args)),
77
+ onChange: _cache[7] || (_cache[7] = (...args) => _ctx.handleChange && _ctx.handleChange(...args))
78
+ }, null, 46
79
+ /* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
80
+ , _hoisted_3)), _createElementVNode("label", {
58
81
  class: _normalizeClass([_ctx.textarea ? 'var-input__textarea-placeholder' : 'var-input__placeholder', _ctx.computePlaceholderState(), !_ctx.hint ? 'var-input--placeholder-non-hint' : null]),
59
82
  for: _ctx.id
60
83
  }, _toDisplayString(_ctx.placeholder), 11
61
84
  /* TEXT, CLASS, PROPS */
62
- , _hoisted_2)], 2
85
+ , _hoisted_4)], 2
63
86
  /* CLASS */
64
87
  ), _createElementVNode("div", {
65
88
  class: _normalizeClass(["var-input__icon", [!_ctx.hint ? 'var-input--non-hint' : null]])
package/es/list/List.js CHANGED
@@ -75,7 +75,7 @@ export default defineComponent({
75
75
  setup(props) {
76
76
  var listEl = ref(null);
77
77
  var detectorEl = ref(null);
78
- var scroller = window;
78
+ var scroller;
79
79
 
80
80
  var load = () => {
81
81
  var _props$onUpdateError, _props$onUpdateLoadi;
@@ -1,4 +1,4 @@
1
- import { defineComponent } from 'vue';
1
+ import { computed, defineComponent } from 'vue';
2
2
  import { props } from './props';
3
3
  import { toNumber } from '../utils/shared';
4
4
  import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
@@ -29,8 +29,9 @@ export function render(_ctx, _cache) {
29
29
  return _openBlock(), _createElementBlock("div", _hoisted_1, [_ctx.type === 'circle' ? (_openBlock(), _createElementBlock("div", _hoisted_2, [_createElementVNode("span", {
30
30
  class: "var-loading__circle-block",
31
31
  style: _normalizeStyle({
32
- width: _ctx.toNumber(_ctx.radius) * 2 + 'px',
33
- height: _ctx.toNumber(_ctx.radius) * 2 + 'px'
32
+ width: _ctx.getRadius * 2 + 'px',
33
+ height: _ctx.getRadius * 2 + 'px',
34
+ color: _ctx.color
34
35
  })
35
36
  }, _hoisted_4, 4
36
37
  /* STYLE */
@@ -66,16 +67,25 @@ export default defineComponent({
66
67
  name: 'VarLoading',
67
68
  props,
68
69
 
69
- setup() {
70
+ setup(props) {
70
71
  var loadingTypeDict = {
71
72
  wave: 5,
72
73
  cube: 4,
73
74
  rect: 8,
74
75
  disappear: 3
75
76
  };
77
+ var sizeDict = {
78
+ mini: 9,
79
+ small: 12,
80
+ normal: 15,
81
+ large: 18
82
+ };
83
+ var getRadius = computed(() => {
84
+ return props.radius ? toNumber(props.radius) : sizeDict[props.size];
85
+ });
76
86
  return {
77
87
  loadingTypeDict,
78
- toNumber
88
+ getRadius
79
89
  };
80
90
  }
81
91
 
@@ -12,8 +12,7 @@ export var props = {
12
12
  validator: typeValidator
13
13
  },
14
14
  radius: {
15
- type: [String, Number],
16
- default: 15
15
+ type: [String, Number]
17
16
  },
18
17
  // loading尺寸
19
18
  size: {
package/es/popup/Popup.js CHANGED
@@ -1,70 +1,28 @@
1
+ import { isVNode as _isVNode, withDirectives as _withDirectives, vShow as _vShow, mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
2
+
1
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); }
2
4
 
3
- import { defineComponent, watch } from 'vue';
5
+ import { defineComponent, watch, Transition, Teleport } from 'vue';
4
6
  import { props } from './props';
5
7
  import { useLock } from '../context/lock';
6
8
  import { useZIndex } from '../context/zIndex';
7
9
  import { addRouteListener, useTeleport } from '../utils/components';
8
- import { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, mergeProps as _mergeProps, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, vShow as _vShow, createElementVNode as _createElementVNode, withDirectives as _withDirectives, Teleport as _Teleport, createBlock as _createBlock } from "vue";
9
- export function render(_ctx, _cache) {
10
- return _openBlock(), _createBlock(_Teleport, {
11
- to: _ctx.teleport,
12
- disabled: !_ctx.teleport || _ctx.disabled
13
- }, [_createVNode(_Transition, {
14
- name: "var-fade",
15
- onAfterEnter: _ctx.onOpened,
16
- onAfterLeave: _ctx.onClosed
17
- }, {
18
- default: _withCtx(() => [_withDirectives(_createElementVNode("div", {
19
- class: "var--box var-popup",
20
- style: _normalizeStyle({
21
- zIndex: _ctx.zIndex - 2
22
- })
23
- }, [_ctx.overlay ? (_openBlock(), _createElementBlock("div", {
24
- key: 0,
25
- class: _normalizeClass(["var-popup__overlay", [_ctx.overlayClass]]),
26
- style: _normalizeStyle(_extends({
27
- zIndex: _ctx.zIndex - 1
28
- }, _ctx.overlayStyle)),
29
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.hidePopup && _ctx.hidePopup(...args))
30
- }, null, 6
31
- /* CLASS, STYLE */
32
- )) : _createCommentVNode("v-if", true), _createVNode(_Transition, {
33
- name: _ctx.transition ? _ctx.transition : "var-pop-" + _ctx.position
34
- }, {
35
- default: _withCtx(() => [_ctx.show ? (_openBlock(), _createElementBlock("div", _mergeProps({
36
- key: 0,
37
- class: ["var-popup__content var-elevation--3", ["var-popup--" + _ctx.position]],
38
- style: {
39
- zIndex: _ctx.zIndex
40
- }
41
- }, _ctx.$attrs), [_renderSlot(_ctx.$slots, "default")], 16
42
- /* FULL_PROPS */
43
- )) : _createCommentVNode("v-if", true)]),
44
- _: 3
45
- /* FORWARDED */
46
-
47
- }, 8
48
- /* PROPS */
49
- , ["name"])], 4
50
- /* STYLE */
51
- ), [[_vShow, _ctx.show]])]),
52
- _: 3
53
- /* FORWARDED */
54
-
55
- }, 8
56
- /* PROPS */
57
- , ["onAfterEnter", "onAfterLeave"])], 8
58
- /* PROPS */
59
- , ["to", "disabled"]);
10
+
11
+
12
+
13
+ function _isSlot(s) {
14
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
60
15
  }
16
+
61
17
  export default defineComponent({
62
- render,
63
18
  name: 'VarPopup',
64
19
  inheritAttrs: false,
65
20
  props,
66
21
 
67
- setup(props) {
22
+ setup(props, {
23
+ slots,
24
+ attrs
25
+ }) {
68
26
  var {
69
27
  zIndex
70
28
  } = useZIndex(() => props.show, 3);
@@ -98,10 +56,74 @@ export default defineComponent({
98
56
  }); // internal for Dialog
99
57
 
100
58
  addRouteListener(() => props.onRouteChange == null ? void 0 : props.onRouteChange());
101
- return {
102
- zIndex,
103
- disabled,
104
- hidePopup
59
+
60
+ var renderOverlay = () => {
61
+ var {
62
+ overlayClass,
63
+ overlayStyle
64
+ } = props;
65
+ return _createVNode("div", {
66
+ "class": ['var-popup__overlay', overlayClass],
67
+ "style": _extends({
68
+ zIndex: zIndex.value - 1
69
+ }, overlayStyle),
70
+ "onClick": hidePopup
71
+ }, null);
72
+ };
73
+
74
+ var renderContent = () => {
75
+ return _createVNode("div", _mergeProps({
76
+ "class": ['var-popup__content', 'var-elevation--3', "var-popup--" + props.position],
77
+ "style": {
78
+ zIndex: zIndex.value
79
+ }
80
+ }, attrs), [slots.default == null ? void 0 : slots.default()]);
81
+ };
82
+
83
+ var renderPopup = () => {
84
+ var {
85
+ onOpened,
86
+ onClosed,
87
+ show,
88
+ overlay,
89
+ transition,
90
+ position
91
+ } = props;
92
+ return _createVNode(Transition, {
93
+ "name": "var-fade",
94
+ "onAfterEnter": onOpened,
95
+ "onAfterLeave": onClosed
96
+ }, {
97
+ default: () => [_withDirectives(_createVNode("div", {
98
+ "class": "var--box var-popup",
99
+ "style": {
100
+ zIndex: zIndex.value - 2
101
+ }
102
+ }, [overlay && renderOverlay(), _createVNode(Transition, {
103
+ "name": transition || "var-pop-" + position
104
+ }, {
105
+ default: () => [show && renderContent()]
106
+ })]), [[_vShow, show]])]
107
+ });
108
+ };
109
+
110
+ return () => {
111
+ var {
112
+ teleport
113
+ } = props;
114
+
115
+ if (teleport) {
116
+ var _slot;
117
+
118
+ return _createVNode(Teleport, {
119
+ "to": teleport,
120
+ "disabled": disabled.value
121
+ }, _isSlot(_slot = renderPopup()) ? _slot : {
122
+ default: () => [_slot]
123
+ });
124
+ }
125
+
126
+ return renderPopup();
105
127
  };
106
128
  }
107
129
 
package/es/popup/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import Popup from './Popup.js'
1
+ import Popup from './Popup';
2
2
 
3
3
  Popup.install = function (app) {
4
4
  app.component(Popup.name, Popup);
@@ -1,3 +1,2 @@
1
1
  import '../../styles/common.css'
2
2
  import '../popup.css'
3
- import '../PopupSfc.css'
@@ -1,3 +1,2 @@
1
1
  import '../../styles/common.less'
2
2
  import '../popup.less'
3
- import '../PopupSfc.less'
@@ -5,7 +5,7 @@ import { props } from './props';
5
5
  import { toNumber } from '../utils/shared';
6
6
  var MAX_DISTANCE = 100;
7
7
  var CONTROL_POSITION = -50;
8
- var scroller = window;
8
+ var scroller;
9
9
  import { resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
10
10
  export function render(_ctx, _cache) {
11
11
  var _component_var_icon = _resolveComponent("var-icon");
@@ -48,7 +48,7 @@ export default defineComponent({
48
48
  var enableCSSMode = computed(() => !props.disabled && props.cssMode);
49
49
  var enableFixedMode = computed(() => !props.disabled && isFixed.value);
50
50
  var offsetTop = computed(() => toPxNum(props.offsetTop));
51
- var scroller = window;
51
+ var scroller;
52
52
 
53
53
  var handleScroll = () => {
54
54
  var {
@@ -0,0 +1,5 @@
1
+ import { StyleVars } from '../../../types'
2
+
3
+ declare const dark: StyleVars
4
+
5
+ export default dark