vue-devui 1.0.0-alpha.1 → 1.0.0-alpha.10

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 (425) hide show
  1. package/README.md +161 -172
  2. package/alert/index.d.ts +7 -0
  3. package/alert/index.es.js +204 -1
  4. package/alert/index.umd.js +1 -1
  5. package/alert/style.css +1 -1
  6. package/auto-complete/index.d.ts +7 -0
  7. package/auto-complete/index.es.js +9051 -0
  8. package/auto-complete/index.umd.js +40 -0
  9. package/auto-complete/package.json +7 -0
  10. package/auto-complete/style.css +1 -0
  11. package/avatar/index.d.ts +7 -0
  12. package/avatar/index.es.js +308 -1
  13. package/avatar/index.umd.js +1 -1
  14. package/avatar/style.css +1 -1
  15. package/badge/index.d.ts +7 -0
  16. package/badge/index.es.js +120 -1
  17. package/badge/index.umd.js +1 -1
  18. package/badge/style.css +1 -1
  19. package/button/index.d.ts +7 -0
  20. package/button/index.es.js +5964 -1
  21. package/button/index.umd.js +27 -1
  22. package/button/style.css +1 -1
  23. package/card/index.d.ts +7 -0
  24. package/card/index.es.js +89 -1
  25. package/card/index.umd.js +1 -1
  26. package/card/style.css +1 -1
  27. package/checkbox/index.d.ts +7 -0
  28. package/checkbox/index.es.js +8207 -1
  29. package/checkbox/index.umd.js +38 -1
  30. package/checkbox/style.css +1 -1
  31. package/collapse/index.d.ts +7 -0
  32. package/collapse/index.es.js +195 -0
  33. package/collapse/index.umd.js +1 -0
  34. package/{carousel → collapse}/package.json +1 -1
  35. package/collapse/style.css +1 -0
  36. package/countdown/index.d.ts +7 -0
  37. package/countdown/index.es.js +217 -0
  38. package/countdown/index.umd.js +1 -0
  39. package/{accordion → countdown}/package.json +1 -1
  40. package/countdown/style.css +1 -0
  41. package/date-picker-pro/index.d.ts +7 -0
  42. package/date-picker-pro/index.es.js +12031 -0
  43. package/date-picker-pro/index.umd.js +38 -0
  44. package/date-picker-pro/package.json +7 -0
  45. package/date-picker-pro/style.css +1 -0
  46. package/drawer/index.d.ts +7 -0
  47. package/drawer/index.es.js +248 -0
  48. package/drawer/index.umd.js +1 -0
  49. package/{anchor → drawer}/package.json +1 -1
  50. package/drawer/style.css +1 -0
  51. package/dropdown/index.d.ts +7 -0
  52. package/dropdown/index.es.js +743 -0
  53. package/dropdown/index.umd.js +1 -0
  54. package/dropdown/package.json +7 -0
  55. package/dropdown/style.css +1 -0
  56. package/editable-select/index.d.ts +7 -0
  57. package/editable-select/index.es.js +991 -1
  58. package/editable-select/index.umd.js +1 -1
  59. package/editable-select/style.css +1 -1
  60. package/form/index.d.ts +7 -0
  61. package/form/index.es.js +7751 -0
  62. package/form/index.umd.js +38 -0
  63. package/{toast → form}/package.json +1 -1
  64. package/form/style.css +1 -0
  65. package/fullscreen/index.d.ts +7 -0
  66. package/fullscreen/index.es.js +166 -0
  67. package/fullscreen/index.umd.js +1 -0
  68. package/fullscreen/package.json +7 -0
  69. package/fullscreen/style.css +1 -0
  70. package/grid/index.d.ts +7 -0
  71. package/grid/index.es.js +271 -0
  72. package/grid/index.umd.js +1 -0
  73. package/{sticky → grid}/package.json +1 -1
  74. package/grid/style.css +1 -0
  75. package/icon/index.d.ts +7 -0
  76. package/icon/index.es.js +218 -1
  77. package/icon/index.umd.js +1 -1
  78. package/icon/style.css +1 -0
  79. package/image-preview/index.d.ts +7 -0
  80. package/image-preview/index.es.js +511 -1
  81. package/image-preview/index.umd.js +1 -1
  82. package/image-preview/style.css +1 -1
  83. package/index.d.ts +7 -0
  84. package/input/index.d.ts +7 -0
  85. package/input/index.es.js +8311 -1
  86. package/input/index.umd.js +38 -1
  87. package/input/style.css +1 -1
  88. package/input-number/index.d.ts +7 -0
  89. package/input-number/index.es.js +308 -1
  90. package/input-number/index.umd.js +1 -1
  91. package/input-number/style.css +1 -1
  92. package/layout/index.d.ts +7 -0
  93. package/layout/index.es.js +115 -0
  94. package/layout/index.umd.js +1 -0
  95. package/layout/package.json +7 -0
  96. package/layout/style.css +1 -0
  97. package/loading/index.d.ts +7 -0
  98. package/loading/index.es.js +272 -1
  99. package/loading/index.umd.js +1 -1
  100. package/loading/style.css +1 -1
  101. package/message/index.d.ts +7 -0
  102. package/message/index.es.js +534 -0
  103. package/message/index.umd.js +1 -0
  104. package/message/package.json +7 -0
  105. package/message/style.css +1 -0
  106. package/modal/index.d.ts +7 -0
  107. package/modal/index.es.js +741 -0
  108. package/modal/index.umd.js +1 -0
  109. package/modal/package.json +7 -0
  110. package/modal/style.css +1 -0
  111. package/notification/index.d.ts +7 -0
  112. package/notification/index.es.js +528 -0
  113. package/notification/index.umd.js +1 -0
  114. package/notification/package.json +7 -0
  115. package/notification/style.css +1 -0
  116. package/nuxt/components/Alert.js +3 -0
  117. package/nuxt/components/Aside.js +3 -0
  118. package/nuxt/components/AutoComplete.js +3 -0
  119. package/nuxt/components/Avatar.js +3 -0
  120. package/nuxt/components/Badge.js +3 -0
  121. package/nuxt/components/Button.js +3 -0
  122. package/nuxt/components/ButtonGroup.js +3 -0
  123. package/nuxt/components/Card.js +3 -0
  124. package/nuxt/components/Checkbox.js +3 -0
  125. package/nuxt/components/CheckboxButton.js +3 -0
  126. package/nuxt/components/CheckboxGroup.js +3 -0
  127. package/nuxt/components/Col.js +3 -0
  128. package/nuxt/components/Collapse.js +3 -0
  129. package/nuxt/components/CollapseItem.js +3 -0
  130. package/nuxt/components/Column.js +3 -0
  131. package/nuxt/components/Content.js +3 -0
  132. package/nuxt/components/Countdown.js +3 -0
  133. package/nuxt/components/DRangeDatePickerPro.js +3 -0
  134. package/nuxt/components/DatePickerPro.js +3 -0
  135. package/nuxt/components/Drawer.js +3 -0
  136. package/nuxt/components/DrawerService.js +3 -0
  137. package/nuxt/components/Dropdown.js +3 -0
  138. package/nuxt/components/DropdownMenu.js +3 -0
  139. package/nuxt/components/DropdownPropsKey.js +3 -0
  140. package/nuxt/components/EditableSelect.js +3 -0
  141. package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
  142. package/nuxt/components/FORM_TOKEN.js +3 -0
  143. package/nuxt/components/FixedOverlay.js +3 -0
  144. package/nuxt/components/FlexibleOverlay.js +3 -0
  145. package/nuxt/components/Footer.js +3 -0
  146. package/nuxt/components/Form.js +3 -0
  147. package/nuxt/components/FormItem.js +3 -0
  148. package/nuxt/components/FormOperation.js +3 -0
  149. package/nuxt/components/Fullscreen.js +3 -0
  150. package/nuxt/components/Header.js +3 -0
  151. package/nuxt/components/IFileOptions.js +3 -0
  152. package/nuxt/components/IUploadOptions.js +3 -0
  153. package/nuxt/components/Icon.js +3 -0
  154. package/nuxt/components/IconGroup.js +3 -0
  155. package/nuxt/components/ImagePreviewService.js +3 -0
  156. package/nuxt/components/Input.js +3 -0
  157. package/nuxt/components/InputNumber.js +3 -0
  158. package/nuxt/components/LABEL_DATA.js +3 -0
  159. package/nuxt/components/Layout.js +3 -0
  160. package/nuxt/components/Loading.js +3 -0
  161. package/nuxt/components/LoadingOptions.js +3 -0
  162. package/nuxt/components/LoadingService.js +3 -0
  163. package/nuxt/components/Message.js +3 -0
  164. package/nuxt/components/Modal.js +3 -0
  165. package/nuxt/components/Notification.js +3 -0
  166. package/nuxt/components/NotificationService.js +3 -0
  167. package/nuxt/components/Option.js +3 -0
  168. package/nuxt/components/OptionGroup.js +3 -0
  169. package/nuxt/components/Pagination.js +3 -0
  170. package/nuxt/components/Panel.js +3 -0
  171. package/nuxt/components/PanelBody.js +3 -0
  172. package/nuxt/components/PanelFooter.js +3 -0
  173. package/nuxt/components/PanelHeader.js +3 -0
  174. package/nuxt/components/Popover.js +3 -0
  175. package/nuxt/components/Progress.js +3 -0
  176. package/nuxt/components/Radio.js +3 -0
  177. package/nuxt/components/RadioButton.js +3 -0
  178. package/nuxt/components/RadioGroup.js +3 -0
  179. package/nuxt/components/Rate.js +3 -0
  180. package/nuxt/components/Result.js +3 -0
  181. package/nuxt/components/Row.js +3 -0
  182. package/nuxt/components/Search.js +3 -0
  183. package/nuxt/components/Select.js +3 -0
  184. package/nuxt/components/Skeleton.js +3 -0
  185. package/nuxt/components/SkeletonItem.js +3 -0
  186. package/nuxt/components/Slider.js +3 -0
  187. package/nuxt/components/Splitter.js +3 -0
  188. package/nuxt/components/Statistic.js +3 -0
  189. package/nuxt/components/Status.js +3 -0
  190. package/nuxt/components/Step.js +3 -0
  191. package/nuxt/components/Steps.js +3 -0
  192. package/nuxt/components/Switch.js +3 -0
  193. package/nuxt/components/TABLE_TOKEN.js +3 -0
  194. package/nuxt/components/Tab.js +3 -0
  195. package/nuxt/components/Table.js +3 -0
  196. package/nuxt/components/Tabs.js +3 -0
  197. package/nuxt/components/Tag.js +3 -0
  198. package/nuxt/components/Textarea.js +3 -0
  199. package/nuxt/components/TimePicker.js +3 -0
  200. package/nuxt/components/TimeSelect.js +3 -0
  201. package/nuxt/components/Timeline.js +3 -0
  202. package/nuxt/components/TimelineItem.js +3 -0
  203. package/nuxt/components/Tooltip.js +3 -0
  204. package/nuxt/components/Tree.js +3 -0
  205. package/nuxt/components/Upload.js +3 -0
  206. package/nuxt/components/UploadStatus.js +3 -0
  207. package/nuxt/components/alertProps.js +3 -0
  208. package/nuxt/components/animationInjectionKey.js +3 -0
  209. package/nuxt/components/autoCompleteProps.js +3 -0
  210. package/nuxt/components/avatarProps.js +3 -0
  211. package/nuxt/components/badgeProps.js +3 -0
  212. package/nuxt/components/buttonGroupInjectionKey.js +3 -0
  213. package/nuxt/components/buttonGroupProps.js +3 -0
  214. package/nuxt/components/buttonProps.js +3 -0
  215. package/nuxt/components/cardProps.js +3 -0
  216. package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
  217. package/nuxt/components/checkboxGroupProps.js +3 -0
  218. package/nuxt/components/checkboxProps.js +3 -0
  219. package/nuxt/components/colProps.js +3 -0
  220. package/nuxt/components/colPropsBaseClass.js +3 -0
  221. package/nuxt/components/colPropsBaseStyle.js +3 -0
  222. package/nuxt/components/collapseItemProps.js +3 -0
  223. package/nuxt/components/collapseProps.js +3 -0
  224. package/nuxt/components/countdownProps.js +3 -0
  225. package/nuxt/components/datePickerProCommonProps.js +3 -0
  226. package/nuxt/components/datePickerProPanelProps.js +3 -0
  227. package/nuxt/components/datePickerProProps.js +3 -0
  228. package/nuxt/components/dropdownMenuProps.js +3 -0
  229. package/nuxt/components/editableSelectProps.js +3 -0
  230. package/nuxt/components/fixedOverlayProps.js +3 -0
  231. package/nuxt/components/flexibleOverlayProps.js +3 -0
  232. package/nuxt/components/formItemProps.js +3 -0
  233. package/nuxt/components/formProps.js +3 -0
  234. package/nuxt/components/fullscreenProps.js +3 -0
  235. package/nuxt/components/iconProps.js +3 -0
  236. package/nuxt/components/imagePreviewProps.js +3 -0
  237. package/nuxt/components/inputProps.js +3 -0
  238. package/nuxt/components/loadingProps.js +3 -0
  239. package/nuxt/components/messageProps.js +3 -0
  240. package/nuxt/components/modalProps.js +3 -0
  241. package/nuxt/components/notificationProps.js +3 -0
  242. package/nuxt/components/paginationProps.js +3 -0
  243. package/nuxt/components/panelProps.js +3 -0
  244. package/nuxt/components/popoverProps.js +3 -0
  245. package/nuxt/components/progressProps.js +3 -0
  246. package/nuxt/components/rateProps.js +3 -0
  247. package/nuxt/components/resultProps.js +3 -0
  248. package/nuxt/components/roundInjectionKey.js +3 -0
  249. package/nuxt/components/rowProps.js +3 -0
  250. package/nuxt/components/screenSizes.js +3 -0
  251. package/nuxt/components/searchProps.js +3 -0
  252. package/nuxt/components/skeletonItemProps.js +3 -0
  253. package/nuxt/components/skeletonProps.js +3 -0
  254. package/nuxt/components/sliderProps.js +3 -0
  255. package/nuxt/components/splitterProps.js +3 -0
  256. package/nuxt/components/statisticProps.js +3 -0
  257. package/nuxt/components/stepProps.js +3 -0
  258. package/nuxt/components/stepsProps.js +3 -0
  259. package/nuxt/components/svgIconProps.js +3 -0
  260. package/nuxt/components/switchProps.js +3 -0
  261. package/nuxt/components/tableProps.js +3 -0
  262. package/nuxt/components/tabsProps.js +3 -0
  263. package/nuxt/components/tagProps.js +3 -0
  264. package/nuxt/components/textareaProps.js +3 -0
  265. package/nuxt/components/timeAxisProps.js +3 -0
  266. package/nuxt/components/timerPickerPanelProps.js +3 -0
  267. package/nuxt/components/tooltipProps.js +3 -0
  268. package/nuxt/components/treeProps.js +3 -0
  269. package/nuxt/components/uploadProps.js +3 -0
  270. package/nuxt/index.js +13 -0
  271. package/overlay/index.d.ts +7 -0
  272. package/overlay/index.es.js +293 -1
  273. package/overlay/index.umd.js +1 -1
  274. package/overlay/style.css +1 -1
  275. package/package.json +17 -82
  276. package/pagination/index.d.ts +7 -0
  277. package/pagination/index.es.js +820 -1
  278. package/pagination/index.umd.js +1 -1
  279. package/pagination/style.css +1 -1
  280. package/panel/index.d.ts +7 -0
  281. package/panel/index.es.js +218 -1
  282. package/panel/index.umd.js +1 -1
  283. package/panel/style.css +1 -1
  284. package/popover/index.d.ts +7 -0
  285. package/popover/index.es.js +6062 -1
  286. package/popover/index.umd.js +27 -1
  287. package/popover/style.css +1 -1
  288. package/progress/index.d.ts +7 -0
  289. package/progress/index.es.js +207 -1
  290. package/progress/index.umd.js +3 -1
  291. package/progress/style.css +1 -1
  292. package/radio/index.d.ts +7 -0
  293. package/radio/index.es.js +8056 -1
  294. package/radio/index.umd.js +38 -1
  295. package/radio/style.css +1 -1
  296. package/rate/index.d.ts +7 -0
  297. package/rate/index.es.js +242 -1
  298. package/rate/index.umd.js +1 -1
  299. package/rate/style.css +1 -1
  300. package/result/index.d.ts +7 -0
  301. package/result/index.es.js +248 -0
  302. package/result/index.umd.js +1 -0
  303. package/result/package.json +7 -0
  304. package/result/style.css +1 -0
  305. package/ripple/index.d.ts +7 -0
  306. package/ripple/index.es.js +173 -1
  307. package/ripple/index.umd.js +1 -1
  308. package/search/index.d.ts +7 -0
  309. package/search/index.es.js +8504 -2
  310. package/search/index.umd.js +38 -10
  311. package/search/style.css +1 -1
  312. package/select/index.d.ts +7 -0
  313. package/select/index.es.js +9423 -1
  314. package/select/index.umd.js +38 -1
  315. package/select/style.css +1 -1
  316. package/skeleton/index.d.ts +7 -0
  317. package/skeleton/index.es.js +145 -0
  318. package/skeleton/index.umd.js +1 -0
  319. package/skeleton/package.json +7 -0
  320. package/skeleton/style.css +1 -0
  321. package/slider/index.d.ts +7 -0
  322. package/slider/index.es.js +203 -1
  323. package/slider/index.umd.js +1 -1
  324. package/slider/style.css +1 -1
  325. package/splitter/index.d.ts +7 -0
  326. package/splitter/index.es.js +6754 -1
  327. package/splitter/index.umd.js +27 -1
  328. package/splitter/style.css +1 -1
  329. package/statistic/index.d.ts +7 -0
  330. package/statistic/index.es.js +253 -0
  331. package/statistic/index.umd.js +1 -0
  332. package/statistic/package.json +7 -0
  333. package/statistic/style.css +1 -0
  334. package/status/index.d.ts +7 -0
  335. package/status/index.es.js +63 -1
  336. package/status/index.umd.js +1 -1
  337. package/status/style.css +1 -1
  338. package/steps/index.d.ts +7 -0
  339. package/steps/index.es.js +386 -0
  340. package/steps/index.umd.js +1 -0
  341. package/steps/package.json +7 -0
  342. package/steps/style.css +1 -0
  343. package/style.css +1 -1
  344. package/switch/index.d.ts +7 -0
  345. package/switch/index.es.js +7852 -1
  346. package/switch/index.umd.js +38 -1
  347. package/switch/style.css +1 -1
  348. package/table/index.d.ts +7 -0
  349. package/table/index.es.js +11527 -0
  350. package/table/index.umd.js +38 -0
  351. package/table/package.json +7 -0
  352. package/table/style.css +1 -0
  353. package/tabs/index.d.ts +7 -0
  354. package/tabs/index.es.js +407 -1
  355. package/tabs/index.umd.js +1 -1
  356. package/tabs/style.css +1 -1
  357. package/tag/index.d.ts +7 -0
  358. package/tag/index.es.js +156 -0
  359. package/tag/index.umd.js +1 -0
  360. package/tag/package.json +7 -0
  361. package/tag/style.css +1 -0
  362. package/textarea/index.d.ts +7 -0
  363. package/textarea/index.es.js +7986 -0
  364. package/textarea/index.umd.js +46 -0
  365. package/textarea/package.json +7 -0
  366. package/textarea/style.css +1 -0
  367. package/{theme → theme/theme.scss} +0 -0
  368. package/time-picker/index.d.ts +7 -0
  369. package/time-picker/index.es.js +9556 -0
  370. package/time-picker/index.umd.js +38 -0
  371. package/{date-picker → time-picker}/package.json +1 -1
  372. package/time-picker/style.css +1 -0
  373. package/time-select/index.d.ts +7 -0
  374. package/time-select/index.es.js +9604 -0
  375. package/time-select/index.umd.js +38 -0
  376. package/time-select/package.json +7 -0
  377. package/time-select/style.css +1 -0
  378. package/timeline/index.d.ts +7 -0
  379. package/timeline/index.es.js +427 -0
  380. package/timeline/index.umd.js +1 -0
  381. package/timeline/package.json +7 -0
  382. package/timeline/style.css +1 -0
  383. package/tooltip/index.d.ts +7 -0
  384. package/tooltip/index.es.js +5900 -1
  385. package/tooltip/index.umd.js +27 -1
  386. package/tooltip/style.css +1 -1
  387. package/tree/index.d.ts +7 -0
  388. package/tree/index.es.js +10336 -1
  389. package/tree/index.umd.js +38 -1
  390. package/tree/style.css +1 -1
  391. package/upload/index.d.ts +7 -0
  392. package/upload/index.es.js +1398 -1
  393. package/upload/index.umd.js +1 -1
  394. package/upload/style.css +1 -1
  395. package/vue-devui.es.js +27443 -2
  396. package/vue-devui.umd.js +50 -10
  397. package/accordion/index.es.js +0 -1
  398. package/accordion/index.umd.js +0 -1
  399. package/accordion/style.css +0 -1
  400. package/anchor/index.es.js +0 -1
  401. package/anchor/index.umd.js +0 -1
  402. package/anchor/style.css +0 -1
  403. package/carousel/index.es.js +0 -1
  404. package/carousel/index.umd.js +0 -1
  405. package/carousel/style.css +0 -1
  406. package/date-picker/index.es.js +0 -1
  407. package/date-picker/index.umd.js +0 -1
  408. package/date-picker/style.css +0 -1
  409. package/quadrant-diagram/index.es.js +0 -10
  410. package/quadrant-diagram/index.umd.js +0 -10
  411. package/quadrant-diagram/package.json +0 -7
  412. package/quadrant-diagram/style.css +0 -1
  413. package/sticky/index.es.js +0 -1
  414. package/sticky/index.umd.js +0 -1
  415. package/tag-input/index.es.js +0 -1
  416. package/tag-input/index.umd.js +0 -1
  417. package/tag-input/package.json +0 -7
  418. package/tag-input/style.css +0 -1
  419. package/toast/index.es.js +0 -1
  420. package/toast/index.umd.js +0 -1
  421. package/toast/style.css +0 -1
  422. package/transfer/index.es.js +0 -10
  423. package/transfer/index.umd.js +0 -10
  424. package/transfer/package.json +0 -7
  425. package/transfer/style.css +0 -1
@@ -1 +1,173 @@
1
- var e=Object.defineProperty,t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,i=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,r=(e,r)=>{for(var a in r||(r={}))n.call(r,a)&&i(e,a,r[a]);if(t)for(var a of t(r))o.call(r,a)&&i(e,a,r[a]);return e};"undefined"!=typeof require&&require;function a(e,t,n,o){const i=e-n,r=t-o;return Math.sqrt(i*i+r*r)}function s(e,t){e.dataset.vRippleCountInternal=t.toString()}function l(e){var t;return parseInt(null!=(t=e.dataset.vRippleCountInternal)?t:"0",10)}const c=(e,t,n)=>{const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),{x:r,y:c}=(({x:e,y:t},{top:n,left:o})=>({x:e-o,y:t-n}))(e,o),d=2.05*function(e,t,{width:n,height:o}){const i=a(e,t,0,0),r=a(e,t,n,0),s=a(e,t,0,o),l=a(e,t,n,o);return Math.max(i,r,s,l)}(r,c,o),p=(({borderTopLeftRadius:e,borderTopRightRadius:t,borderBottomLeftRadius:n,borderBottomRightRadius:o})=>{const i=document.createElement("div");return i.style.top="0",i.style.left="0",i.style.width="100%",i.style.height="100%",i.style.position="absolute",i.style.borderRadius=`${e} ${t} ${o} ${n}`,i.style.overflow="hidden",i.style.pointerEvents="none",i.style.webkitMaskImage="-webkit-radial-gradient(white, black)",i})(i),u=((e,t,n,o)=>{const i=document.createElement("div");return i.style.position="absolute",i.style.width=`${n}px`,i.style.height=`${n}px`,i.style.top=`${t}px`,i.style.left=`${e}px`,i.style.background=o.color,i.style.borderRadius="50%",i.style.opacity=`${o.initialOpacity}`,i.style.transform="translate(-50%,-50%) scale(0)",i.style.transition=`transform ${o.duration}s ${o.easing}, opacity ${o.duration}s ${o.easing}`,i})(r,c,d,n);!function(e){s(e,l(e)+1)}(t);let y="";"static"===i.position&&(t.style.position&&(y=t.style.position),t.style.position="relative"),p.appendChild(u),t.appendChild(p);let m=!1;const v=e=>{void 0!==e&&(document.removeEventListener("pointerup",v),document.removeEventListener("pointercancel",v)),m?f():m=!0},f=()=>{u.style.transition="opacity 150ms linear",u.style.opacity="0",setTimeout((()=>{p.remove(),function(e){s(e,l(e)-1)}(t),0===l(t)&&(!function(e){delete e.dataset.vRippleCountInternal}(t),t.style.position=y)}),150)};document.addEventListener("pointerup",v),document.addEventListener("pointercancel",v);const b=setTimeout((()=>{document.removeEventListener("pointercancel",g),requestAnimationFrame((()=>{u.style.transform="translate(-50%,-50%) scale(1)",u.style.opacity=`${n.finalOpacity}`,setTimeout((()=>v()),1e3*n.duration)}))}),n.delayTime),g=()=>{clearTimeout(b),p.remove(),document.removeEventListener("pointerup",v),document.removeEventListener("pointercancel",v),document.removeEventListener("pointercancel",g)};document.addEventListener("pointercancel",g)},d=new WeakMap,p=r({},{directive:"ripple",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:.8,easing:"ease-out",delayTime:75});var u={mounted(e,t){var n;d.set(e,null!=(n=t.value)?n:{}),e.addEventListener("pointerdown",(t=>{const n=d.get(e);!1!==n&&c(t,e,r(r({},p),n))}))},updated(e,t){var n;d.set(e,null!=(n=t.value)?n:{})}},y={title:"Ripple 水波纹",category:"通用",status:void 0,install(e){e.directive("Ripple",u)}};export{u as RippleDirective,y as default};
1
+ const DEFAULT_PLUGIN_OPTIONS = {
2
+ directive: "ripple",
3
+ color: "currentColor",
4
+ initialOpacity: 0.2,
5
+ finalOpacity: 0.1,
6
+ duration: 400,
7
+ easing: "ease-out",
8
+ delay: 75,
9
+ disabled: false
10
+ };
11
+ const createContainer = ({
12
+ borderTopLeftRadius,
13
+ borderTopRightRadius,
14
+ borderBottomLeftRadius,
15
+ borderBottomRightRadius
16
+ }) => {
17
+ const rippleContainer = document.createElement("div");
18
+ rippleContainer.style.top = "0";
19
+ rippleContainer.style.left = "0";
20
+ rippleContainer.style.width = "100%";
21
+ rippleContainer.style.height = "100%";
22
+ rippleContainer.style.position = "absolute";
23
+ rippleContainer.style.borderRadius = `${borderTopLeftRadius} ${borderTopRightRadius} ${borderBottomRightRadius} ${borderBottomLeftRadius}`;
24
+ rippleContainer.style.overflow = "hidden";
25
+ rippleContainer.style.pointerEvents = "none";
26
+ rippleContainer.style.webkitMaskImage = "-webkit-radial-gradient(white, black)";
27
+ return rippleContainer;
28
+ };
29
+ const createrippleElement = (x, y, size, options) => {
30
+ const rippleElement = document.createElement("div");
31
+ rippleElement.style.position = "absolute";
32
+ rippleElement.style.width = `${size}px`;
33
+ rippleElement.style.height = `${size}px`;
34
+ rippleElement.style.top = `${y}px`;
35
+ rippleElement.style.left = `${x}px`;
36
+ rippleElement.style.background = options.color;
37
+ rippleElement.style.borderRadius = "50%";
38
+ rippleElement.style.opacity = `${options.initialOpacity}`;
39
+ rippleElement.style.transform = `translate(-50%,-50%) scale(0)`;
40
+ rippleElement.style.transition = `transform ${options.duration / 1e3}s ${options.easing}, opacity ${options.duration / 1e3}s ${options.easing}`;
41
+ return rippleElement;
42
+ };
43
+ function magnitude(x1, y1, x2, y2) {
44
+ const deltaX = x1 - x2;
45
+ const deltaY = y1 - y2;
46
+ return Math.sqrt(deltaX * deltaX + deltaY * deltaY);
47
+ }
48
+ function getDistanceToFurthestCorner(x, y, { width, height }) {
49
+ const topLeft = magnitude(x, y, 0, 0);
50
+ const topRight = magnitude(x, y, width, 0);
51
+ const bottomLeft = magnitude(x, y, 0, height);
52
+ const bottomRight = magnitude(x, y, width, height);
53
+ return Math.max(topLeft, topRight, bottomLeft, bottomRight);
54
+ }
55
+ const getRelativePointer = ({ x, y }, { top, left }) => ({
56
+ x: x - left,
57
+ y: y - top
58
+ });
59
+ const RIPPLE_COUNT = "vRippleCountInternal";
60
+ function setRippleCount(el, count) {
61
+ el.dataset[RIPPLE_COUNT] = count.toString();
62
+ }
63
+ function getRippleCount(el) {
64
+ var _a;
65
+ return parseInt((_a = el.dataset[RIPPLE_COUNT]) != null ? _a : "0", 10);
66
+ }
67
+ function incrementRippleCount(el) {
68
+ const count = getRippleCount(el);
69
+ setRippleCount(el, count + 1);
70
+ }
71
+ function decrementRippleCount(el) {
72
+ const count = getRippleCount(el);
73
+ setRippleCount(el, count - 1);
74
+ }
75
+ function deleteRippleCount(el) {
76
+ delete el.dataset[RIPPLE_COUNT];
77
+ }
78
+ const MULTIPLE_NUMBER = 2.05;
79
+ const ripple = (event, el, options) => {
80
+ const rect = el.getBoundingClientRect();
81
+ const computedStyles = window.getComputedStyle(el);
82
+ const { x, y } = getRelativePointer(event, rect);
83
+ const size = MULTIPLE_NUMBER * getDistanceToFurthestCorner(x, y, rect);
84
+ const rippleContainer = createContainer(computedStyles);
85
+ const rippleEl = createrippleElement(x, y, size, options);
86
+ let originalPositionValue = "";
87
+ let shouldDissolveripple = false;
88
+ let token = null;
89
+ function dissolveripple() {
90
+ rippleEl.style.transition = "opacity 150ms linear";
91
+ rippleEl.style.opacity = "0";
92
+ setTimeout(() => {
93
+ rippleContainer.remove();
94
+ decrementRippleCount(el);
95
+ if (getRippleCount(el) === 0) {
96
+ deleteRippleCount(el);
97
+ el.style.position = originalPositionValue;
98
+ }
99
+ }, 150);
100
+ }
101
+ function releaseripple(e) {
102
+ if (typeof e !== "undefined") {
103
+ document.removeEventListener("pointerup", releaseripple);
104
+ document.removeEventListener("pointercancel", releaseripple);
105
+ }
106
+ if (shouldDissolveripple) {
107
+ dissolveripple();
108
+ } else {
109
+ shouldDissolveripple = true;
110
+ }
111
+ }
112
+ function cancelripple() {
113
+ clearTimeout(token);
114
+ rippleContainer.remove();
115
+ document.removeEventListener("pointerup", releaseripple);
116
+ document.removeEventListener("pointercancel", releaseripple);
117
+ document.removeEventListener("pointercancel", cancelripple);
118
+ }
119
+ incrementRippleCount(el);
120
+ if (computedStyles.position === "static") {
121
+ if (el.style.position) {
122
+ originalPositionValue = el.style.position;
123
+ }
124
+ el.style.position = "relative";
125
+ }
126
+ rippleContainer.appendChild(rippleEl);
127
+ el.appendChild(rippleContainer);
128
+ document.addEventListener("pointerup", releaseripple);
129
+ document.addEventListener("pointercancel", releaseripple);
130
+ token = setTimeout(() => {
131
+ document.removeEventListener("pointercancel", cancelripple);
132
+ requestAnimationFrame(() => {
133
+ rippleEl.style.transform = `translate(-50%,-50%) scale(1)`;
134
+ rippleEl.style.opacity = `${options.finalOpacity}`;
135
+ setTimeout(() => releaseripple(), options.duration);
136
+ });
137
+ }, options.delay);
138
+ document.addEventListener("pointercancel", cancelripple);
139
+ };
140
+ const optionMap = /* @__PURE__ */ new WeakMap();
141
+ const globalOptions = { ...DEFAULT_PLUGIN_OPTIONS };
142
+ var RippleDirective = {
143
+ mounted(el, binding) {
144
+ var _a;
145
+ optionMap.set(el, (_a = binding.value) != null ? _a : {});
146
+ el.addEventListener("pointerdown", (event) => {
147
+ const options = optionMap.get(el);
148
+ if (binding.value && binding.value.disabled) {
149
+ return;
150
+ }
151
+ if (options === false) {
152
+ return;
153
+ }
154
+ ripple(event, el, {
155
+ ...globalOptions,
156
+ ...options
157
+ });
158
+ });
159
+ },
160
+ updated(el, binding) {
161
+ var _a;
162
+ optionMap.set(el, (_a = binding.value) != null ? _a : {});
163
+ }
164
+ };
165
+ var index = {
166
+ title: "Ripple \u6C34\u6CE2\u7EB9",
167
+ category: "\u901A\u7528",
168
+ status: "100%",
169
+ install(app) {
170
+ app.directive("Ripple", RippleDirective);
171
+ }
172
+ };
173
+ export { RippleDirective, index as default };
@@ -1 +1 @@
1
- var __defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,o)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,__spreadValues=(e,t)=>{for(var o in t||(t={}))__hasOwnProp.call(t,o)&&__defNormalProp(e,o,t[o]);if(__getOwnPropSymbols)for(var o of __getOwnPropSymbols(t))__propIsEnum.call(t,o)&&__defNormalProp(e,o,t[o]);return e},__require="undefined"!=typeof require?require:e=>{throw new Error('Dynamic require of "'+e+'" is not supported')};!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).index={})}(this,(function(e){"use strict";function t(e,t,o,n){const r=e-o,i=t-n;return Math.sqrt(r*r+i*i)}const o="vRippleCountInternal";function n(e,t){e.dataset[o]=t.toString()}function r(e){var t;return parseInt(null!=(t=e.dataset[o])?t:"0",10)}const i=(e,i,s)=>{const a=i.getBoundingClientRect(),l=window.getComputedStyle(i),{x:p,y:d}=(({x:e,y:t},{top:o,left:n})=>({x:e-n,y:t-o}))(e,a),u=2.05*function(e,o,{width:n,height:r}){const i=t(e,o,0,0),s=t(e,o,n,0),a=t(e,o,0,r),l=t(e,o,n,r);return Math.max(i,s,a,l)}(p,d,a),c=(({borderTopLeftRadius:e,borderTopRightRadius:t,borderBottomLeftRadius:o,borderBottomRightRadius:n})=>{const r=document.createElement("div");return r.style.top="0",r.style.left="0",r.style.width="100%",r.style.height="100%",r.style.position="absolute",r.style.borderRadius=`${e} ${t} ${n} ${o}`,r.style.overflow="hidden",r.style.pointerEvents="none",r.style.webkitMaskImage="-webkit-radial-gradient(white, black)",r})(l),y=((e,t,o,n)=>{const r=document.createElement("div");return r.style.position="absolute",r.style.width=`${o}px`,r.style.height=`${o}px`,r.style.top=`${t}px`,r.style.left=`${e}px`,r.style.background=n.color,r.style.borderRadius="50%",r.style.opacity=`${n.initialOpacity}`,r.style.transform="translate(-50%,-50%) scale(0)",r.style.transition=`transform ${n.duration}s ${n.easing}, opacity ${n.duration}s ${n.easing}`,r})(p,d,u,s);!function(e){n(e,r(e)+1)}(i);let m="";"static"===l.position&&(i.style.position&&(m=i.style.position),i.style.position="relative"),c.appendChild(y),i.appendChild(c);let f=!1;const v=e=>{void 0!==e&&(document.removeEventListener("pointerup",v),document.removeEventListener("pointercancel",v)),f?_():f=!0},_=()=>{y.style.transition="opacity 150ms linear",y.style.opacity="0",setTimeout((()=>{c.remove(),function(e){n(e,r(e)-1)}(i),0===r(i)&&(!function(e){delete e.dataset[o]}(i),i.style.position=m)}),150)};document.addEventListener("pointerup",v),document.addEventListener("pointercancel",v);const b=setTimeout((()=>{document.removeEventListener("pointercancel",g),requestAnimationFrame((()=>{y.style.transform="translate(-50%,-50%) scale(1)",y.style.opacity=`${s.finalOpacity}`,setTimeout((()=>v()),1e3*s.duration)}))}),s.delayTime),g=()=>{clearTimeout(b),c.remove(),document.removeEventListener("pointerup",v),document.removeEventListener("pointercancel",v),document.removeEventListener("pointercancel",g)};document.addEventListener("pointercancel",g)},s=new WeakMap,a=__spreadValues({},{directive:"ripple",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:.8,easing:"ease-out",delayTime:75});var l={mounted(e,t){var o;s.set(e,null!=(o=t.value)?o:{}),e.addEventListener("pointerdown",(t=>{const o=s.get(e);!1!==o&&i(t,e,__spreadValues(__spreadValues({},a),o))}))},updated(e,t){var o;s.set(e,null!=(o=t.value)?o:{})}},p={title:"Ripple 水波纹",category:"通用",status:void 0,install(e){e.directive("Ripple",l)}};e.RippleDirective=l,e.default=p,Object.defineProperty(e,"__esModule",{value:!0}),e[Symbol.toStringTag]="Module"}));
1
+ (function(s,a){typeof exports=="object"&&typeof module!="undefined"?a(exports):typeof define=="function"&&define.amd?define(["exports"],a):(s=typeof globalThis!="undefined"?globalThis:s||self,a(s.index={}))})(this,function(s){"use strict";const a={directive:"ripple",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:400,easing:"ease-out",delay:75,disabled:!1},b=({borderTopLeftRadius:t,borderTopRightRadius:e,borderBottomLeftRadius:i,borderBottomRightRadius:o})=>{const n=document.createElement("div");return n.style.top="0",n.style.left="0",n.style.width="100%",n.style.height="100%",n.style.position="absolute",n.style.borderRadius=`${t} ${e} ${o} ${i}`,n.style.overflow="hidden",n.style.pointerEvents="none",n.style.webkitMaskImage="-webkit-radial-gradient(white, black)",n},$=(t,e,i,o)=>{const n=document.createElement("div");return n.style.position="absolute",n.style.width=`${i}px`,n.style.height=`${i}px`,n.style.top=`${e}px`,n.style.left=`${t}px`,n.style.background=o.color,n.style.borderRadius="50%",n.style.opacity=`${o.initialOpacity}`,n.style.transform="translate(-50%,-50%) scale(0)",n.style.transition=`transform ${o.duration/1e3}s ${o.easing}, opacity ${o.duration/1e3}s ${o.easing}`,n};function p(t,e,i,o){const n=t-i,r=e-o;return Math.sqrt(n*n+r*r)}function T(t,e,{width:i,height:o}){const n=p(t,e,0,0),r=p(t,e,i,0),u=p(t,e,0,o),v=p(t,e,i,o);return Math.max(n,r,u,v)}const w=({x:t,y:e},{top:i,left:o})=>({x:t-o,y:e-i}),m="vRippleCountInternal";function g(t,e){t.dataset[m]=e.toString()}function f(t){var e;return parseInt((e=t.dataset[m])!=null?e:"0",10)}function M(t){const e=f(t);g(t,e+1)}function O(t){const e=f(t);g(t,e-1)}function P(t){delete t.dataset[m]}const k=2.05,x=(t,e,i)=>{const o=e.getBoundingClientRect(),n=window.getComputedStyle(e),{x:r,y:u}=w(t,o),v=k*T(r,u,o),d=b(n),c=$(r,u,v,i);let R="",L=!1,h=null;function _(){c.style.transition="opacity 150ms linear",c.style.opacity="0",setTimeout(()=>{d.remove(),O(e),f(e)===0&&(P(e),e.style.position=R)},150)}function l(D){typeof D!="undefined"&&(document.removeEventListener("pointerup",l),document.removeEventListener("pointercancel",l)),L?_():L=!0}function E(){clearTimeout(h),d.remove(),document.removeEventListener("pointerup",l),document.removeEventListener("pointercancel",l),document.removeEventListener("pointercancel",E)}M(e),n.position==="static"&&(e.style.position&&(R=e.style.position),e.style.position="relative"),d.appendChild(c),e.appendChild(d),document.addEventListener("pointerup",l),document.addEventListener("pointercancel",l),h=setTimeout(()=>{document.removeEventListener("pointercancel",E),requestAnimationFrame(()=>{c.style.transform="translate(-50%,-50%) scale(1)",c.style.opacity=`${i.finalOpacity}`,setTimeout(()=>l(),i.duration)})},i.delay),document.addEventListener("pointercancel",E)},y=new WeakMap,I={...a};var C={mounted(t,e){var i;y.set(t,(i=e.value)!=null?i:{}),t.addEventListener("pointerdown",o=>{const n=y.get(t);e.value&&e.value.disabled||n!==!1&&x(o,t,{...I,...n})})},updated(t,e){var i;y.set(t,(i=e.value)!=null?i:{})}},S={title:"Ripple \u6C34\u6CE2\u7EB9",category:"\u901A\u7528",status:"100%",install(t){t.directive("Ripple",C)}};s.RippleDirective=C,s.default=S,Object.defineProperties(s,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,7 @@
1
+ import { App } from 'vue';
2
+ declare function install(app: App): void
3
+ declare const _default: {
4
+ install: typeof install;
5
+ version: string;
6
+ };
7
+ export default _default;